feat: добавление новых файлов
modified: client/package.json modified: client/src/components/Footer.tsx new file: client/src/components/LocalizedDateInput.tsx new file: client/src/components/LocalizedTimeInput.tsx modified: client/src/index.css new file: client/src/types/html2pdf.d.ts new file: client/src/utils/dateTimeFormat.ts new file: client/src/utils/receiptPdf.ts modified: server/prisma/seed.ts
This commit is contained in:
+24
-14
@@ -25,32 +25,32 @@ async function main() {
|
||||
|
||||
// ─── Pubs ────────────────────────────────────────────
|
||||
const pub1 = await prisma.pub.upsert({
|
||||
where: { address: 'ул. Карла Маркса, 26, Иркутск' },
|
||||
where: { address: 'пр. Мира, 7А, Красноярск' },
|
||||
update: {},
|
||||
create: {
|
||||
name: "Harat's Irish Pub Иркутск",
|
||||
address: 'ул. Карла Маркса, 26, Иркутск',
|
||||
phone: '+7 (3952) 48-68-76',
|
||||
name: "Harat's Irish Pub Красноярск",
|
||||
address: 'пр. Мира, 7А, Красноярск',
|
||||
phone: '+7 (391) 227-78-18',
|
||||
},
|
||||
});
|
||||
|
||||
const pub2 = await prisma.pub.upsert({
|
||||
where: { address: 'ул. Ленина, 15, Новосибирск' },
|
||||
where: { address: 'ул. Красной Гвардии, 24, Красноярск' },
|
||||
update: {},
|
||||
create: {
|
||||
name: "Harat's Irish Pub Новосибирск",
|
||||
address: 'ул. Ленина, 15, Новосибирск',
|
||||
phone: '+7 (383) 230-01-20',
|
||||
name: "Harat's Irish Pub Красноярск",
|
||||
address: 'ул. Красной Гвардии, 24, Красноярск',
|
||||
phone: '+7 (391) 214-68-17',
|
||||
},
|
||||
});
|
||||
|
||||
const pub3 = await prisma.pub.upsert({
|
||||
where: { address: 'Невский проспект, 88, Санкт-Петербург' },
|
||||
where: { address: 'Влетная ул., 6А, Красноярск' },
|
||||
update: {},
|
||||
create: {
|
||||
name: "Harat's Irish Pub Санкт-Петербург",
|
||||
address: 'Невский проспект, 88, Санкт-Петербург',
|
||||
phone: '+7 (812) 640-16-16',
|
||||
address: 'Влетная ул., 6А, Красноярск',
|
||||
phone: '+7 (391) 271-77-54',
|
||||
},
|
||||
});
|
||||
|
||||
@@ -64,6 +64,16 @@ async function main() {
|
||||
},
|
||||
});
|
||||
|
||||
const pub5 = await prisma.pub.upsert({
|
||||
where: { address: 'ул. Перенсона, 26, Красноярск' },
|
||||
update: {},
|
||||
create: {
|
||||
name: "Harat's Irish Pub Красноярск",
|
||||
address: 'ул. Перенсона, 26, Красноярск',
|
||||
phone: '+7 (391) 214-07-99',
|
||||
},
|
||||
});
|
||||
|
||||
// ─── Tables for Pub 1 (main pub with full layout) ───
|
||||
const tablesData = [
|
||||
// Main hall
|
||||
@@ -95,7 +105,7 @@ async function main() {
|
||||
}
|
||||
|
||||
// Simple tables for pub2, pub3, and pub4
|
||||
for (const pub of [pub2, pub3, pub4]) {
|
||||
for (const pub of [pub2, pub3, pub4, pub5]) {
|
||||
for (let i = 1; i <= 8; i++) {
|
||||
await prisma.table.upsert({
|
||||
where: { pubId_number: { pubId: pub.id, number: i } },
|
||||
@@ -191,7 +201,7 @@ async function main() {
|
||||
}
|
||||
|
||||
// ─── Menu (link dishes to pubs, except lunch category) ──
|
||||
for (const pub of [pub1, pub2, pub3, pub4]) {
|
||||
for (const pub of [pub1, pub2, pub3, pub4, pub5]) {
|
||||
for (const dish of createdDishes) {
|
||||
if (dish.categoryId === lunch.id) continue; // lunch is separate
|
||||
await prisma.menu.upsert({
|
||||
@@ -211,7 +221,7 @@ async function main() {
|
||||
sunday.setDate(monday.getDate() + 6);
|
||||
|
||||
const lunchDishes = createdDishes.filter(d => d.categoryId === lunch.id);
|
||||
for (const pub of [pub1, pub2, pub3, pub4]) {
|
||||
for (const pub of [pub1, pub2, pub3, pub4, pub5]) {
|
||||
for (const dish of lunchDishes) {
|
||||
await prisma.lunchMenu.upsert({
|
||||
where: { pubId_dishId_weekStart: { pubId: pub.id, dishId: dish.id, weekStart: monday } },
|
||||
|
||||
Reference in New Issue
Block a user