@seniorsistemas/exclusion-process-component 0.0.1-40efacd8-8a6c-4d38-8102-8c977c14410a → 0.6.0-44030ff3-2eeb-49f7-8927-0920cc01a805

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.
Files changed (213) hide show
  1. package/.editorconfig +19 -0
  2. package/.gitlab-ci.yml +74 -0
  3. package/.prettierrc +8 -0
  4. package/.senior-ci-extensions.sh +21 -0
  5. package/.vscode/settings.json +6 -0
  6. package/CHANGELOG.md +22 -0
  7. package/README.md +16 -0
  8. package/angular.json +144 -0
  9. package/archive.tar.gz +0 -0
  10. package/e2e/app.e2e-spec.ts +14 -0
  11. package/e2e/app.po.ts +11 -0
  12. package/e2e/tsconfig.e2e.json +14 -0
  13. package/karma.conf.js +53 -0
  14. package/lib/.browserslistrc +5 -0
  15. package/lib/package.json +19 -0
  16. package/{enums/enum-exclusion-process-status.d.ts → lib/src/enums/enum-exclusion-process-status.ts} +1 -1
  17. package/lib/src/exclusion-details/exclusion-details.component.html +84 -0
  18. package/lib/src/exclusion-details/exclusion-details.component.scss +47 -0
  19. package/lib/src/exclusion-details/exclusion-details.component.spec.ts +171 -0
  20. package/lib/src/exclusion-details/exclusion-details.component.ts +235 -0
  21. package/lib/src/exclusion-details/exclusion-details.module.ts +23 -0
  22. package/{exclusion-details/protocols/exclusion-details.d.ts → lib/src/exclusion-details/protocols/exclusion-details.ts} +1 -0
  23. package/{exclusion-details/protocols/show-details-information.d.ts → lib/src/exclusion-details/protocols/show-details-information.ts} +1 -1
  24. package/lib/src/exclusions-list/exclusions-list.component.html +157 -0
  25. package/lib/src/exclusions-list/exclusions-list.component.spec.ts +526 -0
  26. package/lib/src/exclusions-list/exclusions-list.component.ts +335 -0
  27. package/lib/src/exclusions-list/exclusions-list.module.ts +52 -0
  28. package/lib/src/exclusions-list/exclusions-list.routing.ts +89 -0
  29. package/{exclusions-list/index.d.ts → lib/src/exclusions-list/index.ts} +0 -1
  30. package/lib/src/logical-delete.module.ts +22 -0
  31. package/{models/exclusion-process-step-group.d.ts → lib/src/models/exclusion-process-step-group.ts} +1 -0
  32. package/{models/exclusion-process-step.d.ts → lib/src/models/exclusion-process-step.ts} +1 -0
  33. package/{models/exclusion-process.d.ts → lib/src/models/exclusion-process.ts} +1 -0
  34. package/{models/list-params.d.ts → lib/src/models/list-params.ts} +1 -0
  35. package/{models/project-config.d.ts → lib/src/models/project-config.ts} +3 -1
  36. package/{public-api.d.ts → lib/src/public-api.ts} +0 -1
  37. package/lib/src/services/filter.service.spec.ts +290 -0
  38. package/lib/src/services/filter.service.ts +109 -0
  39. package/lib/src/services/logical-delete-config.service.spec.ts +59 -0
  40. package/lib/src/services/logical-delete-config.service.ts +25 -0
  41. package/lib/src/services/logical-delete.service.spec.ts +322 -0
  42. package/lib/src/services/logical-delete.service.ts +122 -0
  43. package/lib/test.ts +14 -0
  44. package/lib/tsconfig.lib.json +19 -0
  45. package/lib/tsconfig.lib.prod.json +6 -0
  46. package/lib/tsconfig.spec.json +12 -0
  47. package/lib/tslint.json +19 -0
  48. package/package.json +59 -18
  49. package/protractor.conf.js +28 -0
  50. package/senior-ci/.devcontainer/Dockerfile +27 -0
  51. package/senior-ci/.devcontainer/devcontainer.json +71 -0
  52. package/senior-ci/.editorconfig +14 -0
  53. package/senior-ci/.gitattributes +5 -0
  54. package/senior-ci/.gitlab-ci.yml +53 -0
  55. package/senior-ci/.pylintrc +562 -0
  56. package/senior-ci/.vscode/launch.json +102 -0
  57. package/senior-ci/CHANGELOG.md +1564 -0
  58. package/senior-ci/CONTRIBUTING.md +31 -0
  59. package/senior-ci/README.md +26 -0
  60. package/senior-ci/ci/ci.sh +74 -0
  61. package/senior-ci/ci/sonar_scanner.py +48 -0
  62. package/senior-ci/common/__init__.py +250 -0
  63. package/senior-ci/common/default-files/pom.xml +10 -0
  64. package/senior-ci/common/docker-helpers.sh +57 -0
  65. package/senior-ci/common/extensions.py +88 -0
  66. package/senior-ci/common/flutter-helpers.sh +3 -0
  67. package/senior-ci/common/getopt_helper.py +168 -0
  68. package/senior-ci/common/graphql_client.py +40 -0
  69. package/senior-ci/common/helm_helpers.py +40 -0
  70. package/senior-ci/common/notification-helpers.sh +15 -0
  71. package/senior-ci/common/npm-helper.sh +4 -0
  72. package/senior-ci/common/parallel-helper.sh +8 -0
  73. package/senior-ci/common/release-helpers.sh +196 -0
  74. package/senior-ci/common/s3cache-helpers.sh +47 -0
  75. package/senior-ci/common/senior-ci-extensions-helpers.sh +15 -0
  76. package/senior-ci/common/sonar_helper.py +203 -0
  77. package/senior-ci/common/validations/buildable_project.py +61 -0
  78. package/senior-ci/common/validations/check_deprecated_primitives.py +49 -0
  79. package/senior-ci/common/validations/check_project_path.py +40 -0
  80. package/senior-ci/common/validations/check_sonar_config_files.py +41 -0
  81. package/senior-ci/common/validations/check_tags.py +41 -0
  82. package/senior-ci/common/validations/validate_changelog.py +151 -0
  83. package/senior-ci/common/validations/validate_issues.py +320 -0
  84. package/senior-ci/docker/build.sh +18 -0
  85. package/senior-ci/docker/config-host.sh +29 -0
  86. package/senior-ci/docker/deploy-service.sh +79 -0
  87. package/senior-ci/docker/push.sh +22 -0
  88. package/senior-ci/frontend/npm/bibliotecas/ci.sh +149 -0
  89. package/senior-ci/frontend/npm/ci.sh +370 -0
  90. package/senior-ci/frontend/npm/release-translations.sh +164 -0
  91. package/senior-ci/helm/deploy.py +56 -0
  92. package/senior-ci/helm/publish.py +41 -0
  93. package/senior-ci/hook/release_notification.sh +88 -0
  94. package/senior-ci/hook/text_notification.sh +10 -0
  95. package/senior-ci/java/bibliotecas/ci.sh +215 -0
  96. package/senior-ci/java/sdl/ci.sh +372 -0
  97. package/senior-ci/java/sdl/scripts/hotfix.sh +78 -0
  98. package/senior-ci/mobile/flutter/apps/__main__.py +5 -0
  99. package/senior-ci/mobile/flutter/apps/ci.py +193 -0
  100. package/senior-ci/mobile/flutter/libs/__main__.py +5 -0
  101. package/senior-ci/mobile/flutter/libs/ci.py +178 -0
  102. package/senior-ci/mobile/flutter/scripts/release.sh +54 -0
  103. package/senior-ci/release-candidate/backend/get_version.sh +64 -0
  104. package/senior-ci/release-candidate/close_branch.sh +113 -0
  105. package/senior-ci/release-candidate/common/create_hotfix.sh +28 -0
  106. package/senior-ci/release-candidate/common/create_release.sh +30 -0
  107. package/senior-ci/release-candidate/create_branch.sh +64 -0
  108. package/senior-ci/release-candidate/frontend/get_version.sh +43 -0
  109. package/senior-ci/requirements-dev.txt +5 -0
  110. package/senior-ci/requirements.txt +5 -0
  111. package/senior-ci/scripts/apply_yamls.py +229 -0
  112. package/senior-ci/scripts/create_sre_issue/__main__.py +7 -0
  113. package/senior-ci/scripts/create_sre_issue/create_sre_issue.py +267 -0
  114. package/senior-ci/scripts/create_sre_issue/helpers.py +166 -0
  115. package/senior-ci/scripts/create_sre_issue/jira_manager.py +37 -0
  116. package/senior-ci/scripts/validate_changelog.sh +3 -0
  117. package/senior-ci/sonar-project.properties +1 -0
  118. package/server.js +5 -0
  119. package/sonar-project.properties +10 -0
  120. package/src/app/app.component.html +43 -0
  121. package/src/app/app.component.scss +36 -0
  122. package/src/app/app.component.ts +56 -0
  123. package/src/app/app.module.ts +64 -0
  124. package/src/app/shared/shared.module.ts +28 -0
  125. package/src/environments/environment.default.ts +3 -0
  126. package/src/environments/environment.prod.ts +6 -0
  127. package/src/environments/environment.ts +7 -0
  128. package/src/favicon.ico +0 -0
  129. package/src/index.html +17 -0
  130. package/src/locale/en-US.json +3 -0
  131. package/src/locale/es-ES.json +3 -0
  132. package/src/locale/pt-BR.json +3 -0
  133. package/src/main.ts +13 -0
  134. package/src/polyfills.ts +58 -0
  135. package/src/styles.scss +11 -0
  136. package/src/tsconfig.app.json +21 -0
  137. package/src/typings.d.ts +15 -0
  138. package/tsconfig.json +39 -0
  139. package/tslint.json +80 -0
  140. package/bundles/seniorsistemas-exclusion-process-component.umd.js +0 -1205
  141. package/bundles/seniorsistemas-exclusion-process-component.umd.js.map +0 -1
  142. package/bundles/seniorsistemas-exclusion-process-component.umd.min.js +0 -16
  143. package/bundles/seniorsistemas-exclusion-process-component.umd.min.js.map +0 -1
  144. package/esm2015/enums/enum-exclusion-process-status.js +0 -8
  145. package/esm2015/exclusion-details/exclusion-details.component.js +0 -216
  146. package/esm2015/exclusion-details/exclusion-details.module.js +0 -28
  147. package/esm2015/exclusion-details/index.js +0 -3
  148. package/esm2015/exclusion-details/protocols/exclusion-details.js +0 -1
  149. package/esm2015/exclusion-details/protocols/index.js +0 -2
  150. package/esm2015/exclusion-details/protocols/show-details-information.js +0 -3
  151. package/esm2015/exclusions-list/exclusions-list.component.js +0 -299
  152. package/esm2015/exclusions-list/exclusions-list.module.js +0 -47
  153. package/esm2015/exclusions-list/exclusions-list.routing.js +0 -115
  154. package/esm2015/exclusions-list/index.js +0 -4
  155. package/esm2015/logical-delete.module.js +0 -27
  156. package/esm2015/models/exclusion-process-step-group.js +0 -1
  157. package/esm2015/models/exclusion-process-step.js +0 -1
  158. package/esm2015/models/exclusion-process.js +0 -1
  159. package/esm2015/models/index.js +0 -1
  160. package/esm2015/models/list-params.js +0 -1
  161. package/esm2015/models/list-result.js +0 -1
  162. package/esm2015/models/project-config.js +0 -3
  163. package/esm2015/public-api.js +0 -4
  164. package/esm2015/seniorsistemas-exclusion-process-component.js +0 -11
  165. package/esm2015/services/filter.service.js +0 -104
  166. package/esm2015/services/index.js +0 -2
  167. package/esm2015/services/logical-delete-config.service.js +0 -29
  168. package/esm2015/services/logical-delete.service.js +0 -109
  169. package/esm5/enums/enum-exclusion-process-status.js +0 -8
  170. package/esm5/exclusion-details/exclusion-details.component.js +0 -235
  171. package/esm5/exclusion-details/exclusion-details.module.js +0 -31
  172. package/esm5/exclusion-details/index.js +0 -3
  173. package/esm5/exclusion-details/protocols/exclusion-details.js +0 -1
  174. package/esm5/exclusion-details/protocols/index.js +0 -2
  175. package/esm5/exclusion-details/protocols/show-details-information.js +0 -7
  176. package/esm5/exclusions-list/exclusions-list.component.js +0 -313
  177. package/esm5/exclusions-list/exclusions-list.module.js +0 -50
  178. package/esm5/exclusions-list/exclusions-list.routing.js +0 -127
  179. package/esm5/exclusions-list/index.js +0 -4
  180. package/esm5/logical-delete.module.js +0 -31
  181. package/esm5/models/exclusion-process-step-group.js +0 -1
  182. package/esm5/models/exclusion-process-step.js +0 -1
  183. package/esm5/models/exclusion-process.js +0 -1
  184. package/esm5/models/index.js +0 -1
  185. package/esm5/models/list-params.js +0 -1
  186. package/esm5/models/list-result.js +0 -1
  187. package/esm5/models/project-config.js +0 -3
  188. package/esm5/public-api.js +0 -4
  189. package/esm5/seniorsistemas-exclusion-process-component.js +0 -11
  190. package/esm5/services/filter.service.js +0 -109
  191. package/esm5/services/index.js +0 -2
  192. package/esm5/services/logical-delete-config.service.js +0 -30
  193. package/esm5/services/logical-delete.service.js +0 -112
  194. package/exclusion-details/exclusion-details.component.d.ts +0 -49
  195. package/exclusion-details/exclusion-details.module.d.ts +0 -2
  196. package/exclusions-list/exclusions-list.component.d.ts +0 -59
  197. package/exclusions-list/exclusions-list.module.d.ts +0 -2
  198. package/exclusions-list/exclusions-list.routing.d.ts +0 -29
  199. package/fesm2015/seniorsistemas-exclusion-process-component.js +0 -917
  200. package/fesm2015/seniorsistemas-exclusion-process-component.js.map +0 -1
  201. package/fesm5/seniorsistemas-exclusion-process-component.js +0 -981
  202. package/fesm5/seniorsistemas-exclusion-process-component.js.map +0 -1
  203. package/logical-delete.module.d.ts +0 -5
  204. package/seniorsistemas-exclusion-process-component.d.ts +0 -10
  205. package/seniorsistemas-exclusion-process-component.metadata.json +0 -1
  206. package/services/filter.service.d.ts +0 -19
  207. package/services/logical-delete-config.service.d.ts +0 -8
  208. package/services/logical-delete.service.d.ts +0 -20
  209. /package/{exclusion-details/index.d.ts → lib/src/exclusion-details/index.ts} +0 -0
  210. /package/{exclusion-details/protocols/index.d.ts → lib/src/exclusion-details/protocols/index.ts} +0 -0
  211. /package/{models/index.d.ts → lib/src/models/index.ts} +0 -0
  212. /package/{models/list-result.d.ts → lib/src/models/list-result.ts} +0 -0
  213. /package/{services/index.d.ts → lib/src/services/index.ts} +0 -0
@@ -1,917 +0,0 @@
1
- import { __decorate, __param } from 'tslib';
2
- import { CommonModule } from '@angular/common';
3
- import { InjectionToken, Inject, Injectable, Output, Component, ViewEncapsulation, NgModule, ChangeDetectorRef, ViewChild } from '@angular/core';
4
- import { PanelModule } from 'primeng/panel';
5
- import { TableModule } from 'primeng/table';
6
- import { EnumColumnFieldType, EnumBadgeColors, SidebarModule, ButtonModule, TableModule as TableModule$1, LoadingStateModule, LocaleModule, FieldType, FormField, LocaleService, ControlErrorsModule, InfoSignModule, EmptyStateModule, DynamicFormModule, TokenListModule } from '@seniorsistemas/angular-components';
7
- import * as moment from 'moment';
8
- import { Router, ActivatedRoute, RouterModule } from '@angular/router';
9
- import { throwError, Subject } from 'rxjs';
10
- import { catchError, map, takeUntil, finalize } from 'rxjs/operators';
11
- import { HttpParams, HttpClient } from '@angular/common/http';
12
- import { TranslateService, TranslateModule } from '@ngx-translate/core';
13
- import { MessageService } from 'primeng/api';
14
- import { Validators, FormBuilder, FormsModule, ReactiveFormsModule } from '@angular/forms';
15
- import { DialogModule } from 'primeng/dialog';
16
- import { ConfirmDialogModule } from 'primeng/confirmdialog';
17
- import { InputTextModule } from 'primeng/inputtext';
18
- import { PermissionsService } from '@seniorsistemas/platform-components';
19
-
20
- var EnumExclusionProcessStatus;
21
- (function (EnumExclusionProcessStatus) {
22
- EnumExclusionProcessStatus["PENDING"] = "PENDING";
23
- EnumExclusionProcessStatus["PROCESSING"] = "PROCESSING";
24
- EnumExclusionProcessStatus["ERROR"] = "ERROR";
25
- EnumExclusionProcessStatus["SUCCESS"] = "SUCCESS";
26
- })(EnumExclusionProcessStatus || (EnumExclusionProcessStatus = {}));
27
-
28
- const ProjectConfigsInjectionToken = new InjectionToken("projectConfigs");
29
-
30
- let LogicalDeleteConfigService = class LogicalDeleteConfigService {
31
- constructor(projectConfigs) {
32
- this.projectConfigs = projectConfigs;
33
- }
34
- getDomain() {
35
- return this.projectConfigs.domain;
36
- }
37
- getService() {
38
- return this.projectConfigs.service;
39
- }
40
- getTranslationPrefix() {
41
- if (this.projectConfigs.translationPrefix) {
42
- return this.projectConfigs.translationPrefix;
43
- }
44
- return `${this.projectConfigs.domain}.${this.projectConfigs.service}`;
45
- }
46
- };
47
- LogicalDeleteConfigService.ctorParameters = () => [
48
- { type: undefined, decorators: [{ type: Inject, args: [ProjectConfigsInjectionToken,] }] }
49
- ];
50
- LogicalDeleteConfigService = __decorate([
51
- Injectable(),
52
- __param(0, Inject(ProjectConfigsInjectionToken))
53
- ], LogicalDeleteConfigService);
54
-
55
- let LogicalDeleteService = class LogicalDeleteService {
56
- constructor(http, messageService, translate, projectConfigs) {
57
- this.http = http;
58
- this.messageService = messageService;
59
- this.translate = translate;
60
- this.projectConfigs = projectConfigs;
61
- const entityUrl = `${projectConfigs.getDomain()}/${projectConfigs.getService()}`;
62
- this.exclusionProcessUrl = `${entityUrl}/entities/exclusionProcess`;
63
- this.listExclusionsUrl = `${entityUrl}/entities/exclusionProcess`;
64
- this.defaultCatch = this.defaultCatch.bind(this);
65
- }
66
- defaultCatch() {
67
- return catchError((err) => {
68
- if (err) {
69
- let summary = err.status ? String(err.status) : "Error";
70
- let detail = (err.error && err.error.message) || err.statusText || err.message || "Error";
71
- if (err.status === 401) {
72
- const prefix = this.projectConfigs.getTranslationPrefix();
73
- summary = this.translate.instant(`${prefix}.error_unauthorized_title`);
74
- detail = this.translate.instant(`${prefix}.error_unauthorized_description`);
75
- }
76
- this.messageService.add({
77
- severity: "error",
78
- summary,
79
- detail
80
- });
81
- }
82
- return throwError(err);
83
- });
84
- }
85
- getListQueryParams(listParams) {
86
- const { page = 0, size = 10, sort = [], filterQuery = "", displayFields = [] } = listParams;
87
- let params = new HttpParams();
88
- params = params.append("size", String(size));
89
- params = params.append("offset", String(page));
90
- if (sort && sort.length) {
91
- params = params.append("orderby", sort
92
- .map(s => {
93
- if (s.order === -1) {
94
- return `${s.field} desc`;
95
- }
96
- return `${s.field} asc`;
97
- })
98
- .join(", "));
99
- }
100
- if (filterQuery) {
101
- params = params.append("filter", filterQuery);
102
- }
103
- if (displayFields && displayFields.length) {
104
- params = params.append("displayfields", displayFields.join());
105
- }
106
- return params;
107
- }
108
- getProcessDetails(recordId) {
109
- const filterParams = {
110
- filter: `recordId eq '${recordId}'`
111
- };
112
- return this.http.get(this.exclusionProcessUrl, { params: filterParams })
113
- .pipe(this.defaultCatch())
114
- .pipe(map(value => {
115
- var _a;
116
- if (!((_a = value.contents) === null || _a === void 0 ? void 0 : _a.length)) {
117
- return null;
118
- }
119
- return value.contents[0];
120
- }));
121
- }
122
- listExclusions(entityName, params = {}) {
123
- if (params.filterQuery) {
124
- params.filterQuery += ` and lower(entityName) eq lower('${entityName}')`;
125
- }
126
- else {
127
- params.filterQuery = `lower(entityName) eq lower('${entityName}')`;
128
- }
129
- return this.http.get(this.exclusionProcessUrl, { params: this.getListQueryParams(params) })
130
- .pipe(this.defaultCatch())
131
- .pipe(map(value => {
132
- value.contents.forEach(p => {
133
- if (p.startDate) {
134
- p.startDate = moment(p.startDate).toDate();
135
- }
136
- if (p.finishDate) {
137
- p.finishDate = moment(p.finishDate).toDate();
138
- }
139
- });
140
- return value;
141
- }));
142
- }
143
- };
144
- LogicalDeleteService.ctorParameters = () => [
145
- { type: HttpClient },
146
- { type: MessageService },
147
- { type: TranslateService },
148
- { type: LogicalDeleteConfigService }
149
- ];
150
- LogicalDeleteService = __decorate([
151
- Injectable()
152
- ], LogicalDeleteService);
153
-
154
- let ExclusionDetailsComponent = class ExclusionDetailsComponent {
155
- constructor(router, route, translate, logicalDeleteService, projectConfigs) {
156
- this.router = router;
157
- this.route = route;
158
- this.translate = translate;
159
- this.logicalDeleteService = logicalDeleteService;
160
- this.projectConfigs = projectConfigs;
161
- this._entityName = "";
162
- this._isVisible = false;
163
- this._isLoading = false;
164
- this._processSummaryData = [];
165
- this._processSummaryColumns = [];
166
- this.ngUnsubscribe = new Subject();
167
- }
168
- get isVisible() {
169
- return this._isVisible;
170
- }
171
- get isLoading() {
172
- return this._isLoading;
173
- }
174
- get processSummaryData() {
175
- return this._processSummaryData;
176
- }
177
- get processSummaryColumns() {
178
- return this._processSummaryColumns;
179
- }
180
- ngOnInit() {
181
- this.route.data
182
- .pipe(takeUntil(this.ngUnsubscribe))
183
- .subscribe((data) => {
184
- this.locale = data.localeConfig;
185
- });
186
- this._processSummaryColumns = this.getSummaryColumns();
187
- }
188
- ngOnDestroy() {
189
- this.ngUnsubscribe.next();
190
- this.ngUnsubscribe.complete();
191
- }
192
- showDetails(details) {
193
- this.processDetails = null;
194
- this._entityName = details.entityName;
195
- this._isVisible = true;
196
- this.entityDescription = details.entityDescription;
197
- this.loadProcessDetails(details.recordId);
198
- }
199
- closeDetails() {
200
- this._isVisible = false;
201
- }
202
- openExclusions() {
203
- this.closeDetails();
204
- this.router.navigate(["exclusions-list", this._entityName], {
205
- queryParams: {
206
- entityDescription: this.entityDescription
207
- }
208
- });
209
- }
210
- getRecordDescription() {
211
- var _a;
212
- if (!((_a = this.processDetails) === null || _a === void 0 ? void 0 : _a.description)) {
213
- return "";
214
- }
215
- return this.processDetails.description;
216
- }
217
- getInicialDate() {
218
- var _a;
219
- if (!((_a = this.processDetails) === null || _a === void 0 ? void 0 : _a.startDate)) {
220
- return "";
221
- }
222
- return moment(this.processDetails.startDate).format("DD/MM/YYYY HH:mm");
223
- }
224
- getFinishDate() {
225
- var _a;
226
- if (!((_a = this.processDetails) === null || _a === void 0 ? void 0 : _a.finishDate)) {
227
- return "";
228
- }
229
- return moment(this.processDetails.finishDate).format("DD/MM/YYYY HH:mm");
230
- }
231
- isFinished() {
232
- var _a;
233
- return !!((_a = this.processDetails) === null || _a === void 0 ? void 0 : _a.finishDate);
234
- }
235
- getShowExclusionsButtonLabel() {
236
- return this.translate.instant(`${this.projectConfigs.getTranslationPrefix()}.logical_delete_show_deletions`);
237
- }
238
- getCloseButtonLabel() {
239
- return this.translate.instant(`${this.projectConfigs.getTranslationPrefix()}.logical_delete_close`);
240
- }
241
- getSummaryLabel() {
242
- return this.translate.instant(`${this.projectConfigs.getTranslationPrefix()}.logical_delete_summary`);
243
- }
244
- getStartDateLabel() {
245
- return this.translate.instant(`${this.projectConfigs.getTranslationPrefix()}.logical_delete_start`);
246
- }
247
- getFinishDateLabel() {
248
- return this.translate.instant(`${this.projectConfigs.getTranslationPrefix()}.logical_delete_finish`);
249
- }
250
- getSidebarTitle() {
251
- return this.translate.instant(`${this.projectConfigs.getTranslationPrefix()}.logical_delete_details_title`);
252
- }
253
- getSummaryColumns() {
254
- return [
255
- {
256
- field: "description",
257
- attributes: ["description"],
258
- header: this.translate.instant(`${this.projectConfigs.getTranslationPrefix()}.logical_delete_description`),
259
- type: EnumColumnFieldType.STRING,
260
- style: {
261
- width: "300px"
262
- }
263
- },
264
- {
265
- field: "status",
266
- attributes: ["status"],
267
- header: this.translate.instant(`${this.projectConfigs.getTranslationPrefix()}.logical_delete_status`),
268
- type: EnumColumnFieldType.ENUM,
269
- enumPrefix: `${this.projectConfigs.getTranslationPrefix()}.logical_delete_enum_exclusion_process_status_`,
270
- style: {
271
- width: "100px"
272
- },
273
- tooltip: this.getColumnStatusTooltip,
274
- badgeConfigs: [
275
- {
276
- enumValue: EnumExclusionProcessStatus.ERROR,
277
- color: EnumBadgeColors.RED
278
- },
279
- {
280
- enumValue: EnumExclusionProcessStatus.PENDING,
281
- color: EnumBadgeColors.YELLOW
282
- },
283
- {
284
- enumValue: EnumExclusionProcessStatus.PROCESSING,
285
- color: EnumBadgeColors.BLUE
286
- },
287
- {
288
- enumValue: EnumExclusionProcessStatus.SUCCESS,
289
- color: EnumBadgeColors.GREEN
290
- }
291
- ]
292
- }
293
- ];
294
- }
295
- getColumnStatusTooltip(rowValue) {
296
- if (rowValue.errorMessage) {
297
- return rowValue.errorMessage;
298
- }
299
- return null;
300
- }
301
- loadProcessDetails(recordId) {
302
- this._isLoading = true;
303
- this.logicalDeleteService.getProcessDetails(recordId)
304
- .pipe(takeUntil(this.ngUnsubscribe))
305
- .pipe(finalize(() => this._isLoading = false))
306
- .subscribe((process) => {
307
- this.processDetails = process;
308
- this.loadProcessSummary(process);
309
- });
310
- }
311
- loadProcessSummary(process) {
312
- const stepLogs = [];
313
- process.groups.forEach(group => {
314
- const steps = group.steps.map(step => ({
315
- description: step.description,
316
- status: step.status,
317
- errorMessage: step.errorMessage
318
- }));
319
- stepLogs.push(...steps);
320
- });
321
- this._processSummaryData = stepLogs;
322
- }
323
- };
324
- ExclusionDetailsComponent.ctorParameters = () => [
325
- { type: Router },
326
- { type: ActivatedRoute },
327
- { type: TranslateService },
328
- { type: LogicalDeleteService },
329
- { type: LogicalDeleteConfigService }
330
- ];
331
- __decorate([
332
- Output()
333
- ], ExclusionDetailsComponent.prototype, "isVisible", null);
334
- __decorate([
335
- Output()
336
- ], ExclusionDetailsComponent.prototype, "isLoading", null);
337
- __decorate([
338
- Output()
339
- ], ExclusionDetailsComponent.prototype, "processSummaryData", null);
340
- __decorate([
341
- Output()
342
- ], ExclusionDetailsComponent.prototype, "processSummaryColumns", null);
343
- __decorate([
344
- Output()
345
- ], ExclusionDetailsComponent.prototype, "processDetails", void 0);
346
- __decorate([
347
- Output()
348
- ], ExclusionDetailsComponent.prototype, "entityDescription", void 0);
349
- ExclusionDetailsComponent = __decorate([
350
- Component({
351
- selector: "s-exclusion-details",
352
- template: "<s-sidebar [visible]=\"isVisible\" (visibleChange)=\"closeDetails()\" [header]=\"getSidebarTitle()\">\n <s-loading-state [loading]=\"isLoading\">\n <p-panel [showHeader]=\"false\" styleClass=\"s-exclusion-details-record-details-panel\">\n <div class=\"s-exclusion-details-record-details-container\">\n <div class=\"s-exclusion-details-record-icon-background\">\n <i class=\"far fa-file-alt s-exclusion-details-record-icon\"></i>\n </div>\n\n <div class=\"s-exclusion-details-record-details-recordinfo\">\n <span class=\"s-exclusion-details-record-details-type\">\n {{entityDescription}}\n </span>\n <span>\n {{getRecordDescription()}}\n </span>\n </div>\n\n <div class=\"s-exclusion-details-record-details-dateinfo\">\n <span>\n {{getStartDateLabel()}}: {{getInicialDate()}}\n </span>\n <span *ngIf=\"isFinished()\">\n {{getFinishDateLabel()}}: {{getFinishDate()}}\n </span>\n </div>\n </div>\n </p-panel>\n\n <p-panel>\n <p-header>\n {{getSummaryLabel()}}\n </p-header>\n <p-table\n [value]=\"processSummaryData\"\n [columns]=\"processSummaryColumns\"\n dataKey=\"id\"\n [lazy]=\"false\"\n [scrollable]=\"false\"\n [paginator]=\"false\">\n\n <ng-template pTemplate=\"colgroup\" let-columns>\n <colgroup>\n <col *ngFor=\"let col of columns\"\n [style.width]=\"col.width\"\n />\n </colgroup>\n </ng-template>\n\n <ng-template pTemplate=\"header\" let-columns>\n <tr>\n <th *ngFor=\"let col of columns\"\n [id]=\"col.field\"\n [ngStyle]=\"col.style\" \n [pSortableColumn]=\"col.field\">\n <div class=\"senior-header\">\n <span class=\"senior-header-title\">{{ col.header }}</span>\n <p-sortIcon [field]=\"col.field\" ></p-sortIcon>\n </div>\n </th>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"body\" let-rowData let-columns=\"columns\">\n <tr>\n <s-table-columns\n [columns]=\"columns\"\n [rowValue]=\"rowData\"\n [locale]=\"locale\">\n </s-table-columns>\n </tr>\n </ng-template>\n </p-table>\n </p-panel>\n </s-loading-state>\n\n <s-footer>\n <div class=\"ui-fluid\">\n <div class=\"ui-g\">\n <s-button [label]=\"getShowExclusionsButtonLabel()\" (onClick)=\"openExclusions()\"></s-button>\n <s-button [label]=\"getCloseButtonLabel()\" priority=\"link\" (onClick)=\"closeDetails()\"></s-button>\n </div>\n </div>\n </s-footer>\n</s-sidebar>\n",
353
- encapsulation: ViewEncapsulation.None,
354
- styles: [".s-exclusion-details-record-details-panel{margin-bottom:10px}.s-exclusion-details-record-details-container{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center}.s-exclusion-details-record-details-recordinfo{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin-left:10px;-ms-flex:1;flex:1}.s-exclusion-details-record-details-dateinfo{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin-left:10px;-ms-flex-align:end;align-items:flex-end;font-size:12px}.s-exclusion-details-record-details-type{color:#999}.s-exclusion-details-record-icon{font-size:22pt;color:#7e8d95}.s-exclusion-details-record-icon-background{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:16px;background-color:#c1cad1;border-radius:50%;height:60px;width:60px}"]
355
- })
356
- ], ExclusionDetailsComponent);
357
-
358
- let ExclusionDetailsModule = class ExclusionDetailsModule {
359
- };
360
- ExclusionDetailsModule = __decorate([
361
- NgModule({
362
- imports: [
363
- CommonModule,
364
- SidebarModule,
365
- ButtonModule,
366
- PanelModule,
367
- TableModule,
368
- TableModule$1,
369
- LoadingStateModule,
370
- LocaleModule
371
- ],
372
- declarations: [ExclusionDetailsComponent],
373
- exports: [ExclusionDetailsComponent],
374
- entryComponents: [ExclusionDetailsComponent]
375
- })
376
- ], ExclusionDetailsModule);
377
-
378
- let FilterService = class FilterService {
379
- constructor(logicalDeleteConfigService, translate) {
380
- this.logicalDeleteConfigService = logicalDeleteConfigService;
381
- this.translate = translate;
382
- this.numberTypes = [FieldType.Integer, FieldType.Double];
383
- }
384
- getEnumQuery(name, value, multiple = false) {
385
- if (multiple) {
386
- const filter = value.map((selected) => `${name} eq '${selected}'`).join(" or ");
387
- return `(${filter})`;
388
- }
389
- return `${name} eq '${value}'`;
390
- }
391
- createFilterString(formField, value) {
392
- const { name, type, multiple } = formField;
393
- if (typeof value == "number") {
394
- return `${name} eq ${value}`;
395
- }
396
- switch (type) {
397
- case FieldType.Date:
398
- return `${name} eq '${moment(value).format("YYYY-MM-DD")}'`;
399
- case FieldType.Time:
400
- return `${name} eq '${moment(value).format("HH:mm:ss")}'`;
401
- case FieldType.DateTime:
402
- return `${name} eq '${moment(value).format()}'`;
403
- case FieldType.LocalDateTime:
404
- return `${name} eq '${moment(value).format("YYYY-MM-DD[T]HH:mm:ss.SSS")}'`;
405
- case FieldType.Enum:
406
- return this.getEnumQuery(name, value, multiple);
407
- case FieldType.String:
408
- return `containing(upper(${name}), upper('${value.replace(/'/g, "'")}'))`;
409
- case FieldType.Lookup:
410
- return `${name} eq '${value.id}'`;
411
- default:
412
- return `${name} eq '${value}'`;
413
- }
414
- }
415
- createFilterTokens(formField, value) {
416
- const { name, type, label, searchFields, options } = formField;
417
- let labelValue = value;
418
- switch (type) {
419
- case FieldType.Date:
420
- labelValue = moment(value).format("L");
421
- break;
422
- case FieldType.Time:
423
- labelValue = moment(value).format("LTS");
424
- break;
425
- case FieldType.LocalDateTime:
426
- case FieldType.DateTime:
427
- labelValue = moment(value).format("L LTS");
428
- break;
429
- case FieldType.Lookup:
430
- labelValue = searchFields.map((field) => this.getProp(value, field.name)).join(" - ");
431
- break;
432
- case FieldType.Enum:
433
- if (Array.isArray(value)) {
434
- labelValue = value.map((element) => {
435
- return options.filter((en) => en.value === element)[0].label;
436
- });
437
- }
438
- else {
439
- labelValue = options.filter((option) => option.value === labelValue)[0].label;
440
- }
441
- break;
442
- case FieldType.Boolean:
443
- labelValue = value
444
- ? this.translate.instant(`${this.logicalDeleteConfigService.getTranslationPrefix()}.list_grid_boolean_true`)
445
- : this.translate.instant(`${this.logicalDeleteConfigService.getTranslationPrefix()}.list_grid_boolean_false`);
446
- break;
447
- }
448
- return { id: name, label: `${label}: ${labelValue}` };
449
- }
450
- getSuggestionValue(displayFields, ownerEntity, value, separator) {
451
- return displayFields.map(field => this.getProp(value, `${ownerEntity}.${field}`))
452
- .reduce((acc, val) => `${acc}${separator}${val}`) + "";
453
- }
454
- getProp(obj, path) {
455
- return path.split(".").reduce((result, prop) => (result[prop] === undefined ? "" : result[prop]), obj);
456
- }
457
- getLabelValueRequest(contents, displayFields) {
458
- return contents.map((item) => (Object.assign(Object.assign({}, item), { label: displayFields.map(field => this.getProp(item, field)).join(" - ") })));
459
- }
460
- isValidFilter(type, value) {
461
- const isTypeNumber = this.numberTypes.includes(type);
462
- const numberPattern = /^\d+\b$/;
463
- const isNumber = value.match(numberPattern);
464
- return !(isTypeNumber && !isNumber);
465
- }
466
- };
467
- FilterService.ctorParameters = () => [
468
- { type: LogicalDeleteConfigService },
469
- { type: TranslateService }
470
- ];
471
- FilterService = __decorate([
472
- Injectable()
473
- ], FilterService);
474
-
475
- let ExclusionsListComponent = class ExclusionsListComponent {
476
- constructor(route, translate, formBuilder, changeDetectorRef, logicalDeleteService, filterService, projectConfigs) {
477
- this.route = route;
478
- this.translate = translate;
479
- this.formBuilder = formBuilder;
480
- this.changeDetectorRef = changeDetectorRef;
481
- this.logicalDeleteService = logicalDeleteService;
482
- this.filterService = filterService;
483
- this.projectConfigs = projectConfigs;
484
- this.currentListParams = { page: 0, size: 10, sort: [], filterData: {} };
485
- this.showLoader = false;
486
- this.totalRecords = 0;
487
- this.filtersPanelCollapsed = true;
488
- this.searchTokens = [];
489
- this.serverError = false;
490
- this.ngUnsubscribe = new Subject();
491
- }
492
- ngOnInit() {
493
- this.filterFormGroup = this.getFormBuilder();
494
- this.filterFields = this.getFilterFields();
495
- this.gridColumns = this.getGridColumns();
496
- this.route.data
497
- .pipe(takeUntil(this.ngUnsubscribe))
498
- .subscribe((data) => {
499
- this.locale = data.localeConfig;
500
- });
501
- this.route.params
502
- .pipe(takeUntil(this.ngUnsubscribe))
503
- .subscribe((params) => {
504
- this.entityName = params.entityName;
505
- });
506
- this.route.queryParams
507
- .pipe(takeUntil(this.ngUnsubscribe))
508
- .subscribe((queryParams) => {
509
- this.entityDescription = queryParams.entityDescription;
510
- });
511
- }
512
- ngOnDestroy() {
513
- this.ngUnsubscribe.next();
514
- this.ngUnsubscribe.complete();
515
- }
516
- getFormBuilder() {
517
- return this.formBuilder.group({
518
- description: [undefined, Validators.compose([])],
519
- state: [undefined, Validators.compose([])],
520
- startDate: [{ value: undefined, disabled: false }, Validators.compose([])],
521
- endDate: [{ value: undefined, disabled: false }, Validators.compose([])]
522
- });
523
- }
524
- getGridColumns() {
525
- return [
526
- {
527
- field: "description",
528
- attributes: ['description'],
529
- header: this.translate.instant(`${this.projectConfigs.getTranslationPrefix()}.logical_delete_description`),
530
- type: EnumColumnFieldType.STRING,
531
- style: {
532
- width: '300px'
533
- }
534
- },
535
- {
536
- field: "status",
537
- attributes: ['status'],
538
- header: this.translate.instant(`${this.projectConfigs.getTranslationPrefix()}.logical_delete_status`),
539
- type: EnumColumnFieldType.ENUM,
540
- enumPrefix: `${this.projectConfigs.getTranslationPrefix()}.logical_delete_enum_exclusion_process_status_`,
541
- style: {
542
- width: '100px'
543
- },
544
- badgeConfigs: [
545
- {
546
- enumValue: EnumExclusionProcessStatus.ERROR,
547
- color: EnumBadgeColors.RED
548
- },
549
- {
550
- enumValue: EnumExclusionProcessStatus.PENDING,
551
- color: EnumBadgeColors.YELLOW
552
- },
553
- {
554
- enumValue: EnumExclusionProcessStatus.PROCESSING,
555
- color: EnumBadgeColors.BLUE
556
- },
557
- {
558
- enumValue: EnumExclusionProcessStatus.SUCCESS,
559
- color: EnumBadgeColors.GREEN
560
- }
561
- ]
562
- },
563
- {
564
- field: "startDate",
565
- attributes: ['startDate'],
566
- header: this.translate.instant(`${this.projectConfigs.getTranslationPrefix()}.logical_delete_start`),
567
- type: EnumColumnFieldType.DATE,
568
- dateFormat: "DD/MM/YYYY HH:mm",
569
- style: {
570
- width: '100px'
571
- }
572
- },
573
- {
574
- field: "finishDate",
575
- attributes: ['finishDate'],
576
- header: this.translate.instant(`${this.projectConfigs.getTranslationPrefix()}.logical_delete_finish`),
577
- type: EnumColumnFieldType.DATE,
578
- dateFormat: "DD/MM/YYYY HH:mm",
579
- style: {
580
- width: '100px'
581
- }
582
- }
583
- ];
584
- }
585
- getFilterFields() {
586
- return [
587
- new FormField({
588
- type: FieldType.String,
589
- name: "description",
590
- label: this.translate.instant(`${this.projectConfigs.getTranslationPrefix()}.logical_delete_description`)
591
- }),
592
- new FormField({
593
- type: FieldType.Enum,
594
- name: "state",
595
- label: this.translate.instant(`${this.projectConfigs.getTranslationPrefix()}.logical_delete_status`),
596
- placeholder: this.translate.instant(`${this.projectConfigs.getTranslationPrefix()}.logical_delete_status`),
597
- multiple: true,
598
- options: [
599
- {
600
- label: this.translate.instant(`${this.projectConfigs.getTranslationPrefix()}.logical_delete_enum_exclusion_process_status_error`),
601
- value: EnumExclusionProcessStatus.ERROR
602
- },
603
- {
604
- label: this.translate.instant(`${this.projectConfigs.getTranslationPrefix()}.logical_delete_enum_exclusion_process_status_pending`),
605
- value: EnumExclusionProcessStatus.PENDING
606
- },
607
- {
608
- label: this.translate.instant(`${this.projectConfigs.getTranslationPrefix()}.logical_delete_enum_exclusion_process_status_processing`),
609
- value: EnumExclusionProcessStatus.PROCESSING
610
- },
611
- {
612
- label: this.translate.instant(`${this.projectConfigs.getTranslationPrefix()}.logical_delete_enum_exclusion_process_status_success`),
613
- value: EnumExclusionProcessStatus.SUCCESS
614
- }
615
- ]
616
- }),
617
- new FormField({
618
- type: FieldType.Date,
619
- name: "startDate",
620
- label: this.translate.instant(`${this.projectConfigs.getTranslationPrefix()}.logical_delete_start`)
621
- }),
622
- new FormField({
623
- type: FieldType.Date,
624
- name: "endDate",
625
- label: this.translate.instant(`${this.projectConfigs.getTranslationPrefix()}.logical_delete_finish`)
626
- })
627
- ];
628
- }
629
- getEmptyStateTitle() {
630
- return this.translate.instant(`${this.projectConfigs.getTranslationPrefix()}.logical_delete_empty_state_title`);
631
- }
632
- getEmptyStateDescription() {
633
- return this.translate.instant(`${this.projectConfigs.getTranslationPrefix()}.logical_delete_empty_state_description`);
634
- }
635
- getTitle() {
636
- return this.translate.instant(`${this.projectConfigs.getTranslationPrefix()}.logical_delete_list_title`);
637
- }
638
- getDetailsButtonTitle() {
639
- return this.translate.instant(`${this.projectConfigs.getTranslationPrefix()}.logical_delete_details`);
640
- }
641
- onSearch() {
642
- const filterData = this.filterFormGroup.getRawValue();
643
- this.filtersPanelCollapsed = true;
644
- this.resetGrid({ filterData });
645
- }
646
- onClear() {
647
- this.filterFormGroup.reset();
648
- const filterData = this.filterFormGroup.getRawValue();
649
- this.resetGrid({ filterData });
650
- }
651
- onRemoveToken(token) {
652
- this.filterFormGroup.get(token.id).setValue(undefined);
653
- const filterData = this.filterFormGroup.getRawValue();
654
- this.resetGrid({ filterData });
655
- }
656
- onGridChange(event) {
657
- const size = event.rows;
658
- const page = event.first / size;
659
- const sort = event.multiSortMeta ? event.multiSortMeta : [];
660
- return this.updateGrid({ page, size, sort });
661
- }
662
- getFilterTokens() {
663
- const filterData = this.filterFormGroup.value;
664
- return this.filterFields
665
- .filter(({ name }) => filterData[name] != undefined && filterData[name] !== "")
666
- .map(formField => this.filterService.createFilterTokens(formField, filterData[formField.name]));
667
- }
668
- getFilterQuery() {
669
- const { filterData } = this.currentListParams;
670
- const dateFields = ['startDate', 'endDate'];
671
- let filterQuery = this.filterFields
672
- .filter(({ name }) => !dateFields.includes(name))
673
- .filter(({ name }) => filterData[name] != undefined)
674
- .map(formField => this.filterService.createFilterString(formField, filterData[formField.name]))
675
- .join(" and ");
676
- if (filterData.startDate && filterData.endDate) {
677
- const startDate = moment(filterData.startDate).format('YYYY-MM-DD');
678
- const endDate = moment(filterData.endDate).format('YYYY-MM-DD');
679
- const dateQuery = `startDate between '${startDate}' and '${endDate}'`;
680
- if (filterQuery) {
681
- filterQuery += ` and ${dateQuery}`;
682
- }
683
- else {
684
- filterQuery = dateQuery;
685
- }
686
- }
687
- return filterQuery;
688
- }
689
- updateGrid(listParams = {}) {
690
- this.currentListParams = Object.assign(Object.assign({}, this.currentListParams), listParams);
691
- const { page, size, sort } = this.currentListParams;
692
- this.searchTokens = this.getFilterTokens();
693
- const filterQuery = this.getFilterQuery();
694
- const displayFields = [
695
- 'recordId',
696
- ...this.gridColumns.map(column => column.field)
697
- ];
698
- this.listExclusions({ page, size, sort, filterQuery, displayFields });
699
- }
700
- listExclusions(params) {
701
- this.showLoader = true;
702
- this.serverError = false;
703
- this.changeDetectorRef.detectChanges();
704
- this.logicalDeleteService
705
- .listExclusions(this.entityName, params)
706
- .pipe(takeUntil(this.ngUnsubscribe), catchError((err) => {
707
- if (err.status >= 500 && err.status < 600) {
708
- this.serverError = true;
709
- }
710
- throw err;
711
- }), finalize(() => this.showLoader = false))
712
- .subscribe((list) => {
713
- this.gridData = list.contents;
714
- this.totalRecords = list.totalElements;
715
- });
716
- }
717
- focusInput(elementId) {
718
- const element = document.getElementById(`${elementId}`);
719
- if (element) {
720
- element.focus();
721
- }
722
- }
723
- resetGrid(listParams) {
724
- if (listParams)
725
- this.currentListParams = Object.assign(Object.assign({}, this.currentListParams), listParams);
726
- this.currentListParams = Object.assign(Object.assign({}, this.currentListParams), { page: 0, sort: [] });
727
- this.table.reset();
728
- }
729
- onClickDetails(rowData) {
730
- this.exclusionDetailsComponent.showDetails({
731
- recordId: rowData.recordId,
732
- entityDescription: this.entityDescription,
733
- entityName: this.entityName
734
- });
735
- }
736
- };
737
- ExclusionsListComponent.ctorParameters = () => [
738
- { type: ActivatedRoute },
739
- { type: TranslateService },
740
- { type: FormBuilder },
741
- { type: ChangeDetectorRef },
742
- { type: LogicalDeleteService },
743
- { type: FilterService },
744
- { type: LogicalDeleteConfigService }
745
- ];
746
- __decorate([
747
- ViewChild("exclusionsTable")
748
- ], ExclusionsListComponent.prototype, "table", void 0);
749
- __decorate([
750
- ViewChild(ExclusionDetailsComponent)
751
- ], ExclusionsListComponent.prototype, "exclusionDetailsComponent", void 0);
752
- ExclusionsListComponent = __decorate([
753
- Component({
754
- template: "<div>\n <form [formGroup]=\"filterFormGroup\" autocomplete=\"off\">\n <p-panel\n *sLoadingState=\"showLoader\"\n styleClass=\"form-group\"\n [toggleable]=\"true\"\n [(collapsed)]=\"filtersPanelCollapsed\"\n (onAfterToggle)=\"focusInput('description')\"\n >\n <p-header>\n {{ 'filters' | translate }}\n <s-token-list\n [tokens]=\"searchTokens\"\n (tokenRemoved)=\"onRemoveToken($event)\"\n [removableTokens]=\"true\"\n ></s-token-list>\n </p-header>\n <div>\n <s-dynamic-form\n [fields]=\"filterFields\"\n [form]=\"filterFormGroup\"\n [errorMessages]=\"{ pattern: 'error_invalid' | translate }\"\n ></s-dynamic-form>\n </div>\n <p-footer>\n <div class=\"ui-g\">\n <div class=\"ui-g-12\">\n <button\n id=\"filter-button\"\n class=\"ui-button\"\n type=\"submit\"\n pButton\n [label]=\"'filter' | translate\"\n (click)=\"onSearch()\"\n ></button>\n <button\n id=\"clear-button\"\n class=\"ui-button ui-button-link\"\n type=\"button\"\n pButton\n [label]=\"'clear' | translate\"\n (click)=\"onClear()\"\n ></button>\n </div>\n </div>\n </p-footer>\n </p-panel>\n </form>\n <p-panel *sLoadingState=\"showLoader\">\n <p-header>\n {{ getTitle() }}\n </p-header>\n <ng-container>\n <s-empty-state\n *ngIf=\"serverError && !showLoader\"\n iconClass=\"fa fa-exclamation-triangle\"\n title=\"{{ 'error_server_title' | translate }}\"\n primaryActionLabel=\"{{ 'error_server_try_again' | translate }}\"\n (primaryAction)=\"resetGrid()\"\n description=\"{{ 'error_server_description' | translate }}\"\n ></s-empty-state>\n\n <s-empty-state\n *ngIf=\"!showLoader && !serverError && totalRecords === 0\"\n [title]=\"getEmptyStateTitle()\"\n [showPrimaryAction]=\"false\"\n [description]=\"getEmptyStateDescription()\"\n ></s-empty-state>\n\n <div class=\"ui-g\">\n <div class=\"ui-g-12\">\n <p-table\n #exclusionsTable\n id=\"exclusionsTable\"\n [hidden]=\"totalRecords === 0 || serverError\"\n [value]=\"gridData\"\n [columns]=\"gridColumns\"\n dataKey=\"id\"\n [lazy]=\"true\"\n [scrollable]=\"true\"\n [resizableColumns]=\"true\"\n sortMode=\"multiple\"\n [paginator]=\"true\"\n [totalRecords]=\"totalRecords\"\n [rows]=\"10\"\n rows=\"10\"\n [rowsPerPageOptions]=\"[10, 20, 50, 100]\"\n (onLazyLoad)=\"onGridChange($event)\"\n >\n <ng-template pTemplate=\"colgroup\" let-columns>\n <colgroup>\n <col\n *ngFor=\"let col of columns\"\n [style.width]=\"col.width\"\n />\n </colgroup>\n </ng-template>\n\n <ng-template\n pTemplate=\"header\"\n let-columns\n >\n <tr>\n <th *ngFor=\"let col of columns\"\n [id]=\"col.field\"\n [pSortableColumn]=\"col.field\"\n [ngStyle]=\"col.style\"\n pResizableColumn\n >\n <div class=\"senior-header\">\n <span class=\"senior-header-title\">\n {{ col.header }}\n </span>\n <p-sortIcon [field]=\"col.field\"></p-sortIcon>\n </div>\n </th>\n <th id=\"action-column\" style=\"width: 100px\">\n <div class=\"senior-header\">\n <span class=\"senior-header-title\">{{'A\u00E7\u00F5es'}}</span>\n </div>\n </th>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"body\" let-rowData let-columns=\"columns\">\n <tr [pSelectableRow]=\"rowData\">\n <s-table-columns\n [columns]=\"columns\"\n [rowValue]=\"rowData\"\n [locale]=\"locale\">\n </s-table-columns>\n <td style=\"width: 100px\">\n <s-button\n id=\"details-button\"\n priority=\"default\"\n [label]=\"getDetailsButtonTitle()\"\n [auxiliary]=\"true\"\n (onClick)=\"onClickDetails(rowData)\">\n </s-button>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"paginatorright\">\n <s-table-paging\n [table]=\"exclusionsTable\"\n [totalRecords]=\"totalRecords\"\n ></s-table-paging>\n </ng-template>\n </p-table>\n </div>\n </div>\n </ng-container>\n </p-panel>\n</div>\n\n<s-exclusion-details></s-exclusion-details>",
755
- providers: []
756
- })
757
- ], ExclusionsListComponent);
758
-
759
- let ExclusionsListFeatureRoutingGuard = class ExclusionsListFeatureRoutingGuard {
760
- canActivate() {
761
- return true;
762
- }
763
- };
764
- ExclusionsListFeatureRoutingGuard = __decorate([
765
- Injectable()
766
- ], ExclusionsListFeatureRoutingGuard);
767
- let ExclusionsListFeatureRoutingListTitleResolver = class ExclusionsListFeatureRoutingListTitleResolver {
768
- constructor(translate, projectConfigs) {
769
- this.translate = translate;
770
- this.projectConfigs = projectConfigs;
771
- }
772
- resolve() {
773
- return this.translate.get(`${this.projectConfigs.getTranslationPrefix()}.logical_delete_list_title`);
774
- }
775
- };
776
- ExclusionsListFeatureRoutingListTitleResolver.ctorParameters = () => [
777
- { type: TranslateService },
778
- { type: LogicalDeleteConfigService }
779
- ];
780
- ExclusionsListFeatureRoutingListTitleResolver = __decorate([
781
- Injectable()
782
- ], ExclusionsListFeatureRoutingListTitleResolver);
783
- let ExclusionsListFeatureRoutingPermissionResolver = class ExclusionsListFeatureRoutingPermissionResolver {
784
- constructor(permissionsService) {
785
- this.permissionsService = permissionsService;
786
- }
787
- resolve() {
788
- return this.permissionsService.get();
789
- }
790
- };
791
- ExclusionsListFeatureRoutingPermissionResolver.ctorParameters = () => [
792
- { type: PermissionsService }
793
- ];
794
- ExclusionsListFeatureRoutingPermissionResolver = __decorate([
795
- Injectable()
796
- ], ExclusionsListFeatureRoutingPermissionResolver);
797
- let ExclusionsListFeatureRoutingLocaleResolver = class ExclusionsListFeatureRoutingLocaleResolver {
798
- constructor(localeService) {
799
- this.localeService = localeService;
800
- }
801
- resolve() {
802
- return this.localeService.get();
803
- }
804
- };
805
- ExclusionsListFeatureRoutingLocaleResolver.ctorParameters = () => [
806
- { type: LocaleService }
807
- ];
808
- ExclusionsListFeatureRoutingLocaleResolver = __decorate([
809
- Injectable()
810
- ], ExclusionsListFeatureRoutingLocaleResolver);
811
- let EmptyComponent = class EmptyComponent {
812
- };
813
- EmptyComponent = __decorate([
814
- Component({
815
- template: `<router-outlet></router-outlet>`
816
- })
817
- ], EmptyComponent);
818
- const routes = [
819
- {
820
- path: "exclusions-list",
821
- component: EmptyComponent,
822
- canActivate: [
823
- ExclusionsListFeatureRoutingGuard
824
- ],
825
- resolve: {
826
- allPermissions: ExclusionsListFeatureRoutingPermissionResolver,
827
- localeConfig: ExclusionsListFeatureRoutingLocaleResolver,
828
- routeTitle: ExclusionsListFeatureRoutingListTitleResolver
829
- },
830
- children: [
831
- {
832
- path: ":entityName",
833
- component: ExclusionsListComponent
834
- }
835
- ]
836
- }
837
- ];
838
- let ExclusionsListFeatureRouting = class ExclusionsListFeatureRouting {
839
- };
840
- ExclusionsListFeatureRouting = __decorate([
841
- NgModule({
842
- imports: [
843
- RouterModule.forChild(routes)
844
- ],
845
- exports: [
846
- RouterModule
847
- ],
848
- providers: [
849
- ExclusionsListFeatureRoutingGuard,
850
- ExclusionsListFeatureRoutingPermissionResolver,
851
- ExclusionsListFeatureRoutingLocaleResolver,
852
- ExclusionsListFeatureRoutingListTitleResolver
853
- ],
854
- declarations: [
855
- EmptyComponent
856
- ]
857
- })
858
- ], ExclusionsListFeatureRouting);
859
-
860
- let ExclusionsListModule = class ExclusionsListModule {
861
- };
862
- ExclusionsListModule = __decorate([
863
- NgModule({
864
- imports: [
865
- FormsModule,
866
- ReactiveFormsModule,
867
- TranslateModule,
868
- CommonModule,
869
- ControlErrorsModule,
870
- ButtonModule,
871
- PanelModule,
872
- InputTextModule,
873
- InfoSignModule,
874
- ConfirmDialogModule,
875
- DialogModule,
876
- TableModule,
877
- TableModule$1,
878
- LoadingStateModule,
879
- EmptyStateModule,
880
- DynamicFormModule,
881
- TokenListModule,
882
- LocaleModule.forChild(),
883
- ExclusionDetailsModule,
884
- ExclusionsListFeatureRouting
885
- ],
886
- declarations: [ExclusionsListComponent],
887
- exports: [ExclusionsListComponent],
888
- entryComponents: [ExclusionsListComponent]
889
- })
890
- ], ExclusionsListModule);
891
-
892
- var LogicalDeleteModule_1;
893
- let LogicalDeleteModule = LogicalDeleteModule_1 = class LogicalDeleteModule {
894
- static forRoot(config) {
895
- return {
896
- ngModule: LogicalDeleteModule_1,
897
- providers: [
898
- {
899
- provide: ProjectConfigsInjectionToken,
900
- useValue: config
901
- }
902
- ]
903
- };
904
- }
905
- };
906
- LogicalDeleteModule = LogicalDeleteModule_1 = __decorate([
907
- NgModule({
908
- providers: [LogicalDeleteService, LogicalDeleteConfigService, FilterService]
909
- })
910
- ], LogicalDeleteModule);
911
-
912
- /**
913
- * Generated bundle index. Do not edit.
914
- */
915
-
916
- export { EmptyComponent, ExclusionDetailsComponent, ExclusionDetailsModule, ExclusionsListComponent, ExclusionsListFeatureRouting, ExclusionsListFeatureRoutingGuard, ExclusionsListFeatureRoutingListTitleResolver, ExclusionsListFeatureRoutingLocaleResolver, ExclusionsListFeatureRoutingPermissionResolver, ExclusionsListModule, LogicalDeleteModule, routes, LogicalDeleteService as ɵa, LogicalDeleteConfigService as ɵb, ProjectConfigsInjectionToken as ɵc, ExclusionDetailsModule as ɵe, ExclusionDetailsComponent as ɵf, LogicalDeleteService as ɵg, FilterService as ɵh };
917
- //# sourceMappingURL=seniorsistemas-exclusion-process-component.js.map