Skip to content

Commit

Permalink
feat: card barbeiro option cliente
Browse files Browse the repository at this point in the history
  • Loading branch information
ialexanderbrito committed May 7, 2022
1 parent f203e35 commit ec46236
Showing 1 changed file with 44 additions and 38 deletions.
82 changes: 44 additions & 38 deletions src/components/CardBarbeiro/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,44 +71,50 @@ export function CardBarbeiro(props: CardBarbeiroProps) {
)}
</div>

<div className={styles.containerInfo}>
<h2 className={styles.title}>{name || props.barbeiro?.nome}</h2>
<strong className={styles.info}>
{schedules === undefined || schedules === null ? (
<>
<BsCalendar color="#FF9000" size={16} style={{ marginRight: '12px' }} />
Sem data definida
</>
) : (
<>
<BsCalendar color="#FF9000" size={16} style={{ marginRight: '12px' }} />
{getDiasFuncionamento()[0]} à {getDiasFuncionamento()[getDiasFuncionamento().length - 1]}
</>
)}
</strong>
<strong className={styles.info}>
{schedules === undefined || schedules === null ? (
<>
<BsClock color="#FF9000" size={16} style={{ marginRight: '12px' }} />
Sem horário definido
</>
) : (
<>
{getHorarioAtual(diaAtual).length === 0 ? (
<>
<BsClock color="#FF9000" size={16} style={{ marginRight: '12px' }} />
Hoje | Fechado
</>
) : (
<>
<BsClock color="#FF9000" size={16} style={{ marginRight: '12px' }} />
Hoje | {getHorarioAtual(diaAtual)}
</>
)}
</>
)}
</strong>
</div>
{props.cliente === true ? (
<div className={styles.containerInfo}>
<h2 className={styles.title}>{name || props.barbeiro?.nome}</h2>
</div>
) : (
<div className={styles.containerInfo}>
<h2 className={styles.title}>{name || props.barbeiro?.nome}</h2>
<strong className={styles.info}>
{schedules === undefined || schedules === null ? (
<>
<BsCalendar color="#FF9000" size={16} style={{ marginRight: '12px' }} />
Sem data definida
</>
) : (
<>
<BsCalendar color="#FF9000" size={16} style={{ marginRight: '12px' }} />
{getDiasFuncionamento()[0]} à {getDiasFuncionamento()[getDiasFuncionamento().length - 1]}
</>
)}
</strong>
<strong className={styles.info}>
{schedules === undefined || schedules === null ? (
<>
<BsClock color="#FF9000" size={16} style={{ marginRight: '12px' }} />
Sem horário definido
</>
) : (
<>
{getHorarioAtual(diaAtual).length === 0 ? (
<>
<BsClock color="#FF9000" size={16} style={{ marginRight: '12px' }} />
Hoje | Fechado
</>
) : (
<>
<BsClock color="#FF9000" size={16} style={{ marginRight: '12px' }} />
Hoje | {getHorarioAtual(diaAtual)}
</>
)}
</>
)}
</strong>
</div>
)}
</div>
);
}

0 comments on commit ec46236

Please sign in to comment.