diff --git a/src/components/RuleItem.vue b/src/components/RuleItem.vue
index 77d12f6e..d9f54444 100644
--- a/src/components/RuleItem.vue
+++ b/src/components/RuleItem.vue
@@ -48,41 +48,41 @@
{{ translate("Facilities") }}
-
+
- {{ getRuleConditions("ENTCT_ATP_FAC_GROUPS", "facilityGroupId", "in") }}
+ {{ getRuleConditions("ENTCT_ATP_FAC_GROUPS", "facilityGroupId", "contains") }}
-
+
- {{ getRuleConditions("ENTCT_ATP_FAC_GROUPS", "facilityGroupId", "not-in") }}
+ {{ getRuleConditions("ENTCT_ATP_FAC_GROUPS", "facilityGroupId", "not-contains") }}
-
+
{{ translate("Product tags") }}
-
+
- {{ getRuleConditions("ENTCT_ATP_FILTER", "tags", "in") }}
+ {{ getRuleConditions("ENTCT_ATP_FILTER", "tags", "contains") }}
-
+
- {{ getRuleConditions("ENTCT_ATP_FILTER", "tags", "not-in") }}
+ {{ getRuleConditions("ENTCT_ATP_FILTER", "tags", "not-contains") }}
-
+
{{ translate("Product features") }}
-
+
- {{ getRuleConditions("ENTCT_ATP_FILTER", "productFeatures", "in") }}
+ {{ getRuleConditions("ENTCT_ATP_FILTER", "productFeatures", "contains") }}
-
+
- {{ getRuleConditions("ENTCT_ATP_FILTER", "productFeatures", "not-in") }}
+ {{ getRuleConditions("ENTCT_ATP_FILTER", "productFeatures", "not-contains") }}
diff --git a/src/utils/index.ts b/src/utils/index.ts
index 94eb8119..ae787391 100644
--- a/src/utils/index.ts
+++ b/src/utils/index.ts
@@ -107,18 +107,16 @@ const generateRuleConditions = (ruleId: string, conditionTypeEnumId: string, app
"ruleId": ruleId,
conditionTypeEnumId,
"fieldName": conditionTypeEnumId === "ENTCT_ATP_FACILITIES" ? "facilityId" : "facilityGroupId",
- "operator": "in",
- "fieldValue": "ALL",
- "multiValued": "Y"
+ "operator": "contains",
+ "fieldValue": "ALL"
})
} else if(conditionTypeEnumId === "ENTCT_ATP_FACILITIES") {
conditions.push({
"ruleId": ruleId,
conditionTypeEnumId,
"fieldName": "facilityId",
- "operator": "in",
- "fieldValue": selectedFac.length ? selectedFac.join(",") : "",
- "multiValued": "Y"
+ "operator": "contains",
+ "fieldValue": selectedFac.length ? selectedFac.join(",") : ""
})
} else {
const includedFacilityGroupIds = selectedFac.included.map((group: any) => group.facilityGroupId)
@@ -127,9 +125,8 @@ const generateRuleConditions = (ruleId: string, conditionTypeEnumId: string, app
"ruleId": ruleId,
"conditionTypeEnumId": "ENTCT_ATP_FAC_GROUPS",
"fieldName": "facilityGroupId",
- "operator": "in",
- "fieldValue": includedFacilityGroupIds.join(","),
- "multiValued": "Y"
+ "operator": "contains",
+ "fieldValue": includedFacilityGroupIds.join(",")
})
}
@@ -139,9 +136,8 @@ const generateRuleConditions = (ruleId: string, conditionTypeEnumId: string, app
"ruleId": ruleId,
"conditionTypeEnumId": "ENTCT_ATP_FAC_GROUPS",
"fieldName": "facilityGroupId",
- "operator": "not-in",
- "fieldValue": excludedFacilityGroupIds.join(","),
- "multiValued": "Y"
+ "operator": "not-contains",
+ "fieldValue": excludedFacilityGroupIds.join(",")
})
}
}
@@ -153,9 +149,8 @@ const generateRuleConditions = (ruleId: string, conditionTypeEnumId: string, app
"ruleId": ruleId,
"conditionTypeEnumId": "ENTCT_ATP_FILTER",
"fieldName": filter,
- "operator": type === "included" ? "in" : "not-in",
- "fieldValue": value.join(","),
- "multiValued": "Y"
+ "operator": type === "included" ? "contains" : "not-contains",
+ "fieldValue": value.join(",")
})
}
})
diff --git a/src/views/CreateUpdateSafetyStockRule.vue b/src/views/CreateUpdateSafetyStockRule.vue
index 3c8fbe9d..ad457d8a 100644
--- a/src/views/CreateUpdateSafetyStockRule.vue
+++ b/src/views/CreateUpdateSafetyStockRule.vue
@@ -139,13 +139,13 @@ onIonViewDidEnter(async () => {
formData.value.ruleName = currentRule.value.ruleName;
formData.value.safetyStock = currentRule.value.ruleActions[0]?.fieldValue ? currentRule.value.ruleActions[0].fieldValue : ''
- const includedGroups = currentRule.value.ruleConditions.find((condition: any) => condition.conditionTypeEnumId === "ENTCT_ATP_FAC_GROUPS" && condition.operator === "in")
+ const includedGroups = currentRule.value.ruleConditions.find((condition: any) => condition.conditionTypeEnumId === "ENTCT_ATP_FAC_GROUPS" && condition.operator === "contains")
if(includedGroups?.fieldValue === "ALL") formData.value.areAllFacilitiesSelected = true;
else {
const includedGroupIds = includedGroups?.fieldValue ? includedGroups.fieldValue.split(",") : []
formData.value.selectedFacilityGroups.included = facilityGroups.value.filter((group: any) => includedGroupIds.includes(group.facilityGroupId));
- const excludedGroups = currentRule.value.ruleConditions.find((condition: any) => condition.conditionTypeEnumId === "ENTCT_ATP_FAC_GROUPS" && condition.operator === "not-in")
+ const excludedGroups = currentRule.value.ruleConditions.find((condition: any) => condition.conditionTypeEnumId === "ENTCT_ATP_FAC_GROUPS" && condition.operator === "not-contains")
const excludedGroupIds = excludedGroups?.fieldValue ? excludedGroups.fieldValue.split(",") : []
formData.value.selectedFacilityGroups.excluded = facilityGroups.value.filter((group: any) => excludedGroupIds.includes(group.facilityGroupId));
}
@@ -153,7 +153,7 @@ onIonViewDidEnter(async () => {
const currentAppliedFilters = JSON.parse(JSON.stringify(appliedFilters.value))
currentRule.value.ruleConditions.map((condition: any) => {
if(condition.conditionTypeEnumId === "ENTCT_ATP_FILTER") {
- if(condition.operator === "in") {
+ if(condition.operator === "contains") {
currentAppliedFilters["included"][condition.fieldName] = condition.fieldValue ? condition.fieldValue.split(",") : []
} else {
currentAppliedFilters["excluded"][condition.fieldName] = condition.fieldValue ? condition.fieldValue.split(",") : []
diff --git a/src/views/CreateUpdateShippingRule.vue b/src/views/CreateUpdateShippingRule.vue
index 0bd3645d..7392792b 100644
--- a/src/views/CreateUpdateShippingRule.vue
+++ b/src/views/CreateUpdateShippingRule.vue
@@ -162,13 +162,13 @@ onIonViewDidEnter(async () => {
formData.value.isBrokeringAllowed = currentRule.value.ruleActions[0]?.fieldValue === "Y" ? true : false;
if(selectedSegment.value === "RG_SHIPPING_FACILITY") {
- const includedGroups = currentRule.value.ruleConditions.find((condition: any) => condition.conditionTypeEnumId === "ENTCT_ATP_FAC_GROUPS" && condition.operator === "in")
+ const includedGroups = currentRule.value.ruleConditions.find((condition: any) => condition.conditionTypeEnumId === "ENTCT_ATP_FAC_GROUPS" && condition.operator === "contains")
if(includedGroups?.fieldValue === "ALL") formData.value.areAllSelected = true
else {
const includedGroupIds = includedGroups?.fieldValue ? includedGroups.fieldValue.split(",") : []
formData.value.selectedFacilityGroups.included = facilityGroups.value.filter((group: any) => includedGroupIds.includes(group.facilityGroupId));
- const excludedGroups = currentRule.value.ruleConditions.find((condition: any) => condition.conditionTypeEnumId === "ENTCT_ATP_FAC_GROUPS" && condition.operator === "not-in")
+ const excludedGroups = currentRule.value.ruleConditions.find((condition: any) => condition.conditionTypeEnumId === "ENTCT_ATP_FAC_GROUPS" && condition.operator === "not-contains")
const excludedGroupIds = excludedGroups?.fieldValue ? excludedGroups.fieldValue.split(",") : []
formData.value.selectedFacilityGroups.excluded = facilityGroups.value.filter((group: any) => excludedGroupIds.includes(group.facilityGroupId));
}
@@ -181,7 +181,7 @@ onIonViewDidEnter(async () => {
const currentAppliedFilters = JSON.parse(JSON.stringify(appliedFilters.value))
currentRule.value.ruleConditions.map((condition: any) => {
if(condition.conditionTypeEnumId === "ENTCT_ATP_FILTER") {
- if(condition.operator === "in") {
+ if(condition.operator === "contains") {
currentAppliedFilters["included"][condition.fieldName] = condition.fieldValue ? condition.fieldValue.split(",") : []
} else {
currentAppliedFilters["excluded"][condition.fieldName] = condition.fieldValue ? condition.fieldValue.split(",") : []
diff --git a/src/views/CreateUpdateStorePickupRule.vue b/src/views/CreateUpdateStorePickupRule.vue
index 928c5325..fcd35a4c 100644
--- a/src/views/CreateUpdateStorePickupRule.vue
+++ b/src/views/CreateUpdateStorePickupRule.vue
@@ -163,13 +163,13 @@ onIonViewDidEnter(async () => {
formData.value.isPickupAllowed = currentRule.value.ruleActions[0]?.fieldValue === "Y" ? true : false;
if(selectedSegment.value === "RG_PICKUP_FACILITY") {
- const includedGroups = currentRule.value.ruleConditions.find((condition: any) => condition.conditionTypeEnumId === "ENTCT_ATP_FAC_GROUPS" && condition.operator === "in")
+ const includedGroups = currentRule.value.ruleConditions.find((condition: any) => condition.conditionTypeEnumId === "ENTCT_ATP_FAC_GROUPS" && condition.operator === "contains")
if(includedGroups?.fieldValue === "ALL") formData.value.areAllSelected = true
else {
const includedGroupIds = includedGroups?.fieldValue ? includedGroups.fieldValue.split(",") : []
formData.value.selectedFacilityGroups.included = facilityGroups.value.filter((group: any) => includedGroupIds.includes(group.facilityGroupId));
- const excludedGroups = currentRule.value.ruleConditions.find((condition: any) => condition.conditionTypeEnumId === "ENTCT_ATP_FAC_GROUPS" && condition.operator === "not-in")
+ const excludedGroups = currentRule.value.ruleConditions.find((condition: any) => condition.conditionTypeEnumId === "ENTCT_ATP_FAC_GROUPS" && condition.operator === "not-contains")
const excludedGroupIds = excludedGroups?.fieldValue ? excludedGroups.fieldValue.split(",") : []
formData.value.selectedFacilityGroups.excluded = facilityGroups.value.filter((group: any) => excludedGroupIds.includes(group.facilityGroupId));
}
@@ -182,7 +182,7 @@ onIonViewDidEnter(async () => {
const currentAppliedFilters = JSON.parse(JSON.stringify(appliedFilters.value))
currentRule.value.ruleConditions.map((condition: any) => {
if(condition.conditionTypeEnumId === "ENTCT_ATP_FILTER") {
- if(condition.operator === "in") {
+ if(condition.operator === "contains") {
currentAppliedFilters["included"][condition.fieldName] = condition.fieldValue ? condition.fieldValue.split(",") : []
} else {
currentAppliedFilters["excluded"][condition.fieldName] = condition.fieldValue ? condition.fieldValue.split(",") : []
diff --git a/src/views/CreateUpdateThresholdRule.vue b/src/views/CreateUpdateThresholdRule.vue
index b490b1f7..915adf6e 100644
--- a/src/views/CreateUpdateThresholdRule.vue
+++ b/src/views/CreateUpdateThresholdRule.vue
@@ -117,7 +117,7 @@ onIonViewDidEnter(async () => {
const currentAppliedFilters = JSON.parse(JSON.stringify(appliedFilters.value))
currentRule.value.ruleConditions.map((condition: any) => {
if(condition.conditionTypeEnumId === "ENTCT_ATP_FILTER") {
- if(condition.operator === "in") {
+ if(condition.operator === "contains") {
currentAppliedFilters["included"][condition.fieldName] = condition.fieldValue ? condition.fieldValue.split(",") : []
} else {
currentAppliedFilters["excluded"][condition.fieldName] = condition.fieldValue ? condition.fieldValue.split(",") : []