Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved: page name in side menu from catalog to audit, renamed components and updated route entries(#265) #309

Merged
merged 1 commit into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading