feat(tenant): display contact details in store footer

This commit is contained in:
2026-08-20 12:46:14 -03:00
parent 38a57adf55
commit ce26fb5d1a
5 changed files with 26 additions and 8 deletions

View File

@@ -22,14 +22,18 @@
<div class="col-12 col-md-6 col-xl-5 d-grid gap-3 align-content-start store-layout__contact">
<div class="d-grid gap-2 store-layout__contact-details">
<div class="d-flex align-items-center gap-2">
<i class="fa-solid fa-location-dot" aria-hidden="true"></i>
<span>Av. San Lorenzo 1542, Rosario</span>
</div>
<div class="d-flex align-items-center gap-2">
<i class="fa-solid fa-phone" aria-hidden="true"></i>
<span>54 9 (0341) 6658247</span>
</div>
@if (address) {
<div class="d-flex align-items-center gap-2">
<i class="fa-solid fa-location-dot" aria-hidden="true"></i>
<span>{{ address }}</span>
</div>
}
@if (phone) {
<div class="d-flex align-items-center gap-2">
<i class="fa-solid fa-phone" aria-hidden="true"></i>
<span>{{ phone }}</span>
</div>
}
</div>
<p class="mb-0 small store-layout__muted-text store-layout__copyright">

View File

@@ -27,5 +27,7 @@ export class StoreFooterComponent {
@Input() logoUrl: string | null = null;
@Input() backgroundImageUrl: string | null = null;
@Input() storeName: string | null = null;
@Input() address: string | null = null;
@Input() phone: string | null = null;
readonly logoutClick = output<void>();
}

View File

@@ -67,6 +67,8 @@
[logoUrl]="tenant()?.footer_logo ?? null"
[backgroundImageUrl]="tenant()?.footer_bg_image ?? null"
[storeName]="tenant()?.nombre ?? null"
[address]="tenant()?.address ?? null"
[phone]="tenant()?.phone ?? null"
(logoutClick)="onLogoutClick()"
/>
</div>

View File

@@ -28,6 +28,8 @@ const tenant: Tenant = {
codigo: 'test',
nombre: 'Test Tenant',
dominio: 'localhost',
address: 'Calle Test 123, Rosario',
phone: '+54 341 555 1234',
primary_color: '#6376F3',
secondary_color: '#A0A0A0',
danger_color: '#FF8888',
@@ -299,6 +301,12 @@ describe('StoreLayoutComponent', () => {
expect(compiled.querySelector('.fa-whatsapp')).not.toBeNull();
expect(compiled.querySelector('.fa-facebook')).not.toBeNull();
expect(compiled.querySelector('.fa-linkedin-in')).not.toBeNull();
expect(compiled.querySelector('.store-layout__contact-details')?.textContent).toContain(
tenant.address,
);
expect(compiled.querySelector('.store-layout__contact-details')?.textContent).toContain(
tenant.phone,
);
});
it('navigates to search results when the search button is clicked', () => {

View File

@@ -113,6 +113,8 @@ export interface Tenant {
dominio: string;
base_path?: string;
site_title?: string | null;
address?: string | null;
phone?: string | null;
favicon?: string | null;
primary_color: string;
secondary_color: string;