feat :
1 - AllocatedMadeModel 2 - RSegment widget 3 - buy in province
This commit is contained in:
@@ -33,9 +33,9 @@ class EnteringTheWarehouseLogic extends GetxController {
|
||||
@override
|
||||
void onReady() {
|
||||
super.onReady();
|
||||
//rootLogic.getInventory();
|
||||
|
||||
getBarGeneralInformation();
|
||||
getWaitingArrivals();
|
||||
|
||||
getImportedEntried();
|
||||
|
||||
scrollControllerImportedLoad.addListener(() {
|
||||
@@ -50,7 +50,7 @@ class EnteringTheWarehouseLogic extends GetxController {
|
||||
if (scrollControllerWaitingForArrival.position.pixels >=
|
||||
scrollControllerWaitingForArrival.position.maxScrollExtent - 100) {
|
||||
addPageWaitingForArrival.value = true;
|
||||
getWaitingArrivals();
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -72,38 +72,7 @@ class EnteringTheWarehouseLogic extends GetxController {
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> getWaitingArrivals() async {
|
||||
if (isLoadingMoreWaitingForArrival.value ||
|
||||
!hasMoreDataWaitingForArrival.value) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (addPageWaitingForArrival.value) {
|
||||
currentPageWaitingForArrival.value++;
|
||||
}
|
||||
|
||||
safeCall(
|
||||
call: () async => await rootLogic.chickenRepository.getWaitingArrivals(
|
||||
token: rootLogic.tokenService.accessToken.value!,
|
||||
page: currentPageWaitingForArrival.value,
|
||||
),
|
||||
onError: (error, stackTrace) {
|
||||
isLoadingMoreImportedLoad.value = false;
|
||||
},
|
||||
onSuccess: (result) {
|
||||
if (result != null) {
|
||||
waitingForArrival.value = result;
|
||||
if (isLoadingMoreWaitingForArrival.value) {
|
||||
waitingForArrival.value?.results.addAll(result.results);
|
||||
} else {
|
||||
waitingForArrival.value = result;
|
||||
}
|
||||
}
|
||||
|
||||
isLoadingMoreImportedLoad.value = false;
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> acceptEntried(String key) async {
|
||||
var request = StewardAllocationRequest(
|
||||
@@ -139,7 +108,7 @@ class EnteringTheWarehouseLogic extends GetxController {
|
||||
},
|
||||
onSuccess: (result) {
|
||||
clearControllers();
|
||||
getWaitingArrivals();
|
||||
|
||||
getBarGeneralInformation();
|
||||
},
|
||||
);
|
||||
@@ -162,7 +131,7 @@ class EnteringTheWarehouseLogic extends GetxController {
|
||||
eLog(error);
|
||||
},
|
||||
onSuccess: (result) {
|
||||
getWaitingArrivals();
|
||||
|
||||
getBarGeneralInformation();
|
||||
},
|
||||
);
|
||||
|
||||
@@ -21,7 +21,7 @@ class EnteringTheWarehousePage extends GetView<EnteringTheWarehouseLogic> {
|
||||
ObxValue((data) {
|
||||
return generalBarInformation(data.value);
|
||||
}, controller.barInformation),
|
||||
waitingForArrival(),
|
||||
|
||||
importedLoads(),
|
||||
],
|
||||
),
|
||||
@@ -251,7 +251,7 @@ class EnteringTheWarehousePage extends GetView<EnteringTheWarehouseLogic> {
|
||||
);
|
||||
}
|
||||
|
||||
Widget waitingForArrival() {
|
||||
/* Widget waitingForArrival() {
|
||||
return Column(
|
||||
children: [
|
||||
const SizedBox(height: 8),
|
||||
@@ -398,7 +398,7 @@ class EnteringTheWarehousePage extends GetView<EnteringTheWarehouseLogic> {
|
||||
}, controller.waitingForArrival),
|
||||
],
|
||||
);
|
||||
}
|
||||
}*/
|
||||
|
||||
Widget importedLoads() {
|
||||
return Column(
|
||||
@@ -546,7 +546,7 @@ class EnteringTheWarehousePage extends GetView<EnteringTheWarehouseLogic> {
|
||||
);
|
||||
}
|
||||
|
||||
Widget acceptBottomSheet(ResultModel resultModel) {
|
||||
/* Widget acceptBottomSheet(ResultModel resultModel) {
|
||||
return BaseBottomSheet(
|
||||
height: 500,
|
||||
child: Column(
|
||||
@@ -625,5 +625,5 @@ class EnteringTheWarehousePage extends GetView<EnteringTheWarehouseLogic> {
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user