master
Boris Voropaev 2024-01-17 16:38:20 +03:00
parent 99a554947b
commit 74083bb735
2 changed files with 10 additions and 2 deletions

View File

@ -6,7 +6,7 @@
<div class="phone" *ngIf="phone">{{phone}}</div>
<div class="email" *ngIf="email">{{email}}</div>
<div class="details" *ngIf="textOnly" (click)="showModal=true">
<a>Подробнее<ico ico="chevron_right_24"></ico></a>
<a>{{about}}<ico ico="chevron_right_24"></ico></a>
</div>
<modal *ngIf="showModal" (close)="showModal=false">
<h4 header>{{name}}</h4>

View File

@ -1,5 +1,6 @@
import {Component, Input} from '@angular/core';
import {ObjectsService} from "@app/_services";
import {PagesService} from "@app/_services/pages.service";
@Component({
selector: 'cards-item-persons',
@ -10,7 +11,10 @@ export class CardsItemPersonsComponent {
@Input() card: any;
public showModal = false;
constructor(private objectsService: ObjectsService) {
constructor(
private objectsService: ObjectsService,
public pagesService: PagesService
) {
}
get image() {
@ -36,6 +40,10 @@ export class CardsItemPersonsComponent {
return this.html?.replace(/<[^>]*>?/gm, '').replace(/\s/g, "").replace(/\&nbsp;/gm,'');
}
get about(){
return this.pagesService.rootPage.slug ===""?"Подробнее":"About"
}
ngOnInit() {
}
}