ts ki mkc

This commit is contained in:
Om Lanke
2025-07-04 23:08:09 +05:30
parent 57e25f663b
commit 8acc3e6955
19 changed files with 1691 additions and 102 deletions

View File

@@ -7,12 +7,9 @@ import { Button } from '@workspace/ui/components/button';
export const dynamic = 'force-dynamic';
async function getAllJobsWithCompany() {
const allJobs = await db.select().from(jobs);
const allCompanies = await db.select().from(companies);
return allJobs.map(job => ({
...job,
company: allCompanies.find(c => c.id === job.companyId) || null,
}));
return await db.query.jobs.findMany({
with: { company: true },
});
}
export default async function JobsListPage() {