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