dckc / finquick

family finance tools of a closet librarian
https://www.madmode.com/search/label/finances/
MIT License
11 stars 4 forks source link

Just in case #69

Closed dckc closed 1 month ago

dckc commented 3 months ago

going on a trip; just in case we don't get back, this code adds a trigger to share info with our survivors

dckc commented 2 months ago

Trigger Sheet

The main user interface is a spreadsheet table that looks like...

image

The text in the table is...

status deadline folder viewersToAdd viewers note triggeredAt
TRUE 7-Jul-2024 16:55 Just In Case test mini-mouse@example.com, donald-duck@example.com mickey-mouse@example.com Pending  

and in the folder column, Just In Case test is linked to a folder in Google Drive.

Share Just In Case menu item

Among the menu items added by this sync26 package is a Share Just In Case item:

image

When selected, a script clears any triggers installed earlier and then evaluates each row:

If the results include any Pending rows, a Trigger at its deadline to run onSharingTrigger is created.

onSharingTrigger

Rows are evaluated much like above. For each Ready row, the *viewersToAdd are added to the linked folder. The viewers column is updated. The note is set to Shared, and the triggeredAt column is set to the time measured in the trigger.