-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: order details page * feat: add status component * feat: adjust current order pagination * feat: added changesets * feat: add currentPage test
- Loading branch information
1 parent
ed668d7
commit 63d56b3
Showing
13 changed files
with
561 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"vue-demo-store": minor | ||
--- | ||
|
||
Removed order details from `AccountOrder` component and moved it to the new order details page `pages/account/order/details/[id].vue` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@shopware-pwa/composables-next": patch | ||
--- | ||
|
||
useCustomerOrders - Set current page based on the orders endpoint response |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
templates/vue-demo-store/components/account/order/Status.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<script lang="ts" setup> | ||
import type { Schemas } from "#shopware"; | ||
const props = defineProps<{ | ||
state: Schemas["StateMachineState"]; | ||
}>(); | ||
const statusClass = computed(() => { | ||
switch (props.state.technicalName) { | ||
case "completed": | ||
return "bg-green-100 text-green-800"; | ||
case "open": | ||
case "in_progress": | ||
return "bg-yellow-100 text-yellow-800"; | ||
case "cancelled": | ||
return "bg-red-100 text-red-800"; | ||
default: | ||
return "bg-gray-100 text-gray-800"; | ||
} | ||
}); | ||
</script> | ||
<template> | ||
<span | ||
class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full" | ||
:class="statusClass" | ||
>{{ state.name }}</span | ||
> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.