Skip to content

Commit

Permalink
Implemented: support to archive a routing from details page(#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
ymaheshwari1 committed Feb 14, 2024
1 parent d59110a commit 992b9dd
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/views/BrokeringQuery.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@
<ion-label>{{ routingHistory[currentRouting.orderRoutingId] ? getDateAndTimeShort(routingHistory[currentRouting.orderRoutingId][0].startDate) : "-" }}</ion-label>
</ion-chip>
</ion-item>
<ion-item lines="full">
<ion-icon :icon="archiveOutline" slot="start" />
<ion-toggle color="danger" :checked="currentRouting.statusId === 'ROUTING_ARCHIVED'" @ionChange="toggleRoutingStatus($event)">
{{ translate("Archive") }}
</ion-toggle>
</ion-item>
<ion-item-group>
<ion-item-divider color="light">
<ion-label>{{ translate("Filters") }}</ion-label>
Expand Down Expand Up @@ -239,7 +245,7 @@

<script setup lang="ts">
import { IonButton, IonCard, IonCardContent, IonCardHeader, IonCardTitle, IonChip, IonContent, IonIcon, IonInput, IonItem, IonItemDivider, IonItemGroup, IonLabel, IonList, IonPage, IonReorder, IonReorderGroup, IonSelect, IonSelectOption, IonToggle, alertController, modalController, onIonViewWillEnter, popoverController } from "@ionic/vue";
import { addCircleOutline, bookmarkOutline, chevronUpOutline, filterOutline, golfOutline, optionsOutline, playForwardOutline, pulseOutline, swapVerticalOutline, timeOutline } from "ionicons/icons"
import { addCircleOutline, archiveOutline, bookmarkOutline, chevronUpOutline, filterOutline, golfOutline, optionsOutline, playForwardOutline, pulseOutline, swapVerticalOutline, timeOutline } from "ionicons/icons"
import { onBeforeRouteLeave, useRouter } from "vue-router";
import { computed, defineProps, ref } from "vue";
import store from "@/store";
Expand Down Expand Up @@ -520,6 +526,16 @@ function updateOrderRouting(value: string) {
hasUnsavedChanges.value = true
}
function toggleRoutingStatus(event: CustomEvent) {
if(event.detail.checked) {
routingStatus.value = "ROUTING_ARCHIVED"
} else {
routingStatus.value = "ROUTING_DRAFT"
}
hasUnsavedChanges.value = true
}
function updateUnfillableActionType(value: string) {
const actionType = ruleActionType.value
ruleActionType.value = value
Expand Down

0 comments on commit 992b9dd

Please sign in to comment.