-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1201 from ds-wizard/release/4.9.0
Release 4.9.0
- Loading branch information
Showing
77 changed files
with
1,773 additions
and
370 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
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
module Shared.Api.CommentThreads exposing (getCommentThreads) | ||
|
||
import Shared.AbstractAppState exposing (AbstractAppState) | ||
import Shared.Api exposing (ToMsg, jwtGet) | ||
import Shared.Data.Pagination as Pagination exposing (Pagination) | ||
import Shared.Data.PaginationQueryFilters as PaginationQueryFilters exposing (PaginationQueryFilters) | ||
import Shared.Data.PaginationQueryString as PaginationQueryString exposing (PaginationQueryString) | ||
import Shared.Data.QuestionnaireCommentThreadAssigned as QuestionnaireCommentThreadAssigned exposing (QuestionnaireCommentThreadAssigned) | ||
|
||
|
||
getCommentThreads : PaginationQueryFilters -> PaginationQueryString -> AbstractAppState a -> ToMsg (Pagination QuestionnaireCommentThreadAssigned) msg -> Cmd msg | ||
getCommentThreads filters qs = | ||
let | ||
extraParams = | ||
PaginationQueryString.filterParams | ||
[ ( "resolved", PaginationQueryFilters.getValue "resolved" filters ) | ||
] | ||
|
||
queryString = | ||
PaginationQueryString.toApiUrlWith extraParams qs | ||
|
||
url = | ||
"/comment-threads" ++ queryString | ||
in | ||
jwtGet url (Pagination.decoder "commentThreads" QuestionnaireCommentThreadAssigned.decoder) |
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
38 changes: 38 additions & 0 deletions
38
engine-shared/elm/Shared/Data/QuestionnaireCommentThreadAssigned.elm
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
module Shared.Data.QuestionnaireCommentThreadAssigned exposing | ||
( QuestionnaireCommentThreadAssigned | ||
, decoder | ||
) | ||
|
||
import Json.Decode as D exposing (Decoder) | ||
import Json.Decode.Extra as D | ||
import Json.Decode.Pipeline as D | ||
import Shared.Data.UserSuggestion as UserSuggestion exposing (UserSuggestion) | ||
import Time | ||
import Uuid exposing (Uuid) | ||
|
||
|
||
type alias QuestionnaireCommentThreadAssigned = | ||
{ commentThreadUuid : Uuid | ||
, createdBy : Maybe UserSuggestion | ||
, path : String | ||
, private : Bool | ||
, questionnaireName : String | ||
, questionnaireUuid : Uuid | ||
, resolved : Bool | ||
, text : String | ||
, updatedAt : Time.Posix | ||
} | ||
|
||
|
||
decoder : Decoder QuestionnaireCommentThreadAssigned | ||
decoder = | ||
D.succeed QuestionnaireCommentThreadAssigned | ||
|> D.required "commentThreadUuid" Uuid.decoder | ||
|> D.required "createdBy" (D.maybe UserSuggestion.decoder) | ||
|> D.required "path" D.string | ||
|> D.required "private" D.bool | ||
|> D.required "questionnaireName" D.string | ||
|> D.required "questionnaireUuid" Uuid.decoder | ||
|> D.required "resolved" D.bool | ||
|> D.required "text" D.string | ||
|> D.required "updatedAt" D.datetime |
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
45 changes: 45 additions & 0 deletions
45
...shared/elm/Shared/Data/QuestionnaireDetail/QuestionnaireEvent/AssignCommentThreadData.elm
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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
module Shared.Data.QuestionnaireDetail.QuestionnaireEvent.AssignCommentThreadData exposing (AssignCommentThreadData, decoder, encode) | ||
|
||
import Json.Decode as D exposing (Decoder) | ||
import Json.Decode.Extra as D | ||
import Json.Decode.Pipeline as D | ||
import Json.Encode as E | ||
import Json.Encode.Extra as E | ||
import Shared.Data.UserSuggestion as UserSuggestion exposing (UserSuggestion) | ||
import Time | ||
import Uuid exposing (Uuid) | ||
|
||
|
||
type alias AssignCommentThreadData = | ||
{ uuid : Uuid | ||
, path : String | ||
, threadUuid : Uuid | ||
, private : Bool | ||
, assignedTo : Maybe UserSuggestion | ||
, createdAt : Time.Posix | ||
, createdBy : Maybe UserSuggestion | ||
} | ||
|
||
|
||
encode : AssignCommentThreadData -> E.Value | ||
encode data = | ||
E.object | ||
[ ( "type", E.string "AssignCommentThreadEvent" ) | ||
, ( "uuid", Uuid.encode data.uuid ) | ||
, ( "path", E.string data.path ) | ||
, ( "threadUuid", Uuid.encode data.threadUuid ) | ||
, ( "private", E.bool data.private ) | ||
, ( "assignedTo", E.maybe UserSuggestion.encode data.assignedTo ) | ||
] | ||
|
||
|
||
decoder : Decoder AssignCommentThreadData | ||
decoder = | ||
D.succeed AssignCommentThreadData | ||
|> D.required "uuid" Uuid.decoder | ||
|> D.required "path" D.string | ||
|> D.required "threadUuid" Uuid.decoder | ||
|> D.required "private" D.bool | ||
|> D.required "assignedTo" (D.maybe UserSuggestion.decoder) | ||
|> D.required "createdAt" D.datetime | ||
|> D.required "createdBy" (D.maybe UserSuggestion.decoder) |
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.