-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into hp/test-out-bootstrap-reboot
- Loading branch information
Showing
175 changed files
with
2,048 additions
and
859 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
.c-route-pill { | ||
width: 2.875rem; | ||
min-width: 2.875rem; | ||
height: 1.5rem; | ||
|
||
border-radius: 0.8125rem; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
.c-detours-table { | ||
thead { | ||
text-align: left; | ||
font-weight: 600; | ||
} | ||
} | ||
|
||
.c-detours-table__route-info-cell { | ||
display: flex; | ||
align-items: center; | ||
} | ||
|
||
.c-detours-table__route-info-text { | ||
display: flex; | ||
flex-direction: column; | ||
margin-left: 10px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
import React, { useState } from "react" | ||
import { DetoursTable } from "./detoursTable" | ||
import userInTestGroup, { TestGroups } from "../userInTestGroup" | ||
import { Button } from "react-bootstrap" | ||
import { PlusSquare } from "../helpers/bsIcons" | ||
import { DetourModal } from "./detours/detourModal" | ||
|
||
export interface Detour { | ||
route: string | ||
direction: string | ||
name: string | ||
intersection: string | ||
activeSince: number | ||
} | ||
|
||
export const DetourListPage = () => { | ||
const fakeData = [ | ||
{ | ||
route: "45", | ||
direction: "Outbound", | ||
name: "Franklin Park via Ruggles Station", | ||
intersection: "John F. Kennedy St & Memorial Drive", | ||
activeSince: 1722372950, | ||
}, | ||
{ | ||
route: "83", | ||
direction: "Inbound", | ||
name: "Central Square", | ||
intersection: "Pearl Street & Clearwell Ave", | ||
activeSince: 1722361948, | ||
}, | ||
{ | ||
route: "83", | ||
direction: "Outbound", | ||
name: "Rindge Ave", | ||
intersection: "Pearl Street & Clearwell Ave", | ||
activeSince: 1721361948, | ||
}, | ||
{ | ||
route: "45", | ||
direction: "Outbound", | ||
name: "Franklin Park via Ruggles Station", | ||
intersection: "John F. Kennedy St & Memorial Drive", | ||
activeSince: 1722372950, | ||
}, | ||
{ | ||
route: "83", | ||
direction: "Inbound", | ||
name: "Central Square", | ||
intersection: "Pearl Street & Clearwell Ave", | ||
activeSince: 1722361948, | ||
}, | ||
{ | ||
route: "83", | ||
direction: "Outbound", | ||
name: "Rindge Ave", | ||
intersection: "Pearl Street & Clearwell Ave", | ||
activeSince: 1721361948, | ||
}, | ||
{ | ||
route: "45", | ||
direction: "Outbound", | ||
name: "Franklin Park via Ruggles Station", | ||
intersection: "John F. Kennedy St & Memorial Drive", | ||
activeSince: 1722372950, | ||
}, | ||
{ | ||
route: "83", | ||
direction: "Inbound", | ||
name: "Central Square", | ||
intersection: "Pearl Street & Clearwell Ave", | ||
activeSince: 1722361948, | ||
}, | ||
{ | ||
route: "83", | ||
direction: "Outbound", | ||
name: "Rindge Ave", | ||
intersection: "Pearl Street & Clearwell Ave", | ||
activeSince: 1721361948, | ||
}, | ||
] | ||
|
||
const [showDetourModal, setShowDetourModal] = useState(false) | ||
|
||
return ( | ||
<div className="h-100 overflow-y-auto"> | ||
{userInTestGroup(TestGroups.DetoursPilot) && ( | ||
<Button className="icon-link" onClick={() => setShowDetourModal(true)}> | ||
<PlusSquare /> | ||
Add detour | ||
</Button> | ||
)} | ||
<DetoursTable data={fakeData} /> | ||
{showDetourModal && ( | ||
<DetourModal | ||
onClose={() => setShowDetourModal(false)} | ||
show | ||
originalRoute={{}} | ||
/> | ||
)} | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import React from "react" | ||
import { Panel } from "./diversionPage" | ||
import { Button } from "react-bootstrap" | ||
|
||
export const ActiveDetourPanel = ({ | ||
onDeactivateDetour, | ||
}: { | ||
onDeactivateDetour: () => void | ||
}) => ( | ||
<Panel as="article"> | ||
<Panel.Header className=""> | ||
<h1 className="c-diversion-panel__h1 my-3">Active Detour</h1> | ||
</Panel.Header> | ||
|
||
<Panel.Body className="d-flex flex-column"> | ||
<Panel.Body.Footer> | ||
<Button | ||
className="m-3 flex-grow-1" | ||
variant="missed-stop" | ||
onClick={onDeactivateDetour} | ||
> | ||
Deactivate Detour | ||
</Button> | ||
</Panel.Body.Footer> | ||
</Panel.Body> | ||
</Panel> | ||
) |
Oops, something went wrong.