Bariki cashback, order edit, and current work in progress

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
zabudko-ruandClaude Opus 5.5 committed 2026-10-25 22:57:03 +04:00
1 parent dda917fc71
commit 45477fb018
94 files changed
+10955 -650

No files matched your search

+14
View File
@@ -49,6 +49,20 @@ export async function fixtures() {
],
});
for (const [i, code] of YEREVAN_DISTRICTS.entries()) await db.district.create({ data: { code, sortOrder: i } });
// справочники бариков (в базе их создаёт миграция)
await db.pointsCategory.createMany({
data: [
{ code: 'cleaning', name: { ru: 'Клининг' }, rateBarev: 5, ratePlus: 8, rateElite: 10 },
{ code: 'documents', name: { ru: 'Документы' }, rateBarev: 5, ratePlus: 10, rateElite: 12 },
],
});
await db.pointsBonusType.createMany({
data: [
{ code: 'housewarming', name: { ru: 'Новоселье' }, defaultAmount: 5000, ttlDays: 60 },
{ code: 'promo', name: { ru: 'Промо' }, defaultAmount: 1000, ttlDays: 30 },
{ code: 'first_month_route', name: { ru: 'Маршрут' }, defaultAmount: 3000 },
],
});
const kentron = await db.district.findUniqueOrThrow({ where: { code: 'kentron' } });
const home = await db.category.create({ data: { code: 'HOME', barevPlusDiscountPct: DEFAULT_CATEGORY_DISCOUNTS.HOME } });
const c = CATALOG.find((s) => s.code === 'cleaning')!;