IO-995 Update CSR to be a relationship.
This commit is contained in:
@@ -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>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user