Compare commits

..

2 Commits

Author SHA1 Message Date
Marco Lanzara
0ab1a804eb 🚀 Release v1.0.18
- Tipo: patch
- Database backup: database-backups/vigilanzaturni_v1.0.18_20251017_155640.sql.gz
- Data: 2025-10-17 15:56:56
2025-10-17 15:56:56 +00:00
marco370
3b2c347aec Improve site creation and editing display and optimize date filtering
Adjust dialog content height for better site form visibility and optimize shift retrieval by using SQL date comparison instead of date range filtering.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: e5565357-90e1-419f-b9a8-6ee8394636df
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/6d543d2c-20b9-4ea6-93fe-70fe9b1d9f80/e5565357-90e1-419f-b9a8-6ee8394636df/BjRzszS
2025-10-17 15:54:45 +00:00
6 changed files with 16 additions and 11 deletions

View File

@ -19,6 +19,10 @@ externalPort = 80
localPort = 33035
externalPort = 3001
[[ports]]
localPort = 37125
externalPort = 4200
[[ports]]
localPort = 41343
externalPort = 3000

View File

@ -184,7 +184,7 @@ export default function Sites() {
Aggiungi Sito
</Button>
</DialogTrigger>
<DialogContent className="max-w-2xl">
<DialogContent className="max-w-2xl max-h-[90vh] overflow-y-auto">
<DialogHeader>
<DialogTitle>Nuovo Sito</DialogTitle>
<DialogDescription>
@ -422,7 +422,7 @@ export default function Sites() {
{/* Edit Site Dialog */}
<Dialog open={!!editingSite} onOpenChange={(open) => !open && setEditingSite(null)}>
<DialogContent className="max-w-2xl">
<DialogContent className="max-w-2xl max-h-[90vh] overflow-y-auto">
<DialogHeader>
<DialogTitle>Modifica Sito</DialogTitle>
<DialogDescription>

View File

@ -659,10 +659,6 @@ export async function registerRoutes(app: Express): Promise<Server> {
try {
const dateStr = req.query.date as string || format(new Date(), "yyyy-MM-dd");
// Imposta inizio e fine giornata in UTC
const startOfDay = new Date(dateStr + "T00:00:00.000Z");
const endOfDay = new Date(dateStr + "T23:59:59.999Z");
// Ottieni tutti i siti attivi
const allSites = await db
.select()
@ -690,7 +686,7 @@ export async function registerRoutes(app: Express): Promise<Server> {
return selectedDate >= contractStart && selectedDate <= contractEnd;
});
// Ottieni turni del giorno con assegnazioni
// Ottieni turni del giorno con assegnazioni (usando SQL date comparison)
const dayShifts = await db
.select({
shift: shifts,
@ -700,8 +696,7 @@ export async function registerRoutes(app: Express): Promise<Server> {
.leftJoin(shiftAssignments, eq(shifts.id, shiftAssignments.shiftId))
.where(
and(
gte(shifts.startTime, startOfDay),
lte(shifts.startTime, endOfDay),
sql`DATE(${shifts.startTime}) = ${dateStr}`,
ne(shifts.status, "cancelled")
)
)

View File

@ -1,7 +1,13 @@
{
"version": "1.0.17",
"lastUpdate": "2025-10-17T15:41:26.844Z",
"version": "1.0.18",
"lastUpdate": "2025-10-17T15:56:56.628Z",
"changelog": [
{
"version": "1.0.18",
"date": "2025-10-17",
"type": "patch",
"description": "Deployment automatico v1.0.18"
},
{
"version": "1.0.17",
"date": "2025-10-17",