mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
chore: added getter for track-element
This commit is contained in:
parent
c237effa75
commit
dd54f6bd77
@ -28,7 +28,7 @@ export const CreateUpdateProjectViewModal: FC<Props> = observer((props) => {
|
||||
const { cycleId, moduleId, viewId } = router.query;
|
||||
// store hooks
|
||||
const { createView, updateView } = useProjectView();
|
||||
const { captureEvent, trackElement } = useEventTracker();
|
||||
const { captureEvent, getTrackElement } = useEventTracker();
|
||||
// toast alert
|
||||
const { setToastAlert } = useToast();
|
||||
|
||||
@ -44,8 +44,8 @@ export const CreateUpdateProjectViewModal: FC<Props> = observer((props) => {
|
||||
view_id: res.id,
|
||||
filters: res.filters,
|
||||
element_id: cycleId ?? moduleId ?? viewId ?? projectId,
|
||||
element: trackElement
|
||||
? trackElement
|
||||
element: getTrackElement
|
||||
? getTrackElement
|
||||
: cycleId
|
||||
? "Cycle issues page"
|
||||
: moduleId
|
||||
|
@ -24,6 +24,7 @@ export interface IEventTrackerStore {
|
||||
trackElement: string | undefined;
|
||||
// computed
|
||||
getRequiredProperties: any;
|
||||
getTrackElement: string | undefined;
|
||||
// actions
|
||||
resetSession: () => void;
|
||||
setTrackElement: (element: string) => void;
|
||||
@ -47,6 +48,7 @@ export class EventTrackerStore implements IEventTrackerStore {
|
||||
trackElement: observable,
|
||||
// computed
|
||||
getRequiredProperties: computed,
|
||||
getTrackElement: computed,
|
||||
// actions
|
||||
resetSession: action,
|
||||
setTrackElement: action,
|
||||
@ -58,6 +60,13 @@ export class EventTrackerStore implements IEventTrackerStore {
|
||||
this.rootStore = _rootStore;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: Returns the current track element.
|
||||
*/
|
||||
get getTrackElement() {
|
||||
return this.trackElement;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: Returns the necessary property for the event tracking
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user