Skip to content

Task hyperlink can't be disabled #61

@barouchk

Description

@barouchk

In the configuration object there is option to add link to record detail to None
when displaying tasks, the link can't be disable even when I selecting None.

there is a fix in another view but it's not added to the task view

Solution:

  1. in the component: timelineMonth.html need to transfer property:

navigation-behaviour={theRecord.navigationBehaviour}
to the component: <c-timeline-item-task.

  1. in the component: timelineItemTask, need to create new api property by the name: ```
    //Default navigation behaviour is to go to the record detail
    @api navigationBehaviour="Record Detail";
    and another function:

    get shouldNavigateToRecord(){
    return this.navigationBehaviour!='None';
    }


3. in the: timelineItemTask.html need to change:

  <a onclick={navigateToTask}>
                                <template if:true={hasSubject}>
                                    <strong>{title}</strong>
                                </template>
                                <template if:false={hasSubject}>
                                    <strong>{label.No_Subject}</strong>
                                </template>
                            </a>

to:



5.                                    ```
 <template if:true={shouldNavigateToRecord}>                                
                         <a onclick={navigateToTask}>
                                    <template if:true={hasSubject}>
                                        <strong>{title}</strong>
                                    </template>
                                    <template if:false={hasSubject}>
                                        <strong>{label.No_Subject}</strong>
                                    </template>
                                </a>
                                    </template>
                                    <template if:false={shouldNavigateToRecord}>
                                        <lightning-formatted-rich-text value={title}></lightning-formatted-rich-text>
                                    </template>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions