Skip to content

Commit

Permalink
feat: add verifica horario de trabalho
Browse files Browse the repository at this point in the history
  • Loading branch information
ialexanderbrito committed Apr 11, 2022
1 parent ac441d6 commit 7316d66
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/contexts/User.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,16 @@ export function UserProvider({ children }: any) {
return false;
}

function verificaHorarioDeTrabalho() {
const horarioDeTrabalho = user?.user_metadata.schedules;

if (horarioDeTrabalho) {
return true;
}

return false;
}

function generateGoogleCalendarEvent(
title: string,
startDate: string,
Expand Down Expand Up @@ -377,6 +387,7 @@ export function UserProvider({ children }: any) {
startDate,
endDate,
buscaClientesHorario,
verificaHorarioDeTrabalho,
}}
>
{children}
Expand Down

0 comments on commit 7316d66

Please sign in to comment.