@open-mercato/core 0.6.7-develop.6834.1.e76f4b8cbc → 0.6.7-develop.6851.1.c1680b00d8
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/customers/components/detail/ActivitiesDayStrip.js +2 -3
- package/dist/modules/customers/components/detail/ActivitiesDayStrip.js.map +2 -2
- package/dist/modules/dashboards/lib/aggregations.js +20 -6
- package/dist/modules/dashboards/lib/aggregations.js.map +2 -2
- package/dist/modules/entities/api/definitions.js +2 -0
- package/dist/modules/entities/api/definitions.js.map +2 -2
- package/dist/modules/entities/backend/entities/user/[entityId]/records/page.js +18 -3
- package/dist/modules/entities/backend/entities/user/[entityId]/records/page.js.map +2 -2
- package/dist/modules/entities/components/RecordListRelationCell.js +63 -0
- package/dist/modules/entities/components/RecordListRelationCell.js.map +7 -0
- package/dist/modules/entities/components/recordListRelationDisplays.js +80 -0
- package/dist/modules/entities/components/recordListRelationDisplays.js.map +7 -0
- package/dist/modules/inbox_ops/api/proposals/[id]/actions/[actionId]/route.js +14 -1
- package/dist/modules/inbox_ops/api/proposals/[id]/actions/[actionId]/route.js.map +2 -2
- package/dist/modules/inbox_ops/components/proposals/EditActionDialog.js +22 -17
- package/dist/modules/inbox_ops/components/proposals/EditActionDialog.js.map +2 -2
- package/dist/modules/query_index/api/reindex.js +10 -0
- package/dist/modules/query_index/api/reindex.js.map +2 -2
- package/dist/modules/query_index/cli.js +125 -1
- package/dist/modules/query_index/cli.js.map +2 -2
- package/dist/modules/query_index/lib/coverage.js +19 -7
- package/dist/modules/query_index/lib/coverage.js.map +2 -2
- package/dist/modules/query_index/lib/reindexer.js +43 -37
- package/dist/modules/query_index/lib/reindexer.js.map +2 -2
- package/dist/modules/sales/commands/documents.js +27 -0
- package/dist/modules/sales/commands/documents.js.map +2 -2
- package/dist/modules/sales/data/validators.js +2 -0
- package/dist/modules/sales/data/validators.js.map +2 -2
- package/package.json +8 -8
- package/src/modules/api_keys/i18n/ko.json +42 -0
- package/src/modules/attachments/i18n/ko.json +172 -0
- package/src/modules/audit_logs/i18n/ko.json +66 -0
- package/src/modules/auth/i18n/ko.json +255 -0
- package/src/modules/business_rules/i18n/ko.json +396 -0
- package/src/modules/catalog/i18n/ko.json +723 -0
- package/src/modules/communication_channels/i18n/ko.json +138 -0
- package/src/modules/configs/i18n/ko.json +197 -0
- package/src/modules/currencies/i18n/de.json +1 -0
- package/src/modules/currencies/i18n/en.json +1 -0
- package/src/modules/currencies/i18n/es.json +1 -0
- package/src/modules/currencies/i18n/ko.json +160 -0
- package/src/modules/currencies/i18n/pl.json +1 -0
- package/src/modules/customer_accounts/i18n/ko.json +354 -0
- package/src/modules/customers/components/detail/ActivitiesDayStrip.tsx +2 -3
- package/src/modules/customers/i18n/de.json +10 -0
- package/src/modules/customers/i18n/en.json +10 -0
- package/src/modules/customers/i18n/es.json +10 -0
- package/src/modules/customers/i18n/ko.json +2855 -0
- package/src/modules/customers/i18n/pl.json +10 -0
- package/src/modules/dashboards/i18n/ko.json +118 -0
- package/src/modules/dashboards/lib/aggregations.ts +42 -6
- package/src/modules/data_sync/i18n/ko.json +125 -0
- package/src/modules/design_system/i18n/ko.json +58 -0
- package/src/modules/dictionaries/i18n/ko.json +130 -0
- package/src/modules/directory/i18n/ko.json +105 -0
- package/src/modules/entities/api/definitions.ts +4 -0
- package/src/modules/entities/backend/entities/user/[entityId]/records/page.tsx +94 -77
- package/src/modules/entities/components/RecordListRelationCell.tsx +90 -0
- package/src/modules/entities/components/recordListRelationDisplays.ts +109 -0
- package/src/modules/entities/i18n/ko.json +260 -0
- package/src/modules/feature_toggles/i18n/ko.json +96 -0
- package/src/modules/inbox_ops/api/proposals/[id]/actions/[actionId]/route.ts +17 -1
- package/src/modules/inbox_ops/components/proposals/EditActionDialog.tsx +21 -16
- package/src/modules/inbox_ops/components/proposals/types.ts +1 -0
- package/src/modules/inbox_ops/i18n/ko.json +196 -0
- package/src/modules/integrations/i18n/ko.json +129 -0
- package/src/modules/messages/i18n/ko.json +263 -0
- package/src/modules/notifications/i18n/ko.json +55 -0
- package/src/modules/payment_gateways/i18n/ko.json +87 -0
- package/src/modules/planner/i18n/ko.json +565 -0
- package/src/modules/portal/i18n/ko.json +143 -0
- package/src/modules/progress/i18n/ko.json +20 -0
- package/src/modules/query_index/api/reindex.ts +15 -0
- package/src/modules/query_index/cli.ts +180 -1
- package/src/modules/query_index/i18n/ko.json +69 -0
- package/src/modules/query_index/lib/coverage.ts +38 -8
- package/src/modules/query_index/lib/reindexer.ts +62 -40
- package/src/modules/resources/i18n/ko.json +770 -0
- package/src/modules/sales/commands/documents.ts +49 -0
- package/src/modules/sales/data/validators.ts +2 -0
- package/src/modules/sales/i18n/ko.json +1442 -0
- package/src/modules/shipping_carriers/i18n/ko.json +85 -0
- package/src/modules/staff/i18n/ko.json +1162 -0
- package/src/modules/sync_excel/i18n/ko.json +107 -0
- package/src/modules/translations/i18n/ko.json +45 -0
- package/src/modules/wms/i18n/ko.json +1053 -0
- package/src/modules/workflows/i18n/ko.json +1203 -0
|
@@ -665,6 +665,41 @@ function cloneJson<T>(value: T): T {
|
|
|
665
665
|
return JSON.parse(JSON.stringify(value)) as T;
|
|
666
666
|
}
|
|
667
667
|
|
|
668
|
+
/**
|
|
669
|
+
* Persists document-level custom fields supplied on a create input.
|
|
670
|
+
*
|
|
671
|
+
* Order and quote creates used to accept `customFields` at the HTTP boundary
|
|
672
|
+
* (`splitCustomFieldPayload` folds `cf_*` keys into it) and then drop the values
|
|
673
|
+
* on the floor, because the create schemas never declared the key and the
|
|
674
|
+
* handlers never wrote it — only updates did. Callers therefore had to create,
|
|
675
|
+
* then immediately update, to get custom fields to stick.
|
|
676
|
+
*/
|
|
677
|
+
async function setDocumentCustomFieldsIfSupplied(
|
|
678
|
+
em: EntityManager,
|
|
679
|
+
params: {
|
|
680
|
+
entityId: string;
|
|
681
|
+
recordId: string;
|
|
682
|
+
organizationId: string;
|
|
683
|
+
tenantId: string;
|
|
684
|
+
customFields: unknown;
|
|
685
|
+
},
|
|
686
|
+
): Promise<void> {
|
|
687
|
+
const { customFields } = params;
|
|
688
|
+
if (customFields === undefined || customFields === null) return;
|
|
689
|
+
const values =
|
|
690
|
+
typeof customFields === "object" && !Array.isArray(customFields)
|
|
691
|
+
? (customFields as Record<string, unknown>)
|
|
692
|
+
: {};
|
|
693
|
+
if (!Object.keys(values).length) return;
|
|
694
|
+
await setRecordCustomFields(em, {
|
|
695
|
+
entityId: params.entityId,
|
|
696
|
+
recordId: params.recordId,
|
|
697
|
+
organizationId: params.organizationId,
|
|
698
|
+
tenantId: params.tenantId,
|
|
699
|
+
values: normalizeCustomFieldValues(values),
|
|
700
|
+
});
|
|
701
|
+
}
|
|
702
|
+
|
|
668
703
|
async function resolveCustomerSnapshot(
|
|
669
704
|
em: EntityManager,
|
|
670
705
|
organizationId: string,
|
|
@@ -4782,6 +4817,13 @@ const createQuoteCommand: CommandHandler<
|
|
|
4782
4817
|
tenantId: quote.tenantId,
|
|
4783
4818
|
tagIds: parsed.tags,
|
|
4784
4819
|
});
|
|
4820
|
+
await setDocumentCustomFieldsIfSupplied(em, {
|
|
4821
|
+
entityId: E.sales.sales_quote,
|
|
4822
|
+
recordId: quote.id,
|
|
4823
|
+
organizationId: quote.organizationId,
|
|
4824
|
+
tenantId: quote.tenantId,
|
|
4825
|
+
customFields: parsed.customFields,
|
|
4826
|
+
});
|
|
4785
4827
|
},
|
|
4786
4828
|
],
|
|
4787
4829
|
{ transaction: true },
|
|
@@ -5804,6 +5846,13 @@ const createOrderCommand: CommandHandler<
|
|
|
5804
5846
|
tenantId: order.tenantId,
|
|
5805
5847
|
tagIds: parsed.tags,
|
|
5806
5848
|
});
|
|
5849
|
+
await setDocumentCustomFieldsIfSupplied(em, {
|
|
5850
|
+
entityId: E.sales.sales_order,
|
|
5851
|
+
recordId: order.id,
|
|
5852
|
+
organizationId: order.organizationId,
|
|
5853
|
+
tenantId: order.tenantId,
|
|
5854
|
+
customFields: parsed.customFields,
|
|
5855
|
+
});
|
|
5807
5856
|
},
|
|
5808
5857
|
],
|
|
5809
5858
|
{ transaction: true },
|
|
@@ -717,6 +717,7 @@ export const orderCreateSchema = scoped.extend({
|
|
|
717
717
|
paymentMethodSnapshot: jsonRecord.optional(),
|
|
718
718
|
metadata,
|
|
719
719
|
customFieldSetId: uuid().optional(),
|
|
720
|
+
customFields: z.record(z.string(), z.unknown()).optional(),
|
|
720
721
|
lines: z
|
|
721
722
|
.array(orderLineCreateSchema.omit({ organizationId: true, tenantId: true, orderId: true }), {
|
|
722
723
|
error: SALES_ORDER_LINES_REQUIRED_MESSAGE_KEY,
|
|
@@ -761,6 +762,7 @@ export const quoteCreateSchema = scoped.extend({
|
|
|
761
762
|
paymentMethodSnapshot: jsonRecord.optional(),
|
|
762
763
|
metadata,
|
|
763
764
|
customFieldSetId: uuid().optional(),
|
|
765
|
+
customFields: z.record(z.string(), z.unknown()).optional(),
|
|
764
766
|
lines: z
|
|
765
767
|
.array(quoteLineCreateSchema.omit({ organizationId: true, tenantId: true, quoteId: true }))
|
|
766
768
|
.optional(),
|