Skip to content

Commit

Permalink
feat(admin): added firstname, lastname and certification of candidate…
Browse files Browse the repository at this point in the history
… in feasability tab
  • Loading branch information
agarbe committed Jul 19, 2023
1 parent 273fa7e commit 4ea26d0
Showing 1 changed file with 26 additions and 4 deletions.
30 changes: 26 additions & 4 deletions packages/reva-admin/src/Page/Form/Feasability.elm
Original file line number Diff line number Diff line change
@@ -1,14 +1,36 @@
module Page.Form.Feasability exposing (..)

import Data.Candidacy exposing (Candidacy, CandidacyId, CandidacySummary)
import Data.Candidacy exposing (Candidacy)
import Data.Form exposing (FormData)
import Data.Referential exposing (Referential)
import Page.Form exposing (Form)
import Page.Form as Form exposing (Form)


form : FormData -> ( Candidacy, Referential ) -> Form
form formData _ =
{ elements = []
form _ ( candidacy, _ ) =
let
elements =
[ ( "heading"
, Form.Section <|
case candidacy.candidate of
Just candidate ->
String.concat [ candidate.firstname, " ", candidate.lastname ]

Nothing ->
""
)
, ( "heading2"
, Form.Section <|
case candidacy.certification of
Just certification ->
certification.label

Nothing ->
""
)
]
in
{ elements = elements
, saveLabel = Nothing
, submitLabel = "Valider"
, title = "Dossier de faisabilité"
Expand Down

0 comments on commit 4ea26d0

Please sign in to comment.