pulibrary / locations

Services around holding, delivery, and physical locations
MIT License
3 stars 0 forks source link

Allow user to add/remove subdivisions for holding locations #61

Open sdellis opened 8 years ago

sdellis commented 8 years ago

From Holding Locations page:

  1. User clicks "Create Subdivision"
  2. User selects a floor within the Holding Location's associated Library
  3. User draws outline shape on the Floorplan image
  4. User enters subdivision label
  5. User should be able to delete any drawing associated with a subdivision
sdellis commented 8 years ago

@kevinreiss I would like to clarify the vocabulary used above. I'm seeing it like this:

  1. HoldingLocation gets a new property "has_many :subdivisions"
  2. Subdivision gets "label", "belongs_to :holding_location", and "has_many :stacks" properties (essentially a grouping of stacks)
  3. Place of Interest has "belongs_to :floor", "label", and "svg_coords" as a property
  4. Stack extends "Place of Interest" and adds "callnum_range" as a property

This way, in the future, we can extend Place of Interest with Bathroom, Study Room, and other models, that may be directly attached to floors, not Holding Locations. However, the above should work for Subdivisions that span multiple floors, which is possible with the revised flow outlined below.

Instead of the flow outlined in the original issue, here is a revised flow:

  1. Floorplans for a Holding Location load as different layers in the svg-draw-component.
  2. A user can draw Stacks on any and all layers (optionally giving them callnum_ranges).
  3. A user can multi-select Stacks and give them a Subdivision label (ala, "Create Subdivision from selected")
  4. A user can select any Stack and add it to an existing Subdivision (ala, "Add selected to Subdivision")
  5. A user can delete any Stack from the view, and when all a Subdivision's Stacks are deleted, the Subdivision is deleted.