fnitu / edu-hospice

Application developed for SIIT Challenge Accepted – CODVIDHACK 2020
https://edu-hospice.herokuapp.com
2 stars 2 forks source link

Integration with server of forgot/reset password feature #34

Closed fnitu closed 3 years ago

fnitu commented 3 years ago

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.

razvantudorache commented 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
        }
    });
fnitu commented 3 years ago

Waiting for the e-mail topic to be handled.

fnitu commented 3 years ago

Remove unnecessary parameters that are sent to server, only e-mail should be needed.

fnitu commented 3 years ago

To be checked with the new server URL.

fnitu commented 3 years ago

Issue implemented and tested.