Skip to content

Commit

Permalink
[DSW-2146] Fix links to questions in questionnaires
Browse files Browse the repository at this point in the history
  • Loading branch information
janslifka committed Dec 15, 2023
1 parent 8220458 commit 4e10d07
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions engine-wizard/elm/Wizard/Common/AppState.elm
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module Wizard.Common.AppState exposing
( AppState
, acceptCookies
, getClientUrlRoot
, getUserRole
, init
, isFullscreen
Expand Down Expand Up @@ -128,6 +129,11 @@ getUserRole =
Maybe.unwrap "" .role << .user << .config


getClientUrlRoot : AppState -> String
getClientUrlRoot appState =
String.replace "/wizard" "" appState.clientUrl


setCurrentTime : AppState -> Time.Posix -> AppState
setCurrentTime appState time =
{ appState | currentTime = time }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -965,7 +965,7 @@ update msg wrapMsg mbSetFullscreenMsg appState ctx model =
Routing.toUrl appState <|
Routes.projectsDetailQuestionnaire model.uuid (Just (String.join "." path))
in
( appState.seed, { model | recentlyCopied = True }, Copy.copyToClipboard (appState.clientUrl ++ route) )
( appState.seed, { model | recentlyCopied = True }, Copy.copyToClipboard (AppState.getClientUrlRoot appState ++ route) )

ClearRecentlyCopied ->
wrap { model | recentlyCopied = False }
Expand Down

0 comments on commit 4e10d07

Please sign in to comment.