Tech login and checklist fixes.

This commit is contained in:
Patrick Fic
2021-02-24 10:38:55 -08:00
parent 57600a1e5a
commit 19207013e2
8 changed files with 56 additions and 60 deletions

View File

@@ -64,7 +64,7 @@ export function JobChecklistForm({
[(type === "intake" && "intakechecklist") ||
(type === "deliver" && "deliverchecklist")]: {
...values,
formItems: formItems.map((fi) => {
form: formItems.map((fi) => {
return {
...fi,
value: values[fi.name],

View File

@@ -611,12 +611,6 @@ export default function ShopInfoComponent({ form, saveLoading }) {
label={t("bodyshop.fields.md_ins_co.street1")}
key={`${index}street1`}
name={[field.name, "street1"]}
rules={[
{
required: true,
message: t("general.validation.required"),
},
]}
>
<Input />
</Form.Item>
@@ -633,12 +627,6 @@ export default function ShopInfoComponent({ form, saveLoading }) {
label={t("bodyshop.fields.md_ins_co.city")}
key={`${index}city`}
name={[field.name, "city"]}
rules={[
{
required: true,
message: t("general.validation.required"),
},
]}
>
<Input />
</Form.Item>
@@ -647,12 +635,6 @@ export default function ShopInfoComponent({ form, saveLoading }) {
label={t("bodyshop.fields.md_ins_co.state")}
key={`${index}state`}
name={[field.name, "state"]}
rules={[
{
required: true,
message: t("general.validation.required"),
},
]}
>
<Input />
</Form.Item>
@@ -661,12 +643,6 @@ export default function ShopInfoComponent({ form, saveLoading }) {
label={t("bodyshop.fields.md_ins_co.zip")}
key={`${index}zip`}
name={[field.name, "zip"]}
rules={[
{
required: true,
message: t("general.validation.required"),
},
]}
>
<Input />
</Form.Item>

View File

@@ -40,7 +40,6 @@ export default function ShopInfoIntakeChecklistComponent({ form }) {
>
<Input />
</Form.Item>
<Form.Item
className="imex-flex-row__margin"
label={t("jobs.fields.intake.type")}
@@ -61,7 +60,6 @@ export default function ShopInfoIntakeChecklistComponent({ form }) {
))}
</Select>
</Form.Item>
<Form.Item
className="imex-flex-row__margin"
label={t("jobs.fields.intake.label")}
@@ -76,7 +74,6 @@ export default function ShopInfoIntakeChecklistComponent({ form }) {
>
<Input />
</Form.Item>
<Form.Item
className="imex-flex-row__margin"
label={t("jobs.fields.intake.required")}
@@ -86,7 +83,34 @@ export default function ShopInfoIntakeChecklistComponent({ form }) {
>
<Switch />
</Form.Item>
<Form.Item
className="imex-flex-row__margin"
label={t("jobs.fields.intake.min")}
key={`${index}min`}
name={[field.name, "min"]}
rules={[
{
required: true,
message: t("general.validation.required"),
},
]}
>
<Input />
</Form.Item>
<Form.Item
className="imex-flex-row__margin"
label={t("jobs.fields.intake.max")}
key={`${index}max`}
name={[field.name, "max"]}
rules={[
{
required: true,
message: t("general.validation.required"),
},
]}
>
<Input />
</Form.Item>
<DeleteFilled
onClick={() => {
remove(field.name);

View File

@@ -36,39 +36,42 @@ export function TechLogin({
};
return (
<div className='tech-login-container'>
<div className="tech-login-container">
{technician ? <Redirect to={`/tech/joblookup`} /> : null}
<Form
layout='vertical'
layout="vertical"
onFinish={handleFinish}
autoComplete='new-password'>
autoComplete="new-password"
>
<Form.Item
label={t("tech.fields.employeeid")}
name='employeeid'
name="employeeid"
rules={[
{
required: true,
message: t("general.validation.required"),
},
]}>
<Input size='large' autoComplete='new-password' />
]}
>
<Input size="large" autoComplete="new-password" />
</Form.Item>
<Form.Item
label={t("tech.fields.pin")}
name='pin'
name="pin"
rules={[
{
required: true,
message: t("general.validation.required"),
},
]}>
<Input.Password size='large' autoComplete='new-password' />
]}
>
<Input.Password size="large" autoComplete="new-password" />
</Form.Item>
<Button htmlType='submit' loading={loginLoading} className='login-btn'>
<Button htmlType="submit" loading={loginLoading} className="login-btn">
{t("general.actions.login")}
</Button>
</Form>
{loginError ? <AlertComponent type='error' message={loginError} /> : null}
{loginError ? <AlertComponent type="error" message={loginError} /> : null}
</div>
);
}