Skip to content

Commit 42c095b

Browse files
committed
Adjust UI to limited permissions of outsiders
1 parent 9fc261e commit 42c095b

File tree

8 files changed

+58
-32
lines changed

8 files changed

+58
-32
lines changed

frontend/src/components/activity/ScheduleEntry.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ Displays a single scheduleEntry
269269
/>
270270
</v-col>
271271
</v-row>
272-
<v-row dense>
272+
<v-row v-if="!isOutsider" dense>
273273
<v-col>
274274
<ActivityResponsibles
275275
:activity="activity"

frontend/src/components/print/config/DialogScheduleEntryFilter.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
:loading-endpoints="{}"
3030
:hide-self-filter="isOutsider"
3131
:hide-period-filter="hidePeriodFilter"
32+
:hide-collaborator-filter="isOutsider"
3233
:hide-day-filter="hideDayFilter"
3334
/>
3435
<template #moreActions>

frontend/src/components/program/ScheduleEntryFilters.vue

Lines changed: 37 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -39,35 +39,40 @@
3939
width="150"
4040
/>
4141
</template>
42-
<SelectFilter
43-
v-if="loadingEndpoints !== true && loadingEndpoints.campCollaborations !== true"
44-
v-model="value.responsible"
45-
multiple
46-
and-filter
47-
:items="campCollaborations"
48-
:display-field="campCollaborationDisplayName"
49-
:label="$tc('components.program.scheduleEntryFilters.responsible')"
50-
@input="(val) => updateFilter({ responsible: val })"
51-
>
52-
<template #item="{ item }">
53-
<template v-if="item.exclusiveNone">
54-
{{ item.text }}
55-
</template>
56-
<template v-else>
57-
<TextAlignBaseline class="mr-1">
58-
<UserAvatar :camp-collaboration="campCollaborations[item.value]" size="20" />
59-
</TextAlignBaseline>
60-
{{ item.text }}
42+
<template v-if="!hideCollaboratorFilter">
43+
<SelectFilter
44+
v-if="loadingEndpoints !== true && loadingEndpoints.campCollaborations !== true"
45+
v-model="value.responsible"
46+
multiple
47+
and-filter
48+
:items="campCollaborations"
49+
:display-field="campCollaborationDisplayName"
50+
:label="$tc('components.program.scheduleEntryFilters.responsible')"
51+
@input="(val) => updateFilter({ responsible: val })"
52+
>
53+
<template #item="{ item }">
54+
<template v-if="item.exclusiveNone">
55+
{{ item.text }}
56+
</template>
57+
<template v-else>
58+
<TextAlignBaseline class="mr-1">
59+
<UserAvatar
60+
:camp-collaboration="campCollaborations[item.value]"
61+
size="20"
62+
/>
63+
</TextAlignBaseline>
64+
{{ item.text }}
65+
</template>
6166
</template>
62-
</template>
63-
</SelectFilter>
64-
<v-skeleton-loader
65-
v-else
66-
type="button"
67-
class="v-skeleton-loader--inherit-size"
68-
height="32"
69-
width="130"
70-
/>
67+
</SelectFilter>
68+
<v-skeleton-loader
69+
v-else
70+
type="button"
71+
class="v-skeleton-loader--inherit-size"
72+
height="32"
73+
width="130"
74+
/>
75+
</template>
7176
<SelectFilter
7277
v-if="loadingEndpoints !== true && loadingEndpoints.categories !== true"
7378
v-model="value.category"
@@ -194,6 +199,10 @@ export default {
194199
type: Boolean,
195200
default: false,
196201
},
202+
hideCollaboratorFilter: {
203+
type: Boolean,
204+
default: false,
205+
},
197206
hideDayFilter: {
198207
type: Boolean,
199208
default: false,

frontend/src/components/program/picasso/Picasso.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,12 @@ Listing all given activity schedule entries in a calendar view.
5454
)
5555
}}
5656
</div>
57-
<day-responsibles :date="date" :period="period" :readonly="!editable" />
57+
<day-responsibles
58+
v-if="!isOutsider"
59+
:date="date"
60+
:period="period"
61+
:readonly="!editable"
62+
/>
5863
</slot>
5964
</template>
6065

@@ -88,13 +93,15 @@ import DayResponsibles from './DayResponsibles.vue'
8893
import { ONE_DAY_IN_MILLISECONDS } from '@/helpers/vCalendarDragAndDrop.js'
8994
import { errorToMultiLineToast } from '@/components/toast/toasts'
9095
import PicassoEntry from './PicassoEntry.vue'
96+
import { campRoleMixin } from '@/mixins/campRoleMixin.js'
9197
9298
export default {
9399
name: 'Picasso',
94100
components: {
95101
PicassoEntry,
96102
DayResponsibles,
97103
},
104+
mixins: [campRoleMixin],
98105
props: {
99106
// period for which to show picasso
100107
period: {

frontend/src/views/camp/CampProgram.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ Show all activity schedule entries of a single period.
9494
:camp="camp"
9595
:filter-fn="filterFn"
9696
:hide-self-filter="isOutsider"
97+
:hide-collaborator-filter="isOutsider"
9798
hide-period-filter
9899
hide-day-filter
99100
@height-changed="scheduleEntryFiltersHeightChanged"

frontend/src/views/camp/Dashboard.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
:loading-endpoints="true"
1616
:camp="camp"
1717
:hide-self-filter="isOutsider"
18+
:hide-collaborator-filter="isOutsider"
1819
hide-day-filter
1920
:periods="periods"
2021
/>
@@ -27,6 +28,7 @@
2728
:camp="camp"
2829
:periods="periods"
2930
:hide-self-filter="isOutsider"
31+
:hide-collaborator-filter="isOutsider"
3032
hide-day-filter
3133
:filter-fn="filterFn"
3234
/>

frontend/src/views/camp/admin/SideBarAdmin.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
icon="mdi-view-dashboard-outline"
1414
/>
1515
<SidebarListItem
16+
v-if="!isOutsider"
1617
:to="adminRoute(camp, 'collaborators')"
1718
:title="$tc('views.camp.admin.sideBarAdmin.itemCollaborators')"
1819
icon="mdi-account-group-outline"
@@ -24,6 +25,7 @@
2425
icon="mdi-clipboard-list-outline"
2526
/>
2627
<SidebarListItem
28+
v-if="!isOutsider"
2729
:to="adminRoute(camp, 'material')"
2830
:title="$tc('views.camp.admin.sideBarAdmin.itemMaterialLists')"
2931
icon="mdi-package-variant-closed"

frontend/src/views/camp/navigation/mobile/NavSidebar.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,16 @@
6565
:title="$tc('views.camp.navigation.mobile.navSidebar.itemChecklists')"
6666
icon="mdi-clipboard-list-outline"
6767
/>
68-
<v-divider inset />
68+
<v-divider v-if="!isOutsider" inset />
6969
<SidebarListItem
70+
v-if="!isOutsider"
7071
:title="$tc('views.camp.navigation.mobile.navSidebar.itemCollaborators')"
7172
icon="mdi-account-group"
7273
:to="adminRoute(camp, 'collaborators')"
7374
/>
74-
<v-divider inset />
75+
<v-divider v-if="!isOutsider" inset />
7576
<SidebarListItem
77+
v-if="!isOutsider"
7678
:to="adminRoute(camp, 'material')"
7779
:title="$tc('views.camp.navigation.mobile.navSidebar.itemMaterialLists')"
7880
icon="mdi-package-variant"
@@ -127,13 +129,15 @@ import UserAvatar from '@/components/user/UserAvatar.vue'
127129
import SidebarListItem from '@/components/layout/SidebarListItem.vue'
128130
import { mapGetters } from 'vuex'
129131
import { getEnv } from '@/environment.js'
132+
import { campRoleMixin } from '@/mixins/campRoleMixin.js'
130133
131134
export default {
132135
name: 'NavSidebar',
133136
components: {
134137
SidebarListItem,
135138
UserAvatar,
136139
},
140+
mixins: [campRoleMixin],
137141
props: {
138142
value: { type: Boolean, required: true },
139143
camp: { type: Object, required: true },

0 commit comments

Comments
 (0)