@fleetbase/storefront-engine 0.1.6 → 0.1.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/.php-cs-fixer.php +29 -0
- package/LICENSE.md +16 -4
- package/README.md +106 -13
- package/addon/components/modals/add-store-to-category.hbs +5 -0
- package/addon/components/modals/create-network-category.hbs +28 -28
- package/addon/components/modals/share-network.hbs +3 -3
- package/addon/components/modals/store-details.hbs +22 -0
- package/addon/components/modals/store-form.hbs +22 -0
- package/addon/components/modals/store-form.js +21 -0
- package/addon/components/network-category-picker.hbs +40 -0
- package/addon/components/network-category-picker.js +83 -0
- package/addon/components/store-selector.hbs +4 -2
- package/addon/components/widget/orders.js +22 -17
- package/addon/controllers/networks/index/network/index.js +133 -9
- package/addon/controllers/networks/index/network/stores.js +422 -153
- package/addon/controllers/networks/index.js +66 -4
- package/addon/controllers/products/index/category.js +1 -1
- package/addon/controllers/settings/index.js +14 -7
- package/addon/controllers/settings/notifications.js +1 -1
- package/addon/models/store.js +44 -7
- package/addon/routes/networks/index/network/customers.js +4 -1
- package/addon/routes/networks/index/network/orders.js +4 -1
- package/addon/routes/networks/index/network/stores.js +19 -15
- package/addon/serializers/store.js +1 -0
- package/addon/templates/customers/index.hbs +0 -11
- package/addon/templates/networks/index/network/index.hbs +1 -1
- package/addon/templates/networks/index/network/stores.hbs +8 -163
- package/addon/templates/networks/index/network.hbs +2 -3
- package/addon/utils/create-shareable-link.js +21 -0
- package/app/adapters/addon-category.js +1 -1
- package/app/adapters/gateway.js +1 -1
- package/app/adapters/network.js +1 -1
- package/app/adapters/notification-channel.js +1 -1
- package/app/adapters/product-addon-category.js +1 -1
- package/app/adapters/product-addon.js +1 -1
- package/app/adapters/product-hour.js +1 -1
- package/app/adapters/product-store-location.js +1 -1
- package/app/adapters/product-variant-option.js +1 -1
- package/app/adapters/product-variant.js +1 -1
- package/app/adapters/product.js +1 -1
- package/app/adapters/store-hour.js +1 -1
- package/app/adapters/store-location.js +1 -1
- package/app/adapters/store.js +1 -1
- package/app/adapters/storefront.js +1 -1
- package/app/components/file-record.js +1 -1
- package/app/components/modals/add-store-hours.js +1 -1
- package/app/components/modals/add-store-to-category.js +1 -0
- package/app/components/modals/add-stores-to-network.js +1 -1
- package/app/components/modals/assign-driver.js +1 -1
- package/app/components/modals/create-first-store.js +1 -1
- package/app/components/modals/create-gateway.js +1 -1
- package/app/components/modals/create-network-category.js +1 -1
- package/app/components/modals/create-network.js +1 -1
- package/app/components/modals/create-new-variant.js +1 -1
- package/app/components/modals/create-notification-channel.js +1 -1
- package/app/components/modals/create-product-category.js +1 -1
- package/app/components/modals/create-store.js +1 -1
- package/app/components/modals/edit-network.js +1 -1
- package/app/components/modals/import-products.js +1 -1
- package/app/components/modals/incoming-order.js +1 -1
- package/app/components/modals/manage-addons.js +1 -1
- package/app/components/modals/order-ready-assign-driver.js +1 -1
- package/app/components/modals/select-addon-category.js +1 -1
- package/app/components/modals/share-network.js +1 -1
- package/app/components/modals/store-details.js +1 -0
- package/app/components/modals/store-form.js +1 -0
- package/app/components/modals/store-location-form.js +1 -1
- package/app/components/network-category-picker.js +1 -0
- package/app/components/order-card.js +1 -1
- package/app/components/schedule-manager.js +1 -1
- package/app/components/settings-container.js +1 -1
- package/app/components/store-selector.js +1 -1
- package/app/components/widget/customers.js +1 -1
- package/app/components/widget/orders.js +1 -1
- package/app/components/widget/storefront-metrics.js +1 -1
- package/app/controllers/application.js +1 -1
- package/app/controllers/customers/index.js +1 -1
- package/app/controllers/home.js +1 -1
- package/app/controllers/networks/index/network/customers.js +1 -1
- package/app/controllers/networks/index/network/index.js +1 -1
- package/app/controllers/networks/index/network/orders.js +1 -1
- package/app/controllers/networks/index/network/stores.js +1 -1
- package/app/controllers/networks/index/network.js +1 -1
- package/app/controllers/networks/index.js +1 -1
- package/app/controllers/orders/index.js +1 -1
- package/app/controllers/products/index/category/edit.js +1 -1
- package/app/controllers/products/index/category/new.js +1 -1
- package/app/controllers/products/index/category.js +1 -1
- package/app/controllers/products/index/index/edit.js +1 -1
- package/app/controllers/products/index/index.js +1 -1
- package/app/controllers/products/index.js +1 -1
- package/app/controllers/settings/api.js +1 -1
- package/app/controllers/settings/gateways.js +1 -1
- package/app/controllers/settings/index.js +1 -1
- package/app/controllers/settings/locations.js +1 -1
- package/app/controllers/settings/notifications.js +1 -1
- package/app/helpers/get-tip-amount.js +1 -1
- package/app/models/addon-category.js +1 -1
- package/app/models/gateway.js +1 -1
- package/app/models/network.js +1 -1
- package/app/models/notification-channel.js +1 -1
- package/app/models/product-addon-category.js +1 -1
- package/app/models/product-addon.js +1 -1
- package/app/models/product-hour.js +1 -1
- package/app/models/product-store-location.js +1 -1
- package/app/models/product-variant-option.js +1 -1
- package/app/models/product-variant.js +1 -1
- package/app/models/product.js +1 -1
- package/app/models/store-hour.js +1 -1
- package/app/models/store-location.js +1 -1
- package/app/models/store.js +1 -1
- package/app/routes/application.js +1 -1
- package/app/routes/customers/index/edit.js +1 -1
- package/app/routes/customers/index.js +1 -1
- package/app/routes/home.js +1 -1
- package/app/routes/networks/index/network/customers.js +1 -1
- package/app/routes/networks/index/network/index.js +1 -1
- package/app/routes/networks/index/network/orders.js +1 -1
- package/app/routes/networks/index/network/stores.js +1 -1
- package/app/routes/networks/index/network.js +1 -1
- package/app/routes/networks/index.js +1 -1
- package/app/routes/orders/index/edit.js +1 -1
- package/app/routes/orders/index/new.js +1 -1
- package/app/routes/orders/index/view.js +1 -1
- package/app/routes/orders/index.js +1 -1
- package/app/routes/products/index/category/edit.js +1 -1
- package/app/routes/products/index/category/new.js +1 -1
- package/app/routes/products/index/category.js +1 -1
- package/app/routes/products/index/index/edit.js +1 -1
- package/app/routes/products/index/index.js +1 -1
- package/app/routes/products/index.js +1 -1
- package/app/routes/settings/api.js +1 -1
- package/app/routes/settings/gateways.js +1 -1
- package/app/routes/settings/index.js +1 -1
- package/app/routes/settings/locations.js +1 -1
- package/app/routes/settings/notifications.js +1 -1
- package/app/serializers/addon-category.js +1 -1
- package/app/serializers/network.js +1 -1
- package/app/serializers/notification-channel.js +1 -1
- package/app/serializers/product-addon-category.js +1 -1
- package/app/serializers/product-variant.js +1 -1
- package/app/serializers/product.js +1 -1
- package/app/serializers/store-location.js +1 -1
- package/app/serializers/store.js +1 -1
- package/app/services/storefront.js +1 -1
- package/app/templates/customers/index/edit.js +1 -1
- package/app/templates/customers/index.js +1 -1
- package/app/templates/home.js +1 -1
- package/app/templates/networks/index/network/customers.js +1 -1
- package/app/templates/networks/index/network/index.js +1 -1
- package/app/templates/networks/index/network/orders.js +1 -1
- package/app/templates/networks/index/network/stores.js +1 -1
- package/app/templates/networks/index/network.js +1 -1
- package/app/templates/networks/index.js +1 -1
- package/app/templates/orders/index/edit.js +1 -1
- package/app/templates/orders/index/new.js +1 -1
- package/app/templates/orders/index/view.js +1 -1
- package/app/templates/orders/index.js +1 -1
- package/app/templates/products/index/category/edit.js +1 -1
- package/app/templates/products/index/category/new.js +1 -1
- package/app/templates/products/index/category.js +1 -1
- package/app/templates/products/index/index/edit.js +1 -1
- package/app/templates/products/index/index.js +1 -1
- package/app/templates/products/index.js +1 -1
- package/app/templates/settings/api.js +1 -1
- package/app/templates/settings/gateways.js +1 -1
- package/app/templates/settings/index.js +1 -1
- package/app/templates/settings/locations.js +1 -1
- package/app/templates/settings/notifications.js +1 -1
- package/app/templates/settings.js +1 -1
- package/app/utils/create-shareable-link.js +1 -0
- package/app/utils/get-gateway-schemas.js +1 -1
- package/app/utils/get-notification-schemas.js +1 -1
- package/composer.json +88 -0
- package/extension.json +10 -0
- package/package.json +6 -7
- package/phpstan.neon.dist +8 -0
- package/phpunit.xml.dist +16 -0
- package/server/.gitattributes +14 -0
- package/server/README.md +40 -0
- package/server/config/api.php +101 -0
- package/server/config/database.connections.php +57 -0
- package/server/config/storefront.php +19 -0
- package/server/config/twilio-notification-channel.php +36 -0
- package/server/migrations/2023_05_03_025307_create_carts_table.php +44 -0
- package/server/migrations/2023_05_03_025307_create_checkouts_table.php +51 -0
- package/server/migrations/2023_05_03_025307_create_gateways_table.php +48 -0
- package/server/migrations/2023_05_03_025307_create_network_stores_table.php +36 -0
- package/server/migrations/2023_05_03_025307_create_networks_table.php +56 -0
- package/server/migrations/2023_05_03_025307_create_notification_channels_table.php +43 -0
- package/server/migrations/2023_05_03_025307_create_payment_methods_table.php +44 -0
- package/server/migrations/2023_05_03_025307_create_product_addon_categories_table.php +38 -0
- package/server/migrations/2023_05_03_025307_create_product_addons_table.php +43 -0
- package/server/migrations/2023_05_03_025307_create_product_hours_table.php +37 -0
- package/server/migrations/2023_05_03_025307_create_product_store_locations_table.php +34 -0
- package/server/migrations/2023_05_03_025307_create_product_variant_options_table.php +40 -0
- package/server/migrations/2023_05_03_025307_create_product_variants_table.php +44 -0
- package/server/migrations/2023_05_03_025307_create_products_table.php +59 -0
- package/server/migrations/2023_05_03_025307_create_reviews_table.php +41 -0
- package/server/migrations/2023_05_03_025307_create_store_hours_table.php +37 -0
- package/server/migrations/2023_05_03_025307_create_store_locations_table.php +38 -0
- package/server/migrations/2023_05_03_025307_create_stores_table.php +57 -0
- package/server/migrations/2023_05_03_025307_create_votes_table.php +39 -0
- package/server/migrations/2023_05_03_025310_add_foreign_keys_to_carts_table.php +40 -0
- package/server/migrations/2023_05_03_025310_add_foreign_keys_to_checkouts_table.php +48 -0
- package/server/migrations/2023_05_03_025310_add_foreign_keys_to_gateways_table.php +40 -0
- package/server/migrations/2023_05_03_025310_add_foreign_keys_to_network_stores_table.php +40 -0
- package/server/migrations/2023_05_03_025310_add_foreign_keys_to_networks_table.php +42 -0
- package/server/migrations/2023_05_03_025310_add_foreign_keys_to_notification_channels_table.php +40 -0
- package/server/migrations/2023_05_03_025310_add_foreign_keys_to_payment_methods_table.php +40 -0
- package/server/migrations/2023_05_03_025310_add_foreign_keys_to_product_addon_categories_table.php +38 -0
- package/server/migrations/2023_05_03_025310_add_foreign_keys_to_product_addons_table.php +38 -0
- package/server/migrations/2023_05_03_025310_add_foreign_keys_to_product_hours_table.php +32 -0
- package/server/migrations/2023_05_03_025310_add_foreign_keys_to_product_store_locations_table.php +34 -0
- package/server/migrations/2023_05_03_025310_add_foreign_keys_to_product_variant_options_table.php +32 -0
- package/server/migrations/2023_05_03_025310_add_foreign_keys_to_product_variants_table.php +32 -0
- package/server/migrations/2023_05_03_025310_add_foreign_keys_to_products_table.php +44 -0
- package/server/migrations/2023_05_03_025310_add_foreign_keys_to_reviews_table.php +38 -0
- package/server/migrations/2023_05_03_025310_add_foreign_keys_to_store_hours_table.php +32 -0
- package/server/migrations/2023_05_03_025310_add_foreign_keys_to_store_locations_table.php +40 -0
- package/server/migrations/2023_05_03_025310_add_foreign_keys_to_stores_table.php +42 -0
- package/server/migrations/2023_05_03_025310_add_foreign_keys_to_votes_table.php +38 -0
- package/server/src/Auth/Schemas/Storefront.php +95 -0
- package/server/src/Console/Commands/NotifyStorefrontOrderNearby.php +86 -0
- package/server/src/Expansions/EntityExpansion.php +44 -0
- package/server/src/Http/Controllers/ActionController.php +119 -0
- package/server/src/Http/Controllers/AddonCategoryController.php +13 -0
- package/server/src/Http/Controllers/CustomerController.php +13 -0
- package/server/src/Http/Controllers/GatewayController.php +13 -0
- package/server/src/Http/Controllers/MetricsController.php +71 -0
- package/server/src/Http/Controllers/NetworkController.php +170 -0
- package/server/src/Http/Controllers/NotificationChannelController.php +13 -0
- package/server/src/Http/Controllers/OrderController.php +154 -0
- package/server/src/Http/Controllers/ProductAddonCategoryController.php +14 -0
- package/server/src/Http/Controllers/ProductAddonController.php +14 -0
- package/server/src/Http/Controllers/ProductController.php +123 -0
- package/server/src/Http/Controllers/ProductHourController.php +13 -0
- package/server/src/Http/Controllers/ProductVariantController.php +13 -0
- package/server/src/Http/Controllers/ProductVariantOptionController.php +13 -0
- package/server/src/Http/Controllers/ReviewController.php +13 -0
- package/server/src/Http/Controllers/StoreController.php +26 -0
- package/server/src/Http/Controllers/StoreHourController.php +13 -0
- package/server/src/Http/Controllers/StoreLocationController.php +13 -0
- package/server/src/Http/Controllers/StorefrontController.php +15 -0
- package/server/src/Http/Controllers/VoteController.php +13 -0
- package/server/src/Http/Controllers/v1/CartController.php +161 -0
- package/server/src/Http/Controllers/v1/CategoryController.php +138 -0
- package/server/src/Http/Controllers/v1/CheckoutController.php +957 -0
- package/server/src/Http/Controllers/v1/CustomerController.php +482 -0
- package/server/src/Http/Controllers/v1/GatewayControllerController.php +11 -0
- package/server/src/Http/Controllers/v1/NetworkController.php +281 -0
- package/server/src/Http/Controllers/v1/PaymentMethodController.php +11 -0
- package/server/src/Http/Controllers/v1/ProductController.php +94 -0
- package/server/src/Http/Controllers/v1/ReviewController.php +270 -0
- package/server/src/Http/Controllers/v1/ServiceQuoteController.php +402 -0
- package/server/src/Http/Controllers/v1/StoreController.php +176 -0
- package/server/src/Http/Filter/AddonCategoryFilter.php +19 -0
- package/server/src/Http/Filter/CustomerFilter.php +18 -0
- package/server/src/Http/Filter/GatewayFilter.php +13 -0
- package/server/src/Http/Filter/NetworkFilter.php +18 -0
- package/server/src/Http/Filter/NotificationChannelFilter.php +13 -0
- package/server/src/Http/Filter/OrderFilter.php +46 -0
- package/server/src/Http/Filter/ProductFilter.php +28 -0
- package/server/src/Http/Filter/StoreFilter.php +42 -0
- package/server/src/Http/Filter/StoreLocationFilter.php +23 -0
- package/server/src/Http/Middleware/SetStorefrontSession.php +130 -0
- package/server/src/Http/Requests/AddStoreToNetworkCategory.php +45 -0
- package/server/src/Http/Requests/CaptureOrderRequest.php +30 -0
- package/server/src/Http/Requests/CreateCustomerRequest.php +44 -0
- package/server/src/Http/Requests/CreateReviewRequest.php +34 -0
- package/server/src/Http/Requests/GetServiceQuoteFromCart.php +40 -0
- package/server/src/Http/Requests/InitializeCheckoutRequest.php +38 -0
- package/server/src/Http/Requests/NetworkActionRequest.php +43 -0
- package/server/src/Http/Requests/VerifyCreateCustomerRequest.php +31 -0
- package/server/src/Http/Resources/Cart.php +31 -0
- package/server/src/Http/Resources/Category.php +48 -0
- package/server/src/Http/Resources/Customer.php +36 -0
- package/server/src/Http/Resources/Gateway.php +32 -0
- package/server/src/Http/Resources/Media.php +29 -0
- package/server/src/Http/Resources/Network.php +48 -0
- package/server/src/Http/Resources/Product.php +209 -0
- package/server/src/Http/Resources/Review.php +45 -0
- package/server/src/Http/Resources/ReviewCustomer.php +60 -0
- package/server/src/Http/Resources/Store.php +76 -0
- package/server/src/Http/Resources/StoreHour.php +29 -0
- package/server/src/Http/Resources/StoreLocation.php +33 -0
- package/server/src/Imports/ProductsImport.php +20 -0
- package/server/src/Jobs/DownloadProductImageUrl.php +60 -0
- package/server/src/Listeners/HandleOrderCompleted.php +31 -0
- package/server/src/Listeners/HandleOrderDispatched.php +34 -0
- package/server/src/Listeners/HandleOrderDriverAssigned.php +37 -0
- package/server/src/Listeners/HandleOrderStarted.php +27 -0
- package/server/src/Mail/StorefrontNetworkInvite.php +48 -0
- package/server/src/Models/AddonCategory.php +30 -0
- package/server/src/Models/Cart.php +691 -0
- package/server/src/Models/Checkout.php +166 -0
- package/server/src/Models/Customer.php +88 -0
- package/server/src/Models/Gateway.php +165 -0
- package/server/src/Models/Network.php +300 -0
- package/server/src/Models/NetworkStore.php +86 -0
- package/server/src/Models/NotificationChannel.php +147 -0
- package/server/src/Models/PaymentMethod.php +99 -0
- package/server/src/Models/Product.php +315 -0
- package/server/src/Models/ProductAddon.php +128 -0
- package/server/src/Models/ProductAddonCategory.php +90 -0
- package/server/src/Models/ProductHour.php +59 -0
- package/server/src/Models/ProductStoreLocation.php +77 -0
- package/server/src/Models/ProductVariant.php +125 -0
- package/server/src/Models/ProductVariantOption.php +86 -0
- package/server/src/Models/Review.php +127 -0
- package/server/src/Models/Store.php +478 -0
- package/server/src/Models/StoreHour.php +59 -0
- package/server/src/Models/StoreLocation.php +126 -0
- package/server/src/Models/StorefrontModel.php +22 -0
- package/server/src/Models/Vote.php +84 -0
- package/server/src/Notifications/StorefrontOrderCanceled.php +196 -0
- package/server/src/Notifications/StorefrontOrderCompleted.php +201 -0
- package/server/src/Notifications/StorefrontOrderCreated.php +157 -0
- package/server/src/Notifications/StorefrontOrderDriverAssigned.php +200 -0
- package/server/src/Notifications/StorefrontOrderEnroute.php +199 -0
- package/server/src/Notifications/StorefrontOrderNearby.php +201 -0
- package/server/src/Notifications/StorefrontOrderPreparing.php +202 -0
- package/server/src/Notifications/StorefrontOrderReadyForPickup.php +202 -0
- package/server/src/Observers/NetworkObserver.php +40 -0
- package/server/src/Observers/ProductObserver.php +118 -0
- package/server/src/Providers/EventServiceProvider.php +23 -0
- package/server/src/Providers/StorefrontServiceProvider.php +103 -0
- package/server/src/Support/Metrics.php +193 -0
- package/server/src/Support/OrderConfig.php +13 -0
- package/server/src/Support/QPay.php +208 -0
- package/server/src/Support/Storefront.php +201 -0
- package/server/src/routes.php +180 -0
- package/server/tests/Feature.php +5 -0
|
@@ -63,6 +63,13 @@ export default class NetworksIndexController extends Controller {
|
|
|
63
63
|
*/
|
|
64
64
|
@service filters;
|
|
65
65
|
|
|
66
|
+
/**
|
|
67
|
+
* Inject the `hostRouter` service
|
|
68
|
+
*
|
|
69
|
+
* @var {Service}
|
|
70
|
+
*/
|
|
71
|
+
@service hostRouter;
|
|
72
|
+
|
|
66
73
|
/**
|
|
67
74
|
* Queryable parameters for this controller's model
|
|
68
75
|
*
|
|
@@ -70,9 +77,32 @@ export default class NetworksIndexController extends Controller {
|
|
|
70
77
|
*/
|
|
71
78
|
queryParams = ['page', 'limit', 'sort', 'query'];
|
|
72
79
|
|
|
80
|
+
/**
|
|
81
|
+
* The current page of data being viewed.
|
|
82
|
+
*
|
|
83
|
+
* @var {Integer}
|
|
84
|
+
*/
|
|
73
85
|
@tracked page = 1;
|
|
74
|
-
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* The search query.
|
|
89
|
+
*
|
|
90
|
+
* @var {String}
|
|
91
|
+
*/
|
|
75
92
|
@tracked query;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* The maximum number of items to show per page.
|
|
96
|
+
*
|
|
97
|
+
* @var {Integer}
|
|
98
|
+
*/
|
|
99
|
+
@tracked limit;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* The param to sort the data on, the param with prepended `-` is descending
|
|
103
|
+
*
|
|
104
|
+
* @var {String}
|
|
105
|
+
*/
|
|
76
106
|
@tracked sort = '-created_at';
|
|
77
107
|
|
|
78
108
|
/**
|
|
@@ -99,14 +129,34 @@ export default class NetworksIndexController extends Controller {
|
|
|
99
129
|
this.query = value;
|
|
100
130
|
}
|
|
101
131
|
|
|
132
|
+
/**
|
|
133
|
+
* Send invites to a network.
|
|
134
|
+
*
|
|
135
|
+
* @method sendInvites
|
|
136
|
+
* @param {NetworkModel} network - The network object to which invites are sent.
|
|
137
|
+
* @public
|
|
138
|
+
*/
|
|
102
139
|
@action sendInvites(network) {
|
|
103
140
|
this.networkStoresController.invite(network);
|
|
104
141
|
}
|
|
105
142
|
|
|
143
|
+
/**
|
|
144
|
+
* Manage a specific network, transitioning to the appropriate route.
|
|
145
|
+
*
|
|
146
|
+
* @method manageNetwork
|
|
147
|
+
* @param {NetworkModel} network - The network object to manage.
|
|
148
|
+
* @public
|
|
149
|
+
*/
|
|
106
150
|
@action manageNetwork(network) {
|
|
107
151
|
this.transitionToRoute('networks.index.network', network);
|
|
108
152
|
}
|
|
109
153
|
|
|
154
|
+
/**
|
|
155
|
+
* Create a new network, with optional currency properties.
|
|
156
|
+
*
|
|
157
|
+
* @method createNetwork
|
|
158
|
+
* @public
|
|
159
|
+
*/
|
|
110
160
|
@action createNetwork() {
|
|
111
161
|
const network = this.store.createRecord('network');
|
|
112
162
|
const currency = this.currentUser.getWhoisProperty('currency.code');
|
|
@@ -121,9 +171,9 @@ export default class NetworksIndexController extends Controller {
|
|
|
121
171
|
confirm: (modal) => {
|
|
122
172
|
modal.startLoading();
|
|
123
173
|
|
|
124
|
-
return network.save().then((
|
|
174
|
+
return network.save().then(() => {
|
|
125
175
|
this.notifications.success('Your new storefront network has been created!');
|
|
126
|
-
this.
|
|
176
|
+
return this.hostRouter.refresh();
|
|
127
177
|
});
|
|
128
178
|
},
|
|
129
179
|
decline: () => {
|
|
@@ -132,7 +182,19 @@ export default class NetworksIndexController extends Controller {
|
|
|
132
182
|
});
|
|
133
183
|
}
|
|
134
184
|
|
|
185
|
+
/**
|
|
186
|
+
* Delete a specific network, with a confirmation prompt.
|
|
187
|
+
*
|
|
188
|
+
* @method deleteNetwork
|
|
189
|
+
* @param {NetworkModel} network - The network object to delete.
|
|
190
|
+
* @public
|
|
191
|
+
*/
|
|
135
192
|
@action deleteNetwork(network) {
|
|
136
|
-
return this.crud.delete(network
|
|
193
|
+
return this.crud.delete(network, {
|
|
194
|
+
title: `Are you sure you wish to delete this network (${network.name})? All assigned stores, customers, orders will no longer be reachable.`,
|
|
195
|
+
onSuccess: () => {
|
|
196
|
+
return this.hostRouter.refresh();
|
|
197
|
+
},
|
|
198
|
+
});
|
|
137
199
|
}
|
|
138
200
|
}
|
|
@@ -131,7 +131,7 @@ export default class ProductsIndexCategoryController extends Controller {
|
|
|
131
131
|
(uploadedFile) => {
|
|
132
132
|
category.setProperties({
|
|
133
133
|
icon_file_uuid: uploadedFile.id,
|
|
134
|
-
icon_url: uploadedFile.
|
|
134
|
+
icon_url: uploadedFile.url,
|
|
135
135
|
icon: uploadedFile,
|
|
136
136
|
});
|
|
137
137
|
}
|
|
@@ -32,10 +32,17 @@ export default class SettingsIndexController extends Controller {
|
|
|
32
32
|
@action saveSettings() {
|
|
33
33
|
this.isLoading = true;
|
|
34
34
|
|
|
35
|
-
this.model
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
this.model
|
|
36
|
+
.save()
|
|
37
|
+
.then(() => {
|
|
38
|
+
this.notifications.success('Changes saved');
|
|
39
|
+
})
|
|
40
|
+
.catch((error) => {
|
|
41
|
+
this.notifications.serverError(error);
|
|
42
|
+
})
|
|
43
|
+
.finally(() => {
|
|
44
|
+
this.isLoading = false;
|
|
45
|
+
});
|
|
39
46
|
}
|
|
40
47
|
|
|
41
48
|
@action uploadFile(type, file) {
|
|
@@ -46,13 +53,13 @@ export default class SettingsIndexController extends Controller {
|
|
|
46
53
|
{
|
|
47
54
|
path: `uploads/storefront/${this.activeStore.id}/${type}`,
|
|
48
55
|
key_uuid: this.activeStore.id,
|
|
49
|
-
key_type:
|
|
56
|
+
key_type: 'storefront:store',
|
|
50
57
|
type,
|
|
51
58
|
},
|
|
52
59
|
(uploadedFile) => {
|
|
53
60
|
this.model.setProperties({
|
|
54
61
|
[`${prefix}_uuid`]: uploadedFile.id,
|
|
55
|
-
[`${prefix}_url`]: uploadedFile.
|
|
62
|
+
[`${prefix}_url`]: uploadedFile.url,
|
|
56
63
|
[prefix]: uploadedFile,
|
|
57
64
|
});
|
|
58
65
|
}
|
|
@@ -66,7 +73,7 @@ export default class SettingsIndexController extends Controller {
|
|
|
66
73
|
{
|
|
67
74
|
path: `uploads/storefront/${this.activeStore.id}/media`,
|
|
68
75
|
key_uuid: this.activeStore.id,
|
|
69
|
-
key_type:
|
|
76
|
+
key_type: 'storefront:store',
|
|
70
77
|
type: `storefront_store_media`,
|
|
71
78
|
},
|
|
72
79
|
(uploadedFile) => {
|
|
@@ -18,7 +18,7 @@ export default class SettingsNotificationsController extends Controller {
|
|
|
18
18
|
@action createChannel() {
|
|
19
19
|
const channel = this.store.createRecord('notification-channel', {
|
|
20
20
|
owner_uuid: this.activeStore.id,
|
|
21
|
-
owner_type: 'store
|
|
21
|
+
owner_type: 'storefront:store',
|
|
22
22
|
});
|
|
23
23
|
|
|
24
24
|
this.editChannel(channel, {
|
package/addon/models/store.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import Model, { attr, belongsTo, hasMany } from '@ember-data/model';
|
|
2
2
|
import { getOwner } from '@ember/application';
|
|
3
3
|
import { tracked } from '@glimmer/tracking';
|
|
4
|
-
import {
|
|
4
|
+
import { computed } from '@ember/object';
|
|
5
|
+
import { isArray } from '@ember/array';
|
|
6
|
+
import { format as formatDate, isValid as isValidDate, formatDistanceToNow } from 'date-fns';
|
|
5
7
|
|
|
6
8
|
export default class StoreModel extends Model {
|
|
7
9
|
/** @ids */
|
|
@@ -13,6 +15,7 @@ export default class StoreModel extends Model {
|
|
|
13
15
|
/** @relationships */
|
|
14
16
|
@hasMany('notification-channel') notification_channels;
|
|
15
17
|
@hasMany('gateway') gateways;
|
|
18
|
+
@belongsTo('category') category;
|
|
16
19
|
@belongsTo('file') logo;
|
|
17
20
|
@belongsTo('file') backdrop;
|
|
18
21
|
@hasMany('file') files;
|
|
@@ -48,20 +51,54 @@ export default class StoreModel extends Model {
|
|
|
48
51
|
@tracked isLoadingFiles = false;
|
|
49
52
|
|
|
50
53
|
/** @computed */
|
|
51
|
-
get
|
|
54
|
+
@computed('tags') get tagsList() {
|
|
55
|
+
if (isArray(this.tags)) {
|
|
56
|
+
this.tags.join(', ');
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
return '';
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@computed('updated_at') get updatedAgo() {
|
|
63
|
+
if (!isValidDate(this.updated_at)) {
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
52
66
|
return formatDistanceToNow(this.updated_at);
|
|
53
67
|
}
|
|
54
68
|
|
|
55
|
-
get updatedAt() {
|
|
56
|
-
|
|
69
|
+
@computed('updated_at') get updatedAt() {
|
|
70
|
+
if (!isValidDate(this.updated_at)) {
|
|
71
|
+
return null;
|
|
72
|
+
}
|
|
73
|
+
return formatDate(this.updated_at, 'PPP p');
|
|
57
74
|
}
|
|
58
75
|
|
|
59
|
-
get
|
|
76
|
+
@computed('updated_at') get updatedAtShort() {
|
|
77
|
+
if (!isValidDate(this.updated_at)) {
|
|
78
|
+
return null;
|
|
79
|
+
}
|
|
80
|
+
return formatDate(this.updated_at, 'PP');
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
@computed('created_at') get createdAgo() {
|
|
84
|
+
if (!isValidDate(this.created_at)) {
|
|
85
|
+
return null;
|
|
86
|
+
}
|
|
60
87
|
return formatDistanceToNow(this.created_at);
|
|
61
88
|
}
|
|
62
89
|
|
|
63
|
-
get createdAt() {
|
|
64
|
-
|
|
90
|
+
@computed('created_at') get createdAt() {
|
|
91
|
+
if (!isValidDate(this.created_at)) {
|
|
92
|
+
return null;
|
|
93
|
+
}
|
|
94
|
+
return formatDate(this.created_at, 'PPP p');
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
@computed('created_at') get createdAtShort() {
|
|
98
|
+
if (!isValidDate(this.created_at)) {
|
|
99
|
+
return null;
|
|
100
|
+
}
|
|
101
|
+
return formatDate(this.created_at, 'PP');
|
|
65
102
|
}
|
|
66
103
|
|
|
67
104
|
/** @methods */
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import Route from '@ember/routing/route';
|
|
2
|
+
import { inject as service } from '@ember/service';
|
|
2
3
|
|
|
3
|
-
export default class NetworksIndexNetworkCustomersRoute extends Route {
|
|
4
|
+
export default class NetworksIndexNetworkCustomersRoute extends Route {
|
|
5
|
+
@service store;
|
|
6
|
+
}
|
|
@@ -1,28 +1,32 @@
|
|
|
1
1
|
import Route from '@ember/routing/route';
|
|
2
|
+
import { inject as service } from '@ember/service';
|
|
2
3
|
|
|
3
4
|
export default class NetworksIndexNetworkStoresRoute extends Route {
|
|
4
|
-
|
|
5
|
-
const network = this.modelFor('networks.index.network');
|
|
5
|
+
@service store;
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
queryParams = {
|
|
8
|
+
category: { refreshModel: true },
|
|
9
|
+
storeQuery: { refreshModel: true },
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
get network() {
|
|
13
|
+
return this.modelFor('networks.index.network');
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
model(params = {}) {
|
|
17
|
+
return this.store.query('store', { network: this.network.id, with_category: 1, ...params });
|
|
8
18
|
}
|
|
9
19
|
|
|
10
20
|
async setupController(controller, model) {
|
|
11
21
|
super.setupController(controller, model);
|
|
12
22
|
|
|
13
|
-
//
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
// set stores to the controller
|
|
17
|
-
controller.stores = model.toArray();
|
|
18
|
-
|
|
19
|
-
// set network to controller
|
|
20
|
-
controller.network = network;
|
|
23
|
+
// set the network to controller
|
|
24
|
+
controller.network = this.network;
|
|
21
25
|
|
|
22
|
-
// load the network categories
|
|
23
|
-
const categories = await this.store.query('category', { owner_uuid: network.id, parents_only: true, for: 'storefront_network' });
|
|
26
|
+
// // load the network categories
|
|
27
|
+
// const categories = await this.store.query('category', { owner_uuid: network.id, parents_only: true, for: 'storefront_network' });
|
|
24
28
|
|
|
25
|
-
// set the categories loaded
|
|
26
|
-
controller.categories = categories.toArray();
|
|
29
|
+
// // set the categories loaded
|
|
30
|
+
// controller.categories = categories.toArray();
|
|
27
31
|
}
|
|
28
32
|
}
|
|
@@ -11,6 +11,7 @@ export default class StoreSerializer extends ApplicationSerializer.extend(Embedd
|
|
|
11
11
|
return {
|
|
12
12
|
gateways: { embedded: 'always' },
|
|
13
13
|
notification_channels: { embedded: 'always' },
|
|
14
|
+
category: { embedded: 'always' },
|
|
14
15
|
logo: { embedded: 'always' },
|
|
15
16
|
backdrop: { embedded: 'always' },
|
|
16
17
|
files: { embedded: 'always' },
|
|
@@ -1,17 +1,6 @@
|
|
|
1
1
|
<Layout::Section::Header @title="Customers" @searchQuery={{this.query}} @onSearch={{perform this.search}}>
|
|
2
2
|
<FiltersPicker @columns={{this.columns}} @onApply={{fn this.filters.apply this}} @onClear={{fn this.filters.reset this}} @onFilterClear={{this.filters.clear}} @onChange={{this.filters.set}} @buttonWrapperClass="mr-2" />
|
|
3
3
|
<VisibleColumnPicker @columns={{this.columns}} @onChange={{fn (mut this.columns)}} class="mr-2" />
|
|
4
|
-
{{#if (safe-has this.table "selectedRows")}}
|
|
5
|
-
<DropdownButton @icon="layer-group" @text="Bulk Action" @type="magic" @size="sm" @buttonWrapperClass="mr-2" @contentClass="dropdown-menu" as |dd|>
|
|
6
|
-
<div class="next-dd-menu mt-2 mx-0">
|
|
7
|
-
<div class="px-1">
|
|
8
|
-
<a href="#" class="text-red-500 next-dd-item" {{on "click" (dropdown-fn dd this.bulkDeleteCustomers)}}>
|
|
9
|
-
Delete Drivers
|
|
10
|
-
</a>
|
|
11
|
-
</div>
|
|
12
|
-
</div>
|
|
13
|
-
</DropdownButton>
|
|
14
|
-
{{/if}}
|
|
15
4
|
<Button @icon="long-arrow-up" @iconClass="rotate-icon-45" @text="Export" />
|
|
16
5
|
</Layout::Section::Header>
|
|
17
6
|
|
|
@@ -1,164 +1,9 @@
|
|
|
1
|
-
<
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
<h4 class="font-semibold dark:text-gray-50 mb-4">{{pluralize @model.meta.total "Store"}} in your network</h4>
|
|
6
|
-
<p class="dark:text-gray-100">
|
|
7
|
-
You can organize your network by creating categories and dragging stores into the categories.
|
|
8
|
-
</p>
|
|
9
|
-
</div>
|
|
10
|
-
{{else}}
|
|
11
|
-
<h1 class="font-semibold dark:text-gray-50 mb-4">This network is empty</h1>
|
|
12
|
-
<p class="dark:text-gray-100">
|
|
13
|
-
Grow your network by sending invitations to others to create a storefront or add their existing storefront to your network. Optionally you may also add your own stores to your network to begin.
|
|
14
|
-
</p>
|
|
15
|
-
{{/if}}
|
|
16
|
-
</div>
|
|
17
|
-
<div class="flex items-start">
|
|
18
|
-
<Button @wrapperClass="mr-2 flex-shrink-0" @type="default" @icon="folder" @text="Add Category" @onClick={{fn this.createNewCategory this.network}} />
|
|
19
|
-
<Button @wrapperClass="mr-2 flex-shrink-0" @type="default" @icon="paper-plane" @text="Invite stores" @onClick={{fn this.invite this.network}} />
|
|
20
|
-
<Button @wrapperClass="flex-shrink-0" @type="default" @icon="plus" @iconPrefix="fas" @text="Add stores" @onClick={{fn this.addStores this.network}} />
|
|
21
|
-
</div>
|
|
22
|
-
</div>
|
|
1
|
+
<Layout::Section::Header @title="Stores" @searchQuery={{this.storeQuery}} @onSearch={{perform this.search}}>
|
|
2
|
+
<Button @type="primary" @icon="plus" @text="Add Stores" @onClick={{this.addStores}} @wrapperClass="mr-2" />
|
|
3
|
+
<Button @type="primary" @icon="envelope-open-text" @text="Invite Stores" @onClick={{this.invite}} />
|
|
4
|
+
</Layout::Section::Header>
|
|
23
5
|
|
|
24
|
-
<
|
|
25
|
-
<
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
<div>
|
|
29
|
-
<div class="flex items-center mb-3">
|
|
30
|
-
<FaIcon @prefix="fas" @icon="folder" @size="2x" class="text-blue-400 mr-3" />
|
|
31
|
-
{{#if this.category.parent_category}}
|
|
32
|
-
<div class="dark:text-blue-400 flex flex-row items-center">
|
|
33
|
-
<span class="text-xl font-bold">{{this.category.parent_category.name}}</span>
|
|
34
|
-
{{#if this.category.parent_category.icon}}
|
|
35
|
-
<FaIcon @icon={{this.category.parent_category.icon}} class="ml-1" />
|
|
36
|
-
{{/if}}
|
|
37
|
-
</div>
|
|
38
|
-
<span class="mx-2">
|
|
39
|
-
<FaIcon @icon="chevron-right" @prefix="fas" class="dark:text-blue-400 -mb-px" />
|
|
40
|
-
</span>
|
|
41
|
-
{{/if}}
|
|
42
|
-
<div class="dark:text-blue-400 flex flex-row items-center">
|
|
43
|
-
<span class="text-xl font-bold">{{this.category.name}}</span>
|
|
44
|
-
{{#if this.category.icon}}
|
|
45
|
-
<FaIcon @icon={{this.category.icon}} class="ml-1" />
|
|
46
|
-
{{/if}}
|
|
47
|
-
</div>
|
|
48
|
-
{{#if this.isLoading}}
|
|
49
|
-
<div class="ml-2 flex items-center">
|
|
50
|
-
<Spinner class="mr-2 text-sky-400" />
|
|
51
|
-
<span class="dark:text-sky-100 text-xs">Loading...</span>
|
|
52
|
-
</div>
|
|
53
|
-
{{/if}}
|
|
54
|
-
</div>
|
|
55
|
-
<div class="flex items-center">
|
|
56
|
-
<Button @wrapperClass="mr-2" @icon="long-arrow-alt-left" @text="Back" @onClick={{fn this.leaveCategory this.category.parent_category}} />
|
|
57
|
-
<Button @wrapperClass="mr-2" @icon="plus" @iconPrefix="fas" @text="Add Sub-Category" @onClick={{fn this.createNewSubCategory this.category}} />
|
|
58
|
-
<Button @wrapperClass="mr-2" @icon="edit" @text="Edit Category" @onClick={{fn this.editCategory this.category}} />
|
|
59
|
-
<Button @type="danger" @wrapperClass="mr-4" @icon="trash" @text="Delete Category" @onClick={{fn this.deleteCategory this.category}} />
|
|
60
|
-
</div>
|
|
61
|
-
</div>
|
|
62
|
-
{{else}}
|
|
63
|
-
<div class="flex items-center">
|
|
64
|
-
<FaIcon @prefix="fas" @icon="folder" @size="2x" class="text-blue-400 mr-2" />
|
|
65
|
-
<span class="text-xl font-bold dark:text-blue-400">Top Level</span>
|
|
66
|
-
</div>
|
|
67
|
-
{{#if this.isLoading}}
|
|
68
|
-
<div class="ml-2 flex items-center">
|
|
69
|
-
<Spinner class="mr-2 text-sky-400" />
|
|
70
|
-
<span class="dark:text-sky-100 text-xs">Loading...</span>
|
|
71
|
-
</div>
|
|
72
|
-
{{/if}}
|
|
73
|
-
{{/if}}
|
|
74
|
-
</div>
|
|
75
|
-
</div>
|
|
76
|
-
|
|
77
|
-
{{#if this.category}}
|
|
78
|
-
<div class="grid grid-cols-2 md:grid-cols-3 gap-2 md:gap-4 mb-6">
|
|
79
|
-
{{#each this.subCategories as |category|}}
|
|
80
|
-
<d.Container class="dragula-container network-folder" data-category={{category.id}}>
|
|
81
|
-
<a href="javascript:;" class="block" {{on "click" (fn this.enterCategory category)}}>
|
|
82
|
-
<div class="flex items-center justify-center mb-3">
|
|
83
|
-
<FaIcon @prefix="fas" @icon="folder" @size={{if (media 'isMobile') "4x" "5x"}} class="text-blue-400" />
|
|
84
|
-
</div>
|
|
85
|
-
<div class="flex items-center justify-center">
|
|
86
|
-
<div class="flex flex-col items-center justify-center rounded-md border bg-blue-400 border-blue-400 px-4 py-1 text-center text-blue-100 font-semibold truncate w-40">
|
|
87
|
-
{{category.name}}
|
|
88
|
-
{{#each-in category.translations as |lang translation|}}
|
|
89
|
-
<div>{{translation.name}}</div>
|
|
90
|
-
{{/each-in}}
|
|
91
|
-
</div>
|
|
92
|
-
</div>
|
|
93
|
-
</a>
|
|
94
|
-
</d.Container>
|
|
95
|
-
{{/each}}
|
|
96
|
-
</div>
|
|
97
|
-
{{else}}
|
|
98
|
-
<div class="grid grid-cols-2 md:grid-cols-3 gap-2 md:gap-4 mb-6">
|
|
99
|
-
{{#each this.categories as |category|}}
|
|
100
|
-
<d.Container class="dragula-container network-folder" data-category={{category.id}}>
|
|
101
|
-
<a href="javascript:;" class="block" {{on "click" (fn this.enterCategory category)}}>
|
|
102
|
-
<div class="flex items-center justify-center mb-3">
|
|
103
|
-
<FaIcon @prefix="fas" @icon="folder" @size={{if (media 'isMobile') "4x" "5x"}} class="text-blue-400" />
|
|
104
|
-
</div>
|
|
105
|
-
<div class="flex items-center justify-center">
|
|
106
|
-
<div class="flex flex-col items-center justify-center rounded-md border bg-blue-400 border-blue-400 px-4 py-1 text-center text-blue-100 font-semibold truncate w-40">
|
|
107
|
-
{{category.name}}
|
|
108
|
-
{{#each-in category.translations as |lang translation|}}
|
|
109
|
-
<div>{{translation.name}}</div>
|
|
110
|
-
{{/each-in}}
|
|
111
|
-
</div>
|
|
112
|
-
</div>
|
|
113
|
-
</a>
|
|
114
|
-
</d.Container>
|
|
115
|
-
{{/each}}
|
|
116
|
-
</div>
|
|
117
|
-
{{/if}}
|
|
118
|
-
|
|
119
|
-
<d.Container class="grid grid-cols-2 md:grid-cols-3 gap-2 md:gap-4 {{if this.isLoading 'hidden'}}">
|
|
120
|
-
{{#each this.stores as |store|}}
|
|
121
|
-
<div class="network-store" data-store={{store.id}}>
|
|
122
|
-
<div class="rounded-md border dark:border-gray-800 shadow-sm">
|
|
123
|
-
<div class="p-4 flex items-center justify-center rounded-t-md h-36" {{background-url store.backdrop_url overlay=true}}>
|
|
124
|
-
<img src={{store.logo_url}} class="w-32" alt={{store.name}} />
|
|
125
|
-
</div>
|
|
126
|
-
<div class="border-t dark:border-gray-800 px-4 py-2">
|
|
127
|
-
<div class="flex items-center justify-between">
|
|
128
|
-
<div class="flex-1 dark:text-gray-100 truncate">
|
|
129
|
-
{{store.name}}
|
|
130
|
-
</div>
|
|
131
|
-
<div>
|
|
132
|
-
<DropdownButton @size="xs" @icon="cog" @iconPrefix="fas" @textClass="block truncate" as |dd|>
|
|
133
|
-
<div role="menu" class="next-dd-menu" aria-orientation="vertical" aria-labelledby="user-menu">
|
|
134
|
-
<div class="px-1">
|
|
135
|
-
<div class="next-dd-title">
|
|
136
|
-
Store Options
|
|
137
|
-
</div>
|
|
138
|
-
</div>
|
|
139
|
-
<div class="next-dd-menu-seperator"></div>
|
|
140
|
-
<div role="group" class="px-1">
|
|
141
|
-
{{!-- <a href="javascript:;" class="next-dd-item" role="menuitem">
|
|
142
|
-
<FaIcon @icon="receipt" class="mr-2" />
|
|
143
|
-
<span>View orders via network</span>
|
|
144
|
-
</a>
|
|
145
|
-
<a href="javascript:;" class="next-dd-item" role="menuitem">
|
|
146
|
-
<FaIcon @icon="users" class="mr-2" />
|
|
147
|
-
<span>View customers via network</span>
|
|
148
|
-
</a> --}}
|
|
149
|
-
<a href="javascript:;" class="next-dd-item text-danger" role="menuitem" {{on "click" (fn this.dropdownAction dd "removeStore" store this.network)}}>
|
|
150
|
-
<FaIcon @icon="vote-nay" class="mr-2 text-red-500" />
|
|
151
|
-
<span>Remove store from network</span>
|
|
152
|
-
</a>
|
|
153
|
-
</div>
|
|
154
|
-
</div>
|
|
155
|
-
</DropdownButton>
|
|
156
|
-
</div>
|
|
157
|
-
</div>
|
|
158
|
-
</div>
|
|
159
|
-
</div>
|
|
160
|
-
</div>
|
|
161
|
-
{{/each}}
|
|
162
|
-
</d.Container>
|
|
163
|
-
</EmberDragula>
|
|
164
|
-
<div class="mb-96 h-96 block w-full"></div>
|
|
6
|
+
<Layout::Section::Body>
|
|
7
|
+
<NetworkCategoryPicker @network={{this.network}} @onCreateNewCategory={{this.createNewCategory}} @onSelect={{this.selectCategory}} @wrapperClass="my-4 ml-9" />
|
|
8
|
+
<Table @rows={{@model}} @columns={{this.columns}} @selectable={{true}} @canSelectAll={{true}} @onSetup={{fn (mut this.table)}} @tfoot={{false}} @selectAllColumnWidth={{20}} />
|
|
9
|
+
</Layout::Section::Body>
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
<Overlay @position="right" @
|
|
1
|
+
<Overlay @position="right" @isResizable={{true}} @noBackdrop={{true}} @width="800px" @minResizeWidth={{700}} @fullHeight={{true}}>
|
|
2
2
|
<Overlay::Header @title="Manage Network" @onPressCancel={{this.transitionBack}} />
|
|
3
|
-
|
|
4
3
|
<Overlay::Body class="p-0i" @increaseInnerBodyHeightBy="0" @wrapperClass="space-y-4 pt-4">
|
|
5
4
|
<div class="flex flex-col">
|
|
6
5
|
<div class="px-4 flex items-center section-header-title mb-4">
|
|
@@ -33,6 +32,6 @@
|
|
|
33
32
|
</div>
|
|
34
33
|
</div>
|
|
35
34
|
|
|
36
|
-
<div
|
|
35
|
+
<div>{{outlet}}</div>
|
|
37
36
|
</Overlay::Body>
|
|
38
37
|
</Overlay>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export default function createShareableLink(path, queryParams = {}) {
|
|
2
|
+
// Get the current URL
|
|
3
|
+
const currentUrl = window.location.href;
|
|
4
|
+
|
|
5
|
+
// Create a URL object from the current URL
|
|
6
|
+
const url = new URL(currentUrl);
|
|
7
|
+
|
|
8
|
+
// Replace the existing path with the provided path
|
|
9
|
+
url.pathname = path;
|
|
10
|
+
|
|
11
|
+
// Clear any existing query parameters
|
|
12
|
+
url.search = '';
|
|
13
|
+
|
|
14
|
+
// Add the provided query parameters
|
|
15
|
+
for (const [key, value] of Object.entries(queryParams)) {
|
|
16
|
+
url.searchParams.append(key, value);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// Return the new URL as a string
|
|
20
|
+
return url.toString();
|
|
21
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from '@fleetbase/storefront
|
|
1
|
+
export { default } from '@fleetbase/storefront/adapters/addon-category';
|
package/app/adapters/gateway.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from '@fleetbase/storefront
|
|
1
|
+
export { default } from '@fleetbase/storefront/adapters/gateway';
|
package/app/adapters/network.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from '@fleetbase/storefront
|
|
1
|
+
export { default } from '@fleetbase/storefront/adapters/network';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from '@fleetbase/storefront
|
|
1
|
+
export { default } from '@fleetbase/storefront/adapters/notification-channel';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from '@fleetbase/storefront
|
|
1
|
+
export { default } from '@fleetbase/storefront/adapters/product-addon-category';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from '@fleetbase/storefront
|
|
1
|
+
export { default } from '@fleetbase/storefront/adapters/product-addon';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from '@fleetbase/storefront
|
|
1
|
+
export { default } from '@fleetbase/storefront/adapters/product-hour';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from '@fleetbase/storefront
|
|
1
|
+
export { default } from '@fleetbase/storefront/adapters/product-store-location';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from '@fleetbase/storefront
|
|
1
|
+
export { default } from '@fleetbase/storefront/adapters/product-variant-option';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from '@fleetbase/storefront
|
|
1
|
+
export { default } from '@fleetbase/storefront/adapters/product-variant';
|
package/app/adapters/product.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from '@fleetbase/storefront
|
|
1
|
+
export { default } from '@fleetbase/storefront/adapters/product';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from '@fleetbase/storefront
|
|
1
|
+
export { default } from '@fleetbase/storefront/adapters/store-hour';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from '@fleetbase/storefront
|
|
1
|
+
export { default } from '@fleetbase/storefront/adapters/store-location';
|
package/app/adapters/store.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from '@fleetbase/storefront
|
|
1
|
+
export { default } from '@fleetbase/storefront/adapters/store';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from '@fleetbase/storefront
|
|
1
|
+
export { default } from '@fleetbase/storefront/adapters/storefront';
|