Skip to content

Commit

Permalink
refactor(orders): update status only after update success
Browse files Browse the repository at this point in the history
  • Loading branch information
mavyfaby committed Sep 19, 2023
1 parent bde9c52 commit 7248957
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"@types/node": "^20.6.2",
"@vitejs/plugin-vue": "^4.3.4",
"autoprefixer": "^10.4.15",
"postcss": "^8.4.29",
"postcss": "^8.4.30",
"sass": "^1.67.0",
"tailwindcss": "^3.3.3",
"typescript": "^5.2.2",
Expand Down
5 changes: 3 additions & 2 deletions src/pages/orders/OrdersInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -257,10 +257,11 @@ function updateStatus(orderId: string, toStatus: OrderStatus) {
value: toStatus
}, response => {
store.isLoading = false;
currentStatus.value = toStatus;
status.value = toStatus;

if (response.success) {
currentStatus.value = toStatus;
status.value = toStatus;

if (toStatus === OrderStatus.COMPLETED) {
isCompleted.value = true;

Expand Down

1 comment on commit 7248957

@vercel
Copy link

@vercel vercel bot commented on 7248957 Sep 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

csps – ./

csps-git-main-csps.vercel.app
csps-csps.vercel.app
ucmncsps.org

Please sign in to comment.