- Implemented TemplateCheckpointEditDialog for creating and editing inspection checkpoints. - Added VendorActions component for managing vendor actions including edit, activate/deactivate, and delete. - Created VendorContext for managing vendor state across components. - Developed VendorGeneralInfo component to display detailed vendor information. - Introduced AedSymbol and Money components for consistent currency representation. - Added PromptDialog for user input prompts throughout the application. - Implemented RelationLink component for unified related-data display in CRUD tables. - Created InspectionTemplatesClient for API interactions related to inspection templates.
24 lines
917 B
TypeScript
24 lines
917 B
TypeScript
import { getServerApi } from '@garage/api/server'
|
|
import { InspectionGeneralInfo } from '@/modules/inspections/inspection-general-info'
|
|
import { InspectionDetailHeader } from '@/modules/inspections/inspection-detail-header'
|
|
import DashboardPage from '@/base/components/layout/dashboard/dashboard-page'
|
|
|
|
export default async function page(props: { params: Promise<{ id: string }> }) {
|
|
const { id } = await props.params
|
|
const api = await getServerApi()
|
|
const inspection = await api.inspections.getById(id)
|
|
|
|
if (!inspection.data) {
|
|
return <div className="text-muted-foreground">Inspection not found.</div>
|
|
}
|
|
|
|
const data = inspection.data as { title?: string }
|
|
|
|
return (
|
|
<DashboardPage header={null}>
|
|
<InspectionDetailHeader inspectionId={id} title={data.title} />
|
|
<InspectionGeneralInfo inspection={inspection.data} />
|
|
</DashboardPage>
|
|
)
|
|
}
|