Skip to content

Commit

Permalink
Merge branch 'main' into hotwax#254
Browse files Browse the repository at this point in the history
  • Loading branch information
ymaheshwari1 committed Dec 2, 2024
2 parents 6d4252c + 945fd05 commit ae113bf
Show file tree
Hide file tree
Showing 6 changed files with 145 additions and 20 deletions.
62 changes: 57 additions & 5 deletions firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,25 @@
"rewrites": [ {
"source": "**",
"destination": "/index.html"
} ]

} ],
"headers": [ {
"source": "**",
"headers": [ {
"key": "X-Frame-Options",
"value": "SAMEORIGIN"
},
{
"key": "Content-Security-Policy",
"value": "default-src 'self';font-src 'self' data: *;script-src 'self' 'unsafe-inline' 'unsafe-eval' fonts.googleapis.com;img-src 'self' 'unsafe-inline' *.shopify.com javascript: ;style-src 'self' 'unsafe-inline' *; connect-src 'self' *"
},
{
"key": "strict-transport-security",
"value": "max-age=31536000; includeSubDomains"
},{
"key": "Permissions-Policy",
"value": "camera=self"
} ]
}]
},
{
"target": "dev",
Expand All @@ -25,8 +42,25 @@
"rewrites": [ {
"source": "**",
"destination": "/index.html"
} ]

} ],
"headers": [ {
"source": "**",
"headers": [ {
"key": "X-Frame-Options",
"value": "SAMEORIGIN"
},
{
"key": "Content-Security-Policy",
"value": "default-src 'self';font-src 'self' data: *;script-src 'self' 'unsafe-inline' 'unsafe-eval' fonts.googleapis.com;img-src 'self' 'unsafe-inline' *.shopify.com javascript: ;style-src 'self' 'unsafe-inline' *; connect-src 'self' *"
},
{
"key": "strict-transport-security",
"value": "max-age=31536000; includeSubDomains"
},{
"key": "Permissions-Policy",
"value": "camera=self"
} ]
}]
},
{
"target": "uat",
Expand All @@ -39,7 +73,25 @@
"rewrites": [ {
"source": "**",
"destination": "/index.html"
} ]
} ],
"headers": [ {
"source": "**",
"headers": [ {
"key": "X-Frame-Options",
"value": "SAMEORIGIN"
},
{
"key": "Content-Security-Policy",
"value": "default-src 'self';font-src 'self' data: *;script-src 'self' 'unsafe-inline' 'unsafe-eval' fonts.googleapis.com;img-src 'self' 'unsafe-inline' *.shopify.com javascript: ;style-src 'self' 'unsafe-inline' *; connect-src 'self' *"
},
{
"key": "strict-transport-security",
"value": "max-age=31536000; includeSubDomains"
},{
"key": "Permissions-Policy",
"value": "camera=self"
} ]
}]
}
]
}
53 changes: 51 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "order-routing-rules",
"version": "1.6.0",
"version": "1.7.0",
"private": true,
"description": "An Ionic project",
"scripts": {
Expand Down
2 changes: 2 additions & 0 deletions src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
"Failed to fetch sort options": "Failed to fetch sort options",
"Failed to update group information": "Failed to update group information",
"Failed to update group status": "Failed to update group status",
"Failed to update rule information": "Failed to update rule information",
"Failed to schedule service": "Failed to schedule service",
"Fetching filters and inventory rules": "Fetching filters and inventory rules",
"Fetching runs": "Fetching runs",
Expand Down Expand Up @@ -114,6 +115,7 @@
"Order priority": "Order priority",
"Order Rule Filters": "Order Rule Filters",
"Order Rule Sort": "Order Rule Sort",
"Order rule information updated": "Order rule information updated",
"Order routing information updated": "Order routing information updated",
"Orders will be brokered based on order date if no sorting is specified.": "Orders will be brokered based on order date if no sorting is specified.",
"Origin Facility Group": "Origin Facility Group",
Expand Down
14 changes: 8 additions & 6 deletions src/store/modules/util/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,14 @@ const actions: ActionTree<UtilState, RootState> = {

if(enums["ORD_FILTER_PRM_TYPE"]) {
Object.values(enums["ORD_FILTER_PRM_TYPE"]).reduce((filters: any, filter: any) => {
filters[filter.enumId + "_EXCLUDED"] = {
"enumId": filter.enumId + "_EXCLUDED",
"enumTypeId": filter.enumTypeId,
"enumCode": filter.enumCode + "_excluded",
"sequenceNum": 5,
"description": filter.description
if (!filter.enumId.includes("_EXCLUDED")) {
filters[filter.enumId + "_EXCLUDED"] = {
"enumId": filter.enumId + "_EXCLUDED",
"enumTypeId": filter.enumTypeId,
"enumCode": filter.enumCode + "_excluded",
"sequenceNum": 5,
"description": filter.description
}
}

return filters;
Expand Down
32 changes: 26 additions & 6 deletions src/views/BrokeringQuery.vue
Original file line number Diff line number Diff line change
Expand Up @@ -790,9 +790,9 @@ async function addInventoryRule() {
function isFacilityGroupSelected(facilityGroupId: string, type: string) {
if(type === "excluded") {
return facilityGroupId == getFilterValue(inventoryRuleFilterOptions.value, conditionFilterEnums, 'FACILITY_GROUP').fieldValue
return facilityGroupId == getFilterValue(inventoryRuleFilterOptions.value, conditionFilterEnums, 'FACILITY_GROUP')?.fieldValue
} else {
return facilityGroupId == getFilterValue(inventoryRuleFilterOptions.value, conditionFilterEnums, 'FACILITY_GROUP_EXCLUDED').fieldValue
return facilityGroupId == getFilterValue(inventoryRuleFilterOptions.value, conditionFilterEnums, 'FACILITY_GROUP_EXCLUDED')?.fieldValue
}
}
Expand Down Expand Up @@ -1084,14 +1084,34 @@ async function editRuleName() {
ruleNameRef.value.$el.setFocus();
}
function updateRuleName(routingRuleId: string) {
// Checking the updated name with the original object, as we have reference to inventoryRules that will also gets updated on updating selectedRoutingRule
async function updateRuleName(routingRuleId: string) {
let isUpdateRequired = false;
currentRouting.value["rules"].map((inventoryRule: any) => {
if(inventoryRule.routingRuleId === routingRuleId && inventoryRule.ruleName.trim() !== selectedRoutingRule.value.ruleName.trim()) {
hasUnsavedChanges.value = true
isUpdateRequired = true
}
})
isRuleNameUpdating.value = false;
if(isUpdateRequired) {
emitter.emit("presentLoader", { message: "Updating...", backdropDismiss: false })
let ruleId = await store.dispatch("orderRouting/updateRule", {
routingRuleId,
orderRoutingId: props.orderRoutingId,
ruleName: selectedRoutingRule.value.ruleName.trim()
})
if(ruleId) {
showToast(translate("Order rule information updated"))
} else {
showToast(translate("Failed to update rule information"))
}
emitter.emit("dismissLoader")
}
isRuleNameUpdating.value = false
}
async function cloneRule() {
Expand Down

0 comments on commit ae113bf

Please sign in to comment.