Skip to content

Commit

Permalink
Teste
Browse files Browse the repository at this point in the history
  • Loading branch information
joao-vasconcelos committed Dec 5, 2023
1 parent cdac3d1 commit 4273a97
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import LinesExplorerContentPatternPathStopRealtime from '@/components/LinesExplo
import LinesExplorerContentPatternPathStopSpine from '@/components/LinesExplorerContentPatternPathStopSpine/LinesExplorerContentPatternPathStopSpine';
import LinesExplorerContentPatternPathStopName from '@/components/LinesExplorerContentPatternPathStopName/LinesExplorerContentPatternPathStopName';
import { useLinesExplorerContext } from '@/contexts/LinesExplorerContext';
import { Drawer } from '@mantine/core';
import { useDisclosure } from '@mantine/hooks';

/* * */

Expand All @@ -24,6 +26,7 @@ export default function LinesExplorerContentPatternPathStop({ pathStopData }) {

const t = useTranslations('LinesExplorerContentPatternPathStop');
const linesExplorerContext = useLinesExplorerContext();
const [opened, { open, close }] = useDisclosure(false);

//
// B. Transform data
Expand Down Expand Up @@ -65,14 +68,26 @@ export default function LinesExplorerContentPatternPathStop({ pathStopData }) {
</div>
)}

{isThisStopSelected && (
<Drawer offset={8} radius="md" opened={opened} onClose={close} title="Authentication" position="bottom">
<div className={styles.body}>
<Text type="mini-label">Horários previstos nesta paragem</Text>
<LinesExplorerContentPatternPathStopTimetable stopSequence={pathStopData.stop_sequence} stopId={pathStopData.stop.id} />
<LinesExplorerContentPatternPathStopPdf lineId={linesExplorerContext.entities.line.id} stopId={pathStopData.stop.id} direction={linesExplorerContext.entities.pattern.direction} />
</div>
)}
</Drawer>

<div className={styles.openTimetable} onClick={open}>
Abrir Horários
</div>

{/* {isThisStopSelected && (
<div className={styles.body}>
<Text type="mini-label">Horários previstos nesta paragem</Text>
<LinesExplorerContentPatternPathStopTimetable stopSequence={pathStopData.stop_sequence} stopId={pathStopData.stop.id} />
</div>
)} */}

{isThisStopSelected && <LinesExplorerContentPatternPathStopPdf lineId={linesExplorerContext.entities.line.id} stopId={pathStopData.stop.id} direction={linesExplorerContext.entities.pattern.direction} />}
{/* {isThisStopSelected && <LinesExplorerContentPatternPathStopPdf lineId={linesExplorerContext.entities.line.id} stopId={pathStopData.stop.id} direction={linesExplorerContext.entities.pattern.direction} />} */}
</div>
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,16 @@
flex-direction: row;
gap: 5px;
}

.openTimetable {
display: flex;
align-items: center;
justify-content: center;
gap: 7px;
padding: 4px 12px;
font-size: 12px;
font-weight: 600;
border-radius: 3px;
border: 1px solid var(--gray3);
background-color: var(--gray1);
}

0 comments on commit 4273a97

Please sign in to comment.