From fec454757cc2a0056b4801cb77688d400010cd99 Mon Sep 17 00:00:00 2001 From: Priscila Moneo Date: Tue, 9 Jun 2026 10:43:47 -0300 Subject: [PATCH 1/3] feat: move show dashboard to mui Signed-off-by: Priscila Moneo --- src/components/CustomTheme.js | 3 +- src/i18n/en.json | 8 + .../components/summit-dashboard-date-range.js | 41 ++ .../summit-dashboard-section-header.js | 18 + .../components/summit-dashboard-stat.js | 26 + src/pages/summits/summit-dashboard-page.js | 667 +++++++----------- src/styles/summit-dashboard-page.less | 18 - 7 files changed, 345 insertions(+), 436 deletions(-) create mode 100644 src/pages/summits/components/summit-dashboard-date-range.js create mode 100644 src/pages/summits/components/summit-dashboard-section-header.js create mode 100644 src/pages/summits/components/summit-dashboard-stat.js delete mode 100644 src/styles/summit-dashboard-page.less diff --git a/src/components/CustomTheme.js b/src/components/CustomTheme.js index 7e8581ce0..6c1e78cce 100644 --- a/src/components/CustomTheme.js +++ b/src/components/CustomTheme.js @@ -11,7 +11,8 @@ const theme = createTheme({ contrast: "#FFFFFF" }, background: { - light: "#F7F7F9" + light: "#F7F7F9", + secondary: "#eaeaea" }, text: { primary: "#000000DE", diff --git a/src/i18n/en.json b/src/i18n/en.json index 0bb5e83e8..a685042bf 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -353,6 +353,14 @@ "refund_amount_emitted": "Amount Refund", "ticket_types": "Active Tickets per Ticket Types", "badge_types": "Active Tickets per Badge Types", + "general_dates": "General Dates", + "ordering": "Ordering", + "important_documents": "Important Documents", + "sponsor_levels": "Sponsor Levels", + "pages": "Pages", + "tab_badge_types": "Badge Types", + "media_uploads": "Media Uploads", + "booth_layout_types": "Booth Layout Types", "expand": "Expand section", "collapse": "Collapse section", "badge_features_tickets": "Active Tickets per Badge Features", diff --git a/src/pages/summits/components/summit-dashboard-date-range.js b/src/pages/summits/components/summit-dashboard-date-range.js new file mode 100644 index 000000000..33b6d6be1 --- /dev/null +++ b/src/pages/summits/components/summit-dashboard-date-range.js @@ -0,0 +1,41 @@ +import React from "react"; +import PropTypes from "prop-types"; +import Box from "@mui/material/Box"; +import Typography from "@mui/material/Typography"; +import RemoveIcon from "@mui/icons-material/Remove"; +import moment from "moment-timezone"; + +function formatDate(ts, tzName) { + return moment.unix(ts).tz(tzName).format("YYYY/MM/DD hh:mm A"); +} + +function SummitDashboardDateRange({ label, startTs, endTs, tzName }) { + return ( + + + {label} + + {formatDate(startTs, tzName)} + + {formatDate(endTs, tzName)} + + ); +} + +SummitDashboardDateRange.propTypes = { + label: PropTypes.string.isRequired, + startTs: PropTypes.number.isRequired, + endTs: PropTypes.number.isRequired, + tzName: PropTypes.string.isRequired +}; + +export default SummitDashboardDateRange; diff --git a/src/pages/summits/components/summit-dashboard-section-header.js b/src/pages/summits/components/summit-dashboard-section-header.js new file mode 100644 index 000000000..3366ae0df --- /dev/null +++ b/src/pages/summits/components/summit-dashboard-section-header.js @@ -0,0 +1,18 @@ +import React from "react"; +import PropTypes from "prop-types"; +import Box from "@mui/material/Box"; +import Typography from "@mui/material/Typography"; + +function SummitDashboardSectionHeader({ children }) { + return ( + + {children} + + ); +} + +SummitDashboardSectionHeader.propTypes = { + children: PropTypes.node.isRequired +}; + +export default SummitDashboardSectionHeader; diff --git a/src/pages/summits/components/summit-dashboard-stat.js b/src/pages/summits/components/summit-dashboard-stat.js new file mode 100644 index 000000000..687b23fbc --- /dev/null +++ b/src/pages/summits/components/summit-dashboard-stat.js @@ -0,0 +1,26 @@ +import React from "react"; +import PropTypes from "prop-types"; +import Box from "@mui/material/Box"; +import Typography from "@mui/material/Typography"; + +function SummitDashboardStat({ label, value }) { + return ( + + + {label} + + {value} + + ); +} + +SummitDashboardStat.propTypes = { + label: PropTypes.string.isRequired, + value: PropTypes.number +}; + +SummitDashboardStat.defaultProps = { + value: 0 +}; + +export default SummitDashboardStat; diff --git a/src/pages/summits/summit-dashboard-page.js b/src/pages/summits/summit-dashboard-page.js index 010bc48d0..f067284f6 100644 --- a/src/pages/summits/summit-dashboard-page.js +++ b/src/pages/summits/summit-dashboard-page.js @@ -1,5 +1,5 @@ /** - * Copyright 2017 OpenStack Foundation + * Copyright 2026 OpenStack Foundation * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -10,430 +10,249 @@ * See the License for the specific language governing permissions and * limitations under the License. * */ -import React from "react"; +import React, { useEffect } from "react"; import PropTypes from "prop-types"; import { connect } from "react-redux"; -import moment from "moment-timezone"; import T from "i18n-react/dist/i18n-react"; import { Breadcrumb } from "react-breadcrumbs"; +import Box from "@mui/material/Box"; +import Card from "@mui/material/Card"; +import CardHeader from "@mui/material/CardHeader"; +import Container from "@mui/material/Container"; +import Divider from "@mui/material/Divider"; +import Grid2 from "@mui/material/Grid2"; +import Stack from "@mui/material/Stack"; +import Tab from "@mui/material/Tab"; +import Tabs from "@mui/material/Tabs"; +import Typography from "@mui/material/Typography"; import { getSummitById } from "../../actions/summit-actions"; +import { getRegistrationData } from "../../actions/summit-stats-actions"; import Member from "../../models/member"; -import "../../styles/summit-dashboard-page.less"; +import SummitDashboardDateRange from "./components/summit-dashboard-date-range"; +import SummitDashboardSectionHeader from "./components/summit-dashboard-section-header"; +import SummitDashboardStat from "./components/summit-dashboard-stat"; -class SummitDashboardPage extends React.Component { - constructor(props) { - super(props); +const TAB_KEYS = [ + "dashboard.dashboard", + "dashboard.ordering", + "dashboard.important_documents", + "dashboard.sponsor_levels", + "dashboard.pages", + "dashboard.tab_badge_types", + "dashboard.media_uploads", + "dashboard.booth_layout_types" +]; - this.interval = null; +function SummitDashboardPage({ + currentSummit, + member, + match, + totalOrders, + totalActiveTickets, + getRegistrationData: fetchRegistrationData +}) { + useEffect(() => { + fetchRegistrationData(); + }, []); - this.state = { - localtime: moment(), - collapseState: { - emails: true, - events: true, - voting: true - } - }; - this.onCollapseChange = this.onCollapseChange.bind(this); - } + if (!currentSummit.id || !currentSummit.time_zone?.name) return null; - onCollapseChange(section) { - const newCollapseState = { ...this.state.collapseState }; - newCollapseState[section] = !newCollapseState[section]; - this.setState({ ...this.state, collapseState: newCollapseState }); - } + const canEditSummit = new Member(member).canEditSummit(); + const tz = currentSummit.time_zone.name; + const venueCount = currentSummit.locations.filter( + (l) => l.class_name === "SummitVenue" + ).length; - componentDidMount() { - const { currentSummit } = this.props; - this.interval = setInterval( - this.localTimer.bind(this), - moment.duration(1, "second").asMilliseconds() - ); + return ( + + - if (currentSummit?.time_zone?.name) { - const localtime = moment().tz(currentSummit.time_zone.name); - this.setState({ ...this.state, localtime }); - } - } + + {currentSummit.name} + - componentWillUnmount() { - clearInterval(this.interval); - } + + {}}> + {TAB_KEYS.map((key, i) => ( + + ))} + + - localTimer() { - this.setState({ - localtime: this.state.localtime.add(1, "second") - }); - } - - getFormattedTime(atime) { - return moment - .unix(atime) - .tz(this.props.currentSummit.time_zone.name) - .format("MMMM Do YYYY, h:mm:ss a"); - } - - getTimeClass(start_time, end_time) { - if (this.state.localtime.isBefore(moment(start_time))) return "future"; - if (this.state.localtime.isAfter(moment(end_time))) return "past"; - return "present"; - } - - render() { - const { currentSummit, match, member } = this.props; - const memberObj = new Member(member); - const canEditSummit = memberObj.canEditSummit(); + + + + + + + {T.translate("dashboard.general_dates")} + + + + {currentSummit.selection_plans.map((sp) => ( + + + {sp.name} + + + + + + ))} + + - if (!currentSummit.id || !currentSummit.time_zone?.name) return
; + {canEditSummit && ( + + + + + + + + + + + + + + + + + + + + + + + - return ( -
- -
-

- {currentSummit.name} {T.translate("general.summit")} -

-
-

{T.translate("dashboard.dates")}

-
-
{currentSummit.time_zone.name}
-
- {" "} - {this.getFormattedTime(this.state.localtime.unix())}{" "} -
-
-
-
- {" "} - {T.translate("general.summit")}{" "} -
-
- {" "} - {this.getFormattedTime(currentSummit.start_date)}{" "} -
-
- {" "} - {" "} -
-
- {" "} - {this.getFormattedTime(currentSummit.end_date)}{" "} -
-
-
-
- {" "} - {" "} - {T.translate("dashboard.registration")}{" "} -
-
- {" "} - {this.getFormattedTime( - currentSummit.registration_begin_date - )}{" "} -
-
- {" "} - {" "} -
-
- {" "} - {this.getFormattedTime(currentSummit.registration_end_date)}{" "} -
-
- {canEditSummit && - currentSummit.selection_plans.map((sp) => ( -
-
{sp.name}
-
-
-
- {" "} - {" "} - {T.translate("dashboard.submission")}{" "} -
-
- {" "} - {this.getFormattedTime(sp.submission_begin_date)}{" "} -
-
- {" "} - {" "} -
-
- {" "} - {this.getFormattedTime(sp.submission_end_date)}{" "} -
-
-
-
- {" "} - {" "} - {T.translate("dashboard.voting")}{" "} -
-
- {" "} - {this.getFormattedTime(sp.voting_begin_date)}{" "} -
-
- {" "} - {" "} -
-
- {" "} - {this.getFormattedTime(sp.voting_end_date)}{" "} -
-
-
-
- {" "} - {" "} - {T.translate("dashboard.selection")}{" "} -
-
- {" "} - {this.getFormattedTime(sp.selection_begin_date)}{" "} -
-
- {" "} - {" "} -
-
- {" "} - {this.getFormattedTime(sp.selection_end_date)}{" "} -
-
-
-
- ))} + + + + + + + + + + + + - {canEditSummit && ( -
-
-

- {T.translate("dashboard.events")}  - {this.state.collapseState.events && ( - this.onCollapseChange("events")} - className="fa fa-plus-square clickable" - aria-hidden="true" - /> - )} - {!this.state.collapseState.events && ( - this.onCollapseChange("events")} - className="fa fa-minus-square clickable" - aria-hidden="true" - /> - )} -

- {!this.state.collapseState.events && ( -
-
-
- -  {T.translate("general.speakers")}  - {currentSummit.speakers_count} -
-
- -  {T.translate("dashboard.submitted_events")}  - - {currentSummit.presentations_submitted_count} - -
-
- -  {T.translate("dashboard.published_events")}  - {currentSummit.published_events_count} -
-
-
-
- -  {T.translate("dashboard.venues")}  - - { - currentSummit.locations.filter( - (l) => l.class_name === "SummitVenue" - ).length - } - -
-
-
- )} -
-

- {T.translate("dashboard.voting")}  - {this.state.collapseState.voting && ( - this.onCollapseChange("voting")} - className="fa fa-plus-square clickable" - aria-hidden="true" - /> - )} - {!this.state.collapseState.voting && ( - this.onCollapseChange("voting")} - className="fa fa-minus-square clickable" - aria-hidden="true" - /> - )} -

- {!this.state.collapseState.voting && ( -
-
-
- -  {T.translate("dashboard.voters")}  - {currentSummit.presentation_voters_count} -
-
- -  {T.translate("dashboard.votes")}  - {currentSummit.presentation_votes_count} -
-
-
- )} -
-

- {T.translate("dashboard.emails")}  - {this.state.collapseState.emails && ( - this.onCollapseChange("emails")} - className="fa fa-plus-square clickable" - aria-hidden="true" - /> - )} - {!this.state.collapseState.emails && ( - this.onCollapseChange("emails")} - className="fa fa-minus-square clickable" - aria-hidden="true" - /> - )} -

- {!this.state.collapseState.emails && ( -
-
-
- -  {T.translate("dashboard.accepted")}  - - { - currentSummit.speaker_announcement_email_accepted_count - } - -
-
- -  {T.translate("dashboard.rejected")}  - - { - currentSummit.speaker_announcement_email_rejected_count - } - -
-
- -  {T.translate("dashboard.alternate")}  - - { - currentSummit.speaker_announcement_email_alternate_count - } - -
-
-
-
- -  {T.translate("dashboard.accepted_alternate")}  - - { - currentSummit.speaker_announcement_email_accepted_alternate_count - } - -
-
- -  {T.translate("dashboard.accepted_rejected")}  - - { - currentSummit.speaker_announcement_email_accepted_rejected_count - } - -
-
- -  {T.translate("dashboard.alternate_rejected")}  - - { - currentSummit.speaker_announcement_email_alternate_rejected_count - } - -
-
-
- )} -
- )} -
-
- ); - } + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ )} + + + ); } SummitDashboardPage.propTypes = { @@ -447,13 +266,11 @@ SummitDashboardPage.propTypes = { end_date: PropTypes.number, registration_begin_date: PropTypes.number, registration_end_date: PropTypes.number, - selection_plans: PropTypes.arrayOf(PropTypes.object), - locations: PropTypes.arrayOf(PropTypes.object), + selection_plans: PropTypes.arrayOf(PropTypes.shape({})), + locations: PropTypes.arrayOf(PropTypes.shape({})), speakers_count: PropTypes.number, presentations_submitted_count: PropTypes.number, published_events_count: PropTypes.number, - presentation_voters_count: PropTypes.number, - presentation_votes_count: PropTypes.number, speaker_announcement_email_accepted_count: PropTypes.number, speaker_announcement_email_rejected_count: PropTypes.number, speaker_announcement_email_alternate_count: PropTypes.number, @@ -461,17 +278,33 @@ SummitDashboardPage.propTypes = { speaker_announcement_email_accepted_rejected_count: PropTypes.number, speaker_announcement_email_alternate_rejected_count: PropTypes.number }).isRequired, - member: PropTypes.object, + member: PropTypes.shape({}), match: PropTypes.shape({ url: PropTypes.string - }).isRequired + }).isRequired, + totalOrders: PropTypes.number, + totalActiveTickets: PropTypes.number, + getRegistrationData: PropTypes.func.isRequired +}; + +SummitDashboardPage.defaultProps = { + member: null, + totalOrders: 0, + totalActiveTickets: 0 }; -const mapStateToProps = ({ currentSummitState, loggedUserState }) => ({ +const mapStateToProps = ({ + currentSummitState, + loggedUserState, + summitStatsState +}) => ({ currentSummit: currentSummitState.currentSummit, - member: loggedUserState.member + member: loggedUserState.member, + totalOrders: summitStatsState.total_orders, + totalActiveTickets: summitStatsState.total_active_tickets }); export default connect(mapStateToProps, { - getSummitById + getSummitById, + getRegistrationData })(SummitDashboardPage); diff --git a/src/styles/summit-dashboard-page.less b/src/styles/summit-dashboard-page.less deleted file mode 100644 index a6afd9f96..000000000 --- a/src/styles/summit-dashboard-page.less +++ /dev/null @@ -1,18 +0,0 @@ -.dashboard { - .row { - font-size: 20px; - margin: 20px 0; - } - .current { - color: #00ca00; - } - .past { - color: red; - } - .future { - color: black; - } - i.clickable { - cursor: pointer; - } -} From 2a28aa45ff70eb0a1385ea2b7a69dbdd60229e01 Mon Sep 17 00:00:00 2001 From: Priscila Moneo Date: Wed, 10 Jun 2026 17:19:16 -0300 Subject: [PATCH 2/3] fix: feedback from PR Signed-off-by: Priscila Moneo --- src/components/CustomTheme.js | 10 +- .../summits/components/dashboard-section.js | 40 +++ .../components/dashboard-stat-section.js | 46 ++++ .../components/summit-dashboard-date-range.js | 29 ++- .../summit-dashboard-section-header.js | 18 -- src/pages/summits/summit-dashboard-page.js | 238 +++++++----------- 6 files changed, 205 insertions(+), 176 deletions(-) create mode 100644 src/pages/summits/components/dashboard-section.js create mode 100644 src/pages/summits/components/dashboard-stat-section.js delete mode 100644 src/pages/summits/components/summit-dashboard-section-header.js diff --git a/src/components/CustomTheme.js b/src/components/CustomTheme.js index 6c1e78cce..5787af69a 100644 --- a/src/components/CustomTheme.js +++ b/src/components/CustomTheme.js @@ -12,7 +12,7 @@ const theme = createTheme({ }, background: { light: "#F7F7F9", - secondary: "#eaeaea" + light_gray: "#eaeaea" }, text: { primary: "#000000DE", @@ -35,10 +35,10 @@ const theme = createTheme({ fontSize: "12px", fontWeight: 400 }, - subtitle2: ({ theme }) => ({ + subtitle2: ({ theme: t }) => ({ fontSize: "14px", fontWeight: 500, - color: theme.palette.text.primary + color: t.palette.text.primary }), h4: { fontSize: "34px", @@ -127,8 +127,8 @@ const theme = createTheme({ root: { fontSize: "12px" }, - standardInfo: ({ theme }) => ({ - color: theme.palette.primary.dark + standardInfo: ({ theme: t }) => ({ + color: t.palette.primary.dark }) } } diff --git a/src/pages/summits/components/dashboard-section.js b/src/pages/summits/components/dashboard-section.js new file mode 100644 index 000000000..dd2a814c9 --- /dev/null +++ b/src/pages/summits/components/dashboard-section.js @@ -0,0 +1,40 @@ +import React from "react"; +import PropTypes from "prop-types"; +import Box from "@mui/material/Box"; +import Card from "@mui/material/Card"; +import CardHeader from "@mui/material/CardHeader"; +import Divider from "@mui/material/Divider"; +import Typography from "@mui/material/Typography"; + +function DashboardSection({ title, children, variant }) { + if (variant === "card") { + return ( + + + + {children} + + ); + } + + return ( + + + {title} + + {children} + + ); +} + +DashboardSection.propTypes = { + title: PropTypes.string.isRequired, + children: PropTypes.node.isRequired, + variant: PropTypes.oneOf(["card"]) +}; + +DashboardSection.defaultProps = { + variant: undefined +}; + +export default DashboardSection; diff --git a/src/pages/summits/components/dashboard-stat-section.js b/src/pages/summits/components/dashboard-stat-section.js new file mode 100644 index 000000000..2aecf6853 --- /dev/null +++ b/src/pages/summits/components/dashboard-stat-section.js @@ -0,0 +1,46 @@ +import React from "react"; +import PropTypes from "prop-types"; +import Divider from "@mui/material/Divider"; +import Grid2 from "@mui/material/Grid2"; +import DashboardSection from "./dashboard-section"; +import SummitDashboardStat from "./summit-dashboard-stat"; + +const GRID_COLUMNS = 12; + +function DashboardStatSection({ title, rows }) { + return ( + + {rows.map((group, i) => { + if (!group.length) return null; + const size = Math.floor(GRID_COLUMNS / group.length); + const key = group[0]?.title ?? `group-${i}`; + return ( + + {i > 0 && } + + {group.map(({ title: label, stat: value }) => ( + + + + ))} + + + ); + })} + + ); +} + +DashboardStatSection.propTypes = { + title: PropTypes.string.isRequired, + rows: PropTypes.arrayOf( + PropTypes.arrayOf( + PropTypes.shape({ + title: PropTypes.string.isRequired, + stat: PropTypes.number + }) + ) + ).isRequired +}; + +export default DashboardStatSection; diff --git a/src/pages/summits/components/summit-dashboard-date-range.js b/src/pages/summits/components/summit-dashboard-date-range.js index 33b6d6be1..89cf0caa6 100644 --- a/src/pages/summits/components/summit-dashboard-date-range.js +++ b/src/pages/summits/components/summit-dashboard-date-range.js @@ -3,13 +3,12 @@ import PropTypes from "prop-types"; import Box from "@mui/material/Box"; import Typography from "@mui/material/Typography"; import RemoveIcon from "@mui/icons-material/Remove"; -import moment from "moment-timezone"; - -function formatDate(ts, tzName) { - return moment.unix(ts).tz(tzName).format("YYYY/MM/DD hh:mm A"); -} +import { parseAndFormat } from "../../../utils/methods"; +import { DATETIME_FORMAT } from "../../../utils/constants"; function SummitDashboardDateRange({ label, startTs, endTs, tzName }) { + if (!startTs || !endTs) return null; + return ( {label} - {formatDate(startTs, tzName)} + + {parseAndFormat(String(startTs), "X", DATETIME_FORMAT, "UTC", tzName)} + - {formatDate(endTs, tzName)} + + {parseAndFormat(String(endTs), "X", DATETIME_FORMAT, "UTC", tzName)} + ); } SummitDashboardDateRange.propTypes = { label: PropTypes.string.isRequired, - startTs: PropTypes.number.isRequired, - endTs: PropTypes.number.isRequired, - tzName: PropTypes.string.isRequired + startTs: PropTypes.number, + endTs: PropTypes.number, + tzName: PropTypes.string +}; + +SummitDashboardDateRange.defaultProps = { + startTs: null, + endTs: null, + tzName: undefined }; export default SummitDashboardDateRange; diff --git a/src/pages/summits/components/summit-dashboard-section-header.js b/src/pages/summits/components/summit-dashboard-section-header.js deleted file mode 100644 index 3366ae0df..000000000 --- a/src/pages/summits/components/summit-dashboard-section-header.js +++ /dev/null @@ -1,18 +0,0 @@ -import React from "react"; -import PropTypes from "prop-types"; -import Box from "@mui/material/Box"; -import Typography from "@mui/material/Typography"; - -function SummitDashboardSectionHeader({ children }) { - return ( - - {children} - - ); -} - -SummitDashboardSectionHeader.propTypes = { - children: PropTypes.node.isRequired -}; - -export default SummitDashboardSectionHeader; diff --git a/src/pages/summits/summit-dashboard-page.js b/src/pages/summits/summit-dashboard-page.js index f067284f6..72817c6c1 100644 --- a/src/pages/summits/summit-dashboard-page.js +++ b/src/pages/summits/summit-dashboard-page.js @@ -16,21 +16,18 @@ import { connect } from "react-redux"; import T from "i18n-react/dist/i18n-react"; import { Breadcrumb } from "react-breadcrumbs"; import Box from "@mui/material/Box"; -import Card from "@mui/material/Card"; -import CardHeader from "@mui/material/CardHeader"; import Container from "@mui/material/Container"; -import Divider from "@mui/material/Divider"; import Grid2 from "@mui/material/Grid2"; import Stack from "@mui/material/Stack"; import Tab from "@mui/material/Tab"; import Tabs from "@mui/material/Tabs"; import Typography from "@mui/material/Typography"; +import DashboardStatSection from "./components/dashboard-stat-section"; import { getSummitById } from "../../actions/summit-actions"; import { getRegistrationData } from "../../actions/summit-stats-actions"; import Member from "../../models/member"; import SummitDashboardDateRange from "./components/summit-dashboard-date-range"; -import SummitDashboardSectionHeader from "./components/summit-dashboard-section-header"; -import SummitDashboardStat from "./components/summit-dashboard-stat"; +import DashboardSection from "./components/dashboard-section"; const TAB_KEYS = [ "dashboard.dashboard", @@ -53,12 +50,10 @@ function SummitDashboardPage({ }) { useEffect(() => { fetchRegistrationData(); - }, []); - - if (!currentSummit.id || !currentSummit.time_zone?.name) return null; + }, [currentSummit.id]); const canEditSummit = new Member(member).canEditSummit(); - const tz = currentSummit.time_zone.name; + const tz = currentSummit.time_zone?.name; const venueCount = currentSummit.locations.filter( (l) => l.class_name === "SummitVenue" ).length; @@ -86,29 +81,26 @@ function SummitDashboardPage({ - - - - - {T.translate("dashboard.general_dates")} - - - + + + + + {currentSummit.selection_plans.map((sp) => ( - - - {sp.name} - + - + ))} - + {canEditSummit && ( - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - + )} From 3773dc5548847e7be21a5709d1f6f2bd11cc2d2d Mon Sep 17 00:00:00 2001 From: Priscila Moneo Date: Wed, 17 Jun 2026 10:38:31 -0300 Subject: [PATCH 3/3] fix: feedback from PR Signed-off-by: Priscila Moneo --- src/pages/summits/components/summit-dashboard-date-range.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/summits/components/summit-dashboard-date-range.js b/src/pages/summits/components/summit-dashboard-date-range.js index 89cf0caa6..d0141010c 100644 --- a/src/pages/summits/components/summit-dashboard-date-range.js +++ b/src/pages/summits/components/summit-dashboard-date-range.js @@ -3,7 +3,7 @@ import PropTypes from "prop-types"; import Box from "@mui/material/Box"; import Typography from "@mui/material/Typography"; import RemoveIcon from "@mui/icons-material/Remove"; -import { parseAndFormat } from "../../../utils/methods"; +import { formatDate } from "../../../utils/methods"; import { DATETIME_FORMAT } from "../../../utils/constants"; function SummitDashboardDateRange({ label, startTs, endTs, tzName }) { @@ -24,11 +24,11 @@ function SummitDashboardDateRange({ label, startTs, endTs, tzName }) { {label} - {parseAndFormat(String(startTs), "X", DATETIME_FORMAT, "UTC", tzName)} + {formatDate(startTs, tzName, DATETIME_FORMAT)} - {parseAndFormat(String(endTs), "X", DATETIME_FORMAT, "UTC", tzName)} + {formatDate(endTs, tzName, DATETIME_FORMAT)} );