From 9170780e81e87c9a412929fe5375a9e16094c263 Mon Sep 17 00:00:00 2001 From: Yash Maheshwari Date: Tue, 13 Feb 2024 14:48:57 +0530 Subject: [PATCH 1/3] Removed: equals operator for safety stock filter(#86) --- src/views/BrokeringQuery.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/src/views/BrokeringQuery.vue b/src/views/BrokeringQuery.vue index a4761a5..4c135c2 100644 --- a/src/views/BrokeringQuery.vue +++ b/src/views/BrokeringQuery.vue @@ -136,7 +136,6 @@ {{ translate("Brokering safety stock") }} - {{ translate("equals") }} {{ translate("greater than or equal to") }} {{ translate("greater") }} From 7ef379a899448f86c6f2249f7beca62d5d58b3df Mon Sep 17 00:00:00 2001 From: Yash Maheshwari Date: Tue, 13 Feb 2024 15:24:23 +0530 Subject: [PATCH 2/3] Improved: logic to select default value for proximity measurement(#86) --- src/components/AddInventoryFilterOptionsModal.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/AddInventoryFilterOptionsModal.vue b/src/components/AddInventoryFilterOptionsModal.vue index 7fdc1a8..e271d53 100644 --- a/src/components/AddInventoryFilterOptionsModal.vue +++ b/src/components/AddInventoryFilterOptionsModal.vue @@ -60,7 +60,7 @@ let inventoryRuleConditions = ref({}) as any let enumerations = ref([]) as any const hiddenOptions = ["IIP_MSMNT_SYSTEM"] // managing this object, as we have some filters for which we need to have its associated filter, like in this case when we have PROXIMITY we also need to add MEASUREMENT_SYSTEM(this is not available on UI for selection and included in hiddenOptions) -const associatedOptions = { IIP_PROXIMITY: 'IIP_MSMNT_SYSTEM' } as any +const associatedOptions = { IIP_PROXIMITY: { enum: "IIP_MSMNT_SYSTEM", defaultValue: "IMPERIAL" }} as any onMounted(() => { inventoryRuleConditions.value = props.ruleConditions ? JSON.parse(JSON.stringify(props.ruleConditions)) : {} @@ -69,8 +69,7 @@ onMounted(() => { function addConditionOption(condition: any) { const isConditionOptionAlreadyApplied = isConditionOptionSelected(condition.enumCode)?.fieldName - const associatedEnum = enums.value[props.parentEnumId][associatedOptions[condition.enumId]] - + const associatedEnum = enums.value[props.parentEnumId][associatedOptions[condition.enumId]?.enum] if(isConditionOptionAlreadyApplied) { delete inventoryRuleConditions.value[condition.enumCode] // When removing a condition, also remove its associated option if available @@ -96,6 +95,7 @@ function addConditionOption(condition: any) { routingRuleId: props.routingRuleId, conditionTypeEnumId: props.conditionTypeEnumId, fieldName: associatedEnum.enumCode, + fieldValue: associatedOptions[condition.enumId]?.defaultValue, sequenceNum: Object.keys(inventoryRuleConditions.value).length && inventoryRuleConditions.value[Object.keys(inventoryRuleConditions.value)[Object.keys(inventoryRuleConditions.value).length - 1]]?.sequenceNum >= 0 ? inventoryRuleConditions.value[Object.keys(inventoryRuleConditions.value)[Object.keys(inventoryRuleConditions.value).length - 1]].sequenceNum + 5 : 0, // added check for `>= 0` as sequenceNum can be 0 which will result in again setting the new seqNum to 0 createdDate: DateTime.now().toMillis() }) From ef67d5886f9d92f18e56f5d8a617e9194c4af264 Mon Sep 17 00:00:00 2001 From: Yash Maheshwari Date: Tue, 13 Feb 2024 16:03:19 +0530 Subject: [PATCH 3/3] Removed: unwanted static text from locale file(#86) --- src/locales/en.json | 1 - 1 file changed, 1 deletion(-) diff --git a/src/locales/en.json b/src/locales/en.json index f8c7e2c..28ea40c 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -35,7 +35,6 @@ "duration": "duration", "Edit": "Edit", "Error getting user profile": "Error getting user profile", - "equals": "equals", "Failed to create brokering run": "Failed to create brokering run", "Failed to create inventory rule": "Failed to create inventory rule", "Failed to create order routing": "Failed to create order routing",