@fleetbase/storefront-engine 0.2.7 → 0.2.9
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/addon/components/file-record.hbs +9 -2
- package/addon/components/file-record.js +3 -2
- package/addon/components/modals/add-store-hours.hbs +12 -2
- package/addon/components/modals/assign-driver.hbs +18 -5
- package/addon/components/modals/create-first-store.hbs +18 -6
- package/addon/components/modals/create-gateway.hbs +19 -7
- package/addon/components/modals/create-network-category.hbs +23 -5
- package/addon/components/modals/create-network.hbs +15 -7
- package/addon/components/modals/create-new-variant.hbs +20 -4
- package/addon/components/modals/create-notification-channel.hbs +22 -17
- package/addon/components/modals/create-product-category.hbs +22 -7
- package/addon/components/modals/create-store.hbs +11 -3
- package/addon/components/modals/import-products.hbs +34 -15
- package/addon/components/modals/incoming-order.hbs +29 -19
- package/addon/components/modals/manage-addons.hbs +50 -9
- package/addon/components/modals/manage-addons.js +3 -2
- package/addon/components/modals/order-ready-assign-driver.hbs +24 -13
- package/addon/components/modals/select-addon-category.hbs +8 -1
- package/addon/components/modals/share-network.hbs +23 -8
- package/addon/components/modals/store-details.hbs +4 -4
- package/addon/components/modals/store-form.hbs +24 -5
- package/addon/components/modals/store-location-form.hbs +26 -16
- package/addon/components/network-category-picker.hbs +17 -6
- package/addon/components/schedule-manager.hbs +8 -1
- package/addon/components/schedule-manager.js +6 -5
- package/addon/components/store-selector.hbs +14 -3
- package/addon/components/widget/customers.hbs +16 -7
- package/addon/components/widget/customers.js +2 -1
- package/addon/components/widget/orders.hbs +58 -23
- package/addon/components/widget/orders.js +17 -16
- package/addon/components/widget/storefront-metrics.hbs +5 -5
- package/addon/controllers/customers/index.js +21 -13
- package/addon/controllers/networks/index/network/index.js +16 -9
- package/addon/controllers/networks/index/network/stores.js +39 -31
- package/addon/controllers/networks/index/network.js +3 -2
- package/addon/controllers/networks/index.js +10 -3
- package/addon/controllers/orders/index.js +30 -23
- package/addon/controllers/products/index/category/edit.js +5 -3
- package/addon/controllers/products/index/category/new.js +17 -11
- package/addon/controllers/products/index/category.js +8 -7
- package/addon/controllers/products/index/index.js +9 -2
- package/addon/controllers/products/index.js +9 -8
- package/addon/controllers/settings/gateways.js +7 -6
- package/addon/controllers/settings/index.js +1 -0
- package/addon/controllers/settings/locations.js +18 -11
- package/addon/controllers/settings/notifications.js +8 -7
- package/addon/services/storefront.js +13 -7
- package/addon/templates/application.hbs +8 -8
- package/addon/templates/customers/index/edit.hbs +0 -1
- package/addon/templates/customers/index.hbs +23 -4
- package/addon/templates/home.hbs +1 -1
- package/addon/templates/networks/index/network/customers.hbs +0 -1
- package/addon/templates/networks/index/network/index.hbs +200 -62
- package/addon/templates/networks/index/network/orders.hbs +0 -1
- package/addon/templates/networks/index/network/stores.hbs +18 -3
- package/addon/templates/networks/index/network.hbs +5 -5
- package/addon/templates/networks/index.hbs +12 -7
- package/addon/templates/orders/index/edit.hbs +0 -1
- package/addon/templates/orders/index/new.hbs +0 -1
- package/addon/templates/orders/index/view.hbs +0 -1
- package/addon/templates/orders/index.hbs +25 -6
- package/addon/templates/products/index/category/new.hbs +74 -22
- package/addon/templates/products/index.hbs +27 -6
- package/addon/templates/settings/api.hbs +3 -3
- package/addon/templates/settings/gateways.hbs +10 -10
- package/addon/templates/settings/index.hbs +146 -51
- package/addon/templates/settings/locations.hbs +13 -6
- package/addon/templates/settings/notifications.hbs +5 -7
- package/addon/templates/settings.hbs +6 -6
- package/composer.json +3 -3
- package/extension.json +1 -1
- package/package.json +5 -3
- package/translations/en-us.yaml +574 -1
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
<Overlay @position="right" @noBackdrop={{true}} @isResizable={{true}} @width="570px" @fullHeight={{true}} @containerClass="border-l border-transparent dark:border-gray-700">
|
|
2
|
-
<Overlay::Header
|
|
3
|
-
|
|
2
|
+
<Overlay::Header
|
|
3
|
+
@title={{this.overlayTitle}}
|
|
4
|
+
@titleClass="truncate"
|
|
5
|
+
@titleWrapperClass="w-3/4"
|
|
6
|
+
@headerLeftClass="w-70pc"
|
|
7
|
+
@headerLeftInnerClass="w-full flex-1"
|
|
8
|
+
@onPressCancel={{this.transitionBack}}
|
|
9
|
+
>
|
|
10
|
+
<Button
|
|
11
|
+
@icon={{this.overlayActionButtonIcon}}
|
|
12
|
+
@type="primary"
|
|
13
|
+
@text={{this.overlayActionButtonTitle}}
|
|
14
|
+
@onClick={{this.saveProduct}}
|
|
15
|
+
@isLoading={{this.isSaving}}
|
|
16
|
+
@isSubscriptionRequired={{true}}
|
|
17
|
+
/>
|
|
4
18
|
</Overlay::Header>
|
|
5
19
|
|
|
6
20
|
<Overlay::Body @increaseInnerBodyHeightBy="0" @wrapperClass="new-order-overlay-body px-4 space-y-4 pt-4">
|
|
@@ -9,28 +23,56 @@
|
|
|
9
23
|
<Textarea @value={{this.product.description}} class="form-input w-full" placeholder="Enter a description of your product...." rows={{4}} />
|
|
10
24
|
</InputGroup>
|
|
11
25
|
<InputGroup @name="Product Tags">
|
|
12
|
-
<TagInput
|
|
26
|
+
<TagInput
|
|
27
|
+
class="form-input"
|
|
28
|
+
@placeholder="Add tags"
|
|
29
|
+
@allowSpacesInTags={{true}}
|
|
30
|
+
@tags={{this.product.tags}}
|
|
31
|
+
@addTag={{this.addTag}}
|
|
32
|
+
@removeTagAtIndex={{this.removeTag}}
|
|
33
|
+
as |tag|
|
|
34
|
+
>
|
|
13
35
|
{{tag}}
|
|
14
36
|
</TagInput>
|
|
15
37
|
</InputGroup>
|
|
16
38
|
<InputGroup @name="Product SKU" @value={{this.product.sku}} @helpText="Enter product SKU if applicable" />
|
|
17
39
|
<div class="grid grid-cols-2 gap-2">
|
|
18
40
|
<InputGroup @name="Price" @helpText="Enter a price users will pay to purchase this product">
|
|
19
|
-
<MoneyInput
|
|
41
|
+
<MoneyInput
|
|
42
|
+
class="w-full"
|
|
43
|
+
@currency={{this.product.currency}}
|
|
44
|
+
@value={{this.product.price}}
|
|
45
|
+
@canSelectCurrency={{true}}
|
|
46
|
+
@onCurrencyChange={{fn (mut this.product.currency)}}
|
|
47
|
+
/>
|
|
20
48
|
</InputGroup>
|
|
21
49
|
<InputGroup @name="Sale Price" @helpText="Optionally add a sale price for the product if the product is put on sale">
|
|
22
|
-
<MoneyInput
|
|
50
|
+
<MoneyInput
|
|
51
|
+
class="w-full"
|
|
52
|
+
@currency={{this.product.currency}}
|
|
53
|
+
@value={{this.product.sale_price}}
|
|
54
|
+
@canSelectCurrency={{true}}
|
|
55
|
+
@onCurrencyChange={{fn (mut this.product.currency)}}
|
|
56
|
+
/>
|
|
23
57
|
</InputGroup>
|
|
24
58
|
</div>
|
|
25
59
|
|
|
26
|
-
<ContentPanel
|
|
60
|
+
<ContentPanel
|
|
61
|
+
@title="Metadata"
|
|
62
|
+
@open={{this.product.meta_array.length}}
|
|
63
|
+
@actionButtons={{this.metadataButtons}}
|
|
64
|
+
@pad={{true}}
|
|
65
|
+
@panelBodyWrapperClass="px-0 py-4"
|
|
66
|
+
@panelBodyClass="bg-white dark:bg-gray-800"
|
|
67
|
+
>
|
|
27
68
|
{{#each this.product.meta_array as |metaField index|}}
|
|
28
69
|
<div class="px-4 py-3 border-b border-gray-200 dark:border-gray-700">
|
|
29
70
|
<div class="input-group">
|
|
30
71
|
<div class="flex justify-between items-center mb-1">
|
|
31
72
|
<Input class="form-input border-0 px-2 py-1 m-0 bg-white dark:bg-gray-900 shadow-none" @value={{metaField.label}} placeholder={{metaField.label}} />
|
|
32
73
|
<a href="javascript:;" class="text-xs" tabindex="-1" {{on "click" (fn this.removeMetaField index)}}>
|
|
33
|
-
<FaIcon @icon="trash" @size="sm" class="mr-1" />
|
|
74
|
+
<FaIcon @icon="trash" @size="sm" class="mr-1" />
|
|
75
|
+
Remove
|
|
34
76
|
</a>
|
|
35
77
|
</div>
|
|
36
78
|
<Input class="w-full form-input" @value={{metaField.value}} placeholder={{metaField.label}} />
|
|
@@ -168,9 +210,11 @@
|
|
|
168
210
|
<ContentPanel @title="Images & Videos" @open={{this.product.files.length}} @pad={{false}} @panelBodyWrapperClass="px-0 py-4" @panelBodyClass="bg-white dark:bg-gray-800">
|
|
169
211
|
<div class="px-6 space-y-4">
|
|
170
212
|
{{#if this.isUploading}}
|
|
171
|
-
<div
|
|
213
|
+
<div
|
|
214
|
+
class="min-h-56 dropzone w-full rounded-lg px-4 py-8 min-h bg-gray-50 dark:bg-gray-900 bg-opacity-25 text-gray-900 dark:text-white text-center flex flex-col items-center justify-center border-2 border-dashed border-gray-200 dark:border-indigo-500"
|
|
215
|
+
>
|
|
172
216
|
<div class="flex items-center justify-center py-5">
|
|
173
|
-
<Spinner class="text-sm dar:text-gray-100" @loadingMessage="
|
|
217
|
+
<Spinner class="text-sm dar:text-gray-100" @loadingMessage={{t "component.dropzone.uploading"}} />
|
|
174
218
|
</div>
|
|
175
219
|
</div>
|
|
176
220
|
{{else}}
|
|
@@ -178,26 +222,27 @@
|
|
|
178
222
|
<FileDropzone @queue={{queue}} class="dropzone file-dropzone" as |dropzone|>
|
|
179
223
|
{{#if dropzone.active}}
|
|
180
224
|
{{#if dropzone.valid}}
|
|
181
|
-
|
|
225
|
+
{{t "component.dropzone.drop-to-upload"}}
|
|
182
226
|
{{else}}
|
|
183
|
-
|
|
227
|
+
{{t "component.dropzone.invalid"}}
|
|
184
228
|
{{/if}}
|
|
185
229
|
{{else if queue.files.length}}
|
|
186
230
|
<div class="my-2">
|
|
187
231
|
<FaIcon @icon="photo-video" class="text-indigo-500 mr-2" />
|
|
188
|
-
{{pluralize queue.files.length "file"}}
|
|
232
|
+
{{t "component.dropzone.files-ready-for-upload" numOfFiles=(pluralize queue.files.length (t "component.dropzone.file"))}}
|
|
189
233
|
</div>
|
|
190
234
|
<div class="my-2">({{queue.progress}}%)</div>
|
|
191
235
|
{{else}}
|
|
192
236
|
<h4 class="font-semibold mb-8">
|
|
193
|
-
<FaIcon @icon="photo-video" @size="2x" class="text-indigo-500 mr-2" />
|
|
237
|
+
<FaIcon @icon="photo-video" @size="2x" class="text-indigo-500 mr-2" />
|
|
238
|
+
{{t "component.dropzone.upload-images-videos"}}
|
|
194
239
|
</h4>
|
|
195
240
|
<div>
|
|
196
241
|
{{#if dropzone.supported}}
|
|
197
|
-
<p class="text-base font-semibold my-5">
|
|
242
|
+
<p class="text-base font-semibold my-5">{{t "component.dropzone.dropzone-supported-images-videos"}}</p>
|
|
198
243
|
{{/if}}
|
|
199
244
|
<FileUpload @name="files" @for="files" @accept={{join "," this.acceptedFileTypes}} @multiple={{true}} @onFileAdded={{this.queueFile}}>
|
|
200
|
-
<a tabindex={{0}} class="btn btn-magic cursor-pointer ml-1">or
|
|
245
|
+
<a tabindex={{0}} class="btn btn-magic cursor-pointer ml-1">{{t "component.dropzone.or-select-button-text"}}</a>
|
|
201
246
|
</FileUpload>
|
|
202
247
|
</div>
|
|
203
248
|
{{/if}}
|
|
@@ -206,15 +251,15 @@
|
|
|
206
251
|
{{#if this.uploadQueue}}
|
|
207
252
|
<div class="mx-4">
|
|
208
253
|
<div class="flex items-center justify-between mb-4">
|
|
209
|
-
<span class="leading-6 dark:text-gray-100">
|
|
254
|
+
<span class="leading-6 dark:text-gray-100">{{t "component.dropzone.upload-queue"}}</span>
|
|
210
255
|
</div>
|
|
211
256
|
<div class="space-y-2 mb-4">
|
|
212
257
|
{{#each this.uploadQueue as |file|}}
|
|
213
|
-
<div class="flex items-center justify-between bg-
|
|
214
|
-
<div class="text-
|
|
258
|
+
<div class="flex items-center justify-between bg-blue-100 border border-blue-800 dark:border-blue-800 py-1.5 shadow-sm rounded-lg px-4">
|
|
259
|
+
<div class="text-xs text-blue-900 truncate">{{truncate-filename file.name 50}}</div>
|
|
215
260
|
<div class="flex items-center text-sm">
|
|
216
|
-
<Spinner class="text-
|
|
217
|
-
<span class="font-bold text-
|
|
261
|
+
<Spinner class="text-blue-900 mr-2" />
|
|
262
|
+
<span class="font-bold text-blue-900">{{round file.progress}}%</span>
|
|
218
263
|
</div>
|
|
219
264
|
</div>
|
|
220
265
|
{{/each}}
|
|
@@ -224,9 +269,16 @@
|
|
|
224
269
|
<div>
|
|
225
270
|
<div class="grid grid-cols-2 md:grid-cols-4 gap-2 md:gap-4">
|
|
226
271
|
{{#each this.product.files as |file|}}
|
|
227
|
-
<FileRecord @file={{file}} @fileIconClass={{if (eq this.product.primary_image_uuid file.id)
|
|
272
|
+
<FileRecord @file={{file}} @fileIconClass={{if (eq this.product.primary_image_uuid file.id) "border-blue-400"}} @onDelete={{this.removeFile}}>
|
|
228
273
|
<div class="flex items-center justify-evenly">
|
|
229
|
-
<Button
|
|
274
|
+
<Button
|
|
275
|
+
@icon="magic"
|
|
276
|
+
@text="Make Primary"
|
|
277
|
+
@size="xs"
|
|
278
|
+
@textClass="text-xs truncate"
|
|
279
|
+
@onClick={{fn this.makePrimaryFile file}}
|
|
280
|
+
@disabled={{eq this.product.primary_image_uuid file.id}}
|
|
281
|
+
/>
|
|
230
282
|
</div>
|
|
231
283
|
</FileRecord>
|
|
232
284
|
{{/each}}
|
|
@@ -1,12 +1,33 @@
|
|
|
1
|
-
<Layout::Section::Header @title="
|
|
2
|
-
<Button @type="magic" @icon="tags" @text=
|
|
3
|
-
<Button
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
<Layout::Section::Header @title={{t "storefront.common.product"}}>
|
|
2
|
+
<Button @type="magic" @icon="tags" @text={{t "storefront.products.index.manage-addons"}} class="mr-2 flex-shrink-0" @onClick={{this.manageAddons}} />
|
|
3
|
+
<Button
|
|
4
|
+
@type="primary"
|
|
5
|
+
@icon="plus"
|
|
6
|
+
@iconPrefix="fas"
|
|
7
|
+
@text={{t "storefront.common.new"}}
|
|
8
|
+
class="mr-2 flex-shrink-0"
|
|
9
|
+
@onClick={{this.createNewProduct}}
|
|
10
|
+
@disabled={{not this.category}}
|
|
11
|
+
@helpText={{unless this.category "Select a category to create a product within"}}
|
|
12
|
+
/>
|
|
13
|
+
<Button @icon="file-import" @text={{t "storefront.common.import"}} class="mr-2" @wrapperClass="hidden lg:flex flex-shrink-0" @onClick={{this.importProducts}} />
|
|
14
|
+
<Button @icon="long-arrow-up" @iconClass="rotate-icon-45" @wrapperClass="hidden lg:flex flex-shrink-0" @text={{t "storefront.common.export"}} />
|
|
6
15
|
</Layout::Section::Header>
|
|
7
16
|
|
|
8
17
|
<Layout::Section::Body class="section-content flex flex-col lg:flex-row">
|
|
9
|
-
<AsideItemScroller
|
|
18
|
+
<AsideItemScroller
|
|
19
|
+
@title={{t "storefront.products.index.aside-scroller.title"}}
|
|
20
|
+
@resource="category"
|
|
21
|
+
@items={{@model}}
|
|
22
|
+
@titleKey="name"
|
|
23
|
+
@onCreate={{this.createNewProductCategory}}
|
|
24
|
+
@onInit={{this.setAsideScroller}}
|
|
25
|
+
@customTopItemComponent="aside-item-scroller/item"
|
|
26
|
+
@customTopItemText={{t "storefront.products.index.aside-scroller.custom-top-item-text"}}
|
|
27
|
+
@customTopItemOnClick={{this.viewAllProducts}}
|
|
28
|
+
@customTopItemClass="border-t border-gray-200 dark:border-gray-700"
|
|
29
|
+
as |category|
|
|
30
|
+
>
|
|
10
31
|
<a href="javascript:;" class="aside-item-link cursor-pointer flex w-full md:px-6 md:py-5" {{on "click" (fn this.switchCategory category)}}>
|
|
11
32
|
<div class="flex items-center justify-between">
|
|
12
33
|
<div>
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
<div class="space-y-6">
|
|
4
4
|
<div>
|
|
5
5
|
<h1 class="text-lg leading-6 font-bold text-gray-900 dark:text-gray-100">
|
|
6
|
-
|
|
6
|
+
{{t "storefront.settings.api.api-settings"}}
|
|
7
7
|
</h1>
|
|
8
8
|
<p class="mt-1 text-sm text-gray-500">
|
|
9
|
-
|
|
9
|
+
{{t "storefront.settings.api.access-key-for-storefront-api-integrations"}}
|
|
10
10
|
</p>
|
|
11
11
|
</div>
|
|
12
12
|
|
|
13
|
-
<InputGroup @name=
|
|
13
|
+
<InputGroup @name={{t "storefront.settings.api.store-key"}} @helpText={{t "storefront.settings.api.store-key-help-text"}}>
|
|
14
14
|
<ClickToReveal @value={{@model.key}} @clickToCopy={{true}} class="form-input disabled" />
|
|
15
15
|
</InputGroup>
|
|
16
16
|
</div>
|
|
@@ -4,28 +4,28 @@
|
|
|
4
4
|
<div class="flex justify-between">
|
|
5
5
|
<div>
|
|
6
6
|
<h1 class="text-lg leading-6 font-bold text-gray-900 dark:text-gray-100">
|
|
7
|
-
|
|
7
|
+
{{t "storefront.settings.gateways.geteway-settings"}}
|
|
8
8
|
</h1>
|
|
9
9
|
<p class="mt-1 text-sm text-gray-500">
|
|
10
|
-
|
|
10
|
+
{{t "storefront.settings.gateways.add-or-manage-your-paymeny-gateway-settings-here"}}
|
|
11
11
|
</p>
|
|
12
12
|
</div>
|
|
13
13
|
<div>
|
|
14
|
-
<Button @icon="plus" @iconPrefix="fas" @type="primary" @text="
|
|
14
|
+
<Button @icon="plus" @iconPrefix="fas" @type="primary" @text={{t "storefront.settings.gateways.create-new-gateway"}} @onClick={{this.createGateway}} />
|
|
15
15
|
</div>
|
|
16
16
|
</div>
|
|
17
17
|
|
|
18
18
|
{{#each this.gateways as |gateway|}}
|
|
19
19
|
<ContentPanel @title={{gateway.name}} @open={{true}} @pad={{true}}>
|
|
20
|
-
<InputGroup @name="
|
|
21
|
-
<InputGroup @name="
|
|
22
|
-
<InputGroup @name=
|
|
23
|
-
<InputGroup @name=
|
|
20
|
+
<InputGroup @name={{t "storefront.settings.gateways.gateway-name"}} @value={{gateway.name}} @helpText={{t "storefront.settings.gateways.helpText"}} />
|
|
21
|
+
<InputGroup @name={{t "storefront.settings.gateways.gateway-code"}} @value={{gateway.code}} @disabled={{true}} @helpText={{t "storefront.settings.gateways.gateway-code-help-text"}} />
|
|
22
|
+
<InputGroup @name={{t "storefront.settings.gateways.callback-url"}} @value={{gateway.callback_url}} @helpText={{t "storefront.settings.gateways.callback-url-help-text"}} />
|
|
23
|
+
<InputGroup @name={{t "storefront.settings.gateways.return-url"}} @value={{gateway.return_url}} @helpText={{t "storefront.settings.gateways.return-url-help-text"}} />
|
|
24
24
|
<div class="input-group">
|
|
25
|
-
<Checkbox @value={{gateway.sandbox}} @label="
|
|
25
|
+
<Checkbox @value={{gateway.sandbox}} @label={{t "storefront.settings.gateways.this-is-a-sandbox-gateway"}} @onToggle={{fn (mut gateway.sandbox)}} />
|
|
26
26
|
</div>
|
|
27
27
|
<div>
|
|
28
|
-
<h4 class="mb-2 font-semibold text-sm dark:text-white">
|
|
28
|
+
<h4 class="mb-2 font-semibold text-sm dark:text-white">{{t "storefront.common.config"}}</h4>
|
|
29
29
|
{{#each-in gateway.config as |key value|}}
|
|
30
30
|
{{#if (is-bool-value value)}}
|
|
31
31
|
<div class="input-group">
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
{{/each-in}}
|
|
40
40
|
</div>
|
|
41
41
|
<div>
|
|
42
|
-
<Button @size="sm" @type="danger" @icon="trash" @text="
|
|
42
|
+
<Button @size="sm" @type="danger" @icon="trash" @text={{t "storefront.settings.gateways.delete-payment-gateway"}} @onClick={{fn this.deleteGateway gateway}} />
|
|
43
43
|
</div>
|
|
44
44
|
</ContentPanel>
|
|
45
45
|
{{/each}}
|