Skip to content

Commit

Permalink
Merge pull request #277 from ymaheshwari1/#275
Browse files Browse the repository at this point in the history
Implemented: support to pass comment when uploading reset inventory file(#275)
  • Loading branch information
ymaheshwari1 authored Apr 1, 2024
2 parents 54790b6 + 86983d1 commit b75d1f1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/views/InventoryReview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -223,17 +224,18 @@ 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,
"externalFacilityId": item.externalFacilityId,
"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"
}
Expand Down

0 comments on commit b75d1f1

Please sign in to comment.