feat(settings): add Maintenance Mode, Catalog Mode, Brand Identity & UI Text management (TASK-2.14, TASK-2.15, TASK-2.16)

This commit is contained in:
parsa aghaei committed 2026-08-02 09:26:06 +03:30
1 parent 38c1e287dc
commit 88521c6bac
3 files changed
+118 -32

No files matched your search

+1 -12
View File
@@ -397,19 +397,8 @@ export class AdminService {
});
}
// --- Settings ---
async getSettings() {
const keys = [
'SHIPPING_FEE',
'MIN_ORDER_AMOUNT',
'B2B_DISCOUNT_PERCENT',
'MAINTENANCE_MODE',
];
const settings = await this.prisma.uiText.findMany({
where: { key: { in: keys } },
});
// Transform to an object { SHIPPING_FEE: '50000', ... }
const settings = await this.prisma.uiText.findMany();
return settings.reduce(
(acc, curr) => ({ ...acc, [curr.key]: curr.value }),
{},