mikeymicrophone / commissulator

Commissulator is a set of tools that help Real Estate Agents working with Citi Pads in Manhattan streamline their paperwork.
Other
3 stars 4 forks source link

Registrant can add additional apartments to their registration form #9

Open mikeymicrophone opened 5 years ago

mikeymicrophone commented 5 years ago

At the end of the registration card, the client fills in what other apartments they've seen. They don't usually write much here, but we want to make it easy and sexy to add more details there at the end of the form. We're going to start with an interface inviting them to add even more apartments than the two they can start with.

mikeymicrophone commented 5 years ago

A little jQuery is probably the easiest way to implement this, but other technologies could be considered, especially if they provide the opening to start moving this page to a GraphQL submission system.

mikeymicrophone commented 5 years ago

The page submits multiple clients in parallel using numbered element ids; the same tactic can be used for the additional apartments being added, although doing something different like automatically submitting individual apartments and placing new interface in their place would be another good solution. The small refactor required to start submitting objects individually rather than all together would not require much in the way of engineering.

mikeymicrophone commented 5 years ago

screen shot 2018-10-23 at 8 40 19 pm

Let's make this look better.

mikeymicrophone commented 5 years ago

Here's the apartment portion of the template shown. https://github.com/mikeymicrophone/commissulator/blob/master/app/views/home/registration.html.erb#L56-L83

This is the partial generating the client panes. https://github.com/mikeymicrophone/commissulator/blob/master/app/views/home/_registrant.html.erb

The client panes receive roommate_number based on how many panes are shown and how many occupants are indicated. https://github.com/mikeymicrophone/commissulator/blob/master/app/controllers/home_controller.rb#L12 https://github.com/mikeymicrophone/commissulator/blob/master/app/views/home/registrant_add.js.erb