This commit is contained in:
Matej Glasnák committed 2023-08-18 12:16:44 +02:00
1 parent 88792943e6
commit 04d91c93ff
1 file changed
+11 -11
@@ -14,10 +14,10 @@
<div class="splitted-inputs">
<!-- TODO: Bialko validacie -->
<Datepicker v-model="mastertask.deadline" :auto-apply="true" @focus="onDateFocus" :min-date="new Date()" class="modal-input left" format="dd.MM.yyyy" locale="sk" select-text="Vybrať" cancel-text="Zrušiť" placeholder="Dátum"
<Datepicker v-model="mastertask.deadline" :auto-apply="true" @focus="onDateFocus" :min-date="new Date()" class="modal-input left" format="dd.MM.yyyy" locale="sk" select-text="Vybrať" cancel-text="Zrušiť" placeholder="Dátum"
:class="{ error: v$.mastertask.deadline.$errors?.length }" :validations="v$.mastertask.deadline" />
<v-text-field class="modal-input right" variant="solo" v-model="mastertask._deadline_time" label="Čas" append-inner-icon="mdi-clock-outline" type="time" @focus="onInputFocus"
<v-text-field class="modal-input right" variant="solo" v-model="mastertask._deadline_time" label="Čas" append-inner-icon="mdi-clock-outline" type="time" @focus="onInputFocus"
:class="{ error: v$.mastertask._deadline_time.$errors.length }" :hint="v$.mastertask._deadline_time.$errors ? errorUtils.parseErrors(v$.mastertask._deadline_time.$errors) : null" />
</div>
@@ -30,7 +30,7 @@
<p class="employee-select-avatar d-flex justify-center align-center">
{{ 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-text-field>
</template>
@@ -150,12 +150,12 @@ export default {
enrichedSubtasks() {
if (!this.mastertask?.subtasks)
return null
return this.mastertask.subtasks.map(subtask => {
const employee = this.enrichedEmployees.find(employee => employee.id == subtask.employee_id)
return {
...subtask,
...subtask,
_initials: employee ? employee.name.charAt(0) + employee.surname.charAt(0) : '?',
_fullName: employee ? `${employee.name} ${employee.surname}` : ''
}
@@ -167,7 +167,7 @@ export default {
const quillEditorRequired = (value) => {
if (!value || !value.length || !value.replace(/<[^>]*>/g, '').length)
return false
return true
}
@@ -220,12 +220,12 @@ export default {
methods: {
removeEmployee({ id }) {
const isEmployeeInTeam = this.mastertask.team?.employees.find(employee => employee.id == id)
// const isEmployeeInTeam = this.mastertask.team?.employees.find(employee => employee.id == id)
if (isEmployeeInTeam) {
this.mastertask.team_id = null
this.mastertask.team = null
}
// if (isEmployeeInTeam) {
// this.mastertask.team_id = null
// this.mastertask.team = null
// }
this.mastertask.employees = this.mastertask.employees.filter(employee => employee.id != id)
},