diff --git a/package.json b/package.json index 2e2681d..d489648 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "build": "quasar build" }, "dependencies": { - "@quasar/extras": "^1.16.4", + "@quasar/extras": "^1.16.11", "appwrite": "^13.0.0", "pinia": "^2.1.7", "vue": "3", @@ -31,7 +31,7 @@ "eslint-config-prettier": "^8.1.0", "eslint-plugin-vue": "^9.0.0", "prettier": "^2.5.1", - "quasar": "^2.14.6", + "quasar": "^2.15.2", "typescript": "^4.5.4", "workbox-build": "^7.0.0", "workbox-cacheable-response": "^7.0.0", diff --git a/quasar.config.js b/quasar.config.js index 1fe131a..d104450 100644 --- a/quasar.config.js +++ b/quasar.config.js @@ -9,6 +9,7 @@ // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js const { configure } = require('quasar/wrappers'); +const path = require('path'); module.exports = configure(function (/* ctx */) { return { diff --git a/src/boot/appwrite.ts b/src/boot/appwrite.ts index 5d326d9..4923dc3 100644 --- a/src/boot/appwrite.ts +++ b/src/boot/appwrite.ts @@ -21,6 +21,8 @@ client const AppwriteIds = { databaseId: '65ee1cbf9c2493faf15f', collectionIdTask: '65ee1cd5b550023fae4f', + collectionIdTaskTags: '65ee21d72d5c8007c34c', + collectionIdSkillTags: '66072582a74d94a4bd01', }; const account = new Account(client); diff --git a/src/components/task/NewTaskComponent.vue b/src/components/task/NewTaskComponent.vue new file mode 100644 index 0000000..abcc1b7 --- /dev/null +++ b/src/components/task/NewTaskComponent.vue @@ -0,0 +1,6 @@ + + + diff --git a/src/components/task/TaskComponent.vue b/src/components/task/TaskComponent.vue index abcc1b7..f664696 100644 --- a/src/components/task/TaskComponent.vue +++ b/src/components/task/TaskComponent.vue @@ -1,6 +1,23 @@ diff --git a/src/components/task/TaskListComponent.vue b/src/components/task/TaskListComponent.vue index 5db3271..c3d026f 100644 --- a/src/components/task/TaskListComponent.vue +++ b/src/components/task/TaskListComponent.vue @@ -1,30 +1,9 @@ @@ -32,6 +11,7 @@ diff --git a/src/components/task/TaskTableComponent.vue b/src/components/task/TaskTableComponent.vue new file mode 100644 index 0000000..dc375b7 --- /dev/null +++ b/src/components/task/TaskTableComponent.vue @@ -0,0 +1,87 @@ + + + diff --git a/src/pages/TaskPage.vue b/src/pages/TaskPage.vue index 828a23d..63795e9 100644 --- a/src/pages/TaskPage.vue +++ b/src/pages/TaskPage.vue @@ -1,15 +1,19 @@ diff --git a/src/stores/task.ts b/src/stores/task.ts index 2e5b8bb..19eaa95 100644 --- a/src/stores/task.ts +++ b/src/stores/task.ts @@ -11,9 +11,20 @@ export interface Task extends Models.Document { completed: boolean; } +export interface TaskTag extends Models.Document { + name: string; + description: string; +} +export interface SkillTag extends Models.Document { + name: string; + description: string; +} + export const useTaskStore = defineStore('tasks', { state: () => ({ tasks: [] as Task[], + taskTags: [] as TaskTag[], + skillTags: [] as SkillTag[], }), actions: { @@ -28,6 +39,30 @@ export const useTaskStore = defineStore('tasks', { console.error('Failed to fetch tasks', error); } }, + async fetchTaskTags() { + // This is fine for a small number of tags, but more than a few hundred tags, we'd need to optimize + try { + const response = await databases.listDocuments( + AppwriteIds.databaseId, + AppwriteIds.collectionIdTaskTags + ); + this.taskTags = response.documents as TaskTag[]; + } catch (error) { + console.error('Failed to fetch tasks', error); + } + }, + async fetchSkillTags() { + // This is fine for a small number of tags, but more than a few hundred tags, we'd need to optimize + try { + const response = await databases.listDocuments( + AppwriteIds.databaseId, + AppwriteIds.collectionIdSkillTags + ); + this.skillTags = response.documents as SkillTag[]; + } catch (error) { + console.error('Failed to fetch tasks', error); + } + }, async addTask(task: Task) { try { const response = await databases.createDocument( diff --git a/tsconfig.json b/tsconfig.json index ee0d9cf..bd323f0 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,4 +3,4 @@ "compilerOptions": { "baseUrl": "." } -} \ No newline at end of file +} diff --git a/yarn.lock b/yarn.lock index 641b16f..2df2c5c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1115,10 +1115,10 @@ vite "^2.9.13" webpack-merge "^5.8.0" -"@quasar/extras@^1.16.4": - version "1.16.9" - resolved "https://registry.npmjs.org/@quasar/extras/-/extras-1.16.9.tgz" - integrity sha512-SlOhwzXyPQHWgQIS2ncyDdYdksCJvUYNtgsDQqzAKEG3r3d/ejOxvThle79HTK3Q6HB+gQWFG21Ux00Osr5XSw== +"@quasar/extras@^1.16.11": + version "1.16.11" + resolved "https://registry.yarnpkg.com/@quasar/extras/-/extras-1.16.11.tgz#84b1efb9097a6e58c3ebfdd5da83ac658056a35c" + integrity sha512-sbTBHOA+Hi7ah0P6qSm+xfRXqwJ94ct3NKA3Lkq3iNPYuHD7VXbSWtP2eA7Cu9Fd0WjVoPbngf6yFGg46U3IfQ== "@quasar/quasar-app-extension-qcalendar@^4.0.0-beta.15": version "4.0.0-beta.16" @@ -4151,10 +4151,10 @@ qs@6.11.0: dependencies: side-channel "^1.0.4" -quasar@^2.14.6: - version "2.14.7" - resolved "https://registry.yarnpkg.com/quasar/-/quasar-2.14.7.tgz#dac7a16a4275f01b9c4be43948413a92fa10c801" - integrity sha512-xp4qpEmiGmXMfImWpA/WSeIHT6RojtxJDHtJcuuJCUmUknaC5UOXsd0aRtQghIQ1WCkx/Fhhg5qmyQuuDx6uEg== +quasar@^2.15.2: + version "2.15.2" + resolved "https://registry.yarnpkg.com/quasar/-/quasar-2.15.2.tgz#8c945c87d8723696614a56a17ffcc041d8a26ab6" + integrity sha512-euCm5Elo5SfGNRY18HvKAknkBwesoUAFhZ6BxmliiEVHGes53ZcUKnMwZU/XsRhwiC6VQzBBSk/U0iEcdp/NyA== queue-microtask@^1.2.2: version "1.2.3"