From c645feba809f0fe96410c0594fa2c0120193c1a3 Mon Sep 17 00:00:00 2001 From: ncoronel Date: Mon, 10 Aug 2026 14:17:09 -0300 Subject: [PATCH] feat: simplify event date labels in product components for clearer display --- src/app/core/layout/store-layout/store-layout.component.scss | 4 +++- .../product-detail-page/product-detail-page.component.spec.ts | 4 ++-- .../product-vertical-with-cart-card.component.spec.ts | 4 ++-- .../variant-selector/variant-selector.component.spec.ts | 4 ++-- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/app/core/layout/store-layout/store-layout.component.scss b/src/app/core/layout/store-layout/store-layout.component.scss index 272ca6d..b78e519 100644 --- a/src/app/core/layout/store-layout/store-layout.component.scss +++ b/src/app/core/layout/store-layout/store-layout.component.scss @@ -23,7 +23,8 @@ position: absolute; top: 76px; right: calc((100% - 1320px) / 2 + 1.5rem); - + width: 100%; + max-width: 400px; max-height: calc(100vh - 120px); z-index: 1050; background-color: #ffffff; @@ -40,6 +41,7 @@ right: 1rem; left: 1rem; width: auto; + max-width: none; } } diff --git a/src/app/features/store/pages/product-detail-page/product-detail-page.component.spec.ts b/src/app/features/store/pages/product-detail-page/product-detail-page.component.spec.ts index 928d8d4..da11222 100644 --- a/src/app/features/store/pages/product-detail-page/product-detail-page.component.spec.ts +++ b/src/app/features/store/pages/product-detail-page/product-detail-page.component.spec.ts @@ -349,14 +349,14 @@ describe('ProductDetailPageComponent', () => { { id: 20, value: '20', - label: '09/10/2026 · 10:00 a 20:00', + label: '09/10/2026', sort_order: 0, metadata: null, }, { id: 21, value: '21', - label: '10/10/2026 · 10:00 a 20:00', + label: '10/10/2026', sort_order: 1, metadata: null, }, diff --git a/src/app/shared/components/product-vertical-with-cart-card/product-vertical-with-cart-card.component.spec.ts b/src/app/shared/components/product-vertical-with-cart-card/product-vertical-with-cart-card.component.spec.ts index aa8dbbf..f5db669 100644 --- a/src/app/shared/components/product-vertical-with-cart-card/product-vertical-with-cart-card.component.spec.ts +++ b/src/app/shared/components/product-vertical-with-cart-card/product-vertical-with-cart-card.component.spec.ts @@ -141,7 +141,7 @@ describe('ProductVerticalWithCartCardComponent', () => { fixture.componentRef.setInput('variants', [ { id: 10, - values: { event_date: { value: '2', label: '10/10/2026 · 09:00 a 18:00' } }, + values: { event_date: { value: '2', label: '10/10/2026' } }, }, ]); fixture.detectChanges(); @@ -150,7 +150,7 @@ describe('ProductVerticalWithCartCardComponent', () => { '.product-vertical-with-cart-card__variant-select option', ) as HTMLOptionElement; - expect(option.textContent?.trim()).toBe('10/10/2026 · 09:00 a 18:00'); + expect(option.textContent?.trim()).toBe('10/10/2026'); expect((fixture.componentInstance as any).selectedValues()).toEqual({ event_date: '2' }); }); diff --git a/src/app/shared/components/variant-selector/variant-selector.component.spec.ts b/src/app/shared/components/variant-selector/variant-selector.component.spec.ts index 0650008..e495add 100644 --- a/src/app/shared/components/variant-selector/variant-selector.component.spec.ts +++ b/src/app/shared/components/variant-selector/variant-selector.component.spec.ts @@ -47,13 +47,13 @@ describe('VariantSelectorComponent', () => { fixture.componentRef.setInput('variants', [ { value: 1, - values: { event_date: { value: '2', label: '10/10/2026 · 09:00 a 18:00' } }, + values: { event_date: { value: '2', label: '10/10/2026' } }, }, ]); fixture.detectChanges(); const option = fixture.nativeElement.querySelector('option') as HTMLOptionElement; - expect(option.textContent?.trim()).toBe('10/10/2026 · 09:00 a 18:00'); + expect(option.textContent?.trim()).toBe('10/10/2026'); expect((fixture.componentInstance as any).selectedValues()).toEqual({ event_date: '2' }); }); });