bsoc-bitbyte / myLeave

myLeave is a user-friendly app that streamlines leave request submissions and management.
4 stars 14 forks source link

Implement Login Response Handling #30

Closed Agrim2112 closed 1 month ago

Agrim2112 commented 1 month ago
madhavs004 commented 1 month ago

@Agrim2112 I would like to work on this issue. I will use onclicklistener to start SignUpActivity with intent. I will implement a progress bar animation between the loading time of the activities. I will use conditional logic to start the different dashboards by validating the user email address. To clear the previous activities , i will use clear_task flag while moving to the new activity. I will use appropriate toasts to show the empty/invalid response messages and other error messages. Thanks.

sujalagrawal2 commented 1 month ago

@Agrim2112 I would like to work on this issue. My approach will be: i) Use onClickLishner on signUp text when it is clicked and using explicit intent I will navigate to SignUp Activity. ii) In the code provided ( Resource.Status.LOADING -> {}) I will implement a progressDialog and I will close it when the loading is completed. iii) To check whether the user is regular or admin I will check if (it.data?.isAdmin) is true or not in the provided code (Resource.Status.SUCCESS -> {}). According to the result I will navigate. iv) To remove all the activities from backstack I will use intent flags (FLAG_ACTIVITY_CLEAR_TASK). v) I will show toast message in Resource.Status.ERROR -> {} and Resource.Status.EMPTY -> {}