UI fixes for manual job creation + owners pages + vehicles pages + all jobs BOD-155
This commit is contained in:
@@ -4,6 +4,7 @@ import CurrencyFormatter from "../../utils/CurrencyFormatter";
|
||||
import PhoneFormatter from "../../utils/PhoneFormatter";
|
||||
import { Link } from "react-router-dom";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import DataLabel from "../data-label/data-label.component";
|
||||
|
||||
export default function ScheduleEventComponent({ event, handleCancel }) {
|
||||
const { t } = useTranslation();
|
||||
@@ -23,59 +24,58 @@ export default function ScheduleEventComponent({ event, handleCancel }) {
|
||||
</span>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{event.job ? (
|
||||
<div>
|
||||
<div>{`${t("jobs.fields.ro_number")}: ${
|
||||
(event.job && event.job.ro_number) || ""
|
||||
}`}</div>
|
||||
<div>
|
||||
{t("jobs.fields.clm_total")}:
|
||||
<DataLabel label={t("jobs.fields.ro_number")}>
|
||||
{(event.job && event.job.ro_number) || ""}
|
||||
</DataLabel>
|
||||
<DataLabel label={t("jobs.fields.clm_total")}>
|
||||
<CurrencyFormatter>
|
||||
{(event.job && event.job.clm_total) || ""}
|
||||
</CurrencyFormatter>
|
||||
</div>
|
||||
<div>{`${t("jobs.fields.clm_no")}: ${
|
||||
(event.job && event.job.clm_no) || ""
|
||||
}`}</div>
|
||||
<div>
|
||||
{t("jobs.fields.ownr_ea")}:{(event.job && event.job.ownr_ea) || ""}
|
||||
</div>
|
||||
<div>
|
||||
{t("jobs.fields.ownr_ph1")}:
|
||||
</DataLabel>
|
||||
<DataLabel hideIfNull label={t("jobs.fields.ins_co_nm")}>
|
||||
{(event.job && event.job.ins_co_nm) || ""}
|
||||
</DataLabel>
|
||||
<DataLabel hideIfNull label={t("jobs.fields.clm_no")}>
|
||||
{(event.job && event.job.clm_no) || ""}
|
||||
</DataLabel>
|
||||
<DataLabel label={t("jobs.fields.ownr_ea")}>
|
||||
{(event.job && event.job.ownr_ea) || ""}
|
||||
</DataLabel>
|
||||
<DataLabel label={t("jobs.fields.ownr_ph1")}>
|
||||
<PhoneFormatter>
|
||||
{(event.job && event.job.ownr_ph1) || ""}
|
||||
</PhoneFormatter>
|
||||
</div>
|
||||
</DataLabel>
|
||||
</div>
|
||||
) : null}
|
||||
{
|
||||
//TODO Add phone 1 MessagingActionTypes.
|
||||
}
|
||||
{event.job ? (
|
||||
<Link to={`/manage/jobs/${event.job && event.job.id}`}>
|
||||
<Button>{t("appointments.actions.viewjob")}</Button>
|
||||
</Link>
|
||||
) : null}
|
||||
<Button onClick={() => handleCancel(event.id)} disabled={event.arrived}>
|
||||
{t("appointments.actions.cancel")}
|
||||
</Button>
|
||||
<Button disabled={event.arrived}>
|
||||
{
|
||||
//TODO Add reschedule Func.
|
||||
}
|
||||
{t("appointments.actions.reschedule")}
|
||||
</Button>
|
||||
{event.isintake ? (
|
||||
<Link
|
||||
to={{
|
||||
pathname: `/manage/jobs/${event.job && event.job.id}/intake`,
|
||||
search: `?appointmentId=${event.id}`,
|
||||
}}>
|
||||
<Button disabled={event.arrived}>
|
||||
{t("appointments.actions.intake")}
|
||||
</Button>
|
||||
</Link>
|
||||
) : null}
|
||||
|
||||
<div className='imex-flex-row'>
|
||||
{event.job ? (
|
||||
<Link to={`/manage/jobs/${event.job && event.job.id}`}>
|
||||
<Button>{t("appointments.actions.viewjob")}</Button>
|
||||
</Link>
|
||||
) : null}
|
||||
<Button onClick={() => handleCancel(event.id)} disabled={event.arrived}>
|
||||
{t("appointments.actions.cancel")}
|
||||
</Button>
|
||||
<Button disabled={event.arrived}>
|
||||
{t("appointments.actions.reschedule")}
|
||||
</Button>
|
||||
{event.isintake ? (
|
||||
<Link
|
||||
to={{
|
||||
pathname: `/manage/jobs/${event.job && event.job.id}/intake`,
|
||||
search: `?appointmentId=${event.id}`,
|
||||
}}>
|
||||
<Button disabled={event.arrived}>
|
||||
{t("appointments.actions.intake")}
|
||||
</Button>
|
||||
</Link>
|
||||
) : null}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -96,14 +96,9 @@ export default function ScheduleEventComponent({ event, handleCancel }) {
|
||||
</div>
|
||||
);
|
||||
|
||||
const Load = (
|
||||
<div className='load'>
|
||||
<Progress percent={77} showInfo={false} />
|
||||
</div>
|
||||
);
|
||||
return (
|
||||
<Popover content={popoverContent}>
|
||||
<div>{event.allDay ? Load : RegularEvent}</div>
|
||||
<Popover trigger='click' content={popoverContent}>
|
||||
{RegularEvent}
|
||||
</Popover>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user