File tree Expand file tree Collapse file tree 4 files changed +37
-3
lines changed Expand file tree Collapse file tree 4 files changed +37
-3
lines changed Original file line number Diff line number Diff line change 112112 "__BUGS_PAGE_CUSTOM_STATUS_CLOSE_DRAWER_MODAL_QUIT_BUTTON" : " Quit and discard" ,
113113 "__BUGS_PAGE_CUSTOM_STATUS_DRAWER_BODY_DESCRIPTION" : " Here you can create and add a new status to those in process or edit it" ,
114114 "__BUGS_PAGE_CUSTOM_STATUS_DRAWER_CONFIRM_BUTTON" : " Save changes" ,
115+ "__BUGS_PAGE_CUSTOM_STATUS_DRAWER_CONFIRM_TOAST" : " Changes saved" ,
115116 "__BUGS_PAGE_CUSTOM_STATUS_DRAWER_CREATE_CUSTOM_STATUS_BUTTON" : " Create a new status" ,
116117 "__BUGS_PAGE_CUSTOM_STATUS_DRAWER_CUSTOM_STATUS_MAX" : " This name is a bit long. We recommend sticking to a maximum of 17 characters including spaces." ,
117118 "__BUGS_PAGE_CUSTOM_STATUS_DRAWER_CUSTOM_STATUS_REQUIRED" : " Choose a name up to 17 characters including spaces." ,
Original file line number Diff line number Diff line change 117117 "__BUGS_PAGE_CUSTOM_STATUS_CLOSE_DRAWER_MODAL_QUIT_BUTTON" : " Esci" ,
118118 "__BUGS_PAGE_CUSTOM_STATUS_DRAWER_BODY_DESCRIPTION" : " " ,
119119 "__BUGS_PAGE_CUSTOM_STATUS_DRAWER_CONFIRM_BUTTON" : " " ,
120+ "__BUGS_PAGE_CUSTOM_STATUS_DRAWER_CONFIRM_TOAST" : " Modifiche salvate" ,
120121 "__BUGS_PAGE_CUSTOM_STATUS_DRAWER_CREATE_CUSTOM_STATUS_BUTTON" : " " ,
121122 "__BUGS_PAGE_CUSTOM_STATUS_DRAWER_CUSTOM_STATUS_MAX" : " " ,
122123 "__BUGS_PAGE_CUSTOM_STATUS_DRAWER_CUSTOM_STATUS_REQUIRED" : " " ,
Original file line number Diff line number Diff line change 1- import { Button , Drawer , MD } from '@appquality/unguess-design-system' ;
1+ import {
2+ Button ,
3+ Drawer ,
4+ MD ,
5+ Notification ,
6+ useToast ,
7+ } from '@appquality/unguess-design-system' ;
28import { useTranslation } from 'react-i18next' ;
39import { useAppDispatch , useAppSelector } from 'src/app/hooks' ;
410import {
@@ -20,6 +26,7 @@ import { MigrationModal } from '../Modals/MigrationModal';
2026
2127export const CustomStatusDrawer = ( ) => {
2228 const { campaignId } = useParams ( ) ;
29+ const { addToast } = useToast ( ) ;
2330 const { t } = useTranslation ( ) ;
2431 const dispatch = useAppDispatch ( ) ;
2532 const {
@@ -99,7 +106,18 @@ export const CustomStatusDrawer = () => {
99106 } ) ) ,
100107 } ) ;
101108 }
102-
109+ addToast (
110+ ( { close } ) => (
111+ < Notification
112+ onClose = { close }
113+ type = "success"
114+ message = { t ( '__BUGS_PAGE_CUSTOM_STATUS_DRAWER_CONFIRM_TOAST' ) }
115+ closeText = { t ( '__TOAST_CLOSE_TEXT' ) }
116+ isPrimary
117+ />
118+ ) ,
119+ { placement : 'top' }
120+ ) ;
103121 dispatch ( setCustomStatusDrawerOpen ( false ) ) ;
104122 } ;
105123
Original file line number Diff line number Diff line change 99 Span ,
1010 Dropdown ,
1111 Select ,
12+ useToast ,
13+ Notification ,
1214} from '@appquality/unguess-design-system' ;
1315import { Label , MediaInput } from '@zendeskgarden/react-forms' ;
1416import { Trans , useTranslation } from 'react-i18next' ;
@@ -61,6 +63,7 @@ export const MigrationModal = ({
6163 setIsMigrationModalOpen : ( isOpen : boolean ) => void ;
6264} ) => {
6365 const { t } = useTranslation ( ) ;
66+ const { addToast } = useToast ( ) ;
6467 const { campaignId } = useParams ( ) ;
6568 const dispatch = useAppDispatch ( ) ;
6669 const [ patchCustomStatuses ] = usePatchCampaignsByCidCustomStatusesMutation ( ) ;
@@ -134,7 +137,18 @@ export const MigrationModal = ({
134137 ] ,
135138 } ) ;
136139 }
137-
140+ addToast (
141+ ( { close } ) => (
142+ < Notification
143+ onClose = { close }
144+ type = "success"
145+ message = { t ( '__BUGS_PAGE_CUSTOM_STATUS_DRAWER_CONFIRM_TOAST' ) }
146+ closeText = { t ( '__TOAST_CLOSE_TEXT' ) }
147+ isPrimary
148+ />
149+ ) ,
150+ { placement : 'top' }
151+ ) ;
138152 setIsMigrationModalOpen ( false ) ;
139153 dispatch ( setCustomStatusDrawerOpen ( false ) ) ;
140154 } ;
You can’t perform that action at this time.
0 commit comments