@fleetbase/storefront-engine 0.0.1
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/LICENSE.md +9 -0
- package/README.md +32 -0
- package/addon/adapters/addon-category.js +1 -0
- package/addon/adapters/customer.js +1 -0
- package/addon/adapters/gateway.js +1 -0
- package/addon/adapters/network.js +1 -0
- package/addon/adapters/notification-channel.js +1 -0
- package/addon/adapters/product-addon-category.js +1 -0
- package/addon/adapters/product-addon.js +1 -0
- package/addon/adapters/product-hour.js +1 -0
- package/addon/adapters/product-store-location.js +1 -0
- package/addon/adapters/product-variant-option.js +1 -0
- package/addon/adapters/product-variant.js +1 -0
- package/addon/adapters/product.js +1 -0
- package/addon/adapters/store-hour.js +1 -0
- package/addon/adapters/store-location.js +1 -0
- package/addon/adapters/store.js +1 -0
- package/addon/adapters/storefront.js +5 -0
- package/addon/components/file-record.hbs +22 -0
- package/addon/components/file-record.js +43 -0
- package/addon/components/modals/add-store-hours.hbs +8 -0
- package/addon/components/modals/add-stores-to-network.hbs +5 -0
- package/addon/components/modals/assign-driver.hbs +25 -0
- package/addon/components/modals/create-first-store.hbs +21 -0
- package/addon/components/modals/create-gateway.hbs +35 -0
- package/addon/components/modals/create-network-category.hbs +50 -0
- package/addon/components/modals/create-network.hbs +20 -0
- package/addon/components/modals/create-new-variant.hbs +15 -0
- package/addon/components/modals/create-notification-channel.hbs +45 -0
- package/addon/components/modals/create-product-category.hbs +30 -0
- package/addon/components/modals/create-store.hbs +9 -0
- package/addon/components/modals/edit-network.hbs +1 -0
- package/addon/components/modals/import-products.hbs +97 -0
- package/addon/components/modals/incoming-order.hbs +242 -0
- package/addon/components/modals/manage-addons.hbs +50 -0
- package/addon/components/modals/manage-addons.js +86 -0
- package/addon/components/modals/order-ready-assign-driver.hbs +36 -0
- package/addon/components/modals/select-addon-category.hbs +5 -0
- package/addon/components/modals/share-network.hbs +35 -0
- package/addon/components/modals/store-location-form.hbs +30 -0
- package/addon/components/order-card.hbs +1 -0
- package/addon/components/order-card.js +3 -0
- package/addon/components/schedule-manager.hbs +22 -0
- package/addon/components/schedule-manager.js +73 -0
- package/addon/components/settings-container.hbs +7 -0
- package/addon/components/store-selector.hbs +21 -0
- package/addon/components/store-selector.js +20 -0
- package/addon/components/widget/customers.hbs +44 -0
- package/addon/components/widget/customers.js +53 -0
- package/addon/components/widget/orders.hbs +111 -0
- package/addon/components/widget/orders.js +248 -0
- package/addon/components/widget/storefront-metrics.hbs +54 -0
- package/addon/components/widget/storefront-metrics.js +61 -0
- package/addon/controllers/application.js +33 -0
- package/addon/controllers/customers/index.js +267 -0
- package/addon/controllers/home.js +3 -0
- package/addon/controllers/networks/index/network/customers.js +3 -0
- package/addon/controllers/networks/index/network/index.js +147 -0
- package/addon/controllers/networks/index/network/orders.js +3 -0
- package/addon/controllers/networks/index/network/stores.js +370 -0
- package/addon/controllers/networks/index/network.js +29 -0
- package/addon/controllers/networks/index.js +138 -0
- package/addon/controllers/orders/index.js +331 -0
- package/addon/controllers/products/index/category/edit.js +62 -0
- package/addon/controllers/products/index/category/new.js +287 -0
- package/addon/controllers/products/index/category.js +163 -0
- package/addon/controllers/products/index/index/edit.js +1 -0
- package/addon/controllers/products/index/index.js +136 -0
- package/addon/controllers/products/index.js +203 -0
- package/addon/controllers/settings/api.js +3 -0
- package/addon/controllers/settings/gateways.js +110 -0
- package/addon/controllers/settings/index.js +102 -0
- package/addon/controllers/settings/locations.js +186 -0
- package/addon/controllers/settings/notifications.js +102 -0
- package/addon/engine.js +19 -0
- package/addon/helpers/get-tip-amount.js +5 -0
- package/addon/models/addon-category.js +6 -0
- package/addon/models/gateway.js +46 -0
- package/addon/models/network.js +166 -0
- package/addon/models/notification-channel.js +47 -0
- package/addon/models/product-addon-category.js +41 -0
- package/addon/models/product-addon.js +41 -0
- package/addon/models/product-hour.js +72 -0
- package/addon/models/product-store-location.js +41 -0
- package/addon/models/product-variant-option.js +39 -0
- package/addon/models/product-variant.js +44 -0
- package/addon/models/product.js +208 -0
- package/addon/models/store-hour.js +72 -0
- package/addon/models/store-location.js +93 -0
- package/addon/models/store.js +100 -0
- package/addon/routes/application.js +47 -0
- package/addon/routes/customers/index/edit.js +3 -0
- package/addon/routes/customers/index.js +25 -0
- package/addon/routes/home.js +3 -0
- package/addon/routes/networks/index/network/customers.js +3 -0
- package/addon/routes/networks/index/network/index.js +15 -0
- package/addon/routes/networks/index/network/orders.js +3 -0
- package/addon/routes/networks/index/network/stores.js +28 -0
- package/addon/routes/networks/index/network.js +10 -0
- package/addon/routes/networks/index.js +19 -0
- package/addon/routes/orders/index/edit.js +3 -0
- package/addon/routes/orders/index/new.js +3 -0
- package/addon/routes/orders/index/view.js +3 -0
- package/addon/routes/orders/index.js +29 -0
- package/addon/routes/products/index/category/edit.js +15 -0
- package/addon/routes/products/index/category/new.js +7 -0
- package/addon/routes/products/index/category.js +54 -0
- package/addon/routes/products/index/index/edit.js +1 -0
- package/addon/routes/products/index/index.js +22 -0
- package/addon/routes/products/index.js +21 -0
- package/addon/routes/settings/api.js +10 -0
- package/addon/routes/settings/gateways.js +11 -0
- package/addon/routes/settings/index.js +16 -0
- package/addon/routes/settings/locations.js +14 -0
- package/addon/routes/settings/notifications.js +11 -0
- package/addon/routes.js +48 -0
- package/addon/serializers/addon-category.js +15 -0
- package/addon/serializers/network.js +19 -0
- package/addon/serializers/notification-channel.js +15 -0
- package/addon/serializers/product-addon-category.js +15 -0
- package/addon/serializers/product-variant.js +15 -0
- package/addon/serializers/product.js +20 -0
- package/addon/serializers/store-location.js +17 -0
- package/addon/serializers/store.js +19 -0
- package/addon/services/storefront.js +208 -0
- package/addon/templates/application.hbs +16 -0
- package/addon/templates/customers/index/edit.hbs +2 -0
- package/addon/templates/customers/index.hbs +22 -0
- package/addon/templates/home.hbs +7 -0
- package/addon/templates/networks/index/network/customers.hbs +2 -0
- package/addon/templates/networks/index/network/index.hbs +254 -0
- package/addon/templates/networks/index/network/orders.hbs +2 -0
- package/addon/templates/networks/index/network/stores.hbs +164 -0
- package/addon/templates/networks/index/network.hbs +38 -0
- package/addon/templates/networks/index.hbs +60 -0
- package/addon/templates/orders/index/edit.hbs +2 -0
- package/addon/templates/orders/index/new.hbs +2 -0
- package/addon/templates/orders/index/view.hbs +2 -0
- package/addon/templates/orders/index.hbs +22 -0
- package/addon/templates/products/index/category/edit.hbs +1 -0
- package/addon/templates/products/index/category/new.hbs +248 -0
- package/addon/templates/products/index/category.hbs +41 -0
- package/addon/templates/products/index/index/edit.hbs +1 -0
- package/addon/templates/products/index/index.hbs +40 -0
- package/addon/templates/products/index.hbs +22 -0
- package/addon/templates/settings/api.hbs +18 -0
- package/addon/templates/settings/gateways.hbs +48 -0
- package/addon/templates/settings/index.hbs +229 -0
- package/addon/templates/settings/locations.hbs +39 -0
- package/addon/templates/settings/notifications.hbs +35 -0
- package/addon/templates/settings.hbs +30 -0
- package/addon/utils/get-gateway-schemas.js +34 -0
- package/addon/utils/get-notification-schemas.js +18 -0
- package/app/adapters/addon-category.js +1 -0
- package/app/adapters/gateway.js +1 -0
- package/app/adapters/network.js +1 -0
- package/app/adapters/notification-channel.js +1 -0
- package/app/adapters/product-addon-category.js +1 -0
- package/app/adapters/product-addon.js +1 -0
- package/app/adapters/product-hour.js +1 -0
- package/app/adapters/product-store-location.js +1 -0
- package/app/adapters/product-variant-option.js +1 -0
- package/app/adapters/product-variant.js +1 -0
- package/app/adapters/product.js +1 -0
- package/app/adapters/store-hour.js +1 -0
- package/app/adapters/store-location.js +1 -0
- package/app/adapters/store.js +1 -0
- package/app/adapters/storefront.js +1 -0
- package/app/components/file-record.js +1 -0
- package/app/components/modals/add-store-hours.js +1 -0
- package/app/components/modals/add-stores-to-network.js +1 -0
- package/app/components/modals/assign-driver.js +1 -0
- package/app/components/modals/create-first-store.js +1 -0
- package/app/components/modals/create-gateway.js +1 -0
- package/app/components/modals/create-network-category.js +1 -0
- package/app/components/modals/create-network.js +1 -0
- package/app/components/modals/create-new-variant.js +1 -0
- package/app/components/modals/create-notification-channel.js +1 -0
- package/app/components/modals/create-product-category.js +1 -0
- package/app/components/modals/create-store.js +1 -0
- package/app/components/modals/edit-network.js +1 -0
- package/app/components/modals/import-products.js +1 -0
- package/app/components/modals/incoming-order.js +1 -0
- package/app/components/modals/manage-addons.js +1 -0
- package/app/components/modals/order-ready-assign-driver.js +1 -0
- package/app/components/modals/select-addon-category.js +1 -0
- package/app/components/modals/share-network.js +1 -0
- package/app/components/modals/store-location-form.js +1 -0
- package/app/components/order-card.js +1 -0
- package/app/components/schedule-manager.js +1 -0
- package/app/components/settings-container.js +1 -0
- package/app/components/store-selector.js +1 -0
- package/app/components/widget/customers.js +1 -0
- package/app/components/widget/orders.js +1 -0
- package/app/components/widget/storefront-metrics.js +1 -0
- package/app/controllers/application.js +1 -0
- package/app/controllers/customers/index.js +1 -0
- package/app/controllers/home.js +1 -0
- package/app/controllers/networks/index/network/customers.js +1 -0
- package/app/controllers/networks/index/network/index.js +1 -0
- package/app/controllers/networks/index/network/orders.js +1 -0
- package/app/controllers/networks/index/network/stores.js +1 -0
- package/app/controllers/networks/index/network.js +1 -0
- package/app/controllers/networks/index.js +1 -0
- package/app/controllers/orders/index.js +1 -0
- package/app/controllers/products/index/category/edit.js +1 -0
- package/app/controllers/products/index/category/new.js +1 -0
- package/app/controllers/products/index/category.js +1 -0
- package/app/controllers/products/index/index/edit.js +1 -0
- package/app/controllers/products/index/index.js +1 -0
- package/app/controllers/products/index.js +1 -0
- package/app/controllers/settings/api.js +1 -0
- package/app/controllers/settings/gateways.js +1 -0
- package/app/controllers/settings/index.js +1 -0
- package/app/controllers/settings/locations.js +1 -0
- package/app/controllers/settings/notifications.js +1 -0
- package/app/helpers/get-tip-amount.js +1 -0
- package/app/models/addon-category.js +1 -0
- package/app/models/gateway.js +1 -0
- package/app/models/network.js +1 -0
- package/app/models/notification-channel.js +1 -0
- package/app/models/product-addon-category.js +1 -0
- package/app/models/product-addon.js +1 -0
- package/app/models/product-hour.js +1 -0
- package/app/models/product-store-location.js +1 -0
- package/app/models/product-variant-option.js +1 -0
- package/app/models/product-variant.js +1 -0
- package/app/models/product.js +1 -0
- package/app/models/store-hour.js +1 -0
- package/app/models/store-location.js +1 -0
- package/app/models/store.js +1 -0
- package/app/routes/application.js +1 -0
- package/app/routes/customers/index/edit.js +1 -0
- package/app/routes/customers/index.js +1 -0
- package/app/routes/home.js +1 -0
- package/app/routes/networks/index/network/customers.js +1 -0
- package/app/routes/networks/index/network/index.js +1 -0
- package/app/routes/networks/index/network/orders.js +1 -0
- package/app/routes/networks/index/network/stores.js +1 -0
- package/app/routes/networks/index/network.js +1 -0
- package/app/routes/networks/index.js +1 -0
- package/app/routes/orders/index/edit.js +1 -0
- package/app/routes/orders/index/new.js +1 -0
- package/app/routes/orders/index/view.js +1 -0
- package/app/routes/orders/index.js +1 -0
- package/app/routes/products/index/category/edit.js +1 -0
- package/app/routes/products/index/category/new.js +1 -0
- package/app/routes/products/index/category.js +1 -0
- package/app/routes/products/index/index/edit.js +1 -0
- package/app/routes/products/index/index.js +1 -0
- package/app/routes/products/index.js +1 -0
- package/app/routes/settings/api.js +1 -0
- package/app/routes/settings/gateways.js +1 -0
- package/app/routes/settings/index.js +1 -0
- package/app/routes/settings/locations.js +1 -0
- package/app/routes/settings/notifications.js +1 -0
- package/app/serializers/addon-category.js +1 -0
- package/app/serializers/network.js +1 -0
- package/app/serializers/notification-channel.js +1 -0
- package/app/serializers/product-addon-category.js +1 -0
- package/app/serializers/product-variant.js +1 -0
- package/app/serializers/product.js +1 -0
- package/app/serializers/store-location.js +1 -0
- package/app/serializers/store.js +1 -0
- package/app/services/storefront.js +1 -0
- package/app/templates/customers/index/edit.js +1 -0
- package/app/templates/customers/index.js +1 -0
- package/app/templates/home.js +1 -0
- package/app/templates/networks/index/network/customers.js +1 -0
- package/app/templates/networks/index/network/index.js +1 -0
- package/app/templates/networks/index/network/orders.js +1 -0
- package/app/templates/networks/index/network/stores.js +1 -0
- package/app/templates/networks/index/network.js +1 -0
- package/app/templates/networks/index.js +1 -0
- package/app/templates/orders/index/edit.js +1 -0
- package/app/templates/orders/index/new.js +1 -0
- package/app/templates/orders/index/view.js +1 -0
- package/app/templates/orders/index.js +1 -0
- package/app/templates/products/index/category/edit.js +1 -0
- package/app/templates/products/index/category/new.js +1 -0
- package/app/templates/products/index/category.js +1 -0
- package/app/templates/products/index/index/edit.js +1 -0
- package/app/templates/products/index/index.js +1 -0
- package/app/templates/products/index.js +1 -0
- package/app/templates/settings/api.js +1 -0
- package/app/templates/settings/gateways.js +1 -0
- package/app/templates/settings/index.js +1 -0
- package/app/templates/settings/locations.js +1 -0
- package/app/templates/settings/notifications.js +1 -0
- package/app/templates/settings.js +1 -0
- package/app/utils/get-gateway-schemas.js +1 -0
- package/app/utils/get-notification-schemas.js +1 -0
- package/config/environment.js +21 -0
- package/index.js +22 -0
- package/package.json +123 -0
- package/pnpm-lock.yaml +12509 -0
package/LICENSE.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# @fleetbase/storefront-engine
|
|
2
|
+
|
|
3
|
+
[Short description of the addon.]
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Compatibility
|
|
7
|
+
|
|
8
|
+
* Ember.js v3.24 or above
|
|
9
|
+
* Ember CLI v3.24 or above
|
|
10
|
+
* Node.js v14 or above
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
ember install @fleetbase/storefront-engine
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
## Usage
|
|
21
|
+
|
|
22
|
+
[Longer description of how to use the addon in apps.]
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## Contributing
|
|
26
|
+
|
|
27
|
+
See the [Contributing](CONTRIBUTING.md) guide for details.
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## License
|
|
31
|
+
|
|
32
|
+
This project is licensed under the [MIT License](LICENSE.md).
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './storefront';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './storefront';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './storefront';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './storefront';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './storefront';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './storefront';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './storefront';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './storefront';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './storefront';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './storefront';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './storefront';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './storefront';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './storefront';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './storefront';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './storefront';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<div class="file-record relative" ...attributes>
|
|
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}}>
|
|
4
|
+
{{#if this.isVideo}}
|
|
5
|
+
<FaIcon @icon="file-video" @size="3x" class="text-sky-400" />
|
|
6
|
+
{{/if}}
|
|
7
|
+
</div>
|
|
8
|
+
<div class="bg-blue-500 text-gray-100 text-xs text-center rounded-md px-3 py-1 truncate w-32">
|
|
9
|
+
<span>{{@file.original_filename}}</span>
|
|
10
|
+
</div>
|
|
11
|
+
{{#if (has-block)}}
|
|
12
|
+
<div class="mt-2">
|
|
13
|
+
{{yield @file}}
|
|
14
|
+
</div>
|
|
15
|
+
{{/if}}
|
|
16
|
+
</div>
|
|
17
|
+
<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">
|
|
19
|
+
<FaIcon @icon="trash" class="text-white" />
|
|
20
|
+
</a>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
2
|
+
import { inject as service } from '@ember/service';
|
|
3
|
+
import { action } from '@ember/object';
|
|
4
|
+
import { alias } from '@ember/object/computed';
|
|
5
|
+
import isVideo from '@fleetbase/ember-core/utils/is-video-file';
|
|
6
|
+
import isImage from '@fleetbase/ember-core/utils/is-image-file';
|
|
7
|
+
|
|
8
|
+
export default class FileRecordComponent extends Component {
|
|
9
|
+
@service modalsManager;
|
|
10
|
+
@alias('args.file') file;
|
|
11
|
+
|
|
12
|
+
get isVideo() {
|
|
13
|
+
return isVideo(this.file.content_type);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
get isImage() {
|
|
17
|
+
return isImage(this.file.content_type);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
get previewUrl() {
|
|
21
|
+
return this.isImage ? this.file.url : '';
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
get fileBackgroundStyle() {
|
|
25
|
+
return `background-size: 100% 100%; background-repeat: no-repeat; background-image: url('${this.previewUrl}'); width: 8rem; height: 8rem;`;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@action deleteFile(file) {
|
|
29
|
+
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.',
|
|
32
|
+
confirm: (modal) => {
|
|
33
|
+
file.destroyRecord();
|
|
34
|
+
|
|
35
|
+
if (typeof this.args.onDelete === 'function') {
|
|
36
|
+
this.args.onDelete(file);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
modal.done();
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<Modal::Default @modalIsOpened={{@modalIsOpened}} @options={{@options}} @confirm={{@onConfirm}} @decline={{@onDecline}}>
|
|
2
|
+
<div class="modal-body-container">
|
|
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" />
|
|
6
|
+
</div>
|
|
7
|
+
</div>
|
|
8
|
+
</Modal::Default>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<Modal::Default @modalIsOpened={{@modalIsOpened}} @options={{@options}} @confirm={{@onConfirm}} @decline={{@onDecline}}>
|
|
2
|
+
<div class="modal-body-container">
|
|
3
|
+
<ComboBox @options={{@options.stores}} @selected={{@options.members}} @optionLabel="name" @comparator="id" @selectionBoxLabel="Selected" @onChange={{@options.updateSelected}} />
|
|
4
|
+
</div>
|
|
5
|
+
</Modal::Default>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<Modal::Default @modalIsOpened={{@modalIsOpened}} @options={{@options}} @confirm={{@onConfirm}} @decline={{@onDecline}}>
|
|
2
|
+
<div class="modal-body-container">
|
|
3
|
+
<div class="sm:flex sm:items-start">
|
|
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
|
+
<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">
|
|
7
|
+
</path>
|
|
8
|
+
</svg>
|
|
9
|
+
</div>
|
|
10
|
+
<div class="mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left">
|
|
11
|
+
<div class="mb-4">
|
|
12
|
+
<p class="text-sm leading-5 text-gray-500 dark:text-white">
|
|
13
|
+
Select a driver to assign to this order.
|
|
14
|
+
</p>
|
|
15
|
+
</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|>
|
|
19
|
+
{{model.name}}
|
|
20
|
+
</ModelSelect>
|
|
21
|
+
</InputGroup>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
</Modal::Default>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<Modal::Default @modalIsOpened={{@modalIsOpened}} @options={{@options}} @confirm={{@onConfirm}} @decline={{@onDecline}}>
|
|
2
|
+
<div class="modal-body-container">
|
|
3
|
+
<div class="flex flex-col items-center justify-center mb-2">
|
|
4
|
+
<FaIcon @icon="stars" @size="4x" class="text-sky-400" />
|
|
5
|
+
<div class="my-2 text-center">
|
|
6
|
+
<h2 class="dark:text-gray-100 font-semibold">Welcome to Storefront!</h2>
|
|
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.
|
|
10
|
+
</p>
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
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">
|
|
17
|
+
<CurrencySelect @value={{@options.store.currency}} @onSelect={{fn (mut @options.store.currency)}} @triggerClass="w-full form-select" />
|
|
18
|
+
</InputGroup>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
</Modal::Default>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<Modal::Default @modalIsOpened={{@modalIsOpened}} @options={{@options}} @confirm={{@onConfirm}} @decline={{@onDecline}}>
|
|
2
|
+
<div class="modal-body-container">
|
|
3
|
+
<div class="mb-4 w-full">
|
|
4
|
+
<InputGroup @name="Gateway type" @helpText="Select gateway type">
|
|
5
|
+
<Select class="w-full" @placeholder="Select gateway type" @options={{@options.schemaOptions}} @onSelect={{@options.selectSchema}} @humanize={{true}} />
|
|
6
|
+
</InputGroup>
|
|
7
|
+
</div>
|
|
8
|
+
|
|
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)}} />
|
|
13
|
+
</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" />
|
|
16
|
+
<div class="input-group">
|
|
17
|
+
<Checkbox @value={{@options.gateway.sandbox}} @label="This is a sandbox gateway" @onToggle={{fn (mut @options.gateway.sandbox)}} />
|
|
18
|
+
</div>
|
|
19
|
+
<div class="p-2 rounded-md my-2 border border-gray-200 dark:border-gray-800">
|
|
20
|
+
<h4 class="mb-2 font-semibold text-sm dark:text-white">Config</h4>
|
|
21
|
+
{{#each-in @options.schema as |key value|}}
|
|
22
|
+
{{#if (is-bool-value value)}}
|
|
23
|
+
<div class="input-group">
|
|
24
|
+
<Checkbox @value={{value}} @label={{humanize key}} @onToggle={{fn @options.setConfigKey key}} />
|
|
25
|
+
</div>
|
|
26
|
+
{{else}}
|
|
27
|
+
<InputGroup @name={{humanize key}}>
|
|
28
|
+
<Input class="form-input w-full" placeholder={{humanize key}} @value={{value}} {{on "blur" (fn @options.setConfigKey key)}} />
|
|
29
|
+
</InputGroup>
|
|
30
|
+
{{/if}}
|
|
31
|
+
{{/each-in}}
|
|
32
|
+
</div>
|
|
33
|
+
{{/if}}
|
|
34
|
+
</div>
|
|
35
|
+
</Modal::Default>
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<Modal::Default @modalIsOpened={{@modalIsOpened}} @options={{@options}} @confirm={{@onConfirm}} @decline={{@onDecline}}>
|
|
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 network category a brief description" />
|
|
5
|
+
<InputGroup @name="Category icon type" @wrapperClass="mb-0">
|
|
6
|
+
<div class="flex flex-row dark:text-gray-100 mt-4">
|
|
7
|
+
<div class="flex flex-row items-center mr-4">
|
|
8
|
+
<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)}} />
|
|
9
|
+
<span>Upload category icon</span>
|
|
10
|
+
</div>
|
|
11
|
+
<div class="flex flex-row items-center ">
|
|
12
|
+
<RadioButton @radioClass="focus:ring-blue-500 mr-2" @radioId="svg_icon_type" @value="svg" @groupValue={{@options.iconType}} @name="icon_type" @changed={{fn (mut @options.iconType)}} />
|
|
13
|
+
<span>Use svg (<a href="https://fontawesome.com/" target="_fa">FontAwesome</a>) category icon</span>
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
16
|
+
</InputGroup>
|
|
17
|
+
<div>iconType: {{@options.iconType}}</div>
|
|
18
|
+
<InputGroup @name="Category icon">
|
|
19
|
+
{{#if (eq @options.iconType "svg")}}
|
|
20
|
+
<FontAwesomeIconSelect @value={{@options.category.icon}} @onChange={{fn (mut @options.category.icon)}} @renderInPlace={{true}} />
|
|
21
|
+
{{else}}
|
|
22
|
+
<div class="w-32">
|
|
23
|
+
<img src={{@options.category.icon_url}} alt={{@options.category.name}} class="w-full rounded-md" />
|
|
24
|
+
<FileUpload @name="icons" @accept="image/*" @onFileAdded={{fn @options.uploadIcon}} as |queue|>
|
|
25
|
+
<a tabindex={{0}} class="flex items-center px-0 mt-2 text-xs no-underline truncate btn btn-sm btn-default">
|
|
26
|
+
{{#if queue.files.length}}
|
|
27
|
+
<Spinner class="mr-1" />
|
|
28
|
+
<span>
|
|
29
|
+
Uploading...
|
|
30
|
+
</span>
|
|
31
|
+
{{else}}
|
|
32
|
+
<FaIcon @icon="image" class="mr-1" />
|
|
33
|
+
<span>
|
|
34
|
+
Upload new
|
|
35
|
+
</span>
|
|
36
|
+
{{/if}}
|
|
37
|
+
</a>
|
|
38
|
+
</FileUpload>
|
|
39
|
+
<a href="javascript:;" class="text-danger block mt-2" {{on "click" @options.clearImage}}>
|
|
40
|
+
<FaIcon @icon="times" @prefix="fas" class="mr-1" />
|
|
41
|
+
<span>Remove</span>
|
|
42
|
+
</a>
|
|
43
|
+
</div>
|
|
44
|
+
{{/if}}
|
|
45
|
+
</InputGroup>
|
|
46
|
+
<InputGroup>
|
|
47
|
+
<TranslationsEditor @value={{@options.category.translations}} @defaultKeys={{array "name" "description"}} @onChange={{fn (mut @options.category.translations)}} />
|
|
48
|
+
</InputGroup>
|
|
49
|
+
</div>
|
|
50
|
+
</Modal::Default>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<Modal::Default @modalIsOpened={{@modalIsOpened}} @options={{@options}} @confirm={{@onConfirm}} @decline={{@onDecline}}>
|
|
2
|
+
<div class="modal-body-container">
|
|
3
|
+
<div class="flex flex-col items-center justify-center mb-2">
|
|
4
|
+
<FaIcon @icon="network-wired" @size="4x" class="text-sky-400" />
|
|
5
|
+
<div class="my-2 text-center">
|
|
6
|
+
<h2 class="dark:text-gray-50 font-semibold">Start a Network</h2>
|
|
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.
|
|
11
|
+
</p>
|
|
12
|
+
</div>
|
|
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">
|
|
17
|
+
<CurrencySelect @value={{@options.network.currency}} @onSelect={{fn (mut @options.network.currency)}} @triggerClass="w-full form-select" />
|
|
18
|
+
</InputGroup>
|
|
19
|
+
</div>
|
|
20
|
+
</Modal::Default>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<Modal::Default @modalIsOpened={{@modalIsOpened}} @options={{@options}} @confirm={{@onConfirm}} @decline={{@onDecline}}>
|
|
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" />
|
|
5
|
+
<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)}} />
|
|
7
|
+
</div>
|
|
8
|
+
<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)}} />
|
|
10
|
+
</div>
|
|
11
|
+
<InputGroup>
|
|
12
|
+
<TranslationsEditor @value={{@options.productVariant.translations}} @defaultKeys={{array "name" "description"}} @onChange={{fn (mut @options.productVariant.translations)}} />
|
|
13
|
+
</InputGroup>
|
|
14
|
+
</div>
|
|
15
|
+
</Modal::Default>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<Modal::Default @modalIsOpened={{@modalIsOpened}} @options={{@options}} @confirm={{@onConfirm}} @decline={{@onDecline}}>
|
|
2
|
+
<div class="modal-body-container">
|
|
3
|
+
{{#unless @options.channel.id}}
|
|
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}} />
|
|
8
|
+
</InputGroup>
|
|
9
|
+
</div>
|
|
10
|
+
{{/unless}}
|
|
11
|
+
|
|
12
|
+
{{#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" />
|
|
15
|
+
{{#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" />
|
|
20
|
+
</InputGroup>
|
|
21
|
+
{{/if}}
|
|
22
|
+
<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>
|
|
24
|
+
{{#each-in @options.schema as |key value|}}
|
|
25
|
+
{{#if (is-bool-value value)}}
|
|
26
|
+
<div class="input-group">
|
|
27
|
+
<Checkbox @value={{value}} @label={{humanize key}} @onToggle={{fn @options.setConfigKey
|
|
28
|
+
key}} />
|
|
29
|
+
</div>
|
|
30
|
+
{{else if (or (eq key 'private_key_content') (eq key 'firebase_credentials_json'))}}
|
|
31
|
+
<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)}} />
|
|
34
|
+
</InputGroup>
|
|
35
|
+
{{else}}
|
|
36
|
+
<InputGroup @name={{humanize key}}>
|
|
37
|
+
<Input class="form-input w-full" placeholder={{humanize key}} @value={{value}} {{on "blur"
|
|
38
|
+
(fn @options.setConfigKey key)}} />
|
|
39
|
+
</InputGroup>
|
|
40
|
+
{{/if}}
|
|
41
|
+
{{/each-in}}
|
|
42
|
+
</div>
|
|
43
|
+
{{/if}}
|
|
44
|
+
</div>
|
|
45
|
+
</Modal::Default>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<Modal::Default @modalIsOpened={{@modalIsOpened}} @options={{@options}} @confirm={{@onConfirm}} @decline={{@onDecline}}>
|
|
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">
|
|
6
|
+
<div class="flex flex-row">
|
|
7
|
+
<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" />
|
|
9
|
+
</div>
|
|
10
|
+
<div class="flex-1">
|
|
11
|
+
<FileUpload @name="photos" @accept="image/*" @onFileAdded={{fn @options.uploadNewPhoto}} as |queue|>
|
|
12
|
+
<a tabindex={{0}} class="flex items-center px-0 mt-2 text-xs no-underline truncate btn btn-sm btn-default">
|
|
13
|
+
{{#if queue.files.length}}
|
|
14
|
+
<Spinner class="mr-1" />
|
|
15
|
+
<span>
|
|
16
|
+
Uploading...
|
|
17
|
+
</span>
|
|
18
|
+
{{else}}
|
|
19
|
+
<FaIcon @icon="image" class="mr-1" />
|
|
20
|
+
<span>
|
|
21
|
+
Upload new category icon
|
|
22
|
+
</span>
|
|
23
|
+
{{/if}}
|
|
24
|
+
</a>
|
|
25
|
+
</FileUpload>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
</InputGroup>
|
|
29
|
+
</div>
|
|
30
|
+
</Modal::Default>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<Modal::Default @modalIsOpened={{@modalIsOpened}} @options={{@options}} @confirm={{@onConfirm}} @decline={{@onDecline}}>
|
|
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">
|
|
6
|
+
<CurrencySelect @value={{@options.store.currency}} @onSelect={{fn (mut @options.store.currency)}} @triggerClass="w-full form-select" />
|
|
7
|
+
</InputGroup>
|
|
8
|
+
</div>
|
|
9
|
+
</Modal::Default>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{{yield}}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
<Modal::Default @modalIsOpened={{@modalIsOpened}} @options={{@options}} @confirm={{@onConfirm}} @decline={{@onDecline}}>
|
|
2
|
+
<div class="modal-body-container my-5">
|
|
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">
|
|
5
|
+
<div class="flex items-center justify-center py-5">
|
|
6
|
+
<PageLoader class="text-sm dar:text-gray-100" @loadingMessage="Processing import..." />
|
|
7
|
+
</div>
|
|
8
|
+
</div>
|
|
9
|
+
{{else}}
|
|
10
|
+
<FileDropzone @name="spreadsheets" @multiple={{true}} @onFileAdded={{fn @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
|
+
{{#if dropzone.active}}
|
|
13
|
+
{{#if dropzone.valid}}
|
|
14
|
+
Drop to upload
|
|
15
|
+
{{else}}
|
|
16
|
+
Invalid
|
|
17
|
+
{{/if}}
|
|
18
|
+
{{else if queue.files.length}}
|
|
19
|
+
<div class="my-2">
|
|
20
|
+
<FaIcon @icon="file-spreadsheet" class="text-indigo-500 mr-2" />
|
|
21
|
+
{{pluralize queue.files.length "spreadsheet"}} ready for upload.
|
|
22
|
+
</div>
|
|
23
|
+
<div class="my-2">({{queue.progress}}%)</div>
|
|
24
|
+
{{else}}
|
|
25
|
+
<h4 class="font-semibold mb-8">
|
|
26
|
+
<FaIcon @icon="file-spreadsheet" class="text-indigo-500 mr-2" /> Upload Spreadsheets
|
|
27
|
+
</h4>
|
|
28
|
+
<div>
|
|
29
|
+
{{#if dropzone.supported}}
|
|
30
|
+
<p class="text-base font-semibold my-5">Drag and drop spreadsheet files onto this dropzone</p>
|
|
31
|
+
{{/if}}
|
|
32
|
+
|
|
33
|
+
<FileUpload @name="spreadsheets" @for="spreadsheets" @accept={{join "," @options.acceptedFileTypes}} @multiple={{true}} @onFileAdded={{fn @options.queueFile}}>
|
|
34
|
+
<a tabindex=0 class="btn btn-magic cursor-pointer ml-1 hover:text-white">or select spreadsheets to
|
|
35
|
+
upload.</a>
|
|
36
|
+
</FileUpload>
|
|
37
|
+
</div>
|
|
38
|
+
{{/if}}
|
|
39
|
+
</FileDropzone>
|
|
40
|
+
|
|
41
|
+
{{#if @options.uploadQueue}}
|
|
42
|
+
<div class="my-6">
|
|
43
|
+
<div class="mb-2">
|
|
44
|
+
<span class="text-sm leading-5 text-gray-500 dark:text-white">Upload Queue</span>
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
<div class="table-wrapper">
|
|
48
|
+
<table class="table">
|
|
49
|
+
<thead>
|
|
50
|
+
<tr>
|
|
51
|
+
{{#each @options.fileQueueColumns as |column|}}
|
|
52
|
+
<th>{{column.name}}</th>
|
|
53
|
+
{{/each}}
|
|
54
|
+
</tr>
|
|
55
|
+
</thead>
|
|
56
|
+
<tbody>
|
|
57
|
+
{{#each @options.uploadQueue as |file|}}
|
|
58
|
+
<tr>
|
|
59
|
+
{{#each @options.fileQueueColumns as |column|}}
|
|
60
|
+
<td>
|
|
61
|
+
{{#if (eq column.key "delete")}}
|
|
62
|
+
<a href="javascript:;" {{on "click" (fn @options.removeFile file)}}>
|
|
63
|
+
<FaIcon @icon="trash" class="text-red-500" />
|
|
64
|
+
</a>
|
|
65
|
+
{{else if (eq column.key "type")}}
|
|
66
|
+
<FileIcon @file={{file}} />
|
|
67
|
+
{{else if (eq column.key "fileSize")}}
|
|
68
|
+
{{format-bytes (get file column.valuePath)}}
|
|
69
|
+
{{else if (eq column.key "uploadDate")}}
|
|
70
|
+
{{moment-format (get file column.valuePath) "DD MMM YYYY"}}
|
|
71
|
+
{{else}}
|
|
72
|
+
<span class="w-11/12 truncate d-block">{{get file column.valuePath}}</span>
|
|
73
|
+
{{/if}}
|
|
74
|
+
</td>
|
|
75
|
+
{{/each}}
|
|
76
|
+
</tr>
|
|
77
|
+
{{/each}}
|
|
78
|
+
</tbody>
|
|
79
|
+
</table>
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
<div class="mt-6">
|
|
83
|
+
<div class="mb-2">
|
|
84
|
+
<p class="text-sm leading-5 text-gray-500 dark:text-white">
|
|
85
|
+
Optionally select a category to import products into
|
|
86
|
+
</p>
|
|
87
|
+
</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|>
|
|
90
|
+
{{model.name}}
|
|
91
|
+
</ModelSelect>
|
|
92
|
+
</InputGroup>
|
|
93
|
+
</div>
|
|
94
|
+
{{/if}}
|
|
95
|
+
{{/if}}
|
|
96
|
+
</div>
|
|
97
|
+
</Modal::Default>
|