mirror of
https://github.com/BarkProductions/barkman.git
synced 2026-08-11 11:42:03 +00:00
Fix duplicate changedOrderToJob migration blocking build
Two divergent copies of this branch each independently regenerated an EF migration named changedOrderToJob, and merging both left two files with the same C# class name (compile error) plus an orphaned fixedOrderCustomerID migration referencing the already-renamed orders table. Removed the dead/unapplied migrations, committed the two migrations already live on the shared dev DB, and added FixJobsCustomerIdType to bring jobs.customer_id in line with the model (text -> integer) using an explicit USING cast. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -14,6 +14,8 @@ import CustomerList from "@/features/customers/CustomerList.tsx";
|
||||
import AddCustomer from "@/features/customers/AddCustomer.tsx";
|
||||
import CustomerDetail from "@/features/customers/CustomerDetail.tsx";
|
||||
import EditCustomer from "@/features/customers/EditCustomer.tsx";
|
||||
import AddJob from "@/features/jobs/AddJob.tsx";
|
||||
import JobList from "@/features/jobs/JobList.tsx";
|
||||
|
||||
// Create a client
|
||||
const queryClient = new QueryClient()
|
||||
@@ -54,6 +56,8 @@ function App() {
|
||||
<Route path="customers/addCustomer" element={<AddCustomer/>}/>
|
||||
<Route path="customers/customerDetail/:customerId" element={<CustomerDetail/>}/>
|
||||
<Route path="customers/editCustomer/:customerId" element={<EditCustomer/>}/>
|
||||
<Route path="jobs" element={<JobList/>}/>
|
||||
<Route path="jobs/addJob" element={<AddJob/>}/>
|
||||
|
||||
</Routes>
|
||||
</>
|
||||
|
||||
@@ -8,6 +8,7 @@ import BarkLogo from '@/assets/barklogo.png';
|
||||
const links = [
|
||||
{ link: '/', label: 'Home' },
|
||||
{ link: '/customers', label: 'Customers' },
|
||||
{ link: '/jobs', label: 'Jobs' },
|
||||
{ link: '/inventory', label: 'Inventory' },
|
||||
];
|
||||
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
import {Flex, Table} from '@mantine/core';
|
||||
import BarkButton from "../../common/components/BarkButton.tsx";
|
||||
import {Link, NavLink} from "react-router";
|
||||
import useJobList from "./hooks/useJobList.tsx";
|
||||
|
||||
|
||||
function JobList() {
|
||||
|
||||
const jobQuery = useJobList();
|
||||
|
||||
if (jobQuery.isPending) return 'Loading...'
|
||||
|
||||
if (jobQuery.error) return 'An error has occurred: ' + jobQuery.error.message
|
||||
|
||||
|
||||
return (
|
||||
<>
|
||||
<Flex
|
||||
mih={50}
|
||||
gap="xl"
|
||||
justify="center"
|
||||
align="center"
|
||||
direction="row"
|
||||
wrap="wrap"
|
||||
>
|
||||
<p>
|
||||
ARFF ARFF BARK BARK
|
||||
</p>
|
||||
<NavLink to={'/jobs/addJob'}><BarkButton>Add Job</BarkButton></NavLink>
|
||||
</Flex>
|
||||
|
||||
<Table striped>
|
||||
<Table.Thead>
|
||||
<Table.Tr>
|
||||
<Table.Th c="red">Customer ID</Table.Th>
|
||||
<Table.Th c="red">Name</Table.Th>
|
||||
<Table.Th c="red">Venue</Table.Th>
|
||||
<Table.Th c="red">Status</Table.Th>
|
||||
<Table.Th c="red">Start Date</Table.Th>
|
||||
</Table.Tr>
|
||||
</Table.Thead>
|
||||
<Table.Tbody>
|
||||
{jobQuery.data?.map((data) => (
|
||||
<Table.Tr key={data.id}>
|
||||
<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>
|
||||
<Link to={`/inventory/itemDetail/${data.id}`}>Details</Link>
|
||||
</Table.Td>
|
||||
</Table.Tr>
|
||||
))}
|
||||
</Table.Tbody>
|
||||
</Table>
|
||||
</>
|
||||
)
|
||||
}
|
||||
export default JobList;
|
||||
Reference in New Issue
Block a user