Skip to content
This repository has been archived by the owner on Nov 6, 2021. It is now read-only.

Add warning notice to Dashboard page and Partner Request page when pa… #410

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

EmersonManabuAraki
Copy link
Contributor

…rtner is deactivated

Resolves #390

Description

Add warning notice to Dashboard page and Partner Request page when partner is deactivated.

Type of change

  • Feature

How Has This Been Tested?

@EmersonManabuAraki EmersonManabuAraki force-pushed the feature/display-warning-notices-for-deactivated-partner branch from f7dce4f to 3e8cc77 Compare September 2, 2020 17:53
@@ -1,13 +1,13 @@
class PartnerRequestsController < ApplicationController
before_action :authenticate_user!
before_action :verify_status_in_diaper_base
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this cause a redirect when accessing the index page? If so, I think we don't want to do that. Because the partners should still have access to historical requests.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In addition, would you be able to add text in the area where the request buttons would be? Such that we can explain to the users why the buttons are not visible?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This action permit the Partner access the historical requests normally, and this doesn't redirect to index page.
About the text, this action shows a message that the partner has been deactivated but we can add text in the request button area

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey there @EmersonManabuAraki -- I was wondering about:

This action permit the Partner access the historical requests normally, and this doesn't redirect to index page.

The definition of verify_status_in_diaper_base is:

  def verify_status_in_diaper_base
    if current_partner.status_in_diaper_base == "deactivated"
      flash[:alert] = 'Your account has been disabled, contact the organization via their email to reactivate'
      redirect_to partner_requests_path
    end
  end

Wouldn't this prevent access to the #index action if current_partner.status_in_diaper_base == "deactivated" is true?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case no, because the redirection was removed

@EmersonManabuAraki EmersonManabuAraki force-pushed the feature/display-warning-notices-for-deactivated-partner branch from 3e8cc77 to 1a36583 Compare September 8, 2020 17:23
@seanmarcia seanmarcia changed the base branch from master to main October 1, 2020 22:24
@EmersonManabuAraki EmersonManabuAraki force-pushed the feature/display-warning-notices-for-deactivated-partner branch from 1a36583 to 7c9e88f Compare October 19, 2020 14:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Display warning notices that a Partner had been deactivated.
2 participants