Skip to content

Commit

Permalink
Use SQL query API in brick attributes page
Browse files Browse the repository at this point in the history
  • Loading branch information
lcdr authored and Xiphoseer committed Apr 7, 2024
1 parent e406e6e commit 8cc9a1c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 19 deletions.
12 changes: 10 additions & 2 deletions src/app/misc/brick-attributes/brick-attributes.component.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
<section *ngIf="table | async; else loading; let attributes">
<section *ngIf="'
select
ID,
name_en_US as name,
icon_asset,
display_order,
locStatus
from brickAttributes
' | query; else loading; let attributes">
<h2>Brick Attributes</h2>
<div class="table-responsive">
<table>
Expand All @@ -12,7 +20,7 @@ <h2>Brick Attributes</h2>
</tr>
<tr *ngFor="let attribute of attributes">
<td>{{attribute.ID}}</td>
<td>{{attribute.ID | loc:"brickAttributes" | async | elem:'name' }}</td>
<td>{{attribute.name}}</td>
<td class="no-padding"><img class="no-margin" [src]="attribute.icon_asset | lowercase | replace:'dds':'png' | res"/></td>
<td>{{attribute.icon_asset}}</td>
<td>{{attribute.display_order}}</td>
Expand Down
19 changes: 2 additions & 17 deletions src/app/misc/brick-attributes/brick-attributes.component.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,8 @@
import { Component, OnInit } from '@angular/core';
import { Observable } from 'rxjs';

import { LuCoreDataService } from '../../services';
import { DB_brickAttributes } from '../../../defs/cdclient';
import { Component } from '@angular/core';

@Component({
selector: 'app-brick-attributes',
templateUrl: './brick-attributes.component.html',
styleUrls: ['./brick-attributes.component.css']
})
export class BrickAttributesComponent implements OnInit {

table: Observable<DB_brickAttributes[]>;

constructor(
private luCoreData: LuCoreDataService) { }

ngOnInit() {
this.table = this.luCoreData.getFullTable('brickAttributes');
}

}
export class BrickAttributesComponent {}

0 comments on commit 8cc9a1c

Please sign in to comment.