Feature/purchase reminders#13
Open
robertjensen wants to merge 5 commits intofeature/multiple_as_functions_ofsfrom
Open
Feature/purchase reminders#13robertjensen wants to merge 5 commits intofeature/multiple_as_functions_ofsfrom
robertjensen wants to merge 5 commits intofeature/multiple_as_functions_ofsfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a purchase reminder facility to cinfdata as suggested by Asger Barkholt Moss
To install, create an extra dataplot table named
dateplots_purchase_reminders:Remember to change
nanomadedatato the name of your database.Install the python3 QR package:
sudo apt install python3-qrcodeCinfdata will now recognize email alarms with a description starting with
[purchase_reminders]as a purchase reminder and show them in the overview on theorder.phppage. From here you can generate QR codes that when activated will increase a counter by 1 and thus trig the email alarm.Sensible defaults for an email alarm is something like this;
Description: [purchase_reminders]Order chocolate turtlesCheck: q0 > p0No repeat interval: 86400Parameter: 0.1query: select unix_timestamp(time), value from dateplots_purchase_reminders where type=25 order by id desc limit 1Email body something like this:
Notice that for now, there is no mechanism to insert the expected type-id into the select statement and the email. This will normally be the existing highest id + 1. This is confirmed when the alarm is created and can easily be changed if it was something else.