fixed a lot of stuff

This commit is contained in:
2026-07-25 16:19:23 -05:00
parent 1b478cd7ba
commit fb25b8aba6
8 changed files with 21 additions and 406 deletions
+7 -3
View File
@@ -20,8 +20,8 @@ function AddJob() {
initialValues: {
customerId: 0,
name: "",
startDate: new Date(),
endDate: new Date(),
startDate: "",
endDate: "",
address: "",
venue: "",
notes: "",
@@ -35,7 +35,11 @@ function AddJob() {
const result = await fetch(import.meta.env.VITE_API_URL + '/jobs', {
method: 'POST',
body: JSON.stringify(values),
body: JSON.stringify({
...values,
startDate: new Date(values.startDate).toISOString(),
endDate: new Date(values.endDate).toISOString(),
}),
headers: {
'Content-Type': 'application/json'
}
+2 -2
View File
@@ -45,8 +45,8 @@ function JobList() {
<Table.Td>{data.customerId}</Table.Td>
<Table.Td>{data.name}</Table.Td>
<Table.Td>{data.venue}</Table.Td>
<Table.Td>{data.status.name}</Table.Td>
<Table.Td>{data.startDate.getDate()}</Table.Td>
<Table.Td>{data.status?.name ?? '—'}</Table.Td>
<Table.Td>{new Date(data.startDate).toLocaleDateString()}</Table.Td>
<Table.Td>
<Link to={`/inventory/itemDetail/${data.id}`}>Details</Link>
</Table.Td>
+6 -6
View File
@@ -2,10 +2,10 @@ export interface Job {
id: number,
customerId: number,
name: string,
status: {id: string; name: string},
statusId: string;
startDate: Date;
endDate: Date;
status: {id: string; name: string} | null,
statusId: string | null;
startDate: string;
endDate: string;
totalPrice: string,
venue: string,
address: string,
@@ -15,8 +15,8 @@ export interface Job {
export interface NewJob {
customerId: number,
name: string,
startDate: Date;
endDate: Date;
startDate: string;
endDate: string;
venue: string,
address: string,
notes: string,