Skip to content

Commit

Permalink
Merge branch 'main' into allow-tracks-to-show-up-in-asset-upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Arnei committed Feb 27, 2025
2 parents 4c9779d + ef7ca9c commit ec6cab9
Show file tree
Hide file tree
Showing 29 changed files with 177 additions and 187 deletions.
4 changes: 2 additions & 2 deletions src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ const Header = () => {
}
target="_blank" rel="noreferrer"
>
<span className="fa fa-play-circle" />
<i className="fa fa-play-circle" />
</a>
</Tooltip>
</div>
Expand All @@ -189,7 +189,7 @@ const Header = () => {
<div className="nav-dd">
<Tooltip title={t("STUDIO")}>
<a href={studioURL} target="_blank" rel="noreferrer">
<span className="fa fa-video-camera" />
<i className="fa fa-video-camera" />
</a>
</Tooltip>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const EventDetailsCommentsTab = ({
const isSavingCommentReply = useAppSelector(state => getIsSavingCommentReply(state));

useEffect(() => {
dispatch(fetchComments(eventId)).then((r: any) => console.info(r));
dispatch(fetchComments(eventId));
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);

Expand Down
2 changes: 1 addition & 1 deletion src/components/events/partials/wizards/NewEventWizard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ const getInitialValues = (
if (!!uploadSourceOptions) {
initialValues.uploadAssetsTrack = [];
// Sort by displayOrder
uploadSourceOptions = uploadSourceOptions.slice().sort((a: any, b: any) => a.displayOrder - b.displayOrder)
uploadSourceOptions = uploadSourceOptions.slice().sort((a, b) => a.displayOrder - b.displayOrder)
// initial value of upload asset needs to be null, because object (file) is saved there
for (const option of uploadSourceOptions) {
initialValues.uploadAssetsTrack.push({
Expand Down
6 changes: 3 additions & 3 deletions src/components/shared/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ const Table = ({

useEffect(() => {
// Function for handling clicks outside of an open dropdown menu
const handleClickOutside = (e: any) => {
const handleClickOutside = (e: MouseEvent) => {
if (
e && containerPageSize.current && !containerPageSize.current.contains(e.target)
e && containerPageSize.current && !containerPageSize.current.contains(e.target as Node)
) {
setShowPageSizes(false);
}
Expand Down Expand Up @@ -395,7 +395,7 @@ const getDirectAccessiblePages = (pages: Page[], pagination: Pagination) => {
};

// Apply a column template and render corresponding components
const ColumnTemplate = ({ row, column, templateMap }: {row: Row, column: TableColumn, templateMap: any}) => {
const ColumnTemplate = ({ row, column, templateMap }: {row: Row, column: TableColumn, templateMap: TemplateMap}) => {
if (!column.template) {
return <></>;
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/users/partials/UsersActionsCell.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useRef } from "react";
import { useTranslation } from "react-i18next";
import { UserResult, deleteUser } from "../../../slices/userSlice";
import { User, deleteUser } from "../../../slices/userSlice";
import { useAppDispatch } from "../../../store";
import { fetchUserDetails } from "../../../slices/userDetailsSlice";
import { Modal, ModalHandle } from "../../shared/modals/Modal";
Expand All @@ -14,7 +14,7 @@ import { IconButton } from "../../shared/IconButton";
const UsersActionCell = ({
row,
}: {
row: UserResult
row: User
}) => {
const { t } = useTranslation();
const dispatch = useAppDispatch();
Expand Down
4 changes: 2 additions & 2 deletions src/components/users/partials/UsersRolesCell.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import React from "react";
import { useTranslation } from "react-i18next";
import { UserResult } from "../../../slices/userSlice";
import { User } from "../../../slices/userSlice";

/**
* This component renders the roles cells of users in the table view
*/
const UsersRolesCell = ({
row
}: {
row: UserResult
row: User
}) => {
const { t } = useTranslation();

Expand Down
2 changes: 1 addition & 1 deletion src/configs/modalConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export const initialFormValuesNewSeries: {

breadcrumbs: TobiraPage[],
selectedPage?: TobiraPage,
[key: string]: any, // Metadata fields that are getting added later
[key: string]: unknown, // Metadata fields that are getting added later
} = {
acls: [
{
Expand Down
19 changes: 5 additions & 14 deletions src/configs/sourceConfig.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { MetadataField } from "../slices/eventSlice";

/* additional metadata that user should provide for new events
* UPLOAD, SCHEDULE_SINGLE, SCHEDULE_MULTIPLE signal in which case the additional metadata is required/should be provided
* A metadata field has following keys:
Expand All @@ -7,22 +9,12 @@
* - type: indicates the type of metadata field (see metadata field provided by backend)
* - readOnly: flag indicating if metadata field can be changed
* - required: flag indicating if metadata field is required
* - tabindex: tabindex of the metadata field
*/
type Metadata = {
id: string,
label: string,
value: any,
type: string,
readOnly: boolean,
required: boolean,
tabindex: number,
}

type SourceType = {
UPLOAD?: { metadata: Metadata[] },
SCHEDULE_SINGLE?: { metadata: Metadata[] },
SCHEDULE_MULTIPLE?: { metadata: Metadata[] },
UPLOAD?: { metadata: MetadataField[] },
SCHEDULE_SINGLE?: { metadata: MetadataField[] },
SCHEDULE_MULTIPLE?: { metadata: MetadataField[] },
}

export const sourceMetadata: SourceType = {
Expand All @@ -35,7 +27,6 @@ export const sourceMetadata: SourceType = {
type: "date",
readOnly: false,
required: false,
tabindex: 7,
},
],
},
Expand Down
2 changes: 1 addition & 1 deletion src/slices/aclDetailsSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const initialState: AclDetailsState = {
};

// fetch details about a certain acl from server
export const fetchAclDetails = createAppAsyncThunk('aclDetails/fetchAclDetails', async (aclId: number) => {
export const fetchAclDetails = createAppAsyncThunk('aclDetails/fetchAclDetails', async (aclId: AclDetailsState["id"]) => {
const res = await axios.get(`/admin-ng/acl/${aclId}`);

let aclDetails = res.data;
Expand Down
Loading

0 comments on commit ec6cab9

Please sign in to comment.