Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
petrjasek committed Jun 18, 2024
1 parent 204ae38 commit 4708ba6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
5 changes: 2 additions & 3 deletions client/components/Events/EventItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ class EventItemComponent extends React.Component<IProps, IState> {

const hasPlanning = eventUtils.eventHasPlanning(item);
const isItemLocked = lockUtils.isItemLocked(item, lockedItems);
const showRelatedPlanningLink = activeFilter === PLANNING_VIEW.COMBINED && hasPlanning;
let borderState: 'locked' | 'active' | false = false;

if (isItemLocked) {
Expand Down Expand Up @@ -258,7 +257,7 @@ class EventItemComponent extends React.Component<IProps, IState> {
{secondaryFields.includes('files') && renderFields('files', item)}


{(showRelatedPlanningLink) && (
{(hasPlanning) && (
<span
className="sd-overflow-ellipsis sd-list-item__element-lm-10"
>
Expand Down Expand Up @@ -297,4 +296,4 @@ class EventItemComponent extends React.Component<IProps, IState> {
}
}

export const EventItem = connect()(EventItemComponent);
export const EventItem = connect()(EventItemComponent);
1 change: 0 additions & 1 deletion client/components/Events/EventItemWithPlanning.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,6 @@ export class EventItemWithPlanning extends React.Component<IProps, IState> {
expanded={this.state.openPlanningItems}
nestedChildren={getPlannings(eventProps.item)}
noMarginTop={this.props.listViewType === LIST_VIEW_TYPE.LIST}
refNode={this.props.refNode}
/>
);
}
Expand Down
4 changes: 2 additions & 2 deletions client/components/Main/ListGroupItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
import {EventItem, EventItemWithPlanning} from '../Events';
import {PlanningItem} from '../Planning';

import {ITEM_TYPE, EVENTS, PLANNING, MAIN, CLICK_DELAY} from '../../constants';
import {ITEM_TYPE, EVENTS, PLANNING, CLICK_DELAY} from '../../constants';
import {getItemType, eventUtils} from '../../utils';
import {planningApi} from '../../superdeskApi';

Expand Down Expand Up @@ -244,7 +244,7 @@ export class ListGroupItem extends React.Component<IProps, IState> {

switch (itemType) {
case ITEM_TYPE.EVENT:
if (eventUtils.eventHasPlanning(item) && activeFilter === MAIN.FILTERS.COMBINED) {
if (eventUtils.eventHasPlanning(item)) {
return (
<EventItemWithPlanning
eventProps={eventProps}
Expand Down
3 changes: 2 additions & 1 deletion server/planning/search/eventsplanning_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ def get(self, req, lookup):
query = self._construct_search_query(repo, params, search_filter)

if repo == "events" or repo == "event":
return self._search_events(req, params, query, search_filter)
items = self._search_events(req, params, query, search_filter)
return self._get_combined_view_data(items, req, params, search_filter)
elif repo == "planning":
return self._search_planning(req, params, query, search_filter)
else:
Expand Down

0 comments on commit 4708ba6

Please sign in to comment.