From 052cae2c2eac2d925a63ed17f220ce03f822b4a2 Mon Sep 17 00:00:00 2001 From: Patrick Toal Date: Sun, 10 Mar 2024 12:54:49 -0400 Subject: [PATCH] Update project --- src/pages/admin/TaskAdminPage.vue | 8 +++ src/stores/task.ts | 87 +++++++++++++++++++++++++++++++ 2 files changed, 95 insertions(+) create mode 100644 src/pages/admin/TaskAdminPage.vue create mode 100644 src/stores/task.ts diff --git a/src/pages/admin/TaskAdminPage.vue b/src/pages/admin/TaskAdminPage.vue new file mode 100644 index 0000000..1675e69 --- /dev/null +++ b/src/pages/admin/TaskAdminPage.vue @@ -0,0 +1,8 @@ + + + diff --git a/src/stores/task.ts b/src/stores/task.ts new file mode 100644 index 0000000..a83ae92 --- /dev/null +++ b/src/stores/task.ts @@ -0,0 +1,87 @@ +import { defineStore } from 'pinia'; + +export const useCounterStore = defineStore('counter', { + state: () => ({ + counter: 0, + }), + + getters: { + doubleCount(state) { + return state.counter * 2; + }, + }, + + actions: { + increment() { + this.counter++; + }, + }, +}); + +export interface Task { + id: number; + title: string; + description: string; + iconsrc?: string; + due: Date; + created: Date; +} + +const getSampleData = () => [ + { + id: 1, + name: 'ProjectX', + displayName: 'PX', + class: 'J/27', + year: 1981, + imgsrc: '/tmpimg/j27.png', + iconsrc: '/tmpimg/projectx_avatar256.png', + defects: [ + { + type: 'engine', + severity: 'moderate', + description: 'Fuel line leaks at engine fitting.', + detail: `The gasket in the end of the fuel hose is damaged, and does not properly seal. +This will cause fuel to leak, and will allow air into the fuel chamber, causing a lean mixture, +and rough engine performance.`, + }, + { + type: 'rigging', + severity: 'moderate', + description: 'Tiller extension is broken.', + detail: + 'The tiller extension swivel is broken, and will not attach to the tiller.', + }, + ], + }, + { + id: 2, + name: 'Take5', + displayName: 'T5', + class: 'J/27', + year: 1985, + imgsrc: '/tmpimg/j27.png', + iconsrc: '/tmpimg/take5_avatar32.png', + }, + { + id: 3, + name: 'WeeBeestie', + displayName: 'WB', + class: 'Capri 25', + year: 1989, + imgsrc: '/tmpimg/capri25.png', + }, +]; + +export const useBoatStore = defineStore('boat', { + state: () => ({ + boats: getSampleData(), + }), + + getters: {}, + + actions: { + // update () { + // } + }, +});