@fleetbase/storefront-engine 0.2.6 → 0.2.8
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 +10 -9
- 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 +65 -12
- 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 +134 -132
- 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,7 +210,9 @@
|
|
|
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
217
|
<Spinner class="text-sm dar:text-gray-100" @loadingMessage="Uploading..." />
|
|
174
218
|
</div>
|
|
@@ -185,12 +229,14 @@
|
|
|
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
|
+
{{pluralize queue.files.length "file"}}
|
|
233
|
+
ready for upload.
|
|
189
234
|
</div>
|
|
190
235
|
<div class="my-2">({{queue.progress}}%)</div>
|
|
191
236
|
{{else}}
|
|
192
237
|
<h4 class="font-semibold mb-8">
|
|
193
|
-
<FaIcon @icon="photo-video" @size="2x" class="text-indigo-500 mr-2" />
|
|
238
|
+
<FaIcon @icon="photo-video" @size="2x" class="text-indigo-500 mr-2" />
|
|
239
|
+
Upload Images & Videos
|
|
194
240
|
</h4>
|
|
195
241
|
<div>
|
|
196
242
|
{{#if dropzone.supported}}
|
|
@@ -224,9 +270,16 @@
|
|
|
224
270
|
<div>
|
|
225
271
|
<div class="grid grid-cols-2 md:grid-cols-4 gap-2 md:gap-4">
|
|
226
272
|
{{#each this.product.files as |file|}}
|
|
227
|
-
<FileRecord @file={{file}} @fileIconClass={{if (eq this.product.primary_image_uuid file.id)
|
|
273
|
+
<FileRecord @file={{file}} @fileIconClass={{if (eq this.product.primary_image_uuid file.id) "border-blue-400"}} @onDelete={{this.removeFile}}>
|
|
228
274
|
<div class="flex items-center justify-evenly">
|
|
229
|
-
<Button
|
|
275
|
+
<Button
|
|
276
|
+
@icon="magic"
|
|
277
|
+
@text="Make Primary"
|
|
278
|
+
@size="xs"
|
|
279
|
+
@textClass="text-xs truncate"
|
|
280
|
+
@onClick={{fn this.makePrimaryFile file}}
|
|
281
|
+
@disabled={{eq this.product.primary_image_uuid file.id}}
|
|
282
|
+
/>
|
|
230
283
|
</div>
|
|
231
284
|
</FileRecord>
|
|
232
285
|
{{/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}}
|
|
@@ -3,49 +3,88 @@
|
|
|
3
3
|
<div class="space-y-4 h-screen">
|
|
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.index.general-settings-header"}}
|
|
7
7
|
</h1>
|
|
8
8
|
<p class="mt-1 text-sm text-gray-500">
|
|
9
|
-
|
|
9
|
+
{{t "storefront.settings.index.general-settings-message"}}
|
|
10
10
|
</p>
|
|
11
11
|
</div>
|
|
12
12
|
|
|
13
|
-
<InputGroup
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
<InputGroup
|
|
14
|
+
@id="storefront_name_input"
|
|
15
|
+
@name={{t "storefront.common.name"}}
|
|
16
|
+
@value={{@model.name}}
|
|
17
|
+
@placeholder={{t "storefront.settings.index.name-placeholder"}}
|
|
18
|
+
@helpText={{t "storefront.settings.index.name-help-text"}}
|
|
19
|
+
/>
|
|
20
|
+
<InputGroup
|
|
21
|
+
@name={{t "storefront.common.description"}}
|
|
22
|
+
@value={{@model.description}}
|
|
23
|
+
@placeholder={{t "storefront.settings.index.description-placeholder"}}
|
|
24
|
+
@helpText={{t "storefront.settings.index.description-help-text"}}
|
|
25
|
+
/>
|
|
26
|
+
<InputGroup @name={{t "storefront.common.tag"}}>
|
|
27
|
+
<TagInput
|
|
28
|
+
class="form-input"
|
|
29
|
+
@placeholder={{t "storefront.settings.index.tags-placeholder"}}
|
|
30
|
+
@allowSpacesInTags={{true}}
|
|
31
|
+
@tags={{@model.tags}}
|
|
32
|
+
@addTag={{this.addTag}}
|
|
33
|
+
@removeTagAtIndex={{this.removeTag}}
|
|
34
|
+
as |tag|
|
|
35
|
+
>
|
|
17
36
|
{{tag}}
|
|
18
37
|
</TagInput>
|
|
19
38
|
</InputGroup>
|
|
20
|
-
<InputGroup @name="
|
|
39
|
+
<InputGroup @name={{t "storefront.common.currency"}}>
|
|
21
40
|
<CurrencySelect @value={{@model.currency}} @onSelect={{fn (mut @model.currency)}} @triggerClass="w-full form-select" />
|
|
22
41
|
</InputGroup>
|
|
23
42
|
|
|
24
|
-
<ContentPanel @title=
|
|
25
|
-
<InputGroup @name="
|
|
43
|
+
<ContentPanel @title={{t "storefront.settings.index.contact-social"}} @open={{false}} @pad={{true}}>
|
|
44
|
+
<InputGroup @name={{t "storefront.common.phone"}}>
|
|
26
45
|
<PhoneInput @value={{@model.phone}} @onInput={{fn (mut @model.phone)}} class="form-input w-full" />
|
|
27
46
|
</InputGroup>
|
|
28
|
-
<InputGroup
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
47
|
+
<InputGroup
|
|
48
|
+
@name={{t "storefront.common.website"}}
|
|
49
|
+
@value={{@model.website}}
|
|
50
|
+
@placeholder={{t "storefront.common.website"}}
|
|
51
|
+
@helpText={{t "storefront.settings.index.website-help-text"}}
|
|
52
|
+
/>
|
|
53
|
+
<InputGroup
|
|
54
|
+
@name={{t "storefront.common.facebook"}}
|
|
55
|
+
@value={{@model.facebook}}
|
|
56
|
+
@placeholder={{t "storefront.settings.index.facebook-placeholder"}}
|
|
57
|
+
@helpText={{t "storefront.settings.index.facebook-help-text"}}
|
|
58
|
+
/>
|
|
59
|
+
<InputGroup
|
|
60
|
+
@name={{t "storefront.common.instagram"}}
|
|
61
|
+
@value={{@model.instagram}}
|
|
62
|
+
@placeholder={{t "storefront.settings.index.instagram-placeholder"}}
|
|
63
|
+
@helpText={{t "storefront.settings.index.instagram-help-text"}}
|
|
64
|
+
/>
|
|
65
|
+
<InputGroup
|
|
66
|
+
@name={{t "storefront.common.twitter"}}
|
|
67
|
+
@value={{@model.twitter}}
|
|
68
|
+
@placeholder={{t "storefront.settings.index.twitter-placeholder"}}
|
|
69
|
+
@helpText={{t "storefront.settings.index.twitter-help-text"}}
|
|
70
|
+
/>
|
|
32
71
|
</ContentPanel>
|
|
33
72
|
|
|
34
|
-
<ContentPanel @title=
|
|
35
|
-
<InputGroup @name="
|
|
73
|
+
<ContentPanel @title={{t "storefront.settings.index.logo-backdrop"}} @open={{false}} @pad={{true}}>
|
|
74
|
+
<InputGroup @name={{t "storefront.common.logo"}} @helpText={{t "storefront.settings.index.logo-help-text"}}>
|
|
36
75
|
<div class="flex flex-row items-center">
|
|
37
76
|
<img src={{@model.logo_url}} alt={{concat @model.name " logo"}} class="h-20 w-64 border dark:border-gray-900 rounded-md mr-4" />
|
|
38
|
-
<FileUpload @name="logo" @accept="image/*" @onFileAdded={{fn this.uploadFile "storefront_logo"}} as |queue|>
|
|
77
|
+
<FileUpload @name={{t "storefront.common.logo"}} @accept="image/*" @onFileAdded={{fn this.uploadFile "storefront_logo"}} as |queue|>
|
|
39
78
|
<a tabindex={{0}} class="flex items-center px-0 mt-2 text-xs no-underline truncate btn btn-sm btn-default">
|
|
40
79
|
{{#if queue.files.length}}
|
|
41
80
|
<Spinner class="mr-1" />
|
|
42
81
|
<span>
|
|
43
|
-
|
|
82
|
+
{{t "storefront.common.uploading"}}
|
|
44
83
|
</span>
|
|
45
84
|
{{else}}
|
|
46
85
|
<FaIcon @icon="image" class="mr-1" />
|
|
47
86
|
<span>
|
|
48
|
-
|
|
87
|
+
{{t "storefront.settings.index.upload-new-logo"}}
|
|
49
88
|
</span>
|
|
50
89
|
{{/if}}
|
|
51
90
|
</a>
|
|
@@ -53,20 +92,20 @@
|
|
|
53
92
|
</div>
|
|
54
93
|
</InputGroup>
|
|
55
94
|
|
|
56
|
-
<InputGroup @name="
|
|
95
|
+
<InputGroup @name={{t "storefront.common.backdrop"}} @helpText={{t "storefront.settings.index.backdrop-help-text"}}>
|
|
57
96
|
<div class="flex flex-row items-center">
|
|
58
97
|
<img src={{@model.backdrop_url}} alt={{concat @model.name " backdrop"}} class="h-20 w-64 border dark:border-gray-900 rounded-md mr-4" />
|
|
59
|
-
<FileUpload @name="backdrop" @accept="image/*" @onFileAdded={{fn this.uploadFile "storefront_backdrop"}} as |queue|>
|
|
98
|
+
<FileUpload @name={{t "storefront.common.backdrop"}} @accept="image/*" @onFileAdded={{fn this.uploadFile "storefront_backdrop"}} as |queue|>
|
|
60
99
|
<a tabindex={{0}} class="flex items-center px-0 mt-2 text-xs no-underline truncate btn btn-sm btn-default">
|
|
61
100
|
{{#if queue.files.length}}
|
|
62
101
|
<Spinner class="mr-1" />
|
|
63
102
|
<span>
|
|
64
|
-
|
|
103
|
+
{{t "storefront.common.uploading"}}
|
|
65
104
|
</span>
|
|
66
105
|
{{else}}
|
|
67
106
|
<FaIcon @icon="image" class="mr-1" />
|
|
68
107
|
<span>
|
|
69
|
-
|
|
108
|
+
{{t "storefront.settings.index.upload-new-backdrop"}}
|
|
70
109
|
</span>
|
|
71
110
|
{{/if}}
|
|
72
111
|
</a>
|
|
@@ -75,39 +114,54 @@
|
|
|
75
114
|
</InputGroup>
|
|
76
115
|
</ContentPanel>
|
|
77
116
|
|
|
78
|
-
<ContentPanel @title=
|
|
117
|
+
<ContentPanel @title={{t "storefront.settings.index.images-videos"}} @open={{false}} @pad={{false}} @panelBodyWrapperClass="px-0 py-4" @panelBodyClass="bg-white dark:bg-gray-800">
|
|
79
118
|
<div class="p-6">
|
|
80
119
|
{{#if this.isUploading}}
|
|
81
|
-
<div
|
|
120
|
+
<div
|
|
121
|
+
class="min-h-56 dropzone w-full rounded px-4 py-8 min-h bg-black 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"
|
|
122
|
+
>
|
|
82
123
|
<div class="flex items-center justify-center py-5">
|
|
83
124
|
<PageLoader class="text-sm dar:text-gray-100" @loadingMessage="Uploading..." />
|
|
84
125
|
</div>
|
|
85
126
|
</div>
|
|
86
127
|
{{else}}
|
|
87
|
-
<FileDropzone
|
|
128
|
+
<FileDropzone
|
|
129
|
+
@name={{t "storefront.common.file"}}
|
|
130
|
+
@multiple={{true}}
|
|
131
|
+
@onFileAdded={{this.queueFile}}
|
|
132
|
+
@accept={{join "," this.acceptedFileTypes}}
|
|
133
|
+
class="dropzone file-dropzone"
|
|
134
|
+
as |dropzone queue|
|
|
135
|
+
>
|
|
88
136
|
{{#if dropzone.active}}
|
|
89
137
|
{{#if dropzone.valid}}
|
|
90
|
-
|
|
138
|
+
{{t "storefront.settings.index.drop-to-upload"}}
|
|
91
139
|
{{else}}
|
|
92
|
-
|
|
140
|
+
{{t "storefront.common.invalid"}}
|
|
93
141
|
{{/if}}
|
|
94
142
|
{{else if queue.files.length}}
|
|
95
143
|
<div class="my-2">
|
|
96
144
|
<FaIcon @icon="photo-video" class="text-indigo-500 mr-2" />
|
|
97
145
|
{{pluralize queue.files.length "file"}}
|
|
98
|
-
ready
|
|
146
|
+
{{t "storefront.settings.index.ready-to-upload"}}
|
|
99
147
|
</div>
|
|
100
148
|
<div class="my-2">({{queue.progress}}%)</div>
|
|
101
149
|
{{else}}
|
|
102
150
|
<h4 class="font-semibold mb-8">
|
|
103
151
|
<FaIcon @icon="photo-video" @size="2x" class="text-indigo-500 mr-2" />
|
|
104
|
-
|
|
152
|
+
{{t "storefront.settings.index.upload-image-video"}}
|
|
105
153
|
</h4>
|
|
106
154
|
<div>
|
|
107
155
|
{{#if dropzone.supported}}
|
|
108
|
-
<p class="text-base font-semibold my-5">
|
|
156
|
+
<p class="text-base font-semibold my-5">{{t "storefront.settings.index.drag-and-drop-image"}}</p>
|
|
109
157
|
{{/if}}
|
|
110
|
-
<FileUpload
|
|
158
|
+
<FileUpload
|
|
159
|
+
@name={{t "storefront.common.file"}}
|
|
160
|
+
@for="files"
|
|
161
|
+
@accept={{join "," this.acceptedFileTypes}}
|
|
162
|
+
@multiple={{true}}
|
|
163
|
+
@onFileAdded={{this.queueFile}}
|
|
164
|
+
>
|
|
111
165
|
<a tabindex={{0}} class="btn btn-magic cursor-pointer ml-1">or select files to upload.</a>
|
|
112
166
|
</FileUpload>
|
|
113
167
|
</div>
|
|
@@ -116,7 +170,7 @@
|
|
|
116
170
|
{{#if this.uploadQueue}}
|
|
117
171
|
<div class="mx-4 my-6">
|
|
118
172
|
<div class="flex items-center justify-between mb-4">
|
|
119
|
-
<span class="leading-6 dark:text-gray-100">
|
|
173
|
+
<span class="leading-6 dark:text-gray-100">{{t "storefront.settings.index.upload-queue"}}</span>
|
|
120
174
|
</div>
|
|
121
175
|
<div class="space-y-2 mb-5">
|
|
122
176
|
{{#each this.uploadQueue as |file|}}
|
|
@@ -142,11 +196,20 @@
|
|
|
142
196
|
</div>
|
|
143
197
|
</ContentPanel>
|
|
144
198
|
|
|
145
|
-
<ContentPanel @title="
|
|
199
|
+
<ContentPanel @title={{t "storefront.common.alerts"}} @open={{false}} @pad={{true}} @panelBodyClass="bg-white dark:bg-gray-800">
|
|
146
200
|
<div>
|
|
147
|
-
<p class="dark:text-gray-100 mb-4">
|
|
148
|
-
<InputGroup @name="
|
|
149
|
-
<ModelSelectMultiple
|
|
201
|
+
<p class="dark:text-gray-100 mb-4">{{t "storefront.settings.index.alerted-for-certain-event"}}</p>
|
|
202
|
+
<InputGroup @name={{t "storefront.settings.index.new-order-alert"}} @wrapperClass="mb-0">
|
|
203
|
+
<ModelSelectMultiple
|
|
204
|
+
@modelName="user"
|
|
205
|
+
@selectedModel={{@model.alertable.for_new_order}}
|
|
206
|
+
@placeholder={{t "storefront.settings.index.alert-placeholder"}}
|
|
207
|
+
@triggerClass="form-select form-input multiple"
|
|
208
|
+
@infiniteScroll={{false}}
|
|
209
|
+
@renderInPlace={{true}}
|
|
210
|
+
@onChange={{fn this.makeAlertable "for_new_order"}}
|
|
211
|
+
as |model|
|
|
212
|
+
>
|
|
150
213
|
{{model.name}}
|
|
151
214
|
</ModelSelectMultiple>
|
|
152
215
|
</InputGroup>
|
|
@@ -156,55 +219,79 @@
|
|
|
156
219
|
<div class="store-boolean-settings">
|
|
157
220
|
<div class="input-group">
|
|
158
221
|
<Toggle @isToggled={{@model.online}} @onToggle={{fn (mut @model.online)}}>
|
|
159
|
-
<FaIcon @icon="plug" class="text-gray-600 dark:text-gray-400 mx-2" /><span class="dark:text-gray-100 text-sm">
|
|
222
|
+
<FaIcon @icon="plug" class="text-gray-600 dark:text-gray-400 mx-2" /><span class="dark:text-gray-100 text-sm">{{t "storefront.common.online"}}</span>
|
|
160
223
|
</Toggle>
|
|
161
224
|
</div>
|
|
162
225
|
<div class="input-group">
|
|
163
226
|
<Toggle @isToggled={{@model.options.tax_enabled}} @onToggle={{fn (mut @model.options.tax_enabled)}}>
|
|
164
|
-
<FaIcon @icon="percent" class="text-gray-600 dark:text-gray-400 mx-2" /><span class="dark:text-gray-100 text-sm">
|
|
227
|
+
<FaIcon @icon="percent" class="text-gray-600 dark:text-gray-400 mx-2" /><span class="dark:text-gray-100 text-sm">{{t "storefront.settings.index.enable-tax"}}</span>
|
|
165
228
|
</Toggle>
|
|
166
229
|
{{#if @model.options.tax_enabled}}
|
|
167
|
-
<InputGroup
|
|
230
|
+
<InputGroup
|
|
231
|
+
@wrapperClass="mb-0 mt-2"
|
|
232
|
+
@type="number"
|
|
233
|
+
@name={{t "storefront.settings.index.tax-percentage"}}
|
|
234
|
+
@value={{@model.options.tax_percentage}}
|
|
235
|
+
@placeholder={{t "storefront.settings.index.tax-percentage"}}
|
|
236
|
+
@helpText={{t "storefront.settings.index.tax-percentage-help-text"}}
|
|
237
|
+
/>
|
|
168
238
|
{{/if}}
|
|
169
239
|
</div>
|
|
170
240
|
<div class="input-group">
|
|
171
241
|
<Toggle @isToggled={{@model.options.auto_accept_orders}} @onToggle={{fn (mut @model.options.auto_accept_orders)}}>
|
|
172
|
-
<FaIcon @icon="robot" class="text-gray-600 dark:text-gray-400 mx-2" /><span class="dark:text-gray-100 text-sm">
|
|
242
|
+
<FaIcon @icon="robot" class="text-gray-600 dark:text-gray-400 mx-2" /><span class="dark:text-gray-100 text-sm">{{t "storefront.settings.index.auto-accept-incoming-order"}}</span>
|
|
173
243
|
</Toggle>
|
|
174
244
|
</div>
|
|
175
245
|
<div class="input-group">
|
|
176
246
|
<Toggle @isToggled={{@model.options.auto_dispatch}} @onToggle={{fn (mut @model.options.auto_dispatch)}}>
|
|
177
|
-
<FaIcon @icon="paper-plane" class="text-gray-600 dark:text-gray-400 mx-2" /><span class="dark:text-gray-100 text-sm">
|
|
247
|
+
<FaIcon @icon="paper-plane" class="text-gray-600 dark:text-gray-400 mx-2" /><span class="dark:text-gray-100 text-sm">{{t
|
|
248
|
+
"storefront.settings.index.auto-dispatch-order"
|
|
249
|
+
}}</span>
|
|
178
250
|
</Toggle>
|
|
179
251
|
</div>
|
|
180
252
|
<div class="input-group">
|
|
181
253
|
<Toggle @isToggled={{@model.options.require_pod}} @onToggle={{fn (mut @model.options.require_pod)}}>
|
|
182
|
-
<FaIcon @icon="signature" class="text-gray-600 dark:text-gray-400 mx-2" /><span class="dark:text-gray-100 text-sm">
|
|
254
|
+
<FaIcon @icon="signature" class="text-gray-600 dark:text-gray-400 mx-2" /><span class="dark:text-gray-100 text-sm">{{t "storefront.settings.index.require-proof-of-delivery"}}</span>
|
|
183
255
|
</Toggle>
|
|
184
256
|
{{#if @model.options.require_pod}}
|
|
185
|
-
<InputGroup @wrapperClass="mb-0 mt-2" @name="
|
|
186
|
-
<Select
|
|
257
|
+
<InputGroup @wrapperClass="mb-0 mt-2" @name={{t "storefront.settings.index.proof-of-delivery-method"}}>
|
|
258
|
+
<Select
|
|
259
|
+
@options={{this.podMethods}}
|
|
260
|
+
@optionValue="value"
|
|
261
|
+
@optionLabel="name"
|
|
262
|
+
@value={{@model.pod_method}}
|
|
263
|
+
@onSelect={{fn (mut @model.pod_method)}}
|
|
264
|
+
class="w-full"
|
|
265
|
+
/>
|
|
187
266
|
</InputGroup>
|
|
188
267
|
{{/if}}
|
|
189
268
|
</div>
|
|
190
269
|
<div class="input-group">
|
|
191
270
|
<Toggle @isToggled={{@model.options.cod_enabled}} @onToggle={{fn (mut @model.options.cod_enabled)}}>
|
|
192
|
-
<FaIcon @icon="money-bill-wave" class="text-gray-600 dark:text-gray-400 mx-2" /><span class="dark:text-gray-100 text-sm">
|
|
271
|
+
<FaIcon @icon="money-bill-wave" class="text-gray-600 dark:text-gray-400 mx-2" /><span class="dark:text-gray-100 text-sm">{{t
|
|
272
|
+
"storefront.settings.index.enable-cash-on-delivery"
|
|
273
|
+
}}</span>
|
|
193
274
|
</Toggle>
|
|
194
275
|
</div>
|
|
195
276
|
<div class="input-group">
|
|
196
277
|
<Toggle @isToggled={{@model.options.pickup_enabled}} @onToggle={{fn (mut @model.options.pickup_enabled)}}>
|
|
197
|
-
<FaIcon @icon="person-booth" class="text-gray-600 dark:text-gray-400 mx-2" /><span class="dark:text-gray-100 text-sm">
|
|
278
|
+
<FaIcon @icon="person-booth" class="text-gray-600 dark:text-gray-400 mx-2" /><span class="dark:text-gray-100 text-sm">{{t
|
|
279
|
+
"storefront.settings.index.enable-order-pickup"
|
|
280
|
+
}}</span>
|
|
198
281
|
</Toggle>
|
|
199
282
|
</div>
|
|
200
283
|
<div class="input-group">
|
|
201
284
|
<Toggle @isToggled={{@model.options.tips_enabled}} @onToggle={{fn (mut @model.options.tips_enabled)}}>
|
|
202
|
-
<FaIcon @icon="cash-register" class="text-gray-600 dark:text-gray-400 mx-2" /><span class="dark:text-gray-100 text-sm">
|
|
285
|
+
<FaIcon @icon="cash-register" class="text-gray-600 dark:text-gray-400 mx-2" /><span class="dark:text-gray-100 text-sm">{{t
|
|
286
|
+
"storefront.settings.index.enable-tip"
|
|
287
|
+
}}</span>
|
|
203
288
|
</Toggle>
|
|
204
289
|
</div>
|
|
205
290
|
<div class="input-group">
|
|
206
291
|
<Toggle @isToggled={{@model.options.delivery_tips_enabled}} @onToggle={{fn (mut @model.options.delivery_tips_enabled)}}>
|
|
207
|
-
<FaIcon @icon="face-smile" class="text-gray-600 dark:text-gray-400 mx-2" /><span class="dark:text-gray-100 text-sm">
|
|
292
|
+
<FaIcon @icon="face-smile" class="text-gray-600 dark:text-gray-400 mx-2" /><span class="dark:text-gray-100 text-sm">{{t
|
|
293
|
+
"storefront.settings.index.enable-integrated-vendors"
|
|
294
|
+
}}</span>
|
|
208
295
|
</Toggle>
|
|
209
296
|
</div>
|
|
210
297
|
{{!-- <div class="input-group">
|
|
@@ -212,8 +299,8 @@
|
|
|
212
299
|
<FaIcon @icon="truck" class="text-gray-600 dark:text-gray-400 mx-2" /><span class="dark:text-gray-100 text-sm">Enable integrated vendors</span>
|
|
213
300
|
</Toggle>
|
|
214
301
|
{{#if @model.options.integrated_vendors_enabled}}
|
|
215
|
-
<InputGroup @name=
|
|
216
|
-
<ModelSelectMultiple @modelName="integrated-vendor" @selectedModel={{@model.options.integrated_vendors}} @placeholder=
|
|
302
|
+
<InputGroup @name={{t "storefront.settings.index.name-select"}} @wrapperClass="mt-2 mb-0">
|
|
303
|
+
<ModelSelectMultiple @modelName="integrated-vendor" @selectedModel={{@model.options.integrated_vendors}} @placeholder={{t "storefront.settings.index.placeholder-select"}} @triggerClass="form-select form-input multiple" @infiniteScroll={{false}} @renderInPlace={{true}} @onChange={{fn (mut @model.options.integrated_vendors)}} as |model|>
|
|
217
304
|
{{model.name}}
|
|
218
305
|
</ModelSelectMultiple>
|
|
219
306
|
</InputGroup>
|
|
@@ -222,7 +309,15 @@
|
|
|
222
309
|
</div>
|
|
223
310
|
|
|
224
311
|
<div class="flex justify-end pb-12">
|
|
225
|
-
<Button
|
|
312
|
+
<Button
|
|
313
|
+
@buttonType="submit"
|
|
314
|
+
@type="primary"
|
|
315
|
+
@text={{t "storefront.settings.index.save-changes"}}
|
|
316
|
+
@icon="save"
|
|
317
|
+
@size="lg"
|
|
318
|
+
@isLoading={{this.isLoading}}
|
|
319
|
+
@onClick={{this.saveSettings}}
|
|
320
|
+
/>
|
|
226
321
|
</div>
|
|
227
322
|
</div>
|
|
228
323
|
</form>
|