diff --git a/app/public/mock/v1/auth/info.GET.json b/app/public/mock/v1/auth/info.GET.json index cfbcd2d..d40d39a 100644 --- a/app/public/mock/v1/auth/info.GET.json +++ b/app/public/mock/v1/auth/info.GET.json @@ -1,7 +1,7 @@ { "data": { "user": { - "id": 1, + "id": 4, "name": "Rastislav", "surname": "Kuttner", "email": "rastislav.kuttner@jandl.com", diff --git a/app/public/mock/v1/auth/info.POST.json b/app/public/mock/v1/auth/info.POST.json index cfbcd2d..d40d39a 100644 --- a/app/public/mock/v1/auth/info.POST.json +++ b/app/public/mock/v1/auth/info.POST.json @@ -1,7 +1,7 @@ { "data": { "user": { - "id": 1, + "id": 4, "name": "Rastislav", "surname": "Kuttner", "email": "rastislav.kuttner@jandl.com", diff --git a/app/public/mock/v1/auth/login.POST.json b/app/public/mock/v1/auth/login.POST.json index b056ef9..593ac67 100644 --- a/app/public/mock/v1/auth/login.POST.json +++ b/app/public/mock/v1/auth/login.POST.json @@ -2,7 +2,7 @@ "data": { "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczpcL1wvZ2FtaXNmZXJhLndlemVvLmRldlwvY21zXC9hcGlcL3YxXC9hdXRoXC9sb2dpbiIsImlhdCI6MTYxNjQzNTEzMCwiZXhwIjoxNjE2NTIxNTMwLCJuYmYiOjE2MTY0MzUxMzAsImp0aSI6IlJtQmRQNnpDWXJsYWM5d3kiLCJzdWIiOjIsInBydiI6IjFkMDE2ZjgxZmMwNzljMzJkMzY2MDZkYThjOGY4Njk1NzQwYjg0OWQifQ.-a7YeLzozzliAP3UMvqgQEkuHDYG4L04Zdo_sezU9L4", "user": { - "id": 1, + "id": 4, "name": "Rastislav", "surname": "Kuttner", "email": "rastislav.kuttner@jandl.com", diff --git a/app/src/plugins/_testing/testing.vue b/app/src/plugins/_testing/testing.vue deleted file mode 100644 index e1716f5..0000000 --- a/app/src/plugins/_testing/testing.vue +++ /dev/null @@ -1,62 +0,0 @@ - - - \ No newline at end of file diff --git a/app/src/plugins/app/_config/App.vue b/app/src/plugins/app/_config/App.vue index 8135608..5921711 100644 --- a/app/src/plugins/app/_config/App.vue +++ b/app/src/plugins/app/_config/App.vue @@ -5,13 +5,13 @@ - - + + - - - - + + + + @@ -42,7 +42,21 @@ export default { ZDeleteMasterTaskModal }, + data() { + return { + loader: null + } + }, + + + async created() { + await this.$store.dispatch('tm/initialize') + this.loader?.hide() + }, + mounted() { + this.loader = this.$loading.show() + this.$events.on('show-delete-team-modal', ({team}) => { this.$refs['z-delete-team-modal'].showModal(team) }) @@ -60,10 +74,18 @@ export default { }) this.$events.on('show-task-modal', ({task, editMode, masterTask}) => { + if(task && task.id) { + const id = task.id + this.$router.push({ query: { 'task': id }}) + } this.$refs['z-task-modal'].showModal(task, editMode, masterTask) }) - this.$events.on('show-master-task-modal', ({masterTask, editMode}) => { + this.$events.on('show-master-task-modal', ({ masterTask, editMode }) => { + if (masterTask && masterTask.id) { + const id = masterTask.id + this.$router.push({ query: { 'master-task': id } }) + } this.$refs['z-master-task-modal'].showModal(masterTask, editMode) }) @@ -104,6 +126,14 @@ export default { onMasterTaskEdited(masterTask){ this.$events.emit('on-master-task-edited', masterTask) } + }, + + watch: { + '$route'() { + if (this.$route.query['master-task']) { + this.$events.emit('show-master-task-modal', { masterTask: { id: this.$route.query['master-task'] }, editMode: false }) + } + } } } \ No newline at end of file diff --git a/app/src/plugins/app/_config/main.ts b/app/src/plugins/app/_config/main.ts index dc4d824..dfc078d 100644 --- a/app/src/plugins/app/_config/main.ts +++ b/app/src/plugins/app/_config/main.ts @@ -9,6 +9,7 @@ import router from './router' import store from '@/store' import w from '@/plugins/w/w' import axiosCustom from '@/plugins/w@custom/axios' +import tmStore from '@/plugins/tm@_store' import vueCal from '@/plugins/app@vendor/vue-cal' import { Options } from '@/plugins/w/w/types' @@ -51,33 +52,9 @@ const options: Options = { 'POST v1/auth/login': true, 'POST v1/auth/post': true, - // 'GET v1/master-tasks/(id)': true, - // 'GET v1/master-tasks': true, - 'POST v1/master-tasks/(id)': true, - // 'DELETE v1/master-tasks/(id)': true, - // 'POST v1/master-tasks': true, - - // 'GET v1/overview/projects': true, - 'GET v1/overview/tasks': true, 'GET v1/overview/teams': true, - 'GET v1/overview/ongoing-tasks': true, - 'GET v1/overview/unscheduled-tasks': true, - - 'GET v1/tasks/(id)': true, - // 'POST v1/tasks/(id)': true, - 'DELETE v1/tasks/(id)': true, - - // 'GET v1/teams/(id)': true, - // 'POST v1/teams/(id)': true, - // 'DELETE v1/teams/(id)': true, - // 'GET v1/teams': true, - // 'GET v1/teamsx': true, - // 'POST v1/teams': true, - - // 'GET v1/employees': true, + 'GET v1/overview/tasks': true, 'GET v1/search': true, - 'POST v1/tasks': true, - 'POST v1/blockers': true } } @@ -91,6 +68,7 @@ const app = createApp(App) .use(IonicVue) .use(vuetify) .use(vueCal) + .use(tmStore) .use(loader, { color: '#6200EE' }) diff --git a/app/src/plugins/app/_config/router.ts b/app/src/plugins/app/_config/router.ts index 6801cca..004bfa9 100644 --- a/app/src/plugins/app/_config/router.ts +++ b/app/src/plugins/app/_config/router.ts @@ -90,12 +90,6 @@ const routes: Array = [ name: 'Search', meta: { title: 'Search Results' }, component: () => import('@/plugins/lib@search/search/search.vue') - }, - { - path: '/app/testing', - name: 'Testing', - meta: { title: 'Testing' }, - component: () => import('@/plugins/_testing/testing.vue') } ] } @@ -113,18 +107,4 @@ const router = createRouter({ routes }) -// router.afterEach((to) => { -// if (to.fullPath.includes('?master-task')) { -// const searchParams = new URLSearchParams(to.fullPath.split('?')[1]) -// const id = searchParams.get('id') - -// this.$events.emit('show-master-task-modal', { id }) -// } else if (to.fullPath.includes('?task')) { -// const searchParams = new URLSearchParams(to.fullPath.split('?')[1]) -// const id = searchParams.get('id') - -// this.$events.emit('show-task-modal', { id }) -// } -// }) - export default router 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 646cd73..0e7febc 100644 --- a/app/src/plugins/app/_layout/app/_components/a-sidemenu.vue +++ b/app/src/plugins/app/_layout/app/_components/a-sidemenu.vue @@ -15,8 +15,8 @@ :class="{ active: isActive(page.pageName) }" @click="$router.push({ name: page.pageName }); closeMenu()"> {{ page.title }} {{ unscheduledTasksLength }} + v-if="page.pageName == 'Overview - Unscheduled tasks' && unscheduledSubtasks" + class="mb-4 text-center rounded-circle badge">{{ unscheduledSubtasks?.length }} @@ -24,10 +24,11 @@ diff --git a/app/src/plugins/tm@modal/blocker/z-blocker-modal.vue b/app/src/plugins/tm@modal/blocker/z-blocker-modal.vue index 734335a..c74c0b9 100644 --- a/app/src/plugins/tm@modal/blocker/z-blocker-modal.vue +++ b/app/src/plugins/tm@modal/blocker/z-blocker-modal.vue @@ -1,5 +1,5 @@