-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2904 from glific/forced-suspension
Added forced suspenion pop up message
- Loading branch information
Showing
7 changed files
with
141 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,6 +41,7 @@ export const GET_ORGANIZATION = gql` | |
signaturePhrase | ||
newcontactFlowId | ||
optinFlowId | ||
status | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import axios from 'axios'; | ||
import { setErrorMessage } from 'common/notification'; | ||
|
||
import { RENEW_TOKEN, VITE_GLIFIC_AUTHENTICATION_API } from 'config'; | ||
import setLogs from 'config/logs'; | ||
|
@@ -291,3 +292,27 @@ export const setAuthHeaders = () => { | |
|
||
return { xmlSend, fetch, xmlOpen }; | ||
}; | ||
|
||
export const checkOrgStatus = (status: any) => { | ||
if (status === 'suspended') { | ||
setErrorMessage( | ||
{ | ||
message: | ||
'Your account is suspended or paused by your team. In case of any concerns, please reach out to us on [email protected].', | ||
}, | ||
'Account Suspended' | ||
); | ||
return false; | ||
} else if (status === 'forced_suspension') { | ||
setErrorMessage( | ||
{ | ||
message: | ||
'Your account has been suspended or paused due to a pending payment from your team. Kindly make the payment at your earliest convenience to resume your account. In case of any concerns, please reach out to us on [email protected].', | ||
}, | ||
'Account Suspended' | ||
); | ||
return false; | ||
} | ||
|
||
return true; | ||
}; |