@open-mercato/core 0.6.8-develop.6918.1.7b3f32b0c8 → 0.6.8-develop.6925.1.cefa200fa4
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/bootstrap.js +2 -1
- package/dist/bootstrap.js.map +2 -2
- package/dist/generated/entities/role/index.js +2 -0
- package/dist/generated/entities/role/index.js.map +2 -2
- package/dist/generated/entity-fields-registry.js +1 -0
- package/dist/generated/entity-fields-registry.js.map +2 -2
- package/dist/helpers/integration/api.js +4 -0
- package/dist/helpers/integration/api.js.map +2 -2
- package/dist/modules/audit_logs/api/audit-logs/actions/redo/route.js +5 -0
- package/dist/modules/audit_logs/api/audit-logs/actions/redo/route.js.map +2 -2
- package/dist/modules/audit_logs/api/audit-logs/actions/undo/route.js +5 -0
- package/dist/modules/audit_logs/api/audit-logs/actions/undo/route.js.map +2 -2
- package/dist/modules/audit_logs/backend/audit-logs/page.js +4 -4
- package/dist/modules/audit_logs/backend/audit-logs/page.js.map +2 -2
- package/dist/modules/audit_logs/components/AuditLogsActions.js +9 -2
- package/dist/modules/audit_logs/components/AuditLogsActions.js.map +2 -2
- package/dist/modules/auth/api/login.js +5 -2
- package/dist/modules/auth/api/login.js.map +2 -2
- package/dist/modules/auth/api/users/route.js +8 -5
- package/dist/modules/auth/api/users/route.js.map +2 -2
- package/dist/modules/auth/backend/users/[id]/edit/page.js +15 -1
- package/dist/modules/auth/backend/users/[id]/edit/page.js.map +2 -2
- package/dist/modules/auth/backend/users/page.js +7 -1
- package/dist/modules/auth/backend/users/page.js.map +2 -2
- package/dist/modules/auth/commands/users.js +175 -76
- package/dist/modules/auth/commands/users.js.map +2 -2
- package/dist/modules/auth/data/entities.js +4 -0
- package/dist/modules/auth/data/entities.js.map +2 -2
- package/dist/modules/auth/lib/sessionIntegrity.js +1 -1
- package/dist/modules/auth/lib/sessionIntegrity.js.map +2 -2
- package/dist/modules/auth/lib/setup-app.js +1 -1
- package/dist/modules/auth/lib/setup-app.js.map +2 -2
- package/dist/modules/auth/migrations/Migration20260728134212_auth.js +14 -0
- package/dist/modules/auth/migrations/Migration20260728134212_auth.js.map +7 -0
- package/dist/modules/catalog/search.js +8 -0
- package/dist/modules/catalog/search.js.map +2 -2
- package/dist/modules/customer_accounts/search.js +2 -0
- package/dist/modules/customer_accounts/search.js.map +2 -2
- package/dist/modules/customers/commands/deals.js +55 -8
- package/dist/modules/customers/commands/deals.js.map +2 -2
- package/dist/modules/customers/components/detail/create/dealCustomFieldControl.js +1 -1
- package/dist/modules/customers/components/detail/create/dealCustomFieldControl.js.map +2 -2
- package/dist/modules/customers/components/formConfig.js +2 -0
- package/dist/modules/customers/components/formConfig.js.map +2 -2
- package/dist/modules/inbox_ops/search.js +1 -0
- package/dist/modules/inbox_ops/search.js.map +2 -2
- package/dist/modules/messages/search.js +2 -1
- package/dist/modules/messages/search.js.map +2 -2
- package/dist/modules/planner/search.js +1 -0
- package/dist/modules/planner/search.js.map +2 -2
- package/dist/modules/resources/search.js +2 -0
- package/dist/modules/resources/search.js.map +2 -2
- package/dist/modules/sales/search.js +24 -2
- package/dist/modules/sales/search.js.map +2 -2
- package/dist/modules/staff/search.js +4 -0
- package/dist/modules/staff/search.js.map +2 -2
- package/dist/modules/wms/search.js +4 -0
- package/dist/modules/wms/search.js.map +2 -2
- package/generated/entities/role/index.ts +1 -0
- package/generated/entity-fields-registry.ts +1 -0
- package/package.json +7 -7
- package/src/bootstrap.ts +9 -2
- package/src/helpers/integration/api.ts +13 -0
- package/src/modules/audit_logs/api/audit-logs/actions/redo/route.ts +7 -0
- package/src/modules/audit_logs/api/audit-logs/actions/undo/route.ts +9 -0
- package/src/modules/audit_logs/backend/audit-logs/page.tsx +4 -4
- package/src/modules/audit_logs/components/AuditLogsActions.tsx +20 -4
- package/src/modules/auth/api/login.ts +9 -2
- package/src/modules/auth/api/users/route.ts +8 -4
- package/src/modules/auth/backend/users/[id]/edit/page.tsx +17 -1
- package/src/modules/auth/backend/users/page.tsx +11 -0
- package/src/modules/auth/commands/users.ts +251 -85
- package/src/modules/auth/data/entities.ts +3 -0
- package/src/modules/auth/i18n/de.json +6 -0
- package/src/modules/auth/i18n/en.json +6 -0
- package/src/modules/auth/i18n/es.json +6 -0
- package/src/modules/auth/i18n/ko.json +6 -0
- package/src/modules/auth/i18n/pl.json +6 -0
- package/src/modules/auth/lib/sessionIntegrity.ts +1 -1
- package/src/modules/auth/lib/setup-app.ts +1 -1
- package/src/modules/auth/migrations/.snapshot-open-mercato.json +16 -0
- package/src/modules/auth/migrations/Migration20260728134212_auth.ts +14 -0
- package/src/modules/catalog/search.ts +8 -0
- package/src/modules/customer_accounts/search.ts +2 -0
- package/src/modules/customers/commands/deals.ts +86 -14
- package/src/modules/customers/components/detail/create/dealCustomFieldControl.tsx +1 -1
- package/src/modules/customers/components/formConfig.tsx +2 -0
- package/src/modules/inbox_ops/search.ts +1 -0
- package/src/modules/messages/search.ts +2 -1
- package/src/modules/planner/search.ts +1 -0
- package/src/modules/resources/search.ts +2 -0
- package/src/modules/sales/search.ts +24 -2
- package/src/modules/staff/search.ts +4 -0
- package/src/modules/wms/search.ts +4 -0
|
@@ -279,6 +279,7 @@ export const searchConfig: SearchModuleConfig = {
|
|
|
279
279
|
entities: [
|
|
280
280
|
{
|
|
281
281
|
entityId: 'catalog:catalog_product',
|
|
282
|
+
aclFeatures: ['catalog.products.view'],
|
|
282
283
|
enabled: true,
|
|
283
284
|
priority: 10,
|
|
284
285
|
buildSource: async (ctx) => {
|
|
@@ -335,6 +336,7 @@ export const searchConfig: SearchModuleConfig = {
|
|
|
335
336
|
},
|
|
336
337
|
{
|
|
337
338
|
entityId: 'catalog:catalog_product_variant',
|
|
339
|
+
aclFeatures: ['catalog.products.view'],
|
|
338
340
|
enabled: true,
|
|
339
341
|
priority: 8,
|
|
340
342
|
buildSource: async (ctx) => {
|
|
@@ -363,6 +365,7 @@ export const searchConfig: SearchModuleConfig = {
|
|
|
363
365
|
},
|
|
364
366
|
{
|
|
365
367
|
entityId: 'catalog:catalog_product_category',
|
|
368
|
+
aclFeatures: ['catalog.categories.view'],
|
|
366
369
|
enabled: true,
|
|
367
370
|
priority: 7,
|
|
368
371
|
buildSource: async (ctx) => {
|
|
@@ -387,6 +390,7 @@ export const searchConfig: SearchModuleConfig = {
|
|
|
387
390
|
},
|
|
388
391
|
{
|
|
389
392
|
entityId: 'catalog:catalog_offer',
|
|
393
|
+
aclFeatures: ['sales.channels.manage'],
|
|
390
394
|
enabled: true,
|
|
391
395
|
priority: 7,
|
|
392
396
|
buildSource: async (ctx) => {
|
|
@@ -413,6 +417,7 @@ export const searchConfig: SearchModuleConfig = {
|
|
|
413
417
|
},
|
|
414
418
|
{
|
|
415
419
|
entityId: 'catalog:catalog_product_tag',
|
|
420
|
+
aclFeatures: ['catalog.products.view'],
|
|
416
421
|
enabled: true,
|
|
417
422
|
priority: 5,
|
|
418
423
|
buildSource: async (ctx) => {
|
|
@@ -434,6 +439,7 @@ export const searchConfig: SearchModuleConfig = {
|
|
|
434
439
|
},
|
|
435
440
|
{
|
|
436
441
|
entityId: 'catalog:catalog_price_kind',
|
|
442
|
+
aclFeatures: ['catalog.settings.manage'],
|
|
437
443
|
enabled: true,
|
|
438
444
|
priority: 4,
|
|
439
445
|
buildSource: async (ctx) => {
|
|
@@ -457,6 +463,7 @@ export const searchConfig: SearchModuleConfig = {
|
|
|
457
463
|
},
|
|
458
464
|
{
|
|
459
465
|
entityId: 'catalog:catalog_product_unit_conversion',
|
|
466
|
+
aclFeatures: ['catalog.products.view'],
|
|
460
467
|
enabled: true,
|
|
461
468
|
priority: 3,
|
|
462
469
|
buildSource: async (ctx) => {
|
|
@@ -485,6 +492,7 @@ export const searchConfig: SearchModuleConfig = {
|
|
|
485
492
|
},
|
|
486
493
|
{
|
|
487
494
|
entityId: 'catalog:catalog_option_schema_template',
|
|
495
|
+
aclFeatures: ['catalog.products.view'],
|
|
488
496
|
enabled: true,
|
|
489
497
|
priority: 4,
|
|
490
498
|
buildSource: async (ctx) => {
|
|
@@ -56,6 +56,7 @@ export const searchConfig: SearchModuleConfig = {
|
|
|
56
56
|
entities: [
|
|
57
57
|
{
|
|
58
58
|
entityId: 'customer_accounts:customer_user',
|
|
59
|
+
aclFeatures: ['customer_accounts.view'],
|
|
59
60
|
enabled: true,
|
|
60
61
|
priority: 6,
|
|
61
62
|
buildSource: async (ctx) => {
|
|
@@ -93,6 +94,7 @@ export const searchConfig: SearchModuleConfig = {
|
|
|
93
94
|
},
|
|
94
95
|
{
|
|
95
96
|
entityId: 'customer_accounts:customer_role',
|
|
97
|
+
aclFeatures: ['customer_accounts.view'],
|
|
96
98
|
enabled: true,
|
|
97
99
|
priority: 6,
|
|
98
100
|
buildSource: async (ctx) => {
|
|
@@ -72,6 +72,13 @@ type PipelineStageSnapshot = {
|
|
|
72
72
|
order: number
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
+
type DealClosureOutcome = 'won' | 'lost'
|
|
76
|
+
|
|
77
|
+
const TERMINAL_PIPELINE_STAGE_LABELS: Record<DealClosureOutcome, ReadonlySet<string>> = {
|
|
78
|
+
won: new Set(['won', 'win', 'closed won', 'closed win']),
|
|
79
|
+
lost: new Set(['lost', 'loose', 'closed lost', 'closed loose']),
|
|
80
|
+
}
|
|
81
|
+
|
|
75
82
|
type DealStageTransitionSnapshot = {
|
|
76
83
|
id: string
|
|
77
84
|
pipelineId: string
|
|
@@ -116,6 +123,56 @@ async function loadPipelineStageSnapshot(
|
|
|
116
123
|
}
|
|
117
124
|
}
|
|
118
125
|
|
|
126
|
+
function normalizePipelineStageLabel(value: string): string {
|
|
127
|
+
return value
|
|
128
|
+
.trim()
|
|
129
|
+
.toLowerCase()
|
|
130
|
+
.replace(/[^a-z0-9]+/g, ' ')
|
|
131
|
+
.trim()
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
function resolveRequestedClosureOutcome(input: DealUpdateInput): DealClosureOutcome | null {
|
|
135
|
+
if (input.closureOutcome === 'won' || input.closureOutcome === 'lost') {
|
|
136
|
+
return input.closureOutcome
|
|
137
|
+
}
|
|
138
|
+
if (input.status === 'win') return 'won'
|
|
139
|
+
if (input.status === 'loose') return 'lost'
|
|
140
|
+
return null
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
async function loadClosurePipelineStageSnapshot(
|
|
144
|
+
em: EntityManager,
|
|
145
|
+
input: {
|
|
146
|
+
pipelineId: string | null
|
|
147
|
+
closureOutcome: DealClosureOutcome
|
|
148
|
+
tenantId: string
|
|
149
|
+
organizationId: string
|
|
150
|
+
},
|
|
151
|
+
): Promise<PipelineStageSnapshot | null> {
|
|
152
|
+
if (!input.pipelineId) return null
|
|
153
|
+
|
|
154
|
+
const stages = await findWithDecryption(
|
|
155
|
+
em,
|
|
156
|
+
CustomerPipelineStage,
|
|
157
|
+
{
|
|
158
|
+
pipelineId: input.pipelineId,
|
|
159
|
+
tenantId: input.tenantId,
|
|
160
|
+
organizationId: input.organizationId,
|
|
161
|
+
},
|
|
162
|
+
{ orderBy: { order: 'ASC' } },
|
|
163
|
+
{ tenantId: input.tenantId, organizationId: input.organizationId },
|
|
164
|
+
)
|
|
165
|
+
const aliases = TERMINAL_PIPELINE_STAGE_LABELS[input.closureOutcome]
|
|
166
|
+
const stage = stages.find((candidate) => aliases.has(normalizePipelineStageLabel(candidate.label)))
|
|
167
|
+
if (!stage) return null
|
|
168
|
+
return {
|
|
169
|
+
id: stage.id,
|
|
170
|
+
pipelineId: stage.pipelineId,
|
|
171
|
+
label: stage.label,
|
|
172
|
+
order: stage.order,
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
119
176
|
async function resolvePipelineStageValue(
|
|
120
177
|
em: EntityManager,
|
|
121
178
|
pipelineStageId: string,
|
|
@@ -681,6 +738,7 @@ const updateDealCommand: CommandHandler<DealUpdateInput, { dealId: string }> = {
|
|
|
681
738
|
}
|
|
682
739
|
let nextPipelineStageLabel: string | null = null
|
|
683
740
|
let resolvedCurrentPipelineStageLabel: string | null = null
|
|
741
|
+
let pipelineStageAssignmentChanged = false
|
|
684
742
|
|
|
685
743
|
await runCrudCommandWrite({
|
|
686
744
|
ctx,
|
|
@@ -701,18 +759,32 @@ const updateDealCommand: CommandHandler<DealUpdateInput, { dealId: string }> = {
|
|
|
701
759
|
}),
|
|
702
760
|
phases: [
|
|
703
761
|
async () => {
|
|
762
|
+
const requestedClosureOutcome = resolveRequestedClosureOutcome(parsed)
|
|
763
|
+
const requestedPipelineId =
|
|
764
|
+
parsed.pipelineId !== undefined ? parsed.pipelineId ?? null : record.pipelineId ?? null
|
|
765
|
+
const closureStageSnapshot =
|
|
766
|
+
parsed.pipelineStageId === undefined && requestedClosureOutcome
|
|
767
|
+
? await loadClosurePipelineStageSnapshot(em, {
|
|
768
|
+
pipelineId: requestedPipelineId,
|
|
769
|
+
closureOutcome: requestedClosureOutcome,
|
|
770
|
+
tenantId: record.tenantId,
|
|
771
|
+
organizationId: record.organizationId,
|
|
772
|
+
})
|
|
773
|
+
: null
|
|
774
|
+
pipelineStageAssignmentChanged =
|
|
775
|
+
parsed.pipelineStageId !== undefined || closureStageSnapshot !== null
|
|
704
776
|
const pipelineAssignmentChanged =
|
|
705
|
-
parsed.pipelineId !== undefined ||
|
|
777
|
+
parsed.pipelineId !== undefined || pipelineStageAssignmentChanged
|
|
706
778
|
const requestedPipelineStageId =
|
|
707
779
|
parsed.pipelineStageId !== undefined
|
|
708
780
|
? parsed.pipelineStageId ?? null
|
|
709
|
-
: record.pipelineStageId ?? null
|
|
710
|
-
const requestedPipelineId =
|
|
711
|
-
parsed.pipelineId !== undefined ? parsed.pipelineId ?? null : record.pipelineId ?? null
|
|
781
|
+
: closureStageSnapshot?.id ?? record.pipelineStageId ?? null
|
|
712
782
|
|
|
713
|
-
nextStageSnapshot =
|
|
714
|
-
|
|
715
|
-
|
|
783
|
+
nextStageSnapshot = closureStageSnapshot ?? (
|
|
784
|
+
requestedPipelineStageId && (pipelineAssignmentChanged || !record.pipelineStage)
|
|
785
|
+
? await loadPipelineStageSnapshot(em, requestedPipelineStageId, record.tenantId, record.organizationId)
|
|
786
|
+
: null
|
|
787
|
+
)
|
|
716
788
|
if (pipelineAssignmentChanged) {
|
|
717
789
|
nextPipelineAssignment = resolvePipelineAssignment({
|
|
718
790
|
pipelineId: requestedPipelineId,
|
|
@@ -738,14 +810,14 @@ const updateDealCommand: CommandHandler<DealUpdateInput, { dealId: string }> = {
|
|
|
738
810
|
if (parsed.description !== undefined) record.description = parsed.description ?? null
|
|
739
811
|
if (parsed.status !== undefined) record.status = parsed.status ?? record.status
|
|
740
812
|
if (parsed.pipelineStage !== undefined) record.pipelineStage = parsed.pipelineStage ?? null
|
|
741
|
-
if (parsed.pipelineId !== undefined || (
|
|
813
|
+
if (parsed.pipelineId !== undefined || (pipelineStageAssignmentChanged && nextStageSnapshot)) {
|
|
742
814
|
record.pipelineId = nextPipelineAssignment.pipelineId
|
|
743
815
|
}
|
|
744
|
-
if (
|
|
816
|
+
if (pipelineStageAssignmentChanged) record.pipelineStageId = nextPipelineAssignment.pipelineStageId
|
|
745
817
|
|
|
746
|
-
if (nextPipelineStageLabel && (
|
|
818
|
+
if (nextPipelineStageLabel && (pipelineStageAssignmentChanged || !record.pipelineStage)) {
|
|
747
819
|
record.pipelineStage = nextPipelineStageLabel
|
|
748
|
-
} else if (resolvedCurrentPipelineStageLabel && (
|
|
820
|
+
} else if (resolvedCurrentPipelineStageLabel && (pipelineStageAssignmentChanged || !record.pipelineStage)) {
|
|
749
821
|
record.pipelineStage = resolvedCurrentPipelineStageLabel
|
|
750
822
|
}
|
|
751
823
|
|
|
@@ -774,9 +846,9 @@ const updateDealCommand: CommandHandler<DealUpdateInput, { dealId: string }> = {
|
|
|
774
846
|
const snapshot = nextStageSnapshot
|
|
775
847
|
if (!snapshot) return
|
|
776
848
|
const shouldRecord =
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
849
|
+
pipelineStageAssignmentChanged &&
|
|
850
|
+
nextPipelineAssignment.pipelineStageId !== null &&
|
|
851
|
+
nextPipelineAssignment.pipelineStageId !== previousPipelineStageId
|
|
780
852
|
if (!shouldRecord) return
|
|
781
853
|
await upsertDealStageTransition(em, {
|
|
782
854
|
deal: record,
|
|
@@ -422,6 +422,7 @@ const createPrimaryPhoneField = (t: Translator, defaultCountryIso2?: string): Cr
|
|
|
422
422
|
id: 'primaryPhone',
|
|
423
423
|
label: t('customers.people.form.primaryPhone'),
|
|
424
424
|
type: 'custom',
|
|
425
|
+
rendersOwnError: true,
|
|
425
426
|
component: function PrimaryPhoneField({ value, setValue, error, autoFocus, disabled, recordId }: CrudCustomFieldRenderProps) {
|
|
426
427
|
const currentRecordId = React.useMemo(() => (typeof recordId === 'string' ? recordId : null), [recordId])
|
|
427
428
|
|
|
@@ -1262,6 +1263,7 @@ export const createCompanyFormFields = (t: Translator, options?: { defaultCountr
|
|
|
1262
1263
|
id: 'primaryPhone',
|
|
1263
1264
|
label: t('customers.companies.detail.highlights.primaryPhone', 'Primary phone'),
|
|
1264
1265
|
type: 'custom',
|
|
1266
|
+
rendersOwnError: true,
|
|
1265
1267
|
layout: 'half',
|
|
1266
1268
|
component: ({ value, setValue, error, disabled, autoFocus }: CrudCustomFieldRenderProps) => (
|
|
1267
1269
|
<PhoneNumberField
|
|
@@ -50,7 +50,8 @@ export const searchConfig: SearchModuleConfig = {
|
|
|
50
50
|
entities: [
|
|
51
51
|
{
|
|
52
52
|
entityId: 'messages:message',
|
|
53
|
-
|
|
53
|
+
aclFeatures: ['messages.view'],
|
|
54
|
+
enabled: false,
|
|
54
55
|
priority: 5,
|
|
55
56
|
buildSource: async (ctx: SearchBuildContext): Promise<SearchIndexSource | null> => {
|
|
56
57
|
const { t } = await resolveTranslations()
|
|
@@ -106,6 +106,7 @@ export const searchConfig: SearchModuleConfig = {
|
|
|
106
106
|
entities: [
|
|
107
107
|
{
|
|
108
108
|
entityId: 'resources:resources_resource',
|
|
109
|
+
aclFeatures: ['resources.view'],
|
|
109
110
|
enabled: true,
|
|
110
111
|
priority: 8,
|
|
111
112
|
buildSource: async (ctx) => {
|
|
@@ -131,6 +132,7 @@ export const searchConfig: SearchModuleConfig = {
|
|
|
131
132
|
},
|
|
132
133
|
{
|
|
133
134
|
entityId: 'resources:resources_resource_type',
|
|
135
|
+
aclFeatures: ['resources.view'],
|
|
134
136
|
enabled: true,
|
|
135
137
|
priority: 7,
|
|
136
138
|
buildSource: async (ctx) => {
|
|
@@ -400,6 +400,7 @@ export const searchConfig: SearchModuleConfig = {
|
|
|
400
400
|
entities: [
|
|
401
401
|
{
|
|
402
402
|
entityId: 'sales:sales_channel',
|
|
403
|
+
aclFeatures: ['sales.channels.manage'],
|
|
403
404
|
enabled: true,
|
|
404
405
|
priority: 7,
|
|
405
406
|
buildSource: async (ctx) => {
|
|
@@ -426,6 +427,7 @@ export const searchConfig: SearchModuleConfig = {
|
|
|
426
427
|
},
|
|
427
428
|
{
|
|
428
429
|
entityId: 'sales:sales_order',
|
|
430
|
+
aclFeatures: ['sales.orders.view'],
|
|
429
431
|
enabled: true,
|
|
430
432
|
priority: 10,
|
|
431
433
|
buildSource: async (ctx) => {
|
|
@@ -449,6 +451,7 @@ export const searchConfig: SearchModuleConfig = {
|
|
|
449
451
|
},
|
|
450
452
|
{
|
|
451
453
|
entityId: 'sales:sales_quote',
|
|
454
|
+
aclFeatures: ['sales.quotes.view'],
|
|
452
455
|
enabled: true,
|
|
453
456
|
priority: 10,
|
|
454
457
|
buildSource: async (ctx) => {
|
|
@@ -471,6 +474,7 @@ export const searchConfig: SearchModuleConfig = {
|
|
|
471
474
|
},
|
|
472
475
|
{
|
|
473
476
|
entityId: 'sales:sales_order_line',
|
|
477
|
+
aclFeatures: ['sales.orders.view'],
|
|
474
478
|
enabled: true,
|
|
475
479
|
priority: 7,
|
|
476
480
|
fieldPolicy: {
|
|
@@ -499,6 +503,7 @@ export const searchConfig: SearchModuleConfig = {
|
|
|
499
503
|
},
|
|
500
504
|
{
|
|
501
505
|
entityId: 'sales:sales_quote_line',
|
|
506
|
+
aclFeatures: ['sales.quotes.view'],
|
|
502
507
|
enabled: true,
|
|
503
508
|
priority: 7,
|
|
504
509
|
fieldPolicy: {
|
|
@@ -527,6 +532,7 @@ export const searchConfig: SearchModuleConfig = {
|
|
|
527
532
|
},
|
|
528
533
|
{
|
|
529
534
|
entityId: 'sales:sales_order_adjustment',
|
|
535
|
+
aclFeatures: ['sales.orders.view'],
|
|
530
536
|
enabled: true,
|
|
531
537
|
priority: 6,
|
|
532
538
|
buildSource: async (ctx) => {
|
|
@@ -547,6 +553,7 @@ export const searchConfig: SearchModuleConfig = {
|
|
|
547
553
|
},
|
|
548
554
|
{
|
|
549
555
|
entityId: 'sales:sales_quote_adjustment',
|
|
556
|
+
aclFeatures: ['sales.quotes.view'],
|
|
550
557
|
enabled: true,
|
|
551
558
|
priority: 6,
|
|
552
559
|
buildSource: async (ctx) => {
|
|
@@ -567,6 +574,7 @@ export const searchConfig: SearchModuleConfig = {
|
|
|
567
574
|
},
|
|
568
575
|
{
|
|
569
576
|
entityId: 'sales:sales_shipment',
|
|
577
|
+
aclFeatures: ['sales.orders.view'],
|
|
570
578
|
enabled: true,
|
|
571
579
|
priority: 6,
|
|
572
580
|
buildSource: async (ctx) => {
|
|
@@ -587,6 +595,7 @@ export const searchConfig: SearchModuleConfig = {
|
|
|
587
595
|
},
|
|
588
596
|
{
|
|
589
597
|
entityId: 'sales:sales_shipment_item',
|
|
598
|
+
aclFeatures: ['sales.orders.view'],
|
|
590
599
|
enabled: true,
|
|
591
600
|
priority: 5,
|
|
592
601
|
buildSource: async (ctx) => {
|
|
@@ -605,6 +614,7 @@ export const searchConfig: SearchModuleConfig = {
|
|
|
605
614
|
},
|
|
606
615
|
{
|
|
607
616
|
entityId: 'sales:sales_invoice',
|
|
617
|
+
aclFeatures: ['sales.invoices.manage'],
|
|
608
618
|
enabled: true,
|
|
609
619
|
priority: 6,
|
|
610
620
|
buildSource: async (ctx) => {
|
|
@@ -625,6 +635,7 @@ export const searchConfig: SearchModuleConfig = {
|
|
|
625
635
|
},
|
|
626
636
|
{
|
|
627
637
|
entityId: 'sales:sales_invoice_line',
|
|
638
|
+
aclFeatures: ['sales.invoices.manage'],
|
|
628
639
|
enabled: true,
|
|
629
640
|
priority: 5,
|
|
630
641
|
fieldPolicy: {
|
|
@@ -651,6 +662,7 @@ export const searchConfig: SearchModuleConfig = {
|
|
|
651
662
|
},
|
|
652
663
|
{
|
|
653
664
|
entityId: 'sales:sales_credit_memo',
|
|
665
|
+
aclFeatures: ['sales.credit_memos.manage'],
|
|
654
666
|
enabled: true,
|
|
655
667
|
priority: 6,
|
|
656
668
|
buildSource: async (ctx) => {
|
|
@@ -671,6 +683,7 @@ export const searchConfig: SearchModuleConfig = {
|
|
|
671
683
|
},
|
|
672
684
|
{
|
|
673
685
|
entityId: 'sales:sales_credit_memo_line',
|
|
686
|
+
aclFeatures: ['sales.credit_memos.manage'],
|
|
674
687
|
enabled: true,
|
|
675
688
|
priority: 5,
|
|
676
689
|
fieldPolicy: {
|
|
@@ -697,6 +710,7 @@ export const searchConfig: SearchModuleConfig = {
|
|
|
697
710
|
},
|
|
698
711
|
{
|
|
699
712
|
entityId: 'sales:sales_payment',
|
|
713
|
+
aclFeatures: ['sales.orders.view'],
|
|
700
714
|
enabled: true,
|
|
701
715
|
priority: 8,
|
|
702
716
|
buildSource: async (ctx) => {
|
|
@@ -717,6 +731,7 @@ export const searchConfig: SearchModuleConfig = {
|
|
|
717
731
|
},
|
|
718
732
|
{
|
|
719
733
|
entityId: 'sales:sales_payment_allocation',
|
|
734
|
+
aclFeatures: ['sales.orders.view'],
|
|
720
735
|
enabled: true,
|
|
721
736
|
priority: 5,
|
|
722
737
|
buildSource: async (ctx) => {
|
|
@@ -737,7 +752,8 @@ export const searchConfig: SearchModuleConfig = {
|
|
|
737
752
|
},
|
|
738
753
|
{
|
|
739
754
|
entityId: 'sales:sales_note',
|
|
740
|
-
|
|
755
|
+
aclFeatures: ['sales.orders.view'],
|
|
756
|
+
enabled: false,
|
|
741
757
|
priority: 7,
|
|
742
758
|
buildSource: async (ctx) => {
|
|
743
759
|
const { t: translate } = await resolveTranslations()
|
|
@@ -760,7 +776,8 @@ export const searchConfig: SearchModuleConfig = {
|
|
|
760
776
|
},
|
|
761
777
|
{
|
|
762
778
|
entityId: 'sales:sales_document_address',
|
|
763
|
-
|
|
779
|
+
aclFeatures: ['sales.orders.view'],
|
|
780
|
+
enabled: false,
|
|
764
781
|
priority: 7,
|
|
765
782
|
buildSource: async (ctx) => {
|
|
766
783
|
const { t: translate } = await resolveTranslations()
|
|
@@ -786,6 +803,7 @@ export const searchConfig: SearchModuleConfig = {
|
|
|
786
803
|
},
|
|
787
804
|
{
|
|
788
805
|
entityId: 'sales:sales_shipping_method',
|
|
806
|
+
aclFeatures: ['sales.settings.manage'],
|
|
789
807
|
enabled: true,
|
|
790
808
|
priority: 4,
|
|
791
809
|
buildSource: async (ctx) => {
|
|
@@ -806,6 +824,7 @@ export const searchConfig: SearchModuleConfig = {
|
|
|
806
824
|
},
|
|
807
825
|
{
|
|
808
826
|
entityId: 'sales:sales_delivery_window',
|
|
827
|
+
aclFeatures: ['sales.settings.manage'],
|
|
809
828
|
enabled: true,
|
|
810
829
|
priority: 4,
|
|
811
830
|
buildSource: async (ctx) => {
|
|
@@ -826,6 +845,7 @@ export const searchConfig: SearchModuleConfig = {
|
|
|
826
845
|
},
|
|
827
846
|
{
|
|
828
847
|
entityId: 'sales:sales_payment_method',
|
|
848
|
+
aclFeatures: ['sales.settings.manage'],
|
|
829
849
|
enabled: true,
|
|
830
850
|
priority: 4,
|
|
831
851
|
buildSource: async (ctx) => {
|
|
@@ -846,6 +866,7 @@ export const searchConfig: SearchModuleConfig = {
|
|
|
846
866
|
},
|
|
847
867
|
{
|
|
848
868
|
entityId: 'sales:sales_tax_rate',
|
|
869
|
+
aclFeatures: ['sales.settings.manage'],
|
|
849
870
|
enabled: true,
|
|
850
871
|
priority: 4,
|
|
851
872
|
buildSource: async (ctx) => {
|
|
@@ -866,6 +887,7 @@ export const searchConfig: SearchModuleConfig = {
|
|
|
866
887
|
},
|
|
867
888
|
{
|
|
868
889
|
entityId: 'sales:sales_document_tag',
|
|
890
|
+
aclFeatures: ['sales.orders.view'],
|
|
869
891
|
enabled: true,
|
|
870
892
|
priority: 3,
|
|
871
893
|
buildSource: async (ctx) => {
|
|
@@ -122,6 +122,7 @@ export const searchConfig: SearchModuleConfig = {
|
|
|
122
122
|
entities: [
|
|
123
123
|
{
|
|
124
124
|
entityId: 'staff:staff_team',
|
|
125
|
+
aclFeatures: ['staff.view'],
|
|
125
126
|
enabled: true,
|
|
126
127
|
priority: 7,
|
|
127
128
|
buildSource: async (ctx) => {
|
|
@@ -144,6 +145,7 @@ export const searchConfig: SearchModuleConfig = {
|
|
|
144
145
|
},
|
|
145
146
|
{
|
|
146
147
|
entityId: 'staff:staff_team_member',
|
|
148
|
+
aclFeatures: ['staff.view'],
|
|
147
149
|
enabled: true,
|
|
148
150
|
priority: 7,
|
|
149
151
|
buildSource: async (ctx) => {
|
|
@@ -167,6 +169,7 @@ export const searchConfig: SearchModuleConfig = {
|
|
|
167
169
|
},
|
|
168
170
|
{
|
|
169
171
|
entityId: 'staff:staff_team_role',
|
|
172
|
+
aclFeatures: ['staff.view'],
|
|
170
173
|
enabled: true,
|
|
171
174
|
priority: 7,
|
|
172
175
|
buildSource: async (ctx) => {
|
|
@@ -190,6 +193,7 @@ export const searchConfig: SearchModuleConfig = {
|
|
|
190
193
|
},
|
|
191
194
|
{
|
|
192
195
|
entityId: 'staff:staff_time_project',
|
|
196
|
+
aclFeatures: ['staff.timesheets.projects.view'],
|
|
193
197
|
enabled: true,
|
|
194
198
|
priority: 7,
|
|
195
199
|
buildSource: async (ctx) => {
|
|
@@ -106,6 +106,7 @@ export const searchConfig: SearchModuleConfig = {
|
|
|
106
106
|
entities: [
|
|
107
107
|
{
|
|
108
108
|
entityId: E.wms.warehouse,
|
|
109
|
+
aclFeatures: ['wms.view'],
|
|
109
110
|
enabled: true,
|
|
110
111
|
priority: 8,
|
|
111
112
|
buildSource: async (ctx) => {
|
|
@@ -130,6 +131,7 @@ export const searchConfig: SearchModuleConfig = {
|
|
|
130
131
|
},
|
|
131
132
|
{
|
|
132
133
|
entityId: E.wms.warehouse_location,
|
|
134
|
+
aclFeatures: ['wms.view'],
|
|
133
135
|
enabled: true,
|
|
134
136
|
priority: 7,
|
|
135
137
|
buildSource: async (ctx) => {
|
|
@@ -155,6 +157,7 @@ export const searchConfig: SearchModuleConfig = {
|
|
|
155
157
|
},
|
|
156
158
|
{
|
|
157
159
|
entityId: E.wms.product_inventory_profile,
|
|
160
|
+
aclFeatures: ['wms.view'],
|
|
158
161
|
enabled: true,
|
|
159
162
|
priority: 8,
|
|
160
163
|
buildSource: async (ctx) => {
|
|
@@ -195,6 +198,7 @@ export const searchConfig: SearchModuleConfig = {
|
|
|
195
198
|
},
|
|
196
199
|
{
|
|
197
200
|
entityId: E.wms.inventory_lot,
|
|
201
|
+
aclFeatures: ['wms.view'],
|
|
198
202
|
enabled: true,
|
|
199
203
|
priority: 6,
|
|
200
204
|
buildSource: async (ctx) => {
|