@senior-gestao-relacionamento/angular-components 1.7.1 → 1.7.2-feat-crmdev-11520-9b2933ba
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/bundles/senior-gestao-relacionamento-angular-components.umd.js +19 -9
- package/bundles/senior-gestao-relacionamento-angular-components.umd.js.map +1 -1
- package/bundles/senior-gestao-relacionamento-angular-components.umd.min.js +1 -1
- package/bundles/senior-gestao-relacionamento-angular-components.umd.min.js.map +1 -1
- package/esm2015/services/current-collaborator/current-collaborator.service.js +14 -8
- package/esm2015/services/current-tenant/current-tenant.service.js +3 -2
- package/esm2015/services/standard-filters/standard-filters.service.js +5 -2
- package/esm5/services/current-collaborator/current-collaborator.service.js +14 -8
- package/esm5/services/current-tenant/current-tenant.service.js +3 -2
- package/esm5/services/standard-filters/standard-filters.service.js +5 -2
- package/fesm2015/senior-gestao-relacionamento-angular-components.js +19 -9
- package/fesm2015/senior-gestao-relacionamento-angular-components.js.map +1 -1
- package/fesm5/senior-gestao-relacionamento-angular-components.js +19 -9
- package/fesm5/senior-gestao-relacionamento-angular-components.js.map +1 -1
- package/package.json +1 -1
- package/senior-gestao-relacionamento-angular-components.metadata.json +1 -1
- package/services/current-collaborator/current-collaborator.service.d.ts +1 -1
|
@@ -970,12 +970,13 @@
|
|
|
970
970
|
this.ngUnsubscribe = new rxjs.Subject();
|
|
971
971
|
this.COLLABORATOR_KEY = 'CRMX_COLLABORATOR';
|
|
972
972
|
}
|
|
973
|
-
CurrentCollaboratorService.prototype.
|
|
973
|
+
CurrentCollaboratorService.prototype.resolve = function () {
|
|
974
974
|
var _this = this;
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
975
|
+
return new rxjs.Observable(function (observer) {
|
|
976
|
+
_this.call(false).subscribe(function (collaborator) {
|
|
977
|
+
observer.next(collaborator);
|
|
978
|
+
observer.complete();
|
|
979
|
+
});
|
|
979
980
|
});
|
|
980
981
|
};
|
|
981
982
|
CurrentCollaboratorService.prototype.get = function () {
|
|
@@ -1012,8 +1013,13 @@
|
|
|
1012
1013
|
throw err;
|
|
1013
1014
|
}))
|
|
1014
1015
|
.subscribe(function (collaboratorDto) {
|
|
1015
|
-
|
|
1016
|
-
|
|
1016
|
+
if (collaboratorDto.active === false) {
|
|
1017
|
+
_this.redirect('collaborator-inactive');
|
|
1018
|
+
}
|
|
1019
|
+
else {
|
|
1020
|
+
_this.storageService.store(_this.COLLABORATOR_KEY, collaboratorDto);
|
|
1021
|
+
observer.next(Collaborator.fromDto(collaboratorDto));
|
|
1022
|
+
}
|
|
1017
1023
|
});
|
|
1018
1024
|
}
|
|
1019
1025
|
observer.complete();
|
|
@@ -1109,6 +1115,7 @@
|
|
|
1109
1115
|
var moduleDto = _this.storageService.get(_this.ERPX_MODULE_KEY);
|
|
1110
1116
|
if (moduleDto !== null && useCache) {
|
|
1111
1117
|
observer.next(Modulo.fromDto(moduleDto));
|
|
1118
|
+
observer.complete();
|
|
1112
1119
|
}
|
|
1113
1120
|
else {
|
|
1114
1121
|
_this.http
|
|
@@ -1124,10 +1131,10 @@
|
|
|
1124
1131
|
var moduloDto = response.contents[0];
|
|
1125
1132
|
_this.storageService.store(_this.ERPX_MODULE_KEY, moduloDto);
|
|
1126
1133
|
observer.next(Modulo.fromDto(moduloDto));
|
|
1134
|
+
observer.complete();
|
|
1127
1135
|
}
|
|
1128
1136
|
});
|
|
1129
1137
|
}
|
|
1130
|
-
observer.complete();
|
|
1131
1138
|
});
|
|
1132
1139
|
};
|
|
1133
1140
|
CurrentTenantService.prototype.redirect = function (page) {
|
|
@@ -1347,7 +1354,10 @@
|
|
|
1347
1354
|
StandardFiltersService.prototype.addFilterIn = function (filterQuery, alias, field, values) {
|
|
1348
1355
|
var _this = this;
|
|
1349
1356
|
var filters = values.map(function (value) { return _this.addAlias(alias, field) + " eq '" + value + "'"; });
|
|
1350
|
-
|
|
1357
|
+
if (filters.length > 0) {
|
|
1358
|
+
return this.addFilter(filterQuery, "(" + filters.join(' or ') + ")");
|
|
1359
|
+
}
|
|
1360
|
+
return '';
|
|
1351
1361
|
};
|
|
1352
1362
|
StandardFiltersService.prototype.addAlias = function (alias, filter) {
|
|
1353
1363
|
return (alias ? alias + "." : '') + filter;
|