Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/hotwax/job-manager into job…
Browse files Browse the repository at this point in the history
…-manager/#597-brokeringPage
  • Loading branch information
sanskar345 committed Aug 28, 2023
2 parents 396fadf + f135ab7 commit 3ae2c42
Show file tree
Hide file tree
Showing 10 changed files with 345 additions and 229 deletions.
3 changes: 2 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ 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","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","NTS_PRMS_DT_CHNG":"JOB_UL_PRMS_DTE_ORD","REJ_ORDR":"JOB_BKR_REJ_ORD","UNFIL_ORDERS":"JOB_BKR_ORD_UNF","AUTO_CNCL_DAL":"JOB_CNCL_ORD_DTE","BTCH_BRKR_ORD":"JOB_BKR_ORD"}
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" }
VUE_APP_PRD_JOB_ENUMS={"IMP_PRDTS":"JOB_IMP_PROD_NEW","SYNC_PRDTS":"JOB_IMP_PROD_UPD"}
VUE_APP_INV_JOB_ENUMS={"HARD_SYNC":"JOB_UL_INV","BOPIS_CORRECTION":"JOB_BOPIS_RALC"}
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "job-manager",
"version": "2.12.0",
"version": "2.13.0",
"private": true,
"description": "Job Manager App",
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions src/authorization/Rules.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export default {
"APP_PIPELINE_VIEW": "",
"APP_BROKERING_VIEW": "",
"APP_FULFILLMENT_VIEW": "",
"APP_INVENTORY_VIEW": "",
"APP_PRODUCT_VIEW": "",
"APP_PREORDER_VIEW": "",
Expand Down
5 changes: 4 additions & 1 deletion src/components/JobParameterModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</ion-header>

<ion-content>
<ion-list>
<ion-list v-if="customRequiredParameters.length || customOptionalParameters.length">
<ion-item-group>
<ion-item-divider v-if="customRequiredParameters.length" color="light">
<ion-label>{{ $t('Required Parameters') }}</ion-label>
Expand All @@ -34,6 +34,9 @@
</ion-item>
</ion-item-group>
</ion-list>
<ion-item v-else lines="none">
<ion-label class="ion-text-center" >{{ $t('This job does not have any custom parameters.') }}</ion-label>
</ion-item>
</ion-content>
</template>

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, compassOutline, iceCreamOutline, libraryOutline, pulseOutline, settingsOutline, shirtOutline, terminalOutline, ticketOutline } from "ionicons/icons";
import { albumsOutline, barChartOutline, calendarNumberOutline, compassOutline, 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 @@ -188,6 +191,16 @@ export default defineComponent({
permissionId: "APP_BROKERING_VIEW"
}
},
{
title: "Fulfillment",
url: "/fulfillment",
iosIcon: sendOutline,
mdIcon: sendOutline,
dependsOnBaseURL: false,
meta: {
permissionId: "APP_FULFILLMENT_VIEW"
}
},
{
title: "Inventory",
url: "/inventory",
Expand Down Expand Up @@ -258,7 +271,7 @@ 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 {
Expand All @@ -267,12 +280,14 @@ export default defineComponent({
compassOutline,
barChartOutline,
calendarNumberOutline,
getValidMenuItems,
hasPermission,
iceCreamOutline,
libraryOutline,
pulseOutline,
selectedIndex,
settingsOutline,
sendOutline,
shirtOutline,
store,
terminalOutline,
Expand Down
8 changes: 8 additions & 0 deletions src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"Adjustments": "Adjustments",
"All unsaved changes will be lost. Are you sure you want to leave this page.": "All unsaved changes will be lost. Are you sure you want to leave this page.",
"App": "App",
"Approve orders": "Approve orders",
"Archived": "Archived",
"Are you sure you want to change the time zone to?": "Are you sure you want to change the time zone to {timeZoneId}?",
"Are you sure you want to save these changes?": "Are you sure you want to save these changes?",
Expand All @@ -29,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 +66,7 @@
"Custom frequency": "Custom frequency",
"Custom Parameters": "Custom Parameters",
"Create batches and schedule brokering for different orders.": "Create batches and schedule brokering for different orders.",
"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 +151,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 +227,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 Expand Up @@ -261,6 +267,7 @@
"This job has slow frequency type, hence, feasible frequency will be set automatically": "This job has slow frequency type, hence, feasible frequency will be set automatically",
"This job may take several minutes to run. Wait till the job has moved to the pipeline history before checking results.": "This job may take several minutes to run.{ space } Wait till the job has moved to the pipeline history before checking results.",
"This job schedule cannot be skipped": "This job schedule cannot be skipped",
"This job does not have any custom parameters.": "This job does not have any custom parameters.",
"Time zone updated successfully": "Time zone updated successfully",
"Timezone": "Timezone",
"Tomorrow": "Tomorrow",
Expand All @@ -273,6 +280,7 @@
"Unfillable orders": "Unfillable orders",
"Unfulfilled": "Unfulfilled",
"Unfulfilled orders that pass their auto cancelation date will be canceled automatically in HotWax Commerce. They will also be canceled in Shopify if upload for canceled orders is enabled.": "Unfulfilled orders that pass their auto cancelation date will be canceled automatically in HotWax Commerce. They will also be canceled in Shopify if upload for canceled orders is enabled.",
"Update orders": "Update orders",
"Update promise date": "Update promise date",
"Update shipping dates in Shopify": "Update shipping dates in Shopify",
"Update time zone": "Update time zone",
Expand Down
10 changes: 10 additions & 0 deletions src/router/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { createRouter, createWebHistory } from '@ionic/vue-router';
import { RouteRecordRaw } from 'vue-router';
import Brokering from '@/views/Brokering.vue';
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 @@ -107,6 +108,15 @@ const routes: Array<RouteRecordRaw> = [
permissionId: "APP_BROKERING_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 3ae2c42

Please sign in to comment.