Skip to content

Commit

Permalink
frontend/PeriodMaterialLists.vue: disable if user is guest
Browse files Browse the repository at this point in the history
Issue: ecamp#1415
  • Loading branch information
BacLuc committed Jun 6, 2021
1 parent c2ee1d9 commit ac34f98
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 4 additions & 2 deletions frontend/src/components/camp/PeriodMaterialLists.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
:period="period"
:show-content-node-material="showContentNodeMaterial"
:group-by-list="groupByList"
enable-grouping />
enable-grouping
:disabled="disabled" />
</v-expansion-panel-content>
</v-expansion-panel>
</template>
Expand All @@ -29,7 +30,8 @@ export default {
props: {
period: { type: Object, required: true },
showContentNodeMaterial: { type: Boolean, required: true },
groupByList: { type: Boolean, required: true }
groupByList: { type: Boolean, required: true },
disabled: { type: Boolean, default: false }
},
data () {
return {
Expand Down
5 changes: 4 additions & 1 deletion frontend/src/views/camp/Material.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,24 @@ Admin screen of a camp: Displays MaterialLists and MaterialItems
:key="period._meta.self"
:period="period"
:show-content-node-material="showContentNodeMaterial"
:group-by-list="groupByList || $vuetify.breakpoint.xs" />
:group-by-list="groupByList || $vuetify.breakpoint.xs"
:disabled="!isContributor" />
</v-expansion-panels>
</content-card>
</template>

<script>
import ContentCard from '@/components/layout/ContentCard.vue'
import PeriodMaterialLists from '@/components/camp/PeriodMaterialLists.vue'
import { campRoleMixin } from '@/mixins/campRoleMixin'
export default {
name: 'Material',
components: {
ContentCard,
PeriodMaterialLists
},
mixins: [campRoleMixin],
props: {
camp: { type: Function, required: true }
},
Expand Down

0 comments on commit ac34f98

Please sign in to comment.