@stacksjs/defaults 0.75.612 → 0.75.613
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 +208 -0
- 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 +79 -0
- package/ai/skills/stacks-middleware/SKILL.md +4 -1
- package/ai/skills/stacks-native/CATALOG.md +12 -12
- package/ai/skills/stacks-validation/SKILL.md +7 -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/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/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
|
@@ -209,19 +209,18 @@ onMount(() => {
|
|
|
209
209
|
|
|
210
210
|
<section class="flex flex-col gap-3">
|
|
211
211
|
<div class="grid gap-3 grid-cols-1 sm:grid-cols-2 xl:grid-cols-5">
|
|
212
|
-
<
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
</label>
|
|
217
|
-
<label><span class="sr-only">Variant 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="active">Active</option><option value="inactive">Inactive</option><option value="draft">Draft</option></select></label>
|
|
218
|
-
<label><span class="sr-only">Variant type</span><select x-model="typeFilter" 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 types</option><option :for="type in variantTypes()" :key="type" :value="type">{{ type }}</option></select></label>
|
|
219
|
-
<label><span class="sr-only">Variant product</span><select x-model="productFilter" 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 products</option><option :for="product in products()" :key="product.id" :value="product.id">{{ product.name }}</option></select></label>
|
|
212
|
+
<div class="sm:col-span-2"><SearchFilter v-model:searchValue="search" placeholder="Search product variants" ariaLabel="Search product variants" /></div>
|
|
213
|
+
<Select v-model:value="statusFilter" ariaLabel="Variant status" placeholder="" :options="[{ value: 'all', label: 'All statuses' }, { value: 'active', label: 'Active' }, { value: 'inactive', label: 'Inactive' }, { value: 'draft', label: 'Draft' }]" />
|
|
214
|
+
<Select v-model:value="typeFilter" ariaLabel="Variant type" placeholder="" :options="[{ value: 'all', label: 'All types' }, ...variantTypes().map(type => ({ value: type, label: type }))]" />
|
|
215
|
+
<Select v-model:value="productFilter" ariaLabel="Variant product" placeholder="" :options="[{ value: 'all', label: 'All products' }, ...products().map(product => ({ value: product.id, label: product.name }))]" />
|
|
220
216
|
</div>
|
|
221
217
|
|
|
222
218
|
<div class="flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between">
|
|
223
219
|
<p class="text-gray-500 text-sm dark:text-neutral-400">{{ matchingLabel() }}</p>
|
|
224
|
-
<label class="flex gap-2 items-center text-gray-500 text-sm dark:text-neutral-400">
|
|
220
|
+
<label class="flex gap-2 items-center text-gray-500 text-sm dark:text-neutral-400">
|
|
221
|
+
Sort
|
|
222
|
+
<Select v-model:value="sort" ariaLabel="Sort" size="sm" placeholder="" :options="[{ value: 'variant', label: 'Name' }, { value: 'options', label: 'Most options' }, { value: 'product', label: 'Product' }, { value: 'newest', label: 'Newest' }]" />
|
|
223
|
+
</label>
|
|
225
224
|
</div>
|
|
226
225
|
|
|
227
226
|
<CommerceVariantsTable :sort-reset-key="sort()" :records="records()" :total="total()" :current-page="page()" :per-page="perPage()" :loading="loading()" @edit="openEdit" @delete="openDelete" @page-change="changePage" @page-size-change="changePageSize" @sort="changeSort" />
|
|
@@ -95,20 +95,22 @@ function submit(): void {
|
|
|
95
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>
|
|
96
96
|
|
|
97
97
|
<div class="space-y-4">
|
|
98
|
-
<
|
|
99
|
-
|
|
98
|
+
<div>
|
|
99
|
+
<Input v-model:value="name" label="Courier name" :required="true" :maxLength="255" autocomplete="name" placeholder="Alex Morgan" />
|
|
100
|
+
</div>
|
|
101
|
+
<div>
|
|
102
|
+
<Input v-model:value="phone" label="Phone" type="tel" :required="true" :maxLength="255" autocomplete="tel" placeholder="+1 555 0100" />
|
|
103
|
+
</div>
|
|
100
104
|
<div class="grid gap-4 grid-cols-1 sm:grid-cols-2">
|
|
101
|
-
<
|
|
102
|
-
<
|
|
105
|
+
<Input v-model:value="vehicleNumber" label="Vehicle number" :required="true" :maxLength="255" autocomplete="off" placeholder="VAN-204" :monospace="true" class="uppercase" />
|
|
106
|
+
<Input v-model:value="license" label="License number" :required="true" :maxLength="255" autocomplete="off" placeholder="D1234567" :monospace="true" class="uppercase" />
|
|
107
|
+
</div>
|
|
108
|
+
<div>
|
|
109
|
+
<Select v-model:value="status" label="Status" placeholder="" :options="[{ value: 'active', label: 'Available' }, { value: 'on_delivery', label: 'On delivery' }, { value: 'on_break', label: 'On break' }]" />
|
|
110
|
+
</div>
|
|
111
|
+
<div>
|
|
112
|
+
<Select v-model:value="userId" label="Linked user" placeholder="" :options="[{ value: '', label: 'No linked user' }, ...users().map(user => ({ value: user.id, label: `${user.name}${user.email ? ' - ' + user.email : ''}` }))]" />
|
|
103
113
|
</div>
|
|
104
|
-
<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">Available</option><option value="on_delivery">On delivery</option><option value="on_break">On break</option></select></label>
|
|
105
|
-
<label class="block">
|
|
106
|
-
<span class="font-medium text-gray-700 text-sm dark:text-neutral-200">Linked user</span>
|
|
107
|
-
<select x-model="userId" 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">
|
|
108
|
-
<option value="">No linked user</option>
|
|
109
|
-
<option :for="user in users()" :key="user.id" :value="user.id">{{ user.name }}{{ user.email ? ' - ' + user.email : '' }}</option>
|
|
110
|
-
</select>
|
|
111
|
-
</label>
|
|
112
114
|
</div>
|
|
113
115
|
</form>
|
|
114
116
|
<template #footer>
|
|
@@ -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
|
|