mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
computed za data
This commit is contained in:
1 parent
8a4a919a29
commit
313de98c91
6 files changed
+68
-68
No files matched your search
@@ -72,16 +72,16 @@ export default {
|
||||
ZSubTaskModal
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapGetters('auth', ['user']),
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
search: ''
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapGetters('auth', ['user']),
|
||||
},
|
||||
|
||||
methods: {
|
||||
async logOut() {
|
||||
try {
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<v-text-field
|
||||
@focus="onInputFocus"
|
||||
class="modal-input"
|
||||
label="Názov blocker"
|
||||
label="Názov blockeru"
|
||||
:class="{ error: v$.blocker.name.$errors.length }"
|
||||
:hint="
|
||||
v$.blocker.name.$errors
|
||||
@@ -100,6 +100,24 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
employeesOptions() {
|
||||
const selectedEmployeesIds = this.blocker.employees.map(
|
||||
(employee) => employee.id
|
||||
)
|
||||
const employees = this.allEmployees.filter(
|
||||
(employee) => !selectedEmployeesIds.includes(employee.id)
|
||||
)
|
||||
|
||||
return employees.map((employee) => {
|
||||
return {
|
||||
key: employee.id,
|
||||
value: `${employee.name} ${employee.surname}`,
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
validations() {
|
||||
return {
|
||||
blocker: {
|
||||
@@ -210,24 +228,6 @@ export default {
|
||||
return employee
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
employeesOptions() {
|
||||
const selectedEmployeesIds = this.blocker.employees.map(
|
||||
(employee) => employee.id
|
||||
)
|
||||
const employees = this.allEmployees.filter(
|
||||
(employee) => !selectedEmployeesIds.includes(employee.id)
|
||||
)
|
||||
|
||||
return employees.map((employee) => {
|
||||
return {
|
||||
key: employee.id,
|
||||
value: `${employee.name} ${employee.surname}`,
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -35,18 +35,6 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
showModal() {
|
||||
this.visible = true
|
||||
},
|
||||
|
||||
close() {
|
||||
this.visible = false
|
||||
this.$emit('close', this.blocker)
|
||||
this.blocker = null
|
||||
},
|
||||
},
|
||||
|
||||
computed: {
|
||||
show: {
|
||||
get() {
|
||||
@@ -57,6 +45,18 @@ export default {
|
||||
if (!value) this.$emit('close')
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
methods: {
|
||||
showModal() {
|
||||
this.visible = true
|
||||
},
|
||||
|
||||
close() {
|
||||
this.visible = false
|
||||
this.$emit('close', this.blocker)
|
||||
this.blocker = null
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -34,6 +34,18 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
show: {
|
||||
get() {
|
||||
return this.visible
|
||||
},
|
||||
|
||||
set(value) {
|
||||
if (!value) this.$emit('close')
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
methods: {
|
||||
async complete() {
|
||||
try {
|
||||
@@ -49,18 +61,6 @@ export default {
|
||||
this.$toast.error(error)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
show: {
|
||||
get() {
|
||||
return this.visible
|
||||
},
|
||||
|
||||
set(value) {
|
||||
if (!value) this.$emit('close')
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -33,17 +33,6 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
async deleteTeam() {
|
||||
try {
|
||||
await this.$axios.delete(`v1/teams/${this.team.id}`)
|
||||
this.show = false
|
||||
} catch (error) {
|
||||
this.$toast.error(error)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
show: {
|
||||
get() {
|
||||
@@ -54,6 +43,17 @@ export default {
|
||||
if (!value) this.$emit('close')
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
methods: {
|
||||
async deleteTeam() {
|
||||
try {
|
||||
await this.$axios.delete(`v1/teams/${this.team.id}`)
|
||||
this.show = false
|
||||
} catch (error) {
|
||||
this.$toast.error(error)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -29,6 +29,16 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
allEmployees() {
|
||||
const employees = this.employees.map((employee) => {
|
||||
return `${employee.name} ${employee.surname}`
|
||||
})
|
||||
return employees
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
async created() {
|
||||
try {
|
||||
this.employees = await this.$axios.get_auth_data('v1/employees')
|
||||
@@ -41,16 +51,6 @@ export default {
|
||||
onInput() {
|
||||
this.$emit('queryChange', this.searchQuery)
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
allEmployees() {
|
||||
const employees = this.employees.map((employee) => {
|
||||
return `${employee.name} ${employee.surname}`
|
||||
})
|
||||
return employees
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in new issue
Block a user