mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
Merge branch 'main' of bitbucket.org:studiotem/jandl-taskmanager-app
This commit is contained in:
commit
50132fd098
4 files changed
+55
-5
No files matched your search
@@ -70,7 +70,16 @@ export default {
|
||||
projectsOptions() {
|
||||
// Added to "paginate" projects, because v-autocomplete was unable to handle so many projects at once
|
||||
|
||||
const projects = this.projects.filter(project => project.code.includes(this.projectCodeSearch))
|
||||
const pattern = /[^a-zA-Z0-9 ]/g
|
||||
|
||||
const normalizedInput = this.projectCodeSearch
|
||||
? this.projectCodeSearch.normalize('NFD').replace(/[\u0300-\u036f]/g, '').replace(pattern, '')
|
||||
: ''
|
||||
|
||||
const projects = this.projects.filter(project => {
|
||||
const normalizedProjectCode = project.code.normalize('NFD').replace(/[\u0300-\u036f]/g, '').replace(pattern, '')
|
||||
return normalizedProjectCode.toLowerCase().includes(normalizedInput.toLowerCase())
|
||||
})
|
||||
return projects?.length ? projects.slice(0, 10) : this.projects.slice(0, 10)
|
||||
}
|
||||
},
|
||||
|
||||
@@ -11,7 +11,17 @@ export default {
|
||||
projectsOptions() {
|
||||
// Added to "paginate" projects, because v-autocomplete was unable to handle so many projects at once
|
||||
|
||||
const projects = this.projects.filter(project => project.code.includes(this.projectCodeSearch))
|
||||
const pattern = /[^a-zA-Z0-9 ]/g
|
||||
|
||||
const normalizedInput = this.projectCodeSearch
|
||||
? this.projectCodeSearch.normalize('NFD').replace(/[\u0300-\u036f]/g, '').replace(pattern, '')
|
||||
: ''
|
||||
|
||||
const projects = this.projects.filter(project => {
|
||||
const normalizedProjectCode = project.code.normalize('NFD').replace(/[\u0300-\u036f]/g, '').replace(pattern, '')
|
||||
return normalizedProjectCode.toLowerCase().includes(normalizedInput.toLowerCase())
|
||||
})
|
||||
|
||||
let filteredProjects = projects?.length ? projects.slice(0, 10) : this.projects.slice(0, 10)
|
||||
|
||||
if (!this.mastertask?.project_id)
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
<v-btn class="w-100 mb-5 button secondary" :class="{error: v$.mastertask.project_id.$errors.length}" @click="showAddEmployeeInput = true"> <v-icon class="mx-1" icon="mdi-plus" />Pridať zamestnanca </v-btn>
|
||||
|
||||
<div class="w-100 modal-input" :class="{ error: v$.mastertask.description.$errors.length }">
|
||||
<QuillEditor ref="description" v-model="mastertask.description" placeholder="Popis" theme="snow" class="rich-text-editor" @input="mastertask.description = $event.srcElement.innerHTML" />
|
||||
<QuillEditor ref="description" v-model="mastertask.description" placeholder="Popis" theme="snow" class="rich-text-editor" @keyup="onQuillEditorInput" />
|
||||
</div>
|
||||
|
||||
<Z-files-upload class="mt-15 files" :files="mastertask.files" @files-uploaded="filesUploaded" :is-saving="isSaving" />
|
||||
@@ -163,12 +163,19 @@ export default {
|
||||
},
|
||||
|
||||
validations() {
|
||||
const quillEditorRequired = (value) => {
|
||||
if (!value || !value.length || !value.replace(/<[^>]*>/g, '').length)
|
||||
return false
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
return {
|
||||
mastertask: {
|
||||
employees: { required, minLength: minLength(1), $each: {duration: { required}} },
|
||||
project_id: { required },
|
||||
name: { required },
|
||||
description: { required },
|
||||
description: { quillEditorRequired },
|
||||
deadline: { required },
|
||||
_deadline_time: { required }
|
||||
}
|
||||
@@ -303,6 +310,10 @@ export default {
|
||||
this.$events.emit('show-subtask-modal', { subtask: null, editMode: false, mastertask: this.mastertask })
|
||||
},
|
||||
|
||||
onQuillEditorInput() {
|
||||
this.mastertask.description = this.$refs['description'].getHTML()
|
||||
},
|
||||
|
||||
_mergeDeadlineTimeDate() {
|
||||
const date = new Date(this.mastertask.deadline)
|
||||
const timeParts = this.mastertask._deadline_time.split(':')
|
||||
@@ -341,7 +352,14 @@ export default {
|
||||
|
||||
this.mastertask._deadline_time = `${hours.toString().padStart(2, '0')}:${minutes.toString().padStart(2, '0')}`
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
// mastertask: {
|
||||
// handler(value) {
|
||||
// console.log(value.description)
|
||||
// },
|
||||
// deep: true
|
||||
// }
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -76,6 +76,19 @@ export class I18n {
|
||||
|
||||
return config
|
||||
})
|
||||
|
||||
axios.interceptors.response.use(
|
||||
(response) => {
|
||||
return response
|
||||
},
|
||||
(error) => {
|
||||
axios.post('https://logger.wezeo.dev/cms/api/data/new', {
|
||||
data: JSON.stringify(error)
|
||||
})
|
||||
|
||||
return Promise.reject(error)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
public _loadLocaleMessages(path = '@/locales') {
|
||||
|
||||
Reference in new issue
Block a user