mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 22:39:34 +00:00
[Review]
This commit is contained in:
1 parent
79f563a82d
commit
d46a9151fc
27 files changed
+279
-339
No files matched your search
@@ -33,6 +33,7 @@ export default {
|
||||
try {
|
||||
this.employees = await this.$axios.get_auth_data('v1/employees')
|
||||
} catch (error) {
|
||||
// Kravarik: Pridaj toast
|
||||
console.log(error)
|
||||
}
|
||||
},
|
||||
@@ -49,7 +50,7 @@ export default {
|
||||
return `${employee.name} ${employee.surname}`
|
||||
})
|
||||
return employees
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
<img class="pencil-icon" :src="require('@/plugins/tm@overview/_img/pencil-icon.svg')" alt="pencil-icon" :style="{opacity: 0.3}"/>
|
||||
<img class="trash-icon" :src="require('@/plugins/tm@overview/_img/trash-icon.svg')" alt="trash-icon" @click.stop="showDeleteModal = { task }" />
|
||||
|
||||
<!-- Kravarik: Aj tento modal prerob novym sposobom -->
|
||||
<Z-delete-task-modal v-if="showDeleteModal" :visible="showDeleteModal ? true : false" :task="showDeleteModal.task" @close="showDeleteModal = null" />
|
||||
</div>
|
||||
</td>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div>
|
||||
|
||||
<Z-tasks-search @queryChange="filterOngoingTasks" />
|
||||
|
||||
|
||||
<W-loadable :content="ongoingTasks">
|
||||
<A-ongoing-table :tasks="filteredOngoingTasks" />
|
||||
<h6
|
||||
@@ -12,7 +12,7 @@
|
||||
Aktuálnemu hľadaniu nevyhovujú žiadne prebiehajúce úlohy
|
||||
</h6>
|
||||
</W-loadable>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -38,19 +38,22 @@ export default {
|
||||
this.ongoingTasks = await this.$axios.get_auth_data('v1/overview/ongoing-tasks')
|
||||
this.filterOngoingTasks()
|
||||
} catch (error) {
|
||||
// Kravarik: ked to je takto ze idu data do w-loadable tak musis dat this.ongoingTasks = {error}
|
||||
// Ten toast vyhod a to kde nastavujes error musis dat do {} ako v riadku hore lebo ono to pozera if (content.error)
|
||||
this.ongoingTasks = error
|
||||
this.$toast.error(error)
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
// Kravarik: Toto sprav cez computed. A bude tam ze if (!searchQuerry) return this.ongoing tasks. Else to prefiltrujes
|
||||
filterOngoingTasks(searchQuery) {
|
||||
if(!searchQuery) return this.filteredOngoingTasks = this.ongoingTasks
|
||||
this.filteredOngoingTasks = this.ongoingTasks.filter((task) => {
|
||||
return this.filterParams(searchQuery, task.title) || this.filterParams(searchQuery, task.project_code)
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
filterParams(searchQuery, row) {
|
||||
return row.toLowerCase().includes(searchQuery.toLowerCase())
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
<img class="pencil-icon" :src="require('@/plugins/tm@overview/_img/pencil-icon.svg')" alt="pencil-icon" :style="{opacity: 0.3}">
|
||||
<img class="trash-icon" :src="require('@/plugins/tm@overview/_img/trash-icon.svg')" alt="trash-icon" @click.stop="showDeleteModal = { task }">
|
||||
|
||||
<!-- Kravarik: Aj tento modal prerob novym sposobom -->
|
||||
<Z-delete-task-modal v-if="showDeleteModal" :visible="showDeleteModal ? true : false" :task="showDeleteModal.task" @close="showDeleteModal = null" />
|
||||
</div>
|
||||
</td>
|
||||
|
||||
@@ -38,19 +38,22 @@ export default {
|
||||
this.unscheduledTasks = await this.$axios.get_auth_data('v1/overview/unscheduled-tasks')
|
||||
this.filterUnscheduledTasks()
|
||||
} catch (error) {
|
||||
// Kravarik: ked to je takto ze idu data do w-loadable tak musis dat this.ongoingTasks = {error}
|
||||
// Ten toast vyhod a to kde nastavujes error musis dat do {} ako v riadku hore lebo ono to pozera if (content.error)
|
||||
this.unscheduledTasks = error
|
||||
this.$toast.error(error)
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
// Kravarik: Toto sprav cez computed. A bude tam ze if (!searchQuerry) return this.unscheduled tasks. Else to prefiltrujes
|
||||
filterUnscheduledTasks(searchQuery) {
|
||||
if(!searchQuery) return this.filteredUnscheduledTasks = this.unscheduledTasks
|
||||
this.filteredUnscheduledTasks = this.unscheduledTasks.filter((task) => {
|
||||
return this.filterParams(searchQuery, task.title) || this.filterParams(searchQuery, task.project_code)
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
filterParams(searchQuery, row) {
|
||||
return row.toLowerCase().includes(searchQuery.toLowerCase())
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
</v-table>
|
||||
|
||||
<Z-team-modal ref="z-team-modal" />
|
||||
<!-- Kravarik: Aj tento modal prerob novym sposobom -->
|
||||
<Z-delete-team-modal v-if="deleteModal" :visible="deleteModal ? true : false" :team="deleteModal.team" @close="(deleteModal = null)" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -22,6 +22,8 @@ export default {
|
||||
try {
|
||||
this.teams = await this.$axios.get_auth_data('v1/teams')
|
||||
} catch (error) {
|
||||
// Kravarik: ked to je takto ze idu data do w-loadable tak musis dat this.ongoingTasks = {error}
|
||||
// Ten toast vyhod a to kde nastavujes error musis dat do {} ako v riadku hore lebo ono to pozera if (content.error)
|
||||
this.teams = {error: error.data.error}
|
||||
this.$toast.error(error.data.error)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user