[Refacotr] Button styles

This commit is contained in:
Matej Glasnák committed 2023-02-02 08:36:02 +01:00
1 parent cd2127e028
commit d5900b605e
6 files changed
+51 -25

No files matched your search

@@ -3,7 +3,7 @@
<W-loadable :content="masterTask" class="h-100">
<v-card v-if="editMode" height="100%" class="d-flex flex-column scrolling">
<div class="d-flex justify-space-between align-center modal-header">
<h1>{{ masterTask.id ? 'Upraviť master task' : 'Vytvoriť master task' }}</h1>
<h1>{{ masterTask?.id ? 'Upraviť master task' : 'Vytvoriť master task' }}</h1>
<v-icon
@click.stop="closeModal()"
icon="mdi-close"
@@ -215,7 +215,7 @@
</v-col>
<v-col cols="7">
<v-sheet class="ma-2">
<p>{{ (masterTask.duration).toFixed(2) }} h</p>
<p>{{ masterTask?.duration?.toFixed(2) }} h</p>
</v-sheet>
</v-col>
</v-row>
@@ -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.worked_time > masterTask.duration ? 'text-red-darken-4': 'text-black'">{{ (masterTask.worked_time)?.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.worked_time > masterTask.duration ? 'text-red-darken-4': 'text-black'">{{ (masterTask.duration - masterTask.worked_time)?.toFixed(2) }} h</p>
</v-sheet>
</v-col>
</v-row>
@@ -375,7 +375,7 @@ export default {
this.employees = tmUtils.enrichEmployeesByFullName(employees)
if (masterTask?.id) {
this.masterTask = await this.$axios.get_auth_data(`v1/master-tasks/${masterTask.id}`)
this.masterTask = await this.$axios.get_auth_data(`v1/mastertasks/${masterTask.id}`)
this.teamSelect = this.masterTask.team.id
} else {
this.masterTask = {team: {}, employees: []}
@@ -393,7 +393,7 @@ export default {
try {
if (this.masterTask.id)
await this.$axios.patch_auth(`v1/master-tasks/${this.masterTask.id}`, this.masterTask)
await this.$axios.put_auth(`v1/mastertasks/${this.masterTask.id}`, this.masterTask)
else
await this.$axios.post_auth('v1/mastertasks', this.masterTask)