Skip to content

Commit

Permalink
Merge pull request #603 from sanskar345/job-manager/#597-fulfillmentPage
Browse files Browse the repository at this point in the history
Implemented: Fulfillment page (#597)
  • Loading branch information
ravilodhi authored Aug 28, 2023
2 parents 2c7d8e6 + 135abd0 commit f135ab7
Show file tree
Hide file tree
Showing 6 changed files with 324 additions and 5 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ VUE_APP_I18N_LOCALE=en
VUE_APP_I18N_FALLBACK_LOCALE=en
VUE_APP_CACHE_MAX_AGE=3600
VUE_APP_VIEW_SIZE=10
VUE_APP_FULFILLMENT_JOB_ENUMS={"AUTO_CNCL_DAL":"JOB_CNCL_ORD_DTE","ODR_FLMNT_HST":"JOB_ORD_FLMNT_HST","SHIP_PKD_ODRS":"JOB_SHIP_ORD_PKD"}
VUE_APP_JOB_FREQUENCY_TYPE={"BOPIS_CORRECTION":"default","PRE_ORDER_CTLG":"default","ADD_PRODR_TG_SHPFY":"default","REMV_PRODR_TG_SHPFY":"default","ADD_PRODR_SHPG_DTE_SHPFY":"default","ADD_BACKODR_TG_SHPFY":"default","IMP_NEW_ORDERS":"default","IMP_CANCELLED_ORDERS":"default","REMV_BACKODR_TG_SHPFY":"default","IMP_CANCELLED_ITEMS":"default","AUTO_RELSE_DAILY":"default","IMP_RETURNS":"default","UPLD_CMPLT_ORDRS":"default","UPLD_CNCLD_ORDRS":"default","UPLD_REFUNDS":"default","NTS_PRMS_DT_CHNG":"default","REJ_ORDR":"default","UNFIL_ORDERS":"default","AUTO_CNCL_DAL":"default","BTCH_BRKR_ORD":"default","LIST_PRE_ORDER":"slow","LIST_BACK_ORDER":"slow","IMP_PRDTS":"default","SYNC_PRDTS":"slow","HARD_SYNC":"slow","IMP_PRDTS_BLK":"default","IMP_ORDERS_BLK":"default"}
VUE_APP_ODR_JOB_ENUMS={"IMP_NEW_ORDERS":"JOB_IMP_ORD","APR_ORD":"JOB_APR_ORD","UPDT_ORDS":"UPDT_ORDS","IMP_CANCELLED_ORDERS":"JOB_IMP_ORD_CNCL","IMP_CANCELLED_ITEMS":"JOB_IMP_ITM_CNCL","IMP_RETURNS":"JOB_IMP_RTN","UPLD_CMPLT_ORDRS":"JOB_UL_CMPLT_ORD","UPLD_CNCLD_ORDRS":"JOB_UL_CNCLD_ORD","UPLD_REFUNDS":"JOB_UL_REFUNDS","UNFIL_ORDERS":"JOB_BKR_ORD_UNF","AUTO_CNCL_DAL":"JOB_CNCL_ORD_DTE","BTCH_BRKR_ORD":"JOB_BKR_ORD"}
VUE_APP_PRODR_JOB_ENUMS={"ADD_PRODR_TG_SHPFY":"JOB_ADD_PREORD_VRT","REMV_PRODR_TG_SHPFY":"JOB_RMV_PREORD_VRT", "ADD_BACKODR_TG_SHPFY":"JOB_ADD_BACKORD_VRT","REMV_BACKODR_TG_SHPFY":"JOB_RMV_BACKORD_VRT","AUTO_RELSE_DAILY":"JOB_RLS_ORD_DTE", "REL_PREODR_CAT": "JOB_REL_PREODR_CAT", "PREORDER_CAT_SYC": "JOB_PREORDER_CAT_SYC", "ADD_TAG_BACKORD": "JOB_ADD_TAG_BACKORD", "ADD_TAG_PREORD": "JOB_ADD_TAG_PREORD", "UL_PRMS_DTE": "JOB_UL_PRMS_DTE", "UL_PRMS_DTE_UPD": "JOB_UL_PRMS_DTE_UPD", "SD_PRMSDDTE_CNG_NOTI": "SD_PRMSDDTE_CNG_NOTI", "UL_PRMS_DTE_UPD": "JOB_UL_PRMS_DTE_UPD" }
Expand Down
1 change: 1 addition & 0 deletions src/authorization/Rules.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export default {
"APP_PIPELINE_VIEW": "",
"APP_FULFILLMENT_VIEW": "",
"APP_INVENTORY_VIEW": "",
"APP_PRODUCT_VIEW": "",
"APP_PREORDER_VIEW": "",
Expand Down
25 changes: 20 additions & 5 deletions src/components/Menu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ import {
} from "@ionic/vue";
import { computed, defineComponent } from "vue";
import { mapGetters } from "vuex";
import { albumsOutline, barChartOutline, calendarNumberOutline, iceCreamOutline, libraryOutline, pulseOutline, settingsOutline, shirtOutline, terminalOutline, ticketOutline } from "ionicons/icons";
import { albumsOutline, barChartOutline, calendarNumberOutline, iceCreamOutline, libraryOutline, pulseOutline, settingsOutline, sendOutline, shirtOutline, terminalOutline, ticketOutline } from "ionicons/icons";
import { useStore } from "@/store";
import emitter from "@/event-bus"
import { hasPermission } from "@/authorization";
Expand Down Expand Up @@ -129,14 +129,17 @@ export default defineComponent({
async setShopifyConfig(event: CustomEvent){
await this.store.dispatch('user/setCurrentShopifyConfig', { 'shopifyConfigId': event.detail.value });
emitter.emit("productStoreOrConfigChanged")
},
getValidMenuItems(appPages: any) {
return appPages.filter((appPage: any) => (!appPage.meta || !appPage.meta.permissionId) || hasPermission(appPage.meta.permissionId));
}
},
setup() {
const store = useStore();
const router = useRouter();
// Filtering array of app pages, retaining only those elements (pages) that have the necessary permissions for display.
const getValidMenuItems = (appPages: any) => {
return appPages.filter((appPage: any) => (!appPage.meta || !appPage.meta.permissionId) || hasPermission(appPage.meta.permissionId));
}
let appPages = [
{
title: "Pipeline",
Expand Down Expand Up @@ -178,6 +181,16 @@ export default defineComponent({
permissionId: "APP_ORDERS_VIEW"
}
},
{
title: "Fulfillment",
url: "/fulfillment",
iosIcon: sendOutline,
mdIcon: sendOutline,
dependsOnBaseURL: false,
meta: {
permissionId: "APP_FULFILLMENT_VIEW"
}
},
{
title: "Inventory",
url: "/inventory",
Expand Down Expand Up @@ -248,20 +261,22 @@ export default defineComponent({
const selectedIndex = computed(() => {
const path = router.currentRoute.value.path
return appPages.findIndex((screen : any) => screen.url === path || screen.childRoutes?.includes(path))
return getValidMenuItems(appPages).findIndex((screen : any) => screen.url === path || screen.childRoutes?.includes(path))
})
return {
albumsOutline,
appPages,
barChartOutline,
calendarNumberOutline,
getValidMenuItems,
hasPermission,
iceCreamOutline,
libraryOutline,
pulseOutline,
selectedIndex,
settingsOutline,
sendOutline,
shirtOutline,
store,
terminalOutline,
Expand Down
5 changes: 5 additions & 0 deletions src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"Auto sync date to orders": "Auto sync date to orders",
"Automatically add and remove products from the pre-order and backorder catalogs based on inventory, purchase orders, and order queues.": "Automatically add and remove products from the pre-order and backorder catalogs based on inventory, purchase orders, and order queues.",
"Automatically list pre-order": "Automatically list pre-order",
"Automatically ship orders that are packed and have a tracking number if required.": "Automatically ship orders that are packed and have a tracking number if required.",
"Back-order parking": "Back-order parking",
"Backorder": "Backorder",
"Batch name": "Batch name",
Expand Down Expand Up @@ -64,6 +65,7 @@
"Custom": "Custom",
"Custom frequency": "Custom frequency",
"Custom Parameters": "Custom Parameters",
"Create or update order fulfillment history records from FTP.": "Create or update order fulfillment history records from FTP.",
"Daily": "Daily",
"Dashoard": "Dashoard",
"Days": "Days",
Expand Down Expand Up @@ -148,6 +150,7 @@
"Order queue": "Order queue",
"Order status": "Order status",
"Orders": "Orders",
"Order fulfillment": "Order fulfillment",
"Parameters": "Parameters",
"Partally fulfilled": "Partally fulfilled",
"Password": "Password",
Expand Down Expand Up @@ -223,6 +226,8 @@
"Service updated successfully": "Service updated successfully",
"Services have been scheduled in bulk": "Services have been scheduled in bulk",
"Settings": "Settings",
"Ship packed orders": "Ship packed orders",
"Shipping": "Shipping",
"Shop Config": "Shop Config",
"Shopify Config": "Shopify Config",
"Shopify configuration not found. Scheduling failed.": "Shopify configuration not found. Scheduling failed.",
Expand Down
10 changes: 10 additions & 0 deletions src/router/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { createRouter, createWebHistory } from '@ionic/vue-router';
import { RouteRecordRaw } from 'vue-router';
import Fulfillment from '@/views/Fulfillment.vue';
import Inventory from '@/views/Inventory.vue'
import Product from '@/views/Product.vue'
import Pipeline from '@/views/Pipeline.vue'
Expand Down Expand Up @@ -97,6 +98,15 @@ const routes: Array<RouteRecordRaw> = [
permissionId: "APP_ORDERS_VIEW"
}
},
{
path: '/fulfillment',
name: 'Fulfillment',
component: Fulfillment,
beforeEnter: authGuard,
meta: {
permissionId: "APP_FULFILLMENT_VIEW"
}
},
{
path: '/:category/job-details/:jobId',
name: 'JobDetails',
Expand Down
Loading

0 comments on commit f135ab7

Please sign in to comment.