From c00d8f5d959449975efe1d9809ebea01c1d3a725 Mon Sep 17 00:00:00 2001 From: Yash Maheshwari Date: Mon, 1 Apr 2024 09:51:30 +0530 Subject: [PATCH] Implemented: support to pass comment when uploading reset inventory file(#275) --- src/views/InventoryReview.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/views/InventoryReview.vue b/src/views/InventoryReview.vue index 85007b13..1e633958 100644 --- a/src/views/InventoryReview.vue +++ b/src/views/InventoryReview.vue @@ -138,7 +138,8 @@ export default defineComponent({ instanceUrl: 'user/getInstanceUrl', facilities: 'util/getFacilities', fileName: 'order/getFileName', - getFacilityLocationsByFacilityId: 'util/getFacilityLocationsByFacilityId' + getFacilityLocationsByFacilityId: 'util/getFacilityLocationsByFacilityId', + userProfile: 'user/getUserProfile' }) }, data() { @@ -223,6 +224,7 @@ export default defineComponent({ this.store.dispatch('stock/updateStockItems', this.stockItems); }, async save(){ + const fileName = this.fileName.replace(".csv", ".json"); const uploadData = this.stockItems.parsed.map((item: any) => { return { "facilityId": item.facilityId, @@ -230,10 +232,10 @@ export default defineComponent({ "idValue": item.identification, "idType": item.identificationTypeId, "locationSeqId": item.locationSeqId, - "availableQty": item.quantity + "availableQty": item.quantity, + "comments": `Inventory was modified via the Import App by ${this.userProfile.partyName} using the ${fileName} file` }; }) - const fileName = this.fileName.replace(".csv", ".json"); const params = { "configId": "RESET_INVENTORY" }