@@ -4,18 +4,23 @@ import {
44 defaultSuccessNotification ,
55} from 'src/shared/copy/notifications'
66
7+ export const accountDefaultSettingError = (
8+ accountName : string
9+ ) : Notification => ( {
10+ ...defaultErrorNotification ,
11+ message : `Account "${ accountName } " was not set as the default account. The default is unchanged.` ,
12+ } )
13+
714export const accountDefaultSettingSuccess = (
815 accountName : string
916) : Notification => ( {
1017 ...defaultSuccessNotification ,
1118 message : `Account "${ accountName } " was successfully set as the default account` ,
1219} )
1320
14- export const accountDefaultSettingError = (
15- accountName : string
16- ) : Notification => ( {
21+ export const accountRenameError = ( accountName : string ) : Notification => ( {
1722 ...defaultErrorNotification ,
18- message : `Account "${ accountName } " was not set as the default account ; the default is unchanged ` ,
23+ message : `Account "${ accountName } " was not renamed ; the rename update failed ` ,
1924} )
2025
2126export const accountRenameSuccess = (
@@ -26,105 +31,104 @@ export const accountRenameSuccess = (
2631 message : `Account "${ oldAccountName } " was successfully renamed to "${ newAccountName } "` ,
2732} )
2833
29- export const accountRenameError = ( accountName : string ) : Notification => ( {
34+ export const inviteFailed = ( ) : Notification => ( {
3035 ...defaultErrorNotification ,
31- message : `Account " ${ accountName } " was not renamed; the rename update failed` ,
36+ message : `invite failed` ,
3237} )
3338
34- export const orgCreateSuccess = ( ) : Notification => ( {
35- ...defaultSuccessNotification ,
36- message : 'Organization was successfully created' ,
39+ export const invitationResentFailed = ( ) : Notification => ( {
40+ ...defaultErrorNotification ,
41+ message : `Error sending invitation` ,
3742} )
3843
39- export const orgCreateFailed = ( ) : Notification => ( {
40- ...defaultErrorNotification ,
41- message : 'Failed to create organization' ,
44+ export const invitationResentSuccessful = ( ) : Notification => ( {
45+ ...defaultSuccessNotification ,
46+ message : `Invitation Re-sent` ,
4247} )
4348
44- export const orgEditSuccess = ( ) : Notification => ( {
49+ export const inviteSent = ( ) : Notification => ( {
4550 ...defaultSuccessNotification ,
46- message : 'Organization was successfully updated' ,
51+ message : `Invitation Sent` ,
4752} )
4853
49- export const orgEditFailed = ( ) : Notification => ( {
54+ export const invitationWithdrawnFailed = ( ) : Notification => ( {
5055 ...defaultErrorNotification ,
51- message : 'Failed to update organization' ,
56+ message : `Error withdrawing invite, try again` ,
5257} )
5358
54- export const orgRenameSuccess = ( orgName : string ) : Notification => ( {
59+ export const invitationWithdrawnSuccessful = ( ) : Notification => ( {
5560 ...defaultSuccessNotification ,
56- message : `Organization was successfully renamed " ${ orgName } " ` ,
61+ message : `Invitation Withdrawn ` ,
5762} )
5863
59- export const orgRenameFailed = ( orgName ) : Notification => ( {
64+ export const memberAddFailed = ( message : string ) : Notification => ( {
6065 ...defaultErrorNotification ,
61- message : `Failed to update organization "${ orgName } "` ,
66+ message : `Failed to add members: "${ message } "` ,
6267} )
6368
6469export const memberAddSuccess = ( username : string ) : Notification => ( {
6570 ...defaultSuccessNotification ,
6671 message : `Member "${ username } " was added successfully` ,
6772} )
6873
69- export const memberAddFailed = ( message : string ) : Notification => ( {
74+ export const memberRemoveFailed = ( message : string ) : Notification => ( {
7075 ...defaultErrorNotification ,
71- message : `Failed to add members: "${ message } "` ,
76+ message : `Failed to remove members: "${ message } "` ,
7277} )
7378
7479export const memberRemoveSuccess = ( memberName : string ) : Notification => ( {
7580 ...defaultSuccessNotification ,
7681 message : `Member "${ memberName } " was removed successfully` ,
7782} )
7883
79- export const memberRemoveFailed = ( message : string ) : Notification => ( {
84+ export const orgCreateFailed = ( ) : Notification => ( {
8085 ...defaultErrorNotification ,
81- message : ` Failed to remove members: " ${ message } "` ,
86+ message : ' Failed to create organization' ,
8287} )
8388
84- /* USERS NOTIFICATIONS */
85- export const inviteSent = ( ) : Notification => ( {
89+ export const orgCreateSuccess = ( ) : Notification => ( {
8690 ...defaultSuccessNotification ,
87- message : `Invitation Sent` ,
91+ message : 'Organization was successfully created' ,
8892} )
8993
90- export const inviteFailed = ( ) : Notification => ( {
94+ export const orgDefaultSettingError = ( orgName : string ) : Notification => ( {
9195 ...defaultErrorNotification ,
92- message : `invite failed ` ,
96+ message : `Organization " ${ orgName } " could not be set as the default organization. Please try again. ` ,
9397} )
9498
95- export const invitationResentSuccessful = ( ) : Notification => ( {
99+ export const orgDefaultSettingSuccess = ( orgName : string ) : Notification => ( {
96100 ...defaultSuccessNotification ,
97- message : `Invitation Re-sent ` ,
101+ message : `Organization " ${ orgName } " was successfully set as the default organization ` ,
98102} )
99103
100- export const invitationResentFailed = ( ) : Notification => ( {
104+ export const orgEditFailed = ( ) : Notification => ( {
101105 ...defaultErrorNotification ,
102- message : `Error sending invitation` ,
106+ message : 'Failed to update organization' ,
103107} )
104108
105- export const invitationWithdrawnSuccessful = ( ) : Notification => ( {
109+ export const orgEditSuccess = ( ) : Notification => ( {
106110 ...defaultSuccessNotification ,
107- message : `Invitation Withdrawn` ,
111+ message : 'Organization was successfully updated' ,
108112} )
109113
110- export const invitationWithdrawnFailed = ( ) : Notification => ( {
114+ export const orgRenameFailed = ( orgName ) : Notification => ( {
111115 ...defaultErrorNotification ,
112- message : `Error withdrawing invite, try again ` ,
116+ message : `Failed to update organization " ${ orgName } " ` ,
113117} )
114118
115- export const removeUserSuccessful = ( ) : Notification => ( {
119+ export const orgRenameSuccess = ( orgName : string ) : Notification => ( {
116120 ...defaultSuccessNotification ,
117- message : `User Removed ` ,
121+ message : `Organization was successfully renamed " ${ orgName } " ` ,
118122} )
119123
120124export const removeUserFailed = ( ) : Notification => ( {
121125 ...defaultErrorNotification ,
122126 message : `Error removing user, try again` ,
123127} )
124128
125- export const updateIdentityFailed = ( ) : Notification => ( {
126- ...defaultErrorNotification ,
127- message : 'Error retrieving user identity. Please refresh this page.' ,
129+ export const removeUserSuccessful = ( ) : Notification => ( {
130+ ...defaultSuccessNotification ,
131+ message : `User Removed` ,
128132} )
129133
130134export const updateBillingFailed = ( ) : Notification => ( {
@@ -133,6 +137,11 @@ export const updateBillingFailed = (): Notification => ({
133137 'Error retrieving account billing provider. Please refresh this page.' ,
134138} )
135139
140+ export const updateIdentityFailed = ( ) : Notification => ( {
141+ ...defaultErrorNotification ,
142+ message : 'Error retrieving user identity. Please refresh this page.' ,
143+ } )
144+
136145export const updateOrgFailed = ( ) : Notification => ( {
137146 ...defaultErrorNotification ,
138147 message :
0 commit comments