phase3: fix attribute widgets (qty/check/radio) - prefix-! bug, multi-line toUpperCase, required conditions. ~30 fixed
This commit is contained in:
@@ -57,7 +57,7 @@ class CheckOptionsState extends OptionsBaseState<CheckOptions> {
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
new Text(
|
||||
product.productAttributes![this.index].required ? S.of(context).check_option_is_required : S.of(context).check_option_is_optional,
|
||||
product.productAttributes![this.index].required == true ? S.of(context).check_option_is_required : S.of(context).check_option_is_optional,
|
||||
style: new TextStyle(
|
||||
fontSize: 10.0,
|
||||
color: new Color(0xFF999999)
|
||||
@@ -133,8 +133,8 @@ class CheckOptionsState extends OptionsBaseState<CheckOptions> {
|
||||
|
||||
if (selections.containsKey(product.productAttributes![index].name!.toUpperCase())) {
|
||||
|
||||
Map<String, dynamic> attrExtraJson = Utils.stringToJson(!
|
||||
product.productAttributes![index].extra);
|
||||
Map<String, dynamic>? attrExtraJson = Utils.stringToJson(
|
||||
product.productAttributes![index].extra!);
|
||||
if (attrExtraJson != null) {
|
||||
var selectLimitIfFieldEqualsTo = Rule.getRule(
|
||||
attrExtraJson, Rule.RULE_SELECT_LIMIT_IF_FIELD_EQUALS_TO);
|
||||
@@ -147,7 +147,7 @@ class CheckOptionsState extends OptionsBaseState<CheckOptions> {
|
||||
int limitQty = selectLimitIfFieldEqualsTo1[Rule
|
||||
.RULE_KEY_FORCE_LIMITED];
|
||||
thisLimitQty = limitQty;
|
||||
if ((selections[product.productAttributes![index].name
|
||||
if ((selections[product.productAttributes![index].name!
|
||||
.toUpperCase()] as List).length >= limitQty) {
|
||||
disableOptionIfNotSelected();
|
||||
}
|
||||
@@ -155,7 +155,7 @@ class CheckOptionsState extends OptionsBaseState<CheckOptions> {
|
||||
if (selectLimitIfFieldEqualsTo1.containsKey(Utils.getSelectedAttributeValue(selections, selectLimitIfFieldEqualsTo1[Rule.RULE_KEY_FIELD_KEY])[0])) {
|
||||
int limitQty = selectLimitIfFieldEqualsTo1[Utils.getSelectedAttributeValue(selections, selectLimitIfFieldEqualsTo1[Rule.RULE_KEY_FIELD_KEY])[0]];
|
||||
thisLimitQty = limitQty;
|
||||
if ((selections[product.productAttributes![index].name
|
||||
if ((selections[product.productAttributes![index].name!
|
||||
.toUpperCase()] as List).length >= limitQty) {
|
||||
disableOptionIfNotSelected();
|
||||
}
|
||||
@@ -168,7 +168,7 @@ class CheckOptionsState extends OptionsBaseState<CheckOptions> {
|
||||
int limitQty = selectLimitIfFieldEqualsTo[Rule
|
||||
.RULE_KEY_FORCE_LIMITED];
|
||||
thisLimitQty = limitQty;
|
||||
if ((selections[product.productAttributes![index].name
|
||||
if ((selections[product.productAttributes![index].name!
|
||||
.toUpperCase()] as List).length >= limitQty) {
|
||||
disableOptionIfNotSelected();
|
||||
}
|
||||
@@ -176,7 +176,7 @@ class CheckOptionsState extends OptionsBaseState<CheckOptions> {
|
||||
if (selectLimitIfFieldEqualsTo.containsKey(Utils.getSelectedAttributeValue(selections, selectLimitIfFieldEqualsTo[Rule.RULE_KEY_FIELD_KEY])[0])) {
|
||||
int limitQty = selectLimitIfFieldEqualsTo[Utils.getSelectedAttributeValue(selections, selectLimitIfFieldEqualsTo[Rule.RULE_KEY_FIELD_KEY])[0]];
|
||||
thisLimitQty = limitQty;
|
||||
if ((selections[product.productAttributes![index].name
|
||||
if ((selections[product.productAttributes![index].name!
|
||||
.toUpperCase()] as List).length >= limitQty) {
|
||||
disableOptionIfNotSelected();
|
||||
}
|
||||
@@ -187,7 +187,7 @@ class CheckOptionsState extends OptionsBaseState<CheckOptions> {
|
||||
}
|
||||
|
||||
for (var i = 0; i < productOptions.length; i++) {
|
||||
Map<String, dynamic> extraJson = Utils.stringToJson(!
|
||||
Map<String, dynamic>? extraJson = Utils.stringToJson(
|
||||
productOptions[i].extra!);
|
||||
if (extraJson != null) {
|
||||
Map<String, dynamic> exclusiveRule = Rule.getRule(
|
||||
|
||||
Reference in New Issue
Block a user