2026-04-27 21:53:11 +03:30
|
|
|
import { Component, Input } from '@angular/core';
|
|
|
|
|
import { FormControl, ReactiveFormsModule } from '@angular/forms';
|
|
|
|
|
import { InputComponent } from '../input/input.component';
|
|
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
|
selector: 'field-unit-price',
|
2026-05-24 10:44:35 +03:30
|
|
|
template: `<app-input
|
|
|
|
|
label="قیمت پایه"
|
|
|
|
|
[control]="control"
|
|
|
|
|
[name]="name"
|
|
|
|
|
[hint]="hint"
|
|
|
|
|
type="price"
|
|
|
|
|
/>`,
|
2026-04-27 21:53:11 +03:30
|
|
|
imports: [ReactiveFormsModule, InputComponent],
|
|
|
|
|
})
|
|
|
|
|
export class UnitPriceComponent {
|
|
|
|
|
@Input({ required: true }) control = new FormControl<string>('');
|
|
|
|
|
@Input() name = 'unit_price';
|
2026-05-24 10:44:35 +03:30
|
|
|
@Input() hint = '';
|
2026-04-27 21:53:11 +03:30
|
|
|
}
|