feat : new segment logic
This commit is contained in:
@@ -174,10 +174,11 @@ class SegmentationLogic extends GetxController {
|
||||
var res = true;
|
||||
SegmentationModel segmentationModel = SegmentationModel(
|
||||
productKey: selectedProduct.value?.key,
|
||||
|
||||
weight: int.tryParse(weightController.text.clearComma) ?? 0,
|
||||
);
|
||||
iLog(segmentationModel.toString());
|
||||
if (saleType.value == 2) {
|
||||
segmentationModel.copyWith(guildKey: selectedGuildModel.value?.key);
|
||||
}
|
||||
safeCall(
|
||||
call: () async => await rootLogic.chickenRepository.createSegmentation(
|
||||
token: rootLogic.tokenService.accessToken.value!,
|
||||
@@ -193,16 +194,11 @@ class SegmentationLogic extends GetxController {
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
Future<void> getGuilds() async {
|
||||
safeCall(
|
||||
call: () async =>
|
||||
await rootLogic.chickenRepository.getGuilds(
|
||||
call: () async => await rootLogic.chickenRepository.getGuilds(
|
||||
token: rootLogic.tokenService.accessToken.value!,
|
||||
queryParameters: buildQueryParams(
|
||||
queryParams: {'all': true},
|
||||
role: 'Steward',
|
||||
),
|
||||
queryParameters: buildQueryParams(queryParams: {'all': true}, role: 'Steward'),
|
||||
),
|
||||
onSuccess: (result) {
|
||||
if (result != null) {
|
||||
|
||||
Reference in New Issue
Block a user