Skip to content

Commit

Permalink
Merge pull request #26 from DD-DeCaF/feat-design
Browse files Browse the repository at this point in the history
feat: design submission form
  • Loading branch information
Midnighter committed May 16, 2019
2 parents 0a6e918 + 5c976e0 commit f5c61e8
Show file tree
Hide file tree
Showing 4 changed files with 394 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/router.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
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";

Vue.use(Router);

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

// TODO (Moritz Beber): This mapping needs to be expanded to all organisms.
// See https://github.com/DD-DeCaF/caffeine-vue/issues/41
export const organism2ModelMapping = {
"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;

0 comments on commit f5c61e8

Please sign in to comment.