@senior-gestao-relacionamento/angular-components 1.7.2 → 1.8.0-feat-crmdev-11762-77bf01c2
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 +134 -217
- package/bundles/senior-gestao-relacionamento-angular-components.umd.js.map +1 -1
- package/bundles/senior-gestao-relacionamento-angular-components.umd.min.js +2 -2
- package/bundles/senior-gestao-relacionamento-angular-components.umd.min.js.map +1 -1
- package/esm2015/senior-gestao-relacionamento-angular-components.js +4 -1
- package/esm2015/services/current-collaborator/current-collaborator.service.js +13 -26
- package/esm2015/services/current-collaborator/enums/index.js +2 -0
- package/esm2015/services/current-collaborator/enums/status-enum.js +6 -0
- package/esm2015/services/current-collaborator/index.js +2 -1
- package/esm2015/services/current-collaborator/models/branch-dto.js +1 -0
- package/esm2015/services/current-collaborator/models/branch.js +23 -0
- package/esm2015/services/current-collaborator/models/collaborator-branch-link-dto.js +1 -0
- package/esm2015/services/current-collaborator/models/collaborator-branch-link.js +23 -0
- package/esm2015/services/current-collaborator/models/collaborator-dto.js +1 -1
- package/esm2015/services/current-collaborator/models/collaborator.js +14 -27
- package/esm2015/services/current-collaborator/models/company-dto.js +1 -0
- package/esm2015/services/current-collaborator/models/company.js +16 -0
- package/esm2015/services/current-collaborator/models/index.js +6 -9
- package/esm2015/services/current-collaborator/models/job-title-dto.js +1 -0
- package/esm2015/services/current-collaborator/models/job-title.js +16 -0
- package/esm2015/services/index.js +2 -1
- package/esm2015/services/resolvers/access-validation.resolve.js +33 -0
- package/esm2015/services/resolvers/index.js +2 -0
- package/esm2015/services/standard-filters/standard-filters.service.js +6 -11
- package/esm5/senior-gestao-relacionamento-angular-components.js +4 -1
- package/esm5/services/current-collaborator/current-collaborator.service.js +14 -29
- package/esm5/services/current-collaborator/enums/index.js +2 -0
- package/esm5/services/current-collaborator/enums/status-enum.js +6 -0
- package/esm5/services/current-collaborator/index.js +2 -1
- package/esm5/services/current-collaborator/models/branch-dto.js +1 -0
- package/esm5/services/current-collaborator/models/branch.js +28 -0
- package/esm5/services/current-collaborator/models/collaborator-branch-link-dto.js +1 -0
- package/esm5/services/current-collaborator/models/collaborator-branch-link.js +28 -0
- package/esm5/services/current-collaborator/models/collaborator-dto.js +1 -1
- package/esm5/services/current-collaborator/models/collaborator.js +14 -27
- package/esm5/services/current-collaborator/models/company-dto.js +1 -0
- package/esm5/services/current-collaborator/models/company.js +21 -0
- package/esm5/services/current-collaborator/models/index.js +6 -9
- package/esm5/services/current-collaborator/models/job-title-dto.js +1 -0
- package/esm5/services/current-collaborator/models/job-title.js +21 -0
- package/esm5/services/index.js +2 -1
- package/esm5/services/resolvers/access-validation.resolve.js +35 -0
- package/esm5/services/resolvers/index.js +2 -0
- package/esm5/services/standard-filters/standard-filters.service.js +6 -11
- package/fesm2015/senior-gestao-relacionamento-angular-components.js +109 -189
- package/fesm2015/senior-gestao-relacionamento-angular-components.js.map +1 -1
- package/fesm5/senior-gestao-relacionamento-angular-components.js +125 -208
- package/fesm5/senior-gestao-relacionamento-angular-components.js.map +1 -1
- package/package.json +1 -1
- package/senior-gestao-relacionamento-angular-components.d.ts +3 -0
- package/senior-gestao-relacionamento-angular-components.metadata.json +1 -1
- package/services/current-collaborator/current-collaborator.service.d.ts +2 -4
- package/services/current-collaborator/enums/index.d.ts +1 -0
- package/services/current-collaborator/enums/status-enum.d.ts +4 -0
- package/services/current-collaborator/index.d.ts +1 -0
- package/services/current-collaborator/models/branch-dto.d.ts +7 -0
- package/services/current-collaborator/models/branch.d.ts +13 -0
- package/services/current-collaborator/models/collaborator-branch-link-dto.d.ts +4 -0
- package/services/current-collaborator/models/collaborator-branch-link.d.ts +9 -0
- package/services/current-collaborator/models/collaborator-dto.d.ts +5 -10
- package/services/current-collaborator/models/collaborator.d.ts +6 -13
- package/services/current-collaborator/models/company-dto.d.ts +6 -0
- package/services/current-collaborator/models/company.d.ts +11 -0
- package/services/current-collaborator/models/index.d.ts +10 -16
- package/services/current-collaborator/models/job-title-dto.d.ts +4 -0
- package/services/current-collaborator/models/job-title.d.ts +8 -0
- package/services/index.d.ts +1 -0
- package/services/resolvers/access-validation.resolve.d.ts +9 -0
- package/services/resolvers/index.d.ts +1 -0
- package/services/standard-filters/standard-filters.service.d.ts +0 -3
- package/esm2015/services/current-collaborator/models/collaborator-e-070-fil-crmx-dto.js +0 -1
- package/esm2015/services/current-collaborator/models/collaborator-e-070-fil-crmx.js +0 -38
- package/esm2015/services/current-collaborator/models/collaborator-squad-dto.js +0 -1
- package/esm2015/services/current-collaborator/models/collaborator-squad.js +0 -30
- package/esm2015/services/current-collaborator/models/e-070-emp-dto.js +0 -1
- package/esm2015/services/current-collaborator/models/e-070-emp.js +0 -16
- package/esm2015/services/current-collaborator/models/e-070-fil-crmx-dto.js +0 -1
- package/esm2015/services/current-collaborator/models/e-070-fil-crmx.js +0 -26
- package/esm2015/services/current-collaborator/models/e-070-fil-dto.js +0 -1
- package/esm2015/services/current-collaborator/models/e-070-fil.js +0 -23
- package/esm2015/services/current-collaborator/models/squad-dto.js +0 -1
- package/esm2015/services/current-collaborator/models/squad.js +0 -16
- package/esm2015/services/current-collaborator/models/user-dto.js +0 -1
- package/esm2015/services/current-collaborator/models/user.js +0 -19
- package/esm5/services/current-collaborator/models/collaborator-e-070-fil-crmx-dto.js +0 -1
- package/esm5/services/current-collaborator/models/collaborator-e-070-fil-crmx.js +0 -41
- package/esm5/services/current-collaborator/models/collaborator-squad-dto.js +0 -1
- package/esm5/services/current-collaborator/models/collaborator-squad.js +0 -35
- package/esm5/services/current-collaborator/models/e-070-emp-dto.js +0 -1
- package/esm5/services/current-collaborator/models/e-070-emp.js +0 -21
- package/esm5/services/current-collaborator/models/e-070-fil-crmx-dto.js +0 -1
- package/esm5/services/current-collaborator/models/e-070-fil-crmx.js +0 -29
- package/esm5/services/current-collaborator/models/e-070-fil-dto.js +0 -1
- package/esm5/services/current-collaborator/models/e-070-fil.js +0 -28
- package/esm5/services/current-collaborator/models/squad-dto.js +0 -1
- package/esm5/services/current-collaborator/models/squad.js +0 -21
- package/esm5/services/current-collaborator/models/user-dto.js +0 -1
- package/esm5/services/current-collaborator/models/user.js +0 -22
- package/services/current-collaborator/models/collaborator-e-070-fil-crmx-dto.d.ts +0 -11
- package/services/current-collaborator/models/collaborator-e-070-fil-crmx.d.ts +0 -17
- package/services/current-collaborator/models/collaborator-squad-dto.d.ts +0 -10
- package/services/current-collaborator/models/collaborator-squad.d.ts +0 -16
- package/services/current-collaborator/models/e-070-emp-dto.d.ts +0 -5
- package/services/current-collaborator/models/e-070-emp.d.ts +0 -9
- package/services/current-collaborator/models/e-070-fil-crmx-dto.d.ts +0 -6
- package/services/current-collaborator/models/e-070-fil-crmx.d.ts +0 -10
- package/services/current-collaborator/models/e-070-fil-dto.d.ts +0 -6
- package/services/current-collaborator/models/e-070-fil.d.ts +0 -11
- package/services/current-collaborator/models/squad-dto.d.ts +0 -9
- package/services/current-collaborator/models/squad.d.ts +0 -13
- package/services/current-collaborator/models/user-dto.d.ts +0 -9
- package/services/current-collaborator/models/user.d.ts +0 -13
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/forms'), require('@seniorsistemas/angular-components'), require('@ngx-translate/core'), require('rxjs'), require('@angular/common/http'), require('rxjs/operators'), require('primeng/api'), require('@angular/router'), require('@angular/common'), require('primeng/selectbutton'), require('primeng/dialog'), require('primeng/panel'), require('primeng/toast'), require('ngx-cookie-service'), require('@stomp/stompjs'), require('sockjs-client')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@senior-gestao-relacionamento/angular-components', ['exports', '@angular/core', '@angular/forms', '@seniorsistemas/angular-components', '@ngx-translate/core', 'rxjs', '@angular/common/http', 'rxjs/operators', 'primeng/api', '@angular/router', '@angular/common', 'primeng/selectbutton', 'primeng/dialog', 'primeng/panel', 'primeng/toast', 'ngx-cookie-service', '@stomp/stompjs', 'sockjs-client'], factory) :
|
|
4
|
-
(global = global || self, factory((global['senior-gestao-relacionamento'] = global['senior-gestao-relacionamento'] || {}, global['senior-gestao-relacionamento']['angular-components'] = {}), global.ng.core, global.ng.forms, global.angularComponents, global.core$1, global.rxjs, global.ng.common.http, global.rxjs.operators, global.api, global.ng.router, global.ng.common, global.selectbutton, global.dialog, global.panel, global.toast, global.ngxCookieService, global.stompjs, global.SockJS));
|
|
5
|
-
}(this, (function (exports, core, forms, angularComponents, core$1, rxjs, http, operators, api, router, common, selectbutton, dialog, panel, toast, ngxCookieService, stompjs, SockJS) { 'use strict';
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/forms'), require('@seniorsistemas/angular-components'), require('@ngx-translate/core'), require('rxjs'), require('@angular/common/http'), require('rxjs/operators'), require('primeng/api'), require('@angular/router'), require('@angular/common'), require('primeng/selectbutton'), require('primeng/dialog'), require('primeng/panel'), require('primeng/toast'), require('ngx-cookie-service'), require('@seniorsistemas/senior-platform-data'), require('@stomp/stompjs'), require('sockjs-client')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@senior-gestao-relacionamento/angular-components', ['exports', '@angular/core', '@angular/forms', '@seniorsistemas/angular-components', '@ngx-translate/core', 'rxjs', '@angular/common/http', 'rxjs/operators', 'primeng/api', '@angular/router', '@angular/common', 'primeng/selectbutton', 'primeng/dialog', 'primeng/panel', 'primeng/toast', 'ngx-cookie-service', '@seniorsistemas/senior-platform-data', '@stomp/stompjs', 'sockjs-client'], factory) :
|
|
4
|
+
(global = global || self, factory((global['senior-gestao-relacionamento'] = global['senior-gestao-relacionamento'] || {}, global['senior-gestao-relacionamento']['angular-components'] = {}), global.ng.core, global.ng.forms, global.angularComponents, global.core$1, global.rxjs, global.ng.common.http, global.rxjs.operators, global.api, global.ng.router, global.ng.common, global.selectbutton, global.dialog, global.panel, global.toast, global.ngxCookieService, global.seniorPlatformData, global.stompjs, global.SockJS));
|
|
5
|
+
}(this, (function (exports, core, forms, angularComponents, core$1, rxjs, http, operators, api, router, common, selectbutton, dialog, panel, toast, ngxCookieService, seniorPlatformData, stompjs, SockJS) { 'use strict';
|
|
6
6
|
|
|
7
7
|
/*! *****************************************************************************
|
|
8
8
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -606,6 +606,25 @@
|
|
|
606
606
|
"crmx.angular_components.refresh_websocket_alert_summary_default": "Atualização de dados"
|
|
607
607
|
};
|
|
608
608
|
|
|
609
|
+
var StringConverterService = /** @class */ (function () {
|
|
610
|
+
function StringConverterService() {
|
|
611
|
+
}
|
|
612
|
+
StringConverterService.toUnderscore = function (camelCase) {
|
|
613
|
+
var regex = /([a-z])([A-Z])/g;
|
|
614
|
+
return camelCase.replace(regex, '$1_$2').toLowerCase();
|
|
615
|
+
};
|
|
616
|
+
return StringConverterService;
|
|
617
|
+
}());
|
|
618
|
+
|
|
619
|
+
var ValueChangesService = /** @class */ (function () {
|
|
620
|
+
function ValueChangesService() {
|
|
621
|
+
}
|
|
622
|
+
ValueChangesService.pipeDefault = function (control) {
|
|
623
|
+
return control.valueChanges.pipe(operators.distinctUntilChanged());
|
|
624
|
+
};
|
|
625
|
+
return ValueChangesService;
|
|
626
|
+
}());
|
|
627
|
+
|
|
609
628
|
var numberTypes = [angularComponents.FieldType.Integer, angularComponents.FieldType.Double];
|
|
610
629
|
var numberPattern = /^\d+\b$/;
|
|
611
630
|
var mergeUnique = function (array, otherArray) { return array.concat(otherArray.filter(function (item) { return !array.includes(item); })); };
|
|
@@ -686,174 +705,88 @@
|
|
|
686
705
|
return payload;
|
|
687
706
|
};
|
|
688
707
|
|
|
689
|
-
var
|
|
690
|
-
function
|
|
691
|
-
this.blocked = false;
|
|
692
|
-
}
|
|
693
|
-
User.fromDto = function (userDto, originEntity) {
|
|
694
|
-
var model = __assign({}, userDto);
|
|
695
|
-
var lookupSeparator = ' - ';
|
|
696
|
-
var displayFields = ['username', 'fullName'];
|
|
697
|
-
model.label = getSuggestionValue(displayFields, 'user', { user: model }, lookupSeparator);
|
|
698
|
-
return model;
|
|
699
|
-
};
|
|
700
|
-
User.toDto = function (user, originEntity) {
|
|
701
|
-
var dto = __assign({}, user);
|
|
702
|
-
delete dto.label;
|
|
703
|
-
return dto;
|
|
704
|
-
};
|
|
705
|
-
return User;
|
|
706
|
-
}());
|
|
707
|
-
|
|
708
|
-
var E070Emp = /** @class */ (function () {
|
|
709
|
-
function E070Emp() {
|
|
710
|
-
}
|
|
711
|
-
E070Emp.fromDto = function (e070EmpDto, originEntity) {
|
|
712
|
-
var model = __assign({}, e070EmpDto);
|
|
713
|
-
var lookupSeparator = ' - ';
|
|
714
|
-
var displayFields = ['codEmp', 'nomEmp'];
|
|
715
|
-
model.label = getSuggestionValue(displayFields, 'e070Emp', { e070Emp: model }, lookupSeparator);
|
|
716
|
-
return model;
|
|
717
|
-
};
|
|
718
|
-
E070Emp.toDto = function (e070Emp, originEntity) {
|
|
719
|
-
var dto = __assign({}, e070Emp);
|
|
720
|
-
delete dto.label;
|
|
721
|
-
return dto;
|
|
722
|
-
};
|
|
723
|
-
return E070Emp;
|
|
724
|
-
}());
|
|
725
|
-
|
|
726
|
-
var E070Fil = /** @class */ (function () {
|
|
727
|
-
function E070Fil() {
|
|
708
|
+
var Company = /** @class */ (function () {
|
|
709
|
+
function Company() {
|
|
728
710
|
}
|
|
729
|
-
|
|
730
|
-
var model = __assign({},
|
|
711
|
+
Company.fromDto = function (companyDto, originEntity) {
|
|
712
|
+
var model = __assign({}, resolveRefs(companyDto));
|
|
731
713
|
var lookupSeparator = ' - ';
|
|
732
|
-
var displayFields = ['
|
|
733
|
-
model.label = getSuggestionValue(displayFields, '
|
|
734
|
-
if (originEntity !== 'E070Emp' && model.e070emp) {
|
|
735
|
-
model.e070emp = E070Emp.fromDto(model.e070emp, 'E070Fil');
|
|
736
|
-
}
|
|
737
|
-
return model;
|
|
738
|
-
};
|
|
739
|
-
E070Fil.toDto = function (e070Fil, originEntity) {
|
|
740
|
-
var dto = __assign({}, e070Fil);
|
|
741
|
-
delete dto.label;
|
|
742
|
-
if (originEntity !== 'E070Emp' && dto.e070emp) {
|
|
743
|
-
dto.e070emp = E070Emp.toDto(dto.e070emp, 'E070Fil');
|
|
744
|
-
}
|
|
745
|
-
return dto;
|
|
746
|
-
};
|
|
747
|
-
return E070Fil;
|
|
748
|
-
}());
|
|
749
|
-
|
|
750
|
-
var E070FilCrmx = /** @class */ (function () {
|
|
751
|
-
function E070FilCrmx() {
|
|
752
|
-
this.active = false;
|
|
753
|
-
}
|
|
754
|
-
E070FilCrmx.fromDto = function (e070FilCrmxDto, originEntity) {
|
|
755
|
-
var model = __assign({}, e070FilCrmxDto);
|
|
756
|
-
var lookupSeparator = ' - ';
|
|
757
|
-
var displayFields = ['e070fil.e070emp.codEmp', 'e070fil.e070emp.nomEmp', 'e070fil.codFil', 'e070fil.nomFil'];
|
|
758
|
-
model.label = getSuggestionValue(displayFields, 'e070FilCrmx', { e070FilCrmx: model }, lookupSeparator);
|
|
759
|
-
if (originEntity !== 'E070Fil' && model.e070fil) {
|
|
760
|
-
model.e070fil = E070Fil.fromDto(model.e070fil, 'E070FilCrmx');
|
|
761
|
-
}
|
|
714
|
+
var displayFields = ['code', 'name'];
|
|
715
|
+
model.label = getSuggestionValue(displayFields, 'company', { company: model }, lookupSeparator);
|
|
762
716
|
return model;
|
|
763
717
|
};
|
|
764
|
-
|
|
765
|
-
var dto = __assign({},
|
|
718
|
+
Company.toDto = function (company, originEntity) {
|
|
719
|
+
var dto = __assign({}, company);
|
|
766
720
|
delete dto.label;
|
|
767
|
-
if (originEntity !== 'E070Fil' && dto.e070fil) {
|
|
768
|
-
dto.e070fil = E070Fil.toDto(dto.e070fil, 'E070FilCrmx');
|
|
769
|
-
}
|
|
770
721
|
return dto;
|
|
771
722
|
};
|
|
772
|
-
return
|
|
723
|
+
return Company;
|
|
773
724
|
}());
|
|
774
725
|
|
|
775
|
-
var
|
|
776
|
-
function
|
|
777
|
-
this.master = false;
|
|
726
|
+
var Branch = /** @class */ (function () {
|
|
727
|
+
function Branch() {
|
|
778
728
|
}
|
|
779
|
-
|
|
780
|
-
var model = __assign({},
|
|
729
|
+
Branch.fromDto = function (branchDto, originEntity) {
|
|
730
|
+
var model = __assign({}, resolveRefs(branchDto));
|
|
781
731
|
var lookupSeparator = ' - ';
|
|
782
|
-
var displayFields = [
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
'e070filCrmx.e070fil.nomFil'
|
|
787
|
-
];
|
|
788
|
-
model.label = getSuggestionValue(displayFields, 'collaboratorE070FilCrmx', { collaboratorE070FilCrmx: model }, lookupSeparator);
|
|
789
|
-
if (originEntity !== 'Collaborator' && model.collaborator) {
|
|
790
|
-
model.collaborator = Collaborator.fromDto(model.collaborator, 'CollaboratorE070FilCrmx');
|
|
791
|
-
}
|
|
792
|
-
if (originEntity !== 'E070FilCrmx' && model.e070filCrmx) {
|
|
793
|
-
model.e070filCrmx = E070FilCrmx.fromDto(model.e070filCrmx, 'CollaboratorE070FilCrmx');
|
|
732
|
+
var displayFields = ['company.code', 'company.name', 'code', 'name'];
|
|
733
|
+
model.label = getSuggestionValue(displayFields, 'branch', { branch: model }, lookupSeparator);
|
|
734
|
+
if (originEntity !== 'Company' && model.company) {
|
|
735
|
+
model.company = Company.fromDto(model.company, 'Branch');
|
|
794
736
|
}
|
|
795
737
|
return model;
|
|
796
738
|
};
|
|
797
|
-
|
|
798
|
-
var dto = __assign({},
|
|
739
|
+
Branch.toDto = function (branch, originEntity) {
|
|
740
|
+
var dto = __assign({}, branch);
|
|
799
741
|
delete dto.label;
|
|
800
|
-
if (originEntity !== '
|
|
801
|
-
dto.
|
|
802
|
-
}
|
|
803
|
-
if (originEntity !== 'E070FilCrmx' && dto.e070filCrmx) {
|
|
804
|
-
dto.e070filCrmx = E070FilCrmx.toDto(dto.e070filCrmx, 'CollaboratorE070FilCrmx');
|
|
742
|
+
if (originEntity !== 'Company' && dto.company) {
|
|
743
|
+
dto.company = Company.toDto(dto.company, 'Branch');
|
|
805
744
|
}
|
|
806
745
|
return dto;
|
|
807
746
|
};
|
|
808
|
-
return
|
|
747
|
+
return Branch;
|
|
809
748
|
}());
|
|
810
749
|
|
|
811
|
-
var
|
|
812
|
-
function
|
|
750
|
+
var JobTitle = /** @class */ (function () {
|
|
751
|
+
function JobTitle() {
|
|
813
752
|
}
|
|
814
|
-
|
|
815
|
-
var model = __assign({},
|
|
753
|
+
JobTitle.fromDto = function (jobTitleDto, originEntity) {
|
|
754
|
+
var model = __assign({}, resolveRefs(jobTitleDto));
|
|
816
755
|
var lookupSeparator = ' - ';
|
|
817
756
|
var displayFields = ['name'];
|
|
818
|
-
model.label = getSuggestionValue(displayFields, '
|
|
757
|
+
model.label = getSuggestionValue(displayFields, 'jobTitle', { jobTitle: model }, lookupSeparator);
|
|
819
758
|
return model;
|
|
820
759
|
};
|
|
821
|
-
|
|
822
|
-
var dto = __assign({},
|
|
760
|
+
JobTitle.toDto = function (jobTitle, originEntity) {
|
|
761
|
+
var dto = __assign({}, jobTitle);
|
|
823
762
|
delete dto.label;
|
|
824
763
|
return dto;
|
|
825
764
|
};
|
|
826
|
-
return
|
|
765
|
+
return JobTitle;
|
|
827
766
|
}());
|
|
828
767
|
|
|
829
|
-
var
|
|
830
|
-
function
|
|
768
|
+
var CollaboratorBranchLink = /** @class */ (function () {
|
|
769
|
+
function CollaboratorBranchLink() {
|
|
831
770
|
}
|
|
832
|
-
|
|
833
|
-
var model = __assign({},
|
|
771
|
+
CollaboratorBranchLink.fromDto = function (collaboratorBranchLinkDto, originEntity) {
|
|
772
|
+
var model = __assign({}, resolveRefs(collaboratorBranchLinkDto));
|
|
834
773
|
var lookupSeparator = ' - ';
|
|
835
|
-
var displayFields = ['
|
|
836
|
-
model.label = getSuggestionValue(displayFields, '
|
|
837
|
-
if (originEntity !== '
|
|
838
|
-
model.
|
|
839
|
-
}
|
|
840
|
-
if (originEntity !== 'Squad' && model.squad) {
|
|
841
|
-
model.squad = Squad.fromDto(model.squad, 'CollaboratorSquad');
|
|
774
|
+
var displayFields = ['branch.company.code', 'branch.company.name', 'branch.code', 'branch.name'];
|
|
775
|
+
model.label = getSuggestionValue(displayFields, 'collaboratorBranchLink', { collaboratorBranchLink: model }, lookupSeparator);
|
|
776
|
+
if (originEntity !== 'Branch' && model.branch) {
|
|
777
|
+
model.branch = Branch.fromDto(model.branch, 'CollaboratorBranchLink');
|
|
842
778
|
}
|
|
843
779
|
return model;
|
|
844
780
|
};
|
|
845
|
-
|
|
846
|
-
var dto = __assign({},
|
|
781
|
+
CollaboratorBranchLink.toDto = function (collaboratorBranchLink, originEntity) {
|
|
782
|
+
var dto = __assign({}, collaboratorBranchLink);
|
|
847
783
|
delete dto.label;
|
|
848
|
-
if (originEntity !== '
|
|
849
|
-
dto.
|
|
850
|
-
}
|
|
851
|
-
if (originEntity !== 'Squad' && dto.squad) {
|
|
852
|
-
dto.squad = Squad.toDto(dto.squad, 'CollaboratorSquad');
|
|
784
|
+
if (originEntity !== 'Branch' && dto.branch) {
|
|
785
|
+
dto.branch = Branch.toDto(dto.branch, 'CollaboratorBranchLink');
|
|
853
786
|
}
|
|
854
787
|
return dto;
|
|
855
788
|
};
|
|
856
|
-
return
|
|
789
|
+
return CollaboratorBranchLink;
|
|
857
790
|
}());
|
|
858
791
|
|
|
859
792
|
var Collaborator = /** @class */ (function () {
|
|
@@ -862,45 +795,33 @@
|
|
|
862
795
|
this.visible = false;
|
|
863
796
|
}
|
|
864
797
|
Collaborator.fromDto = function (collaboratorDto, originEntity) {
|
|
865
|
-
var model = __assign({}, collaboratorDto);
|
|
798
|
+
var model = __assign({}, resolveRefs(collaboratorDto));
|
|
866
799
|
var lookupSeparator = ' - ';
|
|
867
|
-
var displayFields = ['
|
|
800
|
+
var displayFields = ['name'];
|
|
868
801
|
model.label = getSuggestionValue(displayFields, 'collaborator', { collaborator: model }, lookupSeparator);
|
|
869
|
-
if (originEntity !== '
|
|
870
|
-
model.
|
|
802
|
+
if (originEntity !== 'JobTitle' && model.jobTitle) {
|
|
803
|
+
model.jobTitle = JobTitle.fromDto(model.jobTitle, 'Collaborator');
|
|
871
804
|
}
|
|
872
805
|
if (originEntity !== 'Collaborator' && model.leader) {
|
|
873
806
|
model.leader = Collaborator.fromDto(model.leader, 'Collaborator');
|
|
874
807
|
}
|
|
875
|
-
if (originEntity !== '
|
|
876
|
-
model.branches = Object.values(model.branches).map(function (item) {
|
|
877
|
-
item = CollaboratorE070FilCrmx.fromDto(item, 'Collaborator');
|
|
878
|
-
item.collaborator = model;
|
|
879
|
-
return item;
|
|
880
|
-
});
|
|
881
|
-
}
|
|
882
|
-
if (originEntity !== 'CollaboratorSquad' && model.squads) {
|
|
883
|
-
model.squads = Object.values(model.squads).map(function (item) { return CollaboratorSquad.fromDto(item, 'Collaborator'); });
|
|
808
|
+
if (originEntity !== 'CollaboratorBranchLink' && model.branches) {
|
|
809
|
+
model.branches = Object.values(model.branches).map(function (item) { return CollaboratorBranchLink.fromDto(item, 'Collaborator'); });
|
|
884
810
|
}
|
|
885
811
|
return model;
|
|
886
812
|
};
|
|
887
813
|
Collaborator.toDto = function (collaborator, originEntity) {
|
|
888
814
|
var dto = __assign({}, collaborator);
|
|
889
815
|
delete dto.label;
|
|
890
|
-
if (originEntity !== '
|
|
891
|
-
dto.
|
|
816
|
+
if (originEntity !== 'JobTitle' && dto.jobTitle) {
|
|
817
|
+
dto.jobTitle = JobTitle.toDto(dto.jobTitle, 'Collaborator');
|
|
892
818
|
}
|
|
893
819
|
if (originEntity !== 'Collaborator' && dto.leader) {
|
|
894
820
|
dto.leader = Collaborator.toDto(dto.leader, 'Collaborator');
|
|
895
821
|
}
|
|
896
|
-
if (originEntity !== '
|
|
822
|
+
if (originEntity !== 'CollaboratorBranchLink' && dto.branches) {
|
|
897
823
|
dto.branches = Object.values(dto.branches)
|
|
898
|
-
.map(function (item) { return
|
|
899
|
-
.filter(function (item) { return Object.keys(item).length; });
|
|
900
|
-
}
|
|
901
|
-
if (originEntity !== 'CollaboratorSquad' && dto.squads) {
|
|
902
|
-
dto.squads = Object.values(dto.squads)
|
|
903
|
-
.map(function (item) { return CollaboratorSquad.toDto(item, 'Collaborator'); })
|
|
824
|
+
.map(function (item) { return CollaboratorBranchLink.toDto(item, 'Collaborator'); })
|
|
904
825
|
.filter(function (item) { return Object.keys(item).length; });
|
|
905
826
|
}
|
|
906
827
|
return dto;
|
|
@@ -970,29 +891,8 @@
|
|
|
970
891
|
this.ngUnsubscribe = new rxjs.Subject();
|
|
971
892
|
this.COLLABORATOR_KEY = 'CRMX_COLLABORATOR';
|
|
972
893
|
}
|
|
973
|
-
CurrentCollaboratorService.prototype.validate = function () {
|
|
974
|
-
var _this = this;
|
|
975
|
-
this.call(false).subscribe(function (collaborator) {
|
|
976
|
-
if (collaborator.active === false) {
|
|
977
|
-
_this.redirect('collaborator-inactive');
|
|
978
|
-
}
|
|
979
|
-
});
|
|
980
|
-
};
|
|
981
894
|
CurrentCollaboratorService.prototype.get = function () {
|
|
982
|
-
return this.call(
|
|
983
|
-
};
|
|
984
|
-
CurrentCollaboratorService.prototype.getE070FilCrmxMaster = function () {
|
|
985
|
-
var _this = this;
|
|
986
|
-
return new rxjs.Observable(function (observer) {
|
|
987
|
-
_this.call(true).subscribe(function (collaborator) {
|
|
988
|
-
var e070FilCrmxMaster = __assign({}, collaborator.branches.find(function (branch) { return branch.master; }));
|
|
989
|
-
if (e070FilCrmxMaster) {
|
|
990
|
-
e070FilCrmxMaster.collaborator = collaborator;
|
|
991
|
-
observer.next(e070FilCrmxMaster);
|
|
992
|
-
}
|
|
993
|
-
observer.complete();
|
|
994
|
-
});
|
|
995
|
-
});
|
|
895
|
+
return this.call(false);
|
|
996
896
|
};
|
|
997
897
|
CurrentCollaboratorService.prototype.call = function (useCache) {
|
|
998
898
|
var _this = this;
|
|
@@ -1000,10 +900,11 @@
|
|
|
1000
900
|
var collaboratorDto = _this.storageService.get(_this.COLLABORATOR_KEY);
|
|
1001
901
|
if (collaboratorDto !== null && useCache) {
|
|
1002
902
|
observer.next(Collaborator.fromDto(collaboratorDto));
|
|
903
|
+
observer.complete();
|
|
1003
904
|
}
|
|
1004
905
|
else {
|
|
1005
906
|
_this.http
|
|
1006
|
-
.get('
|
|
907
|
+
.get('crmx/collaborator/queries/getCurrentCollaborator')
|
|
1007
908
|
.pipe(operators.takeUntil(_this.ngUnsubscribe), operators.catchError(function (err) {
|
|
1008
909
|
var statusCode = 404;
|
|
1009
910
|
if (err.status === statusCode) {
|
|
@@ -1012,11 +913,16 @@
|
|
|
1012
913
|
throw err;
|
|
1013
914
|
}))
|
|
1014
915
|
.subscribe(function (collaboratorDto) {
|
|
1015
|
-
|
|
1016
|
-
|
|
916
|
+
if (collaboratorDto.active === false) {
|
|
917
|
+
_this.redirect('collaborator-inactive');
|
|
918
|
+
}
|
|
919
|
+
else {
|
|
920
|
+
_this.storageService.store(_this.COLLABORATOR_KEY, collaboratorDto);
|
|
921
|
+
observer.next(Collaborator.fromDto(collaboratorDto));
|
|
922
|
+
observer.complete();
|
|
923
|
+
}
|
|
1017
924
|
});
|
|
1018
925
|
}
|
|
1019
|
-
observer.complete();
|
|
1020
926
|
});
|
|
1021
927
|
};
|
|
1022
928
|
CurrentCollaboratorService.prototype.redirect = function (page) {
|
|
@@ -1064,6 +970,12 @@
|
|
|
1064
970
|
return CurrentCollaboratorModule;
|
|
1065
971
|
}());
|
|
1066
972
|
|
|
973
|
+
|
|
974
|
+
(function (StatusEnum) {
|
|
975
|
+
StatusEnum["ACTIVE"] = "ACTIVE";
|
|
976
|
+
StatusEnum["INACTIVE"] = "INACTIVE";
|
|
977
|
+
})(exports.StatusEnum || (exports.StatusEnum = {}));
|
|
978
|
+
|
|
1067
979
|
var Modulo = /** @class */ (function () {
|
|
1068
980
|
function Modulo() {
|
|
1069
981
|
}
|
|
@@ -1161,6 +1073,34 @@
|
|
|
1161
1073
|
return CurrentTenantModule;
|
|
1162
1074
|
}());
|
|
1163
1075
|
|
|
1076
|
+
var AccessValidationResolve = /** @class */ (function () {
|
|
1077
|
+
function AccessValidationResolve(currentCollaboratorService, currentTenantService) {
|
|
1078
|
+
this.currentCollaboratorService = currentCollaboratorService;
|
|
1079
|
+
this.currentTenantService = currentTenantService;
|
|
1080
|
+
}
|
|
1081
|
+
AccessValidationResolve.prototype.resolve = function () {
|
|
1082
|
+
var _this = this;
|
|
1083
|
+
return new rxjs.Observable(function (observer) {
|
|
1084
|
+
seniorPlatformData.user.getUserData().then(function (userData) {
|
|
1085
|
+
_this.currentTenantService.validate().subscribe(function () {
|
|
1086
|
+
_this.currentCollaboratorService.get().subscribe(function (collaborator) {
|
|
1087
|
+
observer.next(collaborator);
|
|
1088
|
+
observer.complete();
|
|
1089
|
+
});
|
|
1090
|
+
});
|
|
1091
|
+
});
|
|
1092
|
+
});
|
|
1093
|
+
};
|
|
1094
|
+
AccessValidationResolve.ctorParameters = function () { return [
|
|
1095
|
+
{ type: CurrentCollaboratorService },
|
|
1096
|
+
{ type: CurrentTenantService }
|
|
1097
|
+
]; };
|
|
1098
|
+
AccessValidationResolve = __decorate([
|
|
1099
|
+
core.Injectable()
|
|
1100
|
+
], AccessValidationResolve);
|
|
1101
|
+
return AccessValidationResolve;
|
|
1102
|
+
}());
|
|
1103
|
+
|
|
1164
1104
|
|
|
1165
1105
|
(function (MonthEnum) {
|
|
1166
1106
|
MonthEnum["JANUARY"] = "JANUARY";
|
|
@@ -1330,16 +1270,8 @@
|
|
|
1330
1270
|
var StandardFiltersService = /** @class */ (function () {
|
|
1331
1271
|
function StandardFiltersService() {
|
|
1332
1272
|
}
|
|
1333
|
-
StandardFiltersService.prototype.addFilterE070emp = function (filterQuery, alias, e070empList) {
|
|
1334
|
-
var ids = Array.from(new Set(e070empList.map(function (e070emp) { return e070emp.id; })));
|
|
1335
|
-
return this.addFilterIn(filterQuery, alias, 'id', ids);
|
|
1336
|
-
};
|
|
1337
|
-
StandardFiltersService.prototype.addFilterE070fil = function (filterQuery, alias, e070filList) {
|
|
1338
|
-
var ids = Array.from(new Set(e070filList.map(function (e070fil) { return e070fil.id; })));
|
|
1339
|
-
return this.addFilterIn(filterQuery, alias, 'id', ids);
|
|
1340
|
-
};
|
|
1341
1273
|
StandardFiltersService.prototype.addFilterActive = function (filterQuery, alias) {
|
|
1342
|
-
var filter = this.addAlias(alias,
|
|
1274
|
+
var filter = this.addAlias(alias, "status eq 'ACTIVE'");
|
|
1343
1275
|
return this.addFilter(filterQuery, filter);
|
|
1344
1276
|
};
|
|
1345
1277
|
StandardFiltersService.prototype.addFilter = function (filterQuery, filter) {
|
|
@@ -1348,7 +1280,10 @@
|
|
|
1348
1280
|
StandardFiltersService.prototype.addFilterIn = function (filterQuery, alias, field, values) {
|
|
1349
1281
|
var _this = this;
|
|
1350
1282
|
var filters = values.map(function (value) { return _this.addAlias(alias, field) + " eq '" + value + "'"; });
|
|
1351
|
-
|
|
1283
|
+
if (filters.length > 0) {
|
|
1284
|
+
return this.addFilter(filterQuery, "(" + filters.join(' or ') + ")");
|
|
1285
|
+
}
|
|
1286
|
+
return '';
|
|
1352
1287
|
};
|
|
1353
1288
|
StandardFiltersService.prototype.addAlias = function (alias, filter) {
|
|
1354
1289
|
return (alias ? alias + "." : '') + filter;
|
|
@@ -1602,38 +1537,19 @@
|
|
|
1602
1537
|
return WebsocketModule;
|
|
1603
1538
|
}());
|
|
1604
1539
|
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
}
|
|
1608
|
-
StringConverterService.toUnderscore = function (camelCase) {
|
|
1609
|
-
var regex = /([a-z])([A-Z])/g;
|
|
1610
|
-
return camelCase.replace(regex, '$1_$2').toLowerCase();
|
|
1611
|
-
};
|
|
1612
|
-
return StringConverterService;
|
|
1613
|
-
}());
|
|
1614
|
-
|
|
1615
|
-
var ValueChangesService = /** @class */ (function () {
|
|
1616
|
-
function ValueChangesService() {
|
|
1617
|
-
}
|
|
1618
|
-
ValueChangesService.pipeDefault = function (control) {
|
|
1619
|
-
return control.valueChanges.pipe(operators.distinctUntilChanged());
|
|
1620
|
-
};
|
|
1621
|
-
return ValueChangesService;
|
|
1622
|
-
}());
|
|
1623
|
-
|
|
1540
|
+
exports.AccessValidationResolve = AccessValidationResolve;
|
|
1541
|
+
exports.Branch = Branch;
|
|
1624
1542
|
exports.Collaborator = Collaborator;
|
|
1625
|
-
exports.
|
|
1626
|
-
exports.
|
|
1543
|
+
exports.CollaboratorBranchLink = CollaboratorBranchLink;
|
|
1544
|
+
exports.Company = Company;
|
|
1627
1545
|
exports.CurrentCollaboratorModule = CurrentCollaboratorModule;
|
|
1628
1546
|
exports.CurrentCollaboratorService = CurrentCollaboratorService;
|
|
1629
1547
|
exports.CurrentTenantModule = CurrentTenantModule;
|
|
1630
1548
|
exports.CurrentTenantService = CurrentTenantService;
|
|
1631
1549
|
exports.DateValidatorsService = DateValidatorsService;
|
|
1632
|
-
exports.E070Emp = E070Emp;
|
|
1633
|
-
exports.E070Fil = E070Fil;
|
|
1634
|
-
exports.E070FilCrmx = E070FilCrmx;
|
|
1635
1550
|
exports.Event = Event;
|
|
1636
1551
|
exports.FormGroupValidatorsService = FormGroupValidatorsService;
|
|
1552
|
+
exports.JobTitle = JobTitle;
|
|
1637
1553
|
exports.Modulo = Modulo;
|
|
1638
1554
|
exports.RefreshWebsocketAlertComponent = RefreshWebsocketAlertComponent;
|
|
1639
1555
|
exports.RefreshWebsocketAlertModule = RefreshWebsocketAlertModule;
|
|
@@ -1642,13 +1558,11 @@
|
|
|
1642
1558
|
exports.ReportsService = ReportsService;
|
|
1643
1559
|
exports.ScheduleFormRulesModule = ScheduleFormRulesModule;
|
|
1644
1560
|
exports.ScheduleFormRulesService = ScheduleFormRulesService;
|
|
1645
|
-
exports.Squad = Squad;
|
|
1646
1561
|
exports.StandardFiltersModule = StandardFiltersModule;
|
|
1647
1562
|
exports.StandardFiltersService = StandardFiltersService;
|
|
1648
1563
|
exports.StorageService = StorageService;
|
|
1649
1564
|
exports.StringConverterService = StringConverterService;
|
|
1650
1565
|
exports.Topic = Topic;
|
|
1651
|
-
exports.User = User;
|
|
1652
1566
|
exports.ValueChangesService = ValueChangesService;
|
|
1653
1567
|
exports.WebsocketModule = WebsocketModule;
|
|
1654
1568
|
exports.WebsocketService = WebsocketService;
|
|
@@ -1662,6 +1576,9 @@
|
|
|
1662
1576
|
exports.mergeUnique = mergeUnique;
|
|
1663
1577
|
exports.resolveRefs = resolveRefs;
|
|
1664
1578
|
exports.ɵa = StorageModule;
|
|
1579
|
+
exports.ɵb = StorageService;
|
|
1580
|
+
exports.ɵc = CurrentCollaboratorService;
|
|
1581
|
+
exports.ɵd = CurrentTenantService;
|
|
1665
1582
|
|
|
1666
1583
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
1667
1584
|
|