[Master Task] Added option to remove current team

This commit is contained in:
Matej Glasnák committed 2024-10-17 08:30:09 +02:00
1 parent be1ac13ef8
commit 7457616e0c
1 file changed
+14 -9
@@ -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>
@@ -446,19 +446,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 +474,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>