IO-2038 Resolve duplicate shift clock login.
This commit is contained in:
@@ -64,6 +64,12 @@ export function TimeTicketShiftContainer({
|
||||
</div>
|
||||
);
|
||||
|
||||
const checkIfAlreadyClocked = async () => {
|
||||
const { data } = await refetch();
|
||||
|
||||
return data.timetickets.length > 0;
|
||||
};
|
||||
|
||||
return (
|
||||
<div>
|
||||
{data.timetickets.length > 0 ? (
|
||||
@@ -72,7 +78,10 @@ export function TimeTicketShiftContainer({
|
||||
refetch={refetch}
|
||||
/>
|
||||
) : (
|
||||
<TimeTicketShiftFormContainer isTechConsole={isTechConsole} />
|
||||
<TimeTicketShiftFormContainer
|
||||
isTechConsole={isTechConsole}
|
||||
checkIfAlreadyClocked={checkIfAlreadyClocked}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user