BOD-10 BOD-12 BOD-11 WIP for Manual Job Creation.
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
import { Checkbox, Col, Row, Typography } from "antd";
|
||||
import React, { useContext } from "react";
|
||||
import JobCreateContext from "../../pages/jobs-create/jobs-create.context";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import JobsCreateVehicleInfoNewComponent from "./jobs-create-vehicle-info.new.component";
|
||||
import JobsCreateVehicleInfoSearchComponent from "./jobs-create-vehicle-info.search.component";
|
||||
|
||||
export default function JobsCreateVehicleInfoComponent({ loading, vehicles }) {
|
||||
const [state, setState] = useContext(JobCreateContext);
|
||||
const { t } = useTranslation();
|
||||
return (
|
||||
<div>
|
||||
<Typography.Title>{t("jobs.labels.create.vehicleinfo")}</Typography.Title>
|
||||
<Row>
|
||||
<Col span={16}>
|
||||
<JobsCreateVehicleInfoSearchComponent
|
||||
loading={loading}
|
||||
vehicles={vehicles}
|
||||
/>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Checkbox
|
||||
defaultChecked={state.vehicle.new}
|
||||
checked={state.vehicle.new}
|
||||
onChange={() => {
|
||||
setState({
|
||||
...state,
|
||||
vehicle: {
|
||||
...state.vehicle,
|
||||
new: !state.vehicle.new,
|
||||
selectedid: null
|
||||
}
|
||||
});
|
||||
}}
|
||||
>
|
||||
{t("jobs.labels.create.newvehicle")}
|
||||
</Checkbox>
|
||||
<JobsCreateVehicleInfoNewComponent />
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user