Skip to content

Commit

Permalink
Merge pull request #180 from ChicagoWorldcon/staging
Browse files Browse the repository at this point in the history
v1.1.0
  • Loading branch information
Gailbear authored Jun 9, 2022
2 parents 384c68c + f02e9bc commit 8e6503b
Show file tree
Hide file tree
Showing 47 changed files with 1,145 additions and 717 deletions.
24 changes: 13 additions & 11 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ GEM
ast (2.4.2)
bcrypt (3.1.18)
bindex (0.8.1)
bootsnap (1.11.1)
bootsnap (1.12.0)
msgpack (~> 1.2)
brakeman (5.2.3)
builder (3.2.4)
bundler-audit (0.9.0.1)
bundler-audit (0.9.1)
bundler (>= 1.2.0, < 3)
thor (~> 1.0)
byebug (11.1.3)
Expand Down Expand Up @@ -190,7 +190,7 @@ GEM
mini_mime (1.1.2)
mini_portile2 (2.8.0)
minitest (5.15.0)
msgpack (1.5.1)
msgpack (1.5.2)
multi_json (1.15.0)
nenv (0.3.0)
nilify_blanks (1.4.0)
Expand Down Expand Up @@ -225,7 +225,7 @@ GEM
activesupport (>= 3.0.0)
raabro (1.4.0)
racc (1.6.0)
rack (2.2.3)
rack (2.2.3.1)
rack-cors (1.1.1)
rack (>= 2.0.0)
rack-livereload (0.3.17)
Expand Down Expand Up @@ -264,15 +264,15 @@ GEM
rake (13.0.6)
ranked-model (0.4.8)
activerecord (>= 4.2)
ransack (3.2.0)
ransack (3.2.1)
activerecord (>= 6.1.5)
activesupport (>= 6.1.5)
i18n
rb-fsevent (0.11.1)
rb-inotify (0.10.1)
ffi (~> 1.0)
redis (4.6.0)
regexp_parser (2.4.0)
regexp_parser (2.5.0)
request_store (1.5.1)
rack (>= 1.4)
responders (3.0.1)
Expand Down Expand Up @@ -303,13 +303,13 @@ GEM
rspec-mocks (~> 3.10)
rspec-support (~> 3.10)
rspec-support (3.11.0)
rubocop (1.29.1)
rubocop (1.30.0)
parallel (~> 1.10)
parser (>= 3.1.0.0)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.17.0, < 2.0)
rubocop-ast (>= 1.18.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.18.0)
Expand All @@ -332,10 +332,11 @@ GEM
tilt
seedbank (0.5.0)
rake (>= 10.0)
selenium-webdriver (4.1.0)
selenium-webdriver (4.2.0)
childprocess (>= 0.5, < 5.0)
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2)
rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0)
semantic_range (3.0.0)
shellany (0.0.1)
sidekiq (6.4.2)
Expand Down Expand Up @@ -368,7 +369,7 @@ GEM
concurrent-ruby (~> 1.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.8.1)
unf_ext (0.0.8.2)
unicode-display_width (2.1.0)
warden (1.2.9)
rack (>= 2.0.9)
Expand All @@ -388,6 +389,7 @@ GEM
rack-proxy (>= 0.6.1)
railties (>= 5.2)
semantic_range (>= 2.3.0)
websocket (1.2.9)
websocket-driver (0.7.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
Expand Down
3 changes: 2 additions & 1 deletion app/controllers/conflicts/session_conflicts_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ def index
include: [
:availability_conflicts,
:'availability_conflicts.person',
:'availability_conflicts.session_assignment'
:'availability_conflicts.session_assignment',
:room
],
# include: filtered_serializer_includes(fields: fields), # need to adjust based omn field
params: {
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/resource_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@ class ResourceController < ApplicationController

respond_to :json

before_action :prevent_cache

include ResourceMethods
end
14 changes: 5 additions & 9 deletions app/controllers/survey/submissions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ def collection_to_xls
styles = [date_time_style,date_time_style]
# Get the survey questions
submission = @collection.first
survey = submission.survey

survey = Survey.find params[:survey_id] if params[:survey_id]
survey ||= submission.survey
header = ['Created At', 'Updated At', 'Email']
response_columns = {}
posn = 3
Expand Down Expand Up @@ -125,19 +127,13 @@ def serializer_includes

def includes
[
:person,
responses: [
:question
]
:person
]
end

def references
[
:person,
responses: [
:question
]
:person
]
end

Expand Down
1 change: 1 addition & 0 deletions app/controllers/surveys_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
class SurveysController < ResourceController
SERIALIZER_CLASS = 'SurveySerializer'.freeze
POLICY_CLASS = 'SurveysPolicy'.freeze
POLICY_SCOPE_CLASS = 'SurveysPolicy::Scope'.freeze
DEFAULT_SORTBY = 'surveys.updated_at'.freeze
DEFAULT_ORDER = 'desc'.freeze

Expand Down
23 changes: 12 additions & 11 deletions app/javascript/app.router.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,23 @@ import PersonTabs from './people/person_tabs.vue';

// profile
import ProfileScreen from './profile/profile-screen.vue';
import ProfileTabs from './profile/profile-tabs.vue';

const profileRoutes = [
{ path: 'session-selection', component: ProfileTabs, props: {tab: 'session-selection'} },
{ path: 'session-ranking', component: ProfileTabs, props: {tab: 'session-ranking'} },
{ path: 'availability', component: ProfileTabs, props: {tab: 'availability'} },
{ path: 'other', component: ProfileTabs, props: {tab: 'other'} },
{ path: '', component: ProfileTabs, props: true }
// { path: 'session-selection', component: PersonTabs, props: {tab: 'session-selection'} },
// { path: 'session-ranking', component: PersonTabs, props: {tab: 'session-ranking'} },
// { path: 'availability', component: PersonTabs, props: {tab: 'availability'} },
// { path: 'other', component: PersonTabs, props: {tab: 'other'} },
{ path: ':tab', component: PersonTabs, props: true },
{ path: '', component: PersonTabs, props: true }
]

const personRoutes = [
{ path: 'edit/:id', component: PersonTabs, props: route => ({id: route.params.id, tab: 'person-edit'}) },
{ path: 'session-selection/:id', component: PersonTabs, props: route => ({id: route.params.id, tab: 'session-selection'}) },
{ path: 'session-ranking/:id', component: PersonTabs, props: route => ({id: route.params.id, tab: 'session-ranking'}) },
{ path: 'availability/:id', component: PersonTabs, props: route => ({id: route.params.id, tab: 'availability'}) },
{ path: 'other/:id', component: PersonTabs, props: route => ({id: route.params.id, tab: 'other'}) },
{ path: 'edit/:id', component: PersonTabs, props: true },
{ path: ':tab/:id', component: PersonTabs, props: true },
// { path: 'session-selection/:id', component: PersonTabs, props: route => ({id: route.params.id, tab: 'session-selection'}) },
// { path: 'session-ranking/:id', component: PersonTabs, props: route => ({id: route.params.id, tab: 'session-ranking'}) },
// { path: 'availability/:id', component: PersonTabs, props: route => ({id: route.params.id, tab: 'availability'}) },
// { path: 'other/:id', component: PersonTabs, props: route => ({id: route.params.id, tab: 'other'}) },
{ path: '', component: PeopleList }
]

Expand Down
18 changes: 18 additions & 0 deletions app/javascript/components/edit_button.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<template>
<icon-button icon="pencil-fill" background="none"></icon-button>
</template>

<script>
import IconButton from './icon_button';
export default {
name: "EditButton",
components: {
IconButton
}
}
</script>

<style>
</style>
26 changes: 26 additions & 0 deletions app/javascript/components/edit_modal.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<template>
<plano-modal
no-close-on-backdrop
ok-title="Save"
v-on="$listeners"
v-bind="$attrs"
>
<slot v-for="(_, name) in $slots" :name="name" :slot="name" />
<template v-for="(_, name) in $scopedSlots" :slot="name" slot-scope="slotData"><slot :name="name" v-bind="slotData" /></template>
</plano-modal>
</template>

<script>
import PlanoModal from './plano_modal';
export default {
name: "EditModal",
components: {
PlanoModal
},
}
</script>

<style>
</style>
8 changes: 5 additions & 3 deletions app/javascript/components/email_addresses_editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@
</div>
<div class="mt-3">
Additional Emails
<div v-for="email in additional">
<div v-for="email in additional" :key="email.id">
<email-address-editor
v-bind:value="email"
:value="email"
@delete="onDelete(email)"
@input="onInput(email)"
:disabled="disabled"
></email-address-editor>
</div>
</div>
<b-button @click="onNew" variant="primary" title="New" class="mt-2" size="sm">
<b-button ref="add_email_button" @click="onNew" variant="primary" title="New" class="mt-2" size="sm">
<b-icon-plus></b-icon-plus>
</b-button>
</div>
Expand Down Expand Up @@ -120,6 +120,8 @@ export default {
},
onNew() {
this.additional.push({email: '', isdefault: false, person_id: this.person.id})
this.$emit('add')
this.$refs.add_email_button.scrollIntoView({behavior: 'smooth'});
}
},
mounted() {
Expand Down
9 changes: 6 additions & 3 deletions app/javascript/components/modal_form.vue
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
<template>
<b-modal
size="xl"
<plano-modal
:title="title"
ref='model-form'
>
<slot></slot>
<template #modal-footer="{ ok, cancel, hide }">
<slot name="footer" v-bind:ok="close" v-bind:cancel="onCancel"></slot>
</template>
</b-modal>
</plano-modal>
</template>

<script>
import PlanoModal from './plano_modal';
export default {
name: 'ModalForm',
components: {
PlanoModal
},
props: {
title: String
},
Expand Down
19 changes: 19 additions & 0 deletions app/javascript/components/model_loading_overlay.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<template>
<b-overlay :show="!selected" spinner-variant="primary" variant="white" opacity="1">
<slot></slot>
</b-overlay>
</template>

<script>
import { modelMixin } from '@/store/model.mixin'
export default {
name: "ModelLoadingOverlay",
mixins: [
modelMixin
]
}
</script>

<style>
</style>
6 changes: 4 additions & 2 deletions app/javascript/components/model_select.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ export default {
},
size: {
type: String
}
},
filter: null
},
mixins: [
modelMixin
Expand Down Expand Up @@ -95,7 +96,8 @@ export default {
this.search({
fields: field_name,
"sortBy": sort_by,
"sortOrder": 'asc'
"sortOrder": 'asc',
"filter": this.filter
}).then(data => {
this.data = data
this.loading = false
Expand Down
9 changes: 9 additions & 0 deletions app/javascript/components/plano_modal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
scrollable
v-on="$listeners"
v-bind="$attrs"
ref="plano-modal"
>
<slot v-for="(_, name) in $slots" :name="name" :slot="name" />
<template v-for="(_, name) in $scopedSlots" :slot="name" slot-scope="slotData"><slot :name="name" v-bind="slotData" /></template>
Expand All @@ -15,6 +16,14 @@
<script>
export default {
name: "PlanoModal",
methods: {
show() {
this.$refs['plano-modal'].show()
},
hide() {
this.$refs['plano-modal'].hide()
}
}
}
</script>

Expand Down
9 changes: 7 additions & 2 deletions app/javascript/conflicts/availability.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
v-for="conflict in sortedCollection" :key="conflict.id"
>
<strong>{{conflict.title}}</strong>
<div>
{{conflict.room.name}},
{{ formatLocaleDate(conflict.start_time )}}
</div>
<div><em>Outside the availability for:</em></div>
<div v-for="availability in conflict.availability_conflicts" :key="availability.id">
{{availability.person.published_name}}
Expand All @@ -26,13 +30,14 @@
<script>
import modelMixin from '../store/model.mixin';
import tableMixin from '../store/table.mixin';
// import { availabilityConflictModel as model } from '@/store/availability_conflict.store'
import dateTimeMixin from '../components/date_time.mixin'
export default {
name: "Availability",
mixins: [
modelMixin,
tableMixin
tableMixin,
dateTimeMixin
],
props: {
},
Expand Down
Loading

0 comments on commit 8e6503b

Please sign in to comment.