Skip to content

Commit

Permalink
Implemented: details page for pre-order catalog (#85zt0m4qc)
Browse files Browse the repository at this point in the history
  • Loading branch information
k2maan committed May 17, 2023
1 parent afcebbb commit cad730d
Show file tree
Hide file tree
Showing 27 changed files with 884 additions and 102 deletions.
3 changes: 2 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ VUE_APP_ORDER_FILTERS=["orderTypeId: SALES_ORDER", "facilityId:PRE_ORDER_PARKING
VUE_APP_BASE_URL=
VUE_APP_ORDER_IN_BRKRNG_FILTERS=["orderTypeId: SALES_ORDER", "facilityId: _NA_", "orderStatusId: ORDER_APPROVED", "!orderItemStatusId: ITEM_CANCELLED" ]
VUE_APP_PERMISSION_ID=
VUE_APP_ALIAS=
VUE_APP_ALIAS=
VUE_APP_CTGRY_AND_BRKRNG_JOB=["JOB_REL_PREODR_CAT", "JOB_BKR_ORD", "JOB_RLS_ORD_DTE"]
16 changes: 14 additions & 2 deletions src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"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",
"Auto": "Auto",
"Auto releasing": "Auto releasing",
"Available to promise": "Available to promise",
"Background jobs": "Background jobs",
"back-order": "back-order",
Expand All @@ -14,8 +15,10 @@
"eCom Store": "eCom Store",
"Cancel": "Cancel",
"Cancel item": "Cancel item",
"Cancel job": "Cancel job",
"Cancel orders": "Cancel orders",
"Catalog": "Catalog",
"Category and brokering jobs": "Category and brokering jobs",
"Change": "Change",
"Change time zone": "Change time zone",
"Click the backdrop to dismiss.": "Click the backdrop to dismiss.",
Expand All @@ -27,6 +30,7 @@
"Deselect": "Deselect",
"Deselect items": "Deselect items",
"Deselect the selected order items": "Deselect the {count} selected order items",
"disabled": "disabled",
"Dismiss": "Dismiss",
"Don't cancel": "Don't cancel",
"eCommerce": "eCommerce",
Expand All @@ -37,6 +41,7 @@
"Enter an order ID, product name, style name, SKU, customer name, UPCA or external ID": "Enter an order ID, product name, style name, SKU, customer name, UPCA or external ID",
"from date": "from date",
"Go to OMS": "Go to OMS",
"History": "History",
"How are orders released?": "How are orders released?",
"in brokering": "in brokering",
"in stock": "in stock",
Expand All @@ -55,7 +60,10 @@
"Logout": "Logout",
"Loyalty status": "Loyalty status",
"Never in any category": "Never in any category",
"No pending job found": "No pending job found",
"No": "No",
"No job found": "No job found",
"No jobs found": "No jobs found",
"No jobs have run yet": "No jobs have run yet",
"No products found": "No products found",
"No results found": "No results found",
"No time zone found": "No time zone found",
Expand All @@ -71,6 +79,7 @@
"Orders": "Orders",
"orders": "orders",
"Orders are released from oldest to newest. Use the Date filter to identify orders taken before a certain date.": "Orders are released from oldest to newest. Use the Date filter to identify orders taken before a certain date.",
"Order brokering": "Order brokering",
"Out of stock": "Out of stock",
"Password": "Password",
"Pieces": "Pieces",
Expand Down Expand Up @@ -100,6 +109,7 @@
"Release preorders to a warehouse": "Release preorders to a warehouse",
"Release to a warehouse": "Release to a warehouse",
"Removed from category": "Removed from category",
"Run now": "Run now",
"Save": "Save",
"Search products": "Search products",
"Search time zones": "Search time zones",
Expand All @@ -120,6 +130,7 @@
"Something went wrong": "Something went wrong",
"Sorry, your username or password is incorrect. Please try again.": "Sorry, your username or password is incorrect. Please try again.",
"Sort by": "Sort by",
"The job is currently in progress. Are you sure that you want to cancel this job?": "The job is currently in progress. Are you sure that you want to cancel this job?",
"The order count in product cards will be updated based on the filters you select.": "The order count in product cards will be updated based on the filters you select.",
"The timezone you select is used to ensure automations you schedule are always accurate to the time you select.": "The timezone you select is used to ensure automations you schedule are always accurate to the time you select.",
"There are no jobs running the in the background right now.": "There are no jobs running the in the background right now.",
Expand All @@ -138,5 +149,6 @@
"Username": "Username",
"variant": "variant",
"variants": "variants",
"Would you like to update your time zone to . Your profile is currently set to . This setting can always be changed from the settings menu.": "Would you like to update your time zone to {localTimeZone}. Your profile is currently set to {profileTimeZone}. This setting can always be changed from the settings menu."
"Would you like to update your time zone to . Your profile is currently set to . This setting can always be changed from the settings menu.": "Would you like to update your time zone to {localTimeZone}. Your profile is currently set to {profileTimeZone}. This setting can always be changed from the settings menu.",
"Yes": "Yes"
}
8 changes: 4 additions & 4 deletions src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { createRouter, createWebHistory } from '@ionic/vue-router';
import { RouteRecordRaw } from 'vue-router';
import Login from '../views/login.vue'
import Products from '../views/products.vue'
import Productdetails from '../views/product-details.vue'
import CatalogProductdetails from '../views/catalog-product-details.vue'
import ProductDetails from '../views/product-details.vue'
import CatalogProductDetails from '../views/catalog-product-details.vue'
import Orders from '../views/orders.vue'
import Catalog from '../views/catalog.vue'
import Settings from '../views/settings.vue'
Expand Down Expand Up @@ -47,7 +47,7 @@ const routes: Array<RouteRecordRaw> = [
{
path: '/product-details/:id',
name: 'Product-details',
component: Productdetails,
component: ProductDetails,
beforeEnter: authGuard
},
{
Expand All @@ -65,7 +65,7 @@ const routes: Array<RouteRecordRaw> = [
{
path: '/catalog-product-details/:productId/:variantId',
name: 'Catalog-product-details',
component: CatalogProductdetails,
component: CatalogProductDetails,
beforeEnter: authGuard
},
{
Expand Down
20 changes: 19 additions & 1 deletion src/services/JobService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,30 @@ const fetchJobInformation = async (payload: any): Promise<any> => {
});
}

const cancelJob = async (payload: any): Promise <any> => {
return api({
url: "service/cancelScheduledJob",
method: "post",
data: payload
});
}

const scheduleJob = async (payload: any): Promise <any> => {
return api({
url: "scheduleService",
method: "post",
data: payload
});
}

export const JobService = {
cancelJob,
fetchBackgroundJobs,
fetchJobLogs,
fetchJobs,
fetchJobInformation,
pollJobs,
prepareFetchJobsQuery,
prepareFetchLogsQuery,
fetchJobInformation
scheduleJob
}
134 changes: 76 additions & 58 deletions src/services/OrderService.ts
Original file line number Diff line number Diff line change
@@ -1,79 +1,97 @@
import { api } from '@/adapter';

const findOrder = async (payload: any): Promise <any> => {
return api({
url: "searchOrders",
method: "post",
data: payload
});
const findOrder = async (payload: any): Promise<any> => {
return api({
url: "searchOrders",
method: "post",
data: payload
});
}

const fetchBrokeringCountByProducts = async (payload: any): Promise <any> => {
const fetchBrokeringCountByProducts = async (payload: any): Promise<any> => {
return api({
url: "searchOrders",
method: "post",
data: payload
});
url: "searchOrders",
method: "post",
data: payload
});
}

const releaseItems = async (payload: any): Promise <any> => {
return api({
url: "uploadJsonFile",
method: "post",
data: payload.data,
headers: payload.headers
});
const releaseItems = async (payload: any): Promise<any> => {
return api({
url: "uploadJsonFile",
method: "post",
data: payload.data,
headers: payload.headers
});
}

const cancelItems = async (payload: any): Promise <any> => {
return api({
url: "uploadJsonFile",
method: "post",
data: payload.data,
headers: payload.headers
});
const cancelItems = async (payload: any): Promise<any> => {
return api({
url: "uploadJsonFile",
method: "post",
data: payload.data,
headers: payload.headers
});
}

const updatePromiseDateItems = async (payload: any): Promise <any> => {
return api({
url: "uploadJsonFile",
method: "post",
data: payload.data,
headers: payload.headers
});
const updatePromiseDateItems = async (payload: any): Promise<any> => {
return api({
url: "uploadJsonFile",
method: "post",
data: payload.data,
headers: payload.headers
});
}

const releaseItem = async (payload: any): Promise <any> => {
return api({
url: "releaseOrderItem",
method: "post",
data: payload
});
const releaseItem = async (payload: any): Promise<any> => {
return api({
url: "releaseOrderItem",
method: "post",
data: payload
});
}

const cancelItem = async (payload: any): Promise <any> => {
return api({
url: "cancelOrderItem",
method: "post",
data: payload
});
const cancelItem = async (payload: any): Promise<any> => {
return api({
url: "cancelOrderItem",
method: "post",
data: payload
});
}

const updatePromiseDateItem = async (payload: any): Promise <any> => {
return api({
url: "updateOrderItem",
method: "post",
data: payload
});
const updatePromiseDateItem = async (payload: any): Promise<any> => {
return api({
url: "updateOrderItem",
method: "post",
data: payload
});
}

const getPODeliveryDate = async (query: any): Promise <any> => {
return api({
url: 'performFind',
method: 'POST',
data: query
});
}

const getPOItemAndATPDetails = async (payload: any): Promise<any> => {
return api({
url: "solr-query",
method: "POST",
data: payload
})
}

export const OrderService = {
fetchBrokeringCountByProducts,
findOrder,
releaseItem,
cancelItem,
updatePromiseDateItem,
releaseItems,
cancelItems,
updatePromiseDateItems
fetchBrokeringCountByProducts,
findOrder,
releaseItem,
cancelItem,
updatePromiseDateItem,
releaseItems,
cancelItems,
updatePromiseDateItems,
getPODeliveryDate,
getPOItemAndATPDetails
}
10 changes: 5 additions & 5 deletions src/services/StockService.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { api } from '@/adapter';

const checkInventory = async (query: any): Promise <any> => {
const checkInventory = async (query: any): Promise<any> => {
return api({
url: "checkInventory",
method: "post",
data: query
});
url: "checkInventory",
method: "post",
data: query
});
}

export const StockService = {
Expand Down
14 changes: 14 additions & 0 deletions src/services/UtilService.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { api } from '@/adapter';

const getServiceStatusDesc = async (payload: any): Promise<any> => {
return api({
url: "performFind",
method: "get",
params: payload,
cache: true
});
}

export const UtilService = {
getServiceStatusDesc
}
6 changes: 4 additions & 2 deletions src/store/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import orderModule from "./modules/order";
import stockModule from "./modules/stock"
import productModule from "./modules/product"
import jobModule from "./modules/job"
import utilModule from "./modules/util"


// TODO check how to register it from the components only
Expand All @@ -21,7 +22,7 @@ const state: any = {
}

const persistState = createPersistedState({
paths: ['user'],
paths: ['user', 'util'],
fetchBeforeUse: true
})

Expand All @@ -37,7 +38,8 @@ const store = createStore<RootState>({
'order': orderModule,
'stock': stockModule,
'product': productModule,
'job': jobModule
'job': jobModule,
'util': utilModule
},
})

Expand Down
3 changes: 2 additions & 1 deletion src/store/modules/job/JobState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ export default interface JobState {
total: number;
items: any[];
},
polling: boolean
polling: boolean,
ctgryAndBrkrngJobs: any
}
Loading

0 comments on commit cad730d

Please sign in to comment.