diff --git a/app/src/plugins/app/_config/router.ts b/app/src/plugins/app/_config/router.ts index d00d9ad..c15b13f 100644 --- a/app/src/plugins/app/_config/router.ts +++ b/app/src/plugins/app/_config/router.ts @@ -52,18 +52,24 @@ const routes: Array = [ path: '/app/dashboard', redirect: '/app/dashboard/tasks', children: [ - { - path: '/app/dashboard/tasks', - name: 'Dashboard - Tasks', - meta: { title: 'Sub Tasks', requiresAuth: true }, - component: () => import('@/plugins/tm@dashboard/tasks/tasks.vue') - }, - { - path: '/app/dashboard/teams', - name: 'Dashboard - Teams', - meta: { title: 'Teams Overview', requiresAuth: true }, - component: () => import('@/plugins/tm@dashboard/teams/teams.vue') - }, + { + path: '/app/dashboard/tasks', + name: 'Dashboard - Tasks', + meta: { title: 'Sub Tasks', requiresAuth: true }, + component: () => import('@/plugins/tm@dashboard/tasks/tasks.vue') + }, + { + path: '/app/dashboard/tasks-concepts', + name: 'Dashboard - Tasks Concepts', + meta: { title: 'Draft Tasks', requiresAuth: true }, + component: () => import('@/plugins/tm@dashboard/tasks-concepts/tasks-concepts.vue') + }, + { + path: '/app/dashboard/teams', + name: 'Dashboard - Teams', + meta: { title: 'Teams Overview', requiresAuth: true }, + component: () => import('@/plugins/tm@dashboard/teams/teams.vue') + }, { path: '/app/dashboard/projects', name: 'Dashboard - Projects', diff --git a/app/src/plugins/app/_layout/app/_components/a-sidemenu.vue b/app/src/plugins/app/_layout/app/_components/a-sidemenu.vue index 9d5ada5..1142cea 100644 --- a/app/src/plugins/app/_layout/app/_components/a-sidemenu.vue +++ b/app/src/plugins/app/_layout/app/_components/a-sidemenu.vue @@ -14,8 +14,8 @@ :key="page.pageName" :class="{ active: isActive(page.pageName) }" @click="$router.push({ name: page.pageName }); closeMenu()"> {{ page.title }} - {{ unscheduledSubtasks?.length }} @@ -33,6 +33,10 @@ export default { title: 'Sub Tasks', pageName: 'Dashboard - Tasks' }, + { + title: 'Sub Tasks Concepts', + pageName: 'Dashboard - Tasks Concepts' + }, { title: 'Teams overview', pageName: 'Dashboard - Teams' diff --git a/app/src/plugins/tm@dashboard/tasks-concepts/_components/a-concepts-table.vue b/app/src/plugins/tm@dashboard/tasks-concepts/_components/a-concepts-table.vue new file mode 100644 index 0000000..feff88e --- /dev/null +++ b/app/src/plugins/tm@dashboard/tasks-concepts/_components/a-concepts-table.vue @@ -0,0 +1,179 @@ + + + + + + diff --git a/app/src/plugins/tm@dashboard/tasks-concepts/tasks-concepts.vue b/app/src/plugins/tm@dashboard/tasks-concepts/tasks-concepts.vue new file mode 100644 index 0000000..a193470 --- /dev/null +++ b/app/src/plugins/tm@dashboard/tasks-concepts/tasks-concepts.vue @@ -0,0 +1,164 @@ + + + diff --git a/app/src/plugins/tm@modal/task/z-task-modal.vue b/app/src/plugins/tm@modal/task/z-task-modal.vue index 12af670..d824f0d 100644 --- a/app/src/plugins/tm@modal/task/z-task-modal.vue +++ b/app/src/plugins/tm@modal/task/z-task-modal.vue @@ -273,12 +273,18 @@ /> - {{ + {{ subtask.id ? 'UPRAVIŤ' : 'VYTVORIŤ' }} - {{ - $t('Ukladám...') - }} + + @@ -699,7 +705,7 @@ export default { } }, - async save() { + async save(concept = false) { this.wasFormValidationTriggered = true; if (!(await this.validateAllFields())) return; @@ -731,9 +737,14 @@ export default { }; }); + const payload = { ...this.subtask, timesheets, timeblocks }; + if (concept) { + payload.concept = true; + } + const { subtask } = await this.$axios.patch_auth_form( `v1/subtasks/${this.subtask.id}`, - { ...this.subtask, timesheets, timeblocks }, + payload, ); localStorage.removeItem('subtaskData'); @@ -765,6 +776,9 @@ export default { ...this.subtask, employees: validEmployees, }; + if (concept) { + subtaskCopy.concept = true; + } delete subtaskCopy._master_task; const { subtasks } = await this.$axios.post_auth( `v1/mastertasks/${this.subtask.master_task_id}/subtasks`,