diff --git a/app/src/plugins/app/_theme/_components/modals.sass b/app/src/plugins/app/_theme/_components/modals.sass
index 2e65a34..a31a814 100644
--- a/app/src/plugins/app/_theme/_components/modals.sass
+++ b/app/src/plugins/app/_theme/_components/modals.sass
@@ -15,11 +15,6 @@
.modal-input
width: 100% !important
flex: 0 0 auto
- min-height: 60px
-
- input,
- .v-field
- min-height: 60px
.modal-content
flex: 1 1 100%
diff --git a/app/src/plugins/tm@modal/master-task/z-delete-team-member-modal.vue b/app/src/plugins/tm@modal/master-task/z-delete-team-member-modal.vue
index 5cce74b..85a1b85 100644
--- a/app/src/plugins/tm@modal/master-task/z-delete-team-member-modal.vue
+++ b/app/src/plugins/tm@modal/master-task/z-delete-team-member-modal.vue
@@ -7,7 +7,7 @@
{{ member.name + ' ' + member.surname }} bude odstránený/á z teamu.
@@ -34,18 +34,14 @@ export default {
return {
visible: false,
member: null,
- allMembers: null,
- teamId: null,
team: null
}
},
methods: {
async showModal({ member, team }) {
- this.member = member
- this.allMembers = team.employees
- this.teamId = team.id
- this.team = team
+ this.member = member
+ this.team = team
this.visible = true
},
@@ -53,32 +49,19 @@ export default {
this.visible = false
},
- editDatepicker(type) {
- const calendarElement = document.getElementsByClassName('dp__instance_calendar')[0]
- const switchBtn = calendarElement.lastChild.querySelectorAll('.dp__button')[0]
- if (!calendarElement) return
- if (type == 'date') {
- calendarElement.lastChild.remove()
- } else if (type == 'time') {
- switchBtn.click()
- //calendarElement.lastChild.remove()
- }
- },
-
async deleteMember() {
- const filteredMembers = this.allMembers.filter(obj => obj !== this.member)
- this.team.employees = filteredMembers
+ this.team.employees = [...this.team.employees].filter(employee => employee.id !== this.member.id)
try {
- if (this.teamId) {
- const { team } = await this.$axios.put_auth(`v1/teams/${this.teamId}`, this.team)
+ if (this.team.id) {
+ const { team } = await this.$axios.put_auth(`v1/teams/${this.team.id}`, this.team)
this.$store.commit('tm/update_team', team)
} else {
const { team } = await this.$axios.post_auth(`v1/teams`, this.team)
this.$store.commit('tm/save_team', team)
}
- this.$events.emit('memberDeleted', { filteredMembers })
+ this.$events.emit('master-task:team-member-deleted', { teamId: this.team.id, memberId: this.member.id })
this.closeModal()
} catch (error) {
this.$toast.error(error)
diff --git a/app/src/plugins/tm@modal/master-task/z-master-task-modal.vue b/app/src/plugins/tm@modal/master-task/z-master-task-modal.vue
index 7033095..f67c92f 100644
--- a/app/src/plugins/tm@modal/master-task/z-master-task-modal.vue
+++ b/app/src/plugins/tm@modal/master-task/z-master-task-modal.vue
@@ -14,7 +14,7 @@