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
6 changes: 4 additions & 2 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
> 0.25%
not dead
Chrome >= 117
Edge >= 121
Firefox >= 121
Safari >= 17
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,17 @@
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.0",
"@fontsource/roboto": "^5.1.1",
"@mui/icons-material": "^6.4.3",
"@mui/material": "^6.4.3",
"@mui/x-date-pickers": "^7.26.0",
"@mui/icons-material": "^9.0.0",
"@mui/material": "^9.0.0",
"@mui/x-date-pickers": "^9.0.0",
"@react-pdf/renderer": "4.3.0",
"@sentry/react": "^8.32.0",
"@sentry/webpack-plugin": "^2.22.4",
"@stripe/react-stripe-js": "^5.4.1",
"@stripe/stripe-js": "^8.5.3",
"@types/googlemaps": "^3.39.3",
"@types/markerclustererplus": "^2.1.29",
"@types/react": "^16.9.32",
"@types/react": "^18.0.0",
"@uiw/codemirror-theme-sublime": "^4.21.23",
"@uiw/react-codemirror": "^4.21.7",
"@uiw/react-color-sketch": "^2.1.0",
Expand Down Expand Up @@ -92,14 +92,14 @@
"moment": "^2.29.1",
"moment-duration-format": "^2.3.2",
"moment-timezone": "^0.5.33",
"openstack-uicore-foundation": "5.0.34",
"openstack-uicore-foundation": "6.0.0-beta.4",
"p-limit": "^6.1.0",
"path-browserify": "^1.0.1",
"postcss-loader": "^6.2.1",
"process": "^0.11.10",
"prop-types": "^15.8.1",
"qr-scanner": "^1.4.2",
"react": "^16.13.1",
"react": "^18.0.0",
"react-accessible-treeview": "^2.6.2",
"react-beautiful-dnd": "^13.1.1",
"react-bootstrap": "^0.31.5",
Expand All @@ -110,7 +110,7 @@
"react-device-detect": "^2.2.2",
"react-dnd": "^16.0.0",
"react-dnd-html5-backend": "^16.0.0",
"react-dom": "^16.13.1",
"react-dom": "^18.0.0",
"react-dropzone": "^4.2.13",
"react-final-form": "^6.5.9",
"react-google-maps": "^9.4.5",
Expand Down Expand Up @@ -148,9 +148,9 @@
"@babel/eslint-parser": "^7.24.7",
"@testing-library/dom": "^10.1.0",
"@testing-library/jest-dom": "^6.4.2",
"@testing-library/react": "12.1.5",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^14.5.2",
"@types/react-dom": "16.9.24",
"@types/react-dom": "^18.0.0",
"babel-jest": "^30.3.0",
"css-minimizer-webpack-plugin": "^4.2.2",
"eslint": "8.2.0",
Expand Down
32 changes: 14 additions & 18 deletions src/components/audit-logs/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React, { useEffect, useState } from "react";
import FreeTextSearch from "openstack-uicore-foundation/lib/components/free-text-search"
import Table from "openstack-uicore-foundation/lib/components/table"
import Dropdown from "openstack-uicore-foundation/lib/components/inputs/dropdown"
import MemberInput from "openstack-uicore-foundation/lib/components/inputs/member-input"
import FreeTextSearch from "openstack-uicore-foundation/lib/components/free-text-search";
import Table from "openstack-uicore-foundation/lib/components/table";
import Dropdown from "openstack-uicore-foundation/lib/components/inputs/dropdown";
import MemberInput from "openstack-uicore-foundation/lib/components/inputs/member-input";
import DateTimePicker from "openstack-uicore-foundation/lib/components/inputs/datetimepicker";
import T from "i18n-react";
import { epochToMomentTimeZone } from "openstack-uicore-foundation/lib/utils/methods";
Expand Down Expand Up @@ -215,9 +215,7 @@ const AuditLogs = ({
/>
</div>
</div>

<hr />

<div className="row">
<div className="col-md-6">
<Dropdown
Expand Down Expand Up @@ -260,46 +258,44 @@ const AuditLogs = ({
<DateTimePicker
id="created_date_filter"
format={{ date: "YYYY-MM-DD", time: "HH:mm" }}
inputProps={{
placeholder: T.translate(
"audit_log.placeholders.created_date_from"
)
}}
onChange={(ev) => handleChangeDateFilter(ev, false)}
timezone={currentSummit.time_zone_id}
value={epochToMomentTimeZone(
auditLogFilters.created_date_filter[0],
currentSummit.time_zone_id
)}
className="event-list-date-picker"
inputProps={{
placeholder: T.translate(
"audit_log.placeholders.created_date_from"
)
}}
/>
</div>
<div className="col-md-3">
<DateTimePicker
id="created_date_filter"
format={{ date: "YYYY-MM-DD", time: "HH:mm" }}
inputProps={{
placeholder: T.translate(
"audit_log.placeholders.created_date_to"
)
}}
onChange={(ev) => handleChangeDateFilter(ev, true)}
timezone={currentSummit.time_zone_id}
value={epochToMomentTimeZone(
auditLogFilters.created_date_filter[1],
currentSummit.time_zone_id
)}
className="event-list-date-picker"
inputProps={{
placeholder: T.translate(
"audit_log.placeholders.created_date_to"
)
}}
/>
</div>
</>
)}
</div>

{logEntries.length === 0 && (
<div>{T.translate("audit_log.no_log_entries")}</div>
)}

{logEntries.length > 0 && (
<>
<Table
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,46 @@ jest.mock("i18n-react/dist/i18n-react", () => ({
translate: (key) => key
}));

jest.mock("react-select", () => function MockSelect({ id, value, options, onChange }) {
return (
<select
aria-label={id}
data-testid="operator-select"
value={value?.value || ""}
onChange={(e) => {
const option =
options.find((o) => o.value === e.target.value) || null;
onChange(option);
}}
>
<option value="">none</option>
{options.map((option) => (
<option key={option.value} value={option.value}>
{option.label}
</option>
))}
</select>
);
});

jest.mock("../../../inputs/media-upload-type-input", () => function MockMediaUploadTypeInput({ id, value, onChange }) {
return (
<input
data-testid="media-upload-type-input"
id={id}
value={value || ""}
onChange={(e) => onChange({ target: { value: e.target.value } })}
/>
);
});
jest.mock(
"react-select",
() =>
function MockSelect({ id, value, options, onChange }) {
return (
<select
aria-label={id}
data-testid="operator-select"
value={value?.value || ""}
onChange={(e) => {
const option =
options.find((o) => o.value === e.target.value) || null;
onChange(option);
}}
>
<option value="">none</option>
{options.map((option) => (
<option key={option.value} value={option.value}>
{option.label}
</option>
))}
</select>
);
}
);

jest.mock(
"../../../inputs/media-upload-type-input",
() =>
function MockMediaUploadTypeInput({ id, value, onChange }) {
return (
<input
data-testid="media-upload-type-input"
id={id}
value={value || ""}
onChange={(e) => onChange({ target: { value: e.target.value } })}
/>
);
}
);

describe("MediaTypeFilter", () => {
const baseProps = {
Expand Down
21 changes: 10 additions & 11 deletions src/components/forms/badge-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -401,11 +401,6 @@ class BadgeForm extends React.Component {
<DateTimePicker
id="printDateFromFilter"
format={{ date: "YYYY-MM-DD", time: "HH:mm" }}
inputProps={{
placeholder: T.translate(
"edit_ticket.placeholders.print_date_from"
)
}}
timezone={userTimeZone}
onChange={(ev) =>
this.handleChangePrintDate(ev, false)
Expand All @@ -416,15 +411,15 @@ class BadgeForm extends React.Component {
)}
className="badge-print-date-picker"
renderInput={renderInput}
/>
<DateTimePicker
id="printDateToFilter"
format={{ date: "YYYY-MM-DD", time: "HH:mm" }}
inputProps={{
placeholder: T.translate(
"edit_ticket.placeholders.print_date_to"
"edit_ticket.placeholders.print_date_from"
)
}}
/>
<DateTimePicker
id="printDateToFilter"
format={{ date: "YYYY-MM-DD", time: "HH:mm" }}
timezone={userTimeZone}
onChange={(ev) =>
this.handleChangePrintDate(ev, true)
Expand All @@ -435,6 +430,11 @@ class BadgeForm extends React.Component {
)}
className="badge-print-date-picker"
renderInput={renderInput}
inputProps={{
placeholder: T.translate(
"edit_ticket.placeholders.print_date_to"
)
}}
/>
<button
className="btn btn-default"
Expand Down Expand Up @@ -532,7 +532,6 @@ class BadgeForm extends React.Component {
</div>
</div>
)}

<hr />
{entity.id !== 0 && (
<SimpleLinkList
Expand Down
Loading
Loading