-
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 #1103 from PlanoramaEvents/development
3.7.0-rc1
- Loading branch information
Showing
46 changed files
with
846 additions
and
69 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
require 'csv' | ||
class RceController < ApplicationController | ||
# All time need to be in the convention timezone | ||
around_action :set_timezone | ||
|
||
def schedule | ||
authorize Session, policy_class: RcePolicy | ||
|
||
# Need to get sessions that are online or hybrid ... | ||
# and/or streamed | ||
sessions = SessionService.scheduled_sessions.where( | ||
"environment in (?) or streamed = true", ['hybrid', 'virtual'] | ||
) | ||
|
||
send_data generate_csv(sessions), | ||
filename: "schedule-#{Time.now.strftime('%m-%d-%Y')}.csv", | ||
disposition: 'attachment' | ||
end | ||
|
||
def generate_csv(sessions) | ||
column_names = [ | ||
'Start date','Start time','End date','End time', | ||
'Schedule name','Schedule description','Segment name','Segment type', | ||
'Tags','Attendance' | ||
] | ||
|
||
CSV.generate do |csv| | ||
csv << column_names | ||
|
||
sessions.each do |session| | ||
# Session has an online audience only if it is streamed or virtual (online) | ||
next unless session.environment == 'virtual' || session.streamed | ||
# If the room is not an online room or an RCE stage then there is no online audience | ||
next unless session.room.integrations["rce"] && session.room.integrations["rce"]["SegmentType"] | ||
|
||
csv << [ | ||
session.start_time.strftime("%Y-%m-%d"), | ||
session.start_time.strftime("%H:%M"), | ||
(session.start_time + session.duration.minutes).strftime("%Y-%m-%d"), | ||
(session.start_time + session.duration.minutes).strftime("%H:%M"), | ||
session.title, | ||
session.description, # HTML may be an issue ... | ||
session.title, | ||
session.room.integrations["rce"] ? session.room.integrations["rce"]["SegmentType"] : "sessions", | ||
# Areas and tags | ||
"#{session.area_list.sort.join(', ')}, #{session.tag_list&.join(', ')}", # Tags may be new line seperated? | ||
'regular' | ||
] | ||
end | ||
end | ||
end | ||
end |
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 |
---|---|---|
|
@@ -347,6 +347,7 @@ def allowed_params | |
format_id | ||
room_set_id | ||
title | ||
short_title | ||
description | ||
duration | ||
minimum_people | ||
|
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,58 @@ | ||
<template> | ||
<div v-if="currentSettings"> | ||
<config-editor | ||
model="configuration" | ||
:parameter="parameter" | ||
v-if="parameter" | ||
> | ||
<template #default="{config, onChange}"> | ||
<slot v-bind="{config, onChange}"></slot> | ||
</template> | ||
</config-editor> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import { modelMixinNoProp } from '../store/model.mixin'; | ||
import ConfigEditor from './config_editor'; | ||
import settingsMixin from "@/store/settings.mixin"; | ||
export default { | ||
name: "SingleConfigManager", | ||
components: { | ||
ConfigEditor | ||
}, | ||
props: { | ||
parameterName: { | ||
type: String, | ||
required: true | ||
} | ||
}, | ||
data: () => ({ | ||
model: 'parameter_name', | ||
parameter: null, | ||
loading: true, | ||
}), | ||
mixins: [ | ||
modelMixinNoProp, | ||
settingsMixin | ||
], | ||
methods: { | ||
load_parameters() { | ||
this.loading = true | ||
// This needs to change to get sorted ...? | ||
this.fetch({}).then(data => { | ||
this.parameter = this.collection.find(p => p.parameter_name === this.parameterName) | ||
this.loading = false | ||
}) | ||
}, | ||
}, | ||
mounted() { | ||
this.fetchSettings(); | ||
this.load_parameters(); | ||
} | ||
} | ||
</script> | ||
|
||
<style lang="scss"> | ||
</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,58 @@ | ||
import { toastMixin } from '@/mixins'; | ||
import { FETCH_G24RCE_INTEGRATION, SET_G24RCE_INTEGRATION, integrationModel } from '@/store/integration.store'; | ||
import { PATCH_FIELDS } from '@/store/model.store'; | ||
import { mapActions, mapState, mapMutations } from 'vuex'; | ||
|
||
export const g24rceMixin = { | ||
mixins: [ | ||
toastMixin | ||
], | ||
computed: { | ||
...mapState(['g24rce']), | ||
g24rceEnabled: { | ||
get() { | ||
return this.g24rce?.config?.enabled | ||
}, | ||
set(val) { | ||
if (this.g24rce?.config) { | ||
this.g24rce.config.enabled = val; | ||
} | ||
} | ||
}, | ||
g24rceBasebPortalUrl: { | ||
get() { | ||
return this.g24rce?.config?.base_portal_url | ||
}, | ||
set(val) { | ||
if (this.g24rce?.config) { | ||
this.g24rce.config.base_portal_url = val; | ||
} | ||
} | ||
} | ||
}, | ||
methods: { | ||
...mapActions({ | ||
fetchG24RCEInfo: FETCH_G24RCE_INTEGRATION, | ||
patchModel: PATCH_FIELDS, | ||
}), | ||
...mapMutations({ | ||
setG24RCEInfo: SET_G24RCE_INTEGRATION, | ||
}), | ||
fetchG24RCEInfoIfMissing() { | ||
if (!this.g24rce || !Object.keys(this.g24rce).length) { | ||
this.fetchG24RCEInfo(); | ||
} | ||
}, | ||
patchG24RCEConfig() { | ||
this.toastPromise(new Promise((res, rej) => { | ||
this.patchModel({ model: integrationModel, item: this.g24rce, fields: ['config'], selected: false }).then((data) => { | ||
this.setG24RCEInfo(data); | ||
res(data); | ||
}).catch(rej); | ||
}), "G24 RCE integration successfully updated.") | ||
} | ||
}, | ||
mounted() { | ||
this.fetchG24RCEInfoIfMissing(); | ||
} | ||
} |
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,38 @@ | ||
<template> | ||
<div class="container-fluid"> | ||
<div class="row"> | ||
<div class="column flex-grow-1"> | ||
<h4 class="mt-3">Configuration</h4> | ||
<b-form-group label-cols="auto" label="Enable G24 RCE" class="configuration enable"> | ||
<b-form-checkbox switch v-model="g24rceEnabled" @change="patchG24RCEConfig()"></b-form-checkbox> | ||
</b-form-group> | ||
|
||
<a href="/rce/schedule" target="_blank" class="btn btn-primary">Export Sessions</a> | ||
|
||
<b-form-group label="Base URL for Portal" class="ml-2 mt-5"> | ||
<b-form-input type="text" v-model="g24rceBasebPortalUrl" @blur="patchG24RCEConfig()" | ||
:disabled="!g24rceEnabled"></b-form-input> | ||
</b-form-group> | ||
</div> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import { g24rceMixin } from './g24rce.mixin' | ||
export default { | ||
name: "G24RCESettings", | ||
mixins: [g24rceMixin] | ||
} | ||
</script> | ||
|
||
<style lang="scss"> | ||
.configuration.enable .form-row { | ||
align-items: center; | ||
} | ||
.basis-14 { | ||
flex-basis: 14rem; | ||
} | ||
</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
Oops, something went wrong.