mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29: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
+31
-22
No files matched your search
@@ -16,10 +16,10 @@
|
||||
</td>
|
||||
<td class="task-action">
|
||||
<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" :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="trash-icon" :src="require('@/plugins/app/_img/icons/bin.svg')" alt="trash-icon" @click.stop="openDeleteTaskModal(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 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)" />
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -35,26 +35,25 @@ export default {
|
||||
subtasks: {
|
||||
type: Array,
|
||||
required: true
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapGetters('tm', ['enrichedEmployees']),
|
||||
|
||||
enrichedtasks() {
|
||||
return this.subtasks.map(subtask => {
|
||||
const employee = this.enrichedEmployees.find(employee => employee.id == subtask.employee_id)
|
||||
return this.subtasks.map((subtask) => {
|
||||
const employee = this.enrichedEmployees.find((employee) => employee.id == subtask.employee_id)
|
||||
|
||||
return {
|
||||
...subtask,
|
||||
_employeeInitials: employee._initials,
|
||||
_employeeFullName: employee._fullName
|
||||
_employeeInitials: employee ? employee._initials : '?',
|
||||
_employeeFullName: employee ? employee._fullName : ''
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
methods: {
|
||||
openDeleteTaskModal(subtask) {
|
||||
this.$events.emit('show-delete-task-modal', { subtask })
|
||||
|
||||
@@ -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-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">
|
||||
<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) }}
|
||||
</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>
|
||||
</template>
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
{{ employee?.name.charAt(0) + employee?.surname.charAt(0) }}
|
||||
</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>
|
||||
</template>
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
|
||||
<!-- <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 }">
|
||||
<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) : '?',
|
||||
_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}) => {
|
||||
const employee = this.enrichedEmployees.find(({ id }) => id == employee_id)
|
||||
|
||||
if (!employee) {
|
||||
return null
|
||||
}
|
||||
|
||||
employee.duration = duration
|
||||
|
||||
return employee
|
||||
})
|
||||
}).filter(employee => employee !== null)
|
||||
|
||||
// this.mastertask.project_code = project.code
|
||||
} else {
|
||||
@@ -446,19 +451,21 @@ export default {
|
||||
background: #6200EE
|
||||
color: #fff
|
||||
border-radius: 50%
|
||||
padding: 13px
|
||||
font-size: 11.5px
|
||||
height: 24px
|
||||
width: 24px
|
||||
height: 22px
|
||||
width: 22px
|
||||
position: absolute
|
||||
top: 50%
|
||||
right: 0
|
||||
transform: translate(-120%, -50%)
|
||||
right: 12px
|
||||
transform: translate(0, -50%)
|
||||
|
||||
.remove-input
|
||||
position: absolute
|
||||
top: 50%
|
||||
transform: translate(120%, -50%)
|
||||
right: 0px
|
||||
transform: translate(-15px, -50%)
|
||||
color: rgb(102, 102, 102) !important
|
||||
z-index: 10
|
||||
cursor: pointer
|
||||
|
||||
.scrolling
|
||||
@@ -472,4 +479,7 @@ export default {
|
||||
color: #7f39fb !important
|
||||
height: 53px
|
||||
text-align: center
|
||||
|
||||
:deep(.v-field__clearable)
|
||||
opacity: 1 !important
|
||||
</style>
|
||||
Reference in new issue
Block a user