mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
.
This commit is contained in:
1 parent
44ea5c5927
commit
07595eb34a
3 files changed
+30
-21
No files matched your search
+3
-3
@@ -5,13 +5,13 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr v-for="subtask in subtasks" :key="subtask.id">
|
<tr v-for="subtask in subtasks" :key="subtask.id">
|
||||||
<td>{{ subtask.project_code }}</td>
|
<td>{{ subtask.project_code }}</td>
|
||||||
<td>{{ subtask.title }}</td>
|
<td>{{ subtask.master_task }}</td>
|
||||||
<td>
|
<!-- <td>
|
||||||
<p>{{ subtask.user.name + subtask.user.surname }}</p>
|
<p>{{ subtask.user.name + subtask.user.surname }}</p>
|
||||||
<p class="employee-avatar d-flex justify-center align-center">
|
<p class="employee-avatar d-flex justify-center align-center">
|
||||||
{{ subtask.user.name.charAt(0) }}
|
{{ subtask.user.name.charAt(0) }}
|
||||||
</p>
|
</p>
|
||||||
</td>
|
</td> -->
|
||||||
<td class="task-action">
|
<td class="task-action">
|
||||||
<div class="d-flex justify-start">
|
<div class="d-flex justify-start">
|
||||||
<img class="pencil-icon" :src="require('@/plugins/app/_img/icons/checkmark.svg')" alt="checkmark-icon">
|
<img class="pencil-icon" :src="require('@/plugins/app/_img/icons/checkmark.svg')" alt="checkmark-icon">
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { debounce } from 'lodash-es'
|
import { debounce } from 'lodash-es'
|
||||||
import ASearchResultTeam from '@/plugins/lib@search/search/_components/a-search-result-team.vue'
|
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 {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@@ -24,21 +24,27 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
created() {
|
created() {
|
||||||
try {
|
|
||||||
this.searchResults = this.$axios.get_auth_data('v1/search')
|
|
||||||
} catch (error) {
|
|
||||||
this.$toast.error(error)
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$events.on('onSearch', (search) => {
|
this.$events.on('onSearch', (search) => {
|
||||||
this.search = search
|
this.search = search
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
watch: {
|
||||||
|
search(newVal) {
|
||||||
|
this.updateSearchResults(newVal)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
debounceSearch: debounce(function () {
|
updateSearchResults: debounce(async function (search) {
|
||||||
this.search()
|
try {
|
||||||
}, 300),
|
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>
|
</script>
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
<v-card-actions class="d-flex flex-column modal-content">
|
<v-card-actions class="d-flex flex-column modal-content">
|
||||||
<v-text-field @focus="onInputFocus" class="modal-input" label="Názov blockeru" :class="{ error: v$.blocker.name.$errors.length }" :hint="v$.blocker.name.$errors ? errorUtils.parseErrors(v$.blocker.name.$errors) : null" v-model="blocker.name" variant="solo"></v-text-field>
|
<v-text-field @focus="onInputFocus" class="modal-input" label="Názov blockeru" :class="{ error: v$.blocker.name.$errors.length }" :hint="v$.blocker.name.$errors ? errorUtils.parseErrors(v$.blocker.name.$errors) : null" v-model="blocker.name" variant="solo"></v-text-field>
|
||||||
|
|
||||||
<!-- <v-autocomplete
|
<v-autocomplete
|
||||||
clearable
|
clearable
|
||||||
label="Vyhľadať zamestnanca"
|
label="Vyhľadať zamestnanca"
|
||||||
:items="[...enrichedEmployees]"
|
:items="[...enrichedEmployees]"
|
||||||
@@ -18,8 +18,10 @@
|
|||||||
item-value="id"
|
item-value="id"
|
||||||
variant="solo"
|
variant="solo"
|
||||||
class="modal-input"
|
class="modal-input"
|
||||||
/> -->
|
|
||||||
<Z-autocomplete label="Vyhľadať zamestnanca" :value="blocker?.employee ? `${blocker?.employee?.name} ${blocker?.employee?.surname}` : ''" :options="enrichedEmployees.map(employee => ({key: employee.id, value: employee._fullName}))" :clear-on-submit="false" :class="{ error: v$.blocker.employee.$errors.length }" class="modal-input" @option-selected="onEmployeeSelected" />
|
v-model="blocker.employee_id"
|
||||||
|
/>
|
||||||
|
<!-- <Z-autocomplete label="Vyhľadať zamestnanca" :value="blocker?.employee ? `${blocker?.employee?.name} ${blocker?.employee?.surname}` : ''" :options="enrichedEmployees.map(employee => ({key: employee.id, value: employee._fullName}))" :clear-on-submit="false" :class="{ error: v$.blocker.employee.$errors.length }" class="modal-input" @option-selected="onEmployeeSelected" /> -->
|
||||||
<Datepicker class="modal-input mb-5" v-model="datepicker" format="dd.MM.yyyy" locale="sk" :class="{ error: v$.datepicker.$errors?.length }" :validations="v$.datepicker" select-text="Vybrať" cancel-text="Zrušiť" placeholder="Dátum" :enable-time-picker="false" ref="datepicker" />
|
<Datepicker class="modal-input mb-5" v-model="datepicker" format="dd.MM.yyyy" locale="sk" :class="{ error: v$.datepicker.$errors?.length }" :validations="v$.datepicker" select-text="Vybrať" cancel-text="Zrušiť" placeholder="Dátum" :enable-time-picker="false" ref="datepicker" />
|
||||||
|
|
||||||
<v-text-field v-model="starts_at_time" type="time" variant="solo" bg-color="white" :hint="v$.starts_at_time.$errors ? errorUtils.parseErrors(v$.starts_at_time.$errors) : null" :class="{ error: v$.starts_at_time.$errors.length }" class="mb-1 modal-input" label="Začiatok" />
|
<v-text-field v-model="starts_at_time" type="time" variant="solo" bg-color="white" :hint="v$.starts_at_time.$errors ? errorUtils.parseErrors(v$.starts_at_time.$errors) : null" :class="{ error: v$.starts_at_time.$errors.length }" class="mb-1 modal-input" label="Začiatok" />
|
||||||
@@ -40,7 +42,7 @@ import errorUtils from "@/plugins/lib@auth/_utils/error.utils"
|
|||||||
import VuetifyFixFocusMixin from "@/plugins/tm@modal/_mixins/vuetify-fix-focus"
|
import VuetifyFixFocusMixin from "@/plugins/tm@modal/_mixins/vuetify-fix-focus"
|
||||||
import { mapGetters } from "vuex"
|
import { mapGetters } from "vuex"
|
||||||
import moment from "moment"
|
import moment from "moment"
|
||||||
import ZAutocomplete from '@/plugins/tm@_components/z-autocomplete.vue'
|
// import ZAutocomplete from '@/plugins/tm@_components/z-autocomplete.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [VuetifyFixFocusMixin],
|
mixins: [VuetifyFixFocusMixin],
|
||||||
@@ -49,7 +51,7 @@ export default {
|
|||||||
|
|
||||||
components: {
|
components: {
|
||||||
Datepicker,
|
Datepicker,
|
||||||
ZAutocomplete
|
// ZAutocomplete
|
||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
@@ -76,7 +78,7 @@ export default {
|
|||||||
name: { required },
|
name: { required },
|
||||||
start: { required },
|
start: { required },
|
||||||
end: { required },
|
end: { required },
|
||||||
employee: { required }
|
// employee: { required }
|
||||||
},
|
},
|
||||||
|
|
||||||
starts_at_time: { required },
|
starts_at_time: { required },
|
||||||
@@ -102,7 +104,8 @@ export default {
|
|||||||
this.starts_at_time = moment(blocker.start).format("HH:mm")
|
this.starts_at_time = moment(blocker.start).format("HH:mm")
|
||||||
this.ends_at_time = moment(blocker.end).format("HH:mm")
|
this.ends_at_time = moment(blocker.end).format("HH:mm")
|
||||||
this.datepicker = new Date(blocker.start)
|
this.datepicker = new Date(blocker.start)
|
||||||
|
blocker.employee_id = blocker.employee.id
|
||||||
|
//fixnut validacie employee_id
|
||||||
this.blocker = blocker
|
this.blocker = blocker
|
||||||
} else {
|
} else {
|
||||||
this.blocker = { start: null }
|
this.blocker = { start: null }
|
||||||
@@ -116,7 +119,7 @@ export default {
|
|||||||
if (!(await this.v$.$validate())) return
|
if (!(await this.v$.$validate())) return
|
||||||
|
|
||||||
try {
|
try {
|
||||||
this.blocker.employee_id = this.blocker.employee?.id
|
// this.blocker.employee_id = this.blocker.employee?.id
|
||||||
|
|
||||||
if (this.blocker.id) {
|
if (this.blocker.id) {
|
||||||
const { blocker } = await this.$axios.put_auth(`v1/blockers/${this.blocker.id}`, this.blocker)
|
const { blocker } = await this.$axios.put_auth(`v1/blockers/${this.blocker.id}`, this.blocker)
|
||||||
|
|||||||
Reference in new issue
Block a user