Skip to content

Commit

Permalink
Merge branch 'v24.02'
Browse files Browse the repository at this point in the history
  • Loading branch information
dlohvinov committed May 9, 2024
2 parents cedce30 + 9069303 commit 25f12a2
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 29 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "web-client",
"version": "24.02.2",
"version": "24.02.3",
"private": true,
"scripts": {
"dev": "vite",
Expand Down
39 changes: 26 additions & 13 deletions src/modules/userinfo/store/_internals/lookups/ObjectsList.lookup.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,22 @@ export default Object.freeze([
route: RouteNames.GATEWAYS,
}, // scope: gateways
{
field: 'acr_routing',
field: 'acr_chat_plan',
name: AdminSections.CHATPLAN,
route: RouteNames.CHATPLAN,
}, // scope: acr_routing
}, // scope: acr_chat_plan
{
field: 'chats',
name: AdminSections.CHAT_GATEWAYS,
route: RouteNames.CHAT_GATEWAYS,
}, // scope: chats

// LOOKUPS
{
field: 'dictionaries',
name: AdminSections.SKILLS,
route: RouteNames.SKILLS,
}, // scope: dictionaries
{
field: 'cc_list',
name: AdminSections.BLACKLIST,
Expand All @@ -43,27 +48,30 @@ export default Object.freeze([
name: AdminSections.CALENDARS,
route: RouteNames.CALENDARS,
}, // scope: calendars
{ field: 'lookups', name: AdminSections.REGIONS, route: RouteNames.REGIONS }, // scope: lookups
{
field: 'lookups',
field: 'dictionaries',
name: AdminSections.REGIONS,
route: RouteNames.REGIONS,
}, // scope: dictionaries
{
field: 'dictionaries',
name: AdminSections.BUCKETS,
route: RouteNames.BUCKETS,
},
{
field: 'dictionaries',
name: AdminSections.COMMUNICATIONS,
route: RouteNames.COMMUNICATIONS,
}, // scope: lookups
}, // scope: dictionaries
{
field: 'lookups',
field: 'dictionaries',
name: AdminSections.PAUSE_CAUSE,
route: RouteNames.PAUSE_CAUSE,
}, // scope: lookups
}, // scope: dictionaries
{ field: 'media_file', name: AdminSections.MEDIA, route: RouteNames.MEDIA }, // scope: media_file

// CONTACT CENTER
{ field: 'lookups', name: AdminSections.SKILLS, route: RouteNames.SKILLS }, // scope: lookups
{ field: 'cc_agent', name: AdminSections.AGENTS, route: RouteNames.AGENTS }, // scope: cc_agent
{
field: 'cc_bucket',
name: AdminSections.BUCKETS,
route: RouteNames.BUCKETS,
}, // scope: cc_bucket
{ field: 'cc_queue', name: AdminSections.QUEUES, route: RouteNames.QUEUES }, // scope: cc_queue
{ field: 'cc_queue', name: AdminSections.MEMBERS, route: RouteNames.MEMBERS }, // scope: cc_queue
{
Expand Down Expand Up @@ -109,6 +117,11 @@ export default Object.freeze([
name: AdminSections.TRIGGERS,
route: RouteNames.TRIGGERS,
},
{
field: 'schema',
name: AdminSections.FLOW,
route: RouteNames.FLOW,
},

// PERMISSIONS
{ field: null, name: AdminSections.OBJECTS, route: RouteNames.OBJECTS }, // permissions: add
Expand Down
15 changes: 0 additions & 15 deletions src/modules/userinfo/store/_internals/scripts/convertScope.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import AdminSections
from '@webitel/ui-sdk/src/enums/WebitelApplications/AdminSections.enum';
import ObjectsList from '../lookups/ObjectsList.lookup';

Check failure on line 1 in src/modules/userinfo/store/_internals/scripts/convertScope.js

View workflow job for this annotation

GitHub Actions / Qodana for JS

ESLint

ESLint: Install the 'eslint' package

const convertScope = (initialScope) => {
Expand All @@ -17,19 +15,6 @@ const convertScope = (initialScope) => {
}, {});
}

// temporary add full access to lookups and flow permissions
// as soon as they haven't implemented on backend
const flow = ObjectsList.find((obj) => obj.name === AdminSections.FLOW);
const communications = ObjectsList.find((obj) => obj.name ===
AdminSections.COMMUNICATIONS);
const skills = ObjectsList.find((obj) => obj.name === AdminSections.SKILLS);
const pauseCauses = ObjectsList.find((obj) => obj.name ===
AdminSections.PAUSE_CAUSE);
scope.flow = { ...flow, access: 'rxwd' };
scope.communications = { ...communications, access: 'rxwd' };
scope.skills = { ...skills, access: 'rxwd' };
scope.pauseCauses = { ...pauseCauses, access: 'rxwd' };

return scope;
};

Expand Down

0 comments on commit 25f12a2

Please sign in to comment.