@esfaenza/core 19.2.84 → 19.2.85
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Injector } from "@angular/core";
|
|
2
2
|
import { AppSearch } from "@esfaenza/es-table";
|
|
3
|
-
import { UtilityService } from "@esfaenza/extensions";
|
|
3
|
+
import { MessageService, UtilityService } from "@esfaenza/extensions";
|
|
4
4
|
import { HTTPService } from "@esfaenza/httpservice";
|
|
5
5
|
import { LocalizationService } from "@esfaenza/localizations";
|
|
6
6
|
import { BaseComponent } from "../base/base.component";
|
|
@@ -13,6 +13,7 @@ export declare abstract class BaseSearchComponent<TSearch extends AppSearch<TIte
|
|
|
13
13
|
protected ItemType: new () => TItem;
|
|
14
14
|
protected http: HTTPService;
|
|
15
15
|
protected utiExts: UtilityService;
|
|
16
|
+
protected msgExts: MessageService;
|
|
16
17
|
private location;
|
|
17
18
|
private localStorage;
|
|
18
19
|
private route;
|
|
@@ -2046,6 +2046,7 @@ class BaseSearchComponent extends BaseComponent {
|
|
|
2046
2046
|
this.http = injector.get(HTTPService);
|
|
2047
2047
|
this.route = injector.get(ActivatedRoute);
|
|
2048
2048
|
this.utiExts = injector.get(UtilityService);
|
|
2049
|
+
this.msgExts = injector.get(MessageService);
|
|
2049
2050
|
[this.HotView, this.SearchURL, this.SearchType, this.ItemType] = this.initialize();
|
|
2050
2051
|
if (!this.HotView || !this.SearchURL || !this.SearchType || !this.ItemType)
|
|
2051
2052
|
throw ("Fallita inizializzazione della pagina di ricerca.");
|
|
@@ -2134,11 +2135,12 @@ class BaseSearchComponent extends BaseComponent {
|
|
|
2134
2135
|
this.searchView["__proto__"] = keepProto;
|
|
2135
2136
|
}
|
|
2136
2137
|
prepareExport(callback, limit = -1) {
|
|
2137
|
-
if (limit > 0) {
|
|
2138
|
-
// Check
|
|
2139
|
-
}
|
|
2140
2138
|
var view = AppSearch.toSelectAll(this.searchView);
|
|
2141
2139
|
this.http.post(this.SearchURL, view).subscribe(t => {
|
|
2140
|
+
if (t.objectcount > limit && limit > 0) {
|
|
2141
|
+
this.msgExts.simpleError(`Massimo numero di elementi consentito: ${limit}.`);
|
|
2142
|
+
return;
|
|
2143
|
+
}
|
|
2142
2144
|
callback(t.items, this.ItemType);
|
|
2143
2145
|
});
|
|
2144
2146
|
}
|