pull/317/head
haroon amjad 2 months ago
parent 4329aa05ad
commit 2877bb3995

@ -120,23 +120,23 @@ class _MyInvoicesListState extends State<MyInvoicesList> {
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
SizedBox(height: 16.h), // SizedBox(height: 16.h),
CustomTabBar( // CustomTabBar(
activeTextColor: Color(0xffED1C2B), // activeTextColor: Color(0xffED1C2B),
activeBackgroundColor: Color(0xffED1C2B).withValues(alpha: .1), // activeBackgroundColor: Color(0xffED1C2B).withValues(alpha: .1),
initialIndex: 0, // initialIndex: 0,
tabs: [ // tabs: [
CustomTabBarModel(null, LocaleKeys.visitsOrders.tr(context: context)), // CustomTabBarModel(null, LocaleKeys.visitsOrders.tr(context: context)),
CustomTabBarModel(null, LocaleKeys.pharmacy.tr(context: context)), // CustomTabBarModel(null, LocaleKeys.pharmacy.tr(context: context)),
], // ],
onTabChange: (index) { // onTabChange: (index) {
myInvoicesVM.onTabChanged(index); // myInvoicesVM.onTabChanged(index);
if (index == 1 && myInvoicesVM.allPharmacyInvoicesList.isEmpty) { // if (index == 1 && myInvoicesVM.allPharmacyInvoicesList.isEmpty) {
// Load pharmacy invoices when pharmacy tab is selected and list is empty // // Load pharmacy invoices when pharmacy tab is selected and list is empty
myInvoicesVM.getAllPharmacyInvoices(); // myInvoicesVM.getAllPharmacyInvoices();
} // }
}, // },
).paddingSymmetrical(24.h, 0.h), // ).paddingSymmetrical(24.h, 0.h),
myInvoicesVM.selectedTabIndex == 0 ? Column( myInvoicesVM.selectedTabIndex == 0 ? Column(
children: [ children: [
SizedBox(height: 16.h), SizedBox(height: 16.h),
@ -376,7 +376,7 @@ class _MyInvoicesListState extends State<MyInvoicesList> {
myInvoicesViewModel.downloadPharmacyInvoicePDF( myInvoicesViewModel.downloadPharmacyInvoicePDF(
setupId: myInvoicesVM.allPharmacyInvoicesList[index].setupId ?? "", setupId: myInvoicesVM.allPharmacyInvoicesList[index].setupId ?? "",
invoiceNo: myInvoicesVM.allPharmacyInvoicesList[index].invoiceNo ?? 0, invoiceNo: myInvoicesVM.allPharmacyInvoicesList[index].invoiceNo ?? 0,
projectID: myInvoicesVM.allPharmacyInvoicesList[index].projectID ?? 0, projectID: myInvoicesVM.allPharmacyInvoicesList[index].pharmacyProjectID ?? 0,
locationID: myInvoicesVM.allPharmacyInvoicesList[index].locationID ?? 0, locationID: myInvoicesVM.allPharmacyInvoicesList[index].locationID ?? 0,
onError: (err) { onError: (err) {
LoaderBottomSheet.hideLoader(); LoaderBottomSheet.hideLoader();

Loading…
Cancel
Save