IO-743 CCC Automatic fill fixes.
This commit is contained in:
@@ -4,7 +4,6 @@ import { useTranslation } from "react-i18next";
|
||||
import ContractCarsContainer from "../../components/contract-cars/contract-cars.container";
|
||||
import ContractFormComponent from "../../components/contract-form/contract-form.component";
|
||||
import ContractJobsContainer from "../../components/contract-jobs/contract-jobs.container";
|
||||
import ContractLicenseDecodeButton from "../../components/contract-license-decode-button/contract-license-decode-button.component";
|
||||
export default function ContractCreatePageComponent({
|
||||
form,
|
||||
selectedJobState,
|
||||
@@ -14,7 +13,12 @@ export default function ContractCreatePageComponent({
|
||||
const { t } = useTranslation();
|
||||
|
||||
const CreateButton = (
|
||||
<Button type="primary" onClick={() => form.submit()} loading={loading}>
|
||||
<Button
|
||||
disabled={!selectedJobState[0] || !selectedCarState[0]}
|
||||
type="primary"
|
||||
onClick={() => form.submit()}
|
||||
loading={loading}
|
||||
>
|
||||
{t("general.actions.create")}
|
||||
</Button>
|
||||
);
|
||||
@@ -24,12 +28,18 @@ export default function ContractCreatePageComponent({
|
||||
{CreateButton}
|
||||
<ContractJobsContainer selectedJobState={selectedJobState} />
|
||||
<ContractCarsContainer selectedCarState={selectedCarState} form={form} />
|
||||
<ContractLicenseDecodeButton form={form} />
|
||||
<ContractFormComponent
|
||||
create
|
||||
form={form}
|
||||
selectedJobState={selectedJobState}
|
||||
/>
|
||||
|
||||
<div
|
||||
style={{
|
||||
display: selectedJobState[0] && selectedCarState[0] ? "" : "none",
|
||||
}}
|
||||
>
|
||||
<ContractFormComponent
|
||||
create
|
||||
form={form}
|
||||
selectedJobState={selectedJobState}
|
||||
/>
|
||||
</div>
|
||||
{CreateButton}
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -100,7 +100,6 @@ export function ContractCreatePageContainer({
|
||||
layout="vertical"
|
||||
autoComplete="no"
|
||||
onFinish={handleFinish}
|
||||
initialValues={{ fuelout: 100 }}
|
||||
>
|
||||
<ContractCreatePageComponent
|
||||
loading={loading}
|
||||
|
||||
Reference in New Issue
Block a user