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