Skip to content
Snippets Groups Projects
Commit 673d78f7 authored by Hangzhi Yu's avatar Hangzhi Yu
Browse files

Add SPA support

parent 6d73c04e
No related branches found
No related tags found
1 merge request!21Resolve "Adapt for SPA operation"
Pipeline #109905 failed
......@@ -9,6 +9,11 @@ and this project adheres to `Semantic Versioning`_.
Unreleased
----------
Added
~~~~~
* Support for usage with new AlekSIS SPA.
`1.0.2`_ - 2022-11-04
---------------------
......
export default
{
meta: {
inMenu: true,
titleKey: "stoelindeling.menu_title",
icon: "mdi-view-list-outline",
},
props: {
byTheGreatnessOfTheAlmightyAleksolotlISwearIAmWorthyOfUsingTheLegacyBaseTemplate: true,
},
children: [
{
path: "seating_plans/",
component: () => import("aleksis.core/components/LegacyBaseTemplate.vue"),
name: "stoelindeling.seatingPlans",
meta: {
inMenu: true,
titleKey: "stoelindeling.menu_title",
icon: "mdi-view-list-outline",
permission: "stoelindeling.view_seatingplans_rule",
},
props: {
byTheGreatnessOfTheAlmightyAleksolotlISwearIAmWorthyOfUsingTheLegacyBaseTemplate: true,
},
},
{
path: "seating_plans/create/",
component: () => import("aleksis.core/components/LegacyBaseTemplate.vue"),
name: "stoelindeling.createSeatingPlan",
props: {
byTheGreatnessOfTheAlmightyAleksolotlISwearIAmWorthyOfUsingTheLegacyBaseTemplate: true,
},
},
{
path: "seating_plans/:pk/",
component: () => import("aleksis.core/components/LegacyBaseTemplate.vue"),
name: "stoelindeling.seatingPlan",
props: {
byTheGreatnessOfTheAlmightyAleksolotlISwearIAmWorthyOfUsingTheLegacyBaseTemplate: true,
},
},
{
path: "seating_plans/:pk/edit/",
component: () => import("aleksis.core/components/LegacyBaseTemplate.vue"),
name: "stoelindeling.editSeatingPlan",
props: {
byTheGreatnessOfTheAlmightyAleksolotlISwearIAmWorthyOfUsingTheLegacyBaseTemplate: true,
},
},
{
path: "seating_plans/:pk/copy/",
component: () => import("aleksis.core/components/LegacyBaseTemplate.vue"),
name: "stoelindeling.copySeatingPlan",
props: {
byTheGreatnessOfTheAlmightyAleksolotlISwearIAmWorthyOfUsingTheLegacyBaseTemplate: true,
},
},
{
path: "seating_plans/:pk/delete/",
component: () => import("aleksis.core/components/LegacyBaseTemplate.vue"),
name: "stoelindeling.deleteSeatingPlan",
props: {
byTheGreatnessOfTheAlmightyAleksolotlISwearIAmWorthyOfUsingTheLegacyBaseTemplate: true,
},
},
],
}
{
"stoelindeling": {
"menu_title": "Sitzpläne"
}
}
{
"stoelindeling": {
"menu_title": "Seating plans"
}
}
......@@ -10,6 +10,7 @@ from django_tables2 import SingleTableView
from reversion.views import RevisionMixin
from rules.contrib.views import PermissionRequiredMixin
from aleksis.core.decorators import pwa_cache
from aleksis.core.mixins import (
AdvancedCreateView,
AdvancedDeleteView,
......@@ -24,6 +25,7 @@ from .tables import SeatingPlanTable
from .util.perms import get_allowed_seating_plans
@method_decorator(pwa_cache, name="dispatch")
class SeatingPlanListView(PermissionRequiredMixin, SingleTableView):
"""Table of all seating plans."""
......@@ -36,6 +38,7 @@ class SeatingPlanListView(PermissionRequiredMixin, SingleTableView):
return get_allowed_seating_plans(self.request.user)
@method_decorator(pwa_cache, name="dispatch")
class SeatingPlanDetailView(PermissionRequiredMixin, DetailView):
"""Detail view for seating plans."""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment