Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OB3] Improvements and Changes to Consent Manager Self-Care Portal UI #49

Merged
merged 20 commits into from
May 21, 2024

Conversation

Sandaru-Vithanage
Copy link
Contributor

@Sandaru-Vithanage Sandaru-Vithanage commented Mar 7, 2024

[OB3] Improvements and Changes to Consent Manager Self-Care Portal UI

This pull request contains changes to UI of consent manager self-care portal, relevant changes have been done in order to rectify the issues of #48
Following changes to the UI of Consent Manager Self Care Portal has been done.

  1. Introduces Grid layout for the key dates info tab
  2. Fixed screen responsive accounts info tab
  3. Fixed Download confirmation of consent link
  4. Fixed shadows of the button

Key Dates and Account Info (Before)
newicon

Key Dates and Account Info (After Changes)
Screenshot 2024-03-07 142645

Profile Details Container (Before)
Screenshot 2024-01-31 134636

Profile Details Container (After)
Screenshot 2024-03-07 143059

Issue link: #48

Doc Issue: Optional, link issue from documentation repository

Applicable Labels: OB 3.0.0


Development Checklist

  1. Build complete solution with pull request in place.
  2. Ran checkstyle plugin with pull request in place.
  3. Ran Findbugs plugin with pull request in place.
  4. Ran FindSecurityBugs plugin and verified report.
  5. Formatted code according to WSO2 code style.
  6. Have you verified the PR doesn't commit any keys, passwords, tokens, usernames, or other secrets?
  7. Migration scripts written (if applicable).
  8. Have you followed secure coding standards in WSO2 Secure Engineering Guidelines?

Testing Checklist

  1. Written unit tests.
  2. Verified tests in multiple database environments (if applicable).
  3. Tested with BI enabled (if applicable).

@CLAassistant
Copy link

CLAassistant commented Mar 7, 2024

CLA assistant check
All committers have signed the CLA.

@Sandaru-Vithanage Sandaru-Vithanage changed the title [OB3] Improvements and Changes to Consent Manager Self-Care Portal [OB3] Improvements and Changes to Consent Manager Self-Care Portal UI Mar 7, 2024
@@ -17,61 +17,58 @@
*/

export const common = {
footerContent: "WSO2 Open Banking | 2021",
complaintHandleLinkText: "Complaint handling and resolution",
footerContent: 'WSO2 Open Banking | 2024',
Copy link
Contributor

Choose a reason for hiding this comment

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

Shall we retrieve the year from current date and add here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed this in a80b0de

Sandaru-Vithanage and others added 2 commits March 11, 2024 09:54
…tor/src/specConfigs/common.js

Co-authored-by: Vimukthi Rajapaksha <[email protected]>
…tor/src/specConfigs/specConfigurations.js

Co-authored-by: Vimukthi Rajapaksha <[email protected]>
@@ -127,7 +127,7 @@ export const KeyDatesInfo = ({consent, infoLabels, consentType}) => {
return (
<div className="keyDatesBody">
<h5>{keyDatesConfig.keyDatesInfoLabel}</h5>
{keyDatesMap}
<div className="two-columns">{keyDatesMap}</div>
Copy link
Contributor

Choose a reason for hiding this comment

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

Without manually defining styles, can't we use existing bootstrap breakpoints[1] for this?

[1] https://getbootstrap.com/docs/5.3/layout/breakpoints/#available-breakpoints

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed in f49d74c

Comment on lines 186 to 191
const getRevokeUrl = (consentId, user) => {
const adminUrl = `${CONFIG.BACKEND_URL}/admin/revoke?consentID=${consentId}`;
const defaultUrl = `${CONFIG.BACKEND_URL}/admin/revoke?consentID=${consentId}&userID=${user.email}`;

return user.role === 'customerCareOfficer' ? adminUrl : defaultUrl;
};
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we move the getRevokeUrl arrow function out of the withdrawConsent function?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

resolved in 106de5c

@@ -170,3 +172,45 @@ export const getConsentsFromAPIForSearch = (searchObj, user, appInfo) => {
});
};

export const withdrawConsent = async (
Copy link
Contributor

Choose a reason for hiding this comment

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

Shall we rename this to revokeConsent?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

resolved in 106de5c

Comment on lines 193 to 209
const response = await axios.delete(getRevokeUrl(consentId, user), {
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${Cookies.get(User.CONST.OB_SCP_ACC_TOKEN_P1)}`,
'x-wso2-client-id': clientId,
'x-fapi-financial-id': 'open-bank'
},
});
if (response.status === 204) {
setMessage(withdrawLang.withdrawModalSuccessMsg + applicationName);
setWithdrawMessageIcon(faCheckCircle);
setWithdrawIconId('withdrawSuccess');
} else {
setMessage(withdrawLang.withdrawModalFailMsg);
setWithdrawMessageIcon(faExclamationCircle);
setWithdrawIconId('withdrawFail');
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this function return a promise, similar to getConsentsFromAPI?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed the revokeConsent function to return a Promise and moved response handling logics to WithdrawStep2.jsc in 106de5c

@VimukthiRajapaksha VimukthiRajapaksha merged commit f3a8558 into wso2:main May 21, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants