Skip to content

Commit

Permalink
Merge pull request #1020 from PlanoramaEvents/plan-964-participants-s…
Browse files Browse the repository at this point in the history
…ee-own-surveys

Plan 964 participants see own surveys
  • Loading branch information
Gailbear authored Apr 21, 2024
2 parents 8364352 + 1f9231e commit 2bae057
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 deletions.
6 changes: 3 additions & 3 deletions app/javascript/people/people_sidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
<b-tab title="Draft Schedule" lazy v-if="displayDraftSchedule">
<person-draft-schedule :noSidebar="true"></person-draft-schedule>
</b-tab>
<b-tab title="Emails" lazy v-if="currentUserIsAdmin || currentUserIsStaff">
<person-email-tab></person-email-tab>
</b-tab>
<b-tab title="Surveys" lazy v-if="currentUserIsAdmin || currentUserIsStaff">
<person-surveys :person="selected"></person-surveys>
</b-tab>
<b-tab title="Emails" lazy v-if="currentUserIsAdmin || currentUserIsStaff">
<person-email-tab></person-email-tab>
</b-tab>
<b-tab title="Admin" v-if="currentUserIsAdmin || currentUserIsStaff">
<people-admin-tab></people-admin-tab>
</b-tab>
Expand Down
8 changes: 4 additions & 4 deletions app/javascript/people/person_tabs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@
<b-tab title="Draft Schedule" lazy v-if="displayDraftSchedule" :active="tab === 'draft-schedule'">
<person-draft-schedule></person-draft-schedule>
</b-tab>
<b-tab title="Surveys" lazy :active="tab === 'surveys'">
<people-surveys-tab :person="person"></people-surveys-tab>
</b-tab>
<b-tab title="Emails" lazy v-if="currentUserIsAdmin || currentUserIsStaff" :active="tab === 'email'">
<people-email-tab></people-email-tab>
</b-tab>
<b-tab title="Surveys" lazy v-if="currentUserIsAdmin || currentUserIsStaff" :active="tab === 'surveys'">
<people-surveys-tab :person="person"></people-surveys-tab>
</b-tab>
<b-tab title="Admin" lazy v-if="currentUserIsAdmin || currentUserIsStaff" :active="tab === 'admin'">
<people-admin-tab></people-admin-tab>
</b-tab>
Expand Down Expand Up @@ -141,14 +141,14 @@ export default {
'availability',
'session-selection',
'session-ranking',
'surveys'
]
if (this.displayDraftSchedule) {
baseTabs.splice(5, 0, 'draft-schedule')
}
if (this.currentUserIsAdmin || this.currentUserIsStaff || this.firmSchedule) {
baseTabs.splice(5, 0, 'schedule');
baseTabs.push('email');
baseTabs.push('surveys');
baseTabs.push('admin');
}
if(this.currentUserIsAdmin) {
Expand Down
13 changes: 10 additions & 3 deletions app/javascript/profile/person_surveys.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,16 @@
<h5>Surveys Taken</h5>
<loading-overlay :loading="loading">
<ul v-if="surveys.length" class="option-3">
<li v-for="survey in surveys" :key="survey.id"><router-link :to="{
<li v-for="survey in surveys" :key="survey.id">
<router-link
v-if="currentUserIsStaff || currentUserIsAdmin"
:to="{
name: 'survey_responses',
params: { id: survey.id, responses: 'responses' },
query: { person_id: person.id }
}" target="_blank">{{ survey.name }}</router-link></li>
}" target="_blank">{{ survey.name }}</router-link>
<span v-if="!currentUserIsStaff && !currentUserIsAdmin">{{ survey.name }}</span>
</li>
</ul>
<div v-if="!surveys.length" class="mt-3">
<h5 class="font-italic text-muted">No surveys taken.</h5>
Expand All @@ -21,14 +26,16 @@ import LoadingOverlay from '@/components/loading_overlay.vue';
import { personSubmissionMixin } from './person.submission.mixin';
import { mapActions } from 'vuex';
import { GET_PERSON_SURVEYS } from '@/store/person.store';
import { personSessionMixin } from '@/mixins';
export default {
name: "PeopleSurveysTab",
components: {
LoadingOverlay,
},
mixins: [
personSubmissionMixin
personSubmissionMixin,
personSessionMixin
],
props: {
person: {
Expand Down

0 comments on commit 2bae057

Please sign in to comment.