-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: hassu 855 hassu 804 hassu 823 hassu 813 hassu 810 hassu 803 has…
…su 805 hassu 818 (#319) * Näytä päätöksen pvm ja asianumero * Hallinto-oikeuden asettaminen muutoksenhakua varten. * Esitettävät yhteystiedot * Korjaa hyvaksymispaatosschema * Alusta kuulutusyhteyshenkilöt * Lukunäkymä hyväksymispäätöskuulutuksen tiedoille. * Staattiset tekstit aineistosivulle
- Loading branch information
1 parent
be8348b
commit a90a44e
Showing
10 changed files
with
191 additions
and
61 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
59 changes: 57 additions & 2 deletions
59
src/components/projekti/hyvaksyminen/kuulutuksenTiedot/MuutoksenHaku.tsx
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,60 @@ | ||
import Section from "@components/layout/Section"; | ||
import SectionContent from "@components/layout/SectionContent"; | ||
import React from "react"; | ||
import { useFormContext } from "react-hook-form"; | ||
import { HallintoOikeus } from "@services/api"; | ||
import Select from "@components/form/Select"; | ||
import useTranslation from "next-translate/useTranslation"; | ||
import { Controller } from "react-hook-form"; | ||
|
||
export default function MuutoksenHaku() { | ||
return <></>; | ||
type Props = {}; | ||
|
||
type FormFields = { | ||
hyvaksymisPaatosVaihe: { | ||
hallintoOikeus: HallintoOikeus; | ||
}; | ||
}; | ||
|
||
export default function MuutoksenHaku({}: Props) { | ||
const { | ||
register, | ||
formState: { errors }, | ||
control, | ||
} = useFormContext<FormFields>(); | ||
|
||
const { t } = useTranslation("common"); | ||
|
||
return ( | ||
<Section noDivider> | ||
<SectionContent> | ||
<h4 className="vayla-small-title">Muutoksen haku</h4> | ||
<p> | ||
Päätökseen voi valittamalla hakea muutosta hallinto-oikeudelta 30 päivän kuluessa päätöksen tiedoksiannosta. | ||
Valitse pudostusvalikosta hallinto-oikeus, johon muutoksenhaku osoitetaan tehtävän. | ||
</p> | ||
<div style={{ maxWidth: "30em" }}> | ||
<Controller | ||
control={control} | ||
name="hyvaksymisPaatosVaihe.hallintoOikeus" | ||
render={({ field: { value, onChange, ...field } }) => ( | ||
<Select | ||
style={{ backgroundColor: "transparent" }} | ||
label="Hallinto-oikeus *" | ||
options={Object.keys(HallintoOikeus).map((ho) => ({ | ||
label: ho ? t(`hallinto-oikeus.${ho}`) : "", | ||
value: ho, | ||
}))} | ||
{...register(`hyvaksymisPaatosVaihe.hallintoOikeus`)} | ||
error={errors?.hyvaksymisPaatosVaihe?.hallintoOikeus} | ||
addEmptyOption | ||
value={value} | ||
onChange={(event) => onChange(event.target.value)} | ||
{...field} | ||
/> | ||
)} | ||
/> | ||
</div> | ||
</SectionContent> | ||
</Section> | ||
); | ||
} |
44 changes: 42 additions & 2 deletions
44
src/components/projekti/hyvaksyminen/kuulutuksenTiedot/PaatoksenPaiva.tsx
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,45 @@ | ||
import Section from "@components/layout/Section"; | ||
import SectionContent from "@components/layout/SectionContent"; | ||
import React from "react"; | ||
import DatePicker from "@components/form/DatePicker"; | ||
import HassuGrid from "@components/HassuGrid"; | ||
import { Link } from "@mui/material"; | ||
import { Projekti } from "@services/api"; | ||
import TextInput from "@components/form/TextInput"; | ||
|
||
export default function PaatoksenPaiva() { | ||
return <></>; | ||
type Props = { | ||
projekti: Projekti; | ||
}; | ||
|
||
export default function PaatoksenPaiva({ projekti }: Props) { | ||
return ( | ||
<Section noDivider> | ||
<SectionContent> | ||
<h4 className="vayla-small-title">Liikenne- ja viestintäviraston päätöksen päivä ja asianumero</h4> | ||
<p> | ||
Järjestelmän pääkäyttäjä lisää Liikenne- ja viestintäviraston päätöksen päivämäärän ja asianumeron. Kuulutus | ||
on mahdollista julkaista vasta kun hyväksymispäätös on annettu. Käsittelyn tilaa voi seurata{" "} | ||
<Link underline="none" href={`/yllapito/projekti/${projekti.oid}/kasittelyntila`}> | ||
Käsittelyn tila | ||
</Link>{" "} | ||
-sivulta. | ||
</p> | ||
<HassuGrid cols={{ lg: 3 }}> | ||
<DatePicker | ||
label="Päätöspäivä *" | ||
className="md:max-w-min" | ||
disabled | ||
readOnly | ||
value={projekti.kasittelynTila?.hyvaksymispaatos?.paatoksenPvm || ""} | ||
/> | ||
<TextInput | ||
label="Asianumero *" | ||
disabled | ||
value={projekti.kasittelynTila?.hyvaksymispaatos?.asianumero || ""} | ||
readOnly | ||
/> | ||
</HassuGrid> | ||
</SectionContent> | ||
</Section> | ||
); | ||
} |
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
Oops, something went wrong.