Skip to content

Commit cc7a502

Browse files
committed
Fixed: count name not updating on UI post successfull api call and duplicate facility coming on infinite scrolling (#528)
1 parent eb35be5 commit cc7a502

File tree

5 files changed

+16
-15
lines changed

5 files changed

+16
-15
lines changed

src/locales/en.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126
"Group": "Group",
127127
"Hard Count": "Hard Count",
128128
"HARD COUNT": "HARD COUNT",
129-
"Hard counts are used when conducting large scale full counts at facilities. Products are not added to hard counts before they’re assigned. Facilities will count everything they have in stock. Anything they don’t count will defaulted to 0 on hand.": "Hard counts are used when conducting large scale full counts at facilities. Products are not added to hard counts before they’re assigned. Facilities will count everything they have in stock. Anything they don’t count will defaulted to 0 on hand.",
129+
"Hard counts are used when conducting large scale full counts at facilities. Products are not added to hard counts before they’re assigned. Facilities will count everything they have in stock. Anything they don’t count will be defaulted to 0 on hand.": "Hard counts are used when conducting large scale full counts at facilities. Products are not added to hard counts before they’re assigned. Facilities will count everything they have in stock. Anything they don’t count will be defaulted to 0 on hand.",
130130
"If a file includes multiple facilities, a count is created for every facility. All items with no facility location will be added to the same count.": "If a file includes multiple facilities, a count is created for every facility. All items with no facility location will be added to the same count.",
131131
"Import CSV": "Import CSV",
132132
"Import Error": "Import Error",

src/views/AssignedDetail.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -259,12 +259,12 @@ async function updateCountName() {
259259
}
260260
261261
if(countName.value.trim() !== currentCycleCount.value.countName?.trim()) {
262-
const inventoryCountImportId = await CountService.updateCycleCount({ inventoryCountImportId: currentCycleCount.value.countId, countImportName: countName.value.trim() })
263-
if(inventoryCountImportId) {
262+
await CountService.updateCycleCount({ inventoryCountImportId: currentCycleCount.value.countId, countImportName: countName.value.trim() })
263+
.then(() => {
264264
currentCycleCount.value.countName = countName.value.trim()
265-
} else {
265+
}).catch(() => {
266266
countName.value = currentCycleCount.value.countName.trim()
267-
}
267+
})
268268
}
269269
270270
isCountNameUpdating.value = false

src/views/DraftDetail.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -363,12 +363,12 @@ async function updateCountName() {
363363
}
364364
365365
if(countName.value.trim() !== currentCycleCount.value.countName.trim()) {
366-
const inventoryCountImportId = await CountService.updateCycleCount({ inventoryCountImportId: currentCycleCount.value.countId, countImportName: countName.value.trim() })
367-
if(inventoryCountImportId) {
366+
await CountService.updateCycleCount({ inventoryCountImportId: currentCycleCount.value.countId, countImportName: countName.value.trim() })
367+
.then(() => {
368368
currentCycleCount.value.countName = countName.value.trim()
369-
} else {
369+
}).catch(() => {
370370
countName.value = currentCycleCount.value.countName.trim()
371-
}
371+
})
372372
}
373373
374374
isCountNameUpdating.value = false

src/views/HardCount.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
</ion-button>
2323
</ion-item>
2424
<ion-item lines="none">
25-
<ion-label>{{ translate("Hard counts are used when conducting large scale full counts at facilities. Products are not added to hard counts before they’re assigned. Facilities will count everything they have in stock. Anything they don’t count will defaulted to 0 on hand.") }}</ion-label>
25+
<ion-label>{{ translate("Hard counts are used when conducting large scale full counts at facilities. Products are not added to hard counts before they’re assigned. Facilities will count everything they have in stock. Anything they don’t count will be defaulted to 0 on hand.") }}</ion-label>
2626
</ion-item>
2727

2828

@@ -238,7 +238,8 @@ async function fetchFacilities(vSize?: any, vIndex?: any) {
238238
facilityTypeId: "VIRTUAL_FACILITY",
239239
facilityTypeId_not: "Y",
240240
parentTypeId: "VIRTUAL_FACILITY",
241-
parentTypeId_not: "Y"
241+
parentTypeId_not: "Y",
242+
orderByField: "facilityName"
242243
} as any;
243244
244245
if(queryString.value.trim()) {

src/views/PendingReviewDetail.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -346,12 +346,12 @@ async function updateCountName() {
346346
}
347347
348348
if(countName.value.trim() !== currentCycleCount.value.countName.trim()) {
349-
const inventoryCountImportId = await CountService.updateCycleCount({ inventoryCountImportId: currentCycleCount.value.countId, countImportName: countName.value.trim() })
350-
if(inventoryCountImportId) {
349+
await CountService.updateCycleCount({ inventoryCountImportId: currentCycleCount.value.countId, countImportName: countName.value.trim() })
350+
.then(() => {
351351
currentCycleCount.value.countName = countName.value.trim()
352-
} else {
352+
}).catch(() => {
353353
countName.value = currentCycleCount.value.countName.trim()
354-
}
354+
})
355355
}
356356
357357
isCountNameUpdating.value = false

0 commit comments

Comments
 (0)