From ddfc5fc38b528551af14f52f1ce7b1b81a4e7900 Mon Sep 17 00:00:00 2001 From: mnenie <121057011+mneniee@users.noreply.github.com> Date: Fri, 12 Jul 2024 22:59:42 +0300 Subject: [PATCH] add: templates, fix: bugs, refactoring --- package.json | 3 +- src/app/providers/router/index.ts | 3 - src/app/styles/mixins/transition.scss | 2 +- src/app/styles/primary/exceptions.scss | 5 ++ src/entities/chart/ui/ChartItem.vue | 3 +- src/entities/template/config/index.ts | 32 +++++++ src/entities/template/index.ts | 2 + src/entities/template/model/index.ts | 1 + src/entities/template/model/types.ts | 9 ++ src/entities/template/ui/TemplateItem.vue | 88 +++++++++++++++++++ src/entities/template/ui/index.ts | 3 + .../boards/add-board/ui/CreationBoard.vue | 2 +- .../boards/charts/ui/ActivityBoardChart.vue | 3 + .../members/leave-team/ui/LeaveButton.vue | 13 ++- src/pages/Boards.vue | 2 +- src/pages/Login.vue | 2 +- src/pages/Registration.vue | 2 +- src/pages/Templates.vue | 28 +++++- src/pages/members/MembersOverview.vue | 2 +- .../boards/ui/Activity\320\241harts.vue" | 2 +- src/widgets/templates/index.ts | 1 + src/widgets/templates/ui/AllTemplates.vue | 18 ++++ src/widgets/templates/ui/index.ts | 3 + 23 files changed, 215 insertions(+), 14 deletions(-) create mode 100644 src/entities/template/config/index.ts create mode 100644 src/entities/template/index.ts create mode 100644 src/entities/template/model/index.ts create mode 100644 src/entities/template/model/types.ts create mode 100644 src/entities/template/ui/TemplateItem.vue create mode 100644 src/entities/template/ui/index.ts create mode 100644 src/widgets/templates/index.ts create mode 100644 src/widgets/templates/ui/AllTemplates.vue create mode 100644 src/widgets/templates/ui/index.ts diff --git a/package.json b/package.json index 6001170..f3e719f 100644 --- a/package.json +++ b/package.json @@ -75,5 +75,6 @@ "vite-plugin-vue-devtools": "^7.3.1", "vitest": "^1.6.0", "vue-tsc": "^2.0.21" - } + }, + "packageManager": "yarn@1.22.19+sha1.4ba7fc5c6e704fce2066ecbfb0b0d8976fe62447" } diff --git a/src/app/providers/router/index.ts b/src/app/providers/router/index.ts index ea9c0ff..2d1dfe7 100644 --- a/src/app/providers/router/index.ts +++ b/src/app/providers/router/index.ts @@ -81,7 +81,4 @@ export const router = createRouter({ router.beforeEach((to, from) => { // TODO(@mnenie): Add guards logic // Needs to add guard auth logic in router - if (to.meta.requiresAuth === true) { - return router.push({ name: RouteNames.login }); - } }); diff --git a/src/app/styles/mixins/transition.scss b/src/app/styles/mixins/transition.scss index a98ffed..f8d1010 100644 --- a/src/app/styles/mixins/transition.scss +++ b/src/app/styles/mixins/transition.scss @@ -1,5 +1,5 @@ @mixin transition { - transition-property: color, background-color, text-decoration-color, fill, stroke, opacity; + transition-property: color, background-color, text-decoration-color, border-color, fill, stroke, opacity; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; } diff --git a/src/app/styles/primary/exceptions.scss b/src/app/styles/primary/exceptions.scss index 8550482..1a90d27 100644 --- a/src/app/styles/primary/exceptions.scss +++ b/src/app/styles/primary/exceptions.scss @@ -24,3 +24,8 @@ a { .v-popper__arrow-container{ display: none !important; } + +canvas{ + width: 100% !important; + height: 100% !important; +} diff --git a/src/entities/chart/ui/ChartItem.vue b/src/entities/chart/ui/ChartItem.vue index 4a47ba4..8f7e787 100644 --- a/src/entities/chart/ui/ChartItem.vue +++ b/src/entities/chart/ui/ChartItem.vue @@ -22,10 +22,11 @@ defineProps<{ .chart_container { display: flex; flex-direction: column; + width: 100%; } .chart { - width: 760px; + width: 100%; height: 100%; margin-top: 20px; } diff --git a/src/entities/template/config/index.ts b/src/entities/template/config/index.ts new file mode 100644 index 0000000..724b87e --- /dev/null +++ b/src/entities/template/config/index.ts @@ -0,0 +1,32 @@ +import { reactive } from 'vue'; +import type { Template } from '../model'; + +export const templates = reactive([ + { + id: '0', + title: 'Base Kanban', + img: 'https://storage.weeek.net/templates/tm/development-and-product/scrum.png', + tag: 'Recommended', + description: `Create a basic project with "Base Kanban" template`, + date: 'June 12, 2024', + user: 'https://avatars.githubusercontent.com/u/121057011?v=4' + }, + { + id: '1', + title: 'Roadmap', + img: 'https://storage.weeek.net/templates/tm/development-and-product/roadmap.png', + tag: 'New', + description: `Create a project based on our "Roadmap" template`, + date: 'June 12, 2024', + user: 'https://avatars.githubusercontent.com/u/121057011?v=4' + }, + { + id: '2', + title: 'Web Development', + img: 'https://storage.weeek.net/templates/tm/development-and-product/web-development.png', + tag: 'New', + description: `Create a basic project with "Web Development" template`, + date: 'June 12, 2024', + user: 'https://avatars.githubusercontent.com/u/121057011?v=4' + } +]); diff --git a/src/entities/template/index.ts b/src/entities/template/index.ts new file mode 100644 index 0000000..e05e29e --- /dev/null +++ b/src/entities/template/index.ts @@ -0,0 +1,2 @@ +export * from './ui'; +export * from './config'; diff --git a/src/entities/template/model/index.ts b/src/entities/template/model/index.ts new file mode 100644 index 0000000..fcb073f --- /dev/null +++ b/src/entities/template/model/index.ts @@ -0,0 +1 @@ +export * from './types'; diff --git a/src/entities/template/model/types.ts b/src/entities/template/model/types.ts new file mode 100644 index 0000000..b15f9a2 --- /dev/null +++ b/src/entities/template/model/types.ts @@ -0,0 +1,9 @@ +export interface Template { + id: string; + img: string; + title: string; + tag: string; + description: string; + date: string; + user: string; +} diff --git a/src/entities/template/ui/TemplateItem.vue b/src/entities/template/ui/TemplateItem.vue new file mode 100644 index 0000000..c9b559f --- /dev/null +++ b/src/entities/template/ui/TemplateItem.vue @@ -0,0 +1,88 @@ + + + + + diff --git a/src/entities/template/ui/index.ts b/src/entities/template/ui/index.ts new file mode 100644 index 0000000..3433fc1 --- /dev/null +++ b/src/entities/template/ui/index.ts @@ -0,0 +1,3 @@ +import TemplateItem from './TemplateItem.vue'; + +export { TemplateItem }; diff --git a/src/features/boards/add-board/ui/CreationBoard.vue b/src/features/boards/add-board/ui/CreationBoard.vue index de0cfb1..7f59ba9 100644 --- a/src/features/boards/add-board/ui/CreationBoard.vue +++ b/src/features/boards/add-board/ui/CreationBoard.vue @@ -15,7 +15,7 @@ const open = () => {