feat(platform): sprint 11.5 standardization
Some checks failed
Architecture Governance / architecture (push) Has been cancelled

This commit is contained in:
sdarbinyan
2026-07-09 02:29:12 +04:00
parent a16c856537
commit 8d652c8259
57 changed files with 2162 additions and 848 deletions

View File

@@ -70,7 +70,7 @@
</div>
</a>
<button class="add-to-cart-btn" type="button" (click)="onAddToCart($event)" [attr.aria-label]="addToCartLabel + ': ' + (title || item.name)">
{{ addToCartLabel }}
<button class="add-to-cart-btn" type="button" (click)="onAddToCart($event)" [attr.aria-label]="(addToCartLabel || ('catalog.addToCart' | translate)) + ': ' + (title || item.name)">
{{ addToCartLabel || ('catalog.addToCart' | translate) }}
</button>
</article>

View File

@@ -3,6 +3,7 @@ import { DecimalPipe } from '@angular/common';
import { RouterLink } from '@angular/router';
import { Product } from '../../core/products/models/product-domain.model';
import { LangRoutePipe } from '../../pipes/lang-route.pipe';
import { TranslatePipe } from '../../i18n/translate.pipe';
import { getBadgeClass, getDiscountedPrice, getMainImage } from '../../utils/item.utils';
export type ProductCardAppearance = 'standard' | 'compact';
@@ -10,7 +11,7 @@ export type ProductCardAppearance = 'standard' | 'compact';
@Component({
selector: 'app-product-card',
standalone: true,
imports: [DecimalPipe, RouterLink, LangRoutePipe],
imports: [DecimalPipe, RouterLink, LangRoutePipe, TranslatePipe],
templateUrl: './product-card.component.html',
styleUrls: ['./product-card.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush
@@ -19,7 +20,7 @@ export class ProductCardComponent {
@Input({ required: true }) item!: Product;
@Input() title = '';
@Input() description = '';
@Input() addToCartLabel = 'Add to cart';
@Input() addToCartLabel = '';
@Input() appearance: ProductCardAppearance = 'standard';
@Input() showDescription = false;
@Input() showStock = true;