refact: add parent check to boolean (#14115)
* refact: add parent check to boolean * chore: add changelog entry
This commit is contained in:
parent
d7def242b8
commit
81cac313c5
|
@ -0,0 +1,3 @@
|
|||
```release-note:bug
|
||||
ui: Removes duplicate breadcrumb header when navigating from child job back to parent.
|
||||
```
|
|
@ -8,7 +8,7 @@
|
|||
</li>
|
||||
{{/if}}
|
||||
{{#if trigger.data.isSuccess}}
|
||||
{{#if trigger.data.result}}
|
||||
{{#if (and trigger.data.result this.hasParent)}}
|
||||
<li>
|
||||
<LinkTo
|
||||
@route="jobs.job.index"
|
||||
|
|
|
@ -7,6 +7,10 @@ export default class BreadcrumbsJob extends Component {
|
|||
return this.args.crumb.job;
|
||||
}
|
||||
|
||||
get hasParent() {
|
||||
return !!this.job.belongsTo('parent').id();
|
||||
}
|
||||
|
||||
@action
|
||||
onError(err) {
|
||||
assert(`Error: ${err.message}`);
|
||||
|
@ -14,8 +18,7 @@ export default class BreadcrumbsJob extends Component {
|
|||
|
||||
@action
|
||||
fetchParent() {
|
||||
const hasParent = !!this.job.belongsTo('parent').id();
|
||||
if (hasParent) {
|
||||
if (this.hasParent) {
|
||||
return this.job.get('parent');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue