@stacksjs/defaults 0.70.358 → 0.70.363
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/ai/skills/stacks-browse/SKILL.md +7 -5
- package/ai/skills/stacks-browse/scripts/browse.ts +68 -9
- package/ai/skills/stacks-dashboard/SKILL.md +4 -0
- package/app/Actions/AI/AskAction.ts +12 -17
- package/app/Actions/AI/SummaryAction.ts +12 -17
- package/app/Actions/Dashboard/Models/ModelShowAction.ts +4 -1
- package/app/Actions/Dashboard/Models/model-write.ts +5 -0
- package/app/Actions/LogAction.ts +11 -11
- package/ide/vscode/package.json +1 -1
- package/package.json +1 -1
- package/resources/components/Buttons/Counter.stx +1 -1
- package/resources/components/Buttons/ToggleDark.stx +1 -1
- package/resources/components/Dashboard/App/RequestDetailsDialog.stx +42 -0
- package/resources/components/Dashboard/App/RequestsOverview.stx +1 -21
- package/resources/components/Dashboard/Auth/AccessTokenCreateDialog.stx +155 -0
- package/resources/components/Dashboard/Auth/AccessTokens.stx +41 -129
- package/resources/components/Dashboard/Ci/CiDashboard.stx +1 -157
- package/resources/components/Dashboard/Ci/CiRunHistoryDrawer.stx +127 -0
- package/resources/components/Dashboard/Commerce/CommerceCategoryDeleteDialog.stx +10 -8
- package/resources/components/Dashboard/Commerce/CommerceCategoryDetailsDialog.stx +22 -17
- package/resources/components/Dashboard/Commerce/CommerceCategoryDialog.stx +14 -13
- package/resources/components/Dashboard/Commerce/CommerceCouponDeleteDialog.stx +10 -7
- package/resources/components/Dashboard/Commerce/CommerceCouponDetailsDialog.stx +25 -19
- package/resources/components/Dashboard/Commerce/CommerceCouponDialog.stx +14 -11
- package/resources/components/Dashboard/Commerce/CommerceCustomerDeleteDialog.stx +10 -8
- package/resources/components/Dashboard/Commerce/CommerceCustomerDetailsDialog.stx +24 -16
- package/resources/components/Dashboard/Commerce/CommerceCustomerDialog.stx +14 -13
- package/resources/components/Dashboard/Commerce/CommerceGiftCardDeleteDialog.stx +10 -8
- package/resources/components/Dashboard/Commerce/CommerceGiftCardDetailsDialog.stx +16 -14
- package/resources/components/Dashboard/Commerce/CommerceGiftCardDialog.stx +17 -16
- package/resources/components/Dashboard/Commerce/CommerceManufacturerDeleteDialog.stx +14 -16
- package/resources/components/Dashboard/Commerce/CommerceManufacturerDialog.stx +17 -16
- package/resources/components/Dashboard/Commerce/CommerceOrderDeleteDialog.stx +10 -8
- package/resources/components/Dashboard/Commerce/CommerceOrderDetailsDialog.stx +15 -10
- package/resources/components/Dashboard/Commerce/CommerceOrderDialog.stx +14 -13
- package/resources/components/Dashboard/Commerce/CommercePosCheckoutDialog.stx +30 -25
- package/resources/components/Dashboard/Commerce/CommercePosReceiptDialog.stx +27 -20
- package/resources/components/Dashboard/Commerce/CommerceProductDeleteDialog.stx +14 -14
- package/resources/components/Dashboard/Commerce/CommerceProductDialog.stx +14 -13
- package/resources/components/Dashboard/Commerce/CommerceReviewDeleteDialog.stx +10 -18
- package/resources/components/Dashboard/Commerce/CommerceReviewEditDialog.stx +17 -16
- package/resources/components/Dashboard/Commerce/CommerceTaxDeleteDialog.stx +14 -14
- package/resources/components/Dashboard/Commerce/CommerceTaxDialog.stx +17 -16
- package/resources/components/Dashboard/Commerce/CommerceTaxesTable.stx +1 -1
- package/resources/components/Dashboard/Commerce/CommerceUnitDeleteDialog.stx +14 -17
- package/resources/components/Dashboard/Commerce/CommerceUnitDialog.stx +17 -16
- package/resources/components/Dashboard/Commerce/CommerceVariantDeleteDialog.stx +10 -8
- package/resources/components/Dashboard/Commerce/CommerceVariantDialog.stx +17 -16
- package/resources/components/Dashboard/Commerce/Delivery/DeliveryRouteDeleteDialog.stx +11 -15
- package/resources/components/Dashboard/Commerce/Delivery/DeliveryRouteDialog.stx +17 -16
- package/resources/components/Dashboard/Commerce/Delivery/DigitalDeliveryDeleteDialog.stx +11 -15
- package/resources/components/Dashboard/Commerce/Delivery/DigitalDeliveryDialog.stx +17 -16
- package/resources/components/Dashboard/Commerce/Delivery/DriverDeleteDialog.stx +11 -15
- package/resources/components/Dashboard/Commerce/Delivery/DriverDialog.stx +17 -16
- package/resources/components/Dashboard/Commerce/Delivery/LicenseKeyDeleteDialog.stx +11 -15
- package/resources/components/Dashboard/Commerce/Delivery/LicenseKeyDialog.stx +17 -16
- package/resources/components/Dashboard/Commerce/Delivery/ShippingMethodDeleteDialog.stx +11 -15
- package/resources/components/Dashboard/Commerce/Delivery/ShippingMethodDialog.stx +17 -16
- package/resources/components/Dashboard/Commerce/Delivery/ShippingRateDeleteDialog.stx +11 -15
- package/resources/components/Dashboard/Commerce/Delivery/ShippingRateDialog.stx +17 -16
- package/resources/components/Dashboard/Commerce/Delivery/ShippingZoneDeleteDialog.stx +11 -15
- package/resources/components/Dashboard/Commerce/Delivery/ShippingZoneDialog.stx +17 -16
- package/resources/components/Dashboard/Commerce/PaymentDetailsDialog.stx +16 -15
- package/resources/components/Dashboard/Commerce/PaymentRefundDialog.stx +16 -15
- package/resources/components/Dashboard/Commerce/PrintDeviceDeleteDialog.stx +10 -11
- package/resources/components/Dashboard/Commerce/PrintDeviceDetailsDialog.stx +16 -14
- package/resources/components/Dashboard/Commerce/PrintDeviceDialog.stx +17 -16
- package/resources/components/Dashboard/Commerce/PrintLogDeleteDialog.stx +10 -7
- package/resources/components/Dashboard/Commerce/PrintLogDetailsDialog.stx +13 -10
- package/resources/components/Dashboard/Commerce/ProductWaitlistDeleteDialog.stx +10 -18
- package/resources/components/Dashboard/Commerce/ProductWaitlistEntryDialog.stx +96 -105
- package/resources/components/Dashboard/Commerce/RestaurantWaitlistDeleteDialog.stx +10 -18
- package/resources/components/Dashboard/Commerce/RestaurantWaitlistEntryDialog.stx +92 -95
- package/resources/components/Dashboard/Content/AuthorEditorDialog.stx +94 -0
- package/resources/components/Dashboard/Content/AuthorsDashboard.stx +39 -31
- package/resources/components/Dashboard/Content/BlogDashboard.stx +87 -176
- package/resources/components/Dashboard/Content/BlogPostEditorDialog.stx +195 -0
- package/resources/components/Dashboard/Content/CommentsDashboard.stx +14 -4
- package/resources/components/Dashboard/Content/ContentTaxonomyDashboard.stx +40 -55
- package/resources/components/Dashboard/Content/CreateFolderDialog.stx +45 -0
- package/resources/components/Dashboard/Content/FileDetailsDrawer.stx +31 -0
- package/resources/components/Dashboard/Content/FileManagerDashboard.stx +47 -107
- package/resources/components/Dashboard/Content/FileUploadDialog.stx +89 -0
- package/resources/components/Dashboard/Content/PageEditorDialog.stx +93 -0
- package/resources/components/Dashboard/Content/PagesDashboard.stx +36 -26
- package/resources/components/Dashboard/Content/PostEditorDialog.stx +176 -0
- package/resources/components/Dashboard/Content/PostsDashboard.stx +40 -64
- package/resources/components/Dashboard/Content/SeoDashboard.stx +18 -84
- package/resources/components/Dashboard/Content/SeoEditorDialog.stx +108 -0
- package/resources/components/Dashboard/Content/TaxonomyEditorDialog.stx +106 -0
- package/resources/components/Dashboard/CreateRecordModal.stx +72 -83
- package/resources/components/Dashboard/Email/InboxMessageList.stx +1 -1
- package/resources/components/Dashboard/GlobalSearch.stx +3 -9
- package/resources/components/Dashboard/Infrastructure/CloudDetailsDialog.stx +2 -16
- package/resources/components/Dashboard/Infrastructure/DnsRecordDialog.stx +4 -16
- package/resources/components/Dashboard/Infrastructure/LogDetailsDialog.stx +4 -19
- package/resources/components/Dashboard/Infrastructure/MailboxDetailsDialog.stx +6 -16
- package/resources/components/Dashboard/Infrastructure/ServerInspectorDialog.stx +105 -0
- package/resources/components/Dashboard/Infrastructure/ServersDashboard.stx +5 -59
- package/resources/components/Dashboard/Jobs/JobHistory.stx +1 -11
- package/resources/components/Dashboard/Library/ComponentsDashboard.stx +11 -60
- package/resources/components/Dashboard/Library/FunctionsDashboard.stx +11 -15
- package/resources/components/Dashboard/Library/SourceScaffoldDialog.stx +95 -0
- package/resources/components/Dashboard/Management/AssignmentDrawer.stx +93 -0
- package/resources/components/Dashboard/Management/PermissionsDashboard.stx +47 -129
- package/resources/components/Dashboard/Marketing/CampaignDeleteDialog.stx +11 -12
- package/resources/components/Dashboard/Marketing/CampaignDeliveryDialog.stx +5 -8
- package/resources/components/Dashboard/Marketing/CampaignDialog.stx +17 -17
- package/resources/components/Dashboard/Marketing/MarketingListDeleteDialog.stx +15 -15
- package/resources/components/Dashboard/Marketing/MarketingListDialog.stx +17 -17
- package/resources/components/Dashboard/Marketing/MarketingListsTable.stx +1 -1
- package/resources/components/Dashboard/Marketing/SocialPostDeleteDialog.stx +11 -12
- package/resources/components/Dashboard/Marketing/SocialPostDialog.stx +17 -16
- package/resources/components/Dashboard/Models/EditRecordModal.stx +81 -0
- package/resources/components/Dashboard/Models/ModelRecordActions.stx +30 -0
- package/resources/components/Dashboard/Models/ModelRecordsDashboard.stx +42 -94
- package/resources/components/Dashboard/Navbar.stx +5 -5
- package/resources/components/Dashboard/Notifications/NotificationDeliveryDialog.stx +40 -60
- package/resources/components/Dashboard/UI/Button.stx +4 -0
- package/resources/components/Dashboard/UI/ConfirmDialog.stx +55 -53
- package/resources/components/Dashboard/UI/Drawer.stx +114 -0
- package/resources/components/Dashboard/UI/Modal.stx +32 -21
- package/resources/components/Docs/Demo/ComboboxDemo.stx +4 -5
- package/resources/components/Docs/Demo/DropdownDemo.stx +12 -5
- package/resources/components/Docs/Demo/ListboxDemo.stx +14 -6
- package/resources/components/Docs/Demo/PopoverDemo.stx +10 -5
- package/resources/components/Docs/Demo/RadioGroupDemo.stx +14 -6
- package/resources/components/Docs/Demo/StepperDemo.stx +4 -5
- package/resources/components/Docs/TeamMember.stx +16 -9
- package/resources/components/Forum/ForumReplyForm.stx +7 -7
- package/resources/components/Forum/ForumSidebar.stx +10 -6
- package/resources/components/Marketing/Faqs.stx +5 -5
- package/resources/components/Marketing/Feature.stx +11 -6
- package/resources/components/Marketing/Layout.stx +12 -8
- package/resources/components/Marketing/Pricing.stx +11 -5
- package/resources/components/Marketing/PrimaryFeatures.stx +4 -5
- package/resources/components/Marketing/PrimaryFeatures2.stx +6 -5
- package/resources/components/Marketing/SecondaryFeatures.stx +10 -5
- package/resources/components/Marketing/Testimonials.stx +8 -5
- package/resources/views/index.stx +4 -4
- package/views/system-tray/index.stx +1 -1
|
@@ -5,19 +5,19 @@ const open = useReactiveProp('open', false)
|
|
|
5
5
|
const record = useReactiveProp('record', null as TaxRateRecord | null)
|
|
6
6
|
const busy = useReactiveProp('busy', false)
|
|
7
7
|
const emit = defineEmits()
|
|
8
|
+
const description = derived(() => `${record()?.name || 'This tax rate'} will be permanently removed.`)
|
|
9
|
+
const warning = derived(() => record()?.isDefault
|
|
10
|
+
? 'This rate is marked as default. No replacement is selected automatically.'
|
|
11
|
+
: '')
|
|
8
12
|
</script>
|
|
9
13
|
|
|
10
|
-
<
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
</Button>
|
|
21
|
-
</footer>
|
|
22
|
-
</section>
|
|
23
|
-
</div>
|
|
14
|
+
<ConfirmDialog
|
|
15
|
+
:isOpen="open()"
|
|
16
|
+
title="Delete tax rate?"
|
|
17
|
+
:description="description()"
|
|
18
|
+
:warning="warning()"
|
|
19
|
+
confirmLabel="Delete tax rate"
|
|
20
|
+
:busy="busy()"
|
|
21
|
+
@close="emit('close')"
|
|
22
|
+
@confirm="emit('confirm')"
|
|
23
|
+
/>
|
|
@@ -66,17 +66,18 @@ function errorMessages(): string[] {
|
|
|
66
66
|
}
|
|
67
67
|
</script>
|
|
68
68
|
|
|
69
|
-
<
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
69
|
+
<Modal
|
|
70
|
+
:isOpen="open()"
|
|
71
|
+
:title="mode() === 'edit' ? 'Edit tax rate' : 'Add tax rate'"
|
|
72
|
+
description="All fields follow the TaxRate model validation rules."
|
|
73
|
+
size="md"
|
|
74
|
+
@close="emit('close')"
|
|
75
|
+
>
|
|
76
|
+
<form id="tax-rate-form" @submit.prevent="submit">
|
|
77
|
+
<ul :if="errorMessages().length > 0" class="mb-5 p-3 space-y-1 text-red-700 text-sm dark:text-red-300 bg-red-50 dark:bg-red-950/30 border border-red-200 rounded-lg dark:border-red-900">
|
|
77
78
|
<template :for="message in errorMessages()" :key="message"><li>{{ message }}</li></template>
|
|
78
79
|
</ul>
|
|
79
|
-
<div class="
|
|
80
|
+
<div class="space-y-4">
|
|
80
81
|
<label class="block">
|
|
81
82
|
<span class="font-medium text-gray-700 text-sm dark:text-neutral-200">Name</span>
|
|
82
83
|
<input x-model="name" type="text" maxlength="255" required class="mt-1 px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-900 border border-gray-300 rounded-md dark:border-neutral-700" />
|
|
@@ -136,13 +137,13 @@ function errorMessages(): string[] {
|
|
|
136
137
|
</span>
|
|
137
138
|
</label>
|
|
138
139
|
</div>
|
|
139
|
-
|
|
140
|
-
|
|
140
|
+
</form>
|
|
141
|
+
<template #footer>
|
|
142
|
+
<div class="flex gap-2 justify-end w-full">
|
|
141
143
|
<Button variant="secondary" :disabled="busy()" @click="emit('close')">Cancel</Button>
|
|
142
|
-
<Button type="submit" :loading="busy()" :disabled="!name().trim() || !type().trim() || !country().trim() || rate() < 0 || rate() > 100">
|
|
144
|
+
<Button type="submit" form="tax-rate-form" :loading="busy()" :disabled="!name().trim() || !type().trim() || !country().trim() || rate() < 0 || rate() > 100">
|
|
143
145
|
{{ mode() === 'edit' ? 'Save tax rate' : 'Add tax rate' }}
|
|
144
146
|
</Button>
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
</div>
|
|
147
|
+
</div>
|
|
148
|
+
</template>
|
|
149
|
+
</Modal>
|
|
@@ -49,7 +49,7 @@ function formatDate(value: string): string {
|
|
|
49
49
|
renaming the rate must not change the bill.
|
|
50
50
|
--}}
|
|
51
51
|
<span :if="record.code" class="px-2 py-0.5 font-mono text-gray-600 text-xs dark:text-neutral-300 bg-gray-100 dark:bg-neutral-700 rounded-full">{{ record.code }}</span>
|
|
52
|
-
<span :if="record.exemptible" class="px-2 py-0.5 font-medium text-amber-700 text-xs dark:text-amber-300 bg-amber-50 dark:bg-amber-950/40 rounded-full" title="Not charged to a customer who qualifies for an exemption">Exemptible</span>
|
|
52
|
+
<span :if="record.exemptible" class="px-2 py-0.5 font-medium text-amber-700 text-xs dark:text-amber-300 bg-amber-50 dark:bg-amber-950/40 rounded-full" x-tooltip="Not charged to a customer who qualifies for an exemption" title="Not charged to a customer who qualifies for an exemption">Exemptible</span>
|
|
53
53
|
</div>
|
|
54
54
|
<p class="mt-1 text-gray-500 text-xs dark:text-neutral-400">{{ record.type }}</p>
|
|
55
55
|
</td>
|
|
@@ -5,22 +5,19 @@ const open = useReactiveProp('open', false)
|
|
|
5
5
|
const record = useReactiveProp('record', null as ProductUnitRecord | null)
|
|
6
6
|
const busy = useReactiveProp('busy', false)
|
|
7
7
|
const emit = defineEmits()
|
|
8
|
+
const description = derived(() => `${record()?.name || 'This product unit'} will be permanently removed.${record()?.productName ? ` The linked product ${record()?.productName} will remain.` : ''}`)
|
|
9
|
+
const warning = derived(() => record()?.isDefault
|
|
10
|
+
? `This is the current default for ${record()?.type || 'this unit type'}. No replacement is selected automatically.`
|
|
11
|
+
: '')
|
|
8
12
|
</script>
|
|
9
13
|
|
|
10
|
-
<
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
<Button variant="secondary" :disabled="busy()" @click="emit('close')">Cancel</Button>
|
|
21
|
-
<Button variant="danger" :loading="busy()" @click="emit('confirm')">
|
|
22
|
-
Delete product unit
|
|
23
|
-
</Button>
|
|
24
|
-
</footer>
|
|
25
|
-
</section>
|
|
26
|
-
</div>
|
|
14
|
+
<ConfirmDialog
|
|
15
|
+
:isOpen="open()"
|
|
16
|
+
title="Delete product unit?"
|
|
17
|
+
:description="description()"
|
|
18
|
+
:warning="warning()"
|
|
19
|
+
confirmLabel="Delete product unit"
|
|
20
|
+
:busy="busy()"
|
|
21
|
+
@close="emit('close')"
|
|
22
|
+
@confirm="emit('confirm')"
|
|
23
|
+
/>
|
|
@@ -59,17 +59,18 @@ function errorMessages(): string[] {
|
|
|
59
59
|
}
|
|
60
60
|
</script>
|
|
61
61
|
|
|
62
|
-
<
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
62
|
+
<Modal
|
|
63
|
+
:isOpen="open()"
|
|
64
|
+
:title="mode() === 'edit' ? 'Edit product unit' : 'Add product unit'"
|
|
65
|
+
description="Fields and relationships come from the ProductUnit model."
|
|
66
|
+
size="md"
|
|
67
|
+
@close="emit('close')"
|
|
68
|
+
>
|
|
69
|
+
<form id="product-unit-form" @submit.prevent="submit">
|
|
70
|
+
<ul :if="errorMessages().length > 0" class="mb-5 p-3 space-y-1 text-red-700 text-sm dark:text-red-300 bg-red-50 dark:bg-red-950/30 border border-red-200 rounded-lg dark:border-red-900">
|
|
70
71
|
<template :for="message in errorMessages()" :key="message"><li>{{ message }}</li></template>
|
|
71
72
|
</ul>
|
|
72
|
-
<div class="
|
|
73
|
+
<div class="space-y-4">
|
|
73
74
|
<div class="grid gap-4 sm:grid-cols-2">
|
|
74
75
|
<label class="block">
|
|
75
76
|
<span class="font-medium text-gray-700 text-sm dark:text-neutral-200">Name</span>
|
|
@@ -110,13 +111,13 @@ function errorMessages(): string[] {
|
|
|
110
111
|
</span>
|
|
111
112
|
</label>
|
|
112
113
|
</div>
|
|
113
|
-
|
|
114
|
-
|
|
114
|
+
</form>
|
|
115
|
+
<template #footer>
|
|
116
|
+
<div class="flex gap-2 justify-end w-full">
|
|
115
117
|
<Button variant="secondary" :disabled="busy()" @click="emit('close')">Cancel</Button>
|
|
116
|
-
<Button type="submit" :loading="busy()" :disabled="!name().trim() || !abbreviation().trim() || !type().trim()">
|
|
118
|
+
<Button type="submit" form="product-unit-form" :loading="busy()" :disabled="!name().trim() || !abbreviation().trim() || !type().trim()">
|
|
117
119
|
{{ mode() === 'edit' ? 'Save product unit' : 'Add product unit' }}
|
|
118
120
|
</Button>
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
</div>
|
|
121
|
+
</div>
|
|
122
|
+
</template>
|
|
123
|
+
</Modal>
|
|
@@ -5,13 +5,15 @@ const open = useReactiveProp('open', false)
|
|
|
5
5
|
const record = useReactiveProp('record', null as ProductVariantRecord | null)
|
|
6
6
|
const busy = useReactiveProp('busy', false)
|
|
7
7
|
const emit = defineEmits()
|
|
8
|
+
const description = derived(() => `${record()?.variant || 'This product variant'} will be permanently removed.${record()?.productName ? ` The linked product ${record()?.productName} will remain.` : ''}`)
|
|
8
9
|
</script>
|
|
9
10
|
|
|
10
|
-
<
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
<ConfirmDialog
|
|
12
|
+
:isOpen="open()"
|
|
13
|
+
title="Delete product variant?"
|
|
14
|
+
:description="description()"
|
|
15
|
+
confirmLabel="Delete product variant"
|
|
16
|
+
:busy="busy()"
|
|
17
|
+
@close="emit('close')"
|
|
18
|
+
@confirm="emit('confirm')"
|
|
19
|
+
/>
|
|
@@ -56,17 +56,18 @@ function errorMessages(): string[] {
|
|
|
56
56
|
}
|
|
57
57
|
</script>
|
|
58
58
|
|
|
59
|
-
<
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
59
|
+
<Modal
|
|
60
|
+
:isOpen="open()"
|
|
61
|
+
:title="mode() === 'edit' ? 'Edit product variant' : 'Add product variant'"
|
|
62
|
+
description="Fields and product assignment follow the ProductVariant model."
|
|
63
|
+
size="md"
|
|
64
|
+
@close="emit('close')"
|
|
65
|
+
>
|
|
66
|
+
<form id="product-variant-form" @submit.prevent="submit">
|
|
67
|
+
<ul :if="errorMessages().length > 0" class="mb-5 p-3 space-y-1 text-red-700 text-sm dark:text-red-300 bg-red-50 dark:bg-red-950/30 border border-red-200 rounded-lg dark:border-red-900">
|
|
67
68
|
<template :for="message in errorMessages()" :key="message"><li>{{ message }}</li></template>
|
|
68
69
|
</ul>
|
|
69
|
-
<div class="
|
|
70
|
+
<div class="space-y-4">
|
|
70
71
|
<div class="grid gap-4 sm:grid-cols-2">
|
|
71
72
|
<label class="block"><span class="font-medium text-gray-700 text-sm dark:text-neutral-200">Variant</span><input x-model="variant" type="text" maxlength="100" required class="mt-1 px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-900 border border-gray-300 rounded-md dark:border-neutral-700" /></label>
|
|
72
73
|
<label class="block"><span class="font-medium text-gray-700 text-sm dark:text-neutral-200">Type</span><input x-model="type" type="text" list="product-variant-types" maxlength="50" required class="mt-1 px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-900 border border-gray-300 rounded-md dark:border-neutral-700" /><datalist id="product-variant-types"><template :for="variantType in types()" :key="variantType"><option :value="variantType"></option></template></datalist></label>
|
|
@@ -76,11 +77,11 @@ function errorMessages(): string[] {
|
|
|
76
77
|
<label class="block"><span class="font-medium text-gray-700 text-sm dark:text-neutral-200">Options</span><textarea x-model="options" rows="3" placeholder="Small, Medium, Large" class="mt-1 px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-900 border border-gray-300 rounded-md dark:border-neutral-700"></textarea><span class="block mt-1 text-gray-500 text-xs dark:text-neutral-400">Separate options with commas or new lines.</span></label>
|
|
77
78
|
<label class="block"><span class="font-medium text-gray-700 text-sm dark:text-neutral-200">Status</span><select x-model="status" class="mt-1 px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-900 border border-gray-300 rounded-md dark:border-neutral-700"><option value="active">Active</option><option value="inactive">Inactive</option><option value="draft">Draft</option></select></label>
|
|
78
79
|
</div>
|
|
79
|
-
</div>
|
|
80
|
-
<footer class="flex gap-2 justify-end px-6 py-4 bg-gray-50 dark:bg-neutral-900/50 border-gray-200 border-t dark:border-neutral-700">
|
|
81
|
-
<Button variant="secondary" :disabled="busy()" @click="emit('close')">Cancel</Button>
|
|
82
|
-
<Button type="submit" :loading="busy()" :disabled="!variant().trim() || !type().trim()">{{ mode() === 'edit' ? 'Save product variant' : 'Add product variant' }}</Button>
|
|
83
|
-
</footer>
|
|
84
80
|
</form>
|
|
85
|
-
|
|
86
|
-
|
|
81
|
+
<template #footer>
|
|
82
|
+
<div class="flex gap-2 justify-end w-full">
|
|
83
|
+
<Button variant="secondary" :disabled="busy()" @click="emit('close')">Cancel</Button>
|
|
84
|
+
<Button type="submit" form="product-variant-form" :loading="busy()" :disabled="!variant().trim() || !type().trim()">{{ mode() === 'edit' ? 'Save product variant' : 'Add product variant' }}</Button>
|
|
85
|
+
</div>
|
|
86
|
+
</template>
|
|
87
|
+
</Modal>
|
|
@@ -9,20 +9,16 @@ const record = useReactiveProp('record', null as DeliveryRouteRecord | null)
|
|
|
9
9
|
const busy = useReactiveProp('busy', false)
|
|
10
10
|
const error = useReactiveProp('error', '')
|
|
11
11
|
const emit = defineEmits()
|
|
12
|
+
const description = derived(() => `Delete route #${record()?.id} for ${record()?.driver || 'the selected driver'} permanently.`)
|
|
12
13
|
</script>
|
|
13
14
|
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
<Button :disabled="busy()" variant="secondary" @click="emit('close')">Cancel</Button>
|
|
25
|
-
<Button :loading="busy()" variant="danger" @click="emit('confirm')">Delete route</Button>
|
|
26
|
-
</footer>
|
|
27
|
-
</section>
|
|
28
|
-
</div>
|
|
15
|
+
<ConfirmDialog
|
|
16
|
+
:isOpen="open() && Boolean(record())"
|
|
17
|
+
title="Delete delivery route?"
|
|
18
|
+
:description="description()"
|
|
19
|
+
confirmLabel="Delete route"
|
|
20
|
+
:busy="busy()"
|
|
21
|
+
:error="error()"
|
|
22
|
+
@close="emit('close')"
|
|
23
|
+
@confirm="emit('confirm')"
|
|
24
|
+
/>
|
|
@@ -115,16 +115,17 @@ function submit(): void {
|
|
|
115
115
|
}
|
|
116
116
|
</script>
|
|
117
117
|
|
|
118
|
-
<
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
118
|
+
<Modal
|
|
119
|
+
:isOpen="open()"
|
|
120
|
+
:title="mode() === 'edit' ? 'Edit delivery route' : 'Add delivery route'"
|
|
121
|
+
description="Assign a persisted driver and record the operational route metrics."
|
|
122
|
+
size="lg"
|
|
123
|
+
@close="emit('close')"
|
|
124
|
+
>
|
|
125
|
+
<form id="delivery-route-form" @submit.prevent="submit()">
|
|
126
|
+
<div :if="error()" class="mb-5 p-3 text-red-700 text-sm dark:text-red-300 bg-red-50 dark:bg-red-950/30 border border-red-200 rounded-lg dark:border-red-900">{{ error() }}</div>
|
|
126
127
|
|
|
127
|
-
<div class="
|
|
128
|
+
<div class="space-y-4">
|
|
128
129
|
<label class="block">
|
|
129
130
|
<span class="font-medium text-gray-700 text-sm dark:text-neutral-200">Driver</span>
|
|
130
131
|
<select x-model="driverId" required class="mt-1 px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-900 border border-gray-300 rounded-md dark:border-neutral-700">
|
|
@@ -143,11 +144,11 @@ function submit(): void {
|
|
|
143
144
|
</div>
|
|
144
145
|
<label class="block"><span class="font-medium text-gray-700 text-sm dark:text-neutral-200">Last active</span><input x-model="lastActive" type="datetime-local" required class="mt-1 px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-900 border border-gray-300 rounded-md dark:border-neutral-700" /></label>
|
|
145
146
|
</div>
|
|
146
|
-
</div>
|
|
147
|
-
<footer class="flex gap-2 justify-end px-6 py-4 bg-gray-50 dark:bg-neutral-900/50 border-gray-200 border-t dark:border-neutral-700">
|
|
148
|
-
<Button :disabled="busy()" variant="secondary" @click="emit('close')">Cancel</Button>
|
|
149
|
-
<Button type="submit" :loading="busy()">{{ mode() === 'edit' ? 'Save changes' : 'Add route' }}</Button>
|
|
150
|
-
</footer>
|
|
151
147
|
</form>
|
|
152
|
-
|
|
153
|
-
|
|
148
|
+
<template #footer>
|
|
149
|
+
<div class="flex gap-2 justify-end w-full">
|
|
150
|
+
<Button :disabled="busy()" variant="secondary" @click="emit('close')">Cancel</Button>
|
|
151
|
+
<Button type="submit" form="delivery-route-form" :loading="busy()">{{ mode() === 'edit' ? 'Save changes' : 'Add route' }}</Button>
|
|
152
|
+
</div>
|
|
153
|
+
</template>
|
|
154
|
+
</Modal>
|
|
@@ -9,20 +9,16 @@ const record = useReactiveProp('record', null as DigitalDeliveryRecord | null)
|
|
|
9
9
|
const busy = useReactiveProp('busy', false)
|
|
10
10
|
const error = useReactiveProp('error', '')
|
|
11
11
|
const emit = defineEmits()
|
|
12
|
+
const description = derived(() => `Delete ${record()?.name || 'the selected digital delivery'} permanently.`)
|
|
12
13
|
</script>
|
|
13
14
|
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
<Button :disabled="busy()" variant="secondary" @click="emit('close')">Cancel</Button>
|
|
25
|
-
<Button :loading="busy()" variant="danger" @click="emit('confirm')">Delete method</Button>
|
|
26
|
-
</footer>
|
|
27
|
-
</section>
|
|
28
|
-
</div>
|
|
15
|
+
<ConfirmDialog
|
|
16
|
+
:isOpen="open() && Boolean(record())"
|
|
17
|
+
title="Delete digital delivery?"
|
|
18
|
+
:description="description()"
|
|
19
|
+
confirmLabel="Delete delivery"
|
|
20
|
+
:busy="busy()"
|
|
21
|
+
:error="error()"
|
|
22
|
+
@close="emit('close')"
|
|
23
|
+
@confirm="emit('confirm')"
|
|
24
|
+
/>
|
|
@@ -79,16 +79,17 @@ function submit(): void {
|
|
|
79
79
|
}
|
|
80
80
|
</script>
|
|
81
81
|
|
|
82
|
-
<
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
82
|
+
<Modal
|
|
83
|
+
:isOpen="open()"
|
|
84
|
+
:title="mode() === 'edit' ? 'Edit digital delivery' : 'Add digital delivery'"
|
|
85
|
+
description="Configure access, expiry, download limits, and fulfillment behavior."
|
|
86
|
+
size="lg"
|
|
87
|
+
@close="emit('close')"
|
|
88
|
+
>
|
|
89
|
+
<form id="digital-delivery-form" @submit.prevent="submit()">
|
|
90
|
+
<div :if="error()" class="mb-5 p-3 text-red-700 text-sm dark:text-red-300 bg-red-50 dark:bg-red-950/30 border border-red-200 rounded-lg dark:border-red-900">{{ error() }}</div>
|
|
90
91
|
|
|
91
|
-
<div class="
|
|
92
|
+
<div class="space-y-4">
|
|
92
93
|
<label class="block"><span class="font-medium text-gray-700 text-sm dark:text-neutral-200">Method name</span><input x-model="name" type="text" required maxlength="255" autocomplete="off" placeholder="Secure download" class="mt-1 px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-900 border border-gray-300 rounded-md dark:border-neutral-700" /></label>
|
|
93
94
|
<label class="block"><span class="font-medium text-gray-700 text-sm dark:text-neutral-200">Description</span><textarea x-model="description" required rows="3" placeholder="Explain how customers receive and access files." class="mt-1 px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-900 border border-gray-300 rounded-md dark:border-neutral-700 resize-y"></textarea></label>
|
|
94
95
|
<div class="grid gap-4 grid-cols-1 sm:grid-cols-2">
|
|
@@ -101,11 +102,11 @@ function submit(): void {
|
|
|
101
102
|
</div>
|
|
102
103
|
<label class="block"><span class="font-medium text-gray-700 text-sm dark:text-neutral-200">Status</span><select x-model="status" class="mt-1 px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-900 border border-gray-300 rounded-md dark:border-neutral-700"><option value="active">Active</option><option value="inactive">Inactive</option></select></label>
|
|
103
104
|
</div>
|
|
104
|
-
</div>
|
|
105
|
-
<footer class="flex gap-2 justify-end px-6 py-4 bg-gray-50 dark:bg-neutral-900/50 border-gray-200 border-t dark:border-neutral-700">
|
|
106
|
-
<Button :disabled="busy()" variant="secondary" @click="emit('close')">Cancel</Button>
|
|
107
|
-
<Button type="submit" :loading="busy()">{{ mode() === 'edit' ? 'Save changes' : 'Add method' }}</Button>
|
|
108
|
-
</footer>
|
|
109
105
|
</form>
|
|
110
|
-
|
|
111
|
-
|
|
106
|
+
<template #footer>
|
|
107
|
+
<div class="flex gap-2 justify-end w-full">
|
|
108
|
+
<Button :disabled="busy()" variant="secondary" @click="emit('close')">Cancel</Button>
|
|
109
|
+
<Button type="submit" form="digital-delivery-form" :loading="busy()">{{ mode() === 'edit' ? 'Save changes' : 'Add method' }}</Button>
|
|
110
|
+
</div>
|
|
111
|
+
</template>
|
|
112
|
+
</Modal>
|
|
@@ -9,20 +9,16 @@ const record = useReactiveProp('record', null as DriverRecord | null)
|
|
|
9
9
|
const busy = useReactiveProp('busy', false)
|
|
10
10
|
const error = useReactiveProp('error', '')
|
|
11
11
|
const emit = defineEmits()
|
|
12
|
+
const description = derived(() => `Delete ${record()?.name || 'the selected driver'} permanently. Drivers referenced by delivery routes may be protected by the database.`)
|
|
12
13
|
</script>
|
|
13
14
|
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
<Button :disabled="busy()" variant="secondary" @click="emit('close')">Cancel</Button>
|
|
25
|
-
<Button :loading="busy()" variant="danger" @click="emit('confirm')">Delete driver</Button>
|
|
26
|
-
</footer>
|
|
27
|
-
</section>
|
|
28
|
-
</div>
|
|
15
|
+
<ConfirmDialog
|
|
16
|
+
:isOpen="open() && Boolean(record())"
|
|
17
|
+
title="Delete driver?"
|
|
18
|
+
:description="description()"
|
|
19
|
+
confirmLabel="Delete driver"
|
|
20
|
+
:busy="busy()"
|
|
21
|
+
:error="error()"
|
|
22
|
+
@close="emit('close')"
|
|
23
|
+
@confirm="emit('confirm')"
|
|
24
|
+
/>
|
|
@@ -84,16 +84,17 @@ function submit(): void {
|
|
|
84
84
|
}
|
|
85
85
|
</script>
|
|
86
86
|
|
|
87
|
-
<
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
87
|
+
<Modal
|
|
88
|
+
:isOpen="open()"
|
|
89
|
+
:title="mode() === 'edit' ? 'Edit driver' : 'Add driver'"
|
|
90
|
+
description="Manage operational identity, vehicle assignment, availability, and the optional User relationship."
|
|
91
|
+
size="md"
|
|
92
|
+
@close="emit('close')"
|
|
93
|
+
>
|
|
94
|
+
<form id="driver-form" @submit.prevent="submit()">
|
|
95
|
+
<div :if="error()" class="mb-5 p-3 text-red-700 text-sm dark:text-red-300 bg-red-50 dark:bg-red-950/30 border border-red-200 rounded-lg dark:border-red-900">{{ error() }}</div>
|
|
95
96
|
|
|
96
|
-
<div class="
|
|
97
|
+
<div class="space-y-4">
|
|
97
98
|
<label class="block"><span class="font-medium text-gray-700 text-sm dark:text-neutral-200">Driver name</span><input x-model="name" type="text" required maxlength="255" autocomplete="name" placeholder="Alex Morgan" class="mt-1 px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-900 border border-gray-300 rounded-md dark:border-neutral-700" /></label>
|
|
98
99
|
<label class="block"><span class="font-medium text-gray-700 text-sm dark:text-neutral-200">Phone</span><input x-model="phone" type="tel" required maxlength="255" autocomplete="tel" placeholder="+1 555 0100" class="mt-1 px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-900 border border-gray-300 rounded-md dark:border-neutral-700" /></label>
|
|
99
100
|
<div class="grid gap-4 grid-cols-1 sm:grid-cols-2">
|
|
@@ -109,11 +110,11 @@ function submit(): void {
|
|
|
109
110
|
</select>
|
|
110
111
|
</label>
|
|
111
112
|
</div>
|
|
112
|
-
</div>
|
|
113
|
-
<footer class="flex gap-2 justify-end px-6 py-4 bg-gray-50 dark:bg-neutral-900/50 border-gray-200 border-t dark:border-neutral-700">
|
|
114
|
-
<Button :disabled="busy()" variant="secondary" @click="emit('close')">Cancel</Button>
|
|
115
|
-
<Button type="submit" :loading="busy()">{{ mode() === 'edit' ? 'Save changes' : 'Add driver' }}</Button>
|
|
116
|
-
</footer>
|
|
117
113
|
</form>
|
|
118
|
-
|
|
119
|
-
|
|
114
|
+
<template #footer>
|
|
115
|
+
<div class="flex gap-2 justify-end w-full">
|
|
116
|
+
<Button :disabled="busy()" variant="secondary" @click="emit('close')">Cancel</Button>
|
|
117
|
+
<Button type="submit" form="driver-form" :loading="busy()">{{ mode() === 'edit' ? 'Save changes' : 'Add driver' }}</Button>
|
|
118
|
+
</div>
|
|
119
|
+
</template>
|
|
120
|
+
</Modal>
|
|
@@ -9,20 +9,16 @@ const record = useReactiveProp('record', null as LicenseKeyRecord | null)
|
|
|
9
9
|
const busy = useReactiveProp('busy', false)
|
|
10
10
|
const error = useReactiveProp('error', '')
|
|
11
11
|
const emit = defineEmits()
|
|
12
|
+
const description = derived(() => `Delete ${record()?.key || 'the selected license key'} permanently.`)
|
|
12
13
|
</script>
|
|
13
14
|
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
<Button :disabled="busy()" variant="secondary" @click="emit('close')">Cancel</Button>
|
|
25
|
-
<Button :loading="busy()" variant="danger" @click="emit('confirm')">Delete key</Button>
|
|
26
|
-
</footer>
|
|
27
|
-
</section>
|
|
28
|
-
</div>
|
|
15
|
+
<ConfirmDialog
|
|
16
|
+
:isOpen="open() && Boolean(record())"
|
|
17
|
+
title="Delete license key?"
|
|
18
|
+
:description="description()"
|
|
19
|
+
confirmLabel="Delete key"
|
|
20
|
+
:busy="busy()"
|
|
21
|
+
:error="error()"
|
|
22
|
+
@close="emit('close')"
|
|
23
|
+
@confirm="emit('confirm')"
|
|
24
|
+
/>
|