-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #442 from ChicagoWorldcon/PLAN-587-draft-schedule-tab
PLAN-587 PLAN-522 PLAN-515 PLAN-575 PLAN-579 Draft schedules and approval
- Loading branch information
Showing
17 changed files
with
515 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<template> | ||
<person-schedule-display :sessions="sessions" title="Draft Schedule" approvalType="draft"></person-schedule-display> | ||
</template> | ||
|
||
<script> | ||
import { mapActions } from 'vuex'; | ||
import PersonScheduleDisplay from './person_schedule_display.vue'; | ||
import { personModel as model } from '@/store/person.store'; | ||
import { modelMixinNoProp } from '@/mixins'; | ||
export default { | ||
name: "PersonDraftSchedule", | ||
components: { | ||
PersonScheduleDisplay | ||
}, | ||
mixins: [ | ||
modelMixinNoProp, | ||
], | ||
data: () => ({ | ||
sessions: {}, | ||
model, | ||
}), | ||
methods: { | ||
...mapActions({ | ||
get: 'jv/get' | ||
}), | ||
}, | ||
mounted() { | ||
if(this.selected) { | ||
this.get(`/person/${this.selected.id}/snapshot_schedule`).then(data => { | ||
const {_jv, ...filtered_data} = data; | ||
this.sessions = filtered_data; | ||
}) | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<template> | ||
<person-schedule-display :sessions="sessions" :title="liveScheduleTitle" :approvalType="firmSchedule ? 'firm' : null"></person-schedule-display> | ||
</template> | ||
|
||
<script> | ||
import { mapActions } from 'vuex'; | ||
import PersonScheduleDisplay from './person_schedule_display.vue'; | ||
import { personModel as model } from '@/store/person.store'; | ||
import { modelMixinNoProp } from '@/mixins'; | ||
import { scheduleStatusMixin } from '@/store/schedule_status.mixin'; | ||
export default { | ||
name: "PersonLiveSchedule", | ||
components: { | ||
PersonScheduleDisplay | ||
}, | ||
mixins: [ | ||
modelMixinNoProp, | ||
scheduleStatusMixin, | ||
], | ||
data: () => ({ | ||
sessions: {}, | ||
model, | ||
}), | ||
methods: { | ||
...mapActions({ | ||
get: 'jv/get' | ||
}), | ||
}, | ||
mounted() { | ||
if(this.selected) { | ||
this.get(`/person/${this.selected.id}/live_sessions`).then(data => { | ||
const {_jv, ...filtered_data} = data; | ||
this.sessions = filtered_data; | ||
}) | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<template> | ||
<div v-if="approvalType"> | ||
<b-form-group> | ||
<template #label>Do you approve this <strong>{{approvalType}}</strong> schedule?</template> | ||
<b-form-radio-group stacked :options="approvalOptions" v-model="approved" @change="saveApproval()"></b-form-radio-group> | ||
</b-form-group> | ||
<b-form-group label="If no, what changes would you like to have?"> | ||
<b-textarea v-model="approvalComment" :disabled="approved !== false" @blur="saveApprovalComments()"></b-textarea> | ||
</b-form-group> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import { toastMixin } from '@/mixins' | ||
import { | ||
SCHEDULE_APPROVAL_COMMENT_SAVE_ERROR, | ||
SCHEDULE_APPROVAL_COMMENT_SAVE_SUCCESS, | ||
SCHEDULE_APPROVAL_SAVE_ERROR, | ||
SCHEDULE_APPROVAL_SAVE_SUCCESS, | ||
} from '@/constants/strings' | ||
export default { | ||
name: 'PersonScheduleApproval', | ||
props: { | ||
approvalType: { | ||
type: String, | ||
default: null | ||
} | ||
}, | ||
mixins: [ | ||
toastMixin | ||
], | ||
data: () => ({ | ||
approvalOptions: [{text: 'Not Set', value: null}, {text: 'Yes', value: true}, {text: 'No', value: false}], | ||
approved: null, | ||
approvalComment: null, | ||
}), | ||
methods: { | ||
saveApproval() { | ||
//TODO save the value of this.approval | ||
this.toastPromise(Promise.resolve("Replace me"), SCHEDULE_APPROVAL_SAVE_SUCCESS(this.approvalType), SCHEDULE_APPROVAL_SAVE_ERROR(this.approvalType)) | ||
}, | ||
saveApprovalComments() { | ||
//TODO save the value of this.approvalComment | ||
this.toastPromise(Promise.resolve("Replace me"), SCHEDULE_APPROVAL_COMMENT_SAVE_SUCCESS(this.approvalType), SCHEDULE_APPROVAL_COMMENT_SAVE_ERROR(this.approvalType)) | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
<style> | ||
</style> |
Oops, something went wrong.