merge-update-with-lab-changes
haroon amjad 2 years ago
parent 0f4f98f31c
commit c5e88ac7ba

@ -34,7 +34,7 @@ class _InPatientPaidAdvancePaymentState extends State<InPatientPaidAdvancePaymen
projectViewModel = Provider.of(context); projectViewModel = Provider.of(context);
return Padding( return Padding(
padding: const EdgeInsets.all(16.0), padding: const EdgeInsets.all(16.0),
child: inPatientAdvanceHistoryResponseModel != null && inPatientAdvanceHistoryResponseModel.responseInpatientAdvanceInfo.isNotEmpty child: inPatientAdvanceHistoryResponseModel != null && inPatientAdvanceHistoryResponseModel.responseInpatientAdvanceInfo != null
? ListView.separated( ? ListView.separated(
itemCount: inPatientAdvanceHistoryResponseModel.responseInpatientAdvanceInfo.length, itemCount: inPatientAdvanceHistoryResponseModel.responseInpatientAdvanceInfo.length,
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {

@ -16,8 +16,9 @@ import 'package:share_plus/share_plus.dart';
class InPatientPendingAdvancePayment extends StatefulWidget { class InPatientPendingAdvancePayment extends StatefulWidget {
InPatientAdvanceResponseModel inPatientAdvanceResponseModel; InPatientAdvanceResponseModel inPatientAdvanceResponseModel;
bool isHasData;
InPatientPendingAdvancePayment({@required this.inPatientAdvanceResponseModel}); InPatientPendingAdvancePayment({this.isHasData, this.inPatientAdvanceResponseModel});
@override @override
State<InPatientPendingAdvancePayment> createState() => _InPatientPendingAdvancePaymentState(); State<InPatientPendingAdvancePayment> createState() => _InPatientPendingAdvancePaymentState();
@ -57,93 +58,95 @@ class _InPatientPendingAdvancePaymentState extends State<InPatientPendingAdvance
margin: EdgeInsets.zero, margin: EdgeInsets.zero,
child: Padding( child: Padding(
padding: const EdgeInsets.all(12.0), padding: const EdgeInsets.all(12.0),
child: Column( child: widget.isHasData
crossAxisAlignment: CrossAxisAlignment.start, ? Column(
children: [ crossAxisAlignment: CrossAxisAlignment.start,
Text( children: [
"Payment request for: ", Text(
// TranslationBase.of(context).covidBookAppo, "Payment request for: ",
style: TextStyle( // TranslationBase.of(context).covidBookAppo,
fontWeight: FontWeight.bold, style: TextStyle(
fontSize: 16, fontWeight: FontWeight.bold,
letterSpacing: -0.64, fontSize: 16,
), letterSpacing: -0.64,
), ),
mHeight(6),
Row(
children: [
Text(
TranslationBase.of(context).patientName + ":",
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 10,
letterSpacing: -0.6,
color: CustomColors.grey,
), ),
), mHeight(6),
mWidth(3), Row(
Text( children: [
projectViewModel.user.firstName + " " + projectViewModel.user.lastName, Text(
style: TextStyle( TranslationBase.of(context).patientName + ":",
fontWeight: FontWeight.w600, style: TextStyle(
fontSize: 12, fontWeight: FontWeight.w600,
letterSpacing: -0.48, fontSize: 10,
letterSpacing: -0.6,
color: CustomColors.grey,
),
),
mWidth(3),
Text(
projectViewModel.user.firstName + " " + projectViewModel.user.lastName,
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 12,
letterSpacing: -0.48,
),
),
],
), ),
), Row(
], children: [
), Text(
Row( TranslationBase.of(context).identificationNumber + ":",
children: [ style: TextStyle(
Text( fontWeight: FontWeight.w600,
TranslationBase.of(context).identificationNumber + ":", fontSize: 10,
style: TextStyle( letterSpacing: -0.6,
fontWeight: FontWeight.w600, color: CustomColors.grey,
fontSize: 10, ),
letterSpacing: -0.6, ),
color: CustomColors.grey, mWidth(3),
Text(
projectViewModel.user.patientIdentificationNo,
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 12,
letterSpacing: -0.48,
),
),
],
), ),
), Row(
mWidth(3), children: [
Text( Text(
projectViewModel.user.patientIdentificationNo, TranslationBase.of(context).mrn + ":",
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 12, fontSize: 10,
letterSpacing: -0.48, letterSpacing: -0.6,
color: CustomColors.grey,
),
),
mWidth(3),
Text(
projectViewModel.user.patientID.toString(),
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 12,
letterSpacing: -0.48,
),
),
],
), ),
), ],
], )
), : getNoDataWidget(context),
Row(
children: [
Text(
TranslationBase.of(context).mrn + ":",
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 10,
letterSpacing: -0.6,
color: CustomColors.grey,
),
),
mWidth(3),
Text(
projectViewModel.user.patientID.toString(),
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 12,
letterSpacing: -0.48,
),
),
],
),
],
),
), ),
), ),
), ),
mHeight(12), mHeight(12),
// Expanded(child: Container()), // Expanded(child: Container()),
Container( widget.isHasData ? Container(
decoration: cardRadius(12.0), decoration: cardRadius(12.0),
margin: EdgeInsets.zero, margin: EdgeInsets.zero,
padding: EdgeInsets.all(12.0), padding: EdgeInsets.all(12.0),
@ -218,7 +221,7 @@ class _InPatientPendingAdvancePaymentState extends State<InPatientPendingAdvance
), ),
], ],
), ),
), ) : Container(),
], ],
), ),
); );

@ -2,9 +2,6 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/InPatientServices/get_inpatient_advance_requests_response_model.dart'; import 'package:diplomaticquarterapp/models/InPatientServices/get_inpatient_advance_requests_response_model.dart';
import 'package:diplomaticquarterapp/pages/InPatientServices/components/inpatient_paid_advance_payment.dart'; import 'package:diplomaticquarterapp/pages/InPatientServices/components/inpatient_paid_advance_payment.dart';
import 'package:diplomaticquarterapp/pages/InPatientServices/components/inpatient_pending_advance_payment.dart'; import 'package:diplomaticquarterapp/pages/InPatientServices/components/inpatient_pending_advance_payment.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -12,8 +9,9 @@ import 'package:provider/provider.dart';
class InPatientAdvancePayment extends StatefulWidget { class InPatientAdvancePayment extends StatefulWidget {
InPatientAdvanceResponseModel inPatientAdvanceResponseModel; InPatientAdvanceResponseModel inPatientAdvanceResponseModel;
bool isHasData;
InPatientAdvancePayment({@required this.inPatientAdvanceResponseModel}); InPatientAdvancePayment({this.isHasData, this.inPatientAdvanceResponseModel});
@override @override
State<InPatientAdvancePayment> createState() => _InPatientAdvancePaymentState(); State<InPatientAdvancePayment> createState() => _InPatientAdvancePaymentState();
@ -67,7 +65,7 @@ class _InPatientAdvancePaymentState extends State<InPatientAdvancePayment> with
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
controller: _tabController, controller: _tabController,
children: [ children: [
InPatientPendingAdvancePayment(inPatientAdvanceResponseModel: widget.inPatientAdvanceResponseModel), InPatientPendingAdvancePayment(isHasData: widget.isHasData, inPatientAdvanceResponseModel: widget.inPatientAdvanceResponseModel),
InPatientPaidAdvancePayment(), InPatientPaidAdvancePayment(),
], ],
), ),

@ -336,12 +336,14 @@ class _InPatientServicesHomeState extends State<InPatientServicesHome> {
if (res["MessageStatus"] == 1) { if (res["MessageStatus"] == 1) {
if (res['responseInpatient'] != null) { if (res['responseInpatient'] != null) {
inPatientAdvanceResponseModel = InPatientAdvanceResponseModel.fromJson(res["responseInpatient"]); inPatientAdvanceResponseModel = InPatientAdvanceResponseModel.fromJson(res["responseInpatient"]);
Navigator.push(context, FadePage(page: InPatientAdvancePayment(inPatientAdvanceResponseModel: inPatientAdvanceResponseModel))); Navigator.push(context, FadePage(page: InPatientAdvancePayment(isHasData: true, inPatientAdvanceResponseModel: inPatientAdvanceResponseModel)));
} else { } else {
// Navigator.push(context, FadePage(page: InPatientAdvancePayment(isHasData: false, inPatientAdvanceResponseModel: inPatientAdvanceResponseModel)));
AppToast.showErrorToast(message: TranslationBase.of(context).noData); AppToast.showErrorToast(message: TranslationBase.of(context).noData);
} }
} else { } else {
AppToast.showErrorToast(message: res["endUserMessage"]); // AppToast.showErrorToast(message: res["ErrorEndUserMessage"]);
Navigator.push(context, FadePage(page: InPatientAdvancePayment(isHasData: false, inPatientAdvanceResponseModel: inPatientAdvanceResponseModel)));
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);

@ -636,8 +636,8 @@ class _ConfirmLogin extends State<ConfirmLogin> {
loginTokenID = result.logInTokenID, loginTokenID = result.logInTokenID,
sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID), sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID),
sharedPref.setString(TOKEN, result.authenticationTokenID), sharedPref.setString(TOKEN, result.authenticationTokenID),
checkIfUserAgreedBefore(result),
projectViewModel.analytics.loginRegistration.login_successful(), projectViewModel.analytics.loginRegistration.login_successful(),
checkIfUserAgreedBefore(result),
} }
} }
else else
@ -668,7 +668,6 @@ class _ConfirmLogin extends State<ConfirmLogin> {
if (result.isNeedUserAgreement == true) { if (result.isNeedUserAgreement == true) {
//move to agreement page. //move to agreement page.
} else { } else {
checkIfIsInPatient();
goToHome(); goToHome();
} }
} }
@ -736,6 +735,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
.getIsLastAppointmentRatedList() .getIsLastAppointmentRatedList()
.then((value) => { .then((value) => {
getToDoCount(), getToDoCount(),
checkIfIsInPatient(),
GifLoaderDialogUtils.hideDialog(AppGlobal.context), GifLoaderDialogUtils.hideDialog(AppGlobal.context),
if (appointmentRateViewModel.isHaveAppointmentNotRate) if (appointmentRateViewModel.isHaveAppointmentNotRate)
{ {

Loading…
Cancel
Save