From e330c2f6c0bcd1d94eca97b0658827530889903b Mon Sep 17 00:00:00 2001 From: Pranav Date: Tue, 6 Aug 2024 17:26:23 -0700 Subject: [PATCH] feat: Update the design for teams (#9899) This PR updates the design for the team listing page. This PR is part of the design revamp project for all the settings pages. Co-authored-by: Sojan Jose --- .../i18n/locale/en/teamsSettings.json | 7 +- .../routes/dashboard/settings/teams/Index.vue | 265 +++++++++--------- .../dashboard/settings/teams/teams.routes.js | 33 ++- 3 files changed, 153 insertions(+), 152 deletions(-) diff --git a/app/javascript/dashboard/i18n/locale/en/teamsSettings.json b/app/javascript/dashboard/i18n/locale/en/teamsSettings.json index 50dcb780d..c39c03569 100644 --- a/app/javascript/dashboard/i18n/locale/en/teamsSettings.json +++ b/app/javascript/dashboard/i18n/locale/en/teamsSettings.json @@ -2,7 +2,9 @@ "TEAMS_SETTINGS": { "NEW_TEAM": "Create new team", "HEADER": "Teams", - "SIDEBAR_TXT": "

Teams

Teams let you organize your agents into groups based on their responsibilities.
An agent can be part of multiple teams. You can assign conversations to a team when you are working collaboratively.

", + "LOADING": "Fetching teams", + "DESCRIPTION": "Teams allow you to organize agents into groups based on their responsibilities. An agent can belong to multiple teams. When working collaboratively, you can assign conversations to specific teams.", + "LEARN_MORE": "Learn more about teams", "LIST": { "404": "There are no teams created on this account.", "EDIT_TEAM": "Edit team" @@ -85,7 +87,6 @@ "BUTTON_TEXT": "Add agents", "AGENT_VALIDATION_ERROR": "Select at least one agent." }, - "FINISH": { "TITLE": "Your team is ready!", "MESSAGE": "You can now collaborate as a team on conversations. Happy supporting ", @@ -98,7 +99,7 @@ "ERROR_MESSAGE": "Couldn't delete the team. Try again." }, "CONFIRM": { - "TITLE": "Are you sure want to delete - %{teamName}", + "TITLE": "Are you sure you want to delete the team?", "PLACE_HOLDER": "Please type {teamName} to confirm", "MESSAGE": "Deleting the team will remove the team assignment from the conversations assigned to this team.", "YES": "Delete ", diff --git a/app/javascript/dashboard/routes/dashboard/settings/teams/Index.vue b/app/javascript/dashboard/routes/dashboard/settings/teams/Index.vue index 76dbdc0ac..2e2c80b13 100644 --- a/app/javascript/dashboard/routes/dashboard/settings/teams/Index.vue +++ b/app/javascript/dashboard/routes/dashboard/settings/teams/Index.vue @@ -1,143 +1,146 @@ - - - diff --git a/app/javascript/dashboard/routes/dashboard/settings/teams/teams.routes.js b/app/javascript/dashboard/routes/dashboard/settings/teams/teams.routes.js index c968351f4..cb0e96785 100644 --- a/app/javascript/dashboard/routes/dashboard/settings/teams/teams.routes.js +++ b/app/javascript/dashboard/routes/dashboard/settings/teams/teams.routes.js @@ -1,6 +1,6 @@ -/* eslint arrow-body-style: 0 */ import { frontendURL } from '../../../../helper/URLHelper'; +const TeamsIndex = () => import('./Index.vue'); const CreateStepWrap = () => import('./Create/Index.vue'); const EditStepWrap = () => import('./Edit/Index.vue'); const CreateTeam = () => import('./Create/CreateTeam.vue'); @@ -9,23 +9,13 @@ const AddAgents = () => import('./Create/AddAgents.vue'); const EditAgents = () => import('./Edit/EditAgents.vue'); const FinishSetup = () => import('./FinishSetup.vue'); const SettingsContent = () => import('../Wrapper.vue'); -const TeamsHome = () => import('./Index.vue'); +const SettingsWrapper = () => import('../SettingsWrapper.vue'); export default { routes: [ { path: frontendURL('accounts/:accountId/settings/teams'), - component: SettingsContent, - props: params => { - const showBackButton = params.name !== 'settings_teams_list'; - return { - headerTitle: 'TEAMS_SETTINGS.HEADER', - headerButtonText: 'TEAMS_SETTINGS.NEW_TEAM', - icon: 'people-team', - newButtonRoutes: ['settings_teams_new'], - showBackButton, - }; - }, + component: SettingsWrapper, children: [ { path: '', @@ -34,11 +24,26 @@ export default { { path: 'list', name: 'settings_teams_list', - component: TeamsHome, + component: TeamsIndex, meta: { permissions: ['administrator'], }, }, + ], + }, + { + path: frontendURL('accounts/:accountId/settings/teams'), + component: SettingsContent, + props: () => { + return { + headerTitle: 'TEAMS_SETTINGS.HEADER', + headerButtonText: 'TEAMS_SETTINGS.NEW_TEAM', + icon: 'people-team', + newButtonRoutes: ['settings_teams_new'], + showBackButton: true, + }; + }, + children: [ { path: 'new', component: CreateStepWrap,