[review, add time modal]

This commit is contained in:
romankko2 committed 2023-01-13 15:41:57 +01:00
1 parent 90cd75349c
commit 17a044b118
19 files changed
+228 -158

No files matched your search

@@ -353,8 +353,7 @@ export default {
// this.masterTask = await this.$axios.get_auth_data(`v1/master-task/${this.masterTaksId}`)
// this.selectedTeam = `${this.masterTask.team.name} - ${this.masterTask.team.id}`)
} catch (error) {
// Kravarik: Pridaj toast
console.log(error)
this.$toast(error)
}
},
@@ -0,0 +1,70 @@
<template>
<v-dialog v-model="show" max-width="650">
<v-card>
<div class="d-flex justify-space-between align-center">
<h1>Prosím zadajte odpracovaný čas</h1>
<v-icon
@click.stop="close()"
icon="mdi-close"
size="large"
></v-icon>
</div>
<v-card-actions class="mt-10 d-flex justify-start align-center">
<v-text-field
class="modal-input"
label="Odpracovaný čas"
variant="solo"
type="number"
placeholder="h"
append-inner-icon="mdi-timer-outline"
></v-text-field>
</v-card-actions>
<v-btn class="z-btn mt-5">Potvrdiť</v-btn>
</v-card>
</v-dialog>
</template>
<script>
export default {
emits: ['close'],
data() {
return {
visible: false
}
},
methods: {
showModal() {
this.visible = true
},
close() {
this.visible = false
this.$emit('close', this.blocker)
this.blocker = null
},
},
computed: {
show: {
get() {
return this.visible
},
set(value) {
if (!value) this.$emit('close')
}
},
}
}
</script>
<style lang="sass" scoped>
.z-btn
height: 48px !important
h1
font-size: 34px
</style>
@@ -241,7 +241,7 @@
<v-col cols="7">
<v-sheet class="ma-2">
<v-text-field
v-model="task.nieco"
v-model="task.spent_time"
class="modal-input"
variant="solo"
type="number"
@@ -264,7 +264,7 @@
</v-col>
<v-col cols="7">
<v-sheet class="ma-2">
<p>{{ task.remaining_time }} h</p>
<p>{{ remaining_time }} h</p>
</v-sheet>
</v-col>
</v-row>
@@ -345,8 +345,7 @@ export default {
this.masterTasks = await this.$axios.get_auth_data('v1/master-tasks')
this.employees = await this.$axios.get_auth_data('v1/employees')
} catch (error) {
// Kravarik: Pridaj toast
console.log(error)
this.$toast(error)
}
},
@@ -120,6 +120,20 @@ export default {
}
},
async create(team = null) {
if (team) {
this.team = team
await this._load()
} else {
this.team = {
name: '',
employees: []
}
}
this.visible = true
},
close() {
this.visible = false
this.$emit('close', this.team)