This commit is contained in:
romankko2 committed 2023-04-05 17:56:02 +02:00
1 parent ebc27a9ae2
commit 6a76e2e6e6
4 files changed
+18 -6

No files matched your search

+3 -1
View File
@@ -8,10 +8,12 @@
<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'
export default {
components: {
ASearchResultTeam
ASearchResultTeam,
ASearchResultTasks
},
data() {
@@ -72,16 +72,19 @@ export default {
const normalizedValue = this._normalize(option.value)
return normalizedValue.includes(normalizedSearch)
// return normalizedSearch == normalizedValue.slice(0, normalizedSearch.length)
})
if (!filteredOptions[0])
return null
// const s = filteredOptions[0].value.split(' ')
// filteredOptions[0].value = s[1] + ' ' + s[0]
const suggestion = {
...filteredOptions[0],
_suggestionHiddenPart: filteredOptions[0].value.slice(0, normalizedSearch.length),
_suggestionShownPart: filteredOptions[0].value.slice(normalizedSearch.length, filteredOptions[0].value.length)
}
return suggestion
@@ -64,13 +64,11 @@
</div>
</div>
<div v-else class="custom-event-body w-100 h-100 d-flex flex-column justify-space-between" :class="{'short-event' : getEventLenght(event) <= 9000000, 'mini-event' : getEventLenght(event) <= 5400000, 'micro-event' : getEventLenght(event) <= 3600000}" :style="{backgroundColor: event.color || event.subtask.color}">
<div v-else-if="event.blocker?.type != 'home_office'" class="custom-event-body w-100 h-100 d-flex flex-column justify-space-between" :class="{'short-event' : getEventLength(event) <= 9000000, 'mini-event' : getEventLength(event) <= 5400000, 'micro-event' : getEventLength(event) <= 3600000}" :style="{backgroundColor: event.color || event.subtask.color}">
<div class="event-content" :class="event.type || 'subtask'">
<div v-if="event.blocker.type == 'free_day' || 'vacation' || 'adhoc'">
<template v-if="event.type == 'blocker'">
<h3>{{ event.blocker.name }}</h3>
</template>
</div>
<template v-else>
<small v-if="event.subtask.project_code" class="project-code">{{ event.subtask.project_code }}</small>
@@ -206,7 +204,7 @@ export default {
return date.toLocaleDateString('sk-SK')
},
getEventLenght(event) {
getEventLength(event) {
return event.end.getTime() - event.start.getTime()
},
@@ -10,6 +10,15 @@
<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-autocomplete
clearable
label="Vyhľadať zamestnanca"
:items="[...enrichedEmployees]"
item-title="_fullName"
item-value="id"
variant="solo"
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" />
<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" />