mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 06:20:21 +00:00
full text search subtask, files fixy
This commit is contained in:
1 parent
4e8fa39e34
commit
ddc63f964c
5 files changed
+53
-39
No files matched your search
@@ -113,4 +113,18 @@ const router = createRouter({
|
||||
routes
|
||||
})
|
||||
|
||||
// router.afterEach((to) => {
|
||||
// if (to.fullPath.includes('?master-task')) {
|
||||
// const searchParams = new URLSearchParams(to.fullPath.split('?')[1])
|
||||
// const id = searchParams.get('id')
|
||||
|
||||
// this.$events.emit('show-master-task-modal', { id })
|
||||
// } else if (to.fullPath.includes('?task')) {
|
||||
// const searchParams = new URLSearchParams(to.fullPath.split('?')[1])
|
||||
// const id = searchParams.get('id')
|
||||
|
||||
// this.$events.emit('show-task-modal', { id })
|
||||
// }
|
||||
// })
|
||||
|
||||
export default router
|
||||
@@ -8,16 +8,16 @@
|
||||
<v-icon class="mx-1" icon="mdi-cloud-upload-outline"></v-icon>NAHRAŤ
|
||||
</v-btn>
|
||||
|
||||
<div v-if="files.length" class="m-2 d-flex align-center flex-wrap">
|
||||
<div v-if="uploadedFiles" class="m-2 d-flex align-center flex-wrap">
|
||||
<div
|
||||
v-for="file in files"
|
||||
v-for="file in uploadedFiles"
|
||||
:key="file.name"
|
||||
class="mx-2"
|
||||
>
|
||||
<v-chip class="mt-2">
|
||||
{{ file.name }}
|
||||
<v-icon class="mx-1" icon="mdi-paperclip"></v-icon>
|
||||
<v-icon size="small" icon="mdi-close" @click.stop="remove(files.indexOf(file))"></v-icon>
|
||||
<v-icon size="small" icon="mdi-close" @click.stop="remove(uploadedFiles.indexOf(file))"></v-icon>
|
||||
</v-chip>
|
||||
</div>
|
||||
</div>
|
||||
@@ -28,20 +28,32 @@
|
||||
export default {
|
||||
emit: ['files-uploaded'],
|
||||
|
||||
data() {
|
||||
return {
|
||||
files: [],
|
||||
}
|
||||
},
|
||||
props: {
|
||||
files: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
}
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
uploadedFiles: []
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
this.uploadedFiles = this.files
|
||||
console.log(this.uploadedFiles)
|
||||
},
|
||||
|
||||
methods: {
|
||||
onChange() {
|
||||
this.files = [...this.files, ...this.$refs.fileUpload.files]
|
||||
this.$emit('files-uploaded', this.files)
|
||||
this.uploadedFiles = [...this.uploadedFiles, ...this.$refs.fileUpload.files]
|
||||
this.$emit('files-uploaded', this.uploadedFiles)
|
||||
},
|
||||
|
||||
remove(index) {
|
||||
this.files.splice(index, 1)
|
||||
this.uploadedFiles.splice(index, 1)
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -26,9 +26,9 @@ export default {
|
||||
|
||||
onMasterTaskSelected({ key }) {
|
||||
const masterTask = this.masterTasks.find(masterTask => masterTask.id == key)
|
||||
this.masterTask.name = masterTask.name
|
||||
console.log(masterTask.name)
|
||||
this.masterTask.master_task.id = masterTask.id
|
||||
this.task.master_task.name = masterTask.name
|
||||
this.task.master_task.id = masterTask.id
|
||||
this.task.project_code = masterTask.project_code
|
||||
},
|
||||
|
||||
onEmployeeSelected({ key }) {
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
<QuillEditor ref="description" v-model="masterTask.description" placeholder="Popis" theme="snow" class="rich-text-editor" @input="masterTask.description = $event.srcElement.innerHTML" />
|
||||
</div>
|
||||
|
||||
<Z-files-upload class="mt-15 files" @files-uploaded="filesUploaded" />
|
||||
<Z-files-upload class="mt-15 files" :files="masterTask.files" @files-uploaded="filesUploaded" />
|
||||
</v-card-actions>
|
||||
|
||||
<v-btn class="button primary" @click="save()">{{ masterTask.id ? 'ULOŽIŤ' : 'VYTVORIŤ' }}</v-btn>
|
||||
@@ -122,7 +122,8 @@ export default {
|
||||
projects: null,
|
||||
employees: null,
|
||||
masterTask: null,
|
||||
showAddEmployeeInput: false
|
||||
showAddEmployeeInput: false,
|
||||
date: null,
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -10,36 +10,24 @@
|
||||
<v-card-actions class="d-flex flex-column modal-content">
|
||||
<v-text-field
|
||||
v-model="task.project_code"
|
||||
label="Kód projektu"
|
||||
:value="task.project_code"
|
||||
@focus="onInputFocus"
|
||||
class="modal-input"
|
||||
label="Kód projektu"
|
||||
variant="solo"
|
||||
disabled
|
||||
></v-text-field>
|
||||
|
||||
<!-- <Z-autocomplete
|
||||
<Z-autocomplete
|
||||
label="Master task"
|
||||
:options="masterTasks.map((masterTask) => ({ key: masterTask.id, value: masterTask.name }))"
|
||||
:validations="v$.task.master_task"
|
||||
:validations="v$.task.master_task.id"
|
||||
:clear-on-submit="false"
|
||||
:value="task.master_task.name"
|
||||
:class="{ error: v$.task.master_task.$errors.length }"
|
||||
:value="task.master_task.masterTask_name"
|
||||
:class="{ error: v$.task.master_task.id.$errors.length }"
|
||||
class="modal-input"
|
||||
@option-selected="onMasterTaskSelected"
|
||||
/> -->
|
||||
|
||||
<!-- Toto treba fixnut -->
|
||||
<v-select
|
||||
v-model="task.master_task.id"
|
||||
@focus="onInputFocus"
|
||||
class="modal-input border-select"
|
||||
label="Master task"
|
||||
variant="solo"
|
||||
:items="masterTasks"
|
||||
:class="{ error: v$.task.master_task.id.$errors.length }"
|
||||
item-value="id"
|
||||
item-title="name"
|
||||
></v-select>
|
||||
/>
|
||||
|
||||
<v-select
|
||||
v-model="task.employee_id"
|
||||
@@ -58,9 +46,8 @@
|
||||
v-model="task.timeblocks"
|
||||
format="dd.MM.yyyy, HH:mm"
|
||||
locale="sk"
|
||||
:class="{ error: v$.task.date.$errors.length }"
|
||||
:time-picker-position="'right'"
|
||||
@focus="onDateFocus"
|
||||
:validations="v$.task.date"
|
||||
select-text="Vybrať"
|
||||
cancel-text="Zrušiť"
|
||||
placeholder="Trvanie od - do"
|
||||
@@ -94,7 +81,7 @@
|
||||
/>
|
||||
</div>
|
||||
|
||||
<Z-files-upload class="mt-15 files" @files-uploaded="filesUploaded" />
|
||||
<Z-files-upload class="mt-15 files" :files="task.files" @files-uploaded="filesUploaded" />
|
||||
</v-card-actions>
|
||||
|
||||
<v-btn class="button primary" @click="save()">{{
|
||||
@@ -398,7 +385,7 @@ export default {
|
||||
Datepicker,
|
||||
ZFilesUpload,
|
||||
QuillEditor,
|
||||
// ZAutocomplete
|
||||
ZAutocomplete
|
||||
},
|
||||
|
||||
data() {
|
||||
|
||||
Reference in new issue
Block a user