|
|
|
|
@ -377,7 +377,7 @@ class _SparePartRequestState extends State<SparePartRequest> {
|
|
|
|
|
|
|
|
|
|
if (mounted) Navigator.pop(context); // Close form
|
|
|
|
|
|
|
|
|
|
if (model?.id == 0 && widget.fromCm) {
|
|
|
|
|
if (model?.id == 0&&widget.fromCm) {
|
|
|
|
|
ServiceRequestBottomSheet.addAnotherSpareRequestBottomSheet(context: context, fromCm: widget.fromCm);
|
|
|
|
|
const SizedBox().flushBar(
|
|
|
|
|
context: context,
|
|
|
|
|
@ -403,37 +403,35 @@ class PartDetailBottomSheetSheet extends StatelessWidget {
|
|
|
|
|
return SizedBox(
|
|
|
|
|
height: SizeConfig.screenHeight! / 2.2,
|
|
|
|
|
width: SizeConfig.screenWidth,
|
|
|
|
|
child: SafeArea(
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
12.height,
|
|
|
|
|
'Parts Availability'.heading4(context),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: ListenableBuilder(
|
|
|
|
|
listenable: provider,
|
|
|
|
|
builder: (context, _) {
|
|
|
|
|
return provider.isLoading
|
|
|
|
|
? CircularProgressIndicator(
|
|
|
|
|
color: AppColor.loadingColor(context),
|
|
|
|
|
).center
|
|
|
|
|
: provider.storeAvailability.isEmpty
|
|
|
|
|
? const NoDataFound().center
|
|
|
|
|
: ListView.separated(
|
|
|
|
|
padding: const EdgeInsets.only(top: 12,bottom: 12),
|
|
|
|
|
itemCount: provider.storeAvailability.length,
|
|
|
|
|
separatorBuilder: (czt, index) => 12.height,
|
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
|
StoreAvailability model = provider.storeAvailability[index];
|
|
|
|
|
return _partAvailableQuantityCard(context: context, model: model);
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
12.height,
|
|
|
|
|
'Parts Availability'.heading4(context),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: ListenableBuilder(
|
|
|
|
|
listenable: provider,
|
|
|
|
|
builder: (context, _) {
|
|
|
|
|
return provider.isLoading
|
|
|
|
|
? CircularProgressIndicator(
|
|
|
|
|
color: AppColor.loadingColor(context),
|
|
|
|
|
).center
|
|
|
|
|
: provider.storeAvailability.isEmpty
|
|
|
|
|
? const NoDataFound().center
|
|
|
|
|
: ListView.separated(
|
|
|
|
|
padding: const EdgeInsets.only(top: 12),
|
|
|
|
|
itemCount: provider.storeAvailability.length,
|
|
|
|
|
separatorBuilder: (czt, index) => 12.height,
|
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
|
StoreAvailability model = provider.storeAvailability[index];
|
|
|
|
|
return _partAvailableQuantityCard(context: context, model: model);
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|