Skip to content

Commit

Permalink
Merge pull request #152 from ymaheshwari1/#145
Browse files Browse the repository at this point in the history
Fixed: support to not open the details page for unarchived route(#145)
  • Loading branch information
ymaheshwari1 authored Apr 4, 2024
2 parents 5379187 + be2ef43 commit 7a6effe
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/GroupHistoryModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<h3>{{ getTime(history.startTime) }}</h3>
<p>{{ getDate(history.startTime) }}</p>
</ion-label>
<ion-badge color="dark">{{ timeTillRun(history.endTime) }}</ion-badge>
<ion-badge color="dark" v-if="history.endTime">{{ timeTillRun(history.endTime) }}</ion-badge>
</ion-item>
</ion-list>
</ion-content>
Expand Down
1 change: 1 addition & 0 deletions src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@
"Sales Channel": "Sales Channel",
"Save": "Save",
"Save changes": "Save changes",
"Save changes before moving to the details page of unarchived route": "Save changes before moving to the details page of unarchived route",
"Schedule": "Schedule",
"Scheduler": "Scheduler",
"Search groups": "Search groups",
Expand Down
9 changes: 8 additions & 1 deletion src/views/BrokeringRoute.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
<h3>{{ getTime(groupHistory[0].startTime) }}</h3>
<p>{{ getDate(groupHistory[0].startTime) }}</p>
</ion-label>
<ion-badge color="dark">{{ timeTillRun(groupHistory[0].endTime) }}</ion-badge>
<ion-badge color="dark" v-if="groupHistory[0].endTime">{{ timeTillRun(groupHistory[0].endTime) }}</ion-badge>
</ion-item>
</main>
<aside>
Expand Down Expand Up @@ -372,6 +372,13 @@ async function runNow() {
}
async function redirect(orderRouting: Route) {
let isRoutingArchived = currentRoutingGroup.value["routings"].some((routing: any) => routing.orderRoutingId === orderRouting.orderRoutingId && routing.statusId === "ROUTING_ARCHIVED" )
if(isRoutingArchived) {
showToast(translate("Save changes before moving to the details page of unarchived route"))
return;
}
await store.dispatch("orderRouting/setCurrentOrderRouting", orderRouting)
router.push(`${orderRouting.orderRoutingId}/rules`)
}
Expand Down

0 comments on commit 7a6effe

Please sign in to comment.