diff --git a/src/components/CreateMappingModal.vue b/src/components/CreateMappingModal.vue new file mode 100644 index 00000000..48e34f0c --- /dev/null +++ b/src/components/CreateMappingModal.vue @@ -0,0 +1,132 @@ + + + + \ No newline at end of file diff --git a/src/components/CycleCountUploadActionPopover.vue b/src/components/CycleCountUploadActionPopover.vue new file mode 100644 index 00000000..48e34f0c --- /dev/null +++ b/src/components/CycleCountUploadActionPopover.vue @@ -0,0 +1,132 @@ + + + + \ No newline at end of file diff --git a/src/components/Menu.vue b/src/components/Menu.vue index b0e7aad5..5802cb03 100644 --- a/src/components/Menu.vue +++ b/src/components/Menu.vue @@ -62,6 +62,12 @@ export default defineComponent({ const store = useStore(); const router = useRouter(); const appPages = [ + { + title: "Bulk Upload", + url: "/bulkUpload", + iosIcon: createOutline, + mdIcon: createOutline + }, { title: "Draft", url: "/draft", diff --git a/src/router/index.ts b/src/router/index.ts index a800df54..b629c014 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -17,6 +17,7 @@ import Settings from "@/views/Settings.vue"; import HardCount from "@/views/HardCount.vue" import HardCountDetail from "@/views/HardCountDetail.vue" import SessionCountDetail from "@/views/SessionCountDetail.vue" +import BulkUpload from "@/views/BulkUpload.vue"; // Defining types for the meta values declare module 'vue-router' { @@ -146,6 +147,15 @@ const routes: Array = [ permissionId: "APP_PENDING_REVIEW_VIEW" } }, + { + path: '/bulkUpload', + name: 'Draft bulk', + component: BulkUpload, + beforeEnter: authGuard, + meta: { + permissionId: "APP_DRAFT_VIEW" + } + }, { path: '/settings', name: 'Settings', diff --git a/src/services/CountService.ts b/src/services/CountService.ts index a55a14af..936acb0c 100644 --- a/src/services/CountService.ts +++ b/src/services/CountService.ts @@ -28,8 +28,26 @@ const getInventoryCountImportSession = async (params: { workEffortId: string; in }); } +const bulkUploadInventoryCounts = async (payload: any): Promise => { + return api({ + url: `inventory-cycle-count/cycleCounts/upload`, + method: "post", + ...payload + }); +} + +const fetchCycleCountImportSystemMessages = async (payload: any): Promise => { + return api({ + url: `inventory-cycle-count/cycleCounts/systemMessages`, + method: "get", + params: payload + }); +} + export const CountService = { getAssignedWorkEfforts, getInventoryCountImportsByWorkEffort, - getInventoryCountImportSession + getInventoryCountImportSession, + bulkUploadInventoryCounts, + fetchCycleCountImportSystemMessages } \ No newline at end of file diff --git a/src/store/modules/count/actions.ts b/src/store/modules/count/actions.ts index 5ba2150b..dadb030c 100644 --- a/src/store/modules/count/actions.ts +++ b/src/store/modules/count/actions.ts @@ -59,6 +59,26 @@ const actions: ActionTree = { commit(types.COUNT_ASSIGNED_WORK_EFFORTS_UPDATED, { assignedWorkEfforts, total, isScrollable }) }, + async fetchCycleCountImportSystemMessages({commit} ,payload) { + let systemMessages; + try { + const twentyFourHoursEarlier = DateTime.now().minus({ hours: 24 }); + const resp = await CountService.fetchCycleCountImportSystemMessages({ + systemMessageTypeId: "ImportInventoryCounts", + initDate_from: twentyFourHoursEarlier.toMillis(), + orderByField: 'initDate desc, processedDate desc', + pageSize: 100 + }) + if (!hasError(resp)) { + systemMessages = resp.data + } else { + throw resp.data; + } + } catch (err: any) { + logger.error(err) + } + commit(types.COUNT_IMPORT_SYSTEM_MESSAGES_UPDATED, systemMessages) + }, setCountDetailPageActive({ commit }, isPageActive) { commit(types.COUNT_DETAIL_PAGE_ACTIVE_UPDATED, isPageActive); } diff --git a/src/store/modules/count/getters.ts b/src/store/modules/count/getters.ts index 65e283f1..6a32a872 100644 --- a/src/store/modules/count/getters.ts +++ b/src/store/modules/count/getters.ts @@ -11,6 +11,9 @@ const getters: GetterTree = { }, isCountDetailPageActive(state) { return state.isCountDetailPageActive; + }, + getCycleCountImportSystemMessages(state) { + return state.cycleCountImportSystemMessages } }; diff --git a/src/store/modules/count/mutation-types.ts b/src/store/modules/count/mutation-types.ts index 247eb0ac..0c8bdc4a 100644 --- a/src/store/modules/count/mutation-types.ts +++ b/src/store/modules/count/mutation-types.ts @@ -1,3 +1,4 @@ export const SN_COUNT = "count" export const COUNT_DETAIL_PAGE_ACTIVE_UPDATED = SN_COUNT + '/DETAIL_PAGE_ACTIVE_UPDATED' -export const COUNT_ASSIGNED_WORK_EFFORTS_UPDATED = SN_COUNT + "/ASSIGNED_WORK_EFFORTS_UPDATED" \ No newline at end of file +export const COUNT_ASSIGNED_WORK_EFFORTS_UPDATED = SN_COUNT + "/ASSIGNED_WORK_EFFORTS_UPDATED" +export const COUNT_IMPORT_SYSTEM_MESSAGES_UPDATED = SN_COUNT + "/IMPORT_SYSTEM_MESSAGES_UPDATED" \ No newline at end of file diff --git a/src/store/modules/count/mutations.ts b/src/store/modules/count/mutations.ts index 01345b65..82c444a4 100644 --- a/src/store/modules/count/mutations.ts +++ b/src/store/modules/count/mutations.ts @@ -10,6 +10,9 @@ const mutations: MutationTree = { state.assignedWorkEfforts = payload.assignedWorkEfforts state.total = payload.total state.isScrollable = payload.isScrollable; + }, + [types.COUNT_IMPORT_SYSTEM_MESSAGES_UPDATED] (state, payload) { + state.cycleCountImportSystemMessages = payload } } export default mutations; diff --git a/src/views/BulkUpload.vue b/src/views/BulkUpload.vue new file mode 100644 index 00000000..341c699b --- /dev/null +++ b/src/views/BulkUpload.vue @@ -0,0 +1,314 @@ + + + + \ No newline at end of file