Closed winsmith closed 5 years ago
I also added some unit tests to make the contract clearer here :)
Whoops, forgot to add the saved questions to the OrderPositions being uploaded. I'm fixing that.
For pre-filled questions I'd need to change the database schema slightly. I guess it's time to add a tiny migration system.
Aight, answers from the server are now honoured (I'm not asking them at all), and answered questions should be uploaded.
This PR includes hopefully everything to manage pretix's check-in questions. The app will report to the server that it supports questions, and receive any open questions during the check-in process for users to fill out.
The following questions are supported by the app:
– number, one-line string, multi-line string – boolean – choice from a list, multiple choice from a list – date, time, date and time
Other than that, file upload questions will be displayed as a read-only field but can't be used, and country code fields display as a text field for now.
Notes
This update slightly changes the offline queued uploads are handled, storing them in JSON instead of individual database fields. Migration should work, but users should probably not update with thousands of non-synced redemption requests in the app, just in case.