Skip to content
Open
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
18 changes: 18 additions & 0 deletions src/actions/speaker-actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ export const UNSELECT_ALL_SUMMIT_SPEAKERS = "UNSELECT_ALL_SUMMIT_SPEAKERS";
export const SEND_SPEAKERS_EMAILS = "SEND_SPEAKERS_EMAILS";
export const SET_SPEAKERS_CURRENT_FLOW_EVENT =
"SET_SPEAKERS_CURRENT_FLOW_EVENT";
export const REQUEST_SPEAKERS_ACTIVITIES_COUNT =
"REQUEST_SPEAKERS_ACTIVITIES_COUNT";
export const RECEIVE_SPEAKERS_ACTIVITIES_COUNT =
"RECEIVE_SPEAKERS_ACTIVITIES_COUNT";

const normalizeEntity = (entity) => {
const normalizedEntity = { ...entity };
Expand Down Expand Up @@ -882,6 +886,18 @@ const parseFilters = (filters) => {
return filter;
};

const getSpeakersActivitiesCount =
(summitId, filter, accessToken) => (dispatch) => {
const params = { access_token: accessToken };
if (filter.length > 0) params["filter[]"] = filter;
return getRequest(
createAction(REQUEST_SPEAKERS_ACTIVITIES_COUNT),
createAction(RECEIVE_SPEAKERS_ACTIVITIES_COUNT),
`${window.API_BASE_URL}/api/v1/summits/${summitId}/speakers/all/events/count`,
authErrorHandler
)(params)(dispatch);
};

export const getSpeakersBySummit =
(
term = null,
Expand Down Expand Up @@ -928,6 +944,8 @@ export const getSpeakersBySummit =
params.order = `${orderDirSign}${order}`;
}

dispatch(getSpeakersActivitiesCount(currentSummit.id, filter, accessToken));

return getRequest(
createAction(REQUEST_SPEAKERS_BY_SUMMIT),
createAction(RECEIVE_SPEAKERS_BY_SUMMIT),
Expand Down
20 changes: 20 additions & 0 deletions src/actions/submitter-actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,27 @@ export const UNSELECT_ALL_SUMMIT_SUBMITTERS = "UNSELECT_ALL_SUMMIT_SUBMITTERS";
export const SEND_SUBMITTERS_EMAILS = "SEND_SUBMITTERS_EMAILS";
export const SET_SUBMITTERS_CURRENT_FLOW_EVENT =
"SET_SUBMITTERS_CURRENT_FLOW_EVENT";
export const REQUEST_SUBMITTERS_ACTIVITIES_COUNT =
"REQUEST_SUBMITTERS_ACTIVITIES_COUNT";
export const RECEIVE_SUBMITTERS_ACTIVITIES_COUNT =
"RECEIVE_SUBMITTERS_ACTIVITIES_COUNT";

export const initSubmittersList = () => async (dispatch) => {
dispatch(createAction(INIT_SUBMITTERS_LIST_PARAMS)());
};

const getSubmittersActivitiesCount =
(summitId, filter, accessToken) => (dispatch) => {
const params = { access_token: accessToken };
if (filter.length > 0) params["filter[]"] = filter;
return getRequest(
createAction(REQUEST_SUBMITTERS_ACTIVITIES_COUNT),
createAction(RECEIVE_SUBMITTERS_ACTIVITIES_COUNT),
`${window.API_BASE_URL}/api/v1/summits/${summitId}/submitters/all/events/count`,
authErrorHandler
)(params)(dispatch);
};

export const getSubmittersBySummit =
(
term = null,
Expand Down Expand Up @@ -97,6 +113,10 @@ export const getSubmittersBySummit =
params.order = `${orderDirSign}${order}`;
}

dispatch(
getSubmittersActivitiesCount(currentSummit.id, filter, accessToken)
);

return getRequest(
createAction(REQUEST_SUBMITTERS_BY_SUMMIT),
createAction(RECEIVE_SUBMITTERS_BY_SUMMIT),
Expand Down
8 changes: 6 additions & 2 deletions src/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"member": "Member",
"members": "Members",
"event": "Activity",
"activities": "Activities",
"group": "Group",
"yes": "Yes",
"no": "No",
Expand Down Expand Up @@ -1045,7 +1046,8 @@
"send_emails_title": "You are about to send an EMAIL BLAST to selected speakers !",
"should_send_copy_2_submitter": "Also send to submitter?",
"allows_to_reassign": "Allow to reassign?",
"items_qty": "Selected {qty} Speakers",
"items_qty": "Selected {qty} Speakers | {activitiesQty} Activities",
"items_qty_no_activities": "Selected {qty} Speakers",
"placeholders": {
"search_speakers": "Search by Full Name, Email, Speaker Id, Member Id, Title Or Abstract",
"test_recipient": "Optional Test Recipient"
Expand All @@ -1059,7 +1061,9 @@
"send_emails_title": "You are about to send an EMAIL BLAST to selected submitters !",
"resend_done": "Emails sent successfully.",
"submitters": "Submitters",
"submitters_no_speakers": "Submitters (no speakers)"
"submitters_no_speakers": "Submitters (no speakers)",
"items_qty": "Selected {qty} Submitters | {activitiesQty} Activities",
"items_qty_no_activities": "Selected {qty} Submitters"
},
"speaker_attendance_list": {
"speaker_attendance_list": "Speaker Attendance List",
Expand Down
32 changes: 25 additions & 7 deletions src/pages/summit_speakers/summit-speakers-list-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ import { connect } from "react-redux";
import T from "i18n-react/dist/i18n-react";
import Swal from "sweetalert2";
import { Modal, Pagination } from "react-bootstrap";
import FreeTextSearch from "openstack-uicore-foundation/lib/components/free-text-search"
import SelectableTable from "openstack-uicore-foundation/lib/components/table-selectable"
import Dropdown from "openstack-uicore-foundation/lib/components/inputs/dropdown"
import FreeTextSearch from "openstack-uicore-foundation/lib/components/free-text-search";
import SelectableTable from "openstack-uicore-foundation/lib/components/table-selectable";
import Dropdown from "openstack-uicore-foundation/lib/components/inputs/dropdown";
import Input from "openstack-uicore-foundation/lib/components/inputs/text-input";
import SpeakerPromoCodeSpecForm from "../../components/forms/speakers-promo-code-spec-form";
import {
Expand Down Expand Up @@ -702,8 +702,10 @@ class SummitSpeakersListPage extends React.Component {
order,
orderDir,
totalItems,
totalActivities,
selectedCount,
selectedAll,
excludedItems,
selectionPlanFilter,
trackFilter,
trackGroupFilter,
Expand All @@ -713,6 +715,8 @@ class SummitSpeakersListPage extends React.Component {
currentFlowEvent
} = this.getSubjectProps();

const activitiesCountAccurate = selectedAll && excludedItems.length === 0;

const columns = [
{
columnKey: "full_name",
Expand Down Expand Up @@ -901,7 +905,11 @@ class SummitSpeakersListPage extends React.Component {
{this.state.source === sources.speakers
? T.translate("summit_speakers_list.summit_speakers_list")
: T.translate("summit_submitters_list.summit_submitters_list")}{" "}
({totalItems})
({totalItems}{" "}
{this.state.source === sources.speakers
? T.translate("summit_speakers_list.speakers")
: T.translate("summit_submitters_list.submitters")}{" "}
| {totalActivities} {T.translate("general.activities")})
</h3>
<div className="row">
<div className="col-md-6">
Expand Down Expand Up @@ -1044,9 +1052,19 @@ class SummitSpeakersListPage extends React.Component {
<div>
<span>
<b>
{T.translate("summit_speakers_list.items_qty", {
qty: selectedCount
})}
{activitiesCountAccurate
? T.translate(
this.state.source === sources.speakers
? "summit_speakers_list.items_qty"
: "summit_submitters_list.items_qty",
{ qty: selectedCount, activitiesQty: totalActivities }
)
: T.translate(
this.state.source === sources.speakers
? "summit_speakers_list.items_qty_no_activities"
: "summit_submitters_list.items_qty_no_activities",
{ qty: selectedCount }
)}
</b>
</span>
<SelectableTable
Expand Down
7 changes: 6 additions & 1 deletion src/reducers/summit_speakers/summit-speakers-list-reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ import {
SELECT_ALL_SUMMIT_SPEAKERS,
UNSELECT_ALL_SUMMIT_SPEAKERS,
SEND_SPEAKERS_EMAILS,
SET_SPEAKERS_CURRENT_FLOW_EVENT
SET_SPEAKERS_CURRENT_FLOW_EVENT,
RECEIVE_SPEAKERS_ACTIVITIES_COUNT
} from "../../actions/speaker-actions";

import {
Expand All @@ -38,6 +39,7 @@ const DEFAULT_STATE = {
lastPage: 1,
perPage: 10,
totalItems: 0,
totalActivities: 0,
selectedCount: 0,
selectedItems: [],
excludedItems: [],
Expand Down Expand Up @@ -205,6 +207,9 @@ const summitSpeakersListReducer = (state = DEFAULT_STATE, action = {}) => {
case SET_SPEAKERS_CURRENT_FLOW_EVENT: {
return { ...state, currentFlowEvent: payload };
}
case RECEIVE_SPEAKERS_ACTIVITIES_COUNT: {
return { ...state, totalActivities: payload.response.count };
}
default:
return state;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ import {
SELECT_ALL_SUMMIT_SUBMITTERS,
UNSELECT_ALL_SUMMIT_SUBMITTERS,
SEND_SUBMITTERS_EMAILS,
SET_SUBMITTERS_CURRENT_FLOW_EVENT
SET_SUBMITTERS_CURRENT_FLOW_EVENT,
RECEIVE_SUBMITTERS_ACTIVITIES_COUNT
} from "../../actions/submitter-actions";

import {
Expand All @@ -38,6 +39,7 @@ const DEFAULT_STATE = {
lastPage: 1,
perPage: 10,
totalItems: 0,
totalActivities: 0,
selectedCount: 0,
selectedItems: [],
excludedItems: [],
Expand Down Expand Up @@ -193,6 +195,9 @@ const summitSubmittersListReducer = (state = DEFAULT_STATE, action) => {
case SET_SUBMITTERS_CURRENT_FLOW_EVENT: {
return { ...state, currentFlowEvent: payload };
}
case RECEIVE_SUBMITTERS_ACTIVITIES_COUNT: {
return { ...state, totalActivities: payload.response.count };
}
default:
return state;
}
Expand Down
2 changes: 2 additions & 0 deletions src/reducers/summits/current-summit-reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,7 @@ const currentSummitReducer = (state = DEFAULT_STATE, action) => {
};
}
case RECEIVE_REG_LITE_SETTINGS: {
if (!payload.response) return state;
const { data } = payload.response;
const reg_lite_marketing_settings = {};

Expand All @@ -695,6 +696,7 @@ const currentSummitReducer = (state = DEFAULT_STATE, action) => {
return { ...state, reg_lite_marketing_settings: newMarketingSettings };
}
case RECEIVE_PRINT_APP_SETTINGS: {
if (!payload.response) return state;
const { data } = payload.response;
const print_app_marketing_settings = {};

Expand Down
2 changes: 1 addition & 1 deletion webpack.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = merge(common, {
devtool: "inline-source-map",
devServer: {
historyApiFallback: true,
server: { type: "https" }
server: { type: "http" }
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Check for HTTPS-dependent features that may break with HTTP dev server

echo "=== Checking for Service Workers ==="
rg -n --type=js --type=ts -C2 'navigator\.serviceWorker|registerServiceWorker'

echo -e "\n=== Checking for Secure Cookie usage ==="
rg -n --type=js --type=ts -C2 'secure:\s*true|; secure'

echo -e "\n=== Checking for HTTPS-only Web APIs ==="
rg -n --type=js --type=ts -C2 'navigator\.geolocation|Notification\.requestPermission|navigator\.mediaDevices'

echo -e "\n=== Checking for OAuth/Auth configuration ==="
rg -n --type=js --type=ts -C2 'oauth|OAuth|redirect.*[Uu]ri'

Repository: fntechgit/summit-admin

Length of output: 6670


Verify HTTP development server compatibility with your application's security features.

Switching from HTTPS to HTTP in development creates a dev/prod parity gap if your production environment uses HTTPS. Before deployment, confirm that:

  • Authentication and OAuth flows work correctly with HTTP redirect URIs
  • No security-sensitive features (like service workers or secure cookies) are inadvertently broken
  • Browser compatibility is maintained for any features relying on secure contexts

If this change was made to work around local development issues, consider alternatives like mkcert for self-signed certificates to preserve HTTPS in development.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@webpack.dev.js` at line 11, The dev server was changed to use HTTP via the
server: { type: "http" } setting in webpack.dev.js which can break HTTPS-only
features and OAuth redirect URIs; either revert to HTTPS by configuring the dev
server to use TLS (provide cert/key or use a local CA tool like mkcert) or, if
you must keep HTTP, add a checklist and guards to verify authentication/OAuth
redirect URIs, secure cookies, service worker registration, and secure-context
dependent APIs work in development; update the webpack.dev.js server
configuration (the server object) and any development docs to reflect the chosen
approach so dev/prod parity is preserved.

},
output: {
filename: "[name].js",
Expand Down
Loading