Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AlekSIS®
Official
AlekSIS-Core
Merge requests
!1148
Calendar events and iCal feeds
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Calendar events and iCal feeds
calendar-object-feeds
into
master
Overview
43
Commits
108
Pipelines
54
Changes
10
Merged
Jonathan Weth
requested to merge
calendar-object-feeds
into
master
2 years ago
Overview
29
Commits
108
Pipelines
54
Changes
10
Expand
0
0
Merge request reports
Viewing commit
0a0bec8d
Show latest version
10 files
+
245
−
5
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
10
Search (e.g. *.vue) (Ctrl+P)
0a0bec8d
WIP: Calendar feeds in frontend
· 0a0bec8d
Hangzhi Yu
authored
2 years ago
aleksis/core/frontend/components/calendar/CalendarOverview.vue
0 → 100644
+
117
−
0
Options
<
template
>
<div
class=
"mt-4 mb-4"
>
<v-skeleton-loader
v-if=
"$apollo.queries.calendarFeeds.loading"
type=
"date-picker-options, actions"
/>
<div
v-else
>
<v-row
align=
"strech"
>
<v-col
class=
"col-2"
align-self=
"center"
>
<v-btn
icon
class=
"mx-2"
@
click=
"$refs.calendar.prev()"
>
<v-icon>
mdi-chevron-left
</v-icon>
</v-btn>
<v-btn
outlined
class=
"mx-2"
@
click=
"calendarFocus = ''"
>
<v-icon>
mdi-calendar-today-outline
</v-icon>
{{
$t
(
"
calendar.today
"
)
}}
</v-btn>
<v-btn
icon
class=
"mx-2"
@
click=
"$refs.calendar.next()"
>
<v-icon>
mdi-chevron-right
</v-icon>
</v-btn>
</v-col>
<v-col
align-self=
"center"
>
<h1
class=
"mx-2"
v-if=
"$refs.calendar"
>
{{
$refs
.
calendar
.
title
}}
</h1>
</v-col>
<v-spacer
/>
<v-col
class=
"col-2"
align-self=
"center"
>
<v-select
v-model=
"currentCalendarType"
:items=
"availableCalendarTypes"
:item-text=
"nameForMenu"
item-value=
"type"
menu-props=
"auto"
outlined
color=
"primary"
hide-details=
"auto"
single-line
dense
class=
"mx-2"
>
</v-select>
</v-col>
</v-row>
<v-row>
<v-col
class=
"col-2"
>
<calendar-select
v-model=
"selectedCalendarFeedNames"
:calendar-feeds=
"calendarFeeds"
@
selectAll=
"toggleAllCalendars"
/>
</v-col>
<v-col
class=
"col-10"
>
<v-sheet
height=
"600"
>
<v-calendar
ref=
"calendar"
v-model=
"calendarFocus"
:events=
"events"
:type=
"currentCalendarType"
></v-calendar>
</v-sheet>
</v-col>
</v-row>
</div>
</div>
</
template
>
<
script
>
import
CalendarSelect
from
"
./CalendarSelect.vue
"
import
gqlCalendarOverview
from
"
./calendarOverview.graphql
"
;
export
default
{
name
:
"
CalendarOverview
"
,
components
:
{
CalendarSelect
,
},
data
()
{
return
{
calendarFocus
:
""
,
calendarFeeds
:
[],
selectedCalendarFeedNames
:
[],
currentCalendarType
:
"
month
"
,
availableCalendarTypes
:
[
{
type
:
"
month
"
,
translationKey
:
"
calendar.month
"
},
{
type
:
"
week
"
,
translationKey
:
"
calendar.week
"
},
{
type
:
"
day
"
,
translationKey
:
"
calendar.day
"
},
],
start
:
""
,
end
:
""
,
};
},
apollo
:
{
calendarFeeds
:
{
query
:
gqlCalendarOverview
,
variables
()
{
return
{
start
:
this
.
start
,
end
:
this
.
end
,
};
},
},
},
computed
:
{
events
()
{
return
this
.
calendarFeeds
.
filter
((
c
)
=>
this
.
selectedCalendarFeedNames
.
indexOf
(
c
.
name
)
>=
0
).
map
(
c
=>
c
.
feed
.
events
).
flat
();
},
},
methods
:
{
nameForMenu
:
function
(
item
)
{
return
this
.
$t
(
item
.
translationKey
);
},
toggleAllCalendars
:
function
(
toggleAllStatus
)
{
toggleAllStatus
?
this
.
selectedCalendarFeedNames
=
this
.
calendarFeeds
.
map
((
c
)
=>
c
.
name
)
:
this
.
selectedCalendarFeedNames
=
[];
},
},
mounted
()
{
this
.
$refs
.
calendar
.
move
(
0
);
},
};
</
script
>
<
style
scoped
></
style
>
Loading