@tower_74/cms-plugin-commerce 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tower_74/cms-plugin-commerce",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Front-end of the Base CMS commerce plugin (ADR-0026): storefront, cart, checkout + product/order admin pages. Ships source; exports a CmsPlugin.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "proprietary",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"peerDependencies": {
|
|
14
14
|
"@inertiajs/vue3": "^2.0.0-beta.3",
|
|
15
15
|
"@tower_74/cms-app": ">=0.6.0 <1.0.0",
|
|
16
|
-
"@tower_74/cms-ui": ">=0.
|
|
16
|
+
"@tower_74/cms-ui": ">=0.30.0 <1.0.0",
|
|
17
17
|
"axios": "^1.7.0",
|
|
18
18
|
"lucide-vue-next": "^0.468.0",
|
|
19
19
|
"vue": "^3.5.13"
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import AdminLayout from '@/layouts/AdminLayout.vue';
|
|
3
|
+
import { useForm } from '@inertiajs/vue3';
|
|
4
|
+
import { Button, RecipientPicker, type RecipientUser } from '@tower_74/cms-ui';
|
|
5
|
+
import { computed } from 'vue';
|
|
6
|
+
|
|
7
|
+
const props = defineProps<{
|
|
8
|
+
orderNotifyUserIds: number[];
|
|
9
|
+
orderNotifyEmails: string[];
|
|
10
|
+
users: RecipientUser[];
|
|
11
|
+
}>();
|
|
12
|
+
|
|
13
|
+
const form = useForm({
|
|
14
|
+
order_notify_user_ids: props.orderNotifyUserIds,
|
|
15
|
+
order_notify_emails: props.orderNotifyEmails,
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
const recipients = computed({
|
|
19
|
+
get: () => ({ userIds: form.order_notify_user_ids, emails: form.order_notify_emails }),
|
|
20
|
+
set: (value: { userIds: number[]; emails: string[] }) => {
|
|
21
|
+
form.order_notify_user_ids = value.userIds;
|
|
22
|
+
form.order_notify_emails = value.emails;
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
const submit = () => form.put('/admin/commerce/settings', { preserveScroll: true });
|
|
27
|
+
</script>
|
|
28
|
+
|
|
29
|
+
<template>
|
|
30
|
+
<AdminLayout>
|
|
31
|
+
<template #title>Commerce settings</template>
|
|
32
|
+
|
|
33
|
+
<form class="max-w-xl space-y-6" @submit.prevent="submit">
|
|
34
|
+
<div>
|
|
35
|
+
<h3 class="text-base font-semibold text-text">New-order notifications</h3>
|
|
36
|
+
<p class="mb-2 text-sm text-muted">Who gets an email when a new paid order comes in.</p>
|
|
37
|
+
<RecipientPicker v-model="recipients" :users="users" />
|
|
38
|
+
</div>
|
|
39
|
+
|
|
40
|
+
<Button type="submit" :disabled="form.processing">Save settings</Button>
|
|
41
|
+
</form>
|
|
42
|
+
</AdminLayout>
|
|
43
|
+
</template>
|