mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
[teams] napojenie requestov
This commit is contained in:
1 parent
96954845a1
commit
86bea63cdd
9 files changed
+32
-30
No files matched your search
@@ -53,7 +53,7 @@ export default {
|
||||
|
||||
// format masterTasks to event format for calendar
|
||||
events = events.map(event => {
|
||||
const color = this._stringToHexColor(`${event.project_code}${event.name}`)
|
||||
const color = this._stringToHexColor(event.color)
|
||||
|
||||
return {
|
||||
id: event.id,
|
||||
@@ -81,7 +81,7 @@ export default {
|
||||
try {
|
||||
this.teams = await this.$axios.get_auth_data('v1/teams')
|
||||
this.employees = await this.$axios.get_auth_data('v1/employees')
|
||||
this.masterTasks = await this.$axios.get_auth_data('v1/master-tasks')
|
||||
this.masterTasks = await this.$axios.get_auth_data('v1/mastertasks')
|
||||
} catch (error) {
|
||||
this.masterTasks = {error}
|
||||
}
|
||||
@@ -98,19 +98,19 @@ export default {
|
||||
},
|
||||
|
||||
_stringToHexColor(string) {
|
||||
let hash = 0;
|
||||
let hash = 0
|
||||
|
||||
for (let i = 0; i < string.length; i++) {
|
||||
hash = string.charCodeAt(i) + ((hash << 5) - hash);
|
||||
hash = string.charCodeAt(i) + ((hash << 5) - hash)
|
||||
}
|
||||
|
||||
let color = '#';
|
||||
let color = '#'
|
||||
for (let i = 0; i < 3; i++) {
|
||||
let value = (hash >> (i * 8)) & 0xFF;
|
||||
color += ('00' + value.toString(16)).substr(-2);
|
||||
let value = (hash >> (i * 8)) & 0xFF
|
||||
color += ('00' + value.toString(16)).substr(-2)
|
||||
}
|
||||
return color;
|
||||
return color
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
@@ -3,7 +3,7 @@
|
||||
<v-select
|
||||
v-model="selectedEmployee"
|
||||
class="subheader-input"
|
||||
:items="employees"
|
||||
:items="[null, ...employees]"
|
||||
item-title="fullName"
|
||||
item-value="id"
|
||||
label="Zamestnanec"
|
||||
|
||||
Reference in new issue
Block a user