mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
Merge branch 'main' of bitbucket.org:studiotem/jandl-taskmanager-app
This commit is contained in:
commit
55cbd27eaf
19 files changed
+199
-97
No files matched your search
@@ -160,4 +160,11 @@ export default {
|
|||||||
.header-sm
|
.header-sm
|
||||||
justify-content: center !important
|
justify-content: center !important
|
||||||
flex-wrap: wrap
|
flex-wrap: wrap
|
||||||
|
|
||||||
|
@media (min-width: 561px) and (max-width: 825px)
|
||||||
|
.header
|
||||||
|
padding: 5px 15px
|
||||||
|
|
||||||
|
.menu-dropdown
|
||||||
|
border: none !important
|
||||||
</style>
|
</style>
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
<img
|
<img
|
||||||
class="py-5 px-5 cursor-pointer"
|
class="py-5 px-5 cursor-pointer"
|
||||||
:src="require('@/plugins/app/_img/jandl-logo.svg')"
|
:src="require('@/plugins/app/_img/jandl-logo.svg')"
|
||||||
alt="jandl-logo"
|
alt="Jandl-logo"
|
||||||
@click="refreshPage()"
|
@click="refreshPage()"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
@@ -88,6 +88,7 @@ export default {
|
|||||||
<style lang="sass" scoped>
|
<style lang="sass" scoped>
|
||||||
ion-item
|
ion-item
|
||||||
font-weight: 500 !important
|
font-weight: 500 !important
|
||||||
|
font-size: 15px
|
||||||
--background: #fff
|
--background: #fff
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
@@ -108,7 +109,7 @@ ion-item
|
|||||||
|
|
||||||
@media (min-width: 992px)
|
@media (min-width: 992px)
|
||||||
ion-menu
|
ion-menu
|
||||||
width: 257px
|
width: 195px
|
||||||
min-width: 257px
|
min-width: 195px
|
||||||
--width: 257px
|
--width: 195px
|
||||||
</style>
|
</style>
|
||||||
@@ -62,6 +62,6 @@ export default {
|
|||||||
|
|
||||||
@media (min-width: 992px)
|
@media (min-width: 992px)
|
||||||
.split-pane-right-side
|
.split-pane-right-side
|
||||||
width: calc(100vw - 257px) !important
|
width: calc(100vw - 195px) !important
|
||||||
max-width: calc(100vw - 257px) !important
|
max-width: calc(100vw - 195px) !important
|
||||||
</style>
|
</style>
|
||||||
@@ -103,4 +103,9 @@ input[type="time"]::-webkit-calendar-picker-indicator
|
|||||||
|
|
||||||
.v-row.subheader
|
.v-row.subheader
|
||||||
.v-input
|
.v-input
|
||||||
height: 40px !important
|
height: 40px !important
|
||||||
|
|
||||||
|
@media (max-width: 534px)
|
||||||
|
.mobile-view
|
||||||
|
flex-direction: column
|
||||||
|
gap: 20px
|
||||||
@@ -17,14 +17,14 @@
|
|||||||
:scroll-to-hour="calConfig.scrollHour"
|
:scroll-to-hour="calConfig.scrollHour"
|
||||||
:split-days="splits"
|
:split-days="splits"
|
||||||
:sticky-split-labels="true"
|
:sticky-split-labels="true"
|
||||||
:min-split-width="220"
|
:min-split-width="140"
|
||||||
@ready="onReady()"
|
@ready="onReady()"
|
||||||
@view-change="weekChanged"
|
@view-change="weekChanged"
|
||||||
@event-drop="eventMoved"
|
@event-drop="eventMoved"
|
||||||
@event-focus="eventFocused"
|
@event-focus="eventFocused"
|
||||||
>
|
>
|
||||||
<template v-slot:split-label="{ split }">
|
<template v-slot:split-label="{ split }">
|
||||||
<div class="w-100 h-100 d-flex flex-column">
|
<div class="colWidth h-100 d-flex flex-column">
|
||||||
<span v-if="split.date" class="d-flex align-center">
|
<span v-if="split.date" class="d-flex align-center">
|
||||||
<img v-if="split.isHomeoffice" :src="require('@/plugins/app/_img/icons/home.svg')" class="mr-2">
|
<img v-if="split.isHomeoffice" :src="require('@/plugins/app/_img/icons/home.svg')" class="mr-2">
|
||||||
<p class="weekday-label">{{ getHeadingDate(split.date) }}</p>
|
<p class="weekday-label">{{ getHeadingDate(split.date) }}</p>
|
||||||
@@ -39,10 +39,10 @@
|
|||||||
</span>
|
</span>
|
||||||
|
|
||||||
<div class="unscheduled-time d-flex align-center text-left" :class="{'vuecal__cell-split--weekend': split.isWeekend}">
|
<div class="unscheduled-time d-flex align-center text-left" :class="{'vuecal__cell-split--weekend': split.isWeekend}">
|
||||||
<div class="unscheduled-time-initials d-flex align-center justify-center me-4">
|
<div class="unscheduled-time-initials d-flex align-center justify-center">
|
||||||
<p>{{ split.initials }}</p>
|
<p>{{ split.initials }}</p>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div class="text-wrap me-4">
|
||||||
<p class="mb-0 mt-0 unscheduled-time-name">{{split.fullname}}</p>
|
<p class="mb-0 mt-0 unscheduled-time-name">{{split.fullname}}</p>
|
||||||
<h1 class="mb-0 mt-0">{{split.unscheduledTime}} h</h1>
|
<h1 class="mb-0 mt-0">{{split.unscheduledTime}} h</h1>
|
||||||
</div>
|
</div>
|
||||||
@@ -58,14 +58,14 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-slot:event="{ event }">
|
<template v-slot:event="{ event }">
|
||||||
<div v-if="event.type == 'non-working-hours'" class="custom-event-body non-working-event w-100 h-100 d-flex flex-column justify-center">
|
<div v-if="event.type == 'non-working-hours'" class="custom-event-body non-working-event colWidth h-100 d-flex flex-column justify-center">
|
||||||
<div class="d-flex justify-center align-center">
|
<div class="d-flex justify-center align-center">
|
||||||
<v-icon icon="mdi-cancel" color="black"></v-icon>
|
<v-icon icon="mdi-cancel" color="black"></v-icon>
|
||||||
<h3 class="mb-0 ms-2">{{ event.title }}</h3>
|
<h3 class="mb-0 ms-2">{{ event.title }}</h3>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-else-if="['subtask', 'blocker', 'adhoc', 'vacation', 'free_day'].includes(event.type)" class="custom-event-body w-100 h-100 d-flex flex-column justify-space-between" :class="{'short-event' : getEventLength(event) <= 9000000, 'mini-event' : getEventLength(event) <= 5400000, 'micro-event' : getEventLength(event) <= 3600000}" :style="{backgroundColor: event._timeblock_is_finished || event.subtask.is_finished ? '#dedfe0' : event.color || event.subtask.color}">
|
<div v-else-if="['subtask', 'blocker', 'adhoc', 'vacation', 'free_day'].includes(event.type)" class="custom-event-body colWidth h-100 d-flex flex-column justify-space-between" :class="{'short-event' : getEventLength(event) <= 9000000, 'mini-event' : getEventLength(event) <= 5400000, 'micro-event' : getEventLength(event) <= 3600000}" :style="{backgroundColor: event._timeblock_is_finished || event.subtask?.is_finished ? '#dedfe0' : event.color || event.subtask?.color}">
|
||||||
<div class="event-content" :class="{'is-blocker': event.isBlocker}">
|
<div class="event-content" :class="{'is-blocker': event.isBlocker}">
|
||||||
<template v-if="event.type == 'subtask'">
|
<template v-if="event.type == 'subtask'">
|
||||||
<small v-if="event.subtask.project_code" class="project-code">{{ event.subtask.project_code }}</small>
|
<small v-if="event.subtask.project_code" class="project-code">{{ event.subtask.project_code }}</small>
|
||||||
@@ -166,7 +166,11 @@ export default {
|
|||||||
is_finished: 0,
|
is_finished: 0,
|
||||||
start: tmUtils.formatDateTimeForBackend(start),
|
start: tmUtils.formatDateTimeForBackend(start),
|
||||||
end: tmUtils.formatDateTimeForBackend(end)
|
end: tmUtils.formatDateTimeForBackend(end)
|
||||||
}]
|
}],
|
||||||
|
timesheets: event.subtask.timesheets.map((timesheet) => {
|
||||||
|
delete timesheet.employee_name
|
||||||
|
return timesheet
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -240,7 +244,7 @@ export default {
|
|||||||
const subtask = event.subtask
|
const subtask = event.subtask
|
||||||
const timeblock = subtask.timeblocks.find(originalTimeblock => originalTimeblock.id == event._timeblock_id)
|
const timeblock = subtask.timeblocks.find(originalTimeblock => originalTimeblock.id == event._timeblock_id)
|
||||||
|
|
||||||
timeblock.is_finished = timeblock.is_finished ? 0 : 1
|
timeblock.is_finished = timeblock?.is_finished ? 0 : 1
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const {data: newTimeblock} = await this.$axios.put_auth(`v1/timeblocks/${timeblock.id}`, timeblock)
|
const {data: newTimeblock} = await this.$axios.put_auth(`v1/timeblocks/${timeblock.id}`, timeblock)
|
||||||
@@ -281,6 +285,12 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="sass" scoped>
|
<style lang="sass" scoped>
|
||||||
|
.colWidth
|
||||||
|
width: 120px
|
||||||
|
|
||||||
|
@media (min-width: 1476px)
|
||||||
|
width: 100% !important
|
||||||
|
|
||||||
.vuecal
|
.vuecal
|
||||||
box-shadow: none !important
|
box-shadow: none !important
|
||||||
|
|
||||||
@@ -350,34 +360,42 @@ export default {
|
|||||||
|
|
||||||
.weekday-label
|
.weekday-label
|
||||||
justify-content: start !important
|
justify-content: start !important
|
||||||
font-size: 24px
|
font-size: 18px
|
||||||
font-weight: 700
|
font-weight: 700
|
||||||
|
|
||||||
.day-name
|
.day-name
|
||||||
text-align: left
|
text-align: left
|
||||||
font-size: 18px
|
font-size: 17px
|
||||||
font-weight: 500
|
font-weight: 500
|
||||||
text-transform: capitalize
|
text-transform: capitalize
|
||||||
|
|
||||||
.unscheduled-time
|
.unscheduled-time
|
||||||
background: rgba(0, 0, 0, 0.04)
|
background: rgba(0, 0, 0, 0.04)
|
||||||
border-radius: 24px
|
border-radius: 24px
|
||||||
padding: 10px 15px
|
padding: 10px 10px
|
||||||
margin-top: 10px
|
margin-top: 10px
|
||||||
|
|
||||||
.unscheduled-time-name
|
.text-wrap
|
||||||
font-weight: 400
|
width: min-content
|
||||||
font-size: 15px
|
margin-left: 12px
|
||||||
|
|
||||||
|
h1
|
||||||
|
font-size: 14px
|
||||||
|
|
||||||
|
p
|
||||||
|
font-weight: 400
|
||||||
|
font-size: 15px
|
||||||
|
line-height: normal
|
||||||
|
|
||||||
.unscheduled-time-initials
|
.unscheduled-time-initials
|
||||||
width: 50px
|
width: 30px
|
||||||
height: 50px
|
height: 30px
|
||||||
background: #6200EE
|
background: #6200EE
|
||||||
border-radius: 50%
|
border-radius: 50%
|
||||||
|
|
||||||
p
|
p
|
||||||
font-weight: 400
|
font-weight: 400
|
||||||
font-size: 20px
|
font-size: 15px
|
||||||
color: white
|
color: white
|
||||||
|
|
||||||
|
|
||||||
@@ -412,6 +430,7 @@ export default {
|
|||||||
.vuecal__event
|
.vuecal__event
|
||||||
border-radius: 16px
|
border-radius: 16px
|
||||||
// padding: 20px 10px
|
// padding: 20px 10px
|
||||||
|
min-height: 200px !important
|
||||||
text-align: left
|
text-align: left
|
||||||
background: rgba(248, 248, 248, 1)
|
background: rgba(248, 248, 248, 1)
|
||||||
min-height: 40px
|
min-height: 40px
|
||||||
@@ -492,7 +511,7 @@ export default {
|
|||||||
display: block
|
display: block
|
||||||
|
|
||||||
h3
|
h3
|
||||||
font-size: 18px
|
font-size: 15px
|
||||||
font-weight: 400
|
font-weight: 400
|
||||||
color: Black
|
color: Black
|
||||||
margin: 0 0 10px
|
margin: 0 0 10px
|
||||||
@@ -516,11 +535,15 @@ export default {
|
|||||||
font-size: 11px
|
font-size: 11px
|
||||||
|
|
||||||
.event-footer
|
.event-footer
|
||||||
|
flex-flow: row wrap
|
||||||
|
justify-content: center
|
||||||
|
alight-items: center
|
||||||
padding-top: 15px
|
padding-top: 15px
|
||||||
border-top: 1px solid rgba(33, 33, 33, 0.08)
|
border-top: 1px solid rgba(33, 33, 33, 0.08)
|
||||||
|
|
||||||
.event-footer-button
|
.event-footer-button
|
||||||
box-shadow: none !important
|
box-shadow: none !important
|
||||||
|
margin-bottom: 8px
|
||||||
padding: 9px !important
|
padding: 9px !important
|
||||||
min-height: fit-content
|
min-height: fit-content
|
||||||
height: fit-content
|
height: fit-content
|
||||||
|
|||||||
@@ -86,49 +86,52 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="sass" scoped>
|
<style lang="sass" scoped>
|
||||||
// Kravarik: TODO zjednotit styly ikon v globalnom sass subore
|
|
||||||
// TODO: ↓
|
|
||||||
.subheader
|
.subheader
|
||||||
max-width: 100%
|
max-width: 100%
|
||||||
margin: 0
|
margin: 0
|
||||||
border-bottom: 1px solid rgba(33, 33, 33, 0.08)
|
border-bottom: 1px solid rgba(33, 33, 33, 0.08)
|
||||||
gap: 25px
|
gap: 20px
|
||||||
flex-wrap: wrap
|
flex-wrap: wrap
|
||||||
position: sticky
|
position: sticky
|
||||||
top: 0
|
top: 0
|
||||||
z-index: 9999
|
z-index: 9999
|
||||||
background: white
|
background: white
|
||||||
|
|
||||||
.subheader-input
|
.subheader-input
|
||||||
max-width: 250px !important
|
max-width: 250px !important
|
||||||
min-width: 250px
|
min-width: 250px
|
||||||
|
|
||||||
|
&:deep(.v-input__control)
|
||||||
|
.v-field
|
||||||
|
height: 50px !important
|
||||||
|
--v-input-control-height: 50px !important
|
||||||
|
--v-input-padding-top: 15px !important
|
||||||
|
|
||||||
&:deep(.v-input__details)
|
&:deep(.v-input__details)
|
||||||
display: none
|
display: none
|
||||||
&:deep(.v-selection-control)
|
&:deep(.v-selection-control)
|
||||||
height: 35px
|
height: 35px
|
||||||
&.disabled
|
&.disabled
|
||||||
pointer-events: none !important
|
pointer-events: none !important
|
||||||
|
|
||||||
@media (max-width: 600px)
|
@media (max-width: 600px)
|
||||||
.subheader
|
.subheader
|
||||||
gap: 15px
|
gap: 15px
|
||||||
padding: 20px !important
|
padding: 20px !important
|
||||||
|
|
||||||
.subheader-input
|
.subheader-input
|
||||||
max-width: 100% !important
|
max-width: 100% !important
|
||||||
min-width: 100%
|
min-width: 100%
|
||||||
|
|
||||||
// TODO: ↑
|
|
||||||
|
|
||||||
.subheader-input.switch
|
.subheader-input.switch
|
||||||
max-width: 100px !important
|
max-width: 100px !important
|
||||||
min-width: 100px !important
|
min-width: 100px !important
|
||||||
.subheader-input
|
.subheader-input
|
||||||
&:deep(.v-selection-control--dirty .v-switch__track)
|
&:deep(.v-selection-control--dirty .v-switch__track)
|
||||||
background: rgba(187, 134, 252, 0.38) !important
|
background: rgba(187, 134, 252, 0.38) !important
|
||||||
.switch-label
|
.switch-label
|
||||||
font-size: 12px
|
font-size: 12px
|
||||||
color: rgba(0, 0, 0, 0.6)
|
color: rgba(0, 0, 0, 0.6)
|
||||||
</style>
|
</style>
|
||||||
@@ -108,8 +108,8 @@ export default {
|
|||||||
|
|
||||||
.subheader-icon-button
|
.subheader-icon-button
|
||||||
border: 1px solid #ABABAB
|
border: 1px solid #ABABAB
|
||||||
height: 60px
|
height: 50px
|
||||||
width: 60px
|
width: 50px
|
||||||
min-width: auto !important
|
min-width: auto !important
|
||||||
padding: 0
|
padding: 0
|
||||||
margin: 0
|
margin: 0
|
||||||
@@ -134,9 +134,9 @@ export default {
|
|||||||
|
|
||||||
&:deep(.v-input__control)
|
&:deep(.v-input__control)
|
||||||
.v-field
|
.v-field
|
||||||
height: 60px !important
|
height: 50px !important
|
||||||
--v-input-control-height: 60px !important
|
--v-input-control-height: 50px !important
|
||||||
--v-input-padding-top: 19px !important
|
--v-input-padding-top: 15px !important
|
||||||
|
|
||||||
&:deep(.v-input__details)
|
&:deep(.v-input__details)
|
||||||
display: none
|
display: none
|
||||||
@@ -156,6 +156,7 @@ export default {
|
|||||||
.subheader-input
|
.subheader-input
|
||||||
max-width: 100% !important
|
max-width: 100% !important
|
||||||
min-width: 100%
|
min-width: 100%
|
||||||
|
margin: 0 10px 10px 0
|
||||||
|
|
||||||
.date-wrapper
|
.date-wrapper
|
||||||
flex-wrap: wrap
|
flex-wrap: wrap
|
||||||
@@ -168,4 +169,18 @@ export default {
|
|||||||
flex: 1 1 calc( 50% - 5px )
|
flex: 1 1 calc( 50% - 5px )
|
||||||
height: 40px
|
height: 40px
|
||||||
|
|
||||||
</style>
|
@media (min-width: 601px) and (max-width: 825px)
|
||||||
|
.subheader
|
||||||
|
flex-wrap: nowrap
|
||||||
|
padding: 8px 20px 8px 20px !important
|
||||||
|
|
||||||
|
.subheader-input
|
||||||
|
max-width: calc(31.333% - 10px) !important
|
||||||
|
min-width: calc(31.333% - 10px) !important
|
||||||
|
|
||||||
|
&:nth-child(3)
|
||||||
|
max-width: calc(23.333% - 10px) !important
|
||||||
|
min-width: calc(23.333% - 10px) !important
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
@@ -121,8 +121,8 @@ export default {
|
|||||||
|
|
||||||
.subheader-icon-button
|
.subheader-icon-button
|
||||||
border: 1px solid #ABABAB
|
border: 1px solid #ABABAB
|
||||||
height: 56px
|
height: 50px
|
||||||
width: 56px
|
width: 50px
|
||||||
min-width: auto !important
|
min-width: auto !important
|
||||||
padding: 0
|
padding: 0
|
||||||
margin: 0
|
margin: 0
|
||||||
@@ -139,6 +139,13 @@ export default {
|
|||||||
.subheader-input
|
.subheader-input
|
||||||
max-width: 250px !important
|
max-width: 250px !important
|
||||||
min-width: 250px
|
min-width: 250px
|
||||||
|
height: 50px !important
|
||||||
|
|
||||||
|
&:deep(.v-input__control)
|
||||||
|
.v-field
|
||||||
|
height: 50px !important
|
||||||
|
--v-input-control-height: 50px !important
|
||||||
|
--v-input-padding-top: 15px !important
|
||||||
|
|
||||||
&:deep(.v-input__details)
|
&:deep(.v-input__details)
|
||||||
display: none
|
display: none
|
||||||
@@ -159,6 +166,7 @@ export default {
|
|||||||
.subheader-input
|
.subheader-input
|
||||||
max-width: 100% !important
|
max-width: 100% !important
|
||||||
min-width: 100%
|
min-width: 100%
|
||||||
|
margin: 0 10px 10px 0
|
||||||
|
|
||||||
.date-wrapper
|
.date-wrapper
|
||||||
flex-wrap: wrap
|
flex-wrap: wrap
|
||||||
@@ -170,5 +178,4 @@ export default {
|
|||||||
margin: 0
|
margin: 0
|
||||||
flex: 1 1 calc( 50% - 5px )
|
flex: 1 1 calc( 50% - 5px )
|
||||||
height: 40px
|
height: 40px
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
class="mb-15"
|
class="mb-15"
|
||||||
></v-icon>
|
></v-icon>
|
||||||
</div>
|
</div>
|
||||||
<v-card-actions class="mt-10 d-flex justify-start align-center">
|
<v-card-actions class="mt-10 d-flex justify-start align-center mobile-view">
|
||||||
<v-btn class="button primary half" variant="flat" @click="deleteBlocker()">ÁNO</v-btn>
|
<v-btn class="button primary half" variant="flat" @click="deleteBlocker()">ÁNO</v-btn>
|
||||||
<v-btn class="button primary half outline" @click.stop="closeModal()">ZRUŠIŤ</v-btn>
|
<v-btn class="button primary half outline" @click.stop="closeModal()">ZRUŠIŤ</v-btn>
|
||||||
</v-card-actions>
|
</v-card-actions>
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
class="mb-15"
|
class="mb-15"
|
||||||
></v-icon>
|
></v-icon>
|
||||||
</div>
|
</div>
|
||||||
<v-card-actions class="mt-10 d-flex justify-start align-center">
|
<v-card-actions class="mt-10 d-flex justify-start align-center mobile-view">
|
||||||
<v-btn class="button primary half" variant="flat" @click="deleteMasterTask()">ÁNO</v-btn>
|
<v-btn class="button primary half" variant="flat" @click="deleteMasterTask()">ÁNO</v-btn>
|
||||||
<v-btn class="button primary half outline" @click.stop="closeModal()">ZRUŠIŤ</v-btn>
|
<v-btn class="button primary half outline" @click.stop="closeModal()">ZRUŠIŤ</v-btn>
|
||||||
</v-card-actions>
|
</v-card-actions>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<v-icon @click.stop="closeModal()" icon="mdi-close" size="large"></v-icon>
|
<v-icon @click.stop="closeModal()" icon="mdi-close" size="large"></v-icon>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<v-card-actions class="mt-10 d-flex justify-start align-center">
|
<v-card-actions class="mt-10 d-flex justify-start align-center mobile-view">
|
||||||
<v-btn class="button primary half outline" @click.stop="createTask()"
|
<v-btn class="button primary half outline" @click.stop="createTask()"
|
||||||
>TASK</v-btn
|
>TASK</v-btn
|
||||||
>
|
>
|
||||||
@@ -59,4 +59,4 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
<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('M.D.YYYY') }})</p>
|
<p class="ml-5">{{ timesheet.employee_name }} ({{ moment(timesheet.timestamp).format('D.M.YYYY') }})</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -122,6 +122,10 @@ export default {
|
|||||||
|
|
||||||
async _update(data) {
|
async _update(data) {
|
||||||
try {
|
try {
|
||||||
|
data.timesheets = data.timesheets.map((timesheet) => {
|
||||||
|
delete timesheet.employee_name
|
||||||
|
return timesheet
|
||||||
|
})
|
||||||
const { subtask } = await this.$axios.put_auth(`v1/subtasks/${data.id}`, data)
|
const { subtask } = await this.$axios.put_auth(`v1/subtasks/${data.id}`, data)
|
||||||
|
|
||||||
this.closeModal()
|
this.closeModal()
|
||||||
|
|||||||
@@ -101,7 +101,6 @@ export default {
|
|||||||
return
|
return
|
||||||
|
|
||||||
const subtask = JSON.parse(JSON.stringify(this.subtask))
|
const subtask = JSON.parse(JSON.stringify(this.subtask))
|
||||||
|
|
||||||
const splittedStartsAtTime = this.form.starts_at_time.split(':')
|
const splittedStartsAtTime = this.form.starts_at_time.split(':')
|
||||||
const splittedEndsAtTime = this.form.ends_at_time.split(':')
|
const splittedEndsAtTime = this.form.ends_at_time.split(':')
|
||||||
const start = moment(this.form.date).hours(parseInt(splittedStartsAtTime[0])).minutes(parseInt(splittedStartsAtTime[1])).toISOString()
|
const start = moment(this.form.date).hours(parseInt(splittedStartsAtTime[0])).minutes(parseInt(splittedStartsAtTime[1])).toISOString()
|
||||||
@@ -112,11 +111,14 @@ export default {
|
|||||||
if (!subtask?.is_finished) { subtask.is_finished = 0 }
|
if (!subtask?.is_finished) { subtask.is_finished = 0 }
|
||||||
|
|
||||||
subtask.timeblocks.push({
|
subtask.timeblocks.push({
|
||||||
|
end: tmUtils.formatDateTimeForBackend(end),
|
||||||
id: null,
|
id: null,
|
||||||
start: tmUtils.formatDateTimeForBackend(start),
|
is_finished: 0,
|
||||||
end: tmUtils.formatDateTimeForBackend(end)
|
start: tmUtils.formatDateTimeForBackend(start)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if(subtask.deadline) subtask.deadline = tmUtils.formatDateTimeForBackend(subtask.deadline)
|
||||||
|
|
||||||
if (!subtask.id) {
|
if (!subtask.id) {
|
||||||
this.$emit('update-unfinished-subtask', subtask)
|
this.$emit('update-unfinished-subtask', subtask)
|
||||||
this.closeModal()
|
this.closeModal()
|
||||||
@@ -156,6 +158,7 @@ export default {
|
|||||||
async deleteTimeblock({ id }) {
|
async deleteTimeblock({ id }) {
|
||||||
const subtask = JSON.parse(JSON.stringify(this.subtask))
|
const subtask = JSON.parse(JSON.stringify(this.subtask))
|
||||||
subtask.timeblocks = subtask.timeblocks.filter(timeblock => timeblock.id != id)
|
subtask.timeblocks = subtask.timeblocks.filter(timeblock => timeblock.id != id)
|
||||||
|
if(subtask.deadline) subtask.deadline = tmUtils.formatDateTimeForBackend(subtask.deadline)
|
||||||
|
|
||||||
this._update(subtask)
|
this._update(subtask)
|
||||||
},
|
},
|
||||||
@@ -166,11 +169,17 @@ export default {
|
|||||||
|
|
||||||
async _update(data) {
|
async _update(data) {
|
||||||
try {
|
try {
|
||||||
const { subtask } = await this.$axios.put_auth(`v1/subtasks/${data.id}`, data)
|
const timesheets = data.timesheets.map((timesheet) => {
|
||||||
|
delete timesheet.employee_name
|
||||||
|
return timesheet
|
||||||
|
})
|
||||||
|
|
||||||
|
const { subtask } = await this.$axios.put_auth(`v1/subtasks/${data.id}`, {...data, timesheets})
|
||||||
|
|
||||||
this.closeModal()
|
this.closeModal()
|
||||||
this.$events.emit('on-subtask-edited', subtask)
|
this.$events.emit('on-subtask-edited', subtask)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
console.error(error)
|
||||||
this.$toast.error(error.message || error)
|
this.$toast.error(error.message || error)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
size="large"
|
size="large"
|
||||||
></v-icon>
|
></v-icon>
|
||||||
</div>
|
</div>
|
||||||
<v-card-actions class="mt-10 d-flex justify-start align-center">
|
<v-card-actions class="mt-10 d-flex justify-start align-center mobile-view">
|
||||||
<v-btn class="button primary half" variant="flat" @click="complete()">ÁNO</v-btn>
|
<v-btn class="button primary half" variant="flat" @click="complete()">ÁNO</v-btn>
|
||||||
<v-btn class="button primary half outline" @click.stop="visible = false">ZRUŠIŤ</v-btn>
|
<v-btn class="button primary half outline" @click.stop="visible = false">ZRUŠIŤ</v-btn>
|
||||||
</v-card-actions>
|
</v-card-actions>
|
||||||
@@ -36,7 +36,10 @@ export default {
|
|||||||
|
|
||||||
async complete() {
|
async complete() {
|
||||||
try {
|
try {
|
||||||
const tempSubtask = {...this.subtask, is_finished: this.subtask.is_finished ? 0 : 1}
|
const tempSubtask = {...this.subtask, is_finished: this.subtask.is_finished ? 0 : 1, timesheets: this.subtask.timesheets.map((timesheet) => {
|
||||||
|
delete timesheet.employee_name
|
||||||
|
return timesheet
|
||||||
|
})}
|
||||||
const { subtask } = await this.$axios.put_auth(`v1/subtasks/${tempSubtask.id}`, tempSubtask)
|
const { subtask } = await this.$axios.put_auth(`v1/subtasks/${tempSubtask.id}`, tempSubtask)
|
||||||
|
|
||||||
this.visible = false
|
this.visible = false
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
class="mb-15"
|
class="mb-15"
|
||||||
></v-icon>
|
></v-icon>
|
||||||
</div>
|
</div>
|
||||||
<v-card-actions class="mt-10 d-flex justify-start align-center">
|
<v-card-actions class="mt-10 d-flex justify-start align-center mobile-view">
|
||||||
<v-btn class="button primary half" variant="flat" @click="deleteTask()">ÁNO</v-btn>
|
<v-btn class="button primary half" variant="flat" @click="deleteTask()">ÁNO</v-btn>
|
||||||
<v-btn class="button primary half outline" @click.stop="closeModal()">ZRUŠIŤ</v-btn>
|
<v-btn class="button primary half outline" @click.stop="closeModal()">ZRUŠIŤ</v-btn>
|
||||||
</v-card-actions>
|
</v-card-actions>
|
||||||
|
|||||||
@@ -15,8 +15,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import errorUtils from '@/plugins/lib@auth/_utils/error.utils'
|
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'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -60,8 +60,16 @@ export default {
|
|||||||
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
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const payload = {
|
||||||
|
...this.subtask,
|
||||||
|
timesheets: this.subtask.timesheets.map((timesheet) => {
|
||||||
|
delete timesheet.employee_name
|
||||||
|
return timesheet
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const { subtask } = await this.$axios.put_auth(`v1/subtasks/${this.subtask.id}`, this.subtask)
|
const { subtask } = await this.$axios.put_auth(`v1/subtasks/${this.subtask.id}`, payload)
|
||||||
|
|
||||||
this.closeModal()
|
this.closeModal()
|
||||||
this.$events.emit('on-subtask-edited', subtask)
|
this.$events.emit('on-subtask-edited', subtask)
|
||||||
|
|||||||
@@ -195,15 +195,19 @@ export default {
|
|||||||
try {
|
try {
|
||||||
if (subtask?.id) {
|
if (subtask?.id) {
|
||||||
const data = await this.$axios.get_auth_data(`v1/subtasks/${subtask.id}`)
|
const data = await this.$axios.get_auth_data(`v1/subtasks/${subtask.id}`)
|
||||||
|
|
||||||
|
if (!data.deadline)
|
||||||
|
return this.subtask = this._enrichTask(data)
|
||||||
|
|
||||||
|
const splittedDeadline = data.deadline.split(' ')
|
||||||
|
data.deadline = moment(splittedDeadline[0])
|
||||||
|
data._deadline_time = splittedDeadline[1]
|
||||||
|
|
||||||
this.subtask = this._enrichTask(data)
|
this.subtask = this._enrichTask(data)
|
||||||
} else {
|
} else {
|
||||||
this.subtask = { master_task: mastertask, employees: [{}], _deadline_time: '17:00' }
|
this.subtask = { master_task: mastertask, employees: [{}], _deadline_time: '17:00' }
|
||||||
|
|
||||||
// if (subtask.deadline && subtask._deadline_time) {
|
|
||||||
// this.subtask.deadline = subtask.deadline
|
|
||||||
// this.subtask._deadline_time = subtask._deadline_time
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.editMode = editMode || !this.subtask.id
|
this.editMode = editMode || !this.subtask.id
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.$toast.error(error)
|
this.$toast.error(error)
|
||||||
@@ -229,10 +233,15 @@ export default {
|
|||||||
this._mergeDeadlineTimeDate()
|
this._mergeDeadlineTimeDate()
|
||||||
|
|
||||||
try {
|
try {
|
||||||
this.subtask.deadline = moment(this.subtask.deadline).format('YYYY-MM-DD HH:MM:SS')
|
this.subtask.deadline = moment(this.subtask.deadline).format('YYYY-MM-DD HH:mm:SS')
|
||||||
|
|
||||||
if (this.subtask?.id) {
|
if (this.subtask?.id) {
|
||||||
const { subtask } = await this.$axios.put_auth(`v1/subtasks/${this.subtask.id}`, this.subtask)
|
const timesheets = this.subtask.timesheets.map((timesheet) => {
|
||||||
|
delete timesheet.employee_name
|
||||||
|
return timesheet
|
||||||
|
})
|
||||||
|
|
||||||
|
const { subtask } = await this.$axios.put_auth(`v1/subtasks/${this.subtask.id}`, {...this.subtask, timesheets})
|
||||||
|
|
||||||
this.$store.commit('tm/update_subtask', subtask)
|
this.$store.commit('tm/update_subtask', subtask)
|
||||||
this.$events.emit("on-subtask-edited", this.subtask)
|
this.$events.emit("on-subtask-edited", this.subtask)
|
||||||
@@ -268,6 +277,7 @@ export default {
|
|||||||
|
|
||||||
showCompleteTaskModal() {
|
showCompleteTaskModal() {
|
||||||
this.$events.emit('show-complete-task-modal', { subtask: this.subtask })
|
this.$events.emit('show-complete-task-modal', { subtask: this.subtask })
|
||||||
|
if(this.subtask.deadline) this.subtask.deadline = tmUtils.formatDateTimeForBackend(this.subtask.deadline)
|
||||||
},
|
},
|
||||||
|
|
||||||
filesUploaded(files) {
|
filesUploaded(files) {
|
||||||
@@ -280,10 +290,11 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
_mergeDeadlineTimeDate() {
|
_mergeDeadlineTimeDate() {
|
||||||
const date = new Date(this.subtask.deadline);
|
const date = new Date(this.subtask.deadline)
|
||||||
const timeParts = this.subtask._deadline_time.split(':');
|
const timeParts = this.subtask._deadline_time.split(':')
|
||||||
date.setHours(parseInt(timeParts[0]));
|
|
||||||
date.setMinutes(parseInt(timeParts[1]));
|
date.setHours(parseInt(timeParts[0]))
|
||||||
|
date.setMinutes(parseInt(timeParts[1]))
|
||||||
|
|
||||||
this.subtask.deadline = date
|
this.subtask.deadline = date
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<v-icon @click.stop="closeModal()" icon="mdi-close" size="large"></v-icon>
|
<v-icon @click.stop="closeModal()" icon="mdi-close" size="large"></v-icon>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<v-card-actions class="mt-10 d-flex justify-start align-center">
|
<v-card-actions class="mt-10 d-flex justify-start align-center mobile-view">
|
||||||
<v-btn class="button primary half" variant="flat" @click="deleteTeam()">ÁNO</v-btn>
|
<v-btn class="button primary half" variant="flat" @click="deleteTeam()">ÁNO</v-btn>
|
||||||
<v-btn class="button primary half outline" @click.stop="closeModal()">ZRUŠIŤ</v-btn>
|
<v-btn class="button primary half outline" @click.stop="closeModal()">ZRUŠIŤ</v-btn>
|
||||||
</v-card-actions>
|
</v-card-actions>
|
||||||
@@ -49,4 +49,4 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -72,6 +72,12 @@ export default {
|
|||||||
min-width: 250px
|
min-width: 250px
|
||||||
height: 56px
|
height: 56px
|
||||||
|
|
||||||
|
&:deep(.v-input__control)
|
||||||
|
.v-field
|
||||||
|
height: 50px !important
|
||||||
|
--v-input-control-height: 50px !important
|
||||||
|
--v-input-padding-top: 15px !important
|
||||||
|
|
||||||
&:deep(.v-input__details)
|
&:deep(.v-input__details)
|
||||||
display: none
|
display: none
|
||||||
|
|
||||||
@@ -82,8 +88,8 @@ export default {
|
|||||||
.subheader
|
.subheader
|
||||||
gap: 15px
|
gap: 15px
|
||||||
padding: 20px !important
|
padding: 20px !important
|
||||||
|
|
||||||
.subheader-input
|
.subheader-input
|
||||||
max-width: 100% !important
|
max-width: 100% !important
|
||||||
min-width: 100%
|
min-width: 100%
|
||||||
|
margin-bottom: 15px
|
||||||
</style>
|
</style>
|
||||||
Reference in new issue
Block a user