Merge branch 'main' of bitbucket.org:studiotem/jandl-taskmanager-app

This commit is contained in:
StudioTem committed 2023-07-20 13:22:07 +02:00
commit c0d88efdb7
1 file changed
+8 -2
@@ -26,7 +26,8 @@
<div class="d-flex align-center flex-start width-100"> <div class="d-flex align-center flex-start width-100">
<p class="task-badge rounded-pill">{{ timesheet.time }}</p> <p class="task-badge rounded-pill">{{ timesheet.time }}</p>
<p class="ml-5">{{ timesheet.employee_name }} ({{ moment(timesheet.timestamp).format('D.M.YYYY') }})</p> <!-- <p class="ml-5">{{ timesheet.employee_name }} ({{ moment(timesheet.timestamp).format('D.M.YYYY') }})</p> -->
<p class="ml-5">{{ timesheet.employee_name }} ({{ timesheet.timestamp }})</p>
</div> </div>
</div> </div>
</template> </template>
@@ -55,6 +56,7 @@ import errorUtils from '@/plugins/lib@auth/_utils/error.utils'
import useVuelidate from '@vuelidate/core' import useVuelidate from '@vuelidate/core'
import { required, numeric, minValue } from '@vuelidate/validators' import { required, numeric, minValue } from '@vuelidate/validators'
import tmUtils from '@/plugins/tm@_utils/tm.utils' import tmUtils from '@/plugins/tm@_utils/tm.utils'
import { mapGetters } from 'vuex'
export default { export default {
props: { props: {
@@ -89,6 +91,10 @@ export default {
} }
}, },
computed: {
...mapGetters('auth', ['user'])
},
methods: { methods: {
async submit() { async submit() {
if (!await this.v$.$validate()) if (!await this.v$.$validate())
@@ -98,7 +104,7 @@ export default {
subtask.timesheets.push({ subtask.timesheets.push({
id: null, id: null,
employee_id: subtask.employee_id, employee_id: this.user.id,
time: typeof this.form.hours == 'string' ? parseFloat(this.form.hours) : this.form.hours time: typeof this.form.hours == 'string' ? parseFloat(this.form.hours) : this.form.hours
}) })