@unifylib/ui-lib 1.0.3 → 1.1.3

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 (155) hide show
  1. package/ng-package.json +7 -7
  2. package/package.json +14 -12
  3. package/src/lib/base-model/SearchStrConfig.ts +12 -12
  4. package/src/lib/base-model/api-response.ts +23 -23
  5. package/src/lib/base-model/audit-log-entry.ts +7 -7
  6. package/src/lib/base-model/button-action-settings.ts +29 -25
  7. package/src/lib/base-model/column-def.model.ts +34 -34
  8. package/src/lib/base-model/do-action-request.ts +11 -11
  9. package/src/lib/base-model/feature-item.ts +9 -0
  10. package/src/lib/base-model/field-action.ts +7 -7
  11. package/src/lib/base-model/field-filter.model.ts +7 -14
  12. package/src/lib/base-model/field-info.ts +102 -98
  13. package/src/lib/base-model/field-predicate.model.ts +7 -7
  14. package/src/lib/base-model/filter-request.ts +27 -27
  15. package/src/lib/base-model/filter.model.ts +49 -49
  16. package/src/lib/base-model/get-items-list.ts +24 -24
  17. package/src/lib/base-model/index.ts +11 -11
  18. package/src/lib/base-model/items-total.model.ts +12 -0
  19. package/src/lib/base-model/line-item.model.ts +18 -0
  20. package/src/lib/base-model/lookupItem.ts +21 -21
  21. package/src/lib/base-model/null-snackmessage.ts +9 -9
  22. package/src/lib/base-model/page-info.ts +54 -51
  23. package/src/lib/base-model/report-request.model.ts +33 -33
  24. package/src/lib/base-model/response-envelop.model.ts +15 -15
  25. package/src/lib/base-model/snack-message.model.ts +14 -14
  26. package/src/lib/base-model/snackmessage-interface.ts +7 -7
  27. package/src/lib/base-model/table-column.interface.ts +29 -29
  28. package/src/lib/base-model/table-page-user-action.interface.ts +33 -33
  29. package/src/lib/base-model/workflow/workflow-steps.model.ts +9 -9
  30. package/src/lib/base-model/workflow/workflow.model.ts +52 -52
  31. package/src/lib/components/action-comment/action-comment.component.css +52 -0
  32. package/src/lib/components/action-comment/action-comment.component.html +47 -0
  33. package/src/lib/components/{rejection-comment → action-comment}/action-comment.component.spec.ts +23 -23
  34. package/src/lib/components/{rejection-comment → action-comment}/action-comment.component.ts +102 -86
  35. package/src/lib/components/action-confirmation/action-confirmation.component.css +46 -34
  36. package/src/lib/components/action-confirmation/action-confirmation.component.html +32 -18
  37. package/src/lib/components/action-confirmation/action-confirmation.component.spec.ts +23 -23
  38. package/src/lib/components/action-confirmation/action-confirmation.component.ts +58 -58
  39. package/src/lib/components/activity-report-form/activity-report-form.component.html +110 -109
  40. package/src/lib/components/activity-report-form/activity-report-form.component.scss +69 -0
  41. package/src/lib/components/activity-report-form/activity-report-form.component.spec.ts +25 -25
  42. package/src/lib/components/activity-report-form/activity-report-form.component.ts +616 -605
  43. package/src/lib/components/advanced-filter/field-filter/field-filter.component.html +8 -0
  44. package/src/lib/components/advanced-filter/field-filter/field-filter.component.scss +0 -0
  45. package/src/lib/components/advanced-filter/field-filter/field-filter.component.spec.ts +25 -0
  46. package/src/lib/components/advanced-filter/field-filter/field-filter.component.ts +55 -0
  47. package/src/lib/components/advanced-filter/filter-builder/filter-builder.component.html +36 -0
  48. package/src/lib/components/advanced-filter/filter-builder/filter-builder.component.scss +130 -0
  49. package/src/lib/components/advanced-filter/filter-builder/filter-builder.component.spec.ts +25 -0
  50. package/src/lib/components/advanced-filter/filter-builder/filter-builder.component.ts +186 -0
  51. package/src/lib/components/audit-log-details-dialog/audit-log-details-dialog.component.css +51 -51
  52. package/src/lib/components/audit-log-details-dialog/audit-log-details-dialog.component.html +23 -23
  53. package/src/lib/components/audit-log-details-dialog/audit-log-details-dialog.component.spec.ts +23 -23
  54. package/src/lib/components/audit-log-details-dialog/audit-log-details-dialog.component.ts +69 -69
  55. package/src/lib/components/audit-log-list/audit-log.component.html +26 -23
  56. package/src/lib/components/audit-log-list/audit-log.component.scss +50 -0
  57. package/src/lib/components/audit-log-list/audit-log.component.spec.ts +25 -25
  58. package/src/lib/components/audit-log-list/audit-log.component.ts +114 -116
  59. package/src/lib/components/auto-complete/auto-complete.component.css +55 -14
  60. package/src/lib/components/auto-complete/auto-complete.component.html +45 -29
  61. package/src/lib/components/auto-complete/auto-complete.component.spec.ts +23 -23
  62. package/src/lib/components/auto-complete/auto-complete.component.ts +331 -330
  63. package/src/lib/components/base-form/base-form.component.html +59 -58
  64. package/src/lib/components/base-form/base-form.component.scss +68 -0
  65. package/src/lib/components/base-form/base-form.component.spec.ts +25 -25
  66. package/src/lib/components/base-form/base-form.component.ts +323 -305
  67. package/src/lib/components/base-form-canvas/base-form-canvas.component.css +196 -22
  68. package/src/lib/components/base-form-canvas/base-form-canvas.component.html +1095 -1006
  69. package/src/lib/components/base-form-canvas/base-form-canvas.component.spec.ts +23 -23
  70. package/src/lib/components/base-form-canvas/base-form-canvas.component.ts +680 -573
  71. package/src/lib/components/base-input-dialog/base-input-dialog.component.css +67 -0
  72. package/src/lib/components/base-input-dialog/base-input-dialog.component.html +47 -42
  73. package/src/lib/components/base-input-dialog/base-input-dialog.component.spec.ts +23 -23
  74. package/src/lib/components/base-input-dialog/base-input-dialog.component.ts +77 -78
  75. package/src/lib/components/base-table/base-table.component.html +268 -242
  76. package/src/lib/components/base-table/base-table.component.scss +140 -31
  77. package/src/lib/components/base-table/base-table.component.spec.ts +25 -25
  78. package/src/lib/components/base-table/base-table.component.ts +621 -568
  79. package/src/lib/components/button-actions/button-actions.component.html +27 -28
  80. package/src/lib/components/button-actions/button-actions.component.scss +101 -6
  81. package/src/lib/components/button-actions/button-actions.component.spec.ts +23 -23
  82. package/src/lib/components/button-actions/button-actions.component.ts +70 -72
  83. package/src/lib/components/editable-base-table/editable-base-table.component.html +337 -372
  84. package/src/lib/components/editable-base-table/editable-base-table.component.scss +126 -44
  85. package/src/lib/components/editable-base-table/editable-base-table.component.spec.ts +25 -25
  86. package/src/lib/components/editable-base-table/editable-base-table.component.ts +579 -570
  87. package/src/lib/components/equation-builder/equation-builder.component.css +39 -0
  88. package/src/lib/components/equation-builder/equation-builder.component.html +31 -31
  89. package/src/lib/components/equation-builder/equation-builder.component.spec.ts +23 -23
  90. package/src/lib/components/equation-builder/equation-builder.component.ts +119 -121
  91. package/src/lib/components/item-line-editor/item-line-editor.component.html +102 -0
  92. package/src/lib/components/item-line-editor/item-line-editor.component.scss +152 -0
  93. package/src/lib/components/item-line-editor/item-line-editor.component.spec.ts +23 -0
  94. package/src/lib/components/item-line-editor/item-line-editor.component.ts +306 -0
  95. package/src/lib/components/multi-auto-complete/multi-auto-complete.component.css +19 -11
  96. package/src/lib/components/multi-auto-complete/multi-auto-complete.component.html +38 -38
  97. package/src/lib/components/multi-auto-complete/multi-auto-complete.component.spec.ts +23 -23
  98. package/src/lib/components/multi-auto-complete/multi-auto-complete.component.ts +315 -317
  99. package/src/lib/components/paginator/paginator.component.css +65 -25
  100. package/src/lib/components/paginator/paginator.component.html +30 -34
  101. package/src/lib/components/paginator/paginator.component.ts +87 -94
  102. package/src/lib/components/report-details-dialog/report-details-dialog.component.css +17 -17
  103. package/src/lib/components/report-details-dialog/report-details-dialog.component.html +16 -16
  104. package/src/lib/components/report-details-dialog/report-details-dialog.component.spec.ts +23 -23
  105. package/src/lib/components/report-details-dialog/report-details-dialog.component.ts +111 -113
  106. package/src/lib/components/report-form/report-form.component.html +92 -94
  107. package/src/lib/components/report-form/report-form.component.scss +51 -0
  108. package/src/lib/components/report-form/report-form.component.spec.ts +25 -25
  109. package/src/lib/components/report-form/report-form.component.ts +599 -588
  110. package/src/lib/components/search-bar/search-bar.component.html +51 -62
  111. package/src/lib/components/search-bar/search-bar.component.scss +63 -8
  112. package/src/lib/components/search-bar/search-bar.component.spec.ts +25 -25
  113. package/src/lib/components/search-bar/search-bar.component.ts +68 -70
  114. package/src/lib/components/section-form-canvas/section-form-canvas.component.html +43 -0
  115. package/src/lib/components/section-form-canvas/section-form-canvas.component.scss +81 -0
  116. package/src/lib/components/section-form-canvas/section-form-canvas.component.spec.ts +23 -0
  117. package/src/lib/components/section-form-canvas/section-form-canvas.component.ts +67 -0
  118. package/src/lib/components/shared/action-button/action-button.component.html +12 -0
  119. package/src/lib/components/shared/action-button/action-button.component.scss +45 -0
  120. package/src/lib/components/shared/action-button/action-button.component.ts +51 -0
  121. package/src/lib/components/shared/action-card/action-card.component.html +78 -0
  122. package/src/lib/components/shared/action-card/action-card.component.scss +238 -0
  123. package/src/lib/components/shared/action-card/action-card.component.ts +56 -0
  124. package/src/lib/components/shared/attachment-uploader/attachment-uploader.component.css +135 -54
  125. package/src/lib/components/shared/attachment-uploader/attachment-uploader.component.html +36 -22
  126. package/src/lib/components/shared/attachment-uploader/attachment-uploader.component.spec.ts +23 -23
  127. package/src/lib/components/shared/attachment-uploader/attachment-uploader.component.ts +71 -45
  128. package/src/lib/components/shared-list/shared-list.component.html +17 -17
  129. package/src/lib/components/shared-list/shared-list.component.spec.ts +23 -23
  130. package/src/lib/components/shared-list/shared-list.component.ts +53 -53
  131. package/src/lib/components/snackbar-static/snackbar-static.component.html +20 -0
  132. package/src/lib/components/snackbar-static/snackbar-static.component.scss +135 -0
  133. package/src/lib/components/snackbar-static/snackbar-static.component.ts +26 -0
  134. package/src/lib/components/title-bar/title-bar.component.html +35 -31
  135. package/src/lib/components/title-bar/title-bar.component.scss +126 -23
  136. package/src/lib/components/title-bar/title-bar.component.spec.ts +23 -23
  137. package/src/lib/components/title-bar/title-bar.component.ts +126 -119
  138. package/src/lib/services/backend-service.ts +287 -286
  139. package/src/lib/services/index.ts +3 -3
  140. package/src/lib/services/top-panel.ts +17 -17
  141. package/src/lib/services/trigger-form.service.ts +11 -11
  142. package/src/lib/share-module/shared-module.ts +10 -10
  143. package/src/lib/utils/base-utils.ts +102 -102
  144. package/src/lib/validators/date-range-validator.ts +31 -31
  145. package/src/lib/validators/index.ts +3 -3
  146. package/src/lib/validators/match-list.validator.ts +10 -10
  147. package/src/lib/validators/multi-email-validator.ts +15 -15
  148. package/src/public-api.ts +29 -21
  149. package/tsconfig.lib.json +15 -15
  150. package/tsconfig.lib.prod.json +11 -11
  151. package/tsconfig.spec.json +15 -15
  152. package/src/lib/components/rejection-comment/action-comment.component.css +0 -33
  153. package/src/lib/components/rejection-comment/action-comment.component.html +0 -46
  154. package/src/lib/styles/invoiceq-theme.scss +0 -252
  155. package/src/lib/styles/styles.scss +0 -1723
@@ -1,113 +1,111 @@
1
- import {AfterViewInit, Component, ElementRef, HostListener, Inject, OnInit} from '@angular/core';
2
- import {
3
- MAT_DIALOG_DATA, MatDialogActions, MatDialogContent,
4
- MatDialogRef, MatDialogTitle,
5
- } from "@angular/material/dialog";
6
- import {FormsModule} from "@angular/forms";
7
- import {TranslateModule, TranslateService} from "@ngx-translate/core";
8
- import {FieldInfo, PageInfo, ReportRequest, TableColumn} from "../../base-model";
9
- import {BaseTableComponent} from "../base-table/base-table.component";
10
- import {FlexModule} from "@angular/flex-layout";
11
- import {MatButton, MatIconButton} from "@angular/material/button";
12
- import {BackendService} from "../../services";
13
- import {MatIcon} from "@angular/material/icon";
14
-
15
- @Component({
16
- selector: 'app-audit-log-details-dialog',
17
- standalone: true,
18
- imports: [
19
- FormsModule,
20
- TranslateModule,
21
- BaseTableComponent,
22
- FlexModule,
23
- MatDialogContent,
24
- MatDialogTitle,
25
- MatIconButton,
26
- MatIcon
27
- ],
28
- templateUrl: './report-details-dialog.component.html',
29
- styleUrl: './report-details-dialog.component.css'
30
- })
31
- export class ReportDetailsDialogComponent implements OnInit , AfterViewInit{
32
- dialogDirection: 'ltr' | 'rtl' = 'ltr';
33
-
34
- pageInfo: PageInfo;
35
- fields: FieldInfo[] = [];
36
-
37
- isTermination : boolean=false;
38
- comment: string = '';
39
- external: boolean = false;
40
- signingRequired: boolean = false;
41
- tokenReference: string = "";
42
- warningMsg = false;
43
- item: any = {};
44
- reportRequest: ReportRequest;
45
- columns: TableColumn<any>[];
46
- constructor(public dialogRef: MatDialogRef<ReportDetailsDialogComponent>,
47
- @Inject(MAT_DIALOG_DATA) public data: any,
48
- private translateService: TranslateService,
49
- public backendService:BackendService,
50
- private elRef: ElementRef) {
51
- dialogRef.disableClose = true;
52
- }
53
- @HostListener('window:keyup.esc') onKeyUp() {
54
- this.dialogRef.close();
55
- }
56
- ngOnInit(): void {
57
- this.pageInfo = this.data.pageInfo;
58
- this.pageInfo.hideTitle = true;
59
- this.item = this.data.item;
60
- this.pageInfo.hideExtractButton = false;
61
- this.columns = this.data.columns;
62
- this.reportRequest = this.data.request;
63
- this.warningMsg = this.data.warningMsg || false;
64
- }
65
-
66
- ngAfterViewInit(): void {
67
- const container = this.elRef.nativeElement.closest('mat-dialog-container');
68
- if (container && container.getAttribute('dir')) {
69
- this.dialogDirection = container.getAttribute('dir') as 'ltr' | 'rtl';
70
- }
71
- }
72
-
73
- cancel() {
74
- this.reportRequest.filterRequest.filters = [];
75
- this.backendService.isEmptyItems = false;
76
- this.dialogRef.close();
77
- }
78
-
79
- @HostListener('document:click', ['$event'])
80
- onBackdropClick(event: MouseEvent): void {
81
- const target = event.target as HTMLElement;
82
- if (target.classList.contains('cdk-overlay-backdrop')) {
83
- this.reportRequest.filterRequest.filters = [];
84
- this.backendService.isEmptyItems = false;
85
- this.dialogRef.close();
86
- }
87
- }
88
-
89
- getTitle() {
90
- if (this.item?.isec_value_ar) {
91
- const isecLabel = this.translateService.instant('ISEC');
92
- return `<strong>${isecLabel} ${this.item.isec_value_ar}</strong>`;
93
- }
94
-
95
- const sectorLabel = this.translateService.instant('SECTOR');
96
- const periodLabel = this.translateService.instant('FOR_PERIOD');
97
- const directorateLabel = this.translateService.instant('DIRECTORATE');
98
-
99
- const sectorText = this.item.sector ? `${sectorLabel} ${this.item.sector}` : '';
100
- const periodText = this.item.period ? ` ${periodLabel} ${this.item.period}` : '';
101
- const yearText = this.item.year ? ` - ${this.item.year}` : '';
102
- const directorateLine = this.item.directorate ? `<br><strong>${directorateLabel} - ${this.item.directorate}</strong>` : '';
103
-
104
- const mainLine = (sectorText || periodText || yearText)
105
- ? `<strong>${[sectorText, periodText, yearText].filter(Boolean).join('')}</strong>`
106
- : '';
107
-
108
- return `${mainLine}${directorateLine}`;
109
- }
110
-
111
-
112
-
113
- }
1
+ import {AfterViewInit, Component, ElementRef, HostListener, Inject, OnInit} from '@angular/core';
2
+ import {
3
+ MAT_DIALOG_DATA, MatDialogActions, MatDialogContent,
4
+ MatDialogRef, MatDialogTitle,
5
+ } from "@angular/material/dialog";
6
+ import {FormsModule} from "@angular/forms";
7
+ import {TranslateModule, TranslateService} from "@ngx-translate/core";
8
+ import {FieldInfo, PageInfo, ReportRequest, TableColumn} from "../../base-model";
9
+ import {BaseTableComponent} from "../base-table/base-table.component";
10
+ import {MatButton, MatIconButton} from "@angular/material/button";
11
+ import {BackendService} from "../../services";
12
+ import {MatIcon} from "@angular/material/icon";
13
+
14
+ @Component({
15
+ selector: 'app-audit-log-details-dialog',
16
+ standalone: true,
17
+ imports: [
18
+ FormsModule,
19
+ TranslateModule,
20
+ BaseTableComponent,
21
+ MatDialogContent,
22
+ MatDialogTitle,
23
+ MatIconButton,
24
+ MatIcon
25
+ ],
26
+ templateUrl: './report-details-dialog.component.html',
27
+ styleUrl: './report-details-dialog.component.css'
28
+ })
29
+ export class ReportDetailsDialogComponent implements OnInit , AfterViewInit{
30
+ dialogDirection: 'ltr' | 'rtl' = 'ltr';
31
+
32
+ pageInfo: PageInfo;
33
+ fields: FieldInfo[] = [];
34
+
35
+ isTermination : boolean=false;
36
+ comment: string = '';
37
+ external: boolean = false;
38
+ signingRequired: boolean = false;
39
+ tokenReference: string = "";
40
+ warningMsg = false;
41
+ item: any = {};
42
+ reportRequest: ReportRequest;
43
+ columns: TableColumn<any>[];
44
+ constructor(public dialogRef: MatDialogRef<ReportDetailsDialogComponent>,
45
+ @Inject(MAT_DIALOG_DATA) public data: any,
46
+ private translateService: TranslateService,
47
+ public backendService:BackendService,
48
+ private elRef: ElementRef) {
49
+ dialogRef.disableClose = true;
50
+ }
51
+ @HostListener('window:keyup.esc') onKeyUp() {
52
+ this.dialogRef.close();
53
+ }
54
+ ngOnInit(): void {
55
+ this.pageInfo = this.data.pageInfo;
56
+ this.pageInfo.hideTitle = true;
57
+ this.item = this.data.item;
58
+ this.pageInfo.hideExtractButton = false;
59
+ this.columns = this.data.columns;
60
+ this.reportRequest = this.data.request;
61
+ this.warningMsg = this.data.warningMsg || false;
62
+ }
63
+
64
+ ngAfterViewInit(): void {
65
+ const container = this.elRef.nativeElement.closest('mat-dialog-container');
66
+ if (container && container.getAttribute('dir')) {
67
+ this.dialogDirection = container.getAttribute('dir') as 'ltr' | 'rtl';
68
+ }
69
+ }
70
+
71
+ cancel() {
72
+ this.reportRequest.filterRequest.filters = [];
73
+ this.backendService.isEmptyItems = false;
74
+ this.dialogRef.close();
75
+ }
76
+
77
+ @HostListener('document:click', ['$event'])
78
+ onBackdropClick(event: MouseEvent): void {
79
+ const target = event.target as HTMLElement;
80
+ if (target.classList.contains('cdk-overlay-backdrop')) {
81
+ this.reportRequest.filterRequest.filters = [];
82
+ this.backendService.isEmptyItems = false;
83
+ this.dialogRef.close();
84
+ }
85
+ }
86
+
87
+ getTitle() {
88
+ if (this.item?.isec_value_ar) {
89
+ const isecLabel = this.translateService.instant('ISEC');
90
+ return `<strong>${isecLabel} ${this.item.isec_value_ar}</strong>`;
91
+ }
92
+
93
+ const sectorLabel = this.translateService.instant('SECTOR');
94
+ const periodLabel = this.translateService.instant('FOR_PERIOD');
95
+ const directorateLabel = this.translateService.instant('DIRECTORATE');
96
+
97
+ const sectorText = this.item.sector ? `${sectorLabel} ${this.item.sector}` : '';
98
+ const periodText = this.item.period ? ` ${periodLabel} ${this.item.period}` : '';
99
+ const yearText = this.item.year ? ` - ${this.item.year}` : '';
100
+ const directorateLine = this.item.directorate ? `<br><strong>${directorateLabel} - ${this.item.directorate}</strong>` : '';
101
+
102
+ const mainLine = (sectorText || periodText || yearText)
103
+ ? `<strong>${[sectorText, periodText, yearText].filter(Boolean).join('')}</strong>`
104
+ : '';
105
+
106
+ return `${mainLine}${directorateLine}`;
107
+ }
108
+
109
+
110
+
111
+ }
@@ -1,94 +1,92 @@
1
- <div fxLayout="column" fxFlex="2" fxHide.lt-sm [ngStyle]="{'height':isMatchHeight() ? '30vh' : '88vh' }">
2
-
3
- </div>
4
-
5
- <div fxLayout="column" fxFlex="98">
6
-
7
- <div fxLayout="row" fxLayoutAlign="start center" style="margin-bottom: 10px;">
8
- <app-title-bar [pageTitle]="getTitle()" [newAction]="false"></app-title-bar>
9
-
10
- <mat-icon
11
- *ngIf="pageInfo?.hasHint"
12
- [matTooltip]="pageInfo.labelsSection + '.hint' | translate"
13
- matTooltipPosition="right"
14
- color="primary"
15
- style="cursor: pointer; margin-left: 10px;"
16
- matTooltipClass="custom-tooltip">
17
- help_outline
18
- </mat-icon>
19
- </div>
20
-
21
-
22
- <app-base-form-canvas
23
- [pageInfo]="pageInfo"
24
- [fields]="fields"
25
- [editable]="isEditable"
26
- [errors]="errors"
27
- [item]="this.reportForm?.value || {}"
28
- (formUpdated)="updateForm($event)"
29
- ></app-base-form-canvas>
30
- <br>
31
- <br>
32
- <div fxLayout="column">
33
- <div fxLayout="row" fxLayout.lt-sm="column" fxLayoutAlign="start center" fxLayoutAlign.lt-lg="start strat" fxLayoutGap="10">
34
- <button *ngIf="activeLevel === 1" color="primary" mat-flat-button (click)="doAction(x)" [disabled]="!isValidForm()">
35
- {{ 'REPORTS.generate' | translate }}
36
- </button>
37
-
38
- <button mat-raised-button [matMenuTriggerFor]="menu" [disabled]="getIsEmptyList()" color="primary">
39
- {{ 'extract' | translate }}
40
- <mat-icon class="expand_more actionButton__expand">expand_more</mat-icon>
41
- </button>
42
-
43
- <button
44
- mat-flat-button
45
- (click)="clear()"
46
- [disabled]="isFormEmpty() || activeLevel > 1">
47
- {{ 'REPORTS.clear' | translate }}
48
- </button>
49
-
50
- <button *ngIf="activeLevel === 1 && drillDownEnabled()" color="warn" mat-flat-button (click)="drillDown()">
51
- {{ drillDownLabel() | translate }}
52
- </button>
53
-
54
- <button *ngIf="activeLevel > 1 && backButtonEnabled" color="warn" mat-flat-button (click)="goUp()">
55
- {{ 'REPORTS.up' | translate }}
56
- </button>
57
- </div>
58
- </div>
59
-
60
- <div *ngIf="activeLevel === 1" fxLayout="row" fxLayoutGap="10px" fxLayoutAlign="start start" fxLayoutAlign.lt-sm="center start"
61
- class="main-form-canvas"
62
- style="margin-top: 3vh; width: 100%">
63
- <div fxLayout="column" fxFlex="100">
64
- <app-base-table [pageInfo]="pageInfo" [columns]="columnsDefinition" [enforceRefresh]="reloadData" id="parent"
65
- [reportRequest]="reportRequest" (userAction)="emitUserAction($event)" (hyperLinkAction)="emitHyperLinkAction($event)"></app-base-table>
66
- </div>
67
- </div>
68
- <div *ngIf="activeLevel === 2" fxLayout="row" fxLayoutGap="10px" fxLayoutAlign="start start" fxLayoutAlign.lt-sm="center start"
69
- class="main-form-canvas"
70
- style="margin-top: 3vh; width: 100%">
71
- <div fxLayout="column" fxFlex="100">
72
- <app-base-table [pageInfo]="drillDownPageInfo" [columns]="drillDownColumns " id="child"
73
- [reportRequest]="childReportRequest"
74
- (userAction)="emitJuniorAction($event)" (hyperLinkAction)="emitHyperLinkAction($event)"></app-base-table>
75
- </div>
76
- </div>
77
- <div *ngIf="activeLevel === 3" fxLayout="row" fxLayoutGap="10px" fxLayoutAlign="start start" fxLayoutAlign.lt-sm="center start"
78
- class="main-form-canvas"
79
- style="margin-top: 3vh; width: 100%">
80
- <div fxLayout="column" fxFlex="100">
81
- <app-base-table [pageInfo]="juniorPageInfo" [columns]="juniorColumns" id="junior"
82
- [reportRequest]="juniorReportRequest"></app-base-table>
83
- </div>
84
- </div>
85
-
86
- </div>
87
- <mat-menu #menu="matMenu">
88
- <button type="button"
89
- mat-menu-item
90
- *ngFor="let type of types"
91
- (click)="extractReport(type)">
92
- {{ type }}
93
- </button>
94
- </mat-menu>
1
+ <div class="column full-width">
2
+
3
+ <div class="row align-start-center" style="margin-bottom: 10px;">
4
+ <app-title-bar [pageTitle]="getTitle()" [newAction]="false"></app-title-bar>
5
+
6
+ <mat-icon
7
+ *ngIf="pageInfo?.hasHint"
8
+ [matTooltip]="pageInfo.labelsSection + '.hint' | translate"
9
+ matTooltipPosition="right"
10
+ color="primary"
11
+ class="hint-icon"
12
+ matTooltipClass="custom-tooltip">
13
+ help_outline
14
+ </mat-icon>
15
+ </div>
16
+
17
+ <app-base-form-canvas
18
+ [pageInfo]="pageInfo"
19
+ [fields]="fields"
20
+ [editable]="isEditable"
21
+ [errors]="errors"
22
+ [item]="this.reportForm?.value || {}"
23
+ (formUpdated)="updateForm($event)"
24
+ ></app-base-form-canvas>
25
+
26
+ <br><br>
27
+
28
+ <div class="column">
29
+ <div class="row gap-10 responsive-row">
30
+ <button *ngIf="activeLevel === 1" color="primary" mat-flat-button (click)="doAction(x)" [disabled]="!isValidForm()" id="report-generate-btn">
31
+ {{ 'REPORTS.generate' | translate }}
32
+ </button>
33
+
34
+ <button mat-raised-button [matMenuTriggerFor]="menu" [disabled]="getIsEmptyList()" color="primary" id="report-extract-trigger">
35
+ {{ 'extract' | translate }}
36
+ <mat-icon class="expand_more actionButton__expand">expand_more</mat-icon>
37
+ </button>
38
+
39
+ <button mat-flat-button (click)="clear()" [disabled]="isFormEmpty() || activeLevel > 1" id="report-clear-btn">
40
+ {{ 'REPORTS.clear' | translate }}
41
+ </button>
42
+
43
+ <button *ngIf="activeLevel === 1 && drillDownEnabled()" color="warn" mat-flat-button (click)="drillDown()" id="report-drilldown-btn">
44
+ {{ drillDownLabel() | translate }}
45
+ </button>
46
+
47
+ <button *ngIf="activeLevel > 1 && backButtonEnabled" color="warn" mat-flat-button (click)="goUp()" id="report-up-btn">
48
+ {{ 'REPORTS.up' | translate }}
49
+ </button>
50
+ </div>
51
+ </div>
52
+
53
+ <div *ngIf="activeLevel >= 1" class="main-form-canvas row align-start-start responsive-table" style="margin-top: 3vh;">
54
+ <div class="column full-width">
55
+ <app-base-table
56
+ *ngIf="activeLevel === 1"
57
+ [pageInfo]="pageInfo"
58
+ [columns]="columnsDefinition"
59
+ [enforceRefresh]="reloadData"
60
+ id="parent"
61
+ [reportRequest]="reportRequest"
62
+ (userAction)="emitUserAction($event)"
63
+ (hyperLinkAction)="emitHyperLinkAction($event)">
64
+ </app-base-table>
65
+
66
+ <app-base-table
67
+ *ngIf="activeLevel === 2"
68
+ [pageInfo]="drillDownPageInfo"
69
+ [columns]="drillDownColumns"
70
+ id="child"
71
+ [reportRequest]="childReportRequest"
72
+ (userAction)="emitJuniorAction($event)"
73
+ (hyperLinkAction)="emitHyperLinkAction($event)">
74
+ </app-base-table>
75
+
76
+ <app-base-table
77
+ *ngIf="activeLevel === 3"
78
+ [pageInfo]="juniorPageInfo"
79
+ [columns]="juniorColumns"
80
+ id="junior"
81
+ [reportRequest]="juniorReportRequest">
82
+ </app-base-table>
83
+ </div>
84
+ </div>
85
+
86
+ </div>
87
+
88
+ <mat-menu #menu="matMenu">
89
+ <button type="button" mat-menu-item *ngFor="let type of types" (click)="extractReport(type)" [attr.id]="'report-extract-item-' + type">
90
+ {{ type }}
91
+ </button>
92
+ </mat-menu>
@@ -0,0 +1,51 @@
1
+ .column {
2
+ display: flex;
3
+ flex-direction: column;
4
+ width: 100%;
5
+ }
6
+
7
+ .row {
8
+ display: flex;
9
+ flex-direction: row;
10
+ width: 100%;
11
+ }
12
+
13
+ .align-start-center {
14
+ align-items: center;
15
+ justify-content: flex-start;
16
+ }
17
+
18
+ .align-start-start {
19
+ align-items: flex-start;
20
+ justify-content: flex-start;
21
+ }
22
+
23
+ .gap-10 > * + * {
24
+ margin-left: 10px;
25
+ }
26
+
27
+ .full-width {
28
+ width: 100%;
29
+ }
30
+
31
+ .hint-icon {
32
+ cursor: pointer;
33
+ margin-left: 10px;
34
+ }
35
+
36
+ .responsive-row {
37
+ flex-wrap: wrap;
38
+ }
39
+
40
+ @media (max-width: 960px) {
41
+ .responsive-row {
42
+ flex-direction: column;
43
+ align-items: flex-start;
44
+ }
45
+ }
46
+
47
+ @media (max-width: 600px) {
48
+ .responsive-table {
49
+ justify-content: center;
50
+ }
51
+ }
@@ -1,25 +1,25 @@
1
- import {ComponentFixture, TestBed} from '@angular/core/testing';
2
-
3
- import {ReportFormComponent} from './report-form.component';
4
-
5
- describe('BaseFormComponent', () => {
6
- let component: ReportFormComponent;
7
- let fixture: ComponentFixture<ReportFormComponent>;
8
-
9
- beforeEach(async () => {
10
- await TestBed.configureTestingModule({
11
- declarations: [ ReportFormComponent ]
12
- })
13
- .compileComponents();
14
- });
15
-
16
- beforeEach(() => {
17
- fixture = TestBed.createComponent(ReportFormComponent);
18
- component = fixture.componentInstance;
19
- fixture.detectChanges();
20
- });
21
-
22
- it('should create', () => {
23
- expect(component).toBeTruthy();
24
- });
25
- });
1
+ import {ComponentFixture, TestBed} from '@angular/core/testing';
2
+
3
+ import {ReportFormComponent} from './report-form.component';
4
+
5
+ describe('BaseFormComponent', () => {
6
+ let component: ReportFormComponent;
7
+ let fixture: ComponentFixture<ReportFormComponent>;
8
+
9
+ beforeEach(async () => {
10
+ await TestBed.configureTestingModule({
11
+ declarations: [ ReportFormComponent ]
12
+ })
13
+ .compileComponents();
14
+ });
15
+
16
+ beforeEach(() => {
17
+ fixture = TestBed.createComponent(ReportFormComponent);
18
+ component = fixture.componentInstance;
19
+ fixture.detectChanges();
20
+ });
21
+
22
+ it('should create', () => {
23
+ expect(component).toBeTruthy();
24
+ });
25
+ });