Skip to content

Commit

Permalink
feat: expand calendar function to generic element
Browse files Browse the repository at this point in the history
Refs: #1585
  • Loading branch information
phuang26 committed Oct 24, 2023
1 parent 3ef1129 commit 48aef3b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 1 addition & 2 deletions app/packs/src/components/calendar/CalendarEntryEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ export default class CalendarEntryEditor extends React.Component {

const e = { type: eventableType, params: {} };
e.params[`${eventableType}ID`] = eventableId;

if (eventableType === 'element') {
if (/\blabimotion\b/.test(eventableType)) {
e.klassType = 'GenericEl';
}

Expand Down
4 changes: 4 additions & 0 deletions app/packs/src/components/generic/GenericElDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import { notification, FlowViewerBtn, renderFlowModal } from 'src/apps/generic/U
import GenericAttachments from 'src/components/generic/GenericAttachments';
import { SegmentTabs } from 'src/components/generic/SegmentDetails';
import RevisionViewerBtn from 'src/components/generic/RevisionViewerBtn';
import OpenCalendarButton from 'src/components/calendar/OpenCalendarButton';

const onNaviClick = (type, id) => {
const { currentCollection, isSync } = UIStore.getState();
Expand Down Expand Up @@ -397,6 +398,9 @@ export default class GenericElDetails extends Component {
<i className="fa fa-floppy-o" aria-hidden="true" />
</Button>
</OverlayTrigger>
{genericEl.isNew
? null
: <OpenCalendarButton isPanelHeader eventableId={genericEl.id} eventableType="Labimotion::Element" />}
</div>
);
}
Expand Down
1 change: 1 addition & 0 deletions app/packs/src/components/navigation/search/Search.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ export default class Search extends React.Component {
searchName: genericEl.search_name,
searchShowLabel: genericEl.search_short_label,
genericElName: genericEl.name,
genericKlassId: genericEl.id,
search_by_method: genericEl.name,
genericElProperties: genericEl.properties,
searchProperties: genericEl.search_properties,
Expand Down

0 comments on commit 48aef3b

Please sign in to comment.