Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"moment": "^2.22.2",
"moment-timezone": "^0.5.28",
"node-sass": "^4.14.1",
"openstack-uicore-foundation": "^2.0.47",
"openstack-uicore-foundation": "^2.0.54",
"optimize-css-assets-webpack-plugin": "^5.0.3",
"postcss-loader": "^2.1.6",
"react": "^16.13.1",
Expand Down
24 changes: 24 additions & 0 deletions src/actions/summit-actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ export const REQUEST_SUMMIT = 'REQUEST_SUMMIT';
export const RECEIVE_SUMMIT = 'RECEIVE_SUMMIT';
export const REQUEST_SUMMITS = 'REQUEST_SUMMITS';
export const RECEIVE_SUMMITS = 'RECEIVE_SUMMITS';
export const REQUEST_ALL_SUMMITS = 'REQUEST_ALL_SUMMITS';
export const RECEIVE_ALL_SUMMITS = 'RECEIVE_ALL_SUMMITS';
export const SET_CURRENT_SUMMIT = 'SET_CURRENT_SUMMIT';
export const RESET_SUMMIT_FORM = 'RESET_SUMMIT_FORM';
export const UPDATE_SUMMIT = 'UPDATE_SUMMIT';
Expand Down Expand Up @@ -121,6 +123,28 @@ export const loadSummits = (page = 1, perPage = 10) => (dispatch, getState) => {
);
}

export const getAllSummits = () => (dispatch, getState) => {

let { loggedUserState } = getState();
let { accessToken } = loggedUserState;

let params = {
access_token : accessToken,
expand: 'none',
relations: 'none',
page: 1,
per_page: 100,
order: '-id',
};

getRequest(
createAction(REQUEST_ALL_SUMMITS),
createAction(RECEIVE_ALL_SUMMITS),
`${window.API_BASE_URL}/api/v1/summits/all`,
authErrorHandler
)(params)(dispatch, getState);
}

export const resetSummitForm = () => (dispatch, getState) => {
dispatch(createAction(RESET_SUMMIT_FORM)({}));
};
Expand Down
15 changes: 15 additions & 0 deletions src/actions/summit-builder-actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export const CHANGE_CURRENT_LOCATION = 'CHANGE_CURRENT_LOCA
export const CHANGE_CURRENT_EVENT_TYPE = 'CHANGE_CURRENT_EVENT_TYPE';
export const CHANGE_CURRENT_TRACK = 'CHANGE_CURRENT_TRACK';
export const CHANGE_CURRENT_PRESENTATION_SELECTION_STATUS = 'CHANGE_CURRENT_PRESENTATION_SELECTION_STATUS';
export const CHANGE_CURRENT_PRESENTATION_SELECTION_PLAN = 'CHANGE_CURRENT_PRESENTATION_SELECTION_PLAN';
export const CHANGE_CURRENT_UNSCHEDULE_SEARCH_TERM = 'CHANGE_CURRENT_UNSCHEDULE_SEARCH_TERM';
export const CHANGE_CURRENT_SCHEDULE_SEARCH_TERM = 'CHANGE_CURRENT_SCHEDULE_SEARCH_TERM';
export const CHANGE_CURRENT_ORDER_BY = 'CHANGE_CURRENT_ORDER_BY';
Expand All @@ -54,6 +55,7 @@ export const getUnScheduleEventsPage =
event_type_id = null,
track_id = null,
selection_status = null,
selection_plan = null,
term = null,
order = null
) =>
Expand All @@ -76,6 +78,10 @@ export const getUnScheduleEventsPage =
filter.push(`selection_status==${selection_status}`);
}

if(selection_plan != null){
filter.push(`selection_plan_id==${selection_plan}`);
}

if(term){
let escapedTerm = escapeFilterValue(term);
filter.push(`title=@${escapedTerm},abstract=@${escapedTerm},social_summary=@${escapedTerm},tags=@${escapedTerm},speaker=@${escapedTerm},speaker_email=@${escapedTerm},id==${escapedTerm}`);
Expand Down Expand Up @@ -219,6 +225,15 @@ export const changeCurrentPresentationSelectionStatus = (currentPresentationSele
));
}

export const changeCurrentPresentationSelectionPlan = (currentPresentationSelectionPlan) => (dispatch, getState) => {

dispatch(createAction(CHANGE_CURRENT_PRESENTATION_SELECTION_PLAN)(
{
presentationSelectionPlan: currentPresentationSelectionPlan
}
));
}

export const changeCurrentUnScheduleOrderBy = (orderBy) => (dispatch, getState) => {

dispatch(createAction(CHANGE_CURRENT_ORDER_BY)(
Expand Down
2 changes: 1 addition & 1 deletion src/actions/tag-actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export const getTagGroup = (tagGroupId) => (dispatch, getState) => {
dispatch(startLoading());

let params = {
expand : 'allowed_tags,tag',
expand : 'allowed_tags, allowed_tags.tag',
access_token : accessToken,
};

Expand Down
19 changes: 16 additions & 3 deletions src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import T from 'i18n-react';
import CustomErrorPage from "./pages/custom-error-page";
import history from './history'
import exclusiveSections from 'js-yaml-loader!./exclusive-sections.yml';

import IdTokenVerifier from 'idtoken-verifier';


// here is set by default user lang as en
Expand Down Expand Up @@ -73,8 +73,20 @@ class App extends React.PureComponent {
}

render() {
let { isLoggedUser, onUserAuth, doLogout, getUserInfo, member, backUrl, loading} = this.props;
let profile_pic = member ? member.pic : '';
let { isLoggedUser, onUserAuth, doLogout, getUserInfo, idToken, backUrl, loading} = this.props;


// get user pic from idtoken claims (IDP)
let profile_pic = '';

if(idToken){
let verifier = new IdTokenVerifier({
issuer: window.IDP_BASE_URL,
audience: window.OAUTH2_CLIENT_ID
});
let jwt = verifier.decode(idToken);
profile_pic = jwt.payload.picture;
}

return (
<Router history={history}>
Expand Down Expand Up @@ -111,6 +123,7 @@ const mapStateToProps = ({ loggedUserState, baseState }) => ({
isLoggedUser: loggedUserState.isLoggedUser,
backUrl: loggedUserState.backUrl,
member: loggedUserState.member,
idToken: loggedUserState.idToken,
loading : baseState.loading,
});

Expand Down
20 changes: 15 additions & 5 deletions src/components/forms/event-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,14 @@ class EventForm extends React.Component {

let levels_ddl = levelOpts.map(l => ({label: l, value: l}));

let selection_plans_ddl = selectionPlansOpts.map(sp => ({label: sp.name, value: sp.id}));
let selection_plans_ddl = [];

if (entity.track_id) {
const track = trackOpts.find(t => t.id === entity.track_id);
selection_plans_ddl = selectionPlansOpts
.filter(sp => sp.track_groups.some(gr => track.track_groups.includes(gr)))
.map(sp => ({label: sp.name, value: sp.id}));
}

let rsvp_templates_ddl = rsvpTemplateOpts.map(
t => {
Expand Down Expand Up @@ -525,15 +532,18 @@ class EventForm extends React.Component {
handleClick={this.toggleSection.bind(this, 'live')}>
<div className="row form-group">
<div className="col-md-6">
<label> {T.translate("edit_event.streaming_url")}&nbsp;<i className="fa fa-info-circle"
aria-hidden="true" title={T.translate("edit_event.streaming_url_info")}></i></label>
<label>
{T.translate("edit_event.streaming_url")}&nbsp;
<i className="fa fa-info-circle" aria-hidden="true" title={T.translate("edit_event.streaming_url_info")} />
</label>
<input className="form-control" id="streaming_url" value={entity.streaming_url} onChange={this.handleChange} />
</div>
</div>
<div className="row form-group">
<div className="col-md-6">
<label> {T.translate("edit_event.meeting_url")}&nbsp;<i className="fa fa-info-circle"
aria-hidden="true" title={T.translate("edit_event.meeting_url_info")}></i></label>
<label> {T.translate("edit_event.meeting_url")}&nbsp;
<i className="fa fa-info-circle" aria-hidden="true" title={T.translate("edit_event.meeting_url_info")} />
</label>
<input className="form-control" id="meeting_url" value={entity.meeting_url} onChange={this.handleChange} />
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions src/components/forms/selection-plan-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ class SelectionPlanForm extends React.Component {
id="max_submission_allowed_per_user"
value={entity.max_submission_allowed_per_user}
onChange={this.handleChange}
min={0}
/>
</div>
<div className="col-md-3 checkboxes-div">
Expand Down
2 changes: 0 additions & 2 deletions src/components/forms/summit-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,6 @@ class SummitForm extends React.Component {
onChange={this.handleChange}
format={{date:"YYYY-MM-DD", time: "HH:mm"}}
timezone={entity.time_zone_id}
timeConstraints={{ hours: { min: 7, max: 22}}}
value={epochToMomentTimeZone(entity.start_date, entity.time_zone_id)}
error={this.hasErrors('start_date')}
/>
Expand All @@ -395,7 +394,6 @@ class SummitForm extends React.Component {
onChange={this.handleChange}
format={{date:"YYYY-MM-DD", time: "HH:mm"}}
timezone={entity.time_zone_id}
timeConstraints={{ hours: { min: 7, max: 22}}}
value={epochToMomentTimeZone(entity.end_date, entity.time_zone_id)}
error={this.hasErrors('end_date')}
/>
Expand Down
3 changes: 1 addition & 2 deletions src/components/inputs/question-answers-input.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ export default class QuestionAnswersInput extends React.Component {

let answers = props.questions.map(q => {
let defaultValue = (q.type == 'CheckBox') ? 'false' : '';

let answer = props.answers.find(ans => ans.question_id == q.id);
let value = answer ? answer.value : defaultValue;
let value = answer ? answer.answer : defaultValue;
return ({question_id: q.id, answer: value});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class ScheduleAdminsBulkActionsSelector extends React.Component {
let { onSelectAll, bulkOptions } = this.props;
return (
<div className="row bulk-actions-selector-container">
<div className="col-md-6">
<div className="col-md-8">
<input type="checkbox" onClick={onSelectAll}/>
<select ref={(select) => { this.actionTypeSelect = select; }}>
<option value="">{T.translate("published_bulk_actions_selector.options.default")}</option>
Expand All @@ -37,7 +37,7 @@ class ScheduleAdminsBulkActionsSelector extends React.Component {
}
</select>
</div>
<div className="col-md-6">
<div className="col-md-4">
<button onClick={this.onPerformBulkAction.bind(this)} title={ T.translate("published_bulk_actions_selector.titles.go")} className="btn btn-default btn-sm">
<i className="fa fa-play">&nbsp;{T.translate("published_bulk_actions_selector.buttons.go")}</i>
</button>
Expand Down
Loading