Skip to content

Commit 3382bac

Browse files
sergeirudzSergei Rudz
and
Sergei Rudz
authored
47 end user typed text seen by csa while typed (buerokratt#175)
* feat buerokratt#47 add lodash to project * feat buerokratt#47 add message preview SSE mock data * feat buerokratt#47 add preview message css * feat buerokratt#47 add SSE event message-preview enum * feat buerokratt#47 add SSE event message-preview response type * feat buerokratt#47 add check mocked chat message preview * feat buerokratt#47 add message-preview SSE response * Revert "feat buerokratt#47 add message-preview SSE response" This reverts commit b9cf700. * Revert "feat buerokratt#47 add check mocked chat message preview" This reverts commit 8985a13. * Revert "feat buerokratt#47 add SSE event message-preview response type" This reverts commit a13ae42. * Revert "feat buerokratt#47 add SSE event message-preview enum" This reverts commit 17598f0. * Revert "feat buerokratt#47 add preview message css" This reverts commit 08d449b. * Revert "feat buerokratt#47 add message preview SSE mock data" This reverts commit 357bd3a. * Revert "feat buerokratt#47 add lodash to project" This reverts commit 156d881. * Revert "add additional fields for organization working time (buerokratt#150)" This reverts commit 2c197e8. * Revert "11 csa sees if end user has seen message (buerokratt#156)" This reverts commit a2f9582. * Revert "Revert "11 csa sees if end user has seen message (buerokratt#156)"" This reverts commit b2aa159. --------- Co-authored-by: Sergei Rudz <sergei.rudz@we.ee>
1 parent 2c5b0c6 commit 3382bac

File tree

3 files changed

+9
-21
lines changed

3 files changed

+9
-21
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
{
22
"organizationWorkingTimeStartISO": "{{configurationArray.0.value}}",
3-
"organizationWorkingTimeEndISO": "{{configurationArray.1.value}}",
4-
"organizationWorkingTimeWeekdays": "{{configurationArray.2.value}}",
5-
"organizationWorkingTimeHolidays": "{{configurationArray.3.value}}"
3+
"organizationWorkingTimeEndISO": "{{configurationArray.1.value}}"
64
}
+1-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
INSERT INTO configuration (key, value, created)
22
VALUES
33
('organizationWorkingTimeStartISO', :organizationWorkingTimeStartISO, :created::timestamp with time zone),
4-
('organizationWorkingTimeEndISO', :organizationWorkingTimeEndISO, :created::timestamp with time zone),
5-
('organizationWorkingTimeWeekdays', :organizationWorkingTimeWeekdays, :created::timestamp with time zone),
6-
('organizationWorkingTimeHolidays', :organizationWorkingTimeHolidays, :created::timestamp with time zone)
4+
('organizationWorkingTimeEndISO', :organizationWorkingTimeEndISO, :created::timestamp with time zone)
75
RETURNING key, value;

DSL.Ruuter.private/DSL/POST/cs-set-organization-working-time.yml

+7-15
Original file line numberDiff line numberDiff line change
@@ -3,37 +3,31 @@ extractRequestData:
33
cookie: ${incoming.headers.cookie}
44
organizationWorkingTimeStartISO: ${incoming.body.organizationWorkingTimeStartISO}
55
organizationWorkingTimeEndISO: ${incoming.body.organizationWorkingTimeEndISO}
6-
organizationWorkingTimeWeekdaysArray: ${incoming.body.organizationWorkingTimeWeekdays}
7-
organizationWorkingTimeHolidays: ${incoming.body.organizationWorkingTimeHolidays}
86

97
extractTokenData:
108
call: http.post
119
args:
1210
# TODO: replace with env variable and correct path to TIM endpoint
13-
url: http://byk-private-ruuter-yml:8080/mocks/mock-tim-custom-jwt-userinfo
11+
url: http://byk-private-ruuter-yml:8080/mock-tim-custom-jwt-userinfo
1412
headers:
1513
cookie: ${cookie}
1614
body:
1715
# TODO: pass cookie name correctly to TIM
1816
cookieName: "customJwtCookie"
1917
result: jwtResult
20-
next: validateAdministrator
2118

2219
validateAdministrator:
2320
switch:
2421
# TODO: use correct structure when request is made against TIM
2522
- condition: ${jwtResult.response.body.response.authorities.includes("ROLE_ADMINISTRATOR")}
26-
next: mapArrayToString
23+
next: validateBody
2724
next: returnUnauthorized
2825

29-
mapArrayToString:
30-
call: http.post
31-
args:
32-
url: https://byk-dmapper:8443/json/v2/map_array_to_string
33-
body:
34-
inputArray: ${organizationWorkingTimeWeekdaysArray}
35-
result: mapArrayResult
36-
next: setOrganizationWorkingTime
26+
validateBody:
27+
switch:
28+
- condition: '${!!(new Date(organizationWorkingTimeStartISO).getDay() && new Date(organizationWorkingTimeEndISO).getDay())}'
29+
next: setOrganizationWorkingTime
30+
next: returnInvalidBody
3731

3832
setOrganizationWorkingTime:
3933
call: http.post
@@ -43,8 +37,6 @@ setOrganizationWorkingTime:
4337
body:
4438
organizationWorkingTimeStartISO: ${organizationWorkingTimeStartISO}
4539
organizationWorkingTimeEndISO: ${organizationWorkingTimeEndISO}
46-
organizationWorkingTimeWeekdays: ${mapArrayResult.response.body.concatenatedArray}
47-
organizationWorkingTimeHolidays: ${incoming.body.organizationWorkingTimeHolidays}
4840
created: ${new Date().toISOString()}
4941
result: setOrganizationWorkingTimeResult
5042

0 commit comments

Comments
 (0)