mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 22:39:34 +00:00
Merge branch 'feature/clear-team' of bitbucket.org:studiotem/jandl-taskmanager-app into production
This commit is contained in:
commit
e48eaee76e
2 files changed
+32
-23
No files matched your search
@@ -16,10 +16,10 @@
|
|||||||
</td>
|
</td>
|
||||||
<td class="task-action">
|
<td class="task-action">
|
||||||
<div class="d-flex justify-start">
|
<div class="d-flex justify-start">
|
||||||
<img v-if="subtask.is_finished" class="pencil-icon is-finished" :src="require('@/plugins/app/_img/icons/checkmark.svg')" alt="checkmark-icon" @click.stop="clickCompleteTask(subtask)">
|
<img v-if="subtask.is_finished" class="pencil-icon is-finished" :src="require('@/plugins/app/_img/icons/checkmark.svg')" alt="checkmark-icon" @click.stop="clickCompleteTask(subtask)" />
|
||||||
<img v-if="!subtask.is_finished" class="pencil-icon" :src="require('@/plugins/app/_img/icons/checkmark.svg')" alt="checkmark-icon" @click.stop="clickCompleteTask(subtask)">
|
<img v-if="!subtask.is_finished" class="pencil-icon" :src="require('@/plugins/app/_img/icons/checkmark.svg')" alt="checkmark-icon" @click.stop="clickCompleteTask(subtask)" />
|
||||||
<img class="pencil-icon ml-2" :src="require('@/plugins/app/_img/icons/eye.svg')" alt="pencil-icon" @click.stop="openTaskModal(subtask)">
|
<img class="pencil-icon ml-2" :src="require('@/plugins/app/_img/icons/eye.svg')" alt="pencil-icon" @click.stop="openTaskModal(subtask)" />
|
||||||
<img class="trash-icon" :src="require('@/plugins/app/_img/icons/bin.svg')" alt="trash-icon" @click.stop="openDeleteTaskModal(subtask)">
|
<img class="trash-icon" :src="require('@/plugins/app/_img/icons/bin.svg')" alt="trash-icon" @click.stop="openDeleteTaskModal(subtask)" />
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -35,26 +35,25 @@ export default {
|
|||||||
subtasks: {
|
subtasks: {
|
||||||
type: Array,
|
type: Array,
|
||||||
required: true
|
required: true
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('tm', ['enrichedEmployees']),
|
...mapGetters('tm', ['enrichedEmployees']),
|
||||||
|
|
||||||
enrichedtasks() {
|
enrichedtasks() {
|
||||||
return this.subtasks.map(subtask => {
|
return this.subtasks.map((subtask) => {
|
||||||
const employee = this.enrichedEmployees.find(employee => employee.id == subtask.employee_id)
|
const employee = this.enrichedEmployees.find((employee) => employee.id == subtask.employee_id)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...subtask,
|
...subtask,
|
||||||
_employeeInitials: employee._initials,
|
_employeeInitials: employee ? employee._initials : '?',
|
||||||
_employeeFullName: employee._fullName
|
_employeeFullName: employee ? employee._fullName : ''
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
openDeleteTaskModal(subtask) {
|
openDeleteTaskModal(subtask) {
|
||||||
this.$events.emit('show-delete-task-modal', { subtask })
|
this.$events.emit('show-delete-task-modal', { subtask })
|
||||||
@@ -85,4 +84,4 @@ td:not(:last-child)
|
|||||||
-webkit-box-orient: vertical
|
-webkit-box-orient: vertical
|
||||||
overflow: hidden
|
overflow: hidden
|
||||||
text-overflow: ellipsis
|
text-overflow: ellipsis
|
||||||
</style>
|
</style>
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
<v-text-field v-model="mastertask.duration" @focus="onInputFocus" class="modal-input" variant="solo" type="number" :label="`${mastertask.duration} h`" :disabled="true"></v-text-field>
|
<v-text-field v-model="mastertask.duration" @focus="onInputFocus" class="modal-input" variant="solo" type="number" :label="`${mastertask.duration} h`" :disabled="true"></v-text-field>
|
||||||
|
|
||||||
<v-select v-model="mastertask.team_id" @focus="onInputFocus" class="modal-input border-select" :class="{error: v$.mastertask.employees.$errors.length}" label="Tím" variant="solo" :items="teams" item-value="id" item-title="name" :disabled="mastertask.id"></v-select>
|
<v-select v-model="mastertask.team_id" @focus="onInputFocus" class="modal-input border-select" :class="{error: v$.mastertask.employees.$errors.length}" label="Tím" variant="solo" :items="teams" item-value="id" item-title="name" :disabled="!!mastertask.id" :clearable="true" />
|
||||||
|
|
||||||
<template v-if="!mastertask.id">
|
<template v-if="!mastertask.id">
|
||||||
<v-text-field v-for="(employee, index) in mastertask.employees" :key="employee.id" @focus="onInputFocus" class="modal-input" :class="{error: employee.invalid}" :label="`${employee.name} ${employee.surname}`" variant="solo" placeholder="h" v-model="mastertask.employees[index].duration" type="number" min="1" @input="onEmployeeDurationChanged">
|
<v-text-field v-for="(employee, index) in mastertask.employees" :key="employee.id" @focus="onInputFocus" class="modal-input" :class="{error: employee.invalid}" :label="`${employee.name} ${employee.surname}`" variant="solo" placeholder="h" v-model="mastertask.employees[index].duration" type="number" min="1" @input="onEmployeeDurationChanged">
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
{{ employee?.name.charAt(0) + employee?.surname.charAt(0) }}
|
{{ employee?.name.charAt(0) + employee?.surname.charAt(0) }}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<v-icon @click.stop="removeEmployee(employee)" class="remove-input" icon="mdi-close" size="small"></v-icon>
|
<v-icon @click.stop="removeEmployee(employee)" class="remove-input" icon="mdi-close-circle" size="default"></v-icon>
|
||||||
</v-text-field>
|
</v-text-field>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
{{ employee?.name.charAt(0) + employee?.surname.charAt(0) }}
|
{{ employee?.name.charAt(0) + employee?.surname.charAt(0) }}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<v-icon @click.stop="removeEmployee(employee)" class="remove-input" icon="mdi-close" size="small"></v-icon>
|
<v-icon @click.stop="removeEmployee(employee)" class="remove-input" icon="mdi-close-circle" size="default"></v-icon>
|
||||||
</v-text-field>
|
</v-text-field>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -50,7 +50,7 @@
|
|||||||
|
|
||||||
<!-- <Z-autocomplete label="Vyhľadať zamestnanca" :options="employeesOptions" class="modal-input" @option-selected="onEmployeeSelected" /> -->
|
<!-- <Z-autocomplete label="Vyhľadať zamestnanca" :options="employeesOptions" class="modal-input" @option-selected="onEmployeeSelected" /> -->
|
||||||
|
|
||||||
<v-btn :disabled="mastertask.id" class="w-100 mb-5 button secondary" :class="{error: v$.mastertask.project_id.$errors.length}" @click="showAddEmployeeInput = true"> <v-icon class="mx-1" icon="mdi-plus" />Pridať zamestnanca </v-btn>
|
<v-btn :disabled="!!mastertask.id" class="w-100 mb-5 button secondary" :class="{error: v$.mastertask.project_id.$errors.length}" @click="showAddEmployeeInput = true"> <v-icon class="mx-1" icon="mdi-plus" />Pridať zamestnanca </v-btn>
|
||||||
|
|
||||||
<div class="w-100 modal-input" :class="{ error: v$.mastertask.description.$errors.length }">
|
<div class="w-100 modal-input" :class="{ error: v$.mastertask.description.$errors.length }">
|
||||||
<QuillEditor ref="description" v-model="mastertask.description" placeholder="Popis" theme="snow" class="rich-text-editor" @keyup="onQuillEditorInput" />
|
<QuillEditor ref="description" v-model="mastertask.description" placeholder="Popis" theme="snow" class="rich-text-editor" @keyup="onQuillEditorInput" />
|
||||||
@@ -170,7 +170,7 @@ export default {
|
|||||||
_initials: employee ? employee.name.charAt(0) + employee.surname.charAt(0) : '?',
|
_initials: employee ? employee.name.charAt(0) + employee.surname.charAt(0) : '?',
|
||||||
_fullName: employee ? `${employee.name} ${employee.surname}` : ''
|
_fullName: employee ? `${employee.name} ${employee.surname}` : ''
|
||||||
}
|
}
|
||||||
})
|
}).filter(subtask => subtask !== null)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -275,10 +275,15 @@ export default {
|
|||||||
|
|
||||||
this.mastertask._allEmployees = this.mastertask.subtasks.map(({ employee_id, duration}) => {
|
this.mastertask._allEmployees = this.mastertask.subtasks.map(({ employee_id, duration}) => {
|
||||||
const employee = this.enrichedEmployees.find(({ id }) => id == employee_id)
|
const employee = this.enrichedEmployees.find(({ id }) => id == employee_id)
|
||||||
|
|
||||||
|
if (!employee) {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
employee.duration = duration
|
employee.duration = duration
|
||||||
|
|
||||||
return employee
|
return employee
|
||||||
})
|
}).filter(employee => employee !== null)
|
||||||
|
|
||||||
// this.mastertask.project_code = project.code
|
// this.mastertask.project_code = project.code
|
||||||
} else {
|
} else {
|
||||||
@@ -446,19 +451,21 @@ export default {
|
|||||||
background: #6200EE
|
background: #6200EE
|
||||||
color: #fff
|
color: #fff
|
||||||
border-radius: 50%
|
border-radius: 50%
|
||||||
padding: 13px
|
|
||||||
font-size: 11.5px
|
font-size: 11.5px
|
||||||
height: 24px
|
height: 22px
|
||||||
width: 24px
|
width: 22px
|
||||||
position: absolute
|
position: absolute
|
||||||
top: 50%
|
top: 50%
|
||||||
right: 0
|
right: 12px
|
||||||
transform: translate(-120%, -50%)
|
transform: translate(0, -50%)
|
||||||
|
|
||||||
.remove-input
|
.remove-input
|
||||||
position: absolute
|
position: absolute
|
||||||
top: 50%
|
top: 50%
|
||||||
transform: translate(120%, -50%)
|
right: 0px
|
||||||
|
transform: translate(-15px, -50%)
|
||||||
|
color: rgb(102, 102, 102) !important
|
||||||
|
z-index: 10
|
||||||
cursor: pointer
|
cursor: pointer
|
||||||
|
|
||||||
.scrolling
|
.scrolling
|
||||||
@@ -472,4 +479,7 @@ export default {
|
|||||||
color: #7f39fb !important
|
color: #7f39fb !important
|
||||||
height: 53px
|
height: 53px
|
||||||
text-align: center
|
text-align: center
|
||||||
|
|
||||||
|
:deep(.v-field__clearable)
|
||||||
|
opacity: 1 !important
|
||||||
</style>
|
</style>
|
||||||
Reference in new issue
Block a user