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

RA-1513 Added support to allow the extensions to add the custom fragments to the Manage Account dashboard #44

Merged
merged 1 commit into from Jul 24, 2018

Conversation

Projects
None yet
2 participants
@suthagar23
Member

suthagar23 commented Jul 20, 2018

Description

Along with this PR,

  • Add New Account/Edit account dashboards can allow the fragments through the extensions
  • It can allow the different fragments to Add/Edit Information and View information
  • It can provide supports to save the person attributes (if the fragment field type is personAttribute) automatically along with the person registration/ person update.
  • It can provide supports to save the user properties (if the fragment field type is userProperty) automatically along with the user registration/ user update.

Ticket Information

Ticket : https://issues.openmrs.org/browse/RA-1513

@suthagar23 suthagar23 changed the title from RA-1513 Added support to allow the extensions to add the custom fragments to the dashboard to RA-1513 Added support to allow the extensions to add the custom fragments to the Manage Account dashboard Jul 20, 2018

@suthagar23 suthagar23 requested a review from wluyima Jul 20, 2018

String[] parameterValues = parameterMap.get(formFiledName);
if (parameterValues != null && parameterValues.length > 0) {
if (parameterValues.length > 1) {
log.warn("Multiple values for a single person attribute type not supported, ignoring extra values");

This comment has been minimized.

@dkayiwa

dkayiwa Jul 23, 2018

Member

Shouldn't you throw an exception for the above?

@dkayiwa

dkayiwa Jul 23, 2018

Member

Shouldn't you throw an exception for the above?

This comment has been minimized.

@suthagar23

suthagar23 Jul 23, 2018

Member

if we sent the exception, then it will break the registration workflow. It will happen when the user configured the dashboard with duplicate filed ids. In the patient registration also, We followed this way.

@suthagar23

suthagar23 Jul 23, 2018

Member

if we sent the exception, then it will break the registration workflow. It will happen when the user configured the dashboard with duplicate filed ids. In the patient registration also, We followed this way.

@@ -250,6 +315,12 @@ public void setModelAttributes(PageModel model, Account account, OtherAccountDat
force = (user.getUserId() == null) ? true : account.isSupposedToChangePassword(user);
}
userProperties.put(OpenmrsConstants.USER_PROPERTY_CHANGE_PASSWORD, force);

This comment has been minimized.

@dkayiwa

dkayiwa Jul 24, 2018

Member

Same here as above.

@dkayiwa

dkayiwa Jul 24, 2018

Member

Same here as above.

This comment has been minimized.

@suthagar23

suthagar23 Jul 24, 2018

Member

I think you have mentioned the next line. Changed

@suthagar23

suthagar23 Jul 24, 2018

Member

I think you have mentioned the next line. Changed

HttpServletRequest request, UiUtils uu) throws IOException {
Errors errors = new BeanPropertyBindingResult(account, "account");
List<Extension> customUserPropertyEditFragments =

This comment has been minimized.

@dkayiwa

dkayiwa Jul 24, 2018

Member

Since some times you are not creating a user, but just updating their details, can we use a convention like? userAccount.userPropertyEditFragment

@dkayiwa

dkayiwa Jul 24, 2018

Member

Since some times you are not creating a user, but just updating their details, can we use a convention like? userAccount.userPropertyEditFragment

This comment has been minimized.

@suthagar23
@suthagar23
Suthagar23
RA-1513 Added support to allow the extensions to add the custom fragm…
…ents to the dashboard

Minor fix

Minor fix

PR review fixes

PR review fixes

PR review fixes

PR review fixes

PR review fixes

PR review fixes

PR review fixes

PR review fixes

PR review fixes

@dkayiwa dkayiwa merged commit e3832ab into openmrs:master Jul 24, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment