feat : sale in the province
This commit is contained in:
@@ -10,7 +10,8 @@ import 'package:rasadyar_core/core.dart';
|
||||
|
||||
class OutOfProvinceLogic extends GetxController {
|
||||
var rootLogic = Get.find<RootLogic>();
|
||||
Rxn<AllocatedMadeModel> allocatedMadeModel = Rxn<AllocatedMadeModel>();
|
||||
Rxn<List<AllocatedMadeModel>?> allocatedMadeModel =
|
||||
Rxn<List<AllocatedMadeModel>?>();
|
||||
RxList<ProductModel> rolesProductsModel = RxList<ProductModel>();
|
||||
|
||||
RxList<GuildModel> guildsModel = <GuildModel>[].obs;
|
||||
@@ -29,11 +30,16 @@ class OutOfProvinceLogic extends GetxController {
|
||||
safeCall(
|
||||
call: () async => await rootLogic.chickenRepository.getAllocatedMade(
|
||||
token: rootLogic.tokenService.accessToken.value!,
|
||||
page: 1,
|
||||
queryParameters: buildQueryParams(
|
||||
page: 1,
|
||||
pageSize: 20,
|
||||
search: 'filter',
|
||||
role: 'Steward',
|
||||
),
|
||||
),
|
||||
onSuccess: (result) {
|
||||
if (result != null) {
|
||||
allocatedMadeModel.value = result;
|
||||
allocatedMadeModel.value = result.results;
|
||||
}
|
||||
},
|
||||
onError: (error, stacktrace) {},
|
||||
@@ -73,8 +79,7 @@ class OutOfProvinceLogic extends GetxController {
|
||||
call: () async => await rootLogic.chickenRepository.confirmAllAllocation(
|
||||
token: rootLogic.tokenService.accessToken.value!,
|
||||
allocationTokens:
|
||||
allocatedMadeModel.value?.results?.map((e) => e.key!).toList() ??
|
||||
[],
|
||||
allocatedMadeModel.value?.map((e) => e.key!).toList() ?? [],
|
||||
),
|
||||
onSuccess: (result) {
|
||||
getAllocatedMade();
|
||||
|
||||
Reference in New Issue
Block a user