Skip to content
This repository was archived by the owner on Feb 10, 2025. It is now read-only.

Commit b3ccade

Browse files
authored
change warning to plain link (#384)
1 parent f160a3c commit b3ccade

2 files changed

Lines changed: 7 additions & 16 deletions

File tree

admin-ui/src/component/Unit/Unit.tsx

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ const Unit = (): JSX.Element | null => {
156156
const { notifyError } = useNotification();
157157
const [isLoading, setIsLoading] = useState(true);
158158
const [unit, setUnit] = useState<UnitByPkType>();
159-
const [hasOpeningHours, setOpeningHours] = useState(true);
160159
const [hasSpacesResources, setSpacesResources] = useState(true);
161160

162161
const { t } = useTranslation();
@@ -169,7 +168,6 @@ const Unit = (): JSX.Element | null => {
169168
onCompleted: ({ unitByPk }) => {
170169
if (unitByPk) {
171170
setUnit(unitByPk);
172-
setOpeningHours(Boolean(unitByPk.openingHours));
173171
setSpacesResources(Boolean(unitByPk?.spaces?.length));
174172
}
175173
setIsLoading(false);
@@ -246,20 +244,13 @@ const Unit = (): JSX.Element | null => {
246244
</BasicLink>
247245
</StyledNotification>
248246
) : null}
249-
{!hasOpeningHours ? (
250-
<StyledNotification
251-
type="alert"
252-
label={t("Unit.noOpeningHoursTitle")}
253-
size="large"
247+
<div style={{ margin: "var(--spacing-s) 0" }}>
248+
<ExternalLink
249+
to={`https://asiointi.hel.fi/tprperhe/TPR/UI/ServicePoint/ServicePointEdit/${unit.tprekId}`}
254250
>
255-
{t("Unit.noOpeningHours")}{" "}
256-
<ExternalLink
257-
to={`https://asiointi.hel.fi/tprperhe/TPR/UI/ServicePoint/ServicePointEdit/${unit.tprekId}`}
258-
>
259-
{t("Unit.maintainOpeningHours")}
260-
</ExternalLink>
261-
</StyledNotification>
262-
) : null}
251+
{t("Unit.maintainOpeningHours")}
252+
</ExternalLink>
253+
</div>
263254
<HeadingLarge>{t("Unit.reservationUnitTitle")}</HeadingLarge>
264255
<Info>
265256
<div>

admin-ui/src/i18n/messages.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -856,7 +856,7 @@ const translations: ITranslations = {
856856
createSpaces: ["Luo tiloja."],
857857
noOpeningHoursTitle: ["Toimipisteelle ei ole määritetty aukioloaikoja"],
858858
maintainOpeningHours: [
859-
"Siirry päivittämään aukiolot Toimipisterekisterin kautta.",
859+
"Siirry päivittämään toimipisteesi tiedot Toimipisterekisterin kautta.",
860860
],
861861
noOpeningHours: [
862862
"Toimipisteellä täytyy olla aukioloajat, jotka ohjaavat käytön suunnittelua.",

0 commit comments

Comments
 (0)