@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,9 @@
|
|
|
1
1
|
<div class="file-record relative" ...attributes>
|
|
2
2
|
<div class="flex flex-col items-center justify-center">
|
|
3
|
-
<div
|
|
3
|
+
<div
|
|
4
|
+
class="file-record-icon {{@fileIconClass}} flex items-center justify-center mb-2 rounded-lg shadow-sm border-4 border-transparent dark:border-gray-900"
|
|
5
|
+
style={{this.fileBackgroundStyle}}
|
|
6
|
+
>
|
|
4
7
|
{{#if this.isVideo}}
|
|
5
8
|
<FaIcon @icon="file-video" @size="3x" class="text-sky-400" />
|
|
6
9
|
{{/if}}
|
|
@@ -15,7 +18,11 @@
|
|
|
15
18
|
{{/if}}
|
|
16
19
|
</div>
|
|
17
20
|
<div class="absolute top-0 right-0">
|
|
18
|
-
<a
|
|
21
|
+
<a
|
|
22
|
+
href="javascript:;"
|
|
23
|
+
{{on "click" (fn this.deleteFile @file)}}
|
|
24
|
+
class="flex items-center justify-center text-center p-1 -mt-2 rounded-full w-6 h-6 hover:opacity-75 bg-red-400 shadow-md text-xs"
|
|
25
|
+
>
|
|
19
26
|
<FaIcon @icon="trash" class="text-white" />
|
|
20
27
|
</a>
|
|
21
28
|
</div>
|
|
@@ -7,6 +7,7 @@ import isImage from '@fleetbase/ember-core/utils/is-image-file';
|
|
|
7
7
|
|
|
8
8
|
export default class FileRecordComponent extends Component {
|
|
9
9
|
@service modalsManager;
|
|
10
|
+
@service intl;
|
|
10
11
|
@alias('args.file') file;
|
|
11
12
|
|
|
12
13
|
get isVideo() {
|
|
@@ -27,8 +28,8 @@ export default class FileRecordComponent extends Component {
|
|
|
27
28
|
|
|
28
29
|
@action deleteFile(file) {
|
|
29
30
|
return this.modalsManager.confirm({
|
|
30
|
-
title: '
|
|
31
|
-
body: '
|
|
31
|
+
title: this.intl.t('storefront.component.file-record.delete-this-file'),
|
|
32
|
+
body: this.intl.t('storefront.component.file-record.delete-this-file-you-will-unable-recover'),
|
|
32
33
|
confirm: (modal) => {
|
|
33
34
|
file.destroyRecord();
|
|
34
35
|
|
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
<Modal::Default @modalIsOpened={{@modalIsOpened}} @options={{@options}} @confirm={{@onConfirm}} @decline={{@onDecline}}>
|
|
2
2
|
<div class="modal-body-container">
|
|
3
3
|
<div>
|
|
4
|
-
<InputGroup
|
|
5
|
-
|
|
4
|
+
<InputGroup
|
|
5
|
+
@type="time"
|
|
6
|
+
@name={{t "storefront.component.modals.add-store-hours.start-time"}}
|
|
7
|
+
@value={{@options.hours.start}}
|
|
8
|
+
@helpText={{t "storefront.component.modals.add-store-hours.operation.start"}}
|
|
9
|
+
/>
|
|
10
|
+
<InputGroup
|
|
11
|
+
@type="time"
|
|
12
|
+
@name={{t "storefront.component.modals.add-store-hours.end-time"}}
|
|
13
|
+
@value={{@options.hours.end}}
|
|
14
|
+
@helpText={{t "storefront.component.modals.add-store-hours.operation-end"}}
|
|
15
|
+
/>
|
|
6
16
|
</div>
|
|
7
17
|
</div>
|
|
8
18
|
</Modal::Default>
|
|
@@ -3,19 +3,32 @@
|
|
|
3
3
|
<div class="sm:flex sm:items-start">
|
|
4
4
|
<div class="flex items-center justify-center flex-shrink-0 w-12 h-12 mx-auto bg-red-100 rounded-full sm:mx-0 sm:h-10 sm:w-10">
|
|
5
5
|
<svg class="w-6 h-6 text-red-600" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
6
|
-
<path
|
|
6
|
+
<path
|
|
7
|
+
stroke-linecap="round"
|
|
8
|
+
stroke-linejoin="round"
|
|
9
|
+
stroke-width="2"
|
|
10
|
+
d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"
|
|
11
|
+
>
|
|
7
12
|
</path>
|
|
8
13
|
</svg>
|
|
9
14
|
</div>
|
|
10
15
|
<div class="mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left">
|
|
11
16
|
<div class="mb-4">
|
|
12
17
|
<p class="text-sm leading-5 text-gray-500 dark:text-white">
|
|
13
|
-
|
|
18
|
+
{{t "storefront.component.modals.assign-driver.message-driver"}}
|
|
14
19
|
</p>
|
|
15
20
|
</div>
|
|
16
|
-
<InputGroup class="mt-4" @name=
|
|
17
|
-
<ModelSelect
|
|
18
|
-
@
|
|
21
|
+
<InputGroup class="mt-4" @name={{t "storefront.component.modals.assign-driver.name-driver"}}>
|
|
22
|
+
<ModelSelect
|
|
23
|
+
@modelName="driver"
|
|
24
|
+
@selectedModel={{@options.order.driver_assigned}}
|
|
25
|
+
@placeholder={{t "storefront.component.modals.assign-driver.placeholder-driver"}}
|
|
26
|
+
@triggerClass="form-select form-input"
|
|
27
|
+
@infiniteScroll={{false}}
|
|
28
|
+
@renderInPlace={{true}}
|
|
29
|
+
@onChange={{fn (mut @options.order.driver_assigned)}}
|
|
30
|
+
as |model|
|
|
31
|
+
>
|
|
19
32
|
{{model.name}}
|
|
20
33
|
</ModelSelect>
|
|
21
34
|
</InputGroup>
|
|
@@ -3,17 +3,29 @@
|
|
|
3
3
|
<div class="flex flex-col items-center justify-center mb-2">
|
|
4
4
|
<FaIcon @icon="stars" @size="4x" class="text-sky-400" />
|
|
5
5
|
<div class="my-2 text-center">
|
|
6
|
-
<h2 class="dark:text-gray-100 font-semibold">
|
|
6
|
+
<h2 class="dark:text-gray-100 font-semibold">{{t "storefront.component.modals.create-first-store.title"}}</h2>
|
|
7
7
|
<p class="my-2 px-6 dark:text-gray-100">
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
{{t "storefront.component.modals.create-first-store.message"}}
|
|
9
|
+
{{t "storefront.component.modals.create-first-store.submit-message"}}
|
|
10
10
|
</p>
|
|
11
11
|
</div>
|
|
12
12
|
</div>
|
|
13
13
|
<div>
|
|
14
|
-
<InputGroup
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
<InputGroup
|
|
15
|
+
@name={{t "storefront.component.modals.create-first-store.storefront-name"}}
|
|
16
|
+
@value={{@options.store.name}}
|
|
17
|
+
@helpText={{t "storefront.component.modals.create-first-store.enter-name"}}
|
|
18
|
+
/>
|
|
19
|
+
<InputGroup
|
|
20
|
+
@name={{t "storefront.component.modals.create-first-store.description"}}
|
|
21
|
+
@value={{@options.store.description}}
|
|
22
|
+
@helpText={{t "storefront.component.modals.create-first-store.brief-description"}}
|
|
23
|
+
/>
|
|
24
|
+
<InputGroup
|
|
25
|
+
@name={{t "storefront.component.modals.create-first-store.currency"}}
|
|
26
|
+
@value={{@options.store.currency}}
|
|
27
|
+
@helpText={{t "storefront.component.modals.create-first-store.select-currency"}}
|
|
28
|
+
>
|
|
17
29
|
<CurrencySelect @value={{@options.store.currency}} @onSelect={{fn (mut @options.store.currency)}} @triggerClass="w-full form-select" />
|
|
18
30
|
</InputGroup>
|
|
19
31
|
</div>
|
|
@@ -1,20 +1,32 @@
|
|
|
1
1
|
<Modal::Default @modalIsOpened={{@modalIsOpened}} @options={{@options}} @confirm={{@onConfirm}} @decline={{@onDecline}}>
|
|
2
2
|
<div class="modal-body-container">
|
|
3
3
|
<div class="mb-4 w-full">
|
|
4
|
-
<InputGroup @name=
|
|
4
|
+
<InputGroup @name={{t "storefront.component.modals.create-getaway.getaway"}} @helpText={{t "storefront.component.modals.create-getaway.getaway-text"}}>
|
|
5
5
|
<Select class="w-full" @placeholder="Select gateway type" @options={{@options.schemaOptions}} @onSelect={{@options.selectSchema}} @humanize={{true}} />
|
|
6
6
|
</InputGroup>
|
|
7
7
|
</div>
|
|
8
8
|
|
|
9
9
|
{{#if @options.schema}}
|
|
10
|
-
<InputGroup
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
<InputGroup
|
|
11
|
+
@name={{t "storefront.component.modals.create-getaway.getaway-name"}}
|
|
12
|
+
@value={{@options.gateway.name}}
|
|
13
|
+
@helpText={{t "storefront.component.modals.create-getaway.name-text"}}
|
|
14
|
+
/>
|
|
15
|
+
<InputGroup @name={{t "storefront.component.modals.create-getaway.getaway-code"}} @helpText={{t "storefront.component.modals.create-getaway.code-text"}}>
|
|
16
|
+
<KeyInput @name={{t "storefront.component.modals.create-getaway.getaway-code"}} @value={{@options.gateway.code}} @onChange={{fn (mut @options.gateway.code)}} />
|
|
13
17
|
</InputGroup>
|
|
14
|
-
<InputGroup
|
|
15
|
-
|
|
18
|
+
<InputGroup
|
|
19
|
+
@name={{t "storefront.component.modals.create-getaway.callback-url"}}
|
|
20
|
+
@value={{@options.gateway.callback_url}}
|
|
21
|
+
@helpText={{t "storefront.component.modals.create-getaway.callback-text"}}
|
|
22
|
+
/>
|
|
23
|
+
<InputGroup
|
|
24
|
+
@name={{t "storefront.component.modals.create-getaway.return-url"}}
|
|
25
|
+
@value={{@options.gateway.return_url}}
|
|
26
|
+
@helpText={{t "storefront.component.modals.create-getaway.return-text"}}
|
|
27
|
+
/>
|
|
16
28
|
<div class="input-group">
|
|
17
|
-
<Checkbox @value={{@options.gateway.sandbox}} @label="
|
|
29
|
+
<Checkbox @value={{@options.gateway.sandbox}} @label={{t "storefront.component.modals.create-getaway.sandbox-getaway"}} @onToggle={{fn (mut @options.gateway.sandbox)}} />
|
|
18
30
|
</div>
|
|
19
31
|
<div class="p-2 rounded-md my-2 border border-gray-200 dark:border-gray-800">
|
|
20
32
|
<h4 class="mb-2 font-semibold text-sm dark:text-white">Config</h4>
|
|
@@ -1,13 +1,31 @@
|
|
|
1
1
|
<Modal::Default @modalIsOpened={{@modalIsOpened}} @options={{@options}} @confirm={{@onConfirm}} @decline={{@onDecline}}>
|
|
2
2
|
<div class="modal-body-container">
|
|
3
|
-
<InputGroup @name="
|
|
4
|
-
<ModelSelect
|
|
3
|
+
<InputGroup @name={{t "storefront.component.modals.create-network-category.parent-category"}} @wrapperClass="border-b border-gray-200 dark:border-gray-700 pb-4 mb-3i">
|
|
4
|
+
<ModelSelect
|
|
5
|
+
@modelName="category"
|
|
6
|
+
@query={{hash for="storefront_network" owner_uuid=@options.network.id}}
|
|
7
|
+
@selectedModel={{@options.parentCategory}}
|
|
8
|
+
@placeholder={{t "storefront.component.modals.create-network-category.select-parent"}}
|
|
9
|
+
@triggerClass="form-select form-input"
|
|
10
|
+
@infiniteScroll={{false}}
|
|
11
|
+
@renderInPlace={{true}}
|
|
12
|
+
@onChange={{@options.setParentCategory}}
|
|
13
|
+
as |model|
|
|
14
|
+
>
|
|
5
15
|
{{model.name}}
|
|
6
16
|
</ModelSelect>
|
|
7
17
|
</InputGroup>
|
|
8
|
-
<InputGroup
|
|
9
|
-
|
|
10
|
-
|
|
18
|
+
<InputGroup
|
|
19
|
+
@name={{t "storefront.component.modals.create-network-category.category-name"}}
|
|
20
|
+
@value={{@options.category.name}}
|
|
21
|
+
@helpText={{t "storefront.component.modals.create-network-category.name-text"}}
|
|
22
|
+
/>
|
|
23
|
+
<InputGroup
|
|
24
|
+
@name={{t "storefront.component.modals.create-network-category.description"}}
|
|
25
|
+
@value={{@options.category.description}}
|
|
26
|
+
@helpText={{t "storefront.component.modals.create-network-category.description-text"}}
|
|
27
|
+
/>
|
|
28
|
+
{{!-- <InputGroup @name={{t "storefront.component.modals.create-network-category.category-icon"}} @wrapperClass="mb-0">
|
|
11
29
|
<div class="flex flex-row dark:text-gray-100 mt-4">
|
|
12
30
|
<div class="flex flex-row items-center mr-4">
|
|
13
31
|
<RadioButton @radioClass="focus:ring-blue-500 mr-2" @radioId="image_icon_type" @value="image" @groupValue={{@options.iconType}} @name="icon_type" @changed={{fn (mut @options.iconType)}} />
|
|
@@ -3,17 +3,25 @@
|
|
|
3
3
|
<div class="flex flex-col items-center justify-center mb-2">
|
|
4
4
|
<FaIcon @icon="network-wired" @size="4x" class="text-sky-400" />
|
|
5
5
|
<div class="my-2 text-center">
|
|
6
|
-
<h2 class="dark:text-gray-50 font-semibold">
|
|
6
|
+
<h2 class="dark:text-gray-50 font-semibold">{{t "storefront.component.modals.create-network.title"}}</h2>
|
|
7
7
|
<p class="my-2 px-6 dark:text-gray-100">
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
{{t "storefront.component.modals.create-network.message-line1"}}
|
|
9
|
+
{{t "storefront.component.modals.create-network.message-line2"}}
|
|
10
|
+
{{t "storefront.component.modals.create-network.message-line3"}}
|
|
11
11
|
</p>
|
|
12
12
|
</div>
|
|
13
13
|
</div>
|
|
14
|
-
<InputGroup @name="
|
|
15
|
-
<InputGroup
|
|
16
|
-
|
|
14
|
+
<InputGroup @name={{t "storefront.component.modals.create-network.name"}} @value={{@options.network.name}} @helpText={{t "storefront.component.modals.create-network.name-text"}} />
|
|
15
|
+
<InputGroup
|
|
16
|
+
@name={{t "storefront.component.modals.create-network.description"}}
|
|
17
|
+
@value={{@options.network.description}}
|
|
18
|
+
@helpText={{t "storefront.component.modals.create-network.description-text"}}
|
|
19
|
+
/>
|
|
20
|
+
<InputGroup
|
|
21
|
+
@name={{t "storefront.component.modals.create-network.currency"}}
|
|
22
|
+
@value={{@options.network.currency}}
|
|
23
|
+
@helpText={{t "storefront.component.modals.create-network.currency-text"}}
|
|
24
|
+
>
|
|
17
25
|
<CurrencySelect @value={{@options.network.currency}} @onSelect={{fn (mut @options.network.currency)}} @triggerClass="w-full form-select" />
|
|
18
26
|
</InputGroup>
|
|
19
27
|
</div>
|
|
@@ -1,12 +1,28 @@
|
|
|
1
1
|
<Modal::Default @modalIsOpened={{@modalIsOpened}} @options={{@options}} @confirm={{@onConfirm}} @decline={{@onDecline}}>
|
|
2
2
|
<div class="modal-body-container">
|
|
3
|
-
<InputGroup
|
|
4
|
-
|
|
3
|
+
<InputGroup
|
|
4
|
+
@name={{t "storefront.component.modals.create-new-variant.name"}}
|
|
5
|
+
@value={{@options.productVariant.name}}
|
|
6
|
+
@helpText={{t "storefront.component.modals.create-new-variant.name-text"}}
|
|
7
|
+
/>
|
|
8
|
+
<InputGroup
|
|
9
|
+
@name={{t "storefront.component.modals.create-new-variant.description"}}
|
|
10
|
+
@value={{@options.productVariant.description}}
|
|
11
|
+
@helpText={{t "storefront.component.modals.create-new-variant.description-text"}}
|
|
12
|
+
/>
|
|
5
13
|
<div class="input-group mb-2">
|
|
6
|
-
<Checkbox
|
|
14
|
+
<Checkbox
|
|
15
|
+
@value={{@options.productVariant.is_multiselect}}
|
|
16
|
+
@label={{t "storefront.component.modals.create-new-variant.checkbox-1"}}
|
|
17
|
+
@onToggle={{fn (mut @options.productVariant.is_multiselect)}}
|
|
18
|
+
/>
|
|
7
19
|
</div>
|
|
8
20
|
<div class="input-group">
|
|
9
|
-
<Checkbox
|
|
21
|
+
<Checkbox
|
|
22
|
+
@value={{@options.productVariant.is_required}}
|
|
23
|
+
@label={{t "storefront.component.modals.create-new-variant.checkbox-2"}}
|
|
24
|
+
@onToggle={{fn (mut @options.productVariant.is_required)}}
|
|
25
|
+
/>
|
|
10
26
|
</div>
|
|
11
27
|
<InputGroup>
|
|
12
28
|
<TranslationsEditor @value={{@options.productVariant.translations}} @defaultKeys={{array "name" "description"}} @onChange={{fn (mut @options.productVariant.translations)}} />
|
|
@@ -2,40 +2,45 @@
|
|
|
2
2
|
<div class="modal-body-container">
|
|
3
3
|
{{#unless @options.channel.id}}
|
|
4
4
|
<div class="mb-4 w-full">
|
|
5
|
-
<InputGroup @name="
|
|
6
|
-
<Select
|
|
7
|
-
|
|
5
|
+
<InputGroup @name={{t "storefront.component.modals.create-notification-channel.title"}} @helpText={{t "storefront.component.modals.create-notification-channel.title-text"}}>
|
|
6
|
+
<Select
|
|
7
|
+
class="w-full"
|
|
8
|
+
@placeholder={{t "storefront.component.modals.create-notification-channel.title-text"}}
|
|
9
|
+
@options={{@options.schemaOptions}}
|
|
10
|
+
@optionLabel="name"
|
|
11
|
+
@optionValue="value"
|
|
12
|
+
@onSelect={{@options.selectSchema}}
|
|
13
|
+
@humanize={{true}}
|
|
14
|
+
/>
|
|
8
15
|
</InputGroup>
|
|
9
16
|
</div>
|
|
10
17
|
{{/unless}}
|
|
11
18
|
|
|
12
19
|
{{#if @options.schema}}
|
|
13
|
-
<InputGroup
|
|
14
|
-
@
|
|
20
|
+
<InputGroup
|
|
21
|
+
@name={{t "storefront.component.modals.create-notification-channel.name"}}
|
|
22
|
+
@value={{@options.channel.name}}
|
|
23
|
+
@helpText={{t "storefront.component.modals.create-notification-channel.name-text"}}
|
|
24
|
+
/>
|
|
15
25
|
{{#if @options.channel.id}}
|
|
16
|
-
<InputGroup @name="
|
|
17
|
-
@
|
|
18
|
-
<ClickToReveal @value={{@options.channel.app_key}} @clickToCopy={{true}}
|
|
19
|
-
class="form-input disabled" />
|
|
26
|
+
<InputGroup @name={{t "storefront.component.modals.create-notification-channel.key"}} @helpText={{t "storefront.component.modals.create-notification-channel.key-text"}}>
|
|
27
|
+
<ClickToReveal @value={{@options.channel.app_key}} @clickToCopy={{true}} class="form-input disabled" />
|
|
20
28
|
</InputGroup>
|
|
21
29
|
{{/if}}
|
|
22
30
|
<div class="p-2 rounded-md my-2 border border-gray-800">
|
|
23
|
-
<h4 class="mb-2 font-semibold text-sm dark:text-white">
|
|
31
|
+
<h4 class="mb-2 font-semibold text-sm dark:text-white">{{t "storefront.common.config"}}</h4>
|
|
24
32
|
{{#each-in @options.schema as |key value|}}
|
|
25
33
|
{{#if (is-bool-value value)}}
|
|
26
34
|
<div class="input-group">
|
|
27
|
-
<Checkbox @value={{value}} @label={{humanize key}} @onToggle={{fn @options.setConfigKey
|
|
28
|
-
key}} />
|
|
35
|
+
<Checkbox @value={{value}} @label={{humanize key}} @onToggle={{fn @options.setConfigKey key}} />
|
|
29
36
|
</div>
|
|
30
|
-
{{else if (or (eq key
|
|
37
|
+
{{else if (or (eq key "private_key_content") (eq key "firebase_credentials_json"))}}
|
|
31
38
|
<InputGroup @name={{humanize key}}>
|
|
32
|
-
<Textarea class="form-input w-full" rows="6" placeholder={{humanize key}} @value={{value}} {{on "blur"
|
|
33
|
-
(fn @options.setConfigKey key)}} />
|
|
39
|
+
<Textarea class="form-input w-full" rows="6" placeholder={{humanize key}} @value={{value}} {{on "blur" (fn @options.setConfigKey key)}} />
|
|
34
40
|
</InputGroup>
|
|
35
41
|
{{else}}
|
|
36
42
|
<InputGroup @name={{humanize key}}>
|
|
37
|
-
<Input class="form-input w-full" placeholder={{humanize key}} @value={{value}} {{on "blur"
|
|
38
|
-
(fn @options.setConfigKey key)}} />
|
|
43
|
+
<Input class="form-input w-full" placeholder={{humanize key}} @value={{value}} {{on "blur" (fn @options.setConfigKey key)}} />
|
|
39
44
|
</InputGroup>
|
|
40
45
|
{{/if}}
|
|
41
46
|
{{/each-in}}
|
|
@@ -1,24 +1,39 @@
|
|
|
1
1
|
<Modal::Default @modalIsOpened={{@modalIsOpened}} @options={{@options}} @confirm={{@onConfirm}} @decline={{@onDecline}}>
|
|
2
2
|
<div class="modal-body-container">
|
|
3
|
-
<InputGroup
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
<InputGroup
|
|
4
|
+
@name={{t "storefront.component.modals.create-product-category.name"}}
|
|
5
|
+
@value={{@options.category.name}}
|
|
6
|
+
@helpText={{t "storefront.component.modals.create-product-category.name-text"}}
|
|
7
|
+
/>
|
|
8
|
+
<InputGroup
|
|
9
|
+
@name={{t "storefront.component.modals.create-product-category.description"}}
|
|
10
|
+
@value={{@options.category.description}}
|
|
11
|
+
@helpText={{t "storefront.component.modals.create-product-category.description-text"}}
|
|
12
|
+
/>
|
|
13
|
+
<InputGroup @name={{t "storefront.component.modals.create-product-category.icon"}}>
|
|
6
14
|
<div class="flex flex-row">
|
|
7
15
|
<div class="mr-4">
|
|
8
|
-
<Image
|
|
16
|
+
<Image
|
|
17
|
+
src={{@options.category.icon_url}}
|
|
18
|
+
@fallbackSrc={{config "defaultValues.categoryImage"}}
|
|
19
|
+
alt={{@options.category.name}}
|
|
20
|
+
height="80"
|
|
21
|
+
width="80"
|
|
22
|
+
class="h-20 w-20 rounded-md"
|
|
23
|
+
/>
|
|
9
24
|
</div>
|
|
10
25
|
<div class="flex-1">
|
|
11
|
-
<FileUpload @name="photos" @accept="image/*" @onFileAdded={{@options.uploadNewPhoto}} as |queue|>
|
|
26
|
+
<FileUpload @name={{t "storefront.common.photos"}} @accept="image/*" @onFileAdded={{@options.uploadNewPhoto}} as |queue|>
|
|
12
27
|
<a tabindex={{0}} class="flex items-center px-0 mt-2 text-xs no-underline truncate btn btn-sm btn-default">
|
|
13
28
|
{{#if queue.files.length}}
|
|
14
29
|
<Spinner class="mr-1" />
|
|
15
30
|
<span>
|
|
16
|
-
|
|
31
|
+
{{t "storefront.common.uploading"}}
|
|
17
32
|
</span>
|
|
18
33
|
{{else}}
|
|
19
34
|
<FaIcon @icon="image" class="mr-1" />
|
|
20
35
|
<span>
|
|
21
|
-
|
|
36
|
+
{{t "storefront.component.modals.create-product-category.uploading-new"}}
|
|
22
37
|
</span>
|
|
23
38
|
{{/if}}
|
|
24
39
|
</a>
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
<Modal::Default @modalIsOpened={{@modalIsOpened}} @options={{@options}} @confirm={{@onConfirm}} @decline={{@onDecline}}>
|
|
2
2
|
<div class="modal-body-container">
|
|
3
|
-
<InputGroup @name="
|
|
4
|
-
<InputGroup
|
|
5
|
-
|
|
3
|
+
<InputGroup @name={{t "storefront.component.modals.create-store.name"}} @value={{@options.store.name}} @helpText={{t "storefront.component.modals.create-store.name-text"}} />
|
|
4
|
+
<InputGroup
|
|
5
|
+
@name={{t "storefront.component.modals.create-store.description"}}
|
|
6
|
+
@value={{@options.store.description}}
|
|
7
|
+
@helpText={{t "storefront.component.modals.create-store.description-text"}}
|
|
8
|
+
/>
|
|
9
|
+
<InputGroup
|
|
10
|
+
@name={{t "storefront.component.modals.create-store.currency"}}
|
|
11
|
+
@value={{@options.store.currency}}
|
|
12
|
+
@helpText={{t "storefront.component.modals.create-store.currency-text"}}
|
|
13
|
+
>
|
|
6
14
|
<CurrencySelect @value={{@options.store.currency}} @onSelect={{fn (mut @options.store.currency)}} @triggerClass="w-full form-select" />
|
|
7
15
|
</InputGroup>
|
|
8
16
|
</div>
|
|
@@ -1,38 +1,47 @@
|
|
|
1
1
|
<Modal::Default @modalIsOpened={{@modalIsOpened}} @options={{@options}} @confirm={{@onConfirm}} @decline={{@onDecline}}>
|
|
2
2
|
<div class="modal-body-container my-5">
|
|
3
3
|
{{#if @options.isProcessing}}
|
|
4
|
-
<div
|
|
4
|
+
<div
|
|
5
|
+
class="min-h-56 dropzone w-full rounded px-4 py-8 min-h 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"
|
|
6
|
+
>
|
|
5
7
|
<div class="flex items-center justify-center py-5">
|
|
6
|
-
<Spinner class="text-sm dark:text-gray-100" @loadingMessage="
|
|
8
|
+
<Spinner class="text-sm dark:text-gray-100" @loadingMessage={{t "storefront.component.modals.import-products.uploading-message"}} />
|
|
7
9
|
</div>
|
|
8
10
|
</div>
|
|
9
11
|
{{else}}
|
|
10
|
-
<FileDropzone
|
|
11
|
-
@
|
|
12
|
+
<FileDropzone
|
|
13
|
+
@name="spreadsheets"
|
|
14
|
+
@multiple={{true}}
|
|
15
|
+
@onFileAdded={{@options.queueFile}}
|
|
16
|
+
@accept={{join "," @options.acceptedFileTypes}}
|
|
17
|
+
class="min-h-56 dropzone w-full rounded px-4 py-8 min-h 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"
|
|
18
|
+
as |dropzone queue|
|
|
19
|
+
>
|
|
12
20
|
{{#if dropzone.active}}
|
|
13
21
|
{{#if dropzone.valid}}
|
|
14
|
-
|
|
22
|
+
{{t "storefront.component.modals.import-products.drop-upload"}}
|
|
15
23
|
{{else}}
|
|
16
|
-
|
|
24
|
+
{{t "storefront.common.invalid"}}
|
|
17
25
|
{{/if}}
|
|
18
26
|
{{else if queue.files.length}}
|
|
19
27
|
<div class="my-2">
|
|
20
28
|
<FaIcon @icon="file-spreadsheet" class="text-indigo-500 mr-2" />
|
|
21
|
-
{{pluralize queue.files.length "spreadsheet"}}
|
|
29
|
+
{{pluralize queue.files.length "spreadsheet"}}
|
|
30
|
+
{{t "storefront.component.modals.import-products.ready-upload"}}
|
|
22
31
|
</div>
|
|
23
32
|
<div class="my-2">({{queue.progress}}%)</div>
|
|
24
33
|
{{else}}
|
|
25
34
|
<h4 class="font-semibold mb-8">
|
|
26
|
-
<FaIcon @icon="file-spreadsheet" class="text-indigo-500 mr-2" />
|
|
35
|
+
<FaIcon @icon="file-spreadsheet" class="text-indigo-500 mr-2" />
|
|
36
|
+
{{t "storefront.component.modals.import-products.upload-spreadsheets"}}
|
|
27
37
|
</h4>
|
|
28
38
|
<div>
|
|
29
39
|
{{#if dropzone.supported}}
|
|
30
|
-
<p class="text-base font-semibold my-5">
|
|
40
|
+
<p class="text-base font-semibold my-5">{{t "storefront.component.modals.import-products.drag-drop"}}</p>
|
|
31
41
|
{{/if}}
|
|
32
42
|
|
|
33
43
|
<FileUpload @name="spreadsheets" @for="spreadsheets" @accept={{join "," @options.acceptedFileTypes}} @multiple={{true}} @onFileAdded={{@options.queueFile}}>
|
|
34
|
-
<a tabindex="0" class="btn btn-magic cursor-pointer ml-1 hover:text-white">
|
|
35
|
-
upload.</a>
|
|
44
|
+
<a tabindex="0" class="btn btn-magic cursor-pointer ml-1 hover:text-white">{{t "storefront.component.modals.import-products.select-spreadsheets"}}</a>
|
|
36
45
|
</FileUpload>
|
|
37
46
|
</div>
|
|
38
47
|
{{/if}}
|
|
@@ -41,7 +50,7 @@
|
|
|
41
50
|
{{#if @options.uploadQueue}}
|
|
42
51
|
<div class="my-6">
|
|
43
52
|
<div class="mb-2">
|
|
44
|
-
<span class="text-sm leading-5 text-gray-500 dark:text-white">
|
|
53
|
+
<span class="text-sm leading-5 text-gray-500 dark:text-white">{{t "storefront.component.modals.import-products.upload-queue"}}</span>
|
|
45
54
|
</div>
|
|
46
55
|
|
|
47
56
|
<div class="table-wrapper">
|
|
@@ -82,11 +91,21 @@
|
|
|
82
91
|
<div class="mt-6">
|
|
83
92
|
<div class="mb-2">
|
|
84
93
|
<p class="text-sm leading-5 text-gray-500 dark:text-white">
|
|
85
|
-
|
|
94
|
+
{{t "storefront.component.modals.import-products.optionally-select-category"}}
|
|
86
95
|
</p>
|
|
87
96
|
</div>
|
|
88
|
-
<InputGroup @wrapperClass="mb-0" @name=
|
|
89
|
-
<ModelSelect
|
|
97
|
+
<InputGroup @wrapperClass="mb-0" @name={{t "storefront.component.modals.import-products.select-category"}}>
|
|
98
|
+
<ModelSelect
|
|
99
|
+
@modelName="category"
|
|
100
|
+
@query={{hash for="storefront_product" owner_uuid=@options.store.id}}
|
|
101
|
+
@selectedModel={{@options.selectedCategory}}
|
|
102
|
+
@placeholder={{t "storefront.component.modals.import-products.select-category"}}
|
|
103
|
+
@triggerClass="form-select form-input"
|
|
104
|
+
@infiniteScroll={{false}}
|
|
105
|
+
@renderInPlace={{true}}
|
|
106
|
+
@onChange={{fn (mut @options.selectedCategory)}}
|
|
107
|
+
as |model|
|
|
108
|
+
>
|
|
90
109
|
{{model.name}}
|
|
91
110
|
</ModelSelect>
|
|
92
111
|
</InputGroup>
|