Updated contract creation to include auto status changes. BOD-314
This commit is contained in:
@@ -18,9 +18,9 @@ export default function ContractCreatePageComponent({
|
||||
{t("general.actions.create")}
|
||||
</Button>
|
||||
<ContractJobsContainer selectedJobState={selectedJobState} />
|
||||
<ContractCarsContainer selectedCarState={selectedCarState} />
|
||||
<ContractCarsContainer selectedCarState={selectedCarState} form={form} />
|
||||
<ContractLicenseDecodeButton form={form} />
|
||||
<ContractFormComponent form={form} />
|
||||
<ContractFormComponent create form={form} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -35,8 +35,10 @@ export function ContractCreatePageContainer({ bodyshop, setBreadcrumbs }) {
|
||||
setLoading(true);
|
||||
insertContract({
|
||||
variables: {
|
||||
ccId: selectedCarState[0],
|
||||
contract: {
|
||||
...values,
|
||||
status: "contracts.status.out",
|
||||
courtesycarid: selectedCarState[0],
|
||||
jobid: selectedJobState[0],
|
||||
},
|
||||
@@ -46,7 +48,7 @@ export function ContractCreatePageContainer({ bodyshop, setBreadcrumbs }) {
|
||||
notification["success"]({
|
||||
message: t("contracts.successes.saved"),
|
||||
});
|
||||
|
||||
form.resetFields();
|
||||
history.push(
|
||||
`/manage/courtesycars/contracts/${response.data.insert_cccontracts.returning[0].id}`
|
||||
);
|
||||
@@ -87,7 +89,6 @@ export function ContractCreatePageContainer({ bodyshop, setBreadcrumbs }) {
|
||||
form={form}
|
||||
layout="vertical"
|
||||
autoComplete="no"
|
||||
initialValues={{ status: "contracts.status.new" }}
|
||||
onFinish={handleFinish}
|
||||
>
|
||||
<ContractCreatePageComponent
|
||||
|
||||
@@ -108,6 +108,7 @@ export function CourtesyCarDetailPageContainer({
|
||||
form={form}
|
||||
autoComplete="no"
|
||||
onFinish={handleFinish}
|
||||
layout="vertical"
|
||||
initialValues={
|
||||
data
|
||||
? {
|
||||
|
||||
Reference in New Issue
Block a user