dev_v3.13.6_voipcall
devamirsaleemahmad 2 years ago
parent 1a5687a27c
commit d6f51f6c82

@ -24,7 +24,7 @@ class CMCService extends BaseService {
Future getCMCAllServices() async {
GetCMCServicesRequestModel getCMCServicesRequestModel =
new GetCMCServicesRequestModel(genderID: authenticatedUserObject.user!.gender, identificationNo: authenticatedUserObject.user!.patientIdentificationNo);
GetCMCServicesRequestModel(genderID: authenticatedUserObject.user.gender, identificationNo: authenticatedUserObject.user.patientIdentificationNo);
hasError = false;
// RC IMPLEMENTATION

@ -9,6 +9,7 @@ import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealth
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart';
import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart';
import 'package:diplomaticquarterapp/main.dart';
import '../base_service.dart';

@ -13,6 +13,7 @@ import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/cmc_serv
import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart';
import 'package:diplomaticquarterapp/core/service/parmacyModule/parmacy_module_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
import 'package:diplomaticquarterapp/main.dart';
import '../../../locator.dart';
import 'add_new_address_Request_Model.dart';
@ -66,7 +67,7 @@ class CMCViewModel extends BaseViewModel {
setState(ViewState.Error);
} else {
pendingOrder = _cMCService.cmcAllPresOrdersList.firstWhere((element) => element.statusId == 1 || element.statusId == 2, orElse: () => GetCMCAllOrdersResponseModel());
if (pendingOrder != null) {
if (pendingOrder != null && pendingOrder!.serviceText != null) {
// await getOrderDetailByOrderID(pendingOrder);
setState(ViewState.Idle);
} else {
@ -94,7 +95,7 @@ class CMCViewModel extends BaseViewModel {
Future<String> insertPresPresOrder({required CMCInsertPresOrderRequestModel order}) async {
setState(ViewState.Busy);
order.createdBy = user!.patientID;
order.createdBy = user.patientID;
order.orderServiceID = OrderService.Comprehensive_Medical_Checkup.getIdOrderService();
String requestId = await _cMCService.insertPresPresOrder(order: order);
if (_cMCService.hasError) {
@ -108,7 +109,7 @@ class CMCViewModel extends BaseViewModel {
Future<String> insertCMCOrderRC({required CMCInsertPresOrderRequestModel order}) async {
setState(ViewState.Busy);
order.createdBy = user!.patientID;
order.createdBy = user.patientID;
order.orderServiceID = OrderService.Comprehensive_Medical_Checkup.getIdOrderService();
String requestId = await _cMCService.insertCMCOrderRC(order: order);
if (_cMCService.hasError) {

@ -32,12 +32,12 @@ class HomeHealthCareViewModel extends BaseViewModel {
PharmacyModuleService _pharmacyModuleService = locator<PharmacyModuleService>();
bool? get isOrderUpdated => _homeHealthCareService.isOrderUpdated;
bool get isOrderUpdated => _homeHealthCareService.isOrderUpdated ?? false;
int? get orderId => _homeHealthCareService.requestNo;
GetCMCAllOrdersResponseModel? pendingOrder;
int get orderId => _homeHealthCareService.requestNo ?? 0;
late GetCMCAllOrdersResponseModel pendingOrder;
List<PatientERHHCInsertServicesList> patientERHHCInsertServicesList =[];
List<PatientERHHCInsertServicesList> patientERHHCInsertServicesList = [];
dynamic get hhcResponse => _homeHealthCareService.hhcResponse;
@ -54,7 +54,7 @@ class HomeHealthCareViewModel extends BaseViewModel {
}
Future getHHCAllPresOrders() async {
pendingOrder = null;
pendingOrder = GetCMCAllOrdersResponseModel();
setState(ViewState.Busy);
await _homeHealthCareService.getHHCAllPresOrdersRC();
if (_homeHealthCareService.hasError) {
@ -62,7 +62,7 @@ class HomeHealthCareViewModel extends BaseViewModel {
setState(ViewState.Error);
} else {
pendingOrder = _homeHealthCareService.hhcAllPresOrdersList.firstWhere((element) => element.statusId == 1 || element.statusId == 2, orElse: () => GetCMCAllOrdersResponseModel());
if (pendingOrder != null) {
if (pendingOrder != null && pendingOrder.serviceText != null) {
// await _homeHealthCareService.getOrderDetailByOrderID(pendingOrder.iD);
setState(ViewState.Idle);
} else {
@ -83,9 +83,9 @@ class HomeHealthCareViewModel extends BaseViewModel {
}
}
Future insertPresPresOrder({required PatientERInsertPresOrderRequestModel order}) async {
Future insertPresPresOrder({PatientERInsertPresOrderRequestModel? order}) async {
setState(ViewState.Busy);
order.createdBy = user!.patientID;
order!.createdBy = user.patientID;
order.orderServiceID = OrderService.HOME_HEALTH_CARE.getIdOrderService();
// await _homeHealthCareService.insertPresPresOrder(order: order);
await _homeHealthCareService.insertHHCOrderRC(order: order);
@ -125,7 +125,7 @@ class HomeHealthCareViewModel extends BaseViewModel {
return Future.value(1);
}
Future addAddressInfo({required AddNewAddressRequestModel addNewAddressRequestModel}) async {
Future addAddressInfo({AddNewAddressRequestModel? addNewAddressRequestModel}) async {
setState(ViewState.Busy);
// await _pharmacyModuleService.generatePharmacyToken().then((value) async {
@ -140,3 +140,149 @@ class HomeHealthCareViewModel extends BaseViewModel {
}
}
}
// import 'dart:async';
//
// import 'package:diplomaticquarterapp/core/enum/OrderService.dart';
// import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
// import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/GetCMCAllOrdersResponseModel.dart';
// import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/HHC_get_all_services_request_modle.dart';
// import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/HHC_get_all_services_response_model.dart';
// import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/PatientERHHCInsertServicesList.dart';
// import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_order_detail_by_order_iD_response_model.dart';
// import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart';
// import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart';
// import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart';
// import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/home_health_care_service.dart';
// import 'package:diplomaticquarterapp/core/service/parmacyModule/parmacy_module_service.dart';
// import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
// import 'package:diplomaticquarterapp/main.dart';
//
// import '../../../locator.dart';
// import 'add_new_address_Request_Model.dart';
//
// class HomeHealthCareViewModel extends BaseViewModel {
// HomeHealthCareService _homeHealthCareService = locator<HomeHealthCareService>();
//
// CustomerAddressesService _customerAddressesService = locator<CustomerAddressesService>();
//
// List<HHCGetAllServicesResponseModel> get hhcAllServicesList => _homeHealthCareService.hhcAllServicesList;
//
// List<AddressInfo> get addressesList => _customerAddressesService.addressesList;
//
// List<GetCMCAllOrdersResponseModel> get hhcAllPresOrders => _homeHealthCareService.hhcAllPresOrdersList;
//
// List<GetOrderDetailByOrderIDResponseModel> get hhcAllOrderDetail => _homeHealthCareService.hhcAllOrderDetail;
//
// PharmacyModuleService _pharmacyModuleService = locator<PharmacyModuleService>();
//
// bool get isOrderUpdated => _homeHealthCareService.isOrderUpdated!;
//
// int get orderId => _homeHealthCareService.requestNo!;
// late GetCMCAllOrdersResponseModel pendingOrder;
//
// List<PatientERHHCInsertServicesList> patientERHHCInsertServicesList =[];
//
// dynamic get hhcResponse => _homeHealthCareService.hhcResponse;
//
// Future getHHCAllServices() async {
// HHCGetAllServicesRequestModel hHCGetAllServicesRequestModel = new HHCGetAllServicesRequestModel();
// // await _homeHealthCareService.getHHCAllServices(hHCGetAllServicesRequestModel);
// await _homeHealthCareService.getHHCAllServicesRC(hHCGetAllServicesRequestModel);
//
// if (_homeHealthCareService.hasError) {
// error = _homeHealthCareService.error!;
// setState(ViewState.Error);
// } else {
// setState(ViewState.Idle);
// }
// }
//
// Future getHHCAllPresOrders() async {
// pendingOrder = GetCMCAllOrdersResponseModel();
// setState(ViewState.Busy);
// await _homeHealthCareService.getHHCAllPresOrdersRC();
// if (_homeHealthCareService.hasError) {
// error = _homeHealthCareService.error!;
// setState(ViewState.Error);
// } else {
// pendingOrder = _homeHealthCareService.hhcAllPresOrdersList.firstWhere((element) => element.statusId == 1 || element.statusId == 2, orElse: () => GetCMCAllOrdersResponseModel());
// if (pendingOrder != null) {
// logger.d(pendingOrder);
// // await _homeHealthCareService.getOrderDetailByOrderID(pendingOrder.iD);
// setState(ViewState.Idle);
// } else {
// getHHCAllServices();
// }
// }
// }
//
// Future updateHHCPresOrder(UpdatePresOrderRequestModel updatePresOrderRequestModel) async {
// setState(ViewState.Busy);
// // await _homeHealthCareService.updateHHCPresOrder(updatePresOrderRequestModel);
// await _homeHealthCareService.updateHHCPresOrderRC(updatePresOrderRequestModel);
// if (_homeHealthCareService.hasError) {
// error = _homeHealthCareService.error!;
// setState(ViewState.ErrorLocal);
// } else {
// setState(ViewState.Idle);
// }
// }
//
// Future insertPresPresOrder({required PatientERInsertPresOrderRequestModel order}) async {
// setState(ViewState.Busy);
// order.createdBy = user!.patientID;
// order.orderServiceID = OrderService.HOME_HEALTH_CARE.getIdOrderService();
// // await _homeHealthCareService.insertPresPresOrder(order: order);
// await _homeHealthCareService.insertHHCOrderRC(order: order);
// if (_homeHealthCareService.hasError) {
// error = _homeHealthCareService.error!;
// setState(ViewState.ErrorLocal);
// } else {
// getHHCAllPresOrders();
// }
// }
//
// Future getCustomerAddresses() async {
// setState(ViewState.Busy);
// await _customerAddressesService.getCustomerAddresses();
// if (_customerAddressesService.hasError) {
// error = _customerAddressesService.error!;
// setState(ViewState.ErrorLocal);
// } else {
// setState(ViewState.Idle);
// }
// }
//
// Future<int> getCustomerInfo() async {
// setState(ViewState.Busy);
// await _pharmacyModuleService.generatePharmacyToken();
//
// if (_customerAddressesService.hasError) {
// error = _customerAddressesService.error!;
// await _pharmacyModuleService.createUser();
// setState(ViewState.ErrorLocal);
// } else {
// await _pharmacyModuleService.createUser().then((value) async {
// if (!_pharmacyModuleService.hasError) await getCustomerAddresses();
// setState(ViewState.Idle);
// }).catchError((err) {});
// }
// return Future.value(1);
// }
//
// Future addAddressInfo({required AddNewAddressRequestModel addNewAddressRequestModel}) async {
// setState(ViewState.Busy);
//
// // await _pharmacyModuleService.generatePharmacyToken().then((value) async {
// await _customerAddressesService.addAddressInfo(addNewAddressRequestModel: addNewAddressRequestModel);
// // });
//
// if (_customerAddressesService.hasError) {
// error = _customerAddressesService.error!;
// setState(ViewState.ErrorLocal);
// } else {
// setState(ViewState.Idle);
// }
// }
// }

@ -79,7 +79,7 @@ class _MyApp extends State<MyApp> {
// print("checkForUpdate!!!");
// print(info.toString());
// if (info.immediateUpdateAllowed) {
// print("Immediate Allowed!!!");
// print("Immediate567184134 Allowed!!!");
// InAppUpdate.performImmediateUpdate().then((value) {}).catchError((e) => print(e.toString()));
// }
// }).catchError((e) {

@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/Comprehens
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/cmc_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/main.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
@ -30,8 +31,8 @@ class _NewCMCPageState extends State<NewCMCPage> with TickerProviderStateMixin {
late PageController _controller;
int _currentIndex = 1;
late double _latitude;
late double _longitude;
double _latitude = 0;
double _longitude = 0;
late CMCInsertPresOrderRequestModel cMCInsertPresOrderRequestModel;
@ -42,22 +43,21 @@ class _NewCMCPageState extends State<NewCMCPage> with TickerProviderStateMixin {
super.initState();
PatientERCMCInsertServicesList patientERCMCInsertServicesList;
if (widget.model.cmcAllServicesList.length > 0) {
patientERCMCInsertServicesList = new PatientERCMCInsertServicesList(
price: widget.model.cmcAllServicesList[0].price,
serviceID: widget.model.cmcAllServicesList[0].serviceID.toString(),
selectedServiceName: widget.model.cmcAllServicesList[0].text,
selectedServiceNameAR: widget.model.cmcAllServicesList[0].textN,
recordID: 1,
totalPrice: widget.model.cmcAllServicesList[0].priceTotal,
vAT: widget.model.cmcAllServicesList[0].priceVAT);
cMCInsertPresOrderRequestModel = new CMCInsertPresOrderRequestModel(patientERCMCInsertServicesList: [patientERCMCInsertServicesList]);
patientERCMCInsertServicesList = PatientERCMCInsertServicesList(
price: widget.model.cmcAllServicesList[0].price,
serviceID: widget.model.cmcAllServicesList[0].serviceID.toString(),
selectedServiceName: widget.model.cmcAllServicesList[0].text,
selectedServiceNameAR: widget.model.cmcAllServicesList[0].textN,
recordID: 1,
totalPrice: widget.model.cmcAllServicesList[0].priceTotal,
vAT: widget.model.cmcAllServicesList[0].priceVAT,
);
cMCInsertPresOrderRequestModel = CMCInsertPresOrderRequestModel(patientERCMCInsertServicesList: [patientERCMCInsertServicesList]);
} else {
cMCInsertPresOrderRequestModel = new CMCInsertPresOrderRequestModel(patientERCMCInsertServicesList: []);
cMCInsertPresOrderRequestModel = CMCInsertPresOrderRequestModel(patientERCMCInsertServicesList: []);
//changed By Aamir
}
_controller = new PageController();
// _getCurrentLocation();
}
@ -84,7 +84,6 @@ class _NewCMCPageState extends State<NewCMCPage> with TickerProviderStateMixin {
Widget build(BuildContext context) {
_context = context;
ProjectViewModel projectViewModel = Provider.of(context);
void showConfirmMessage(CMCViewModel model, GetCMCAllOrdersResponseModel order) {
showDialog(
context: context,
@ -108,9 +107,9 @@ class _NewCMCPageState extends State<NewCMCPage> with TickerProviderStateMixin {
));
}
int status = widget.model.pendingOrder != null ? widget.model.pendingOrder!.statusId! : 0;
String _statusDisp = widget.model.pendingOrder != null ? widget.model.pendingOrder!.statusText! : "";
late Color _color;
int status = widget.model.pendingOrder != null && widget.model.pendingOrder!.statusId != null ? widget.model.pendingOrder!.statusId! : 0;
String _statusDisp = widget.model.pendingOrder != null && widget.model.pendingOrder!.statusText != null ? widget.model.pendingOrder!.statusText! : "";
Color? _color;
if (status == 1) {
//pending
_color = Color(0xffCC9B14);
@ -128,7 +127,7 @@ class _NewCMCPageState extends State<NewCMCPage> with TickerProviderStateMixin {
return Scaffold(
body: SafeArea(
child: Container(
child: widget.model.pendingOrder != null
child: widget.model.pendingOrder != null && widget.model.pendingOrder!.serviceText != null
? Column(
children: [
Container(

@ -66,7 +66,7 @@ class _NewCMCStepOnePageState extends State<NewCMCStepOnePage> {
activeColor: Colors.red[800],
onChanged: (newValue) async {
selectedItem = index;
PatientERCMCInsertServicesList patientERCMCInsertServicesList = new PatientERCMCInsertServicesList(
PatientERCMCInsertServicesList patientERCMCInsertServicesList = PatientERCMCInsertServicesList(
price: widget.model.cmcAllServicesList[index].price,
serviceID: widget.model.cmcAllServicesList[index].serviceID,
selectedServiceName: widget.model.cmcAllServicesList[index].text,

@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealth
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/main.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_tow_page.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
@ -34,24 +35,24 @@ class _NewHomeHealthCareStepOnePageState extends State<NewHomeHealthCareStepOneP
if (widget.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList == null) widget.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList = [];
super.initState();
}
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold(
isShowAppBar: false,
baseViewModel: widget.model,
body: Column(
children: [
Expanded(
flex: 1,
child: ListView.separated(
physics: BouncingScrollPhysics(),
shrinkWrap: true,
padding: EdgeInsets.only(left: 21, right: 21, top: 12, bottom: 12),
itemBuilder: (context, index) {
HHCGetAllServicesResponseModel service = widget.model.hhcAllServicesList[index];
return Padding(
padding: const EdgeInsets.only(top: 4, bottom: 4),
child: Row(
@ -86,9 +87,9 @@ class _NewHomeHealthCareStepOnePageState extends State<NewHomeHealthCareStepOneP
);
},
separatorBuilder: (context, index) => Divider(
height: 1,
color: Color(0xffE5E5E5),
),
height: 1,
color: Color(0xffE5E5E5),
),
itemCount: widget.model.hhcAllServicesList.length),
),
Container(
@ -99,19 +100,19 @@ class _NewHomeHealthCareStepOnePageState extends State<NewHomeHealthCareStepOneP
(this.widget.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList!.length == 0 || widget.model.state == ViewState.BusyLocal)
? null
: () async {
widget.model.setState(ViewState.Busy);
await widget.model.getCustomerInfo();
Navigator.push(
context,
FadePage(
page: NewHomeHealthCareStepTowPage(
patientERInsertPresOrderRequestModel: widget.patientERInsertPresOrderRequestModel,
model: widget.model,
),
),
);
// }
},
widget.model.setState(ViewState.Busy);
await widget.model.getCustomerInfo();
Navigator.push(
context,
FadePage(
page: NewHomeHealthCareStepTowPage(
patientERInsertPresOrderRequestModel: widget.patientERInsertPresOrderRequestModel,
model: widget.model,
),
),
);
// }
},
disabledColor: Color(0xff575757),
),
),

@ -33,13 +33,13 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage> with Tick
late double _latitude;
late double _longitude;
PatientERInsertPresOrderRequestModel patientERInsertPresOrderRequestModel = new PatientERInsertPresOrderRequestModel();
PatientERInsertPresOrderRequestModel patientERInsertPresOrderRequestModel = PatientERInsertPresOrderRequestModel();
@override
void initState() {
super.initState();
_controller = new PageController();
// _getCurrentLocation();
_getCurrentLocation();
}
_getCurrentLocation() async {
@ -129,106 +129,109 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage> with Tick
},
scrollDirection: Axis.horizontal,
children: <Widget>[
widget.model.pendingOrder != null
? ListView(padding: EdgeInsets.symmetric(horizontal: 20, vertical: 15), children: [
(Container(
decoration: BoxDecoration(
color: Color(0xffCC9B14),
borderRadius: BorderRadius.all(
Radius.circular(10.0),
),
boxShadow: [
BoxShadow(
color: Color(0xff000000).withOpacity(.05),
blurRadius: 27,
offset: Offset(0, -3),
),
],
),
child: Container(
// decoration: containerColorRadiusLeft(Colors.white, 12),
margin: EdgeInsets.only(left: projectViewModel.isArabic ? 0 : 6, right: projectViewModel.isArabic ? 6 : 0),
padding: EdgeInsets.symmetric(vertical: 14, horizontal: 12),
widget.model.pendingOrder != null && widget.model.pendingOrder.serviceText != null
? ListView(
padding: EdgeInsets.symmetric(horizontal: 20, vertical: 15),
children: [
(Container(
decoration: BoxDecoration(
color: Colors.white,
border: Border.all(color: Colors.white, width: 1),
borderRadius: BorderRadius.only(
bottomRight: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10.0),
topRight: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10.0),
bottomLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0),
topLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0),
color: Color(0xffCC9B14),
borderRadius: BorderRadius.all(
Radius.circular(10.0),
),
boxShadow: [
BoxShadow(
color: Color(0xff000000).withOpacity(.05),
blurRadius: 27,
offset: Offset(0, -3),
),
],
),
// clipBehavior: Clip.antiAlias,
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
child: Container(
// decoration: containerColorRadiusLeft(Colors.white, 12),
margin: EdgeInsets.only(left: projectViewModel.isArabic ? 0 : 6, right: projectViewModel.isArabic ? 6 : 0),
padding: EdgeInsets.symmetric(vertical: 14, horizontal: 12),
decoration: BoxDecoration(
color: Colors.white,
border: Border.all(color: Colors.white, width: 1),
borderRadius: BorderRadius.only(
bottomRight: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10.0),
topRight: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10.0),
bottomLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0),
topLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0),
),
),
// clipBehavior: Clip.antiAlias,
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
widget.model.pendingOrder.statusText ?? "",
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xffCC9B14), letterSpacing: -0.4, height: 16 / 10),
),
SizedBox(height: 6),
Text(
'${TranslationBase.of(context).requestID}: ${widget.model.pendingOrder.iD}',
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16),
),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
TranslationBase.of(context).hospital + ": ",
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10),
),
Expanded(
child: Text(
widget.model.pendingOrder.nearestProjectName ?? "",
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.56),
),
),
],
)
],
),
),
Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text(
widget.model.pendingOrder!.statusText!,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xffCC9B14), letterSpacing: -0.4, height: 16 / 10),
),
SizedBox(height: 6),
Text(
'${TranslationBase.of(context).requestID}: ${widget.model.pendingOrder!.iD.toString()}',
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16),
DateUtil.getDayMonthYearDateFormatted(DateTime.tryParse(widget.model.pendingOrder.created.toString()) ?? DateTime.now()),
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.4, height: 16 / 10),
),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
TranslationBase.of(context).hospital + ": ",
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10),
),
Expanded(
SizedBox(height: 12),
if (widget.model.pendingOrder.statusId == 1 || widget.model.pendingOrder.statusId == 2)
InkWell(
onTap: () {
showConfirmMessage(widget.model, widget.model.pendingOrder);
},
child: Container(
padding: EdgeInsets.symmetric(vertical: 8, horizontal: 14),
decoration: BoxDecoration(
color: Color(0xffD02127),
border: Border.all(color: Colors.white, width: 1),
borderRadius: BorderRadius.circular(10),
),
child: Text(
widget.model.pendingOrder!.nearestProjectName.toString(),
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.56),
TranslationBase.of(context).cancel_nocaps,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.4),
),
),
],
)
),
],
),
),
Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text(
DateUtil.getDayMonthYearDateFormatted(DateTime.tryParse(widget.model.pendingOrder!.created!)!),
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.4, height: 16 / 10),
),
SizedBox(height: 12),
if (widget.model.pendingOrder!.statusId == 1 || widget.model.pendingOrder!.statusId == 2)
InkWell(
onTap: () {
showConfirmMessage(widget.model, widget.model.pendingOrder!);
},
child: Container(
padding: EdgeInsets.symmetric(vertical: 8, horizontal: 14),
decoration: BoxDecoration(
color: Color(0xffD02127),
border: Border.all(color: Colors.white, width: 1),
borderRadius: BorderRadius.circular(10),
),
child: Text(
TranslationBase.of(context).cancel_nocaps,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.4),
),
),
),
],
),
],
],
),
),
),
))
])
))
],
)
// FractionallySizedBox(
// widthFactor: 0.9,

@ -2,6 +2,7 @@ import 'dart:io';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/main.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
@ -72,7 +73,7 @@ class _clinic_listState extends State<ClinicList> {
late MyInAppBrowser browser;
late String liveCareClinicIDs;
late dynamic liveCareClinicIDs;
late ProjectViewModel projectViewModel;

@ -128,8 +128,8 @@ class LocationUtils {
heading: 0.0,
speed: 0.0,
speedAccuracy: 1,
// altitudeAccuracy: 0,
// headingAccuracy: 0,
altitudeAccuracy: 0,
headingAccuracy: 0,
// Added by Aamir
),
);

Loading…
Cancel
Save