Merge branch 'hot_fixes' into 'diplomatic-quarter-live'

Hot fixes

See merge request Cloud_Solution/diplomatic-quarter!210
merge-requests/215/merge
Mohammad Aljammal 4 years ago
commit bffafa65d1

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

@ -1283,5 +1283,8 @@ const Map localizedValues = {
"en": "This service allows you to view all the insurance cards that recorded during your visits to Al Habib Medical Group in addition to:",
"ar": "خدمة بطاقات التامين: هذه الخدمة تمكنك من الاطلاع على جميع بطاقات التامين والتي تم تسجيلها اثناء زياراتك لمجموعة الحبيب الطبية بالاضافة الى:"
},
"scan-now": {
"en": "If you have a card / Document Scan now",
"ar": "إذا كانت لديك بطاقة / مستند ارفقها الان"
},
};

@ -22,6 +22,8 @@ class InsuranceCardService extends BaseService {
List<InsuranceApprovalModel> get insuranceApproval => _insuranceApproval;
InsuranceCardDetailsModel insuranceCardDetails;
List<InsuranceCardDetailsModel> insuranceCardDetailsList = List();
bool isHaveInsuranceCard = false;
GetAllSharedRecordsByStatusResponse getAllSharedRecordsByStatusResponse =
GetAllSharedRecordsByStatusResponse();
@ -142,12 +144,15 @@ class InsuranceCardService extends BaseService {
Future getPatientInsuranceDetails({String setupID, int projectID, String patientIdentificationID,int patientID}) async{
error = "";
hasError = false;
insuranceCardDetails = null;
isHaveInsuranceCard = false;
await baseAppClient.post(GET_PATIENT_INSURANCE_DETAILS,
onSuccess: (dynamic response, int statusCode) {
insuranceCardDetails = null;
insuranceCardDetailsList.clear();
isHaveInsuranceCard = true;
response['List_PatientInsuranceDetails'].forEach((item) {
insuranceCardDetails = InsuranceCardDetailsModel.fromJson(item);
insuranceCardDetailsList.add(InsuranceCardDetailsModel.fromJson(item));
});
}, onFailure: (String error, int statusCode) {
hasError = true;

@ -17,7 +17,6 @@ class _StatusFeedbackPageState extends State<StatusFeedbackPage> {
@override
Widget build(BuildContext context) {
return BaseView<FeedbackViewModel>(
allowAny: true,
onModelReady: (model) => model.getCOC(),
builder: (_, model, widget) => AppScaffold(
baseViewModel: model,

@ -15,215 +15,328 @@ import 'package:provider/provider.dart';
import 'AttachInsuranceCardImageDialog.dart';
class InsuranceCardUpdateDetails extends StatelessWidget {
final InsuranceCardDetailsModel insuranceCardDetailsModel;
final List<InsuranceCardDetailsModel> insuranceCardDetailsModel;
final String patientIdentificationID;
final int patientID;
final String name;
const InsuranceCardUpdateDetails({Key key,
this.insuranceCardDetailsModel,
this.patientIdentificationID,
this.patientID, this.name})
const InsuranceCardUpdateDetails(
{Key key,
this.insuranceCardDetailsModel,
this.patientIdentificationID,
this.patientID,
this.name})
: super(key: key);
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<InsuranceViewModel>(
builder: (context, model, w) =>
AppScaffold(
isShowAppBar: true,
isShowDecPage: false,
appBarTitle: TranslationBase.of(context).cardDetail,
body: SingleChildScrollView(
child: Column(
children: [
Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
width: double.maxFinite,
margin: EdgeInsets.only(left: 8, right: 8, top: 8),
height:projectViewModel.isArabic?350: 270,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(25),
color: Color(0xff515B5D),
),
child: Padding(
padding: const EdgeInsets.all(12.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
insuranceCardDetailsModel.memberID,
textScaleFactor: 2.1,
style: TextStyle(color: Colors.white,
letterSpacing: 8.0,
fontWeight: FontWeight.w400,
fontSize: 17),
),
SizedBox(
height: 5,
),
Texts(
insuranceCardDetailsModel.companyName,
color: Colors.white,
),
SizedBox(
height: 25,
),
Row(
children: [
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment
.start,
children: [
Texts(TranslationBase
.of(context)
.policyHolder, color: Colors.white),
Texts(
insuranceCardDetailsModel.memberName,
color: Colors.white),
],
),
builder: (context, model, w) => AppScaffold(
isShowAppBar: true,
isShowDecPage: false,
appBarTitle: TranslationBase.of(context).cardDetail,
body: SingleChildScrollView(
child: Column(
children: [
...List.generate(
insuranceCardDetailsModel.length,
(index) => Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
width: double.maxFinite,
margin: EdgeInsets.only(left: 8, right: 8, top: 8),
height: projectViewModel.isArabic ? 320 : 240,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(25),
color: Color(0xff515B5D),
),
child: Padding(
padding: const EdgeInsets.all(12.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
insuranceCardDetailsModel[index].memberID,
textScaleFactor: 2.1,
style: TextStyle(
color: Colors.white,
letterSpacing: 8.0,
fontWeight: FontWeight.w400,
fontSize: 15),
),
SizedBox(
height: 5,
),
Texts(
insuranceCardDetailsModel[index].companyName,
fontSize: 14,
color: Colors.white,
),
SizedBox(
height: 25,
),
Row(
children: [
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
TranslationBase.of(context).policyHolder,
color: Colors.white,
fontSize: 14,
),
Texts(
insuranceCardDetailsModel[index]
.memberName,
color: Colors.white,
fontSize: 14,
),
],
),
Expanded(
child: Column(
children: [
Texts(TranslationBase
.of(context)
.policyNo, color: Colors.white),
Texts(insuranceCardDetailsModel
.policyNumber, color: Colors.white),
],
),
),
Expanded(
child: Column(
children: [
Texts(TranslationBase.of(context).policyNo,
color: Colors.white),
Texts(
insuranceCardDetailsModel[index]
.policyNumber,
color: Colors.white),
],
),
),
],
),
SizedBox(
height: 25,
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
TranslationBase.of(context)
.expiryDateTitle,
color: Colors.white,
fontSize: 12,
),
Texts(
insuranceCardDetailsModel[index].dOB,
color: Colors.white,
fontSize: 12,
),
],
),
),
Expanded(
child: Column(
children: [
Texts(
TranslationBase.of(context).classTitle,
color: Colors.white,
fontSize: 12,
),
Texts(
insuranceCardDetailsModel[index]
.subCategory,
color: Colors.white,
fontSize: 12,
),
],
),
),
Expanded(
child: Column(
children: [
Texts(
TranslationBase.of(context).approval,
color: Colors.white,
fontSize: 12,
),
Texts(
insuranceCardDetailsModel[index]
.approvalLimit
.toString(),
color: Colors.white,
fontSize: 12,
),
],
),
],
),
SizedBox(
height: 25,
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Expanded(
),
],
)
],
),
),
),
),
),
if(insuranceCardDetailsModel.isEmpty)
Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
margin: EdgeInsets.all(10.0),
child: Card(
margin: EdgeInsets.fromLTRB(
8.0, 16.0, 8.0, 8.0),
color: Colors.white,
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(10),
),
child: Container(
width: MediaQuery.of(context).size.width,
padding: EdgeInsets.all(10.0),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
Expanded(
flex: 3,
child: Container(
margin: EdgeInsets.only(
top: 2.0,
left: 10.0,
right: 20.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment
crossAxisAlignment:
CrossAxisAlignment
.start,
children: [
children: <Widget>[
Texts(
TranslationBase
.of(context)
.expiryDateTitle,
color: Colors.white),
Texts(insuranceCardDetailsModel.dOB,
color: Colors.white),
],
),
),
Expanded(
child: Column(
children: [
Texts(TranslationBase
.of(context)
.classTitle, color: Colors.white),
name,
fontSize: 14,
color: Colors.black,
fontWeight:
FontWeight.w500,
),
SizedBox(
height: 8,
),
Texts(
insuranceCardDetailsModel.subCategory,
color: Colors.white),
],
),
),
Expanded(
child: Column(
children: [
Texts(TranslationBase
.of(context)
.approval, color: Colors.white),
Texts(insuranceCardDetailsModel
.approvalLimit
.toString(), color: Colors.white),
TranslationBase.of(
context)
.fileno +
": " +patientID.toString(),
fontSize: 14,
color: Colors.black,
fontWeight:
FontWeight.w500,
)
],
),
),
],
)
],
),
],
),
),
),
),
)
],
),
),
bottomSheet: Container(
width: double.infinity,
height: MediaQuery
.of(context)
.size
.height * 0.21,
child: Container(
margin: EdgeInsets.only(left: 8, right: 8),
child: Column(
children: [
SizedBox(height: 150,),
Image.asset('assets/images/no-data-found.png',width: 80,height: 80,),
SizedBox(height: 8,),
SecondaryButton(
textColor: Colors.white,
label: TranslationBase
.of(context)
.agree
.toUpperCase(),
color: Theme
.of(context)
.primaryColor,
onTap: () async {
GifLoaderDialogUtils.showMyDialog(context);
await model.uploadInsuranceCard(patientIdentificationID: patientIdentificationID,patientID: patientID);
GifLoaderDialogUtils.hideDialog(context);
if (model.state == ViewState.ErrorLocal ) {
AppToast.showErrorToast(message: model.error);
} else {
AppToast.showSuccessToast(message: TranslationBase.of(context).requestSent);
}
},
),
SizedBox(height: 12,),
SecondaryButton(
textColor: Colors.white,
label: TranslationBase
.of(context)
.disagree
.toUpperCase(),
color: Colors.grey[800],
onTap: () async {
confirmSelectFamilyDialog(context: context, name: name, fileNo: patientID.toString(),model: model);
},
)
Texts(TranslationBase.of(context).noDataAvailable)
],
)
],
),
),
bottomSheet: Container(
width: double.infinity,
height:insuranceCardDetailsModel.isEmpty? MediaQuery.of(context).size.height * 0.14:MediaQuery.of(context).size.height * 0.21,
child: Container(
margin: EdgeInsets.only(left: 8, right: 8),
child: Column(
children: [
SizedBox(
height: 8,
),
),
if(insuranceCardDetailsModel.isEmpty)
SecondaryButton(
textColor: Colors.white,
label: TranslationBase.of(context).scanNow.toUpperCase(),
color: Theme.of(context).primaryColor,
onTap: () async {
confirmAttachInsuranceCardImageDialogDialog(
context: context,
name: name,
fileNo: patientID.toString(),
model: model);
},
),
if(insuranceCardDetailsModel.isNotEmpty)
SecondaryButton(
textColor: Colors.white,
label: TranslationBase.of(context).agree.toUpperCase(),
color: Theme.of(context).primaryColor,
onTap: () async {
GifLoaderDialogUtils.showMyDialog(context);
await model.uploadInsuranceCard(
patientIdentificationID: patientIdentificationID,
patientID: patientID);
GifLoaderDialogUtils.hideDialog(context);
if (model.state == ViewState.ErrorLocal) {
AppToast.showErrorToast(message: model.error);
} else {
AppToast.showSuccessToast(
message: TranslationBase.of(context).requestSent);
}
},
),if(insuranceCardDetailsModel.isNotEmpty)
SizedBox(
height: 12,
),if(insuranceCardDetailsModel.isNotEmpty)
SecondaryButton(
textColor: Colors.white,
label: TranslationBase.of(context).disagree.toUpperCase(),
color: Colors.grey[800],
onTap: () async {
confirmAttachInsuranceCardImageDialogDialog(
context: context,
name: name,
fileNo: patientID.toString(),
model: model);
},
)
],
),
),
),
),
);
}
void confirmSelectFamilyDialog({BuildContext context, String name, String fileNo,InsuranceViewModel model}) {
void confirmAttachInsuranceCardImageDialogDialog(
{BuildContext context,
String name,
String fileNo,
InsuranceViewModel model}) {
showDialog(
context: context,
child: AttachInsuranceCardImageDialog(
fileNo: fileNo,
name: name,
image: (file, image) async{
image: (file, image) async {
GifLoaderDialogUtils.showMyDialog(context);
await model.uploadInsuranceCard(patientIdentificationID: patientIdentificationID,patientID: patientID,image: image);
await model.uploadInsuranceCard(
patientIdentificationID: patientIdentificationID,
patientID: patientID,
image: image);
GifLoaderDialogUtils.hideDialog(context);
if (model.state == ViewState.ErrorLocal ||
model.state == ViewState.Error) {
AppToast.showErrorToast(message: model.error);
} else {
AppToast.showSuccessToast(message: TranslationBase.of(context).requestSent);
AppToast.showSuccessToast(
message: TranslationBase.of(context).requestSent);
}
Navigator.pop(context);
},

@ -137,8 +137,7 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
BorderRadius.circular(10),
),
child: Container(
width:
MediaQuery.of(context).size.width,
width: MediaQuery.of(context).size.width,
padding: EdgeInsets.all(10.0),
child: Row(
crossAxisAlignment:
@ -468,13 +467,12 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
patientIdentificationID: patientIdentificationID)
.then((value) {
GifLoaderDialogUtils.hideDialog(context);
if (_insuranceCardService.insuranceCardDetails != null) {
if (!_insuranceCardService.hasError && _insuranceCardService.isHaveInsuranceCard) {
Navigator.push(
context,
FadePage(
page: InsuranceCardUpdateDetails(
insuranceCardDetailsModel:
_insuranceCardService.insuranceCardDetails,
insuranceCardDetailsModel: _insuranceCardService.insuranceCardDetailsList,
patientID: patientID,
patientIdentificationID: patientIdentificationID,
name: name,

@ -516,7 +516,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
// );
// themeNotifier.setTheme(defaultTheme);
}
void checkUserStatus(token, {isLoader}) async {
void checkUserStatus(token, {isLoader = true}) async {
if (isLoader)
//GifLoaderDialogUtils.showMyDialog(context);
authService

@ -214,6 +214,7 @@ class _AdvancePaymentPageState extends State<AdvancePaymentPage> {
SizedBox(
height: 12,
),
if(model.user!=null)
NewTextFields(
hintText: TranslationBase.of(context).depositorEmail,
initialValue: model.user.emailAddress,

@ -1,6 +1,7 @@
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/model/sick_leave/sick_leave.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/patient_sick_leave_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
@ -9,6 +10,7 @@ import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.d
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class PatientSickLeavePage extends StatefulWidget {
@override
@ -19,12 +21,16 @@ class _PatientSickLeavePageState extends State<PatientSickLeavePage> {
List<ImagesInfo> imagesInfo = List();
@override
Widget build(BuildContext context) {
void initState() {
imagesInfo.add(ImagesInfo(
imageEn:
'https://hmgwebservices.com/Images/MobileApp/imges-info/sick-leaves/en/0.png',
imageAr:
'https://hmgwebservices.com/Images/MobileApp/imges-info/sick-leaves/ar/0.png'));
imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/sick-leaves/en/0.png',
imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/sick-leaves/ar/0.png'));
super.initState();
}
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<PatientSickLeaveViewMode>(
onModelReady: (model) => model.getSickLeave(),
builder: (_, model, w) => AppScaffold(
@ -40,21 +46,13 @@ class _PatientSickLeavePageState extends State<PatientSickLeavePage> {
itemCount: model.sickLeaveList.length,
itemBuilder: (context, index) => DoctorCard(
name: model.sickLeaveList[index].doctorName,
date: DateUtil.getMonthDayYearDateFormatted(
model.sickLeaveList[index].requestDate),
date:projectViewModel.isArabic? DateUtil.getMonthDayYearDateFormattedAr(model.sickLeaveList[index].requestDate):DateUtil.getMonthDayYearDateFormatted(model.sickLeaveList[index].requestDate),
profileUrl: model.sickLeaveList[index].doctorImageURL,
rat: model.sickLeaveList[index].actualDoctorRate.toDouble(),
subName: model.sickLeaveList[index].projectName,
isInOutPatient: model.sickLeaveList[index].isInOutPatient,
onEmailTap: () {
showConfirmMessage(model, index);
// model.sendSickLeaveEmail(
// message: TranslationBase.of(context).emailSentSuccessfully,
// requestNo: model.sickLeaveList[index].requestNo,
// doctorName: model.sickLeaveList[index].doctorName,
// projectName: model.sickLeaveList[index].projectName,
// setupID: model.sickLeaveList[index].setupID,
// projectID: model.sickLeaveList[index].projectID);
},
),
),

@ -179,7 +179,7 @@ class PrescriptionItemsPage extends StatelessWidget {
),
bottomSheet: Container(
width: double.infinity,
height: MediaQuery.of(context).size.height * 0.12,
height: MediaQuery.of(context).size.height * 0.14,
color: Colors.grey[100],
child: Column(
children: <Widget>[

@ -36,7 +36,7 @@ class PrescriptionsHistoryDetailsPage extends StatelessWidget {
Container(
width: double.infinity,
decoration: BoxDecoration(
color: prescriptionsOrder.status==3 ?Colors.red:prescriptionsOrder.status==2? Colors.green: Colors.grey,
color: prescriptionsOrder.status == 3 ?Colors.green : prescriptionsOrder.status ==2 ? Colors.grey: Colors.red,
borderRadius: BorderRadius.circular(5)),
child: Padding(
padding: const EdgeInsets.all(8.0),

@ -1,5 +1,6 @@
import 'package:diplomaticquarterapp/core/enum/filter_type.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescription_items_page.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
@ -9,6 +10,7 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class PrescriptionsPage extends StatelessWidget {
final PrescriptionsViewModel prescriptionsViewModel;
@ -18,6 +20,7 @@ class PrescriptionsPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold(
baseViewModel: prescriptionsViewModel,
body: FractionallySizedBox(
@ -89,8 +92,7 @@ class PrescriptionsPage extends StatelessWidget {
rat: prescriptions.actualDoctorRate.toDouble(),
subName: prescriptions.name,
isInOutPatient: prescriptions.isInOutPatient,
date: DateUtil.getMonthDayYearDateFormatted(
prescriptions.dischargeDate),
date:projectViewModel.isArabic? DateUtil.getMonthDayYearDateFormattedAr(prescriptions.dischargeDate):DateUtil.getMonthDayYearDateFormatted(prescriptions.dischargeDate),
),
);
}).toList(),

@ -54,8 +54,8 @@ class RadiologyDetailsPage extends StatelessWidget {
bottomSheet: Container(
width: double.infinity,
height: finalRadiology.dIAPACSURL != ""
? MediaQuery.of(context).size.height * 0.2
: MediaQuery.of(context).size.height * 0.15,
? MediaQuery.of(context).size.height * 0.25
: MediaQuery.of(context).size.height * 0.14,
color: Colors.grey[100],
child: Column(
mainAxisSize: MainAxisSize.min,

@ -1065,6 +1065,7 @@ class TranslationBase {
String get requestSent => localizedValues['request-sent'][locale.languageCode];
String get attachInsuraceImage => localizedValues['attach-insurace-image'][locale.languageCode];
String get infoInsurCards => localizedValues['info-insur-cards'][locale.languageCode];
String get scanNow => localizedValues['scan-now'][locale.languageCode];
}

@ -21,7 +21,7 @@ class AppExpandableNotifier extends StatefulWidget {
this.bodyWidget,
this.title,
this.collapsed,
this.isExpand});
this.isExpand = false});
_AppExpandableNotifier createState() => _AppExpandableNotifier();
}

Loading…
Cancel
Save