[HIMA-28] fixed breadcrumb margins

This commit is contained in:
Eraldo Hasanaj
2019-02-14 11:51:52 +01:00
parent c3c6e0334e
commit 8cf13e1594
4 changed files with 16 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
<div class="breadacrumb-grid" [ngClass]="{ 'grid-with-arrow': !backArrow }">
<div class="breadacrumb-grid" [ngClass]="{'grid-with-arrow': !backArrow, 'breadcumb-mb-5': lowerMargin}">
<!-- <app-back-arrow (back)="addOne()"></app-back-arrow> TESTING ANIMATION PURPOSES-->
<app-back-arrow
*ngIf="backArrow"

View File

@@ -6,6 +6,10 @@
margin-bottom: 16px;
}
.breadcumb-mb-5 {
margin-bottom: 5px;
}
.grid-with-arrow {
grid-template-columns: auto;
}

View File

@@ -22,6 +22,16 @@ export class BreadcrumbsComponent implements OnInit {
return this.router.url.substring(0, 16) === '/product-details';
}
get lowerMargin() {
if (this.router.url === '/customer-search-result') {
return true;
}
if (this.router.url.substring(0, 14) === '/customer-edit') {
return true;
}
return false;
}
constructor(private store: Store, private router: Router) {
this.processes$.subscribe((data: Process[]) =>
this.getBreadcrumbsFromCurentProcess(data)

View File

@@ -687,7 +687,7 @@ export class ProcessState {
const process = state.processes.find(t => t.selected === true);
const breadcrumbs = [...process.breadcrumbs].map((b, i) => {
if (i == process.breadcrumbs.length - 1) {
if (i === process.breadcrumbs.length - 1) {
return { name: payload, path: b.path };
}
return b;