@sumaris-net/ngx-components 2.6.4-rc10 → 2.6.4-rc11
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.
- package/esm2020/src/app/shared/named-filter/named-filter.service.mjs +12 -9
- package/fesm2015/sumaris-net.ngx-components.mjs +9 -8
- package/fesm2015/sumaris-net.ngx-components.mjs.map +1 -1
- package/fesm2020/sumaris-net.ngx-components.mjs +9 -8
- package/fesm2020/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +1 -1
- package/src/app/shared/named-filter/named-filter.service.d.ts +4 -3
|
@@ -23052,7 +23052,7 @@ NamedFilterFilter = __decorate([
|
|
|
23052
23052
|
const APP_NAMED_FILTER_SERVICE = new InjectionToken('namedFilterService');
|
|
23053
23053
|
// @dynamic
|
|
23054
23054
|
class AbstractNamedFilterService extends BaseEntityService {
|
|
23055
|
-
constructor(graphql, platform, dataType, filterType, options) {
|
|
23055
|
+
constructor(graphql, platform, account, dataType, filterType, options) {
|
|
23056
23056
|
super(graphql, platform, dataType, filterType, {
|
|
23057
23057
|
defaultSortBy: 'name',
|
|
23058
23058
|
defaultSortDirection: 'asc',
|
|
@@ -23060,15 +23060,13 @@ class AbstractNamedFilterService extends BaseEntityService {
|
|
|
23060
23060
|
});
|
|
23061
23061
|
this.graphql = graphql;
|
|
23062
23062
|
this.platform = platform;
|
|
23063
|
+
this.account = account;
|
|
23063
23064
|
this.dataType = dataType;
|
|
23064
23065
|
this.filterType = filterType;
|
|
23065
23066
|
this.options = options;
|
|
23066
23067
|
this._logPrefix = '[named-filter-service] ';
|
|
23067
23068
|
}
|
|
23068
23069
|
watchAll(offset, size, sortBy, sortDirection, filter, options) {
|
|
23069
|
-
if (!filter) {
|
|
23070
|
-
filter = this.defaultFilter();
|
|
23071
|
-
}
|
|
23072
23070
|
// Always ask total
|
|
23073
23071
|
options = {
|
|
23074
23072
|
...options,
|
|
@@ -23081,9 +23079,6 @@ class AbstractNamedFilterService extends BaseEntityService {
|
|
|
23081
23079
|
return super.watchAll(offset, size, sortBy, sortDirection, filter, options);
|
|
23082
23080
|
}
|
|
23083
23081
|
async loadAll(offset, size, sortBy, sortDirection, filter, options) {
|
|
23084
|
-
if (!filter) {
|
|
23085
|
-
filter = this.defaultFilter();
|
|
23086
|
-
}
|
|
23087
23082
|
// Always ask total
|
|
23088
23083
|
options = {
|
|
23089
23084
|
...options,
|
|
@@ -23110,12 +23105,18 @@ class AbstractNamedFilterService extends BaseEntityService {
|
|
|
23110
23105
|
searchText
|
|
23111
23106
|
};
|
|
23112
23107
|
}
|
|
23108
|
+
asFilter(source) {
|
|
23109
|
+
const filter = super.asFilter(source);
|
|
23110
|
+
if (isNil(filter.recorderPersonId))
|
|
23111
|
+
filter.recorderPersonId = this.account.person.id;
|
|
23112
|
+
return filter;
|
|
23113
|
+
}
|
|
23113
23114
|
}
|
|
23114
23115
|
AbstractNamedFilterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AbstractNamedFilterService, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
|
|
23115
23116
|
AbstractNamedFilterService.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: AbstractNamedFilterService, usesInheritance: true, ngImport: i0 });
|
|
23116
23117
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AbstractNamedFilterService, decorators: [{
|
|
23117
23118
|
type: Directive
|
|
23118
|
-
}], ctorParameters: function () { return [{ type: GraphqlService }, { type: PlatformService }, { type: undefined }, { type: undefined }, { type: undefined }]; } });
|
|
23119
|
+
}], ctorParameters: function () { return [{ type: GraphqlService }, { type: PlatformService }, { type: AccountService }, { type: undefined }, { type: undefined }, { type: undefined }]; } });
|
|
23119
23120
|
|
|
23120
23121
|
class AppGraphQLModule {
|
|
23121
23122
|
constructor() {
|