haroon_dev
haroon amjad 1 day ago
parent 033a4cbfe1
commit d554d01875

@ -10,6 +10,7 @@ class GetInvoicesListResponseModel {
int? clinicId;
int? doctorId;
int? invoiceNo;
int? invoiceNoVP;
int? status;
String? arrivedOn;
String? doctorName;
@ -32,6 +33,7 @@ class GetInvoicesListResponseModel {
this.clinicId,
this.doctorId,
this.invoiceNo,
this.invoiceNoVP,
this.status,
this.arrivedOn,
this.doctorName,
@ -59,6 +61,7 @@ class GetInvoicesListResponseModel {
clinicId: json["ClinicID"],
doctorId: json["DoctorID"],
invoiceNo: json["InvoiceNo"],
invoiceNoVP: json["InvoiceNo_VP"],
status: json["Status"],
arrivedOn: json["ArrivedOn"],
doctorName: json["DoctorName"],

@ -39,7 +39,10 @@ class OccasionBannerWidget extends StatelessWidget {
}
return GestureDetector(
onTap: (headerLinkUrl?.isNotEmpty ?? false) ? () => Utils.openWebView(url: headerLinkUrl!) : null,
onTap: (headerLinkUrl?.isNotEmpty ?? false) ? () {
Utils.openWebView(url: headerLinkUrl!);
} : null,
child: buildOccasionImage(headerImageUrl!).paddingOnly(bottom: 16.h),
);
},

@ -233,35 +233,37 @@ class _MyInvoicesListState extends State<MyInvoicesList> {
child: InvoiceListCard(
getInvoicesListResponseModel: myInvoicesVM.allInvoicesList[index],
onTap: () async {
if (Utils.isVidaPlusProject(myInvoicesVM.allInvoicesList[index].projectId ?? 0)) {
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.sendingEmailPleaseWait.tr(context: context));
await myInvoicesViewModel.sendInvoiceEmail(
appointmentNo: myInvoicesVM.allInvoicesList[index].appointmentNo!,
projectID: myInvoicesVM.allInvoicesList[index].projectId!,
onSuccess: (val) {
LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight(context,
child: Utils.getSuccessWidget(loadingText: LocaleKeys.emailSentSuccessfullyMessage.tr(context: context)),
callBackFunc: () {},
isFullScreen: false,
isCloseButtonVisible: true,
isAutoDismiss: true);
},
onError: (err) {
LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight(
context,
child: Utils.getErrorWidget(loadingText: err),
callBackFunc: () {},
isFullScreen: false,
isCloseButtonVisible: true,
);
});
} else {
// if (Utils.isVidaPlusProject(myInvoicesVM.allInvoicesList[index].projectId ?? 0)) {
// LoaderBottomSheet.showLoader(loadingText: LocaleKeys.sendingEmailPleaseWait.tr(context: context));
// await myInvoicesViewModel.sendInvoiceEmail(
// appointmentNo: myInvoicesVM.allInvoicesList[index].appointmentNo!,
// projectID: myInvoicesVM.allInvoicesList[index].projectId!,
// onSuccess: (val) {
// LoaderBottomSheet.hideLoader();
// showCommonBottomSheetWithoutHeight(context,
// child: Utils.getSuccessWidget(loadingText: LocaleKeys.emailSentSuccessfullyMessage.tr(context: context)),
// callBackFunc: () {},
// isFullScreen: false,
// isCloseButtonVisible: true,
// isAutoDismiss: true);
// },
// onError: (err) {
// LoaderBottomSheet.hideLoader();
// showCommonBottomSheetWithoutHeight(
// context,
// child: Utils.getErrorWidget(loadingText: err),
// callBackFunc: () {},
// isFullScreen: false,
// isCloseButtonVisible: true,
// );
// });
// } else {
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.loadingText.tr(context: context));
myInvoicesViewModel.downloadInvoicePDF(
setupId: myInvoicesVM.allInvoicesList[index].setupId!,
invoiceNo: myInvoicesVM.allInvoicesList[index].invoiceNo!,
invoiceNo: Utils.isVidaPlusProject(myInvoicesVM.allInvoicesList[index].projectId ?? 0)
? myInvoicesVM.allInvoicesList[index].invoiceNoVP!
: myInvoicesVM.allInvoicesList[index].invoiceNo!,
projectID: myInvoicesVM.allInvoicesList[index].projectId!,
onError: (err) {
LoaderBottomSheet.hideLoader();
@ -291,7 +293,7 @@ class _MyInvoicesListState extends State<MyInvoicesList> {
}
},
);
}
// }
},
),
),

@ -154,7 +154,7 @@ class InvoiceListCard extends StatelessWidget {
runSpacing: 6.h,
children: [
AppCustomChipWidget(
labelText: "${LocaleKeys.invoiceNo.tr(context: context)}: ${getInvoicesListResponseModel.invoiceNo ?? '-'}",
labelText: "${LocaleKeys.invoiceNo.tr(context: context)}: ${ Utils.isVidaPlusProject(getInvoicesListResponseModel.projectId ?? 0) ? getInvoicesListResponseModel.invoiceNoVP : getInvoicesListResponseModel.invoiceNo ?? '-'}",
labelPadding: EdgeInsetsDirectional.only(start: 6.w, end: 6.w),
isEnglishOnly: true,
),
@ -193,9 +193,11 @@ class InvoiceListCard extends StatelessWidget {
Expanded(
child: CustomButton(
// text: LocaleKeys.viewInvoiceDetails.tr(context: context),
text: Utils.isVidaPlusProject(getInvoicesListResponseModel.projectId ?? 0)
? LocaleKeys.sendEmail.tr(context: context)
: LocaleKeys.downloadInvoice.tr(context: context),
text:
// Utils.isVidaPlusProject(getInvoicesListResponseModel.projectId ?? 0)
// ? LocaleKeys.sendEmail.tr(context: context)
// :
LocaleKeys.downloadInvoice.tr(context: context),
onPressed: () {
if (onTap != null) {
onTap!();

Loading…
Cancel
Save