Closed jpye-finch closed 1 year ago
Since the toggle button is not working properly could not complete the test. Bug: https://user-images.githubusercontent.com/94350336/222704435-b2ba70a6-ec04-4d43-8d76-641dc9b01fce.mp4
@anny320 this ticket is tested. The bugs are mentioned in- #4845
screenshots:
completed
Description
Acceptance criteria
GIVEN I am National System Admin WHEN I toggle off an SMS THEN don't send the SMS!
GIVEN I am National System Admin WHEN I change the language THEN change the copy of the SMS to my selected language
Design
https://www.figma.com/file/O6PevbBv0lApmXWYotR8sf/OpenCRVS-Design-Specifications-v2?node-id=8837%3A63545&t=yqYqZJFcLGb566gc-1
Dev tasks
{ name: string, enabled: boolean }
. Add a GET endpoint to retrieve them all and another PUT endpoint to modify one. These should be restricted to natlsysadmin - 2informantSMSNotifications
query would call the GET endpoint in config and thecontent/notification
endpoint in farajaland, then merge them into the required format and return them - 2toggleInformantSMSNotification
mutation should use the PUT endpoint in config to update the smsNotification configuration.informantSMSNotifications
query to render the view according to design. Clicking save would call thetoggleInformantSMSNotification
mutation. Disables the toggle button when the mutation is in progress. handle the success and error states properly. - 2sendEventNotification
function in workflow, get the InformantSMSNotification configurations, don't send the notification if the value for a particular SMSNotification is false. (We assume it's true by default) - 1birthInProgressSMS, birthDeclarationSMS, birthRegistrationSMS, birthRejectionSMS
input SMSNotificationInput { name: String! enabled: Boolean! }
type Query { informantSMSNotifications(): [SMSNotification!] }
type Mutation { toggleInformantSMSNotification(smsNotification: [SMSNotificationInput!]): [SMSNotification!] }