org.views.allocation
Attributes
Functions
|
Returns the allocations in a fullcalendar compatible events feed. |
|
Manually runs the rules processing cronjobs for testing. |
|
|
|
Returns the form class for new allocations (different resources have |
|
Returns the form class for existing allocations (different resources |
Returns the form class for allocation rules. |
|
|
Handles new allocations for differing form classes. |
|
Handles edit allocation for differing form classes. |
|
Deletes the given resource (throwing an error if there are existing |
|
|
|
|
|
Returns the rule_id from the request params, ensuring that |
|
Handles all cronjob duties of the rules stored on the given |
|
Removes the given rule from the resource. |
|
|
|
Module Contents
- org.views.allocation.AllocationForm: TypeAlias = DaypassAllocationForm | RoomAllocationForm | DailyItemAllocationForm[source]
- org.views.allocation.view_allocations_json(self: onegov.reservation.Resource, request: onegov.org.request.OrgRequest) onegov.core.types.JSON_ro [source]
Returns the allocations in a fullcalendar compatible events feed.
See https://fullcalendar.io/docs/event_data/events_json_feed/ for more information.
- org.views.allocation.process_rules(self: onegov.reservation.Resource, request: onegov.org.request.OrgRequest) None [source]
Manually runs the rules processing cronjobs for testing.
Not really dangerous, though it should be replaced with something proper instead, cronjobs currently do not run in most tests and that should be remedied.
- org.views.allocation.view_allocation_rules(self: onegov.reservation.Resource, request: onegov.org.request.OrgRequest, layout: onegov.org.layout.AllocationRulesLayout | None = None) onegov.core.types.RenderData [source]
- org.views.allocation.get_new_allocation_form_class(resource: onegov.reservation.Resource, request: onegov.org.request.OrgRequest) type[AllocationForm] [source]
Returns the form class for new allocations (different resources have different allocation forms).
- org.views.allocation.get_edit_allocation_form_class(allocation: onegov.reservation.Allocation, request: onegov.org.request.OrgRequest) type[AllocationEditForm] [source]
Returns the form class for existing allocations (different resources have different allocation forms).
- org.views.allocation.get_allocation_rule_form_class(resource: onegov.reservation.Resource, request: onegov.org.request.OrgRequest) type[onegov.org.forms.AllocationRuleForm] [source]
Returns the form class for allocation rules.
- org.views.allocation.handle_new_allocation(self: onegov.reservation.Resource, request: onegov.org.request.OrgRequest, form: AllocationForm, layout: onegov.org.layout.ResourceLayout | None = None) RenderData | Response [source]
Handles new allocations for differing form classes.
- org.views.allocation.handle_edit_allocation(self: onegov.reservation.Allocation, request: onegov.org.request.OrgRequest, form: AllocationEditForm, layout: onegov.org.layout.AllocationEditFormLayout | None = None) RenderData | Response [source]
Handles edit allocation for differing form classes.
- org.views.allocation.handle_delete_allocation(self: onegov.reservation.Allocation, request: onegov.org.request.OrgRequest) None [source]
Deletes the given resource (throwing an error if there are existing reservations associated with it).
- org.views.allocation.handle_allocation_rule(self: onegov.reservation.Resource, request: onegov.org.request.OrgRequest, form: onegov.org.forms.AllocationRuleForm, layout: onegov.org.layout.AllocationRulesLayout | None = None) RenderData | Response [source]
- org.views.allocation.handle_edit_rule(self: onegov.reservation.Resource, request: onegov.org.request.OrgRequest, form: onegov.org.forms.AllocationRuleForm, layout: onegov.org.layout.AllocationRulesLayout | None = None) RenderData | Response [source]
- org.views.allocation.rule_id_from_request(request: onegov.org.request.OrgRequest) str [source]
Returns the rule_id from the request params, ensuring that an actual uuid is returned.
- org.views.allocation.handle_rules_cronjob(resource: onegov.reservation.Resource, request: onegov.org.request.OrgRequest) None [source]
Handles all cronjob duties of the rules stored on the given resource.
- org.views.allocation.delete_rule(resource: onegov.reservation.Resource, rule_id: str) None [source]
Removes the given rule from the resource.