diff --git a/prisma/schema.prisma b/prisma/schema.prisma
index 2355bf7..0db3750 100644
--- a/prisma/schema.prisma
+++ b/prisma/schema.prisma
@@ -83,6 +83,7 @@ model Organization {
services Service[]
supplies Supply[]
users User[]
+ logistics Logistics[]
@@map("organizations")
}
@@ -348,3 +349,18 @@ enum ScheduleStatus {
SICK
ABSENT
}
+
+model Logistics {
+ id String @id @default(cuid())
+ fromLocation String
+ toLocation String
+ priceUnder1m3 Float
+ priceOver1m3 Float
+ description String?
+ createdAt DateTime @default(now())
+ updatedAt DateTime @updatedAt
+ organizationId String
+ organization Organization @relation(fields: [organizationId], references: [id])
+
+ @@map("logistics")
+}
diff --git a/src/app/supplies/create/page.tsx b/src/app/supplies/create/page.tsx
new file mode 100644
index 0000000..e2a037f
--- /dev/null
+++ b/src/app/supplies/create/page.tsx
@@ -0,0 +1,10 @@
+import { AuthGuard } from "@/components/auth-guard"
+import { CreateSupplyPage } from "@/components/supplies/create-supply-page"
+
+export default function CreateSupplyPageRoute() {
+ return (
+
- Раздел логистики находится в разработке. - Здесь будут инструменты для управления доставкой и складскими операциями. -
+ const { user } = useAuth() + const [editableLogistics, setEditableLogistics] = useStateДоставка между точками
+Загрузка маршрутов...
++ Создайте свой первый логистический маршрут +
+ +№ | +Откуда * | +Куда * | +До 1м³ (₽) * | +Свыше 1м³ (₽) * | +Описание | +Действия | +
---|---|---|---|---|---|---|
{index + 1} | + + {/* Откуда */} +
+ {route.isEditing ? (
+ |
+
+ {/* Куда */}
+
+ {route.isEditing ? (
+ |
+
+ {/* Цена до 1м³ */}
+ + {route.isEditing ? ( + updateField(route.id!, 'priceUnder1m3', e.target.value)} + className="bg-white/5 border-white/20 text-white" + placeholder="0.00" + /> + ) : ( + + {route.priceUnder1m3 ? parseFloat(route.priceUnder1m3).toLocaleString() : '0'} ₽ + + )} + | + + {/* Цена свыше 1м³ */} ++ {route.isEditing ? ( + updateField(route.id!, 'priceOver1m3', e.target.value)} + className="bg-white/5 border-white/20 text-white" + placeholder="0.00" + /> + ) : ( + + {route.priceOver1m3 ? parseFloat(route.priceOver1m3).toLocaleString() : '0'} ₽ + + )} + | + + {/* Описание */} ++ {route.isEditing ? ( + updateField(route.id!, 'description', e.target.value)} + className="bg-white/5 border-white/20 text-white" + placeholder="Дополнительная информация" + /> + ) : ( + {route.description || '—'} + )} + | + + {/* Действия */} +
+
+ {route.isEditing ? (
+ <>
+
+
+ >
+ ) : (
+
+ )}
+
+
+ |
+
Управление вашими услугами