chore(clean): pass all lint, typecheck and build checks with zero errors
Deploy Canina / deploy (push) Successful in 35s
E2E Playwright Tests / Run Full E2E & Security Suites (push) Failing after 6s

This commit is contained in:
parsa aghaei committed 2026-09-02 10:57:21 +03:30
1 parent 6fa1f2c906
commit a7d842ba10
19 files changed
+5185 -5110

No files matched your search

+9 -9
View File
@@ -179,10 +179,11 @@ export class AdminService {
]);
const enrichedUsers = data.map((u) => {
const totalSpent = u.orders?.reduce(
(acc, curr) => acc + (Number(curr.totalAmount) || 0),
0,
) || 0;
const totalSpent =
u.orders?.reduce(
(acc, curr) => acc + (Number(curr.totalAmount) || 0),
0,
) || 0;
const { orders, ...rest } = u;
return {
...rest,
@@ -1194,8 +1195,7 @@ export class AdminService {
dto.roundingStep !== undefined
? Number(dto.roundingStep)
: pricingSettings.roundingStep;
const globalRoundingMode = (dto.roundingMode ||
pricingSettings.roundingMode) as RoundingMode;
const globalRoundingMode = dto.roundingMode || pricingSettings.roundingMode;
const retailMargin = Number(dto.retailMarginPercent);
const wholesaleMargin = Number(dto.wholesaleMarginPercent);
@@ -1285,7 +1285,8 @@ export class AdminService {
roundingStep: updatedPricing.roundingStep,
roundingMode: updatedPricing.roundingMode,
defaultRetailMarginPercent: updatedPricing.defaultRetailMarginPercent,
defaultWholesaleMarginPercent: updatedPricing.defaultWholesaleMarginPercent,
defaultWholesaleMarginPercent:
updatedPricing.defaultWholesaleMarginPercent,
};
await this.prisma.setting.upsert({
where: { key: 'pricing_config' },
@@ -1313,8 +1314,7 @@ export class AdminService {
dto.roundingStep !== undefined
? Number(dto.roundingStep)
: pricingSettings.roundingStep;
const roundingMode = (dto.roundingMode ||
pricingSettings.roundingMode) as RoundingMode;
const roundingMode = dto.roundingMode || pricingSettings.roundingMode;
const applyRound = dto.applyRounding !== false;
const adjValue = Number(dto.value || 0);