Skip to content

Commit

Permalink
Improved: UI as per the suggested changes(#243)
Browse files Browse the repository at this point in the history
Changed dynamic header on routing and rule page to static page title
Changed color for draft status badge to medium
Fixed issue of singular/plural when displaying archived routings
Used ion-card specific syntax when displaying routing title and id
  • Loading branch information
ymaheshwari1 committed Jul 19, 2024
1 parent 097f9d8 commit 6923f9d
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 13 deletions.
3 changes: 3 additions & 0 deletions src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,18 @@
"Queue": "Queue",
"queue": "queue",
"Rename": "Rename",
"Routing": "Routing",
"Routing history": "Routing history",
"Routing group information updated": "Routing group information updated",
"Routing Run": "Routing Run",
"Rule Status": "Rule Status",
"Rule name": "Rule name",
"Run Now": "Run Now",
"Run now": "Run now",
"Run time": "Run time",
"Running this schedule now will not replace this schedule. A copy of this schedule will be created and run immediately. You may not be able to reverse this action.": "Running this schedule now will not replace this schedule. A copy of this schedule will be created and run immediately. You may not be able to reverse this action.",
"route name": "route name",
"rule": " rule",
"rules": " rules",
"run name": "run name",
"Sales Channel": "Sales Channel",
Expand Down
4 changes: 2 additions & 2 deletions src/views/BrokeringQuery.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<ion-buttons slot="start">
<ion-back-button :default-href="`/tabs/brokering/${currentRoutingGroup.routingGroupId}/routes`" />
</ion-buttons>
<ion-title>{{ currentRouting.routingName }}</ion-title>
<ion-title>{{ translate("Routing") }}</ion-title>
</ion-toolbar>
</ion-header>
<ion-content>
<main>
<section id="order-filters" class="menu">
<section id="order-filters" class="menu ion-padding-top">
<ion-item lines="none">
<ion-label>
<h1 v-show="!isRouteNameUpdating">{{ currentRouting.routingName }}</h1>
Expand Down
20 changes: 10 additions & 10 deletions src/views/BrokeringRoute.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@
<ion-buttons slot="start">
<ion-back-button default-href="/tabs/brokering" />
</ion-buttons>
<ion-title>{{ groupName }}</ion-title>
<ion-title>{{ translate("Routing Run") }}</ion-title>
</ion-toolbar>
</ion-header>
<ion-content>
<div>
<main>
<section class="route-details">
<ion-card class="info">
<div class="ion-padding">
<ion-label>
<h1 v-show="!isGroupNameUpdating">{{ groupName }}</h1>
<div>
<ion-card-header>
<ion-card-title v-show="!isGroupNameUpdating">{{ groupName }}</ion-card-title>
<!-- Added class as we can't change the background of ion-input with css property, and we need to change the background to show the user that now this value is editable -->
<ion-input ref="groupNameRef" :class="isGroupNameUpdating ? 'name' : ''" v-show="isGroupNameUpdating" aria-label="group name" v-model="groupName"></ion-input>
<p>{{ currentRoutingGroup.routingGroupId }}</p>
</ion-label>
<div>
<ion-card-subtitle>{{ currentRoutingGroup.routingGroupId }}</ion-card-subtitle>
</ion-card-header>
<div class="ion-padding">
<ion-button v-show="!isGroupNameUpdating" fill="outline" size="small" @click="editGroupName()">
<ion-icon slot="start" :icon="pencilOutline" />
{{ translate("Rename") }}
Expand Down Expand Up @@ -157,7 +157,7 @@
</ion-chip>
</ion-item>
<ion-item lines="none">
<ion-badge class="pointer" :color="routing.statusId === 'ROUTING_ACTIVE' ? 'success' : ''" @click.stop="updateOrderRouting(routing, 'statusId', `${routing.statusId === 'ROUTING_DRAFT' ? 'ROUTING_ACTIVE' : 'ROUTING_DRAFT'}`)">{{ getStatusDesc(routing.statusId) }}</ion-badge>
<ion-badge class="pointer" :color="routing.statusId === 'ROUTING_ACTIVE' ? 'success' : 'medium'" @click.stop="updateOrderRouting(routing, 'statusId', `${routing.statusId === 'ROUTING_DRAFT' ? 'ROUTING_ACTIVE' : 'ROUTING_DRAFT'}`)">{{ getStatusDesc(routing.statusId) }}</ion-badge>
<div slot="end">
<ion-button fill="clear" color="medium" @click.stop="cloneRouting(routing)">
<ion-icon slot="icon-only" :icon="copyOutline" />
Expand All @@ -173,7 +173,7 @@
<ion-card v-if="getArchivedOrderRoutings().length">
<ion-item button lines="none" @click="openArchivedRoutingModal()">
<ion-label>{{ translate("Archived") }}</ion-label>
<ion-badge color="medium">{{ getArchivedOrderRoutings().length }}{{ translate("rules") }}</ion-badge>
<ion-badge color="medium">{{ getArchivedOrderRoutings().length }}{{ translate(getArchivedOrderRoutings().length > 1 ? "rules" : "rule") }}</ion-badge>
</ion-item>
</ion-card>
</ion-list>
Expand Down Expand Up @@ -201,7 +201,7 @@
</template>

<script setup lang="ts">
import { IonBackButton, IonBadge, IonButtons, IonButton, IonCard, IonChip, IonContent, IonHeader, IonIcon, IonInput, IonItem, IonLabel, IonList, IonListHeader, IonPage, IonReorder, IonReorderGroup, IonSelect, IonSelectOption, IonTextarea, IonTitle, IonToolbar, alertController, modalController, onIonViewWillEnter } from "@ionic/vue";
import { IonBackButton, IonBadge, IonButtons, IonButton, IonCard, IonCardHeader, IonCardSubtitle, IonCardTitle, IonChip, IonContent, IonHeader, IonIcon, IonInput, IonItem, IonLabel, IonList, IonListHeader, IonPage, IonReorder, IonReorderGroup, IonSelect, IonSelectOption, IonTextarea, IonTitle, IonToolbar, alertController, modalController, onIonViewWillEnter } from "@ionic/vue";
import { addCircleOutline, addOutline, archiveOutline, copyOutline, flashOutline, listOutline, pencilOutline, pulseOutline, refreshOutline, reorderTwoOutline, saveOutline, timeOutline, timerOutline } from "ionicons/icons"
import { onBeforeRouteLeave, useRouter } from "vue-router";
import { useStore } from "vuex";
Expand Down
2 changes: 1 addition & 1 deletion src/views/BrokeringRuns.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<ion-label>
{{ group.schedule ? getDateAndTime(group.schedule.nextExecutionDateTime) : "-" }}
</ion-label>
<ion-badge slot="end" color="dark">{{ translate("Draft") }}</ion-badge>
<ion-badge slot="end" color="medium">{{ translate("Draft") }}</ion-badge>
</ion-item>
<ion-item lines="none">
{{ `Updated at ${getDateAndTime(group.lastUpdatedStamp)}` }}
Expand Down

0 comments on commit 6923f9d

Please sign in to comment.