Verified Commit b7f0931d authored by Jakob Moser's avatar Jakob Moser
Browse files

Prefetch agenda, latest protocol and lunch menu (closes #33)

parent 8a5f1f3c
Loading
Loading
Loading
Loading
Loading
+4 −1
Changes for portal/static/js/components/pages/Fachschaftssitzung.mjs: 4 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -19,10 +19,13 @@ export const Fachschaftssitzung = {
    oncreate() {
        document.title = "Fachschaftssitzung · FS Coli Portal"
    },
    async oninit() {
    fetch() {
        agenda.fetch()
        latestProtocol.fetch()
    },
    oninit() {
        this.fetch()
    },
    view() {
        return m(Base, [
            m(Agenda, agenda),
+4 −1
Changes for portal/static/js/components/pages/UniServices.mjs: 4 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -45,9 +45,12 @@ export const UniServices = {
    oncreate() {
        document.title = "Uni-Dienste · FS Coli Portal"
    },
    oninit() {
    fetch() {
        lunchMenu.fetch()
    },
    oninit() {
        this.fetch()
    },
    view() {
        return m(
            Base,
+4 −0
Changes for portal/static/js/portal.mjs: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -26,3 +26,7 @@ m.route(document.body, "/", {
    "/login": Login,
    "/me": Me,
})

// Prefetching, relevant as soon as the user opens that page
Fachschaftssitzung.fetch()
UniServices.fetch()