From e25a5c980ab3e11bf7055fa5cdb04c62af447fac Mon Sep 17 00:00:00 2001 From: Yash Maheshwari Date: Thu, 25 Jul 2024 10:36:04 +0530 Subject: [PATCH] Implemented: support to disable specific sort option based on whether some filter is selected or not(#243) --- .../AddInventoryFilterOptionsModal.vue | 28 +++++++++++++++++-- src/views/BrokeringQuery.vue | 2 +- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/src/components/AddInventoryFilterOptionsModal.vue b/src/components/AddInventoryFilterOptionsModal.vue index 5c1e38a..fbbf8da 100644 --- a/src/components/AddInventoryFilterOptionsModal.vue +++ b/src/components/AddInventoryFilterOptionsModal.vue @@ -14,7 +14,15 @@ - {{ condition.description || condition.enumCode }} + + + + @@ -28,7 +36,7 @@ diff --git a/src/views/BrokeringQuery.vue b/src/views/BrokeringQuery.vue index 03e9eb3..50ae2d8 100644 --- a/src/views/BrokeringQuery.vue +++ b/src/views/BrokeringQuery.vue @@ -586,7 +586,7 @@ async function addInventoryFilterOptions(parentEnumId: string, conditionTypeEnum const inventoryFilterOptionsModal = await modalController.create({ component: AddInventoryFilterOptionsModal, - componentProps: { ruleConditions: conditionTypeEnumId === "ENTCT_FILTER" ? inventoryRuleFilterOptions.value : inventoryRuleSortOptions.value, routingRuleId: selectedRoutingRule.value.routingRuleId, parentEnumId, conditionTypeEnumId, label } + componentProps: { ruleConditions: conditionTypeEnumId === "ENTCT_FILTER" ? inventoryRuleFilterOptions.value : inventoryRuleSortOptions.value, routingRuleId: selectedRoutingRule.value.routingRuleId, parentEnumId, conditionTypeEnumId, label, filterOptions: inventoryRuleFilterOptions.value } // Passing filterOptions always as we need to make some sort options dependent on filters, so instead of updating the original flow, just passing the filter options always and will add the check on them. }) inventoryFilterOptionsModal.onDidDismiss().then((result: any) => {