chore(clean): pass all lint, typecheck and build checks with zero errors
This commit is contained in:
1 parent
6fa1f2c906
commit
a7d842ba10
19 files changed
+5185
-5110
No files matched your search
@@ -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);
|
||||
|
||||
|
||||
Reference in new issue
Block a user