- Fix for IO-2540

Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
Dave Richer
2024-03-05 15:13:40 -05:00
parent d557de7eec
commit bf9fc128cd
5 changed files with 20 additions and 2 deletions

View File

@@ -27,6 +27,7 @@ export function ProductionColumnsComponent({
bodyshop,
data,
tableState,
refetch,
}) {
const [columns, setColumns] = columnState;
const {t} = useTranslation();
@@ -50,6 +51,7 @@ export function ProductionColumnsComponent({
data,
state: tableState,
activeStatuses: bodyshop.md_ro_statuses.active_statuses,
refetch,
});
const menu = {

View File

@@ -26,7 +26,7 @@ import ProductionListColumnCategory from "./production-list-columns.status.categ
import ProductionListColumnStatus from "./production-list-columns.status.component";
import ProductionlistColumnTouchTime from "./prodution-list-columns.touchtime.component";
const r = ({technician, state, activeStatuses, data, bodyshop}) => {
const r = ({technician, state, activeStatuses, data, bodyshop, refetch}) => {
return [
{
title: i18n.t("jobs.actions.viewdetail"),
@@ -473,6 +473,7 @@ const r = ({technician, state, activeStatuses, data, bodyshop}) => {
),
render: (text, record) => (
<ProductionListEmployeeAssignment
refetch={refetch}
record={record}
type="employee_body"
/>
@@ -493,6 +494,7 @@ const r = ({technician, state, activeStatuses, data, bodyshop}) => {
render: (text, record) => (
<ProductionListEmployeeAssignment
record={record}
refetch={refetch}
type="employee_prep"
/>
),
@@ -509,7 +511,7 @@ const r = ({technician, state, activeStatuses, data, bodyshop}) => {
bodyshop.employees?.find((e) => e.id === b.employee_csr)?.first_name
),
render: (text, record) => (
<ProductionListEmployeeAssignment record={record} type="employee_csr"/>
<ProductionListEmployeeAssignment refetch={refetch} record={record} type="employee_csr"/>
),
},
{
@@ -529,6 +531,7 @@ const r = ({technician, state, activeStatuses, data, bodyshop}) => {
render: (text, record) => (
<ProductionListEmployeeAssignment
record={record}
refetch={refetch}
type="employee_refinish"
/>
),

View File

@@ -33,6 +33,7 @@ export function ProductionListEmpAssignment({
insertAuditTrail,
bodyshop,
record,
refetch,
type,
}) {
const {t} = useTranslation();
@@ -64,6 +65,9 @@ export function ProductionListEmpAssignment({
}),
});
}
await refetch();
setLoading(false);
};
const handleRemove = async (operation) => {
@@ -89,6 +93,9 @@ export function ProductionListEmpAssignment({
}),
});
}
await refetch();
setLoading(false);
};

View File

@@ -18,6 +18,7 @@ const mapStateToProps = createStructuredSelector({
});
export function ProductionListTable({
refetch,
bodyshop,
technician,
currentUser,
@@ -38,6 +39,7 @@ export function ProductionListTable({
return {
...ProductionListColumns({
bodyshop,
refetch,
technician,
state,
data: data,
@@ -95,6 +97,7 @@ export function ProductionListTable({
...ProductionListColumns({
technician,
state,
refetch,
data: data,
activeStatuses: bodyshop.md_ro_statuses.active_statuses,
}).find((e) => e.key === k.key),

View File

@@ -64,6 +64,7 @@ export function ProductionListTable({loading, data, refetch, bodyshop, technicia
return {
...ProductionListColumns({
bodyshop,
refetch,
technician,
state,
data,
@@ -84,6 +85,7 @@ export function ProductionListTable({loading, data, refetch, bodyshop, technicia
...ProductionListColumns({
bodyshop,
technician,
refetch,
state,
data: data,
activeStatuses: bodyshop.md_ro_statuses.active_statuses,
@@ -262,6 +264,7 @@ export function ProductionListTable({loading, data, refetch, bodyshop, technicia
state={state}
setState={setState}
setColumns={setColumns}
refetch={refetch}
data={data}
/>