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);
return Padding(
padding: const EdgeInsets.all(16.0),
child: inPatientAdvanceHistoryResponseModel != null && inPatientAdvanceHistoryResponseModel.responseInpatientAdvanceInfo.isNotEmpty
child: inPatientAdvanceHistoryResponseModel != null && inPatientAdvanceHistoryResponseModel.responseInpatientAdvanceInfo != null
? ListView.separated(
itemCount: inPatientAdvanceHistoryResponseModel.responseInpatientAdvanceInfo.length,
itemBuilder: (BuildContext context, int index) {

@ -16,8 +16,9 @@ import 'package:share_plus/share_plus.dart';
class InPatientPendingAdvancePayment extends StatefulWidget {
InPatientAdvanceResponseModel inPatientAdvanceResponseModel;
bool isHasData;
InPatientPendingAdvancePayment({@required this.inPatientAdvanceResponseModel});
InPatientPendingAdvancePayment({this.isHasData, this.inPatientAdvanceResponseModel});
@override
State<InPatientPendingAdvancePayment> createState() => _InPatientPendingAdvancePaymentState();
@ -57,93 +58,95 @@ class _InPatientPendingAdvancePaymentState extends State<InPatientPendingAdvance
margin: EdgeInsets.zero,
child: Padding(
padding: const EdgeInsets.all(12.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Payment request for: ",
// TranslationBase.of(context).covidBookAppo,
style: TextStyle(
fontWeight: FontWeight.bold,
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,
child: widget.isHasData
? Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Payment request for: ",
// TranslationBase.of(context).covidBookAppo,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 16,
letterSpacing: -0.64,
),
),
),
mWidth(3),
Text(
projectViewModel.user.firstName + " " + projectViewModel.user.lastName,
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 12,
letterSpacing: -0.48,
mHeight(6),
Row(
children: [
Text(
TranslationBase.of(context).patientName + ":",
style: TextStyle(
fontWeight: FontWeight.w600,
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(
TranslationBase.of(context).identificationNumber + ":",
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 10,
letterSpacing: -0.6,
color: CustomColors.grey,
Row(
children: [
Text(
TranslationBase.of(context).identificationNumber + ":",
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 10,
letterSpacing: -0.6,
color: CustomColors.grey,
),
),
mWidth(3),
Text(
projectViewModel.user.patientIdentificationNo,
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 12,
letterSpacing: -0.48,
),
),
],
),
),
mWidth(3),
Text(
projectViewModel.user.patientIdentificationNo,
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 12,
letterSpacing: -0.48,
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,
),
),
],
),
),
],
),
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,
),
),
],
),
],
),
],
)
: getNoDataWidget(context),
),
),
),
mHeight(12),
// Expanded(child: Container()),
Container(
widget.isHasData ? Container(
decoration: cardRadius(12.0),
margin: EdgeInsets.zero,
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/pages/InPatientServices/components/inpatient_paid_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/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
@ -12,8 +9,9 @@ import 'package:provider/provider.dart';
class InPatientAdvancePayment extends StatefulWidget {
InPatientAdvanceResponseModel inPatientAdvanceResponseModel;
bool isHasData;
InPatientAdvancePayment({@required this.inPatientAdvanceResponseModel});
InPatientAdvancePayment({this.isHasData, this.inPatientAdvanceResponseModel});
@override
State<InPatientAdvancePayment> createState() => _InPatientAdvancePaymentState();
@ -67,7 +65,7 @@ class _InPatientAdvancePaymentState extends State<InPatientAdvancePayment> with
physics: BouncingScrollPhysics(),
controller: _tabController,
children: [
InPatientPendingAdvancePayment(inPatientAdvanceResponseModel: widget.inPatientAdvanceResponseModel),
InPatientPendingAdvancePayment(isHasData: widget.isHasData, inPatientAdvanceResponseModel: widget.inPatientAdvanceResponseModel),
InPatientPaidAdvancePayment(),
],
),

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

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

Loading…
Cancel
Save