@kris701/ez-ui 1.1.2 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4558,6 +4558,8 @@ class BaseListInterface {
4558
4558
  ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
4559
4559
  getAllEndpoint = '';
4560
4560
  getEndpoint = '';
4561
+ canGetAll = true;
4562
+ canGet = true;
4561
4563
  isLoaded = false;
4562
4564
  isLoading = false;
4563
4565
  onUpdated = new EventEmitter();
@@ -4565,7 +4567,7 @@ class BaseListInterface {
4565
4567
  this.http = http;
4566
4568
  }
4567
4569
  async Load() {
4568
- if (!this.isLoading) {
4570
+ if (!this.isLoading && this.canGetAll) {
4569
4571
  this.isLoaded = false;
4570
4572
  this.isLoading = true;
4571
4573
  const value = await firstValueFrom(this.http.get(this.getAllEndpoint));
@@ -4574,6 +4576,9 @@ class BaseListInterface {
4574
4576
  this.isLoaded = true;
4575
4577
  this.onUpdated.emit();
4576
4578
  }
4579
+ else {
4580
+ this.isLoaded = true;
4581
+ }
4577
4582
  }
4578
4583
  async List() {
4579
4584
  if (!this.isLoaded)
@@ -4589,6 +4594,8 @@ class BaseListInterface {
4589
4594
  return null;
4590
4595
  }
4591
4596
  async Get(id) {
4597
+ if (!this.canGet)
4598
+ return null;
4592
4599
  const item = await firstValueFrom(this.http.get(this.getEndpoint + "?ID=" + id));
4593
4600
  return item;
4594
4601
  }