Updated contract creation to include auto status changes. BOD-314

This commit is contained in:
Patrick Fic
2020-08-28 09:44:55 -07:00
parent 554a8f6170
commit fbde4ddc2a
15 changed files with 328 additions and 226 deletions

View File

@@ -4,15 +4,17 @@ import { QUERY_AVAILABLE_CC } from "../../graphql/courtesy-car.queries";
import AlertComponent from "../alert/alert.component";
import ContractCarsComponent from "./contract-cars.component";
export default function ContractCarsContainer({ selectedCarState, bodyshop }) {
export default function ContractCarsContainer({ selectedCarState, form }) {
const { loading, error, data } = useQuery(QUERY_AVAILABLE_CC);
const [selectedCar, setSelectedCar] = selectedCarState;
const handleSelect = record => {
const handleSelect = (record) => {
setSelectedCar(record.id);
form.setFieldsValue({
kmstart: record.mileage,
dailyrate: record.dailycost,
});
};
if (error) return <AlertComponent message={error.message} type="error" />;