@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.
Files changed (73) hide show
  1. package/addon/components/file-record.hbs +9 -2
  2. package/addon/components/file-record.js +3 -2
  3. package/addon/components/modals/add-store-hours.hbs +12 -2
  4. package/addon/components/modals/assign-driver.hbs +18 -5
  5. package/addon/components/modals/create-first-store.hbs +18 -6
  6. package/addon/components/modals/create-gateway.hbs +19 -7
  7. package/addon/components/modals/create-network-category.hbs +23 -5
  8. package/addon/components/modals/create-network.hbs +15 -7
  9. package/addon/components/modals/create-new-variant.hbs +20 -4
  10. package/addon/components/modals/create-notification-channel.hbs +22 -17
  11. package/addon/components/modals/create-product-category.hbs +22 -7
  12. package/addon/components/modals/create-store.hbs +11 -3
  13. package/addon/components/modals/import-products.hbs +34 -15
  14. package/addon/components/modals/incoming-order.hbs +29 -19
  15. package/addon/components/modals/manage-addons.hbs +50 -9
  16. package/addon/components/modals/manage-addons.js +3 -2
  17. package/addon/components/modals/order-ready-assign-driver.hbs +24 -13
  18. package/addon/components/modals/select-addon-category.hbs +8 -1
  19. package/addon/components/modals/share-network.hbs +23 -8
  20. package/addon/components/modals/store-details.hbs +4 -4
  21. package/addon/components/modals/store-form.hbs +24 -5
  22. package/addon/components/modals/store-location-form.hbs +26 -16
  23. package/addon/components/network-category-picker.hbs +17 -6
  24. package/addon/components/schedule-manager.hbs +8 -1
  25. package/addon/components/schedule-manager.js +6 -5
  26. package/addon/components/store-selector.hbs +14 -3
  27. package/addon/components/widget/customers.hbs +16 -7
  28. package/addon/components/widget/customers.js +2 -1
  29. package/addon/components/widget/orders.hbs +58 -23
  30. package/addon/components/widget/orders.js +17 -16
  31. package/addon/components/widget/storefront-metrics.hbs +5 -5
  32. package/addon/controllers/customers/index.js +21 -13
  33. package/addon/controllers/networks/index/network/index.js +16 -9
  34. package/addon/controllers/networks/index/network/stores.js +39 -31
  35. package/addon/controllers/networks/index/network.js +3 -2
  36. package/addon/controllers/networks/index.js +10 -3
  37. package/addon/controllers/orders/index.js +30 -23
  38. package/addon/controllers/products/index/category/edit.js +5 -3
  39. package/addon/controllers/products/index/category/new.js +10 -9
  40. package/addon/controllers/products/index/category.js +8 -7
  41. package/addon/controllers/products/index/index.js +9 -2
  42. package/addon/controllers/products/index.js +9 -8
  43. package/addon/controllers/settings/gateways.js +7 -6
  44. package/addon/controllers/settings/index.js +1 -0
  45. package/addon/controllers/settings/locations.js +18 -11
  46. package/addon/controllers/settings/notifications.js +8 -7
  47. package/addon/services/storefront.js +13 -7
  48. package/addon/templates/application.hbs +8 -8
  49. package/addon/templates/customers/index/edit.hbs +0 -1
  50. package/addon/templates/customers/index.hbs +23 -4
  51. package/addon/templates/home.hbs +1 -1
  52. package/addon/templates/networks/index/network/customers.hbs +0 -1
  53. package/addon/templates/networks/index/network/index.hbs +200 -62
  54. package/addon/templates/networks/index/network/orders.hbs +0 -1
  55. package/addon/templates/networks/index/network/stores.hbs +18 -3
  56. package/addon/templates/networks/index/network.hbs +5 -5
  57. package/addon/templates/networks/index.hbs +12 -7
  58. package/addon/templates/orders/index/edit.hbs +0 -1
  59. package/addon/templates/orders/index/new.hbs +0 -1
  60. package/addon/templates/orders/index/view.hbs +0 -1
  61. package/addon/templates/orders/index.hbs +25 -6
  62. package/addon/templates/products/index/category/new.hbs +65 -12
  63. package/addon/templates/products/index.hbs +27 -6
  64. package/addon/templates/settings/api.hbs +3 -3
  65. package/addon/templates/settings/gateways.hbs +10 -10
  66. package/addon/templates/settings/index.hbs +146 -51
  67. package/addon/templates/settings/locations.hbs +13 -6
  68. package/addon/templates/settings/notifications.hbs +5 -7
  69. package/addon/templates/settings.hbs +6 -6
  70. package/composer.json +3 -3
  71. package/extension.json +1 -1
  72. package/package.json +134 -132
  73. 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 class="file-record-icon {{@fileIconClass}} flex items-center justify-center mb-2 rounded-lg shadow-sm border-4 border-transparent dark:border-gray-900" style={{this.fileBackgroundStyle}}>
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 href="javascript:;" {{on "click" (fn this.deleteFile @file)}} 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">
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: 'Are you sure you wish to delete this file?',
31
- body: 'Once you delete this file you will be unable to recover it.',
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 @type="time" @name="Start time" @value={{@options.hours.start}} @helpText="When availability/operation start" />
5
- <InputGroup @type="time" @name="End time" @value={{@options.hours.end}} @helpText="When availability/operation hours end" />
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 stroke-linecap="round" stroke-linejoin="round" stroke-width="2" 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">
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
- Select a driver to assign to this order.
18
+ {{t "storefront.component.modals.assign-driver.message-driver"}}
14
19
  </p>
15
20
  </div>
16
- <InputGroup class="mt-4" @name="Select Driver">
17
- <ModelSelect @modelName="driver" @selectedModel={{@options.order.driver_assigned}} @placeholder="Select Driver to Assign" @triggerClass="form-select form-input" @infiniteScroll={{false}} @renderInPlace={{true}} @onChange={{fn (mut
18
- @options.order.driver_assigned)}} as |model|>
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">Welcome to Storefront!</h2>
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
- Storefront allows you to quickly setup a headless and dynamic on-demand shop powered by Fleetbase.
9
- Submit the form below to create your first store.
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 @name="Storefront name" @value={{@options.store.name}} @helpText="Enter the name of your store" />
15
- <InputGroup @name="Storefront description" @value={{@options.store.description}} @helpText="Give your store a simple brief description on the types of things sold" />
16
- <InputGroup @name="Storefront currency" @value={{@options.store.currency}} @helpText="Select the default currency for your storefront">
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="Gateway type" @helpText="Select gateway type">
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 @name="Gateway name" @value={{@options.gateway.name}} @helpText="Give your payment gateway a name, this will only be relevent internally" />
11
- <InputGroup @name="Gateway code" @helpText="Identifier code used to identify gateway to the SDK">
12
- <KeyInput @name="Gateway code" @value={{@options.gateway.code}} @onChange={{fn (mut @options.gateway.code)}} />
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 @name="Callback URL" @value={{@options.gateway.callback_url}} @helpText="Callback URL if applicable" />
15
- <InputGroup @name="Return URL" @value={{@options.gateway.return_url}} @helpText="Return URL if applicable" />
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="This is a sandbox gateway" @onToggle={{fn (mut @options.gateway.sandbox)}} />
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="Parent category" @wrapperClass="border-b border-gray-200 dark:border-gray-700 pb-4 mb-3i">
4
- <ModelSelect @modelName="category" @query={{hash for="storefront_network" owner_uuid=@options.network.id}} @selectedModel={{@options.parentCategory}} @placeholder="Select a parent category if any" @triggerClass="form-select form-input" @infiniteScroll={{false}} @renderInPlace={{true}} @onChange={{@options.setParentCategory}} as |model|>
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 @name="Category name" @value={{@options.category.name}} @helpText="Enter a name for category" />
9
- <InputGroup @name="Category description" @value={{@options.category.description}} @helpText="Give your network category a brief description" />
10
- {{!-- <InputGroup @name="Category icon type" @wrapperClass="mb-0">
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">Start a Network</h2>
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
- Storefront allows you to quickly create marketplaces, enabling multiple storefronts to sell under an umbrella.
9
- When you create the network you defined your rules and you're able to expand your network through invitiations.
10
- Get started by creating a network below.
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="Network name" @value={{@options.network.name}} @helpText="Enter the name of your store" />
15
- <InputGroup @name="Network description" @value={{@options.network.description}} @helpText="Give your store a simple brief description on the types of things sold" />
16
- <InputGroup @name="Network currency" @value={{@options.network.currency}} @helpText="Select the default currency for your storefront">
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 @name="Variant name" @value={{@options.productVariant.name}} @helpText="Give your product variant a name" />
4
- <InputGroup @name="Variant description" @value={{@options.productVariant.description}} @helpText="Short description of the variant" />
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 @value={{@options.productVariant.is_multiselect}} @label="Allow user to select multiple variant options at once" @onToggle={{fn (mut @options.productVariant.is_multiselect)}} />
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 @value={{@options.productVariant.is_required}} @label="This product variant selection is required" @onToggle={{fn (mut @options.productVariant.is_required)}} />
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="Channel" @helpText="Select notification channel">
6
- <Select class="w-full" @placeholder="Select notification channel"
7
- @options={{@options.schemaOptions}} @optionLabel="name" @optionValue="value" @onSelect={{@options.selectSchema}} @humanize={{true}} />
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 @name="Channel name" @value={{@options.channel.name}}
14
- @helpText="Give your notification channel a name, this will only be relevent internally" />
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="Channel Key"
17
- @helpText="This is your notification channel key, use this to specify which apps should utilize this notification channel via sdk configs.">
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">Config</h4>
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 'private_key_content') (eq key 'firebase_credentials_json'))}}
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 @name="Category name" @value={{@options.category.name}} @helpText="Enter a name for category" />
4
- <InputGroup @name="Category description" @value={{@options.category.description}} @helpText="Give your product category a brief description" />
5
- <InputGroup @name="Category icon">
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 src={{@options.category.icon_url}} @fallbackSrc={{config "defaultValues.categoryImage"}} alt={{@options.category.name}} height="80" width="80" class="h-20 w-20 rounded-md" />
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
- Uploading...
31
+ {{t "storefront.common.uploading"}}
17
32
  </span>
18
33
  {{else}}
19
34
  <FaIcon @icon="image" class="mr-1" />
20
35
  <span>
21
- Upload new category icon
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="Storefront name" @value={{@options.store.name}} @helpText="Enter the name of your store" />
4
- <InputGroup @name="Storefront description" @value={{@options.store.description}} @helpText="Give your store a simple brief description on the types of things sold" />
5
- <InputGroup @name="Storefront currency" @value={{@options.store.currency}} @helpText="Select the default currency for your storefront">
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 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">
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="Processing import..." />
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 @name="spreadsheets" @multiple={{true}} @onFileAdded={{@options.queueFile}} @accept={{join ","
11
- @options.acceptedFileTypes}} 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" as |dropzone queue|>
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
- Drop to upload
22
+ {{t "storefront.component.modals.import-products.drop-upload"}}
15
23
  {{else}}
16
- Invalid
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"}} ready for upload.
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" /> Upload Spreadsheets
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">Drag and drop spreadsheet files onto this dropzone</p>
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">or select spreadsheets to
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">Upload Queue</span>
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
- Optionally select a category to import products into
94
+ {{t "storefront.component.modals.import-products.optionally-select-category"}}
86
95
  </p>
87
96
  </div>
88
- <InputGroup @wrapperClass="mb-0" @name="Select Category">
89
- <ModelSelect @modelName="category" @query={{hash for="storefront_product" owner_uuid=@options.store.id}} @selectedModel={{@options.selectedCategory}} @placeholder="Select Category" @triggerClass="form-select form-input" @infiniteScroll={{false}} @renderInPlace={{true}} @onChange={{fn (mut @options.selectedCategory)}} as |model|>
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>