mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
30 lines
1.2 KiB
TypeScript
30 lines
1.2 KiB
TypeScript
import { CommonModule } from '@angular/common';
|
|
import { Component, ChangeDetectionStrategy, ChangeDetectorRef } from '@angular/core';
|
|
import { FormsModule } from '@angular/forms';
|
|
import { BranchSelectorComponent } from '@shared/components/branch-selector';
|
|
import { BranchNamePipe } from '@shared/pipes/branch';
|
|
import { BranchDTO } from '@swagger/checkout';
|
|
import { UiIconModule } from '@ui/icon';
|
|
import { PurchaseOptionsStore } from '../store';
|
|
import { BasePurchaseOptionDirective } from './base-purchase-option.directive';
|
|
|
|
@Component({
|
|
selector: 'app-in-store-purchase-options-tile',
|
|
templateUrl: 'in-store-purchase-options-tile.component.html',
|
|
styleUrls: ['purchase-options-tile.component.css'],
|
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
standalone: true,
|
|
imports: [CommonModule, UiIconModule, BranchSelectorComponent, FormsModule, BranchNamePipe],
|
|
})
|
|
export class InStorePurchaseOptionTileComponent extends BasePurchaseOptionDirective {
|
|
inStoreBranch$ = this.store.inStoreBranch$;
|
|
|
|
constructor(protected store: PurchaseOptionsStore, protected cdr: ChangeDetectorRef) {
|
|
super('in-store');
|
|
}
|
|
|
|
setInStoreBranch(branch?: BranchDTO) {
|
|
this.store.setInStoreBranch(branch);
|
|
}
|
|
}
|