|
4 | 4 | class="d-flex flex-wrap items-baseline" |
5 | 5 | style="overflow-y: auto; gap: 10px" |
6 | 6 | > |
7 | | - <BooleanFilter |
8 | | - v-if="loadingEndpoints !== true && loadingEndpoints.campCollaborations !== true" |
9 | | - v-model="showOnlyMyActivities" |
10 | | - :label="$tc('components.program.scheduleEntryFilters.onlyMyActivities')" |
11 | | - :result-count="myActivitiesCount" |
12 | | - /> |
13 | | - <v-skeleton-loader |
14 | | - v-else |
15 | | - type="button" |
16 | | - class="v-skeleton-loader--inherit-size" |
17 | | - height="32" |
18 | | - width="160px" |
19 | | - /> |
20 | | - <FilterDivider /> |
| 7 | + <template v-if="!hideSelfFilter"> |
| 8 | + <BooleanFilter |
| 9 | + v-if="loadingEndpoints !== true && loadingEndpoints.campCollaborations !== true" |
| 10 | + v-model="showOnlyMyActivities" |
| 11 | + :label="$tc('components.program.scheduleEntryFilters.onlyMyActivities')" |
| 12 | + :result-count="myActivitiesCount" |
| 13 | + /> |
| 14 | + <v-skeleton-loader |
| 15 | + v-else |
| 16 | + type="button" |
| 17 | + class="v-skeleton-loader--inherit-size" |
| 18 | + height="32" |
| 19 | + width="160px" |
| 20 | + /> |
| 21 | + <FilterDivider /> |
| 22 | + </template> |
21 | 23 | <template v-if="!!periods && !hidePeriodFilter"> |
22 | 24 | <template v-if="loadingEndpoints !== true && loadingEndpoints.periods !== true"> |
23 | 25 | <SelectFilter |
|
37 | 39 | width="150" |
38 | 40 | /> |
39 | 41 | </template> |
40 | | - <SelectFilter |
41 | | - v-if="loadingEndpoints !== true && loadingEndpoints.campCollaborations !== true" |
42 | | - v-model="value.responsible" |
43 | | - multiple |
44 | | - and-filter |
45 | | - :items="campCollaborations" |
46 | | - :display-field="campCollaborationDisplayName" |
47 | | - :label="$tc('components.program.scheduleEntryFilters.responsible')" |
48 | | - @input="(val) => updateFilter({ responsible: val })" |
49 | | - > |
50 | | - <template #item="{ item }"> |
51 | | - <template v-if="item.exclusiveNone"> |
52 | | - {{ item.text }} |
53 | | - </template> |
54 | | - <template v-else> |
55 | | - <TextAlignBaseline class="mr-1"> |
56 | | - <UserAvatar :camp-collaboration="campCollaborations[item.value]" size="20" /> |
57 | | - </TextAlignBaseline> |
58 | | - {{ 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> |
59 | 66 | </template> |
60 | | - </template> |
61 | | - </SelectFilter> |
62 | | - <v-skeleton-loader |
63 | | - v-else |
64 | | - type="button" |
65 | | - class="v-skeleton-loader--inherit-size" |
66 | | - height="32" |
67 | | - width="130" |
68 | | - /> |
| 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> |
69 | 76 | <SelectFilter |
70 | 77 | v-if="loadingEndpoints !== true && loadingEndpoints.categories !== true" |
71 | 78 | v-model="value.category" |
@@ -184,10 +191,18 @@ export default { |
184 | 191 | type: Function, |
185 | 192 | default: () => [], |
186 | 193 | }, |
| 194 | + hideSelfFilter: { |
| 195 | + type: Boolean, |
| 196 | + default: false, |
| 197 | + }, |
187 | 198 | hidePeriodFilter: { |
188 | 199 | type: Boolean, |
189 | 200 | default: false, |
190 | 201 | }, |
| 202 | + hideCollaboratorFilter: { |
| 203 | + type: Boolean, |
| 204 | + default: false, |
| 205 | + }, |
191 | 206 | hideDayFilter: { |
192 | 207 | type: Boolean, |
193 | 208 | default: false, |
|
0 commit comments