Compare commits

..

5 Commits

Author SHA1 Message Date
Marco Lanzara
0f58cba38c 🚀 Release v1.0.37
- Tipo: patch
- Database backup: database-backups/vigilanzaturni_v1.0.37_20251023_092311.sql.gz
- Data: 2025-10-23 09:23:29
2025-10-23 09:23:29 +00:00
marco370
e8b84ec7d4 Fix issues with the mobile planning, site references, and data loading
Fixes bugs in mobile routing, site-to-client association, and data loading for fixed planning.

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/1nTItRR
2025-10-23 09:21:23 +00:00
marco370
cfd4ad1d8d Fix issues with mobile planning, site references, and data loading errors
Fix routing for mobile planning, add client references to sites, and resolve data loading errors in fixed planning.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: e5565357-90e1-419f-b9a8-6ee8394636df
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/6d543d2c-20b9-4ea6-93fe-70fe9b1d9f80/e5565357-90e1-419f-b9a8-6ee8394636df/1nTItRR
2025-10-23 09:21:00 +00:00
marco370
0b8392808f Fix error when loading data in fixed shift planning
Update dayOfWeek calculation to use correct timestamp in weekData generation.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: e5565357-90e1-419f-b9a8-6ee8394636df
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/6d543d2c-20b9-4ea6-93fe-70fe9b1d9f80/e5565357-90e1-419f-b9a8-6ee8394636df/1nTItRR
2025-10-23 09:17:40 +00:00
marco370
f18e85e79a Add customer selection to site creation and editing forms
Update the `sites.tsx` page to fetch and display customer data, enabling users to associate sites with specific customers during creation and editing. This involves adding a new `Select` component for customer selection in both the site creation form and the edit site form, and updating the `InsertSite` schema to include `customerId`.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: e5565357-90e1-419f-b9a8-6ee8394636df
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/6d543d2c-20b9-4ea6-93fe-70fe9b1d9f80/e5565357-90e1-419f-b9a8-6ee8394636df/1nTItRR
2025-10-23 09:16:27 +00:00
6 changed files with 70 additions and 4 deletions

View File

@ -35,6 +35,10 @@ externalPort = 4200
localPort = 42175
externalPort = 3002
[[ports]]
localPort = 42423
externalPort = 5173
[[ports]]
localPort = 43169
externalPort = 5000

View File

@ -1,6 +1,6 @@
import { useState } from "react";
import { useQuery, useMutation } from "@tanstack/react-query";
import { Site, InsertSite } from "@shared/schema";
import { Site, InsertSite, Customer } from "@shared/schema";
import { Button } from "@/components/ui/button";
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, DialogTrigger } from "@/components/ui/dialog";
@ -40,6 +40,10 @@ export default function Sites() {
queryKey: ["/api/sites"],
});
const { data: customers } = useQuery<Customer[]>({
queryKey: ["/api/customers"],
});
const form = useForm<InsertSite>({
resolver: zodResolver(insertSiteSchema),
defaultValues: {
@ -228,6 +232,32 @@ export default function Sites() {
)}
/>
<FormField
control={form.control}
name="customerId"
render={({ field }) => (
<FormItem>
<FormLabel>Cliente</FormLabel>
<Select onValueChange={field.onChange} value={field.value || undefined}>
<FormControl>
<SelectTrigger data-testid="select-customer">
<SelectValue placeholder="Seleziona cliente (opzionale)" />
</SelectTrigger>
</FormControl>
<SelectContent>
<SelectItem value="">Nessun cliente</SelectItem>
{customers?.map((customer) => (
<SelectItem key={customer.id} value={customer.id}>
{customer.name}
</SelectItem>
))}
</SelectContent>
</Select>
<FormMessage />
</FormItem>
)}
/>
<FormField
control={form.control}
name="location"
@ -489,6 +519,32 @@ export default function Sites() {
)}
/>
<FormField
control={editForm.control}
name="customerId"
render={({ field }) => (
<FormItem>
<FormLabel>Cliente</FormLabel>
<Select onValueChange={field.onChange} value={field.value || undefined}>
<FormControl>
<SelectTrigger data-testid="select-edit-customer">
<SelectValue placeholder="Seleziona cliente (opzionale)" />
</SelectTrigger>
</FormControl>
<SelectContent>
<SelectItem value="">Nessun cliente</SelectItem>
{customers?.map((customer) => (
<SelectItem key={customer.id} value={customer.id}>
{customer.name}
</SelectItem>
))}
</SelectContent>
</Select>
<FormMessage />
</FormItem>
)}
/>
<FormField
control={editForm.control}
name="location"

View File

@ -1082,7 +1082,7 @@ export async function registerRoutes(app: Express): Promise<Server> {
weekData.push({
date: dayStr,
dayOfWeek: format(currentDay, "EEEE"),
dayOfWeek: format(currentDayTimestamp, "EEEE"),
sites: sitesData,
});
}

View File

@ -1,7 +1,13 @@
{
"version": "1.0.36",
"lastUpdate": "2025-10-23T09:06:31.261Z",
"version": "1.0.37",
"lastUpdate": "2025-10-23T09:23:28.990Z",
"changelog": [
{
"version": "1.0.37",
"date": "2025-10-23",
"type": "patch",
"description": "Deployment automatico v1.0.37"
},
{
"version": "1.0.36",
"date": "2025-10-23",