Add multi-location support and meal voucher parameters
Introduce a new enum for locations (Roccapiemonte, Milano, Roma) and update schema definitions for guards, vehicles, and sites to include location. Add meal voucher configuration to contract parameters. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 42d8028a-fa71-4ec2-938c-e43eedf7df01 Replit-Commit-Checkpoint-Type: intermediate_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/6d543d2c-20b9-4ea6-93fe-70fe9b1d9f80/42d8028a-fa71-4ec2-938c-e43eedf7df01/IdDfihe
This commit is contained in:
parent
2bf8b54dc6
commit
e21b19c0e6
4
.replit
4
.replit
@ -23,6 +23,10 @@ externalPort = 3001
|
|||||||
localPort = 41343
|
localPort = 41343
|
||||||
externalPort = 3000
|
externalPort = 3000
|
||||||
|
|
||||||
|
[[ports]]
|
||||||
|
localPort = 41607
|
||||||
|
externalPort = 3003
|
||||||
|
|
||||||
[[ports]]
|
[[ports]]
|
||||||
localPort = 42175
|
localPort = 42175
|
||||||
externalPort = 3002
|
externalPort = 3002
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
# VigilanzaTurni - Sistema Gestione Turni per Istituti di Vigilanza
|
# VigilanzaTurni - Sistema Gestione Turni per Istituti di Vigilanza
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
VigilanzaTurni is a professional 24/7 shift management system designed for security companies. It offers multi-role authentication (Admin, Coordinator, Guard, Client), comprehensive guard and site management, 24/7 shift planning, a live operational dashboard with KPIs, reporting for worked hours, and a notification system. The project aims to streamline operations and enhance efficiency for security institutes.
|
VigilanzaTurni is a professional 24/7 shift management system designed for security companies. It offers multi-role authentication (Admin, Coordinator, Guard, Client), comprehensive guard and site management, 24/7 shift planning, a live operational dashboard with KPIs, reporting for worked hours, and a notification system. The system supports multi-location operations (Roccapiemonte, Milano, Roma) managing 250+ security personnel across different branches. The project aims to streamline operations and enhance efficiency for security institutes.
|
||||||
|
|
||||||
## User Preferences
|
## User Preferences
|
||||||
- Interfaccia in italiano
|
- Interfaccia in italiano
|
||||||
|
|||||||
@ -85,6 +85,12 @@ export const vehicleTypeEnum = pgEnum("vehicle_type", [
|
|||||||
"suv", // SUV
|
"suv", // SUV
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
export const locationEnum = pgEnum("location", [
|
||||||
|
"roccapiemonte", // Sede Roccapiemonte (Salerno)
|
||||||
|
"milano", // Sede Milano
|
||||||
|
"roma", // Sede Roma
|
||||||
|
]);
|
||||||
|
|
||||||
// ============= SESSION & AUTH TABLES (Replit Auth) =============
|
// ============= SESSION & AUTH TABLES (Replit Auth) =============
|
||||||
|
|
||||||
// Session storage table - mandatory for Replit Auth
|
// Session storage table - mandatory for Replit Auth
|
||||||
@ -118,6 +124,7 @@ export const guards = pgTable("guards", {
|
|||||||
userId: varchar("user_id").references(() => users.id),
|
userId: varchar("user_id").references(() => users.id),
|
||||||
badgeNumber: varchar("badge_number").notNull().unique(),
|
badgeNumber: varchar("badge_number").notNull().unique(),
|
||||||
phoneNumber: varchar("phone_number"),
|
phoneNumber: varchar("phone_number"),
|
||||||
|
location: locationEnum("location").notNull().default("roccapiemonte"), // Sede di appartenenza
|
||||||
|
|
||||||
// Skills
|
// Skills
|
||||||
isArmed: boolean("is_armed").default(false),
|
isArmed: boolean("is_armed").default(false),
|
||||||
@ -151,6 +158,7 @@ export const vehicles = pgTable("vehicles", {
|
|||||||
model: varchar("model").notNull(), // Modello
|
model: varchar("model").notNull(), // Modello
|
||||||
vehicleType: vehicleTypeEnum("vehicle_type").notNull(),
|
vehicleType: vehicleTypeEnum("vehicle_type").notNull(),
|
||||||
year: integer("year"), // Anno immatricolazione
|
year: integer("year"), // Anno immatricolazione
|
||||||
|
location: locationEnum("location").notNull().default("roccapiemonte"), // Sede di appartenenza
|
||||||
|
|
||||||
// Assegnazione
|
// Assegnazione
|
||||||
assignedGuardId: varchar("assigned_guard_id").references(() => guards.id, { onDelete: "set null" }),
|
assignedGuardId: varchar("assigned_guard_id").references(() => guards.id, { onDelete: "set null" }),
|
||||||
@ -173,6 +181,7 @@ export const sites = pgTable("sites", {
|
|||||||
name: varchar("name").notNull(),
|
name: varchar("name").notNull(),
|
||||||
address: varchar("address").notNull(),
|
address: varchar("address").notNull(),
|
||||||
clientId: varchar("client_id").references(() => users.id),
|
clientId: varchar("client_id").references(() => users.id),
|
||||||
|
location: locationEnum("location").notNull().default("roccapiemonte"), // Sede gestionale
|
||||||
|
|
||||||
// Service requirements
|
// Service requirements
|
||||||
shiftType: shiftTypeEnum("shift_type").notNull(),
|
shiftType: shiftTypeEnum("shift_type").notNull(),
|
||||||
@ -300,6 +309,11 @@ export const contractParameters = pgTable("contract_parameters", {
|
|||||||
// Pause obbligatorie
|
// Pause obbligatorie
|
||||||
pauseMinutesIfOver6Hours: integer("pause_minutes_if_over_6_hours").notNull().default(10),
|
pauseMinutesIfOver6Hours: integer("pause_minutes_if_over_6_hours").notNull().default(10),
|
||||||
|
|
||||||
|
// Buoni pasto
|
||||||
|
mealVoucherEnabled: boolean("meal_voucher_enabled").default(true), // Buoni pasto attivi
|
||||||
|
mealVoucherAfterHours: integer("meal_voucher_after_hours").default(6), // Ore minime per diritto buono pasto
|
||||||
|
mealVoucherAmount: integer("meal_voucher_amount").default(8), // Importo buono pasto in euro (facoltativo)
|
||||||
|
|
||||||
// Limiti notturni (22:00-06:00)
|
// Limiti notturni (22:00-06:00)
|
||||||
maxNightHoursPerWeek: integer("max_night_hours_per_week").default(48),
|
maxNightHoursPerWeek: integer("max_night_hours_per_week").default(48),
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user