arborrow / montserrat

A retreat management application written in Laravel
12 stars 4 forks source link

Wip 541 relationship #545

Closed arborrow closed 1 year ago

arborrow commented 1 year ago

I added a field in the section to create a relationship on the person.show blade. I changed the routing to simplify the loading of the page and consolidated to a single method and make use of the post route to validate the data. Instead of pulling up all individuals, it will pull up related individuals based on lastname, email, phone, and address similarity. In addition, the option to add a lastname will allow for additional persons to be selected if they are not in the default listing or have a different last name.

I need to review the test cases and make sure that submitting different types of requests works well. In addition, I have noticed that the employer and parishioner options are a bit slow. This is because the logic of the consolidated methods (addme and add in relationship_type controller) is half-baked but I want to commit this anyway for the majority of relationships that will load faster and then I can come back and see what is happening with the lesser used options.

arborrow commented 1 year ago

I decided to simplify the interface by combining lastname and matched options always opting for matched with the addition of a provided last name. I also double checked the scenario for generating a list of employers and parishes to make use of the optional alternate name.

arborrow commented 1 year ago

So for documentation purposes, to create a relationship from the person.show blade, go to the Relationships section and in the Create a New Relationship section select from the relationship drop down box the relationship that the person whose profile you are looking at will have. For example, if you are looking at John Doe's record and want to add his wife, select husband because John will be the husband. If the wife has a different last name, then you will need to provide that last name as an alternate name before clicking on the Create button. From the addme form, select the person with whom John will be listed as the person's husband - so if you choose Jane Doe from the list and then click on Add, then Jane will become John's wife and you will be taken back to John's contact. The dropdown box should automatically receive the focus.

arborrow commented 1 year ago

I realized that org, parish, diocese and vendor all have create relationship sections that need to have sensible defaults so I would like to clean those up before committing these changes.

arborrow commented 1 year ago

I want to review the way that the relationships are being described when being created for consistency. The logic should be:

_{contacta} is {label_a_b} _{contactb} Diocese of Dallas is Diocese for Parish St. Nicholas