@open-mercato/core 0.5.1-develop.2953.6647bb2c43 → 0.5.1-develop.2954.610bab2d08
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
|
@@ -7,6 +7,13 @@ import { Button } from "@open-mercato/ui/primitives/button";
|
|
|
7
7
|
import { Checkbox } from "@open-mercato/ui/primitives/checkbox";
|
|
8
8
|
import { Input } from "@open-mercato/ui/primitives/input";
|
|
9
9
|
import { Label } from "@open-mercato/ui/primitives/label";
|
|
10
|
+
import {
|
|
11
|
+
Select,
|
|
12
|
+
SelectContent,
|
|
13
|
+
SelectItem,
|
|
14
|
+
SelectTrigger,
|
|
15
|
+
SelectValue,
|
|
16
|
+
} from "@open-mercato/ui/primitives/select";
|
|
10
17
|
import { Spinner } from "@open-mercato/ui/primitives/spinner";
|
|
11
18
|
import { ArrowDown, ArrowUp, Plus, Trash2 } from "lucide-react";
|
|
12
19
|
import type {
|
|
@@ -318,24 +325,22 @@ export function ProductUomSection({
|
|
|
318
325
|
<div className="grid gap-4 md:grid-cols-2">
|
|
319
326
|
<div className="space-y-2">
|
|
320
327
|
<Label htmlFor="catalog-product-uom-base-unit">{t("catalog.products.uom.baseUnit", "Base unit")}</Label>
|
|
321
|
-
<
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
value={defaultUnit}
|
|
325
|
-
onChange={(event) =>
|
|
326
|
-
setValue("defaultUnit", event.target.value || null)
|
|
327
|
-
}
|
|
328
|
+
<Select
|
|
329
|
+
value={defaultUnit || undefined}
|
|
330
|
+
onValueChange={(value) => setValue("defaultUnit", value || null)}
|
|
328
331
|
disabled={loadingUnits}
|
|
329
332
|
>
|
|
330
|
-
<
|
|
331
|
-
{t("catalog.products.uom.selectUnit", "Select unit")}
|
|
332
|
-
</
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
{option.
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
333
|
+
<SelectTrigger id="catalog-product-uom-base-unit">
|
|
334
|
+
<SelectValue placeholder={t("catalog.products.uom.selectUnit", "Select unit")} />
|
|
335
|
+
</SelectTrigger>
|
|
336
|
+
<SelectContent>
|
|
337
|
+
{unitOptions.map((option) => (
|
|
338
|
+
<SelectItem key={option.value} value={option.value}>
|
|
339
|
+
{option.label}
|
|
340
|
+
</SelectItem>
|
|
341
|
+
))}
|
|
342
|
+
</SelectContent>
|
|
343
|
+
</Select>
|
|
339
344
|
{errors.defaultUnit ? (
|
|
340
345
|
<p className="text-xs text-destructive">{errors.defaultUnit}</p>
|
|
341
346
|
) : null}
|
|
@@ -345,24 +350,22 @@ export function ProductUomSection({
|
|
|
345
350
|
<Label htmlFor="catalog-product-uom-sales-unit">
|
|
346
351
|
{t("catalog.products.uom.defaultSalesUnit", "Default sales unit")}
|
|
347
352
|
</Label>
|
|
348
|
-
<
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
value={defaultSalesUnit}
|
|
352
|
-
onChange={(event) =>
|
|
353
|
-
setValue("defaultSalesUnit", event.target.value || null)
|
|
354
|
-
}
|
|
353
|
+
<Select
|
|
354
|
+
value={defaultSalesUnit || undefined}
|
|
355
|
+
onValueChange={(value) => setValue("defaultSalesUnit", value || null)}
|
|
355
356
|
disabled={loadingUnits}
|
|
356
357
|
>
|
|
357
|
-
<
|
|
358
|
-
{t("catalog.products.uom.selectUnit", "Select unit")}
|
|
359
|
-
</
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
{option.
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
358
|
+
<SelectTrigger id="catalog-product-uom-sales-unit">
|
|
359
|
+
<SelectValue placeholder={t("catalog.products.uom.selectUnit", "Select unit")} />
|
|
360
|
+
</SelectTrigger>
|
|
361
|
+
<SelectContent>
|
|
362
|
+
{unitOptions.map((option) => (
|
|
363
|
+
<SelectItem key={option.value} value={option.value}>
|
|
364
|
+
{option.label}
|
|
365
|
+
</SelectItem>
|
|
366
|
+
))}
|
|
367
|
+
</SelectContent>
|
|
368
|
+
</Select>
|
|
366
369
|
{errors.defaultSalesUnit ? (
|
|
367
370
|
<p className="text-xs text-destructive">{errors.defaultSalesUnit}</p>
|
|
368
371
|
) : null}
|
|
@@ -432,24 +435,25 @@ export function ProductUomSection({
|
|
|
432
435
|
<Label htmlFor="catalog-product-uom-rounding-mode">
|
|
433
436
|
{t("catalog.products.uom.roundingMode", "Rounding mode")}
|
|
434
437
|
</Label>
|
|
435
|
-
<
|
|
436
|
-
id="catalog-product-uom-rounding-mode"
|
|
437
|
-
className="w-full rounded-md border border-input bg-background px-3 py-2 text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"
|
|
438
|
+
<Select
|
|
438
439
|
value={values.uomRoundingMode ?? "half_up"}
|
|
439
|
-
|
|
440
|
-
setValue("uomRoundingMode", event.target.value)
|
|
441
|
-
}
|
|
440
|
+
onValueChange={(value) => setValue("uomRoundingMode", value)}
|
|
442
441
|
>
|
|
443
|
-
<
|
|
444
|
-
|
|
445
|
-
</
|
|
446
|
-
<
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
442
|
+
<SelectTrigger id="catalog-product-uom-rounding-mode">
|
|
443
|
+
<SelectValue />
|
|
444
|
+
</SelectTrigger>
|
|
445
|
+
<SelectContent>
|
|
446
|
+
<SelectItem value="half_up">
|
|
447
|
+
{t("catalog.products.uom.roundingModeHalfUp", "Half up (default)")}
|
|
448
|
+
</SelectItem>
|
|
449
|
+
<SelectItem value="down">
|
|
450
|
+
{t("catalog.products.uom.roundingModeDown", "Round down")}
|
|
451
|
+
</SelectItem>
|
|
452
|
+
<SelectItem value="up">
|
|
453
|
+
{t("catalog.products.uom.roundingModeUp", "Round up")}
|
|
454
|
+
</SelectItem>
|
|
455
|
+
</SelectContent>
|
|
456
|
+
</Select>
|
|
453
457
|
</div>
|
|
454
458
|
<div className="space-y-2">
|
|
455
459
|
<Label htmlFor="catalog-product-uom-rounding-scale">
|
|
@@ -498,26 +502,26 @@ export function ProductUomSection({
|
|
|
498
502
|
"Reference unit",
|
|
499
503
|
)}
|
|
500
504
|
</Label>
|
|
501
|
-
<
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
value={unitPriceReferenceUnit}
|
|
505
|
-
onChange={(event) =>
|
|
506
|
-
setValue("unitPriceReferenceUnit", event.target.value || null)
|
|
507
|
-
}
|
|
505
|
+
<Select
|
|
506
|
+
value={unitPriceReferenceUnit || undefined}
|
|
507
|
+
onValueChange={(value) => setValue("unitPriceReferenceUnit", value || null)}
|
|
508
508
|
>
|
|
509
|
-
<
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
509
|
+
<SelectTrigger id="catalog-product-uom-reference-unit">
|
|
510
|
+
<SelectValue
|
|
511
|
+
placeholder={t(
|
|
512
|
+
"catalog.products.unitPrice.selectReferenceUnit",
|
|
513
|
+
"Select reference unit",
|
|
514
|
+
)}
|
|
515
|
+
/>
|
|
516
|
+
</SelectTrigger>
|
|
517
|
+
<SelectContent>
|
|
518
|
+
{REFERENCE_UNIT_OPTIONS.map((option) => (
|
|
519
|
+
<SelectItem key={option.value} value={option.value}>
|
|
520
|
+
{t(option.i18nKey, option.fallback)}
|
|
521
|
+
</SelectItem>
|
|
522
|
+
))}
|
|
523
|
+
</SelectContent>
|
|
524
|
+
</Select>
|
|
521
525
|
</div>
|
|
522
526
|
<div className="space-y-2">
|
|
523
527
|
<Label htmlFor="catalog-product-uom-unit-price-base-quantity">
|
|
@@ -613,24 +617,22 @@ export function ProductUomSection({
|
|
|
613
617
|
<Label htmlFor={`catalog-product-uom-conversion-unit-${index}`} className="text-xs text-muted-foreground">
|
|
614
618
|
{t("catalog.products.uom.conversionUnit", "Sales unit")}
|
|
615
619
|
</Label>
|
|
616
|
-
<
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
value={entry.unitCode}
|
|
620
|
-
onChange={(event) =>
|
|
621
|
-
updateConversion(index, { unitCode: event.target.value })
|
|
622
|
-
}
|
|
620
|
+
<Select
|
|
621
|
+
value={entry.unitCode || undefined}
|
|
622
|
+
onValueChange={(value) => updateConversion(index, { unitCode: value ?? '' })}
|
|
623
623
|
disabled={loadingUnits}
|
|
624
624
|
>
|
|
625
|
-
<
|
|
626
|
-
{t("catalog.products.uom.selectUnit", "Select unit")}
|
|
627
|
-
</
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
{option.
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
625
|
+
<SelectTrigger id={`catalog-product-uom-conversion-unit-${index}`}>
|
|
626
|
+
<SelectValue placeholder={t("catalog.products.uom.selectUnit", "Select unit")} />
|
|
627
|
+
</SelectTrigger>
|
|
628
|
+
<SelectContent>
|
|
629
|
+
{unitOptions.map((option) => (
|
|
630
|
+
<SelectItem key={option.value} value={option.value}>
|
|
631
|
+
{option.label}
|
|
632
|
+
</SelectItem>
|
|
633
|
+
))}
|
|
634
|
+
</SelectContent>
|
|
635
|
+
</Select>
|
|
634
636
|
</div>
|
|
635
637
|
|
|
636
638
|
<div className="space-y-1 md:col-span-3">
|
|
@@ -4,6 +4,13 @@ import * as React from 'react'
|
|
|
4
4
|
import { useT } from '@open-mercato/shared/lib/i18n/context'
|
|
5
5
|
import { Label } from '@open-mercato/ui/primitives/label'
|
|
6
6
|
import { Input } from '@open-mercato/ui/primitives/input'
|
|
7
|
+
import {
|
|
8
|
+
Select,
|
|
9
|
+
SelectContent,
|
|
10
|
+
SelectItem,
|
|
11
|
+
SelectTrigger,
|
|
12
|
+
SelectValue,
|
|
13
|
+
} from '@open-mercato/ui/primitives/select'
|
|
7
14
|
import { Switch } from '@open-mercato/ui/primitives/switch'
|
|
8
15
|
import { ProductMediaManager } from './ProductMediaManager'
|
|
9
16
|
import { MetadataEditor } from './MetadataEditor'
|
|
@@ -160,18 +167,21 @@ export function VariantOptionValuesSection({
|
|
|
160
167
|
{optionDefinitions.map((option) => (
|
|
161
168
|
<div key={option.code} className="space-y-2">
|
|
162
169
|
<Label className="text-xs uppercase text-muted-foreground">{option.label}</Label>
|
|
163
|
-
<
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
onChange={(event) => handleOptionChange(option.code, event.target.value)}
|
|
170
|
+
<Select
|
|
171
|
+
value={values.optionValues?.[option.code] || undefined}
|
|
172
|
+
onValueChange={(value) => handleOptionChange(option.code, value ?? '')}
|
|
167
173
|
>
|
|
168
|
-
<
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
174
|
+
<SelectTrigger>
|
|
175
|
+
<SelectValue placeholder={t('catalog.variants.form.optionPlaceholder', 'Select value')} />
|
|
176
|
+
</SelectTrigger>
|
|
177
|
+
<SelectContent>
|
|
178
|
+
{option.values.map((value) => (
|
|
179
|
+
<SelectItem key={value.id} value={value.label}>
|
|
180
|
+
{value.label}
|
|
181
|
+
</SelectItem>
|
|
182
|
+
))}
|
|
183
|
+
</SelectContent>
|
|
184
|
+
</Select>
|
|
175
185
|
</div>
|
|
176
186
|
))}
|
|
177
187
|
</div>
|
|
@@ -294,34 +304,40 @@ export function VariantPricesSection({
|
|
|
294
304
|
</p>
|
|
295
305
|
</div>
|
|
296
306
|
<div className="flex items-center gap-2">
|
|
297
|
-
<
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
onChange={(event) => setValue('taxRateId', event.target.value || null)}
|
|
307
|
+
<Select
|
|
308
|
+
value={values.taxRateId || undefined}
|
|
309
|
+
onValueChange={(value) => setValue('taxRateId', value || null)}
|
|
301
310
|
>
|
|
302
|
-
<
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
311
|
+
<SelectTrigger>
|
|
312
|
+
<SelectValue placeholder={t('catalog.variants.form.pricesTaxNone', 'No tax override')} />
|
|
313
|
+
</SelectTrigger>
|
|
314
|
+
<SelectContent>
|
|
315
|
+
{taxRates.map((rate) => (
|
|
316
|
+
<SelectItem key={rate.id} value={rate.id}>
|
|
317
|
+
{formatTaxRateLabel(rate)}
|
|
318
|
+
</SelectItem>
|
|
319
|
+
))}
|
|
320
|
+
</SelectContent>
|
|
321
|
+
</Select>
|
|
309
322
|
</div>
|
|
310
323
|
</div>
|
|
311
324
|
) : (
|
|
312
325
|
<div className="flex justify-end">
|
|
313
|
-
<
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
onChange={(event) => setValue('taxRateId', event.target.value || null)}
|
|
326
|
+
<Select
|
|
327
|
+
value={values.taxRateId || undefined}
|
|
328
|
+
onValueChange={(value) => setValue('taxRateId', value || null)}
|
|
317
329
|
>
|
|
318
|
-
<
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
330
|
+
<SelectTrigger>
|
|
331
|
+
<SelectValue placeholder={t('catalog.variants.form.pricesTaxNone', 'No tax override')} />
|
|
332
|
+
</SelectTrigger>
|
|
333
|
+
<SelectContent>
|
|
334
|
+
{taxRates.map((rate) => (
|
|
335
|
+
<SelectItem key={rate.id} value={rate.id}>
|
|
336
|
+
{formatTaxRateLabel(rate)}
|
|
337
|
+
</SelectItem>
|
|
338
|
+
))}
|
|
339
|
+
</SelectContent>
|
|
340
|
+
</Select>
|
|
325
341
|
</div>
|
|
326
342
|
)}
|
|
327
343
|
<div className="space-y-3">
|
|
@@ -6,7 +6,9 @@ import { useRouter } from 'next/navigation'
|
|
|
6
6
|
import { Page, PageBody } from '@open-mercato/ui/backend/Page'
|
|
7
7
|
import { FormHeader } from '@open-mercato/ui/backend/forms'
|
|
8
8
|
import { Button } from '@open-mercato/ui/primitives/button'
|
|
9
|
+
import { Input } from '@open-mercato/ui/primitives/input'
|
|
9
10
|
import { Spinner } from '@open-mercato/ui/primitives/spinner'
|
|
11
|
+
import { SwitchField } from '@open-mercato/ui/primitives/switch-field'
|
|
10
12
|
import { Dialog, DialogContent, DialogHeader, DialogTitle } from '@open-mercato/ui/primitives/dialog'
|
|
11
13
|
import { apiCall, readApiResultOrThrow } from '@open-mercato/ui/backend/utils/apiCall'
|
|
12
14
|
import { flash } from '@open-mercato/ui/backend/FlashMessages'
|
|
@@ -110,14 +112,13 @@ function ResetPasswordDialog({
|
|
|
110
112
|
<label className="text-sm font-medium" htmlFor="reset-password">
|
|
111
113
|
{t('customer_accounts.admin.detail.resetPassword.fields.newPassword', 'New Password')}
|
|
112
114
|
</label>
|
|
113
|
-
<
|
|
115
|
+
<Input
|
|
114
116
|
id="reset-password"
|
|
115
117
|
type="password"
|
|
116
118
|
required
|
|
117
119
|
minLength={8}
|
|
118
120
|
value={newPassword}
|
|
119
121
|
onChange={(event) => setNewPassword(event.target.value)}
|
|
120
|
-
className="flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"
|
|
121
122
|
placeholder={t('customer_accounts.admin.detail.resetPassword.fields.placeholder', 'Min. 8 characters')}
|
|
122
123
|
/>
|
|
123
124
|
</div>
|
|
@@ -571,12 +572,11 @@ export default function CustomerUserDetailPage({ params }: { params?: { id?: str
|
|
|
571
572
|
) : (
|
|
572
573
|
<div className="space-y-1">
|
|
573
574
|
<div className="relative">
|
|
574
|
-
<
|
|
575
|
+
<Input
|
|
575
576
|
type="text"
|
|
576
577
|
value={personSearchQuery}
|
|
577
578
|
onChange={(event) => { void handleSearchPeople(event.target.value) }}
|
|
578
579
|
placeholder={t('customer_accounts.admin.detail.fields.searchPerson', 'Search people by name...')}
|
|
579
|
-
className="flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"
|
|
580
580
|
/>
|
|
581
581
|
{personResults.length > 0 && (
|
|
582
582
|
<div className="absolute z-10 mt-1 w-full rounded-md border bg-background shadow-lg max-h-40 overflow-y-auto">
|
|
@@ -615,12 +615,11 @@ export default function CustomerUserDetailPage({ params }: { params?: { id?: str
|
|
|
615
615
|
) : (
|
|
616
616
|
<div className="space-y-1">
|
|
617
617
|
<div className="relative">
|
|
618
|
-
<
|
|
618
|
+
<Input
|
|
619
619
|
type="text"
|
|
620
620
|
value={companySearchQuery}
|
|
621
621
|
onChange={(event) => { void handleSearchCompanies(event.target.value) }}
|
|
622
622
|
placeholder={t('customer_accounts.admin.detail.fields.searchCompany', 'Search companies by name...')}
|
|
623
|
-
className="flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"
|
|
624
623
|
/>
|
|
625
624
|
{companyResults.length > 0 && (
|
|
626
625
|
<div className="absolute z-10 mt-1 w-full rounded-md border bg-background shadow-lg max-h-40 overflow-y-auto">
|
|
@@ -660,34 +659,20 @@ export default function CustomerUserDetailPage({ params }: { params?: { id?: str
|
|
|
660
659
|
<label className="text-sm font-medium" htmlFor="user-display-name">
|
|
661
660
|
{t('customer_accounts.admin.detail.fields.displayName', 'Display Name')}
|
|
662
661
|
</label>
|
|
663
|
-
<
|
|
662
|
+
<Input
|
|
664
663
|
id="user-display-name"
|
|
665
664
|
type="text"
|
|
666
665
|
value={editDisplayName}
|
|
667
666
|
onChange={(event) => setEditDisplayName(event.target.value)}
|
|
668
|
-
className="flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"
|
|
669
667
|
/>
|
|
670
668
|
</div>
|
|
671
669
|
|
|
672
|
-
<
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
type="button"
|
|
679
|
-
role="switch"
|
|
680
|
-
aria-checked={editActive ?? data.isActive}
|
|
681
|
-
onClick={() => setEditActive((prev) => !(prev ?? data.isActive))}
|
|
682
|
-
className={`relative inline-flex h-6 w-11 items-center rounded-full transition-colors ${
|
|
683
|
-
(editActive ?? data.isActive) ? 'bg-primary' : 'bg-muted'
|
|
684
|
-
}`}
|
|
685
|
-
>
|
|
686
|
-
<span className={`inline-block h-4 w-4 transform rounded-full bg-white transition-transform ${
|
|
687
|
-
(editActive ?? data.isActive) ? 'translate-x-6' : 'translate-x-1'
|
|
688
|
-
}`} />
|
|
689
|
-
</button>
|
|
690
|
-
</div>
|
|
670
|
+
<SwitchField
|
|
671
|
+
id="user-active-toggle"
|
|
672
|
+
label={t('customer_accounts.admin.detail.fields.isActive', 'Active')}
|
|
673
|
+
checked={editActive ?? data.isActive}
|
|
674
|
+
onCheckedChange={(next) => setEditActive(next)}
|
|
675
|
+
/>
|
|
691
676
|
</div>
|
|
692
677
|
|
|
693
678
|
<div className="space-y-2">
|
|
@@ -9,6 +9,7 @@ import { DataTable } from '@open-mercato/ui/backend/DataTable'
|
|
|
9
9
|
import type { ColumnDef } from '@tanstack/react-table'
|
|
10
10
|
import { RowActions } from '@open-mercato/ui/backend/RowActions'
|
|
11
11
|
import { Button } from '@open-mercato/ui/primitives/button'
|
|
12
|
+
import { Input } from '@open-mercato/ui/primitives/input'
|
|
12
13
|
import { Dialog, DialogContent, DialogHeader, DialogTitle } from '@open-mercato/ui/primitives/dialog'
|
|
13
14
|
import { apiCall, readApiResultOrThrow } from '@open-mercato/ui/backend/utils/apiCall'
|
|
14
15
|
import { flash } from '@open-mercato/ui/backend/FlashMessages'
|
|
@@ -143,13 +144,12 @@ function CreateUserDialog({
|
|
|
143
144
|
<label className="text-sm font-medium" htmlFor="create-email">
|
|
144
145
|
{t('customer_accounts.admin.createUser.fields.email', 'Email')}
|
|
145
146
|
</label>
|
|
146
|
-
<
|
|
147
|
+
<Input
|
|
147
148
|
id="create-email"
|
|
148
149
|
type="email"
|
|
149
150
|
required
|
|
150
151
|
value={email}
|
|
151
152
|
onChange={(event) => setEmail(event.target.value)}
|
|
152
|
-
className="flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"
|
|
153
153
|
placeholder={t('customer_accounts.admin.createUser.fields.emailPlaceholder', 'user@example.com')}
|
|
154
154
|
/>
|
|
155
155
|
</div>
|
|
@@ -157,13 +157,12 @@ function CreateUserDialog({
|
|
|
157
157
|
<label className="text-sm font-medium" htmlFor="create-name">
|
|
158
158
|
{t('customer_accounts.admin.createUser.fields.displayName', 'Display Name')}
|
|
159
159
|
</label>
|
|
160
|
-
<
|
|
160
|
+
<Input
|
|
161
161
|
id="create-name"
|
|
162
162
|
type="text"
|
|
163
163
|
required
|
|
164
164
|
value={displayName}
|
|
165
165
|
onChange={(event) => setDisplayName(event.target.value)}
|
|
166
|
-
className="flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"
|
|
167
166
|
placeholder={t('customer_accounts.admin.createUser.fields.displayNamePlaceholder', 'John Doe')}
|
|
168
167
|
/>
|
|
169
168
|
</div>
|
|
@@ -171,14 +170,13 @@ function CreateUserDialog({
|
|
|
171
170
|
<label className="text-sm font-medium" htmlFor="create-password">
|
|
172
171
|
{t('customer_accounts.admin.createUser.fields.password', 'Password')}
|
|
173
172
|
</label>
|
|
174
|
-
<
|
|
173
|
+
<Input
|
|
175
174
|
id="create-password"
|
|
176
175
|
type="password"
|
|
177
176
|
required
|
|
178
177
|
minLength={8}
|
|
179
178
|
value={password}
|
|
180
179
|
onChange={(event) => setPassword(event.target.value)}
|
|
181
|
-
className="flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"
|
|
182
180
|
placeholder={t('customer_accounts.admin.createUser.fields.passwordPlaceholder', 'Min. 8 characters')}
|
|
183
181
|
/>
|
|
184
182
|
</div>
|
|
@@ -5,6 +5,7 @@ import { useQuery, useQueryClient } from '@tanstack/react-query'
|
|
|
5
5
|
import { apiCall } from '@open-mercato/ui/backend/utils/apiCall'
|
|
6
6
|
import { useT } from '@open-mercato/shared/lib/i18n/context'
|
|
7
7
|
import { Button } from '@open-mercato/ui/primitives/button'
|
|
8
|
+
import { Input } from '@open-mercato/ui/primitives/input'
|
|
8
9
|
import { flash } from '@open-mercato/ui/backend/FlashMessages'
|
|
9
10
|
|
|
10
11
|
interface AccountStatusData {
|
|
@@ -167,12 +168,12 @@ function InviteForm({ personEntityId, onSuccess }: { personEntityId: string; onS
|
|
|
167
168
|
<label htmlFor="invite-email" className="block text-xs font-medium text-muted-foreground mb-1">
|
|
168
169
|
{t('common.email', 'Email')}
|
|
169
170
|
</label>
|
|
170
|
-
<
|
|
171
|
+
<Input
|
|
171
172
|
id="invite-email"
|
|
172
173
|
type="email"
|
|
174
|
+
size="sm"
|
|
173
175
|
value={email}
|
|
174
176
|
onChange={(event) => setEmail(event.target.value)}
|
|
175
|
-
className="w-full rounded-md border border-input bg-background px-2.5 py-1.5 text-sm shadow-sm focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"
|
|
176
177
|
required
|
|
177
178
|
disabled={isSubmitting}
|
|
178
179
|
/>
|
|
@@ -182,12 +183,12 @@ function InviteForm({ personEntityId, onSuccess }: { personEntityId: string; onS
|
|
|
182
183
|
<label htmlFor="invite-display-name" className="block text-xs font-medium text-muted-foreground mb-1">
|
|
183
184
|
{t('customer_accounts.widgets.invite.displayName', 'Display Name')}
|
|
184
185
|
</label>
|
|
185
|
-
<
|
|
186
|
+
<Input
|
|
186
187
|
id="invite-display-name"
|
|
187
188
|
type="text"
|
|
189
|
+
size="sm"
|
|
188
190
|
value={displayName}
|
|
189
191
|
onChange={(event) => setDisplayName(event.target.value)}
|
|
190
|
-
className="w-full rounded-md border border-input bg-background px-2.5 py-1.5 text-sm shadow-sm focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"
|
|
191
192
|
disabled={isSubmitting}
|
|
192
193
|
/>
|
|
193
194
|
</div>
|
|
@@ -8,6 +8,13 @@ import { flash } from '@open-mercato/ui/backend/FlashMessages'
|
|
|
8
8
|
import { Button } from '@open-mercato/ui/primitives/button'
|
|
9
9
|
import { Input } from '@open-mercato/ui/primitives/input'
|
|
10
10
|
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from '@open-mercato/ui/primitives/dialog'
|
|
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 { useConfirmDialog } from '@open-mercato/ui/backend/confirm-dialog'
|
|
13
20
|
import { AppearanceSelector, type AppearanceSelectorLabels } from '@open-mercato/core/modules/dictionaries/components/AppearanceSelector'
|
|
@@ -316,22 +323,28 @@ export default function PipelineStagesPage() {
|
|
|
316
323
|
) : (
|
|
317
324
|
<>
|
|
318
325
|
<div className="flex items-center gap-3">
|
|
319
|
-
<
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
326
|
+
<Select
|
|
327
|
+
value={selectedPipelineId || undefined}
|
|
328
|
+
onValueChange={(value) => setSelectedPipelineId(value || null)}
|
|
329
|
+
disabled={pipelines.length === 0}
|
|
323
330
|
>
|
|
324
|
-
|
|
325
|
-
<
|
|
326
|
-
{
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
331
|
+
<SelectTrigger className="w-full max-w-xs">
|
|
332
|
+
<SelectValue
|
|
333
|
+
placeholder={
|
|
334
|
+
pipelines.length === 0
|
|
335
|
+
? t('customers.config.pipelineStages.noPipelines', 'No pipelines yet')
|
|
336
|
+
: undefined
|
|
337
|
+
}
|
|
338
|
+
/>
|
|
339
|
+
</SelectTrigger>
|
|
340
|
+
<SelectContent>
|
|
341
|
+
{pipelines.map((p) => (
|
|
342
|
+
<SelectItem key={p.id} value={p.id}>
|
|
343
|
+
{p.name}{p.isDefault ? ` (${t('customers.config.pipelineStages.default', 'default')})` : ''}
|
|
344
|
+
</SelectItem>
|
|
345
|
+
))}
|
|
346
|
+
</SelectContent>
|
|
347
|
+
</Select>
|
|
335
348
|
{selectedPipeline && (
|
|
336
349
|
<>
|
|
337
350
|
<Button variant="outline" size="sm" onClick={() => openEditPipeline(selectedPipeline)}>
|