@open-mercato/core 0.6.6-develop.6543.1.49fadb4c31 → 0.6.6-develop.6551.1.1511bfa890
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/.turbo/turbo-build.log +2 -2
- package/dist/generated/entities/gateway_session_initialization/index.js +23 -0
- package/dist/generated/entities/gateway_session_initialization/index.js.map +7 -0
- package/dist/generated/entities.ids.generated.js +1 -0
- package/dist/generated/entities.ids.generated.js.map +2 -2
- package/dist/generated/entity-fields-registry.js +12 -0
- package/dist/generated/entity-fields-registry.js.map +2 -2
- package/dist/modules/api_keys/api/keys/route.js +7 -4
- package/dist/modules/api_keys/api/keys/route.js.map +2 -2
- package/dist/modules/attachments/components/AttachmentContentPreview.js +6 -35
- package/dist/modules/attachments/components/AttachmentContentPreview.js.map +2 -2
- package/dist/modules/audit_logs/backend/audit-logs/page.js +14 -24
- package/dist/modules/audit_logs/backend/audit-logs/page.js.map +2 -2
- package/dist/modules/auth/api/autologin.js +85 -0
- package/dist/modules/auth/api/autologin.js.map +7 -0
- package/dist/modules/auth/lib/autologin.js +19 -0
- package/dist/modules/auth/lib/autologin.js.map +7 -0
- package/dist/modules/customer_accounts/api/admin/roles/[id]/acl.js +1 -0
- package/dist/modules/customer_accounts/api/admin/roles/[id]/acl.js.map +2 -2
- package/dist/modules/customer_accounts/api/admin/roles/[id].js +17 -3
- package/dist/modules/customer_accounts/api/admin/roles/[id].js.map +2 -2
- package/dist/modules/customer_accounts/api/portal/users/[id]/roles.js +6 -1
- package/dist/modules/customer_accounts/api/portal/users/[id]/roles.js.map +2 -2
- package/dist/modules/customer_accounts/api/portal/users-invite.js +6 -1
- package/dist/modules/customer_accounts/api/portal/users-invite.js.map +2 -2
- package/dist/modules/customer_accounts/services/customerInvitationService.js +1 -0
- package/dist/modules/customer_accounts/services/customerInvitationService.js.map +2 -2
- package/dist/modules/customer_accounts/services/customerRbacService.js +6 -1
- package/dist/modules/customer_accounts/services/customerRbacService.js.map +2 -2
- package/dist/modules/customers/backend/customers/deals/pipeline/components/ViewTabsRow.js +2 -2
- package/dist/modules/customers/backend/customers/deals/pipeline/components/ViewTabsRow.js.map +2 -2
- package/dist/modules/customers/components/detail/CompanyDetailTabs.js +27 -37
- package/dist/modules/customers/components/detail/CompanyDetailTabs.js.map +2 -2
- package/dist/modules/customers/components/detail/DealDetailTabs.js +23 -35
- package/dist/modules/customers/components/detail/DealDetailTabs.js.map +2 -2
- package/dist/modules/customers/components/detail/DetailTabsLayout.js +6 -21
- package/dist/modules/customers/components/detail/DetailTabsLayout.js.map +2 -2
- package/dist/modules/customers/components/detail/MobilePersonDetail.js +26 -32
- package/dist/modules/customers/components/detail/MobilePersonDetail.js.map +2 -2
- package/dist/modules/customers/components/detail/PersonDetailTabs.js +29 -39
- package/dist/modules/customers/components/detail/PersonDetailTabs.js.map +2 -2
- package/dist/modules/feature_toggles/api/check/boolean/route.js +0 -14
- package/dist/modules/feature_toggles/api/check/boolean/route.js.map +2 -2
- package/dist/modules/feature_toggles/defaults.json +8 -0
- package/dist/modules/integrations/backend/integrations/[id]/page.js +9 -80
- package/dist/modules/integrations/backend/integrations/[id]/page.js.map +2 -2
- package/dist/modules/payment_gateways/data/entities.js +45 -0
- package/dist/modules/payment_gateways/data/entities.js.map +2 -2
- package/dist/modules/payment_gateways/lib/gateway-service.js +173 -38
- package/dist/modules/payment_gateways/lib/gateway-service.js.map +3 -3
- package/dist/modules/payment_gateways/lib/session-idempotency.js +104 -0
- package/dist/modules/payment_gateways/lib/session-idempotency.js.map +7 -0
- package/dist/modules/payment_gateways/migrations/Migration20260709220938_payment_gateways.js +11 -0
- package/dist/modules/payment_gateways/migrations/Migration20260709220938_payment_gateways.js.map +7 -0
- package/dist/modules/planner/backend/planner/availability-rulesets/[id]/page.js +16 -14
- package/dist/modules/planner/backend/planner/availability-rulesets/[id]/page.js.map +2 -2
- package/dist/modules/planner/components/AvailabilityRulesEditor.js +18 -30
- package/dist/modules/planner/components/AvailabilityRulesEditor.js.map +2 -2
- package/dist/modules/resources/backend/resources/resources/[id]/page.js +24 -24
- package/dist/modules/resources/backend/resources/resources/[id]/page.js.map +2 -2
- package/dist/modules/sales/backend/sales/channels/create/page.js +6 -0
- package/dist/modules/sales/backend/sales/channels/create/page.js.map +2 -2
- package/dist/modules/sales/backend/sales/channels/create/page.meta.js +2 -0
- package/dist/modules/sales/backend/sales/channels/create/page.meta.js.map +2 -2
- package/dist/modules/sales/backend/sales/channels/offers/page.js +6 -0
- package/dist/modules/sales/backend/sales/channels/offers/page.js.map +2 -2
- package/dist/modules/sales/backend/sales/channels/offers/page.meta.js +2 -0
- package/dist/modules/sales/backend/sales/channels/offers/page.meta.js.map +2 -2
- package/dist/modules/sales/backend/sales/channels/page.js +6 -0
- package/dist/modules/sales/backend/sales/channels/page.js.map +2 -2
- package/dist/modules/sales/backend/sales/channels/page.meta.js +2 -0
- package/dist/modules/sales/backend/sales/channels/page.meta.js.map +2 -2
- package/dist/modules/sales/backend/sales/documents/[id]/page.js +6 -4
- package/dist/modules/sales/backend/sales/documents/[id]/page.js.map +2 -2
- package/dist/modules/sales/components/SalesChannelsDisabledNotice.js +15 -0
- package/dist/modules/sales/components/SalesChannelsDisabledNotice.js.map +7 -0
- package/dist/modules/sales/components/documents/SalesDocumentForm.js +7 -3
- package/dist/modules/sales/components/documents/SalesDocumentForm.js.map +2 -2
- package/dist/modules/sales/components/documents/SalesDocumentsTable.js +10 -8
- package/dist/modules/sales/components/documents/SalesDocumentsTable.js.map +2 -2
- package/dist/modules/sales/components/useSalesChannelsEnabled.js +44 -0
- package/dist/modules/sales/components/useSalesChannelsEnabled.js.map +7 -0
- package/dist/modules/sales/lib/salesChannelsToggle.js +18 -0
- package/dist/modules/sales/lib/salesChannelsToggle.js.map +7 -0
- package/dist/modules/sales/lib/salesChannelsToggleId.js +5 -0
- package/dist/modules/sales/lib/salesChannelsToggleId.js.map +7 -0
- package/dist/modules/staff/backend/staff/team-members/[id]/page.js +22 -25
- package/dist/modules/staff/backend/staff/team-members/[id]/page.js.map +2 -2
- package/dist/modules/staff/backend/staff/teams/[id]/edit/page.js +12 -14
- package/dist/modules/staff/backend/staff/teams/[id]/edit/page.js.map +2 -2
- package/dist/modules/staff/lib/timesheets-projects-ui/SavedViewTabs.js +10 -29
- package/dist/modules/staff/lib/timesheets-projects-ui/SavedViewTabs.js.map +2 -2
- package/dist/modules/sync_excel/lib/adapters/customers.js +19 -20
- package/dist/modules/sync_excel/lib/adapters/customers.js.map +2 -2
- package/dist/modules/sync_excel/lib/parser.js +185 -0
- package/dist/modules/sync_excel/lib/parser.js.map +2 -2
- package/dist/modules/sync_excel/lib/upload-storage.js +20 -1
- package/dist/modules/sync_excel/lib/upload-storage.js.map +2 -2
- package/generated/entities/gateway_session_initialization/index.ts +10 -0
- package/generated/entities.ids.generated.ts +1 -0
- package/generated/entity-fields-registry.ts +12 -0
- package/package.json +7 -7
- package/src/modules/api_keys/api/keys/route.ts +9 -4
- package/src/modules/attachments/components/AttachmentContentPreview.tsx +9 -44
- package/src/modules/audit_logs/backend/audit-logs/page.tsx +12 -22
- package/src/modules/auth/api/autologin.ts +100 -0
- package/src/modules/auth/lib/autologin.ts +36 -0
- package/src/modules/customer_accounts/api/admin/roles/[id]/acl.ts +1 -0
- package/src/modules/customer_accounts/api/admin/roles/[id].ts +17 -3
- package/src/modules/customer_accounts/api/portal/users/[id]/roles.ts +6 -1
- package/src/modules/customer_accounts/api/portal/users-invite.ts +6 -1
- package/src/modules/customer_accounts/services/customerInvitationService.ts +1 -0
- package/src/modules/customer_accounts/services/customerRbacService.ts +9 -2
- package/src/modules/customers/backend/customers/deals/pipeline/components/ViewTabsRow.tsx +6 -2
- package/src/modules/customers/components/detail/CompanyDetailTabs.tsx +27 -49
- package/src/modules/customers/components/detail/DealDetailTabs.tsx +24 -49
- package/src/modules/customers/components/detail/DetailTabsLayout.tsx +13 -24
- package/src/modules/customers/components/detail/MobilePersonDetail.tsx +25 -31
- package/src/modules/customers/components/detail/PersonDetailTabs.tsx +29 -50
- package/src/modules/feature_toggles/api/check/boolean/route.ts +0 -15
- package/src/modules/feature_toggles/defaults.json +8 -0
- package/src/modules/integrations/backend/integrations/[id]/page.tsx +16 -59
- package/src/modules/payment_gateways/data/entities.ts +39 -0
- package/src/modules/payment_gateways/lib/gateway-service.ts +211 -40
- package/src/modules/payment_gateways/lib/session-idempotency.ts +142 -0
- package/src/modules/payment_gateways/migrations/.snapshot-open-mercato.json +236 -0
- package/src/modules/payment_gateways/migrations/Migration20260709220938_payment_gateways.ts +10 -0
- package/src/modules/planner/backend/planner/availability-rulesets/[id]/page.tsx +14 -20
- package/src/modules/planner/components/AvailabilityRulesEditor.tsx +16 -34
- package/src/modules/resources/backend/resources/resources/[id]/page.tsx +27 -37
- package/src/modules/sales/backend/sales/channels/create/page.meta.ts +3 -0
- package/src/modules/sales/backend/sales/channels/create/page.tsx +7 -0
- package/src/modules/sales/backend/sales/channels/offers/page.meta.ts +3 -0
- package/src/modules/sales/backend/sales/channels/offers/page.tsx +7 -0
- package/src/modules/sales/backend/sales/channels/page.meta.ts +4 -0
- package/src/modules/sales/backend/sales/channels/page.tsx +7 -0
- package/src/modules/sales/backend/sales/documents/[id]/page.tsx +7 -5
- package/src/modules/sales/components/SalesChannelsDisabledNotice.tsx +21 -0
- package/src/modules/sales/components/documents/SalesDocumentForm.tsx +7 -3
- package/src/modules/sales/components/documents/SalesDocumentsTable.tsx +10 -8
- package/src/modules/sales/components/useSalesChannelsEnabled.ts +59 -0
- package/src/modules/sales/i18n/de.json +1 -0
- package/src/modules/sales/i18n/en.json +1 -0
- package/src/modules/sales/i18n/es.json +1 -0
- package/src/modules/sales/i18n/pl.json +1 -0
- package/src/modules/sales/lib/salesChannelsToggle.ts +26 -0
- package/src/modules/sales/lib/salesChannelsToggleId.ts +1 -0
- package/src/modules/staff/backend/staff/team-members/[id]/page.tsx +25 -34
- package/src/modules/staff/backend/staff/teams/[id]/edit/page.tsx +11 -17
- package/src/modules/staff/lib/timesheets-projects-ui/SavedViewTabs.tsx +11 -28
- package/src/modules/sync_excel/lib/adapters/customers.ts +20 -22
- package/src/modules/sync_excel/lib/parser.ts +245 -0
- package/src/modules/sync_excel/lib/upload-storage.ts +23 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
import { cn } from "@open-mercato/shared/lib/utils";
|
|
5
4
|
import { useT } from "@open-mercato/shared/lib/i18n/context";
|
|
6
5
|
import { Button } from "@open-mercato/ui/primitives/button";
|
|
6
|
+
import { Tabs, TabsList, TabsTrigger } from "@open-mercato/ui/primitives/tabs";
|
|
7
7
|
import {
|
|
8
8
|
SquareCheckBig,
|
|
9
9
|
Mail,
|
|
@@ -20,12 +20,9 @@ function resolveLegacyTab(tab) {
|
|
|
20
20
|
if (!tab) return "activities";
|
|
21
21
|
return SUPPORTED_TAB_IDS.has(tab) ? tab : "activities";
|
|
22
22
|
}
|
|
23
|
-
function
|
|
24
|
-
if (count <= 0) return
|
|
25
|
-
return
|
|
26
|
-
}
|
|
27
|
-
function NewBadge() {
|
|
28
|
-
return /* @__PURE__ */ jsx("span", { className: "ml-1.5 rounded bg-foreground px-1.5 py-0.5 text-overline font-semibold leading-none text-background", children: "NEW" });
|
|
23
|
+
function formatTabCount(count) {
|
|
24
|
+
if (count <= 0) return void 0;
|
|
25
|
+
return count > 999 ? "999+" : count;
|
|
29
26
|
}
|
|
30
27
|
function PersonDetailTabs({
|
|
31
28
|
activeTab,
|
|
@@ -47,7 +44,7 @@ function PersonDetailTabs({
|
|
|
47
44
|
id: "activities",
|
|
48
45
|
label: t("customers.people.detail.tabs.activities", "Activities"),
|
|
49
46
|
icon: /* @__PURE__ */ jsx(SquareCheckBig, { className: "size-4" }),
|
|
50
|
-
|
|
47
|
+
count: formatTabCount(activitiesCount)
|
|
51
48
|
},
|
|
52
49
|
{
|
|
53
50
|
id: "emails",
|
|
@@ -58,37 +55,37 @@ function PersonDetailTabs({
|
|
|
58
55
|
id: "deals",
|
|
59
56
|
label: t("customers.people.detail.tabs.deals", "Deals"),
|
|
60
57
|
icon: /* @__PURE__ */ jsx(Briefcase, { className: "size-4" }),
|
|
61
|
-
|
|
58
|
+
count: formatTabCount(dealsCount)
|
|
62
59
|
},
|
|
63
60
|
{
|
|
64
61
|
id: "companies",
|
|
65
62
|
label: t("customers.people.detail.tabs.companies", "Companies"),
|
|
66
63
|
icon: /* @__PURE__ */ jsx(Building2, { className: "size-4" }),
|
|
67
|
-
|
|
64
|
+
count: formatTabCount(companiesCount)
|
|
68
65
|
},
|
|
69
66
|
{
|
|
70
67
|
id: "addresses",
|
|
71
68
|
label: t("customers.people.detail.tabs.addresses", "Addresses"),
|
|
72
69
|
icon: /* @__PURE__ */ jsx(MapPin, { className: "size-4" }),
|
|
73
|
-
|
|
70
|
+
count: formatTabCount(addressesCount)
|
|
74
71
|
},
|
|
75
72
|
{
|
|
76
73
|
id: "tasks",
|
|
77
74
|
label: t("customers.people.detail.tabs.tasks", "Tasks"),
|
|
78
75
|
icon: /* @__PURE__ */ jsx(Check, { className: "size-4" }),
|
|
79
|
-
|
|
76
|
+
count: formatTabCount(tasksCount)
|
|
80
77
|
},
|
|
81
78
|
{
|
|
82
79
|
id: "changelog",
|
|
83
80
|
label: t("customers.people.detail.tabs.changelog", "Change log"),
|
|
84
81
|
icon: /* @__PURE__ */ jsx(History, { className: "size-4" }),
|
|
85
|
-
|
|
82
|
+
count: "NEW"
|
|
86
83
|
},
|
|
87
84
|
{
|
|
88
85
|
id: "files",
|
|
89
86
|
label: t("customers.people.detail.tabs.files", "Files"),
|
|
90
87
|
icon: /* @__PURE__ */ jsx(Paperclip, { className: "size-4" }),
|
|
91
|
-
|
|
88
|
+
count: formatTabCount(filesCount)
|
|
92
89
|
}
|
|
93
90
|
],
|
|
94
91
|
[t, activitiesCount, dealsCount, companiesCount, addressesCount, tasksCount, filesCount]
|
|
@@ -104,31 +101,24 @@ function PersonDetailTabs({
|
|
|
104
101
|
[builtInTabs, injectedTabs]
|
|
105
102
|
);
|
|
106
103
|
return /* @__PURE__ */ jsxs("div", { children: [
|
|
107
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-end justify-between gap-2 border-b",
|
|
108
|
-
/* @__PURE__ */ jsx(
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
tab.label,
|
|
126
|
-
tab.badge
|
|
127
|
-
]
|
|
128
|
-
},
|
|
129
|
-
tab.id
|
|
130
|
-
);
|
|
131
|
-
}) }),
|
|
104
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-end justify-between gap-2 border-b", children: [
|
|
105
|
+
/* @__PURE__ */ jsx(
|
|
106
|
+
Tabs,
|
|
107
|
+
{
|
|
108
|
+
value: activeTab,
|
|
109
|
+
onValueChange: (value) => onTabChange(value),
|
|
110
|
+
variant: "underline",
|
|
111
|
+
className: "min-w-0 flex-1",
|
|
112
|
+
children: /* @__PURE__ */ jsx(
|
|
113
|
+
TabsList,
|
|
114
|
+
{
|
|
115
|
+
"aria-label": t("customers.people.detail.tabs.label", "Person detail sections"),
|
|
116
|
+
className: "-mb-px w-full overflow-x-auto border-b-0 px-1",
|
|
117
|
+
children: allTabs.map((tab) => /* @__PURE__ */ jsx(TabsTrigger, { value: tab.id, leading: tab.icon, count: tab.count, children: tab.label }, tab.id))
|
|
118
|
+
}
|
|
119
|
+
)
|
|
120
|
+
}
|
|
121
|
+
),
|
|
132
122
|
sectionAction ? /* @__PURE__ */ jsxs(
|
|
133
123
|
Button,
|
|
134
124
|
{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/modules/customers/components/detail/PersonDetailTabs.tsx"],
|
|
4
|
-
"sourcesContent": ["\"use client\"\n\nimport * as React from 'react'\nimport {
|
|
5
|
-
"mappings": ";
|
|
4
|
+
"sourcesContent": ["\"use client\"\n\nimport * as React from 'react'\nimport { useT } from '@open-mercato/shared/lib/i18n/context'\nimport { Button } from '@open-mercato/ui/primitives/button'\nimport { Tabs, TabsList, TabsTrigger } from '@open-mercato/ui/primitives/tabs'\nimport {\n SquareCheckBig,\n Mail,\n Briefcase,\n Building2,\n Check,\n History,\n Paperclip,\n Plus,\n MapPin,\n} from 'lucide-react'\nimport type { SectionAction } from '@open-mercato/ui/backend/detail'\n\nexport type PersonTabId =\n | 'activities'\n | 'emails'\n | 'deals'\n | 'companies'\n | 'addresses'\n | 'tasks'\n | 'changelog'\n | 'files'\n | string\n\ntype TabDef = {\n id: PersonTabId\n label: string\n icon?: React.ReactNode\n count?: React.ReactNode\n}\n\ntype PersonDetailTabsProps = {\n activeTab: PersonTabId\n onTabChange: (tab: PersonTabId) => void\n injectedTabs?: Array<{ id: string; label: string }>\n activitiesCount?: number\n dealsCount?: number\n companiesCount?: number\n addressesCount?: number\n tasksCount?: number\n filesCount?: number\n sectionAction?: SectionAction | null\n children: React.ReactNode\n}\n\nconst SUPPORTED_TAB_IDS = new Set<PersonTabId>(['activities', 'emails', 'deals', 'companies', 'addresses', 'tasks', 'changelog', 'files'])\n\nexport function resolveLegacyTab(tab: string | null | undefined): PersonTabId {\n if (!tab) return 'activities'\n return SUPPORTED_TAB_IDS.has(tab as PersonTabId) ? (tab as PersonTabId) : 'activities'\n}\n\nfunction formatTabCount(count: number): string | number | undefined {\n if (count <= 0) return undefined\n return count > 999 ? '999+' : count\n}\n\nexport function PersonDetailTabs({\n activeTab,\n onTabChange,\n injectedTabs = [],\n activitiesCount = 0,\n dealsCount = 0,\n companiesCount = 0,\n addressesCount = 0,\n tasksCount = 0,\n filesCount = 0,\n sectionAction = null,\n children,\n}: PersonDetailTabsProps) {\n const t = useT()\n\n const builtInTabs: TabDef[] = React.useMemo(\n () => [\n {\n id: 'activities',\n label: t('customers.people.detail.tabs.activities', 'Activities'),\n icon: <SquareCheckBig className=\"size-4\" />,\n count: formatTabCount(activitiesCount),\n },\n {\n id: 'emails',\n label: t('customers.people.detail.tabs.emails', 'Emails'),\n icon: <Mail className=\"size-4\" />,\n },\n {\n id: 'deals',\n label: t('customers.people.detail.tabs.deals', 'Deals'),\n icon: <Briefcase className=\"size-4\" />,\n count: formatTabCount(dealsCount),\n },\n {\n id: 'companies',\n label: t('customers.people.detail.tabs.companies', 'Companies'),\n icon: <Building2 className=\"size-4\" />,\n count: formatTabCount(companiesCount),\n },\n {\n id: 'addresses',\n label: t('customers.people.detail.tabs.addresses', 'Addresses'),\n icon: <MapPin className=\"size-4\" />,\n count: formatTabCount(addressesCount),\n },\n {\n id: 'tasks',\n label: t('customers.people.detail.tabs.tasks', 'Tasks'),\n icon: <Check className=\"size-4\" />,\n count: formatTabCount(tasksCount),\n },\n {\n id: 'changelog',\n label: t('customers.people.detail.tabs.changelog', 'Change log'),\n icon: <History className=\"size-4\" />,\n count: 'NEW',\n },\n {\n id: 'files',\n label: t('customers.people.detail.tabs.files', 'Files'),\n icon: <Paperclip className=\"size-4\" />,\n count: formatTabCount(filesCount),\n },\n ],\n [t, activitiesCount, dealsCount, companiesCount, addressesCount, tasksCount, filesCount],\n )\n\n const allTabs: TabDef[] = React.useMemo(\n () => [\n ...builtInTabs,\n ...injectedTabs.map((tab) => ({\n id: tab.id as PersonTabId,\n label: tab.label,\n })),\n ],\n [builtInTabs, injectedTabs],\n )\n\n return (\n <div>\n {/* Tab navigation \u2014 full width above both zones */}\n <div className=\"flex items-end justify-between gap-2 border-b\">\n <Tabs\n value={activeTab}\n onValueChange={(value) => onTabChange(value as PersonTabId)}\n variant=\"underline\"\n className=\"min-w-0 flex-1\"\n >\n <TabsList\n aria-label={t('customers.people.detail.tabs.label', 'Person detail sections')}\n className=\"-mb-px w-full overflow-x-auto border-b-0 px-1\"\n >\n {allTabs.map((tab) => (\n <TabsTrigger key={tab.id} value={tab.id} leading={tab.icon} count={tab.count}>\n {tab.label}\n </TabsTrigger>\n ))}\n </TabsList>\n </Tabs>\n {sectionAction ? (\n <Button\n type=\"button\"\n size=\"sm\"\n onClick={sectionAction.onClick}\n disabled={sectionAction.disabled}\n className=\"mb-1.5 mr-1 shrink-0\"\n >\n <Plus className=\"mr-1.5 h-4 w-4\" />\n {sectionAction.label}\n </Button>\n ) : null}\n </div>\n\n {/* Two-column content below tabs */}\n <div className=\"pt-6\">\n {children}\n </div>\n </div>\n )\n}\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -12,20 +12,6 @@ async function GET(req) {
|
|
|
12
12
|
if (!identifier) {
|
|
13
13
|
return NextResponse.json({ error: "Missing required parameter: identifier" }, { status: 400 });
|
|
14
14
|
}
|
|
15
|
-
if (auth.isSuperAdmin === true) {
|
|
16
|
-
return NextResponse.json({
|
|
17
|
-
ok: true,
|
|
18
|
-
value: true,
|
|
19
|
-
resolution: {
|
|
20
|
-
valueType: "boolean",
|
|
21
|
-
value: true,
|
|
22
|
-
source: "override",
|
|
23
|
-
toggleId: "superadmin",
|
|
24
|
-
identifier,
|
|
25
|
-
tenantId: "superadmin"
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
15
|
const container = await createRequestContainer();
|
|
30
16
|
const { scope } = await resolveFeatureCheckContext({
|
|
31
17
|
container,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../src/modules/feature_toggles/api/check/boolean/route.ts"],
|
|
4
|
-
"sourcesContent": ["import { getAuthFromRequest } from \"@open-mercato/shared/lib/auth/server\"\nimport { createRequestContainer } from \"@open-mercato/shared/lib/di/container\"\nimport { NextResponse } from \"next/server\"\nimport { resolveFeatureCheckContext } from \"@open-mercato/core/modules/directory/utils/organizationScope\"\nimport { FeatureTogglesService } from \"../../../lib/feature-flag-check\"\nimport { featureTogglesTag, checkResponseSchema, featureToggleErrorSchema } from \"../../openapi\"\nimport type { OpenApiRouteDoc } from '@open-mercato/shared/lib/openapi'\nimport { z } from 'zod'\n\nexport async function GET(req: Request) {\n const auth = await getAuthFromRequest(req)\n if (!auth) return NextResponse.json({ error: 'Unauthorized' }, { status: 401 })\n\n const url = new URL(req.url)\n const identifier = url.searchParams.get('identifier')\n\n if (!identifier) {\n return NextResponse.json({ error: 'Missing required parameter: identifier' }, { status: 400 })\n }\n\n
|
|
5
|
-
"mappings": "AAAA,SAAS,0BAA0B;AACnC,SAAS,8BAA8B;AACvC,SAAS,oBAAoB;AAC7B,SAAS,kCAAkC;AAE3C,SAAS,mBAAmB,qBAAqB,gCAAgC;AAEjF,SAAS,SAAS;AAElB,eAAsB,IAAI,KAAc;AACpC,QAAM,OAAO,MAAM,mBAAmB,GAAG;AACzC,MAAI,CAAC,KAAM,QAAO,aAAa,KAAK,EAAE,OAAO,eAAe,GAAG,EAAE,QAAQ,IAAI,CAAC;AAE9E,QAAM,MAAM,IAAI,IAAI,IAAI,GAAG;AAC3B,QAAM,aAAa,IAAI,aAAa,IAAI,YAAY;AAEpD,MAAI,CAAC,YAAY;AACb,WAAO,aAAa,KAAK,EAAE,OAAO,yCAAyC,GAAG,EAAE,QAAQ,IAAI,CAAC;AAAA,EACjG;AAEA,
|
|
4
|
+
"sourcesContent": ["import { getAuthFromRequest } from \"@open-mercato/shared/lib/auth/server\"\nimport { createRequestContainer } from \"@open-mercato/shared/lib/di/container\"\nimport { NextResponse } from \"next/server\"\nimport { resolveFeatureCheckContext } from \"@open-mercato/core/modules/directory/utils/organizationScope\"\nimport { FeatureTogglesService } from \"../../../lib/feature-flag-check\"\nimport { featureTogglesTag, checkResponseSchema, featureToggleErrorSchema } from \"../../openapi\"\nimport type { OpenApiRouteDoc } from '@open-mercato/shared/lib/openapi'\nimport { z } from 'zod'\n\nexport async function GET(req: Request) {\n const auth = await getAuthFromRequest(req)\n if (!auth) return NextResponse.json({ error: 'Unauthorized' }, { status: 401 })\n\n const url = new URL(req.url)\n const identifier = url.searchParams.get('identifier')\n\n if (!identifier) {\n return NextResponse.json({ error: 'Missing required parameter: identifier' }, { status: 400 })\n }\n\n const container = await createRequestContainer()\n const { scope } = await resolveFeatureCheckContext({\n container,\n auth,\n request: req\n })\n\n if (!scope.tenantId) {\n return NextResponse.json({ error: 'Tenant context required. Please select a tenant.' }, { status: 400 })\n }\n\n const featureTogglesService = container.resolve('featureTogglesService') as FeatureTogglesService\n const result = await featureTogglesService.getBoolConfig(identifier, scope.tenantId)\n\n if (!result.ok) {\n return NextResponse.json(result, { status: result.error.code === \"MISSING_TOGGLE\" ? 404 : 400 })\n }\n\n return NextResponse.json(result)\n}\n\nconst routeMetadata = {\n GET: { requireAuth: true },\n}\n\nexport const metadata = routeMetadata\n\nexport const openApi: OpenApiRouteDoc = {\n tag: featureTogglesTag,\n summary: 'Check feature toggle status',\n methods: {\n GET: {\n summary: 'Check if feature is enabled',\n description: 'Checks if a feature toggle is enabled for the current context.',\n query: z.object({\n identifier: z.string().describe('Feature toggle identifier'),\n }),\n responses: [\n { status: 200, description: 'Feature status', schema: checkResponseSchema },\n ],\n errors: [\n { status: 400, description: 'Bad Request', schema: featureToggleErrorSchema },\n { status: 401, description: 'Unauthorized', schema: featureToggleErrorSchema },\n { status: 404, description: 'Tenant not found', schema: featureToggleErrorSchema },\n ],\n },\n },\n}\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,0BAA0B;AACnC,SAAS,8BAA8B;AACvC,SAAS,oBAAoB;AAC7B,SAAS,kCAAkC;AAE3C,SAAS,mBAAmB,qBAAqB,gCAAgC;AAEjF,SAAS,SAAS;AAElB,eAAsB,IAAI,KAAc;AACpC,QAAM,OAAO,MAAM,mBAAmB,GAAG;AACzC,MAAI,CAAC,KAAM,QAAO,aAAa,KAAK,EAAE,OAAO,eAAe,GAAG,EAAE,QAAQ,IAAI,CAAC;AAE9E,QAAM,MAAM,IAAI,IAAI,IAAI,GAAG;AAC3B,QAAM,aAAa,IAAI,aAAa,IAAI,YAAY;AAEpD,MAAI,CAAC,YAAY;AACb,WAAO,aAAa,KAAK,EAAE,OAAO,yCAAyC,GAAG,EAAE,QAAQ,IAAI,CAAC;AAAA,EACjG;AAEA,QAAM,YAAY,MAAM,uBAAuB;AAC/C,QAAM,EAAE,MAAM,IAAI,MAAM,2BAA2B;AAAA,IAC/C;AAAA,IACA;AAAA,IACA,SAAS;AAAA,EACb,CAAC;AAED,MAAI,CAAC,MAAM,UAAU;AACjB,WAAO,aAAa,KAAK,EAAE,OAAO,mDAAmD,GAAG,EAAE,QAAQ,IAAI,CAAC;AAAA,EAC3G;AAEA,QAAM,wBAAwB,UAAU,QAAQ,uBAAuB;AACvE,QAAM,SAAS,MAAM,sBAAsB,cAAc,YAAY,MAAM,QAAQ;AAEnF,MAAI,CAAC,OAAO,IAAI;AACZ,WAAO,aAAa,KAAK,QAAQ,EAAE,QAAQ,OAAO,MAAM,SAAS,mBAAmB,MAAM,IAAI,CAAC;AAAA,EACnG;AAEA,SAAO,aAAa,KAAK,MAAM;AACnC;AAEA,MAAM,gBAAgB;AAAA,EAClB,KAAK,EAAE,aAAa,KAAK;AAC7B;AAEO,MAAM,WAAW;AAEjB,MAAM,UAA2B;AAAA,EACpC,KAAK;AAAA,EACL,SAAS;AAAA,EACT,SAAS;AAAA,IACL,KAAK;AAAA,MACD,SAAS;AAAA,MACT,aAAa;AAAA,MACb,OAAO,EAAE,OAAO;AAAA,QACZ,YAAY,EAAE,OAAO,EAAE,SAAS,2BAA2B;AAAA,MAC/D,CAAC;AAAA,MACD,WAAW;AAAA,QACP,EAAE,QAAQ,KAAK,aAAa,kBAAkB,QAAQ,oBAAoB;AAAA,MAC9E;AAAA,MACA,QAAQ;AAAA,QACJ,EAAE,QAAQ,KAAK,aAAa,eAAe,QAAQ,yBAAyB;AAAA,QAC5E,EAAE,QAAQ,KAAK,aAAa,gBAAgB,QAAQ,yBAAyB;AAAA,QAC7E,EAAE,QAAQ,KAAK,aAAa,oBAAoB,QAAQ,yBAAyB;AAAA,MACrF;AAAA,IACJ;AAAA,EACJ;AACJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -16,6 +16,14 @@
|
|
|
16
16
|
"type": "string",
|
|
17
17
|
"defaultValue": "Free shipping on orders over $50"
|
|
18
18
|
},
|
|
19
|
+
{
|
|
20
|
+
"identifier": "sales_channels_enabled",
|
|
21
|
+
"name": "Sales Channels",
|
|
22
|
+
"description": "Show sales channel pickers, filters, and management UI. Disable for tenants that do not use sales channels.",
|
|
23
|
+
"category": "sales",
|
|
24
|
+
"type": "boolean",
|
|
25
|
+
"defaultValue": true
|
|
26
|
+
},
|
|
19
27
|
{
|
|
20
28
|
"identifier": "order_review_threshold",
|
|
21
29
|
"name": "Order Review Threshold",
|
|
@@ -922,86 +922,15 @@ function IntegrationDetailPage({ params }) {
|
|
|
922
922
|
},
|
|
923
923
|
widget.widgetId
|
|
924
924
|
)) }) : null,
|
|
925
|
-
/* @__PURE__ */ jsxs(Tabs, { value: activeTab, onValueChange: handleTabChange, className: "space-y-5", children: [
|
|
926
|
-
/* @__PURE__ */ jsxs(TabsList, { className: "
|
|
927
|
-
showCredentialsTab ? /* @__PURE__ */ jsx(
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
/* @__PURE__ */ jsx("span", { children: t("integrations.detail.tabs.credentials") })
|
|
935
|
-
] })
|
|
936
|
-
}
|
|
937
|
-
) : null,
|
|
938
|
-
leadingInjectedTab ? /* @__PURE__ */ jsx(
|
|
939
|
-
TabsTrigger,
|
|
940
|
-
{
|
|
941
|
-
value: leadingInjectedTab.id,
|
|
942
|
-
className: "mr-8 h-auto rounded-none border-b-2 border-transparent bg-transparent px-0 py-2.5 text-sm font-medium text-muted-foreground shadow-none transition-colors hover:bg-transparent hover:text-foreground aria-selected:border-accent-indigo aria-selected:bg-transparent aria-selected:text-foreground aria-selected:shadow-none last:mr-0",
|
|
943
|
-
children: /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-2", children: [
|
|
944
|
-
/* @__PURE__ */ jsx(Settings, { className: "h-4 w-4" }),
|
|
945
|
-
/* @__PURE__ */ jsx("span", { children: leadingInjectedTab.label })
|
|
946
|
-
] })
|
|
947
|
-
}
|
|
948
|
-
) : null,
|
|
949
|
-
showVersionTab ? /* @__PURE__ */ jsx(
|
|
950
|
-
TabsTrigger,
|
|
951
|
-
{
|
|
952
|
-
value: "version",
|
|
953
|
-
className: "mr-8 h-auto rounded-none border-b-2 border-transparent bg-transparent px-0 py-2.5 text-sm font-medium text-muted-foreground shadow-none transition-colors hover:bg-transparent hover:text-foreground aria-selected:border-accent-indigo aria-selected:bg-transparent aria-selected:text-foreground aria-selected:shadow-none last:mr-0",
|
|
954
|
-
children: /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-2", children: [
|
|
955
|
-
/* @__PURE__ */ jsx(RefreshCw, { className: "h-4 w-4" }),
|
|
956
|
-
/* @__PURE__ */ jsx("span", { children: t("integrations.detail.tabs.version") })
|
|
957
|
-
] })
|
|
958
|
-
}
|
|
959
|
-
) : null,
|
|
960
|
-
showDataSyncScheduleTab ? /* @__PURE__ */ jsx(
|
|
961
|
-
TabsTrigger,
|
|
962
|
-
{
|
|
963
|
-
value: "data-sync-schedule",
|
|
964
|
-
className: "mr-8 h-auto rounded-none border-b-2 border-transparent bg-transparent px-0 py-2.5 text-sm font-medium text-muted-foreground shadow-none transition-colors hover:bg-transparent hover:text-foreground aria-selected:border-accent-indigo aria-selected:bg-transparent aria-selected:text-foreground aria-selected:shadow-none last:mr-0",
|
|
965
|
-
children: /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-2", children: [
|
|
966
|
-
/* @__PURE__ */ jsx(Calendar, { className: "h-4 w-4" }),
|
|
967
|
-
/* @__PURE__ */ jsx("span", { children: t("data_sync.integrationTab.title", "Sync schedules") })
|
|
968
|
-
] })
|
|
969
|
-
}
|
|
970
|
-
) : null,
|
|
971
|
-
showHealthTab ? /* @__PURE__ */ jsx(
|
|
972
|
-
TabsTrigger,
|
|
973
|
-
{
|
|
974
|
-
value: "health",
|
|
975
|
-
className: "mr-8 h-auto rounded-none border-b-2 border-transparent bg-transparent px-0 py-2.5 text-sm font-medium text-muted-foreground shadow-none transition-colors hover:bg-transparent hover:text-foreground aria-selected:border-accent-indigo aria-selected:bg-transparent aria-selected:text-foreground aria-selected:shadow-none last:mr-0",
|
|
976
|
-
children: /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-2", children: [
|
|
977
|
-
/* @__PURE__ */ jsx(Activity, { className: "h-4 w-4" }),
|
|
978
|
-
/* @__PURE__ */ jsx("span", { children: t("integrations.detail.tabs.health") })
|
|
979
|
-
] })
|
|
980
|
-
}
|
|
981
|
-
) : null,
|
|
982
|
-
showLogsTab ? /* @__PURE__ */ jsx(
|
|
983
|
-
TabsTrigger,
|
|
984
|
-
{
|
|
985
|
-
value: "logs",
|
|
986
|
-
className: "mr-8 h-auto rounded-none border-b-2 border-transparent bg-transparent px-0 py-2.5 text-sm font-medium text-muted-foreground shadow-none transition-colors hover:bg-transparent hover:text-foreground aria-selected:border-accent-indigo aria-selected:bg-transparent aria-selected:text-foreground aria-selected:shadow-none last:mr-0",
|
|
987
|
-
children: /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-2", children: [
|
|
988
|
-
/* @__PURE__ */ jsx(FileText, { className: "h-4 w-4" }),
|
|
989
|
-
/* @__PURE__ */ jsx("span", { children: t("integrations.detail.tabs.logs") })
|
|
990
|
-
] })
|
|
991
|
-
}
|
|
992
|
-
) : null,
|
|
993
|
-
trailingInjectedTabs.map((tab) => /* @__PURE__ */ jsx(
|
|
994
|
-
TabsTrigger,
|
|
995
|
-
{
|
|
996
|
-
value: tab.id,
|
|
997
|
-
className: "mr-8 h-auto rounded-none border-b-2 border-transparent bg-transparent px-0 py-2.5 text-sm font-medium text-muted-foreground shadow-none transition-colors hover:bg-transparent hover:text-foreground aria-selected:border-accent-indigo aria-selected:bg-transparent aria-selected:text-foreground aria-selected:shadow-none last:mr-0",
|
|
998
|
-
children: /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-2", children: [
|
|
999
|
-
/* @__PURE__ */ jsx(Settings, { className: "h-4 w-4" }),
|
|
1000
|
-
/* @__PURE__ */ jsx("span", { children: tab.label })
|
|
1001
|
-
] })
|
|
1002
|
-
},
|
|
1003
|
-
tab.id
|
|
1004
|
-
))
|
|
925
|
+
/* @__PURE__ */ jsxs(Tabs, { value: activeTab, onValueChange: handleTabChange, variant: "underline", className: "space-y-5", children: [
|
|
926
|
+
/* @__PURE__ */ jsxs(TabsList, { className: "w-full overflow-x-auto", children: [
|
|
927
|
+
showCredentialsTab ? /* @__PURE__ */ jsx(TabsTrigger, { value: "credentials", leading: /* @__PURE__ */ jsx(Key, { className: "h-4 w-4" }), children: t("integrations.detail.tabs.credentials") }) : null,
|
|
928
|
+
leadingInjectedTab ? /* @__PURE__ */ jsx(TabsTrigger, { value: leadingInjectedTab.id, leading: /* @__PURE__ */ jsx(Settings, { className: "h-4 w-4" }), children: leadingInjectedTab.label }) : null,
|
|
929
|
+
showVersionTab ? /* @__PURE__ */ jsx(TabsTrigger, { value: "version", leading: /* @__PURE__ */ jsx(RefreshCw, { className: "h-4 w-4" }), children: t("integrations.detail.tabs.version") }) : null,
|
|
930
|
+
showDataSyncScheduleTab ? /* @__PURE__ */ jsx(TabsTrigger, { value: "data-sync-schedule", leading: /* @__PURE__ */ jsx(Calendar, { className: "h-4 w-4" }), children: t("data_sync.integrationTab.title", "Sync schedules") }) : null,
|
|
931
|
+
showHealthTab ? /* @__PURE__ */ jsx(TabsTrigger, { value: "health", leading: /* @__PURE__ */ jsx(Activity, { className: "h-4 w-4" }), children: t("integrations.detail.tabs.health") }) : null,
|
|
932
|
+
showLogsTab ? /* @__PURE__ */ jsx(TabsTrigger, { value: "logs", leading: /* @__PURE__ */ jsx(FileText, { className: "h-4 w-4" }), children: t("integrations.detail.tabs.logs") }) : null,
|
|
933
|
+
trailingInjectedTabs.map((tab) => /* @__PURE__ */ jsx(TabsTrigger, { value: tab.id, leading: /* @__PURE__ */ jsx(Settings, { className: "h-4 w-4" }), children: tab.label }, tab.id))
|
|
1005
934
|
] }),
|
|
1006
935
|
showCredentialsTab ? /* @__PURE__ */ jsx(TabsContent, { value: "credentials", className: "mt-0", children: /* @__PURE__ */ jsxs("section", { className: "space-y-4 rounded-lg border bg-card p-6", children: [
|
|
1007
936
|
detail.bundle ? /* @__PURE__ */ jsx("div", { className: "rounded-lg border border-status-info-border bg-status-info-bg p-3 text-sm text-status-info-text", children: t("integrations.detail.credentials.bundleShared", { bundle: detail.bundle.title }) }) : null,
|