Skip to content

Commit

Permalink
temporarily unbreak everything
Browse files Browse the repository at this point in the history
  • Loading branch information
seiyria committed May 3, 2024
1 parent bf9982c commit 0f960d9
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 9 deletions.
20 changes: 20 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"@capacitor/status-bar": "4.0.1",
"@ionic/angular": "^8.0.0",
"@ng-select/ng-select": "^12.0.7",
"@ngx-translate/core": "^15.0.0",
"@siemens/ngx-datatable": "^22.2.0",
"compress-json": "^2.1.2",
"csv-parse": "^5.3.2",
Expand Down
2 changes: 1 addition & 1 deletion src/app/meta.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class MetaService {
const metaData = await fetch(`${environment.baseUrl}/meta.json`);
const realData = await metaData.json();

this.allProducts = realData;
this.allProducts = realData.products;

this.loadExternals();
}
Expand Down
11 changes: 3 additions & 8 deletions src/app/sets/sets.page.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,20 @@
import { HttpClient } from '@angular/common/http';
import { Component, inject, type OnInit } from '@angular/core';
import { sortBy } from 'lodash';
import { type IProduct } from '../../../interfaces';
import { environment } from '../../environments/environment';
import { MetaService } from '../meta.service';

@Component({
selector: 'app-sets',
templateUrl: './sets.page.html',
styleUrls: ['./sets.page.scss'],
})
export class SetsPage implements OnInit {
private http = inject(HttpClient);
private meta = inject(MetaService);

public allProducts: IProduct[] = [];

async ngOnInit() {
this.http
.get(`${environment.baseUrl}/meta.json`)
.subscribe((products: unknown) => {
this.allProducts = sortBy(products as IProduct[], (p) => p.name);
});
this.allProducts = sortBy(this.meta.products, (p) => p.name);
}

formatSetNameForSearch(productId: string, subproductId?: string): string {
Expand Down

0 comments on commit 0f960d9

Please sign in to comment.