diff --git a/ts/components/HeaderDistrict.vue b/ts/components/HeaderDistrict.vue new file mode 100644 index 00000000..99b02bca --- /dev/null +++ b/ts/components/HeaderDistrict.vue @@ -0,0 +1,45 @@ + + + diff --git a/ts/rmo/components/Header.vue b/ts/rmo/components/Header.vue new file mode 100644 index 00000000..29fadfaa --- /dev/null +++ b/ts/rmo/components/Header.vue @@ -0,0 +1,7 @@ + diff --git a/ts/rmo/content/Home.vue b/ts/rmo/content/Home.vue index 6ef00eb9..14bace12 100644 --- a/ts/rmo/content/Home.vue +++ b/ts/rmo/content/Home.vue @@ -5,7 +5,6 @@ } - + diff --git a/ts/rmo/content/Nuisance.vue b/ts/rmo/content/Nuisance.vue new file mode 100644 index 00000000..1ffcc961 --- /dev/null +++ b/ts/rmo/content/Nuisance.vue @@ -0,0 +1,417 @@ + + + + + diff --git a/ts/rmo/content/Status.vue b/ts/rmo/content/Status.vue new file mode 100644 index 00000000..4d8c14e4 --- /dev/null +++ b/ts/rmo/content/Status.vue @@ -0,0 +1,116 @@ + diff --git a/ts/rmo/content/Water.vue b/ts/rmo/content/Water.vue new file mode 100644 index 00000000..b2e56094 --- /dev/null +++ b/ts/rmo/content/Water.vue @@ -0,0 +1,528 @@ + + + + diff --git a/ts/rmo/router.ts b/ts/rmo/router.ts index 2e2e83b9..85cf4b80 100644 --- a/ts/rmo/router.ts +++ b/ts/rmo/router.ts @@ -3,9 +3,11 @@ import type { RouteRecordRaw } from "vue-router"; import HomeBase from "@/rmo/view/Home.vue"; import HomeDistrict from "@/rmo/view/district/Home.vue"; import NuisanceBase from "@/rmo/view/Nuisance.vue"; -//import * as NuisanceDistrict from "@/rmo/view/district/Nuisance.vue"; -import Status from "@/rmo/view/Status.vue"; +import NuisanceDistrict from "@/rmo/view/district/Nuisance.vue"; +import StatusBase from "@/rmo/view/Status.vue"; +import StatusDistrict from "@/rmo/view/district/Status.vue"; import Water from "@/rmo/view/Water.vue"; +import WaterDistrict from "@/rmo/view/district/Water.vue"; const routes: RouteRecordRaw[] = [ { path: "/", @@ -23,16 +25,28 @@ const routes: RouteRecordRaw[] = [ component: HomeDistrict, props: true, }, - /*{ - path: "/district/{slug}/nuisance", + { + path: "/district/:slug/nuisance", name: "NuisanceDistrict", component: NuisanceDistrict, props: true, - },*/ + }, + { + path: "/district/:slug/status", + name: "StatusDistrict", + component: StatusDistrict, + props: true, + }, + { + path: "/district/:slug/water", + name: "WaterDistrict", + component: WaterDistrict, + props: true, + }, { path: "/status", - name: "Status", - component: Status, + name: "StatusBase", + component: StatusBase, }, { path: "/water", diff --git a/ts/rmo/view/Home.vue b/ts/rmo/view/Home.vue index 16401084..42a5d43f 100644 --- a/ts/rmo/view/Home.vue +++ b/ts/rmo/view/Home.vue @@ -1,15 +1,12 @@ diff --git a/ts/rmo/view/Nuisance.vue b/ts/rmo/view/Nuisance.vue index 3cce11cc..2a3e641e 100644 --- a/ts/rmo/view/Nuisance.vue +++ b/ts/rmo/view/Nuisance.vue @@ -1,409 +1,12 @@ - - diff --git a/ts/rmo/view/Status.vue b/ts/rmo/view/Status.vue index 4d8c14e4..dd043db5 100644 --- a/ts/rmo/view/Status.vue +++ b/ts/rmo/view/Status.vue @@ -1,116 +1,12 @@ + + diff --git a/ts/rmo/view/Water.vue b/ts/rmo/view/Water.vue index a993f148..df0e921c 100644 --- a/ts/rmo/view/Water.vue +++ b/ts/rmo/view/Water.vue @@ -1,527 +1,12 @@ - diff --git a/ts/rmo/view/district/Home.vue b/ts/rmo/view/district/Home.vue index 89ee7261..ad0fa0e3 100644 --- a/ts/rmo/view/district/Home.vue +++ b/ts/rmo/view/district/Home.vue @@ -8,36 +8,10 @@ } @@ -48,6 +22,7 @@ import { computedAsync } from "@vueuse/core"; import Home from "@/rmo/content/Home.vue"; import type { District } from "@/rmo/type"; import { useDistrictStore } from "@/rmo/store/district"; +import HeaderDistrict from "@/components/HeaderDistrict.vue"; interface Props { slug: string; @@ -55,10 +30,8 @@ interface Props { const props = defineProps(); const districtStore = useDistrictStore(); -const district = computedAsync(async (): Promise => { +const district = computedAsync(async (): Promise => { const districts = await districtStore.get(); - return ( - districts.find((district: District) => district.slug == props.slug) || null - ); + return districts.find((district: District) => district.slug == props.slug); }); diff --git a/ts/rmo/view/district/Nuisance.vue b/ts/rmo/view/district/Nuisance.vue new file mode 100644 index 00000000..f1fa8a52 --- /dev/null +++ b/ts/rmo/view/district/Nuisance.vue @@ -0,0 +1,29 @@ + + + + diff --git a/ts/rmo/view/district/Status.vue b/ts/rmo/view/district/Status.vue new file mode 100644 index 00000000..c972e81a --- /dev/null +++ b/ts/rmo/view/district/Status.vue @@ -0,0 +1,29 @@ + + + + diff --git a/ts/rmo/view/district/Water.vue b/ts/rmo/view/district/Water.vue new file mode 100644 index 00000000..4cf72227 --- /dev/null +++ b/ts/rmo/view/district/Water.vue @@ -0,0 +1,29 @@ + + + +