mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-16 21:12:13 +00:00
Add event checkin functionality, seperate power tests into a different form (#536)
* Split power related parts of event checklist into a seperate form * Revamp H&S overview, remove individual lists. They were not a good thing. * Remove old 'vehicle/crew' stuff * Very initial version of checkin form * Further work on checkin, add role field etc * Fix tests after form split * Add ability to edit checkins, more validation * Basic checkin/out logic complete * Add homepage checkin for events happening now * Minor improvement to homepage UI * Checkin button turns into checkout button where applicable * UI work * Clicking check out does not redirect the user * Register check in model with the admin site * Add power record status chip, checklist status chip displays number of checklists * Minor fixes * Implement codedoctor suggestions * pep8 * Add data migration for crew/vehicles * Checkin only requires login (no perms) and block users from editing other checkins at Django level
This commit is contained in:
@@ -20,6 +20,7 @@ admin.site.register(models.VatRate, VersionAdmin)
|
||||
admin.site.register(models.Event, VersionAdmin)
|
||||
admin.site.register(models.EventItem, VersionAdmin)
|
||||
admin.site.register(models.Invoice, VersionAdmin)
|
||||
admin.site.register(models.EventCheckIn)
|
||||
|
||||
|
||||
@transaction.atomic() # Copied from django-extensions. GenericForeignKey support removed as unnecessary.
|
||||
@@ -206,3 +207,8 @@ class RiskAssessmentAdmin(VersionAdmin):
|
||||
@admin.register(models.EventChecklist)
|
||||
class EventChecklistAdmin(VersionAdmin):
|
||||
list_display = ('id', 'event', 'reviewed_at', 'reviewed_by')
|
||||
|
||||
|
||||
@admin.register(models.PowerTestRecord)
|
||||
class EventChecklistAdmin(VersionAdmin):
|
||||
list_display = ('id', 'event', 'reviewed_at', 'reviewed_by')
|
||||
|
||||
Reference in New Issue
Block a user