[Refactoring] Architecture

This commit is contained in:
Matej Glasnák committed 2022-11-22 16:29:47 +01:00
1 parent 9af01fc34b
commit b374a85eac
34 files changed
+100 -48

No files matched your search

+26 -10
View File
@@ -43,22 +43,38 @@ const routes: Array<RouteRecordRaw> = [
redirect: '/app/dashboard/tasks',
children: [
{
path: '/app/dashboard/tasks',
name: 'Tasks',
component: () => import('@/plugins/tm@dashboard/tasks-overview/tasks-overview.vue')
path: '/app/dashboard/tasks',
name: 'Dashboard - Tasks',
component: () => import('@/plugins/tm@dashboard/tasks/tasks.vue')
},
{
path: '/app/dashboard/unscheduled-tasks',
name: 'Unscheduled tasks',
component: () => import('@/plugins/tm@dashboard/unscheduled-tasks-overview/unscheduled-tasks.vue')
path: '/app/dashboard/teams',
name: 'Dashboard - Teams',
component: () => import('@/plugins/tm@dashboard/teams/teams.vue')
},
{
path: '/app/dashboard/ongoing-tasks',
name: 'Ongoing tasks',
component: () => import('@/plugins/tm@dashboard/ongoing-tasks-overview/ongoing-tasks.vue')
path: '/app/dashboard/projects',
name: 'Dashboard - Projects',
component: () => import('@/plugins/tm@dashboard/projects/projects.vue')
},
{
path: '/app/overview/unscheduled',
name: 'Overview - Unscheduled tasks',
component: () => import('@/plugins/tm@overview/tasks-ongoing/tasks-ongoing.vue')
},
{
path: '/app/overview/ongoing',
name: 'Overview - Ongoing tasks',
component: () => import('@/plugins/tm@overview/tasks-unscheduled/tasks-unscheduled.vue')
},
{
path: '/app/overview/teams',
name: 'Overview - Teams',
component: () => import('@/plugins/tm@overview/teams/teams.vue')
}
]
},
}
]
}
]
@@ -4,29 +4,9 @@
<img class="logo" :src="require('@/plugins/app/_layout/_img/jandl-logo.svg')" alt="jandl-logo" />
<ion-list lines="none" id="labels-list">
<ion-item @click=" $router.push({ name: 'Tasks' }); closeMenu();" :class="active('/app/dashboard/tasks') ? 'active' : 'unactive'">
Úlohy
</ion-item>
<ion-item disabled>
Tímove zobrazenie
</ion-item>
<ion-item disabled>
Projektové zobrazenie
</ion-item>
<ion-item @click=" $router.push({ name: 'Unscheduled tasks' }); closeMenu();" :class=" active('/app/dashboard/unscheduled-tasks') ? 'active' : 'unactive'" >
Nenaplánované úlohy
<span class="badge">13</span>
</ion-item>
<ion-item @click="$router.push({ name: 'Ongoing tasks' }); closeMenu();" :class="active('/app/dashboard/ongoing-tasks') ? 'active' : 'unactive'">
Ongoing tasky
</ion-item>
<ion-item disabled>
Tímy
<ion-item v-for="page in pages" :key="page.pageName" :class="{active: isActive(page.pageName)}"
@click="$router.push({name: page.pageName})">
{{ page.title }}
</ion-item>
</ion-list>
</ion-content>
@@ -35,14 +15,43 @@
<script>
export default {
data() {
return {
pages: [{
title: 'Úlohy',
pageName: 'Dashboard - Tasks'
},
{
title: 'Tímove zobrazenie',
pageName: 'Dashboard - Teams'
},
{
title: 'Projektové zobrazenie',
pageName: 'Dashboard - Projects'
},
{
title: 'Nenaplánované úlohy',
pageName: 'Overview - Unscheduled tasks'
},
{
title: 'Ongoing tasky',
pageName: 'Overview - Ongoing tasks'
},
{
title: 'Tímy',
pageName: 'Overview - Teams'
}]
}
},
created() {
this.eventBus.on('close-menu', () => this.closeMenu())
this.eventBus.on('toggle-menu', () => this.toggleMenu())
},
methods: {
active(path) {
return this.$route.path == path
isActive(pageName) {
return this.$route.name == pageName
},
closeMenu() {
@@ -42,7 +42,7 @@ export default {
try {
await this.$axios.post_data('v1/auth/login', this.form)
this.$router.push({ name: 'Ongoing tasks'})
this.$router.push({ name: 'Overview - Ongoing tasks'})
} catch (error) {
this.$toast.error(error.data.error)
}
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
@@ -0,0 +1,9 @@
<template>
<div></div>
</template>
<script>
export default {
}
</script>
@@ -8,7 +8,7 @@
variant="outlined"
></v-select>
<div class="d-flex date-wrapper">
<v-btn class="subheader-icon-button " variant="outlined"><img :src="require('./assets/icon-prev.svg')" alt=""></v-btn>
<v-btn class="subheader-icon-button " variant="outlined"><img :src="require('./_img/icon-prev.svg')" alt=""></v-btn>
<v-text-field
class="subheader-input disabled"
:items="items"
@@ -17,7 +17,7 @@
variant="outlined"
append-inner-icon="mdi-calendar-blank-outline"
></v-text-field>
<v-btn class="subheader-icon-button " variant="outlined"><img :src="require('./assets/icon-next.svg')" alt=""></v-btn>
<v-btn class="subheader-icon-button " variant="outlined"><img :src="require('./_img/icon-next.svg')" alt=""></v-btn>
</div>
<v-text-field
class="subheader-input"
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
@@ -0,0 +1,9 @@
<template>
<div></div>
</template>
<script>
export default {
}
</script>
@@ -18,8 +18,8 @@
<td>{{ (task.remaining_time / 1000 / 60 / 60).toFixed(2) }} h</td>
<td class="task-action">
<div class="d-flex justify-start">
<img class="pencil-icon" :src="require('@/plugins/tm@dashboard/_img/pencil-icon.svg')" alt="pencil-icon" />
<img class="trash-icon" :src="require('@/plugins/tm@dashboard/_img/trash-icon.svg')" alt="trash-icon" />
<img class="pencil-icon" :src="require('@/plugins/tm@overview/_img/pencil-icon.svg')" alt="pencil-icon" />
<img class="trash-icon" :src="require('@/plugins/tm@overview/_img/trash-icon.svg')" alt="trash-icon" />
</div>
</td>
</tr>
@@ -1,15 +1,15 @@
<template>
<W-loadable :content="ongoingTasks">
<A-ongoing-tasks :tasks="ongoingTasks" />
<A-ongoing-table :tasks="ongoingTasks" />
</W-loadable>
</template>
<script>
import AOngoingTasks from './_components/a-ongoing-tasks-overview.vue'
import AOngoingTable from './_components/a-ongoing-table.vue'
export default {
components: {
AOngoingTasks
AOngoingTable
},
data() {
@@ -16,8 +16,8 @@
<td>{{ task.duration / 1000 / 60 / 60 }} h</td>
<td class="task-action">
<div class="d-flex justify-start">
<img class="pencil-icon" :src="require('@/plugins/tm@dashboard/_img/pencil-icon.svg')" alt="pencil-icon">
<img class="trash-icon" :src="require('@/plugins/tm@dashboard/_img/trash-icon.svg')" alt="trash-icon">
<img class="pencil-icon" :src="require('@/plugins/tm@overview/_img/pencil-icon.svg')" alt="pencil-icon">
<img class="trash-icon" :src="require('@/plugins/tm@overview/_img/trash-icon.svg')" alt="trash-icon">
</div>
</td>
</tr>
@@ -1,15 +1,15 @@
<template>
<W-loadable :content="unscheduledTasks">
<A-unscheduled-tasks-table :tasks="unscheduledTasks" />
<A-unscheduled-table :tasks="unscheduledTasks" />
</W-loadable>
</template>
<script>
import AUnscheduledTasksTable from './_components/a-unscheduled-tasks-table.vue'
import AUnscheduledTable from './_components/a-unscheduled-table.vue'
export default {
components: {
AUnscheduledTasksTable
AUnscheduledTable
},
data() {
@@ -0,0 +1,9 @@
<template>
<div></div>
</template>
<script>
export default {
}
</script>