@stacksjs/defaults 0.75.612 → 0.75.614
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-actions/SKILL.md +209 -1
- package/ai/skills/stacks-api/SKILL.md +1 -1
- package/ai/skills/stacks-buddy/SKILL.md +1 -1
- package/ai/skills/stacks-dashboard/SKILL.md +120 -9
- package/ai/skills/stacks-database/SKILL.md +4 -2
- package/ai/skills/stacks-email/SKILL.md +15 -0
- package/ai/skills/stacks-middleware/SKILL.md +4 -1
- package/ai/skills/stacks-native/CAPABILITIES.md +1 -1
- package/ai/skills/stacks-native/CATALOG.md +12 -12
- package/ai/skills/stacks-validation/SKILL.md +7 -0
- package/app/Actions/Dashboard/Models/ModelDestroyAction.ts +4 -47
- package/app/Actions/Dashboard/Models/ModelSaveAction.ts +257 -0
- package/app/Actions/Dashboard/Models/ModelStoreAction.ts +4 -31
- package/app/Actions/Dashboard/Models/ModelUpdateAction.ts +5 -61
- package/app/Actions/Dashboard/Models/model-related.ts +2 -3
- package/app/Actions/Dashboard/Models/model-row-writes.ts +188 -0
- package/app/Actions/Storefront/AddToCartAction.ts +12 -15
- package/app/Actions/Storefront/CheckoutContactAction.ts +18 -10
- package/app/Actions/Storefront/CheckoutShippingAction.ts +20 -10
- package/app/Actions/Storefront/PlaceOrderAction.ts +9 -12
- package/app/Actions/Storefront/UpdateCartItemAction.ts +11 -9
- package/app/Middleware/Abilities.ts +4 -3
- package/app/Middleware/Csrf.ts +10 -1
- package/app/Middleware/Throttle.ts +4 -4
- package/functions/dashboard-api.ts +9 -3
- package/functions/dashboard-model-bulk.ts +3 -3
- package/functions/dashboard-model-drafts.test.ts +122 -0
- package/functions/dashboard-model-drafts.ts +228 -0
- package/functions/dashboard-model-record.ts +1 -1
- package/ide/vscode/package.json +1 -1
- package/package.json +5 -5
- package/resources/components/Dashboard/Analytics/AnalyticsPageHeader.stx +3 -13
- package/resources/components/Dashboard/App/RequestsOverview.stx +3 -20
- package/resources/components/Dashboard/App/SourceInventory.stx +1 -5
- package/resources/components/Dashboard/Auth/AccessTokenCreateDialog.stx +11 -28
- package/resources/components/Dashboard/Commerce/CommerceCategoriesDashboard.stx +4 -8
- package/resources/components/Dashboard/Commerce/CommerceCategoryDialog.stx +9 -9
- package/resources/components/Dashboard/Commerce/CommerceCouponDialog.stx +14 -14
- package/resources/components/Dashboard/Commerce/CommerceCouponsDashboard.stx +5 -9
- package/resources/components/Dashboard/Commerce/CommerceCustomerDialog.stx +7 -7
- package/resources/components/Dashboard/Commerce/CommerceCustomersDashboard.stx +3 -7
- package/resources/components/Dashboard/Commerce/CommerceGiftCardDialog.stx +15 -15
- package/resources/components/Dashboard/Commerce/CommerceGiftCardsDashboard.stx +5 -9
- package/resources/components/Dashboard/Commerce/CommerceManufacturerDialog.stx +12 -15
- package/resources/components/Dashboard/Commerce/CommerceManufacturersDashboard.stx +4 -28
- package/resources/components/Dashboard/Commerce/CommerceOrderDialog.stx +15 -15
- package/resources/components/Dashboard/Commerce/CommerceOrdersDashboard.stx +4 -8
- package/resources/components/Dashboard/Commerce/CommerceOverviewDashboard.stx +3 -11
- package/resources/components/Dashboard/Commerce/CommercePaymentsDashboard.stx +8 -9
- package/resources/components/Dashboard/Commerce/CommercePosCatalog.stx +3 -20
- package/resources/components/Dashboard/Commerce/CommercePosCheckoutDialog.stx +4 -4
- package/resources/components/Dashboard/Commerce/CommerceProductDialog.stx +14 -14
- package/resources/components/Dashboard/Commerce/CommerceProductsDashboard.stx +4 -8
- package/resources/components/Dashboard/Commerce/CommerceReviewEditDialog.stx +14 -24
- package/resources/components/Dashboard/Commerce/CommerceReviewsDashboard.stx +5 -43
- package/resources/components/Dashboard/Commerce/CommerceTaxDialog.stx +22 -38
- package/resources/components/Dashboard/Commerce/CommerceTaxesDashboard.stx +5 -33
- package/resources/components/Dashboard/Commerce/CommerceUnitDialog.stx +16 -30
- package/resources/components/Dashboard/Commerce/CommerceUnitsDashboard.stx +4 -28
- package/resources/components/Dashboard/Commerce/CommerceVariantDialog.stx +15 -9
- package/resources/components/Dashboard/Commerce/CommerceVariantsDashboard.stx +8 -9
- package/resources/components/Dashboard/Commerce/Delivery/CourierDialog.stx +14 -12
- package/resources/components/Dashboard/Commerce/Delivery/DeliveryRouteDialog.stx +9 -11
- package/resources/components/Dashboard/Commerce/Delivery/DigitalDeliveryDialog.stx +15 -9
- package/resources/components/Dashboard/Commerce/Delivery/LicenseKeyDialog.stx +11 -7
- package/resources/components/Dashboard/Commerce/Delivery/ShippingMethodDialog.stx +14 -8
- package/resources/components/Dashboard/Commerce/Delivery/ShippingRateDialog.stx +11 -17
- package/resources/components/Dashboard/Commerce/Delivery/ShippingZoneDialog.stx +18 -12
- package/resources/components/Dashboard/Commerce/PaymentRefundDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/PrintDeviceDialog.stx +5 -5
- package/resources/components/Dashboard/Commerce/PrintDevicesDashboard.stx +4 -8
- package/resources/components/Dashboard/Commerce/PrintLogsDashboard.stx +5 -9
- package/resources/components/Dashboard/Commerce/ProductWaitlistDashboard.stx +2 -10
- package/resources/components/Dashboard/Commerce/ProductWaitlistEntryDialog.stx +14 -67
- package/resources/components/Dashboard/Commerce/RestaurantWaitlistDashboard.stx +3 -18
- package/resources/components/Dashboard/Commerce/RestaurantWaitlistEntryDialog.stx +23 -69
- package/resources/components/Dashboard/Content/AuthorEditorDialog.stx +4 -16
- package/resources/components/Dashboard/Content/BlogDashboard.stx +2 -19
- package/resources/components/Dashboard/Content/BlogPostEditorDialog.stx +31 -51
- package/resources/components/Dashboard/Content/CommentsDashboard.stx +1 -1
- package/resources/components/Dashboard/Content/ContentDashboard.stx +1 -11
- package/resources/components/Dashboard/Content/CreateFolderDialog.stx +1 -4
- package/resources/components/Dashboard/Content/FileManagerDashboard.stx +2 -2
- package/resources/components/Dashboard/Content/PageEditorDialog.stx +8 -17
- package/resources/components/Dashboard/Content/PostEditorDialog.stx +35 -45
- package/resources/components/Dashboard/Content/PostsDashboard.stx +1 -13
- package/resources/components/Dashboard/Content/SeoDashboard.stx +2 -20
- package/resources/components/Dashboard/Content/SeoEditorDialog.stx +4 -38
- package/resources/components/Dashboard/Content/TaxonomyEditorDialog.stx +8 -15
- package/resources/components/Dashboard/Data/ActivityLog.stx +1 -5
- package/resources/components/Dashboard/Deployments/DeploymentList.stx +2 -11
- package/resources/components/Dashboard/Email/InboxMessageList.stx +1 -5
- package/resources/components/Dashboard/Infrastructure/DnsDashboard.stx +2 -16
- package/resources/components/Dashboard/Infrastructure/LogsDashboard.stx +6 -10
- package/resources/components/Dashboard/Infrastructure/MailboxesDashboard.stx +1 -5
- package/resources/components/Dashboard/Infrastructure/ServersDashboard.stx +1 -5
- package/resources/components/Dashboard/Jobs/JobHistory.stx +3 -12
- package/resources/components/Dashboard/Kanban/KanbanCardDialog.stx +57 -51
- package/resources/components/Dashboard/Library/ComponentsDashboard.stx +4 -14
- package/resources/components/Dashboard/Library/DependenciesDashboard.stx +2 -15
- package/resources/components/Dashboard/Library/PackagesDashboard.stx +1 -8
- package/resources/components/Dashboard/Library/SourceScaffoldDialog.stx +1 -12
- package/resources/components/Dashboard/Management/PermissionsDashboard.stx +3 -3
- package/resources/components/Dashboard/Marketing/AbandonedCartsDashboard.stx +4 -4
- package/resources/components/Dashboard/Marketing/CampaignDeliveryDialog.stx +3 -5
- package/resources/components/Dashboard/Marketing/CampaignDialog.stx +59 -93
- package/resources/components/Dashboard/Marketing/CampaignsDashboard.stx +5 -5
- package/resources/components/Dashboard/Marketing/MarketingListDialog.stx +12 -26
- package/resources/components/Dashboard/Marketing/MarketingListsDashboard.stx +4 -4
- package/resources/components/Dashboard/Marketing/RecoveryCampaignDialog.stx +12 -43
- package/resources/components/Dashboard/Marketing/SocialPostDialog.stx +7 -41
- package/resources/components/Dashboard/Marketing/SocialPostsDashboard.stx +5 -5
- package/resources/components/Dashboard/Models/ModelRecordEdit.stx +240 -28
- package/resources/components/Dashboard/Models/ModelRecordsDashboard.stx +7 -23
- package/resources/components/Dashboard/Models/ModelsOverview.stx +2 -12
- package/resources/components/Dashboard/Notifications/NotificationDeliveries.stx +4 -27
- package/resources/components/Dashboard/Notifications/NotificationDeliveryHistory.stx +4 -36
- package/resources/components/Dashboard/Operations/RecoveryDestinationDialog.stx +18 -47
- package/resources/components/Dashboard/Operations/RecoveryPolicyDialog.stx +24 -78
- package/resources/components/Dashboard/Operations/RecoveryRestoreDialog.stx +8 -19
- package/resources/components/Dashboard/Queries/QueryDashboard.stx +3 -21
- package/resources/components/Dashboard/Releases/ReleaseDashboard.stx +2 -9
- package/resources/components/Dashboard/Settings/SettingsDashboard.stx +1 -11
- package/resources/components/Dashboard/UI/Input.stx +50 -1
- package/resources/components/Dashboard/UI/SearchFilter.stx +27 -17
- package/resources/components/Dashboard/UI/Select.stx +4 -1
- package/resources/components/Dashboard/UI/Textarea.stx +16 -1
- package/resources/views/cart.stx +14 -0
- package/resources/views/checkout/contact.stx +15 -1
- package/resources/views/checkout/payment.stx +7 -0
- package/resources/views/checkout/shipping.stx +39 -5
- package/routes/dashboard-api.ts +2 -0
|
@@ -126,23 +126,21 @@ function submit(): void {
|
|
|
126
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>
|
|
127
127
|
|
|
128
128
|
<div class="space-y-4">
|
|
129
|
-
<
|
|
130
|
-
<
|
|
131
|
-
|
|
132
|
-
<option value="">Select a courier</option>
|
|
133
|
-
<option :for="courier in couriers()" :key="courier.id" :value="courier.id">{{ courier.name }} - {{ courier.vehicle_number }}</option>
|
|
134
|
-
</select>
|
|
135
|
-
</label>
|
|
129
|
+
<div>
|
|
130
|
+
<Select v-model:value="courierId" label="Courier" :required="true" placeholder="Select a courier" :options="[...couriers().map(courier => ({ value: courier.id, label: `${courier.name} - ${courier.vehicle_number}` }))]" />
|
|
131
|
+
</div>
|
|
136
132
|
<div :if="selectedCourier()" class="flex gap-3 items-center p-3 text-gray-600 text-sm dark:text-neutral-300 bg-gray-50 dark:bg-neutral-900/60 border border-gray-200 rounded-lg dark:border-neutral-700">
|
|
137
133
|
<span class="h-5 w-5 text-blue-600 i-hugeicons-delivery-truck-02"></span>
|
|
138
134
|
<span><strong class="text-gray-900 dark:text-white">{{ selectedCourier()?.vehicle_number }}</strong> will be stored as the route vehicle snapshot.</span>
|
|
139
135
|
</div>
|
|
140
136
|
<div class="grid gap-4 grid-cols-1 sm:grid-cols-3">
|
|
141
|
-
<
|
|
142
|
-
<
|
|
143
|
-
<
|
|
137
|
+
<Input v-model:value="stops" label="Stops" type="number" :required="true" min="0" step="1" inputmode="numeric" />
|
|
138
|
+
<Input v-model:value="deliveryTime" label="Time, minutes" type="number" :required="true" min="0" step="1" inputmode="numeric" />
|
|
139
|
+
<Input v-model:value="totalDistance" label="Distance, miles" type="number" :required="true" min="0" step="1" inputmode="numeric" />
|
|
140
|
+
</div>
|
|
141
|
+
<div>
|
|
142
|
+
<Input v-model:value="lastActive" label="Last active" type="datetime-local" :required="true" />
|
|
144
143
|
</div>
|
|
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>
|
|
146
144
|
</div>
|
|
147
145
|
</form>
|
|
148
146
|
<template #footer>
|
|
@@ -19,7 +19,7 @@ const busy = useReactiveProp('busy', false)
|
|
|
19
19
|
const error = useReactiveProp('error', '')
|
|
20
20
|
const emit = defineEmits(['invalid', 'submit', 'close'])
|
|
21
21
|
const name = state('')
|
|
22
|
-
const
|
|
22
|
+
const descriptionText = state('')
|
|
23
23
|
const downloadLimit = state('')
|
|
24
24
|
const expiryDays = state('30')
|
|
25
25
|
const requiresLogin = state(false)
|
|
@@ -38,7 +38,7 @@ effect(() => {
|
|
|
38
38
|
return
|
|
39
39
|
hydrationKey = nextKey
|
|
40
40
|
name.set(current?.name || '')
|
|
41
|
-
|
|
41
|
+
descriptionText.set(current?.description || '')
|
|
42
42
|
downloadLimit.set(current?.download_limit === null || current?.download_limit === undefined ? '' : String(current.download_limit))
|
|
43
43
|
expiryDays.set(String(current?.expiry_days ?? 30))
|
|
44
44
|
requiresLogin.set(Boolean(current?.requires_login))
|
|
@@ -54,7 +54,7 @@ function submit(): void {
|
|
|
54
54
|
emit('invalid', 'Method name is required.')
|
|
55
55
|
return
|
|
56
56
|
}
|
|
57
|
-
if (!
|
|
57
|
+
if (!descriptionText().trim()) {
|
|
58
58
|
emit('invalid', 'Description is required.')
|
|
59
59
|
return
|
|
60
60
|
}
|
|
@@ -69,7 +69,7 @@ function submit(): void {
|
|
|
69
69
|
|
|
70
70
|
emit('submit', {
|
|
71
71
|
name: name().trim(),
|
|
72
|
-
description:
|
|
72
|
+
description: descriptionText().trim(),
|
|
73
73
|
downloadLimit: parsedDownloadLimit,
|
|
74
74
|
expiryDays: parsedExpiryDays,
|
|
75
75
|
requiresLogin: requiresLogin(),
|
|
@@ -90,11 +90,15 @@ function submit(): void {
|
|
|
90
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>
|
|
91
91
|
|
|
92
92
|
<div class="space-y-4">
|
|
93
|
-
<
|
|
94
|
-
|
|
93
|
+
<div>
|
|
94
|
+
<Input v-model:value="name" label="Method name" :required="true" :maxLength="255" autocomplete="off" placeholder="Secure download" />
|
|
95
|
+
</div>
|
|
96
|
+
<div>
|
|
97
|
+
<Textarea v-model:value="descriptionText" label="Description" :required="true" :rows="3" placeholder="Explain how customers receive and access files." />
|
|
98
|
+
</div>
|
|
95
99
|
<div class="grid gap-4 grid-cols-1 sm:grid-cols-2">
|
|
96
|
-
<
|
|
97
|
-
<
|
|
100
|
+
<Input v-model:value="downloadLimit" label="Download limit" type="number" min="0" step="1" inputmode="numeric" placeholder="Unlimited" hint="Leave blank for unlimited downloads." />
|
|
101
|
+
<Input v-model:value="expiryDays" label="Expiry days" type="number" :required="true" min="0" step="1" inputmode="numeric" hint="Use 0 for access without expiry." />
|
|
98
102
|
</div>
|
|
99
103
|
<div class="grid gap-3 grid-cols-1 sm:grid-cols-2">
|
|
100
104
|
<div class="p-3 border border-gray-200 rounded-lg dark:border-neutral-700">
|
|
@@ -104,7 +108,9 @@ function submit(): void {
|
|
|
104
108
|
<Toggle v-model:checked="automaticDelivery" label="Automatic delivery" description="Fulfill automatically after payment." labelPosition="left" />
|
|
105
109
|
</div>
|
|
106
110
|
</div>
|
|
107
|
-
<
|
|
111
|
+
<div>
|
|
112
|
+
<Select v-model:value="status" label="Status" placeholder="" :options="[{ value: 'active', label: 'Active' }, { value: 'inactive', label: 'Inactive' }]" />
|
|
113
|
+
</div>
|
|
108
114
|
</div>
|
|
109
115
|
</form>
|
|
110
116
|
<template #footer>
|
|
@@ -193,20 +193,24 @@ function submit(): void {
|
|
|
193
193
|
<div>
|
|
194
194
|
<label for="license-key-value" class="font-medium text-gray-700 text-sm dark:text-neutral-200">License key</label>
|
|
195
195
|
<span class="flex gap-2 mt-1">
|
|
196
|
-
<
|
|
196
|
+
<div class="flex-1 min-w-0"><Input id="license-key-value" v-model:value="keyValue" ariaLabel="License key" :required="true" :maxLength="24" autocomplete="off" placeholder="XXXX-XXXX-XXXX-XXXX-XXXX" :monospace="true" class="uppercase" /></div>
|
|
197
197
|
<Button variant="secondary" @click="generateKey()">Generate</Button>
|
|
198
198
|
</span>
|
|
199
199
|
</div>
|
|
200
|
-
<
|
|
200
|
+
<div>
|
|
201
|
+
<Select v-model:value="templateValue" label="Template" placeholder="" :options="[{ value: 'Standard License', label: 'Standard License' }, { value: 'Premium License', label: 'Premium License' }, { value: 'Enterprise License', label: 'Enterprise License' }]" />
|
|
202
|
+
</div>
|
|
201
203
|
<div class="grid gap-4 grid-cols-1 sm:grid-cols-2">
|
|
202
|
-
<div><
|
|
203
|
-
<div><
|
|
204
|
+
<div><Input v-model:value="customerQuery" label="Customer" type="search" name="customer_search" ariaLabel="Search customers by name or email" placeholder="Search by name or email" @input="searchSoon('customers')" /><div class="mt-2"><Select v-model:value="customerId" ariaLabel="Customer" placeholder="" :options="[{ value: '', label: 'Unassigned' }, ...optionsFor('customers').map(option => ({ value: option.id, label: option.label + (option.detail ? ' - ' + option.detail : '') }))]" /></div><p :if="moreLabel('customers', 'customers')" class="mt-1 text-gray-500 text-xs dark:text-neutral-400" :text="moreLabel('customers', 'customers')"></p></div>
|
|
205
|
+
<div><Input v-model:value="productQuery" label="Product" type="search" name="product_search" ariaLabel="Search products by name or id" placeholder="Search by name or id" @input="searchSoon('products')" /><div class="mt-2"><Select v-model:value="productId" ariaLabel="Product" placeholder="" :options="[{ value: '', label: 'Unassigned' }, ...optionsFor('products').map(option => ({ value: option.id, label: option.label }))]" /></div><p :if="moreLabel('products', 'products')" class="mt-1 text-gray-500 text-xs dark:text-neutral-400" :text="moreLabel('products', 'products')"></p></div>
|
|
204
206
|
</div>
|
|
205
207
|
<div class="grid gap-4 grid-cols-1 sm:grid-cols-2">
|
|
206
|
-
<div><
|
|
207
|
-
<
|
|
208
|
+
<div><Input v-model:value="orderQuery" label="Order" type="search" name="order_search" ariaLabel="Search orders by number or status" placeholder="Search by number or status" @input="searchSoon('orders')" /><div class="mt-2"><Select v-model:value="orderId" ariaLabel="Order" placeholder="" :options="[{ value: '', label: 'Unassigned' }, ...optionsFor('orders').map(option => ({ value: option.id, label: option.label + (option.detail ? ' - ' + option.detail : '') }))]" /></div><p :if="moreLabel('orders', 'orders')" class="mt-1 text-gray-500 text-xs dark:text-neutral-400" :text="moreLabel('orders', 'orders')"></p></div>
|
|
209
|
+
<Input v-model:value="expiryDate" label="Expiry date" type="datetime-local" :required="true" />
|
|
210
|
+
</div>
|
|
211
|
+
<div>
|
|
212
|
+
<Select v-model:value="status" label="Status" placeholder="" :options="[{ value: 'unassigned', label: 'Unassigned' }, { value: 'active', label: 'Active' }, { value: 'inactive', label: 'Inactive' }]" />
|
|
208
213
|
</div>
|
|
209
|
-
<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="unassigned">Unassigned</option><option value="active">Active</option><option value="inactive">Inactive</option></select></label>
|
|
210
214
|
</div>
|
|
211
215
|
</form>
|
|
212
216
|
<template #footer>
|
|
@@ -16,7 +16,7 @@ const busy = useReactiveProp('busy', false)
|
|
|
16
16
|
const error = useReactiveProp('error', '')
|
|
17
17
|
const emit = defineEmits(['invalid', 'submit', 'close'])
|
|
18
18
|
const name = state('')
|
|
19
|
-
const
|
|
19
|
+
const descriptionText = state('')
|
|
20
20
|
const baseRate = state('')
|
|
21
21
|
const freeShipping = state('')
|
|
22
22
|
const status = state<'active' | 'inactive' | 'draft'>('active')
|
|
@@ -33,7 +33,7 @@ effect(() => {
|
|
|
33
33
|
return
|
|
34
34
|
hydrationKey = nextKey
|
|
35
35
|
name.set(current?.name || '')
|
|
36
|
-
|
|
36
|
+
descriptionText.set(current?.description || '')
|
|
37
37
|
baseRate.set(current ? minorToInput(current.base_rate, 'USD') : '')
|
|
38
38
|
freeShipping.set(current?.free_shipping === null || current?.free_shipping === undefined
|
|
39
39
|
? ''
|
|
@@ -59,7 +59,7 @@ function submit(): void {
|
|
|
59
59
|
}
|
|
60
60
|
emit('submit', {
|
|
61
61
|
name: name().trim(),
|
|
62
|
-
description:
|
|
62
|
+
description: descriptionText().trim(),
|
|
63
63
|
baseRate: parseMoneyInput(baseRate(), 'USD'),
|
|
64
64
|
freeShipping: parseMoneyInput(freeShipping(), 'USD', { required: false }),
|
|
65
65
|
status: status(),
|
|
@@ -78,13 +78,19 @@ function submit(): void {
|
|
|
78
78
|
<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>
|
|
79
79
|
|
|
80
80
|
<div class="space-y-4">
|
|
81
|
-
<
|
|
82
|
-
|
|
81
|
+
<div>
|
|
82
|
+
<Input v-model:value="name" label="Method name" :required="true" :maxLength="100" autocomplete="off" placeholder="Ground shipping" />
|
|
83
|
+
</div>
|
|
84
|
+
<div>
|
|
85
|
+
<Textarea v-model:value="descriptionText" label="Description" :rows="3" :maxLength="500" placeholder="How and when this method is used" />
|
|
86
|
+
</div>
|
|
83
87
|
<div class="grid gap-4 grid-cols-1 sm:grid-cols-2">
|
|
84
|
-
<
|
|
85
|
-
<
|
|
88
|
+
<Input v-model:value="baseRate" label="Base rate" type="number" :required="true" min="0" step="0.01" inputmode="decimal" placeholder="0.00" />
|
|
89
|
+
<Input v-model:value="freeShipping" label="Free shipping threshold" type="number" min="0" step="0.01" inputmode="decimal" placeholder="No threshold" />
|
|
90
|
+
</div>
|
|
91
|
+
<div>
|
|
92
|
+
<Select v-model:value="status" label="Status" placeholder="" :options="[{ value: 'active', label: 'Active' }, { value: 'inactive', label: 'Inactive' }, { value: 'draft', label: 'Draft' }]" />
|
|
86
93
|
</div>
|
|
87
|
-
<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>
|
|
88
94
|
</div>
|
|
89
95
|
</form>
|
|
90
96
|
<template #footer>
|
|
@@ -96,25 +96,19 @@ function submit(): void {
|
|
|
96
96
|
<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>
|
|
97
97
|
|
|
98
98
|
<div class="space-y-4">
|
|
99
|
-
<
|
|
100
|
-
<
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
</label>
|
|
106
|
-
<label class="block">
|
|
107
|
-
<span class="font-medium text-gray-700 text-sm dark:text-neutral-200">Shipping zone</span>
|
|
108
|
-
<select x-model="zoneId" 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">
|
|
109
|
-
<option value="">Select a shipping zone</option>
|
|
110
|
-
<option :for="zone in zones()" :key="zone.id" :value="zone.id">{{ zone.name }}</option>
|
|
111
|
-
</select>
|
|
112
|
-
</label>
|
|
99
|
+
<div>
|
|
100
|
+
<Select v-model:value="methodId" label="Shipping method" :required="true" placeholder="Select a shipping method" :options="[...methods().map(method => ({ value: method.id, label: method.name }))]" />
|
|
101
|
+
</div>
|
|
102
|
+
<div>
|
|
103
|
+
<Select v-model:value="zoneId" label="Shipping zone" :required="true" placeholder="Select a shipping zone" :options="[...zones().map(zone => ({ value: zone.id, label: zone.name }))]" />
|
|
104
|
+
</div>
|
|
113
105
|
<div class="grid gap-4 grid-cols-1 sm:grid-cols-2">
|
|
114
|
-
<
|
|
115
|
-
<
|
|
106
|
+
<Input v-model:value="weightFrom" label="Weight from (kg)" type="number" :required="true" min="0" step="0.01" inputmode="decimal" placeholder="0.00" />
|
|
107
|
+
<Input v-model:value="weightTo" label="Weight to (kg)" type="number" :required="true" min="0" step="0.01" inputmode="decimal" placeholder="10.00" />
|
|
108
|
+
</div>
|
|
109
|
+
<div>
|
|
110
|
+
<Input v-model:value="amount" label="Rate" type="number" :required="true" min="0" step="0.01" inputmode="decimal" placeholder="5.99" />
|
|
116
111
|
</div>
|
|
117
|
-
<label class="block"><span class="font-medium text-gray-700 text-sm dark:text-neutral-200">Rate</span><input x-model="amount" type="number" required min="0" step="0.01" inputmode="decimal" placeholder="5.99" class="mt-1 px-3 py-2 w-full tabular-nums 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>
|
|
118
112
|
</div>
|
|
119
113
|
</form>
|
|
120
114
|
<template #footer>
|
|
@@ -118,18 +118,24 @@ function submit(): void {
|
|
|
118
118
|
<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>
|
|
119
119
|
|
|
120
120
|
<div class="space-y-4">
|
|
121
|
-
<
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
<
|
|
131
|
-
|
|
132
|
-
|
|
121
|
+
<div>
|
|
122
|
+
<Input v-model:value="name" label="Zone name" :required="true" :maxLength="100" autocomplete="off" placeholder="North America" />
|
|
123
|
+
</div>
|
|
124
|
+
<div>
|
|
125
|
+
<Select v-model:value="methodId" label="Shipping method" :required="true" placeholder="Select a shipping method" :options="[...methods().map(method => ({ value: method.id, label: method.name }))]" />
|
|
126
|
+
</div>
|
|
127
|
+
<div>
|
|
128
|
+
<Textarea v-model:value="countries" label="Countries" :rows="2" :maxLength="1000" placeholder="US, CA, MX" />
|
|
129
|
+
</div>
|
|
130
|
+
<div>
|
|
131
|
+
<Textarea v-model:value="regions" label="Regions" :rows="2" :maxLength="500" placeholder="CA, OR, WA" />
|
|
132
|
+
</div>
|
|
133
|
+
<div>
|
|
134
|
+
<Textarea v-model:value="postalCodes" label="Postal codes" :rows="2" :maxLength="1000" placeholder="90001, 90002" />
|
|
135
|
+
</div>
|
|
136
|
+
<div>
|
|
137
|
+
<Select v-model:value="status" label="Status" placeholder="" :options="[{ value: 'active', label: 'Active' }, { value: 'inactive', label: 'Inactive' }, { value: 'draft', label: 'Draft' }]" />
|
|
138
|
+
</div>
|
|
133
139
|
</div>
|
|
134
140
|
</form>
|
|
135
141
|
<template #footer>
|
|
@@ -61,7 +61,7 @@ function submit(): void {
|
|
|
61
61
|
@close="emit('close')"
|
|
62
62
|
>
|
|
63
63
|
<form id="payment-refund-form" @submit.prevent="submit">
|
|
64
|
-
<
|
|
64
|
+
<Input v-model:value="amount" label="Refund amount" type="number" :min="minorToInput(1, paymentCurrency())" :max="minorToInput(remaining(), paymentCurrency())" :step="moneyInputStep(paymentCurrency())" :required="true" />
|
|
65
65
|
<p class="mt-2 text-amber-700 text-xs dark:text-amber-300">This records an already confirmed processor refund. It does not initiate money movement.</p>
|
|
66
66
|
</form>
|
|
67
67
|
<template #footer>
|
|
@@ -68,11 +68,11 @@ function errorMessages(): string[] {
|
|
|
68
68
|
<li :for="message in errorMessages()" :key="message">{{ message }}</li>
|
|
69
69
|
</ul>
|
|
70
70
|
<div class="grid gap-4 grid-cols-1 sm:grid-cols-2">
|
|
71
|
-
<
|
|
72
|
-
<
|
|
73
|
-
<
|
|
74
|
-
<
|
|
75
|
-
<
|
|
71
|
+
<div class="sm:col-span-2"><Input v-model:value="name" label="Name" :maxLength="100" :required="true" /></div>
|
|
72
|
+
<div class="sm:col-span-2"><Input v-model:value="macAddress" label="MAC address" :maxLength="50" :required="true" :spellcheck="false" :monospace="true" /></div>
|
|
73
|
+
<Input v-model:value="location" label="Location" :maxLength="100" :required="true" />
|
|
74
|
+
<Input v-model:value="terminal" label="Terminal" :maxLength="50" :required="true" :spellcheck="false" :monospace="true" />
|
|
75
|
+
<div class="sm:col-span-2"><Select v-model:value="status" label="Operational status" placeholder="" :options="[{ value: 'online', label: 'Online' }, { value: 'warning', label: 'Warning' }, { value: 'offline', label: 'Offline' }]" /></div>
|
|
76
76
|
</div>
|
|
77
77
|
</form>
|
|
78
78
|
<template #footer>
|
|
@@ -244,14 +244,10 @@ onMount(() => {
|
|
|
244
244
|
|
|
245
245
|
<section class="flex flex-col gap-3">
|
|
246
246
|
<div class="grid gap-3 grid-cols-1 sm:grid-cols-2 xl:grid-cols-5">
|
|
247
|
-
<
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
</label>
|
|
252
|
-
<label><span class="sr-only">Printer status</span><select x-model="statusFilter" class="px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-800 border border-gray-300 rounded-md dark:border-neutral-700"><option value="all">All statuses</option><option value="online">Online</option><option value="warning">Warning</option><option value="offline">Offline</option></select></label>
|
|
253
|
-
<label><span class="sr-only">Printer location</span><select x-model="locationFilter" class="px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-800 border border-gray-300 rounded-md dark:border-neutral-700"><option value="all">All locations</option><option :for="location in locations()" :key="location" :value="location">{{ location }}</option></select></label>
|
|
254
|
-
<label><span class="sr-only">Sort print devices</span><select x-model="sort" class="px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-800 border border-gray-300 rounded-md dark:border-neutral-700"><option value="name">Name</option><option value="prints">Most prints</option><option value="heartbeat">Recent heartbeat</option><option value="status">Status</option></select></label>
|
|
247
|
+
<div class="sm:col-span-2"><SearchFilter v-model:searchValue="search" placeholder="Search printers, locations, or terminals" ariaLabel="Search print devices" /></div>
|
|
248
|
+
<Select v-model:value="statusFilter" ariaLabel="Printer status" placeholder="" :options="[{ value: 'all', label: 'All statuses' }, { value: 'online', label: 'Online' }, { value: 'warning', label: 'Warning' }, { value: 'offline', label: 'Offline' }]" />
|
|
249
|
+
<Select v-model:value="locationFilter" ariaLabel="Printer location" placeholder="" :options="[{ value: 'all', label: 'All locations' }, ...locations().map(location => ({ value: location, label: location }))]" />
|
|
250
|
+
<Select v-model:value="sort" ariaLabel="Sort print devices" placeholder="" :options="[{ value: 'name', label: 'Name' }, { value: 'prints', label: 'Most prints' }, { value: 'heartbeat', label: 'Recent heartbeat' }, { value: 'status', label: 'Status' }]" />
|
|
255
251
|
</div>
|
|
256
252
|
|
|
257
253
|
<div class="flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between">
|
|
@@ -205,15 +205,11 @@ onMount(() => {
|
|
|
205
205
|
|
|
206
206
|
<section class="flex flex-col gap-3">
|
|
207
207
|
<div class="grid gap-3 grid-cols-1 sm:grid-cols-2 xl:grid-cols-6">
|
|
208
|
-
<
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
<label><span class="sr-only">Printer</span><select x-model="printerFilter" class="px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-800 border border-gray-300 rounded-md dark:border-neutral-700" @change="reloadFilters()"><option value="all">All printers</option><option :for="printer in printers()" :key="printer" :value="printer">{{ printer }}</option></select></label>
|
|
214
|
-
<label><span class="sr-only">Print status</span><select x-model="statusFilter" class="px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-800 border border-gray-300 rounded-md dark:border-neutral-700" @change="reloadFilters()"><option value="all">All statuses</option><option :for="status in statuses()" :key="status" :value="status">{{ status }}</option></select></label>
|
|
215
|
-
<label><span class="sr-only">Print log time range</span><select x-model="timeRange" class="px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-800 border border-gray-300 rounded-md dark:border-neutral-700" @change="reloadFilters()"><option value="1">Last 24 hours</option><option value="7">Last 7 days</option><option value="30">Last 30 days</option><option value="90">Last 90 days</option><option value="all">All time</option></select></label>
|
|
216
|
-
<label><span class="sr-only">Sort print logs</span><select x-model="sort" class="px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-800 border border-gray-300 rounded-md dark:border-neutral-700" @change="reloadFilters()"><option value="newest">Newest</option><option value="oldest">Oldest</option><option value="printer">Printer</option><option value="duration">Longest duration</option></select></label>
|
|
208
|
+
<div class="sm:col-span-2"><SearchFilter v-model:searchValue="search" placeholder="Search documents, printers, or outcomes" ariaLabel="Search print logs" @search="loadSearch" /></div>
|
|
209
|
+
<Select v-model:value="printerFilter" ariaLabel="Printer" placeholder="" :options="[{ value: 'all', label: 'All printers' }, ...printers().map(printer => ({ value: printer, label: printer }))]" @change="reloadFilters" />
|
|
210
|
+
<Select v-model:value="statusFilter" ariaLabel="Print status" placeholder="" :options="[{ value: 'all', label: 'All statuses' }, ...statuses().map(status => ({ value: status, label: status }))]" @change="reloadFilters" />
|
|
211
|
+
<Select v-model:value="timeRange" ariaLabel="Print log time range" placeholder="" :options="[{ value: '1', label: 'Last 24 hours' }, { value: '7', label: 'Last 7 days' }, { value: '30', label: 'Last 30 days' }, { value: '90', label: 'Last 90 days' }, { value: 'all', label: 'All time' }]" @change="reloadFilters" />
|
|
212
|
+
<Select v-model:value="sort" ariaLabel="Sort print logs" placeholder="" :options="[{ value: 'newest', label: 'Newest' }, { value: 'oldest', label: 'Oldest' }, { value: 'printer', label: 'Printer' }, { value: 'duration', label: 'Longest duration' }]" @change="reloadFilters" />
|
|
217
213
|
</div>
|
|
218
214
|
|
|
219
215
|
<div class="flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between">
|
|
@@ -209,16 +209,8 @@ onMount(() => {
|
|
|
209
209
|
<p class="mt-1 text-gray-500 text-sm dark:text-neutral-400">{{ matchingLabel() }}</p>
|
|
210
210
|
</div>
|
|
211
211
|
<div class="flex gap-2">
|
|
212
|
-
<
|
|
213
|
-
<
|
|
214
|
-
<option value="all">All statuses</option>
|
|
215
|
-
<option value="waiting">Waiting</option>
|
|
216
|
-
<option value="notified">Notified</option>
|
|
217
|
-
<option value="purchased">Purchased</option>
|
|
218
|
-
<option value="cancelled">Cancelled</option>
|
|
219
|
-
</select>
|
|
220
|
-
<label class="sr-only" for="waitlist-search">Search waitlist</label>
|
|
221
|
-
<input id="waitlist-search" x-model="search" type="search" placeholder="Search waitlist" class="px-3 py-2 w-56 text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-800 border border-gray-300 rounded-md dark:border-neutral-700" />
|
|
212
|
+
<Select v-model:value="status" id="waitlist-status" ariaLabel="Status" placeholder="" :options="[{ value: 'all', label: 'All statuses' }, { value: 'waiting', label: 'Waiting' }, { value: 'notified', label: 'Notified' }, { value: 'purchased', label: 'Purchased' }, { value: 'cancelled', label: 'Cancelled' }]" />
|
|
213
|
+
<SearchFilter v-model:searchValue="search" placeholder="Search waitlist" ariaLabel="Search waitlist" class="w-56" />
|
|
222
214
|
</div>
|
|
223
215
|
</div>
|
|
224
216
|
|
|
@@ -142,8 +142,8 @@ effect(() => {
|
|
|
142
142
|
void loadChoices('customers', '')
|
|
143
143
|
})
|
|
144
144
|
|
|
145
|
-
|
|
146
|
-
|
|
145
|
+
/** The customer just chosen, by the id the select reports. */
|
|
146
|
+
function hydrateCustomer(selectedId: string): void {
|
|
147
147
|
const customer = customers().find(option => option.id === selectedId)
|
|
148
148
|
if (!customer)
|
|
149
149
|
return
|
|
@@ -193,86 +193,33 @@ function errorMessages(): string[] {
|
|
|
193
193
|
</ul>
|
|
194
194
|
|
|
195
195
|
<div class="grid gap-4 sm:grid-cols-2 mt-6">
|
|
196
|
-
<
|
|
197
|
-
<span class="block font-medium text-gray-900 text-sm dark:text-neutral-200">Product</span>
|
|
198
|
-
<input x-model="productQuery" @input="searchSoon('products')" type="search" name="product_search" aria-label="Search products by name or id" placeholder="Search products by name or id" class="block mt-2 px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-700 border border-gray-300 rounded-md dark:border-neutral-600" />
|
|
199
|
-
</label>
|
|
196
|
+
<div class="sm:col-span-2"><Input v-model:value="productQuery" label="Product" type="search" name="product_search" ariaLabel="Search products by name or id" placeholder="Search products by name or id" @input="searchSoon('products')" /></div>
|
|
200
197
|
<div class="sm:col-span-2 -mt-2">
|
|
201
|
-
<
|
|
202
|
-
<option value="">Select a product</option>
|
|
203
|
-
<option :for="option in products()" :key="option.id" :value="option.id" :selected="option.id === String(productId())">{{ option.label }}{{ option.detail ? ' · ' + option.detail : '' }}</option>
|
|
204
|
-
</select>
|
|
198
|
+
<Select v-model:value="productId" ariaLabel="Product" :required="true" placeholder="Select a product" :options="[...products().map(option => ({ value: option.id, label: option.label + (option.detail ? ' · ' + option.detail : '') }))]" />
|
|
205
199
|
<p :if="moreLabel(productChoices().length, productMatches(), 'products')" class="mt-1 text-gray-500 text-xs dark:text-neutral-400" :text="moreLabel(productChoices().length, productMatches(), 'products')"></p>
|
|
206
200
|
</div>
|
|
207
201
|
|
|
208
|
-
<
|
|
209
|
-
<span class="block font-medium text-gray-900 text-sm dark:text-neutral-200">Existing customer</span>
|
|
210
|
-
<input x-model="customerQuery" @input="searchSoon('customers')" type="search" name="customer_search" aria-label="Search customers by name, email or phone" placeholder="Search customers by name, email or phone" class="block mt-2 px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-700 border border-gray-300 rounded-md dark:border-neutral-600" />
|
|
211
|
-
</label>
|
|
202
|
+
<div class="sm:col-span-2"><Input v-model:value="customerQuery" label="Existing customer" type="search" name="customer_search" ariaLabel="Search customers by name, email or phone" placeholder="Search customers by name, email or phone" @input="searchSoon('customers')" /></div>
|
|
212
203
|
<div class="sm:col-span-2 -mt-2">
|
|
213
|
-
<
|
|
214
|
-
<option value="">No linked customer</option>
|
|
215
|
-
<option :for="option in customers()" :key="option.id" :value="option.id" :selected="option.id === String(customerId())">{{ option.label }}{{ option.detail ? ' · ' + option.detail : '' }}</option>
|
|
216
|
-
</select>
|
|
204
|
+
<Select v-model:value="customerId" ariaLabel="Existing customer" placeholder="" :options="[{ value: '', label: 'No linked customer' }, ...customers().map(option => ({ value: option.id, label: option.label + (option.detail ? ' · ' + option.detail : '') }))]" @change="hydrateCustomer($event)" />
|
|
217
205
|
<p :if="moreLabel(customerChoices().length, customerMatches(), 'customers')" class="mt-1 text-gray-500 text-xs dark:text-neutral-400" :text="moreLabel(customerChoices().length, customerMatches(), 'customers')"></p>
|
|
218
206
|
</div>
|
|
219
207
|
|
|
220
|
-
<label
|
|
221
|
-
<span class="block font-medium text-gray-900 text-sm dark:text-neutral-200">Name</span>
|
|
222
|
-
<input type="text" x-model.trim="name" required maxlength="255" autocomplete="name" class="block mt-2 px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-700 border border-gray-300 rounded-md dark:border-neutral-600" />
|
|
223
|
-
</label>
|
|
208
|
+
<Input v-model:value="name" label="Name" :required="true" :maxLength="255" autocomplete="name" />
|
|
224
209
|
|
|
225
|
-
<label
|
|
226
|
-
<span class="block font-medium text-gray-900 text-sm dark:text-neutral-200">Email</span>
|
|
227
|
-
<input type="email" x-model.trim="email" required maxlength="255" autocomplete="email" class="block mt-2 px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-700 border border-gray-300 rounded-md dark:border-neutral-600" />
|
|
228
|
-
</label>
|
|
210
|
+
<Input type="email" label="Email" v-model:value="email" :required="true" :maxLength="255" autocomplete="email" />
|
|
229
211
|
|
|
230
|
-
<label
|
|
231
|
-
<span class="block font-medium text-gray-900 text-sm dark:text-neutral-200">Phone</span>
|
|
232
|
-
<input type="tel" x-model.trim="phone" maxlength="100" autocomplete="tel" class="block mt-2 px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-700 border border-gray-300 rounded-md dark:border-neutral-600" />
|
|
233
|
-
</label>
|
|
212
|
+
<Input type="tel" label="Phone" v-model:value="phone" :maxLength="100" autocomplete="tel" />
|
|
234
213
|
|
|
235
|
-
<label
|
|
236
|
-
<span class="block font-medium text-gray-900 text-sm dark:text-neutral-200">Quantity</span>
|
|
237
|
-
<input type="number" x-model.number="quantity" required min="1" step="1" class="block mt-2 px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-700 border border-gray-300 rounded-md dark:border-neutral-600" />
|
|
238
|
-
</label>
|
|
214
|
+
<Input type="number" label="Quantity" v-model:value="quantity" :required="true" min="1" step="1" />
|
|
239
215
|
|
|
240
|
-
<label
|
|
241
|
-
<span class="block font-medium text-gray-900 text-sm dark:text-neutral-200">Notification preference</span>
|
|
242
|
-
<select x-model="notificationPreference" required class="block mt-2 px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-700 border border-gray-300 rounded-md dark:border-neutral-600">
|
|
243
|
-
<option value="email">Email</option>
|
|
244
|
-
<option value="sms">SMS</option>
|
|
245
|
-
<option value="both">Email and SMS</option>
|
|
246
|
-
</select>
|
|
247
|
-
</label>
|
|
216
|
+
<Select v-model:value="notificationPreference" label="Notification preference" :required="true" placeholder="" :options="[{ value: 'email', label: 'Email' }, { value: 'sms', label: 'SMS' }, { value: 'both', label: 'Email and SMS' }]" />
|
|
248
217
|
|
|
249
|
-
<label
|
|
250
|
-
<span class="block font-medium text-gray-900 text-sm dark:text-neutral-200">Source</span>
|
|
251
|
-
<select x-model="source" required class="block mt-2 px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-700 border border-gray-300 rounded-md dark:border-neutral-600">
|
|
252
|
-
<option value="website">Website</option>
|
|
253
|
-
<option value="social_media">Social media</option>
|
|
254
|
-
<option value="in-store">In store</option>
|
|
255
|
-
<option value="email">Email</option>
|
|
256
|
-
<option value="app">App</option>
|
|
257
|
-
<option value="referral">Referral</option>
|
|
258
|
-
<option value="other">Other</option>
|
|
259
|
-
</select>
|
|
260
|
-
</label>
|
|
218
|
+
<Select v-model:value="source" label="Source" :required="true" placeholder="" :options="[{ value: 'website', label: 'Website' }, { value: 'social_media', label: 'Social media' }, { value: 'in-store', label: 'In store' }, { value: 'email', label: 'Email' }, { value: 'app', label: 'App' }, { value: 'referral', label: 'Referral' }, { value: 'other', label: 'Other' }]" />
|
|
261
219
|
|
|
262
|
-
<label
|
|
263
|
-
<span class="block font-medium text-gray-900 text-sm dark:text-neutral-200">Status</span>
|
|
264
|
-
<select x-model="status" required class="block mt-2 px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-700 border border-gray-300 rounded-md dark:border-neutral-600">
|
|
265
|
-
<option value="waiting">Waiting</option>
|
|
266
|
-
<option value="notified">Notified</option>
|
|
267
|
-
<option value="purchased">Purchased</option>
|
|
268
|
-
<option value="cancelled">Cancelled</option>
|
|
269
|
-
</select>
|
|
270
|
-
</label>
|
|
220
|
+
<Select v-model:value="status" label="Status" :required="true" placeholder="" :options="[{ value: 'waiting', label: 'Waiting' }, { value: 'notified', label: 'Notified' }, { value: 'purchased', label: 'Purchased' }, { value: 'cancelled', label: 'Cancelled' }]" />
|
|
271
221
|
|
|
272
|
-
<
|
|
273
|
-
<span class="block font-medium text-gray-900 text-sm dark:text-neutral-200">Notes</span>
|
|
274
|
-
<textarea x-model.trim="notes" maxlength="500" rows="3" class="block mt-2 px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-700 border border-gray-300 rounded-md dark:border-neutral-600"></textarea>
|
|
275
|
-
</label>
|
|
222
|
+
<div class="sm:col-span-2"><Textarea v-model:value="notes" label="Notes" :maxLength="500" :rows="3" /></div>
|
|
276
223
|
</div>
|
|
277
224
|
|
|
278
225
|
</form>
|
|
@@ -247,24 +247,9 @@ onMount(() => {
|
|
|
247
247
|
<p class="mt-1 text-gray-500 text-sm dark:text-neutral-400">{{ matchingLabel() }}</p>
|
|
248
248
|
</div>
|
|
249
249
|
<div class="flex flex-wrap gap-2">
|
|
250
|
-
<
|
|
251
|
-
<
|
|
252
|
-
|
|
253
|
-
<option value="waiting">Waiting</option>
|
|
254
|
-
<option value="seated">Seated</option>
|
|
255
|
-
<option value="cancelled">Cancelled</option>
|
|
256
|
-
<option value="no_show">No show</option>
|
|
257
|
-
</select>
|
|
258
|
-
<label class="sr-only" for="restaurant-waitlist-preference">Table preference</label>
|
|
259
|
-
<select id="restaurant-waitlist-preference" x-model="preference" class="px-3 py-2 text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-800 border border-gray-300 rounded-md dark:border-neutral-700">
|
|
260
|
-
<option value="all">All tables</option>
|
|
261
|
-
<option value="no_preference">No preference</option>
|
|
262
|
-
<option value="indoor">Indoor</option>
|
|
263
|
-
<option value="bar">Bar</option>
|
|
264
|
-
<option value="booth">Booth</option>
|
|
265
|
-
</select>
|
|
266
|
-
<label class="sr-only" for="restaurant-waitlist-search">Search waitlist</label>
|
|
267
|
-
<input id="restaurant-waitlist-search" x-model="search" type="search" placeholder="Search waitlist" class="px-3 py-2 w-56 text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-800 border border-gray-300 rounded-md dark:border-neutral-700" />
|
|
250
|
+
<Select v-model:value="status" id="restaurant-waitlist-status" ariaLabel="Status" placeholder="" :options="[{ value: 'all', label: 'All statuses' }, { value: 'waiting', label: 'Waiting' }, { value: 'seated', label: 'Seated' }, { value: 'cancelled', label: 'Cancelled' }, { value: 'no_show', label: 'No show' }]" />
|
|
251
|
+
<Select v-model:value="preference" id="restaurant-waitlist-preference" ariaLabel="Table preference" placeholder="" :options="[{ value: 'all', label: 'All tables' }, { value: 'no_preference', label: 'No preference' }, { value: 'indoor', label: 'Indoor' }, { value: 'bar', label: 'Bar' }, { value: 'booth', label: 'Booth' }]" />
|
|
252
|
+
<SearchFilter v-model:searchValue="search" placeholder="Search waitlist" ariaLabel="Search waitlist" class="w-56" />
|
|
268
253
|
</div>
|
|
269
254
|
</div>
|
|
270
255
|
|