This commit is contained in:
romankko2 committed 2023-02-02 11:18:02 +01:00
1 parent 86bea63cdd
commit 3769e846e0
3 files changed
+41 -5

No files matched your search

@@ -0,0 +1,22 @@
.button.primary
background: #7f39fb !important
border-radius: 4px !important
color: #fff !important
height: 50px
width: 100%
flex: 0 0 auto
.button.secondary
color: #6200EE
border: 1px solid #E0E0E0
border-radius: 4px
height: 50px
width: 203px
.button.cancel
border: thin solid rgba(var(--v-border-color), var(--v-border-opacity)) !important
color: #7f39fb !important
.btn-size
height: 35px !important
width: 30px !important
@@ -233,7 +233,7 @@
</v-col>
<v-col cols="7">
<v-sheet class="ma-2">
<p :class="masterTask.worked_time > masterTask.duration ? 'text-red-darken-4': 'text-black'">{{ (masterTask.worked_time).toFixed(2) }} h</p>
<p :class="masterTask.time_worked > masterTask.duration ? 'text-red-darken-4': 'text-black'">{{ (masterTask.time_worked).toFixed(2) }} h</p>
</v-sheet>
</v-col>
</v-row>
@@ -251,7 +251,7 @@
</v-col>
<v-col cols="7">
<v-sheet class="ma-2">
<p :class="masterTask.worked_time > masterTask.duration ? 'text-red-darken-4': 'text-black'">{{ (masterTask.duration - masterTask.worked_time).toFixed(2) }} h</p>
<p :class="masterTask.time_worked > masterTask.duration ? 'text-red-darken-4': 'text-black'">{{ (masterTask.duration - masterTask.time_worked).toFixed(2) }} h</p>
</v-sheet>
</v-col>
</v-row>
@@ -371,7 +371,18 @@ export default {
try {
this.teams = await this.$axios.get_auth_data('v1/teams')
this.employees = await this.$axios.get_auth_data('v1/employees')
const employees = await this.$axios.get_auth_data('v1/employees')
this.employees = tmUtils.enrichEmployeesByFullName(employees)
if (masterTask?.id) {
this.masterTask = await this.$axios.get_auth_data(`v1/mastertasks/${masterTask.id}`)
console.log(this.masterTask)
this.teamSelect = this.masterTask.team.id
} else {
this.masterTask = {team: {}, employees: []}
}
this.editMode = (editMode || !this.masterTask.id)
} catch (error) {
this.$toast.error(error)
}
@@ -404,7 +415,11 @@ export default {
try {
if (this.masterTask.id)
<<<<<<< requests
await this._update()
=======
await this.$axios.patch_auth(`v1/mastertasks/${this.masterTask.id}`, this.masterTask)
>>>>>>> local
else
await this._create()
@@ -435,8 +435,7 @@ export default {
this.close()
} else await this._create()
this.close()
this.$router.push({ name: 'Dashboard - Tasks' })
this.closeModal()
} catch (error) {
this.$toast.error(error)
}