diff --git a/app/javascript/dashboard/components/index.js b/app/javascript/dashboard/components/index.js index cc2a70a2c..e5ec89da0 100644 --- a/app/javascript/dashboard/components/index.js +++ b/app/javascript/dashboard/components/index.js @@ -6,6 +6,7 @@ import Button from './ui/WootButton'; import Code from './Code'; import ColorPicker from './widgets/ColorPicker'; import DeleteModal from './widgets/modal/DeleteModal.vue'; +import ConfirmDeleteModal from './widgets/modal/ConfirmDeleteModal.vue'; import DropdownItem from 'shared/components/ui/dropdown/DropdownItem'; import DropdownMenu from 'shared/components/ui/dropdown/DropdownMenu'; import Input from './widgets/forms/Input.vue'; @@ -42,6 +43,7 @@ const WootUIKit = { Tabs, TabsItem, Thumbnail, + ConfirmDeleteModal, install(Vue) { const keys = Object.keys(this); keys.pop(); // remove 'install' from keys diff --git a/app/javascript/dashboard/components/widgets/modal/ConfirmDeleteModal.vue b/app/javascript/dashboard/components/widgets/modal/ConfirmDeleteModal.vue new file mode 100644 index 000000000..ef86059ff --- /dev/null +++ b/app/javascript/dashboard/components/widgets/modal/ConfirmDeleteModal.vue @@ -0,0 +1,86 @@ + + + diff --git a/app/javascript/dashboard/i18n/locale/en/inboxMgmt.json b/app/javascript/dashboard/i18n/locale/en/inboxMgmt.json index 4d0fcdffc..f5d164324 100644 --- a/app/javascript/dashboard/i18n/locale/en/inboxMgmt.json +++ b/app/javascript/dashboard/i18n/locale/en/inboxMgmt.json @@ -215,6 +215,7 @@ "CONFIRM": { "TITLE": "Confirm Deletion", "MESSAGE": "Are you sure to delete ", + "PLACE_HOLDER": "Please type {inboxName} to confirm", "YES": "Yes, Delete ", "NO": "No, Keep " }, diff --git a/app/javascript/dashboard/i18n/locale/en/teamsSettings.json b/app/javascript/dashboard/i18n/locale/en/teamsSettings.json index a836134df..98a8ad755 100644 --- a/app/javascript/dashboard/i18n/locale/en/teamsSettings.json +++ b/app/javascript/dashboard/i18n/locale/en/teamsSettings.json @@ -17,7 +17,8 @@ "TITLE": "Add agents to team - %{teamName}", "DESC": "Add Agents to your newly created team. This lets you collaborate as a team on conversations, get notified on new events in the same conversation." }, - "WIZARD": [{ + "WIZARD": [ + { "title": "Create", "route": "settings_teams_new", "body": "Create a new team of agents." @@ -45,7 +46,8 @@ "TITLE": "Add agents to team - %{teamName}", "DESC": "Add Agents to your newly created team. All the added agents will be notified when a conversation is assigned to this team." }, - "WIZARD": [{ + "WIZARD": [ + { "title": "Team details", "route": "settings_teams_edit", "body": "Change name, description and other details." @@ -97,6 +99,7 @@ }, "CONFIRM": { "TITLE": "Are you sure want to delete - %{teamName}", + "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 ", "NO": "Cancel" diff --git a/app/javascript/dashboard/routes/dashboard/settings/inbox/Index.vue b/app/javascript/dashboard/routes/dashboard/settings/inbox/Index.vue index 9eccee913..478d04dbf 100644 --- a/app/javascript/dashboard/routes/dashboard/settings/inbox/Index.vue +++ b/app/javascript/dashboard/routes/dashboard/settings/inbox/Index.vue @@ -106,14 +106,16 @@ :inbox="selectedInbox" /> - @@ -153,11 +155,16 @@ export default { this.selectedInbox.name }`; }, - deleteMessage() { + confirmDeleteMessage() { return `${this.$t('INBOX_MGMT.DELETE.CONFIRM.MESSAGE')} ${ this.selectedInbox.name } ?`; }, + confirmPlaceHolderText() { + return `${this.$t('INBOX_MGMT.DELETE.CONFIRM.PLACE_HOLDER', { + inboxName: this.selectedInbox.name, + })}`; + }, }, methods: { openSettings(inbox) { diff --git a/app/javascript/dashboard/routes/dashboard/settings/teams/Index.vue b/app/javascript/dashboard/routes/dashboard/settings/teams/Index.vue index 655898ee3..91d8d4fa5 100644 --- a/app/javascript/dashboard/routes/dashboard/settings/teams/Index.vue +++ b/app/javascript/dashboard/routes/dashboard/settings/teams/Index.vue @@ -63,15 +63,16 @@ /> - - @@ -105,11 +106,16 @@ export default { deleteRejectText() { return this.$t('TEAMS_SETTINGS.DELETE.CONFIRM.NO'); }, - deleteTitle() { + confirmDeleteTitle() { return this.$t('TEAMS_SETTINGS.DELETE.CONFIRM.TITLE', { teamName: this.selectedTeam.name, }); }, + confirmPlaceHolderText() { + return `${this.$t('TEAMS_SETTINGS.DELETE.CONFIRM.PLACE_HOLDER', { + teamName: this.selectedTeam.name, + })}`; + }, }, methods: { async deleteTeam({ id }) {