@open-mercato/core 0.5.1-develop.2953.6647bb2c43 → 0.5.1-develop.2964.d5ac4a6ebb
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/helpers/integration/salesUi.js +25 -23
- package/dist/helpers/integration/salesUi.js.map +2 -2
- package/dist/modules/api_docs/frontend/docs/api/Explorer.js +24 -24
- package/dist/modules/api_docs/frontend/docs/api/Explorer.js.map +2 -2
- package/dist/modules/attachments/components/AttachmentPartitionSettings.js +15 -7
- package/dist/modules/attachments/components/AttachmentPartitionSettings.js.map +2 -2
- package/dist/modules/attachments/fields/attachment.js +4 -6
- package/dist/modules/attachments/fields/attachment.js.map +2 -2
- package/dist/modules/auth/backend/users/create/page.js +26 -26
- package/dist/modules/auth/backend/users/create/page.js.map +2 -2
- package/dist/modules/business_rules/components/ActionRow.js +36 -25
- package/dist/modules/business_rules/components/ActionRow.js.map +2 -2
- package/dist/modules/business_rules/components/ConditionGroup.js +14 -5
- package/dist/modules/business_rules/components/ConditionGroup.js.map +2 -2
- package/dist/modules/business_rules/components/ConditionRow.js +19 -10
- package/dist/modules/business_rules/components/ConditionRow.js.map +2 -2
- package/dist/modules/business_rules/components/RuleSetMembers.js +16 -10
- package/dist/modules/business_rules/components/RuleSetMembers.js.map +2 -2
- package/dist/modules/catalog/backend/catalog/products/[id]/page.js +30 -34
- package/dist/modules/catalog/backend/catalog/products/[id]/page.js.map +2 -2
- package/dist/modules/catalog/backend/catalog/products/create/page.js +220 -223
- package/dist/modules/catalog/backend/catalog/products/create/page.js.map +2 -2
- package/dist/modules/catalog/components/PriceKindSettings.js +20 -19
- package/dist/modules/catalog/components/PriceKindSettings.js.map +2 -2
- package/dist/modules/catalog/components/products/ProductUomSection.js +42 -37
- package/dist/modules/catalog/components/products/ProductUomSection.js.map +2 -2
- package/dist/modules/catalog/components/products/VariantBuilder.js +22 -18
- package/dist/modules/catalog/components/products/VariantBuilder.js.map +2 -2
- package/dist/modules/customer_accounts/backend/customer_accounts/users/[id]/page.js +18 -26
- package/dist/modules/customer_accounts/backend/customer_accounts/users/[id]/page.js.map +2 -2
- package/dist/modules/customer_accounts/backend/customer_accounts/users/page.js +4 -6
- package/dist/modules/customer_accounts/backend/customer_accounts/users/page.js.map +2 -2
- package/dist/modules/customer_accounts/widgets/injection/account-status/widget.client.js +5 -4
- package/dist/modules/customer_accounts/widgets/injection/account-status/widget.client.js.map +2 -2
- package/dist/modules/customers/backend/config/customers/pipeline-stages/page.js +19 -7
- package/dist/modules/customers/backend/config/customers/pipeline-stages/page.js.map +2 -2
- package/dist/modules/customers/backend/customers/deals/pipeline/page.js +24 -21
- package/dist/modules/customers/backend/customers/deals/pipeline/page.js.map +2 -2
- package/dist/modules/customers/components/AddressEditor.js +24 -7
- package/dist/modules/customers/components/AddressEditor.js.map +2 -2
- package/dist/modules/customers/components/AddressFormatSettings.js +35 -25
- package/dist/modules/customers/components/AddressFormatSettings.js.map +2 -2
- package/dist/modules/customers/components/detail/ActivityForm.js +20 -12
- package/dist/modules/customers/components/detail/ActivityForm.js.map +2 -2
- package/dist/modules/customers/components/detail/AnnualRevenueField.js +2 -2
- package/dist/modules/customers/components/detail/AnnualRevenueField.js.map +2 -2
- package/dist/modules/customers/components/detail/DealForm.js +19 -14
- package/dist/modules/customers/components/detail/DealForm.js.map +2 -2
- package/dist/modules/customers/components/formConfig.js +16 -12
- package/dist/modules/customers/components/formConfig.js.map +2 -2
- package/dist/modules/customers/widgets/dashboard/customer-todos/widget.client.js +3 -2
- package/dist/modules/customers/widgets/dashboard/customer-todos/widget.client.js.map +2 -2
- package/dist/modules/customers/widgets/dashboard/new-customers/widget.client.js +18 -10
- package/dist/modules/customers/widgets/dashboard/new-customers/widget.client.js.map +2 -2
- package/dist/modules/customers/widgets/dashboard/new-deals/widget.client.js +3 -2
- package/dist/modules/customers/widgets/dashboard/new-deals/widget.client.js.map +2 -2
- package/dist/modules/customers/widgets/dashboard/next-interactions/widget.client.js +3 -2
- package/dist/modules/customers/widgets/dashboard/next-interactions/widget.client.js.map +2 -2
- package/dist/modules/dashboards/components/WidgetVisibilityEditor.js +27 -28
- package/dist/modules/dashboards/components/WidgetVisibilityEditor.js.map +2 -2
- package/dist/modules/dashboards/widgets/dashboard/orders-by-status/widget.client.js +14 -6
- package/dist/modules/dashboards/widgets/dashboard/orders-by-status/widget.client.js.map +2 -2
- package/dist/modules/dashboards/widgets/dashboard/revenue-trend/widget.client.js +14 -6
- package/dist/modules/dashboards/widgets/dashboard/revenue-trend/widget.client.js.map +2 -2
- package/dist/modules/dashboards/widgets/dashboard/sales-by-region/widget.client.js +3 -2
- package/dist/modules/dashboards/widgets/dashboard/sales-by-region/widget.client.js.map +2 -2
- package/dist/modules/dashboards/widgets/dashboard/top-customers/widget.client.js +3 -2
- package/dist/modules/dashboards/widgets/dashboard/top-customers/widget.client.js.map +2 -2
- package/dist/modules/dashboards/widgets/dashboard/top-products/widget.client.js +17 -8
- package/dist/modules/dashboards/widgets/dashboard/top-products/widget.client.js.map +2 -2
- package/dist/modules/data_sync/backend/data-sync/page.js +40 -23
- package/dist/modules/data_sync/backend/data-sync/page.js.map +2 -2
- package/dist/modules/data_sync/components/IntegrationScheduleTab.js +15 -6
- package/dist/modules/data_sync/components/IntegrationScheduleTab.js.map +2 -2
- package/dist/modules/dictionaries/components/AppearanceSelector.js +4 -4
- package/dist/modules/dictionaries/components/AppearanceSelector.js.map +2 -2
- package/dist/modules/dictionaries/components/DictionaryEntriesEditor.js +4 -5
- package/dist/modules/dictionaries/components/DictionaryEntriesEditor.js.map +2 -2
- package/dist/modules/dictionaries/components/DictionaryEntrySelect.js +22 -14
- package/dist/modules/dictionaries/components/DictionaryEntrySelect.js.map +2 -2
- package/dist/modules/dictionaries/fields/dictionary.js +18 -13
- package/dist/modules/dictionaries/fields/dictionary.js.map +2 -2
- package/dist/modules/entities/components/EncryptionManager.js +23 -19
- package/dist/modules/entities/components/EncryptionManager.js.map +2 -2
- package/dist/modules/feature_toggles/components/formConfig.js +17 -9
- package/dist/modules/feature_toggles/components/formConfig.js.map +2 -2
- package/dist/modules/feature_toggles/components/overrideFormConfig.js +17 -9
- package/dist/modules/feature_toggles/components/overrideFormConfig.js.map +2 -2
- package/dist/modules/inbox_ops/backend/inbox-ops/settings/page.js +15 -8
- package/dist/modules/inbox_ops/backend/inbox-ops/settings/page.js.map +2 -2
- package/dist/modules/inbox_ops/components/proposals/EditActionDialog.js +37 -22
- package/dist/modules/inbox_ops/components/proposals/EditActionDialog.js.map +2 -2
- package/dist/modules/integrations/backend/integrations/[id]/page.js +22 -17
- package/dist/modules/integrations/backend/integrations/[id]/page.js.map +2 -2
- package/dist/modules/integrations/backend/integrations/bundle/[id]/page.js +12 -6
- package/dist/modules/integrations/backend/integrations/bundle/[id]/page.js.map +2 -2
- package/dist/modules/planner/components/AvailabilityRulesEditor.js +19 -12
- package/dist/modules/planner/components/AvailabilityRulesEditor.js.map +2 -2
- package/dist/modules/resources/components/ResourceCrudForm.js +15 -10
- package/dist/modules/resources/components/ResourceCrudForm.js.map +3 -3
- package/dist/modules/sales/backend/sales/documents/[id]/page.js +15 -18
- package/dist/modules/sales/backend/sales/documents/[id]/page.js.map +2 -2
- package/dist/modules/sales/components/ProviderFieldInput.js +23 -20
- package/dist/modules/sales/components/ProviderFieldInput.js.map +2 -2
- package/dist/modules/sales/components/ShippingMethodsSettings.js +25 -17
- package/dist/modules/sales/components/ShippingMethodsSettings.js.map +3 -3
- package/dist/modules/sales/components/channels/ChannelOfferForm.js +35 -42
- package/dist/modules/sales/components/channels/ChannelOfferForm.js.map +2 -2
- package/dist/modules/sales/components/documents/AddressesSection.js +87 -90
- package/dist/modules/sales/components/documents/AddressesSection.js.map +2 -2
- package/dist/modules/sales/components/documents/AdjustmentDialog.js +17 -6
- package/dist/modules/sales/components/documents/AdjustmentDialog.js.map +3 -3
- package/dist/modules/sales/components/documents/LineItemDialog.js +42 -25
- package/dist/modules/sales/components/documents/LineItemDialog.js.map +2 -2
- package/dist/modules/sales/components/documents/SalesDocumentForm.js +96 -87
- package/dist/modules/sales/components/documents/SalesDocumentForm.js.map +2 -2
- package/dist/modules/sales/widgets/dashboard/new-orders/widget.client.js +20 -11
- package/dist/modules/sales/widgets/dashboard/new-orders/widget.client.js.map +2 -2
- package/dist/modules/sales/widgets/dashboard/new-quotes/widget.client.js +20 -11
- package/dist/modules/sales/widgets/dashboard/new-quotes/widget.client.js.map +2 -2
- package/dist/modules/shipping_carriers/lib/shipment-wizard/components/ConfigureStep.js +36 -22
- package/dist/modules/shipping_carriers/lib/shipment-wizard/components/ConfigureStep.js.map +2 -2
- package/dist/modules/staff/components/TeamMemberForm.js +14 -9
- package/dist/modules/staff/components/TeamMemberForm.js.map +3 -3
- package/dist/modules/workflows/backend/tasks/[id]/page.js +42 -21
- package/dist/modules/workflows/backend/tasks/[id]/page.js.map +2 -2
- package/dist/modules/workflows/components/ActivitiesEditor.js +14 -6
- package/dist/modules/workflows/components/ActivitiesEditor.js.map +3 -3
- package/dist/modules/workflows/components/DefinitionTriggersEditor.js +25 -17
- package/dist/modules/workflows/components/DefinitionTriggersEditor.js.map +3 -3
- package/dist/modules/workflows/components/EdgeEditDialog.js +48 -45
- package/dist/modules/workflows/components/EdgeEditDialog.js.map +2 -2
- package/dist/modules/workflows/components/NodeEditDialog.js +90 -90
- package/dist/modules/workflows/components/NodeEditDialog.js.map +2 -2
- package/dist/modules/workflows/components/StepsEditor.js +14 -6
- package/dist/modules/workflows/components/StepsEditor.js.map +3 -3
- package/dist/modules/workflows/components/TransitionsEditor.js +31 -26
- package/dist/modules/workflows/components/TransitionsEditor.js.map +3 -3
- package/dist/modules/workflows/components/fields/ActivityArrayEditor.js +19 -11
- package/dist/modules/workflows/components/fields/ActivityArrayEditor.js.map +3 -3
- package/dist/modules/workflows/components/fields/BusinessRuleConditionsEditor.js +12 -14
- package/dist/modules/workflows/components/fields/BusinessRuleConditionsEditor.js.map +2 -2
- package/dist/modules/workflows/components/fields/FormFieldArrayEditor.js +24 -16
- package/dist/modules/workflows/components/fields/FormFieldArrayEditor.js.map +3 -3
- package/dist/modules/workflows/components/fields/StartPreConditionsEditor.js +12 -13
- package/dist/modules/workflows/components/fields/StartPreConditionsEditor.js.map +2 -2
- package/dist/modules/workflows/components/mobile/MobileTaskForm.js +12 -8
- package/dist/modules/workflows/components/mobile/MobileTaskForm.js.map +2 -2
- package/dist/modules/workflows/frontend/checkout-demo/page.js +43 -46
- package/dist/modules/workflows/frontend/checkout-demo/page.js.map +2 -2
- package/package.json +3 -3
- package/src/helpers/integration/salesUi.ts +40 -30
- package/src/modules/api_docs/frontend/docs/api/Explorer.tsx +25 -19
- package/src/modules/attachments/components/AttachmentPartitionSettings.tsx +21 -11
- package/src/modules/attachments/fields/attachment.tsx +4 -6
- package/src/modules/auth/backend/users/create/page.tsx +16 -20
- package/src/modules/business_rules/components/ActionRow.tsx +51 -32
- package/src/modules/business_rules/components/ConditionGroup.tsx +20 -9
- package/src/modules/business_rules/components/ConditionRow.tsx +24 -15
- package/src/modules/business_rules/components/RuleSetMembers.tsx +23 -13
- package/src/modules/catalog/backend/catalog/products/[id]/page.tsx +47 -53
- package/src/modules/catalog/backend/catalog/products/create/page.tsx +84 -87
- package/src/modules/catalog/components/PriceKindSettings.tsx +9 -9
- package/src/modules/catalog/components/products/ProductUomSection.tsx +85 -83
- package/src/modules/catalog/components/products/VariantBuilder.tsx +49 -33
- package/src/modules/customer_accounts/backend/customer_accounts/users/[id]/page.tsx +12 -27
- package/src/modules/customer_accounts/backend/customer_accounts/users/page.tsx +4 -6
- package/src/modules/customer_accounts/widgets/injection/account-status/widget.client.tsx +5 -4
- package/src/modules/customers/backend/config/customers/pipeline-stages/page.tsx +28 -15
- package/src/modules/customers/backend/customers/deals/pipeline/page.tsx +37 -26
- package/src/modules/customers/components/AddressEditor.tsx +30 -16
- package/src/modules/customers/components/AddressFormatSettings.tsx +25 -19
- package/src/modules/customers/components/detail/ActivityForm.tsx +35 -23
- package/src/modules/customers/components/detail/AnnualRevenueField.tsx +2 -2
- package/src/modules/customers/components/detail/DealForm.tsx +33 -20
- package/src/modules/customers/components/formConfig.tsx +25 -17
- package/src/modules/customers/widgets/dashboard/customer-todos/widget.client.tsx +3 -2
- package/src/modules/customers/widgets/dashboard/new-customers/widget.client.tsx +21 -11
- package/src/modules/customers/widgets/dashboard/new-deals/widget.client.tsx +3 -2
- package/src/modules/customers/widgets/dashboard/next-interactions/widget.client.tsx +3 -2
- package/src/modules/dashboards/components/WidgetVisibilityEditor.tsx +17 -22
- package/src/modules/dashboards/widgets/dashboard/orders-by-status/widget.client.tsx +17 -7
- package/src/modules/dashboards/widgets/dashboard/revenue-trend/widget.client.tsx +20 -10
- package/src/modules/dashboards/widgets/dashboard/sales-by-region/widget.client.tsx +3 -2
- package/src/modules/dashboards/widgets/dashboard/top-customers/widget.client.tsx +3 -2
- package/src/modules/dashboards/widgets/dashboard/top-products/widget.client.tsx +20 -9
- package/src/modules/data_sync/backend/data-sync/page.tsx +64 -38
- package/src/modules/data_sync/components/IntegrationScheduleTab.tsx +18 -7
- package/src/modules/dictionaries/components/AppearanceSelector.tsx +4 -4
- package/src/modules/dictionaries/components/DictionaryEntriesEditor.tsx +3 -4
- package/src/modules/dictionaries/components/DictionaryEntrySelect.tsx +27 -21
- package/src/modules/dictionaries/fields/dictionary.tsx +36 -23
- package/src/modules/entities/components/EncryptionManager.tsx +49 -33
- package/src/modules/feature_toggles/components/formConfig.tsx +20 -10
- package/src/modules/feature_toggles/components/overrideFormConfig.tsx +20 -10
- package/src/modules/inbox_ops/backend/inbox-ops/settings/page.tsx +19 -10
- package/src/modules/inbox_ops/components/proposals/EditActionDialog.tsx +49 -26
- package/src/modules/integrations/backend/integrations/[id]/page.tsx +20 -11
- package/src/modules/integrations/backend/integrations/bundle/[id]/page.tsx +19 -9
- package/src/modules/planner/components/AvailabilityRulesEditor.tsx +34 -21
- package/src/modules/resources/components/ResourceCrudForm.tsx +24 -15
- package/src/modules/sales/backend/sales/documents/[id]/page.tsx +12 -15
- package/src/modules/sales/components/ProviderFieldInput.tsx +26 -17
- package/src/modules/sales/components/ShippingMethodsSettings.tsx +28 -20
- package/src/modules/sales/components/channels/ChannelOfferForm.tsx +51 -46
- package/src/modules/sales/components/documents/AddressesSection.tsx +78 -76
- package/src/modules/sales/components/documents/AdjustmentDialog.tsx +27 -15
- package/src/modules/sales/components/documents/LineItemDialog.tsx +69 -51
- package/src/modules/sales/components/documents/SalesDocumentForm.tsx +98 -87
- package/src/modules/sales/widgets/dashboard/new-orders/widget.client.tsx +23 -12
- package/src/modules/sales/widgets/dashboard/new-quotes/widget.client.tsx +23 -12
- package/src/modules/shipping_carriers/lib/shipment-wizard/components/ConfigureStep.tsx +35 -19
- package/src/modules/staff/components/TeamMemberForm.tsx +23 -14
- package/src/modules/workflows/backend/tasks/[id]/page.tsx +51 -23
- package/src/modules/workflows/components/ActivitiesEditor.tsx +20 -10
- package/src/modules/workflows/components/DefinitionTriggersEditor.tsx +28 -18
- package/src/modules/workflows/components/EdgeEditDialog.tsx +51 -40
- package/src/modules/workflows/components/NodeEditDialog.tsx +81 -77
- package/src/modules/workflows/components/StepsEditor.tsx +20 -10
- package/src/modules/workflows/components/TransitionsEditor.tsx +61 -44
- package/src/modules/workflows/components/fields/ActivityArrayEditor.tsx +22 -12
- package/src/modules/workflows/components/fields/BusinessRuleConditionsEditor.tsx +9 -13
- package/src/modules/workflows/components/fields/FormFieldArrayEditor.tsx +27 -17
- package/src/modules/workflows/components/fields/StartPreConditionsEditor.tsx +9 -12
- package/src/modules/workflows/components/mobile/MobileTaskForm.tsx +19 -11
- package/src/modules/workflows/frontend/checkout-demo/page.tsx +71 -60
|
@@ -5,6 +5,13 @@ import type { CrudCustomFieldRenderProps } from '@open-mercato/ui/backend/CrudFo
|
|
|
5
5
|
import { FieldRegistry } from '@open-mercato/ui/backend/fields/registry'
|
|
6
6
|
import { apiCall } from '@open-mercato/ui/backend/utils/apiCall'
|
|
7
7
|
import { useT } from '@open-mercato/shared/lib/i18n/context'
|
|
8
|
+
import {
|
|
9
|
+
Select,
|
|
10
|
+
SelectContent,
|
|
11
|
+
SelectItem,
|
|
12
|
+
SelectTrigger,
|
|
13
|
+
SelectValue,
|
|
14
|
+
} from '@open-mercato/ui/primitives/select'
|
|
8
15
|
import { DictionarySelectControl } from '../components/DictionarySelectControl'
|
|
9
16
|
import { useDictionaryEntries } from '../components/hooks/useDictionaryEntries'
|
|
10
17
|
|
|
@@ -42,18 +49,21 @@ function DictionaryDefaultSelector({
|
|
|
42
49
|
<label className="text-xs font-medium text-muted-foreground">
|
|
43
50
|
{t('dictionaries.customFields.defaultValue', 'Default value')}
|
|
44
51
|
</label>
|
|
45
|
-
<
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
onChange={(event) => onChange(event.target.value)}
|
|
52
|
+
<Select
|
|
53
|
+
value={defaultValue || undefined}
|
|
54
|
+
onValueChange={(next) => onChange(next ?? '')}
|
|
49
55
|
>
|
|
50
|
-
<
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
56
|
+
<SelectTrigger size="sm">
|
|
57
|
+
<SelectValue placeholder={t('dictionaries.customFields.defaultValueNone', 'No default')} />
|
|
58
|
+
</SelectTrigger>
|
|
59
|
+
<SelectContent>
|
|
60
|
+
{entries.map((entry) => (
|
|
61
|
+
<SelectItem key={entry.value} value={entry.value}>
|
|
62
|
+
{entry.label}
|
|
63
|
+
</SelectItem>
|
|
64
|
+
))}
|
|
65
|
+
</SelectContent>
|
|
66
|
+
</Select>
|
|
57
67
|
{isLoading ? (
|
|
58
68
|
<p className="text-xs text-muted-foreground">
|
|
59
69
|
{t('dictionaries.customFields.loading', 'Loading dictionaries…')}
|
|
@@ -126,19 +136,22 @@ function DictionaryFieldDefEditor({ def, onChange }: { def: { configJson?: Dicti
|
|
|
126
136
|
<label className="text-xs font-medium text-muted-foreground">
|
|
127
137
|
{t('dictionaries.customFields.dictionaryLabel', 'Dictionary source')}
|
|
128
138
|
</label>
|
|
129
|
-
<
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
onChange={(event) => onChange({ dictionaryId: event.target.value || undefined })}
|
|
139
|
+
<Select
|
|
140
|
+
value={selectedId || undefined}
|
|
141
|
+
onValueChange={(next) => onChange({ dictionaryId: next || undefined })}
|
|
133
142
|
>
|
|
134
|
-
<
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
143
|
+
<SelectTrigger size="sm">
|
|
144
|
+
<SelectValue placeholder={t('dictionaries.customFields.dictionaryPlaceholder', 'Select a dictionary')} />
|
|
145
|
+
</SelectTrigger>
|
|
146
|
+
<SelectContent>
|
|
147
|
+
{items.map((item) => (
|
|
148
|
+
<SelectItem key={item.id} value={item.id}>
|
|
149
|
+
{item.name}
|
|
150
|
+
{item.isActive ? '' : ` (${t('dictionaries.customFields.inactive', 'inactive')})`}
|
|
151
|
+
</SelectItem>
|
|
152
|
+
))}
|
|
153
|
+
</SelectContent>
|
|
154
|
+
</Select>
|
|
142
155
|
{loading ? (
|
|
143
156
|
<p className="text-xs text-muted-foreground">
|
|
144
157
|
{t('dictionaries.customFields.loading', 'Loading dictionaries…')}
|
|
@@ -3,6 +3,13 @@
|
|
|
3
3
|
import * as React from 'react'
|
|
4
4
|
import { useQuery, useMutation } from '@tanstack/react-query'
|
|
5
5
|
import { Button } from '@open-mercato/ui/primitives/button'
|
|
6
|
+
import {
|
|
7
|
+
Select,
|
|
8
|
+
SelectContent,
|
|
9
|
+
SelectItem,
|
|
10
|
+
SelectTrigger,
|
|
11
|
+
SelectValue,
|
|
12
|
+
} from '@open-mercato/ui/primitives/select'
|
|
6
13
|
import { LoadingMessage, ErrorMessage } from '@open-mercato/ui/backend/detail'
|
|
7
14
|
import { flash } from '@open-mercato/ui/backend/FlashMessages'
|
|
8
15
|
import { apiCall, readApiResultOrThrow } from '@open-mercato/ui/backend/utils/apiCall'
|
|
@@ -303,32 +310,38 @@ export function EncryptionManager() {
|
|
|
303
310
|
return (
|
|
304
311
|
<tr key={row.id} className="border-t">
|
|
305
312
|
<td className="px-3 py-2 align-top">
|
|
306
|
-
<
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
onChange={(event) => updateField(row.id, { field: event.target.value })}
|
|
313
|
+
<Select
|
|
314
|
+
value={row.field || undefined}
|
|
315
|
+
onValueChange={(value) => updateField(row.id, { field: value ?? '' })}
|
|
310
316
|
>
|
|
311
|
-
<
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
317
|
+
<SelectTrigger>
|
|
318
|
+
<SelectValue placeholder={t('entities.encryption.fields.selectField', 'Select field')} />
|
|
319
|
+
</SelectTrigger>
|
|
320
|
+
<SelectContent>
|
|
321
|
+
{fieldOpts.map((option) => (
|
|
322
|
+
<SelectItem key={option.value} value={option.value}>
|
|
323
|
+
{option.label}
|
|
324
|
+
</SelectItem>
|
|
325
|
+
))}
|
|
326
|
+
</SelectContent>
|
|
327
|
+
</Select>
|
|
318
328
|
</td>
|
|
319
329
|
<td className="px-3 py-2 align-top">
|
|
320
|
-
<
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
onChange={(event) => updateField(row.id, { hashField: event.target.value ? event.target.value : null })}
|
|
330
|
+
<Select
|
|
331
|
+
value={row.hashField || undefined}
|
|
332
|
+
onValueChange={(value) => updateField(row.id, { hashField: value || null })}
|
|
324
333
|
>
|
|
325
|
-
<
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
334
|
+
<SelectTrigger>
|
|
335
|
+
<SelectValue placeholder={t('entities.encryption.fields.selectHash', 'Select hash field (optional)')} />
|
|
336
|
+
</SelectTrigger>
|
|
337
|
+
<SelectContent>
|
|
338
|
+
{hashOpts.map((option) => (
|
|
339
|
+
<SelectItem key={option.value} value={option.value}>
|
|
340
|
+
{option.label}
|
|
341
|
+
</SelectItem>
|
|
342
|
+
))}
|
|
343
|
+
</SelectContent>
|
|
344
|
+
</Select>
|
|
332
345
|
<p className="mt-1 text-overline text-muted-foreground">
|
|
333
346
|
{t('entities.encryption.fields.hashHint', 'Use when lookups must stay deterministic (e.g., login by email).')}
|
|
334
347
|
</p>
|
|
@@ -368,19 +381,22 @@ export function EncryptionManager() {
|
|
|
368
381
|
<label className="text-xs text-muted-foreground">
|
|
369
382
|
{t('entities.encryption.selectEntity', 'Choose entity')}
|
|
370
383
|
</label>
|
|
371
|
-
<
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
onChange={(event) => setSelectedEntityId(event.target.value)}
|
|
384
|
+
<Select
|
|
385
|
+
value={selectedEntityId || undefined}
|
|
386
|
+
onValueChange={(value) => setSelectedEntityId(value ?? '')}
|
|
375
387
|
disabled={loadingEntities || !!entitiesError}
|
|
376
388
|
>
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
389
|
+
<SelectTrigger className="mt-1">
|
|
390
|
+
<SelectValue placeholder={t('entities.encryption.placeholder', 'Select an entity')} />
|
|
391
|
+
</SelectTrigger>
|
|
392
|
+
<SelectContent>
|
|
393
|
+
{(entities?.items || []).map((item) => (
|
|
394
|
+
<SelectItem key={item.entityId} value={item.entityId}>
|
|
395
|
+
{item.label || item.entityId} {item.source === 'custom' ? `(${t('entities.encryption.source.custom', 'custom')})` : ''}
|
|
396
|
+
</SelectItem>
|
|
397
|
+
))}
|
|
398
|
+
</SelectContent>
|
|
399
|
+
</Select>
|
|
384
400
|
{entitiesError ? (
|
|
385
401
|
<p className="mt-1 text-xs text-red-600">
|
|
386
402
|
{t('entities.encryption.errors.loadEntities', 'Failed to load entities')}
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
import { CrudFormGroup, CrudCustomFieldRenderProps, CrudField } from "@open-mercato/ui/backend/CrudForm";
|
|
3
3
|
import { JsonBuilder } from "@open-mercato/ui/backend/JsonBuilder";
|
|
4
|
+
import { Input } from "@open-mercato/ui/primitives/input";
|
|
5
|
+
import {
|
|
6
|
+
Select,
|
|
7
|
+
SelectContent,
|
|
8
|
+
SelectItem,
|
|
9
|
+
SelectTrigger,
|
|
10
|
+
SelectValue,
|
|
11
|
+
} from "@open-mercato/ui/primitives/select";
|
|
4
12
|
import { useT } from '@open-mercato/shared/lib/i18n/context'
|
|
5
13
|
|
|
6
14
|
|
|
@@ -13,15 +21,19 @@ export function renderDefaultValueCreateComponent(props: CrudCustomFieldRenderPr
|
|
|
13
21
|
return (
|
|
14
22
|
<div>
|
|
15
23
|
<label className="block text-sm font-medium mb-2">{t('feature_toggles.form.fields.defaultValue.boolean.label', 'Default Value (Boolean)')}</label>
|
|
16
|
-
<
|
|
24
|
+
<Select
|
|
17
25
|
value={props.value as string || 'false'}
|
|
18
|
-
|
|
19
|
-
className="w-full h-9 rounded border px-2 text-sm"
|
|
26
|
+
onValueChange={(value) => props.setValue(value === 'true')}
|
|
20
27
|
disabled={props.disabled}
|
|
21
28
|
>
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
|
|
29
|
+
<SelectTrigger>
|
|
30
|
+
<SelectValue />
|
|
31
|
+
</SelectTrigger>
|
|
32
|
+
<SelectContent>
|
|
33
|
+
<SelectItem value="true">{t('feature_toggles.values.true', 'True')}</SelectItem>
|
|
34
|
+
<SelectItem value="false">{t('feature_toggles.values.false', 'False')}</SelectItem>
|
|
35
|
+
</SelectContent>
|
|
36
|
+
</Select>
|
|
25
37
|
</div>
|
|
26
38
|
);
|
|
27
39
|
|
|
@@ -29,12 +41,11 @@ export function renderDefaultValueCreateComponent(props: CrudCustomFieldRenderPr
|
|
|
29
41
|
return (
|
|
30
42
|
<div>
|
|
31
43
|
<label className="block text-sm font-medium mb-2">{t('feature_toggles.form.fields.defaultValue.string.label', 'Default Value (String)')}</label>
|
|
32
|
-
<
|
|
44
|
+
<Input
|
|
33
45
|
type="text"
|
|
34
46
|
value={props.value as string || ''}
|
|
35
47
|
onChange={(e) => props.setValue(e.target.value)}
|
|
36
48
|
placeholder={t('feature_toggles.form.fields.defaultValue.string.placeholder', 'Enter default string value')}
|
|
37
|
-
className="w-full h-9 rounded border px-2 text-sm"
|
|
38
49
|
disabled={props.disabled}
|
|
39
50
|
autoFocus={props.autoFocus}
|
|
40
51
|
/>
|
|
@@ -45,11 +56,10 @@ export function renderDefaultValueCreateComponent(props: CrudCustomFieldRenderPr
|
|
|
45
56
|
return (
|
|
46
57
|
<div>
|
|
47
58
|
<label className="block text-sm font-medium mb-2">{t('feature_toggles.form.fields.defaultValue.number.label', 'Default Value (Number)')}</label>
|
|
48
|
-
<
|
|
59
|
+
<Input
|
|
49
60
|
type="number"
|
|
50
61
|
value={props.value as number || 0}
|
|
51
62
|
onChange={(e) => props.setValue(Number(e.target.value) || 0)}
|
|
52
|
-
className="w-full h-9 rounded border px-2 text-sm"
|
|
53
63
|
disabled={props.disabled}
|
|
54
64
|
autoFocus={props.autoFocus}
|
|
55
65
|
/>
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
import { CrudFormGroup, CrudCustomFieldRenderProps, CrudField } from "@open-mercato/ui/backend/CrudForm";
|
|
3
3
|
import { JsonBuilder } from "@open-mercato/ui/backend/JsonBuilder";
|
|
4
|
+
import { Input } from "@open-mercato/ui/primitives/input";
|
|
5
|
+
import {
|
|
6
|
+
Select,
|
|
7
|
+
SelectContent,
|
|
8
|
+
SelectItem,
|
|
9
|
+
SelectTrigger,
|
|
10
|
+
SelectValue,
|
|
11
|
+
} from "@open-mercato/ui/primitives/select";
|
|
4
12
|
import { useT } from '@open-mercato/shared/lib/i18n/context'
|
|
5
13
|
|
|
6
14
|
export function renderOverrideValueComponent(props: CrudCustomFieldRenderProps) {
|
|
@@ -21,15 +29,19 @@ export function renderOverrideValueComponent(props: CrudCustomFieldRenderProps)
|
|
|
21
29
|
return (
|
|
22
30
|
<div>
|
|
23
31
|
<label className="block text-sm font-medium mb-2">{t('feature_toggles.override.fields.value.boolean.label', 'Override Value (Boolean)')}</label>
|
|
24
|
-
<
|
|
32
|
+
<Select
|
|
25
33
|
value={props.value as string || 'false'}
|
|
26
|
-
|
|
27
|
-
className="w-full h-9 rounded border px-2 text-sm"
|
|
34
|
+
onValueChange={(value) => props.setValue(value === 'true')}
|
|
28
35
|
disabled={props.disabled}
|
|
29
36
|
>
|
|
30
|
-
<
|
|
31
|
-
|
|
32
|
-
|
|
37
|
+
<SelectTrigger>
|
|
38
|
+
<SelectValue />
|
|
39
|
+
</SelectTrigger>
|
|
40
|
+
<SelectContent>
|
|
41
|
+
<SelectItem value="true">{t('feature_toggles.values.true', 'True')}</SelectItem>
|
|
42
|
+
<SelectItem value="false">{t('feature_toggles.values.false', 'False')}</SelectItem>
|
|
43
|
+
</SelectContent>
|
|
44
|
+
</Select>
|
|
33
45
|
</div>
|
|
34
46
|
);
|
|
35
47
|
|
|
@@ -37,12 +49,11 @@ export function renderOverrideValueComponent(props: CrudCustomFieldRenderProps)
|
|
|
37
49
|
return (
|
|
38
50
|
<div>
|
|
39
51
|
<label className="block text-sm font-medium mb-2">{t('feature_toggles.override.fields.value.string.label', 'Override Value (String)')}</label>
|
|
40
|
-
<
|
|
52
|
+
<Input
|
|
41
53
|
type="text"
|
|
42
54
|
value={props.value as string || ''}
|
|
43
55
|
onChange={(e) => props.setValue(e.target.value)}
|
|
44
56
|
placeholder={t('feature_toggles.override.fields.value.string.placeholder', 'Enter override string value')}
|
|
45
|
-
className="w-full h-9 rounded border px-2 text-sm"
|
|
46
57
|
disabled={props.disabled}
|
|
47
58
|
autoFocus={props.autoFocus}
|
|
48
59
|
/>
|
|
@@ -53,11 +64,10 @@ export function renderOverrideValueComponent(props: CrudCustomFieldRenderProps)
|
|
|
53
64
|
return (
|
|
54
65
|
<div>
|
|
55
66
|
<label className="block text-sm font-medium mb-2">{t('feature_toggles.override.fields.value.number.label', 'Override Value (Number)')}</label>
|
|
56
|
-
<
|
|
67
|
+
<Input
|
|
57
68
|
type="number"
|
|
58
69
|
value={props.value as number || 0}
|
|
59
70
|
onChange={(e) => props.setValue(Number(e.target.value) || 0)}
|
|
60
|
-
className="w-full h-9 rounded border px-2 text-sm"
|
|
61
71
|
disabled={props.disabled}
|
|
62
72
|
autoFocus={props.autoFocus}
|
|
63
73
|
/>
|
|
@@ -4,6 +4,13 @@ import * as React from 'react'
|
|
|
4
4
|
import Link from 'next/link'
|
|
5
5
|
import { Page, PageBody } from '@open-mercato/ui/backend/Page'
|
|
6
6
|
import { Button } from '@open-mercato/ui/primitives/button'
|
|
7
|
+
import {
|
|
8
|
+
Select,
|
|
9
|
+
SelectContent,
|
|
10
|
+
SelectItem,
|
|
11
|
+
SelectTrigger,
|
|
12
|
+
SelectValue,
|
|
13
|
+
} from '@open-mercato/ui/primitives/select'
|
|
7
14
|
import { apiCall } from '@open-mercato/ui/backend/utils/apiCall'
|
|
8
15
|
import { flash } from '@open-mercato/ui/backend/FlashMessages'
|
|
9
16
|
import { LoadingMessage, ErrorMessage } from '@open-mercato/ui/backend/detail'
|
|
@@ -61,8 +68,7 @@ export default function InboxSettingsPage() {
|
|
|
61
68
|
}
|
|
62
69
|
}, [settings])
|
|
63
70
|
|
|
64
|
-
const handleLanguageChange = React.useCallback(async (
|
|
65
|
-
const workingLanguage = event.target.value
|
|
71
|
+
const handleLanguageChange = React.useCallback(async (workingLanguage: string) => {
|
|
66
72
|
setIsSavingLanguage(true)
|
|
67
73
|
const result = await runMutation({
|
|
68
74
|
operation: () => apiCall<{ ok: boolean; settings: { workingLanguage: string } }>('/api/inbox_ops/settings', {
|
|
@@ -133,17 +139,20 @@ export default function InboxSettingsPage() {
|
|
|
133
139
|
<p className="text-xs text-muted-foreground mt-1">
|
|
134
140
|
{t('inbox_ops.settings.working_language_hint', 'AI summaries and action descriptions will be generated in this language')}
|
|
135
141
|
</p>
|
|
136
|
-
<
|
|
137
|
-
id="working-language"
|
|
138
|
-
className="mt-2 block w-full sm:w-[200px] h-11 md:h-9 rounded-md border border-input bg-background px-3 text-sm"
|
|
142
|
+
<Select
|
|
139
143
|
value={settings.workingLanguage || 'en'}
|
|
140
|
-
|
|
144
|
+
onValueChange={(value) => handleLanguageChange(value)}
|
|
141
145
|
disabled={isSavingLanguage}
|
|
142
146
|
>
|
|
143
|
-
|
|
144
|
-
<
|
|
145
|
-
|
|
146
|
-
|
|
147
|
+
<SelectTrigger id="working-language" className="mt-2 sm:w-[200px]">
|
|
148
|
+
<SelectValue />
|
|
149
|
+
</SelectTrigger>
|
|
150
|
+
<SelectContent>
|
|
151
|
+
{languageOptions.map((opt) => (
|
|
152
|
+
<SelectItem key={opt.value} value={opt.value}>{opt.label}</SelectItem>
|
|
153
|
+
))}
|
|
154
|
+
</SelectContent>
|
|
155
|
+
</Select>
|
|
147
156
|
</div>
|
|
148
157
|
</div>
|
|
149
158
|
) : (
|
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
import * as React from 'react'
|
|
4
4
|
import { Button } from '@open-mercato/ui/primitives/button'
|
|
5
|
+
import {
|
|
6
|
+
Select,
|
|
7
|
+
SelectContent,
|
|
8
|
+
SelectItem,
|
|
9
|
+
SelectTrigger,
|
|
10
|
+
SelectValue,
|
|
11
|
+
} from '@open-mercato/ui/primitives/select'
|
|
5
12
|
import { apiCall } from '@open-mercato/ui/backend/utils/apiCall'
|
|
6
13
|
import { useGuardedMutation } from '@open-mercato/ui/backend/injection/useGuardedMutation'
|
|
7
14
|
import { flash } from '@open-mercato/ui/backend/FlashMessages'
|
|
@@ -130,14 +137,18 @@ function ContactPayloadEditor({
|
|
|
130
137
|
)}
|
|
131
138
|
<div>
|
|
132
139
|
<Label>{t('inbox_ops.edit_dialog.type', 'Type')}</Label>
|
|
133
|
-
<
|
|
134
|
-
className="flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm"
|
|
140
|
+
<Select
|
|
135
141
|
value={type}
|
|
136
|
-
|
|
142
|
+
onValueChange={(value) => updateField('type', value)}
|
|
137
143
|
>
|
|
138
|
-
<
|
|
139
|
-
|
|
140
|
-
|
|
144
|
+
<SelectTrigger>
|
|
145
|
+
<SelectValue />
|
|
146
|
+
</SelectTrigger>
|
|
147
|
+
<SelectContent>
|
|
148
|
+
<SelectItem value="person">{t('inbox_ops.contact_type.person', 'Person')}</SelectItem>
|
|
149
|
+
<SelectItem value="company">{t('inbox_ops.contact_type.company', 'Company')}</SelectItem>
|
|
150
|
+
</SelectContent>
|
|
151
|
+
</Select>
|
|
141
152
|
</div>
|
|
142
153
|
</div>
|
|
143
154
|
<div className="grid grid-cols-2 gap-3">
|
|
@@ -187,14 +198,18 @@ function LinkContactPayloadEditor({
|
|
|
187
198
|
<div className="grid grid-cols-2 gap-3">
|
|
188
199
|
<div>
|
|
189
200
|
<Label>{t('inbox_ops.edit_dialog.contact_type', 'Contact Type')}</Label>
|
|
190
|
-
<
|
|
191
|
-
className="flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm"
|
|
201
|
+
<Select
|
|
192
202
|
value={(payload.contactType as string) || 'person'}
|
|
193
|
-
|
|
203
|
+
onValueChange={(value) => updateField('contactType', value)}
|
|
194
204
|
>
|
|
195
|
-
<
|
|
196
|
-
|
|
197
|
-
|
|
205
|
+
<SelectTrigger>
|
|
206
|
+
<SelectValue />
|
|
207
|
+
</SelectTrigger>
|
|
208
|
+
<SelectContent>
|
|
209
|
+
<SelectItem value="person">{t('inbox_ops.contact_type.person', 'Person')}</SelectItem>
|
|
210
|
+
<SelectItem value="company">{t('inbox_ops.contact_type.company', 'Company')}</SelectItem>
|
|
211
|
+
</SelectContent>
|
|
212
|
+
</Select>
|
|
198
213
|
</div>
|
|
199
214
|
<div>
|
|
200
215
|
<Label>{t('inbox_ops.edit_dialog.contact_name', 'Contact Name')}</Label>
|
|
@@ -366,28 +381,36 @@ function LogActivityPayloadEditor({
|
|
|
366
381
|
</div>
|
|
367
382
|
<div>
|
|
368
383
|
<Label>{t('inbox_ops.edit_dialog.contact_type', 'Contact Type')}</Label>
|
|
369
|
-
<
|
|
370
|
-
className="flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm"
|
|
384
|
+
<Select
|
|
371
385
|
value={(payload.contactType as string) || 'person'}
|
|
372
|
-
|
|
386
|
+
onValueChange={(value) => updateField('contactType', value)}
|
|
373
387
|
>
|
|
374
|
-
<
|
|
375
|
-
|
|
376
|
-
|
|
388
|
+
<SelectTrigger>
|
|
389
|
+
<SelectValue />
|
|
390
|
+
</SelectTrigger>
|
|
391
|
+
<SelectContent>
|
|
392
|
+
<SelectItem value="person">{t('inbox_ops.contact_type.person', 'Person')}</SelectItem>
|
|
393
|
+
<SelectItem value="company">{t('inbox_ops.contact_type.company', 'Company')}</SelectItem>
|
|
394
|
+
</SelectContent>
|
|
395
|
+
</Select>
|
|
377
396
|
</div>
|
|
378
397
|
</div>
|
|
379
398
|
<div>
|
|
380
399
|
<Label>{t('inbox_ops.edit_dialog.activity_type', 'Activity Type')}</Label>
|
|
381
|
-
<
|
|
382
|
-
className="flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm"
|
|
400
|
+
<Select
|
|
383
401
|
value={(payload.activityType as string) || 'email'}
|
|
384
|
-
|
|
402
|
+
onValueChange={(value) => updateField('activityType', value)}
|
|
385
403
|
>
|
|
386
|
-
<
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
<
|
|
390
|
-
|
|
404
|
+
<SelectTrigger>
|
|
405
|
+
<SelectValue />
|
|
406
|
+
</SelectTrigger>
|
|
407
|
+
<SelectContent>
|
|
408
|
+
<SelectItem value="email">{t('inbox_ops.activity_type.email', 'Email')}</SelectItem>
|
|
409
|
+
<SelectItem value="call">{t('inbox_ops.activity_type.call', 'Call')}</SelectItem>
|
|
410
|
+
<SelectItem value="meeting">{t('inbox_ops.activity_type.meeting', 'Meeting')}</SelectItem>
|
|
411
|
+
<SelectItem value="note">{t('inbox_ops.activity_type.note', 'Note')}</SelectItem>
|
|
412
|
+
</SelectContent>
|
|
413
|
+
</Select>
|
|
391
414
|
</div>
|
|
392
415
|
<div>
|
|
393
416
|
<Label>{t('inbox_ops.edit_dialog.subject', 'Subject')}</Label>
|
|
@@ -11,6 +11,13 @@ import { FormHeader } from '@open-mercato/ui/backend/forms'
|
|
|
11
11
|
import { Card, CardHeader, CardTitle, CardContent } from '@open-mercato/ui/primitives/card'
|
|
12
12
|
import { Badge } from '@open-mercato/ui/primitives/badge'
|
|
13
13
|
import { Button } from '@open-mercato/ui/primitives/button'
|
|
14
|
+
import {
|
|
15
|
+
Select,
|
|
16
|
+
SelectContent,
|
|
17
|
+
SelectItem,
|
|
18
|
+
SelectTrigger,
|
|
19
|
+
SelectValue,
|
|
20
|
+
} from '@open-mercato/ui/primitives/select'
|
|
14
21
|
import { Switch } from '@open-mercato/ui/primitives/switch'
|
|
15
22
|
import { Input } from '@open-mercato/ui/primitives/input'
|
|
16
23
|
import { Spinner } from '@open-mercato/ui/primitives/spinner'
|
|
@@ -1185,18 +1192,20 @@ export default function IntegrationDetailPage({ params }: IntegrationDetailPageP
|
|
|
1185
1192
|
{showLogsTab ? (
|
|
1186
1193
|
<TabsContent value="logs" className="mt-0 space-y-4">
|
|
1187
1194
|
<div className="flex items-center gap-3">
|
|
1188
|
-
<div className="
|
|
1189
|
-
<
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
onChange={(event) => setLogLevel(event.target.value)}
|
|
1195
|
+
<div className="inline-flex">
|
|
1196
|
+
<Select
|
|
1197
|
+
value={logLevel || undefined}
|
|
1198
|
+
onValueChange={(value) => setLogLevel(value ?? '')}
|
|
1193
1199
|
>
|
|
1194
|
-
<
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
<
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
+
<SelectTrigger size="lg" className="min-w-40">
|
|
1201
|
+
<SelectValue placeholder={t('integrations.detail.logs.level.all')} />
|
|
1202
|
+
</SelectTrigger>
|
|
1203
|
+
<SelectContent>
|
|
1204
|
+
<SelectItem value="info">{t('integrations.detail.logs.level.info')}</SelectItem>
|
|
1205
|
+
<SelectItem value="warn">{t('integrations.detail.logs.level.warn')}</SelectItem>
|
|
1206
|
+
<SelectItem value="error">{t('integrations.detail.logs.level.error')}</SelectItem>
|
|
1207
|
+
</SelectContent>
|
|
1208
|
+
</Select>
|
|
1200
1209
|
</div>
|
|
1201
1210
|
</div>
|
|
1202
1211
|
{isLoadingLogs ? (
|
|
@@ -8,6 +8,13 @@ import { Badge } from '@open-mercato/ui/primitives/badge'
|
|
|
8
8
|
import { Button } from '@open-mercato/ui/primitives/button'
|
|
9
9
|
import { Switch } from '@open-mercato/ui/primitives/switch'
|
|
10
10
|
import { Input } from '@open-mercato/ui/primitives/input'
|
|
11
|
+
import {
|
|
12
|
+
Select,
|
|
13
|
+
SelectContent,
|
|
14
|
+
SelectItem,
|
|
15
|
+
SelectTrigger,
|
|
16
|
+
SelectValue,
|
|
17
|
+
} from '@open-mercato/ui/primitives/select'
|
|
11
18
|
import { Spinner } from '@open-mercato/ui/primitives/spinner'
|
|
12
19
|
import { apiCall } from '@open-mercato/ui/backend/utils/apiCall'
|
|
13
20
|
import { flash } from '@open-mercato/ui/backend/FlashMessages'
|
|
@@ -201,16 +208,19 @@ export default function BundleConfigPage({ params }: BundleConfigPageProps) {
|
|
|
201
208
|
{field.label}{field.required && <span className="text-red-500 ml-0.5">*</span>}
|
|
202
209
|
</label>
|
|
203
210
|
{field.type === 'select' && field.options ? (
|
|
204
|
-
<
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
onChange={(e) => setCredValues((prev) => ({ ...prev, [field.key]: e.target.value }))}
|
|
211
|
+
<Select
|
|
212
|
+
value={(credValues[field.key] as string) || undefined}
|
|
213
|
+
onValueChange={(value) => setCredValues((prev) => ({ ...prev, [field.key]: value ?? '' }))}
|
|
208
214
|
>
|
|
209
|
-
<
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
215
|
+
<SelectTrigger>
|
|
216
|
+
<SelectValue placeholder="—" />
|
|
217
|
+
</SelectTrigger>
|
|
218
|
+
<SelectContent>
|
|
219
|
+
{field.options.map((opt) => (
|
|
220
|
+
<SelectItem key={opt.value} value={opt.value}>{opt.label}</SelectItem>
|
|
221
|
+
))}
|
|
222
|
+
</SelectContent>
|
|
223
|
+
</Select>
|
|
214
224
|
) : field.type === 'boolean' ? (
|
|
215
225
|
<Switch
|
|
216
226
|
checked={Boolean(credValues[field.key])}
|