Skip to content

Commit

Permalink
Improved: page name in side menu from catalog to audit, renamed compo…
Browse files Browse the repository at this point in the history
…nents and updated route entries(hotwax#265)
  • Loading branch information
ymaheshwari1 committed Nov 20, 2024
1 parent 00b3609 commit c8a4a7b
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 22 deletions.
4 changes: 2 additions & 2 deletions src/authorization/Rules.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
export default {
"APP_ORDERS_VIEW": "",
"APP_PRODUCTS_VIEW": "",
"APP_CATALOG_VIEW": "",
"APP_AUDIT_VIEW": "",
"APP_PRDT_DTLS_VIEW": "",
"APP_CTLG_PRDT_DTLS_VIEW": "",
"APP_AUDIT_PRDT_DTLS_VIEW": "",
"APP_COMMERCE_VIEW": "COMMERCEUSER_VIEW",
"MERCHANDISING_ADMIN": "MERCHANDISING_ADMIN",
"PREORDER_APP_VIEW": "PREORDER_APP_VIEW",
Expand Down
8 changes: 4 additions & 4 deletions src/components/Menu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,13 @@ export default defineComponent({
}
},
{
title: "Catalog",
url: "/catalog",
childRoutes: ["/catalog-product-details/"],
title: "Audit",
url: "/audit",
childRoutes: ["/audit-product-details/"],
iosIcon: albums,
mdIcon: albums,
meta: {
permissionId: "APP_CATALOG_VIEW"
permissionId: "APP_AUDIT_VIEW"
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"Are you sure you want to update the promise date for these orders?": "Are you sure you want to update the promise date for these orders?",
"Are you sure you want to change the time zone to?": "Are you sure you want to change the time zone to {timeZoneId}?",
"ATP": "ATP",
"Audit": "Audit",
"Auto": "Auto",
"Auto releasing": "Auto releasing",
"Authenticating": "Authenticating",
Expand All @@ -29,7 +30,6 @@
"Cancel item": "Cancel item",
"Cancel job": "Cancel job",
"Cancel orders": "Cancel orders",
"Catalog": "Catalog",
"Category": "Category",
"Change": "Change",
"Change time zone": "Change time zone",
Expand Down
20 changes: 10 additions & 10 deletions src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { createRouter, createWebHistory } from '@ionic/vue-router';
import { RouteRecordRaw } from 'vue-router';
import Products from '../views/products.vue'
import ProductDetails from '../views/product-details.vue'
import CatalogProductDetails from '../views/catalog-product-details.vue'
import AuditProductDetails from '../views/audit-product-details.vue'
import Orders from '../views/orders.vue'
import Catalog from '../views/catalog.vue'
import Audit from '../views/audit.vue'
import Settings from '../views/settings.vue'
import store from '@/store';
import { DxpLogin, useAuthStore } from '@hotwax/dxp-components';
Expand Down Expand Up @@ -79,21 +79,21 @@ const routes: Array<RouteRecordRaw> = [
}
},
{
path: '/catalog',
name: 'Catalog',
component: Catalog,
path: '/audit',
name: 'Audit',
component: Audit,
beforeEnter: authGuard,
meta: {
permissionId: "APP_CATALOG_VIEW"
permissionId: "APP_AUDIT_VIEW"
}
},
{
path: '/catalog-product-details/:productId/',
name: 'Catalog-product-details',
component: CatalogProductDetails,
path: '/audit-product-details/:productId/',
name: 'AuditProductDetails',
component: AuditProductDetails,
beforeEnter: authGuard,
meta: {
permissionId: "APP_CTLG_PRDT_DTLS_VIEW"
permissionId: "APP_AUDIT_PRDT_DTLS_VIEW"
}
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<ion-header :translucent="true">
<ion-toolbar>
<ion-buttons slot="start">
<ion-back-button default-href="/catalog"></ion-back-button>
<ion-back-button default-href="/audit"></ion-back-button>
</ion-buttons>
<ion-title>{{ $t("Product audit") }}</ion-title>
</ion-toolbar>
Expand Down Expand Up @@ -412,7 +412,7 @@ import { Plugins } from "@capacitor/core";
import { Actions, hasPermission } from '@/authorization'
export default defineComponent({
name: "catalog-product-details",
name: "AuditProductDetails",
components: {
DxpShopifyImg,
IonButtons,
Expand Down
6 changes: 3 additions & 3 deletions src/views/catalog.vue → src/views/audit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<ion-buttons slot="start">
<ion-menu-button />
</ion-buttons>
<ion-title slot="start">{{ $t("Catalog") }}</ion-title>
<ion-title slot="start">{{ $t("Audit") }}</ion-title>
</ion-toolbar>
</ion-header>

Expand Down Expand Up @@ -116,7 +116,7 @@ import { JobService } from '@/services/JobService';
import { hasError } from '@/utils';
export default defineComponent({
name: 'Catalog',
name: 'Audit',
components: {
DxpShopifyImg,
IonButtons,
Expand Down Expand Up @@ -232,7 +232,7 @@ export default defineComponent({
}
},
viewProduct(product: any) {
this.router.push({ path: `/catalog-product-details/${product.groupId}`, query: { variantId: product.productId } });
this.router.push({ path: `/audit-product-details/${product.groupId}`, query: { variantId: product.productId } });
},
async preparePreordBckordComputationJob() {
try {
Expand Down

0 comments on commit c8a4a7b

Please sign in to comment.