UI: Updated file units models

This commit is contained in:
Vladyslav_Prykhodko 2023-07-20 11:16:28 +03:00
parent df9ec02bbc
commit 99a976b14e
2 changed files with 2014 additions and 2022 deletions

View File

@ -24,10 +24,6 @@ import { ResourcesService } from '@core/services/resources.service';
const unitsModels = '/assets/model/units.json';
interface UnitsJson {
units: Array<Unit>;
}
@Component({
selector: 'tb-unit-input',
templateUrl: './unit-input.component.html',
@ -151,8 +147,8 @@ export class UnitInputComponent implements ControlValueAccessor, OnInit {
private unitsConstant(): Observable<Array<Unit>> {
if (this.fetchUnits$ === null) {
this.fetchUnits$ = this.resourcesService.loadJsonResource<UnitsJson>(unitsModels).pipe(
map(units => units.units.map(u => ({
this.fetchUnits$ = this.resourcesService.loadJsonResource<Array<Unit>>(unitsModels).pipe(
map(units => units.map(u => ({
symbol: u.symbol,
name: this.translate.instant(u.name),
tags: u.tags

File diff suppressed because it is too large Load Diff