[Mocks] Changed names

This commit is contained in:
Matej Glasnák committed 2022-12-12 17:06:25 +01:00
1 parent db35cff20d
commit b89ac1c343
15 files changed
+116 -75

No files matched your search

@@ -18,7 +18,7 @@
<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">SUB TASK</v-list-item>
<v-list-item class="cursor-pointer hover-background" :disabled="true">SUB TASK</v-list-item>
<v-list-item class="cursor-pointer hover-background" @click="createTeamDialog = true">TÍM</v-list-item>
<v-list-item class="cursor-pointer hover-background" @click="createBlockerDialog = true">BLOCKER</v-list-item>
</v-list>
@@ -62,6 +62,7 @@
select-text="Vybrať"
cancel-text="Zrušiť"
placeholder="Trvanie od - do"
:start-time="startTime"
range
/>
</v-card-actions>
@@ -90,7 +90,7 @@
</p>
</v-text-field>
<Z-autocomplete
<Z-autocomplete
v-if="showAddEmployeeInput"
:options="employeesOptions"
:validations="v$.masterTask.employees"
@@ -165,6 +165,7 @@ export default {
v$: useVuelidate(),
preventInputFocus: false,
teams: null,
employees: null,
selectedTeam: '',
showAddEmployeeInput: false,
mrenka: null
@@ -186,7 +187,8 @@ export default {
async created() {
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.masterTask = await this.$axios.get_auth_data(`v1/master-task/${this.masterTaksId}`)
// this.selectedTeam = `${this.masterTask.team.name} - ${this.masterTask.team.id}`)
@@ -198,7 +200,7 @@ export default {
methods: {
async save() {
if (!(await this.v$.$validate())) return console.log(this.v$)
try {
if (this.masterTask.id)
await this._update()
@@ -229,7 +231,7 @@ export default {
},
employeeSelected(selectedOption) {
const employee = this.masterTask.team.employees.find((empl) => empl.id == selectedOption.key)
const employee = this.employees.find((empl) => empl.id == selectedOption.key)
this.masterTask.employees.push(employee)
this.showAddEmployeeInput = false
},
@@ -273,7 +275,7 @@ export default {
const selectedEmployeesIds = this.masterTask.employees.map(
(employee) => employee.id
)
const employees = this.masterTask.team.employees?.filter(
const employees = this.employees.filter(
(employee) => !selectedEmployeesIds.includes(employee.id)
) || []
@@ -298,8 +300,8 @@ export default {
watch: {
selectedTeam() {
this.masterTask.team = this.teams.find(team => `${team.name} - ${team.id}` == this.selectedTeam)
console.log(this.masterTask)
this.masterTask.team = this.teams.find(team => `${team.name} - ${team.id}` == this.selectedTeam)
this.masterTask.employees = this.masterTask.team.employees
}
}
}
@@ -18,7 +18,7 @@
<td>{{ (task.remaining_time / 1000 / 60 / 60).toFixed(2) }} h</td>
<td class="task-action">
<div class="d-flex justify-start">
<img class="pencil-icon" :src="require('@/plugins/tm@overview/_img/pencil-icon.svg')" alt="pencil-icon" />
<img class="pencil-icon" :src="require('@/plugins/tm@overview/_img/pencil-icon.svg')" alt="pencil-icon" :style="{opacity: 0.3}" />
<img class="trash-icon" :src="require('@/plugins/tm@overview/_img/trash-icon.svg')" alt="trash-icon" @click.stop="showDeleteModal = { task }" />
<Z-delete-task-modal v-if="showDeleteModal" :visible="showDeleteModal ? true : false" :task="showDeleteModal.task" @close="showDeleteModal = null" />
@@ -16,7 +16,7 @@
<td>{{ task.duration / 1000 / 60 / 60 }} h</td>
<td class="task-action">
<div class="d-flex justify-start">
<img class="pencil-icon" :src="require('@/plugins/tm@overview/_img/pencil-icon.svg')" alt="pencil-icon">
<img class="pencil-icon" :src="require('@/plugins/tm@overview/_img/pencil-icon.svg')" alt="pencil-icon" :style="{opacity: 0.3}">
<img class="trash-icon" :src="require('@/plugins/tm@overview/_img/trash-icon.svg')" alt="trash-icon" @click.stop="showDeleteModal = { task }">
<Z-delete-task-modal v-if="showDeleteModal" :visible="showDeleteModal ? true : false" :task="showDeleteModal.task" @close="showDeleteModal = null" />