-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(admin): fix shipment options modals not changing context
- Loading branch information
1 parent
1e32bf2
commit 94902f9
Showing
4 changed files
with
31 additions
and
12 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
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
16 changes: 13 additions & 3 deletions
16
apps/admin/src/components/modals/ShipmentOptionsModalForm.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 |
---|---|---|
@@ -1,12 +1,22 @@ | ||
<template> | ||
<ShipmentOptionsForm | ||
v-if="queries.some((data) => data.order)" | ||
v-test="$.type.__name" /> | ||
v-if="orderIds.length" | ||
v-test="$.type.__name" | ||
:order="orderIds" /> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import {computed} from 'vue'; | ||
import {get} from '@vueuse/core'; | ||
import {type OneOrMore} from '@myparcel/ts-utils'; | ||
import ShipmentOptionsForm from '../common/ShipmentOptionsForm.vue'; | ||
import {useOrdersData} from '../../composables'; | ||
const queries = useOrdersData(); | ||
const props = defineProps<{order: OneOrMore<string>}>(); | ||
const orderIds = computed(() => { | ||
return useOrdersData(props.order) | ||
.filter((data) => get(data.order)) | ||
.map((data) => get(data.order)?.externalIdentifier); | ||
}); | ||
</script> |