diff --git a/assets/css/dashboard/configure-screens-workflow-page.scss b/assets/css/dashboard/configure-screens-workflow-page.scss index 787c6ac5..b993154c 100644 --- a/assets/css/dashboard/configure-screens-workflow-page.scss +++ b/assets/css/dashboard/configure-screens-workflow-page.scss @@ -43,6 +43,8 @@ td, th { padding: 10px 24px; + color: $text-primary; + background-color: transparent; } .screen-id { diff --git a/assets/js/components/Dashboard/PermanentConfiguration/BottomActionBar.tsx b/assets/js/components/Dashboard/PermanentConfiguration/BottomActionBar.tsx index bf23e5d8..e9d4f878 100644 --- a/assets/js/components/Dashboard/PermanentConfiguration/BottomActionBar.tsx +++ b/assets/js/components/Dashboard/PermanentConfiguration/BottomActionBar.tsx @@ -9,7 +9,6 @@ interface BottomActionBarProps { onBack?: () => void; onForward?: () => void; onCancel?: () => void; - forwardButtonDisabled?: boolean; } const BottomActionBar: ComponentType = ({ @@ -19,7 +18,6 @@ const BottomActionBar: ComponentType = ({ onBack, onForward, onCancel, - forwardButtonDisabled, }: BottomActionBarProps) => { return ( @@ -36,11 +34,7 @@ const BottomActionBar: ComponentType = ({ )} {forwardButtonLabel && ( - diff --git a/assets/js/components/Dashboard/PermanentConfiguration/Workflows/GlEink/ConfigureScreensPage.tsx b/assets/js/components/Dashboard/PermanentConfiguration/Workflows/GlEink/ConfigureScreensPage.tsx index 7cccc2fe..d3f56fb7 100644 --- a/assets/js/components/Dashboard/PermanentConfiguration/Workflows/GlEink/ConfigureScreensPage.tsx +++ b/assets/js/components/Dashboard/PermanentConfiguration/Workflows/GlEink/ConfigureScreensPage.tsx @@ -1,4 +1,3 @@ -/* eslint-disable react/no-unescaped-entities */ import React, { ComponentType, ForwardedRef, @@ -59,7 +58,6 @@ interface ConfigureScreensWorkflowPageProps { setPlacesAndScreensToUpdate: React.Dispatch< React.SetStateAction >; - handleRemoveLocation: (place: Place) => void; setConfigVersion: React.Dispatch>; isEditing: boolean; } @@ -69,7 +67,6 @@ const ConfigureScreensWorkflowPage: ComponentType< > = ({ selectedPlaces, setPlacesAndScreensToUpdate, - handleRemoveLocation, setConfigVersion, isEditing, }: ConfigureScreensWorkflowPageProps) => { @@ -116,31 +113,19 @@ const ConfigureScreensWorkflowPage: ComponentType< }); }; - let layout; - if (selectedPlaces.length) { - layout = selectedPlaces.map((place) => { - return ( - handleRemoveLocation(place)} - /> - ); - }); - } else { - layout = ( -
- All locations have been removed. Select "Back" to select new locations. -
- ); - } - return (
{getTitle()}
- {layout} + {selectedPlaces.map((place) => { + return ( + + ); + })}
); }; @@ -151,14 +136,12 @@ interface ConfigurePlaceCardProps { setPlacesAndScreensToUpdate: React.Dispatch< React.SetStateAction >; - handleRemoveLocation: () => void; } const ConfigurePlaceCard: ComponentType = ({ place, existingScreens, setPlacesAndScreensToUpdate, - handleRemoveLocation, }: ConfigurePlaceCardProps) => { const [existingPendingScreens, setExistingPendingScreens] = useState<{ [screen_id: string]: ScreenConfiguration; @@ -325,14 +308,6 @@ const ConfigurePlaceCard: ComponentType = ({ {place.name.toUpperCase()} Station ID: {place.id} - - - {hasRows && ( diff --git a/assets/js/components/Dashboard/PermanentConfiguration/Workflows/GlEink/GlEinkWorkflow.tsx b/assets/js/components/Dashboard/PermanentConfiguration/Workflows/GlEink/GlEinkWorkflow.tsx index 31abc04e..4045d772 100644 --- a/assets/js/components/Dashboard/PermanentConfiguration/Workflows/GlEink/GlEinkWorkflow.tsx +++ b/assets/js/components/Dashboard/PermanentConfiguration/Workflows/GlEink/GlEinkWorkflow.tsx @@ -5,7 +5,6 @@ import ConfigureScreensWorkflowPage, { import BottomActionBar from "../../BottomActionBar"; import { useLocation, useNavigate } from "react-router-dom"; import StationSelectPage from "./StationSelectPage"; -import { Place } from "../../../../../models/place"; import { Alert, Button, Modal } from "react-bootstrap"; import { ExclamationCircleFill } from "react-bootstrap-icons"; import { @@ -63,24 +62,6 @@ const GlEinkWorkflow: ComponentType = () => { } }, [location]); - const handleRemoveLocation = (place: Place) => { - const newSelectedPlaces = new Set(selectedPlaces); - newSelectedPlaces.delete(place.id); - delete newScreenValidationErrors[place.id]; - delete pendingScreenValidationErrors[place.id]; - dispatch({ - type: "SET_VALIDATION_ERRORS", - newScreenValidationErrors, - pendingScreenValidationErrors, - }); - setSelectedPlaces(newSelectedPlaces); - setPlacesAndScreensToUpdate((placesAndScreens) => { - const { [place.id]: _discarded, ...newPlacesAndScreens } = - placesAndScreens; - return newPlacesAndScreens; - }); - }; - const generateErrorMessage = (errorSet: Set) => { if (errorSet.size === 0) { return ""; @@ -213,7 +194,6 @@ const GlEinkWorkflow: ComponentType = () => { let onForward; let onCancel; let layout; - const forwardButtonDisabled = selectedPlaces.size === 0; switch (configStep) { case 0: cancelButtonLabel = "Cancel"; @@ -314,7 +294,6 @@ const GlEinkWorkflow: ComponentType = () => { selectedPlaces.has(place.id), )} setPlacesAndScreensToUpdate={setPlacesAndScreensToUpdate} - handleRemoveLocation={handleRemoveLocation} setConfigVersion={setConfigVersion} isEditing={isEditing} /> @@ -350,7 +329,6 @@ const GlEinkWorkflow: ComponentType = () => { onCancel={onCancel} onBack={onBack} onForward={onForward} - forwardButtonDisabled={forwardButtonDisabled} />