Closed fnitu closed 3 years ago
Hi @RaduMS ,
Please review your implementation that uses matSnackBar. I see that you configured matSnackBar with an action, that is not really an action. It acts like a notification type indicator.
if (response.success) {
action = GLOBALS.constants.NOTIFICATIONS.INFO;
} else {
action = GLOBALS.constants.NOTIFICATIONS.ERROR;
}
this.matSnackBar.open(response.message, action, {
duration: GLOBALS.constants.NOTIFICATIONS.DURATION_IN_SECONDS * 1000,
verticalPosition: 'top'
});
this.matSnackBar.open(result.message, GLOBALS.constants.NOTIFICATIONS.INFO, {
duration: GLOBALS.constants.NOTIFICATIONS.DURATION_IN_SECONDS * 1000,
verticalPosition: 'top'
});
I propose to remove that configuration because in all case it's looks the same (having the red color).
You can use this approach because I created a new component that offers the possibility to add notification type:
this.matSnackBar.openFromComponent(SnackBarComponent, {
duration: GLOBALS.constants.NOTIFICATIONS.DURATION_IN_SECONDS * 1000,
verticalPosition: 'top',
data: {
content: message,
type: GLOBALS.constants.NOTIFICATIONS.ERROR / INFO / WARNING
}
});
Waiting for the e-mail topic to be handled.
Remove unnecessary parameters that are sent to server, only e-mail should be needed.
To be checked with the new server URL.
Issue implemented and tested.
14 and #15 must be integrated with server.
On #14 a confirmation message must be displayed when an e-mail is sent successfully.
TODO: Use translation keys.