Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
4b3f7a2
Merge pull request #1 from buerokratt/wip
ruwinirathnamalala Feb 23, 2026
dc68f06
Merge pull request #2 from buerokratt/wip
ruwinirathnamalala Feb 23, 2026
1f09f0b
feat: bulk refresh
Feb 24, 2026
2a5e3aa
Merge pull request #3 from buerokratt/wip
ruwinirathnamalala Mar 10, 2026
26bfbe1
Merge pull request #4 from buerokratt/wip
ruwinirathnamalala Mar 16, 2026
72a9ecd
Merge pull request #5 from buerokratt/wip
ruwinirathnamalala Mar 17, 2026
8610161
Merge pull request #6 from buerokratt/wip
ruwinirathnamalala Mar 18, 2026
a32392e
Merge pull request #7 from buerokratt/wip
ruwinirathnamalala Mar 23, 2026
18c2824
Merge pull request #8 from buerokratt/wip
ruwinirathnamalala Mar 31, 2026
3314e8c
Merge pull request #9 from buerokratt/wip
ruwinirathnamalala Apr 10, 2026
134829a
Merge pull request #10 from buerokratt/wip
ruwinirathnamalala Apr 15, 2026
9cab8a0
Implemented - Changing user view after entering a new URL
ruwinirathnamalala Apr 15, 2026
1ce7987
Merge pull request #11 from buerokratt/wip
ruwinirathnamalala Apr 17, 2026
38156d4
Merge pull request #12 from buerokratt/wip
ruwinirathnamalala Apr 22, 2026
6947dc3
Merge branch 'wip' of https://github.com/rootcodelabs/Common-Knowledg…
ruwinirathnamalala Apr 22, 2026
e1759de
Merge branch 'wip' of https://github.com/rootcodelabs/Common-Knowledg…
ruwinirathnamalala Apr 22, 2026
f6dd622
Merge pull request #13 from buerokratt/wip
ruwinirathnamalala Apr 27, 2026
0243ccd
Merge pull request #14 from buerokratt/wip
ruwinirathnamalala May 5, 2026
bb51816
Merge pull request #15 from buerokratt/wip
ruwinirathnamalala May 5, 2026
4b143a1
Merge pull request #16 from buerokratt/wip
ruwinirathnamalala May 18, 2026
18358c3
Merge pull request #17 from buerokratt/wip
ruwinirathnamalala Jun 4, 2026
7c44216
Sync ckb menu header
ruwinirathnamalala Jun 11, 2026
c364a52
Synced side menu - (Changes got from Ahmed)
ruwinirathnamalala Jun 15, 2026
2d1ecee
Synced side menu - removed console logs
ruwinirathnamalala Jun 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
SELECT id_code, active, status, status_comment
FROM customer_support_agent_activity
WHERE id_code = :customerSupportId
AND id IN (SELECT max(id) FROM customer_support_agent_activity WHERE id_code = :customerSupportId)
7 changes: 7 additions & 0 deletions DSL/Resql/users/POST/get-user-domains.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
SELECT DISTINCT ON (user_login)
user_login,
domain_id AS domains,
selected_domains as selected
FROM user_widget_domains
WHERE user_login = :user_login
ORDER BY user_login, created DESC
13 changes: 13 additions & 0 deletions DSL/Resql/users/POST/get-user-profile-settings.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
SELECT
user_id,
forwarded_chat_popup_notifications,
forwarded_chat_sound_notifications,
forwarded_chat_email_notifications,
new_chat_popup_notifications,
new_chat_sound_notifications,
new_chat_email_notifications,
use_autocorrect
FROM user_profile_settings
WHERE user_id=:userId
ORDER BY id DESC
LIMIT 1;
17 changes: 17 additions & 0 deletions DSL/Resql/users/POST/get-widget-domains.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
SELECT name,
url,
domain_id,
active
FROM (
SELECT DISTINCT ON (domain_id)
name,
url,
domain_id,
active
FROM widget_domains
ORDER BY
domain_id,
created DESC,
id DESC
) AS latest_per_domain
WHERE active = TRUE;
52 changes: 52 additions & 0 deletions DSL/Ruuter/ckb/GET/accounts/customer-support-activity.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
declaration:
call: declare
version: 0.1
description: "Decription placeholder for 'CUSTOMER-SUPPORT-ACTIVITY'"
method: get
accepts: json
returns: json
namespace: backoffice
allowlist:
header:
- field: cookie
type: string
description: "Cookie field"

get_user_info:
call: http.post
args:
url: "[#CKB_TIM]/jwt/custom-jwt-userinfo"
contentType: plaintext
headers:
cookie: ${incoming.headers.cookie}
plaintext:
"customJwtCookie"
result: res
next: check_user_info_response

check_user_info_response:
switch:
- condition: ${200 <= res.response.statusCodeValue && res.response.statusCodeValue < 300}
next: assignIdCode
next: return_bad_request

assignIdCode:
assign:
idCode: ${res.response.body.idCode}
next: getCustomerSupportActivity

getCustomerSupportActivity:
call: http.post
args:
url: "[#CKB_USERS_RESQL]/get-customer-support-activity-by-id-code"
body:
customerSupportId: ${idCode}
result: res

return_result:
return: ${res.response.body[0]}
next: end

return_bad_request:
return: "bad_request"
next: end
63 changes: 63 additions & 0 deletions DSL/Ruuter/ckb/GET/accounts/settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
declaration:
call: declare
version: 0.1
description: "Decription placeholder for 'USER-PROFILE-SETTINGS'"
method: get
accepts: json
returns: json
namespace: backoffice
allowlist:
header:
- field: cookie
type: string
description: "Cookie field"

get_user_info:
call: http.post
args:
url: "[#CKB_TIM]/jwt/custom-jwt-userinfo"
contentType: plaintext
headers:
cookie: ${incoming.headers.cookie}
plaintext:
"customJwtCookie"
result: res
next: check_user_info_response

check_user_info_response:
switch:
- condition: ${200 <= res.response.statusCodeValue && res.response.statusCodeValue < 300}
next: assignIdCode
next: return_bad_request

assignIdCode:
assign:
idCode: ${res.response.body.idCode}
next: getUserSettings

getUserSettings:
call: http.post
args:
url: "[#CKB_USERS_RESQL]/get-user-profile-settings"
body:
userId: ${idCode}
result: getUserSettingsResult
next: validateUserSettingsResultExists

validateUserSettingsResultExists:
switch:
- condition: "${getUserSettingsResult.response.body.length > 0}"
next: returnSuccess
next: return_not_found

returnSuccess:
return: ${getUserSettingsResult.response.body}
next: end

return_bad_request:
return: "bad_request"
next: end

return_not_found:
return: "user_not_found"
next: end
38 changes: 38 additions & 0 deletions DSL/Ruuter/ckb/GET/accounts/user-role.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
declaration:
call: declare
version: 0.1
description: "Get user roles dynamically from TIM"
method: get
accepts: json
returns: json
namespace: backoffice
allowlist:
headers:
- field: cookie
type: string
description: "Cookie field"

get_user_info:
call: http.post
args:
url: "[#CKB_TIM]/jwt/custom-jwt-userinfo"
contentType: plaintext
headers:
cookie: ${incoming.headers.cookie}
plaintext: "customJwtCookie"
result: res
next: check_user_info_response

check_user_info_response:
switch:
- condition: ${200 <= res.response.statusCodeValue && res.response.statusCodeValue < 300}
next: return_result
next: return_empty_array

return_result:
return: ${res.response.body.authorities}
next: end

return_empty_array:
return: success
next: end
49 changes: 49 additions & 0 deletions DSL/Ruuter/ckb/GET/accounts/widget-data.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
declaration:
call: declare
version: 0.1
description: "Decription placeholder for 'WIDGET-DATA'"
method: get
accepts: json
returns: json
namespace: backoffice
allowlist:
params:
- field: user_id
type: string
description: "Body field 'user_id'"

checkV:
log: ${incoming.params}

extractRequestData:
assign:
user_id: ${incoming.params.user_id}

getDomains:
call: http.post
args:
url: "[#CKB_USERS_RESQL]/get-widget-domains"
result: domains

getUserDomains:
call: http.post
args:
url: "[#CKB_USERS_RESQL]/get-user-domains"
body:
user_login: ${user_id}
result: user_domains

mapDomainsData:
call: http.post
args:
url: "[#CKB_DMAPPER]/utils/map-domains-data"
body:
domains: ${domains.response.body}
userDomains: ${user_domains.response.body[0]}
result: mappedDomains

returnSuccess:
return: ${mappedDomains.response.body}
wrapper: false
next: end

6 changes: 4 additions & 2 deletions GUI/.env.development
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
REACT_APP_RUUTER_API_URL=http://localhost:8086/ckb
REACT_APP_RUUTER_PRIVATE_API_URL: http://localhost:8086/ckb
REACT_APP_BUEROKRATT_CHATBOT_URL=http://buerokratt-chat:8086/backoffice
REACT_APP_MENU_URL=https://admin.dev.buerokratt.ee
REACT_APP_MENU_PATH=/chat/menu.json
Expand All @@ -13,7 +14,8 @@ REACT_APP_SHOW_HISTORY_EMAIL=false
REACT_APP_SHOW_HISTORY_SORTING=false
REACT_APP_SERVICE_ID=conversations,settings,monitoring
REACT_APP_NOTIFICATION_NODE_URL=http://localhost:4040
REACT_APP_CSP="upgrade-insecure-requests; default-src 'self'; font-src 'self' data:; img-src * data:; script-src 'self' 'unsafe-eval' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; object-src 'none'; connect-src 'self' http://localhost:8086 http://localhost:8085 http://localhost:4040 https://admin.dev.buerokratt.ee/chat/menu.json https://*.s3.amazonaws.com;"
REACT_APP_CSP="default-src 'self'; font-src 'self' data:; img-src * data:; script-src 'self' 'unsafe-eval' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; object-src 'none'; connect-src 'self' http://localhost:8086 http://localhost:8085 http://localhost:4040 http://localhost:9000 http://host.docker.internal:9000 https://host.docker.internal:9000 https://admin.dev.buerokratt.ee/chat/menu.json https://*.s3.amazonaws.com;"
REACT_APP_ENABLE_HIDDEN_FEATURES=TRUE
REACT_APP_VALIDATIONS_ENABLED=FALSE
REACT_APP_MENU_JSON=[{"id":"conversations","label":{"et":"Vestlused","en":"Conversations"},"path":"/chat","children":[{"label":{"et":"Vastamata","en":"Unanswered"},"path":"/unanswered"},{"label":{"et":"Aktiivsed","en":"Active"},"path":"/active"},{"label":{"et":"Ootel","en":"Pending"},"path":"/pending"},{"label":{"et":"Ajalugu","en":"History"},"path":"/history"}]},{"id":"training","label":{"et":"Treening","en":"Training"},"path":"/training","children":[{"label":{"et":"Treening","en":"Training"},"path":"/training","children":[{"label":{"et":"Teemad","en":"Themes"},"path":"/training/intents"},{"label":{"et":"Avalikud teemad","en":"Public themes"},"path":"/training/common-intents"},{"label":{"et":"Teemade järeltreenimine","en":"Post training themes"},"path":"/training/intents-followup-training"},{"label":{"et":"Vastused","en":"Answers"},"path":"/training/responses"},{"label":{"et":"Reeglid","en":"Rules"},"path":"/training/rules"},{"label":{"et":"Konfiguratsioon","en":"Configuration"},"path":"/training/configuration"},{"label":{"et":"Vormid","en":"Forms"},"path":"/training/forms"},{"label":{"et":"Mälukohad","en":"Slots"},"path":"/training/slots"},{"label":{"et":"Automatic Teenused","en":"Automatic Services"},"path":"/auto-services"}]},{"label":{"et":"Ajaloolised vestlused","en":"Historical conversations"},"path":"/history","children":[{"label":{"et":"Ajalugu","en":"History"},"path":"/history/history"},{"label":{"et":"Pöördumised","en":"Appeals"},"path":"/history/appeal"}]},{"label":{"et":"Mudelipank ja analüütika","en":"Modelbank and analytics"},"path":"/analytics","children":[{"label":{"et":"Teemade ülevaade","en":"Overview of topics"},"path":"/analytics/overview"},{"label":{"et":"Mudelite võrdlus","en":"Comparison of models"},"path":"/analytics/models"},{"label":{"et":"Testlood","en":"testTracks"},"path":"/analytics/testcases"}]},{"label":{"et":"Treeni uus mudel","en":"Train new model"},"path":"/train-new-model"}]},{"id":"analytics","label":{"et":"Analüütika","en":"Analytics"},"path":"/analytics","children":[{"label":{"et":"Ülevaade","en":"Overview"},"path":"/overview"},{"label":{"et":"Vestlused","en":"Chats"},"path":"/chats"},{"label":{"et":"Tagasiside","en":"Feedback"},"path":"/feedback"},{"label":{"et":"Nõustajad","en":"Advisors"},"path":"/advisors"},{"label":{"et":"Avaandmed","en":"Reports"},"path":"/reports"}]},{"id":"services","label":{"et":"Teenused","en":"Services"},"path":"/services","children":[{"label":{"et":"Ülevaade","en":"Overview"},"path":"/overview"},{"label":{"et":"Uus teenus","en":"New Service"},"path":"/newService"},{"label":{"et":"Automatic Teenused","en":"Automatic Services"},"path":"/auto-services"},{"label":{"et":"Probleemsed teenused","en":"Faulty Services"},"path":"/faultyServices"}]},{"id":"settings","label":{"et":"Haldus","en":"Administration"},"path":"/settings","children":[{"label":{"et":"Kasutajad","en":"Users"},"path":"/users"},{"label":{"et":"Vestlusbot","en":"Chatbot"},"path":"/chatbot","children":[{"label":{"et":"Seaded","en":"Settings"},"path":"/chatbot/settings"},{"label":{"et":"Tervitussõnum","en":"Welcome message"},"path":"/chatbot/welcome-message"},{"label":{"et":"Välimus ja käitumine","en":"Appearance and behavior"},"path":"/chatbot/appearance"},{"label":{"et":"Erakorralised teated","en":"Emergency notices"},"path":"/chatbot/emergency-notices"}]},{"label":{"et":"Asutuse tööaeg","en":"Office opening hours"},"path":"/working-time"},{"label":{"et":"Sessiooni pikkus","en":"Session length"},"path":"/session-length"},{"label":{"et":"Vestluse Kustutamine","en":"Delete Conversations"},"path":"/delete-conversations"}]},{"id":"monitoring","label":{"et":"Seire","en":"Monitoring"},"path":"/monitoring","children":[{"label":{"et":"Aktiivaeg","en":"Working hours"},"path":"/uptime"}]}]
REACT_APP_MENU_JSON='[{"id":"conversations","label":{"et":"Vestlused","en":"Conversations"},"path":"/chat","children":[{"label":{"et":"Vastamata","en":"Unanswered"},"path":"/unanswered"},{"label":{"et":"Aktiivsed","en":"Active"},"path":"/active"},{"label":{"et":"Ootel","en":"Pending"},"path":"/pending"},{"label":{"et":"Ajalugu","en":"History"},"path":"/history"},{"label":{"et":"Valideerimised","en":"Validations"},"path":"/validations"}]},{"id":"training","label":{"et":"Treening","en":"Training"},"path":"/training","children":[{"label":{"et":"Treening","en":"Training"},"path":"/training","children":[{"label":{"et":"Teemad","en":"Themes"},"path":"/training/intents"},{"hidden":true,"label":{"et":"Avalikud teemad","en":"Public themes"},"path":"/training/common-intents"},{"label":{"et":"Teemade järeltreenimine","en":"Post training themes"},"path":"/training/intents-followup-training"},{"label":{"et":"Vastused","en":"Answers"},"path":"/training/responses"},{"label":{"et":"Reeglid","en":"Rules"},"path":"/training/rules"},{"hidden":true,"label":{"et":"Konfiguratsioon","en":"Configuration"},"path":"/training/configuration"},{"label":{"et":"Vormid","en":"Forms"},"path":"/training/forms"},{"label":{"et":"Mälukohad","en":"Slots"},"path":"/training/slots"}]},{"label":{"et":"Ajaloolised vestlused","en":"Historical conversations"},"path":"/history","children":[{"label":{"et":"Ajalugu","en":"History"},"path":"/history/history"},{"hidden":true,"label":{"et":"Pöördumised","en":"Appeals"},"path":"/history/appeal"}]},{"label":{"et":"Mudelipank ja analüütika","en":"Modelbank and analytics"},"path":"/analytics","children":[{"label":{"et":"Teemade ülevaade","en":"Overview of topics"},"path":"/analytics/overview"},{"label":{"et":"Mudelite võrdlus","en":"Comparison of models"},"path":"/analytics/models"},{"hidden":true,"label":{"et":"Testlood","en":"testTracks"},"path":"/analytics/testcases"}]},{"label":{"et":"Treeni uus mudel","en":"Train new model"},"path":"/train-new-model"}]},{"id":"analytics","label":{"et":"Analüütika","en":"Analytics"},"path":"/analytics","children":[{"label":{"et":"Ülevaade","en":"Overview"},"path":"/overview"},{"label":{"et":"Vestlused","en":"Chats"},"path":"/chats"},{"label":{"et":"Tagasiside","en":"Feedback"},"path":"/feedback"},{"label":{"et":"Avaandmed","en":"Reports"},"path":"/reports"}]},{"id":"services","hidden":true,"label":{"et":"Teenused","en":"Services"},"path":"/services","children":[{"label":{"et":"Ülevaade","en":"Overview"},"path":"/overview"},{"label":{"et":"Uus teenus","en":"New Service"},"path":"/newService"},{"label":{"et":"Probleemsed teenused","en":"Faulty Services"},"path":"/faultyServices"}]},{"id":"knowledge-center","label":{"et":"Teadmuskeskus","en":"Knowledge Center"},"path":"/knowledge-center","children":[{"id":"rag-search","label":{"et":"Mudelid ja seadistused","en":"Models management"},"path":"/rag-search","children":[{"label":{"et":"Mudelite ühendused","en":"LLM connections"},"path":"/rag-search/llm-connections"},{"label":{"et":"Viiba Seaded","en":"Prompt Configurations"},"path":"/rag-search/prompt-configurations"},{"label":{"et":"Testi mudelit","en":"Test LLM"},"path":"/rag-search/test-llm"}]},{"id":"ckb","label":{"et":"Teadmusbaas","en":"Knowledge Base"},"path":"/ckb","children":[{"label":{"et":"Agentuur","en":"Agency"},"path":"/agency"},{"label":{"et":"Aruanded","en":"Reports"},"path":"/reports"},{"label":{"et":"API Integratsioonid","en":"API Integrations"},"path":"/api"}]}]},{"id":"settings","label":{"et":"Haldus","en":"Administration"},"path":"/settings","children":[{"label":{"et":"Kasutajad","en":"Users"},"path":"/users"},{"label":{"et":"Vestlusbot","en":"Chatbot"},"path":"/chatbot","children":[{"label":{"et":"Seaded","en":"Settings"},"path":"/chatbot/settings"},{"label":{"et":"Tervitussõnum","en":"Welcome message"},"path":"/chatbot/welcome-message"},{"label":{"et":"Välimus ja käitumine","en":"Appearance and behavior"},"path":"/chatbot/appearance"},{"label":{"et":"Erakorralised teated","en":"Emergency notices"},"path":"/chatbot/emergency-notices"},{"label":{"et":"Tagasiside","en":"Feedback"},"path":"/chatbot/feedback"}]},{"label":{"et":"Vestluste analüüs","en":"Chat analysis"},"path":"/chat-analysis"},{"label":{"et":"Asutuse tööaeg","en":"Office opening hours"},"path":"/working-time"},{"label":{"et":"Vestluse Kustutamine","en":"Delete Conversations"},"path":"/delete-conversations"},{"label":{"et":"Sessiooni pikkus","en":"Session length"},"path":"/session-length"},{"label":{"et":"SKMi konfiguratsioon","en":"SKM Configuration"},"path":"/skm-configuration"},{"label":{"et":"Anonümiseerija","en":"Anonymizer"},"path":"/anonymizer"}]},{"id":"monitoring","hidden":true,"label":{"et":"Seire","en":"Monitoring"},"path":"/monitoring","children":[{"label":{"et":"Aktiivaeg","en":"Working hours"},"path":"/uptime"}]}]'
REACT_APP_ENABLE_MULTI_DOMAIN=FALSE
17 changes: 9 additions & 8 deletions GUI/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions GUI/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"prettier": "prettier --write \"{,!(node_modules)/**/}*.{ts,tsx,js,json,css,less,scss}\""
},
"dependencies": {
"@buerokratt-ria/header": "^0.1.35",
"@buerokratt-ria/menu": "^0.2.6",
"@buerokratt-ria/header": "^0.1.52",
"@buerokratt-ria/menu": "^0.2.15",
"@buerokratt-ria/styles": "^0.0.1",
"@buerokratt-ria/common-gui-components": "^0.0.17",
"@fontsource/roboto": "^4.5.8",
Expand Down
26 changes: 0 additions & 26 deletions GUI/src/components/CKBHeader/Header.scss

This file was deleted.

Loading
Loading