mirror of
https://github.com/BarkProductions/barkman.git
synced 2026-08-11 11:42:03 +00:00
fixed a lot of stuff
This commit is contained in:
@@ -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'
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user