diff --git a/front/package-lock.json b/front/package-lock.json index 998fdc3..fbf1df6 100644 --- a/front/package-lock.json +++ b/front/package-lock.json @@ -11,6 +11,7 @@ "@fireworks-js/vue": "^2.10.7", "@vueuse/components": "^10.9.0", "@vueuse/core": "^10.9.0", + "pathfinding": "^0.4.18", "pinia": "^2.1.7", "reset-css": "^5.0.2", "vue": "^3.4.21", @@ -1420,6 +1421,11 @@ "he": "bin/he" } }, + "node_modules/heap": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/heap/-/heap-0.2.5.tgz", + "integrity": "sha512-G7HLD+WKcrOyJP5VQwYZNC3Z6FcQ7YYjEFiFoIj8PfEr73mu421o8B1N5DKUcc8K37EsJ2XXWA8DtrDz/2dReg==" + }, "node_modules/human-signals": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", @@ -1759,6 +1765,14 @@ "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==", "dev": true }, + "node_modules/pathfinding": { + "version": "0.4.18", + "resolved": "https://registry.npmjs.org/pathfinding/-/pathfinding-0.4.18.tgz", + "integrity": "sha512-R0TGEQ9GRcFCDvAWlJAWC+KGJ9SLbW4c0nuZRcioVlXVTlw+F5RvXQ8SQgSqI9KXWC1ew95vgmIiyaWTlCe9Ag==", + "dependencies": { + "heap": "0.2.5" + } + }, "node_modules/picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", diff --git a/front/package.json b/front/package.json index 69091f5..025d7f5 100644 --- a/front/package.json +++ b/front/package.json @@ -12,6 +12,7 @@ "@fireworks-js/vue": "^2.10.7", "@vueuse/components": "^10.9.0", "@vueuse/core": "^10.9.0", + "pathfinding": "^0.4.18", "pinia": "^2.1.7", "reset-css": "^5.0.2", "vue": "^3.4.21", diff --git a/front/src/components/Floorplan.vue b/front/src/components/Floorplan.vue index b2e2083..6572887 100644 --- a/front/src/components/Floorplan.vue +++ b/front/src/components/Floorplan.vue @@ -1,17 +1,92 @@ - + \ No newline at end of file diff --git a/front/src/stores/floorplan.ts b/front/src/stores/floorplan.ts index a59e6c6..eae29f3 100644 --- a/front/src/stores/floorplan.ts +++ b/front/src/stores/floorplan.ts @@ -4,7 +4,8 @@ import { SERVER_URL } from '../constants' export const useFloorplanStore = defineStore('floorplan', { state: () => { return { - // for initially empty lists + title: undefined, + np_array: [] as number[][] } }, actions: { @@ -12,22 +13,11 @@ export const useFloorplanStore = defineStore('floorplan', { try { const res = await fetch(`${SERVER_URL}/api/floorplan`) const data = await res.json() - if (data.length) { - // this.list = data - } + this.title = data.title + this.np_array = data.np_field } catch (error) { // this.list = [] } }, } -}) - -export interface ProductInfo { - id: number - title: string - description: string - model3d?: string - image1?: string - image2?: string - image3?: string -} \ No newline at end of file +}) \ No newline at end of file