mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
Merge branch 'main' of https://bitbucket.org/studiotem/jandl-taskmanager-app
This commit is contained in:
commit
26792a85a6
44 files changed
+1039
-43
No files matched your search
@@ -63,14 +63,14 @@ const options: Options = {
|
||||
'POST v1/tasks/(id)': true,
|
||||
'DELETE v1/tasks/(id)': true,
|
||||
|
||||
'GET v1/teams/(id)': true,
|
||||
'GET v1/teams/(id)': false,
|
||||
'POST v1/teams/(id)': true,
|
||||
'DELETE v1/teams/(id)': true,
|
||||
// 'GET v1/teams': true,
|
||||
'GET v1/teamsx': true,
|
||||
'POST v1/teams': true,
|
||||
|
||||
'GET v1/employees': true,
|
||||
'GET v1/employees': false,
|
||||
'GET v1/search': true,
|
||||
'POST v1/tasks': true,
|
||||
|
||||
|
||||
@@ -32,27 +32,30 @@ export default {
|
||||
filteredEvents: []
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
try {
|
||||
const events = await this.$axios.get_auth_data('v1/overview/projects')
|
||||
this.events = events.map((item) => ({
|
||||
id: item.id,
|
||||
title: `${item.project_code} - ${item.name}`,
|
||||
title_html: `${item.project_code} - <b>${item.name}</b>`,
|
||||
start: item.starts_at,
|
||||
end: item.deadline,
|
||||
is_finished: item.is_finished,
|
||||
project_code: item.project_code,
|
||||
backgroundColor: item.color,
|
||||
borderColor: item.color
|
||||
}))
|
||||
this.filteredEvents = this.events.filter((item) => !item.is_finished)
|
||||
} catch (error) {
|
||||
this.$toast.error(error)
|
||||
}
|
||||
created() {
|
||||
this._getData()
|
||||
},
|
||||
methods: {
|
||||
// Kravarik: TODO prepojit filtrovanie na BE
|
||||
async _getData() {
|
||||
try {
|
||||
const events = await this.$axios.get_auth_data('v1/overview/projects')
|
||||
this.events = events.map((item) => ({
|
||||
id: item.id,
|
||||
title: `${item.project_code} - ${item.name}`,
|
||||
title_html: `${item.project_code} - <b>${item.name}</b>`,
|
||||
start: item.starts_at,
|
||||
end: item.deadline,
|
||||
is_finished: item.is_finished,
|
||||
project_code: item.project_code,
|
||||
backgroundColor: item.color,
|
||||
borderColor: item.color
|
||||
}))
|
||||
this.filteredEvents = this.events.filter((item) => !item.is_finished)
|
||||
} catch (error) {
|
||||
this.$toast.error(error)
|
||||
}
|
||||
},
|
||||
|
||||
onFilterChanged(filterValues) {
|
||||
this.filter = filterValues
|
||||
this.filteredEvents = this.events.filter((item) => this.filter.showFinishedTasks || item.is_finished == false)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
v-model="selectedEmployee"
|
||||
class="subheader-input"
|
||||
:items="employees"
|
||||
item-title="name"
|
||||
item-title="fullName"
|
||||
item-value="id"
|
||||
label="Zamestnanec"
|
||||
variant="outlined"
|
||||
@@ -31,6 +31,7 @@
|
||||
|
||||
<script>
|
||||
import { addDays, subDays } from 'date-fns'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
@@ -47,13 +48,14 @@ export default {
|
||||
employees: [],
|
||||
selectedDate: "",
|
||||
|
||||
// Kaluza: Napojit funkcnost
|
||||
selectedEmployee: '',
|
||||
date: new Date()
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapGetters('auth', ['user']),
|
||||
|
||||
time() {
|
||||
return this.unscheduledTime
|
||||
}
|
||||
@@ -74,6 +76,10 @@ export default {
|
||||
|
||||
async _getEmployees() {
|
||||
this.employees = await this.$axios.get_auth_data('v1/employees')
|
||||
this.employees.forEach(employee => {
|
||||
employee.fullName = `${employee.name} ${employee.surname}`
|
||||
if (employee.id == this.user.id) this.selectedEmployee = employee
|
||||
})
|
||||
},
|
||||
|
||||
_getWeek(emitDataChanged = true) {
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
|
||||
<script>
|
||||
import { addDays, subDays } from 'date-fns'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
@@ -47,8 +46,7 @@ export default {
|
||||
return {
|
||||
teams: [],
|
||||
|
||||
// Kaluza: Napojit funkcionalitu
|
||||
selectedTeam: '',
|
||||
selectedTeam: null,
|
||||
|
||||
selectedDate: new Date(),
|
||||
day: new Date(),
|
||||
@@ -57,8 +55,6 @@ export default {
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapGetters('auth', ['user']),
|
||||
|
||||
time() {
|
||||
return this.unscheduledTime
|
||||
},
|
||||
@@ -79,7 +75,7 @@ export default {
|
||||
|
||||
async _getTeams() {
|
||||
this.teams = await this.$axios.get_auth_data('v1/teamsx')
|
||||
// this.selectedTeam()
|
||||
this.selectedTeam = this.teams[0]
|
||||
},
|
||||
|
||||
_getDay(emitDataChanged = true) {
|
||||
|
||||
Reference in new issue
Block a user