mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
uprava modalov, [ongoing, unscheduled tasks] filter
This commit is contained in:
1 parent
278bdeabc7
commit
67afa56736
16 files changed
+438
-144
No files matched your search
@@ -9,21 +9,25 @@
|
|||||||
"deadline": "2022-11-10T00:00:00+00:00",
|
"deadline": "2022-11-10T00:00:00+00:00",
|
||||||
"is_finished": false,
|
"is_finished": false,
|
||||||
"project_code": "CO-2201",
|
"project_code": "CO-2201",
|
||||||
|
"team": "Tim 1",
|
||||||
"team_id": 1,
|
"team_id": 1,
|
||||||
"employees": [
|
"employees": [
|
||||||
{
|
{
|
||||||
"id": 1,
|
"id": 1,
|
||||||
"duration": 1300000
|
"name": "Rastislav",
|
||||||
|
"surname": "Kuttner"
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"id": 4,
|
"id": 4,
|
||||||
"duration": 1000000
|
"name": "Viliam",
|
||||||
|
"surname": "Sedivy"
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"id": 5,
|
"id": 5,
|
||||||
"duration": 3100000
|
"name": "Pavel",
|
||||||
|
"surname": "Gajdos"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"files": []
|
"files": []
|
||||||
|
|||||||
@@ -5,7 +5,29 @@
|
|||||||
"project_code": "CO-2201",
|
"project_code": "CO-2201",
|
||||||
"title": "Nazov tasku 1 (Ongoing)",
|
"title": "Nazov tasku 1 (Ongoing)",
|
||||||
"duration": 5400000,
|
"duration": 5400000,
|
||||||
"remaining_time": 2400000
|
"remaining_time": 2400000,
|
||||||
|
"employees": [
|
||||||
|
{
|
||||||
|
"id": 1,
|
||||||
|
"duration": 1300000,
|
||||||
|
"name": "Viliam",
|
||||||
|
"surname": "Sedivy"
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"id": 4,
|
||||||
|
"duration": 1000000,
|
||||||
|
"name": "Pavel",
|
||||||
|
"surname": "Gajdos"
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"id": 5,
|
||||||
|
"duration": 3100000,
|
||||||
|
"name": "Francesca",
|
||||||
|
"surname": "Spinelli"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -13,7 +35,22 @@
|
|||||||
"project_code": "CO-2202",
|
"project_code": "CO-2202",
|
||||||
"title": "Nazov tasku 2 (Ongoing)",
|
"title": "Nazov tasku 2 (Ongoing)",
|
||||||
"duration": 5400000,
|
"duration": 5400000,
|
||||||
"remaining_time": 1300000
|
"remaining_time": 1300000,
|
||||||
|
"employees": [
|
||||||
|
{
|
||||||
|
"id": 2,
|
||||||
|
"duration": 1300000,
|
||||||
|
"name": "Simona",
|
||||||
|
"surname": "Tremkova"
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"id": 3,
|
||||||
|
"duration": 1000000,
|
||||||
|
"name": "Matej",
|
||||||
|
"surname": "Macho"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -21,7 +58,35 @@
|
|||||||
"project_code": "CO-2203",
|
"project_code": "CO-2203",
|
||||||
"title": "Nazov tasku 3 (Ongoing)",
|
"title": "Nazov tasku 3 (Ongoing)",
|
||||||
"duration": 5400000,
|
"duration": 5400000,
|
||||||
"remaining_time": 4500000
|
"remaining_time": 4500000,
|
||||||
|
"employees": [
|
||||||
|
{
|
||||||
|
"id": 1,
|
||||||
|
"duration": 1300000,
|
||||||
|
"name": "Rastislav",
|
||||||
|
"surname": "Kuttner"
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"id": 6,
|
||||||
|
"duration": 1000000,
|
||||||
|
"name": "Lenka",
|
||||||
|
"surname": "Nemeckova"
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"id": 7,
|
||||||
|
"duration": 3100000,
|
||||||
|
"name": "Peter",
|
||||||
|
"surname": "Bucan"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 9,
|
||||||
|
"duration": 3200000,
|
||||||
|
"name": "Viliam",
|
||||||
|
"surname": "Sedivy"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"status": 200
|
"status": 200
|
||||||
|
|||||||
@@ -4,21 +4,77 @@
|
|||||||
"id": 1,
|
"id": 1,
|
||||||
"project_code": "CO-2201",
|
"project_code": "CO-2201",
|
||||||
"title": "Nazov tasku 1 (Unscheduled)",
|
"title": "Nazov tasku 1 (Unscheduled)",
|
||||||
"duration": 5400000
|
"duration": 54000000,
|
||||||
|
"employees": [
|
||||||
|
{
|
||||||
|
"id": 1,
|
||||||
|
"name": "Viliam",
|
||||||
|
"surname": "Sedivy"
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"id": 4,
|
||||||
|
"name": "Pavel",
|
||||||
|
"surname": "Gajdos"
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"id": 5,
|
||||||
|
"name": "Francesca",
|
||||||
|
"surname": "Spinelli"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"id": 2,
|
"id": 2,
|
||||||
"project_code": "CO-2202",
|
"project_code": "CO-2202",
|
||||||
"title": "Nazov tasku 2 (Unscheduled)",
|
"title": "Nazov tasku 2 (Unscheduled)",
|
||||||
"duration": 5400000
|
"duration": 1400000,
|
||||||
|
"employees": [
|
||||||
|
{
|
||||||
|
"id": 1,
|
||||||
|
"name": "Rastislav",
|
||||||
|
"surname": "Kuttner"
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"id": 1,
|
||||||
|
"name": "Viliam",
|
||||||
|
"surname": "Sedivy"
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"id": 7,
|
||||||
|
"name": "Peter",
|
||||||
|
"surname": "Bucan"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 9,
|
||||||
|
"name": "Viliam",
|
||||||
|
"surname": "Sedivy"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"id": 3,
|
"id": 3,
|
||||||
"project_code": "CO-2203",
|
"project_code": "CO-2203",
|
||||||
"title": "Nazov tasku 3 (Unscheduled)",
|
"title": "Nazov tasku 3 (Unscheduled)",
|
||||||
"duration": 5400000
|
"duration": 2900000,
|
||||||
|
"employees": [
|
||||||
|
{
|
||||||
|
"id": 2,
|
||||||
|
"name": "Simona",
|
||||||
|
"surname": "Tremkova"
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"id": 3,
|
||||||
|
"name": "Matej",
|
||||||
|
"surname": "Macho"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"status": 200
|
"status": 200
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
"project_code": "CO-2201",
|
"project_code": "CO-2201",
|
||||||
"master_task_id": 1,
|
"master_task_id": 1,
|
||||||
"team_id": 1,
|
"team_id": 1,
|
||||||
"employe_id": 1,
|
"employee_id": 1,
|
||||||
"duration": 1000000,
|
"duration": 1000000,
|
||||||
"starts_at": "2022-11-10T11:00:00+00:00",
|
"starts_at": "2022-11-10T11:00:00+00:00",
|
||||||
"ends_at": "2022-11-12T16:00:00+00:00",
|
"ends_at": "2022-11-12T16:00:00+00:00",
|
||||||
|
|||||||
@@ -4,12 +4,32 @@
|
|||||||
"description": "Nejaky popis tasku",
|
"description": "Nejaky popis tasku",
|
||||||
"project_code": "CO-2201",
|
"project_code": "CO-2201",
|
||||||
"master_task_id": 1,
|
"master_task_id": 1,
|
||||||
|
"master_task": "Master task 1",
|
||||||
"team_id": 1,
|
"team_id": 1,
|
||||||
"employe_id": 1,
|
"employee_id": 1,
|
||||||
"duration": 1000000,
|
"duration": 1000000,
|
||||||
"is_finished": false,
|
"is_finished": false,
|
||||||
"starts_at": "2022-11-10T11:00:00+00:00",
|
"starts_at": "2022-11-10T11:00:00+00:00",
|
||||||
"ends_at": "2022-11-12T16:00:00+00:00",
|
"ends_at": "2022-11-12T16:00:00+00:00",
|
||||||
|
"employees": [
|
||||||
|
{
|
||||||
|
"id": 1,
|
||||||
|
"name": "Viliam",
|
||||||
|
"surname": "Sedivy"
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"id": 4,
|
||||||
|
"name": "Pavel",
|
||||||
|
"surname": "Gajdos"
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"id": 5,
|
||||||
|
"name": "Francesca",
|
||||||
|
"surname": "Spinelli"
|
||||||
|
}
|
||||||
|
],
|
||||||
"files": []
|
"files": []
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -17,10 +17,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<v-list>
|
<v-list>
|
||||||
<v-list-item class="cursor-pointer hover-background" @click="createMasterTaskDialog = true">MASTER TASK</v-list-item>
|
<v-list-item class="cursor-pointer hover-background" @click="createMasterTaskModal()">MASTER TASK</v-list-item>
|
||||||
<v-list-item class="cursor-pointer hover-background" @click="createSubTaskDialog = true">SUB TASK</v-list-item>
|
<v-list-item class="cursor-pointer hover-background" @click="createSubTaskModal()">SUB TASK</v-list-item>
|
||||||
<v-list-item class="cursor-pointer hover-background" @click="createTeamModal()">TÍM</v-list-item>
|
<v-list-item class="cursor-pointer hover-background" @click="createTeamModal()">TÍM</v-list-item>
|
||||||
<v-list-item class="cursor-pointer hover-background" @click="createBlockerDialog = true">BLOCKER</v-list-item>
|
<v-list-item class="cursor-pointer hover-background" @click="createBlockerModal()">BLOCKER</v-list-item>
|
||||||
</v-list>
|
</v-list>
|
||||||
</v-menu>
|
</v-menu>
|
||||||
|
|
||||||
@@ -50,9 +50,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Z-master-task-modal :visible="createMasterTaskDialog ? true : false" @close="createMasterTaskDialog = false"/>
|
<Z-master-task-modal ref="z-master-task-modal" />
|
||||||
<Z-sub-task-modal :visible="createSubTaskDialog ? true : false" @close="createSubTaskDialog = false"/>
|
<Z-sub-task-modal ref="z-sub-task-modal" />
|
||||||
<Z-blocker-modal :visible="createBlockerDialog ? true : false" @close="createBlockerDialog = false" />
|
<Z-blocker-modal ref="z-blocker-modal" />
|
||||||
<Z-team-modal ref="z-team-modal" />
|
<Z-team-modal ref="z-team-modal" />
|
||||||
</v-app-bar>
|
</v-app-bar>
|
||||||
</template>
|
</template>
|
||||||
@@ -73,10 +73,7 @@ export default {
|
|||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
user: null,
|
user: null
|
||||||
createBlockerDialog: false,
|
|
||||||
createMasterTaskDialog: false,
|
|
||||||
createSubTaskDialog: false
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -101,6 +98,18 @@ export default {
|
|||||||
|
|
||||||
createTeamModal() {
|
createTeamModal() {
|
||||||
this.$refs['z-team-modal'].create()
|
this.$refs['z-team-modal'].create()
|
||||||
|
},
|
||||||
|
|
||||||
|
createMasterTaskModal() {
|
||||||
|
this.$refs['z-master-task-modal'].create()
|
||||||
|
},
|
||||||
|
|
||||||
|
createSubTaskModal() {
|
||||||
|
this.$refs['z-sub-task-modal'].create()
|
||||||
|
},
|
||||||
|
|
||||||
|
createBlockerModal() {
|
||||||
|
this.$refs['z-blocker-modal'].create()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
refreshPage() {
|
refreshPage() {
|
||||||
window.location = '/app/dashboard/tasks'
|
window.location = '/#/app/dashboard/tasks'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-dialog v-model="show" max-width="650" max-height="90%" height="700px">
|
<v-dialog v-model="visible" max-width="650" max-height="90%" height="700px">
|
||||||
<W-loadable :content="allEmployees" class="h-100">
|
<W-loadable :content="blocker && allEmployees" class="h-100">
|
||||||
<v-card height="100%" class="d-flex flex-column">
|
<v-card height="100%" class="d-flex flex-column">
|
||||||
<div class="d-flex justify-space-between align-center modal-header">
|
<div class="d-flex justify-space-between align-center modal-header">
|
||||||
<h1>{{ blocker.id ? 'Upraviť' : 'Vytvoriť'}} blocker</h1>
|
<h1>{{ blocker.id ? 'Upraviť' : 'Vytvoriť'}} blocker</h1>
|
||||||
<v-icon
|
<v-icon
|
||||||
@click.stop="show = false"
|
@click.stop="close()"
|
||||||
icon="mdi-close"
|
icon="mdi-close"
|
||||||
size="large"
|
size="large"
|
||||||
></v-icon>
|
></v-icon>
|
||||||
@@ -83,34 +83,20 @@ import errorUtils from '@/plugins/lib@auth/_utils/error.utils'
|
|||||||
const atLeastOne = (value) => value.length
|
const atLeastOne = (value) => value.length
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
emits: ['close'],
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
ZAutocomplete,
|
ZAutocomplete,
|
||||||
Datepicker,
|
Datepicker,
|
||||||
},
|
},
|
||||||
|
|
||||||
props: {
|
|
||||||
visible: {
|
|
||||||
type: Boolean,
|
|
||||||
required: true
|
|
||||||
},
|
|
||||||
|
|
||||||
blockerId: {
|
|
||||||
type: Number || null,
|
|
||||||
required: false,
|
|
||||||
default: null
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
visible: false,
|
||||||
allEmployees: null,
|
allEmployees: null,
|
||||||
v$: useVuelidate(),
|
v$: useVuelidate(),
|
||||||
errorUtils,
|
errorUtils,
|
||||||
blocker: {
|
blocker: null
|
||||||
name: '',
|
|
||||||
date: null,
|
|
||||||
employees: []
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -125,9 +111,6 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
async created() {
|
async created() {
|
||||||
if (this.blockerId)
|
|
||||||
await this._load()
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const allEmployees = await this.$axios.get_auth_data('v1/employees')
|
const allEmployees = await this.$axios.get_auth_data('v1/employees')
|
||||||
this.allEmployees = this._enrichEmployeesByFullName(allEmployees)
|
this.allEmployees = this._enrichEmployeesByFullName(allEmployees)
|
||||||
@@ -137,13 +120,29 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
async create(blocker = null) {
|
||||||
|
if (blocker) {
|
||||||
|
this.blocker = blocker
|
||||||
|
await this._load()
|
||||||
|
} else {
|
||||||
|
this.blocker = {
|
||||||
|
name: '',
|
||||||
|
date: null,
|
||||||
|
employees: []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.visible = true
|
||||||
|
},
|
||||||
|
|
||||||
employeeSelected(selectedOption) {
|
employeeSelected(selectedOption) {
|
||||||
const employee = this.allEmployees.find((empl) => empl.id == selectedOption.key)
|
const employee = this.allEmployees.find((empl) => empl.id == selectedOption.key)
|
||||||
this.blocker.employees.push(employee)
|
this.blocker.employees.push(employee)
|
||||||
},
|
},
|
||||||
|
|
||||||
async save() {
|
async save() {
|
||||||
if (!(await this.v$.$validate())) return console.log(this.v$)
|
if (!(await this.v$.$validate()))
|
||||||
|
return
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (this.blocker.id)
|
if (this.blocker.id)
|
||||||
@@ -151,13 +150,19 @@ export default {
|
|||||||
else
|
else
|
||||||
await this._create()
|
await this._create()
|
||||||
|
|
||||||
|
this.close()
|
||||||
this.$router.push({ name: 'Dashboard - Tasks' })
|
this.$router.push({ name: 'Dashboard - Tasks' })
|
||||||
this.show = false
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
close() {
|
||||||
|
this.visible = false
|
||||||
|
this.$emit('close', this.blocker)
|
||||||
|
this.blocker = null
|
||||||
|
},
|
||||||
|
|
||||||
async _create() {
|
async _create() {
|
||||||
try {
|
try {
|
||||||
await this.$axios.post_auth('v1/blockers', this.blocker)
|
await this.$axios.post_auth('v1/blockers', this.blocker)
|
||||||
@@ -176,7 +181,7 @@ export default {
|
|||||||
|
|
||||||
async _load() {
|
async _load() {
|
||||||
try {
|
try {
|
||||||
const blocker = await this.$axios.get_auth_data(`v1/blockers/${this.blockerId}`)
|
const blocker = await this.$axios.get_auth_data(`v1/blockers/${this.blocker.id}`)
|
||||||
blocker.employees = this._enrichEmployeesByFullName(blocker.employees)
|
blocker.employees = this._enrichEmployeesByFullName(blocker.employees)
|
||||||
|
|
||||||
this.blocker = blocker
|
this.blocker = blocker
|
||||||
@@ -222,17 +227,7 @@ export default {
|
|||||||
value: `${employee.name} ${employee.surname}`,
|
value: `${employee.name} ${employee.surname}`,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
|
||||||
|
|
||||||
show: {
|
|
||||||
get() {
|
|
||||||
return this.visible
|
|
||||||
},
|
|
||||||
|
|
||||||
set(value) {
|
|
||||||
if (!value) this.$emit('close')
|
|
||||||
}
|
}
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-dialog v-model="show" max-width="650" max-height="90%" height="700px">
|
<v-dialog v-model="visible" max-width="650" max-height="90%" height="700px">
|
||||||
|
<W-loadable :content="masterTask" class="h-100">
|
||||||
<v-card height="100%" class="d-flex flex-column scrolling">
|
<v-card height="100%" class="d-flex flex-column scrolling">
|
||||||
<div class="d-flex justify-space-between align-center modal-header">
|
<div class="d-flex justify-space-between align-center modal-header">
|
||||||
<h1>Vytvoriť master task</h1>
|
<h1>Vytvoriť master task</h1>
|
||||||
<v-icon
|
<v-icon
|
||||||
@click.stop="show = false"
|
@click.stop="close()"
|
||||||
icon="mdi-close"
|
icon="mdi-close"
|
||||||
size="large"
|
size="large"
|
||||||
></v-icon>
|
></v-icon>
|
||||||
@@ -115,6 +116,7 @@
|
|||||||
|
|
||||||
<v-btn class="z-btn" @click="save()">VYTVORIŤ</v-btn>
|
<v-btn class="z-btn" @click="save()">VYTVORIŤ</v-btn>
|
||||||
</v-card>
|
</v-card>
|
||||||
|
</W-loadable>
|
||||||
</v-dialog>
|
</v-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -129,44 +131,25 @@ import ZAutocomplete from '@/plugins/tm@_components/z-autocomplete.vue'
|
|||||||
const atLeastOne = (value) => value.length
|
const atLeastOne = (value) => value.length
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
emits: ['close'],
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
Datepicker,
|
Datepicker,
|
||||||
ZFilesUpload,
|
ZFilesUpload,
|
||||||
ZAutocomplete
|
ZAutocomplete
|
||||||
},
|
},
|
||||||
|
|
||||||
props: {
|
|
||||||
visible: {
|
|
||||||
type: Boolean,
|
|
||||||
required: true
|
|
||||||
},
|
|
||||||
|
|
||||||
masterTaskId: {
|
|
||||||
type: Number || null,
|
|
||||||
required: false,
|
|
||||||
default: null
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
masterTask: {
|
visible: false,
|
||||||
project_code: null,
|
|
||||||
name: null,
|
|
||||||
deadline: null,
|
|
||||||
duration: null,
|
|
||||||
team: {},
|
|
||||||
description: null,
|
|
||||||
employees: [],
|
|
||||||
files: []
|
|
||||||
},
|
|
||||||
errorUtils,
|
errorUtils,
|
||||||
v$: useVuelidate(),
|
v$: useVuelidate(),
|
||||||
preventInputFocus: false,
|
preventInputFocus: false,
|
||||||
teams: null,
|
teams: null,
|
||||||
employees: null,
|
employees: null,
|
||||||
selectedTeam: '',
|
selectedTeam: '',
|
||||||
showAddEmployeeInput: false
|
showAddEmployeeInput: false,
|
||||||
|
masterTask: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -187,7 +170,6 @@ export default {
|
|||||||
try {
|
try {
|
||||||
this.teams = await this.$axios.get_auth_data('v1/teams')
|
this.teams = await this.$axios.get_auth_data('v1/teams')
|
||||||
this.employees = await this.$axios.get_auth_data('v1/employees')
|
this.employees = await this.$axios.get_auth_data('v1/employees')
|
||||||
|
|
||||||
// this.masterTask = await this.$axios.get_auth_data(`v1/master-task/${this.masterTaksId}`)
|
// this.masterTask = await this.$axios.get_auth_data(`v1/master-task/${this.masterTaksId}`)
|
||||||
// this.selectedTeam = `${this.masterTask.team.name} - ${this.masterTask.team.id}`)
|
// this.selectedTeam = `${this.masterTask.team.name} - ${this.masterTask.team.id}`)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -196,8 +178,29 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
async create(masterTask = null) {
|
||||||
|
if (masterTask) {
|
||||||
|
this.masterTask = masterTask
|
||||||
|
await this._load()
|
||||||
|
} else {
|
||||||
|
this.masterTask = {
|
||||||
|
project_code: null,
|
||||||
|
name: null,
|
||||||
|
deadline: null,
|
||||||
|
duration: null,
|
||||||
|
team: {},
|
||||||
|
description: null,
|
||||||
|
employees: [],
|
||||||
|
files: []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.visible = true
|
||||||
|
},
|
||||||
|
|
||||||
async save() {
|
async save() {
|
||||||
if (!(await this.v$.$validate())) return console.log(this.v$)
|
if (!(await this.v$.$validate()))
|
||||||
|
return
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (this.masterTask.id)
|
if (this.masterTask.id)
|
||||||
@@ -205,13 +208,19 @@ export default {
|
|||||||
else
|
else
|
||||||
await this._create()
|
await this._create()
|
||||||
|
|
||||||
|
this.close()
|
||||||
this.$router.push({ name: 'Dashboard - Tasks' })
|
this.$router.push({ name: 'Dashboard - Tasks' })
|
||||||
this.show = false
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
close() {
|
||||||
|
this.visible = false
|
||||||
|
this.$emit('close', this.masterTask)
|
||||||
|
this.masterTask = null
|
||||||
|
},
|
||||||
|
|
||||||
async _create() {
|
async _create() {
|
||||||
try {
|
try {
|
||||||
await this.$axios.post_auth('v1/master-tasks')
|
await this.$axios.post_auth('v1/master-tasks')
|
||||||
@@ -283,18 +292,8 @@ export default {
|
|||||||
value: `${employee.name} ${employee.surname}`,
|
value: `${employee.name} ${employee.surname}`,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
|
||||||
|
|
||||||
show: {
|
|
||||||
get() {
|
|
||||||
return this.visible
|
|
||||||
},
|
|
||||||
|
|
||||||
set(value) {
|
|
||||||
if (!value) this.$emit('close')
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
|
||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
selectedTeam() {
|
selectedTeam() {
|
||||||
|
|||||||
Whitespace-only changes.
@@ -1,10 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-dialog v-model="show" max-width="650" max-height="90%" height="700px">
|
<v-dialog v-model="visible" max-width="650" max-height="90%" height="700px">
|
||||||
|
<W-loadable :content="subTask" class="h-100">
|
||||||
<v-card height="100%" class="d-flex flex-column scrolling">
|
<v-card height="100%" class="d-flex flex-column scrolling">
|
||||||
<div class="d-flex justify-space-between align-center modal-header">
|
<div class="d-flex justify-space-between align-center modal-header">
|
||||||
<h1>Vytvoriť subtask</h1>
|
<h1>Vytvoriť subtask</h1>
|
||||||
<v-icon
|
<v-icon
|
||||||
@click.stop="show = false"
|
@click.stop="close()"
|
||||||
icon="mdi-close"
|
icon="mdi-close"
|
||||||
size="large"
|
size="large"
|
||||||
></v-icon>
|
></v-icon>
|
||||||
@@ -108,6 +109,7 @@
|
|||||||
|
|
||||||
<v-btn class="z-btn" @click="save()">VYTVORIŤ</v-btn>
|
<v-btn class="z-btn" @click="save()">VYTVORIŤ</v-btn>
|
||||||
</v-card>
|
</v-card>
|
||||||
|
</W-loadable>
|
||||||
</v-dialog>
|
</v-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -122,36 +124,18 @@ import ZAutocomplete from '@/plugins/tm@_components/z-autocomplete.vue'
|
|||||||
const atLeastOne = (value) => value.length
|
const atLeastOne = (value) => value.length
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
emits: ['close'],
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
Datepicker,
|
Datepicker,
|
||||||
ZFilesUpload,
|
ZFilesUpload,
|
||||||
ZAutocomplete
|
ZAutocomplete
|
||||||
},
|
},
|
||||||
|
|
||||||
props: {
|
|
||||||
visible: {
|
|
||||||
type: Boolean,
|
|
||||||
required: true
|
|
||||||
},
|
|
||||||
|
|
||||||
subTaskId: {
|
|
||||||
type: Number || null,
|
|
||||||
required: false,
|
|
||||||
default: null
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
subTask: {
|
visible: false,
|
||||||
project_code: null,
|
subTask: null,
|
||||||
date: null,
|
|
||||||
team: {},
|
|
||||||
employees: [],
|
|
||||||
duration: null,
|
|
||||||
description: null,
|
|
||||||
files: []
|
|
||||||
},
|
|
||||||
errorUtils,
|
errorUtils,
|
||||||
v$: useVuelidate(),
|
v$: useVuelidate(),
|
||||||
preventInputFocus: false,
|
preventInputFocus: false,
|
||||||
@@ -185,8 +169,28 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
async create(subTask = null) {
|
||||||
|
if (subTask) {
|
||||||
|
this.subTask = subTask
|
||||||
|
await this._load()
|
||||||
|
} else {
|
||||||
|
this.subTask = {
|
||||||
|
project_code: null,
|
||||||
|
date: null,
|
||||||
|
team: {},
|
||||||
|
employees: [],
|
||||||
|
duration: null,
|
||||||
|
description: null,
|
||||||
|
files: []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.visible = true
|
||||||
|
},
|
||||||
|
|
||||||
async save() {
|
async save() {
|
||||||
if (!(await this.v$.$validate())) return console.log(this.v$)
|
if (!(await this.v$.$validate()))
|
||||||
|
return
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (this.subTask.id)
|
if (this.subTask.id)
|
||||||
@@ -194,13 +198,19 @@ export default {
|
|||||||
else
|
else
|
||||||
await this._create()
|
await this._create()
|
||||||
|
|
||||||
|
this.close()
|
||||||
this.$router.push({ name: 'Dashboard - Tasks' })
|
this.$router.push({ name: 'Dashboard - Tasks' })
|
||||||
this.show = false
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
close() {
|
||||||
|
this.visible = false
|
||||||
|
this.$emit('close', this.subTask)
|
||||||
|
this.subTask = null
|
||||||
|
},
|
||||||
|
|
||||||
async _create() {
|
async _create() {
|
||||||
try {
|
try {
|
||||||
await this.$axios.post_auth('v1/master-tasks')
|
await this.$axios.post_auth('v1/master-tasks')
|
||||||
@@ -261,18 +271,8 @@ export default {
|
|||||||
value: `${employee.name} ${employee.surname}`,
|
value: `${employee.name} ${employee.surname}`,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
|
||||||
|
|
||||||
show: {
|
|
||||||
get() {
|
|
||||||
return this.visible
|
|
||||||
},
|
|
||||||
|
|
||||||
set(value) {
|
|
||||||
if (!value) this.$emit('close')
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
|
||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
selectedMasterTask() {
|
selectedMasterTask() {
|
||||||
|
|||||||
@@ -0,0 +1,88 @@
|
|||||||
|
<template>
|
||||||
|
<v-row class="px-10 py-8 subheader">
|
||||||
|
<v-select
|
||||||
|
v-model="selectedEmployee"
|
||||||
|
class="subheader-input"
|
||||||
|
variant="outlined"
|
||||||
|
:items="allEmployees"
|
||||||
|
label="Zamestanec"
|
||||||
|
></v-select>
|
||||||
|
<v-text-field
|
||||||
|
v-model="searchQuery"
|
||||||
|
class="subheader-input"
|
||||||
|
variant="outlined"
|
||||||
|
placeholder="Vyhľadávanie"
|
||||||
|
prepend-inner-icon="mdi-magnify"
|
||||||
|
@input="onInput"
|
||||||
|
type="text"
|
||||||
|
></v-text-field>
|
||||||
|
</v-row>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
selectedEmployee: '',
|
||||||
|
employees: [],
|
||||||
|
searchQuery: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
async created() {
|
||||||
|
try {
|
||||||
|
this.employees = await this.$axios.get_auth_data('v1/employees')
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
onInput() {
|
||||||
|
this.$emit('queryChange', this.searchQuery)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
computed: {
|
||||||
|
allEmployees() {
|
||||||
|
const employees = this.employees.map((employee) => {
|
||||||
|
return `${employee.name} ${employee.surname}`
|
||||||
|
})
|
||||||
|
return employees
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="sass" scoped>
|
||||||
|
.subheader
|
||||||
|
max-width: 100%
|
||||||
|
margin: 0
|
||||||
|
border-bottom: 1px solid rgba(33, 33, 33, 0.08)
|
||||||
|
gap: 25px
|
||||||
|
flex-wrap: wrap
|
||||||
|
position: sticky
|
||||||
|
top: 0
|
||||||
|
z-index: 9999
|
||||||
|
background: white
|
||||||
|
|
||||||
|
.subheader-input
|
||||||
|
max-width: 250px !important
|
||||||
|
min-width: 250px
|
||||||
|
|
||||||
|
&:deep(.v-input__details)
|
||||||
|
display: none
|
||||||
|
|
||||||
|
&.disabled
|
||||||
|
pointer-events: none !important
|
||||||
|
|
||||||
|
@media (max-width: 600px)
|
||||||
|
.subheader
|
||||||
|
gap: 15px
|
||||||
|
padding: 20px !important
|
||||||
|
|
||||||
|
.subheader-input
|
||||||
|
max-width: 100% !important
|
||||||
|
min-width: 100%
|
||||||
|
</style>
|
||||||
@@ -1,29 +1,58 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
<Z-tasks-search @queryChange="filterOngoingTasks" />
|
||||||
|
|
||||||
<W-loadable :content="ongoingTasks">
|
<W-loadable :content="ongoingTasks">
|
||||||
<A-ongoing-table :tasks="ongoingTasks" />
|
<A-ongoing-table :tasks="filteredOngoingTasks" />
|
||||||
|
<h6
|
||||||
|
v-if="filteredOngoingTasks && !filteredOngoingTasks.length"
|
||||||
|
class="px-4"
|
||||||
|
>
|
||||||
|
Aktuálnemu hľadaniu nevyhovujú žiadne prebiehajúce úlohy
|
||||||
|
</h6>
|
||||||
</W-loadable>
|
</W-loadable>
|
||||||
|
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import ZTasksSearch from '@/plugins/tm@overview/_components/z-tasks-search.vue'
|
||||||
import AOngoingTable from './_components/a-ongoing-table.vue'
|
import AOngoingTable from './_components/a-ongoing-table.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
ZTasksSearch,
|
||||||
AOngoingTable
|
AOngoingTable
|
||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
ongoingTasks: null
|
ongoingTasks: null,
|
||||||
|
filteredOngoingTasks: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
async created() {
|
async created() {
|
||||||
try {
|
try {
|
||||||
this.ongoingTasks = await this.$axios.get_auth_data('v1/overview/ongoing-tasks')
|
this.ongoingTasks = await this.$axios.get_auth_data('v1/overview/ongoing-tasks')
|
||||||
|
this.filterOngoingTasks()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.ongoingTasks = {error: error.data.error}
|
this.ongoingTasks = error
|
||||||
this.$toast.error(error.data.error)
|
this.$toast.error(error)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
filterOngoingTasks(searchQuery) {
|
||||||
|
if(!searchQuery) return this.filteredOngoingTasks = this.ongoingTasks
|
||||||
|
this.filteredOngoingTasks = this.ongoingTasks.filter((task) => {
|
||||||
|
return this.filterParams(searchQuery, task.title) || this.filterParams(searchQuery, task.project_code)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
filterParams(searchQuery, row) {
|
||||||
|
return row.toLowerCase().includes(searchQuery.toLowerCase())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
<tr v-for="task in tasks" :key="task.id">
|
<tr v-for="task in tasks" :key="task.id">
|
||||||
<td>{{ task.project_code }}</td>
|
<td>{{ task.project_code }}</td>
|
||||||
<td>{{ task.title }}</td>
|
<td>{{ task.title }}</td>
|
||||||
<td>{{ task.duration / 1000 / 60 / 60 }} h</td>
|
<td>{{ (task.duration / 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@overview/_img/pencil-icon.svg')" alt="pencil-icon" :style="{opacity: 0.3}">
|
<img class="pencil-icon" :src="require('@/plugins/tm@overview/_img/pencil-icon.svg')" alt="pencil-icon" :style="{opacity: 0.3}">
|
||||||
|
|||||||
@@ -1,29 +1,59 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
<Z-tasks-search @queryChange="filterUnscheduledTasks" />
|
||||||
|
|
||||||
<W-loadable :content="unscheduledTasks">
|
<W-loadable :content="unscheduledTasks">
|
||||||
<A-unscheduled-table :tasks="unscheduledTasks" />
|
<A-unscheduled-table :tasks="filteredUnscheduledTasks" />
|
||||||
|
<h6
|
||||||
|
v-if="filteredUnscheduledTasks && !filteredUnscheduledTasks.length"
|
||||||
|
class="px-4"
|
||||||
|
>
|
||||||
|
Aktuálnemu hľadaniu nevyhovujú žiadne nenaplánované úlohy
|
||||||
|
</h6>
|
||||||
</W-loadable>
|
</W-loadable>
|
||||||
|
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import ZTasksSearch from '@/plugins/tm@overview/_components/z-tasks-search.vue'
|
||||||
import AUnscheduledTable from './_components/a-unscheduled-table.vue'
|
import AUnscheduledTable from './_components/a-unscheduled-table.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
ZTasksSearch,
|
||||||
AUnscheduledTable
|
AUnscheduledTable
|
||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
unscheduledTasks: null
|
unscheduledTasks: null,
|
||||||
|
filteredUnscheduledTasks: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
async created() {
|
async created() {
|
||||||
try {
|
try {
|
||||||
this.unscheduledTasks = await this.$axios.get_auth_data('v1/overview/unscheduled-tasks')
|
this.unscheduledTasks = await this.$axios.get_auth_data('v1/overview/unscheduled-tasks')
|
||||||
|
this.filterUnscheduledTasks()
|
||||||
|
console.log(this.unscheduledTasks)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.unscheduledTasks = {error: error.data.error}
|
this.unscheduledTasks = error
|
||||||
this.$toast.error(error.data.error)
|
this.$toast.error(error)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
filterUnscheduledTasks(searchQuery) {
|
||||||
|
if(!searchQuery) return this.filteredUnscheduledTasks = this.unscheduledTasks
|
||||||
|
this.filteredUnscheduledTasks = this.unscheduledTasks.filter((task) => {
|
||||||
|
return this.filterParams(searchQuery, task.title) || this.filterParams(searchQuery, task.project_code)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
filterParams(searchQuery, row) {
|
||||||
|
return row.toLowerCase().includes(searchQuery.toLowerCase())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,7 +45,6 @@ export default {
|
|||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
editModal: null,
|
|
||||||
deleteModal: null
|
deleteModal: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in new issue
Block a user