mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-22 06:49:35 +00:00
[review, add time modal]
This commit is contained in:
1 parent
90cd75349c
commit
17a044b118
19 files changed
+228
-158
No files matched your search
@@ -15,16 +15,16 @@ export default {
|
||||
ZMasterTaskModal
|
||||
},
|
||||
|
||||
// Kravarik: Prepisat propy na objektovy zapis
|
||||
props: ['events', 'month'],
|
||||
props: {
|
||||
events: {
|
||||
required: true
|
||||
},
|
||||
|
||||
methods: {
|
||||
editTask(masterTask, editMode) {
|
||||
this.$refs['z-master-task-modal'].create(masterTask, editMode)
|
||||
month: {
|
||||
required: true
|
||||
}
|
||||
},
|
||||
|
||||
// Kravarik: Comuted ma byt za data hned
|
||||
computed: {
|
||||
calendarOptions() {
|
||||
return {
|
||||
@@ -36,31 +36,34 @@ export default {
|
||||
firstDay: 1,
|
||||
dayHeaderClassNames: ['w-day-header'],
|
||||
events: this.events,
|
||||
// Kravarik: Skus toto prepisat na arrow function ako je v eventClick
|
||||
eventContent: function (eventInfo) {
|
||||
eventContent: (eventInfo) => {
|
||||
return { html: eventInfo.event.extendedProps.title_html }
|
||||
},
|
||||
eventClick: (info) => {
|
||||
this.editTask(info.event._def.publicId, false)
|
||||
return this.editTask(info.event._def.publicId, false)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// Kravarik: Toto nechat na konci
|
||||
mounted() {
|
||||
const currentYear = new Date().getFullYear()
|
||||
this.calendarOptions.events = this.events
|
||||
this.$refs.fullCalendar?.getApi().gotoDate(new Date(currentYear, this.month, 1))
|
||||
},
|
||||
|
||||
methods: {
|
||||
editTask(masterTask, editMode) {
|
||||
this.$refs['z-master-task-modal'].create(masterTask, editMode)
|
||||
}
|
||||
},
|
||||
|
||||
watch: {
|
||||
month(selectedMonth) {
|
||||
const currentYear = new Date().getFullYear()
|
||||
this.$refs.fullCalendar?.getApi().gotoDate(new Date(currentYear, selectedMonth, 1))
|
||||
}
|
||||
},
|
||||
|
||||
// Kravarik: Posunut nad methods
|
||||
mounted() {
|
||||
const currentYear = new Date().getFullYear()
|
||||
this.calendarOptions.events = this.events
|
||||
this.$refs.fullCalendar?.getApi().gotoDate(new Date(currentYear, this.month, 1))
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="sass" scoped>
|
||||
@@ -93,12 +96,17 @@ export default {
|
||||
&:deep(.fc-day-today)
|
||||
background: white
|
||||
a
|
||||
background: #3700B3
|
||||
width: 32px
|
||||
height: 32px
|
||||
color: white
|
||||
text-align: center
|
||||
border-radius: 50%
|
||||
border: 5px solid white
|
||||
line-height: 15px
|
||||
background: #3700B3
|
||||
width: 28px
|
||||
color: white
|
||||
text-align: center
|
||||
border-radius: 50%
|
||||
height: 28px
|
||||
line-height: 27px
|
||||
position: relative
|
||||
padding: 0
|
||||
margin: 0
|
||||
border: none
|
||||
top: 2px
|
||||
right: 4px
|
||||
</style>
|
||||
Reference in new issue
Block a user