Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: design submission form #26

Merged
merged 23 commits into from
May 16, 2019
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions src/router.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
import Vue from "vue";
import Router, { NavigationGuard } from "vue-router";
import Router, { NavigationGuard, RawLocation } from "vue-router";
import store from "@/store";
import sessionStore from "@/store/modules/session";
import Home from "./views/Home.vue";
import Design from "./views/Design.vue";
import Designs from "./views/Designs.vue";
import InteractiveMap from "./views/InteractiveMap/InteractiveMap.vue";
import Jobs from "./views/Jobs/Jobs.vue";
import JobDetails from "./views/Jobs/JobDetails.vue";
import Maps from "./views/Maps.vue";
import Models from "./views/Models.vue";
import Projects from "./views/Projects.vue";
import NotFound from "./views/NotFound.vue";
import PrivacyPolicy from "./views/PrivacyPolicy.vue";
import TermsOfService from "./views/TermsOfService.vue";
import NotFound from "./views/NotFound.vue";

// FIXME (Moritz Beber): In future we would like to import this from vue-router.
Midnighter marked this conversation as resolved.
Show resolved Hide resolved
// See https://github.com/vuejs/vue-router/issues/2758
export type NextHandler = (to?: RawLocation | false | Function | void) => void;

Vue.use(Router);

Expand All @@ -38,6 +43,12 @@ export default new Router({
name: "home",
component: Home
},
{
path: "/design",
name: "design",
component: Design,
beforeEnter: authGuard
},
{
path: "/designs",
name: "designs",
Expand Down
4 changes: 4 additions & 0 deletions src/store/modules/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ export interface ModelItem {
model_serialized?: object;
}

export const organism2ModelMapping = {
Midnighter marked this conversation as resolved.
Show resolved Hide resolved
"2": 10
};

export default {
namespaced: true,
state: {
Expand Down
3 changes: 3 additions & 0 deletions src/types/forms.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Vuetify does not seem to export types for form rules.
export type RuleOutcome = string | true;
export type RuleHandler = (any) => RuleOutcome;
Loading