Skip to content

Commit

Permalink
Merge branch 'main' into seperate-user-and-non-user-roles
Browse files Browse the repository at this point in the history
  • Loading branch information
Arnei committed Feb 27, 2025
2 parents f2a7608 + 84883a3 commit 35b4a93
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 29 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 @@ -36,7 +36,6 @@ const TitleSlidePage = <T extends RequiredFormProps>({
{t("CONFIGURATION.THEMES.DETAILS.TITLE.DESCRIPTION")}
</p>
</div>
{/*todo: Notification*/}
<div className="obj">
<header>{t("CONFIGURATION.THEMES.DETAILS.TITLE.ACTIVE")}</header>
<div className="obj-container content-list padded">
Expand Down
1 change: 0 additions & 1 deletion src/components/events/partials/EventActionCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ const EventActionCell = ({
)}

{/* Delete an event */}
{/*TODO: needs to be checked if event is published */}
<ActionCellDelete
editAccessRole={"ROLE_UI_EVENTS_DELETE"}
tooltipText={"EVENTS.EVENTS.TABLE.TOOLTIP.DELETE"}
Expand Down
2 changes: 1 addition & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFnsV3';
import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';
import { getCurrentLanguageInformation } from "./utils/utils";

// todo: comment persistent stuff in, only out commented because for debugging purposes
// Commenting persistent stuff out can help with debugging
const persistor = persistStore(store);

const theme = createTheme({
Expand Down
4 changes: 2 additions & 2 deletions src/slices/aclDetailsSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ export const fetchAclDetails = createAppAsyncThunk('aclDetails/fetchAclDetails',
let transformedAcls: TransformedAcl[] = [];

// transform policies for further use
// TODO: Investigate why we do this and write down the reason here
// (or simplify the code if we don't actually need to transform)
// We do this in order to prepare the information for the acl tab in the details modals,
// because we render the information differently from how it is usually structured in an ACL
for (let i = 0; acl.ace.length > i; i++) {
if (transformedAcls.find((rule) => rule.role === acl.ace[i].role)) {
for (let j = 0; transformedAcls.length > j; j++) {
Expand Down
13 changes: 0 additions & 13 deletions src/slices/eventDetailsSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1248,9 +1248,6 @@ if (endDate < now) {
});

export const fetchWorkflows = createAppAsyncThunk('eventDetails/fetchWorkflows', async (eventId: string, { dispatch, getState }) => {
// todo: show notification if there are active transactions
// dispatch(addNotification('warning', 'ACTIVE_TRANSACTION', -1, null, NOTIFICATION_CONTEXT));

const data = await axios.get(`/admin-ng/event/${eventId}/workflows.json`);
const workflowsData = await data.data;
let workflows: Workflow;
Expand Down Expand Up @@ -2300,8 +2297,6 @@ const eventDetailsSlice = createSlice({
};
state.workflows.workflow = emptyWorkflowData;
state.errorWorkflowDetails = action.error;
// todo: probably needs a Notification to the user
console.error(action.error);
})
// performWorkflowAction
.addCase(performWorkflowAction.pending, (state) => {
Expand Down Expand Up @@ -2344,8 +2339,6 @@ const eventDetailsSlice = createSlice({
state.statusWorkflowOperations = 'failed';
state.workflowOperations = { entries: [] };
state.errorWorkflowOperations = action.error;
// todo: probably needs a Notification to the user
console.error(action.error);
})
// fetchWorkflowOperationDetails
.addCase(fetchWorkflowOperationDetails.pending, (state) => {
Expand Down Expand Up @@ -2376,8 +2369,6 @@ const eventDetailsSlice = createSlice({
};
state.workflowOperationDetails = emptyOperationDetails;
state.errorWorkflowOperationDetails= action.error;
// todo: probably needs a Notification to the user
console.error(action.error);
})
// fetchWorkflowErrors
.addCase(fetchWorkflowErrors.pending, (state) => {
Expand All @@ -2393,8 +2384,6 @@ const eventDetailsSlice = createSlice({
state.statusWorkflowErrors = 'failed';
state.workflowErrors = { entries: [] };
state.errorWorkflowOperations = action.error;
// todo: probably needs a Notification to the user
console.error(action.error);
})
// fetchWorkflowErrorDetails
.addCase(fetchWorkflowErrorDetails.pending, (state) => {
Expand All @@ -2421,8 +2410,6 @@ const eventDetailsSlice = createSlice({
title: "",
};
state.errorWorkflowOperationDetails = action.error;
// todo: probably needs a Notification to the user
console.error(action.error);
})
// fetchEventStatistics
.addCase(fetchEventStatistics.pending, (state) => {
Expand Down
8 changes: 2 additions & 6 deletions src/slices/eventSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ type EventState = {
statusAssetUploadOptions: 'uninitialized' | 'loading' | 'succeeded' | 'failed',
errorAssetUploadOptions: SerializedError | null,
results: Event[],
columns: TableConfig["columns"], // TODO: proper typing, derive from `initialColumns`
columns: TableConfig["columns"],
total: number,
count: number,
offset: number,
Expand All @@ -180,7 +180,7 @@ type EventState = {
extendedMetadata: MetadataCatalog[],
isFetchingAssetUploadOptions: boolean,
uploadAssetOptions: UploadAssetOption[],
uploadAssetWorkflow: string | undefined, // TODO: proper typing
uploadAssetWorkflow: string | undefined,
schedulingInfo: {
editedEvents: EditedEvents[],
seriesOptions: {
Expand Down Expand Up @@ -816,8 +816,6 @@ export const updateScheduledEventsBulk = createAppAsyncThunk('events/updateSched
required: false,
type: "text",
value: eventChanges.changedTitle,
// todo: what is hashkey?
$$hashKey: "object:1588",
},
{
id: "isPartOf",
Expand All @@ -828,8 +826,6 @@ export const updateScheduledEventsBulk = createAppAsyncThunk('events/updateSched
translatable: false,
type: "text",
value: eventChanges.changedSeries,
// todo: what is hashkey?
$$hashKey: "object:1589",
},
],
},
Expand Down
10 changes: 10 additions & 0 deletions src/styles/components/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,16 @@
opacity: 1;
visibility: visible;
}

// Make anchor elements look like buttons when tab targeted
> a {
display: flex;
align-items: center;
justify-content: center;
height: 39px;
width: 28px;
margin-left: 12px;
}
}

.dropdown-ul {
Expand Down
3 changes: 0 additions & 3 deletions src/utils/resourceUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@ export const prepareMetadataFieldsForPost = (
let metadataFields: FieldValue[] = [];

// fill metadataField with field information send by server previously and values provided by user
// Todo: What is hashkey?
for (const [i, info] of catalog.fields.entries()) {
let fieldValue: FieldValue = {
id: info.id,
Expand All @@ -233,12 +232,10 @@ export const prepareMetadataFieldsForPost = (
metadataFields = metadataFields.concat(fieldValue);
}

// Todo: What is hashkey?
const metadataCatalog = {
flavor: catalog.flavor,
title: catalog.title,
fields: metadataFields,
$$hashKey: "object:123",
};

preparedMetadataCatalogs.push(metadataCatalog);
Expand Down

0 comments on commit 35b4a93

Please sign in to comment.