Merge branch 'main' of bitbucket.org:studiotem/jandl-taskmanager-app into main

This commit is contained in:
StudioTem committed 2022-11-23 08:17:29 +01:00
commit 8755200b66
39 files changed
+118 -56

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
# Initial stup
1. `cd ./app`
2. `npm i`
# Dev serve
1. `npm run serve`
# Build on server
1. `cd ./app`
2. `npm i`
3. `npm run build`
4. `cp -r dist/* ../`
+25 -9
View File
@@ -44,21 +44,37 @@ const routes: Array<RouteRecordRaw> = [
children: [ children: [
{ {
path: '/app/dashboard/tasks', path: '/app/dashboard/tasks',
name: 'Tasks', name: 'Dashboard - Tasks',
component: () => import('@/plugins/tm@dashboard/tasks-overview/tasks-overview.vue') component: () => import('@/plugins/tm@dashboard/tasks/tasks.vue')
}, },
{ {
path: '/app/dashboard/unscheduled-tasks', path: '/app/dashboard/teams',
name: 'Unscheduled tasks', name: 'Dashboard - Teams',
component: () => import('@/plugins/tm@dashboard/unscheduled-tasks-overview/unscheduled-tasks.vue') component: () => import('@/plugins/tm@dashboard/teams/teams.vue')
}, },
{ {
path: '/app/dashboard/ongoing-tasks', path: '/app/dashboard/projects',
name: 'Ongoing tasks', name: 'Dashboard - Projects',
component: () => import('@/plugins/tm@dashboard/ongoing-tasks-overview/ongoing-tasks.vue') 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" /> <img class="logo" :src="require('@/plugins/app/_layout/_img/jandl-logo.svg')" alt="jandl-logo" />
<ion-list lines="none" id="labels-list"> <ion-list lines="none" id="labels-list">
<ion-item @click=" $router.push({ name: 'Tasks' }); closeMenu();" :class="active('/app/dashboard/tasks') ? 'active' : 'unactive'"> <ion-item v-for="page in pages" :key="page.pageName" :class="{active: isActive(page.pageName)}"
Úlohy @click="$router.push({name: page.pageName}); closeMenu()">
</ion-item> {{ page.title }}
<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> </ion-item>
</ion-list> </ion-list>
</ion-content> </ion-content>
@@ -35,14 +15,43 @@
<script> <script>
export default { 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() { created() {
this.eventBus.on('close-menu', () => this.closeMenu()) this.eventBus.on('close-menu', () => this.closeMenu())
this.eventBus.on('toggle-menu', () => this.toggleMenu()) this.eventBus.on('toggle-menu', () => this.toggleMenu())
}, },
methods: { methods: {
active(path) { isActive(pageName) {
return this.$route.path == path return this.$route.name == pageName
}, },
closeMenu() { closeMenu() {
+3
View File
@@ -1,2 +1,5 @@
span.highlight span.highlight
color: #7F39FB color: #7F39FB
.cursor-pointer:hover
cursor: pointer
@@ -1,7 +1,7 @@
export default { export default {
parseErrors(errors) { parseErrors(errors) {
// @ts-ignore // @ts-expect-error
return Object.values(errors).map(error => error?.$message).join(', ') return Object.values(errors).map(error => error?.$message).join(', ')
} }
} }
@@ -4,6 +4,7 @@
<div class="d-flex flex-column"> <div class="d-flex flex-column">
<v-btn class="button" color="#7F39FB" @click="submit()">Poslať kód</v-btn> <v-btn class="button" color="#7F39FB" @click="submit()">Poslať kód</v-btn>
<p class="mt-5 text-center cursor-pointer" @click="$router.push({ name: 'Login' })">Spomenuli ste si na heslo? Prihláste sa</p>
</div> </div>
</v-form> </v-form>
</template> </template>
@@ -1,13 +1,13 @@
<template> <template>
<v-form> <v-form>
<v-text-field v-model="form.email" label="E-mail" variant="solo" autocomplete="off" class="mb-2" bg-color="white" :hint="v$.form.email.$errors ? parseErrors(v$.form.email.$errors) : null" :class="{ error: v$.form.email.$errors.length }" /> <v-text-field v-model="form.email" label="E-mail" variant="solo" autocomplete="off" class="mb-2" bg-color="white" :hint="v$.form.email.$errors ? errorUtils.parseErrors(v$.form.email.$errors) : null" :class="{ error: v$.form.email.$errors.length }" />
<v-text-field v-model="form.password" :type="showPassword ? 'text' : 'password'" variant="solo" bg-color="white" class="mb-2" :counter="8" label="Heslo" autocomplete="off" :hint="v$.form.password.$errors ? errorUtils.parseErrors(v$.form.password.$errors) : null" <v-text-field v-model="form.password" :type="showPassword ? 'text' : 'password'" variant="solo" bg-color="white" class="mb-2" :counter="8" label="Heslo" autocomplete="off" :hint="v$.form.password.$errors ? errorUtils.parseErrors(v$.form.password.$errors) : null"
:class="{ error: v$.form.password.$errors.length }" :append-icon="showPassword ? 'mdi-eye' : 'mdi-eye-off'" @click:append="showPassword = !showPassword" /> :class="{ error: v$.form.password.$errors.length }" :append-icon="showPassword ? 'mdi-eye' : 'mdi-eye-off'" @click:append="showPassword = !showPassword" />
<div class="d-flex flex-column"> <div class="d-flex flex-column">
<v-btn class="button" color="#7F39FB" @click="submit()">Prihlásiť sa</v-btn> <v-btn class="button" color="#7F39FB" @click="submit()">Prihlásiť sa</v-btn>
<p class="mt-5 text-center forgot-password" @click="$router.push({ name: 'Forgot password' })">Zabudli ste heslo?</p> <p class="mt-5 text-center cursor-pointer" @click="$router.push({ name: 'Forgot password' })">Zabudli ste heslo?</p>
</div> </div>
</v-form> </v-form>
</template> </template>
@@ -42,7 +42,7 @@ export default {
try { try {
await this.$axios.post_data('v1/auth/login', this.form) 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) { } catch (error) {
this.$toast.error(error.data.error) this.$toast.error(error.data.error)
} }
@@ -50,8 +50,3 @@ export default {
} }
} }
</script> </script>
<style lang="sass" scoped>
.forgot-password:hover
cursor: pointer
</style>
-1
View File
@@ -2,7 +2,6 @@
<v-container> <v-container>
<div class="auth-card"> <div class="auth-card">
<h1>Prihláste sa s vašim e-mailom</h1> <h1>Prihláste sa s vašim e-mailom</h1>
<p class="mb-10">Nemáte vytvorený účet? <span class="highlight">Registrujte sa.</span></p>
<A-login-form /> <A-login-form />
</div> </div>
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" variant="outlined"
></v-select> ></v-select>
<div class="d-flex date-wrapper"> <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 <v-text-field
class="subheader-input disabled" class="subheader-input disabled"
:items="items" :items="items"
@@ -17,7 +17,7 @@
variant="outlined" variant="outlined"
append-inner-icon="mdi-calendar-blank-outline" append-inner-icon="mdi-calendar-blank-outline"
></v-text-field> ></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> </div>
<v-text-field <v-text-field
class="subheader-input" 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>{{ (task.remaining_time / 1000 / 60 / 60).toFixed(2) }} h</td>
<td class="task-action"> <td class="task-action">
<div class="d-flex justify-start"> <div class="d-flex justify-start">
<img class="pencil-icon" :src="require('@/plugins/tm@dashboard/_img/pencil-icon.svg')" alt="pencil-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@dashboard/_img/trash-icon.svg')" alt="trash-icon" /> <img class="trash-icon" :src="require('@/plugins/tm@overview/_img/trash-icon.svg')" alt="trash-icon" />
</div> </div>
</td> </td>
</tr> </tr>
@@ -1,15 +1,15 @@
<template> <template>
<W-loadable :content="ongoingTasks"> <W-loadable :content="ongoingTasks">
<A-ongoing-tasks :tasks="ongoingTasks" /> <A-ongoing-table :tasks="ongoingTasks" />
</W-loadable> </W-loadable>
</template> </template>
<script> <script>
import AOngoingTasks from './_components/a-ongoing-tasks-overview.vue' import AOngoingTable from './_components/a-ongoing-table.vue'
export default { export default {
components: { components: {
AOngoingTasks AOngoingTable
}, },
data() { data() {
@@ -16,8 +16,8 @@
<td>{{ task.duration / 1000 / 60 / 60 }} h</td> <td>{{ task.duration / 1000 / 60 / 60 }} h</td>
<td class="task-action"> <td class="task-action">
<div class="d-flex justify-start"> <div class="d-flex justify-start">
<img class="pencil-icon" :src="require('@/plugins/tm@dashboard/_img/pencil-icon.svg')" alt="pencil-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@dashboard/_img/trash-icon.svg')" alt="trash-icon"> <img class="trash-icon" :src="require('@/plugins/tm@overview/_img/trash-icon.svg')" alt="trash-icon">
</div> </div>
</td> </td>
</tr> </tr>
@@ -1,15 +1,15 @@
<template> <template>
<W-loadable :content="unscheduledTasks"> <W-loadable :content="unscheduledTasks">
<A-unscheduled-tasks-table :tasks="unscheduledTasks" /> <A-unscheduled-table :tasks="unscheduledTasks" />
</W-loadable> </W-loadable>
</template> </template>
<script> <script>
import AUnscheduledTasksTable from './_components/a-unscheduled-tasks-table.vue' import AUnscheduledTable from './_components/a-unscheduled-table.vue'
export default { export default {
components: { components: {
AUnscheduledTasksTable AUnscheduledTable
}, },
data() { data() {
@@ -0,0 +1,9 @@
<template>
<div></div>
</template>
<script>
export default {
}
</script>