Skip to content

Commit

Permalink
Improved: type of the count in state (#622)
Browse files Browse the repository at this point in the history
  • Loading branch information
amansinghbais committed Jan 16, 2025
1 parent 84596bb commit 93d8d91
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/store/modules/count/CountState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ export default interface CountState {
cycleCountImportSystemMessages: Array<any>;
defaultRecountUpdateBehaviour: String;
cachedUnmatchProducts: any;
closedCycleCountsTotal: any;
closedCycleCountsTotal: Number;
}
2 changes: 1 addition & 1 deletion src/store/modules/count/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const actions: ActionTree<CountState, RootState> = {
params["facilityId_op"] = "in"
}

let total = "";
let total = -1;
try {
const resp = await CountService.fetchCycleCountsTotal(params);
if(!hasError(resp)) {
Expand Down
2 changes: 1 addition & 1 deletion src/store/modules/count/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const countModule: Module<CountState, RootState> = {
cycleCountItems: {},
defaultRecountUpdateBehaviour: "add",
cachedUnmatchProducts: {},
closedCycleCountsTotal: ""
closedCycleCountsTotal: -1
},
getters,
actions,
Expand Down
2 changes: 1 addition & 1 deletion src/views/Closed.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<ion-item lines="full">
<ion-icon slot="start" :icon="listOutline"/>
<ion-label>{{ translate("Counts closed") }}</ion-label>
<ion-label slot="end">{{ closedCycleCountsTotal ? closedCycleCountsTotal : "-" }}</ion-label>
<ion-label slot="end">{{ (closedCycleCountsTotal !== -1) ? closedCycleCountsTotal : "-" }}</ion-label>
</ion-item>
<ion-item lines="full">
<ion-icon slot="start" :icon="thermometerOutline"/>
Expand Down

0 comments on commit 93d8d91

Please sign in to comment.