@fleetbase/storefront-engine 0.2.7 → 0.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/addon/components/file-record.hbs +9 -2
- package/addon/components/file-record.js +3 -2
- package/addon/components/modals/add-store-hours.hbs +12 -2
- package/addon/components/modals/assign-driver.hbs +18 -5
- package/addon/components/modals/create-first-store.hbs +18 -6
- package/addon/components/modals/create-gateway.hbs +19 -7
- package/addon/components/modals/create-network-category.hbs +23 -5
- package/addon/components/modals/create-network.hbs +15 -7
- package/addon/components/modals/create-new-variant.hbs +20 -4
- package/addon/components/modals/create-notification-channel.hbs +22 -17
- package/addon/components/modals/create-product-category.hbs +22 -7
- package/addon/components/modals/create-store.hbs +11 -3
- package/addon/components/modals/import-products.hbs +34 -15
- package/addon/components/modals/incoming-order.hbs +29 -19
- package/addon/components/modals/manage-addons.hbs +50 -9
- package/addon/components/modals/manage-addons.js +3 -2
- package/addon/components/modals/order-ready-assign-driver.hbs +24 -13
- package/addon/components/modals/select-addon-category.hbs +8 -1
- package/addon/components/modals/share-network.hbs +23 -8
- package/addon/components/modals/store-details.hbs +4 -4
- package/addon/components/modals/store-form.hbs +24 -5
- package/addon/components/modals/store-location-form.hbs +26 -16
- package/addon/components/network-category-picker.hbs +17 -6
- package/addon/components/schedule-manager.hbs +8 -1
- package/addon/components/schedule-manager.js +6 -5
- package/addon/components/store-selector.hbs +14 -3
- package/addon/components/widget/customers.hbs +16 -7
- package/addon/components/widget/customers.js +2 -1
- package/addon/components/widget/orders.hbs +58 -23
- package/addon/components/widget/orders.js +17 -16
- package/addon/components/widget/storefront-metrics.hbs +5 -5
- package/addon/controllers/customers/index.js +21 -13
- package/addon/controllers/networks/index/network/index.js +16 -9
- package/addon/controllers/networks/index/network/stores.js +39 -31
- package/addon/controllers/networks/index/network.js +3 -2
- package/addon/controllers/networks/index.js +10 -3
- package/addon/controllers/orders/index.js +30 -23
- package/addon/controllers/products/index/category/edit.js +5 -3
- package/addon/controllers/products/index/category/new.js +17 -11
- package/addon/controllers/products/index/category.js +8 -7
- package/addon/controllers/products/index/index.js +9 -2
- package/addon/controllers/products/index.js +9 -8
- package/addon/controllers/settings/gateways.js +7 -6
- package/addon/controllers/settings/index.js +1 -0
- package/addon/controllers/settings/locations.js +18 -11
- package/addon/controllers/settings/notifications.js +8 -7
- package/addon/services/storefront.js +13 -7
- package/addon/templates/application.hbs +8 -8
- package/addon/templates/customers/index/edit.hbs +0 -1
- package/addon/templates/customers/index.hbs +23 -4
- package/addon/templates/home.hbs +1 -1
- package/addon/templates/networks/index/network/customers.hbs +0 -1
- package/addon/templates/networks/index/network/index.hbs +200 -62
- package/addon/templates/networks/index/network/orders.hbs +0 -1
- package/addon/templates/networks/index/network/stores.hbs +18 -3
- package/addon/templates/networks/index/network.hbs +5 -5
- package/addon/templates/networks/index.hbs +12 -7
- package/addon/templates/orders/index/edit.hbs +0 -1
- package/addon/templates/orders/index/new.hbs +0 -1
- package/addon/templates/orders/index/view.hbs +0 -1
- package/addon/templates/orders/index.hbs +25 -6
- package/addon/templates/products/index/category/new.hbs +74 -22
- package/addon/templates/products/index.hbs +27 -6
- package/addon/templates/settings/api.hbs +3 -3
- package/addon/templates/settings/gateways.hbs +10 -10
- package/addon/templates/settings/index.hbs +146 -51
- package/addon/templates/settings/locations.hbs +13 -6
- package/addon/templates/settings/notifications.hbs +5 -7
- package/addon/templates/settings.hbs +6 -6
- package/composer.json +3 -3
- package/extension.json +1 -1
- package/package.json +5 -3
- package/translations/en-us.yaml +574 -1
|
@@ -18,6 +18,14 @@ export default class NetworksIndexNetworkStoresController extends Controller {
|
|
|
18
18
|
*/
|
|
19
19
|
@service notifications;
|
|
20
20
|
|
|
21
|
+
/**
|
|
22
|
+
* Inject the `intl` service
|
|
23
|
+
*
|
|
24
|
+
* @var {Service}
|
|
25
|
+
* @memberof NetworksIndexNetworkStoresController
|
|
26
|
+
*/
|
|
27
|
+
@service intl;
|
|
28
|
+
|
|
21
29
|
/**
|
|
22
30
|
* Inject the `modals-manager` service
|
|
23
31
|
*
|
|
@@ -128,7 +136,7 @@ export default class NetworksIndexNetworkStoresController extends Controller {
|
|
|
128
136
|
*/
|
|
129
137
|
@tracked columns = [
|
|
130
138
|
{
|
|
131
|
-
label: '
|
|
139
|
+
label: this.intl.t('storefront.networks.index.network.stores.store'),
|
|
132
140
|
valuePath: 'name',
|
|
133
141
|
width: '130px',
|
|
134
142
|
resizable: true,
|
|
@@ -138,7 +146,7 @@ export default class NetworksIndexNetworkStoresController extends Controller {
|
|
|
138
146
|
showOnlineIndicator: true,
|
|
139
147
|
},
|
|
140
148
|
{
|
|
141
|
-
label: '
|
|
149
|
+
label: this.intl.t('storefront.common.id'),
|
|
142
150
|
valuePath: 'public_id',
|
|
143
151
|
cellComponent: 'click-to-copy',
|
|
144
152
|
width: '120px',
|
|
@@ -148,7 +156,7 @@ export default class NetworksIndexNetworkStoresController extends Controller {
|
|
|
148
156
|
filterComponent: 'filter/string',
|
|
149
157
|
},
|
|
150
158
|
{
|
|
151
|
-
label: '
|
|
159
|
+
label: this.intl.t('storefront.common.category'),
|
|
152
160
|
valuePath: 'category.name',
|
|
153
161
|
cellComponent: 'table/cell/base',
|
|
154
162
|
width: '100px',
|
|
@@ -158,7 +166,7 @@ export default class NetworksIndexNetworkStoresController extends Controller {
|
|
|
158
166
|
filterComponent: 'filter/string',
|
|
159
167
|
},
|
|
160
168
|
{
|
|
161
|
-
label: '
|
|
169
|
+
label: this.intl.t('storefront.common.currency'),
|
|
162
170
|
valuePath: 'currency',
|
|
163
171
|
cellComponent: 'table/cell/base',
|
|
164
172
|
width: '100px',
|
|
@@ -168,7 +176,7 @@ export default class NetworksIndexNetworkStoresController extends Controller {
|
|
|
168
176
|
filterComponent: 'filter/string',
|
|
169
177
|
},
|
|
170
178
|
{
|
|
171
|
-
label: '
|
|
179
|
+
label: this.intl.t('storefront.networks.index.network.stores.created-at'),
|
|
172
180
|
valuePath: 'createdAtShort',
|
|
173
181
|
sortParam: 'created_at',
|
|
174
182
|
width: '100px',
|
|
@@ -189,22 +197,22 @@ export default class NetworksIndexNetworkStoresController extends Controller {
|
|
|
189
197
|
width: '50px',
|
|
190
198
|
actions: [
|
|
191
199
|
{
|
|
192
|
-
label: '
|
|
200
|
+
label: this.intl.t('storefront.networks.index.network.stores.view-store-details'),
|
|
193
201
|
fn: this.viewStoreDetails,
|
|
194
202
|
},
|
|
195
203
|
{
|
|
196
|
-
label: '
|
|
204
|
+
label: this.intl.t('storefront.networks.index.network.stores.edit-store'),
|
|
197
205
|
fn: this.editStore,
|
|
198
206
|
},
|
|
199
207
|
{
|
|
200
|
-
label: '
|
|
208
|
+
label: this.intl.t('storefront.networks.index.network.stores.assign-category'),
|
|
201
209
|
fn: this.assignStoreToCategory,
|
|
202
210
|
},
|
|
203
211
|
{
|
|
204
212
|
separator: true,
|
|
205
213
|
},
|
|
206
214
|
{
|
|
207
|
-
label: '
|
|
215
|
+
label: this.intl.t('storefront.networks.index.network.stores.remove-store-from-network'),
|
|
208
216
|
fn: this.removeStore,
|
|
209
217
|
},
|
|
210
218
|
],
|
|
@@ -263,8 +271,8 @@ export default class NetworksIndexNetworkStoresController extends Controller {
|
|
|
263
271
|
*/
|
|
264
272
|
@action deleteCategory(category) {
|
|
265
273
|
this.modalsManager.confirm({
|
|
266
|
-
title: '
|
|
267
|
-
body: '
|
|
274
|
+
title: this.intl.t('storefront.networks.index.network.stores.delete-network-category'),
|
|
275
|
+
body: this.intl.t('storefront.networks.index.network.stores.deleting-category-move-all-stores-inside-on-top-level'),
|
|
268
276
|
confirm: (modal) => {
|
|
269
277
|
modal.startLoading();
|
|
270
278
|
|
|
@@ -287,8 +295,8 @@ export default class NetworksIndexNetworkStoresController extends Controller {
|
|
|
287
295
|
*/
|
|
288
296
|
@action assignStoreToCategory(store, options = {}) {
|
|
289
297
|
this.modalsManager.show('modals/add-store-to-category', {
|
|
290
|
-
title: '
|
|
291
|
-
acceptButtonText: '
|
|
298
|
+
title: this.intl.t('storefront.networks.index.network.stores.add-store-to-category'),
|
|
299
|
+
acceptButtonText: this.intl.t('storefront.networks.index.network.stores.save-change'),
|
|
292
300
|
acceptButtonIcon: 'save',
|
|
293
301
|
selectedCategory: null,
|
|
294
302
|
network: this.network,
|
|
@@ -366,10 +374,10 @@ export default class NetworksIndexNetworkStoresController extends Controller {
|
|
|
366
374
|
const category = this.store.createRecord('category', categoryAttrs);
|
|
367
375
|
|
|
368
376
|
return this.editCategory(category, {
|
|
369
|
-
title: '
|
|
377
|
+
title: this.intl.t('storefront.networks.index.network.stores.add-new-network-category'),
|
|
370
378
|
acceptButtonIcon: 'check',
|
|
371
|
-
acceptButtonText: '
|
|
372
|
-
successMessage: '
|
|
379
|
+
acceptButtonText: this.intl.t('storefront.networks.index.network.stores.create-new-category'),
|
|
380
|
+
successMessage: this.intl.t('storefront.networks.index.network.stores.new-category-created'),
|
|
373
381
|
parentCategory,
|
|
374
382
|
category,
|
|
375
383
|
confirm: (modal) => {
|
|
@@ -378,7 +386,7 @@ export default class NetworksIndexNetworkStoresController extends Controller {
|
|
|
378
386
|
category
|
|
379
387
|
.save()
|
|
380
388
|
.then((category) => {
|
|
381
|
-
this.notifications.success('
|
|
389
|
+
this.notifications.success(this.intl.t('storefront.networks.index.network.stores.network-category-create'));
|
|
382
390
|
networkCategoriesPicker.categories.pushObject(category);
|
|
383
391
|
modal.done();
|
|
384
392
|
})
|
|
@@ -400,8 +408,8 @@ export default class NetworksIndexNetworkStoresController extends Controller {
|
|
|
400
408
|
*/
|
|
401
409
|
@action editCategory(category, options = {}) {
|
|
402
410
|
this.modalsManager.show('modals/create-network-category', {
|
|
403
|
-
title:
|
|
404
|
-
acceptButtonText: '
|
|
411
|
+
title: this.intl.t('storefront.networks.index.network.stores.edit-category', { categoryName: category.name }),
|
|
412
|
+
acceptButtonText: this.intl.t('storefront.networks.index.network.stores.save-change'),
|
|
405
413
|
acceptButtonIcon: 'save',
|
|
406
414
|
iconType: category.icon_file_uuid ? 'image' : 'svg',
|
|
407
415
|
network: this.network,
|
|
@@ -467,7 +475,7 @@ export default class NetworksIndexNetworkStoresController extends Controller {
|
|
|
467
475
|
|
|
468
476
|
return this.modalsManager.done().then(() => {
|
|
469
477
|
this.modalsManager.show('modals/add-stores-to-network', {
|
|
470
|
-
title: '
|
|
478
|
+
title: this.intl.t('storefront.networks.index.network.stores.add-stores-to-network'),
|
|
471
479
|
acceptButtonIcon: 'check',
|
|
472
480
|
stores,
|
|
473
481
|
members,
|
|
@@ -485,7 +493,7 @@ export default class NetworksIndexNetworkStoresController extends Controller {
|
|
|
485
493
|
|
|
486
494
|
return network.addStores(stores, remove).then(() => {
|
|
487
495
|
return this.hostRouter.refresh().then(() => {
|
|
488
|
-
this.notifications.success('
|
|
496
|
+
this.notifications.success(this.intl.t('storefront.networks.index.network.stores.network-stores-update'));
|
|
489
497
|
});
|
|
490
498
|
});
|
|
491
499
|
},
|
|
@@ -502,8 +510,8 @@ export default class NetworksIndexNetworkStoresController extends Controller {
|
|
|
502
510
|
*/
|
|
503
511
|
@action async removeStore(store) {
|
|
504
512
|
this.modalsManager.confirm({
|
|
505
|
-
title:
|
|
506
|
-
body: '
|
|
513
|
+
title: this.intl.t('storefront.networks.index.network.stores.remove-this-store', { storeName: store.name, networkName: this.network.name }),
|
|
514
|
+
body: this.intl.t('storefront.networks.index.network.stores.longer-findable-by-this-network'),
|
|
507
515
|
acceptButtonIcon: 'check',
|
|
508
516
|
acceptButtonIconPrefix: 'fas',
|
|
509
517
|
declineButtonIcon: 'times',
|
|
@@ -535,8 +543,8 @@ export default class NetworksIndexNetworkStoresController extends Controller {
|
|
|
535
543
|
*/
|
|
536
544
|
@action viewStoreDetails(store, options = {}) {
|
|
537
545
|
this.modalsManager.show('modals/store-details', {
|
|
538
|
-
title:
|
|
539
|
-
acceptButtonText: '
|
|
546
|
+
title: this.intl.t('storefront.networks.index.network.stores.viewing-storefront', { storeName: store.name }),
|
|
547
|
+
acceptButtonText: this.intl.t('storefront.networks.index.network.stores.done'),
|
|
540
548
|
hideDeclineButton: true,
|
|
541
549
|
store,
|
|
542
550
|
...options,
|
|
@@ -553,8 +561,8 @@ export default class NetworksIndexNetworkStoresController extends Controller {
|
|
|
553
561
|
*/
|
|
554
562
|
@action editStore(store, options = {}) {
|
|
555
563
|
this.modalsManager.show('modals/store-form', {
|
|
556
|
-
title:
|
|
557
|
-
acceptButtonText: '
|
|
564
|
+
title: this.intl.t('storefront.networks.index.network.stores.editing-storefront', { storeName: store.name }),
|
|
565
|
+
acceptButtonText: this.intl.t('storefront.networks.index.network.stores.save-change'),
|
|
558
566
|
hideDeclineButton: true,
|
|
559
567
|
store,
|
|
560
568
|
confirm: (modal) => {
|
|
@@ -586,8 +594,8 @@ export default class NetworksIndexNetworkStoresController extends Controller {
|
|
|
586
594
|
const shareableLink = createShareableLink(`join/network/${this.network.public_id}`);
|
|
587
595
|
|
|
588
596
|
this.modalsManager.show('modals/share-network', {
|
|
589
|
-
title: '
|
|
590
|
-
acceptButtonText: '
|
|
597
|
+
title: this.intl.t('storefront.networks.index.network.stores.add-stores-to-network'),
|
|
598
|
+
acceptButtonText: this.intl.t('storefront.networks.index.network.stores.send-invitations'),
|
|
591
599
|
acceptButtonIcon: 'paper-plane',
|
|
592
600
|
acceptButtonDisabled: true,
|
|
593
601
|
shareableLink,
|
|
@@ -626,12 +634,12 @@ export default class NetworksIndexNetworkStoresController extends Controller {
|
|
|
626
634
|
if (!isValid) {
|
|
627
635
|
modal.stopLoading();
|
|
628
636
|
|
|
629
|
-
return this.notifications.error('
|
|
637
|
+
return this.notifications.error(this.intl.t('storefront.networks.index.network.stores.invalid-emails-provided-error'));
|
|
630
638
|
}
|
|
631
639
|
|
|
632
640
|
return this.network.sendInvites(recipients).then(() => {
|
|
633
641
|
modal.stopLoading();
|
|
634
|
-
this.notifications.success('
|
|
642
|
+
this.notifications.success(this.intl.t('storefront.networks.index.network.stores.invitation-sent-recipients'));
|
|
635
643
|
});
|
|
636
644
|
},
|
|
637
645
|
});
|
|
@@ -4,13 +4,14 @@ import { action } from '@ember/object';
|
|
|
4
4
|
|
|
5
5
|
export default class NetworksIndexNetworkController extends BaseController {
|
|
6
6
|
@service modalsManager;
|
|
7
|
+
@service intl;
|
|
7
8
|
|
|
8
9
|
@action transitionBack({ closeOverlay }) {
|
|
9
10
|
if (this.model.hasDirtyAttributes) {
|
|
10
11
|
// warn user about unsaved changes
|
|
11
12
|
return this.modalsManager.confirm({
|
|
12
|
-
title: 'Network
|
|
13
|
-
body: '
|
|
13
|
+
title: this.intl.t('storefront.controllers.networks.index.network.Network-changes-not-save'),
|
|
14
|
+
body: this.intl.t('storefront.controllers.networks.index.network.going-back-will-rollback-all-unsaved-changes'),
|
|
14
15
|
confirm: (modal) => {
|
|
15
16
|
modal.done();
|
|
16
17
|
return this.exit(closeOverlay);
|
|
@@ -22,6 +22,13 @@ export default class NetworksIndexController extends BaseController {
|
|
|
22
22
|
*/
|
|
23
23
|
@service notifications;
|
|
24
24
|
|
|
25
|
+
/**
|
|
26
|
+
* Inject the `intl` service
|
|
27
|
+
*
|
|
28
|
+
* @var {Service}
|
|
29
|
+
*/
|
|
30
|
+
@service intl;
|
|
31
|
+
|
|
25
32
|
/**
|
|
26
33
|
* Inject the `modals-manager` service
|
|
27
34
|
*
|
|
@@ -167,13 +174,13 @@ export default class NetworksIndexController extends BaseController {
|
|
|
167
174
|
}
|
|
168
175
|
|
|
169
176
|
this.modalsManager.show('modals/create-network', {
|
|
170
|
-
title: '
|
|
177
|
+
title: this.intl.t('storefront.networks.index.create-new-network'),
|
|
171
178
|
network,
|
|
172
179
|
confirm: (modal) => {
|
|
173
180
|
modal.startLoading();
|
|
174
181
|
|
|
175
182
|
return network.save().then(() => {
|
|
176
|
-
this.notifications.success('
|
|
183
|
+
this.notifications.success(this.intl.t('storefront.networks.index.success-message'));
|
|
177
184
|
return this.hostRouter.refresh();
|
|
178
185
|
});
|
|
179
186
|
},
|
|
@@ -192,7 +199,7 @@ export default class NetworksIndexController extends BaseController {
|
|
|
192
199
|
*/
|
|
193
200
|
@action deleteNetwork(network) {
|
|
194
201
|
return this.crud.delete(network, {
|
|
195
|
-
title:
|
|
202
|
+
title: this.intl.t('storefront.networks.index.delete-this-network-all-assigned-stores-customer-order', { networkName: network.name }),
|
|
196
203
|
onSuccess: () => {
|
|
197
204
|
return this.hostRouter.refresh();
|
|
198
205
|
},
|
|
@@ -13,6 +13,13 @@ export default class OrdersIndexController extends Controller {
|
|
|
13
13
|
*/
|
|
14
14
|
@service notifications;
|
|
15
15
|
|
|
16
|
+
/**
|
|
17
|
+
* Inject the `intl` service
|
|
18
|
+
*
|
|
19
|
+
* @var {Service}
|
|
20
|
+
*/
|
|
21
|
+
@service intl;
|
|
22
|
+
|
|
16
23
|
/**
|
|
17
24
|
* Inject the `modals-manager` service
|
|
18
25
|
*
|
|
@@ -84,7 +91,7 @@ export default class OrdersIndexController extends Controller {
|
|
|
84
91
|
|
|
85
92
|
@tracked columns = [
|
|
86
93
|
{
|
|
87
|
-
label: '
|
|
94
|
+
label: this.intl.t('storefront.common.id'),
|
|
88
95
|
valuePath: 'public_id',
|
|
89
96
|
width: '150px',
|
|
90
97
|
cellComponent: 'table/cell/link-to',
|
|
@@ -96,7 +103,7 @@ export default class OrdersIndexController extends Controller {
|
|
|
96
103
|
filterComponent: 'filter/string',
|
|
97
104
|
},
|
|
98
105
|
{
|
|
99
|
-
label: '
|
|
106
|
+
label: this.intl.t('storefront.orders.index.internal-id'),
|
|
100
107
|
valuePath: 'internal_id',
|
|
101
108
|
width: '125px',
|
|
102
109
|
resizable: true,
|
|
@@ -105,7 +112,7 @@ export default class OrdersIndexController extends Controller {
|
|
|
105
112
|
filterComponent: 'filter/string',
|
|
106
113
|
},
|
|
107
114
|
{
|
|
108
|
-
label: '
|
|
115
|
+
label: this.intl.t('storefront.orders.index.customer'),
|
|
109
116
|
valuePath: 'customer.name',
|
|
110
117
|
cellComponent: 'table/cell/base',
|
|
111
118
|
width: '125px',
|
|
@@ -114,12 +121,12 @@ export default class OrdersIndexController extends Controller {
|
|
|
114
121
|
hidden: true,
|
|
115
122
|
filterable: true,
|
|
116
123
|
filterComponent: 'filter/model',
|
|
117
|
-
filterComponentPlaceholder: '
|
|
124
|
+
filterComponentPlaceholder: this.intl.t('storefront.orders.index.select-order-customer'),
|
|
118
125
|
filterParam: 'customer',
|
|
119
126
|
model: 'customer',
|
|
120
127
|
},
|
|
121
128
|
{
|
|
122
|
-
label: '
|
|
129
|
+
label: this.intl.t('storefront.common.pickup'),
|
|
123
130
|
valuePath: 'pickupName',
|
|
124
131
|
cellComponent: 'table/cell/base',
|
|
125
132
|
width: '160px',
|
|
@@ -127,12 +134,12 @@ export default class OrdersIndexController extends Controller {
|
|
|
127
134
|
sortable: true,
|
|
128
135
|
filterable: true,
|
|
129
136
|
filterComponent: 'filter/model',
|
|
130
|
-
filterComponentPlaceholder: '
|
|
137
|
+
filterComponentPlaceholder: this.intl.t('storefront.orders.index.select-order-pickup-location'),
|
|
131
138
|
filterParam: 'pickup',
|
|
132
139
|
model: 'place',
|
|
133
140
|
},
|
|
134
141
|
{
|
|
135
|
-
label: '
|
|
142
|
+
label: this.intl.t('storefront.common.dropoff'),
|
|
136
143
|
valuePath: 'dropoffName',
|
|
137
144
|
cellComponent: 'table/cell/base',
|
|
138
145
|
width: '160px',
|
|
@@ -140,12 +147,12 @@ export default class OrdersIndexController extends Controller {
|
|
|
140
147
|
sortable: true,
|
|
141
148
|
filterable: true,
|
|
142
149
|
filterComponent: 'filter/model',
|
|
143
|
-
filterComponentPlaceholder: '
|
|
150
|
+
filterComponentPlaceholder: this.intl.t('storefront.orders.index.select-order-dropoff-location'),
|
|
144
151
|
filterParam: 'dropoff',
|
|
145
152
|
model: 'place',
|
|
146
153
|
},
|
|
147
154
|
{
|
|
148
|
-
label: '
|
|
155
|
+
label: this.intl.t('storefront.orders.index.scheduled-at'),
|
|
149
156
|
valuePath: 'scheduledAt',
|
|
150
157
|
sortParam: 'scheduled_at',
|
|
151
158
|
filterParam: 'scheduled_at',
|
|
@@ -164,7 +171,7 @@ export default class OrdersIndexController extends Controller {
|
|
|
164
171
|
width: '50px',
|
|
165
172
|
},
|
|
166
173
|
{
|
|
167
|
-
label: '
|
|
174
|
+
label: this.intl.t('storefront.orders.index.transaction-total'),
|
|
168
175
|
cellComponent: 'table/cell/base',
|
|
169
176
|
valuePath: 'transaction_amount',
|
|
170
177
|
width: '50px',
|
|
@@ -173,7 +180,7 @@ export default class OrdersIndexController extends Controller {
|
|
|
173
180
|
sortable: true,
|
|
174
181
|
},
|
|
175
182
|
{
|
|
176
|
-
label: '
|
|
183
|
+
label: this.intl.t('storefront.orders.index.tracking-number'),
|
|
177
184
|
cellComponent: 'table/cell/base',
|
|
178
185
|
valuePath: 'tracking_number.tracking_number',
|
|
179
186
|
width: '170px',
|
|
@@ -183,7 +190,7 @@ export default class OrdersIndexController extends Controller {
|
|
|
183
190
|
filterComponent: 'filter/string',
|
|
184
191
|
},
|
|
185
192
|
{
|
|
186
|
-
label: '
|
|
193
|
+
label: this.intl.t('storefront.orders.index.driver-assigned'),
|
|
187
194
|
cellComponent: 'table/cell/driver-name',
|
|
188
195
|
valuePath: 'driver_assigned',
|
|
189
196
|
modelPath: 'driver_assigned',
|
|
@@ -192,7 +199,7 @@ export default class OrdersIndexController extends Controller {
|
|
|
192
199
|
sortable: true,
|
|
193
200
|
filterable: true,
|
|
194
201
|
filterComponent: 'filter/model',
|
|
195
|
-
filterComponentPlaceholder: '
|
|
202
|
+
filterComponentPlaceholder: this.intl.t('storefront.orders.index.select-driver-for-order'),
|
|
196
203
|
filterParam: 'driver',
|
|
197
204
|
model: 'driver',
|
|
198
205
|
query: {
|
|
@@ -201,7 +208,7 @@ export default class OrdersIndexController extends Controller {
|
|
|
201
208
|
},
|
|
202
209
|
},
|
|
203
210
|
{
|
|
204
|
-
label: '
|
|
211
|
+
label: this.intl.t('storefront.common.type'),
|
|
205
212
|
cellComponent: 'cell/humanize',
|
|
206
213
|
valuePath: 'type',
|
|
207
214
|
width: '100px',
|
|
@@ -210,7 +217,7 @@ export default class OrdersIndexController extends Controller {
|
|
|
210
217
|
sortable: true,
|
|
211
218
|
},
|
|
212
219
|
{
|
|
213
|
-
label: '
|
|
220
|
+
label: this.intl.t('storefront.common.status'),
|
|
214
221
|
valuePath: 'status',
|
|
215
222
|
cellComponent: 'table/cell/status',
|
|
216
223
|
width: '120px',
|
|
@@ -221,7 +228,7 @@ export default class OrdersIndexController extends Controller {
|
|
|
221
228
|
// filterOptions: this.statusOptions,
|
|
222
229
|
},
|
|
223
230
|
{
|
|
224
|
-
label: '
|
|
231
|
+
label: this.intl.t('storefront.orders.index.created-at'),
|
|
225
232
|
valuePath: 'createdAt',
|
|
226
233
|
sortParam: 'created_at',
|
|
227
234
|
filterParam: 'created_at',
|
|
@@ -232,7 +239,7 @@ export default class OrdersIndexController extends Controller {
|
|
|
232
239
|
filterComponent: 'filter/date',
|
|
233
240
|
},
|
|
234
241
|
{
|
|
235
|
-
label: '
|
|
242
|
+
label: this.intl.t('storefront.orders.index.updated-at'),
|
|
236
243
|
valuePath: 'updatedAt',
|
|
237
244
|
sortParam: 'updated_at',
|
|
238
245
|
filterParam: 'updated_at',
|
|
@@ -244,7 +251,7 @@ export default class OrdersIndexController extends Controller {
|
|
|
244
251
|
filterComponent: 'filter/date',
|
|
245
252
|
},
|
|
246
253
|
{
|
|
247
|
-
label: '
|
|
254
|
+
label: this.intl.t('storefront.orders.index.created-by'),
|
|
248
255
|
valuePath: 'created_by_name',
|
|
249
256
|
width: '125px',
|
|
250
257
|
resizable: true,
|
|
@@ -256,14 +263,14 @@ export default class OrdersIndexController extends Controller {
|
|
|
256
263
|
model: 'user',
|
|
257
264
|
},
|
|
258
265
|
{
|
|
259
|
-
label: '
|
|
266
|
+
label: this.intl.t('storefront.orders.index.updated-by'),
|
|
260
267
|
valuePath: 'updated_by_name',
|
|
261
268
|
width: '125px',
|
|
262
269
|
resizable: true,
|
|
263
270
|
hidden: true,
|
|
264
271
|
filterable: true,
|
|
265
272
|
filterComponent: 'filter/model',
|
|
266
|
-
filterComponentPlaceholder: '
|
|
273
|
+
filterComponentPlaceholder: this.intl.t('storefront.orders.index.select-user'),
|
|
267
274
|
filterParam: 'updated_by',
|
|
268
275
|
model: 'user',
|
|
269
276
|
},
|
|
@@ -279,12 +286,12 @@ export default class OrdersIndexController extends Controller {
|
|
|
279
286
|
width: '12%',
|
|
280
287
|
actions: [
|
|
281
288
|
{
|
|
282
|
-
label: '
|
|
289
|
+
label: this.intl.t('storefront.orders.index.view-order'),
|
|
283
290
|
icon: 'eye',
|
|
284
291
|
fn: this.viewOrder,
|
|
285
292
|
},
|
|
286
293
|
{
|
|
287
|
-
label: '
|
|
294
|
+
label: this.intl.t('storefront.orders.index.cancel-order'),
|
|
288
295
|
icon: 'ban',
|
|
289
296
|
fn: this.cancelOrder,
|
|
290
297
|
},
|
|
@@ -292,7 +299,7 @@ export default class OrdersIndexController extends Controller {
|
|
|
292
299
|
separator: true,
|
|
293
300
|
},
|
|
294
301
|
{
|
|
295
|
-
label: '
|
|
302
|
+
label: this.intl.t('storefront.orders.index.delete-order'),
|
|
296
303
|
icon: 'trash',
|
|
297
304
|
fn: this.deleteOrder,
|
|
298
305
|
},
|
|
@@ -2,9 +2,11 @@ import ProductsIndexCategoryNewController from './new';
|
|
|
2
2
|
import { tracked } from '@glimmer/tracking';
|
|
3
3
|
import { alias } from '@ember/object/computed';
|
|
4
4
|
import { action } from '@ember/object';
|
|
5
|
+
import { inject as service } from '@ember/service';
|
|
5
6
|
|
|
6
7
|
export default class ProductsIndexCategoryEditController extends ProductsIndexCategoryNewController {
|
|
7
8
|
@alias('model') product;
|
|
9
|
+
@service intl;
|
|
8
10
|
@tracked overlayActionButtonTitle = 'Save Changes';
|
|
9
11
|
@tracked overlayActionButtonIcon = 'save';
|
|
10
12
|
@tracked overlayExitButtonTitle = 'Done';
|
|
@@ -21,7 +23,7 @@ export default class ProductsIndexCategoryEditController extends ProductsIndexCa
|
|
|
21
23
|
.save()
|
|
22
24
|
.then(() => {
|
|
23
25
|
this.isSaving = false;
|
|
24
|
-
this.notifications.success('
|
|
26
|
+
this.notifications.success(this.intl.t('storefront.products.index.changes-saved'));
|
|
25
27
|
})
|
|
26
28
|
.catch((error) => {
|
|
27
29
|
this.isSaving = false;
|
|
@@ -37,8 +39,8 @@ export default class ProductsIndexCategoryEditController extends ProductsIndexCa
|
|
|
37
39
|
if (this.product.hasDirtyAttributes) {
|
|
38
40
|
// details have been added warn user it will lost
|
|
39
41
|
return this.modalsManager.confirm({
|
|
40
|
-
title: '
|
|
41
|
-
body: '
|
|
42
|
+
title: this.intl.t('storefront.products.index.edit.title'),
|
|
43
|
+
body: this.intl.t('storefront.products.index.edit.body'),
|
|
42
44
|
confirm: (modal) => {
|
|
43
45
|
modal.done();
|
|
44
46
|
return this.exit(closeOverlay);
|
|
@@ -13,6 +13,7 @@ export default class ProductsIndexCategoryNewController extends BaseController {
|
|
|
13
13
|
@service modalsManager;
|
|
14
14
|
@service currentUser;
|
|
15
15
|
@service store;
|
|
16
|
+
@service intl;
|
|
16
17
|
@service storefront;
|
|
17
18
|
@service fetch;
|
|
18
19
|
@service loader;
|
|
@@ -62,7 +63,7 @@ export default class ProductsIndexCategoryNewController extends BaseController {
|
|
|
62
63
|
.then(() => {
|
|
63
64
|
this.loader.removeLoader(loader);
|
|
64
65
|
this.isSaving = false;
|
|
65
|
-
this.notifications.success('
|
|
66
|
+
this.notifications.success(this.intl.t('storefront.products.index.new.new-product-created-success'));
|
|
66
67
|
|
|
67
68
|
return this.transitionToRoute('products.index.category').then(() => {
|
|
68
69
|
return this.hostRouter.refresh();
|
|
@@ -94,14 +95,15 @@ export default class ProductsIndexCategoryNewController extends BaseController {
|
|
|
94
95
|
return;
|
|
95
96
|
}
|
|
96
97
|
|
|
98
|
+
// Queue and upload immediatley
|
|
97
99
|
this.uploadQueue.pushObject(file);
|
|
98
100
|
this.fetch.uploadFile.perform(
|
|
99
101
|
file,
|
|
100
102
|
{
|
|
101
103
|
path: `uploads/storefront/${this.activeStore.id}/products`,
|
|
102
104
|
subject_uuid: this.product.id,
|
|
103
|
-
subject_type:
|
|
104
|
-
type:
|
|
105
|
+
subject_type: 'storefront:product',
|
|
106
|
+
type: 'storefront_product',
|
|
105
107
|
},
|
|
106
108
|
(uploadedFile) => {
|
|
107
109
|
this.product.files.pushObject(uploadedFile);
|
|
@@ -115,6 +117,10 @@ export default class ProductsIndexCategoryNewController extends BaseController {
|
|
|
115
117
|
},
|
|
116
118
|
() => {
|
|
117
119
|
this.uploadQueue.removeObject(file);
|
|
120
|
+
// remove file from queue
|
|
121
|
+
if (file.queue && typeof file.queue.remove === 'function') {
|
|
122
|
+
file.queue.remove(file);
|
|
123
|
+
}
|
|
118
124
|
}
|
|
119
125
|
);
|
|
120
126
|
}
|
|
@@ -134,10 +140,10 @@ export default class ProductsIndexCategoryNewController extends BaseController {
|
|
|
134
140
|
|
|
135
141
|
@action makePrimaryFile(file) {
|
|
136
142
|
if (file.isNotImage) {
|
|
137
|
-
return this.notifications.warning('
|
|
143
|
+
return this.notifications.warning(this.intl.t('storefront.products.index.category.new.warning-only-select-an-image-file-to-be-primary'));
|
|
138
144
|
}
|
|
139
145
|
|
|
140
|
-
this.notifications.success(
|
|
146
|
+
this.notifications.success(this.intl.t('storefront.products.index.category.new.made-the-primary-success-image', { fileName: file.original_filename }));
|
|
141
147
|
this.product.primary_image_uuid = file.id;
|
|
142
148
|
this.product.primary_image_url = file.url;
|
|
143
149
|
this.product.primary_image = file;
|
|
@@ -147,8 +153,8 @@ export default class ProductsIndexCategoryNewController extends BaseController {
|
|
|
147
153
|
if (this.product.hasDirtyAttributes) {
|
|
148
154
|
// details have been added warn user it will lost
|
|
149
155
|
return this.modalsManager.confirm({
|
|
150
|
-
title: '
|
|
151
|
-
body:
|
|
156
|
+
title: this.intl.t('storefront.products.index.new.title'),
|
|
157
|
+
body: this.intl.t('storefront.products.index.new.body'),
|
|
152
158
|
confirm: (modal) => {
|
|
153
159
|
modal.done();
|
|
154
160
|
return this.exit(closeOverlay);
|
|
@@ -175,7 +181,7 @@ export default class ProductsIndexCategoryNewController extends BaseController {
|
|
|
175
181
|
|
|
176
182
|
return this.modalsManager.done().then(() => {
|
|
177
183
|
this.modalsManager.show('modals/select-addon-category', {
|
|
178
|
-
title: '
|
|
184
|
+
title: this.intl.t('storefront.products.index.new.select-addon-categories'),
|
|
179
185
|
addonCategories,
|
|
180
186
|
product,
|
|
181
187
|
updateProductAddonCategories: (categories) => {
|
|
@@ -200,7 +206,7 @@ export default class ProductsIndexCategoryNewController extends BaseController {
|
|
|
200
206
|
const productVariant = this.store.createRecord('product-variant');
|
|
201
207
|
|
|
202
208
|
return this.modalsManager.show('modals/create-new-variant', {
|
|
203
|
-
title: '
|
|
209
|
+
title: this.intl.t('storefront.products.index.new.add-new-product-variant'),
|
|
204
210
|
productVariant,
|
|
205
211
|
confirm: (modal) => {
|
|
206
212
|
modal.startLoading();
|
|
@@ -213,7 +219,7 @@ export default class ProductsIndexCategoryNewController extends BaseController {
|
|
|
213
219
|
|
|
214
220
|
@action editProductVariant(productVariant) {
|
|
215
221
|
return this.modalsManager.show('modals/create-new-variant', {
|
|
216
|
-
title: '
|
|
222
|
+
title: this.intl.t('storefront.products.index.new.edit-product-variant'),
|
|
217
223
|
productVariant,
|
|
218
224
|
});
|
|
219
225
|
}
|
|
@@ -272,7 +278,7 @@ export default class ProductsIndexCategoryNewController extends BaseController {
|
|
|
272
278
|
meta_array = [];
|
|
273
279
|
}
|
|
274
280
|
|
|
275
|
-
const label =
|
|
281
|
+
const label = this.intl.t('storefront.products.index.new.untitled-field');
|
|
276
282
|
|
|
277
283
|
meta_array.pushObject({
|
|
278
284
|
key: underscore(label),
|