Skip to content
Snippets Groups Projects
Verified Commit c06cd38d authored by permcu's avatar permcu Committed by Jonathan Weth
Browse files

Implement default value for date-url-parameter

parent e02ba29e
No related branches found
No related tags found
1 merge request!373Resolve "Substitutions table for new data model"
import { hasPersonValidator } from "aleksis.core/routeValidators";
import Timetable from "./components/Timetable.vue";
import Substitutions from "./components/Substitutions.vue";
import { DateTime } from "luxon";
export default {
meta: {
......@@ -61,9 +62,18 @@ export default {
},
},
{
path: "substitutions/:date/",
path: "substitutions/",
props: true,
component: Substitutions,
name: "chronos.listSubstitutionsForDate",
name: "chronos.listSubstitutionsForDateLanding",
redirect: () => {
return {
name: "chronos.listSubstitutionsForDate",
params: {
date: DateTime.now().toISODate(),
},
};
},
meta: {
inMenu: true,
titleKey: "chronos.substitutions.menu_title",
......@@ -72,6 +82,18 @@ export default {
permission: "chronos.view_substitutions_rule",
fullWidth: true,
},
children: [
{
path: ":date/",
component: Substitutions,
name: "chronos.listSubstitutionsForDate",
meta: {
toolbarTitle: "chronos.substitutions.menu_title",
permission: "chronos.view_substitutions_rule",
fullWidth: true,
},
},
],
},
],
};
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