@open-mercato/core 0.6.6-develop.6543.1.49fadb4c31 → 0.6.6
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 +1 -1
- package/dist/modules/api_keys/api/keys/route.js +9 -23
- package/dist/modules/api_keys/api/keys/route.js.map +2 -2
- package/dist/modules/api_keys/cli.js +1 -2
- package/dist/modules/api_keys/cli.js.map +2 -2
- package/dist/modules/attachments/api/file/[id]/route.js +7 -9
- package/dist/modules/attachments/api/file/[id]/route.js.map +2 -2
- package/dist/modules/attachments/api/image/[id]/[[...slug]]/route.js +7 -9
- package/dist/modules/attachments/api/image/[id]/[[...slug]]/route.js.map +2 -2
- package/dist/modules/attachments/api/route.js +17 -21
- package/dist/modules/attachments/api/route.js.map +2 -2
- package/dist/modules/auth/api/users/route.js +2 -6
- package/dist/modules/auth/api/users/route.js.map +2 -2
- package/dist/modules/auth/cli.js +2 -3
- package/dist/modules/auth/cli.js.map +2 -2
- package/dist/modules/configs/lib/upgrade-actions.js +0 -22
- package/dist/modules/configs/lib/upgrade-actions.js.map +2 -2
- package/dist/modules/customer_accounts/widgets/injection-table.js +2 -0
- package/dist/modules/customer_accounts/widgets/injection-table.js.map +2 -2
- package/dist/modules/customers/backend/customers/companies-v2/[id]/page.js +1 -7
- package/dist/modules/customers/backend/customers/companies-v2/[id]/page.js.map +2 -2
- package/dist/modules/customers/components/detail/CompanyDetailTabs.js +7 -11
- package/dist/modules/customers/components/detail/CompanyDetailTabs.js.map +2 -2
- package/dist/modules/dashboards/api/roles/widgets/route.js +3 -22
- package/dist/modules/dashboards/api/roles/widgets/route.js.map +2 -2
- package/dist/modules/dashboards/api/users/widgets/route.js +3 -22
- package/dist/modules/dashboards/api/users/widgets/route.js.map +2 -2
- package/dist/modules/dashboards/cli.js +3 -4
- package/dist/modules/dashboards/cli.js.map +2 -2
- package/dist/modules/dashboards/lib/widgetAssignmentScope.js +1 -9
- package/dist/modules/dashboards/lib/widgetAssignmentScope.js.map +2 -2
- package/dist/modules/dictionaries/commands/entries.js +14 -7
- package/dist/modules/dictionaries/commands/entries.js.map +2 -2
- package/dist/modules/dictionaries/commands/entry-operations.js +16 -7
- package/dist/modules/dictionaries/commands/entry-operations.js.map +2 -2
- package/dist/modules/dictionaries/commands/factory.js +3 -9
- package/dist/modules/dictionaries/commands/factory.js.map +2 -2
- package/dist/modules/dictionaries/fields/dictionary.js +41 -56
- package/dist/modules/dictionaries/fields/dictionary.js.map +2 -2
- package/dist/modules/directory/utils/organizationScope.js +3 -10
- package/dist/modules/directory/utils/organizationScope.js.map +2 -2
- package/dist/modules/entities/api/records.js +4 -5
- package/dist/modules/entities/api/records.js.map +2 -2
- package/dist/modules/entities/backend/entities/system/[entityId]/page.meta.js +0 -1
- package/dist/modules/entities/backend/entities/system/[entityId]/page.meta.js.map +2 -2
- package/dist/modules/entities/backend/entities/user/[entityId]/page.js +49 -49
- package/dist/modules/entities/backend/entities/user/[entityId]/page.js.map +2 -2
- package/dist/modules/entities/backend/entities/user/[entityId]/page.meta.js +0 -1
- package/dist/modules/entities/backend/entities/user/[entityId]/page.meta.js.map +2 -2
- package/dist/modules/entities/cli.js +1 -2
- package/dist/modules/entities/cli.js.map +2 -2
- package/dist/modules/query_index/api/status.js +8 -2
- package/dist/modules/query_index/api/status.js.map +2 -2
- package/dist/modules/sales/commands/documents.js +0 -44
- package/dist/modules/sales/commands/documents.js.map +2 -2
- package/dist/modules/sales/commands/returns.js +27 -2
- package/dist/modules/sales/commands/returns.js.map +2 -2
- package/dist/modules/sales/components/documents/AddressesSection.js +2 -6
- package/dist/modules/sales/components/documents/AddressesSection.js.map +2 -2
- package/dist/modules/sales/components/documents/ItemsSection.js +0 -1
- package/dist/modules/sales/components/documents/ItemsSection.js.map +2 -2
- package/dist/modules/sales/components/documents/LineItemDialog.js +0 -9
- package/dist/modules/sales/components/documents/LineItemDialog.js.map +2 -2
- package/dist/modules/sales/components/documents/SalesDocumentForm.js +0 -44
- package/dist/modules/sales/components/documents/SalesDocumentForm.js.map +2 -2
- package/dist/modules/sales/components/documents/ShipmentDialog.js +38 -59
- package/dist/modules/sales/components/documents/ShipmentDialog.js.map +2 -2
- package/dist/modules/sales/lib/shipments/snapshots.js +1 -27
- package/dist/modules/sales/lib/shipments/snapshots.js.map +2 -2
- package/dist/modules/workflows/frontend/checkout-demo/page.js +8 -1
- package/dist/modules/workflows/frontend/checkout-demo/page.js.map +2 -2
- package/dist/modules/workflows/lib/activity-executor.js +1 -1
- package/dist/modules/workflows/lib/activity-executor.js.map +2 -2
- package/dist/modules/workflows/lib/find-definition.js +18 -2
- package/dist/modules/workflows/lib/find-definition.js.map +2 -2
- package/dist/modules/workflows/lib/signal-handler.js +3 -2
- package/dist/modules/workflows/lib/signal-handler.js.map +2 -2
- package/dist/modules/workflows/lib/step-handler.js +4 -8
- package/dist/modules/workflows/lib/step-handler.js.map +2 -2
- package/dist/modules/workflows/lib/task-handler.js +3 -5
- package/dist/modules/workflows/lib/task-handler.js.map +2 -2
- package/dist/modules/workflows/lib/timer-handler.js +2 -1
- package/dist/modules/workflows/lib/timer-handler.js.map +2 -2
- package/dist/modules/workflows/lib/transition-handler.js +5 -13
- package/dist/modules/workflows/lib/transition-handler.js.map +2 -2
- package/dist/modules/workflows/lib/workflow-executor.js +11 -9
- package/dist/modules/workflows/lib/workflow-executor.js.map +2 -2
- package/dist/modules/workflows/migrations/Migration20260715120000.js +68 -0
- package/dist/modules/workflows/migrations/Migration20260715120000.js.map +7 -0
- package/dist/modules/workflows/migrations/Migration20260716120000.js +24 -0
- package/dist/modules/workflows/migrations/Migration20260716120000.js.map +7 -0
- package/dist/modules/workflows/workflows.js +2 -0
- package/dist/modules/workflows/workflows.js.map +2 -2
- package/package.json +8 -9
- package/src/modules/api_keys/api/keys/route.ts +9 -27
- package/src/modules/api_keys/cli.ts +3 -2
- package/src/modules/attachments/api/file/[id]/route.ts +7 -11
- package/src/modules/attachments/api/image/[id]/[[...slug]]/route.ts +7 -11
- package/src/modules/attachments/api/route.ts +21 -26
- package/src/modules/auth/api/users/route.ts +2 -11
- package/src/modules/auth/cli.ts +2 -3
- package/src/modules/configs/i18n/de.json +1 -5
- package/src/modules/configs/i18n/en.json +1 -5
- package/src/modules/configs/i18n/es.json +1 -5
- package/src/modules/configs/i18n/pl.json +1 -5
- package/src/modules/configs/lib/upgrade-actions.ts +0 -24
- package/src/modules/customer_accounts/AGENTS.md +6 -8
- package/src/modules/customer_accounts/widgets/injection-table.ts +2 -0
- package/src/modules/customers/backend/customers/companies-v2/[id]/page.tsx +1 -11
- package/src/modules/customers/components/detail/CompanyDetailTabs.tsx +7 -13
- package/src/modules/dashboards/api/roles/widgets/route.ts +3 -22
- package/src/modules/dashboards/api/users/widgets/route.ts +3 -22
- package/src/modules/dashboards/cli.ts +9 -4
- package/src/modules/dashboards/lib/widgetAssignmentScope.ts +0 -18
- package/src/modules/dictionaries/commands/entries.ts +16 -7
- package/src/modules/dictionaries/commands/entry-operations.ts +18 -8
- package/src/modules/dictionaries/commands/factory.ts +2 -8
- package/src/modules/dictionaries/fields/dictionary.tsx +32 -55
- package/src/modules/dictionaries/i18n/de.json +0 -2
- package/src/modules/dictionaries/i18n/en.json +0 -2
- package/src/modules/dictionaries/i18n/es.json +0 -2
- package/src/modules/dictionaries/i18n/pl.json +0 -2
- package/src/modules/directory/utils/organizationScope.ts +2 -36
- package/src/modules/entities/api/records.ts +7 -5
- package/src/modules/entities/backend/entities/system/[entityId]/page.meta.ts +0 -1
- package/src/modules/entities/backend/entities/user/[entityId]/page.meta.ts +0 -1
- package/src/modules/entities/backend/entities/user/[entityId]/page.tsx +49 -51
- package/src/modules/entities/cli.ts +1 -2
- package/src/modules/entities/i18n/de.json +0 -34
- package/src/modules/entities/i18n/en.json +0 -34
- package/src/modules/entities/i18n/es.json +0 -34
- package/src/modules/entities/i18n/pl.json +0 -34
- package/src/modules/query_index/api/status.ts +8 -2
- package/src/modules/sales/commands/documents.ts +0 -65
- package/src/modules/sales/commands/returns.ts +32 -2
- package/src/modules/sales/components/documents/AddressesSection.tsx +2 -6
- package/src/modules/sales/components/documents/ItemsSection.tsx +0 -5
- package/src/modules/sales/components/documents/LineItemDialog.tsx +0 -10
- package/src/modules/sales/components/documents/SalesDocumentForm.tsx +0 -46
- package/src/modules/sales/components/documents/ShipmentDialog.tsx +40 -65
- package/src/modules/sales/i18n/de.json +0 -4
- package/src/modules/sales/i18n/en.json +0 -4
- package/src/modules/sales/i18n/es.json +0 -4
- package/src/modules/sales/i18n/pl.json +0 -4
- package/src/modules/sales/lib/shipments/snapshots.ts +0 -30
- package/src/modules/workflows/frontend/checkout-demo/page.tsx +12 -1
- package/src/modules/workflows/lib/activity-executor.ts +22 -2
- package/src/modules/workflows/lib/find-definition.ts +53 -1
- package/src/modules/workflows/lib/signal-handler.ts +5 -4
- package/src/modules/workflows/lib/step-handler.ts +4 -8
- package/src/modules/workflows/lib/task-handler.ts +2 -4
- package/src/modules/workflows/lib/timer-handler.ts +3 -2
- package/src/modules/workflows/lib/transition-handler.ts +5 -13
- package/src/modules/workflows/lib/workflow-executor.ts +11 -8
- package/src/modules/workflows/migrations/Migration20260715120000.ts +114 -0
- package/src/modules/workflows/migrations/Migration20260716120000.ts +57 -0
- package/src/modules/workflows/workflows.ts +2 -0
- package/dist/modules/attachments/lib/reconcileOrganization.js +0 -110
- package/dist/modules/attachments/lib/reconcileOrganization.js.map +0 -7
- package/dist/modules/attachments/lib/requestScope.js +0 -10
- package/dist/modules/attachments/lib/requestScope.js.map +0 -7
- package/dist/modules/customers/components/detail/useDealsAccess.js +0 -16
- package/dist/modules/customers/components/detail/useDealsAccess.js.map +0 -7
- package/src/modules/attachments/lib/reconcileOrganization.ts +0 -188
- package/src/modules/attachments/lib/requestScope.ts +0 -27
- package/src/modules/customers/components/detail/useDealsAccess.ts +0 -19
|
@@ -18,13 +18,6 @@ export type OrganizationScope = {
|
|
|
18
18
|
filterIds: string[] | null
|
|
19
19
|
allowedIds: string[] | null
|
|
20
20
|
tenantId: string | null
|
|
21
|
-
// True when the caller explicitly selected a concrete organization (cookie /
|
|
22
|
-
// selectedId param) that could not be honored — it does not exist for the
|
|
23
|
-
// tenant or is not accessible. Reads degrade gracefully (filterIds/selectedId
|
|
24
|
-
// fall back to the caller's accessible orgs), but writes MUST fail loudly on
|
|
25
|
-
// this so a record never lands under an org the caller did not intend. Absent
|
|
26
|
-
// (undefined) means the selection — if any — was honored.
|
|
27
|
-
selectionRejected?: boolean
|
|
28
21
|
}
|
|
29
22
|
|
|
30
23
|
// Phase 4 — short-TTL cache for resolveOrganizationScopeForRequest.
|
|
@@ -86,8 +79,7 @@ function isValidCachedScope(value: unknown): value is OrganizationScope {
|
|
|
86
79
|
const record = value as Partial<OrganizationScope>
|
|
87
80
|
const idOk = (v: unknown) => v === null || typeof v === 'string'
|
|
88
81
|
const arrOk = (v: unknown) => v === null || (Array.isArray(v) && v.every((entry) => typeof entry === 'string'))
|
|
89
|
-
|
|
90
|
-
return idOk(record.selectedId) && idOk(record.tenantId) && arrOk(record.filterIds) && arrOk(record.allowedIds) && flagOk
|
|
82
|
+
return idOk(record.selectedId) && idOk(record.tenantId) && arrOk(record.filterIds) && arrOk(record.allowedIds)
|
|
91
83
|
}
|
|
92
84
|
|
|
93
85
|
function resolveCacheFromContainer(container: AwilixContainer | null | undefined): CacheStrategy | null {
|
|
@@ -328,18 +320,9 @@ export async function resolveOrganizationScope({
|
|
|
328
320
|
const initialSelected =
|
|
329
321
|
normalizedSelectedId
|
|
330
322
|
?? (widenToAllOrgs ? null : accountOrgId ?? null)
|
|
331
|
-
// A selection is only honored when it resolves to a real, non-deleted org for
|
|
332
|
-
// this tenant. `orgDescendants` holds exactly the existing orgs among the
|
|
333
|
-
// candidate ids, so a stale/dead id (e.g. a selected-org cookie or JWT org
|
|
334
|
-
// that no longer resolves after a DB reset) has no entry and is dropped here.
|
|
335
|
-
// Without the existence guard an unrestricted (all-orgs) principal — whose
|
|
336
|
-
// `allowedSet` is null — would accept the dead id as `effectiveSelected`, and
|
|
337
|
-
// writes derived from `selectedId` would land under an org the read scope
|
|
338
|
-
// (`filterIds`) never filters to, silently orphaning the record.
|
|
339
|
-
const selectionResolvesToOrg = (id: string): boolean => orgDescendants.has(id)
|
|
340
323
|
let effectiveSelected: string | null = null
|
|
341
324
|
if (initialSelected) {
|
|
342
|
-
if (
|
|
325
|
+
if (allowedSet === null || allowedSet.has(initialSelected)) {
|
|
343
326
|
effectiveSelected = initialSelected
|
|
344
327
|
}
|
|
345
328
|
}
|
|
@@ -353,13 +336,6 @@ export async function resolveOrganizationScope({
|
|
|
353
336
|
filterSet = null
|
|
354
337
|
} else if (auth.orgId) {
|
|
355
338
|
filterSet = loadFallbackSet()
|
|
356
|
-
// Keep the write target (`selectedId`) aligned with the read scope
|
|
357
|
-
// (`filterIds`): when an unrestricted principal's requested selection was
|
|
358
|
-
// dropped above, fall the selection back to the account org too so a record
|
|
359
|
-
// created here is always readable back by the same caller.
|
|
360
|
-
if (!effectiveSelected && fallbackOrgId && filterSet && filterSet.size > 0) {
|
|
361
|
-
effectiveSelected = fallbackOrgId
|
|
362
|
-
}
|
|
363
339
|
}
|
|
364
340
|
|
|
365
341
|
if ((!filterSet || filterSet.size === 0) && fallbackOrgId && !widenToAllOrgs) {
|
|
@@ -372,21 +348,11 @@ export async function resolveOrganizationScope({
|
|
|
372
348
|
}
|
|
373
349
|
}
|
|
374
350
|
|
|
375
|
-
// A concrete organization was explicitly requested (`normalizedSelectedId` is
|
|
376
|
-
// null for both "no selection" and the "all organizations" token) but the
|
|
377
|
-
// resolver could not honor it — it was dropped as non-existent/inaccessible
|
|
378
|
-
// and the effective selection fell back to something else. Surface this so the
|
|
379
|
-
// write layer can reject the request instead of silently creating the record
|
|
380
|
-
// under the fallback org. Only set the field when true to keep the scope shape
|
|
381
|
-
// unchanged for the common (honored) case.
|
|
382
|
-
const selectionRejected = normalizedSelectedId !== null && effectiveSelected !== normalizedSelectedId
|
|
383
|
-
|
|
384
351
|
return {
|
|
385
352
|
selectedId: effectiveSelected,
|
|
386
353
|
filterIds: filterSet ? Array.from(filterSet) : null,
|
|
387
354
|
allowedIds: allowedSet ? Array.from(allowedSet) : null,
|
|
388
355
|
tenantId,
|
|
389
|
-
...(selectionRejected ? { selectionRejected: true } : {}),
|
|
390
356
|
}
|
|
391
357
|
}
|
|
392
358
|
|
|
@@ -8,7 +8,6 @@ import type { RbacService } from '@open-mercato/core/modules/auth/services/rbacS
|
|
|
8
8
|
import { resolveOrganizationScope, getSelectedOrganizationFromRequest } from '@open-mercato/core/modules/directory/utils/organizationScope'
|
|
9
9
|
import { SYSTEM_ENTITY_RECORDS_BLOCKED_CODE, isOrmBackedSystemEntityId } from '@open-mercato/shared/lib/data/engine'
|
|
10
10
|
import { parseBooleanToken, parseBooleanWithDefault } from '@open-mercato/shared/lib/boolean'
|
|
11
|
-
import { parseCommaSeparatedList } from '@open-mercato/shared/lib/string'
|
|
12
11
|
import { setRecordCustomFields } from '../lib/helpers'
|
|
13
12
|
import { CustomFieldValue } from '../data/entities'
|
|
14
13
|
import type { OpenApiRouteDoc } from '@open-mercato/shared/lib/openapi'
|
|
@@ -152,7 +151,10 @@ export async function GET(req: Request) {
|
|
|
152
151
|
const sortDir = (url.searchParams.get('sortDir') || 'asc').toLowerCase() === 'desc' ? 'desc' : 'asc'
|
|
153
152
|
const withDeleted = parseBooleanWithDefault(url.searchParams.get('withDeleted'), false)
|
|
154
153
|
const searchTerm = (url.searchParams.get('search') || '').trim()
|
|
155
|
-
const searchFields =
|
|
154
|
+
const searchFields = (url.searchParams.get('searchFields') || '')
|
|
155
|
+
.split(',')
|
|
156
|
+
.map((field) => field.trim())
|
|
157
|
+
.filter(Boolean)
|
|
156
158
|
|
|
157
159
|
const qpEntries: Array<[string, string]> = []
|
|
158
160
|
for (const [key, val] of url.searchParams.entries()) {
|
|
@@ -209,11 +211,11 @@ export async function GET(req: Request) {
|
|
|
209
211
|
if (key.startsWith('cf_')) {
|
|
210
212
|
if (key.endsWith('In')) {
|
|
211
213
|
const base = key.slice(0, -2)
|
|
212
|
-
const values =
|
|
214
|
+
const values = val.split(',').map((s) => s.trim()).filter(Boolean)
|
|
213
215
|
;(filtersObj as any)[base] = { $in: values }
|
|
214
216
|
} else {
|
|
215
217
|
if (val.includes(',')) {
|
|
216
|
-
const values =
|
|
218
|
+
const values = val.split(',').map((s) => s.trim()).filter(Boolean)
|
|
217
219
|
;(filtersObj as any)[key] = { $in: values }
|
|
218
220
|
} else {
|
|
219
221
|
const parsed = parseBooleanToken(val)
|
|
@@ -222,7 +224,7 @@ export async function GET(req: Request) {
|
|
|
222
224
|
}
|
|
223
225
|
} else if (allowAnyKey) {
|
|
224
226
|
if (val.includes(',')) {
|
|
225
|
-
const values =
|
|
227
|
+
const values = val.split(',').map((s) => s.trim()).filter(Boolean)
|
|
226
228
|
;(filtersObj as any)[key] = { $in: values }
|
|
227
229
|
} else {
|
|
228
230
|
const parsed = parseBooleanToken(val)
|
|
@@ -167,7 +167,7 @@ export default function EditDefinitionsPage({ params }: { params?: { entityId?:
|
|
|
167
167
|
const entJson = await readApiResultOrThrow<EntitiesListResponse>(
|
|
168
168
|
'/api/entities/entities',
|
|
169
169
|
undefined,
|
|
170
|
-
{ errorMessage:
|
|
170
|
+
{ errorMessage: 'Failed to load entity metadata', fallback: { items: [] } },
|
|
171
171
|
)
|
|
172
172
|
const ent = (entJson.items || []).find((x: any) => x.entityId === entityId)
|
|
173
173
|
if (mounted) {
|
|
@@ -197,7 +197,7 @@ export default function EditDefinitionsPage({ params }: { params?: { entityId?:
|
|
|
197
197
|
const json = await readApiResultOrThrow<DefinitionsManageResponse>(
|
|
198
198
|
`/api/entities/definitions.manage?entityId=${encodeURIComponent(entityId)}`,
|
|
199
199
|
undefined,
|
|
200
|
-
{ errorMessage:
|
|
200
|
+
{ errorMessage: 'Failed to load entity definitions', fallback: { items: [], deletedKeys: [] } },
|
|
201
201
|
)
|
|
202
202
|
if (mounted) {
|
|
203
203
|
const loaded: Def[] = (json.items || []).map((d: any) => ({ key: d.key, kind: d.kind, configJson: d.configJson || {}, isActive: d.isActive !== false }))
|
|
@@ -220,14 +220,14 @@ export default function EditDefinitionsPage({ params }: { params?: { entityId?:
|
|
|
220
220
|
setSingleFieldsetPerRecord(json.settings?.singleFieldsetPerRecord !== false)
|
|
221
221
|
}
|
|
222
222
|
} catch (e: any) {
|
|
223
|
-
if (mounted) setError(e.message ||
|
|
223
|
+
if (mounted) setError(e.message || 'Failed to load')
|
|
224
224
|
} finally {
|
|
225
225
|
if (mounted) setLoading(false)
|
|
226
226
|
}
|
|
227
227
|
}
|
|
228
228
|
if (entityId) load()
|
|
229
229
|
return () => { mounted = false }
|
|
230
|
-
}, [entityId
|
|
230
|
+
}, [entityId])
|
|
231
231
|
|
|
232
232
|
function addField() {
|
|
233
233
|
setDefs((arr) => [
|
|
@@ -249,13 +249,13 @@ export default function EditDefinitionsPage({ params }: { params?: { entityId?:
|
|
|
249
249
|
body: JSON.stringify({ entityId, key }),
|
|
250
250
|
})
|
|
251
251
|
if (!call.ok) {
|
|
252
|
-
await raiseCrudError(call.response,
|
|
252
|
+
await raiseCrudError(call.response, 'Failed to restore field')
|
|
253
253
|
}
|
|
254
254
|
// Reload definitions & deleted keys
|
|
255
255
|
const j2 = await readApiResultOrThrow<DefinitionsManageResponse>(
|
|
256
256
|
`/api/entities/definitions.manage?entityId=${encodeURIComponent(entityId)}`,
|
|
257
257
|
undefined,
|
|
258
|
-
{ errorMessage:
|
|
258
|
+
{ errorMessage: 'Failed to reload field definitions', fallback: { items: [], deletedKeys: [] } },
|
|
259
259
|
)
|
|
260
260
|
const loaded: Def[] = (j2.items || []).map((d: any) => ({ key: d.key, kind: d.kind, configJson: d.configJson || {}, isActive: d.isActive !== false }))
|
|
261
261
|
loaded.sort(
|
|
@@ -264,10 +264,10 @@ export default function EditDefinitionsPage({ params }: { params?: { entityId?:
|
|
|
264
264
|
setDefs(loaded)
|
|
265
265
|
setDefsVersion(readVersionToken(j2.version))
|
|
266
266
|
setDeletedKeys(Array.isArray(j2.deletedKeys) ? j2.deletedKeys : [])
|
|
267
|
-
flash(
|
|
267
|
+
flash(`Restored ${key}`, 'success')
|
|
268
268
|
await invalidateCustomFieldDefs(queryClient, entityId)
|
|
269
269
|
} catch (e: any) {
|
|
270
|
-
flash(e?.message ||
|
|
270
|
+
flash(e?.message || 'Failed to restore field', 'error')
|
|
271
271
|
}
|
|
272
272
|
}
|
|
273
273
|
|
|
@@ -276,8 +276,8 @@ export default function EditDefinitionsPage({ params }: { params?: { entityId?:
|
|
|
276
276
|
setError(null)
|
|
277
277
|
try {
|
|
278
278
|
if (!validateAll()) {
|
|
279
|
-
flash(
|
|
280
|
-
throw new Error(
|
|
279
|
+
flash('Please fix validation errors in field definitions', 'error')
|
|
280
|
+
throw new Error('Validation failed')
|
|
281
281
|
}
|
|
282
282
|
const payload = {
|
|
283
283
|
entityId,
|
|
@@ -298,13 +298,13 @@ export default function EditDefinitionsPage({ params }: { params?: { entityId?:
|
|
|
298
298
|
)
|
|
299
299
|
if (!call.ok) {
|
|
300
300
|
if (surfaceRecordConflict({ status: call.status, body: call.result }, t)) return
|
|
301
|
-
await raiseCrudError(call.response,
|
|
301
|
+
await raiseCrudError(call.response, 'Failed to save definitions')
|
|
302
302
|
}
|
|
303
303
|
setDefsVersion(readVersionToken(call.result?.version))
|
|
304
304
|
await invalidateCustomFieldDefs(queryClient, entityId)
|
|
305
|
-
router.push(`/backend/entities/user?flash
|
|
305
|
+
router.push(`/backend/entities/user?flash=Definitions%20saved&type=success`)
|
|
306
306
|
} catch (e: any) {
|
|
307
|
-
setError(e.message ||
|
|
307
|
+
setError(e.message || 'Failed to save')
|
|
308
308
|
} finally {
|
|
309
309
|
setSaving(false)
|
|
310
310
|
}
|
|
@@ -321,13 +321,13 @@ export default function EditDefinitionsPage({ params }: { params?: { entityId?:
|
|
|
321
321
|
body: JSON.stringify({ entityId, key: def.key }),
|
|
322
322
|
})
|
|
323
323
|
if (!call.ok) {
|
|
324
|
-
await raiseCrudError(call.response,
|
|
324
|
+
await raiseCrudError(call.response, 'Failed to delete field')
|
|
325
325
|
}
|
|
326
326
|
// Keep the optimistic-lock token in sync after an out-of-band delete so a
|
|
327
327
|
// later Save does not falsely 409 against our own change (issue #3152).
|
|
328
328
|
setDefsVersion(readVersionToken(call.result?.version))
|
|
329
329
|
} catch (error) {
|
|
330
|
-
const message = error instanceof Error ? error.message :
|
|
330
|
+
const message = error instanceof Error ? error.message : 'Failed to delete field'
|
|
331
331
|
flash(message, 'error')
|
|
332
332
|
return
|
|
333
333
|
}
|
|
@@ -372,7 +372,7 @@ export default function EditDefinitionsPage({ params }: { params?: { entityId?:
|
|
|
372
372
|
setOrderSaving(true)
|
|
373
373
|
try {
|
|
374
374
|
// Do not save order when there are invalid keys/kinds
|
|
375
|
-
if (!validateAll()) throw new Error(
|
|
375
|
+
if (!validateAll()) throw new Error('Validation failed')
|
|
376
376
|
const payload = {
|
|
377
377
|
entityId,
|
|
378
378
|
definitions: defs.filter(d => !!d.key).map((d) => ({
|
|
@@ -396,14 +396,14 @@ export default function EditDefinitionsPage({ params }: { params?: { entityId?:
|
|
|
396
396
|
setOrderDirty(false)
|
|
397
397
|
return
|
|
398
398
|
}
|
|
399
|
-
await raiseCrudError(call.response,
|
|
399
|
+
await raiseCrudError(call.response, 'Failed to save order')
|
|
400
400
|
}
|
|
401
401
|
setDefsVersion(readVersionToken(call.result?.version))
|
|
402
402
|
setOrderDirty(false)
|
|
403
|
-
flash(
|
|
403
|
+
flash('Order saved', 'success')
|
|
404
404
|
await invalidateCustomFieldDefs(queryClient, entityId)
|
|
405
405
|
} catch (e: any) {
|
|
406
|
-
flash(e?.message ||
|
|
406
|
+
flash(e?.message || 'Failed to save order', 'error')
|
|
407
407
|
} finally {
|
|
408
408
|
setOrderSaving(false)
|
|
409
409
|
}
|
|
@@ -423,21 +423,21 @@ export default function EditDefinitionsPage({ params }: { params?: { entityId?:
|
|
|
423
423
|
|
|
424
424
|
const metadataFieldsReadOnly = entitySource === 'code'
|
|
425
425
|
const fields: CrudField[] = [
|
|
426
|
-
{ id: 'label', label:
|
|
427
|
-
{ id: 'description', label:
|
|
426
|
+
{ id: 'label', label: 'Label', type: 'text', required: true, readOnly: metadataFieldsReadOnly },
|
|
427
|
+
{ id: 'description', label: 'Description', type: 'textarea', readOnly: metadataFieldsReadOnly },
|
|
428
428
|
{
|
|
429
429
|
id: 'defaultEditor',
|
|
430
|
-
label:
|
|
430
|
+
label: 'Default Editor (multiline)',
|
|
431
431
|
type: 'select',
|
|
432
432
|
readOnly: metadataFieldsReadOnly,
|
|
433
433
|
options: [
|
|
434
|
-
{ value: '', label:
|
|
435
|
-
{ value: 'markdown', label:
|
|
436
|
-
{ value: 'simpleMarkdown', label:
|
|
437
|
-
{ value: 'htmlRichText', label:
|
|
434
|
+
{ value: '', label: 'Default (Markdown)' },
|
|
435
|
+
{ value: 'markdown', label: 'Markdown (UIW)' },
|
|
436
|
+
{ value: 'simpleMarkdown', label: 'Simple Markdown' },
|
|
437
|
+
{ value: 'htmlRichText', label: 'HTML Rich Text' },
|
|
438
438
|
],
|
|
439
439
|
} as any,
|
|
440
|
-
...(entitySource === 'custom' ? [{ id: 'showInSidebar', label:
|
|
440
|
+
...(entitySource === 'custom' ? [{ id: 'showInSidebar', label: 'Show in sidebar', type: 'checkbox' }] : []),
|
|
441
441
|
]
|
|
442
442
|
const renderFieldDefinitions = React.useCallback(() => (
|
|
443
443
|
<FieldDefinitionsEditor
|
|
@@ -474,7 +474,7 @@ export default function EditDefinitionsPage({ params }: { params?: { entityId?:
|
|
|
474
474
|
})
|
|
475
475
|
setOrderDirty(true)
|
|
476
476
|
}}
|
|
477
|
-
orderNotice={orderDirty ? { dirty: true, saving: orderSaving, message:
|
|
477
|
+
orderNotice={orderDirty ? { dirty: true, saving: orderSaving, message: 'Reordered — will auto-save on blur' } : undefined}
|
|
478
478
|
addButtonLabel={t('entities.customFields.editor.addField', 'Add Field')}
|
|
479
479
|
translate={t}
|
|
480
480
|
listRef={listRef}
|
|
@@ -491,22 +491,22 @@ export default function EditDefinitionsPage({ params }: { params?: { entityId?:
|
|
|
491
491
|
}}
|
|
492
492
|
/>
|
|
493
493
|
),
|
|
494
|
-
[defs, defErrors, deletedKeys, fieldsets, activeFieldset, singleFieldsetPerRecord, orderDirty, orderSaving, addField, removeField, restoreField, saveOrderIfDirty
|
|
494
|
+
[defs, defErrors, deletedKeys, fieldsets, activeFieldset, singleFieldsetPerRecord, orderDirty, orderSaving, addField, removeField, restoreField, saveOrderIfDirty])
|
|
495
495
|
|
|
496
|
-
const definitionsGroup: CrudFormGroup = { id: 'definitions', title:
|
|
496
|
+
const definitionsGroup: CrudFormGroup = { id: 'definitions', title: 'Field Definitions', column: 1, component: renderFieldDefinitions }
|
|
497
497
|
|
|
498
498
|
const groups: CrudFormGroup[] = [
|
|
499
|
-
{ id: 'settings', title:
|
|
499
|
+
{ id: 'settings', title: 'Entity Settings', column: 1, fields: entitySource === 'custom' ? ['label','description','defaultEditor','showInSidebar'] : ['label','description','defaultEditor'] },
|
|
500
500
|
definitionsGroup,
|
|
501
501
|
]
|
|
502
502
|
|
|
503
503
|
const handleCrudFormSubmit = React.useCallback(async (vals: Record<string, unknown>) => {
|
|
504
504
|
if (!entityId) {
|
|
505
|
-
throw createCrudFormError(
|
|
505
|
+
throw createCrudFormError('Invalid entity ID')
|
|
506
506
|
}
|
|
507
507
|
if (!validateAll()) {
|
|
508
|
-
flash(
|
|
509
|
-
throw createCrudFormError(
|
|
508
|
+
flash('Please fix validation errors in field definitions', 'error')
|
|
509
|
+
throw createCrudFormError('Please fix validation errors in field definitions')
|
|
510
510
|
}
|
|
511
511
|
// Code-declared system entities are not registered as custom entities — their
|
|
512
512
|
// metadata is owned by code and `POST /api/entities/entities` is fail-closed for
|
|
@@ -514,14 +514,14 @@ export default function EditDefinitionsPage({ params }: { params?: { entityId?:
|
|
|
514
514
|
// skip the registration call and persist definitions below.
|
|
515
515
|
if (shouldRegisterEntityMetadata(entitySource)) {
|
|
516
516
|
const entityPayload = buildEntityMetadataPayload(entitySource, vals)
|
|
517
|
-
if (!entityPayload) throw createCrudFormError(
|
|
517
|
+
if (!entityPayload) throw createCrudFormError('Validation failed')
|
|
518
518
|
const callEntity = await apiCall('/api/entities/entities', {
|
|
519
519
|
method: 'POST',
|
|
520
520
|
headers: { 'content-type': 'application/json' },
|
|
521
521
|
body: JSON.stringify({ entityId, ...entityPayload }),
|
|
522
522
|
})
|
|
523
523
|
if (!callEntity.ok) {
|
|
524
|
-
await raiseCrudError(callEntity.response,
|
|
524
|
+
await raiseCrudError(callEntity.response, 'Failed to save entity')
|
|
525
525
|
}
|
|
526
526
|
try { window.dispatchEvent(new Event('om:refresh-sidebar')) } catch {}
|
|
527
527
|
}
|
|
@@ -543,13 +543,13 @@ export default function EditDefinitionsPage({ params }: { params?: { entityId?:
|
|
|
543
543
|
}),
|
|
544
544
|
)
|
|
545
545
|
if (!callDefs.ok) {
|
|
546
|
-
await raiseCrudError(callDefs.response,
|
|
546
|
+
await raiseCrudError(callDefs.response, 'Failed to save definitions')
|
|
547
547
|
}
|
|
548
548
|
setDefsVersion(readVersionToken(callDefs.result?.version))
|
|
549
549
|
try { window.dispatchEvent(new Event('om:refresh-sidebar')) } catch {}
|
|
550
550
|
await invalidateCustomFieldDefs(queryClient, entityId)
|
|
551
|
-
flash(
|
|
552
|
-
}, [buildFieldsetPayload, defs, defsVersion, entityId, entitySource, queryClient, singleFieldsetPerRecord,
|
|
551
|
+
flash('Definitions saved', 'success')
|
|
552
|
+
}, [buildFieldsetPayload, defs, defsVersion, entityId, entitySource, queryClient, singleFieldsetPerRecord, validateAll])
|
|
553
553
|
|
|
554
554
|
if (!entityId) {
|
|
555
555
|
return (
|
|
@@ -557,8 +557,8 @@ export default function EditDefinitionsPage({ params }: { params?: { entityId?:
|
|
|
557
557
|
<PageBody>
|
|
558
558
|
<div className="p-6">
|
|
559
559
|
<Alert variant="destructive">
|
|
560
|
-
<AlertTitle>
|
|
561
|
-
<AlertDescription>
|
|
560
|
+
<AlertTitle>Invalid entity</AlertTitle>
|
|
561
|
+
<AlertDescription>The requested entity ID is missing or invalid.</AlertDescription>
|
|
562
562
|
</Alert>
|
|
563
563
|
</div>
|
|
564
564
|
</PageBody>
|
|
@@ -571,12 +571,12 @@ export default function EditDefinitionsPage({ params }: { params?: { entityId?:
|
|
|
571
571
|
<div className="p-4">
|
|
572
572
|
<CrudForm
|
|
573
573
|
schema={entityFormSchema}
|
|
574
|
-
title={
|
|
574
|
+
title={`Edit fieldset: ${requestedFieldset ?? entityId}`}
|
|
575
575
|
fields={[]}
|
|
576
576
|
groups={[definitionsGroup]}
|
|
577
577
|
initialValues={entityInitial as any}
|
|
578
578
|
isLoading={entityFormLoading || loading}
|
|
579
|
-
submitLabel=
|
|
579
|
+
submitLabel="Save"
|
|
580
580
|
deleteVisible={false}
|
|
581
581
|
backHref={undefined}
|
|
582
582
|
cancelHref={undefined}
|
|
@@ -592,32 +592,30 @@ export default function EditDefinitionsPage({ params }: { params?: { entityId?:
|
|
|
592
592
|
<PageBody>
|
|
593
593
|
<CrudForm
|
|
594
594
|
schema={entityFormSchema}
|
|
595
|
-
title={
|
|
595
|
+
title={`Edit Entity: ${entityId}`}
|
|
596
596
|
backHref={entitySource === 'code' ? "/backend/entities/system" : "/backend/entities/user"}
|
|
597
597
|
fields={fields}
|
|
598
598
|
groups={groups}
|
|
599
599
|
initialValues={entityInitial as any}
|
|
600
600
|
isLoading={entityFormLoading || loading}
|
|
601
|
-
submitLabel=
|
|
601
|
+
submitLabel="Save"
|
|
602
602
|
deleteVisible={entitySource === 'custom'}
|
|
603
603
|
extraActions={entitySource === 'custom' ? (
|
|
604
604
|
<Button variant="outline" asChild>
|
|
605
605
|
<Link href={`/backend/entities/user/${encodeURIComponent(entityId)}/records`}>
|
|
606
|
-
|
|
606
|
+
Show Records
|
|
607
607
|
</Link>
|
|
608
608
|
</Button>
|
|
609
609
|
) : null}
|
|
610
610
|
cancelHref={entitySource === 'code' ? "/backend/entities/system" : "/backend/entities/user"}
|
|
611
|
-
successRedirect={entitySource === 'code'
|
|
612
|
-
? `/backend/entities/system?flash=${encodeURIComponent(t('entities.customFields.flash.saved', 'Definitions saved'))}&type=success`
|
|
613
|
-
: `/backend/entities/user?flash=${encodeURIComponent(t('entities.customFields.flash.saved', 'Definitions saved'))}&type=success`}
|
|
611
|
+
successRedirect={entitySource === 'code' ? "/backend/entities/system?flash=Definitions%20saved&type=success" : "/backend/entities/user?flash=Definitions%20saved&type=success"}
|
|
614
612
|
onSubmit={handleCrudFormSubmit}
|
|
615
613
|
onDelete={entitySource === 'custom' ? async () => {
|
|
616
614
|
const callDelete = await apiCall('/api/entities/entities', { method: 'DELETE', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ entityId }) })
|
|
617
615
|
if (!callDelete.ok) {
|
|
618
|
-
await raiseCrudError(callDelete.response,
|
|
616
|
+
await raiseCrudError(callDelete.response, 'Failed to delete entity')
|
|
619
617
|
}
|
|
620
|
-
flash(
|
|
618
|
+
flash('Entity deleted', 'success')
|
|
621
619
|
try { window.dispatchEvent(new Event('om:refresh-sidebar')) } catch {}
|
|
622
620
|
} : undefined}
|
|
623
621
|
/>
|
|
@@ -10,7 +10,6 @@ import readline from 'node:readline/promises'
|
|
|
10
10
|
import { stdin as input, stdout as output } from 'node:process'
|
|
11
11
|
import { isTenantDataEncryptionEnabled } from '@open-mercato/shared/lib/encryption/toggles'
|
|
12
12
|
import { parseBooleanToken } from '@open-mercato/shared/lib/boolean'
|
|
13
|
-
import { parseCommaSeparatedList } from '@open-mercato/shared/lib/string'
|
|
14
13
|
import { createKmsService, type KmsService, type TenantDek } from '@open-mercato/shared/lib/encryption/kms'
|
|
15
14
|
import {
|
|
16
15
|
decryptWithAesGcm,
|
|
@@ -194,7 +193,7 @@ const addField: ModuleCli = {
|
|
|
194
193
|
let options: string[] | undefined
|
|
195
194
|
if (kind === 'select') {
|
|
196
195
|
const raw = (args.options as string) || await ask('Options (comma-separated)', 'low,medium,high')
|
|
197
|
-
options =
|
|
196
|
+
options = raw.split(',').map((s) => s.trim()).filter(Boolean)
|
|
198
197
|
}
|
|
199
198
|
let defaultValue: any = undefined
|
|
200
199
|
const defRaw = (args.default as string) ?? (args.defaultValue as string)
|
|
@@ -93,7 +93,6 @@
|
|
|
93
93
|
"entities.customFields.editor.noFieldsets": "Noch keine Feldgruppen definiert. Mit Feldgruppen lassen sich benutzerdefinierte Felder für verschiedene Varianten derselben Entität gruppieren (z. B. Mode- vs. Sportprodukte).",
|
|
94
94
|
"entities.customFields.editor.noGroup": "Keine Gruppe",
|
|
95
95
|
"entities.customFields.editor.noOptionsDefined": "Keine Optionen definiert.",
|
|
96
|
-
"entities.customFields.editor.noParameterPlaceholder": "-",
|
|
97
96
|
"entities.customFields.editor.noValidationRules": "Keine Validierungsregeln definiert.",
|
|
98
97
|
"entities.customFields.editor.optionLabelPlaceholder": "Für Benutzer sichtbare Beschriftung (optional)",
|
|
99
98
|
"entities.customFields.editor.options": "Optionen",
|
|
@@ -119,17 +118,6 @@
|
|
|
119
118
|
"entities.customFields.editor.unassignedFields": "Nicht zugewiesene Felder",
|
|
120
119
|
"entities.customFields.editor.unitsOptional": "Einheiten (optional)",
|
|
121
120
|
"entities.customFields.editor.unitsPlaceholder": "kg, cm usw.",
|
|
122
|
-
"entities.customFields.editor.validation.date": "Datum",
|
|
123
|
-
"entities.customFields.editor.validation.eq": "gleich",
|
|
124
|
-
"entities.customFields.editor.validation.float": "Gleitkommazahl",
|
|
125
|
-
"entities.customFields.editor.validation.gt": "größer als",
|
|
126
|
-
"entities.customFields.editor.validation.gte": "größer oder gleich",
|
|
127
|
-
"entities.customFields.editor.validation.integer": "Ganzzahl",
|
|
128
|
-
"entities.customFields.editor.validation.lt": "kleiner als",
|
|
129
|
-
"entities.customFields.editor.validation.lte": "kleiner oder gleich",
|
|
130
|
-
"entities.customFields.editor.validation.ne": "ungleich",
|
|
131
|
-
"entities.customFields.editor.validation.regex": "Regex",
|
|
132
|
-
"entities.customFields.editor.validation.required": "erforderlich",
|
|
133
121
|
"entities.customFields.editor.validationRules": "Validierungsregeln",
|
|
134
122
|
"entities.customFields.editor.value": "Wert",
|
|
135
123
|
"entities.customFields.editor.valueRequired": "Der Wert ist erforderlich",
|
|
@@ -195,28 +183,6 @@
|
|
|
195
183
|
"entities.nav.systemEntities": "Systementitäten",
|
|
196
184
|
"entities.nav.userEntities": "Benutzerentitäten",
|
|
197
185
|
"entities.nav.userEntities.create": "Entität erstellen",
|
|
198
|
-
"entities.userEntities.edit.errors.deleteEntityFailed": "Entität konnte nicht gelöscht werden",
|
|
199
|
-
"entities.userEntities.edit.errors.invalidEntityDescription": "Die angeforderte Entitäts-ID fehlt oder ist ungültig.",
|
|
200
|
-
"entities.userEntities.edit.errors.invalidEntityId": "Ungültige Entitäts-ID",
|
|
201
|
-
"entities.userEntities.edit.errors.invalidEntityTitle": "Ungültige Entität",
|
|
202
|
-
"entities.userEntities.edit.errors.loadDefinitionsFailed": "Entitätsdefinitionen konnten nicht geladen werden",
|
|
203
|
-
"entities.userEntities.edit.errors.loadFailed": "Laden fehlgeschlagen",
|
|
204
|
-
"entities.userEntities.edit.errors.loadMetadataFailed": "Entitätsmetadaten konnten nicht geladen werden",
|
|
205
|
-
"entities.userEntities.edit.errors.reloadDefinitionsFailed": "Felddefinitionen konnten nicht neu geladen werden",
|
|
206
|
-
"entities.userEntities.edit.errors.restoreFieldFailed": "Feld konnte nicht wiederhergestellt werden",
|
|
207
|
-
"entities.userEntities.edit.errors.saveEntityFailed": "Entität konnte nicht gespeichert werden",
|
|
208
|
-
"entities.userEntities.edit.errors.saveOrderFailed": "Reihenfolge konnte nicht gespeichert werden",
|
|
209
|
-
"entities.userEntities.edit.errors.validationFailed": "Validierung fehlgeschlagen",
|
|
210
|
-
"entities.userEntities.edit.fieldsetTitle": "Feldgruppe bearbeiten: {{name}}",
|
|
211
|
-
"entities.userEntities.edit.flash.entityDeleted": "Entität gelöscht",
|
|
212
|
-
"entities.userEntities.edit.flash.orderSaved": "Reihenfolge gespeichert",
|
|
213
|
-
"entities.userEntities.edit.flash.restoredField": "{{key}} wiederhergestellt",
|
|
214
|
-
"entities.userEntities.edit.groups.definitions": "Felddefinitionen",
|
|
215
|
-
"entities.userEntities.edit.groups.settings": "Entitätseinstellungen",
|
|
216
|
-
"entities.userEntities.edit.orderNotice": "Neu angeordnet - wird beim Verlassen gespeichert",
|
|
217
|
-
"entities.userEntities.edit.pageTitle": "Definitionen bearbeiten",
|
|
218
|
-
"entities.userEntities.edit.showRecords": "Datensätze anzeigen",
|
|
219
|
-
"entities.userEntities.edit.title": "Entität bearbeiten: {{entityId}}",
|
|
220
186
|
"entities.userEntities.errors.entityIdExists": "Entitäts-ID ist bereits vorhanden",
|
|
221
187
|
"entities.userEntities.errors.entityIdRequired": "Entitäts-ID ist erforderlich",
|
|
222
188
|
"entities.userEntities.errors.loadFailed": "Entitäten konnten nicht geladen werden",
|
|
@@ -93,7 +93,6 @@
|
|
|
93
93
|
"entities.customFields.editor.noFieldsets": "No fieldsets defined yet. Fieldsets let you group custom fields for different variants of the same entity (e.g., Fashion vs. Sport products).",
|
|
94
94
|
"entities.customFields.editor.noGroup": "No group",
|
|
95
95
|
"entities.customFields.editor.noOptionsDefined": "No options defined.",
|
|
96
|
-
"entities.customFields.editor.noParameterPlaceholder": "-",
|
|
97
96
|
"entities.customFields.editor.noValidationRules": "No validation rules defined.",
|
|
98
97
|
"entities.customFields.editor.optionLabelPlaceholder": "Label shown to users (optional)",
|
|
99
98
|
"entities.customFields.editor.options": "Options",
|
|
@@ -119,17 +118,6 @@
|
|
|
119
118
|
"entities.customFields.editor.unassignedFields": "Unassigned fields",
|
|
120
119
|
"entities.customFields.editor.unitsOptional": "Units (optional)",
|
|
121
120
|
"entities.customFields.editor.unitsPlaceholder": "kg, cm, etc.",
|
|
122
|
-
"entities.customFields.editor.validation.date": "date",
|
|
123
|
-
"entities.customFields.editor.validation.eq": "eq",
|
|
124
|
-
"entities.customFields.editor.validation.float": "float",
|
|
125
|
-
"entities.customFields.editor.validation.gt": "gt",
|
|
126
|
-
"entities.customFields.editor.validation.gte": "gte",
|
|
127
|
-
"entities.customFields.editor.validation.integer": "integer",
|
|
128
|
-
"entities.customFields.editor.validation.lt": "lt",
|
|
129
|
-
"entities.customFields.editor.validation.lte": "lte",
|
|
130
|
-
"entities.customFields.editor.validation.ne": "ne",
|
|
131
|
-
"entities.customFields.editor.validation.regex": "regex",
|
|
132
|
-
"entities.customFields.editor.validation.required": "required",
|
|
133
121
|
"entities.customFields.editor.validationRules": "Validation rules",
|
|
134
122
|
"entities.customFields.editor.value": "Value",
|
|
135
123
|
"entities.customFields.editor.valueRequired": "Value is required",
|
|
@@ -195,28 +183,6 @@
|
|
|
195
183
|
"entities.nav.systemEntities": "System Entities",
|
|
196
184
|
"entities.nav.userEntities": "User Entities",
|
|
197
185
|
"entities.nav.userEntities.create": "Create Entity",
|
|
198
|
-
"entities.userEntities.edit.errors.deleteEntityFailed": "Failed to delete entity",
|
|
199
|
-
"entities.userEntities.edit.errors.invalidEntityDescription": "The requested entity ID is missing or invalid.",
|
|
200
|
-
"entities.userEntities.edit.errors.invalidEntityId": "Invalid entity ID",
|
|
201
|
-
"entities.userEntities.edit.errors.invalidEntityTitle": "Invalid entity",
|
|
202
|
-
"entities.userEntities.edit.errors.loadDefinitionsFailed": "Failed to load entity definitions",
|
|
203
|
-
"entities.userEntities.edit.errors.loadFailed": "Failed to load",
|
|
204
|
-
"entities.userEntities.edit.errors.loadMetadataFailed": "Failed to load entity metadata",
|
|
205
|
-
"entities.userEntities.edit.errors.reloadDefinitionsFailed": "Failed to reload field definitions",
|
|
206
|
-
"entities.userEntities.edit.errors.restoreFieldFailed": "Failed to restore field",
|
|
207
|
-
"entities.userEntities.edit.errors.saveEntityFailed": "Failed to save entity",
|
|
208
|
-
"entities.userEntities.edit.errors.saveOrderFailed": "Failed to save order",
|
|
209
|
-
"entities.userEntities.edit.errors.validationFailed": "Validation failed",
|
|
210
|
-
"entities.userEntities.edit.fieldsetTitle": "Edit fieldset: {{name}}",
|
|
211
|
-
"entities.userEntities.edit.flash.entityDeleted": "Entity deleted",
|
|
212
|
-
"entities.userEntities.edit.flash.orderSaved": "Order saved",
|
|
213
|
-
"entities.userEntities.edit.flash.restoredField": "Restored {{key}}",
|
|
214
|
-
"entities.userEntities.edit.groups.definitions": "Field Definitions",
|
|
215
|
-
"entities.userEntities.edit.groups.settings": "Entity Settings",
|
|
216
|
-
"entities.userEntities.edit.orderNotice": "Reordered - will auto-save on blur",
|
|
217
|
-
"entities.userEntities.edit.pageTitle": "Edit definitions",
|
|
218
|
-
"entities.userEntities.edit.showRecords": "Show Records",
|
|
219
|
-
"entities.userEntities.edit.title": "Edit Entity: {{entityId}}",
|
|
220
186
|
"entities.userEntities.errors.entityIdExists": "Entity ID already exists",
|
|
221
187
|
"entities.userEntities.errors.entityIdRequired": "Entity ID is required",
|
|
222
188
|
"entities.userEntities.errors.loadFailed": "Failed to load entities",
|
|
@@ -93,7 +93,6 @@
|
|
|
93
93
|
"entities.customFields.editor.noFieldsets": "Aún no se han definido conjuntos de campos. Los conjuntos de campos permiten agrupar campos personalizados para distintas variantes de la misma entidad (p. ej. productos de Moda vs. Deporte).",
|
|
94
94
|
"entities.customFields.editor.noGroup": "Sin grupo",
|
|
95
95
|
"entities.customFields.editor.noOptionsDefined": "No se han definido opciones.",
|
|
96
|
-
"entities.customFields.editor.noParameterPlaceholder": "-",
|
|
97
96
|
"entities.customFields.editor.noValidationRules": "No se han definido reglas de validación.",
|
|
98
97
|
"entities.customFields.editor.optionLabelPlaceholder": "Etiqueta visible para los usuarios (opcional)",
|
|
99
98
|
"entities.customFields.editor.options": "Opciones",
|
|
@@ -119,17 +118,6 @@
|
|
|
119
118
|
"entities.customFields.editor.unassignedFields": "Campos sin asignar",
|
|
120
119
|
"entities.customFields.editor.unitsOptional": "Unidades (opcional)",
|
|
121
120
|
"entities.customFields.editor.unitsPlaceholder": "kg, cm, etc.",
|
|
122
|
-
"entities.customFields.editor.validation.date": "fecha",
|
|
123
|
-
"entities.customFields.editor.validation.eq": "igual",
|
|
124
|
-
"entities.customFields.editor.validation.float": "decimal",
|
|
125
|
-
"entities.customFields.editor.validation.gt": "mayor que",
|
|
126
|
-
"entities.customFields.editor.validation.gte": "mayor o igual",
|
|
127
|
-
"entities.customFields.editor.validation.integer": "entero",
|
|
128
|
-
"entities.customFields.editor.validation.lt": "menor que",
|
|
129
|
-
"entities.customFields.editor.validation.lte": "menor o igual",
|
|
130
|
-
"entities.customFields.editor.validation.ne": "distinto",
|
|
131
|
-
"entities.customFields.editor.validation.regex": "regex",
|
|
132
|
-
"entities.customFields.editor.validation.required": "obligatorio",
|
|
133
121
|
"entities.customFields.editor.validationRules": "Reglas de validación",
|
|
134
122
|
"entities.customFields.editor.value": "Valor",
|
|
135
123
|
"entities.customFields.editor.valueRequired": "El valor es obligatorio",
|
|
@@ -195,28 +183,6 @@
|
|
|
195
183
|
"entities.nav.systemEntities": "Entidades del sistema",
|
|
196
184
|
"entities.nav.userEntities": "Entidades de usuario",
|
|
197
185
|
"entities.nav.userEntities.create": "Crear entidad",
|
|
198
|
-
"entities.userEntities.edit.errors.deleteEntityFailed": "No se pudo eliminar la entidad",
|
|
199
|
-
"entities.userEntities.edit.errors.invalidEntityDescription": "Falta el ID de la entidad solicitada o no es válido.",
|
|
200
|
-
"entities.userEntities.edit.errors.invalidEntityId": "ID de entidad no válido",
|
|
201
|
-
"entities.userEntities.edit.errors.invalidEntityTitle": "Entidad no válida",
|
|
202
|
-
"entities.userEntities.edit.errors.loadDefinitionsFailed": "No se pudieron cargar las definiciones de la entidad",
|
|
203
|
-
"entities.userEntities.edit.errors.loadFailed": "No se pudo cargar",
|
|
204
|
-
"entities.userEntities.edit.errors.loadMetadataFailed": "No se pudieron cargar los metadatos de la entidad",
|
|
205
|
-
"entities.userEntities.edit.errors.reloadDefinitionsFailed": "No se pudieron recargar las definiciones de campos",
|
|
206
|
-
"entities.userEntities.edit.errors.restoreFieldFailed": "No se pudo restaurar el campo",
|
|
207
|
-
"entities.userEntities.edit.errors.saveEntityFailed": "No se pudo guardar la entidad",
|
|
208
|
-
"entities.userEntities.edit.errors.saveOrderFailed": "No se pudo guardar el orden",
|
|
209
|
-
"entities.userEntities.edit.errors.validationFailed": "La validación falló",
|
|
210
|
-
"entities.userEntities.edit.fieldsetTitle": "Editar conjunto: {{name}}",
|
|
211
|
-
"entities.userEntities.edit.flash.entityDeleted": "Entidad eliminada",
|
|
212
|
-
"entities.userEntities.edit.flash.orderSaved": "Orden guardado",
|
|
213
|
-
"entities.userEntities.edit.flash.restoredField": "{{key}} restaurado",
|
|
214
|
-
"entities.userEntities.edit.groups.definitions": "Definiciones de campos",
|
|
215
|
-
"entities.userEntities.edit.groups.settings": "Configuración de la entidad",
|
|
216
|
-
"entities.userEntities.edit.orderNotice": "Reordenado - se guardará al salir del campo",
|
|
217
|
-
"entities.userEntities.edit.pageTitle": "Editar definiciones",
|
|
218
|
-
"entities.userEntities.edit.showRecords": "Mostrar registros",
|
|
219
|
-
"entities.userEntities.edit.title": "Editar entidad: {{entityId}}",
|
|
220
186
|
"entities.userEntities.errors.entityIdExists": "El ID de la entidad ya existe",
|
|
221
187
|
"entities.userEntities.errors.entityIdRequired": "El ID de la entidad es obligatorio",
|
|
222
188
|
"entities.userEntities.errors.loadFailed": "No se pudieron cargar las entidades",
|