SEED-platform / seed

Standard Energy Efficiency Data (SEED) Platform™ is a web-based application that helps organizations easily manage data on the energy performance of large groups of buildings.
Other
106 stars 55 forks source link

Add notes related to goals #4532

Closed perryr16 closed 4 months ago

perryr16 commented 4 months ago

Any background context you want to provide?

Better Buildings has requested the ability to attach specific notes and flags to each goal property

  1. A dropdown list of questions an admin can ask to clarify building data
  2. A resolution text input for a leaf user to answer
  3. A historical note that is visible to all like properties regardless of goal, cycle, or view
  4. A passed check boolean admin dropdown
  5. A new or acquired boolean admin dropdown

These are based on columns BV, BX, BW, BZ, and CA in 2022_DataReviewReport_Sample.xlsb

What's this PR do?

Adds 2 new tables (GoalNotes and HistoricalNotes) and adds the ability to accept input at the ui-grid level

GoalNote: Each property in a goal will have a goal note, consisting of the following fields

Each new table only has an update endpoint as create, read, and delete are handled through property or goal db relationships.

The Portfolio Summary leverages the same property/filter endpoint that the inventory list uses to serialize property data for the ui-grid. To accommodate the goal note data an optional argument (goal_id) has been added to the request to add serialized note data.

How should this be manually tested?

Make a few goals at the leaf level. Admin should be able to edit all note fields leaf users will only have the ability to make changes to 'resolution' and 'historical notes' historical notes should be available to matching properties in different goals, while goal notes are specific to a goal-property combo

What are the relevant tickets?

Screenshots (if appropriate)

Admin user has ability to change all fields, question options are hardcoded Screenshot 2024-02-16 at 2 44 15 PM

Historical notes follow properties across goals Screenshot 2024-02-16 at 2 44 35 PM

Leaf user only has ability to change resolution and historical notes. note the lack of dropdown arrows Screenshot 2024-02-16 at 2 46 08 PM