-
Notifications
You must be signed in to change notification settings - Fork 2
Staffing Patterns
Overview of Staffing Patterns:
3 Major components to staffing patterns:
- Admin report: Google sheet Admin report where ECC would update it
- Staffing sheet: Google sheet (separate of Admin report) with record of past information
- Intel report site: the actual Intel report displaying data
Since tabletop.js isn't very smart because empty rows, empty columns, and merged cells confuses it, we have to format the data into something tabletop can use. So Admin report sends formatted data to the Staffing sheet, which can then be pulled from main.js
and displayed onto the Intel report.
Just to make it less confusing. Let's say Staffing table is the Staffing Sheet/tab in Admin report, and Staffing sheet is the separate Google sheet.
There is a google script running on this sheet. If a user edits the Staffing table, it will create a record of staffing data in the Staffing sheet.
onEdit()
is called every single time a user enters a cell. We don't want to create a record in onEdit()
or else there would be an excess of records. So we put the time stamp of the most recent edit into a cache for 6 minutes. There is a timer running every 5 minutes to check if there is a time stamp in the cache. If there is, then create a record into the Staffing sheet.
Every row is one record. Every record has the time stamp and staffing data.
Tabletop.js can't read font color or style so there is a strike through column for every req number.
Grabs the latest row and parses the record. All work is done in main.js
.