Front: temporary disable search

This commit is contained in:
Michał Zieliński
2023-08-17 14:52:13 +02:00
parent 6806906ec2
commit 2f1cd940f1
3 changed files with 11 additions and 10 deletions

View File

@@ -1,4 +1,5 @@
<div class="list-container mat-elevation-z8" (scroll)="onScroll($event)" style="overflow-y: scroll;">
<!--
<div class="list-header">
<mat-grid-list cols="10" rowHeight="60">
<mat-grid-tile>
@@ -35,7 +36,7 @@
</mat-grid-tile>
</mat-grid-list>
</div>
-->
<mat-table #table [dataSource]="dataSource" [trackBy]="trackByUid" matSort class="animate">
<ng-container matColumnDef="number">

View File

@@ -10,9 +10,8 @@ import { MatButtonModule } from '@angular/material/button';
import { MatGridListModule } from '@angular/material/grid-list';
import { MatSelectModule } from '@angular/material/select';
import { FormsModule } from '@angular/forms';
import { MatChipInputEvent, MatChipsModule} from '@angular/material/chips';
import { MatChipsModule} from '@angular/material/chips';
import { MatIconModule } from '@angular/material/icon';
import {COMMA, ENTER, TAB} from '@angular/cdk/keycodes';
import { NgFor } from '@angular/common';
@Component({
@@ -30,12 +29,12 @@ export class LayersListComponent implements OnInit {
@ViewChild(MatSort) sort!: MatSort;
start: number = 0;
limit: number = 50;
start = 0;
limit = 50;
end: number = this.limit + this.start;
loadingInProgress: boolean = false;
loadingInProgress = false;
type: string = "";
type = "";
codes: string[] = [];
constructor(
@@ -43,10 +42,11 @@ export class LayersListComponent implements OnInit {
) { }
@HostListener('document:scroll', ['$event'])
// eslint-disable-next-line @typescript-eslint/no-explicit-any
public async onScroll(event: any) {
if (event.target.offsetHeight + event.target.scrollTop >= event.target.scrollHeight - 1 && !this.loadingInProgress) {
this.loadingInProgress = true;
let data: Layer[] = await Layer.getList(this._http, this.start, this.limit, this.codes);
const data: Layer[] = await Layer.getList(this._http, this.start, this.limit, this.codes);
this.dataSource.data = this.dataSource.data.concat(data);
this.start = this.end;
this.end = this.limit + this.start;

View File

@@ -6,8 +6,8 @@ export const environment = {
appEnvironment: "local",
production: false,
api: {
url: "http://localhost:5400/api"
//url: "https://diunabi.bim-it.pl/api"
//url: "http://localhost:5400/api"
url: "https://diunabi-morska.bim-it.pl/api"
},
google: {
clientId: "107631825312-bkfe438ehr9k9ecb2h76g802tj6advma.apps.googleusercontent.com"