Skip to content

Commit

Permalink
Merge branch 'main' into typing-groupdetails
Browse files Browse the repository at this point in the history
  • Loading branch information
Arnei committed Jul 5, 2024
2 parents 81b3dd3 + dff23eb commit 60357f3
Show file tree
Hide file tree
Showing 77 changed files with 749 additions and 651 deletions.
70 changes: 35 additions & 35 deletions package-lock.json

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

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"dependencies": {
"@hello-pangea/dnd": "^16.5.0",
"@mui/material": "^5.15.21",
"@mui/x-date-pickers": "^7.6.1",
"@reduxjs/toolkit": "^2.2.5",
"@mui/x-date-pickers": "^7.8.0",
"@reduxjs/toolkit": "^2.2.6",
"@types/dompurify": "^3.0.5",
"@types/react-router-dom": "^5.3.3",
"array-move": "^4.0.0",
Expand All @@ -34,7 +34,7 @@
"react-i18next": "^14.1.2",
"react-icons": "^5.2.1",
"react-redux": "^7.2.9",
"react-router-dom": "^6.23.1",
"react-router-dom": "^6.24.0",
"react-select": "^5.8.0",
"redux": "^5.0.1",
"redux-persist": "^6.0.0",
Expand Down Expand Up @@ -69,7 +69,7 @@
"@types/lodash": "^4.17.6",
"@types/node": "^20.14.9",
"@types/react-dom": "^18.3.0",
"@types/uuid": "^9.0.8",
"@types/uuid": "^10.0.0",
"@typescript-eslint/eslint-plugin": "^7.14.1",
"@vitejs/plugin-react-swc": "^3.7.0",
"eslint": "^8.57.0",
Expand All @@ -78,7 +78,7 @@
"rollup-preserve-directives": "^1.1.1",
"sass": "^1.77.6",
"typescript": "^5.5.2",
"uuid": "^9.0.1",
"uuid": "^10.0.0",
"vite": "^5.3.2",
"vite-plugin-svgr": "^4.2.0",
"vite-tsconfig-paths": "^4.3.2",
Expand Down
20 changes: 10 additions & 10 deletions src/components/configuration/Themes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,16 +87,6 @@ const Themes = ({
<>
<Header />
<NavBar>
{/* Add theme button */}
<div className="btn-group">
{hasAccess("ROLE_UI_THEMES_CREATE", user) && (
<button className="add" onClick={() => showNewThemesModal()}>
<i className="fa fa-plus" />
<span>{t("CONFIGURATION.ACTIONS.ADD_THEME")}</span>
</button>
)}
</div>

{/* Display modal for new series if add series button is clicked */}
<NewResourceModal
showModal={displayNewThemesModal}
Expand All @@ -118,6 +108,16 @@ const Themes = ({
</Link>
)}
</nav>

{/* Add theme button */}
<div className="btn-group">
{hasAccess("ROLE_UI_THEMES_CREATE", user) && (
<button className="add" onClick={() => showNewThemesModal()}>
<i className="fa fa-plus" />
<span>{t("CONFIGURATION.ACTIONS.ADD_THEME")}</span>
</button>
)}
</div>
</NavBar>

<MainView open={displayNavigation}>
Expand Down
18 changes: 9 additions & 9 deletions src/components/events/Events.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -195,15 +195,6 @@ const Events = ({
<>
<Header />
<NavBar>
<div className="btn-group">
{hasAccess("ROLE_UI_EVENTS_CREATE", user) && (
<button className="add" onClick={() => showNewEventModal()}>
<i className="fa fa-plus" />
<span>{t("EVENTS.EVENTS.ADD_EVENT")}</span>
</button>
)}
</div>

{
/* Display modal for new event if add event button is clicked */
!isFetchingAssetUploadOptions && (
Expand Down Expand Up @@ -258,6 +249,15 @@ const Events = ({
<Stats />
</div>
)}

<div className="btn-group">
{hasAccess("ROLE_UI_EVENTS_CREATE", user) && (
<button className="add" onClick={() => showNewEventModal()}>
<i className="fa fa-plus" />
<span>{t("EVENTS.EVENTS.ADD_EVENT")}</span>
</button>
)}
</div>
</NavBar>

<MainView open={displayNavigation}>
Expand Down
18 changes: 9 additions & 9 deletions src/components/events/Series.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,15 +163,6 @@ const Series = ({
<>
<Header />
<NavBar>
<div className="btn-group">
{hasAccess("ROLE_UI_SERIES_CREATE", user) && (
<button className="add" onClick={() => showNewSeriesModal()}>
<i className="fa fa-plus" />
<span>{t("EVENTS.EVENTS.ADD_SERIES")}</span>
</button>
)}
</div>

{/* Display modal for new series if add series button is clicked */}
<NewResourceModal
showModal={displayNewSeriesModal}
Expand Down Expand Up @@ -206,6 +197,15 @@ const Series = ({
</Link>
)}
</nav>

<div className="btn-group">
{hasAccess("ROLE_UI_SERIES_CREATE", user) && (
<button className="add" onClick={() => showNewSeriesModal()}>
<i className="fa fa-plus" />
<span>{t("EVENTS.EVENTS.ADD_SERIES")}</span>
</button>
)}
</div>
</NavBar>

<MainView open={displayNavigation}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const EventDetailsAccessPolicyTab = ({
const fetchHasActiveTransactionsWrapper = async(eventId: any) => {
return await dispatch(fetchHasActiveTransactions(eventId)).then(unwrapResult);
}
const saveNewAccessPoliciesWrapper = async(eventId: any, policies: any) => {
const saveNewAccessPoliciesWrapper = (eventId: any, policies: any) => {
return dispatch(saveAccessPolicies({eventId, policies}));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,7 @@ const Upload = ({ formik }) => {
</td>
<td className="fit">
<button
style={{ visibility: asset.file ? "visible" : "hidden" }}
className="button-like-anchor remove"
onClick={(e) => {
formik.setFieldValue(
Expand Down Expand Up @@ -433,7 +434,7 @@ const Schedule = <T extends {
value={typeof formik.values.scheduleStartDate === "string" ? parseISO(formik.values.scheduleStartDate): formik.values.scheduleStartDate}
onChange={(value) => {
if (formik.values.sourceMode === "SCHEDULE_MULTIPLE") {
changeStartDateMultiple(
value && changeStartDateMultiple(
value,
formik.values,
formik.setFieldValue
Expand Down Expand Up @@ -464,7 +465,7 @@ const Schedule = <T extends {
name="scheduleEndDate"
value={typeof formik.values.scheduleEndDate === "string" ? parseISO(formik.values.scheduleEndDate) : formik.values.scheduleEndDate}
onChange={(value) =>
changeEndDateMultiple(
value && changeEndDateMultiple(
value,
formik.values,
formik.setFieldValue
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ const SeriesDetailsAccessTab = ({
const fetchSeriesDetailsAclsWrapper = (id: any) => {
dispatch(fetchSeriesDetailsAcls(id));
}
const updateSeriesAccessWrapper = async (id: any, policies: any) => {
dispatch(updateSeriesAccess({id, policies}));
const updateSeriesAccessWrapper = (id: any, policies: any) => {
return dispatch(updateSeriesAccess({id, policies}));
}

useEffect(() => {
Expand Down
9 changes: 7 additions & 2 deletions src/components/events/partials/modals/StartTaskModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import StartTaskGeneralPage from "../ModalTabsAndPages/StartTaskGeneralPage";
import StartTaskWorkflowPage from "../ModalTabsAndPages/StartTaskWorkflowPage";
import StartTaskSummaryPage from "../ModalTabsAndPages/StartTaskSummaryPage";
import { postTasks } from "../../../../thunks/taskThunks";
import { changeAllSelected } from "../../../../thunks/tableThunks";
import { usePageFunctions } from "../../../../hooks/wizardHooks";
import { checkValidityStartTaskEventSelection } from "../../../../utils/bulkActionUtils";
import { useHotkeys } from "react-hotkeys-hook";
Expand All @@ -17,8 +18,9 @@ import { availableHotkeys } from "../../../../configs/hotkeysConfig";
* This component manages the pages of the task start bulk action
*/
const StartTaskModal = ({
close,
postTasks
close,
postTasks,
changeAllSelected
}: any) => {
const { t } = useTranslation();

Expand Down Expand Up @@ -79,6 +81,7 @@ const StartTaskModal = ({
// @ts-expect-error TS(7006): Parameter 'values' implicitly has an 'any' type.
const handleSubmit = (values) => {
postTasks(values);
changeAllSelected(false);
close();
};

Expand Down Expand Up @@ -153,6 +156,8 @@ const StartTaskModal = ({
const mapDispatchToState = (dispatch) => ({
// @ts-expect-error TS(7006): Parameter 'values' implicitly has an 'any' type.
postTasks: (values) => dispatch(postTasks(values)),
// @ts-expect-error TS(7006): Parameter 'values' implicitly has an 'any' type.
changeAllSelected: (selected) => dispatch(changeAllSelected(selected)),
});

export default connect(null, mapDispatchToState)(StartTaskModal);
Loading

0 comments on commit 60357f3

Please sign in to comment.