IO-995 Update CSR to be a relationship.

This commit is contained in:
Patrick Fic
2021-05-06 15:29:50 -07:00
parent 121e7b3048
commit 9d1164496d
33 changed files with 1808 additions and 48 deletions

View File

@@ -23,7 +23,9 @@ export function JobEmployeeAssignments({
jobRO,
body,
refinish,
prep,
csr,
handleAdd,
handleRemove,
loading,
@@ -155,6 +157,30 @@ export function JobEmployeeAssignments({
/>
)}
</DataLabel>
<DataLabel label={t("jobs.fields.employee_csr")}>
{csr ? (
<div>
<span>{`${csr.first_name || ""} ${csr.last_name || ""}`}</span>
<DeleteFilled
disabled={jobRO}
style={iconStyle}
operation="csr"
onClick={() => !jobRO && handleRemove("csr")}
/>
</div>
) : (
<PlusCircleFilled
disabled={jobRO}
style={iconStyle}
onClick={() => {
if (!jobRO) {
setAssignment({ operation: "csr" });
setVisibility(true);
}
}}
/>
)}
</DataLabel>
</Spin>
</Popover>
);