[Mocks] Changed names

This commit is contained in:
Matej Glasnák committed 2022-12-12 17:06:25 +01:00
1 parent db35cff20d
commit b89ac1c343
15 files changed
+113 -72

No files matched your search

+3 -3
View File
@@ -2,9 +2,9 @@
"data": { "data": {
"user": { "user": {
"id": 1, "id": 1,
"name": "Matej", "name": "Rastislav",
"surname": "Glasnak", "surname": "Kuttner",
"email": "glasnak@wezeo.com", "email": "rastislav.kuttner@jandl.com",
"work_hours_from": "08:00", "work_hours_from": "08:00",
"work_hours_to": "16:00" "work_hours_to": "16:00"
} }
+3 -3
View File
@@ -2,9 +2,9 @@
"data": { "data": {
"user": { "user": {
"id": 1, "id": 1,
"name": "Matej", "name": "Rastislav",
"surname": "Glasnak", "surname": "Kuttner",
"email": "glasnak@wezeo.com", "email": "rastislav.kuttner@jandl.com",
"work_hours_from": "08:00", "work_hours_from": "08:00",
"work_hours_to": "16:00" "work_hours_to": "16:00"
} }
+3 -3
View File
@@ -3,9 +3,9 @@
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczpcL1wvZ2FtaXNmZXJhLndlemVvLmRldlwvY21zXC9hcGlcL3YxXC9hdXRoXC9sb2dpbiIsImlhdCI6MTYxNjQzNTEzMCwiZXhwIjoxNjE2NTIxNTMwLCJuYmYiOjE2MTY0MzUxMzAsImp0aSI6IlJtQmRQNnpDWXJsYWM5d3kiLCJzdWIiOjIsInBydiI6IjFkMDE2ZjgxZmMwNzljMzJkMzY2MDZkYThjOGY4Njk1NzQwYjg0OWQifQ.-a7YeLzozzliAP3UMvqgQEkuHDYG4L04Zdo_sezU9L4", "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczpcL1wvZ2FtaXNmZXJhLndlemVvLmRldlwvY21zXC9hcGlcL3YxXC9hdXRoXC9sb2dpbiIsImlhdCI6MTYxNjQzNTEzMCwiZXhwIjoxNjE2NTIxNTMwLCJuYmYiOjE2MTY0MzUxMzAsImp0aSI6IlJtQmRQNnpDWXJsYWM5d3kiLCJzdWIiOjIsInBydiI6IjFkMDE2ZjgxZmMwNzljMzJkMzY2MDZkYThjOGY4Njk1NzQwYjg0OWQifQ.-a7YeLzozzliAP3UMvqgQEkuHDYG4L04Zdo_sezU9L4",
"user": { "user": {
"id": 1, "id": 1,
"name": "Matej", "name": "Rastislav",
"surname": "Glasnak", "surname": "Kuttner",
"email": "glasnak@wezeo.com", "email": "rastislav.kuttner@jandl.com",
"work_hours_from": "08:00", "work_hours_from": "08:00",
"work_hours_to": "16:00" "work_hours_to": "16:00"
} }
+36 -6
View File
@@ -2,20 +2,50 @@
"data": [ "data": [
{ {
"id": 1, "id": 1,
"name": "Matej", "name": "Rastislav",
"surname": "Glasnak" "surname": "Kuttner"
}, },
{ {
"id": 2, "id": 2,
"name": "Mate", "name": "Lenka",
"surname": "Klempa" "surname": "Nemeckova"
}, },
{ {
"id": 3, "id": 3,
"name": "Marek", "name": "Peter",
"surname": "Guspan" "surname": "Bucan"
},
{
"id": 4,
"name": "Viliam",
"surname": "Sedivy"
},
{
"id": 5,
"name": "Pavel",
"surname": "Gajdos"
},
{
"id": 6,
"name": "Francesca",
"surname": "Spinelli"
},
{
"id": 7,
"name": "Simona",
"surname": "Tremkova"
},
{
"id": 8,
"name": "Matej",
"surname": "Macho"
} }
], ],
"status": 200 "status": 200
+2 -2
View File
@@ -1,8 +1,8 @@
{ {
"data": { "data": {
"id": 1, "id": 1,
"name": "Matej", "name": "Rastislav",
"surname": "Glasnak", "surname": "Kuttner",
"work_hours_from": "08:00", "work_hours_from": "08:00",
"work_hours_to": "19:00", "work_hours_to": "19:00",
"unscheduled_times": [ "unscheduled_times": [
+4 -4
View File
@@ -6,8 +6,8 @@
{ {
"user": { "user": {
"id": 1, "id": 1,
"name": "Matej", "name": "Rastislav",
"surname": "Glasnak", "surname": "Kuttner",
"work_hours_from": "08:00", "work_hours_from": "08:00",
"work_hours_to": "16:00" "work_hours_to": "16:00"
}, },
@@ -42,8 +42,8 @@
{ {
"user": { "user": {
"id": 2, "id": 2,
"name": "Mate", "name": "Lenka",
"surname": "Klempa", "surname": "Nemeckova",
"work_hours_from": "09:00", "work_hours_from": "09:00",
"work_hours_to": "17:00" "work_hours_to": "17:00"
}, },
+4 -4
View File
@@ -7,8 +7,8 @@
"title": "Nazov tasku 1", "title": "Nazov tasku 1",
"user": { "user": {
"id": 1, "id": 1,
"name": "Matej", "name": "Rastislav",
"surname": "Glasnak" "surname": "Kuttner"
} }
}, },
@@ -18,8 +18,8 @@
"title": "Nazov tasku 2", "title": "Nazov tasku 2",
"user": { "user": {
"id": 1, "id": 1,
"name": "Matej", "name": "Lenka",
"surname": "Glasnak" "surname": "Nemeckova"
} }
} }
], ],
+25 -29
View File
@@ -6,16 +6,20 @@
"employees": [ "employees": [
{ {
"id": 1, "id": 1,
"name": "Matej", "name": "Rastislav",
"surname": "Glasnak", "surname": "Kuttner"
"hours": 34
}, },
{ {
"id": 2, "id": 2,
"name": "Mate", "name": "Lenka",
"surname": "Klempa", "surname": "Nemeckova"
"hours": 123 },
{
"id": 3,
"name": "Peter",
"surname": "Bucan"
} }
] ]
}, },
@@ -25,22 +29,15 @@
"name": "Team 2", "name": "Team 2",
"employees": [ "employees": [
{ {
"id": 1, "id": 4,
"name": "Lukas", "name": "Peter",
"surname": "Koza", "surname": "Bucan"
"hours": 45
}, },
{ {
"id": 2, "id": 5,
"name": "Mate", "name": "Pavel",
"surname": "Klempa", "surname": "Gajdos"
"hours": 39
},
{
"id": 3,
"name": "Marek",
"surname": "Guspan",
"hours": 14
} }
] ]
}, },
@@ -51,21 +48,20 @@
"employees": [ "employees": [
{ {
"id": 1, "id": 1,
"name": "Roman", "name": "Rastislav",
"surname": "Glasnak", "surname": "Kuttner"
"hours": 90
}, },
{ {
"id": 2, "id": 2,
"name": "Sebastian", "name": "Lenka",
"surname": "Klempa", "surname": "Nemeckova"
"hours": 423
}, },
{ {
"id": 3, "id": 3,
"name": "Jarko", "name": "Peter",
"surname": "Guspan", "surname": "Bucan"
"hours": 44
} }
] ]
} }
+11 -6
View File
@@ -5,15 +5,20 @@
"employees": [ "employees": [
{ {
"id": 1, "id": 1,
"name": "Matej", "name": "Rastislav",
"surname": "Glasnak", "surname": "Kuttner"
"hours": 45
}, },
{ {
"id": 2, "id": 2,
"name": "Mate", "name": "Lenka",
"surname": "Klempa", "surname": "Nemeckova"
"hours": 105 },
{
"id": 3,
"name": "Peter",
"surname": "Bucan"
} }
] ]
}, },
+11 -4
View File
@@ -5,13 +5,20 @@
"employees": [ "employees": [
{ {
"id": 1, "id": 1,
"name": "Matej", "name": "Rastislav",
"surname": "Glasnak" "surname": "Kuttner"
}, },
{ {
"id": 2, "id": 2,
"name": "Mate", "name": "Lenka",
"surname": "Klempa" "surname": "Nemeckova"
},
{
"id": 3,
"name": "Peter",
"surname": "Bucan"
} }
] ]
}, },
@@ -18,7 +18,7 @@
<v-list> <v-list>
<v-list-item class="cursor-pointer hover-background" @click="createMasterTaskDialog = true">MASTER TASK</v-list-item> <v-list-item class="cursor-pointer hover-background" @click="createMasterTaskDialog = true">MASTER TASK</v-list-item>
<v-list-item class="cursor-pointer hover-background">SUB TASK</v-list-item> <v-list-item class="cursor-pointer hover-background" :disabled="true">SUB TASK</v-list-item>
<v-list-item class="cursor-pointer hover-background" @click="createTeamDialog = true">TÍM</v-list-item> <v-list-item class="cursor-pointer hover-background" @click="createTeamDialog = true">TÍM</v-list-item>
<v-list-item class="cursor-pointer hover-background" @click="createBlockerDialog = true">BLOCKER</v-list-item> <v-list-item class="cursor-pointer hover-background" @click="createBlockerDialog = true">BLOCKER</v-list-item>
</v-list> </v-list>
@@ -62,6 +62,7 @@
select-text="Vybrať" select-text="Vybrať"
cancel-text="Zrušiť" cancel-text="Zrušiť"
placeholder="Trvanie od - do" placeholder="Trvanie od - do"
:start-time="startTime"
range range
/> />
</v-card-actions> </v-card-actions>
@@ -165,6 +165,7 @@ export default {
v$: useVuelidate(), v$: useVuelidate(),
preventInputFocus: false, preventInputFocus: false,
teams: null, teams: null,
employees: null,
selectedTeam: '', selectedTeam: '',
showAddEmployeeInput: false, showAddEmployeeInput: false,
mrenka: null mrenka: null
@@ -186,7 +187,8 @@ 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/teams')
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}`)
@@ -229,7 +231,7 @@ export default {
}, },
employeeSelected(selectedOption) { employeeSelected(selectedOption) {
const employee = this.masterTask.team.employees.find((empl) => empl.id == selectedOption.key) const employee = this.employees.find((empl) => empl.id == selectedOption.key)
this.masterTask.employees.push(employee) this.masterTask.employees.push(employee)
this.showAddEmployeeInput = false this.showAddEmployeeInput = false
}, },
@@ -273,7 +275,7 @@ export default {
const selectedEmployeesIds = this.masterTask.employees.map( const selectedEmployeesIds = this.masterTask.employees.map(
(employee) => employee.id (employee) => employee.id
) )
const employees = this.masterTask.team.employees?.filter( const employees = this.employees.filter(
(employee) => !selectedEmployeesIds.includes(employee.id) (employee) => !selectedEmployeesIds.includes(employee.id)
) || [] ) || []
@@ -298,8 +300,8 @@ export default {
watch: { watch: {
selectedTeam() { selectedTeam() {
this.masterTask.team = this.teams.find(team => `${team.name} - ${team.id}` == this.selectedTeam) this.masterTask.team = this.teams.find(team => `${team.name} - ${team.id}` == this.selectedTeam)
console.log(this.masterTask) this.masterTask.employees = this.masterTask.team.employees
} }
} }
} }
@@ -18,7 +18,7 @@
<td>{{ (task.remaining_time / 1000 / 60 / 60).toFixed(2) }} h</td> <td>{{ (task.remaining_time / 1000 / 60 / 60).toFixed(2) }} h</td>
<td class="task-action"> <td class="task-action">
<div class="d-flex justify-start"> <div class="d-flex justify-start">
<img class="pencil-icon" :src="require('@/plugins/tm@overview/_img/pencil-icon.svg')" alt="pencil-icon" /> <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 }" /> <img class="trash-icon" :src="require('@/plugins/tm@overview/_img/trash-icon.svg')" alt="trash-icon" @click.stop="showDeleteModal = { task }" />
<Z-delete-task-modal v-if="showDeleteModal" :visible="showDeleteModal ? true : false" :task="showDeleteModal.task" @close="showDeleteModal = null" /> <Z-delete-task-modal v-if="showDeleteModal" :visible="showDeleteModal ? true : false" :task="showDeleteModal.task" @close="showDeleteModal = null" />
@@ -16,7 +16,7 @@
<td>{{ task.duration / 1000 / 60 / 60 }} h</td> <td>{{ task.duration / 1000 / 60 / 60 }} h</td>
<td class="task-action"> <td class="task-action">
<div class="d-flex justify-start"> <div class="d-flex justify-start">
<img class="pencil-icon" :src="require('@/plugins/tm@overview/_img/pencil-icon.svg')" alt="pencil-icon"> <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 }"> <img class="trash-icon" :src="require('@/plugins/tm@overview/_img/trash-icon.svg')" alt="trash-icon" @click.stop="showDeleteModal = { task }">
<Z-delete-task-modal v-if="showDeleteModal" :visible="showDeleteModal ? true : false" :task="showDeleteModal.task" @close="showDeleteModal = null" /> <Z-delete-task-modal v-if="showDeleteModal" :visible="showDeleteModal ? true : false" :task="showDeleteModal.task" @close="showDeleteModal = null" />