This commit is contained in:
romankko2 committed 2023-04-06 14:49:07 +02:00
1 parent 44ea5c5927
commit 07595eb34a
3 files changed
+30 -21

No files matched your search

@@ -5,13 +5,13 @@
<tbody>
<tr v-for="subtask in subtasks" :key="subtask.id">
<td>{{ subtask.project_code }}</td>
<td>{{ subtask.title }}</td>
<td>
<td>{{ subtask.master_task }}</td>
<!-- <td>
<p>{{ subtask.user.name + subtask.user.surname }}</p>
<p class="employee-avatar d-flex justify-center align-center">
{{ subtask.user.name.charAt(0) }}
</p>
</td>
</td> -->
<td class="task-action">
<div class="d-flex justify-start">
<img class="pencil-icon" :src="require('@/plugins/app/_img/icons/checkmark.svg')" alt="checkmark-icon">
+16 -10
View File
@@ -8,7 +8,7 @@
<script>
import { debounce } from 'lodash-es'
import ASearchResultTeam from '@/plugins/lib@search/search/_components/a-search-result-team.vue'
import ASearchResultTasks from '@/plugins/lib@search/search/_components/a-seach-result-task.vue'
import ASearchResultTasks from '@/plugins/lib@search/search/_components/a-search-result-task.vue'
export default {
components: {
@@ -24,21 +24,27 @@ export default {
},
created() {
try {
this.searchResults = this.$axios.get_auth_data('v1/search')
} catch (error) {
this.$toast.error(error)
}
this.$events.on('onSearch', (search) => {
this.search = search
})
},
watch: {
search(newVal) {
this.updateSearchResults(newVal)
}
},
methods: {
debounceSearch: debounce(function () {
this.search()
}, 300),
updateSearchResults: debounce(async function (search) {
try {
this.searchResults = await this.$axios.get_auth(`v1/search?q=${search}`)
// const { mastertasks: mastertasks.data, subtasks: subtasks.data, teams: teams.data}
console.log(this.searchResults)
} catch (error) {
this.$toast.error(error)
}
}, 500)
}
}
</script>