|
1
|
import { HttpTypes } from "@medusajs/types" |
|
2
|
import { t } from "i18next" |
|
3
|
import { Outlet, RouteObject, UIMatch } from "react-router-dom" |
|
4
|
import { ProtectedRoute } from "../../components/authentication/protected-route" |
|
5
|
import { RoutePermissionGuard } from "../../components/authentication/route-permission-guard" |
|
6
|
import { MainLayout } from "../../components/layout/main-layout" |
|
7
|
import { PublicLayout } from "../../components/layout/public-layout" |
|
8
|
import { SettingsLayout } from "../../components/layout/settings-layout" |
|
9
|
import { ErrorBoundary } from "../../components/utilities/error-boundary" |
|
10
|
import { HydrateFallback } from "../../components/utilities/hydrate-fallback" |
|
11
|
|
|
12
|
export function getRouteMap({ |
|
13
|
settingsRoutes, |
|
14
|
coreRoutes, |
|
15
|
}: { |
|
16
|
settingsRoutes: RouteObject[] |
|
17
|
coreRoutes: RouteObject[] |
|
18
|
}) { |
|
19
|
return [ |
|
20
|
{ |
|
21
|
element: <ProtectedRoute />, |
|
22
|
errorElement: <ErrorBoundary />, |
|
23
|
hydrateFallbackElement: <HydrateFallback />, |
|
24
|
children: [ |
|
25
|
{ |
|
26
|
element: <MainLayout />, |
|
27
|
children: [ |
|
28
|
{ |
|
29
|
path: "/", |
|
30
|
errorElement: <ErrorBoundary />, |
|
31
|
lazy: () => import("../../routes/home"), |
|
32
|
}, |
|
33
|
{ |
|
34
|
path: "/products", |
|
35
|
errorElement: <ErrorBoundary />, |
|
36
|
handle: { |
|
37
|
breadcrumb: () => t("products.domain"), |
|
38
|
}, |
|
39
|
children: [ |
|
40
|
{ |
|
41
|
path: "", |
|
42
|
lazy: () => import("../../routes/products/product-list"), |
|
43
|
children: [ |
|
44
|
{ |
|
45
|
path: "create", |
|
46
|
lazy: () => |
|
47
|
import("../../routes/products/product-create"), |
|
48
|
}, |
|
49
|
{ |
|
50
|
path: "import", |
|
51
|
lazy: () => |
|
52
|
import("../../routes/products/product-import"), |
|
53
|
}, |
|
54
|
{ |
|
55
|
path: "export", |
|
56
|
lazy: () => |
|
57
|
import("../../routes/products/product-export"), |
|
58
|
}, |
|
59
|
], |
|
60
|
}, |
|
61
|
{ |
|
62
|
path: ":id", |
|
63
|
errorElement: <ErrorBoundary />, |
|
64
|
lazy: async () => { |
|
65
|
const { Breadcrumb, loader, seo } = await import( |
|
66
|
"../../routes/products/product-detail" |
|
67
|
) |
|
68
|
|
|
69
|
return { |
|
70
|
Component: Outlet, |
|
71
|
loader, |
|
72
|
handle: { |
|
73
|
breadcrumb: ( |
|
74
|
match: UIMatch<HttpTypes.AdminProductResponse> |
|
75
|
) => <Breadcrumb {...match} />, |
|
76
|
seo, |
|
77
|
}, |
|
78
|
} |
|
79
|
}, |
|
80
|
children: [ |
|
81
|
{ |
|
82
|
path: "", |
|
83
|
lazy: () => |
|
84
|
import("../../routes/products/product-detail"), |
|
85
|
children: [ |
|
86
|
{ |
|
87
|
path: "edit", |
|
88
|
lazy: () => |
|
89
|
import("../../routes/products/product-edit"), |
|
90
|
}, |
|
91
|
{ |
|
92
|
path: "edit-variant", |
|
93
|
lazy: () => |
|
94
|
import( |
|
95
|
"../../routes/product-variants/product-variant-edit" |
|
96
|
), |
|
97
|
}, |
|
98
|
{ |
|
99
|
path: "sales-channels", |
|
100
|
lazy: () => |
|
101
|
import( |
|
102
|
"../../routes/products/product-sales-channels" |
|
103
|
), |
|
104
|
}, |
|
105
|
{ |
|
106
|
path: "attributes", |
|
107
|
lazy: () => |
|
108
|
import("../../routes/products/product-attributes"), |
|
109
|
}, |
|
110
|
{ |
|
111
|
path: "organization", |
|
112
|
lazy: () => |
|
113
|
import( |
|
114
|
"../../routes/products/product-organization" |
|
115
|
), |
|
116
|
}, |
|
117
|
{ |
|
118
|
path: "shipping-profile", |
|
119
|
lazy: () => |
|
120
|
import( |
|
121
|
"../../routes/products/product-shipping-profile" |
|
122
|
), |
|
123
|
}, |
|
124
|
{ |
|
125
|
path: "media", |
|
126
|
lazy: () => |
|
127
|
import("../../routes/products/product-media"), |
|
128
|
}, |
|
129
|
{ |
|
130
|
path: "images/:image_id/variants", |
|
131
|
lazy: () => |
|
132
|
import( |
|
133
|
"../../routes/products/product-image-variants-edit" |
|
134
|
), |
|
135
|
}, |
|
136
|
{ |
|
137
|
path: "prices", |
|
138
|
lazy: () => |
|
139
|
import("../../routes/products/product-prices"), |
|
140
|
}, |
|
141
|
{ |
|
142
|
path: "variants/create", |
|
143
|
lazy: () => |
|
144
|
import( |
|
145
|
"../../routes/products/product-create-variant" |
|
146
|
), |
|
147
|
}, |
|
148
|
{ |
|
149
|
path: "stock", |
|
150
|
lazy: () => |
|
151
|
import("../../routes/products/product-stock"), |
|
152
|
}, |
|
153
|
{ |
|
154
|
path: "metadata/edit", |
|
155
|
lazy: () => |
|
156
|
import("../../routes/products/product-metadata"), |
|
157
|
}, |
|
158
|
{ |
|
159
|
path: "options/manage", |
|
160
|
lazy: () => |
|
161
|
import( |
|
162
|
"../../routes/products/product-options-manage" |
|
163
|
), |
|
164
|
}, |
|
165
|
], |
|
166
|
}, |
|
167
|
{ |
|
168
|
path: "variants/:variant_id", |
|
169
|
lazy: async () => { |
|
170
|
const { Component, Breadcrumb, loader, seo } = |
|
171
|
await import( |
|
172
|
"../../routes/product-variants/product-variant-detail" |
|
173
|
) |
|
174
|
|
|
175
|
return { |
|
176
|
Component, |
|
177
|
loader, |
|
178
|
handle: { |
|
179
|
breadcrumb: ( |
|
180
|
// eslint-disable-next-line max-len |
|
181
|
match: UIMatch<HttpTypes.AdminProductVariantResponse> |
|
182
|
) => <Breadcrumb {...match} />, |
|
183
|
seo, |
|
184
|
}, |
|
185
|
} |
|
186
|
}, |
|
187
|
children: [ |
|
188
|
{ |
|
189
|
path: "edit", |
|
190
|
lazy: () => |
|
191
|
import( |
|
192
|
"../../routes/product-variants/product-variant-edit" |
|
193
|
), |
|
194
|
}, |
|
195
|
{ |
|
196
|
path: "prices", |
|
197
|
lazy: () => |
|
198
|
import("../../routes/products/product-prices"), |
|
199
|
}, |
|
200
|
{ |
|
201
|
path: "manage-items", |
|
202
|
lazy: () => |
|
203
|
import( |
|
204
|
"../../routes/product-variants/product-variant-manage-inventory-items" |
|
205
|
), |
|
206
|
}, |
|
207
|
{ |
|
208
|
path: "media", |
|
209
|
lazy: () => |
|
210
|
import( |
|
211
|
"../../routes/product-variants/product-variant-media" |
|
212
|
), |
|
213
|
}, |
|
214
|
{ |
|
215
|
path: "metadata/edit", |
|
216
|
lazy: () => |
|
217
|
import( |
|
218
|
"../../routes/product-variants/product-variant-metadata" |
|
219
|
), |
|
220
|
}, |
|
221
|
], |
|
222
|
}, |
|
223
|
], |
|
224
|
}, |
|
225
|
], |
|
226
|
}, |
|
227
|
{ |
|
228
|
path: "/product-options", |
|
229
|
errorElement: <ErrorBoundary />, |
|
230
|
handle: { |
|
231
|
breadcrumb: () => t("productOptions.domain"), |
|
232
|
}, |
|
233
|
children: [ |
|
234
|
{ |
|
235
|
path: "", |
|
236
|
lazy: () => |
|
237
|
import("../../routes/product-options/product-option-list"), |
|
238
|
children: [ |
|
239
|
{ |
|
240
|
path: "create", |
|
241
|
lazy: () => |
|
242
|
import( |
|
243
|
"../../routes/product-options/product-option-create" |
|
244
|
), |
|
245
|
}, |
|
246
|
], |
|
247
|
}, |
|
248
|
{ |
|
249
|
path: ":id", |
|
250
|
errorElement: <ErrorBoundary />, |
|
251
|
lazy: async () => { |
|
252
|
const { Breadcrumb, loader } = await import( |
|
253
|
"../../routes/product-options/product-option-detail" |
|
254
|
) |
|
255
|
|
|
256
|
return { |
|
257
|
Component: Outlet, |
|
258
|
loader, |
|
259
|
handle: { |
|
260
|
breadcrumb: (match: UIMatch<any>) => ( |
|
261
|
<Breadcrumb {...match} /> |
|
262
|
), |
|
263
|
}, |
|
264
|
} |
|
265
|
}, |
|
266
|
children: [ |
|
267
|
{ |
|
268
|
path: "", |
|
269
|
lazy: () => |
|
270
|
import( |
|
271
|
"../../routes/product-options/product-option-detail" |
|
272
|
), |
|
273
|
children: [ |
|
274
|
{ |
|
275
|
path: "edit", |
|
276
|
lazy: () => |
|
277
|
import( |
|
278
|
"../../routes/product-options/product-option-edit" |
|
279
|
), |
|
280
|
}, |
|
281
|
{ |
|
282
|
path: "metadata/edit", |
|
283
|
lazy: () => |
|
284
|
import( |
|
285
|
"../../routes/product-options/product-option-metadata" |
|
286
|
), |
|
287
|
}, |
|
288
|
], |
|
289
|
}, |
|
290
|
{ |
|
291
|
path: "values/:value_id", |
|
292
|
lazy: async () => { |
|
293
|
const { Component, Breadcrumb, loader } = await import( |
|
294
|
"../../routes/product-options/product-option-value-detail" |
|
295
|
) |
|
296
|
|
|
297
|
return { |
|
298
|
Component, |
|
299
|
loader, |
|
300
|
handle: { |
|
301
|
breadcrumb: ( |
|
302
|
// eslint-disable-next-line max-len |
|
303
|
match: UIMatch<HttpTypes.AdminProductOptionValueResponse> |
|
304
|
) => <Breadcrumb {...match} />, |
|
305
|
}, |
|
306
|
} |
|
307
|
}, |
|
308
|
children: [ |
|
309
|
{ |
|
310
|
path: "metadata/edit", |
|
311
|
lazy: () => |
|
312
|
import( |
|
313
|
"../../routes/product-options/product-option-value-metadata" |
|
314
|
), |
|
315
|
}, |
|
316
|
], |
|
317
|
}, |
|
318
|
], |
|
319
|
}, |
|
320
|
], |
|
321
|
}, |
|
322
|
{ |
|
323
|
path: "/categories", |
|
324
|
errorElement: <ErrorBoundary />, |
|
325
|
handle: { |
|
326
|
breadcrumb: () => t("categories.domain"), |
|
327
|
}, |
|
328
|
children: [ |
|
329
|
{ |
|
330
|
path: "", |
|
331
|
lazy: () => import("../../routes/categories/category-list"), |
|
332
|
children: [ |
|
333
|
{ |
|
334
|
path: "create", |
|
335
|
lazy: () => |
|
336
|
import("../../routes/categories/category-create"), |
|
337
|
}, |
|
338
|
{ |
|
339
|
path: "organize", |
|
340
|
lazy: () => |
|
341
|
import("../../routes/categories/category-organize"), |
|
342
|
}, |
|
343
|
], |
|
344
|
}, |
|
345
|
{ |
|
346
|
path: ":id", |
|
347
|
lazy: async () => { |
|
348
|
const { Component, Breadcrumb, loader, seo } = await import( |
|
349
|
"../../routes/categories/category-detail" |
|
350
|
) |
|
351
|
|
|
352
|
return { |
|
353
|
Component, |
|
354
|
loader, |
|
355
|
handle: { |
|
356
|
breadcrumb: ( |
|
357
|
match: UIMatch<HttpTypes.AdminProductCategoryResponse> |
|
358
|
) => <Breadcrumb {...match} />, |
|
359
|
seo, |
|
360
|
}, |
|
361
|
} |
|
362
|
}, |
|
363
|
children: [ |
|
364
|
{ |
|
365
|
path: "edit", |
|
366
|
lazy: () => |
|
367
|
import("../../routes/categories/category-edit"), |
|
368
|
}, |
|
369
|
{ |
|
370
|
path: "products", |
|
371
|
lazy: () => |
|
372
|
import("../../routes/categories/category-products"), |
|
373
|
}, |
|
374
|
{ |
|
375
|
path: "organize", |
|
376
|
lazy: () => |
|
377
|
import("../../routes/categories/category-organize"), |
|
378
|
}, |
|
379
|
{ |
|
380
|
path: "metadata/edit", |
|
381
|
lazy: () => |
|
382
|
import("../../routes/categories/categories-metadata"), |
|
383
|
}, |
|
384
|
], |
|
385
|
}, |
|
386
|
], |
|
387
|
}, |
|
388
|
{ |
|
389
|
path: "/orders", |
|
390
|
errorElement: <ErrorBoundary />, |
|
391
|
handle: { |
|
392
|
breadcrumb: () => t("orders.domain"), |
|
393
|
}, |
|
394
|
children: [ |
|
395
|
{ |
|
396
|
path: "", |
|
397
|
lazy: () => import("../../routes/orders/order-list"), |
|
398
|
children: [ |
|
399
|
{ |
|
400
|
path: "export", |
|
401
|
lazy: () => import("../../routes/orders/order-export"), |
|
402
|
}, |
|
403
|
], |
|
404
|
}, |
|
405
|
{ |
|
406
|
path: ":id", |
|
407
|
lazy: async () => { |
|
408
|
const { Component, Breadcrumb, loader, seo } = await import( |
|
409
|
"../../routes/orders/order-detail" |
|
410
|
) |
|
411
|
|
|
412
|
return { |
|
413
|
Component, |
|
414
|
loader, |
|
415
|
handle: { |
|
416
|
breadcrumb: ( |
|
417
|
match: UIMatch<HttpTypes.AdminOrderResponse> |
|
418
|
) => <Breadcrumb {...match} />, |
|
419
|
seo, |
|
420
|
}, |
|
421
|
} |
|
422
|
}, |
|
423
|
children: [ |
|
424
|
{ |
|
425
|
path: "fulfillment", |
|
426
|
lazy: () => |
|
427
|
import("../../routes/orders/order-create-fulfillment"), |
|
428
|
}, |
|
429
|
{ |
|
430
|
path: "returns/:return_id/receive", |
|
431
|
lazy: () => |
|
432
|
import("../../routes/orders/order-receive-return"), |
|
433
|
}, |
|
434
|
{ |
|
435
|
path: "allocate-items", |
|
436
|
lazy: () => |
|
437
|
import("../../routes/orders/order-allocate-items"), |
|
438
|
}, |
|
439
|
{ |
|
440
|
path: ":f_id/create-shipment", |
|
441
|
lazy: () => |
|
442
|
import("../../routes/orders/order-create-shipment"), |
|
443
|
}, |
|
444
|
{ |
|
445
|
path: "returns", |
|
446
|
lazy: () => |
|
447
|
import("../../routes/orders/order-create-return"), |
|
448
|
}, |
|
449
|
{ |
|
450
|
path: "claims", |
|
451
|
lazy: () => |
|
452
|
import("../../routes/orders/order-create-claim"), |
|
453
|
}, |
|
454
|
{ |
|
455
|
path: "exchanges", |
|
456
|
lazy: () => |
|
457
|
import("../../routes/orders/order-create-exchange"), |
|
458
|
}, |
|
459
|
{ |
|
460
|
path: "edits", |
|
461
|
lazy: () => |
|
462
|
import("../../routes/orders/order-create-edit"), |
|
463
|
}, |
|
464
|
{ |
|
465
|
path: "refund", |
|
466
|
lazy: () => |
|
467
|
import("../../routes/orders/order-create-refund"), |
|
468
|
}, |
|
469
|
{ |
|
470
|
path: "transfer", |
|
471
|
lazy: () => |
|
472
|
import("../../routes/orders/order-request-transfer"), |
|
473
|
}, |
|
474
|
{ |
|
475
|
path: "email", |
|
476
|
lazy: () => |
|
477
|
import("../../routes/orders/order-edit-email"), |
|
478
|
}, |
|
479
|
{ |
|
480
|
path: "shipping-address", |
|
481
|
lazy: () => |
|
482
|
import( |
|
483
|
"../../routes/orders/order-edit-shipping-address" |
|
484
|
), |
|
485
|
}, |
|
486
|
{ |
|
487
|
path: "billing-address", |
|
488
|
lazy: () => |
|
489
|
import( |
|
490
|
"../../routes/orders/order-edit-billing-address" |
|
491
|
), |
|
492
|
}, |
|
493
|
{ |
|
494
|
path: "metadata/edit", |
|
495
|
lazy: () => import("../../routes/orders/order-metadata"), |
|
496
|
}, |
|
497
|
], |
|
498
|
}, |
|
499
|
], |
|
500
|
}, |
|
501
|
{ |
|
502
|
path: "/promotions", |
|
503
|
errorElement: <ErrorBoundary />, |
|
504
|
handle: { |
|
505
|
breadcrumb: () => t("promotions.domain"), |
|
506
|
}, |
|
507
|
children: [ |
|
508
|
{ |
|
509
|
path: "", |
|
510
|
lazy: () => import("../../routes/promotions/promotion-list"), |
|
511
|
}, |
|
512
|
{ |
|
513
|
path: "create", |
|
514
|
lazy: () => |
|
515
|
import("../../routes/promotions/promotion-create"), |
|
516
|
}, |
|
517
|
{ |
|
518
|
path: ":id", |
|
519
|
lazy: async () => { |
|
520
|
const { Component, Breadcrumb, loader, seo } = await import( |
|
521
|
"../../routes/promotions/promotion-detail" |
|
522
|
) |
|
523
|
|
|
524
|
return { |
|
525
|
Component, |
|
526
|
loader, |
|
527
|
handle: { |
|
528
|
breadcrumb: ( |
|
529
|
match: UIMatch<HttpTypes.AdminPromotionResponse> |
|
530
|
) => <Breadcrumb {...match} />, |
|
531
|
seo, |
|
532
|
}, |
|
533
|
} |
|
534
|
}, |
|
535
|
children: [ |
|
536
|
{ |
|
537
|
path: "edit", |
|
538
|
lazy: () => |
|
539
|
import( |
|
540
|
"../../routes/promotions/promotion-edit-details" |
|
541
|
), |
|
542
|
}, |
|
543
|
{ |
|
544
|
path: "add-to-campaign", |
|
545
|
lazy: () => |
|
546
|
import( |
|
547
|
"../../routes/promotions/promotion-add-campaign" |
|
548
|
), |
|
549
|
}, |
|
550
|
{ |
|
551
|
path: ":ruleType/edit", |
|
552
|
lazy: () => |
|
553
|
import("../../routes/promotions/common/edit-rules"), |
|
554
|
}, |
|
555
|
{ |
|
556
|
path: "metadata/edit", |
|
557
|
lazy: () => |
|
558
|
import("../../routes/promotions/promotion-metadata"), |
|
559
|
}, |
|
560
|
], |
|
561
|
}, |
|
562
|
], |
|
563
|
}, |
|
564
|
{ |
|
565
|
path: "/campaigns", |
|
566
|
errorElement: <ErrorBoundary />, |
|
567
|
handle: { |
|
568
|
breadcrumb: () => t("campaigns.domain"), |
|
569
|
}, |
|
570
|
children: [ |
|
571
|
{ |
|
572
|
path: "", |
|
573
|
lazy: () => import("../../routes/campaigns/campaign-list"), |
|
574
|
children: [], |
|
575
|
}, |
|
576
|
{ |
|
577
|
path: "create", |
|
578
|
lazy: () => import("../../routes/campaigns/campaign-create"), |
|
579
|
}, |
|
580
|
{ |
|
581
|
path: ":id", |
|
582
|
lazy: async () => { |
|
583
|
const { Component, Breadcrumb, loader, seo } = await import( |
|
584
|
"../../routes/campaigns/campaign-detail" |
|
585
|
) |
|
586
|
|
|
587
|
return { |
|
588
|
Component, |
|
589
|
loader, |
|
590
|
handle: { |
|
591
|
breadcrumb: ( |
|
592
|
match: UIMatch<HttpTypes.AdminCampaignResponse> |
|
593
|
) => <Breadcrumb {...match} />, |
|
594
|
seo, |
|
595
|
}, |
|
596
|
} |
|
597
|
}, |
|
598
|
children: [ |
|
599
|
{ |
|
600
|
path: "edit", |
|
601
|
lazy: () => |
|
602
|
import("../../routes/campaigns/campaign-edit"), |
|
603
|
}, |
|
604
|
{ |
|
605
|
path: "configuration", |
|
606
|
lazy: () => |
|
607
|
import("../../routes/campaigns/campaign-configuration"), |
|
608
|
}, |
|
609
|
{ |
|
610
|
path: "edit-budget", |
|
611
|
lazy: () => |
|
612
|
import("../../routes/campaigns/campaign-budget-edit"), |
|
613
|
}, |
|
614
|
{ |
|
615
|
path: "add-promotions", |
|
616
|
lazy: () => |
|
617
|
import( |
|
618
|
"../../routes/campaigns/add-campaign-promotions" |
|
619
|
), |
|
620
|
}, |
|
621
|
], |
|
622
|
}, |
|
623
|
], |
|
624
|
}, |
|
625
|
{ |
|
626
|
path: "/collections", |
|
627
|
errorElement: <ErrorBoundary />, |
|
628
|
handle: { |
|
629
|
breadcrumb: () => t("collections.domain"), |
|
630
|
}, |
|
631
|
children: [ |
|
632
|
{ |
|
633
|
path: "", |
|
634
|
lazy: () => |
|
635
|
import("../../routes/collections/collection-list"), |
|
636
|
children: [ |
|
637
|
{ |
|
638
|
path: "create", |
|
639
|
lazy: () => |
|
640
|
import("../../routes/collections/collection-create"), |
|
641
|
}, |
|
642
|
], |
|
643
|
}, |
|
644
|
{ |
|
645
|
path: ":id", |
|
646
|
lazy: async () => { |
|
647
|
const { Component, Breadcrumb, loader, seo } = await import( |
|
648
|
"../../routes/collections/collection-detail" |
|
649
|
) |
|
650
|
|
|
651
|
return { |
|
652
|
Component, |
|
653
|
loader, |
|
654
|
handle: { |
|
655
|
breadcrumb: ( |
|
656
|
match: UIMatch<HttpTypes.AdminCollectionResponse> |
|
657
|
) => <Breadcrumb {...match} />, |
|
658
|
seo, |
|
659
|
}, |
|
660
|
} |
|
661
|
}, |
|
662
|
children: [ |
|
663
|
{ |
|
664
|
path: "edit", |
|
665
|
lazy: () => |
|
666
|
import("../../routes/collections/collection-edit"), |
|
667
|
}, |
|
668
|
{ |
|
669
|
path: "products", |
|
670
|
lazy: () => |
|
671
|
import( |
|
672
|
"../../routes/collections/collection-add-products" |
|
673
|
), |
|
674
|
}, |
|
675
|
{ |
|
676
|
path: "metadata/edit", |
|
677
|
lazy: () => |
|
678
|
import("../../routes/collections/collection-metadata"), |
|
679
|
}, |
|
680
|
], |
|
681
|
}, |
|
682
|
], |
|
683
|
}, |
|
684
|
{ |
|
685
|
path: "/price-lists", |
|
686
|
errorElement: <ErrorBoundary />, |
|
687
|
handle: { |
|
688
|
breadcrumb: () => t("priceLists.domain"), |
|
689
|
}, |
|
690
|
children: [ |
|
691
|
{ |
|
692
|
path: "", |
|
693
|
lazy: () => |
|
694
|
import("../../routes/price-lists/price-list-list"), |
|
695
|
children: [ |
|
696
|
{ |
|
697
|
path: "create", |
|
698
|
lazy: () => |
|
699
|
import("../../routes/price-lists/price-list-create"), |
|
700
|
}, |
|
701
|
], |
|
702
|
}, |
|
703
|
{ |
|
704
|
path: ":id", |
|
705
|
lazy: async () => { |
|
706
|
const { Component, Breadcrumb, loader, seo } = await import( |
|
707
|
"../../routes/price-lists/price-list-detail" |
|
708
|
) |
|
709
|
|
|
710
|
return { |
|
711
|
Component, |
|
712
|
loader, |
|
713
|
handle: { |
|
714
|
breadcrumb: ( |
|
715
|
match: UIMatch<HttpTypes.AdminPriceListResponse> |
|
716
|
) => <Breadcrumb {...match} />, |
|
717
|
seo, |
|
718
|
}, |
|
719
|
} |
|
720
|
}, |
|
721
|
children: [ |
|
722
|
{ |
|
723
|
path: "edit", |
|
724
|
lazy: () => |
|
725
|
import("../../routes/price-lists/price-list-edit"), |
|
726
|
}, |
|
727
|
{ |
|
728
|
path: "configuration", |
|
729
|
lazy: () => |
|
730
|
import( |
|
731
|
"../../routes/price-lists/price-list-configuration" |
|
732
|
), |
|
733
|
}, |
|
734
|
{ |
|
735
|
path: "products/add", |
|
736
|
lazy: () => |
|
737
|
import( |
|
738
|
"../../routes/price-lists/price-list-prices-add" |
|
739
|
), |
|
740
|
}, |
|
741
|
{ |
|
742
|
path: "products/edit", |
|
743
|
lazy: () => |
|
744
|
import( |
|
745
|
"../../routes/price-lists/price-list-prices-edit" |
|
746
|
), |
|
747
|
}, |
|
748
|
{ |
|
749
|
path: "metadata/edit", |
|
750
|
lazy: () => |
|
751
|
import("../../routes/price-lists/price-list-metadata"), |
|
752
|
}, |
|
753
|
], |
|
754
|
}, |
|
755
|
], |
|
756
|
}, |
|
757
|
{ |
|
758
|
path: "/customers", |
|
759
|
errorElement: <ErrorBoundary />, |
|
760
|
handle: { |
|
761
|
breadcrumb: () => t("customers.domain"), |
|
762
|
}, |
|
763
|
children: [ |
|
764
|
{ |
|
765
|
path: "", |
|
766
|
lazy: () => import("../../routes/customers/customer-list"), |
|
767
|
children: [ |
|
768
|
{ |
|
769
|
path: "create", |
|
770
|
element: <RoutePermissionGuard />, |
|
771
|
handle: { permissions: "customer:create" }, |
|
772
|
children: [ |
|
773
|
{ |
|
774
|
path: "", |
|
775
|
lazy: () => |
|
776
|
import("../../routes/customers/customer-create"), |
|
777
|
}, |
|
778
|
], |
|
779
|
}, |
|
780
|
], |
|
781
|
}, |
|
782
|
{ |
|
783
|
path: ":id", |
|
784
|
lazy: async () => { |
|
785
|
const { Component, Breadcrumb, loader, seo } = await import( |
|
786
|
"../../routes/customers/customer-detail" |
|
787
|
) |
|
788
|
|
|
789
|
return { |
|
790
|
Component, |
|
791
|
loader, |
|
792
|
handle: { |
|
793
|
breadcrumb: ( |
|
794
|
match: UIMatch<HttpTypes.AdminCustomerResponse> |
|
795
|
) => <Breadcrumb {...match} />, |
|
796
|
seo, |
|
797
|
}, |
|
798
|
} |
|
799
|
}, |
|
800
|
children: [ |
|
801
|
{ |
|
802
|
path: "edit", |
|
803
|
element: <RoutePermissionGuard />, |
|
804
|
handle: { permissions: "customer:update" }, |
|
805
|
children: [ |
|
806
|
{ |
|
807
|
path: "", |
|
808
|
lazy: () => |
|
809
|
import("../../routes/customers/customer-edit"), |
|
810
|
}, |
|
811
|
], |
|
812
|
}, |
|
813
|
{ |
|
814
|
path: "create-address", |
|
815
|
element: <RoutePermissionGuard />, |
|
816
|
handle: { permissions: "customer:update" }, |
|
817
|
children: [ |
|
818
|
{ |
|
819
|
path: "", |
|
820
|
lazy: () => |
|
821
|
import( |
|
822
|
"../../routes/customers/customer-create-address" |
|
823
|
), |
|
824
|
}, |
|
825
|
], |
|
826
|
}, |
|
827
|
{ |
|
828
|
path: "add-customer-groups", |
|
829
|
element: <RoutePermissionGuard />, |
|
830
|
handle: { permissions: "customer:update" }, |
|
831
|
children: [ |
|
832
|
{ |
|
833
|
path: "", |
|
834
|
lazy: () => |
|
835
|
import( |
|
836
|
"../../routes/customers/customers-add-customer-group" |
|
837
|
), |
|
838
|
}, |
|
839
|
], |
|
840
|
}, |
|
841
|
{ |
|
842
|
path: ":order_id/transfer", |
|
843
|
lazy: () => |
|
844
|
import("../../routes/orders/order-request-transfer"), |
|
845
|
}, |
|
846
|
{ |
|
847
|
path: "metadata/edit", |
|
848
|
element: <RoutePermissionGuard />, |
|
849
|
handle: { permissions: "customer:update" }, |
|
850
|
children: [ |
|
851
|
{ |
|
852
|
path: "", |
|
853
|
lazy: () => |
|
854
|
import("../../routes/customers/customer-metadata"), |
|
855
|
}, |
|
856
|
], |
|
857
|
}, |
|
858
|
], |
|
859
|
}, |
|
860
|
], |
|
861
|
}, |
|
862
|
{ |
|
863
|
path: "/customer-groups", |
|
864
|
errorElement: <ErrorBoundary />, |
|
865
|
handle: { |
|
866
|
breadcrumb: () => t("customerGroups.domain"), |
|
867
|
}, |
|
868
|
children: [ |
|
869
|
{ |
|
870
|
path: "", |
|
871
|
lazy: () => |
|
872
|
import("../../routes/customer-groups/customer-group-list"), |
|
873
|
children: [ |
|
874
|
{ |
|
875
|
path: "create", |
|
876
|
lazy: () => |
|
877
|
import( |
|
878
|
"../../routes/customer-groups/customer-group-create" |
|
879
|
), |
|
880
|
}, |
|
881
|
], |
|
882
|
}, |
|
883
|
{ |
|
884
|
path: ":id", |
|
885
|
lazy: async () => { |
|
886
|
const { Component, Breadcrumb, loader, seo } = await import( |
|
887
|
"../../routes/customer-groups/customer-group-detail" |
|
888
|
) |
|
889
|
|
|
890
|
return { |
|
891
|
Component, |
|
892
|
loader, |
|
893
|
handle: { |
|
894
|
breadcrumb: ( |
|
895
|
match: UIMatch<HttpTypes.AdminCustomerGroupResponse> |
|
896
|
) => <Breadcrumb {...match} />, |
|
897
|
seo, |
|
898
|
}, |
|
899
|
} |
|
900
|
}, |
|
901
|
children: [ |
|
902
|
{ |
|
903
|
path: "edit", |
|
904
|
lazy: () => |
|
905
|
import( |
|
906
|
"../../routes/customer-groups/customer-group-edit" |
|
907
|
), |
|
908
|
}, |
|
909
|
{ |
|
910
|
path: "add-customers", |
|
911
|
lazy: () => |
|
912
|
import( |
|
913
|
"../../routes/customer-groups/customer-group-add-customers" |
|
914
|
), |
|
915
|
}, |
|
916
|
{ |
|
917
|
path: "metadata/edit", |
|
918
|
lazy: () => |
|
919
|
import( |
|
920
|
"../../routes/customer-groups/customer-group-metadata" |
|
921
|
), |
|
922
|
}, |
|
923
|
], |
|
924
|
}, |
|
925
|
], |
|
926
|
}, |
|
927
|
{ |
|
928
|
path: "/reservations", |
|
929
|
errorElement: <ErrorBoundary />, |
|
930
|
handle: { |
|
931
|
breadcrumb: () => t("reservations.domain"), |
|
932
|
}, |
|
933
|
children: [ |
|
934
|
{ |
|
935
|
path: "", |
|
936
|
lazy: () => |
|
937
|
import("../../routes/reservations/reservation-list"), |
|
938
|
children: [ |
|
939
|
{ |
|
940
|
path: "create", |
|
941
|
lazy: () => |
|
942
|
import("../../routes/reservations/reservation-create"), |
|
943
|
}, |
|
944
|
], |
|
945
|
}, |
|
946
|
{ |
|
947
|
path: ":id", |
|
948
|
lazy: async () => { |
|
949
|
const { Component, Breadcrumb, loader, seo } = await import( |
|
950
|
"../../routes/reservations/reservation-detail" |
|
951
|
) |
|
952
|
|
|
953
|
return { |
|
954
|
Component, |
|
955
|
loader, |
|
956
|
handle: { |
|
957
|
breadcrumb: ( |
|
958
|
match: UIMatch<HttpTypes.AdminReservationResponse> |
|
959
|
) => <Breadcrumb {...match} />, |
|
960
|
seo, |
|
961
|
}, |
|
962
|
} |
|
963
|
}, |
|
964
|
children: [ |
|
965
|
{ |
|
966
|
path: "edit", |
|
967
|
lazy: () => |
|
968
|
import( |
|
969
|
"../../routes/reservations/reservation-detail/components/edit-reservation" |
|
970
|
), |
|
971
|
}, |
|
972
|
{ |
|
973
|
path: "metadata/edit", |
|
974
|
lazy: () => |
|
975
|
import( |
|
976
|
"../../routes/reservations/reservation-metadata" |
|
977
|
), |
|
978
|
}, |
|
979
|
], |
|
980
|
}, |
|
981
|
], |
|
982
|
}, |
|
983
|
{ |
|
984
|
path: "/inventory", |
|
985
|
errorElement: <ErrorBoundary />, |
|
986
|
handle: { |
|
987
|
breadcrumb: () => t("inventory.domain"), |
|
988
|
}, |
|
989
|
children: [ |
|
990
|
{ |
|
991
|
path: "", |
|
992
|
lazy: () => import("../../routes/inventory/inventory-list"), |
|
993
|
children: [ |
|
994
|
{ |
|
995
|
path: "create", |
|
996
|
lazy: () => |
|
997
|
import("../../routes/inventory/inventory-create"), |
|
998
|
}, |
|
999
|
{ |
|
1000
|
path: "export", |
|
1001
|
lazy: () => |
|
1002
|
import("../../routes/inventory/inventory-export"), |
|
1003
|
}, |
|
1004
|
{ |
|
1005
|
path: "stock", |
|
1006
|
lazy: () => |
|
1007
|
import("../../routes/inventory/inventory-stock"), |
|
1008
|
}, |
|
1009
|
], |
|
1010
|
}, |
|
1011
|
{ |
|
1012
|
path: ":id", |
|
1013
|
lazy: async () => { |
|
1014
|
const { Component, Breadcrumb, loader, seo } = await import( |
|
1015
|
"../../routes/inventory/inventory-detail" |
|
1016
|
) |
|
1017
|
|
|
1018
|
return { |
|
1019
|
Component, |
|
1020
|
loader, |
|
1021
|
handle: { |
|
1022
|
breadcrumb: ( |
|
1023
|
match: UIMatch<HttpTypes.AdminInventoryItemResponse> |
|
1024
|
) => <Breadcrumb {...match} />, |
|
1025
|
seo, |
|
1026
|
}, |
|
1027
|
} |
|
1028
|
}, |
|
1029
|
children: [ |
|
1030
|
{ |
|
1031
|
path: "edit", |
|
1032
|
lazy: () => |
|
1033
|
import( |
|
1034
|
"../../routes/inventory/inventory-detail/components/edit-inventory-item" |
|
1035
|
), |
|
1036
|
}, |
|
1037
|
{ |
|
1038
|
path: "attributes", |
|
1039
|
lazy: () => |
|
1040
|
import( |
|
1041
|
"../../routes/inventory/inventory-detail/components/edit-inventory-item-attributes" |
|
1042
|
), |
|
1043
|
}, |
|
1044
|
{ |
|
1045
|
path: "metadata/edit", |
|
1046
|
lazy: () => |
|
1047
|
import("../../routes/inventory/inventory-metadata"), |
|
1048
|
}, |
|
1049
|
{ |
|
1050
|
path: "locations", |
|
1051
|
lazy: () => |
|
1052
|
import( |
|
1053
|
"../../routes/inventory/inventory-detail/components/manage-locations" |
|
1054
|
), |
|
1055
|
}, |
|
1056
|
{ |
|
1057
|
path: "locations/:location_id", |
|
1058
|
lazy: () => |
|
1059
|
import( |
|
1060
|
"../../routes/inventory/inventory-detail/components/adjust-inventory" |
|
1061
|
), |
|
1062
|
}, |
|
1063
|
], |
|
1064
|
}, |
|
1065
|
], |
|
1066
|
}, |
|
1067
|
...coreRoutes, |
|
1068
|
], |
|
1069
|
}, |
|
1070
|
], |
|
1071
|
}, |
|
1072
|
{ |
|
1073
|
element: <ProtectedRoute />, |
|
1074
|
errorElement: <ErrorBoundary />, |
|
1075
|
hydrateFallbackElement: <HydrateFallback />, |
|
1076
|
children: [ |
|
1077
|
{ |
|
1078
|
path: "/settings", |
|
1079
|
handle: { |
|
1080
|
breadcrumb: () => t("app.nav.settings.header"), |
|
1081
|
}, |
|
1082
|
element: <SettingsLayout />, |
|
1083
|
children: [ |
|
1084
|
{ |
|
1085
|
index: true, |
|
1086
|
errorElement: <ErrorBoundary />, |
|
1087
|
lazy: () => import("../../routes/settings"), |
|
1088
|
}, |
|
1089
|
{ |
|
1090
|
path: "profile", |
|
1091
|
errorElement: <ErrorBoundary />, |
|
1092
|
lazy: () => import("../../routes/profile/profile-detail"), |
|
1093
|
handle: { |
|
1094
|
breadcrumb: () => t("profile.domain"), |
|
1095
|
}, |
|
1096
|
children: [ |
|
1097
|
{ |
|
1098
|
path: "edit", |
|
1099
|
lazy: () => import("../../routes/profile/profile-edit"), |
|
1100
|
}, |
|
1101
|
], |
|
1102
|
}, |
|
1103
|
{ |
|
1104
|
path: "regions", |
|
1105
|
errorElement: <ErrorBoundary />, |
|
1106
|
element: <Outlet />, |
|
1107
|
handle: { |
|
1108
|
breadcrumb: () => t("regions.domain"), |
|
1109
|
}, |
|
1110
|
children: [ |
|
1111
|
{ |
|
1112
|
path: "", |
|
1113
|
lazy: () => import("../../routes/regions/region-list"), |
|
1114
|
children: [ |
|
1115
|
{ |
|
1116
|
path: "create", |
|
1117
|
lazy: () => import("../../routes/regions/region-create"), |
|
1118
|
}, |
|
1119
|
], |
|
1120
|
}, |
|
1121
|
{ |
|
1122
|
path: ":id", |
|
1123
|
lazy: async () => { |
|
1124
|
const { Component, Breadcrumb, loader, seo } = await import( |
|
1125
|
"../../routes/regions/region-detail" |
|
1126
|
) |
|
1127
|
|
|
1128
|
return { |
|
1129
|
Component, |
|
1130
|
loader, |
|
1131
|
handle: { |
|
1132
|
breadcrumb: ( |
|
1133
|
match: UIMatch<HttpTypes.AdminRegionResponse> |
|
1134
|
) => <Breadcrumb {...match} />, |
|
1135
|
seo, |
|
1136
|
}, |
|
1137
|
} |
|
1138
|
}, |
|
1139
|
children: [ |
|
1140
|
{ |
|
1141
|
path: "edit", |
|
1142
|
lazy: () => import("../../routes/regions/region-edit"), |
|
1143
|
}, |
|
1144
|
{ |
|
1145
|
path: "countries/add", |
|
1146
|
lazy: () => |
|
1147
|
import("../../routes/regions/region-add-countries"), |
|
1148
|
}, |
|
1149
|
{ |
|
1150
|
path: "metadata/edit", |
|
1151
|
lazy: () => |
|
1152
|
import("../../routes/regions/region-metadata"), |
|
1153
|
}, |
|
1154
|
], |
|
1155
|
}, |
|
1156
|
], |
|
1157
|
}, |
|
1158
|
{ |
|
1159
|
path: "property-labels", |
|
1160
|
errorElement: <ErrorBoundary />, |
|
1161
|
element: <Outlet />, |
|
1162
|
handle: { |
|
1163
|
breadcrumb: () => t("propertyLabels.domain", "Property Labels"), |
|
1164
|
}, |
|
1165
|
children: [ |
|
1166
|
{ |
|
1167
|
path: "", |
|
1168
|
lazy: () => import("../../routes/property-labels"), |
|
1169
|
children: [ |
|
1170
|
{ |
|
1171
|
path: ":entity/edit", |
|
1172
|
lazy: () => |
|
1173
|
import( |
|
1174
|
"../../routes/property-labels/property-labels-edit" |
|
1175
|
), |
|
1176
|
}, |
|
1177
|
], |
|
1178
|
}, |
|
1179
|
], |
|
1180
|
}, |
|
1181
|
{ |
|
1182
|
path: "store", |
|
1183
|
errorElement: <ErrorBoundary />, |
|
1184
|
lazy: () => import("../../routes/store/store-detail"), |
|
1185
|
handle: { |
|
1186
|
breadcrumb: () => t("store.domain"), |
|
1187
|
}, |
|
1188
|
children: [ |
|
1189
|
{ |
|
1190
|
path: "edit", |
|
1191
|
lazy: () => import("../../routes/store/store-edit"), |
|
1192
|
}, |
|
1193
|
{ |
|
1194
|
path: "currencies", |
|
1195
|
lazy: () => import("../../routes/store/store-add-currencies"), |
|
1196
|
}, |
|
1197
|
{ |
|
1198
|
path: "locales", |
|
1199
|
lazy: () => import("../../routes/store/store-add-locales"), |
|
1200
|
}, |
|
1201
|
{ |
|
1202
|
path: "metadata/edit", |
|
1203
|
lazy: () => import("../../routes/store/store-metadata"), |
|
1204
|
}, |
|
1205
|
], |
|
1206
|
}, |
|
1207
|
{ |
|
1208
|
path: "users", |
|
1209
|
errorElement: <ErrorBoundary />, |
|
1210
|
element: <Outlet />, |
|
1211
|
handle: { |
|
1212
|
breadcrumb: () => t("users.domain"), |
|
1213
|
}, |
|
1214
|
children: [ |
|
1215
|
{ |
|
1216
|
path: "", |
|
1217
|
lazy: () => import("../../routes/users/user-list"), |
|
1218
|
children: [ |
|
1219
|
{ |
|
1220
|
path: "invite", |
|
1221
|
element: <RoutePermissionGuard />, |
|
1222
|
handle: { |
|
1223
|
permissions: ["invite:create", "invite:read"], |
|
1224
|
}, |
|
1225
|
children: [ |
|
1226
|
{ |
|
1227
|
path: "", |
|
1228
|
lazy: () => import("../../routes/users/user-invite"), |
|
1229
|
}, |
|
1230
|
], |
|
1231
|
}, |
|
1232
|
], |
|
1233
|
}, |
|
1234
|
{ |
|
1235
|
path: ":id", |
|
1236
|
lazy: async () => { |
|
1237
|
const { Component, Breadcrumb, loader, seo } = await import( |
|
1238
|
"../../routes/users/user-detail" |
|
1239
|
) |
|
1240
|
|
|
1241
|
return { |
|
1242
|
Component, |
|
1243
|
loader, |
|
1244
|
handle: { |
|
1245
|
breadcrumb: ( |
|
1246
|
match: UIMatch<HttpTypes.AdminUserResponse> |
|
1247
|
) => <Breadcrumb {...match} />, |
|
1248
|
seo, |
|
1249
|
}, |
|
1250
|
} |
|
1251
|
}, |
|
1252
|
children: [ |
|
1253
|
{ |
|
1254
|
path: "edit", |
|
1255
|
lazy: () => import("../../routes/users/user-edit"), |
|
1256
|
}, |
|
1257
|
{ |
|
1258
|
path: "metadata/edit", |
|
1259
|
lazy: () => import("../../routes/users/user-metadata"), |
|
1260
|
}, |
|
1261
|
], |
|
1262
|
}, |
|
1263
|
], |
|
1264
|
}, |
|
1265
|
{ |
|
1266
|
path: "roles", |
|
1267
|
errorElement: <ErrorBoundary />, |
|
1268
|
element: <RoutePermissionGuard />, |
|
1269
|
handle: { |
|
1270
|
breadcrumb: () => t("roles.domain"), |
|
1271
|
permissions: "rbac_role:read", |
|
1272
|
}, |
|
1273
|
children: [ |
|
1274
|
{ |
|
1275
|
path: "", |
|
1276
|
lazy: () => import("../../routes/roles/role-list"), |
|
1277
|
children: [ |
|
1278
|
{ |
|
1279
|
path: "create", |
|
1280
|
element: <RoutePermissionGuard />, |
|
1281
|
handle: { permissions: "rbac_role:create" }, |
|
1282
|
children: [ |
|
1283
|
{ |
|
1284
|
path: "", |
|
1285
|
lazy: () => import("../../routes/roles/role-create"), |
|
1286
|
}, |
|
1287
|
], |
|
1288
|
}, |
|
1289
|
], |
|
1290
|
}, |
|
1291
|
{ |
|
1292
|
path: ":id", |
|
1293
|
lazy: async () => { |
|
1294
|
const { Component, Breadcrumb, loader } = await import( |
|
1295
|
"../../routes/roles/role-detail" |
|
1296
|
) |
|
1297
|
|
|
1298
|
return { |
|
1299
|
Component, |
|
1300
|
loader, |
|
1301
|
handle: { |
|
1302
|
breadcrumb: ( |
|
1303
|
match: UIMatch<HttpTypes.AdminRbacRoleResponse> |
|
1304
|
) => <Breadcrumb {...match} />, |
|
1305
|
}, |
|
1306
|
} |
|
1307
|
}, |
|
1308
|
children: [ |
|
1309
|
{ |
|
1310
|
path: "edit", |
|
1311
|
element: <RoutePermissionGuard />, |
|
1312
|
handle: { permissions: "rbac_role:update" }, |
|
1313
|
children: [ |
|
1314
|
{ |
|
1315
|
path: "", |
|
1316
|
lazy: () => import("../../routes/roles/role-edit"), |
|
1317
|
}, |
|
1318
|
], |
|
1319
|
}, |
|
1320
|
{ |
|
1321
|
path: "add-users", |
|
1322
|
element: <RoutePermissionGuard />, |
|
1323
|
handle: { |
|
1324
|
permissions: ["user:update", "rbac_role:update"], |
|
1325
|
}, |
|
1326
|
children: [ |
|
1327
|
{ |
|
1328
|
path: "", |
|
1329
|
lazy: () => |
|
1330
|
import("../../routes/roles/role-add-users"), |
|
1331
|
}, |
|
1332
|
], |
|
1333
|
}, |
|
1334
|
{ |
|
1335
|
path: "permissions", |
|
1336
|
element: <RoutePermissionGuard />, |
|
1337
|
handle: { permissions: "rbac_role:update" }, |
|
1338
|
children: [ |
|
1339
|
{ |
|
1340
|
path: "", |
|
1341
|
lazy: () => |
|
1342
|
import("../../routes/roles/role-permissions"), |
|
1343
|
}, |
|
1344
|
], |
|
1345
|
}, |
|
1346
|
], |
|
1347
|
}, |
|
1348
|
], |
|
1349
|
}, |
|
1350
|
{ |
|
1351
|
path: "policies", |
|
1352
|
errorElement: <ErrorBoundary />, |
|
1353
|
element: <RoutePermissionGuard />, |
|
1354
|
handle: { |
|
1355
|
breadcrumb: () => t("policies.domain"), |
|
1356
|
permissions: "rbac_policy:read", |
|
1357
|
}, |
|
1358
|
children: [ |
|
1359
|
{ |
|
1360
|
path: "", |
|
1361
|
lazy: () => import("../../routes/policies/policy-list"), |
|
1362
|
// TODO: V1: policy CRUD lives in code (`definePolicies`).Uncomment |
|
1363
|
// along with the matching list/detail action sites to |
|
1364
|
// re-enable dashboard CRUD. |
|
1365
|
// children: [ |
|
1366
|
// { |
|
1367
|
// path: "create", |
|
1368
|
// element: <RoutePermissionGuard />, |
|
1369
|
// handle: { permissions: "rbac_policy:create" }, |
|
1370
|
// children: [ |
|
1371
|
// { |
|
1372
|
// path: "", |
|
1373
|
// lazy: () => |
|
1374
|
// import("../../routes/policies/policy-create"), |
|
1375
|
// }, |
|
1376
|
// ], |
|
1377
|
// }, |
|
1378
|
// ], |
|
1379
|
}, |
|
1380
|
{ |
|
1381
|
path: ":id", |
|
1382
|
lazy: async () => { |
|
1383
|
const { Component, Breadcrumb, loader } = await import( |
|
1384
|
"../../routes/policies/policy-detail" |
|
1385
|
) |
|
1386
|
|
|
1387
|
return { |
|
1388
|
Component, |
|
1389
|
loader, |
|
1390
|
handle: { |
|
1391
|
breadcrumb: ( |
|
1392
|
match: UIMatch<HttpTypes.AdminRbacPolicyResponse> |
|
1393
|
) => <Breadcrumb {...match} />, |
|
1394
|
}, |
|
1395
|
} |
|
1396
|
}, |
|
1397
|
// TODO: V1: `edit` child kept commented out — see note above. |
|
1398
|
// children: [ |
|
1399
|
// { |
|
1400
|
// path: "edit", |
|
1401
|
// element: <RoutePermissionGuard />, |
|
1402
|
// handle: { permissions: "rbac_policy:update" }, |
|
1403
|
// children: [ |
|
1404
|
// { |
|
1405
|
// path: "", |
|
1406
|
// lazy: () => |
|
1407
|
// import("../../routes/policies/policy-edit"), |
|
1408
|
// }, |
|
1409
|
// ], |
|
1410
|
// }, |
|
1411
|
// ], |
|
1412
|
}, |
|
1413
|
], |
|
1414
|
}, |
|
1415
|
{ |
|
1416
|
path: "sales-channels", |
|
1417
|
errorElement: <ErrorBoundary />, |
|
1418
|
element: <Outlet />, |
|
1419
|
handle: { |
|
1420
|
breadcrumb: () => t("salesChannels.domain"), |
|
1421
|
}, |
|
1422
|
children: [ |
|
1423
|
{ |
|
1424
|
path: "", |
|
1425
|
lazy: () => |
|
1426
|
import("../../routes/sales-channels/sales-channel-list"), |
|
1427
|
children: [ |
|
1428
|
{ |
|
1429
|
path: "create", |
|
1430
|
lazy: () => |
|
1431
|
import( |
|
1432
|
"../../routes/sales-channels/sales-channel-create" |
|
1433
|
), |
|
1434
|
}, |
|
1435
|
], |
|
1436
|
}, |
|
1437
|
{ |
|
1438
|
path: ":id", |
|
1439
|
lazy: async () => { |
|
1440
|
const { Component, Breadcrumb, loader, seo } = await import( |
|
1441
|
"../../routes/sales-channels/sales-channel-detail" |
|
1442
|
) |
|
1443
|
|
|
1444
|
return { |
|
1445
|
Component, |
|
1446
|
loader, |
|
1447
|
handle: { |
|
1448
|
breadcrumb: ( |
|
1449
|
match: UIMatch<HttpTypes.AdminSalesChannelResponse> |
|
1450
|
) => <Breadcrumb {...match} />, |
|
1451
|
seo, |
|
1452
|
}, |
|
1453
|
} |
|
1454
|
}, |
|
1455
|
children: [ |
|
1456
|
{ |
|
1457
|
path: "edit", |
|
1458
|
lazy: () => |
|
1459
|
import( |
|
1460
|
"../../routes/sales-channels/sales-channel-edit" |
|
1461
|
), |
|
1462
|
}, |
|
1463
|
{ |
|
1464
|
path: "add-products", |
|
1465
|
lazy: () => |
|
1466
|
import( |
|
1467
|
"../../routes/sales-channels/sales-channel-add-products" |
|
1468
|
), |
|
1469
|
}, |
|
1470
|
{ |
|
1471
|
path: "metadata/edit", |
|
1472
|
lazy: () => |
|
1473
|
import( |
|
1474
|
"../../routes/sales-channels/sales-channel-metadata" |
|
1475
|
), |
|
1476
|
}, |
|
1477
|
], |
|
1478
|
}, |
|
1479
|
], |
|
1480
|
}, |
|
1481
|
{ |
|
1482
|
path: "locations", |
|
1483
|
errorElement: <ErrorBoundary />, |
|
1484
|
element: <Outlet />, |
|
1485
|
handle: { |
|
1486
|
breadcrumb: () => t("locations.domain"), |
|
1487
|
}, |
|
1488
|
children: [ |
|
1489
|
{ |
|
1490
|
path: "", |
|
1491
|
lazy: () => import("../../routes/locations/location-list"), |
|
1492
|
}, |
|
1493
|
{ |
|
1494
|
path: "create", |
|
1495
|
lazy: () => import("../../routes/locations/location-create"), |
|
1496
|
}, |
|
1497
|
{ |
|
1498
|
path: "shipping-profiles", |
|
1499
|
element: <Outlet />, |
|
1500
|
handle: { |
|
1501
|
breadcrumb: () => t("shippingProfile.domain"), |
|
1502
|
}, |
|
1503
|
children: [ |
|
1504
|
{ |
|
1505
|
path: "", |
|
1506
|
lazy: () => |
|
1507
|
import( |
|
1508
|
"../../routes/shipping-profiles/shipping-profiles-list" |
|
1509
|
), |
|
1510
|
children: [ |
|
1511
|
{ |
|
1512
|
path: "create", |
|
1513
|
lazy: () => |
|
1514
|
import( |
|
1515
|
"../../routes/shipping-profiles/shipping-profile-create" |
|
1516
|
), |
|
1517
|
}, |
|
1518
|
], |
|
1519
|
}, |
|
1520
|
{ |
|
1521
|
path: ":shipping_profile_id", |
|
1522
|
lazy: async () => { |
|
1523
|
const { Component, Breadcrumb, loader, seo } = |
|
1524
|
await import( |
|
1525
|
"../../routes/shipping-profiles/shipping-profile-detail" |
|
1526
|
) |
|
1527
|
|
|
1528
|
return { |
|
1529
|
Component, |
|
1530
|
loader, |
|
1531
|
handle: { |
|
1532
|
breadcrumb: ( |
|
1533
|
// eslint-disable-next-line max-len |
|
1534
|
match: UIMatch<HttpTypes.AdminShippingProfileResponse> |
|
1535
|
) => <Breadcrumb {...match} />, |
|
1536
|
seo, |
|
1537
|
}, |
|
1538
|
} |
|
1539
|
}, |
|
1540
|
children: [ |
|
1541
|
{ |
|
1542
|
path: "metadata/edit", |
|
1543
|
lazy: () => |
|
1544
|
import( |
|
1545
|
"../../routes/shipping-profiles/shipping-profile-metadata" |
|
1546
|
), |
|
1547
|
}, |
|
1548
|
], |
|
1549
|
}, |
|
1550
|
], |
|
1551
|
}, |
|
1552
|
{ |
|
1553
|
path: "shipping-option-types", |
|
1554
|
errorElement: <ErrorBoundary />, |
|
1555
|
element: <Outlet />, |
|
1556
|
handle: { |
|
1557
|
breadcrumb: () => t("shippingOptionTypes.domain"), |
|
1558
|
}, |
|
1559
|
children: [ |
|
1560
|
{ |
|
1561
|
path: "", |
|
1562
|
lazy: () => |
|
1563
|
import( |
|
1564
|
"../../routes/shipping-option-types/shipping-option-type-list" |
|
1565
|
), |
|
1566
|
children: [ |
|
1567
|
{ |
|
1568
|
path: "create", |
|
1569
|
lazy: () => |
|
1570
|
import( |
|
1571
|
"../../routes/shipping-option-types/shipping-option-type-create" |
|
1572
|
), |
|
1573
|
}, |
|
1574
|
], |
|
1575
|
}, |
|
1576
|
{ |
|
1577
|
path: ":id", |
|
1578
|
lazy: async () => { |
|
1579
|
const { Component, Breadcrumb, loader, seo } = |
|
1580
|
await import( |
|
1581
|
"../../routes/shipping-option-types/shipping-option-type-detail" |
|
1582
|
) |
|
1583
|
|
|
1584
|
return { |
|
1585
|
Component, |
|
1586
|
loader, |
|
1587
|
handle: { |
|
1588
|
breadcrumb: ( |
|
1589
|
// eslint-disable-next-line max-len |
|
1590
|
match: UIMatch<HttpTypes.AdminShippingOptionTypeResponse> |
|
1591
|
) => <Breadcrumb {...match} />, |
|
1592
|
seo, |
|
1593
|
}, |
|
1594
|
} |
|
1595
|
}, |
|
1596
|
children: [ |
|
1597
|
{ |
|
1598
|
path: "edit", |
|
1599
|
lazy: () => |
|
1600
|
import( |
|
1601
|
"../../routes/shipping-option-types/shipping-option-type-edit" |
|
1602
|
), |
|
1603
|
}, |
|
1604
|
], |
|
1605
|
}, |
|
1606
|
], |
|
1607
|
}, |
|
1608
|
{ |
|
1609
|
path: ":location_id", |
|
1610
|
lazy: async () => { |
|
1611
|
const { Component, Breadcrumb, loader, seo } = await import( |
|
1612
|
"../../routes/locations/location-detail" |
|
1613
|
) |
|
1614
|
|
|
1615
|
return { |
|
1616
|
Component, |
|
1617
|
loader, |
|
1618
|
handle: { |
|
1619
|
breadcrumb: ( |
|
1620
|
match: UIMatch<HttpTypes.AdminStockLocationResponse> |
|
1621
|
) => <Breadcrumb {...match} />, |
|
1622
|
seo, |
|
1623
|
}, |
|
1624
|
} |
|
1625
|
}, |
|
1626
|
children: [ |
|
1627
|
{ |
|
1628
|
path: "edit", |
|
1629
|
lazy: () => |
|
1630
|
import("../../routes/locations/location-edit"), |
|
1631
|
}, |
|
1632
|
{ |
|
1633
|
path: "sales-channels", |
|
1634
|
lazy: () => |
|
1635
|
import( |
|
1636
|
"../../routes/locations/location-sales-channels" |
|
1637
|
), |
|
1638
|
}, |
|
1639
|
{ |
|
1640
|
path: "fulfillment-providers", |
|
1641
|
lazy: () => |
|
1642
|
import( |
|
1643
|
"../../routes/locations/location-fulfillment-providers" |
|
1644
|
), |
|
1645
|
}, |
|
1646
|
{ |
|
1647
|
path: "metadata/edit", |
|
1648
|
lazy: () => |
|
1649
|
import("../../routes/locations/location-metadata"), |
|
1650
|
}, |
|
1651
|
{ |
|
1652
|
path: "fulfillment-set/:fset_id", |
|
1653
|
children: [ |
|
1654
|
{ |
|
1655
|
path: "service-zones/create", |
|
1656
|
lazy: () => |
|
1657
|
import( |
|
1658
|
"../../routes/locations/location-service-zone-create" |
|
1659
|
), |
|
1660
|
}, |
|
1661
|
{ |
|
1662
|
path: "service-zone/:zone_id", |
|
1663
|
children: [ |
|
1664
|
{ |
|
1665
|
path: "edit", |
|
1666
|
lazy: () => |
|
1667
|
import( |
|
1668
|
"../../routes/locations/location-service-zone-edit" |
|
1669
|
), |
|
1670
|
}, |
|
1671
|
{ |
|
1672
|
path: "areas", |
|
1673
|
lazy: () => |
|
1674
|
import( |
|
1675
|
"../../routes/locations/location-service-zone-manage-areas" |
|
1676
|
), |
|
1677
|
}, |
|
1678
|
{ |
|
1679
|
path: "shipping-option", |
|
1680
|
children: [ |
|
1681
|
{ |
|
1682
|
path: "create", |
|
1683
|
lazy: () => |
|
1684
|
import( |
|
1685
|
"../../routes/locations/location-service-zone-shipping-option-create" |
|
1686
|
), |
|
1687
|
}, |
|
1688
|
{ |
|
1689
|
path: ":so_id", |
|
1690
|
children: [ |
|
1691
|
{ |
|
1692
|
path: "edit", |
|
1693
|
lazy: () => |
|
1694
|
import( |
|
1695
|
"../../routes/locations/location-service-zone-shipping-option-edit" |
|
1696
|
), |
|
1697
|
}, |
|
1698
|
{ |
|
1699
|
path: "pricing", |
|
1700
|
lazy: () => |
|
1701
|
import( |
|
1702
|
"../../routes/locations/location-service-zone-shipping-option-pricing" |
|
1703
|
), |
|
1704
|
}, |
|
1705
|
], |
|
1706
|
}, |
|
1707
|
], |
|
1708
|
}, |
|
1709
|
], |
|
1710
|
}, |
|
1711
|
], |
|
1712
|
}, |
|
1713
|
], |
|
1714
|
}, |
|
1715
|
], |
|
1716
|
}, |
|
1717
|
{ |
|
1718
|
path: "product-tags", |
|
1719
|
errorElement: <ErrorBoundary />, |
|
1720
|
element: <Outlet />, |
|
1721
|
handle: { |
|
1722
|
breadcrumb: () => t("productTags.domain"), |
|
1723
|
}, |
|
1724
|
children: [ |
|
1725
|
{ |
|
1726
|
path: "", |
|
1727
|
lazy: () => |
|
1728
|
import("../../routes/product-tags/product-tag-list"), |
|
1729
|
children: [ |
|
1730
|
{ |
|
1731
|
path: "create", |
|
1732
|
lazy: () => |
|
1733
|
import("../../routes/product-tags/product-tag-create"), |
|
1734
|
}, |
|
1735
|
], |
|
1736
|
}, |
|
1737
|
{ |
|
1738
|
path: ":id", |
|
1739
|
lazy: async () => { |
|
1740
|
const { Component, Breadcrumb, loader, seo } = await import( |
|
1741
|
"../../routes/product-tags/product-tag-detail" |
|
1742
|
) |
|
1743
|
|
|
1744
|
return { |
|
1745
|
Component, |
|
1746
|
loader, |
|
1747
|
handle: { |
|
1748
|
breadcrumb: ( |
|
1749
|
match: UIMatch<HttpTypes.AdminProductTagResponse> |
|
1750
|
) => <Breadcrumb {...match} />, |
|
1751
|
seo, |
|
1752
|
}, |
|
1753
|
} |
|
1754
|
}, |
|
1755
|
children: [ |
|
1756
|
{ |
|
1757
|
path: "edit", |
|
1758
|
lazy: () => |
|
1759
|
import("../../routes/product-tags/product-tag-edit"), |
|
1760
|
}, |
|
1761
|
{ |
|
1762
|
path: "metadata/edit", |
|
1763
|
lazy: () => |
|
1764
|
import( |
|
1765
|
"../../routes/product-tags/product-tag-metadata" |
|
1766
|
), |
|
1767
|
}, |
|
1768
|
], |
|
1769
|
}, |
|
1770
|
], |
|
1771
|
}, |
|
1772
|
{ |
|
1773
|
path: "workflows", |
|
1774
|
errorElement: <ErrorBoundary />, |
|
1775
|
element: <Outlet />, |
|
1776
|
handle: { |
|
1777
|
breadcrumb: () => t("workflowExecutions.domain"), |
|
1778
|
}, |
|
1779
|
children: [ |
|
1780
|
{ |
|
1781
|
path: "", |
|
1782
|
lazy: () => |
|
1783
|
import( |
|
1784
|
"../../routes/workflow-executions/workflow-execution-list" |
|
1785
|
), |
|
1786
|
}, |
|
1787
|
{ |
|
1788
|
path: ":id", |
|
1789
|
lazy: async () => { |
|
1790
|
const { Component, Breadcrumb, loader, seo } = await import( |
|
1791
|
"../../routes/workflow-executions/workflow-execution-detail" |
|
1792
|
) |
|
1793
|
|
|
1794
|
return { |
|
1795
|
Component, |
|
1796
|
loader, |
|
1797
|
handle: { |
|
1798
|
breadcrumb: ( |
|
1799
|
// eslint-disable-next-line max-len |
|
1800
|
match: UIMatch<HttpTypes.AdminWorkflowExecutionResponse> |
|
1801
|
) => <Breadcrumb {...match} />, |
|
1802
|
seo, |
|
1803
|
}, |
|
1804
|
} |
|
1805
|
}, |
|
1806
|
}, |
|
1807
|
], |
|
1808
|
}, |
|
1809
|
{ |
|
1810
|
path: "search", |
|
1811
|
errorElement: <ErrorBoundary />, |
|
1812
|
handle: { |
|
1813
|
breadcrumb: () => t("searchIndexes.domain"), |
|
1814
|
}, |
|
1815
|
lazy: () => |
|
1816
|
import("../../routes/search-indexes/search-index-list"), |
|
1817
|
}, |
|
1818
|
{ |
|
1819
|
path: "product-types", |
|
1820
|
errorElement: <ErrorBoundary />, |
|
1821
|
element: <Outlet />, |
|
1822
|
handle: { |
|
1823
|
breadcrumb: () => t("productTypes.domain"), |
|
1824
|
}, |
|
1825
|
children: [ |
|
1826
|
{ |
|
1827
|
path: "", |
|
1828
|
lazy: () => |
|
1829
|
import("../../routes/product-types/product-type-list"), |
|
1830
|
children: [ |
|
1831
|
{ |
|
1832
|
path: "create", |
|
1833
|
lazy: () => |
|
1834
|
import( |
|
1835
|
"../../routes/product-types/product-type-create" |
|
1836
|
), |
|
1837
|
}, |
|
1838
|
], |
|
1839
|
}, |
|
1840
|
{ |
|
1841
|
path: ":id", |
|
1842
|
lazy: async () => { |
|
1843
|
const { Component, Breadcrumb, loader, seo } = await import( |
|
1844
|
"../../routes/product-types/product-type-detail" |
|
1845
|
) |
|
1846
|
|
|
1847
|
return { |
|
1848
|
Component, |
|
1849
|
loader, |
|
1850
|
handle: { |
|
1851
|
breadcrumb: ( |
|
1852
|
match: UIMatch<HttpTypes.AdminProductTypeResponse> |
|
1853
|
) => <Breadcrumb {...match} />, |
|
1854
|
seo, |
|
1855
|
}, |
|
1856
|
} |
|
1857
|
}, |
|
1858
|
children: [ |
|
1859
|
{ |
|
1860
|
path: "edit", |
|
1861
|
lazy: () => |
|
1862
|
import("../../routes/product-types/product-type-edit"), |
|
1863
|
}, |
|
1864
|
{ |
|
1865
|
path: "metadata/edit", |
|
1866
|
lazy: () => |
|
1867
|
import( |
|
1868
|
"../../routes/product-types/product-type-metadata" |
|
1869
|
), |
|
1870
|
}, |
|
1871
|
], |
|
1872
|
}, |
|
1873
|
], |
|
1874
|
}, |
|
1875
|
{ |
|
1876
|
path: "publishable-api-keys", |
|
1877
|
element: <Outlet />, |
|
1878
|
handle: { |
|
1879
|
breadcrumb: () => t("apiKeyManagement.domain.publishable"), |
|
1880
|
}, |
|
1881
|
children: [ |
|
1882
|
{ |
|
1883
|
path: "", |
|
1884
|
element: <Outlet />, |
|
1885
|
children: [ |
|
1886
|
{ |
|
1887
|
path: "", |
|
1888
|
lazy: () => |
|
1889
|
import( |
|
1890
|
"../../routes/api-key-management/api-key-management-list" |
|
1891
|
), |
|
1892
|
children: [ |
|
1893
|
{ |
|
1894
|
path: "create", |
|
1895
|
lazy: () => |
|
1896
|
import( |
|
1897
|
"../../routes/api-key-management/api-key-management-create" |
|
1898
|
), |
|
1899
|
}, |
|
1900
|
], |
|
1901
|
}, |
|
1902
|
], |
|
1903
|
}, |
|
1904
|
{ |
|
1905
|
path: ":id", |
|
1906
|
lazy: async () => { |
|
1907
|
const { Component, Breadcrumb, loader, seo } = await import( |
|
1908
|
"../../routes/api-key-management/api-key-management-detail" |
|
1909
|
) |
|
1910
|
|
|
1911
|
return { |
|
1912
|
Component, |
|
1913
|
loader, |
|
1914
|
handle: { |
|
1915
|
breadcrumb: ( |
|
1916
|
match: UIMatch<HttpTypes.AdminApiKeyResponse> |
|
1917
|
) => <Breadcrumb {...match} />, |
|
1918
|
seo, |
|
1919
|
}, |
|
1920
|
} |
|
1921
|
}, |
|
1922
|
children: [ |
|
1923
|
{ |
|
1924
|
path: "edit", |
|
1925
|
lazy: () => |
|
1926
|
import( |
|
1927
|
"../../routes/api-key-management/api-key-management-edit" |
|
1928
|
), |
|
1929
|
}, |
|
1930
|
{ |
|
1931
|
path: "sales-channels", |
|
1932
|
lazy: () => |
|
1933
|
import( |
|
1934
|
"../../routes/api-key-management/api-key-management-sales-channels" |
|
1935
|
), |
|
1936
|
}, |
|
1937
|
], |
|
1938
|
}, |
|
1939
|
], |
|
1940
|
}, |
|
1941
|
{ |
|
1942
|
path: "secret-api-keys", |
|
1943
|
element: <Outlet />, |
|
1944
|
handle: { |
|
1945
|
breadcrumb: () => t("apiKeyManagement.domain.secret"), |
|
1946
|
}, |
|
1947
|
children: [ |
|
1948
|
{ |
|
1949
|
path: "", |
|
1950
|
element: <Outlet />, |
|
1951
|
children: [ |
|
1952
|
{ |
|
1953
|
path: "", |
|
1954
|
lazy: () => |
|
1955
|
import( |
|
1956
|
"../../routes/api-key-management/api-key-management-list" |
|
1957
|
), |
|
1958
|
children: [ |
|
1959
|
{ |
|
1960
|
path: "create", |
|
1961
|
lazy: () => |
|
1962
|
import( |
|
1963
|
"../../routes/api-key-management/api-key-management-create" |
|
1964
|
), |
|
1965
|
}, |
|
1966
|
], |
|
1967
|
}, |
|
1968
|
], |
|
1969
|
}, |
|
1970
|
{ |
|
1971
|
path: ":id", |
|
1972
|
lazy: async () => { |
|
1973
|
const { Component, Breadcrumb, loader, seo } = await import( |
|
1974
|
"../../routes/api-key-management/api-key-management-detail" |
|
1975
|
) |
|
1976
|
|
|
1977
|
return { |
|
1978
|
Component, |
|
1979
|
loader, |
|
1980
|
handle: { |
|
1981
|
breadcrumb: ( |
|
1982
|
match: UIMatch<HttpTypes.AdminApiKeyResponse> |
|
1983
|
) => <Breadcrumb {...match} />, |
|
1984
|
seo, |
|
1985
|
}, |
|
1986
|
} |
|
1987
|
}, |
|
1988
|
children: [ |
|
1989
|
{ |
|
1990
|
path: "edit", |
|
1991
|
lazy: () => |
|
1992
|
import( |
|
1993
|
"../../routes/api-key-management/api-key-management-edit" |
|
1994
|
), |
|
1995
|
}, |
|
1996
|
], |
|
1997
|
}, |
|
1998
|
], |
|
1999
|
}, |
|
2000
|
{ |
|
2001
|
path: "tax-regions", |
|
2002
|
element: <Outlet />, |
|
2003
|
handle: { |
|
2004
|
breadcrumb: () => t("taxRegions.domain"), |
|
2005
|
}, |
|
2006
|
children: [ |
|
2007
|
{ |
|
2008
|
path: "", |
|
2009
|
lazy: () => |
|
2010
|
import("../../routes/tax-regions/tax-region-list"), |
|
2011
|
children: [ |
|
2012
|
{ |
|
2013
|
path: "create", |
|
2014
|
lazy: () => |
|
2015
|
import("../../routes/tax-regions/tax-region-create"), |
|
2016
|
}, |
|
2017
|
], |
|
2018
|
}, |
|
2019
|
{ |
|
2020
|
path: ":id", |
|
2021
|
errorElement: <ErrorBoundary />, |
|
2022
|
lazy: async () => { |
|
2023
|
const { Breadcrumb, loader, seo } = await import( |
|
2024
|
"../../routes/tax-regions/tax-region-detail" |
|
2025
|
) |
|
2026
|
|
|
2027
|
return { |
|
2028
|
Component: Outlet, |
|
2029
|
loader, |
|
2030
|
handle: { |
|
2031
|
breadcrumb: ( |
|
2032
|
match: UIMatch<HttpTypes.AdminTaxRegionResponse> |
|
2033
|
) => <Breadcrumb {...match} />, |
|
2034
|
seo, |
|
2035
|
}, |
|
2036
|
} |
|
2037
|
}, |
|
2038
|
children: [ |
|
2039
|
{ |
|
2040
|
path: "", |
|
2041
|
lazy: async () => { |
|
2042
|
const { Component } = await import( |
|
2043
|
"../../routes/tax-regions/tax-region-detail" |
|
2044
|
) |
|
2045
|
|
|
2046
|
return { |
|
2047
|
Component, |
|
2048
|
} |
|
2049
|
}, |
|
2050
|
children: [ |
|
2051
|
{ |
|
2052
|
path: "edit", |
|
2053
|
lazy: () => |
|
2054
|
import("../../routes/tax-regions/tax-region-edit"), |
|
2055
|
}, |
|
2056
|
{ |
|
2057
|
path: "provinces/create", |
|
2058
|
lazy: () => |
|
2059
|
import( |
|
2060
|
"../../routes/tax-regions/tax-region-province-create" |
|
2061
|
), |
|
2062
|
}, |
|
2063
|
{ |
|
2064
|
path: "overrides/create", |
|
2065
|
lazy: () => |
|
2066
|
import( |
|
2067
|
"../../routes/tax-regions/tax-region-tax-override-create" |
|
2068
|
), |
|
2069
|
}, |
|
2070
|
{ |
|
2071
|
path: "overrides/:tax_rate_id/edit", |
|
2072
|
lazy: () => |
|
2073
|
import( |
|
2074
|
"../../routes/tax-regions/tax-region-tax-override-edit" |
|
2075
|
), |
|
2076
|
}, |
|
2077
|
{ |
|
2078
|
path: "tax-rates/create", |
|
2079
|
lazy: () => |
|
2080
|
import( |
|
2081
|
"../../routes/tax-regions/tax-region-tax-rate-create" |
|
2082
|
), |
|
2083
|
}, |
|
2084
|
{ |
|
2085
|
path: "tax-rates/:tax_rate_id/edit", |
|
2086
|
lazy: () => |
|
2087
|
import( |
|
2088
|
"../../routes/tax-regions/tax-region-tax-rate-edit" |
|
2089
|
), |
|
2090
|
}, |
|
2091
|
], |
|
2092
|
}, |
|
2093
|
{ |
|
2094
|
path: "provinces/:province_id", |
|
2095
|
lazy: async () => { |
|
2096
|
const { Component, Breadcrumb, loader, seo } = |
|
2097
|
await import( |
|
2098
|
"../../routes/tax-regions/tax-region-province-detail" |
|
2099
|
) |
|
2100
|
|
|
2101
|
return { |
|
2102
|
Component, |
|
2103
|
loader, |
|
2104
|
handle: { |
|
2105
|
breadcrumb: ( |
|
2106
|
match: UIMatch<HttpTypes.AdminTaxRegionResponse> |
|
2107
|
) => <Breadcrumb {...match} />, |
|
2108
|
seo, |
|
2109
|
}, |
|
2110
|
} |
|
2111
|
}, |
|
2112
|
children: [ |
|
2113
|
{ |
|
2114
|
path: "tax-rates/create", |
|
2115
|
lazy: () => |
|
2116
|
import( |
|
2117
|
"../../routes/tax-regions/tax-region-tax-rate-create" |
|
2118
|
), |
|
2119
|
}, |
|
2120
|
{ |
|
2121
|
path: "tax-rates/:tax_rate_id/edit", |
|
2122
|
lazy: () => |
|
2123
|
import( |
|
2124
|
"../../routes/tax-regions/tax-region-tax-rate-edit" |
|
2125
|
), |
|
2126
|
}, |
|
2127
|
{ |
|
2128
|
path: "overrides/create", |
|
2129
|
lazy: () => |
|
2130
|
import( |
|
2131
|
"../../routes/tax-regions/tax-region-tax-override-create" |
|
2132
|
), |
|
2133
|
}, |
|
2134
|
{ |
|
2135
|
path: "overrides/:tax_rate_id/edit", |
|
2136
|
lazy: () => |
|
2137
|
import( |
|
2138
|
"../../routes/tax-regions/tax-region-tax-override-edit" |
|
2139
|
), |
|
2140
|
}, |
|
2141
|
], |
|
2142
|
}, |
|
2143
|
], |
|
2144
|
}, |
|
2145
|
], |
|
2146
|
}, |
|
2147
|
{ |
|
2148
|
path: "return-reasons", |
|
2149
|
element: <Outlet />, |
|
2150
|
handle: { |
|
2151
|
breadcrumb: () => t("returnReasons.domain"), |
|
2152
|
}, |
|
2153
|
children: [ |
|
2154
|
{ |
|
2155
|
path: "", |
|
2156
|
lazy: () => |
|
2157
|
import("../../routes/return-reasons/return-reason-list"), |
|
2158
|
children: [ |
|
2159
|
{ |
|
2160
|
path: "create", |
|
2161
|
lazy: () => |
|
2162
|
import( |
|
2163
|
"../../routes/return-reasons/return-reason-create" |
|
2164
|
), |
|
2165
|
}, |
|
2166
|
|
|
2167
|
{ |
|
2168
|
path: ":id", |
|
2169
|
children: [ |
|
2170
|
{ |
|
2171
|
path: "edit", |
|
2172
|
lazy: () => |
|
2173
|
import( |
|
2174
|
"../../routes/return-reasons/return-reason-edit" |
|
2175
|
), |
|
2176
|
}, |
|
2177
|
], |
|
2178
|
}, |
|
2179
|
], |
|
2180
|
}, |
|
2181
|
], |
|
2182
|
}, |
|
2183
|
{ |
|
2184
|
path: "refund-reasons", |
|
2185
|
element: <Outlet />, |
|
2186
|
handle: { |
|
2187
|
breadcrumb: () => t("refundReasons.domain"), |
|
2188
|
}, |
|
2189
|
children: [ |
|
2190
|
{ |
|
2191
|
path: "", |
|
2192
|
lazy: () => |
|
2193
|
import("../../routes/refund-reasons/refund-reason-list"), |
|
2194
|
children: [ |
|
2195
|
{ |
|
2196
|
path: "create", |
|
2197
|
lazy: () => |
|
2198
|
import( |
|
2199
|
"../../routes/refund-reasons/refund-reason-create" |
|
2200
|
), |
|
2201
|
}, |
|
2202
|
|
|
2203
|
{ |
|
2204
|
path: ":id", |
|
2205
|
children: [ |
|
2206
|
{ |
|
2207
|
path: "edit", |
|
2208
|
lazy: () => |
|
2209
|
import( |
|
2210
|
"../../routes/refund-reasons/refund-reason-edit" |
|
2211
|
), |
|
2212
|
}, |
|
2213
|
], |
|
2214
|
}, |
|
2215
|
], |
|
2216
|
}, |
|
2217
|
], |
|
2218
|
}, |
|
2219
|
{ |
|
2220
|
path: "translations", |
|
2221
|
errorElement: <ErrorBoundary />, |
|
2222
|
handle: { |
|
2223
|
breadcrumb: () => t("translations.domain"), |
|
2224
|
}, |
|
2225
|
children: [ |
|
2226
|
{ |
|
2227
|
path: "", |
|
2228
|
lazy: () => |
|
2229
|
import("../../routes/translations/translation-list"), |
|
2230
|
children: [ |
|
2231
|
{ |
|
2232
|
path: "settings", |
|
2233
|
lazy: () => import("../../routes/translations/settings"), |
|
2234
|
}, |
|
2235
|
], |
|
2236
|
}, |
|
2237
|
{ |
|
2238
|
path: "edit", |
|
2239
|
lazy: () => |
|
2240
|
import("../../routes/translations/translations-edit"), |
|
2241
|
}, |
|
2242
|
{ |
|
2243
|
path: "add-locales", |
|
2244
|
lazy: () => import("../../routes/translations/add-locales"), |
|
2245
|
}, |
|
2246
|
], |
|
2247
|
}, |
|
2248
|
...settingsRoutes.flatMap((r) => r?.children || []), |
|
2249
|
], |
|
2250
|
}, |
|
2251
|
], |
|
2252
|
}, |
|
2253
|
{ |
|
2254
|
element: <PublicLayout />, |
|
2255
|
children: [ |
|
2256
|
{ |
|
2257
|
errorElement: <ErrorBoundary />, |
|
2258
|
children: [ |
|
2259
|
{ |
|
2260
|
path: "/login", |
|
2261
|
lazy: () => import("../../routes/login"), |
|
2262
|
handle: { |
|
2263
|
breadcrumb: () => t("login.title"), |
|
2264
|
}, |
|
2265
|
}, |
|
2266
|
{ |
|
2267
|
path: "/reset-password", |
|
2268
|
lazy: () => import("../../routes/reset-password"), |
|
2269
|
handle: { |
|
2270
|
breadcrumb: () => t("resetPassword.title"), |
|
2271
|
}, |
|
2272
|
}, |
|
2273
|
{ |
|
2274
|
path: "/invite", |
|
2275
|
lazy: () => import("../../routes/invite"), |
|
2276
|
handle: { |
|
2277
|
breadcrumb: () => t("invite.title"), |
|
2278
|
}, |
|
2279
|
}, |
|
2280
|
{ |
|
2281
|
path: "*", |
|
2282
|
lazy: () => import("../../routes/no-match"), |
|
2283
|
}, |
|
2284
|
], |
|
2285
|
}, |
|
2286
|
], |
|
2287
|
}, |
|
2288
|
] |
|
2289
|
} |