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
5220ec9bc1
14 files changed
+94
-93
No files matched your search
File renamed without changes.
@@ -67,6 +67,7 @@ const options: Options = {
|
|||||||
'POST v1/teams/(id)': true,
|
'POST v1/teams/(id)': true,
|
||||||
'DELETE v1/teams/(id)': true,
|
'DELETE v1/teams/(id)': true,
|
||||||
// 'GET v1/teams': true,
|
// 'GET v1/teams': true,
|
||||||
|
'GET v1/teamsx': true,
|
||||||
'POST v1/teams': true,
|
'POST v1/teams': true,
|
||||||
|
|
||||||
'GET v1/employees': false,
|
'GET v1/employees': false,
|
||||||
|
|||||||
@@ -29,11 +29,11 @@
|
|||||||
<v-btn class="menu-dropdown" v-bind="props">
|
<v-btn class="menu-dropdown" v-bind="props">
|
||||||
<div class="d-flex justify-between align-center">
|
<div class="d-flex justify-between align-center">
|
||||||
<p class="employee-select-avatar d-flex justify-center align-center" @click.stop="$router.push({name: 'Dashboard - User'})">
|
<p class="employee-select-avatar d-flex justify-center align-center" @click.stop="$router.push({name: 'Dashboard - User'})">
|
||||||
{{ user.name.charAt(0) + user.surname.charAt(0) }}
|
{{ user.name?.charAt(0) || '' + user.surname?.charAt(0) || '' }}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<span class="employee-name ml-4">{{ `${user.name} ${user.surname}` }}</span>
|
<span class="employee-name ml-4">{{ `${user.name} ${user.surname || ''}` }}</span>
|
||||||
<v-icon class="ml-3" icon="mdi-chevron-down" size="x-small"></v-icon>
|
<v-icon class="ml-3" icon="mdi-chevron-down" size="x-small"></v-icon>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -72,16 +72,16 @@ export default {
|
|||||||
ZSubTaskModal
|
ZSubTaskModal
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
|
||||||
...mapGetters('auth', ['user']),
|
|
||||||
},
|
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
search: ''
|
search: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
computed: {
|
||||||
|
...mapGetters('auth', ['user']),
|
||||||
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
async logOut() {
|
async logOut() {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<A-sidemenu ref="sidemenu" />
|
<A-sidemenu ref="sidemenu" />
|
||||||
|
|
||||||
<v-app @click="eventBus.emit('close-menu')" class="split-pane-right-side">
|
<v-app @click="eventBus.emit('close-menu')" class="split-pane-right-side">
|
||||||
<!-- <A-header /> -->
|
<A-header />
|
||||||
|
|
||||||
<div class="main-content">
|
<div class="main-content">
|
||||||
<router-view id="main-content" />
|
<router-view id="main-content" />
|
||||||
@@ -19,7 +19,7 @@ import AHeader from './_components/a-header.vue'
|
|||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
ASidemenu,
|
ASidemenu,
|
||||||
// AHeader
|
AHeader
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
async _getTeams() {
|
async _getTeams() {
|
||||||
this.teams = await this.$axios.get_auth_data('v1/teams')
|
this.teams = await this.$axios.get_auth_data('v1/teamsx')
|
||||||
this.teams.forEach(team => {
|
this.teams.forEach(team => {
|
||||||
this.teamsNames.push(team.name)
|
this.teamsNames.push(team.name)
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
<v-text-field
|
<v-text-field
|
||||||
@focus="onInputFocus"
|
@focus="onInputFocus"
|
||||||
class="modal-input"
|
class="modal-input"
|
||||||
label="Názov blocker"
|
label="Názov blockeru"
|
||||||
:class="{ error: v$.blocker.name.$errors.length }"
|
:class="{ error: v$.blocker.name.$errors.length }"
|
||||||
:hint="
|
:hint="
|
||||||
v$.blocker.name.$errors
|
v$.blocker.name.$errors
|
||||||
@@ -100,6 +100,24 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
computed: {
|
||||||
|
employeesOptions() {
|
||||||
|
const selectedEmployeesIds = this.blocker.employees.map(
|
||||||
|
(employee) => employee.id
|
||||||
|
)
|
||||||
|
const employees = this.allEmployees.filter(
|
||||||
|
(employee) => !selectedEmployeesIds.includes(employee.id)
|
||||||
|
)
|
||||||
|
|
||||||
|
return employees.map((employee) => {
|
||||||
|
return {
|
||||||
|
key: employee.id,
|
||||||
|
value: `${employee.name} ${employee.surname}`,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
validations() {
|
validations() {
|
||||||
return {
|
return {
|
||||||
blocker: {
|
blocker: {
|
||||||
@@ -210,24 +228,6 @@ export default {
|
|||||||
return employee
|
return employee
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
|
||||||
|
|
||||||
computed: {
|
|
||||||
employeesOptions() {
|
|
||||||
const selectedEmployeesIds = this.blocker.employees.map(
|
|
||||||
(employee) => employee.id
|
|
||||||
)
|
|
||||||
const employees = this.allEmployees.filter(
|
|
||||||
(employee) => !selectedEmployeesIds.includes(employee.id)
|
|
||||||
)
|
|
||||||
|
|
||||||
return employees.map((employee) => {
|
|
||||||
return {
|
|
||||||
key: employee.id,
|
|
||||||
value: `${employee.name} ${employee.surname}`,
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -348,12 +348,12 @@ export default {
|
|||||||
|
|
||||||
async created() {
|
async created() {
|
||||||
try {
|
try {
|
||||||
this.teams = await this.$axios.get_auth_data('v1/teams')
|
this.teams = await this.$axios.get_auth_data('v1/teamsx')
|
||||||
this.employees = await this.$axios.get_auth_data('v1/employees')
|
this.employees = await this.$axios.get_auth_data('v1/employees')
|
||||||
// this.masterTask = await this.$axios.get_auth_data(`v1/master-task/${this.masterTaksId}`)
|
// this.masterTask = await this.$axios.get_auth_data(`v1/master-task/${this.masterTaksId}`)
|
||||||
// this.selectedTeam = `${this.masterTask.team.name} - ${this.masterTask.team.id}`)
|
// this.selectedTeam = `${this.masterTask.team.name} - ${this.masterTask.team.id}`)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.$toast(error)
|
this.$toast.error(error)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -35,18 +35,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
|
||||||
showModal() {
|
|
||||||
this.visible = true
|
|
||||||
},
|
|
||||||
|
|
||||||
close() {
|
|
||||||
this.visible = false
|
|
||||||
this.$emit('close', this.blocker)
|
|
||||||
this.blocker = null
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
show: {
|
show: {
|
||||||
get() {
|
get() {
|
||||||
@@ -57,6 +45,18 @@ export default {
|
|||||||
if (!value) this.$emit('close')
|
if (!value) this.$emit('close')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
showModal() {
|
||||||
|
this.visible = true
|
||||||
|
},
|
||||||
|
|
||||||
|
close() {
|
||||||
|
this.visible = false
|
||||||
|
this.$emit('close', this.blocker)
|
||||||
|
this.blocker = null
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -345,7 +345,7 @@ export default {
|
|||||||
this.masterTasks = await this.$axios.get_auth_data('v1/master-tasks')
|
this.masterTasks = await this.$axios.get_auth_data('v1/master-tasks')
|
||||||
this.employees = await this.$axios.get_auth_data('v1/employees')
|
this.employees = await this.$axios.get_auth_data('v1/employees')
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.$toast(error)
|
this.$toast.error(error)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -382,7 +382,7 @@ export default {
|
|||||||
this.close()
|
this.close()
|
||||||
this.$router.push({ name: 'Dashboard - Tasks' })
|
this.$router.push({ name: 'Dashboard - Tasks' })
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.$toast(error)
|
this.$toast.error(error)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -34,6 +34,18 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
computed: {
|
||||||
|
show: {
|
||||||
|
get() {
|
||||||
|
return this.visible
|
||||||
|
},
|
||||||
|
|
||||||
|
set(value) {
|
||||||
|
if (!value) this.$emit('close')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
async complete() {
|
async complete() {
|
||||||
try {
|
try {
|
||||||
@@ -49,18 +61,6 @@ export default {
|
|||||||
this.$toast.error(error)
|
this.$toast.error(error)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
|
|
||||||
computed: {
|
|
||||||
show: {
|
|
||||||
get() {
|
|
||||||
return this.visible
|
|
||||||
},
|
|
||||||
|
|
||||||
set(value) {
|
|
||||||
if (!value) this.$emit('close')
|
|
||||||
}
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -33,17 +33,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
|
||||||
async deleteTeam() {
|
|
||||||
try {
|
|
||||||
await this.$axios.delete(`v1/teams/${this.team.id}`)
|
|
||||||
this.show = false
|
|
||||||
} catch (error) {
|
|
||||||
this.$toast.error(error)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
show: {
|
show: {
|
||||||
get() {
|
get() {
|
||||||
@@ -54,6 +43,17 @@ export default {
|
|||||||
if (!value) this.$emit('close')
|
if (!value) this.$emit('close')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
async deleteTeam() {
|
||||||
|
try {
|
||||||
|
await this.$axios.delete(`v1/teams/${this.team.id}`)
|
||||||
|
this.show = false
|
||||||
|
} catch (error) {
|
||||||
|
this.$toast.error(error)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -29,20 +29,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
async created() {
|
|
||||||
try {
|
|
||||||
this.employees = await this.$axios.get_auth_data('v1/employees')
|
|
||||||
} catch (error) {
|
|
||||||
this.$toast(error)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
methods: {
|
|
||||||
onInput() {
|
|
||||||
this.$emit('queryChange', this.searchQuery)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
allEmployees() {
|
allEmployees() {
|
||||||
const employees = this.employees.map((employee) => {
|
const employees = this.employees.map((employee) => {
|
||||||
@@ -51,6 +37,20 @@ export default {
|
|||||||
return employees
|
return employees
|
||||||
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
async created() {
|
||||||
|
try {
|
||||||
|
this.employees = await this.$axios.get_auth_data('v1/employees')
|
||||||
|
} catch (error) {
|
||||||
|
this.$toast.error(error)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
onInput() {
|
||||||
|
this.$emit('queryChange', this.searchQuery)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ export default {
|
|||||||
async get_data(url: string, config?: any) {
|
async get_data(url: string, config?: any) {
|
||||||
return axios.get(url, config)
|
return axios.get(url, config)
|
||||||
.then(response => response.data.data)
|
.then(response => response.data.data)
|
||||||
.catch(error => Promise.reject(error.response))
|
.catch(error => Promise.reject(error.response || error))
|
||||||
},
|
},
|
||||||
|
|
||||||
async get_auth_data(url: string, config?: any) {
|
async get_auth_data(url: string, config?: any) {
|
||||||
@@ -29,7 +29,7 @@ export default {
|
|||||||
|
|
||||||
return axios.get(url, config)
|
return axios.get(url, config)
|
||||||
.then(response => Promise.resolve(response.data.data))
|
.then(response => Promise.resolve(response.data.data))
|
||||||
.catch(error => Promise.reject(error.response))
|
.catch(error => Promise.reject(error.response || error))
|
||||||
},
|
},
|
||||||
|
|
||||||
async post(url: string, params = null, config?: any) {
|
async post(url: string, params = null, config?: any) {
|
||||||
@@ -51,7 +51,7 @@ export default {
|
|||||||
|
|
||||||
return axios.post(url, params, config)
|
return axios.post(url, params, config)
|
||||||
.then(response => response.data.data)
|
.then(response => response.data.data)
|
||||||
.catch(error => Promise.reject(error.response))
|
.catch(error => Promise.reject(error.response || error))
|
||||||
},
|
},
|
||||||
|
|
||||||
async post_auth_data(url: string, params = null, config?: any) {
|
async post_auth_data(url: string, params = null, config?: any) {
|
||||||
@@ -59,7 +59,7 @@ export default {
|
|||||||
|
|
||||||
return axios.post(url, params, config)
|
return axios.post(url, params, config)
|
||||||
.then(response => response.data.data)
|
.then(response => response.data.data)
|
||||||
.catch(error => Promise.reject(error.response))
|
.catch(error => Promise.reject(error.response || error))
|
||||||
},
|
},
|
||||||
|
|
||||||
async delete(url: string, config?: any) {
|
async delete(url: string, config?: any) {
|
||||||
@@ -79,7 +79,7 @@ export default {
|
|||||||
async delete_data(url: string, config?: any) {
|
async delete_data(url: string, config?: any) {
|
||||||
return axios.delete(url, config)
|
return axios.delete(url, config)
|
||||||
.then(response => response.data.data)
|
.then(response => response.data.data)
|
||||||
.catch(error => Promise.reject(error.response))
|
.catch(error => Promise.reject(error.response || error))
|
||||||
},
|
},
|
||||||
|
|
||||||
async delete_auth_data(url: string, config?: any) {
|
async delete_auth_data(url: string, config?: any) {
|
||||||
@@ -87,7 +87,7 @@ export default {
|
|||||||
|
|
||||||
return axios.delete(url, config)
|
return axios.delete(url, config)
|
||||||
.then(response => response.data.data)
|
.then(response => response.data.data)
|
||||||
.catch(error => Promise.reject(error.response))
|
.catch(error => Promise.reject(error.response || error))
|
||||||
},
|
},
|
||||||
|
|
||||||
async patch(url: string, params = null, config?: any) {
|
async patch(url: string, params = null, config?: any) {
|
||||||
@@ -107,7 +107,7 @@ export default {
|
|||||||
async patch_data(url: string, params = null, config?: any) {
|
async patch_data(url: string, params = null, config?: any) {
|
||||||
return axios.patch(url, params, config)
|
return axios.patch(url, params, config)
|
||||||
.then(response => response.data.data)
|
.then(response => response.data.data)
|
||||||
.catch(error => Promise.reject(error.response))
|
.catch(error => Promise.reject(error.response || error))
|
||||||
},
|
},
|
||||||
|
|
||||||
async patch_auth_data(url: string, params = null, config?: any) {
|
async patch_auth_data(url: string, params = null, config?: any) {
|
||||||
@@ -115,7 +115,7 @@ export default {
|
|||||||
|
|
||||||
return axios.patch(url, params, config)
|
return axios.patch(url, params, config)
|
||||||
.then(response => response.data.data)
|
.then(response => response.data.data)
|
||||||
.catch(error => Promise.reject(error.response))
|
.catch(error => Promise.reject(error.response || error))
|
||||||
},
|
},
|
||||||
|
|
||||||
async put(url: string, params = null, config?: any) {
|
async put(url: string, params = null, config?: any) {
|
||||||
@@ -135,7 +135,7 @@ export default {
|
|||||||
async put_data(url: string, params = null, config?: any) {
|
async put_data(url: string, params = null, config?: any) {
|
||||||
return axios.put(url, params, config)
|
return axios.put(url, params, config)
|
||||||
.then(response => response.data.data)
|
.then(response => response.data.data)
|
||||||
.catch(error => Promise.reject(error.response))
|
.catch(error => Promise.reject(error.response || error))
|
||||||
},
|
},
|
||||||
|
|
||||||
async put_auth_data(url: string, params = null, config?: any) {
|
async put_auth_data(url: string, params = null, config?: any) {
|
||||||
@@ -143,7 +143,7 @@ export default {
|
|||||||
|
|
||||||
return axios.put(url, params, config)
|
return axios.put(url, params, config)
|
||||||
.then(response => response.data.data)
|
.then(response => response.data.data)
|
||||||
.catch(error => Promise.reject(error.response))
|
.catch(error => Promise.reject(error.response || error))
|
||||||
},
|
},
|
||||||
|
|
||||||
_config(config: any) {
|
_config(config: any) {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div v-if="!content"></div>
|
<div v-if="!content"></div>
|
||||||
<div v-else-if="content?.error">{{ content.error }}</div>
|
<div v-else-if="content.error">{{ content.error }}</div>
|
||||||
<div v-else-if="(typeof content == 'array' && !array.length) || (typeof content == 'object' && !Object.values(content).length)">{{ emptyMessage }}</div>
|
<div v-else-if="(typeof content == 'array' && !array.length) || (typeof content == 'object' && !Object.values(content).length)">{{ emptyMessage }}</div>
|
||||||
<slot v-else></slot>
|
<slot v-else></slot>
|
||||||
</div>
|
</div>
|
||||||
@@ -12,7 +12,7 @@ export default {
|
|||||||
props: {
|
props: {
|
||||||
content: {
|
content: {
|
||||||
type: [Object, Array, Boolean],
|
type: [Object, Array, Boolean],
|
||||||
default: null,
|
default: () => null,
|
||||||
},
|
},
|
||||||
|
|
||||||
emptyMessage: {
|
emptyMessage: {
|
||||||
|
|||||||
Reference in new issue
Block a user