chore : upgrade version
fix : some ui bug
This commit is contained in:
@@ -39,6 +39,7 @@ class SalesInProvinceLogic extends GetxController {
|
|||||||
Rxn<GuildModel> selectedGuildModel = Rxn<GuildModel>();
|
Rxn<GuildModel> selectedGuildModel = Rxn<GuildModel>();
|
||||||
Rxn<GuildProfile> guildProfile = Rxn<GuildProfile>();
|
Rxn<GuildProfile> guildProfile = Rxn<GuildProfile>();
|
||||||
RxInt saleType = 1.obs;
|
RxInt saleType = 1.obs;
|
||||||
|
RxInt priceType = 1.obs;
|
||||||
RxInt weight = 0.obs;
|
RxInt weight = 0.obs;
|
||||||
RxInt pricePerKilo = 0.obs;
|
RxInt pricePerKilo = 0.obs;
|
||||||
RxInt totalCost = 0.obs;
|
RxInt totalCost = 0.obs;
|
||||||
@@ -70,7 +71,7 @@ class SalesInProvinceLogic extends GetxController {
|
|||||||
});
|
});
|
||||||
|
|
||||||
debounce(weight, time: Duration(milliseconds: 110), (callback) {
|
debounce(weight, time: Duration(milliseconds: 110), (callback) {
|
||||||
iLog('weight: $callback, pricePerKilo: ${pricePerKilo.value}');
|
|
||||||
totalCost.value = callback * pricePerKilo.value;
|
totalCost.value = callback * pricePerKilo.value;
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -273,7 +274,7 @@ class SalesInProvinceLogic extends GetxController {
|
|||||||
|
|
||||||
void setSubmitData() {
|
void setSubmitData() {
|
||||||
tmpStewardAllocation = SubmitStewardAllocation(
|
tmpStewardAllocation = SubmitStewardAllocation(
|
||||||
approvedPriceStatus: false,
|
approvedPriceStatus: broadcastPrice.value?.active ?? false,
|
||||||
allocationType:
|
allocationType:
|
||||||
'${guildProfile.value?.steward == true ? "steward" : "guild"}_${selectedGuildModel.value?.steward == true ? "steward" : "guild"}',
|
'${guildProfile.value?.steward == true ? "steward" : "guild"}_${selectedGuildModel.value?.steward == true ? "steward" : "guild"}',
|
||||||
sellerType: guildProfile.value?.steward == true ? "Steward" : "Guild",
|
sellerType: guildProfile.value?.steward == true ? "Steward" : "Guild",
|
||||||
|
|||||||
@@ -417,13 +417,8 @@ class SalesInProvincePage extends GetView<SalesInProvinceLogic> {
|
|||||||
controller.selectedGuildModel.refresh();
|
controller.selectedGuildModel.refresh();
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
ObxValue((data) {
|
Text('فروش اختصاصی', style: AppFonts.yekan14),
|
||||||
return Text(
|
SizedBox(width: 30.w),
|
||||||
(data.value?.active == true) ? 'قیمت مصوب' : 'فروش اختصاصی',
|
|
||||||
style: AppFonts.yekan14,
|
|
||||||
);
|
|
||||||
}, controller.broadcastPrice),
|
|
||||||
SizedBox(width: 12),
|
|
||||||
Radio(
|
Radio(
|
||||||
value: 2,
|
value: 2,
|
||||||
groupValue: controller.saleType.value,
|
groupValue: controller.saleType.value,
|
||||||
@@ -506,24 +501,46 @@ class SalesInProvincePage extends GetView<SalesInProvinceLogic> {
|
|||||||
),
|
),
|
||||||
|
|
||||||
Obx(() {
|
Obx(() {
|
||||||
return RTextField(
|
return RadioGroup(
|
||||||
variant: RTextFieldVariant.noBorder,
|
groupValue: controller.priceType.value,
|
||||||
controller: controller.pricePerKiloController,
|
onChanged: (value) {
|
||||||
borderColor: AppColor.darkGreyLight,
|
controller.priceType.value = value!;
|
||||||
inputFormatters: [
|
|
||||||
FilteringTextInputFormatter.digitsOnly,
|
|
||||||
SeparatorInputFormatter(),
|
|
||||||
],
|
|
||||||
filledColor: AppColor.bgLight,
|
|
||||||
filled: true,
|
|
||||||
enabled:
|
|
||||||
(controller.broadcastPrice.value?.active == false ||
|
|
||||||
controller.saleType.value == 2),
|
|
||||||
onChanged: (p0) {
|
|
||||||
controller.pricePerKilo.value = int.tryParse(p0.clearComma) ?? 0;
|
|
||||||
},
|
},
|
||||||
keyboardType: TextInputType.number,
|
child: Row(
|
||||||
label: 'قیمت هر کیلو (ريال)',
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Radio(value: 1),
|
||||||
|
Text('قیمت مصوب', style: AppFonts.yekan14),
|
||||||
|
|
||||||
|
SizedBox(width: 30.w),
|
||||||
|
|
||||||
|
Radio(value: 2),
|
||||||
|
Text('قیمت آزاد', style: AppFonts.yekan14),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}),
|
||||||
|
|
||||||
|
Obx(() {
|
||||||
|
return Visibility(
|
||||||
|
visible: controller.broadcastPrice.value?.active == true,
|
||||||
|
child: RTextField(
|
||||||
|
variant: RTextFieldVariant.noBorder,
|
||||||
|
controller: controller.pricePerKiloController,
|
||||||
|
borderColor: AppColor.darkGreyLight,
|
||||||
|
inputFormatters: [
|
||||||
|
FilteringTextInputFormatter.digitsOnly,
|
||||||
|
SeparatorInputFormatter(),
|
||||||
|
],
|
||||||
|
filledColor: AppColor.bgLight,
|
||||||
|
filled: true,
|
||||||
|
enabled: (controller.priceType.value == 2),
|
||||||
|
onChanged: (p0) {
|
||||||
|
controller.pricePerKilo.value = int.tryParse(p0.clearComma) ?? 0;
|
||||||
|
},
|
||||||
|
keyboardType: TextInputType.number,
|
||||||
|
label: 'قیمت هر کیلو (ريال)',
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
name: rasadyar_app
|
name: rasadyar_app
|
||||||
description: "A new Flutter project."
|
description: "A new Flutter project."
|
||||||
publish_to: 'none'
|
publish_to: 'none'
|
||||||
version: 1.3.16+13
|
version: 1.3.17+14
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ^3.9.2
|
sdk: ^3.9.2
|
||||||
|
|||||||
Reference in New Issue
Block a user