@open-mercato/core 0.6.7-develop.6606.1.3b1ec9b1ea → 0.6.7-develop.6621.1.cdbe9dee3d
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/auth/api/session/refresh.js +12 -11
- package/dist/modules/auth/api/session/refresh.js.map +2 -2
- package/dist/modules/auth/lib/rateLimitCheck.js +4 -4
- package/dist/modules/auth/lib/rateLimitCheck.js.map +2 -2
- package/dist/modules/catalog/api/categories/route.js +8 -14
- package/dist/modules/catalog/api/categories/route.js.map +2 -2
- package/dist/modules/catalog/api/tags/route.js +3 -10
- package/dist/modules/catalog/api/tags/route.js.map +2 -2
- package/dist/modules/customers/api/interactions/[id]/visibility/route.js +15 -17
- package/dist/modules/customers/api/interactions/[id]/visibility/route.js.map +2 -2
- package/dist/modules/customers/api/people/[id]/email-threads/route.js +6 -4
- package/dist/modules/customers/api/people/[id]/email-threads/route.js.map +2 -2
- package/dist/modules/customers/api/people/[id]/emails/route.js +19 -17
- package/dist/modules/customers/api/people/[id]/emails/route.js.map +2 -2
- package/dist/modules/customers/components/detail/CustomFieldValuesList.js +22 -5
- package/dist/modules/customers/components/detail/CustomFieldValuesList.js.map +2 -2
- package/dist/modules/customers/components/detail/create/CreateDealForm.js +5 -2
- package/dist/modules/customers/components/detail/create/CreateDealForm.js.map +2 -2
- package/dist/modules/customers/components/detail/customFieldUtils.js +10 -3
- package/dist/modules/customers/components/detail/customFieldUtils.js.map +2 -2
- package/dist/modules/directory/backend/directory/organizations/[id]/edit/page.meta.js +4 -2
- package/dist/modules/directory/backend/directory/organizations/[id]/edit/page.meta.js.map +2 -2
- package/dist/modules/directory/backend/directory/tenants/[id]/edit/page.meta.js +4 -2
- package/dist/modules/directory/backend/directory/tenants/[id]/edit/page.meta.js.map +2 -2
- package/dist/modules/integrations/api/[id]/credentials/route.js +10 -7
- package/dist/modules/integrations/api/[id]/credentials/route.js.map +2 -2
- package/dist/modules/integrations/api/[id]/health/route.js +6 -4
- package/dist/modules/integrations/api/[id]/health/route.js.map +2 -2
- package/dist/modules/integrations/api/[id]/route.js +4 -2
- package/dist/modules/integrations/api/[id]/route.js.map +2 -2
- package/dist/modules/integrations/api/[id]/state/route.js +7 -5
- package/dist/modules/integrations/api/[id]/state/route.js.map +2 -2
- package/dist/modules/integrations/api/[id]/version/route.js +7 -5
- package/dist/modules/integrations/api/[id]/version/route.js.map +2 -2
- package/dist/modules/integrations/api/logs/route.js +4 -2
- package/dist/modules/integrations/api/logs/route.js.map +2 -2
- package/dist/modules/integrations/api/route.js +4 -2
- package/dist/modules/integrations/api/route.js.map +2 -2
- package/dist/modules/integrations/api/umes-read.js +2 -1
- package/dist/modules/integrations/api/umes-read.js.map +2 -2
- package/dist/modules/integrations/lib/organization-scope.js +12 -0
- package/dist/modules/integrations/lib/organization-scope.js.map +7 -0
- package/dist/modules/payment_gateways/lib/gateway-service.js +10 -1
- package/dist/modules/payment_gateways/lib/gateway-service.js.map +2 -2
- package/dist/modules/sales/api/document-history/route.js +6 -9
- package/dist/modules/sales/api/document-history/route.js.map +2 -2
- package/dist/modules/sales/api/quotes/accept/route.js +3 -3
- package/dist/modules/sales/api/quotes/accept/route.js.map +2 -2
- package/dist/modules/sales/api/returns/[id]/route.js +6 -9
- package/dist/modules/sales/api/returns/[id]/route.js.map +2 -2
- package/dist/modules/sales/backend/sales/documents/[id]/page.js +6 -2
- package/dist/modules/sales/backend/sales/documents/[id]/page.js.map +2 -2
- package/dist/modules/sales/components/documents/AddressesSection.js +6 -4
- package/dist/modules/sales/components/documents/AddressesSection.js.map +2 -2
- package/dist/modules/sales/workflows.js +1 -1
- package/dist/modules/sales/workflows.js.map +1 -1
- package/dist/modules/workflows/api/definitions/[id]/route.js +10 -1
- package/dist/modules/workflows/api/definitions/[id]/route.js.map +2 -2
- package/dist/modules/workflows/lib/event-trigger-service.js +44 -3
- package/dist/modules/workflows/lib/event-trigger-service.js.map +2 -2
- package/package.json +7 -7
- package/src/modules/auth/api/session/refresh.ts +19 -11
- package/src/modules/auth/lib/rateLimitCheck.ts +4 -4
- package/src/modules/catalog/api/categories/route.ts +14 -16
- package/src/modules/catalog/api/tags/route.ts +6 -10
- package/src/modules/catalog/i18n/pl.json +9 -9
- package/src/modules/customer_accounts/i18n/pl.json +129 -129
- package/src/modules/customers/api/interactions/[id]/visibility/route.ts +24 -20
- package/src/modules/customers/api/people/[id]/email-threads/route.ts +10 -6
- package/src/modules/customers/api/people/[id]/emails/route.ts +25 -21
- package/src/modules/customers/components/detail/CustomFieldValuesList.tsx +28 -4
- package/src/modules/customers/components/detail/create/CreateDealForm.tsx +7 -2
- package/src/modules/customers/components/detail/customFieldUtils.ts +15 -3
- package/src/modules/data_sync/i18n/pl.json +68 -68
- package/src/modules/directory/backend/directory/organizations/[id]/edit/page.meta.ts +4 -2
- package/src/modules/directory/backend/directory/tenants/[id]/edit/page.meta.ts +4 -2
- package/src/modules/integrations/api/[id]/credentials/route.ts +10 -7
- package/src/modules/integrations/api/[id]/health/route.ts +6 -4
- package/src/modules/integrations/api/[id]/route.ts +4 -2
- package/src/modules/integrations/api/[id]/state/route.ts +7 -5
- package/src/modules/integrations/api/[id]/version/route.ts +7 -5
- package/src/modules/integrations/api/logs/route.ts +4 -2
- package/src/modules/integrations/api/route.ts +4 -2
- package/src/modules/integrations/api/umes-read.ts +2 -1
- package/src/modules/integrations/i18n/de.json +0 -76
- package/src/modules/integrations/i18n/en.json +0 -76
- package/src/modules/integrations/i18n/es.json +0 -76
- package/src/modules/integrations/i18n/pl.json +0 -76
- package/src/modules/integrations/lib/organization-scope.ts +27 -0
- package/src/modules/payment_gateways/lib/gateway-service.ts +12 -1
- package/src/modules/sales/api/document-history/route.ts +10 -9
- package/src/modules/sales/api/quotes/accept/route.ts +3 -3
- package/src/modules/sales/api/returns/[id]/route.ts +10 -9
- package/src/modules/sales/backend/sales/documents/[id]/page.tsx +26 -19
- package/src/modules/sales/components/documents/AddressesSection.tsx +8 -4
- package/src/modules/sales/i18n/pl.json +24 -24
- package/src/modules/sales/workflows.ts +1 -1
- package/src/modules/staff/i18n/pl.json +178 -178
- package/src/modules/workflows/api/definitions/[id]/route.ts +14 -1
- package/src/modules/workflows/i18n/pl.json +128 -128
- package/src/modules/workflows/lib/event-trigger-service.ts +87 -8
|
@@ -45,6 +45,12 @@ function assertManualActionAllowed(action: ManualGatewayAction, transaction: Gat
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
function assertCaptureAmountAllowed(amount: number | undefined, transaction: GatewayTransaction): void {
|
|
49
|
+
if (amount !== undefined && amount > Number(transaction.amount)) {
|
|
50
|
+
throw conflict(`Capture amount ${amount} exceeds authorized transaction amount ${transaction.amount}`)
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
48
54
|
function applyAdapterResultStatus(
|
|
49
55
|
action: ManualGatewayAction,
|
|
50
56
|
transaction: GatewayTransaction,
|
|
@@ -192,6 +198,7 @@ export function createPaymentGatewayService(deps: PaymentGatewayServiceDeps) {
|
|
|
192
198
|
operationId?: string
|
|
193
199
|
payload: Record<string, unknown>
|
|
194
200
|
scope: { organizationId: string; tenantId: string }
|
|
201
|
+
assertInitialAllowed?: (transaction: GatewayTransaction) => void
|
|
195
202
|
invoke: (context: {
|
|
196
203
|
adapter: GatewayAdapter
|
|
197
204
|
credentials: Record<string, unknown>
|
|
@@ -210,7 +217,10 @@ export function createPaymentGatewayService(deps: PaymentGatewayServiceDeps) {
|
|
|
210
217
|
operationId: input.operationId,
|
|
211
218
|
payload: input.payload,
|
|
212
219
|
scope: input.scope,
|
|
213
|
-
assertInitialAllowed: () =>
|
|
220
|
+
assertInitialAllowed: () => {
|
|
221
|
+
assertManualActionAllowed(input.action, transaction)
|
|
222
|
+
input.assertInitialAllowed?.(transaction)
|
|
223
|
+
},
|
|
214
224
|
})
|
|
215
225
|
if (prepared.kind === 'completed') {
|
|
216
226
|
if (prepared.result.status !== transaction.unifiedStatus) {
|
|
@@ -487,6 +497,7 @@ export function createPaymentGatewayService(deps: PaymentGatewayServiceDeps) {
|
|
|
487
497
|
operationId,
|
|
488
498
|
payload: { amount: amount ?? null },
|
|
489
499
|
scope,
|
|
500
|
+
assertInitialAllowed: (transaction) => assertCaptureAmountAllowed(amount, transaction),
|
|
490
501
|
invoke: ({ adapter, credentials, transaction, idempotencyKey }) => adapter.capture({
|
|
491
502
|
sessionId: readProviderSessionId(transaction),
|
|
492
503
|
amount,
|
|
@@ -4,6 +4,7 @@ import { loadAuditLogDisplayMaps } from '@open-mercato/core/modules/audit_logs/a
|
|
|
4
4
|
import { createRequestContainer } from '@open-mercato/shared/lib/di/container'
|
|
5
5
|
import { getAuthFromRequest } from '@open-mercato/shared/lib/auth/server'
|
|
6
6
|
import { resolveOrganizationScopeForRequest } from '@open-mercato/core/modules/directory/utils/organizationScope'
|
|
7
|
+
import { resolveOrganizationScopeFilter } from '@open-mercato/core/modules/directory/utils/organizationScopeFilter'
|
|
7
8
|
import { resolveTranslations } from '@open-mercato/shared/lib/i18n/server'
|
|
8
9
|
import { CrudHttpError, isCrudHttpError } from '@open-mercato/shared/lib/crud/errors'
|
|
9
10
|
import { NextResponse } from 'next/server'
|
|
@@ -67,12 +68,12 @@ export async function GET(req: Request) {
|
|
|
67
68
|
}
|
|
68
69
|
|
|
69
70
|
const scope = await resolveOrganizationScopeForRequest({ container, auth, request: req })
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
71
|
+
// Resolve the organization scope the same way every other scoped read does.
|
|
72
|
+
// Under "All organizations" (super-admin) `rbacOrganizationId` is null and
|
|
73
|
+
// `where` is empty, so the read scopes by tenant + resource only instead of
|
|
74
|
+
// failing — the document's `id` is a tenant-unique UUID, so no cross-org leak.
|
|
75
|
+
const orgFilter = resolveOrganizationScopeFilter(scope, auth)
|
|
76
|
+
const organizationId = orgFilter.rbacOrganizationId
|
|
76
77
|
|
|
77
78
|
const requiredFeature = query.kind === 'order' ? 'sales.orders.view' : 'sales.quotes.view'
|
|
78
79
|
const rbac = container.resolve('rbacService') as RbacService
|
|
@@ -92,7 +93,7 @@ export async function GET(req: Request) {
|
|
|
92
93
|
const [actionLogList, notes] = await Promise.all([
|
|
93
94
|
actionLogService.list({
|
|
94
95
|
tenantId: auth.tenantId,
|
|
95
|
-
organizationId,
|
|
96
|
+
organizationId: organizationId ?? undefined,
|
|
96
97
|
resourceKind,
|
|
97
98
|
resourceId: query.id,
|
|
98
99
|
includeRelated: true,
|
|
@@ -107,11 +108,11 @@ export async function GET(req: Request) {
|
|
|
107
108
|
contextType: query.kind,
|
|
108
109
|
contextId: query.id,
|
|
109
110
|
tenantId: auth.tenantId,
|
|
110
|
-
|
|
111
|
+
...orgFilter.where,
|
|
111
112
|
deletedAt: null,
|
|
112
113
|
},
|
|
113
114
|
{ orderBy: { createdAt: 'DESC' } },
|
|
114
|
-
{ tenantId: auth.tenantId, organizationId },
|
|
115
|
+
{ tenantId: auth.tenantId, organizationId: organizationId ?? undefined },
|
|
115
116
|
),
|
|
116
117
|
])
|
|
117
118
|
const logs = actionLogList.items as ActionLog[]
|
|
@@ -11,7 +11,7 @@ import { getAuthFromRequest } from '@open-mercato/shared/lib/auth/server'
|
|
|
11
11
|
import { findOneWithDecryption } from '@open-mercato/shared/lib/encryption/find'
|
|
12
12
|
import { getCachedRateLimiterService } from '@open-mercato/core/bootstrap'
|
|
13
13
|
import { readEndpointRateLimitConfig } from '@open-mercato/shared/lib/ratelimit/config'
|
|
14
|
-
import { checkRateLimit, getClientIp, rateLimitErrorSchema } from '@open-mercato/shared/lib/ratelimit/helpers'
|
|
14
|
+
import { checkRateLimit, getClientIp, RATE_LIMIT_FALLBACK_KEY, rateLimitErrorSchema } from '@open-mercato/shared/lib/ratelimit/helpers'
|
|
15
15
|
import { validateSameOriginMutationRequest } from './originGuard'
|
|
16
16
|
import { hashAuthToken } from '../../../../auth/lib/tokenHash'
|
|
17
17
|
import { SalesOrder, SalesQuote } from '../../../data/entities'
|
|
@@ -52,11 +52,11 @@ export async function POST(req: Request) {
|
|
|
52
52
|
|
|
53
53
|
const rateLimiterService = getCachedRateLimiterService()
|
|
54
54
|
const clientIp = rateLimiterService ? getClientIp(req, rateLimiterService.trustProxyDepth) : null
|
|
55
|
-
if (rateLimiterService
|
|
55
|
+
if (rateLimiterService) {
|
|
56
56
|
const rateLimitResponse = await checkRateLimit(
|
|
57
57
|
rateLimiterService,
|
|
58
58
|
quoteAcceptRateLimitConfig,
|
|
59
|
-
clientIp,
|
|
59
|
+
clientIp ?? RATE_LIMIT_FALLBACK_KEY,
|
|
60
60
|
translate('api.errors.rateLimit', 'Too many requests. Please try again later.'),
|
|
61
61
|
)
|
|
62
62
|
if (rateLimitResponse) return rateLimitResponse
|
|
@@ -5,6 +5,7 @@ import type { OpenApiRouteDoc } from '@open-mercato/shared/lib/openapi'
|
|
|
5
5
|
import { createRequestContainer } from '@open-mercato/shared/lib/di/container'
|
|
6
6
|
import { getAuthFromRequest } from '@open-mercato/shared/lib/auth/server'
|
|
7
7
|
import { resolveOrganizationScopeForRequest } from '@open-mercato/core/modules/directory/utils/organizationScope'
|
|
8
|
+
import { resolveOrganizationScopeFilter } from '@open-mercato/core/modules/directory/utils/organizationScopeFilter'
|
|
8
9
|
import { resolveTranslations } from '@open-mercato/shared/lib/i18n/server'
|
|
9
10
|
import { CrudHttpError, isCrudHttpError, notFound } from '@open-mercato/shared/lib/crud/errors'
|
|
10
11
|
import { findOneWithDecryption, findWithDecryption } from '@open-mercato/shared/lib/encryption/find'
|
|
@@ -40,20 +41,20 @@ export async function GET(req: Request, ctx: { params: { id: string } }) {
|
|
|
40
41
|
}
|
|
41
42
|
|
|
42
43
|
const scope = await resolveOrganizationScopeForRequest({ container, auth, request: req })
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
44
|
+
// Scope by the caller's visible organizations. Under "All organizations"
|
|
45
|
+
// (super-admin) `where` is empty and `rbacOrganizationId` is null, so the
|
|
46
|
+
// return is fetched by its tenant-unique id instead of 400-ing; restricted
|
|
47
|
+
// callers keep their `filterIds` `$in` guard.
|
|
48
|
+
const orgFilter = resolveOrganizationScopeFilter(scope, auth)
|
|
49
|
+
const decryptionOrganizationId = orgFilter.rbacOrganizationId ?? undefined
|
|
49
50
|
|
|
50
51
|
const em = (container.resolve('em') as EntityManager).fork()
|
|
51
52
|
const header = await findOneWithDecryption(
|
|
52
53
|
em,
|
|
53
54
|
SalesReturn,
|
|
54
|
-
{ id, deletedAt: null, tenantId: auth.tenantId,
|
|
55
|
+
{ id, deletedAt: null, tenantId: auth.tenantId, ...orgFilter.where },
|
|
55
56
|
{ populate: ['order'] },
|
|
56
|
-
{ tenantId: auth.tenantId, organizationId },
|
|
57
|
+
{ tenantId: auth.tenantId, organizationId: decryptionOrganizationId },
|
|
57
58
|
)
|
|
58
59
|
if (!header || !header.order) {
|
|
59
60
|
throw notFound(translate('sales.returns.notFound', 'Return not found.'))
|
|
@@ -64,7 +65,7 @@ export async function GET(req: Request, ctx: { params: { id: string } }) {
|
|
|
64
65
|
SalesReturnLine,
|
|
65
66
|
{ salesReturn: header.id, deletedAt: null },
|
|
66
67
|
{ populate: ['orderLine'] },
|
|
67
|
-
{ tenantId: auth.tenantId, organizationId },
|
|
68
|
+
{ tenantId: auth.tenantId, organizationId: decryptionOrganizationId },
|
|
68
69
|
)
|
|
69
70
|
|
|
70
71
|
const totals = lines.reduce(
|
|
@@ -27,6 +27,8 @@ import { ArrowRightLeft, Building2, CreditCard, Mail, Pencil, Plus, Send, Store,
|
|
|
27
27
|
import { FormHeader, type ActionItem } from '@open-mercato/ui/backend/forms'
|
|
28
28
|
import { VersionHistoryAction } from '@open-mercato/ui/backend/version-history'
|
|
29
29
|
import { SendObjectMessageDialog } from '@open-mercato/ui/backend/messages'
|
|
30
|
+
import { useBackendChrome } from '@open-mercato/ui/backend/BackendChromeProvider'
|
|
31
|
+
import { hasFeature } from '@open-mercato/shared/security/features'
|
|
30
32
|
import Link from 'next/link'
|
|
31
33
|
import { flash } from '@open-mercato/ui/backend/FlashMessages'
|
|
32
34
|
import { apiCall, apiCallOrThrow, readApiResultOrThrow, withScopedApiRequestHeaders } from '@open-mercato/ui/backend/utils/apiCall'
|
|
@@ -3983,6 +3985,9 @@ export default function SalesDocumentDetailPage({
|
|
|
3983
3985
|
[]
|
|
3984
3986
|
)
|
|
3985
3987
|
|
|
3988
|
+
const { payload: backendChromePayload, isReady: backendChromeReady } = useBackendChrome()
|
|
3989
|
+
const canComposeMessages = backendChromeReady && hasFeature(backendChromePayload?.grantedFeatures, 'messages.compose')
|
|
3990
|
+
|
|
3986
3991
|
const tabInjectionSpotId = React.useMemo(() => `sales.document.detail.${kind}:tabs`, [kind])
|
|
3987
3992
|
const { widgets: injectedTabWidgets } = useInjectionWidgets(tabInjectionSpotId, {
|
|
3988
3993
|
context: detailInjectionContext,
|
|
@@ -4564,25 +4569,27 @@ export default function SalesDocumentDetailPage({
|
|
|
4564
4569
|
backLabel={t('sales.documents.detail.back', 'Back to documents')}
|
|
4565
4570
|
utilityActions={record ? (
|
|
4566
4571
|
<>
|
|
4567
|
-
|
|
4568
|
-
|
|
4569
|
-
|
|
4570
|
-
|
|
4571
|
-
|
|
4572
|
-
|
|
4573
|
-
|
|
4574
|
-
|
|
4575
|
-
|
|
4576
|
-
|
|
4577
|
-
|
|
4578
|
-
|
|
4579
|
-
|
|
4580
|
-
|
|
4581
|
-
|
|
4582
|
-
|
|
4583
|
-
|
|
4584
|
-
|
|
4585
|
-
|
|
4572
|
+
{canComposeMessages ? (
|
|
4573
|
+
<SendObjectMessageDialog
|
|
4574
|
+
object={{
|
|
4575
|
+
entityModule: 'sales',
|
|
4576
|
+
entityType: kind,
|
|
4577
|
+
entityId: record.id,
|
|
4578
|
+
sourceEntityType: kind === 'order' ? 'sales.order' : 'sales.quote',
|
|
4579
|
+
sourceEntityId: record.id,
|
|
4580
|
+
previewData: {
|
|
4581
|
+
title: number,
|
|
4582
|
+
status: statusDisplay?.label ?? record?.status ?? undefined,
|
|
4583
|
+
metadata: Object.keys(messagePreviewMetadata).length > 0 ? messagePreviewMetadata : undefined,
|
|
4584
|
+
},
|
|
4585
|
+
}}
|
|
4586
|
+
viewHref={`/backend/sales/${kind === 'order' ? 'orders' : 'quotes'}/${record.id}`}
|
|
4587
|
+
defaultValues={{
|
|
4588
|
+
sourceEntityType: kind === 'order' ? 'sales.order' : 'sales.quote',
|
|
4589
|
+
sourceEntityId: record.id,
|
|
4590
|
+
}}
|
|
4591
|
+
/>
|
|
4592
|
+
) : null}
|
|
4586
4593
|
<VersionHistoryAction
|
|
4587
4594
|
config={{
|
|
4588
4595
|
resourceKind: kind === 'order' ? 'sales.order' : 'sales.quote',
|
|
@@ -200,9 +200,13 @@ export function SalesDocumentAddressesSection({
|
|
|
200
200
|
const [addressesLoading, setAddressesLoading] = React.useState(false)
|
|
201
201
|
const [addressesError, setAddressesError] = React.useState<string | null>(null)
|
|
202
202
|
const [addressFormat, setAddressFormat] = React.useState<AddressFormatStrategy>('line_first')
|
|
203
|
-
const [useCustomShipping, setUseCustomShipping] = React.useState<boolean>(
|
|
203
|
+
const [useCustomShipping, setUseCustomShipping] = React.useState<boolean>(
|
|
204
|
+
!!shippingAddressSnapshot && !shippingAddressId
|
|
205
|
+
)
|
|
204
206
|
const [useCustomBilling, setUseCustomBilling] = React.useState<boolean>(
|
|
205
|
-
billingAddressSnapshot
|
|
207
|
+
billingAddressSnapshot && !billingAddressId
|
|
208
|
+
? true
|
|
209
|
+
: !!shippingAddressSnapshot && !shippingAddressId
|
|
206
210
|
)
|
|
207
211
|
const [sameAsShipping, setSameAsShipping] = React.useState<boolean>(() => {
|
|
208
212
|
if (shippingAddressSnapshot || billingAddressSnapshot) {
|
|
@@ -366,8 +370,8 @@ export function SalesDocumentAddressesSection({
|
|
|
366
370
|
}, [documentId, kind, resolveAddressSummary, t])
|
|
367
371
|
|
|
368
372
|
React.useEffect(() => {
|
|
369
|
-
const shippingCustom = !!shippingAddressSnapshot
|
|
370
|
-
const billingCustom = !!billingAddressSnapshot
|
|
373
|
+
const shippingCustom = !!shippingAddressSnapshot && !shippingAddressId
|
|
374
|
+
const billingCustom = !!billingAddressSnapshot && !billingAddressId
|
|
371
375
|
const nextSame = shippingAddressSnapshot || billingAddressSnapshot
|
|
372
376
|
? deepEqual(shippingAddressSnapshot, billingAddressSnapshot)
|
|
373
377
|
: !billingAddressId || billingAddressId === shippingAddressId
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
"sales.audit.credit_memos.create": "Utwórz notę kredytową",
|
|
13
13
|
"sales.audit.credit_memos.delete": "Usuń notę kredytową",
|
|
14
14
|
"sales.audit.credit_memos.update": "Zaktualizuj notę kredytową",
|
|
15
|
-
"sales.audit.delivery-windows.create": "
|
|
16
|
-
"sales.audit.delivery-windows.delete": "
|
|
17
|
-
"sales.audit.delivery-windows.update": "
|
|
15
|
+
"sales.audit.delivery-windows.create": "Utworzenie okna dostawy",
|
|
16
|
+
"sales.audit.delivery-windows.delete": "Usunięcie okna dostawy",
|
|
17
|
+
"sales.audit.delivery-windows.update": "Aktualizacja okna dostawy",
|
|
18
18
|
"sales.audit.document_addresses.create": "Dodaj adres dokumentu",
|
|
19
19
|
"sales.audit.document_addresses.delete": "Usuń adres dokumentu",
|
|
20
20
|
"sales.audit.document_addresses.update": "Zaktualizuj adres dokumentu",
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
"sales.audit.orders.lines.delete": "Usuń pozycję zamówienia",
|
|
32
32
|
"sales.audit.orders.lines.upsert": "Zaktualizuj pozycję zamówienia",
|
|
33
33
|
"sales.audit.orders.update": "Aktualizuj zamówienie sprzedaży",
|
|
34
|
-
"sales.audit.payment-methods.create": "
|
|
35
|
-
"sales.audit.payment-methods.delete": "
|
|
36
|
-
"sales.audit.payment-methods.update": "
|
|
34
|
+
"sales.audit.payment-methods.create": "Utworzenie metody płatności",
|
|
35
|
+
"sales.audit.payment-methods.delete": "Usunięcie metody płatności",
|
|
36
|
+
"sales.audit.payment-methods.update": "Aktualizacja metody płatności",
|
|
37
37
|
"sales.audit.payments.create": "Utwórz płatność",
|
|
38
38
|
"sales.audit.payments.delete": "Usuń płatność",
|
|
39
39
|
"sales.audit.payments.update": "Zaktualizuj płatność",
|
|
@@ -51,12 +51,12 @@
|
|
|
51
51
|
"sales.audit.shipments.create": "Utwórz wysyłkę",
|
|
52
52
|
"sales.audit.shipments.delete": "Usuń wysyłkę",
|
|
53
53
|
"sales.audit.shipments.update": "Aktualizuj wysyłkę",
|
|
54
|
-
"sales.audit.shipping-methods.create": "
|
|
55
|
-
"sales.audit.shipping-methods.delete": "
|
|
56
|
-
"sales.audit.shipping-methods.update": "
|
|
57
|
-
"sales.audit.tax-rates.create": "
|
|
58
|
-
"sales.audit.tax-rates.delete": "
|
|
59
|
-
"sales.audit.tax-rates.update": "
|
|
54
|
+
"sales.audit.shipping-methods.create": "Utworzenie metody wysyłki",
|
|
55
|
+
"sales.audit.shipping-methods.delete": "Usunięcie metody wysyłki",
|
|
56
|
+
"sales.audit.shipping-methods.update": "Aktualizacja metody wysyłki",
|
|
57
|
+
"sales.audit.tax-rates.create": "Utworzenie stawki podatku",
|
|
58
|
+
"sales.audit.tax-rates.delete": "Usunięcie stawki podatku",
|
|
59
|
+
"sales.audit.tax-rates.update": "Aktualizacja stawki podatku",
|
|
60
60
|
"sales.channels.actions.backToList": "Powrót do kanałów",
|
|
61
61
|
"sales.channels.actions.create": "Dodaj kanał",
|
|
62
62
|
"sales.channels.create": "Utwórz kanał sprzedaży",
|
|
@@ -1380,18 +1380,18 @@
|
|
|
1380
1380
|
"sales.shipments.not_found": "Nie znaleziono wysyłki",
|
|
1381
1381
|
"sales.shipments.payment_completed": "Nie można zmodyfikować wysyłki: płatność za zamówienie jest zakończona.",
|
|
1382
1382
|
"sales.shipments.quantity_exceeded": "Nie można wysłać więcej niż pozostała ilość.",
|
|
1383
|
-
"sales.stageBar.changeFailed": "
|
|
1384
|
-
"sales.stageBar.changed": "
|
|
1385
|
-
"sales.stageBar.closed.lost": "
|
|
1386
|
-
"sales.stageBar.closed.won": "
|
|
1387
|
-
"sales.stageBar.closedLost": "
|
|
1388
|
-
"sales.stageBar.closedWon": "
|
|
1389
|
-
"sales.stageBar.completed": "
|
|
1390
|
-
"sales.stageBar.confirmChange": "
|
|
1391
|
-
"sales.stageBar.current": "
|
|
1392
|
-
"sales.stageBar.lost": "
|
|
1393
|
-
"sales.stageBar.upcoming": "
|
|
1394
|
-
"sales.stageBar.won": "
|
|
1383
|
+
"sales.stageBar.changeFailed": "Nie udało się zmienić etapu",
|
|
1384
|
+
"sales.stageBar.changed": "Zmieniono etap",
|
|
1385
|
+
"sales.stageBar.closed.lost": "Przegrana",
|
|
1386
|
+
"sales.stageBar.closed.won": "Wygrana",
|
|
1387
|
+
"sales.stageBar.closedLost": "Szansa przegrana",
|
|
1388
|
+
"sales.stageBar.closedWon": "Szansa wygrana",
|
|
1389
|
+
"sales.stageBar.completed": "Zakończony",
|
|
1390
|
+
"sales.stageBar.confirmChange": "Przenieść szansę do etapu „{{stage}}”?",
|
|
1391
|
+
"sales.stageBar.current": "Bieżący",
|
|
1392
|
+
"sales.stageBar.lost": "Przegrana",
|
|
1393
|
+
"sales.stageBar.upcoming": "Nadchodzący",
|
|
1394
|
+
"sales.stageBar.won": "Wygrana",
|
|
1395
1395
|
"sales.tax-rates.create": "Utwórz stawkę podatku",
|
|
1396
1396
|
"sales.tax-rates.delete": "Usuń stawkę podatku",
|
|
1397
1397
|
"sales.tax-rates.update": "Aktualizuj stawkę podatku",
|
|
@@ -174,7 +174,7 @@ const orderApproval = defineWorkflow({
|
|
|
174
174
|
triggerId: 'order_approval_trigger',
|
|
175
175
|
name: 'Order Approval Trigger',
|
|
176
176
|
description: 'Triggers when a new sales order is created',
|
|
177
|
-
eventPattern: 'sales.
|
|
177
|
+
eventPattern: 'sales.order.created',
|
|
178
178
|
config: { entityType: 'SalesOrder' },
|
|
179
179
|
enabled: true,
|
|
180
180
|
priority: 0,
|