IO-1979 Resolve various employee vacation bugs.
This commit is contained in:
@@ -14777,6 +14777,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>vacationadded</name>
|
||||||
|
<definition_loaded>false</definition_loaded>
|
||||||
|
<description></description>
|
||||||
|
<comment></comment>
|
||||||
|
<default_text></default_text>
|
||||||
|
<translations>
|
||||||
|
<translation>
|
||||||
|
<language>en-US</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>es-MX</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>fr-CA</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
</translations>
|
||||||
|
</concept_node>
|
||||||
</children>
|
</children>
|
||||||
</folder_node>
|
</folder_node>
|
||||||
<folder_node>
|
<folder_node>
|
||||||
|
|||||||
@@ -37,9 +37,12 @@ export function ScheduleCalendarHeaderComponent({
|
|||||||
...otherProps
|
...otherProps
|
||||||
}) {
|
}) {
|
||||||
const ATSToday = useMemo(() => {
|
const ATSToday = useMemo(() => {
|
||||||
|
console.log("eeee", events);
|
||||||
if (!events) return [];
|
if (!events) return [];
|
||||||
return _.groupBy(
|
return _.groupBy(
|
||||||
events.filter((e) => moment(date).isSame(moment(e.start), "day")),
|
events.filter(
|
||||||
|
(e) => !e.vacation && moment(date).isSame(moment(e.start), "day")
|
||||||
|
),
|
||||||
"job.alt_transport"
|
"job.alt_transport"
|
||||||
);
|
);
|
||||||
}, [events, date]);
|
}, [events, date]);
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ export default function ShopEmployeeAddVacation({ employee }) {
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
notification["success"]({
|
notification["success"]({
|
||||||
message: t("employees.successes.added"),
|
message: t("employees.successes.vacationadded"),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
|
|||||||
@@ -1494,7 +1494,7 @@ export default function ShopInfoGeneral({ form }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const ReceivableCustomFieldSelect = (
|
const ReceivableCustomFieldSelect = (
|
||||||
<Select>
|
<Select allowClear>
|
||||||
<Select.Option value="v_vin">VIN</Select.Option>
|
<Select.Option value="v_vin">VIN</Select.Option>
|
||||||
<Select.Option value="clm_no">Claim No.</Select.Option>
|
<Select.Option value="clm_no">Claim No.</Select.Option>
|
||||||
<Select.Option value="ded_amt">Deductible Amount</Select.Option>
|
<Select.Option value="ded_amt">Deductible Amount</Select.Option>
|
||||||
|
|||||||
@@ -1,75 +1,77 @@
|
|||||||
import { gql } from "@apollo/client";
|
import { gql } from "@apollo/client";
|
||||||
|
|
||||||
export const QUERY_ALL_ACTIVE_APPOINTMENTS = gql`
|
export const QUERY_ALL_ACTIVE_APPOINTMENTS = gql`
|
||||||
query QUERY_ALL_ACTIVE_APPOINTMENTS(
|
query QUERY_ALL_ACTIVE_APPOINTMENTS(
|
||||||
$start: timestamptz!
|
$start: timestamptz!
|
||||||
$end: timestamptz!
|
$end: timestamptz!
|
||||||
$startd: date!
|
$startd: date!
|
||||||
$endd: date!
|
$endd: date!
|
||||||
|
) {
|
||||||
|
employee_vacation(
|
||||||
|
where: { _or: [{ start: { _gte: $startd } },
|
||||||
|
{ end: { _lte: $endd } },
|
||||||
|
{_and:[{start:{_lte: $startd}},{end:{_gte:$endd}}]}] }
|
||||||
) {
|
) {
|
||||||
employee_vacation(
|
id
|
||||||
where: { _or: [{ start: { _gte: $startd } }, { end: { _lte: $endd } }] }
|
start
|
||||||
) {
|
end
|
||||||
|
employee {
|
||||||
id
|
id
|
||||||
start
|
last_name
|
||||||
end
|
first_name
|
||||||
employee {
|
}
|
||||||
id
|
}
|
||||||
last_name
|
appointments(
|
||||||
first_name
|
where: {
|
||||||
|
canceled: { _eq: false }
|
||||||
|
end: { _lte: $end }
|
||||||
|
start: { _gte: $start }
|
||||||
|
}
|
||||||
|
) {
|
||||||
|
start
|
||||||
|
id
|
||||||
|
end
|
||||||
|
arrived
|
||||||
|
title
|
||||||
|
isintake
|
||||||
|
block
|
||||||
|
color
|
||||||
|
note
|
||||||
|
job {
|
||||||
|
alt_transport
|
||||||
|
ro_number
|
||||||
|
ownr_ln
|
||||||
|
ownr_co_nm
|
||||||
|
ownr_fn
|
||||||
|
ownr_ph1
|
||||||
|
ownr_ph2
|
||||||
|
ownr_ea
|
||||||
|
clm_total
|
||||||
|
id
|
||||||
|
clm_no
|
||||||
|
ins_co_nm
|
||||||
|
v_model_yr
|
||||||
|
v_make_desc
|
||||||
|
v_model_desc
|
||||||
|
labhrs: joblines_aggregate(
|
||||||
|
where: { mod_lbr_ty: { _neq: "LAR" }, removed: { _eq: false } }
|
||||||
|
) {
|
||||||
|
aggregate {
|
||||||
|
sum {
|
||||||
|
mod_lb_hrs
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
larhrs: joblines_aggregate(
|
||||||
|
where: { mod_lbr_ty: { _eq: "LAR" }, removed: { _eq: false } }
|
||||||
|
) {
|
||||||
|
aggregate {
|
||||||
|
sum {
|
||||||
|
mod_lb_hrs
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
appointments(
|
|
||||||
where: {
|
|
||||||
canceled: { _eq: false }
|
|
||||||
end: { _lte: $end }
|
|
||||||
start: { _gte: $start }
|
|
||||||
}
|
|
||||||
) {
|
|
||||||
start
|
|
||||||
id
|
|
||||||
end
|
|
||||||
arrived
|
|
||||||
title
|
|
||||||
isintake
|
|
||||||
block
|
|
||||||
color
|
|
||||||
note
|
|
||||||
job {
|
|
||||||
alt_transport
|
|
||||||
ro_number
|
|
||||||
ownr_ln
|
|
||||||
ownr_co_nm
|
|
||||||
ownr_fn
|
|
||||||
ownr_ph1
|
|
||||||
ownr_ph2
|
|
||||||
ownr_ea
|
|
||||||
clm_total
|
|
||||||
id
|
|
||||||
clm_no
|
|
||||||
ins_co_nm
|
|
||||||
v_model_yr
|
|
||||||
v_make_desc
|
|
||||||
v_model_desc
|
|
||||||
labhrs: joblines_aggregate(
|
|
||||||
where: { mod_lbr_ty: { _neq: "LAR" }, removed: { _eq: false } }
|
|
||||||
) {
|
|
||||||
aggregate {
|
|
||||||
sum {
|
|
||||||
mod_lb_hrs
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
larhrs: joblines_aggregate(
|
|
||||||
where: { mod_lbr_ty: { _eq: "LAR" }, removed: { _eq: false } }
|
|
||||||
) {
|
|
||||||
aggregate {
|
|
||||||
sum {
|
|
||||||
mod_lb_hrs
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|||||||
@@ -922,7 +922,8 @@
|
|||||||
},
|
},
|
||||||
"successes": {
|
"successes": {
|
||||||
"delete": "Employee deleted successfully.",
|
"delete": "Employee deleted successfully.",
|
||||||
"save": "Employee saved successfully."
|
"save": "Employee saved successfully.",
|
||||||
|
"vacationadded": "Employee vacation added."
|
||||||
},
|
},
|
||||||
"validation": {
|
"validation": {
|
||||||
"unique_employee_number": "You must enter a unique employee number."
|
"unique_employee_number": "You must enter a unique employee number."
|
||||||
|
|||||||
@@ -922,7 +922,8 @@
|
|||||||
},
|
},
|
||||||
"successes": {
|
"successes": {
|
||||||
"delete": "Empleado eliminado con éxito.",
|
"delete": "Empleado eliminado con éxito.",
|
||||||
"save": "Empleado guardado con éxito."
|
"save": "Empleado guardado con éxito.",
|
||||||
|
"vacationadded": ""
|
||||||
},
|
},
|
||||||
"validation": {
|
"validation": {
|
||||||
"unique_employee_number": ""
|
"unique_employee_number": ""
|
||||||
|
|||||||
@@ -922,7 +922,8 @@
|
|||||||
},
|
},
|
||||||
"successes": {
|
"successes": {
|
||||||
"delete": "L'employé a bien été supprimé.",
|
"delete": "L'employé a bien été supprimé.",
|
||||||
"save": "L'employé a enregistré avec succès."
|
"save": "L'employé a enregistré avec succès.",
|
||||||
|
"vacationadded": ""
|
||||||
},
|
},
|
||||||
"validation": {
|
"validation": {
|
||||||
"unique_employee_number": ""
|
"unique_employee_number": ""
|
||||||
|
|||||||
Reference in New Issue
Block a user