Skip to content

Commit

Permalink
Fix locale regression with some templates
Browse files Browse the repository at this point in the history
  • Loading branch information
pozylon committed Dec 20, 2024
1 parent 68f177a commit 7df19fe
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/core/src/services/activateEnrollment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export async function activateEnrollmentService(this: Modules, enrollment: Enrol
retries: 0,
input: {
reason: 'status_change',
locale,
locale: locale.baseName,
template: 'ENROLLMENT_STATUS',
enrollmentId: updatedEnrollment._id,
},
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/services/initializeEnrollment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export async function initializeEnrollmentService(
retries: 0,
input: {
reason: params.reason || 'status_change',
locale,
locale: locale.baseName,
template: 'ENROLLMENT_STATUS',
enrollmentId: processedEnrollment._id,
},
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/services/processQuotation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export async function processQuotationService(
type: 'MESSAGE',
retries: 0,
input: {
locale,
locale: locale.baseName,
template: 'QUOTATION_STATUS',
quotationId: updatedQuotation._id,
},
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/services/terminateEnrollment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export async function terminateEnrollmentService(enrollment: Enrollment) {
retries: 0,
input: {
reason: 'status_change',
locale,
locale: locale.baseName,
template: 'ENROLLMENT_STATUS',
enrollmentId: updatedEnrollment._id,
},
Expand Down
2 changes: 1 addition & 1 deletion packages/platform/src/setup/setupTemplates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export const setupTemplates = (unchainedAPI: UnchainedCore) => {
type: 'MESSAGE',
retries: 0,
input: {
locale,
locale: locale.baseName,
template: MessageTypes.ORDER_REJECTION,
orderId: order._id,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ type PriceFormatter = ({ amount, currency }: { amount: number; currency: string

export const getOrderPositionsData = async (
order: Order,
params: { locale?: string; useNetPrice?: boolean; format?: PriceFormatter },
params: { locale: string; useNetPrice?: boolean; format?: PriceFormatter },
context: UnchainedCore,
) => {
const { modules } = context;
Expand Down

0 comments on commit 7df19fe

Please sign in to comment.