Compare commits
5 Commits
51691bda11
...
0f58cba38c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0f58cba38c | ||
|
|
e8b84ec7d4 | ||
|
|
cfd4ad1d8d | ||
|
|
0b8392808f | ||
|
|
f18e85e79a |
4
.replit
4
.replit
@ -35,6 +35,10 @@ externalPort = 4200
|
|||||||
localPort = 42175
|
localPort = 42175
|
||||||
externalPort = 3002
|
externalPort = 3002
|
||||||
|
|
||||||
|
[[ports]]
|
||||||
|
localPort = 42423
|
||||||
|
externalPort = 5173
|
||||||
|
|
||||||
[[ports]]
|
[[ports]]
|
||||||
localPort = 43169
|
localPort = 43169
|
||||||
externalPort = 5000
|
externalPort = 5000
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { useQuery, useMutation } from "@tanstack/react-query";
|
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 { Button } from "@/components/ui/button";
|
||||||
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
|
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
|
||||||
import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, DialogTrigger } from "@/components/ui/dialog";
|
import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, DialogTrigger } from "@/components/ui/dialog";
|
||||||
@ -40,6 +40,10 @@ export default function Sites() {
|
|||||||
queryKey: ["/api/sites"],
|
queryKey: ["/api/sites"],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const { data: customers } = useQuery<Customer[]>({
|
||||||
|
queryKey: ["/api/customers"],
|
||||||
|
});
|
||||||
|
|
||||||
const form = useForm<InsertSite>({
|
const form = useForm<InsertSite>({
|
||||||
resolver: zodResolver(insertSiteSchema),
|
resolver: zodResolver(insertSiteSchema),
|
||||||
defaultValues: {
|
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
|
<FormField
|
||||||
control={form.control}
|
control={form.control}
|
||||||
name="location"
|
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
|
<FormField
|
||||||
control={editForm.control}
|
control={editForm.control}
|
||||||
name="location"
|
name="location"
|
||||||
|
|||||||
Binary file not shown.
BIN
database-backups/vigilanzaturni_v1.0.37_20251023_092311.sql.gz
Normal file
BIN
database-backups/vigilanzaturni_v1.0.37_20251023_092311.sql.gz
Normal file
Binary file not shown.
@ -1082,7 +1082,7 @@ export async function registerRoutes(app: Express): Promise<Server> {
|
|||||||
|
|
||||||
weekData.push({
|
weekData.push({
|
||||||
date: dayStr,
|
date: dayStr,
|
||||||
dayOfWeek: format(currentDay, "EEEE"),
|
dayOfWeek: format(currentDayTimestamp, "EEEE"),
|
||||||
sites: sitesData,
|
sites: sitesData,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
10
version.json
10
version.json
@ -1,7 +1,13 @@
|
|||||||
{
|
{
|
||||||
"version": "1.0.36",
|
"version": "1.0.37",
|
||||||
"lastUpdate": "2025-10-23T09:06:31.261Z",
|
"lastUpdate": "2025-10-23T09:23:28.990Z",
|
||||||
"changelog": [
|
"changelog": [
|
||||||
|
{
|
||||||
|
"version": "1.0.37",
|
||||||
|
"date": "2025-10-23",
|
||||||
|
"type": "patch",
|
||||||
|
"description": "Deployment automatico v1.0.37"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"version": "1.0.36",
|
"version": "1.0.36",
|
||||||
"date": "2025-10-23",
|
"date": "2025-10-23",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user