@vendure/dashboard 3.6.0-minor-202511061555 → 3.6.0-minor-202512161454
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/dist/plugin/constants.js +2 -2
- package/dist/vite/constants.js +1 -0
- package/dist/vite/utils/compiler.d.ts +1 -0
- package/dist/vite/utils/compiler.js +5 -4
- package/dist/vite/utils/get-dashboard-paths.d.ts +5 -0
- package/dist/vite/utils/get-dashboard-paths.js +20 -0
- package/dist/vite/vite-plugin-dashboard-metadata.js +2 -1
- package/dist/vite/vite-plugin-tailwind-source.js +2 -15
- package/dist/vite/vite-plugin-translations.d.ts +10 -1
- package/dist/vite/vite-plugin-translations.js +156 -45
- package/dist/vite/vite-plugin-vendure-dashboard.d.ts +12 -0
- package/dist/vite/vite-plugin-vendure-dashboard.js +1 -0
- package/lingui.config.js +1 -0
- package/package.json +7 -7
- package/src/app/routeTree.gen.ts +1221 -0
- package/src/app/routes/_authenticated/_administrators/administrators.tsx +9 -12
- package/src/app/routes/_authenticated/_administrators/administrators_.$id.tsx +9 -12
- package/src/app/routes/_authenticated/_assets/assets_.$id.tsx +6 -9
- package/src/app/routes/_authenticated/_channels/channels.tsx +9 -12
- package/src/app/routes/_authenticated/_channels/channels_.$id.tsx +9 -12
- package/src/app/routes/_authenticated/_collections/collections.tsx +9 -12
- package/src/app/routes/_authenticated/_collections/collections_.$id.tsx +9 -12
- package/src/app/routes/_authenticated/_countries/countries.tsx +9 -12
- package/src/app/routes/_authenticated/_countries/countries_.$id.tsx +9 -12
- package/src/app/routes/_authenticated/_customer-groups/customer-groups.tsx +9 -12
- package/src/app/routes/_authenticated/_customer-groups/customer-groups_.$id.tsx +9 -12
- package/src/app/routes/_authenticated/_customers/components/customer-history/index.ts +0 -1
- package/src/app/routes/_authenticated/_customers/customers.tsx +9 -12
- package/src/app/routes/_authenticated/_customers/customers_.$id.tsx +9 -12
- package/src/app/routes/_authenticated/_facets/facets.tsx +9 -12
- package/src/app/routes/_authenticated/_facets/facets_.$facetId.values_.$id.tsx +9 -12
- package/src/app/routes/_authenticated/_facets/facets_.$id.tsx +9 -12
- package/src/app/routes/_authenticated/_global-settings/global-settings.tsx +10 -13
- package/src/app/routes/_authenticated/_orders/components/add-surcharge-form.tsx +139 -0
- package/src/app/routes/_authenticated/_orders/components/edit-order-table.tsx +3 -0
- package/src/app/routes/_authenticated/_orders/components/fulfill-order-dialog.tsx +3 -1
- package/src/app/routes/_authenticated/_orders/components/order-address.tsx +3 -3
- package/src/app/routes/_authenticated/_orders/components/order-detail-shared.tsx +41 -41
- package/src/app/routes/_authenticated/_orders/components/order-history/order-history-utils.tsx +1 -1
- package/src/app/routes/_authenticated/_orders/components/order-modification-summary.tsx +49 -11
- package/src/app/routes/_authenticated/_orders/components/order-table.tsx +4 -1
- package/src/app/routes/_authenticated/_orders/components/use-transition-order-to-state.tsx +2 -3
- package/src/app/routes/_authenticated/_orders/orders.tsx +3 -3
- package/src/app/routes/_authenticated/_orders/orders_.$id_.modify.tsx +12 -3
- package/src/app/routes/_authenticated/_orders/orders_.draft.$id.tsx +27 -30
- package/src/app/routes/_authenticated/_orders/utils/use-modify-order.ts +23 -0
- package/src/app/routes/_authenticated/_payment-methods/payment-methods.tsx +9 -12
- package/src/app/routes/_authenticated/_payment-methods/payment-methods_.$id.tsx +9 -12
- package/src/app/routes/_authenticated/_product-variants/components/add-currency-dropdown.tsx +3 -3
- package/src/app/routes/_authenticated/_product-variants/components/add-stock-location-dropdown.tsx +2 -2
- package/src/app/routes/_authenticated/_product-variants/product-variants.graphql.ts +1 -0
- package/src/app/routes/_authenticated/_product-variants/product-variants_.$id.tsx +10 -12
- package/src/app/routes/_authenticated/_products/products.graphql.ts +1 -0
- package/src/app/routes/_authenticated/_products/products.tsx +15 -18
- package/src/app/routes/_authenticated/_products/products_.$id.tsx +9 -12
- package/src/app/routes/_authenticated/_products/products_.$productId.option-groups.$id.tsx +9 -12
- package/src/app/routes/_authenticated/_products/products_.$productId.option-groups.$productOptionGroupId.options_.$id.tsx +9 -12
- package/src/app/routes/_authenticated/_profile/profile.tsx +3 -3
- package/src/app/routes/_authenticated/_promotions/promotions.tsx +9 -12
- package/src/app/routes/_authenticated/_promotions/promotions_.$id.tsx +9 -12
- package/src/app/routes/_authenticated/_roles/roles.tsx +9 -12
- package/src/app/routes/_authenticated/_roles/roles_.$id.tsx +9 -12
- package/src/app/routes/_authenticated/_sellers/sellers.tsx +9 -12
- package/src/app/routes/_authenticated/_sellers/sellers_.$id.tsx +9 -12
- package/src/app/routes/_authenticated/_shipping-methods/shipping-methods.tsx +11 -12
- package/src/app/routes/_authenticated/_shipping-methods/shipping-methods_.$id.tsx +19 -20
- package/src/app/routes/_authenticated/_stock-locations/stock-locations.tsx +9 -12
- package/src/app/routes/_authenticated/_stock-locations/stock-locations_.$id.tsx +9 -12
- package/src/app/routes/_authenticated/_system/healthchecks.tsx +2 -3
- package/src/app/routes/_authenticated/_system/job-queue.tsx +3 -3
- package/src/app/routes/_authenticated/_tax-categories/tax-categories.tsx +9 -12
- package/src/app/routes/_authenticated/_tax-categories/tax-categories_.$id.tsx +9 -12
- package/src/app/routes/_authenticated/_tax-rates/tax-rates.tsx +9 -12
- package/src/app/routes/_authenticated/_tax-rates/tax-rates_.$id.tsx +9 -12
- package/src/app/routes/_authenticated/_zones/components/zone-bulk-actions.tsx +49 -1
- package/src/app/routes/_authenticated/_zones/components/zone-countries-table.tsx +34 -16
- package/src/app/routes/_authenticated/_zones/zones.tsx +9 -12
- package/src/app/routes/_authenticated/_zones/zones_.$id.tsx +9 -12
- package/src/app/routes/_authenticated/index.tsx +5 -3
- package/src/i18n/locales/bg.po +3436 -0
- package/src/lib/components/data-input/datetime-input.tsx +1 -1
- package/src/lib/components/data-input/default-relation-input.tsx +1 -1
- package/src/lib/components/data-input/relation-selector.tsx +1 -1
- package/src/lib/components/data-input/string-list-input.tsx +188 -26
- package/src/lib/components/data-input/struct-form-input.tsx +175 -174
- package/src/lib/components/data-table/column-header-wrapper.tsx +1 -1
- package/src/lib/components/data-table/data-table-filter-badge.tsx +2 -2
- package/src/lib/components/data-table/data-table.tsx +1 -1
- package/src/lib/components/data-table/use-generated-columns.tsx +1 -1
- package/src/lib/components/layout/channel-switcher.tsx +6 -2
- package/src/lib/components/layout/content-language-selector.tsx +6 -7
- package/src/lib/components/layout/dev-mode-indicator.tsx +7 -3
- package/src/lib/components/layout/language-dialog.tsx +26 -13
- package/src/lib/components/layout/manage-languages-dialog.tsx +10 -29
- package/src/lib/components/layout/nav-item-wrapper.tsx +1 -1
- package/src/lib/components/shared/asset/asset-gallery.tsx +8 -3
- package/src/lib/components/shared/configurable-operation-multi-selector.tsx +14 -16
- package/src/lib/components/shared/custom-fields-form.tsx +14 -9
- package/src/lib/components/shared/language-selector.tsx +14 -6
- package/src/lib/components/shared/multi-select.tsx +1 -1
- package/src/lib/components/shared/navigation-confirmation.tsx +1 -1
- package/src/lib/components/shared/table-cell/order-table-cell-components.tsx +4 -4
- package/src/lib/components/ui/carousel.tsx +2 -2
- package/src/lib/components/ui/chart.tsx +1 -1
- package/src/lib/components/ui/context-menu.tsx +1 -1
- package/src/lib/components/ui/drawer.tsx +1 -1
- package/src/lib/components/ui/grid-layout.tsx +1 -1
- package/src/lib/components/ui/input-group.tsx +1 -0
- package/src/lib/components/ui/input-otp.tsx +1 -1
- package/src/lib/components/ui/menubar.tsx +1 -1
- package/src/lib/components/ui/navigation-menu.tsx +1 -1
- package/src/lib/components/ui/progress.tsx +1 -1
- package/src/lib/components/ui/radio-group.tsx +1 -1
- package/src/lib/components/ui/resizable.tsx +1 -1
- package/src/lib/components/ui/select.tsx +1 -1
- package/src/lib/components/ui/slider.tsx +1 -1
- package/src/lib/components/ui/toggle-group.tsx +2 -2
- package/src/lib/components/ui/toggle.tsx +1 -1
- package/src/lib/framework/component-registry/component-registry.tsx +2 -6
- package/src/lib/framework/document-introspection/add-custom-fields.spec.ts +907 -1
- package/src/lib/framework/document-introspection/add-custom-fields.ts +248 -119
- package/src/lib/framework/extension-api/display-component-extensions.tsx +4 -3
- package/src/lib/framework/extension-api/logic/detail-forms.ts +0 -13
- package/src/lib/framework/extension-api/logic/navigation.ts +1 -1
- package/src/lib/framework/extension-api/types/data-table.ts +4 -2
- package/src/lib/framework/extension-api/types/layout.ts +34 -1
- package/src/lib/framework/extension-api/types/navigation.ts +7 -2
- package/src/lib/framework/form-engine/use-generated-form.tsx +7 -1
- package/src/lib/framework/history-entry/history-entry.tsx +1 -1
- package/src/lib/framework/layout-engine/action-bar-item-wrapper.tsx +185 -0
- package/src/lib/framework/layout-engine/dev-mode-button.tsx +15 -13
- package/src/lib/framework/layout-engine/location-wrapper.tsx +3 -1
- package/src/lib/framework/layout-engine/page-layout.spec.tsx +138 -0
- package/src/lib/framework/layout-engine/page-layout.tsx +294 -69
- package/src/lib/framework/nav-menu/nav-menu-extensions.ts +1 -1
- package/src/lib/framework/page/detail-page-route-loader.tsx +1 -1
- package/src/lib/framework/page/page-api.ts +1 -1
- package/src/lib/framework/page/use-detail-page.ts +4 -2
- package/src/lib/framework/page/use-extended-router.tsx +20 -16
- package/src/lib/framework/registry/registry-types.ts +2 -1
- package/src/lib/graphql/api.ts +3 -8
- package/src/lib/graphql/graphql-env.d.ts +29 -10
- package/src/lib/hooks/use-permissions.ts +3 -3
- package/src/lib/hooks/use-sorted-languages.ts +41 -0
- package/src/lib/index.ts +1 -0
- package/src/lib/lib/load-i18n-messages.ts +4 -1
- package/src/lib/providers/channel-provider.tsx +11 -7
- package/src/lib/utils/config-utils.ts +19 -0
- package/src/lib/virtual.d.ts +3 -0
- package/LICENSE.md +0 -42
- package/src/app/routes/_authenticated/_facets/components/edit-facet-value.tsx +0 -129
- /package/src/{app/routes/_authenticated/_global-settings → lib}/utils/global-languages.ts +0 -0
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { DetailPageButton } from '@/vdb/components/shared/detail-page-button.js';
|
|
2
|
-
import { PermissionGuard } from '@/vdb/components/shared/permission-guard.js';
|
|
3
2
|
import { RoleCodeLabel } from '@/vdb/components/shared/role-code-label.js';
|
|
4
3
|
import { Badge } from '@/vdb/components/ui/badge.js';
|
|
5
4
|
import { Button } from '@/vdb/components/ui/button.js';
|
|
6
|
-
import {
|
|
5
|
+
import { ActionBarItem } from '@/vdb/framework/layout-engine/page-layout.js';
|
|
7
6
|
import { ListPage } from '@/vdb/framework/page/list-page.js';
|
|
8
7
|
import { Trans } from '@lingui/react/macro';
|
|
9
8
|
import { createFileRoute, Link } from '@tanstack/react-router';
|
|
@@ -89,16 +88,14 @@ function AdministratorListPage() {
|
|
|
89
88
|
},
|
|
90
89
|
]}
|
|
91
90
|
>
|
|
92
|
-
<
|
|
93
|
-
<
|
|
94
|
-
<
|
|
95
|
-
<
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
</PermissionGuard>
|
|
101
|
-
</PageActionBarRight>
|
|
91
|
+
<ActionBarItem itemId="create-button" requiresPermission={['CreateAdministrator']}>
|
|
92
|
+
<Button asChild>
|
|
93
|
+
<Link to="./new">
|
|
94
|
+
<PlusIcon />
|
|
95
|
+
New Administrator
|
|
96
|
+
</Link>
|
|
97
|
+
</Button>
|
|
98
|
+
</ActionBarItem>
|
|
102
99
|
</ListPage>
|
|
103
100
|
);
|
|
104
101
|
}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { ErrorPage } from '@/vdb/components/shared/error-page.js';
|
|
2
2
|
import { FormFieldWrapper } from '@/vdb/components/shared/form-field-wrapper.js';
|
|
3
|
-
import { PermissionGuard } from '@/vdb/components/shared/permission-guard.js';
|
|
4
3
|
import { RoleSelector } from '@/vdb/components/shared/role-selector.js';
|
|
5
4
|
import { Button } from '@/vdb/components/ui/button.js';
|
|
6
5
|
import { Input } from '@/vdb/components/ui/input.js';
|
|
7
6
|
import { NEW_ENTITY_PATH } from '@/vdb/constants.js';
|
|
8
7
|
import {
|
|
8
|
+
ActionBarItem,
|
|
9
9
|
CustomFieldsPageBlock,
|
|
10
10
|
Page,
|
|
11
11
|
PageActionBar,
|
|
12
|
-
PageActionBarRight,
|
|
13
12
|
PageBlock,
|
|
14
13
|
PageLayout,
|
|
15
14
|
PageTitle,
|
|
@@ -99,16 +98,14 @@ function AdministratorDetailPage() {
|
|
|
99
98
|
<PageTitle>{creatingNewEntity ? <Trans>New administrator</Trans> : name}</PageTitle>
|
|
100
99
|
|
|
101
100
|
<PageActionBar>
|
|
102
|
-
<
|
|
103
|
-
<
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
>
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
</PermissionGuard>
|
|
111
|
-
</PageActionBarRight>
|
|
101
|
+
<ActionBarItem itemId="save-button" requiresPermission={['UpdateAdministrator']}>
|
|
102
|
+
<Button
|
|
103
|
+
type="submit"
|
|
104
|
+
disabled={!form.formState.isDirty || !form.formState.isValid || isPending}
|
|
105
|
+
>
|
|
106
|
+
{creatingNewEntity ? <Trans>Create</Trans> : <Trans>Update</Trans>}
|
|
107
|
+
</Button>
|
|
108
|
+
</ActionBarItem>
|
|
112
109
|
</PageActionBar>
|
|
113
110
|
<PageLayout>
|
|
114
111
|
<PageBlock column="main" blockId="main-form">
|
|
@@ -3,15 +3,14 @@ import { AssetPreviewSelector } from '@/vdb/components/shared/asset/asset-previe
|
|
|
3
3
|
import { PreviewPreset } from '@/vdb/components/shared/asset/asset-preview.js';
|
|
4
4
|
import { AssetProperties } from '@/vdb/components/shared/asset/asset-properties.js';
|
|
5
5
|
import { ErrorPage } from '@/vdb/components/shared/error-page.js';
|
|
6
|
-
import { PermissionGuard } from '@/vdb/components/shared/permission-guard.js';
|
|
7
6
|
import { VendureImage } from '@/vdb/components/shared/vendure-image.js';
|
|
8
7
|
import { Button } from '@/vdb/components/ui/button.js';
|
|
9
8
|
import { Label } from '@/vdb/components/ui/label.js';
|
|
10
9
|
import {
|
|
10
|
+
ActionBarItem,
|
|
11
11
|
CustomFieldsPageBlock,
|
|
12
12
|
Page,
|
|
13
13
|
PageActionBar,
|
|
14
|
-
PageActionBarRight,
|
|
15
14
|
PageBlock,
|
|
16
15
|
PageLayout,
|
|
17
16
|
PageTitle,
|
|
@@ -95,13 +94,11 @@ function AssetDetailPage() {
|
|
|
95
94
|
<Trans>Edit asset</Trans>
|
|
96
95
|
</PageTitle>
|
|
97
96
|
<PageActionBar>
|
|
98
|
-
<
|
|
99
|
-
<
|
|
100
|
-
<
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
</PermissionGuard>
|
|
104
|
-
</PageActionBarRight>
|
|
97
|
+
<ActionBarItem itemId="save-button" requiresPermission={['UpdateChannel']}>
|
|
98
|
+
<Button type="submit" disabled={!form.formState.isDirty || isPending}>
|
|
99
|
+
<Trans>Update</Trans>
|
|
100
|
+
</Button>
|
|
101
|
+
</ActionBarItem>
|
|
105
102
|
</PageActionBar>
|
|
106
103
|
<PageLayout>
|
|
107
104
|
<PageBlock column="main" blockId="asset-preview">
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { ChannelCodeLabel } from '@/vdb/components/shared/channel-code-label.js';
|
|
2
2
|
import { DetailPageButton } from '@/vdb/components/shared/detail-page-button.js';
|
|
3
|
-
import { PermissionGuard } from '@/vdb/components/shared/permission-guard.js';
|
|
4
3
|
import { Button } from '@/vdb/components/ui/button.js';
|
|
5
|
-
import {
|
|
4
|
+
import { ActionBarItem } from '@/vdb/framework/layout-engine/page-layout.js';
|
|
6
5
|
import { ListPage } from '@/vdb/framework/page/list-page.js';
|
|
7
6
|
import { useLocalFormat } from '@/vdb/hooks/use-local-format.js';
|
|
8
7
|
import { Trans } from '@lingui/react/macro';
|
|
@@ -66,16 +65,14 @@ function ChannelListPage() {
|
|
|
66
65
|
},
|
|
67
66
|
]}
|
|
68
67
|
>
|
|
69
|
-
<
|
|
70
|
-
<
|
|
71
|
-
<
|
|
72
|
-
<
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
</PermissionGuard>
|
|
78
|
-
</PageActionBarRight>
|
|
68
|
+
<ActionBarItem itemId="create-button" requiresPermission={['CreateChannel']}>
|
|
69
|
+
<Button asChild>
|
|
70
|
+
<Link to="./new">
|
|
71
|
+
<PlusIcon className="mr-2 h-4 w-4" />
|
|
72
|
+
<Trans>New Channel</Trans>
|
|
73
|
+
</Link>
|
|
74
|
+
</Button>
|
|
75
|
+
</ActionBarItem>
|
|
79
76
|
</ListPage>
|
|
80
77
|
);
|
|
81
78
|
}
|
|
@@ -3,7 +3,6 @@ import { CurrencySelector } from '@/vdb/components/shared/currency-selector.js';
|
|
|
3
3
|
import { ErrorPage } from '@/vdb/components/shared/error-page.js';
|
|
4
4
|
import { FormFieldWrapper } from '@/vdb/components/shared/form-field-wrapper.js';
|
|
5
5
|
import { LanguageSelector } from '@/vdb/components/shared/language-selector.js';
|
|
6
|
-
import { PermissionGuard } from '@/vdb/components/shared/permission-guard.js';
|
|
7
6
|
import { SellerSelector } from '@/vdb/components/shared/seller-selector.js';
|
|
8
7
|
import { ZoneSelector } from '@/vdb/components/shared/zone-selector.js';
|
|
9
8
|
import { Button } from '@/vdb/components/ui/button.js';
|
|
@@ -11,11 +10,11 @@ import { Input } from '@/vdb/components/ui/input.js';
|
|
|
11
10
|
import { Switch } from '@/vdb/components/ui/switch.js';
|
|
12
11
|
import { DEFAULT_CHANNEL_CODE, NEW_ENTITY_PATH } from '@/vdb/constants.js';
|
|
13
12
|
import {
|
|
13
|
+
ActionBarItem,
|
|
14
14
|
CustomFieldsPageBlock,
|
|
15
15
|
DetailFormGrid,
|
|
16
16
|
Page,
|
|
17
17
|
PageActionBar,
|
|
18
|
-
PageActionBarRight,
|
|
19
18
|
PageBlock,
|
|
20
19
|
PageLayout,
|
|
21
20
|
PageTitle,
|
|
@@ -116,16 +115,14 @@ function ChannelDetailPage() {
|
|
|
116
115
|
)}
|
|
117
116
|
</PageTitle>
|
|
118
117
|
<PageActionBar>
|
|
119
|
-
<
|
|
120
|
-
<
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
>
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
</PermissionGuard>
|
|
128
|
-
</PageActionBarRight>
|
|
118
|
+
<ActionBarItem itemId="save-button" requiresPermission={['UpdateChannel']}>
|
|
119
|
+
<Button
|
|
120
|
+
type="submit"
|
|
121
|
+
disabled={!form.formState.isDirty || !form.formState.isValid || isPending}
|
|
122
|
+
>
|
|
123
|
+
{creatingNewEntity ? <Trans>Create</Trans> : <Trans>Update</Trans>}
|
|
124
|
+
</Button>
|
|
125
|
+
</ActionBarItem>
|
|
129
126
|
</PageActionBar>
|
|
130
127
|
<PageLayout>
|
|
131
128
|
<PageBlock column="main" blockId="main-form">
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { DetailPageButton } from '@/vdb/components/shared/detail-page-button.js';
|
|
2
|
-
import { PermissionGuard } from '@/vdb/components/shared/permission-guard.js';
|
|
3
2
|
import { Button } from '@/vdb/components/ui/button.js';
|
|
4
|
-
import {
|
|
3
|
+
import { ActionBarItem } from '@/vdb/framework/layout-engine/page-layout.js';
|
|
5
4
|
import { ListPage } from '@/vdb/framework/page/list-page.js';
|
|
6
5
|
import { api } from '@/vdb/graphql/api.js';
|
|
7
6
|
import { Trans } from '@lingui/react/macro';
|
|
@@ -239,16 +238,14 @@ function CollectionListPage() {
|
|
|
239
238
|
},
|
|
240
239
|
]}
|
|
241
240
|
>
|
|
242
|
-
<
|
|
243
|
-
<
|
|
244
|
-
<
|
|
245
|
-
<
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
</PermissionGuard>
|
|
251
|
-
</PageActionBarRight>
|
|
241
|
+
<ActionBarItem itemId="create-button" requiresPermission={['CreateCollection', 'CreateCatalog']}>
|
|
242
|
+
<Button asChild>
|
|
243
|
+
<Link to="./new">
|
|
244
|
+
<PlusIcon className="mr-2 h-4 w-4" />
|
|
245
|
+
<Trans>New Collection</Trans>
|
|
246
|
+
</Link>
|
|
247
|
+
</Button>
|
|
248
|
+
</ActionBarItem>
|
|
252
249
|
</ListPage>
|
|
253
250
|
</>
|
|
254
251
|
);
|
|
@@ -3,7 +3,6 @@ import { RichTextInput } from '@/vdb/components/data-input/rich-text-input.js';
|
|
|
3
3
|
import { EntityAssets } from '@/vdb/components/shared/entity-assets.js';
|
|
4
4
|
import { ErrorPage } from '@/vdb/components/shared/error-page.js';
|
|
5
5
|
import { FormFieldWrapper } from '@/vdb/components/shared/form-field-wrapper.js';
|
|
6
|
-
import { PermissionGuard } from '@/vdb/components/shared/permission-guard.js';
|
|
7
6
|
import { TranslatableFormFieldWrapper } from '@/vdb/components/shared/translatable-form-field.js';
|
|
8
7
|
import { Button } from '@/vdb/components/ui/button.js';
|
|
9
8
|
import { FormControl, FormDescription, FormItem, FormLabel, FormMessage } from '@/vdb/components/ui/form.js';
|
|
@@ -11,11 +10,11 @@ import { Input } from '@/vdb/components/ui/input.js';
|
|
|
11
10
|
import { Switch } from '@/vdb/components/ui/switch.js';
|
|
12
11
|
import { NEW_ENTITY_PATH } from '@/vdb/constants.js';
|
|
13
12
|
import {
|
|
13
|
+
ActionBarItem,
|
|
14
14
|
CustomFieldsPageBlock,
|
|
15
15
|
DetailFormGrid,
|
|
16
16
|
Page,
|
|
17
17
|
PageActionBar,
|
|
18
|
-
PageActionBarRight,
|
|
19
18
|
PageBlock,
|
|
20
19
|
PageLayout,
|
|
21
20
|
PageTitle,
|
|
@@ -115,16 +114,14 @@ function CollectionDetailPage() {
|
|
|
115
114
|
<Page pageId={pageId} form={form} submitHandler={submitHandler} entity={entity}>
|
|
116
115
|
<PageTitle>{creatingNewEntity ? <Trans>New collection</Trans> : (entity?.name ?? '')}</PageTitle>
|
|
117
116
|
<PageActionBar>
|
|
118
|
-
<
|
|
119
|
-
<
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
>
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
</PermissionGuard>
|
|
127
|
-
</PageActionBarRight>
|
|
117
|
+
<ActionBarItem itemId="save-button" requiresPermission={['UpdateCollection', 'UpdateCatalog']}>
|
|
118
|
+
<Button
|
|
119
|
+
type="submit"
|
|
120
|
+
disabled={!form.formState.isDirty || !form.formState.isValid || isPending}
|
|
121
|
+
>
|
|
122
|
+
{creatingNewEntity ? <Trans>Create</Trans> : <Trans>Update</Trans>}
|
|
123
|
+
</Button>
|
|
124
|
+
</ActionBarItem>
|
|
128
125
|
</PageActionBar>
|
|
129
126
|
<PageLayout>
|
|
130
127
|
<PageBlock column="side" blockId="privacy">
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { DetailPageButton } from '@/vdb/components/shared/detail-page-button.js';
|
|
2
|
-
import { PermissionGuard } from '@/vdb/components/shared/permission-guard.js';
|
|
3
2
|
import { Button } from '@/vdb/components/ui/button.js';
|
|
4
|
-
import {
|
|
3
|
+
import { ActionBarItem } from '@/vdb/framework/layout-engine/page-layout.js';
|
|
5
4
|
import { ListPage } from '@/vdb/framework/page/list-page.js';
|
|
6
5
|
import { Trans } from '@lingui/react/macro';
|
|
7
6
|
import { createFileRoute, Link } from '@tanstack/react-router';
|
|
@@ -57,16 +56,14 @@ function CountryListPage() {
|
|
|
57
56
|
},
|
|
58
57
|
]}
|
|
59
58
|
>
|
|
60
|
-
<
|
|
61
|
-
<
|
|
62
|
-
<
|
|
63
|
-
<
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
</PermissionGuard>
|
|
69
|
-
</PageActionBarRight>
|
|
59
|
+
<ActionBarItem itemId="create-button" requiresPermission={['CreateCountry']}>
|
|
60
|
+
<Button asChild>
|
|
61
|
+
<Link to="./new">
|
|
62
|
+
<PlusIcon />
|
|
63
|
+
<Trans>Add Country</Trans>
|
|
64
|
+
</Link>
|
|
65
|
+
</Button>
|
|
66
|
+
</ActionBarItem>
|
|
70
67
|
</ListPage>
|
|
71
68
|
);
|
|
72
69
|
}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { ErrorPage } from '@/vdb/components/shared/error-page.js';
|
|
2
2
|
import { FormFieldWrapper } from '@/vdb/components/shared/form-field-wrapper.js';
|
|
3
|
-
import { PermissionGuard } from '@/vdb/components/shared/permission-guard.js';
|
|
4
3
|
import { TranslatableFormFieldWrapper } from '@/vdb/components/shared/translatable-form-field.js';
|
|
5
4
|
import { Button } from '@/vdb/components/ui/button.js';
|
|
6
5
|
import { Input } from '@/vdb/components/ui/input.js';
|
|
7
6
|
import { Switch } from '@/vdb/components/ui/switch.js';
|
|
8
7
|
import { NEW_ENTITY_PATH } from '@/vdb/constants.js';
|
|
9
8
|
import {
|
|
9
|
+
ActionBarItem,
|
|
10
10
|
CustomFieldsPageBlock,
|
|
11
11
|
DetailFormGrid,
|
|
12
12
|
Page,
|
|
13
13
|
PageActionBar,
|
|
14
|
-
PageActionBarRight,
|
|
15
14
|
PageBlock,
|
|
16
15
|
PageLayout,
|
|
17
16
|
PageTitle,
|
|
@@ -78,16 +77,14 @@ function CountryDetailPage() {
|
|
|
78
77
|
<Page pageId={pageId} form={form} submitHandler={submitHandler} entity={entity}>
|
|
79
78
|
<PageTitle>{creatingNewEntity ? <Trans>New country</Trans> : (entity?.name ?? '')}</PageTitle>
|
|
80
79
|
<PageActionBar>
|
|
81
|
-
<
|
|
82
|
-
<
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
>
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
</PermissionGuard>
|
|
90
|
-
</PageActionBarRight>
|
|
80
|
+
<ActionBarItem itemId="save-button" requiresPermission={['UpdateCountry']}>
|
|
81
|
+
<Button
|
|
82
|
+
type="submit"
|
|
83
|
+
disabled={!form.formState.isDirty || !form.formState.isValid || isPending}
|
|
84
|
+
>
|
|
85
|
+
{creatingNewEntity ? <Trans>Create</Trans> : <Trans>Update</Trans>}
|
|
86
|
+
</Button>
|
|
87
|
+
</ActionBarItem>
|
|
91
88
|
</PageActionBar>
|
|
92
89
|
<PageLayout>
|
|
93
90
|
<PageBlock column="side" blockId="enabled">
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { DetailPageButton } from '@/vdb/components/shared/detail-page-button.js';
|
|
2
|
-
import { PermissionGuard } from '@/vdb/components/shared/permission-guard.js';
|
|
3
2
|
import { Button } from '@/vdb/components/ui/button.js';
|
|
4
|
-
import {
|
|
3
|
+
import { ActionBarItem } from '@/vdb/framework/layout-engine/page-layout.js';
|
|
5
4
|
import { ListPage } from '@/vdb/framework/page/list-page.js';
|
|
6
5
|
import { Trans } from '@lingui/react/macro';
|
|
7
6
|
import { createFileRoute, Link } from '@tanstack/react-router';
|
|
@@ -57,16 +56,14 @@ function CustomerGroupListPage() {
|
|
|
57
56
|
},
|
|
58
57
|
]}
|
|
59
58
|
>
|
|
60
|
-
<
|
|
61
|
-
<
|
|
62
|
-
<
|
|
63
|
-
<
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
</PermissionGuard>
|
|
69
|
-
</PageActionBarRight>
|
|
59
|
+
<ActionBarItem itemId="create-button" requiresPermission={['CreateCustomerGroup']}>
|
|
60
|
+
<Button asChild>
|
|
61
|
+
<Link to="./new">
|
|
62
|
+
<PlusIcon className="mr-2 h-4 w-4" />
|
|
63
|
+
<Trans>New Customer Group</Trans>
|
|
64
|
+
</Link>
|
|
65
|
+
</Button>
|
|
66
|
+
</ActionBarItem>
|
|
70
67
|
</ListPage>
|
|
71
68
|
);
|
|
72
69
|
}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { ErrorPage } from '@/vdb/components/shared/error-page.js';
|
|
2
2
|
import { FormFieldWrapper } from '@/vdb/components/shared/form-field-wrapper.js';
|
|
3
|
-
import { PermissionGuard } from '@/vdb/components/shared/permission-guard.js';
|
|
4
3
|
import { Button } from '@/vdb/components/ui/button.js';
|
|
5
4
|
import { Input } from '@/vdb/components/ui/input.js';
|
|
6
5
|
import { NEW_ENTITY_PATH } from '@/vdb/constants.js';
|
|
7
6
|
import {
|
|
7
|
+
ActionBarItem,
|
|
8
8
|
CustomFieldsPageBlock,
|
|
9
9
|
DetailFormGrid,
|
|
10
10
|
Page,
|
|
11
11
|
PageActionBar,
|
|
12
|
-
PageActionBarRight,
|
|
13
12
|
PageBlock,
|
|
14
13
|
PageLayout,
|
|
15
14
|
PageTitle,
|
|
@@ -87,16 +86,14 @@ function CustomerGroupDetailPage() {
|
|
|
87
86
|
{creatingNewEntity ? <Trans>New customer group</Trans> : (entity?.name ?? '')}
|
|
88
87
|
</PageTitle>
|
|
89
88
|
<PageActionBar>
|
|
90
|
-
<
|
|
91
|
-
<
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
>
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
</PermissionGuard>
|
|
99
|
-
</PageActionBarRight>
|
|
89
|
+
<ActionBarItem itemId="save-button" requiresPermission={['UpdateCustomerGroup']}>
|
|
90
|
+
<Button
|
|
91
|
+
type="submit"
|
|
92
|
+
disabled={!form.formState.isDirty || !form.formState.isValid || isPending}
|
|
93
|
+
>
|
|
94
|
+
{creatingNewEntity ? <Trans>Create</Trans> : <Trans>Update</Trans>}
|
|
95
|
+
</Button>
|
|
96
|
+
</ActionBarItem>
|
|
100
97
|
</PageActionBar>
|
|
101
98
|
<PageLayout>
|
|
102
99
|
<PageBlock column="main" blockId="main-form">
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { DetailPageButton } from '@/vdb/components/shared/detail-page-button.js';
|
|
2
|
-
import { PermissionGuard } from '@/vdb/components/shared/permission-guard.js';
|
|
3
2
|
import { Badge } from '@/vdb/components/ui/badge.js';
|
|
4
3
|
import { Button } from '@/vdb/components/ui/button.js';
|
|
5
|
-
import {
|
|
4
|
+
import { ActionBarItem } from '@/vdb/framework/layout-engine/page-layout.js';
|
|
6
5
|
import { ListPage } from '@/vdb/framework/page/list-page.js';
|
|
7
6
|
import { Trans } from '@lingui/react/macro';
|
|
8
7
|
import { createFileRoute, Link } from '@tanstack/react-router';
|
|
@@ -89,16 +88,14 @@ function CustomerListPage() {
|
|
|
89
88
|
},
|
|
90
89
|
]}
|
|
91
90
|
>
|
|
92
|
-
<
|
|
93
|
-
<
|
|
94
|
-
<
|
|
95
|
-
<
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
</PermissionGuard>
|
|
101
|
-
</PageActionBarRight>
|
|
91
|
+
<ActionBarItem itemId="create-button" requiresPermission={['CreateCustomer']}>
|
|
92
|
+
<Button asChild>
|
|
93
|
+
<Link to="./new">
|
|
94
|
+
<PlusIcon />
|
|
95
|
+
<Trans>New Customer</Trans>
|
|
96
|
+
</Link>
|
|
97
|
+
</Button>
|
|
98
|
+
</ActionBarItem>
|
|
102
99
|
</ListPage>
|
|
103
100
|
);
|
|
104
101
|
}
|
|
@@ -2,7 +2,6 @@ import { CustomerGroupChip } from '@/vdb/components/shared/customer-group-chip.j
|
|
|
2
2
|
import { CustomerGroupSelector } from '@/vdb/components/shared/customer-group-selector.js';
|
|
3
3
|
import { ErrorPage } from '@/vdb/components/shared/error-page.js';
|
|
4
4
|
import { FormFieldWrapper } from '@/vdb/components/shared/form-field-wrapper.js';
|
|
5
|
-
import { PermissionGuard } from '@/vdb/components/shared/permission-guard.js';
|
|
6
5
|
import { Button } from '@/vdb/components/ui/button.js';
|
|
7
6
|
import {
|
|
8
7
|
Dialog,
|
|
@@ -15,11 +14,11 @@ import {
|
|
|
15
14
|
import { Input } from '@/vdb/components/ui/input.js';
|
|
16
15
|
import { NEW_ENTITY_PATH } from '@/vdb/constants.js';
|
|
17
16
|
import {
|
|
17
|
+
ActionBarItem,
|
|
18
18
|
CustomFieldsPageBlock,
|
|
19
19
|
DetailFormGrid,
|
|
20
20
|
Page,
|
|
21
21
|
PageActionBar,
|
|
22
|
-
PageActionBarRight,
|
|
23
22
|
PageBlock,
|
|
24
23
|
PageLayout,
|
|
25
24
|
PageTitle,
|
|
@@ -146,16 +145,14 @@ function CustomerDetailPage() {
|
|
|
146
145
|
<Page pageId={pageId} form={form} submitHandler={submitHandler} entity={entity}>
|
|
147
146
|
<PageTitle>{creatingNewEntity ? <Trans>New customer</Trans> : customerName}</PageTitle>
|
|
148
147
|
<PageActionBar>
|
|
149
|
-
<
|
|
150
|
-
<
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
>
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
</PermissionGuard>
|
|
158
|
-
</PageActionBarRight>
|
|
148
|
+
<ActionBarItem itemId="save-button" requiresPermission={['UpdateCustomer']}>
|
|
149
|
+
<Button
|
|
150
|
+
type="submit"
|
|
151
|
+
disabled={!form.formState.isDirty || !form.formState.isValid || isPending}
|
|
152
|
+
>
|
|
153
|
+
{creatingNewEntity ? <Trans>Create</Trans> : <Trans>Update</Trans>}
|
|
154
|
+
</Button>
|
|
155
|
+
</ActionBarItem>
|
|
159
156
|
</PageActionBar>
|
|
160
157
|
<PageLayout>
|
|
161
158
|
<PageBlock column="main" blockId="main-form">
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { DataTableCellComponent } from '@/vdb/components/data-table/types.js';
|
|
2
2
|
import { DetailPageButton } from '@/vdb/components/shared/detail-page-button.js';
|
|
3
3
|
import { FacetValueChip } from '@/vdb/components/shared/facet-value-chip.js';
|
|
4
|
-
import { PermissionGuard } from '@/vdb/components/shared/permission-guard.js';
|
|
5
4
|
import { Badge } from '@/vdb/components/ui/badge.js';
|
|
6
5
|
import { Button } from '@/vdb/components/ui/button.js';
|
|
7
|
-
import {
|
|
6
|
+
import { ActionBarItem } from '@/vdb/framework/layout-engine/page-layout.js';
|
|
8
7
|
import { ListPage } from '@/vdb/framework/page/list-page.js';
|
|
9
8
|
import { Trans } from '@lingui/react/macro';
|
|
10
9
|
import { createFileRoute, Link } from '@tanstack/react-router';
|
|
@@ -122,16 +121,14 @@ function FacetListPage() {
|
|
|
122
121
|
]}
|
|
123
122
|
route={Route}
|
|
124
123
|
>
|
|
125
|
-
<
|
|
126
|
-
<
|
|
127
|
-
<
|
|
128
|
-
<
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
</PermissionGuard>
|
|
134
|
-
</PageActionBarRight>
|
|
124
|
+
<ActionBarItem itemId="create-button" requiresPermission={['CreateFacet', 'CreateCatalog']}>
|
|
125
|
+
<Button asChild>
|
|
126
|
+
<Link to="./new">
|
|
127
|
+
<PlusIcon className="mr-2 h-4 w-4" />
|
|
128
|
+
<Trans>New Facet</Trans>
|
|
129
|
+
</Link>
|
|
130
|
+
</Button>
|
|
131
|
+
</ActionBarItem>
|
|
135
132
|
</ListPage>
|
|
136
133
|
);
|
|
137
134
|
}
|
|
@@ -2,17 +2,16 @@ import { SlugInput } from '@/vdb/components/data-input/index.js';
|
|
|
2
2
|
import { PageBreadcrumb } from '@/vdb/components/layout/generated-breadcrumbs.js';
|
|
3
3
|
import { ErrorPage } from '@/vdb/components/shared/error-page.js';
|
|
4
4
|
import { FormFieldWrapper } from '@/vdb/components/shared/form-field-wrapper.js';
|
|
5
|
-
import { PermissionGuard } from '@/vdb/components/shared/permission-guard.js';
|
|
6
5
|
import { TranslatableFormFieldWrapper } from '@/vdb/components/shared/translatable-form-field.js';
|
|
7
6
|
import { Button } from '@/vdb/components/ui/button.js';
|
|
8
7
|
import { Input } from '@/vdb/components/ui/input.js';
|
|
9
8
|
import { NEW_ENTITY_PATH } from '@/vdb/constants.js';
|
|
10
9
|
import {
|
|
10
|
+
ActionBarItem,
|
|
11
11
|
CustomFieldsPageBlock,
|
|
12
12
|
DetailFormGrid,
|
|
13
13
|
Page,
|
|
14
14
|
PageActionBar,
|
|
15
|
-
PageActionBarRight,
|
|
16
15
|
PageBlock,
|
|
17
16
|
PageLayout,
|
|
18
17
|
PageTitle,
|
|
@@ -104,16 +103,14 @@ function FacetValueDetailPage() {
|
|
|
104
103
|
{creatingNewEntity ? <Trans>New facet value</Trans> : ((entity as any)?.name ?? '')}
|
|
105
104
|
</PageTitle>
|
|
106
105
|
<PageActionBar>
|
|
107
|
-
<
|
|
108
|
-
<
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
>
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
</PermissionGuard>
|
|
116
|
-
</PageActionBarRight>
|
|
106
|
+
<ActionBarItem itemId="save-button" requiresPermission={['UpdateProduct', 'UpdateCatalog']}>
|
|
107
|
+
<Button
|
|
108
|
+
type="submit"
|
|
109
|
+
disabled={!form.formState.isDirty || !form.formState.isValid || isPending}
|
|
110
|
+
>
|
|
111
|
+
{creatingNewEntity ? <Trans>Create</Trans> : <Trans>Update</Trans>}
|
|
112
|
+
</Button>
|
|
113
|
+
</ActionBarItem>
|
|
117
114
|
</PageActionBar>
|
|
118
115
|
<PageLayout>
|
|
119
116
|
{entity?.facet && (
|