ngx-techlify-checksheet 18.0.0 → 18.1.0

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 (44) hide show
  1. package/esm2022/lib/checksheet/checksheet-form/checksheet-form.component.mjs +88 -116
  2. package/esm2022/lib/checksheet/checksheet-form-button/checksheet-form-button.component.mjs +10 -12
  3. package/esm2022/lib/checksheet/checksheet-format/checksheet-format-copy-button/checksheet-format-copy-button.component.mjs +56 -0
  4. package/esm2022/lib/checksheet/checksheet-format/checksheet-format-delete-button/checksheet-format-delete-button.component.mjs +54 -0
  5. package/esm2022/lib/checksheet/checksheet-format/checksheet-format-publish-button/checksheet-format-publish-button.component.mjs +68 -0
  6. package/esm2022/lib/checksheet/checksheet-format/checksheet-format-unpublish-button/checksheet-format-unpublish-button.component.mjs +57 -0
  7. package/esm2022/lib/checksheet/checksheet-format/checksheet-format-view/checksheet-format-view.component.mjs +140 -0
  8. package/esm2022/lib/checksheet/checksheet-format-form/checksheet-format-form.component.mjs +136 -0
  9. package/esm2022/lib/checksheet/checksheet-format-list/checksheet-format-list.component.mjs +9 -67
  10. package/esm2022/lib/checksheet/checksheet-list/checksheet-list.component.mjs +28 -11
  11. package/esm2022/lib/checksheet/checksheet-list-widget/checksheet-list-widget.component.mjs +59 -0
  12. package/esm2022/lib/checksheet/checksheet-node-view/checksheet-node-view.component.mjs +24 -24
  13. package/esm2022/lib/checksheet/checksheet-question/checksheet-question.component.mjs +12 -13
  14. package/esm2022/lib/checksheet/checksheet-question-list/checksheet-question-list.component.mjs +7 -9
  15. package/esm2022/lib/checksheet/checksheet-report/checksheet-report.component.mjs +3 -3
  16. package/esm2022/lib/checksheet/checksheet-routing.module.mjs +6 -6
  17. package/esm2022/lib/checksheet/checksheet-submission-file/checksheet-submission-files/checksheet-submission-files.component.mjs +83 -17
  18. package/esm2022/lib/checksheet/checksheet-submission-list/checksheet-submission-list.component.mjs +5 -5
  19. package/esm2022/lib/checksheet/checksheet-submission-view/checksheet-submission-view.component.mjs +4 -4
  20. package/esm2022/lib/checksheet/checksheet.module.mjs +42 -20
  21. package/esm2022/public-api.mjs +2 -2
  22. package/fesm2022/ngx-techlify-checksheet.mjs +570 -359
  23. package/fesm2022/ngx-techlify-checksheet.mjs.map +1 -1
  24. package/lib/checksheet/checksheet-form/checksheet-form.component.d.ts +15 -34
  25. package/lib/checksheet/checksheet-form-button/checksheet-form-button.component.d.ts +3 -4
  26. package/lib/checksheet/checksheet-format/checksheet-format-copy-button/checksheet-format-copy-button.component.d.ts +16 -0
  27. package/lib/checksheet/checksheet-format/checksheet-format-delete-button/checksheet-format-delete-button.component.d.ts +16 -0
  28. package/lib/checksheet/checksheet-format/checksheet-format-publish-button/checksheet-format-publish-button.component.d.ts +18 -0
  29. package/lib/checksheet/checksheet-format/checksheet-format-unpublish-button/checksheet-format-unpublish-button.component.d.ts +16 -0
  30. package/lib/checksheet/{checksheet-view/checksheet-view.component.d.ts → checksheet-format/checksheet-format-view/checksheet-format-view.component.d.ts} +4 -4
  31. package/lib/checksheet/checksheet-format-form/checksheet-format-form.component.d.ts +45 -0
  32. package/lib/checksheet/checksheet-format-list/checksheet-format-list.component.d.ts +0 -3
  33. package/lib/checksheet/checksheet-list/checksheet-list.component.d.ts +5 -3
  34. package/lib/checksheet/checksheet-list-widget/checksheet-list-widget.component.d.ts +17 -0
  35. package/lib/checksheet/checksheet-node-view/checksheet-node-view.component.d.ts +2 -4
  36. package/lib/checksheet/checksheet-submission-file/checksheet-submission-files/checksheet-submission-files.component.d.ts +14 -4
  37. package/lib/checksheet/checksheet.module.d.ts +12 -7
  38. package/package.json +1 -1
  39. package/public-api.d.ts +1 -1
  40. package/esm2022/lib/checksheet/checksheet-submission-form/checksheet-submission-form.component.mjs +0 -131
  41. package/esm2022/lib/checksheet/checksheet-submission-form-button/checksheet-submission-form-button.component.mjs +0 -58
  42. package/esm2022/lib/checksheet/checksheet-view/checksheet-view.component.mjs +0 -140
  43. package/lib/checksheet/checksheet-submission-form/checksheet-submission-form.component.d.ts +0 -27
  44. package/lib/checksheet/checksheet-submission-form-button/checksheet-submission-form-button.component.d.ts +0 -29
@@ -1,56 +1,58 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, Component, Inject, EventEmitter, Input, Output, ViewEncapsulation, NgModule } from '@angular/core';
2
+ import { Injectable, EventEmitter, Component, Input, Output, Inject, ViewEncapsulation, NgModule } from '@angular/core';
3
3
  import * as i4 from '@angular/common';
4
- import { CommonModule } from '@angular/common';
4
+ import { NgIf, CommonModule } from '@angular/common';
5
5
  import * as i6$2 from '@angular/router';
6
6
  import { RouterModule } from '@angular/router';
7
7
  import * as i2 from '@angular/forms';
8
8
  import { Validators, ReactiveFormsModule, FormControl, FormsModule } from '@angular/forms';
9
9
  import * as i1 from 'ngx-techlify-core';
10
- import { TechlifyServiceBaseClass, MaterialModule as MaterialModule$1, TechlifyListingControllerInterface, ActionPopupComponent, TechlifyFormComponentInterface, DateValidator, Timeline, LoaderModule, ActionPopupModule, SearchableSelectorModule, NoteModule, EntityFilesViewAllModule, ExportExcelModule, TimelineFilterModule } from 'ngx-techlify-core';
11
- import * as i3$1 from 'ngx-spinner';
10
+ import { TechlifyServiceBaseClass, ActionPopupComponent, MaterialModule as MaterialModule$1, TechlifyListingControllerInterface, FileDropperModule, ReadMoreModule, WrapPipe, TechlifyFormComponentInterface, DateValidator, Timeline, LoaderModule, ActionPopupModule, SearchableSelectorModule, NoteModule, EntityFilesViewAllModule, ExportExcelModule, TimelineFilterModule } from 'ngx-techlify-core';
11
+ import * as i3 from 'ngx-spinner';
12
12
  import * as i1$1 from '@angular/material/dialog';
13
13
  import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
14
14
  import * as i6 from '@angular/flex-layout/flex';
15
15
  import * as i8 from '@angular/material/button';
16
- import { MatButtonModule } from '@angular/material/button';
17
- import * as i7 from '@angular/material/card';
16
+ import { MatButton, MatButtonModule } from '@angular/material/button';
17
+ import * as i4$1 from '@angular/material/card';
18
18
  import { MatCardModule } from '@angular/material/card';
19
19
  import * as i10 from '@angular/material/form-field';
20
20
  import { MatFormFieldModule } from '@angular/material/form-field';
21
- import * as i12 from '@angular/material/input';
21
+ import * as i6$1 from '@angular/material/icon';
22
+ import { MatIcon, MatIconModule } from '@angular/material/icon';
23
+ import * as i11 from '@angular/material/input';
22
24
  import { MatInputModule } from '@angular/material/input';
23
- import * as i8$1 from '@angular/material/progress-bar';
25
+ import * as i9 from '@angular/material/progress-bar';
24
26
  import { MatProgressBarModule } from '@angular/material/progress-bar';
25
- import * as i11 from 'ngx-editor';
27
+ import * as i7$3 from '@angular/material/tooltip';
28
+ import { MatTooltip, MatTooltipModule } from '@angular/material/tooltip';
29
+ import * as i11$1 from 'ngx-editor';
26
30
  import { Editor, NgxEditorModule } from 'ngx-editor';
27
- import * as i3 from '@angular/material/icon';
28
- import { MatIconModule } from '@angular/material/icon';
29
- import * as i9$2 from 'ngx-infinite-scroll';
31
+ import * as i7$1 from 'ngx-infinite-scroll';
30
32
  import { InfiniteScrollModule } from 'ngx-infinite-scroll';
31
33
  import { __decorate } from 'tslib';
32
34
  import { debounceTime } from 'rxjs/operators';
33
35
  import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
34
- import * as i4$1 from '@angular/material/checkbox';
36
+ import * as i5 from '@angular/material/checkbox';
35
37
  import { MatCheckboxModule } from '@angular/material/checkbox';
36
- import * as i9 from '@angular/material/datepicker';
38
+ import * as i9$1 from '@angular/material/datepicker';
37
39
  import { MatDatepickerModule } from '@angular/material/datepicker';
38
- import * as i9$1 from '@angular/material/radio';
40
+ import * as i10$1 from '@angular/material/radio';
39
41
  import { MatRadioModule } from '@angular/material/radio';
40
42
  import { map, forkJoin, debounceTime as debounceTime$1, distinctUntilChanged } from 'rxjs';
41
- import * as i6$1 from '@angular/material/table';
43
+ import * as i7 from '@angular/material/table';
42
44
  import { MatTableModule } from '@angular/material/table';
43
- import * as i6$3 from '@angular/material/tooltip';
44
- import { MatTooltipModule } from '@angular/material/tooltip';
45
- import * as i7$1 from '@angular/material/core';
45
+ import * as i7$2 from '@angular/material/core';
46
46
  import { MatCommonModule, MatLineModule, MatNativeDateModule, MatOptionModule, MatPseudoCheckboxModule, MatRippleModule } from '@angular/material/core';
47
- import * as i12$1 from '@angular/material/select';
47
+ import * as i12 from '@angular/material/select';
48
48
  import { MatSelectModule } from '@angular/material/select';
49
49
  import moment from 'moment';
50
50
  import * as i13 from '@angular/material/sort';
51
51
  import { MatSortModule } from '@angular/material/sort';
52
52
  import * as i15 from 'ngx-permissions';
53
53
  import { NgxPermissionsModule } from 'ngx-permissions';
54
+ import * as i7$4 from 'ngx-avatars';
55
+ import { AvatarComponent } from 'ngx-avatars';
54
56
  import { FlexLayoutModule } from '@angular/flex-layout';
55
57
  import { MatAutocompleteModule } from '@angular/material/autocomplete';
56
58
  import { MatBadgeModule } from '@angular/material/badge';
@@ -92,6 +94,205 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
92
94
  }]
93
95
  }], ctorParameters: () => [{ type: i1.HttpService }] });
94
96
 
97
+ class ChecksheetFormatCopyButtonComponent {
98
+ dialog;
99
+ alertService;
100
+ service;
101
+ checksheetFormat;
102
+ changed = new EventEmitter();
103
+ constructor(dialog, alertService, service) {
104
+ this.dialog = dialog;
105
+ this.alertService = alertService;
106
+ this.service = service;
107
+ }
108
+ copyChecksheet() {
109
+ const dialogRef = this.dialog.open(ActionPopupComponent, {
110
+ width: '400px',
111
+ data: {
112
+ title: 'Copy Checksheet Format',
113
+ message: `Are you sure to proceed copy the ${this.checksheetFormat?.title}?`
114
+ },
115
+ autoFocus: false
116
+ });
117
+ dialogRef.afterClosed().subscribe(async (result) => {
118
+ if (result) {
119
+ this.service.copy(this.checksheetFormat).subscribe({
120
+ next: () => {
121
+ this.alertService.addAlert('Checksheet format copied successfully!', 'success');
122
+ this.changed.emit();
123
+ }
124
+ });
125
+ }
126
+ });
127
+ }
128
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetFormatCopyButtonComponent, deps: [{ token: i1$1.MatDialog }, { token: i1.AlertService }, { token: ChecksheetFormatService }], target: i0.ɵɵFactoryTarget.Component });
129
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ChecksheetFormatCopyButtonComponent, isStandalone: true, selector: "app-checksheet-format-copy-button", inputs: { checksheetFormat: "checksheetFormat" }, outputs: { changed: "changed" }, ngImport: i0, template: "<mat-icon *ngIf=\"!checksheetFormat.is_published\" (click)=\"copyChecksheet()\" matTooltip=\"Copy\" class=\"cursor-pointer\">\n content_copy\n</mat-icon>\n", styles: [""], dependencies: [{ kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
130
+ }
131
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetFormatCopyButtonComponent, decorators: [{
132
+ type: Component,
133
+ args: [{ selector: 'app-checksheet-format-copy-button', standalone: true, imports: [
134
+ MatIcon,
135
+ MatTooltip,
136
+ NgIf
137
+ ], template: "<mat-icon *ngIf=\"!checksheetFormat.is_published\" (click)=\"copyChecksheet()\" matTooltip=\"Copy\" class=\"cursor-pointer\">\n content_copy\n</mat-icon>\n" }]
138
+ }], ctorParameters: () => [{ type: i1$1.MatDialog }, { type: i1.AlertService }, { type: ChecksheetFormatService }], propDecorators: { checksheetFormat: [{
139
+ type: Input
140
+ }], changed: [{
141
+ type: Output
142
+ }] } });
143
+
144
+ class ChecksheetFormatDeleteButtonComponent {
145
+ dialog;
146
+ alertService;
147
+ service;
148
+ checksheetFormat;
149
+ deleted = new EventEmitter();
150
+ constructor(dialog, alertService, service) {
151
+ this.dialog = dialog;
152
+ this.alertService = alertService;
153
+ this.service = service;
154
+ }
155
+ delete() {
156
+ const dialogRef = this.dialog.open(ActionPopupComponent, {
157
+ width: '400px',
158
+ data: {
159
+ title: 'Deactivate Checksheet Format',
160
+ message: `Are you sure to proceed deactivate the ${this.checksheetFormat?.title}?`
161
+ },
162
+ autoFocus: false
163
+ });
164
+ dialogRef.afterClosed().subscribe(async (result) => {
165
+ if (result) {
166
+ this.service.delete(this.checksheetFormat).subscribe({
167
+ next: () => {
168
+ this.alertService.addAlert('Checksheet format deactivated successfully!', 'success');
169
+ this.deleted.emit();
170
+ }
171
+ });
172
+ }
173
+ });
174
+ }
175
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetFormatDeleteButtonComponent, deps: [{ token: i1$1.MatDialog }, { token: i1.AlertService }, { token: ChecksheetFormatService }], target: i0.ɵɵFactoryTarget.Component });
176
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ChecksheetFormatDeleteButtonComponent, isStandalone: true, selector: "app-checksheet-format-delete-button", inputs: { checksheetFormat: "checksheetFormat" }, outputs: { deleted: "deleted" }, ngImport: i0, template: "<mat-icon class=\"cursor-pointer\" *ngIf=\"!checksheetFormat?.submissions_count\" (click)=\"delete()\">\n delete\n</mat-icon>\n", styles: [""], dependencies: [{ kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
177
+ }
178
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetFormatDeleteButtonComponent, decorators: [{
179
+ type: Component,
180
+ args: [{ selector: 'app-checksheet-format-delete-button', standalone: true, imports: [
181
+ MatIcon,
182
+ NgIf
183
+ ], template: "<mat-icon class=\"cursor-pointer\" *ngIf=\"!checksheetFormat?.submissions_count\" (click)=\"delete()\">\n delete\n</mat-icon>\n" }]
184
+ }], ctorParameters: () => [{ type: i1$1.MatDialog }, { type: i1.AlertService }, { type: ChecksheetFormatService }], propDecorators: { checksheetFormat: [{
185
+ type: Input
186
+ }], deleted: [{
187
+ type: Output
188
+ }] } });
189
+
190
+ class ChecksheetFormatUnpublishButtonComponent {
191
+ dialog;
192
+ alertService;
193
+ service;
194
+ checksheetFormat;
195
+ changed = new EventEmitter();
196
+ constructor(dialog, alertService, service) {
197
+ this.dialog = dialog;
198
+ this.alertService = alertService;
199
+ this.service = service;
200
+ }
201
+ unpublishChecksheet() {
202
+ const dialogRef = this.dialog.open(ActionPopupComponent, {
203
+ width: '400px',
204
+ data: {
205
+ title: 'Unpublish Checksheet Format',
206
+ message: `Are you sure to unpublish the format ${this.checksheetFormat.title}?
207
+ This checksheet format would no longer be available to team members to create submissions for. `
208
+ },
209
+ autoFocus: false
210
+ });
211
+ dialogRef.afterClosed().subscribe(async (result) => {
212
+ if (result) {
213
+ this.service.unpublish(this.checksheetFormat).subscribe({
214
+ next: () => {
215
+ this.alertService.addAlert('Checksheet Format unpublished successfully!', 'success');
216
+ this.changed.emit();
217
+ }
218
+ });
219
+ }
220
+ });
221
+ }
222
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetFormatUnpublishButtonComponent, deps: [{ token: i1$1.MatDialog }, { token: i1.AlertService }, { token: ChecksheetFormatService }], target: i0.ɵɵFactoryTarget.Component });
223
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ChecksheetFormatUnpublishButtonComponent, isStandalone: true, selector: "app-checksheet-format-unpublish-button", inputs: { checksheetFormat: "checksheetFormat" }, outputs: { changed: "changed" }, ngImport: i0, template: "<mat-icon class=\"cursor-pointer\" *ngIf=\"checksheetFormat?.is_published\" matTooltip=\"Unpublish\"\n (click)=\"unpublishChecksheet()\">\n unpublished\n</mat-icon>\n", styles: [""], dependencies: [{ kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
224
+ }
225
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetFormatUnpublishButtonComponent, decorators: [{
226
+ type: Component,
227
+ args: [{ selector: 'app-checksheet-format-unpublish-button', standalone: true, imports: [
228
+ MatIcon,
229
+ MatTooltip,
230
+ NgIf
231
+ ], template: "<mat-icon class=\"cursor-pointer\" *ngIf=\"checksheetFormat?.is_published\" matTooltip=\"Unpublish\"\n (click)=\"unpublishChecksheet()\">\n unpublished\n</mat-icon>\n" }]
232
+ }], ctorParameters: () => [{ type: i1$1.MatDialog }, { type: i1.AlertService }, { type: ChecksheetFormatService }], propDecorators: { checksheetFormat: [{
233
+ type: Input
234
+ }], changed: [{
235
+ type: Output
236
+ }] } });
237
+
238
+ class ChecksheetFormatPublishButtonComponent {
239
+ dialog;
240
+ alertService;
241
+ service;
242
+ checksheetFormat;
243
+ changed = new EventEmitter();
244
+ viewMode = 'button';
245
+ isSaving = false;
246
+ constructor(dialog, alertService, service) {
247
+ this.dialog = dialog;
248
+ this.alertService = alertService;
249
+ this.service = service;
250
+ }
251
+ publishChecksheet() {
252
+ const dialogRef = this.dialog.open(ActionPopupComponent, {
253
+ width: '400px',
254
+ data: {
255
+ title: 'Publish Checksheet Format',
256
+ message: `Review the checksheet format completely before publishing, you cannot alter once it is published.
257
+ Are you sure to publish the Checksheet format?`
258
+ },
259
+ autoFocus: false
260
+ });
261
+ dialogRef.afterClosed().subscribe(async (result) => {
262
+ if (result) {
263
+ const model = { ...this.checksheetFormat };
264
+ model.is_published = true;
265
+ this.isSaving = true;
266
+ this.service.update(model).subscribe({
267
+ next: (response) => {
268
+ this.alertService.addAlert('Checksheet format published successfully.', 'success');
269
+ this.changed.emit(response?.item);
270
+ this.isSaving = false;
271
+ },
272
+ error: () => { this.isSaving = false; }
273
+ });
274
+ }
275
+ });
276
+ }
277
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetFormatPublishButtonComponent, deps: [{ token: i1$1.MatDialog }, { token: i1.AlertService }, { token: ChecksheetFormatService }], target: i0.ɵɵFactoryTarget.Component });
278
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ChecksheetFormatPublishButtonComponent, isStandalone: true, selector: "app-checksheet-format-publish-button", inputs: { checksheetFormat: "checksheetFormat", viewMode: "viewMode" }, outputs: { changed: "changed" }, ngImport: i0, template: "<button mat-raised-button [disabled]=\"isSaving\" color=\"accent\" type=\"button\" (click)=\"publishChecksheet()\"\n *ngIf=\"viewMode === 'button' && !checksheetFormat?.is_published\">\n Publish\n</button>\n<span matTooltip=\"Publish\" class=\"material-symbols-outlined cursor-pointer\" (click)=\"publishChecksheet()\"\n *ngIf=\"viewMode === 'icon' && !checksheetFormat?.is_published\">\n published_with_changes\n</span>\n", styles: [""], dependencies: [{ kind: "component", type: MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }] });
279
+ }
280
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetFormatPublishButtonComponent, decorators: [{
281
+ type: Component,
282
+ args: [{ selector: 'app-checksheet-format-publish-button', standalone: true, imports: [
283
+ MatButton,
284
+ NgIf,
285
+ MatIcon,
286
+ MatTooltip
287
+ ], template: "<button mat-raised-button [disabled]=\"isSaving\" color=\"accent\" type=\"button\" (click)=\"publishChecksheet()\"\n *ngIf=\"viewMode === 'button' && !checksheetFormat?.is_published\">\n Publish\n</button>\n<span matTooltip=\"Publish\" class=\"material-symbols-outlined cursor-pointer\" (click)=\"publishChecksheet()\"\n *ngIf=\"viewMode === 'icon' && !checksheetFormat?.is_published\">\n published_with_changes\n</span>\n" }]
288
+ }], ctorParameters: () => [{ type: i1$1.MatDialog }, { type: i1.AlertService }, { type: ChecksheetFormatService }], propDecorators: { checksheetFormat: [{
289
+ type: Input
290
+ }], changed: [{
291
+ type: Output
292
+ }], viewMode: [{
293
+ type: Input
294
+ }] } });
295
+
95
296
  class ChecksheetFormatQuestionService extends TechlifyServiceBaseClass {
96
297
  constructor(httpService) {
97
298
  super(httpService, 'checksheet-format-questions');
@@ -228,7 +429,7 @@ class ChecksheetQuestionFormComponent {
228
429
  return this.formValidatorService.getErrorMessage(field, formGroup, errorMessages$4);
229
430
  }
230
431
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetQuestionFormComponent, deps: [{ token: i1$1.MatDialogRef }, { token: MAT_DIALOG_DATA }, { token: i2.UntypedFormBuilder }, { token: i1.FormValidatorService }, { token: i1.AlertService }, { token: ChecksheetFormatQuestionService }], target: i0.ɵɵFactoryTarget.Component });
231
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ChecksheetQuestionFormComponent, selector: "app-checksheet-question-form", ngImport: i0, template: "<form [formGroup]=\"questionFormGroup\" (ngSubmit)=\"submit()\">\n <div fxLayout=\"column\" class=\"mat-typography\">\n <div mat-dialog-title class=\"text-center\">\n <div>Checksheet Question</div>\n </div>\n\n <div mat-dialog-content fxLayout=\"row wrap\" fxLayoutAlign=\"space-between\">\n <div fxFlex=\"100%\" class=\"mt-2\">Question</div>\n <div fxFlex=\"100%\" class=\"mt-3 border\">\n <div class=\"NgxEditor__Wrapper\">\n <ngx-editor-menu [editor]=\"editor\"> </ngx-editor-menu>\n <ngx-editor [editor]=\"editor\" formControlName=\"label\"></ngx-editor>\n </div>\n </div>\n <div class=\"text-danger my-1\" fxFlex=\"100%\" *ngIf=\"isFieldValid('label')\">\n {{ getErrorMessage('label') }}\n </div>\n\n <mat-form-field fxFlex=\"100%\" class=\"mt-2\">\n <mat-label>Question Type</mat-label>\n <app-searchable-selector\n apiUrl=\"api/checksheet-question-types\"\n [enableSearch]=\"false\"\n formControlName=\"type_id\"\n (selectionChange)=\"questionChange($event)\"\n ></app-searchable-selector>\n <mat-error *ngIf=\"isFieldValid('type_id')\">\n {{ getErrorMessage('type_id') }}\n </mat-error>\n </mat-form-field>\n\n <div\n fxFlex=\"100%\"\n fxLayout=\"column\"\n fxLayoutGap=\"0.25rem\"\n *ngIf=\"isChoiceTypeSelected\"\n >\n <div fxLayout=\"row\" fxLayoutAlign=\"center center\">\n <h3 class=\"m-0\">Answers</h3>\n <button\n mat-icon-button\n color=\"primary\"\n type=\"button\"\n (click)=\"addAnswer()\"\n >\n <mat-icon>add</mat-icon>\n </button>\n </div>\n\n <ng-container\n formArrayName=\"answers\"\n *ngFor=\"let answer of answerFormArray.controls; let i = index\"\n >\n <form\n [formGroupName]=\"i\"\n fxLayout=\"row\"\n fxLayoutAlign=\"center center\"\n fxLayoutGap=\"0.5rem\"\n >\n <mat-form-field>\n <input\n matInput\n formControlName=\"value\"\n placeholder=\"Answer\"\n autocomplete=\"off\"\n required\n />\n <mat-error *ngIf=\"isFieldValid('value', answer)\"\n >{{ getErrorMessage('value', answer) }}\n </mat-error>\n </mat-form-field>\n\n <button\n [disabled]=\"questionFormGroup.get('answers')?.value?.length <= 2\"\n mat-icon-button\n color=\"primary\"\n type=\"button\"\n (click)=\"answerFormArray.removeAt(i)\"\n >\n <mat-icon>delete</mat-icon>\n </button>\n </form>\n </ng-container>\n </div>\n\n <div\n class=\"my-2\"\n fxLayout=\"row\"\n fxLayoutGap=\"30px\"\n fxLayoutAlign=\"end\"\n fxFlex=\"100%\"\n >\n <button\n [disabled]=\"isSaving\"\n mat-raised-button\n type=\"button\"\n (click)=\"cancel()\"\n >\n Cancel\n </button>\n <button\n [disabled]=\"isSaving\"\n mat-raised-button\n type=\"submit\"\n color=\"primary\"\n >\n Save\n </button>\n </div>\n </div>\n </div>\n</form>\n", styles: [":host ::ng-deep .ck.ck-content{min-height:200px!important}::ng-deep .ck.ck-balloon-panel{z-index:10000!important}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i6.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i6.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i6.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "component", type: i8.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i8.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "directive", type: i1$1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i10.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i10.MatLabel, selector: "mat-label" }, { kind: "directive", type: i10.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i12.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i2.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "component", type: i11.NgxEditorComponent, selector: "ngx-editor", inputs: ["editor", "outputFormat", "placeholder"], outputs: ["focusOut", "focusIn"] }, { kind: "component", type: i11.MenuComponent, selector: "ngx-editor-menu", inputs: ["toolbar", "colorPresets", "disabled", "editor", "customMenuRef", "dropdownPlacement"] }] });
432
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ChecksheetQuestionFormComponent, selector: "app-checksheet-question-form", ngImport: i0, template: "<form [formGroup]=\"questionFormGroup\" (ngSubmit)=\"submit()\">\n <div fxLayout=\"column\" class=\"mat-typography\">\n <div mat-dialog-title class=\"text-center\">\n <div>Checksheet Question</div>\n </div>\n\n <div mat-dialog-content fxLayout=\"row wrap\" fxLayoutAlign=\"space-between\">\n <div fxFlex=\"100%\" class=\"mt-2\">Question</div>\n <div fxFlex=\"100%\" class=\"mt-3 border\">\n <div class=\"NgxEditor__Wrapper\">\n <ngx-editor-menu [editor]=\"editor\"> </ngx-editor-menu>\n <ngx-editor [editor]=\"editor\" formControlName=\"label\"></ngx-editor>\n </div>\n </div>\n <div class=\"text-danger my-1\" fxFlex=\"100%\" *ngIf=\"isFieldValid('label')\">\n {{ getErrorMessage('label') }}\n </div>\n\n <mat-form-field fxFlex=\"100%\" class=\"mt-2\">\n <mat-label>Question Type</mat-label>\n <app-searchable-selector\n apiUrl=\"api/checksheet-question-types\"\n [enableSearch]=\"false\"\n formControlName=\"type_id\"\n (selectionChange)=\"questionChange($event)\"\n ></app-searchable-selector>\n <mat-error *ngIf=\"isFieldValid('type_id')\">\n {{ getErrorMessage('type_id') }}\n </mat-error>\n </mat-form-field>\n\n <div\n fxFlex=\"100%\"\n fxLayout=\"column\"\n fxLayoutGap=\"0.25rem\"\n *ngIf=\"isChoiceTypeSelected\"\n >\n <div fxLayout=\"row\" fxLayoutAlign=\"center center\">\n <h3 class=\"m-0\">Answers</h3>\n <button\n mat-icon-button\n color=\"primary\"\n type=\"button\"\n (click)=\"addAnswer()\"\n >\n <mat-icon>add</mat-icon>\n </button>\n </div>\n\n <ng-container\n formArrayName=\"answers\"\n *ngFor=\"let answer of answerFormArray.controls; let i = index\"\n >\n <form\n [formGroupName]=\"i\"\n fxLayout=\"row\"\n fxLayoutAlign=\"center center\"\n fxLayoutGap=\"0.5rem\"\n >\n <mat-form-field>\n <input\n matInput\n formControlName=\"value\"\n placeholder=\"Answer\"\n autocomplete=\"off\"\n required\n />\n <mat-error *ngIf=\"isFieldValid('value', answer)\"\n >{{ getErrorMessage('value', answer) }}\n </mat-error>\n </mat-form-field>\n\n <button\n [disabled]=\"questionFormGroup.get('answers')?.value?.length <= 2\"\n mat-icon-button\n color=\"primary\"\n type=\"button\"\n (click)=\"answerFormArray.removeAt(i)\"\n >\n <mat-icon>delete</mat-icon>\n </button>\n </form>\n </ng-container>\n </div>\n\n <div\n class=\"my-2\"\n fxLayout=\"row\"\n fxLayoutGap=\"30px\"\n fxLayoutAlign=\"end\"\n fxFlex=\"100%\"\n >\n <button\n [disabled]=\"isSaving\"\n mat-raised-button\n type=\"button\"\n (click)=\"cancel()\"\n >\n Cancel\n </button>\n <button\n [disabled]=\"isSaving\"\n mat-raised-button\n type=\"submit\"\n color=\"primary\"\n >\n Save\n </button>\n </div>\n </div>\n </div>\n</form>\n", styles: [":host ::ng-deep .ck.ck-content{min-height:200px!important}::ng-deep .ck.ck-balloon-panel{z-index:10000!important}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i6.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i6.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i6.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "component", type: i8.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i8.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "directive", type: i1$1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i10.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i10.MatLabel, selector: "mat-label" }, { kind: "directive", type: i10.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "component", type: i6$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i2.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "component", type: i11$1.NgxEditorComponent, selector: "ngx-editor", inputs: ["editor", "outputFormat", "placeholder"], outputs: ["focusOut", "focusIn"] }, { kind: "component", type: i11$1.MenuComponent, selector: "ngx-editor-menu", inputs: ["toolbar", "colorPresets", "disabled", "editor", "customMenuRef", "dropdownPlacement"] }] });
232
433
  }
233
434
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetQuestionFormComponent, decorators: [{
234
435
  type: Component,
@@ -252,48 +453,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
252
453
  }]
253
454
  }], ctorParameters: () => [{ type: i1.HttpService }] });
254
455
 
255
- class FileUploadButtonComponent {
256
- entityFileService;
257
- config;
258
- uploaded = new EventEmitter();
259
- DEFAULT_FILE_ID = 'file-upload-button';
260
- isUploading;
261
- constructor(entityFileService) {
262
- this.entityFileService = entityFileService;
263
- }
264
- async onFileChange(event) {
265
- if (event.target.files && event.target.files.length) {
266
- const fileArray = Array.from(event.target.files);
267
- const fileInput = document.getElementById(this.config?.fileId ?? this.DEFAULT_FILE_ID);
268
- fileInput.value = '';
269
- this.isUploading = true;
270
- const results = await this.uploadFiles(fileArray);
271
- this.uploaded.emit(results);
272
- this.isUploading = false;
273
- }
274
- }
275
- selectFiles(event) {
276
- event.preventDefault();
277
- document
278
- .getElementById(this.config?.fileId ?? this.DEFAULT_FILE_ID)
279
- ?.click();
280
- }
281
- async uploadFiles(files) {
282
- const uploadPromises = files.map((file) => this.entityFileService.uploadEntityFile(file));
283
- return await Promise.all(uploadPromises);
284
- }
285
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FileUploadButtonComponent, deps: [{ token: i1.EntityFileService }], target: i0.ɵɵFactoryTarget.Component });
286
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: FileUploadButtonComponent, isStandalone: true, selector: "app-file-upload-button", inputs: { config: "config" }, outputs: { uploaded: "uploaded" }, ngImport: i0, template: "<button\n [disabled]=\"isUploading\"\n mat-stroked-button\n type=\"button\"\n (click)=\"selectFiles($event)\"\n>\n <mat-icon>attachment</mat-icon> Attach\n</button>\n\n<input\n type=\"file\"\n id=\"{{ config.fileId ?? DEFAULT_FILE_ID }}\"\n [accept]=\"config.accept ?? '*'\"\n (change)=\"onFileChange($event)\"\n [multiple]=\"config.multiple ?? false\"\n class=\"d-none\"\n/>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i8.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
287
- }
288
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FileUploadButtonComponent, decorators: [{
289
- type: Component,
290
- args: [{ selector: 'app-file-upload-button', standalone: true, imports: [CommonModule, MatButtonModule, MatIconModule], template: "<button\n [disabled]=\"isUploading\"\n mat-stroked-button\n type=\"button\"\n (click)=\"selectFiles($event)\"\n>\n <mat-icon>attachment</mat-icon> Attach\n</button>\n\n<input\n type=\"file\"\n id=\"{{ config.fileId ?? DEFAULT_FILE_ID }}\"\n [accept]=\"config.accept ?? '*'\"\n (change)=\"onFileChange($event)\"\n [multiple]=\"config.multiple ?? false\"\n class=\"d-none\"\n/>\n" }]
291
- }], ctorParameters: () => [{ type: i1.EntityFileService }], propDecorators: { config: [{
292
- type: Input
293
- }], uploaded: [{
294
- type: Output
295
- }] } });
296
-
297
456
  class ChecksheetSubmissionFileService extends TechlifyServiceBaseClass {
298
457
  constructor(httpService) {
299
458
  super(httpService, 'checksheet-submission-files');
@@ -308,46 +467,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
308
467
  }]
309
468
  }], ctorParameters: () => [{ type: i1.HttpService }] });
310
469
 
311
- class ChecksheetSubmissionFileUploadComponent {
312
- checksheetSubmissionFileService;
313
- submissionId;
314
- questionId;
315
- uploaded = new EventEmitter();
316
- constructor(checksheetSubmissionFileService) {
317
- this.checksheetSubmissionFileService = checksheetSubmissionFileService;
318
- }
319
- onUploadComplete(uploadedFiles) {
320
- const uploadObservables = uploadedFiles.map((file) => {
321
- const data = {
322
- file_name: file.item.file_name,
323
- file_url: file.item.url,
324
- submission_id: this.submissionId,
325
- question_id: this.questionId
326
- };
327
- return this.checksheetSubmissionFileService
328
- .store(data)
329
- .pipe(map((response) => response?.item));
330
- });
331
- forkJoin(uploadObservables).subscribe({
332
- next: (checksheetSubmissionFiles) => {
333
- this.uploaded.emit(checksheetSubmissionFiles);
334
- }
335
- });
336
- }
337
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetSubmissionFileUploadComponent, deps: [{ token: ChecksheetSubmissionFileService }], target: i0.ɵɵFactoryTarget.Component });
338
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ChecksheetSubmissionFileUploadComponent, isStandalone: true, selector: "app-checksheet-submission-file-upload", inputs: { submissionId: "submissionId", questionId: "questionId" }, outputs: { uploaded: "uploaded" }, ngImport: i0, template: "<app-file-upload-button\n (uploaded)=\"onUploadComplete($event)\"\n [config]=\"{ fileId: 'question-' + questionId }\"\n></app-file-upload-button>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: FileUploadButtonComponent, selector: "app-file-upload-button", inputs: ["config"], outputs: ["uploaded"] }] });
339
- }
340
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetSubmissionFileUploadComponent, decorators: [{
341
- type: Component,
342
- args: [{ selector: 'app-checksheet-submission-file-upload', standalone: true, imports: [CommonModule, FileUploadButtonComponent], template: "<app-file-upload-button\n (uploaded)=\"onUploadComplete($event)\"\n [config]=\"{ fileId: 'question-' + questionId }\"\n></app-file-upload-button>\n" }]
343
- }], ctorParameters: () => [{ type: ChecksheetSubmissionFileService }], propDecorators: { submissionId: [{
344
- type: Input
345
- }], questionId: [{
346
- type: Input
347
- }], uploaded: [{
348
- type: Output
349
- }] } });
350
-
351
470
  class ChecksheetSubmissionFileDeleteButtonComponent {
352
471
  matDialog;
353
472
  checksheetSubmissionFileService;
@@ -383,7 +502,7 @@ class ChecksheetSubmissionFileDeleteButtonComponent {
383
502
  });
384
503
  }
385
504
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetSubmissionFileDeleteButtonComponent, deps: [{ token: i1$1.MatDialog }, { token: ChecksheetSubmissionFileService }], target: i0.ɵɵFactoryTarget.Component });
386
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ChecksheetSubmissionFileDeleteButtonComponent, isStandalone: true, selector: "app-checksheet-submission-file-delete-button", inputs: { checksheetSubmissionFile: "checksheetSubmissionFile" }, outputs: { deleted: "deleted" }, ngImport: i0, template: "<mat-icon class=\"cursor-pointer\" (click)=\"openDialog(deleteTemplate)\">\n delete\n</mat-icon>\n\n<ng-template #deleteTemplate>\n <h3 mat-dialog-title>Delete Checksheet Attachment</h3>\n <div mat-dialog-content>\n <p>Are you sure you want to delete the file?</p>\n </div>\n <div\n mat-dialog-actions\n class=\"d-flex justify-content-end gap-2 align-items-center\"\n >\n <button\n [disabled]=\"isDeleting\"\n type=\"button\"\n mat-flat-button\n mat-dialog-close\n >\n Cancel\n </button>\n <button\n [disabled]=\"isDeleting\"\n type=\"button\"\n (click)=\"deleteModel()\"\n mat-raised-button\n color=\"warn\"\n >\n Delete\n </button>\n </div>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MaterialModule$1 }, { kind: "component", type: i8.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: i1$1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1$1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1$1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }] });
505
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ChecksheetSubmissionFileDeleteButtonComponent, isStandalone: true, selector: "app-checksheet-submission-file-delete-button", inputs: { checksheetSubmissionFile: "checksheetSubmissionFile" }, outputs: { deleted: "deleted" }, ngImport: i0, template: "<mat-icon class=\"cursor-pointer\" (click)=\"openDialog(deleteTemplate)\">\n delete\n</mat-icon>\n\n<ng-template #deleteTemplate>\n <h3 mat-dialog-title>Delete Checksheet Attachment</h3>\n <div mat-dialog-content>\n <p>Are you sure you want to delete the file?</p>\n </div>\n <div\n mat-dialog-actions\n class=\"d-flex justify-content-end gap-2 align-items-center\"\n >\n <button\n [disabled]=\"isDeleting\"\n type=\"button\"\n mat-flat-button\n mat-dialog-close\n >\n Cancel\n </button>\n <button\n [disabled]=\"isDeleting\"\n type=\"button\"\n (click)=\"deleteModel()\"\n mat-raised-button\n color=\"warn\"\n >\n Delete\n </button>\n </div>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i6$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MaterialModule$1 }, { kind: "component", type: i8.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: i1$1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1$1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1$1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }] });
387
506
  }
388
507
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetSubmissionFileDeleteButtonComponent, decorators: [{
389
508
  type: Component,
@@ -396,14 +515,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
396
515
 
397
516
  class ChecksheetSubmissionFilesComponent extends TechlifyListingControllerInterface {
398
517
  formBuilder;
399
- checksheetSubmissionFileService;
518
+ service;
519
+ entityFileService;
520
+ alertService;
400
521
  submissionId;
401
522
  questionId;
523
+ viewMode = 'horizontal-timeline';
524
+ fileDropperHeight = '150px';
525
+ allowMultipleFiles = false;
402
526
  displayedColumns = ['No', 'File', 'Actions'];
403
- constructor(formBuilder, checksheetSubmissionFileService) {
527
+ fileConfig;
528
+ fileList = [];
529
+ constructor(formBuilder, service, entityFileService, alertService) {
404
530
  super();
405
531
  this.formBuilder = formBuilder;
406
- this.checksheetSubmissionFileService = checksheetSubmissionFileService;
532
+ this.service = service;
533
+ this.entityFileService = entityFileService;
534
+ this.alertService = alertService;
407
535
  this.lastPage = 0;
408
536
  this.filterForm = this.formBuilder.group({
409
537
  search: [''],
@@ -412,6 +540,17 @@ class ChecksheetSubmissionFilesComponent extends TechlifyListingControllerInterf
412
540
  });
413
541
  }
414
542
  ngOnInit() {
543
+ this.fileConfig = {
544
+ fileId: "entityDashboardDropper-" + this.submissionId + '-' + this.questionId,
545
+ containerId: "entityDashboardDropperContainer-" + this.submissionId + '-' + this.questionId,
546
+ styles: {
547
+ height: this.fileDropperHeight
548
+ },
549
+ multiple: this.allowMultipleFiles,
550
+ acceptFile: "*",
551
+ maxSize: 10,
552
+ acceptFileText: "All Files"
553
+ };
415
554
  this.filterForm.patchValue({
416
555
  submission_ids: this.submissionId ?? '',
417
556
  question_ids: this.questionId ?? ''
@@ -423,10 +562,11 @@ class ChecksheetSubmissionFilesComponent extends TechlifyListingControllerInterf
423
562
  const params = {
424
563
  ...this.filterForm.value,
425
564
  perPage: this.perPage,
426
- page: this.page
565
+ page: this.page,
566
+ with: 'creator'
427
567
  };
428
568
  this.isWorking = true;
429
- this.checksheetSubmissionFileService.index(params).subscribe({
569
+ this.service.index(params).subscribe({
430
570
  next: (response) => {
431
571
  this.models = this.models.concat(response?.data);
432
572
  this.lastPage = response?.last_page;
@@ -434,16 +574,59 @@ class ChecksheetSubmissionFilesComponent extends TechlifyListingControllerInterf
434
574
  complete: () => (this.isWorking = false)
435
575
  });
436
576
  }
437
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetSubmissionFilesComponent, deps: [{ token: i2.FormBuilder }, { token: ChecksheetSubmissionFileService }], target: i0.ɵɵFactoryTarget.Component });
438
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ChecksheetSubmissionFilesComponent, isStandalone: true, selector: "app-checksheet-submission-files", inputs: { submissionId: "submissionId", questionId: "questionId" }, usesInheritance: true, ngImport: i0, template: "<mat-card class=\"p-0\">\n <mat-card-content\n class=\"p-2 mb-0 d-flex justify-content-between align-items-center\"\n >\n <div>\n <h3 class=\"mb-0\">Files</h3>\n </div>\n <form [formGroup]=\"filterForm\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input\n formControlName=\"search\"\n type=\"text\"\n matInput\n placeholder=\"Search\"\n />\n </mat-form-field>\n </form>\n </mat-card-content>\n <mat-card-content class=\"p-0\">\n <table mat-table [dataSource]=\"models\" class=\"w-100\">\n <!-- No Column -->\n <ng-container matColumnDef=\"No\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <!-- Title Column -->\n <ng-container matColumnDef=\"Title\">\n <th mat-header-cell *matHeaderCellDef>Title</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.title }}</td>\n </ng-container>\n\n <!-- Details Column -->\n <ng-container matColumnDef=\"Details\">\n <th mat-header-cell *matHeaderCellDef>Details</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.description }}</td>\n </ng-container>\n\n <!-- File Column -->\n <ng-container matColumnDef=\"File\">\n <th mat-header-cell *matHeaderCellDef>File</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.file_name }}</td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"Actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <a\n class=\"text-decoration-none cursor-pointer text-dark\"\n [href]=\"element?.file_url\"\n target=\"_blank\"\n >\n <span class=\"material-symbols-outlined\"> visibility </span>\n </a>\n\n <app-checksheet-submission-file-delete-button\n [checksheetSubmissionFile]=\"element\"\n (deleted)=\"reload()\"\n ></app-checksheet-submission-file-delete-button>\n </div>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isWorking\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MaterialModule$1 }, { kind: "component", type: i10.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i10.MatLabel, selector: "mat-label" }, { kind: "directive", type: i12.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i6$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i6$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i6$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i6$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i6$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i6$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i6$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i6$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i6$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i6$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i7.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i7.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i8$1.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "ngmodule", type: MatProgressBarModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: ChecksheetSubmissionFileDeleteButtonComponent, selector: "app-checksheet-submission-file-delete-button", inputs: ["checksheetSubmissionFile"], outputs: ["deleted"] }] });
577
+ async fileChanged(event) {
578
+ if (event && event?.length > 0) {
579
+ const fileArray = Array.from(event);
580
+ // upload files
581
+ const results = await this.uploadFiles(fileArray);
582
+ // link with submission question
583
+ this.onUploadComplete(results);
584
+ }
585
+ }
586
+ async uploadFiles(files) {
587
+ const uploadPromises = files.map((file) => this.entityFileService.uploadEntityFile(file));
588
+ return await Promise.all(uploadPromises);
589
+ }
590
+ onUploadComplete(uploadedFiles) {
591
+ const uploadObservables = uploadedFiles.map((file) => {
592
+ const data = {
593
+ file_name: file.item.file_name,
594
+ file_url: file.item.url,
595
+ submission_id: this.submissionId,
596
+ question_id: this.questionId
597
+ };
598
+ return this.service
599
+ .store(data)
600
+ .pipe(map((response) => response?.item));
601
+ });
602
+ forkJoin(uploadObservables).subscribe({
603
+ next: () => {
604
+ this.reload();
605
+ this.fileList = [];
606
+ const fileInput = document.getElementById("entityDashboardDropper-" + this.submissionId + '-' + this.questionId);
607
+ fileInput.value = '';
608
+ }
609
+ });
610
+ }
611
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetSubmissionFilesComponent, deps: [{ token: i2.FormBuilder }, { token: ChecksheetSubmissionFileService }, { token: i1.EntityFileService }, { token: i1.AlertService }], target: i0.ɵɵFactoryTarget.Component });
612
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ChecksheetSubmissionFilesComponent, isStandalone: true, selector: "app-checksheet-submission-files", inputs: { submissionId: "submissionId", questionId: "questionId", viewMode: "viewMode", fileDropperHeight: "fileDropperHeight", allowMultipleFiles: "allowMultipleFiles" }, usesInheritance: true, ngImport: i0, template: "<mat-card class=\"p-0\" *ngIf=\"viewMode === 'table'\">\n <mat-card-content\n class=\"p-2 mb-0 d-flex justify-content-between align-items-center\"\n >\n <div>\n <h3 class=\"mb-0\">Files</h3>\n </div>\n <form [formGroup]=\"filterForm\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input\n formControlName=\"search\"\n type=\"text\"\n matInput\n placeholder=\"Search\"\n />\n </mat-form-field>\n </form>\n </mat-card-content>\n <mat-card-content class=\"p-0\">\n <table mat-table [dataSource]=\"models\" class=\"w-100\">\n <!-- No Column -->\n <ng-container matColumnDef=\"No\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <!-- Title Column -->\n <ng-container matColumnDef=\"Title\">\n <th mat-header-cell *matHeaderCellDef>Title</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.title }}</td>\n </ng-container>\n\n <!-- Details Column -->\n <ng-container matColumnDef=\"Details\">\n <th mat-header-cell *matHeaderCellDef>Details</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.description }}</td>\n </ng-container>\n\n <!-- File Column -->\n <ng-container matColumnDef=\"File\">\n <th mat-header-cell *matHeaderCellDef>File</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.file_name }}</td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"Actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <a\n class=\"text-decoration-none cursor-pointer text-dark\"\n [href]=\"element?.file_url\"\n target=\"_blank\"\n >\n <span class=\"material-symbols-outlined\"> visibility </span>\n </a>\n\n <app-checksheet-submission-file-delete-button\n [checksheetSubmissionFile]=\"element\"\n (deleted)=\"reload()\"\n ></app-checksheet-submission-file-delete-button>\n </div>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isWorking\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>\n\n<mat-card *ngIf=\"viewMode === 'horizontal-timeline'\">\n <mat-card-content class=\"mt-3 d-flex justify-content-start gap-3\">\n <app-file-dropper class=\"w-50\" [config]=\"fileConfig\" (fileChanged)=\"fileChanged($event)\" [fileArray]=\"fileList\">\n </app-file-dropper>\n <div style=\"width: calc(50% - 1rem)\">\n <div *ngFor=\"let model of models\" class=\"d-flex flex-column gap-0\">\n <div class=\"d-flex flex-column gap-0\">\n <div class=\"d-flex justify-content-between align-items-center gap-1\">\n <p class=\"mb-0 fw-bold text-wrap\">{{ model?.file_name | wrap:20 }}</p>\n </div>\n </div>\n <app-read-more [text]=\"model?.details\" [maxLength]=\"50\"></app-read-more>\n <div class=\"d-flex justify-content-between gap-2\">\n <small class=\"text-secondary\" style=\"max-width: 70%\">\n <i>Uploaded By {{ model?.creator?.name }} {{ model?.created_at | date: 'mediumDate'}}</i>\n </small>\n <div class=\"d-flex justify-content-end align-items-center gap-1\">\n <a class=\"text-decoration-none cursor-pointer text-dark\" [href]=\"model?.file_url\" target=\"_blank\">\n <span class=\"material-symbols-outlined\"> download </span>\n </a>\n <app-checksheet-submission-file-delete-button [checksheetSubmissionFile]=\"model\" (deleted)=\"reload()\">\n </app-checksheet-submission-file-delete-button>\n </div>\n </div>\n <hr style=\"margin: 0.5rem 0\">\n </div>\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isWorking\"></mat-progress-bar>\n </div>\n </mat-card-content>\n</mat-card>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i4.DatePipe, name: "date" }, { kind: "ngmodule", type: MaterialModule$1 }, { kind: "component", type: i10.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i10.MatLabel, selector: "mat-label" }, { kind: "directive", type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i7.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i7.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i7.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i7.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i7.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i7.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i7.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i7.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i7.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i7.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i4$1.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4$1.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "ngmodule", type: MatProgressBarModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: ChecksheetSubmissionFileDeleteButtonComponent, selector: "app-checksheet-submission-file-delete-button", inputs: ["checksheetSubmissionFile"], outputs: ["deleted"] }, { kind: "ngmodule", type: FileDropperModule }, { kind: "component", type: i1.FileDropperComponent, selector: "app-file-dropper", inputs: ["fileArray", "config", "styles"], outputs: ["fileChanged"] }, { kind: "ngmodule", type: ReadMoreModule }, { kind: "component", type: i1.ReadMoreComponent, selector: "app-read-more", inputs: ["text", "maxLength"] }, { kind: "pipe", type: WrapPipe, name: "wrap" }] });
439
613
  }
440
614
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetSubmissionFilesComponent, decorators: [{
441
615
  type: Component,
442
- args: [{ selector: 'app-checksheet-submission-files', standalone: true, imports: [CommonModule, MaterialModule$1, MatProgressBarModule, ReactiveFormsModule, ChecksheetSubmissionFileDeleteButtonComponent], template: "<mat-card class=\"p-0\">\n <mat-card-content\n class=\"p-2 mb-0 d-flex justify-content-between align-items-center\"\n >\n <div>\n <h3 class=\"mb-0\">Files</h3>\n </div>\n <form [formGroup]=\"filterForm\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input\n formControlName=\"search\"\n type=\"text\"\n matInput\n placeholder=\"Search\"\n />\n </mat-form-field>\n </form>\n </mat-card-content>\n <mat-card-content class=\"p-0\">\n <table mat-table [dataSource]=\"models\" class=\"w-100\">\n <!-- No Column -->\n <ng-container matColumnDef=\"No\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <!-- Title Column -->\n <ng-container matColumnDef=\"Title\">\n <th mat-header-cell *matHeaderCellDef>Title</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.title }}</td>\n </ng-container>\n\n <!-- Details Column -->\n <ng-container matColumnDef=\"Details\">\n <th mat-header-cell *matHeaderCellDef>Details</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.description }}</td>\n </ng-container>\n\n <!-- File Column -->\n <ng-container matColumnDef=\"File\">\n <th mat-header-cell *matHeaderCellDef>File</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.file_name }}</td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"Actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <a\n class=\"text-decoration-none cursor-pointer text-dark\"\n [href]=\"element?.file_url\"\n target=\"_blank\"\n >\n <span class=\"material-symbols-outlined\"> visibility </span>\n </a>\n\n <app-checksheet-submission-file-delete-button\n [checksheetSubmissionFile]=\"element\"\n (deleted)=\"reload()\"\n ></app-checksheet-submission-file-delete-button>\n </div>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isWorking\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>\n" }]
443
- }], ctorParameters: () => [{ type: i2.FormBuilder }, { type: ChecksheetSubmissionFileService }], propDecorators: { submissionId: [{
616
+ args: [{ selector: 'app-checksheet-submission-files', standalone: true, imports: [
617
+ CommonModule, MaterialModule$1, MatProgressBarModule, ReactiveFormsModule,
618
+ ChecksheetSubmissionFileDeleteButtonComponent, FileDropperModule, ReadMoreModule, WrapPipe
619
+ ], template: "<mat-card class=\"p-0\" *ngIf=\"viewMode === 'table'\">\n <mat-card-content\n class=\"p-2 mb-0 d-flex justify-content-between align-items-center\"\n >\n <div>\n <h3 class=\"mb-0\">Files</h3>\n </div>\n <form [formGroup]=\"filterForm\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input\n formControlName=\"search\"\n type=\"text\"\n matInput\n placeholder=\"Search\"\n />\n </mat-form-field>\n </form>\n </mat-card-content>\n <mat-card-content class=\"p-0\">\n <table mat-table [dataSource]=\"models\" class=\"w-100\">\n <!-- No Column -->\n <ng-container matColumnDef=\"No\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <!-- Title Column -->\n <ng-container matColumnDef=\"Title\">\n <th mat-header-cell *matHeaderCellDef>Title</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.title }}</td>\n </ng-container>\n\n <!-- Details Column -->\n <ng-container matColumnDef=\"Details\">\n <th mat-header-cell *matHeaderCellDef>Details</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.description }}</td>\n </ng-container>\n\n <!-- File Column -->\n <ng-container matColumnDef=\"File\">\n <th mat-header-cell *matHeaderCellDef>File</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.file_name }}</td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"Actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <a\n class=\"text-decoration-none cursor-pointer text-dark\"\n [href]=\"element?.file_url\"\n target=\"_blank\"\n >\n <span class=\"material-symbols-outlined\"> visibility </span>\n </a>\n\n <app-checksheet-submission-file-delete-button\n [checksheetSubmissionFile]=\"element\"\n (deleted)=\"reload()\"\n ></app-checksheet-submission-file-delete-button>\n </div>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isWorking\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>\n\n<mat-card *ngIf=\"viewMode === 'horizontal-timeline'\">\n <mat-card-content class=\"mt-3 d-flex justify-content-start gap-3\">\n <app-file-dropper class=\"w-50\" [config]=\"fileConfig\" (fileChanged)=\"fileChanged($event)\" [fileArray]=\"fileList\">\n </app-file-dropper>\n <div style=\"width: calc(50% - 1rem)\">\n <div *ngFor=\"let model of models\" class=\"d-flex flex-column gap-0\">\n <div class=\"d-flex flex-column gap-0\">\n <div class=\"d-flex justify-content-between align-items-center gap-1\">\n <p class=\"mb-0 fw-bold text-wrap\">{{ model?.file_name | wrap:20 }}</p>\n </div>\n </div>\n <app-read-more [text]=\"model?.details\" [maxLength]=\"50\"></app-read-more>\n <div class=\"d-flex justify-content-between gap-2\">\n <small class=\"text-secondary\" style=\"max-width: 70%\">\n <i>Uploaded By {{ model?.creator?.name }} {{ model?.created_at | date: 'mediumDate'}}</i>\n </small>\n <div class=\"d-flex justify-content-end align-items-center gap-1\">\n <a class=\"text-decoration-none cursor-pointer text-dark\" [href]=\"model?.file_url\" target=\"_blank\">\n <span class=\"material-symbols-outlined\"> download </span>\n </a>\n <app-checksheet-submission-file-delete-button [checksheetSubmissionFile]=\"model\" (deleted)=\"reload()\">\n </app-checksheet-submission-file-delete-button>\n </div>\n </div>\n <hr style=\"margin: 0.5rem 0\">\n </div>\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isWorking\"></mat-progress-bar>\n </div>\n </mat-card-content>\n</mat-card>\n" }]
620
+ }], ctorParameters: () => [{ type: i2.FormBuilder }, { type: ChecksheetSubmissionFileService }, { type: i1.EntityFileService }, { type: i1.AlertService }], propDecorators: { submissionId: [{
444
621
  type: Input
445
622
  }], questionId: [{
446
623
  type: Input
624
+ }], viewMode: [{
625
+ type: Input
626
+ }], fileDropperHeight: [{
627
+ type: Input
628
+ }], allowMultipleFiles: [{
629
+ type: Input
447
630
  }] } });
448
631
 
449
632
  let ChecksheetQuestionComponent = class ChecksheetQuestionComponent {
@@ -462,7 +645,6 @@ let ChecksheetQuestionComponent = class ChecksheetQuestionComponent {
462
645
  this.checksheetSubmissionAnswerService = checksheetSubmissionAnswerService;
463
646
  }
464
647
  ngOnInit() {
465
- console.log(this.disableInput, this.submissionView);
466
648
  this.editor = new Editor();
467
649
  this.submittedAnswer.valueChanges
468
650
  .pipe(debounceTime(1000))
@@ -575,14 +757,14 @@ let ChecksheetQuestionComponent = class ChecksheetQuestionComponent {
575
757
  });
576
758
  }
577
759
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetQuestionComponent, deps: [{ token: ChecksheetSubmissionAnswerService }], target: i0.ɵɵFactoryTarget.Component });
578
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ChecksheetQuestionComponent, selector: "app-checksheet-question", inputs: { questionInfo: "questionInfo", index: "index", submissionView: "submissionView", submissionId: "submissionId", disableInput: "disableInput", isWorking: "isWorking" }, outputs: { isWorkingChange: "isWorkingChange" }, ngImport: i0, template: "<div\n fxLayout=\"column\"\n fxLayoutGap=\"0.5rem\"\n class=\"mat-typography\"\n *ngIf=\"!submissionView\"\n>\n <div fxLayout=\"row\" fxLayoutGap=\"0.5rem\" class=\"font-weight-bold\">\n <div>{{ index + 1 }}.</div>\n <div [innerHTML]=\"questionInfo?.label\"></div>\n </div>\n <div fxLayout=\"row\" fxLayoutGap=\"0.5rem\">\n <small>{{ questionInfo?.type?.title }}</small>\n </div>\n\n <div\n *ngIf=\"questionInfo?.type_id === 1\"\n fxLayout=\"column\"\n fxLayoutGap=\"0.25rem\"\n class=\"mr-3\"\n >\n <mat-radio-group class=\"answer-radio-group\" [disabled]=\"true\">\n <mat-radio-button\n class=\"answer-radio-button\"\n *ngFor=\"let answer of questionInfo?.answers\"\n [value]=\"answer.id\"\n >\n {{ answer.value }}\n </mat-radio-button>\n </mat-radio-group>\n </div>\n\n <div\n *ngIf=\"questionInfo?.type_id === 2\"\n fxLayout=\"column\"\n fxLayoutGap=\"0.25rem\"\n class=\"mr-3\"\n >\n <div\n fxLayout=\"row\"\n fxLayoutAlign=\"start center\"\n *ngFor=\"let answer of questionInfo?.answers; let i = index\"\n >\n <mat-checkbox [disabled]=\"true\" fxFlex=\"80%\"\n >{{ i + 1 }} ) {{ answer.value }}</mat-checkbox\n >\n </div>\n </div>\n\n <div\n *ngIf=\"\n questionInfo?.type_id === 3 ||\n questionInfo?.type_id === 5 ||\n questionInfo?.type_id === 6\n \"\n fxLayout=\"column\"\n fxLayoutGap=\"0.25rem\"\n class=\"mr-3 w-50 border short-answer\"\n ></div>\n\n <div\n *ngIf=\"questionInfo?.type_id === 4\"\n fxLayout=\"column\"\n fxLayoutGap=\"0.25rem\"\n class=\"mr-3 w-50 border long-answer\"\n ></div>\n\n <div\n *ngIf=\"questionInfo?.type_id === 7\"\n fxLayout=\"column\"\n fxLayoutGap=\"0.25rem\"\n class=\"mr-3\"\n >\n <ol>\n <li *ngFor=\"let answer of questionInfo?.answers\">\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <div>{{ answer?.value }} -</div>\n <mat-radio-group [disabled]=\"true\" fxLayout=\"row\">\n <mat-radio-button class=\"mt-1 ml-2 yes-no\" value=\"1\"\n >Yes\n </mat-radio-button>\n <mat-radio-button class=\"mt-1 ml-2 yes-no\" value=\"0\"\n >No\n </mat-radio-button>\n </mat-radio-group>\n </div>\n </li>\n </ol>\n </div>\n</div>\n\n<div *ngIf=\"submissionView\">\n <div class=\"d-flex justify-content-between align-items-center gap-3 mb-2\">\n <div class=\"d-flex align-items-center gap-2\">\n <strong>{{ index + 1 }}.</strong>\n <strong [innerHTML]=\"questionInfo?.label\"></strong>\n <app-checksheet-submission-file-upload\n [submissionId]=\"submissionId\"\n [questionId]=\"questionInfo?.id\"\n (uploaded)=\"checksheetSubmissionFilesComponent.reload()\"\n class=\"ml-3\"\n ></app-checksheet-submission-file-upload>\n </div>\n <span class=\"badge badge-primary\">{{ questionInfo?.type?.title }}</span>\n </div>\n <div class=\"d-flex justify-content-between align-items-start gap-1\">\n <div *ngIf=\"questionInfo?.type_id === 1\" class=\"d-flex flex-column gap-2\">\n <mat-radio-group\n class=\"answer-radio-group\"\n [disabled]=\"disableInput\"\n *ngIf=\"!disableInput\"\n [formControl]=\"submittedAnswer\"\n >\n <mat-radio-button\n class=\"answer-radio-button\"\n *ngFor=\"let answer of questionInfo?.answers\"\n [value]=\"answer.id\"\n >\n {{ answer.value }}\n </mat-radio-button>\n </mat-radio-group>\n <span *ngIf=\"disableInput\">\n <b>Answer:</b>\n {{\n getSubmittedMCQAnswer(\n questionInfo?.answers,\n this.submittedAnswer.value\n )\n }}\n </span>\n </div>\n\n <div *ngIf=\"questionInfo?.type_id === 2\" class=\"d-flex flex-column gap-2\">\n <ng-container *ngIf=\"!disableInput\">\n <div\n fxLayout=\"row\"\n fxLayoutAlign=\"start center\"\n *ngFor=\"let answer of questionInfo?.answers; let i = index\"\n >\n <mat-checkbox\n (change)=\"onMultiSelectAnswerChange()\"\n [disabled]=\"disableInput\"\n [(ngModel)]=\"answer.isChecked\"\n fxFlex=\"80%\"\n >\n {{ i + 1 }}\n )\n {{ answer.value }}\n </mat-checkbox>\n </div>\n </ng-container>\n\n <span *ngIf=\"disableInput\">\n <b>Answers:</b>\n {{ getSubmittedMSQAnswer() }}\n </span>\n </div>\n\n <div *ngIf=\"questionInfo?.type_id === 3 || questionInfo?.type_id === 4\">\n <div class=\"NgxEditor__Wrapper mb-2\" *ngIf=\"!disableInput\">\n <ngx-editor-menu [editor]=\"editor\"> </ngx-editor-menu>\n <ngx-editor\n [editor]=\"editor\"\n [formControl]=\"submittedAnswer\"\n ></ngx-editor>\n </div>\n <div *ngIf=\"disableInput\" [innerHtml]=\"submittedAnswer.value\"></div>\n </div>\n\n <div *ngIf=\"questionInfo?.type_id === 5\">\n <mat-form-field *ngIf=\"!disableInput\">\n <mat-label>Answer</mat-label>\n <input\n matInput\n type=\"number\"\n size=\"10\"\n [formControl]=\"submittedAnswer\"\n />\n </mat-form-field>\n <span *ngIf=\"disableInput\">{{ submittedAnswer.value }}</span>\n </div>\n\n <div *ngIf=\"questionInfo?.type_id === 6\">\n <mat-form-field *ngIf=\"!disableInput\">\n <input\n matInput\n [matDatepicker]=\"picker\"\n placeholder=\"Date\"\n [formControl]=\"submittedAnswer\"\n (focus)=\"picker.open()\"\n />\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n </mat-form-field>\n <span *ngIf=\"disableInput\">{{ submittedAnswer.value | date }}</span>\n </div>\n\n <div *ngIf=\"questionInfo?.type_id === 7 && !disableInput\">\n <ol>\n <li *ngFor=\"let answer of questionInfo?.answers\">\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <div>{{ answer?.value }} -</div>\n <mat-radio-group\n fxLayout=\"row\"\n (change)=\"onMultiSelectYesNoAnswerChange($event, answer)\"\n [disabled]=\"disableInput\"\n [value]=\"answer.selectedValue\"\n >\n <mat-radio-button class=\"mt-1 ml-2 yes-no\" [value]=\"true\">\n Yes\n </mat-radio-button>\n <mat-radio-button class=\"mt-1 ml-2 yes-no\" [value]=\"false\">\n No\n </mat-radio-button>\n </mat-radio-group>\n </div>\n </li>\n </ol>\n </div>\n\n <app-checksheet-submission-files\n class=\"w-50\"\n #checksheetSubmissionFilesComponent\n [submissionId]=\"submissionId\"\n [questionId]=\"questionInfo?.id\"\n ></app-checksheet-submission-files>\n </div>\n\n <ng-container *ngIf=\"questionInfo?.type_id === 7 && disableInput\">\n <div *ngFor=\"let answer of questionInfo?.answers\">\n {{ answer?.value }} - {{ answer?.selectedValue ? 'Yes' : 'No' }}\n </div>\n </ng-container>\n\n <mat-progress-bar *ngIf=\"isWorking\" mode=\"indeterminate\"></mat-progress-bar>\n</div>\n", styles: [".answer-radio-group{display:flex;flex-direction:column;margin:15px 0}.answer-radio-button{margin:5px}:host ::ng-deep .short-answer .ck.ck-content{min-height:100px!important}:host ::ng-deep .long-answer .ck.ck-content{min-height:200px!important}.scroll-container{max-height:650px;overflow-y:auto}.small-margin{margin-top:2px}:host ::ng-deep .yes-no .mat-radio-label-content{padding-left:3px}.main{display:block;position:relative;padding-left:24px;margin-bottom:15px;cursor:pointer}input[type=checkbox]{visibility:hidden}.geekmark{position:absolute;top:2px;left:0;height:15px;width:15px;background-color:#fff}.main input:checked~.geekmark{background-color:green}.geekmark:after{content:\"\";position:absolute;display:none}.main input:checked~.geekmark:after{display:block}.main .geekmark:after{left:5px;bottom:3px;width:6px;height:10px;border:solid white;border-width:0 4px 4px 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}img{max-width:500px!important;max-height:500px!important}p{margin-bottom:0!important}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i6.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i6.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i6.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "component", type: i4$1.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "component", type: i9.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i9.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i9.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "component", type: i10.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i10.MatLabel, selector: "mat-label" }, { kind: "directive", type: i10.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i12.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i8$1.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: i9$1.MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioGroup"] }, { kind: "component", type: i9$1.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i11.NgxEditorComponent, selector: "ngx-editor", inputs: ["editor", "outputFormat", "placeholder"], outputs: ["focusOut", "focusIn"] }, { kind: "component", type: i11.MenuComponent, selector: "ngx-editor-menu", inputs: ["toolbar", "colorPresets", "disabled", "editor", "customMenuRef", "dropdownPlacement"] }, { kind: "component", type: ChecksheetSubmissionFileUploadComponent, selector: "app-checksheet-submission-file-upload", inputs: ["submissionId", "questionId"], outputs: ["uploaded"] }, { kind: "component", type: ChecksheetSubmissionFilesComponent, selector: "app-checksheet-submission-files", inputs: ["submissionId", "questionId"] }, { kind: "pipe", type: i4.DatePipe, name: "date" }], encapsulation: i0.ViewEncapsulation.None });
760
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ChecksheetQuestionComponent, selector: "app-checksheet-question", inputs: { questionInfo: "questionInfo", index: "index", submissionView: "submissionView", submissionId: "submissionId", disableInput: "disableInput", isWorking: "isWorking" }, outputs: { isWorkingChange: "isWorkingChange" }, ngImport: i0, template: "<div class=\"d-flex flex-column gap-2\" *ngIf=\"!submissionView\">\n <div class=\"d-flex justify-content-between align-items-center gap-3 mb-2\">\n <div class=\"d-flex align-items-center gap-2\">\n <strong>{{ index + 1 }}.</strong>\n <strong [innerHTML]=\"questionInfo?.label\"></strong>\n <span class=\"badge bg-secondary\">{{ questionInfo?.type?.title }}</span>\n </div>\n </div>\n\n <div *ngIf=\"questionInfo?.type_id === 1\" fxLayout=\"column\" fxLayoutGap=\"0.25rem\" class=\"mr-3\">\n <mat-radio-group class=\"answer-radio-group\" [disabled]=\"true\">\n <mat-radio-button class=\"answer-radio-button\" *ngFor=\"let answer of questionInfo?.answers\" [value]=\"answer.id\">\n {{ answer.value }}\n </mat-radio-button>\n </mat-radio-group>\n </div>\n\n <div *ngIf=\"questionInfo?.type_id === 2\" fxLayout=\"column\" fxLayoutGap=\"0.25rem\" class=\"mr-3\">\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\" *ngFor=\"let answer of questionInfo?.answers; let i = index\">\n <mat-checkbox [disabled]=\"true\" fxFlex=\"80%\">{{ i + 1 }} ) {{ answer.value }}</mat-checkbox>\n </div>\n </div>\n\n <div *ngIf=\"questionInfo?.type_id === 3 || questionInfo?.type_id === 5 || questionInfo?.type_id === 6\"\n class=\"mr-3 d-flex justify-content-start align-items-center gap-2\">\n <span class=\"material-symbols-outlined\">lightbulb</span>\n <p class=\"mb-0\">Answer</p>\n </div>\n\n <div *ngIf=\"questionInfo?.type_id === 4\" class=\"mr-3 d-flex justify-content-start align-items-center gap-2\">\n <span class=\"material-symbols-outlined\">lightbulb</span>\n <p class=\"mb-0\">Answer</p>\n </div>\n\n <div\n *ngIf=\"questionInfo?.type_id === 7\"\n fxLayout=\"column\"\n fxLayoutGap=\"0.25rem\"\n class=\"mr-3\"\n >\n <ol>\n <li *ngFor=\"let answer of questionInfo?.answers\">\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <div>{{ answer?.value }} -</div>\n <mat-radio-group [disabled]=\"true\" fxLayout=\"row\">\n <mat-radio-button class=\"mt-1 ml-2 yes-no\" value=\"1\"\n >Yes\n </mat-radio-button>\n <mat-radio-button class=\"mt-1 ml-2 yes-no\" value=\"0\"\n >No\n </mat-radio-button>\n </mat-radio-group>\n </div>\n </li>\n </ol>\n </div>\n</div>\n\n<mat-card *ngIf=\"submissionView\">\n <mat-card-content>\n <div class=\"d-flex justify-content-between align-items-center gap-3 mb-2\">\n <div class=\"d-flex align-items-center gap-2\">\n <strong>{{ index + 1 }}.</strong>\n <strong [innerHTML]=\"questionInfo?.label\"></strong>\n <span class=\"badge bg-secondary\">{{ questionInfo?.type?.title }}</span>\n </div>\n </div>\n <div class=\"d-flex justify-content-between align-items-start gap-1\">\n <div *ngIf=\"questionInfo?.type_id === 1\" class=\"d-flex flex-column gap-2\">\n <mat-radio-group class=\"answer-radio-group\" [disabled]=\"disableInput\" [formControl]=\"submittedAnswer\">\n <mat-radio-button class=\"answer-radio-button\" *ngFor=\"let answer of questionInfo?.answers\"\n [value]=\"answer.id\" [disabled]=\"disableInput\">\n {{ answer.value }}\n </mat-radio-button>\n </mat-radio-group>\n </div>\n\n <div *ngIf=\"questionInfo?.type_id === 2\" class=\"d-flex flex-column gap-2\">\n <ng-container>\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\" *ngFor=\"let answer of questionInfo?.answers; let i = index\">\n <mat-checkbox (change)=\"onMultiSelectAnswerChange()\" [disabled]=\"disableInput\" [(ngModel)]=\"answer.isChecked\"\n fxFlex=\"80%\">\n {{ i + 1 }} ) {{ answer.value }}\n </mat-checkbox>\n </div>\n </ng-container>\n </div>\n\n <div *ngIf=\"questionInfo?.type_id === 3 || questionInfo?.type_id === 4\">\n <div class=\"NgxEditor__Wrapper mb-2\" *ngIf=\"!disableInput\">\n <ngx-editor-menu [editor]=\"editor\"> </ngx-editor-menu>\n <ngx-editor\n [editor]=\"editor\"\n [formControl]=\"submittedAnswer\"\n ></ngx-editor>\n </div>\n <div *ngIf=\"disableInput\" [innerHtml]=\"submittedAnswer.value\"></div>\n </div>\n\n <div *ngIf=\"questionInfo?.type_id === 5\">\n <mat-form-field *ngIf=\"!disableInput\">\n <mat-label>Answer</mat-label>\n <input matInput type=\"number\" size=\"10\" [formControl]=\"submittedAnswer\"/>\n </mat-form-field>\n <span *ngIf=\"disableInput\">{{ submittedAnswer.value }}</span>\n </div>\n\n <div *ngIf=\"questionInfo?.type_id === 6\">\n <mat-form-field *ngIf=\"!disableInput\">\n <input matInput [matDatepicker]=\"picker\" placeholder=\"Date\" [formControl]=\"submittedAnswer\"\n (focus)=\"picker.open()\"/>\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n </mat-form-field>\n <span *ngIf=\"disableInput\">{{ submittedAnswer.value | date }}</span>\n </div>\n\n <div *ngIf=\"questionInfo?.type_id === 7\">\n <ol>\n <li *ngFor=\"let answer of questionInfo?.answers\">\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <div>{{ answer?.value }} -</div>\n <mat-radio-group fxLayout=\"row\" (change)=\"onMultiSelectYesNoAnswerChange($event, answer)\"\n [disabled]=\"disableInput\" [value]=\"answer.selectedValue\">\n <mat-radio-button class=\"mt-1 ml-2 yes-no\" [value]=\"true\" [disabled]=\"disableInput\">\n Yes\n </mat-radio-button>\n <mat-radio-button class=\"mt-1 ml-2 yes-no\" [value]=\"false\" [disabled]=\"disableInput\">\n No\n </mat-radio-button>\n </mat-radio-group>\n </div>\n </li>\n </ol>\n </div>\n\n <span class=\"flex-fill\"></span>\n\n <app-checksheet-submission-files style=\"width: calc(33.33%)\" [submissionId]=\"submissionId\"\n [questionId]=\"questionInfo?.id\"></app-checksheet-submission-files>\n </div>\n\n <mat-progress-bar *ngIf=\"isWorking\" mode=\"indeterminate\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>\n", styles: [".answer-radio-group{display:flex;flex-direction:column;margin:15px 0}.answer-radio-button{margin:5px}:host ::ng-deep .short-answer .ck.ck-content{min-height:100px!important}:host ::ng-deep .long-answer .ck.ck-content{min-height:200px!important}.scroll-container{max-height:650px;overflow-y:auto}.small-margin{margin-top:2px}:host ::ng-deep .yes-no .mat-radio-label-content{padding-left:3px}.main{display:block;position:relative;padding-left:24px;margin-bottom:15px;cursor:pointer}input[type=checkbox]{visibility:hidden}.geekmark{position:absolute;top:2px;left:0;height:15px;width:15px;background-color:#fff}.main input:checked~.geekmark{background-color:green}.geekmark:after{content:\"\";position:absolute;display:none}.main input:checked~.geekmark:after{display:block}.main .geekmark:after{left:5px;bottom:3px;width:6px;height:10px;border:solid white;border-width:0 4px 4px 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}img{max-width:500px!important;max-height:500px!important}p{margin-bottom:0!important}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i6.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i6.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i6.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "component", type: i4$1.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4$1.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i5.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "component", type: i9$1.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i9$1.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i9$1.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "component", type: i10.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i10.MatLabel, selector: "mat-label" }, { kind: "directive", type: i10.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: i10$1.MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioGroup"] }, { kind: "component", type: i10$1.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i11$1.NgxEditorComponent, selector: "ngx-editor", inputs: ["editor", "outputFormat", "placeholder"], outputs: ["focusOut", "focusIn"] }, { kind: "component", type: i11$1.MenuComponent, selector: "ngx-editor-menu", inputs: ["toolbar", "colorPresets", "disabled", "editor", "customMenuRef", "dropdownPlacement"] }, { kind: "component", type: ChecksheetSubmissionFilesComponent, selector: "app-checksheet-submission-files", inputs: ["submissionId", "questionId", "viewMode", "fileDropperHeight", "allowMultipleFiles"] }, { kind: "pipe", type: i4.DatePipe, name: "date" }], encapsulation: i0.ViewEncapsulation.None });
579
761
  };
580
762
  ChecksheetQuestionComponent = __decorate([
581
763
  UntilDestroy()
582
764
  ], ChecksheetQuestionComponent);
583
765
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetQuestionComponent, decorators: [{
584
766
  type: Component,
585
- args: [{ selector: 'app-checksheet-question', encapsulation: ViewEncapsulation.None, template: "<div\n fxLayout=\"column\"\n fxLayoutGap=\"0.5rem\"\n class=\"mat-typography\"\n *ngIf=\"!submissionView\"\n>\n <div fxLayout=\"row\" fxLayoutGap=\"0.5rem\" class=\"font-weight-bold\">\n <div>{{ index + 1 }}.</div>\n <div [innerHTML]=\"questionInfo?.label\"></div>\n </div>\n <div fxLayout=\"row\" fxLayoutGap=\"0.5rem\">\n <small>{{ questionInfo?.type?.title }}</small>\n </div>\n\n <div\n *ngIf=\"questionInfo?.type_id === 1\"\n fxLayout=\"column\"\n fxLayoutGap=\"0.25rem\"\n class=\"mr-3\"\n >\n <mat-radio-group class=\"answer-radio-group\" [disabled]=\"true\">\n <mat-radio-button\n class=\"answer-radio-button\"\n *ngFor=\"let answer of questionInfo?.answers\"\n [value]=\"answer.id\"\n >\n {{ answer.value }}\n </mat-radio-button>\n </mat-radio-group>\n </div>\n\n <div\n *ngIf=\"questionInfo?.type_id === 2\"\n fxLayout=\"column\"\n fxLayoutGap=\"0.25rem\"\n class=\"mr-3\"\n >\n <div\n fxLayout=\"row\"\n fxLayoutAlign=\"start center\"\n *ngFor=\"let answer of questionInfo?.answers; let i = index\"\n >\n <mat-checkbox [disabled]=\"true\" fxFlex=\"80%\"\n >{{ i + 1 }} ) {{ answer.value }}</mat-checkbox\n >\n </div>\n </div>\n\n <div\n *ngIf=\"\n questionInfo?.type_id === 3 ||\n questionInfo?.type_id === 5 ||\n questionInfo?.type_id === 6\n \"\n fxLayout=\"column\"\n fxLayoutGap=\"0.25rem\"\n class=\"mr-3 w-50 border short-answer\"\n ></div>\n\n <div\n *ngIf=\"questionInfo?.type_id === 4\"\n fxLayout=\"column\"\n fxLayoutGap=\"0.25rem\"\n class=\"mr-3 w-50 border long-answer\"\n ></div>\n\n <div\n *ngIf=\"questionInfo?.type_id === 7\"\n fxLayout=\"column\"\n fxLayoutGap=\"0.25rem\"\n class=\"mr-3\"\n >\n <ol>\n <li *ngFor=\"let answer of questionInfo?.answers\">\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <div>{{ answer?.value }} -</div>\n <mat-radio-group [disabled]=\"true\" fxLayout=\"row\">\n <mat-radio-button class=\"mt-1 ml-2 yes-no\" value=\"1\"\n >Yes\n </mat-radio-button>\n <mat-radio-button class=\"mt-1 ml-2 yes-no\" value=\"0\"\n >No\n </mat-radio-button>\n </mat-radio-group>\n </div>\n </li>\n </ol>\n </div>\n</div>\n\n<div *ngIf=\"submissionView\">\n <div class=\"d-flex justify-content-between align-items-center gap-3 mb-2\">\n <div class=\"d-flex align-items-center gap-2\">\n <strong>{{ index + 1 }}.</strong>\n <strong [innerHTML]=\"questionInfo?.label\"></strong>\n <app-checksheet-submission-file-upload\n [submissionId]=\"submissionId\"\n [questionId]=\"questionInfo?.id\"\n (uploaded)=\"checksheetSubmissionFilesComponent.reload()\"\n class=\"ml-3\"\n ></app-checksheet-submission-file-upload>\n </div>\n <span class=\"badge badge-primary\">{{ questionInfo?.type?.title }}</span>\n </div>\n <div class=\"d-flex justify-content-between align-items-start gap-1\">\n <div *ngIf=\"questionInfo?.type_id === 1\" class=\"d-flex flex-column gap-2\">\n <mat-radio-group\n class=\"answer-radio-group\"\n [disabled]=\"disableInput\"\n *ngIf=\"!disableInput\"\n [formControl]=\"submittedAnswer\"\n >\n <mat-radio-button\n class=\"answer-radio-button\"\n *ngFor=\"let answer of questionInfo?.answers\"\n [value]=\"answer.id\"\n >\n {{ answer.value }}\n </mat-radio-button>\n </mat-radio-group>\n <span *ngIf=\"disableInput\">\n <b>Answer:</b>\n {{\n getSubmittedMCQAnswer(\n questionInfo?.answers,\n this.submittedAnswer.value\n )\n }}\n </span>\n </div>\n\n <div *ngIf=\"questionInfo?.type_id === 2\" class=\"d-flex flex-column gap-2\">\n <ng-container *ngIf=\"!disableInput\">\n <div\n fxLayout=\"row\"\n fxLayoutAlign=\"start center\"\n *ngFor=\"let answer of questionInfo?.answers; let i = index\"\n >\n <mat-checkbox\n (change)=\"onMultiSelectAnswerChange()\"\n [disabled]=\"disableInput\"\n [(ngModel)]=\"answer.isChecked\"\n fxFlex=\"80%\"\n >\n {{ i + 1 }}\n )\n {{ answer.value }}\n </mat-checkbox>\n </div>\n </ng-container>\n\n <span *ngIf=\"disableInput\">\n <b>Answers:</b>\n {{ getSubmittedMSQAnswer() }}\n </span>\n </div>\n\n <div *ngIf=\"questionInfo?.type_id === 3 || questionInfo?.type_id === 4\">\n <div class=\"NgxEditor__Wrapper mb-2\" *ngIf=\"!disableInput\">\n <ngx-editor-menu [editor]=\"editor\"> </ngx-editor-menu>\n <ngx-editor\n [editor]=\"editor\"\n [formControl]=\"submittedAnswer\"\n ></ngx-editor>\n </div>\n <div *ngIf=\"disableInput\" [innerHtml]=\"submittedAnswer.value\"></div>\n </div>\n\n <div *ngIf=\"questionInfo?.type_id === 5\">\n <mat-form-field *ngIf=\"!disableInput\">\n <mat-label>Answer</mat-label>\n <input\n matInput\n type=\"number\"\n size=\"10\"\n [formControl]=\"submittedAnswer\"\n />\n </mat-form-field>\n <span *ngIf=\"disableInput\">{{ submittedAnswer.value }}</span>\n </div>\n\n <div *ngIf=\"questionInfo?.type_id === 6\">\n <mat-form-field *ngIf=\"!disableInput\">\n <input\n matInput\n [matDatepicker]=\"picker\"\n placeholder=\"Date\"\n [formControl]=\"submittedAnswer\"\n (focus)=\"picker.open()\"\n />\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n </mat-form-field>\n <span *ngIf=\"disableInput\">{{ submittedAnswer.value | date }}</span>\n </div>\n\n <div *ngIf=\"questionInfo?.type_id === 7 && !disableInput\">\n <ol>\n <li *ngFor=\"let answer of questionInfo?.answers\">\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <div>{{ answer?.value }} -</div>\n <mat-radio-group\n fxLayout=\"row\"\n (change)=\"onMultiSelectYesNoAnswerChange($event, answer)\"\n [disabled]=\"disableInput\"\n [value]=\"answer.selectedValue\"\n >\n <mat-radio-button class=\"mt-1 ml-2 yes-no\" [value]=\"true\">\n Yes\n </mat-radio-button>\n <mat-radio-button class=\"mt-1 ml-2 yes-no\" [value]=\"false\">\n No\n </mat-radio-button>\n </mat-radio-group>\n </div>\n </li>\n </ol>\n </div>\n\n <app-checksheet-submission-files\n class=\"w-50\"\n #checksheetSubmissionFilesComponent\n [submissionId]=\"submissionId\"\n [questionId]=\"questionInfo?.id\"\n ></app-checksheet-submission-files>\n </div>\n\n <ng-container *ngIf=\"questionInfo?.type_id === 7 && disableInput\">\n <div *ngFor=\"let answer of questionInfo?.answers\">\n {{ answer?.value }} - {{ answer?.selectedValue ? 'Yes' : 'No' }}\n </div>\n </ng-container>\n\n <mat-progress-bar *ngIf=\"isWorking\" mode=\"indeterminate\"></mat-progress-bar>\n</div>\n", styles: [".answer-radio-group{display:flex;flex-direction:column;margin:15px 0}.answer-radio-button{margin:5px}:host ::ng-deep .short-answer .ck.ck-content{min-height:100px!important}:host ::ng-deep .long-answer .ck.ck-content{min-height:200px!important}.scroll-container{max-height:650px;overflow-y:auto}.small-margin{margin-top:2px}:host ::ng-deep .yes-no .mat-radio-label-content{padding-left:3px}.main{display:block;position:relative;padding-left:24px;margin-bottom:15px;cursor:pointer}input[type=checkbox]{visibility:hidden}.geekmark{position:absolute;top:2px;left:0;height:15px;width:15px;background-color:#fff}.main input:checked~.geekmark{background-color:green}.geekmark:after{content:\"\";position:absolute;display:none}.main input:checked~.geekmark:after{display:block}.main .geekmark:after{left:5px;bottom:3px;width:6px;height:10px;border:solid white;border-width:0 4px 4px 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}img{max-width:500px!important;max-height:500px!important}p{margin-bottom:0!important}\n"] }]
767
+ args: [{ selector: 'app-checksheet-question', encapsulation: ViewEncapsulation.None, template: "<div class=\"d-flex flex-column gap-2\" *ngIf=\"!submissionView\">\n <div class=\"d-flex justify-content-between align-items-center gap-3 mb-2\">\n <div class=\"d-flex align-items-center gap-2\">\n <strong>{{ index + 1 }}.</strong>\n <strong [innerHTML]=\"questionInfo?.label\"></strong>\n <span class=\"badge bg-secondary\">{{ questionInfo?.type?.title }}</span>\n </div>\n </div>\n\n <div *ngIf=\"questionInfo?.type_id === 1\" fxLayout=\"column\" fxLayoutGap=\"0.25rem\" class=\"mr-3\">\n <mat-radio-group class=\"answer-radio-group\" [disabled]=\"true\">\n <mat-radio-button class=\"answer-radio-button\" *ngFor=\"let answer of questionInfo?.answers\" [value]=\"answer.id\">\n {{ answer.value }}\n </mat-radio-button>\n </mat-radio-group>\n </div>\n\n <div *ngIf=\"questionInfo?.type_id === 2\" fxLayout=\"column\" fxLayoutGap=\"0.25rem\" class=\"mr-3\">\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\" *ngFor=\"let answer of questionInfo?.answers; let i = index\">\n <mat-checkbox [disabled]=\"true\" fxFlex=\"80%\">{{ i + 1 }} ) {{ answer.value }}</mat-checkbox>\n </div>\n </div>\n\n <div *ngIf=\"questionInfo?.type_id === 3 || questionInfo?.type_id === 5 || questionInfo?.type_id === 6\"\n class=\"mr-3 d-flex justify-content-start align-items-center gap-2\">\n <span class=\"material-symbols-outlined\">lightbulb</span>\n <p class=\"mb-0\">Answer</p>\n </div>\n\n <div *ngIf=\"questionInfo?.type_id === 4\" class=\"mr-3 d-flex justify-content-start align-items-center gap-2\">\n <span class=\"material-symbols-outlined\">lightbulb</span>\n <p class=\"mb-0\">Answer</p>\n </div>\n\n <div\n *ngIf=\"questionInfo?.type_id === 7\"\n fxLayout=\"column\"\n fxLayoutGap=\"0.25rem\"\n class=\"mr-3\"\n >\n <ol>\n <li *ngFor=\"let answer of questionInfo?.answers\">\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <div>{{ answer?.value }} -</div>\n <mat-radio-group [disabled]=\"true\" fxLayout=\"row\">\n <mat-radio-button class=\"mt-1 ml-2 yes-no\" value=\"1\"\n >Yes\n </mat-radio-button>\n <mat-radio-button class=\"mt-1 ml-2 yes-no\" value=\"0\"\n >No\n </mat-radio-button>\n </mat-radio-group>\n </div>\n </li>\n </ol>\n </div>\n</div>\n\n<mat-card *ngIf=\"submissionView\">\n <mat-card-content>\n <div class=\"d-flex justify-content-between align-items-center gap-3 mb-2\">\n <div class=\"d-flex align-items-center gap-2\">\n <strong>{{ index + 1 }}.</strong>\n <strong [innerHTML]=\"questionInfo?.label\"></strong>\n <span class=\"badge bg-secondary\">{{ questionInfo?.type?.title }}</span>\n </div>\n </div>\n <div class=\"d-flex justify-content-between align-items-start gap-1\">\n <div *ngIf=\"questionInfo?.type_id === 1\" class=\"d-flex flex-column gap-2\">\n <mat-radio-group class=\"answer-radio-group\" [disabled]=\"disableInput\" [formControl]=\"submittedAnswer\">\n <mat-radio-button class=\"answer-radio-button\" *ngFor=\"let answer of questionInfo?.answers\"\n [value]=\"answer.id\" [disabled]=\"disableInput\">\n {{ answer.value }}\n </mat-radio-button>\n </mat-radio-group>\n </div>\n\n <div *ngIf=\"questionInfo?.type_id === 2\" class=\"d-flex flex-column gap-2\">\n <ng-container>\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\" *ngFor=\"let answer of questionInfo?.answers; let i = index\">\n <mat-checkbox (change)=\"onMultiSelectAnswerChange()\" [disabled]=\"disableInput\" [(ngModel)]=\"answer.isChecked\"\n fxFlex=\"80%\">\n {{ i + 1 }} ) {{ answer.value }}\n </mat-checkbox>\n </div>\n </ng-container>\n </div>\n\n <div *ngIf=\"questionInfo?.type_id === 3 || questionInfo?.type_id === 4\">\n <div class=\"NgxEditor__Wrapper mb-2\" *ngIf=\"!disableInput\">\n <ngx-editor-menu [editor]=\"editor\"> </ngx-editor-menu>\n <ngx-editor\n [editor]=\"editor\"\n [formControl]=\"submittedAnswer\"\n ></ngx-editor>\n </div>\n <div *ngIf=\"disableInput\" [innerHtml]=\"submittedAnswer.value\"></div>\n </div>\n\n <div *ngIf=\"questionInfo?.type_id === 5\">\n <mat-form-field *ngIf=\"!disableInput\">\n <mat-label>Answer</mat-label>\n <input matInput type=\"number\" size=\"10\" [formControl]=\"submittedAnswer\"/>\n </mat-form-field>\n <span *ngIf=\"disableInput\">{{ submittedAnswer.value }}</span>\n </div>\n\n <div *ngIf=\"questionInfo?.type_id === 6\">\n <mat-form-field *ngIf=\"!disableInput\">\n <input matInput [matDatepicker]=\"picker\" placeholder=\"Date\" [formControl]=\"submittedAnswer\"\n (focus)=\"picker.open()\"/>\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n </mat-form-field>\n <span *ngIf=\"disableInput\">{{ submittedAnswer.value | date }}</span>\n </div>\n\n <div *ngIf=\"questionInfo?.type_id === 7\">\n <ol>\n <li *ngFor=\"let answer of questionInfo?.answers\">\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <div>{{ answer?.value }} -</div>\n <mat-radio-group fxLayout=\"row\" (change)=\"onMultiSelectYesNoAnswerChange($event, answer)\"\n [disabled]=\"disableInput\" [value]=\"answer.selectedValue\">\n <mat-radio-button class=\"mt-1 ml-2 yes-no\" [value]=\"true\" [disabled]=\"disableInput\">\n Yes\n </mat-radio-button>\n <mat-radio-button class=\"mt-1 ml-2 yes-no\" [value]=\"false\" [disabled]=\"disableInput\">\n No\n </mat-radio-button>\n </mat-radio-group>\n </div>\n </li>\n </ol>\n </div>\n\n <span class=\"flex-fill\"></span>\n\n <app-checksheet-submission-files style=\"width: calc(33.33%)\" [submissionId]=\"submissionId\"\n [questionId]=\"questionInfo?.id\"></app-checksheet-submission-files>\n </div>\n\n <mat-progress-bar *ngIf=\"isWorking\" mode=\"indeterminate\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>\n", styles: [".answer-radio-group{display:flex;flex-direction:column;margin:15px 0}.answer-radio-button{margin:5px}:host ::ng-deep .short-answer .ck.ck-content{min-height:100px!important}:host ::ng-deep .long-answer .ck.ck-content{min-height:200px!important}.scroll-container{max-height:650px;overflow-y:auto}.small-margin{margin-top:2px}:host ::ng-deep .yes-no .mat-radio-label-content{padding-left:3px}.main{display:block;position:relative;padding-left:24px;margin-bottom:15px;cursor:pointer}input[type=checkbox]{visibility:hidden}.geekmark{position:absolute;top:2px;left:0;height:15px;width:15px;background-color:#fff}.main input:checked~.geekmark{background-color:green}.geekmark:after{content:\"\";position:absolute;display:none}.main input:checked~.geekmark:after{display:block}.main .geekmark:after{left:5px;bottom:3px;width:6px;height:10px;border:solid white;border-width:0 4px 4px 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}img{max-width:500px!important;max-height:500px!important}p{margin-bottom:0!important}\n"] }]
586
768
  }], ctorParameters: () => [{ type: ChecksheetSubmissionAnswerService }], propDecorators: { questionInfo: [{
587
769
  type: Input
588
770
  }], index: [{
@@ -730,13 +912,13 @@ class ChecksheetQuestionListComponent {
730
912
  }
731
913
  });
732
914
  }
733
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetQuestionListComponent, deps: [{ token: i3$1.NgxSpinnerService }, { token: i1.AlertService }, { token: i1$1.MatDialog }, { token: i1.DataManager }], target: i0.ɵɵFactoryTarget.Component });
734
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ChecksheetQuestionListComponent, selector: "app-checksheet-question-list", inputs: { checksheet: "checksheet", submission: "submission", disableInput: "disableInput" }, outputs: { checksheetChange: "checksheetChange" }, ngImport: i0, template: "<ng-container *ngIf=\"checksheet?.id\">\n <button\n *ngIf=\"!disableInput\"\n type=\"button\"\n mat-raised-button\n color=\"primary\"\n (click)=\"addQuestion()\"\n class=\"mb-2\"\n >\n Add Question\n </button>\n\n <div\n class=\"d-flex flex-column gap-3 mat-typography scroll-container\"\n infiniteScroll\n [infiniteScrollDistance]=\"1\"\n [infiniteScrollThrottle]=\"50\"\n (scrolled)=\"onScroll()\"\n [scrollWindow]=\"false\"\n >\n <mat-card\n class=\"d-flex flex-column gap-3\"\n *ngFor=\"let question of questions; let i = index\"\n >\n <div\n class=\"d-flex flex-row gap-3 justify-content-end\"\n *ngIf=\"!disableInput\"\n >\n <mat-icon class=\"cursor-pointer\" (click)=\"deleteQuestion(question)\">\n delete\n </mat-icon>\n <mat-icon class=\"cursor-pointer\" (click)=\"editQuestion(question, i)\">\n edit\n </mat-icon>\n <mat-icon\n class=\"cursor-pointer\"\n *ngIf=\"i > 0\"\n (click)=\"moveQuestionUp(i)\"\n >\n arrow_upward\n </mat-icon>\n <mat-icon\n class=\"cursor-pointer\"\n *ngIf=\"i < questions.length - 1\"\n (click)=\"moveQuestionDown(i)\"\n >\n arrow_downward\n </mat-icon>\n </div>\n\n <div>\n <app-checksheet-question\n [questionInfo]=\"question\"\n [index]=\"i\"\n ></app-checksheet-question>\n </div>\n </mat-card>\n </div>\n</ng-container>\n\n<ng-container *ngIf=\"submission?.id\">\n <div fxLayout=\"column\" fxLayoutGap=\"1rem\" class=\"mat-typography\">\n <mat-card\n fxLayout=\"column\"\n fxLayoutGap=\"0.5rem\"\n class=\"w-100\"\n *ngFor=\"let question of submission.format.questions; let i = index\"\n >\n <app-checksheet-question\n [questionInfo]=\"question\"\n [index]=\"i\"\n [submissionView]=\"true\"\n [submissionId]=\"submission.id\"\n [disableInput]=\"disableInput\"\n >\n </app-checksheet-question>\n </mat-card>\n </div>\n</ng-container>\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i6.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "component", type: i8.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i7.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i9$2.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "component", type: ChecksheetQuestionComponent, selector: "app-checksheet-question", inputs: ["questionInfo", "index", "submissionView", "submissionId", "disableInput", "isWorking"], outputs: ["isWorkingChange"] }] });
915
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetQuestionListComponent, deps: [{ token: i3.NgxSpinnerService }, { token: i1.AlertService }, { token: i1$1.MatDialog }, { token: i1.DataManager }], target: i0.ɵɵFactoryTarget.Component });
916
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ChecksheetQuestionListComponent, selector: "app-checksheet-question-list", inputs: { checksheet: "checksheet", submission: "submission", disableInput: "disableInput" }, outputs: { checksheetChange: "checksheetChange" }, ngImport: i0, template: "<ng-container *ngIf=\"checksheet?.id\">\n <mat-card *ngIf=\"!disableInput\" class=\"mb-3\">\n <mat-card-content class=\"d-flex justify-content-start align-items-center gap-2\">\n <h2 class=\"mb-0\">Questions</h2>\n <mat-icon (click)=\"addQuestion()\" class=\"cursor-pointer\">add</mat-icon>\n </mat-card-content>\n </mat-card>\n\n <div class=\"d-flex flex-column gap-3 mat-typography\" infiniteScroll\n [infiniteScrollDistance]=\"1\" [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\">\n <mat-card *ngFor=\"let question of questions; let i = index\">\n <mat-card-content class=\"d-flex justify-content-between align-items-start gap-3\">\n <app-checksheet-question [questionInfo]=\"question\" [index]=\"i\"></app-checksheet-question>\n <div class=\"d-flex flex-row gap-3 justify-content-end\" *ngIf=\"!disableInput\">\n <mat-icon class=\"cursor-pointer\" (click)=\"deleteQuestion(question)\">delete</mat-icon>\n <mat-icon class=\"cursor-pointer\" (click)=\"editQuestion(question, i)\">edit</mat-icon>\n <mat-icon class=\"cursor-pointer\" *ngIf=\"i > 0\" (click)=\"moveQuestionUp(i)\">arrow_upward</mat-icon>\n <mat-icon class=\"cursor-pointer\" *ngIf=\"i < questions.length - 1\" (click)=\"moveQuestionDown(i)\">\n arrow_downward\n </mat-icon>\n </div>\n\n </mat-card-content>\n </mat-card>\n </div>\n</ng-container>\n\n<ng-container *ngIf=\"submission?.id\">\n <div class=\"d-flex flex-column gap-2\">\n <app-checksheet-question *ngFor=\"let question of submission.format.questions; let i = index\"\n [questionInfo]=\"question\" [index]=\"i\" [submissionView]=\"true\"\n [submissionId]=\"submission.id\" [disableInput]=\"disableInput\">\n </app-checksheet-question>\n </div>\n</ng-container>\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4$1.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4$1.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i6$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i7$1.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "component", type: ChecksheetQuestionComponent, selector: "app-checksheet-question", inputs: ["questionInfo", "index", "submissionView", "submissionId", "disableInput", "isWorking"], outputs: ["isWorkingChange"] }] });
735
917
  }
736
918
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetQuestionListComponent, decorators: [{
737
919
  type: Component,
738
- args: [{ selector: 'app-checksheet-question-list', template: "<ng-container *ngIf=\"checksheet?.id\">\n <button\n *ngIf=\"!disableInput\"\n type=\"button\"\n mat-raised-button\n color=\"primary\"\n (click)=\"addQuestion()\"\n class=\"mb-2\"\n >\n Add Question\n </button>\n\n <div\n class=\"d-flex flex-column gap-3 mat-typography scroll-container\"\n infiniteScroll\n [infiniteScrollDistance]=\"1\"\n [infiniteScrollThrottle]=\"50\"\n (scrolled)=\"onScroll()\"\n [scrollWindow]=\"false\"\n >\n <mat-card\n class=\"d-flex flex-column gap-3\"\n *ngFor=\"let question of questions; let i = index\"\n >\n <div\n class=\"d-flex flex-row gap-3 justify-content-end\"\n *ngIf=\"!disableInput\"\n >\n <mat-icon class=\"cursor-pointer\" (click)=\"deleteQuestion(question)\">\n delete\n </mat-icon>\n <mat-icon class=\"cursor-pointer\" (click)=\"editQuestion(question, i)\">\n edit\n </mat-icon>\n <mat-icon\n class=\"cursor-pointer\"\n *ngIf=\"i > 0\"\n (click)=\"moveQuestionUp(i)\"\n >\n arrow_upward\n </mat-icon>\n <mat-icon\n class=\"cursor-pointer\"\n *ngIf=\"i < questions.length - 1\"\n (click)=\"moveQuestionDown(i)\"\n >\n arrow_downward\n </mat-icon>\n </div>\n\n <div>\n <app-checksheet-question\n [questionInfo]=\"question\"\n [index]=\"i\"\n ></app-checksheet-question>\n </div>\n </mat-card>\n </div>\n</ng-container>\n\n<ng-container *ngIf=\"submission?.id\">\n <div fxLayout=\"column\" fxLayoutGap=\"1rem\" class=\"mat-typography\">\n <mat-card\n fxLayout=\"column\"\n fxLayoutGap=\"0.5rem\"\n class=\"w-100\"\n *ngFor=\"let question of submission.format.questions; let i = index\"\n >\n <app-checksheet-question\n [questionInfo]=\"question\"\n [index]=\"i\"\n [submissionView]=\"true\"\n [submissionId]=\"submission.id\"\n [disableInput]=\"disableInput\"\n >\n </app-checksheet-question>\n </mat-card>\n </div>\n</ng-container>\n" }]
739
- }], ctorParameters: () => [{ type: i3$1.NgxSpinnerService }, { type: i1.AlertService }, { type: i1$1.MatDialog }, { type: i1.DataManager }], propDecorators: { checksheet: [{
920
+ args: [{ selector: 'app-checksheet-question-list', template: "<ng-container *ngIf=\"checksheet?.id\">\n <mat-card *ngIf=\"!disableInput\" class=\"mb-3\">\n <mat-card-content class=\"d-flex justify-content-start align-items-center gap-2\">\n <h2 class=\"mb-0\">Questions</h2>\n <mat-icon (click)=\"addQuestion()\" class=\"cursor-pointer\">add</mat-icon>\n </mat-card-content>\n </mat-card>\n\n <div class=\"d-flex flex-column gap-3 mat-typography\" infiniteScroll\n [infiniteScrollDistance]=\"1\" [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\">\n <mat-card *ngFor=\"let question of questions; let i = index\">\n <mat-card-content class=\"d-flex justify-content-between align-items-start gap-3\">\n <app-checksheet-question [questionInfo]=\"question\" [index]=\"i\"></app-checksheet-question>\n <div class=\"d-flex flex-row gap-3 justify-content-end\" *ngIf=\"!disableInput\">\n <mat-icon class=\"cursor-pointer\" (click)=\"deleteQuestion(question)\">delete</mat-icon>\n <mat-icon class=\"cursor-pointer\" (click)=\"editQuestion(question, i)\">edit</mat-icon>\n <mat-icon class=\"cursor-pointer\" *ngIf=\"i > 0\" (click)=\"moveQuestionUp(i)\">arrow_upward</mat-icon>\n <mat-icon class=\"cursor-pointer\" *ngIf=\"i < questions.length - 1\" (click)=\"moveQuestionDown(i)\">\n arrow_downward\n </mat-icon>\n </div>\n\n </mat-card-content>\n </mat-card>\n </div>\n</ng-container>\n\n<ng-container *ngIf=\"submission?.id\">\n <div class=\"d-flex flex-column gap-2\">\n <app-checksheet-question *ngFor=\"let question of submission.format.questions; let i = index\"\n [questionInfo]=\"question\" [index]=\"i\" [submissionView]=\"true\"\n [submissionId]=\"submission.id\" [disableInput]=\"disableInput\">\n </app-checksheet-question>\n </div>\n</ng-container>\n" }]
921
+ }], ctorParameters: () => [{ type: i3.NgxSpinnerService }, { type: i1.AlertService }, { type: i1$1.MatDialog }, { type: i1.DataManager }], propDecorators: { checksheet: [{
740
922
  type: Input
741
923
  }], checksheetChange: [{
742
924
  type: Output
@@ -751,7 +933,7 @@ const errorMessages$3 = {
751
933
  required: 'The title is required.'
752
934
  }
753
935
  };
754
- class ChecksheetFormComponent {
936
+ class ChecksheetFormatFormComponent {
755
937
  formValidatorService;
756
938
  fb;
757
939
  spinnerService;
@@ -764,11 +946,12 @@ class ChecksheetFormComponent {
764
946
  checksheetFormatService;
765
947
  checksheetForm;
766
948
  updateMode;
767
- checksheet;
949
+ checksheetFormat;
768
950
  isSaving = false;
769
951
  id;
770
952
  disableInput;
771
953
  isLoading = false;
954
+ showChecksheetInfo = false;
772
955
  constructor(formValidatorService, fb, spinnerService, alertService, location, errorHandler, dataManager, dialog, route, checksheetFormatService) {
773
956
  this.formValidatorService = formValidatorService;
774
957
  this.fb = fb;
@@ -824,47 +1007,17 @@ class ChecksheetFormComponent {
824
1007
  request.subscribe({
825
1008
  next: (result) => {
826
1009
  this.isSaving = false;
827
- if (!this.updateMode) {
828
- this.checksheet = result.item;
829
- this.checksheetForm.patchValue({ ...this.checksheet });
830
- }
1010
+ this.checksheetFormat = result?.item;
1011
+ this.checksheetForm.patchValue({ ...this.checksheetFormat });
831
1012
  this.updateMode = true;
832
- this.alertService.addAlert('Checksheet saved successfully', 'success');
1013
+ this.showChecksheetInfo = false;
1014
+ this.alertService.addAlert('Checksheet format saved successfully', 'success');
833
1015
  },
834
- error: (error) => {
1016
+ error: () => {
835
1017
  this.isSaving = false;
836
1018
  }
837
1019
  });
838
1020
  }
839
- publishChecksheet() {
840
- const dialogRef = this.dialog.open(ActionPopupComponent, {
841
- width: '400px',
842
- data: {
843
- title: 'Publish Checksheet',
844
- message: `Review the checksheet completely before publishing, you cannot alter once it is published. Are you sure to publish the Checksheet?`
845
- },
846
- autoFocus: false
847
- });
848
- dialogRef.afterClosed().subscribe(async (result) => {
849
- if (result) {
850
- //Action confirmed
851
- try {
852
- this.spinnerService.show();
853
- const model = this.checksheetForm.value;
854
- model.is_published = true;
855
- const result = await this.dataManager.PUT(`api/checksheet-formats/${model.id}`, model);
856
- this.alertService.addAlert('Checksheet successfully published', 'success');
857
- this.location.back();
858
- }
859
- catch (error) {
860
- this.errorHandler.handleError(error, 'Unable to publish checksheet, try later');
861
- }
862
- finally {
863
- this.spinnerService.hide();
864
- }
865
- }
866
- });
867
- }
868
1021
  loadChecksheetFormat() {
869
1022
  this.isLoading = true;
870
1023
  const params = { with: 'questions.answers,questions.type' };
@@ -872,20 +1025,20 @@ class ChecksheetFormComponent {
872
1025
  next: (result) => {
873
1026
  this.isLoading = false;
874
1027
  this.checksheetForm.patchValue(result?.item);
875
- this.checksheet = result?.item;
1028
+ this.checksheetFormat = result?.item;
876
1029
  },
877
1030
  error: () => {
878
1031
  this.isLoading = false;
879
1032
  }
880
1033
  });
881
1034
  }
882
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetFormComponent, deps: [{ token: i1.FormValidatorService }, { token: i2.UntypedFormBuilder }, { token: i3$1.NgxSpinnerService }, { token: i1.AlertService }, { token: i4.Location }, { token: i1.ErrorHandlerService }, { token: i1.DataManager }, { token: i1$1.MatDialog }, { token: i6$2.ActivatedRoute }, { token: ChecksheetFormatService }], target: i0.ɵɵFactoryTarget.Component });
883
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ChecksheetFormComponent, selector: "app-checksheet-form", inputs: { disableInput: "disableInput" }, ngImport: i0, template: "<div fxLayout=\"column\" fxLayoutGap=\"0.5rem\">\n <h2>Checksheet Form</h2>\n\n <div\n class=\"d-flex justify-content-start align-items-start gap-3\"\n *ngIf=\"!isLoading\"\n >\n <div style=\"width: calc(70% - 1rem)\" *ngIf=\"checksheet\">\n <app-checksheet-question-list\n class=\"w-100\"\n [(checksheet)]=\"checksheet\"\n [disableInput]=\"disableInput\"\n >\n </app-checksheet-question-list>\n </div>\n <mat-card style=\"width: calc(30% - 1rem)\">\n <mat-card-content>\n <h3>Checksheet Info</h3>\n <form\n [formGroup]=\"checksheetForm\"\n (submit)=\"submit()\"\n fxLayout=\"column\"\n fxLayoutGap=\"0.25rem\"\n >\n <mat-form-field>\n <input\n matInput\n formControlName=\"title\"\n placeholder=\"Title\"\n autocomplete=\"off\"\n required\n />\n <mat-error *ngIf=\"isFieldValid('title')\">\n {{ getErrorMessage('title') }}\n </mat-error>\n </mat-form-field>\n\n <div\n class=\"my-2\"\n fxLayout=\"row\"\n fxLayoutGap=\"15px\"\n fxLayoutAlign=\"end\"\n *ngIf=\"!disableInput\"\n >\n <button\n [disabled]=\"isSaving\"\n mat-flat-button\n type=\"button\"\n (click)=\"location.back()\"\n >\n Cancel\n </button>\n <button\n [disabled]=\"isSaving\"\n mat-raised-button\n type=\"submit\"\n color=\"primary\"\n >\n Save\n </button>\n\n <button\n mat-raised-button\n [disabled]=\"isSaving\"\n color=\"accent\"\n *ngIf=\"updateMode\"\n type=\"button\"\n (click)=\"publishChecksheet()\"\n >\n Publish\n </button>\n </div>\n </form>\n </mat-card-content>\n </mat-card>\n </div>\n\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isLoading\"></mat-progress-bar>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i6.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i6.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "component", type: i8.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i7.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i7.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i10.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i10.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i12.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i8$1.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: ChecksheetQuestionListComponent, selector: "app-checksheet-question-list", inputs: ["checksheet", "submission", "disableInput"], outputs: ["checksheetChange"] }] });
1035
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetFormatFormComponent, deps: [{ token: i1.FormValidatorService }, { token: i2.UntypedFormBuilder }, { token: i3.NgxSpinnerService }, { token: i1.AlertService }, { token: i4.Location }, { token: i1.ErrorHandlerService }, { token: i1.DataManager }, { token: i1$1.MatDialog }, { token: i6$2.ActivatedRoute }, { token: ChecksheetFormatService }], target: i0.ɵɵFactoryTarget.Component });
1036
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ChecksheetFormatFormComponent, selector: "app-checksheet-format-form", inputs: { disableInput: "disableInput" }, ngImport: i0, template: "<div class=\"d-flex justify-content-start align-items-start gap-3 w-100\" *ngIf=\"!isLoading\">\n <div class=\"d-flex flex-column gap-3\" style=\"width: 80%\">\n <mat-card>\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-3\">\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <span class=\"material-symbols-outlined fs-1\">\n list_alt_check\n </span>\n <h2 class=\"mb-0\">{{ checksheetFormat ? 'Update' : 'Create' }} Checksheet Format</h2>\n </div>\n <span class=\"badge bg-secondary\" *ngIf=\"checksheetFormat?.questions\">\n {{ checksheetFormat?.questions?.length }} Questions\n </span>\n </mat-card-content>\n </mat-card>\n\n <app-checksheet-question-list class=\"w-100\" [(checksheet)]=\"checksheetFormat\" [disableInput]=\"disableInput\">\n </app-checksheet-question-list>\n </div>\n <div style=\"width: calc(20% - 1rem)\" class=\"d-flex flex-column gap-3\">\n <mat-card *ngIf=\"!checksheetFormat || showChecksheetInfo\">\n <mat-card-content>\n <h3>Checksheet Format Information</h3>\n <form [formGroup]=\"checksheetForm\" (submit)=\"submit()\" fxLayout=\"column\" fxLayoutGap=\"0.25rem\">\n <mat-form-field>\n <input matInput formControlName=\"title\" placeholder=\"Title\" autocomplete=\"off\" required/>\n <mat-error *ngIf=\"isFieldValid('title')\">\n {{ getErrorMessage('title') }}\n </mat-error>\n </mat-form-field>\n\n <div class=\"my-2\" fxLayout=\"row\" fxLayoutGap=\"15px\" fxLayoutAlign=\"end\" *ngIf=\"!disableInput\">\n <button [disabled]=\"isSaving\" mat-flat-button type=\"button\" (click)=\"showChecksheetInfo = false\">\n Cancel\n </button>\n <button [disabled]=\"isSaving\" mat-raised-button type=\"submit\" color=\"primary\">\n Save\n </button>\n\n <app-checksheet-format-publish-button [checksheetFormat]=\"checksheetFormat\" *ngIf=\"updateMode\"\n (changed)=\"loadChecksheetFormat()\">\n </app-checksheet-format-publish-button>\n </div>\n </form>\n </mat-card-content>\n </mat-card>\n\n <mat-card *ngIf=\"checksheetFormat && !showChecksheetInfo\">\n <mat-card-content>\n <div class=\"d-flex justify-content-between align-items-center gap-2\">\n <h3 class=\"mb-0\">Information</h3>\n <div class=\"d-flex justify-content-end align-items-center gap-2\">\n <mat-icon class=\"cursor-pointer\" (click)=\"showChecksheetInfo = true\">edit</mat-icon>\n <app-checksheet-format-delete-button [checksheetFormat]=\"checksheetFormat\" (deleted)=\"loadChecksheetFormat()\">\n </app-checksheet-format-delete-button>\n\n <app-checksheet-format-copy-button [checksheetFormat]=\"checksheetFormat\" (changed)=\"loadChecksheetFormat()\">\n </app-checksheet-format-copy-button>\n\n <app-checksheet-format-unpublish-button [checksheetFormat]=\"checksheetFormat\" (changed)=\"loadChecksheetFormat()\">\n </app-checksheet-format-unpublish-button>\n\n <app-checksheet-format-publish-button [checksheetFormat]=\"checksheetFormat\" (changed)=\"loadChecksheetFormat()\" viewMode=\"icon\">\n </app-checksheet-format-publish-button>\n </div>\n </div>\n </mat-card-content>\n <mat-card-content class=\"mt-3 d-flex flex-column justify-content-center align-items-center gap-2\">\n <h2 class=\"mb-0\">{{ checksheetFormat?.title }}</h2>\n <span class=\"badge bg-secondary\">{{ checksheetFormat?.submissions_count }} Checksheet Submissions</span>\n <small class=\"text-secondary\">\n By {{ checksheetFormat?.creator?.name }} on {{ checksheetFormat?.created_at| date }}\n </small>\n </mat-card-content>\n </mat-card>\n\n <app-note-list *ngIf=\"checksheetFormat\" viewMode=\"timeline\" [relatedModelId]=\"checksheetFormat?.id\"\n modelType=\"ChecksheetFormat\"></app-note-list>\n </div>\n</div>\n\n<mat-progress-bar mode=\"indeterminate\" *ngIf=\"isLoading\"></mat-progress-bar>\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i6.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i6.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "component", type: i8.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i4$1.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4$1.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i10.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i10.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "component", type: i6$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i1.NoteListComponent, selector: "app-note-list", inputs: ["relatedModelId", "modelType", "readonly", "labelText", "commentsView", "viewMode"] }, { kind: "component", type: ChecksheetFormatCopyButtonComponent, selector: "app-checksheet-format-copy-button", inputs: ["checksheetFormat"], outputs: ["changed"] }, { kind: "component", type: ChecksheetFormatDeleteButtonComponent, selector: "app-checksheet-format-delete-button", inputs: ["checksheetFormat"], outputs: ["deleted"] }, { kind: "component", type: ChecksheetFormatUnpublishButtonComponent, selector: "app-checksheet-format-unpublish-button", inputs: ["checksheetFormat"], outputs: ["changed"] }, { kind: "component", type: ChecksheetFormatPublishButtonComponent, selector: "app-checksheet-format-publish-button", inputs: ["checksheetFormat", "viewMode"], outputs: ["changed"] }, { kind: "component", type: ChecksheetQuestionListComponent, selector: "app-checksheet-question-list", inputs: ["checksheet", "submission", "disableInput"], outputs: ["checksheetChange"] }, { kind: "pipe", type: i4.DatePipe, name: "date" }] });
884
1037
  }
885
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetFormComponent, decorators: [{
1038
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetFormatFormComponent, decorators: [{
886
1039
  type: Component,
887
- args: [{ selector: 'app-checksheet-form', template: "<div fxLayout=\"column\" fxLayoutGap=\"0.5rem\">\n <h2>Checksheet Form</h2>\n\n <div\n class=\"d-flex justify-content-start align-items-start gap-3\"\n *ngIf=\"!isLoading\"\n >\n <div style=\"width: calc(70% - 1rem)\" *ngIf=\"checksheet\">\n <app-checksheet-question-list\n class=\"w-100\"\n [(checksheet)]=\"checksheet\"\n [disableInput]=\"disableInput\"\n >\n </app-checksheet-question-list>\n </div>\n <mat-card style=\"width: calc(30% - 1rem)\">\n <mat-card-content>\n <h3>Checksheet Info</h3>\n <form\n [formGroup]=\"checksheetForm\"\n (submit)=\"submit()\"\n fxLayout=\"column\"\n fxLayoutGap=\"0.25rem\"\n >\n <mat-form-field>\n <input\n matInput\n formControlName=\"title\"\n placeholder=\"Title\"\n autocomplete=\"off\"\n required\n />\n <mat-error *ngIf=\"isFieldValid('title')\">\n {{ getErrorMessage('title') }}\n </mat-error>\n </mat-form-field>\n\n <div\n class=\"my-2\"\n fxLayout=\"row\"\n fxLayoutGap=\"15px\"\n fxLayoutAlign=\"end\"\n *ngIf=\"!disableInput\"\n >\n <button\n [disabled]=\"isSaving\"\n mat-flat-button\n type=\"button\"\n (click)=\"location.back()\"\n >\n Cancel\n </button>\n <button\n [disabled]=\"isSaving\"\n mat-raised-button\n type=\"submit\"\n color=\"primary\"\n >\n Save\n </button>\n\n <button\n mat-raised-button\n [disabled]=\"isSaving\"\n color=\"accent\"\n *ngIf=\"updateMode\"\n type=\"button\"\n (click)=\"publishChecksheet()\"\n >\n Publish\n </button>\n </div>\n </form>\n </mat-card-content>\n </mat-card>\n </div>\n\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isLoading\"></mat-progress-bar>\n</div>\n" }]
888
- }], ctorParameters: () => [{ type: i1.FormValidatorService }, { type: i2.UntypedFormBuilder }, { type: i3$1.NgxSpinnerService }, { type: i1.AlertService }, { type: i4.Location }, { type: i1.ErrorHandlerService }, { type: i1.DataManager }, { type: i1$1.MatDialog }, { type: i6$2.ActivatedRoute }, { type: ChecksheetFormatService }], propDecorators: { disableInput: [{
1040
+ args: [{ selector: 'app-checksheet-format-form', template: "<div class=\"d-flex justify-content-start align-items-start gap-3 w-100\" *ngIf=\"!isLoading\">\n <div class=\"d-flex flex-column gap-3\" style=\"width: 80%\">\n <mat-card>\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-3\">\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <span class=\"material-symbols-outlined fs-1\">\n list_alt_check\n </span>\n <h2 class=\"mb-0\">{{ checksheetFormat ? 'Update' : 'Create' }} Checksheet Format</h2>\n </div>\n <span class=\"badge bg-secondary\" *ngIf=\"checksheetFormat?.questions\">\n {{ checksheetFormat?.questions?.length }} Questions\n </span>\n </mat-card-content>\n </mat-card>\n\n <app-checksheet-question-list class=\"w-100\" [(checksheet)]=\"checksheetFormat\" [disableInput]=\"disableInput\">\n </app-checksheet-question-list>\n </div>\n <div style=\"width: calc(20% - 1rem)\" class=\"d-flex flex-column gap-3\">\n <mat-card *ngIf=\"!checksheetFormat || showChecksheetInfo\">\n <mat-card-content>\n <h3>Checksheet Format Information</h3>\n <form [formGroup]=\"checksheetForm\" (submit)=\"submit()\" fxLayout=\"column\" fxLayoutGap=\"0.25rem\">\n <mat-form-field>\n <input matInput formControlName=\"title\" placeholder=\"Title\" autocomplete=\"off\" required/>\n <mat-error *ngIf=\"isFieldValid('title')\">\n {{ getErrorMessage('title') }}\n </mat-error>\n </mat-form-field>\n\n <div class=\"my-2\" fxLayout=\"row\" fxLayoutGap=\"15px\" fxLayoutAlign=\"end\" *ngIf=\"!disableInput\">\n <button [disabled]=\"isSaving\" mat-flat-button type=\"button\" (click)=\"showChecksheetInfo = false\">\n Cancel\n </button>\n <button [disabled]=\"isSaving\" mat-raised-button type=\"submit\" color=\"primary\">\n Save\n </button>\n\n <app-checksheet-format-publish-button [checksheetFormat]=\"checksheetFormat\" *ngIf=\"updateMode\"\n (changed)=\"loadChecksheetFormat()\">\n </app-checksheet-format-publish-button>\n </div>\n </form>\n </mat-card-content>\n </mat-card>\n\n <mat-card *ngIf=\"checksheetFormat && !showChecksheetInfo\">\n <mat-card-content>\n <div class=\"d-flex justify-content-between align-items-center gap-2\">\n <h3 class=\"mb-0\">Information</h3>\n <div class=\"d-flex justify-content-end align-items-center gap-2\">\n <mat-icon class=\"cursor-pointer\" (click)=\"showChecksheetInfo = true\">edit</mat-icon>\n <app-checksheet-format-delete-button [checksheetFormat]=\"checksheetFormat\" (deleted)=\"loadChecksheetFormat()\">\n </app-checksheet-format-delete-button>\n\n <app-checksheet-format-copy-button [checksheetFormat]=\"checksheetFormat\" (changed)=\"loadChecksheetFormat()\">\n </app-checksheet-format-copy-button>\n\n <app-checksheet-format-unpublish-button [checksheetFormat]=\"checksheetFormat\" (changed)=\"loadChecksheetFormat()\">\n </app-checksheet-format-unpublish-button>\n\n <app-checksheet-format-publish-button [checksheetFormat]=\"checksheetFormat\" (changed)=\"loadChecksheetFormat()\" viewMode=\"icon\">\n </app-checksheet-format-publish-button>\n </div>\n </div>\n </mat-card-content>\n <mat-card-content class=\"mt-3 d-flex flex-column justify-content-center align-items-center gap-2\">\n <h2 class=\"mb-0\">{{ checksheetFormat?.title }}</h2>\n <span class=\"badge bg-secondary\">{{ checksheetFormat?.submissions_count }} Checksheet Submissions</span>\n <small class=\"text-secondary\">\n By {{ checksheetFormat?.creator?.name }} on {{ checksheetFormat?.created_at| date }}\n </small>\n </mat-card-content>\n </mat-card>\n\n <app-note-list *ngIf=\"checksheetFormat\" viewMode=\"timeline\" [relatedModelId]=\"checksheetFormat?.id\"\n modelType=\"ChecksheetFormat\"></app-note-list>\n </div>\n</div>\n\n<mat-progress-bar mode=\"indeterminate\" *ngIf=\"isLoading\"></mat-progress-bar>\n" }]
1041
+ }], ctorParameters: () => [{ type: i1.FormValidatorService }, { type: i2.UntypedFormBuilder }, { type: i3.NgxSpinnerService }, { type: i1.AlertService }, { type: i4.Location }, { type: i1.ErrorHandlerService }, { type: i1.DataManager }, { type: i1$1.MatDialog }, { type: i6$2.ActivatedRoute }, { type: ChecksheetFormatService }], propDecorators: { disableInput: [{
889
1042
  type: Input
890
1043
  }] } });
891
1044
 
@@ -910,67 +1063,6 @@ class ChecksheetFormatListComponent extends TechlifyListingControllerInterface {
910
1063
  ngOnInit() {
911
1064
  this.loadData();
912
1065
  }
913
- deactivateChecksheet(checksheet) {
914
- const dialogRef = this.dialog.open(ActionPopupComponent, {
915
- width: '400px',
916
- data: {
917
- title: 'Deactivate Checksheet',
918
- message: `Are you sure to proceed deactivate the ${checksheet.title}?`
919
- },
920
- autoFocus: false
921
- });
922
- dialogRef.afterClosed().subscribe(async (result) => {
923
- if (result) {
924
- this.service.delete(checksheet).subscribe({
925
- next: () => {
926
- this.alertService.addAlert('Checksheet deactivated successfully!', 'success');
927
- this.models = this.models.filter((x) => x.id !== checksheet.id);
928
- }
929
- });
930
- }
931
- });
932
- }
933
- copyChecksheet(checksheet) {
934
- const dialogRef = this.dialog.open(ActionPopupComponent, {
935
- width: '400px',
936
- data: {
937
- title: 'Copy Checksheet',
938
- message: `Are you sure to proceed copy the ${checksheet.title}?`
939
- },
940
- autoFocus: false
941
- });
942
- dialogRef.afterClosed().subscribe(async (result) => {
943
- if (result) {
944
- this.service.copy(checksheet).subscribe({
945
- next: () => {
946
- this.alertService.addAlert('Checksheet copied successfully!', 'success');
947
- this.reload();
948
- }
949
- });
950
- }
951
- });
952
- }
953
- unpublishChecksheet(checksheet) {
954
- const dialogRef = this.dialog.open(ActionPopupComponent, {
955
- width: '400px',
956
- data: {
957
- title: 'Unpublish Checksheet',
958
- message: `Are you sure to unpublish the format ${checksheet.title}?
959
- This checksheet format would no longer be available to team members to create submissions for. `
960
- },
961
- autoFocus: false
962
- });
963
- dialogRef.afterClosed().subscribe(async (result) => {
964
- if (result) {
965
- this.service.unpublish(checksheet).subscribe({
966
- next: () => {
967
- this.alertService.addAlert('Checksheet unpublished successfully!', 'success');
968
- this.reload();
969
- }
970
- });
971
- }
972
- });
973
- }
974
1066
  loadData() {
975
1067
  this.isWorking = true;
976
1068
  const params = {
@@ -991,11 +1083,11 @@ class ChecksheetFormatListComponent extends TechlifyListingControllerInterface {
991
1083
  });
992
1084
  }
993
1085
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetFormatListComponent, deps: [{ token: i1$1.MatDialog }, { token: ChecksheetFormatService }, { token: i1.AlertService }], target: i0.ɵɵFactoryTarget.Component });
994
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ChecksheetFormatListComponent, selector: "app-checksheet-format-list", usesInheritance: true, ngImport: i0, template: "<mat-card>\n <mat-card-content>\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <h3 class=\"mb-0\">Checksheet Formats</h3>\n <a [routerLink]=\"['../checksheet-form']\" class=\"text-decoration-none text-dark mt-2\">\n <mat-icon>add</mat-icon>\n </a>\n </div>\n </mat-card-content>\n</mat-card>\n\n<mat-card class=\"mt-3\">\n <mat-card-content class=\"p-0\">\n <table\n mat-table [dataSource]=\"models\" class=\"w-100\"\n infiniteScroll [infiniteScrollDistance]=\"2\" [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\"\n >\n <!-- Index Column -->\n <ng-container matColumnDef=\"index\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">\n {{ i + 1 }}\n </td>\n </ng-container>\n\n <!-- Title Column -->\n <ng-container matColumnDef=\"title\">\n <th mat-header-cell *matHeaderCellDef>Title</th>\n <td mat-cell *matCellDef=\"let element\">{{ element.title }} <br /></td>\n </ng-container>\n\n <!-- Questions Column -->\n <ng-container matColumnDef=\"questions\">\n <th mat-header-cell *matHeaderCellDef>Questions</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element.questions_count }}\n </td>\n </ng-container>\n\n <!-- Submissions Column -->\n <ng-container matColumnDef=\"submissions\">\n <th mat-header-cell *matHeaderCellDef>Submissions</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element.submissions_count }}\n </td>\n </ng-container>\n\n <!-- is Published Column -->\n <ng-container matColumnDef=\"is_published\">\n <th mat-header-cell *matHeaderCellDef>Published</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.is_published ? 'Yes' : 'No' }}\n </td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <a\n [routerLink]=\"['../checksheet-view/', element?.id]\"\n class=\"text-decoration-none text-dark\"\n >\n <mat-icon>search</mat-icon>\n </a>\n\n <a\n *ngIf=\"!element.is_published\"\n [routerLink]=\"['../checksheet-form/', element?.id]\"\n class=\"text-decoration-none text-dark\"\n >\n <mat-icon>edit</mat-icon>\n </a>\n\n <mat-icon\n class=\"cursor-pointer text-dark\"\n *ngIf=\"!element.submissions_count\"\n (click)=\"$event.stopPropagation(); deactivateChecksheet(element)\"\n >\n delete\n </mat-icon>\n\n <a\n *ngIf=\"!element.is_published\"\n [routerLink]=\"['../checksheet-view/', element?.id]\"\n (click)=\"$event.stopPropagation(); copyChecksheet(element)\"\n class=\"text-decoration-none text-dark\"\n matTooltip=\"Copy\"\n >\n <mat-icon>content_copy</mat-icon>\n </a>\n\n <mat-icon\n class=\"cursor-pointer text-dark\"\n *ngIf=\"element.is_published\"\n (click)=\"$event.stopPropagation(); unpublishChecksheet(element)\"\n matTooltip=\"Unpublish\"\n >\n unpublished\n </mat-icon>\n </div>\n </td>\n </ng-container>\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isWorking\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>\n", styles: [".scroll-container{max-height:800px;overflow-y:auto}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6$2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i7.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i7.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i8$1.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: i6$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i6$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i6$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i6$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i6$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i6$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i6$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i6$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i6$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i6$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i6$3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: i9$2.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }] });
1086
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ChecksheetFormatListComponent, selector: "app-checksheet-format-list", usesInheritance: true, ngImport: i0, template: "<mat-card>\n <mat-card-content>\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <h3 class=\"mb-0\">Checksheet Formats</h3>\n <a [routerLink]=\"['../checksheet-format-form']\" class=\"text-decoration-none text-dark mt-2\">\n <mat-icon>add</mat-icon>\n </a>\n </div>\n </mat-card-content>\n</mat-card>\n\n<mat-card class=\"mt-3\">\n <mat-card-content class=\"p-0\">\n <table\n mat-table [dataSource]=\"models\" class=\"w-100\"\n infiniteScroll [infiniteScrollDistance]=\"2\" [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\"\n >\n <!-- Index Column -->\n <ng-container matColumnDef=\"index\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">\n {{ i + 1 }}\n </td>\n </ng-container>\n\n <!-- Title Column -->\n <ng-container matColumnDef=\"title\">\n <th mat-header-cell *matHeaderCellDef>Title</th>\n <td mat-cell *matCellDef=\"let element\">{{ element.title }} <br /></td>\n </ng-container>\n\n <!-- Questions Column -->\n <ng-container matColumnDef=\"questions\">\n <th mat-header-cell *matHeaderCellDef>Questions</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element.questions_count }}\n </td>\n </ng-container>\n\n <!-- Submissions Column -->\n <ng-container matColumnDef=\"submissions\">\n <th mat-header-cell *matHeaderCellDef>Submissions</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element.submissions_count }}\n </td>\n </ng-container>\n\n <!-- is Published Column -->\n <ng-container matColumnDef=\"is_published\">\n <th mat-header-cell *matHeaderCellDef>Published</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.is_published ? 'Yes' : 'No' }}\n </td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element; let i = index;\">\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <a [routerLink]=\"['../checksheet-format-view/', element?.id]\" class=\"text-decoration-none text-dark\">\n <mat-icon>search</mat-icon>\n </a>\n\n <a *ngIf=\"!element.is_published\" [routerLink]=\"['../checksheet-format-form/', element?.id]\"\n class=\"text-decoration-none text-dark\">\n <mat-icon>edit</mat-icon>\n </a>\n\n <app-checksheet-format-delete-button [checksheetFormat]=\"element\" (deleted)=\"modelDeleted(i)\">\n </app-checksheet-format-delete-button>\n\n <app-checksheet-format-copy-button [checksheetFormat]=\"element\" (changed)=\"reload()\">\n </app-checksheet-format-copy-button>\n\n <app-checksheet-format-unpublish-button [checksheetFormat]=\"element\" (changed)=\"reload()\">\n </app-checksheet-format-unpublish-button>\n\n <app-checksheet-format-publish-button [checksheetFormat]=\"element\" (changed)=\"reload()\" viewMode=\"icon\">\n </app-checksheet-format-publish-button>\n </div>\n </td>\n </ng-container>\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isWorking\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>\n", styles: [".scroll-container{max-height:800px;overflow-y:auto}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6$2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i4$1.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4$1.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i6$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: i7.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i7.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i7.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i7.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i7.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i7.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i7.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i7.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i7.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i7.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i7$1.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "component", type: ChecksheetFormatCopyButtonComponent, selector: "app-checksheet-format-copy-button", inputs: ["checksheetFormat"], outputs: ["changed"] }, { kind: "component", type: ChecksheetFormatDeleteButtonComponent, selector: "app-checksheet-format-delete-button", inputs: ["checksheetFormat"], outputs: ["deleted"] }, { kind: "component", type: ChecksheetFormatUnpublishButtonComponent, selector: "app-checksheet-format-unpublish-button", inputs: ["checksheetFormat"], outputs: ["changed"] }, { kind: "component", type: ChecksheetFormatPublishButtonComponent, selector: "app-checksheet-format-publish-button", inputs: ["checksheetFormat", "viewMode"], outputs: ["changed"] }] });
995
1087
  }
996
1088
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetFormatListComponent, decorators: [{
997
1089
  type: Component,
998
- args: [{ selector: 'app-checksheet-format-list', template: "<mat-card>\n <mat-card-content>\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <h3 class=\"mb-0\">Checksheet Formats</h3>\n <a [routerLink]=\"['../checksheet-form']\" class=\"text-decoration-none text-dark mt-2\">\n <mat-icon>add</mat-icon>\n </a>\n </div>\n </mat-card-content>\n</mat-card>\n\n<mat-card class=\"mt-3\">\n <mat-card-content class=\"p-0\">\n <table\n mat-table [dataSource]=\"models\" class=\"w-100\"\n infiniteScroll [infiniteScrollDistance]=\"2\" [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\"\n >\n <!-- Index Column -->\n <ng-container matColumnDef=\"index\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">\n {{ i + 1 }}\n </td>\n </ng-container>\n\n <!-- Title Column -->\n <ng-container matColumnDef=\"title\">\n <th mat-header-cell *matHeaderCellDef>Title</th>\n <td mat-cell *matCellDef=\"let element\">{{ element.title }} <br /></td>\n </ng-container>\n\n <!-- Questions Column -->\n <ng-container matColumnDef=\"questions\">\n <th mat-header-cell *matHeaderCellDef>Questions</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element.questions_count }}\n </td>\n </ng-container>\n\n <!-- Submissions Column -->\n <ng-container matColumnDef=\"submissions\">\n <th mat-header-cell *matHeaderCellDef>Submissions</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element.submissions_count }}\n </td>\n </ng-container>\n\n <!-- is Published Column -->\n <ng-container matColumnDef=\"is_published\">\n <th mat-header-cell *matHeaderCellDef>Published</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.is_published ? 'Yes' : 'No' }}\n </td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <a\n [routerLink]=\"['../checksheet-view/', element?.id]\"\n class=\"text-decoration-none text-dark\"\n >\n <mat-icon>search</mat-icon>\n </a>\n\n <a\n *ngIf=\"!element.is_published\"\n [routerLink]=\"['../checksheet-form/', element?.id]\"\n class=\"text-decoration-none text-dark\"\n >\n <mat-icon>edit</mat-icon>\n </a>\n\n <mat-icon\n class=\"cursor-pointer text-dark\"\n *ngIf=\"!element.submissions_count\"\n (click)=\"$event.stopPropagation(); deactivateChecksheet(element)\"\n >\n delete\n </mat-icon>\n\n <a\n *ngIf=\"!element.is_published\"\n [routerLink]=\"['../checksheet-view/', element?.id]\"\n (click)=\"$event.stopPropagation(); copyChecksheet(element)\"\n class=\"text-decoration-none text-dark\"\n matTooltip=\"Copy\"\n >\n <mat-icon>content_copy</mat-icon>\n </a>\n\n <mat-icon\n class=\"cursor-pointer text-dark\"\n *ngIf=\"element.is_published\"\n (click)=\"$event.stopPropagation(); unpublishChecksheet(element)\"\n matTooltip=\"Unpublish\"\n >\n unpublished\n </mat-icon>\n </div>\n </td>\n </ng-container>\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isWorking\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>\n", styles: [".scroll-container{max-height:800px;overflow-y:auto}\n"] }]
1090
+ args: [{ selector: 'app-checksheet-format-list', template: "<mat-card>\n <mat-card-content>\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <h3 class=\"mb-0\">Checksheet Formats</h3>\n <a [routerLink]=\"['../checksheet-format-form']\" class=\"text-decoration-none text-dark mt-2\">\n <mat-icon>add</mat-icon>\n </a>\n </div>\n </mat-card-content>\n</mat-card>\n\n<mat-card class=\"mt-3\">\n <mat-card-content class=\"p-0\">\n <table\n mat-table [dataSource]=\"models\" class=\"w-100\"\n infiniteScroll [infiniteScrollDistance]=\"2\" [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\"\n >\n <!-- Index Column -->\n <ng-container matColumnDef=\"index\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">\n {{ i + 1 }}\n </td>\n </ng-container>\n\n <!-- Title Column -->\n <ng-container matColumnDef=\"title\">\n <th mat-header-cell *matHeaderCellDef>Title</th>\n <td mat-cell *matCellDef=\"let element\">{{ element.title }} <br /></td>\n </ng-container>\n\n <!-- Questions Column -->\n <ng-container matColumnDef=\"questions\">\n <th mat-header-cell *matHeaderCellDef>Questions</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element.questions_count }}\n </td>\n </ng-container>\n\n <!-- Submissions Column -->\n <ng-container matColumnDef=\"submissions\">\n <th mat-header-cell *matHeaderCellDef>Submissions</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element.submissions_count }}\n </td>\n </ng-container>\n\n <!-- is Published Column -->\n <ng-container matColumnDef=\"is_published\">\n <th mat-header-cell *matHeaderCellDef>Published</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.is_published ? 'Yes' : 'No' }}\n </td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element; let i = index;\">\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <a [routerLink]=\"['../checksheet-format-view/', element?.id]\" class=\"text-decoration-none text-dark\">\n <mat-icon>search</mat-icon>\n </a>\n\n <a *ngIf=\"!element.is_published\" [routerLink]=\"['../checksheet-format-form/', element?.id]\"\n class=\"text-decoration-none text-dark\">\n <mat-icon>edit</mat-icon>\n </a>\n\n <app-checksheet-format-delete-button [checksheetFormat]=\"element\" (deleted)=\"modelDeleted(i)\">\n </app-checksheet-format-delete-button>\n\n <app-checksheet-format-copy-button [checksheetFormat]=\"element\" (changed)=\"reload()\">\n </app-checksheet-format-copy-button>\n\n <app-checksheet-format-unpublish-button [checksheetFormat]=\"element\" (changed)=\"reload()\">\n </app-checksheet-format-unpublish-button>\n\n <app-checksheet-format-publish-button [checksheetFormat]=\"element\" (changed)=\"reload()\" viewMode=\"icon\">\n </app-checksheet-format-publish-button>\n </div>\n </td>\n </ng-container>\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isWorking\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>\n", styles: [".scroll-container{max-height:800px;overflow-y:auto}\n"] }]
999
1091
  }], ctorParameters: () => [{ type: i1$1.MatDialog }, { type: ChecksheetFormatService }, { type: i1.AlertService }] });
1000
1092
 
1001
1093
  class ChecksheetService extends TechlifyServiceBaseClass {
@@ -1038,9 +1130,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
1038
1130
  }]
1039
1131
  }], ctorParameters: () => [{ type: i1.HttpService }, { type: i1.DataManager }] });
1040
1132
 
1041
- class ChecksheetSubmissionFormComponent extends TechlifyFormComponentInterface {
1133
+ class ChecksheetFormComponent extends TechlifyFormComponentInterface {
1042
1134
  fb;
1043
- checksheetSubmissionService;
1135
+ service;
1044
1136
  alertService;
1045
1137
  dialog;
1046
1138
  submittableType;
@@ -1050,10 +1142,10 @@ class ChecksheetSubmissionFormComponent extends TechlifyFormComponentInterface {
1050
1142
  updateMode;
1051
1143
  checksheetSubmission;
1052
1144
  isSaving = false;
1053
- constructor(formValidatorService, fb, checksheetSubmissionService, alertService, dialog) {
1145
+ constructor(formValidatorService, fb, service, alertService, dialog) {
1054
1146
  super(formValidatorService);
1055
1147
  this.fb = fb;
1056
- this.checksheetSubmissionService = checksheetSubmissionService;
1148
+ this.service = service;
1057
1149
  this.alertService = alertService;
1058
1150
  this.dialog = dialog;
1059
1151
  this.errorMessages = {
@@ -1077,6 +1169,7 @@ class ChecksheetSubmissionFormComponent extends TechlifyFormComponentInterface {
1077
1169
  });
1078
1170
  }
1079
1171
  ngOnInit() {
1172
+ console.log(this.submittableType, this.submittableId);
1080
1173
  // Set the submittable type and id and make it readonly
1081
1174
  if (this.submittableType && this.submittableId) {
1082
1175
  this.form.patchValue({
@@ -1099,8 +1192,8 @@ class ChecksheetSubmissionFormComponent extends TechlifyFormComponentInterface {
1099
1192
  }
1100
1193
  const data = { ...this.form.value };
1101
1194
  const request = this.updateMode
1102
- ? this.checksheetSubmissionService.update(data)
1103
- : this.checksheetSubmissionService.store(data);
1195
+ ? this.service.update(data)
1196
+ : this.service.store(data);
1104
1197
  this.isSaving = true;
1105
1198
  request.subscribe({
1106
1199
  next: (response) => {
@@ -1117,14 +1210,15 @@ class ChecksheetSubmissionFormComponent extends TechlifyFormComponentInterface {
1117
1210
  width: '400px',
1118
1211
  data: {
1119
1212
  title: 'Submit Checksheet',
1120
- message: `Review the checksheet completely before submitting, you cannot alter once it is submitted. Are you sure to submit the Checksheet?`
1213
+ message: `Review the checksheet completely before submitting, you cannot alter once it is submitted.
1214
+ Are you sure to submit the Checksheet?`
1121
1215
  },
1122
1216
  autoFocus: false
1123
1217
  });
1124
1218
  dialogRef.afterClosed().subscribe(async (result) => {
1125
1219
  if (result) {
1126
1220
  // Action confirmed
1127
- this.checksheetSubmissionService
1221
+ this.service
1128
1222
  .submit(this.checksheetSubmission?.id)
1129
1223
  .subscribe({
1130
1224
  next: (response) => {
@@ -1135,12 +1229,12 @@ class ChecksheetSubmissionFormComponent extends TechlifyFormComponentInterface {
1135
1229
  }
1136
1230
  });
1137
1231
  }
1138
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetSubmissionFormComponent, deps: [{ token: i1.FormValidatorService }, { token: i2.UntypedFormBuilder }, { token: ChecksheetService }, { token: i1.AlertService }, { token: i1$1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
1139
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ChecksheetSubmissionFormComponent, selector: "app-checksheet-submission-form", inputs: { submittableType: "submittableType", submittableId: "submittableId", checksheetSubmission: "checksheetSubmission" }, outputs: { cancelled: "cancelled", saved: "saved" }, usesInheritance: true, ngImport: i0, template: "<form [formGroup]=\"form\" (submit)=\"submit()\">\n <div fxLayout=\"column\" class=\"mat-typography\">\n <h3>Checksheet</h3>\n\n <mat-form-field>\n <mat-label>Date</mat-label>\n <input\n matInput\n [matDatepicker]=\"picker\"\n placeholder=\"Date (MM/DD/YYYY)\"\n formControlName=\"date\"\n autocomplete=\"off\"\n required\n (focus)=\"picker.open()\"\n />\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n <mat-error *ngIf=\"isFieldValid('date')\"\n >{{ getErrorMessage('date') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Checksheet Format</mat-label>\n <app-searchable-selector\n formControlName=\"format_id\"\n apiUrl=\"api/checksheet-formats?is_published=1\"\n [enableSearch]=\"true\"\n >\n </app-searchable-selector>\n <mat-error *ngIf=\"isFieldValid('format_id')\"\n >{{ getErrorMessage('format_id') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Checksheet For</mat-label>\n <mat-select formControlName=\"submittable_type\">\n <mat-option value=\"fixed-asset\">Fixed Asset</mat-option>\n </mat-select>\n </mat-form-field>\n\n <mat-form-field\n *ngIf=\"form.get('submittable_type')?.value === 'fixed-asset'\"\n >\n <mat-label>Fixed Asset</mat-label>\n <app-searchable-selector\n apiUrl=\"api/accounting-plus/fixed-assets\"\n titleField=\"name\"\n formControlName=\"submittable_id\"\n ></app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Details</mat-label>\n <textarea\n matInput\n placeholder=\"Details\"\n formControlName=\"details\"\n ></textarea>\n </mat-form-field>\n <div class=\"d-flex justify-content-end align-items-center gap-2\">\n <button\n [disabled]=\"isSaving\"\n mat-flat-button\n type=\"button\"\n (click)=\"cancelled.emit()\"\n >\n Cancel\n </button>\n <button\n [disabled]=\"isSaving\"\n mat-raised-button\n type=\"submit\"\n color=\"primary\"\n >\n Save\n </button>\n <button\n *ngIf=\"checksheetSubmission?.id\"\n [disabled]=\"isSaving\"\n mat-raised-button\n (click)=\"submitChecksheet()\"\n type=\"button\"\n color=\"accent\"\n >\n Submit\n </button>\n </div>\n </div>\n</form>\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "component", type: i7$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i8.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i9.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i9.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i9.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "component", type: i10.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i10.MatLabel, selector: "mat-label" }, { kind: "directive", type: i10.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i10.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i12.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i12$1.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }] });
1232
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetFormComponent, deps: [{ token: i1.FormValidatorService }, { token: i2.UntypedFormBuilder }, { token: ChecksheetService }, { token: i1.AlertService }, { token: i1$1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
1233
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ChecksheetFormComponent, selector: "app-checksheet-form", inputs: { submittableType: "submittableType", submittableId: "submittableId", checksheetSubmission: "checksheetSubmission" }, outputs: { cancelled: "cancelled", saved: "saved" }, usesInheritance: true, ngImport: i0, template: "<form [formGroup]=\"form\" (submit)=\"submit()\">\n <div fxLayout=\"column\" class=\"mat-typography\">\n <h3>Checksheet</h3>\n\n <mat-form-field>\n <mat-label>Date</mat-label>\n <input\n matInput\n [matDatepicker]=\"picker\"\n placeholder=\"Date (MM/DD/YYYY)\"\n formControlName=\"date\"\n autocomplete=\"off\"\n required\n (focus)=\"picker.open()\"\n />\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n <mat-error *ngIf=\"isFieldValid('date')\"\n >{{ getErrorMessage('date') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Checksheet Format</mat-label>\n <app-searchable-selector\n formControlName=\"format_id\"\n apiUrl=\"api/checksheet-formats?is_published=1\"\n [enableSearch]=\"true\"\n >\n </app-searchable-selector>\n <mat-error *ngIf=\"isFieldValid('format_id')\"\n >{{ getErrorMessage('format_id') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field *ngIf=\"!submittableType\">\n <mat-label>Checksheet For</mat-label>\n <mat-select formControlName=\"submittable_type\">\n <mat-option value=\"fixed-asset\">Fixed Asset</mat-option>\n </mat-select>\n </mat-form-field>\n\n <ng-container *ngIf=\"!submittableId\">\n <mat-form-field *ngIf=\"form.get('submittable_type')?.value === 'fixed-asset'\">\n <mat-label>Fixed Asset</mat-label>\n <app-searchable-selector\n apiUrl=\"api/accounting-plus/fixed-assets\"\n titleField=\"name\"\n formControlName=\"submittable_id\"\n ></app-searchable-selector>\n </mat-form-field>\n </ng-container>\n\n <mat-form-field>\n <mat-label>Details</mat-label>\n <textarea\n matInput\n placeholder=\"Details\"\n formControlName=\"details\"\n ></textarea>\n </mat-form-field>\n <div class=\"d-flex justify-content-end align-items-center gap-2\">\n <button\n [disabled]=\"isSaving\"\n mat-flat-button\n type=\"button\"\n (click)=\"cancelled.emit()\"\n >\n Cancel\n </button>\n <button\n [disabled]=\"isSaving\"\n mat-raised-button\n type=\"submit\"\n color=\"primary\"\n >\n Save\n </button>\n <button\n *ngIf=\"checksheetSubmission?.id\"\n [disabled]=\"isSaving\"\n mat-raised-button\n (click)=\"submitChecksheet()\"\n type=\"button\"\n color=\"accent\"\n >\n Submit\n </button>\n </div>\n </div>\n</form>\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "component", type: i7$2.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i8.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i9$1.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i9$1.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i9$1.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "component", type: i10.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i10.MatLabel, selector: "mat-label" }, { kind: "directive", type: i10.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i10.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i12.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }] });
1140
1234
  }
1141
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetSubmissionFormComponent, decorators: [{
1235
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetFormComponent, decorators: [{
1142
1236
  type: Component,
1143
- args: [{ selector: 'app-checksheet-submission-form', template: "<form [formGroup]=\"form\" (submit)=\"submit()\">\n <div fxLayout=\"column\" class=\"mat-typography\">\n <h3>Checksheet</h3>\n\n <mat-form-field>\n <mat-label>Date</mat-label>\n <input\n matInput\n [matDatepicker]=\"picker\"\n placeholder=\"Date (MM/DD/YYYY)\"\n formControlName=\"date\"\n autocomplete=\"off\"\n required\n (focus)=\"picker.open()\"\n />\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n <mat-error *ngIf=\"isFieldValid('date')\"\n >{{ getErrorMessage('date') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Checksheet Format</mat-label>\n <app-searchable-selector\n formControlName=\"format_id\"\n apiUrl=\"api/checksheet-formats?is_published=1\"\n [enableSearch]=\"true\"\n >\n </app-searchable-selector>\n <mat-error *ngIf=\"isFieldValid('format_id')\"\n >{{ getErrorMessage('format_id') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Checksheet For</mat-label>\n <mat-select formControlName=\"submittable_type\">\n <mat-option value=\"fixed-asset\">Fixed Asset</mat-option>\n </mat-select>\n </mat-form-field>\n\n <mat-form-field\n *ngIf=\"form.get('submittable_type')?.value === 'fixed-asset'\"\n >\n <mat-label>Fixed Asset</mat-label>\n <app-searchable-selector\n apiUrl=\"api/accounting-plus/fixed-assets\"\n titleField=\"name\"\n formControlName=\"submittable_id\"\n ></app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Details</mat-label>\n <textarea\n matInput\n placeholder=\"Details\"\n formControlName=\"details\"\n ></textarea>\n </mat-form-field>\n <div class=\"d-flex justify-content-end align-items-center gap-2\">\n <button\n [disabled]=\"isSaving\"\n mat-flat-button\n type=\"button\"\n (click)=\"cancelled.emit()\"\n >\n Cancel\n </button>\n <button\n [disabled]=\"isSaving\"\n mat-raised-button\n type=\"submit\"\n color=\"primary\"\n >\n Save\n </button>\n <button\n *ngIf=\"checksheetSubmission?.id\"\n [disabled]=\"isSaving\"\n mat-raised-button\n (click)=\"submitChecksheet()\"\n type=\"button\"\n color=\"accent\"\n >\n Submit\n </button>\n </div>\n </div>\n</form>\n" }]
1237
+ args: [{ selector: 'app-checksheet-form', template: "<form [formGroup]=\"form\" (submit)=\"submit()\">\n <div fxLayout=\"column\" class=\"mat-typography\">\n <h3>Checksheet</h3>\n\n <mat-form-field>\n <mat-label>Date</mat-label>\n <input\n matInput\n [matDatepicker]=\"picker\"\n placeholder=\"Date (MM/DD/YYYY)\"\n formControlName=\"date\"\n autocomplete=\"off\"\n required\n (focus)=\"picker.open()\"\n />\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n <mat-error *ngIf=\"isFieldValid('date')\"\n >{{ getErrorMessage('date') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Checksheet Format</mat-label>\n <app-searchable-selector\n formControlName=\"format_id\"\n apiUrl=\"api/checksheet-formats?is_published=1\"\n [enableSearch]=\"true\"\n >\n </app-searchable-selector>\n <mat-error *ngIf=\"isFieldValid('format_id')\"\n >{{ getErrorMessage('format_id') }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field *ngIf=\"!submittableType\">\n <mat-label>Checksheet For</mat-label>\n <mat-select formControlName=\"submittable_type\">\n <mat-option value=\"fixed-asset\">Fixed Asset</mat-option>\n </mat-select>\n </mat-form-field>\n\n <ng-container *ngIf=\"!submittableId\">\n <mat-form-field *ngIf=\"form.get('submittable_type')?.value === 'fixed-asset'\">\n <mat-label>Fixed Asset</mat-label>\n <app-searchable-selector\n apiUrl=\"api/accounting-plus/fixed-assets\"\n titleField=\"name\"\n formControlName=\"submittable_id\"\n ></app-searchable-selector>\n </mat-form-field>\n </ng-container>\n\n <mat-form-field>\n <mat-label>Details</mat-label>\n <textarea\n matInput\n placeholder=\"Details\"\n formControlName=\"details\"\n ></textarea>\n </mat-form-field>\n <div class=\"d-flex justify-content-end align-items-center gap-2\">\n <button\n [disabled]=\"isSaving\"\n mat-flat-button\n type=\"button\"\n (click)=\"cancelled.emit()\"\n >\n Cancel\n </button>\n <button\n [disabled]=\"isSaving\"\n mat-raised-button\n type=\"submit\"\n color=\"primary\"\n >\n Save\n </button>\n <button\n *ngIf=\"checksheetSubmission?.id\"\n [disabled]=\"isSaving\"\n mat-raised-button\n (click)=\"submitChecksheet()\"\n type=\"button\"\n color=\"accent\"\n >\n Submit\n </button>\n </div>\n </div>\n</form>\n" }]
1144
1238
  }], ctorParameters: () => [{ type: i1.FormValidatorService }, { type: i2.UntypedFormBuilder }, { type: ChecksheetService }, { type: i1.AlertService }, { type: i1$1.MatDialog }], propDecorators: { submittableType: [{
1145
1239
  type: Input
1146
1240
  }], submittableId: [{
@@ -1252,7 +1346,7 @@ let ChecksheetReportComponent = class ChecksheetReportComponent {
1252
1346
  return this.currentUserService.getUser().id;
1253
1347
  }
1254
1348
  createChecksheetSubmission() {
1255
- const dialogRef = this.dialog.open(ChecksheetSubmissionFormComponent, {
1349
+ const dialogRef = this.dialog.open(ChecksheetFormComponent, {
1256
1350
  width: '400px',
1257
1351
  data: {
1258
1352
  submission: {},
@@ -1358,8 +1452,8 @@ let ChecksheetReportComponent = class ChecksheetReportComponent {
1358
1452
  getErrorMessage(field) {
1359
1453
  return this.formValidator.getErrorMessage(field, this.filterFormGroup, errorMessages$2);
1360
1454
  }
1361
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetReportComponent, deps: [{ token: i3$1.NgxSpinnerService }, { token: i1.AlertService }, { token: i6$2.Router }, { token: i1.DataManager }, { token: i1.CurrentUserService }, { token: i1$1.MatDialog }, { token: i1.FormValidatorService }, { token: i2.UntypedFormBuilder }, { token: i4.DatePipe }], target: i0.ɵɵFactoryTarget.Component });
1362
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ChecksheetReportComponent, selector: "app-checksheet-report", inputs: { vehicle: "vehicle" }, ngImport: i0, template: "<div\n fxLayout=\"column\"\n fxLayoutAlign=\"start\"\n fxLayoutGap=\"1.5rem\"\n class=\"mat-typography m-4\"\n>\n <div fxLayout fxLayoutAlign=\"center center\">\n <h3 class=\"m-0 font-weight-bold mr-3\">\n Checksheet Report\n\n <app-export-excel-button\n class=\"ml-2\"\n elementId=\"pdfable-section\"\n name=\"checksheet-report-download\"\n [data]=\"excelData\"\n >\n </app-export-excel-button>\n </h3>\n </div>\n\n <form\n fxLayout=\"row wrap d-print-none\"\n fxLayoutGap=\"1rem\"\n [formGroup]=\"filterFormGroup\"\n >\n <mat-form-field>\n <input\n matInput\n [matDatepicker]=\"picker\"\n placeholder=\"Start Date (MM/DD/YYYY)\"\n formControlName=\"date_from\"\n autocomplete=\"off\"\n />\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n <mat-error *ngIf=\"isFieldValid('date_from')\"\n >{{ getErrorMessage('date_from') }}\n </mat-error>\n <button\n mat-button\n *ngIf=\"getFieldValue('date_from')\"\n matSuffix\n mat-icon-button\n (click)=\"resetFieldValue('date_from', $event)\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field>\n <input\n matInput\n [matDatepicker]=\"p2\"\n placeholder=\"End Date (MM/DD/YYYY)\"\n formControlName=\"date_to\"\n autocomplete=\"off\"\n />\n <mat-datepicker-toggle matSuffix [for]=\"p2\"></mat-datepicker-toggle>\n <mat-datepicker #p2></mat-datepicker>\n <mat-error *ngIf=\"isFieldValid('date_to')\"\n >{{ getErrorMessage('date_to') }}\n </mat-error>\n <button\n mat-button\n *ngIf=\"getFieldValue('date_to')\"\n matSuffix\n mat-icon-button\n (click)=\"resetFieldValue('date_to', $event)\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Status</mat-label>\n <app-searchable-selector\n formControlName=\"status_id\"\n apiUrl=\"api/checksheet-submission-statuses\"\n [enableSearch]=\"false\"\n >\n </app-searchable-selector>\n <mat-icon\n matSuffix\n *ngIf=\"getFieldValue('status_id')\"\n (click)=\"resetFieldValue('status_id', $event)\"\n >\n close</mat-icon\n >\n </mat-form-field>\n\n <mat-form-field *ngIf=\"!vehicle\">\n <mat-label>Vehicle</mat-label>\n <app-searchable-selector\n formControlName=\"model_id\"\n apiUrl=\"api/vehicles\"\n [enableSearch]=\"true\"\n titleField=\"title_field\"\n [sort]=\"false\"\n >\n </app-searchable-selector>\n <mat-icon\n matSuffix\n *ngIf=\"getFieldValue('model_id')\"\n (click)=\"resetFieldValue('model_id', $event)\"\n >\n close</mat-icon\n >\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Creator</mat-label>\n <app-searchable-selector\n formControlName=\"creator_id\"\n apiUrl=\"api/users\"\n [enableSearch]=\"true\"\n titleField=\"name\"\n >\n </app-searchable-selector>\n <mat-icon\n matSuffix\n *ngIf=\"getFieldValue('creator_id')\"\n (click)=\"resetFieldValue('creator_id', $event)\"\n >\n close</mat-icon\n >\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Reviewer</mat-label>\n <app-searchable-selector\n formControlName=\"reviewer_id\"\n apiUrl=\"api/users\"\n [enableSearch]=\"true\"\n titleField=\"name\"\n >\n </app-searchable-selector>\n <mat-icon\n matSuffix\n *ngIf=\"getFieldValue('reviewer_id')\"\n (click)=\"resetFieldValue('reviewer_id', $event)\"\n >\n close</mat-icon\n >\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Checksheet Format</mat-label>\n <app-searchable-selector\n formControlName=\"checksheet_format_id\"\n apiUrl=\"api/checksheet-formats?is_published=true\"\n [enableSearch]=\"true\"\n >\n </app-searchable-selector>\n <mat-icon\n matSuffix\n *ngIf=\"getFieldValue('checksheet_format_id')\"\n (click)=\"resetFieldValue('checksheet_format_id', $event)\"\n >\n close</mat-icon\n >\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Vehicle Assigned Customer</mat-label>\n <app-searchable-selector\n formControlName=\"vehicle_assigned_customer_id\"\n apiUrl=\"api/customers\"\n [enableSearch]=\"true\"\n titleField=\"name\"\n >\n </app-searchable-selector>\n <mat-icon\n matSuffix\n *ngIf=\"getFieldValue('vehicle_assigned_customer_id')\"\n (click)=\"resetFieldValue('vehicle_assigned_customer_id', $event)\"\n >\n close</mat-icon\n >\n </mat-form-field>\n\n <!-- <mat-form-field>\n <mat-label>Driver Assigned Customer</mat-label>\n <app-searchable-selector formControlName=\"driver_assigned_customer_id\" apiUrl=\"api/customers\"\n [enableSearch]=\"true\" titleField=\"name\">\n </app-searchable-selector>\n <mat-icon matSuffix *ngIf=\"getFieldValue('driver_assigned_customer_id')\"\n (click)=\"resetFieldValue('driver_assigned_customer_id', $event)\">\n close</mat-icon>\n </mat-form-field> -->\n </form>\n\n <div\n id=\"pdfable-section\"\n class=\"scroll-container\"\n infiniteScroll\n [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\"\n (scrolled)=\"onScroll()\"\n [scrollWindow]=\"false\"\n >\n <table\n mat-table\n [dataSource]=\"checksheetSubmissionList\"\n class=\"w-100\"\n multiTemplateDataRows\n >\n <!-- Index Column -->\n <ng-container matColumnDef=\"index\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = dataIndex\">\n {{ i + 1 }}\n </td>\n </ng-container>\n\n <!-- Date Column -->\n <ng-container matColumnDef=\"date\">\n <th mat-header-cell *matHeaderCellDef>Date</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element.date | date : 'mediumDate' }}\n </td>\n </ng-container>\n\n <!-- Vehicle Column -->\n <ng-container matColumnDef=\"vehicle\">\n <th mat-header-cell *matHeaderCellDef>Vehicle</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element.vehicle?.title_field }}\n </td>\n </ng-container>\n\n <!-- Category Column -->\n <ng-container matColumnDef=\"created_at\">\n <th mat-header-cell *matHeaderCellDef>Submitted On</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element.created_at | date : 'mediumDate' }}\n {{ element.created_at | date : 'shortTime' }} <br />\n <small>by {{ element.creator?.name }}</small>\n </td>\n </ng-container>\n\n <!-- Category Column -->\n <ng-container matColumnDef=\"reviewer.name\">\n <th mat-header-cell *matHeaderCellDef>Verified By</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element.reviewer?.name }} <br />\n <small *ngIf=\"element.reviewed_at\">\n on {{ element.reviewed_at | date : 'mediumDate' }}\n {{ element.reviewed_at | date : 'shortTime' }}\n </small>\n </td>\n </ng-container>\n\n <!-- Category Column -->\n <ng-container matColumnDef=\"mechanical_issues\">\n <th mat-header-cell *matHeaderCellDef>Mechanical Issues</th>\n <td mat-cell *matCellDef=\"let element\" class=\"w-50\">\n <ul>\n <li\n *ngFor=\"let issue of element?.mechanical_issues\"\n [innerHTML]=\"issue.details_without_html\"\n ></li>\n </ul>\n </td>\n </ng-container>\n\n <!-- Category Column -->\n <ng-container matColumnDef=\"notes\">\n <th mat-header-cell *matHeaderCellDef>Notes</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element.comments }}\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i6.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i6.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "component", type: i8.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i8.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i9.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i9.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i9.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "component", type: i10.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i10.MatLabel, selector: "mat-label" }, { kind: "directive", type: i10.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i10.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i12.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i6$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i6$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i6$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i6$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i6$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i6$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i6$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i6$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i6$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i6$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i9$2.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "component", type: i1.ExportExcelButtonComponent, selector: "app-export-excel-button", inputs: ["name", "data"] }, { kind: "pipe", type: i4.DatePipe, name: "date" }] });
1455
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetReportComponent, deps: [{ token: i3.NgxSpinnerService }, { token: i1.AlertService }, { token: i6$2.Router }, { token: i1.DataManager }, { token: i1.CurrentUserService }, { token: i1$1.MatDialog }, { token: i1.FormValidatorService }, { token: i2.UntypedFormBuilder }, { token: i4.DatePipe }], target: i0.ɵɵFactoryTarget.Component });
1456
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ChecksheetReportComponent, selector: "app-checksheet-report", inputs: { vehicle: "vehicle" }, ngImport: i0, template: "<div\n fxLayout=\"column\"\n fxLayoutAlign=\"start\"\n fxLayoutGap=\"1.5rem\"\n class=\"mat-typography m-4\"\n>\n <div fxLayout fxLayoutAlign=\"center center\">\n <h3 class=\"m-0 font-weight-bold mr-3\">\n Checksheet Report\n\n <app-export-excel-button\n class=\"ml-2\"\n elementId=\"pdfable-section\"\n name=\"checksheet-report-download\"\n [data]=\"excelData\"\n >\n </app-export-excel-button>\n </h3>\n </div>\n\n <form\n fxLayout=\"row wrap d-print-none\"\n fxLayoutGap=\"1rem\"\n [formGroup]=\"filterFormGroup\"\n >\n <mat-form-field>\n <input\n matInput\n [matDatepicker]=\"picker\"\n placeholder=\"Start Date (MM/DD/YYYY)\"\n formControlName=\"date_from\"\n autocomplete=\"off\"\n />\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n <mat-error *ngIf=\"isFieldValid('date_from')\"\n >{{ getErrorMessage('date_from') }}\n </mat-error>\n <button\n mat-button\n *ngIf=\"getFieldValue('date_from')\"\n matSuffix\n mat-icon-button\n (click)=\"resetFieldValue('date_from', $event)\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field>\n <input\n matInput\n [matDatepicker]=\"p2\"\n placeholder=\"End Date (MM/DD/YYYY)\"\n formControlName=\"date_to\"\n autocomplete=\"off\"\n />\n <mat-datepicker-toggle matSuffix [for]=\"p2\"></mat-datepicker-toggle>\n <mat-datepicker #p2></mat-datepicker>\n <mat-error *ngIf=\"isFieldValid('date_to')\"\n >{{ getErrorMessage('date_to') }}\n </mat-error>\n <button\n mat-button\n *ngIf=\"getFieldValue('date_to')\"\n matSuffix\n mat-icon-button\n (click)=\"resetFieldValue('date_to', $event)\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Status</mat-label>\n <app-searchable-selector\n formControlName=\"status_id\"\n apiUrl=\"api/checksheet-submission-statuses\"\n [enableSearch]=\"false\"\n >\n </app-searchable-selector>\n <mat-icon\n matSuffix\n *ngIf=\"getFieldValue('status_id')\"\n (click)=\"resetFieldValue('status_id', $event)\"\n >\n close</mat-icon\n >\n </mat-form-field>\n\n <mat-form-field *ngIf=\"!vehicle\">\n <mat-label>Vehicle</mat-label>\n <app-searchable-selector\n formControlName=\"model_id\"\n apiUrl=\"api/vehicles\"\n [enableSearch]=\"true\"\n titleField=\"title_field\"\n [sort]=\"false\"\n >\n </app-searchable-selector>\n <mat-icon\n matSuffix\n *ngIf=\"getFieldValue('model_id')\"\n (click)=\"resetFieldValue('model_id', $event)\"\n >\n close</mat-icon\n >\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Creator</mat-label>\n <app-searchable-selector\n formControlName=\"creator_id\"\n apiUrl=\"api/users\"\n [enableSearch]=\"true\"\n titleField=\"name\"\n >\n </app-searchable-selector>\n <mat-icon\n matSuffix\n *ngIf=\"getFieldValue('creator_id')\"\n (click)=\"resetFieldValue('creator_id', $event)\"\n >\n close</mat-icon\n >\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Reviewer</mat-label>\n <app-searchable-selector\n formControlName=\"reviewer_id\"\n apiUrl=\"api/users\"\n [enableSearch]=\"true\"\n titleField=\"name\"\n >\n </app-searchable-selector>\n <mat-icon\n matSuffix\n *ngIf=\"getFieldValue('reviewer_id')\"\n (click)=\"resetFieldValue('reviewer_id', $event)\"\n >\n close</mat-icon\n >\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Checksheet Format</mat-label>\n <app-searchable-selector\n formControlName=\"checksheet_format_id\"\n apiUrl=\"api/checksheet-formats?is_published=true\"\n [enableSearch]=\"true\"\n >\n </app-searchable-selector>\n <mat-icon\n matSuffix\n *ngIf=\"getFieldValue('checksheet_format_id')\"\n (click)=\"resetFieldValue('checksheet_format_id', $event)\"\n >\n close</mat-icon\n >\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Vehicle Assigned Customer</mat-label>\n <app-searchable-selector\n formControlName=\"vehicle_assigned_customer_id\"\n apiUrl=\"api/customers\"\n [enableSearch]=\"true\"\n titleField=\"name\"\n >\n </app-searchable-selector>\n <mat-icon\n matSuffix\n *ngIf=\"getFieldValue('vehicle_assigned_customer_id')\"\n (click)=\"resetFieldValue('vehicle_assigned_customer_id', $event)\"\n >\n close</mat-icon\n >\n </mat-form-field>\n\n <!-- <mat-form-field>\n <mat-label>Driver Assigned Customer</mat-label>\n <app-searchable-selector formControlName=\"driver_assigned_customer_id\" apiUrl=\"api/customers\"\n [enableSearch]=\"true\" titleField=\"name\">\n </app-searchable-selector>\n <mat-icon matSuffix *ngIf=\"getFieldValue('driver_assigned_customer_id')\"\n (click)=\"resetFieldValue('driver_assigned_customer_id', $event)\">\n close</mat-icon>\n </mat-form-field> -->\n </form>\n\n <div\n id=\"pdfable-section\"\n class=\"scroll-container\"\n infiniteScroll\n [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\"\n (scrolled)=\"onScroll()\"\n [scrollWindow]=\"false\"\n >\n <table\n mat-table\n [dataSource]=\"checksheetSubmissionList\"\n class=\"w-100\"\n multiTemplateDataRows\n >\n <!-- Index Column -->\n <ng-container matColumnDef=\"index\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = dataIndex\">\n {{ i + 1 }}\n </td>\n </ng-container>\n\n <!-- Date Column -->\n <ng-container matColumnDef=\"date\">\n <th mat-header-cell *matHeaderCellDef>Date</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element.date | date : 'mediumDate' }}\n </td>\n </ng-container>\n\n <!-- Vehicle Column -->\n <ng-container matColumnDef=\"vehicle\">\n <th mat-header-cell *matHeaderCellDef>Vehicle</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element.vehicle?.title_field }}\n </td>\n </ng-container>\n\n <!-- Category Column -->\n <ng-container matColumnDef=\"created_at\">\n <th mat-header-cell *matHeaderCellDef>Submitted On</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element.created_at | date : 'mediumDate' }}\n {{ element.created_at | date : 'shortTime' }} <br />\n <small>by {{ element.creator?.name }}</small>\n </td>\n </ng-container>\n\n <!-- Category Column -->\n <ng-container matColumnDef=\"reviewer.name\">\n <th mat-header-cell *matHeaderCellDef>Verified By</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element.reviewer?.name }} <br />\n <small *ngIf=\"element.reviewed_at\">\n on {{ element.reviewed_at | date : 'mediumDate' }}\n {{ element.reviewed_at | date : 'shortTime' }}\n </small>\n </td>\n </ng-container>\n\n <!-- Category Column -->\n <ng-container matColumnDef=\"mechanical_issues\">\n <th mat-header-cell *matHeaderCellDef>Mechanical Issues</th>\n <td mat-cell *matCellDef=\"let element\" class=\"w-50\">\n <ul>\n <li\n *ngFor=\"let issue of element?.mechanical_issues\"\n [innerHTML]=\"issue.details_without_html\"\n ></li>\n </ul>\n </td>\n </ng-container>\n\n <!-- Category Column -->\n <ng-container matColumnDef=\"notes\">\n <th mat-header-cell *matHeaderCellDef>Notes</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element.comments }}\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i6.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i6.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "component", type: i8.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i8.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i9$1.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i9$1.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i9$1.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "component", type: i10.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i10.MatLabel, selector: "mat-label" }, { kind: "directive", type: i10.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i10.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i6$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i7.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i7.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i7.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i7.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i7.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i7.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i7.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i7.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i7.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i7.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i7$1.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "component", type: i1.ExportExcelButtonComponent, selector: "app-export-excel-button", inputs: ["name", "data"] }, { kind: "pipe", type: i4.DatePipe, name: "date" }] });
1363
1457
  };
1364
1458
  ChecksheetReportComponent = __decorate([
1365
1459
  UntilDestroy()
@@ -1367,7 +1461,7 @@ ChecksheetReportComponent = __decorate([
1367
1461
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetReportComponent, decorators: [{
1368
1462
  type: Component,
1369
1463
  args: [{ selector: 'app-checksheet-report', template: "<div\n fxLayout=\"column\"\n fxLayoutAlign=\"start\"\n fxLayoutGap=\"1.5rem\"\n class=\"mat-typography m-4\"\n>\n <div fxLayout fxLayoutAlign=\"center center\">\n <h3 class=\"m-0 font-weight-bold mr-3\">\n Checksheet Report\n\n <app-export-excel-button\n class=\"ml-2\"\n elementId=\"pdfable-section\"\n name=\"checksheet-report-download\"\n [data]=\"excelData\"\n >\n </app-export-excel-button>\n </h3>\n </div>\n\n <form\n fxLayout=\"row wrap d-print-none\"\n fxLayoutGap=\"1rem\"\n [formGroup]=\"filterFormGroup\"\n >\n <mat-form-field>\n <input\n matInput\n [matDatepicker]=\"picker\"\n placeholder=\"Start Date (MM/DD/YYYY)\"\n formControlName=\"date_from\"\n autocomplete=\"off\"\n />\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n <mat-error *ngIf=\"isFieldValid('date_from')\"\n >{{ getErrorMessage('date_from') }}\n </mat-error>\n <button\n mat-button\n *ngIf=\"getFieldValue('date_from')\"\n matSuffix\n mat-icon-button\n (click)=\"resetFieldValue('date_from', $event)\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field>\n <input\n matInput\n [matDatepicker]=\"p2\"\n placeholder=\"End Date (MM/DD/YYYY)\"\n formControlName=\"date_to\"\n autocomplete=\"off\"\n />\n <mat-datepicker-toggle matSuffix [for]=\"p2\"></mat-datepicker-toggle>\n <mat-datepicker #p2></mat-datepicker>\n <mat-error *ngIf=\"isFieldValid('date_to')\"\n >{{ getErrorMessage('date_to') }}\n </mat-error>\n <button\n mat-button\n *ngIf=\"getFieldValue('date_to')\"\n matSuffix\n mat-icon-button\n (click)=\"resetFieldValue('date_to', $event)\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Status</mat-label>\n <app-searchable-selector\n formControlName=\"status_id\"\n apiUrl=\"api/checksheet-submission-statuses\"\n [enableSearch]=\"false\"\n >\n </app-searchable-selector>\n <mat-icon\n matSuffix\n *ngIf=\"getFieldValue('status_id')\"\n (click)=\"resetFieldValue('status_id', $event)\"\n >\n close</mat-icon\n >\n </mat-form-field>\n\n <mat-form-field *ngIf=\"!vehicle\">\n <mat-label>Vehicle</mat-label>\n <app-searchable-selector\n formControlName=\"model_id\"\n apiUrl=\"api/vehicles\"\n [enableSearch]=\"true\"\n titleField=\"title_field\"\n [sort]=\"false\"\n >\n </app-searchable-selector>\n <mat-icon\n matSuffix\n *ngIf=\"getFieldValue('model_id')\"\n (click)=\"resetFieldValue('model_id', $event)\"\n >\n close</mat-icon\n >\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Creator</mat-label>\n <app-searchable-selector\n formControlName=\"creator_id\"\n apiUrl=\"api/users\"\n [enableSearch]=\"true\"\n titleField=\"name\"\n >\n </app-searchable-selector>\n <mat-icon\n matSuffix\n *ngIf=\"getFieldValue('creator_id')\"\n (click)=\"resetFieldValue('creator_id', $event)\"\n >\n close</mat-icon\n >\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Reviewer</mat-label>\n <app-searchable-selector\n formControlName=\"reviewer_id\"\n apiUrl=\"api/users\"\n [enableSearch]=\"true\"\n titleField=\"name\"\n >\n </app-searchable-selector>\n <mat-icon\n matSuffix\n *ngIf=\"getFieldValue('reviewer_id')\"\n (click)=\"resetFieldValue('reviewer_id', $event)\"\n >\n close</mat-icon\n >\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Checksheet Format</mat-label>\n <app-searchable-selector\n formControlName=\"checksheet_format_id\"\n apiUrl=\"api/checksheet-formats?is_published=true\"\n [enableSearch]=\"true\"\n >\n </app-searchable-selector>\n <mat-icon\n matSuffix\n *ngIf=\"getFieldValue('checksheet_format_id')\"\n (click)=\"resetFieldValue('checksheet_format_id', $event)\"\n >\n close</mat-icon\n >\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Vehicle Assigned Customer</mat-label>\n <app-searchable-selector\n formControlName=\"vehicle_assigned_customer_id\"\n apiUrl=\"api/customers\"\n [enableSearch]=\"true\"\n titleField=\"name\"\n >\n </app-searchable-selector>\n <mat-icon\n matSuffix\n *ngIf=\"getFieldValue('vehicle_assigned_customer_id')\"\n (click)=\"resetFieldValue('vehicle_assigned_customer_id', $event)\"\n >\n close</mat-icon\n >\n </mat-form-field>\n\n <!-- <mat-form-field>\n <mat-label>Driver Assigned Customer</mat-label>\n <app-searchable-selector formControlName=\"driver_assigned_customer_id\" apiUrl=\"api/customers\"\n [enableSearch]=\"true\" titleField=\"name\">\n </app-searchable-selector>\n <mat-icon matSuffix *ngIf=\"getFieldValue('driver_assigned_customer_id')\"\n (click)=\"resetFieldValue('driver_assigned_customer_id', $event)\">\n close</mat-icon>\n </mat-form-field> -->\n </form>\n\n <div\n id=\"pdfable-section\"\n class=\"scroll-container\"\n infiniteScroll\n [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\"\n (scrolled)=\"onScroll()\"\n [scrollWindow]=\"false\"\n >\n <table\n mat-table\n [dataSource]=\"checksheetSubmissionList\"\n class=\"w-100\"\n multiTemplateDataRows\n >\n <!-- Index Column -->\n <ng-container matColumnDef=\"index\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = dataIndex\">\n {{ i + 1 }}\n </td>\n </ng-container>\n\n <!-- Date Column -->\n <ng-container matColumnDef=\"date\">\n <th mat-header-cell *matHeaderCellDef>Date</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element.date | date : 'mediumDate' }}\n </td>\n </ng-container>\n\n <!-- Vehicle Column -->\n <ng-container matColumnDef=\"vehicle\">\n <th mat-header-cell *matHeaderCellDef>Vehicle</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element.vehicle?.title_field }}\n </td>\n </ng-container>\n\n <!-- Category Column -->\n <ng-container matColumnDef=\"created_at\">\n <th mat-header-cell *matHeaderCellDef>Submitted On</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element.created_at | date : 'mediumDate' }}\n {{ element.created_at | date : 'shortTime' }} <br />\n <small>by {{ element.creator?.name }}</small>\n </td>\n </ng-container>\n\n <!-- Category Column -->\n <ng-container matColumnDef=\"reviewer.name\">\n <th mat-header-cell *matHeaderCellDef>Verified By</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element.reviewer?.name }} <br />\n <small *ngIf=\"element.reviewed_at\">\n on {{ element.reviewed_at | date : 'mediumDate' }}\n {{ element.reviewed_at | date : 'shortTime' }}\n </small>\n </td>\n </ng-container>\n\n <!-- Category Column -->\n <ng-container matColumnDef=\"mechanical_issues\">\n <th mat-header-cell *matHeaderCellDef>Mechanical Issues</th>\n <td mat-cell *matCellDef=\"let element\" class=\"w-50\">\n <ul>\n <li\n *ngFor=\"let issue of element?.mechanical_issues\"\n [innerHTML]=\"issue.details_without_html\"\n ></li>\n </ul>\n </td>\n </ng-container>\n\n <!-- Category Column -->\n <ng-container matColumnDef=\"notes\">\n <th mat-header-cell *matHeaderCellDef>Notes</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element.comments }}\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n </div>\n</div>\n" }]
1370
- }], ctorParameters: () => [{ type: i3$1.NgxSpinnerService }, { type: i1.AlertService }, { type: i6$2.Router }, { type: i1.DataManager }, { type: i1.CurrentUserService }, { type: i1$1.MatDialog }, { type: i1.FormValidatorService }, { type: i2.UntypedFormBuilder }, { type: i4.DatePipe }], propDecorators: { vehicle: [{
1464
+ }], ctorParameters: () => [{ type: i3.NgxSpinnerService }, { type: i1.AlertService }, { type: i6$2.Router }, { type: i1.DataManager }, { type: i1.CurrentUserService }, { type: i1$1.MatDialog }, { type: i1.FormValidatorService }, { type: i2.UntypedFormBuilder }, { type: i4.DatePipe }], propDecorators: { vehicle: [{
1371
1465
  type: Input
1372
1466
  }] } });
1373
1467
 
@@ -1394,24 +1488,24 @@ class ChecksheetFormButtonComponent {
1394
1488
  /**
1395
1489
  * Handle Checksheet save event.
1396
1490
  *
1397
- * @param checksheetSubmission
1491
+ * @param checksheet
1398
1492
  */
1399
- onSaved(checksheetSubmission) {
1400
- this.saved.emit(checksheetSubmission);
1493
+ onSaved(checksheet) {
1494
+ this.saved.emit(checksheet);
1401
1495
  this.matDialog.closeAll();
1402
1496
  this.alertService.addAlert('The Checksheet is saved successfully!', 'success');
1403
1497
  this.router.navigate([
1404
- 'fixed-assets/checksheets/checksheets',
1405
- checksheetSubmission?.id,
1498
+ '/checksheets/checksheets',
1499
+ checksheet?.id,
1406
1500
  'view'
1407
1501
  ]);
1408
1502
  }
1409
1503
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetFormButtonComponent, deps: [{ token: i1$1.MatDialog }, { token: i1.AlertService }, { token: i6$2.Router }], target: i0.ɵɵFactoryTarget.Component });
1410
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ChecksheetFormButtonComponent, selector: "app-checksheet-form-button", inputs: { submittableType: "submittableType", submittableId: "submittableId" }, outputs: { saved: "saved" }, ngImport: i0, template: "<span\n *ngIf=\"submittableId\"\n class=\"material-symbols-outlined text-secondary\"\n matTooltip=\"Add Checksheet\"\n (click)=\"openForm(formTemplate)\"\n>\n assignment_turned_in\n</span>\n<mat-icon\n *ngIf=\"!submittableId\"\n class=\"cursor-pointer text-secondary\"\n (click)=\"openForm(formTemplate)\"\n>\n add\n</mat-icon>\n\n<ng-template #formTemplate>\n <app-checksheet-submission-form\n mat-dialog-content\n (cancelled)=\"matDialog.closeAll()\"\n (saved)=\"onSaved($event)\"\n [submittableType]=\"submittableType\"\n [submittableId]=\"submittableId\"\n ></app-checksheet-submission-form>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i6$3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: ChecksheetSubmissionFormComponent, selector: "app-checksheet-submission-form", inputs: ["submittableType", "submittableId", "checksheetSubmission"], outputs: ["cancelled", "saved"] }] });
1504
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ChecksheetFormButtonComponent, selector: "app-checksheet-form-button", inputs: { submittableType: "submittableType", submittableId: "submittableId" }, outputs: { saved: "saved" }, ngImport: i0, template: "<mat-icon\n class=\"cursor-pointer text-secondary\"\n (click)=\"openForm(formTemplate)\"\n>\n add\n</mat-icon>\n\n<ng-template #formTemplate>\n <app-checksheet-form\n mat-dialog-content\n (cancelled)=\"matDialog.closeAll()\"\n (saved)=\"onSaved($event)\"\n [submittableType]=\"submittableType\"\n [submittableId]=\"submittableId\"\n ></app-checksheet-form>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "directive", type: i1$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i6$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: ChecksheetFormComponent, selector: "app-checksheet-form", inputs: ["submittableType", "submittableId", "checksheetSubmission"], outputs: ["cancelled", "saved"] }] });
1411
1505
  }
1412
1506
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetFormButtonComponent, decorators: [{
1413
1507
  type: Component,
1414
- args: [{ selector: 'app-checksheet-form-button', template: "<span\n *ngIf=\"submittableId\"\n class=\"material-symbols-outlined text-secondary\"\n matTooltip=\"Add Checksheet\"\n (click)=\"openForm(formTemplate)\"\n>\n assignment_turned_in\n</span>\n<mat-icon\n *ngIf=\"!submittableId\"\n class=\"cursor-pointer text-secondary\"\n (click)=\"openForm(formTemplate)\"\n>\n add\n</mat-icon>\n\n<ng-template #formTemplate>\n <app-checksheet-submission-form\n mat-dialog-content\n (cancelled)=\"matDialog.closeAll()\"\n (saved)=\"onSaved($event)\"\n [submittableType]=\"submittableType\"\n [submittableId]=\"submittableId\"\n ></app-checksheet-submission-form>\n</ng-template>\n" }]
1508
+ args: [{ selector: 'app-checksheet-form-button', template: "<mat-icon\n class=\"cursor-pointer text-secondary\"\n (click)=\"openForm(formTemplate)\"\n>\n add\n</mat-icon>\n\n<ng-template #formTemplate>\n <app-checksheet-form\n mat-dialog-content\n (cancelled)=\"matDialog.closeAll()\"\n (saved)=\"onSaved($event)\"\n [submittableType]=\"submittableType\"\n [submittableId]=\"submittableId\"\n ></app-checksheet-form>\n</ng-template>\n" }]
1415
1509
  }], ctorParameters: () => [{ type: i1$1.MatDialog }, { type: i1.AlertService }, { type: i6$2.Router }], propDecorators: { submittableType: [{
1416
1510
  type: Input
1417
1511
  }], submittableId: [{
@@ -1455,7 +1549,7 @@ class ChecksheetSubmissionDeleteButtonComponent {
1455
1549
  });
1456
1550
  }
1457
1551
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetSubmissionDeleteButtonComponent, deps: [{ token: i1$1.MatDialog }, { token: ChecksheetService }], target: i0.ɵɵFactoryTarget.Component });
1458
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ChecksheetSubmissionDeleteButtonComponent, selector: "app-checksheet-submission-delete-button", inputs: { checksheetSubmission: "checksheetSubmission" }, outputs: { deleted: "deleted" }, ngImport: i0, template: "<mat-icon class=\"cursor-pointer\" (click)=\"openDialog(deleteTemplate)\">\n delete\n</mat-icon>\n\n<ng-template #deleteTemplate>\n <h3 mat-dialog-title>Delete Checksheet</h3>\n <div mat-dialog-content>\n <p>Are you sure you want to delete the Checksheet?</p>\n </div>\n <div\n mat-dialog-actions\n class=\"d-flex justify-content-end gap-2 align-items-center\"\n >\n <button\n [disabled]=\"isDeleting\"\n type=\"button\"\n mat-flat-button\n mat-dialog-close\n >\n Cancel\n </button>\n <button\n [disabled]=\"isDeleting\"\n type=\"button\"\n (click)=\"deleteModel()\"\n mat-raised-button\n color=\"warn\"\n >\n Delete\n </button>\n </div>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "component", type: i8.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: i1$1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1$1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1$1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
1552
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ChecksheetSubmissionDeleteButtonComponent, selector: "app-checksheet-submission-delete-button", inputs: { checksheetSubmission: "checksheetSubmission" }, outputs: { deleted: "deleted" }, ngImport: i0, template: "<mat-icon class=\"cursor-pointer\" (click)=\"openDialog(deleteTemplate)\">\n delete\n</mat-icon>\n\n<ng-template #deleteTemplate>\n <h3 mat-dialog-title>Delete Checksheet</h3>\n <div mat-dialog-content>\n <p>Are you sure you want to delete the Checksheet?</p>\n </div>\n <div\n mat-dialog-actions\n class=\"d-flex justify-content-end gap-2 align-items-center\"\n >\n <button\n [disabled]=\"isDeleting\"\n type=\"button\"\n mat-flat-button\n mat-dialog-close\n >\n Cancel\n </button>\n <button\n [disabled]=\"isDeleting\"\n type=\"button\"\n (click)=\"deleteModel()\"\n mat-raised-button\n color=\"warn\"\n >\n Delete\n </button>\n </div>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "component", type: i8.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: i1$1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1$1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1$1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i6$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
1459
1553
  }
1460
1554
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetSubmissionDeleteButtonComponent, decorators: [{
1461
1555
  type: Component,
@@ -1510,7 +1604,7 @@ class ChecksheetReviewButtonComponent {
1510
1604
  });
1511
1605
  }
1512
1606
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetReviewButtonComponent, deps: [{ token: i1$1.MatDialog }, { token: i1.CredentialsService }, { token: ChecksheetService }, { token: i1.AlertService }], target: i0.ɵɵFactoryTarget.Component });
1513
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ChecksheetReviewButtonComponent, selector: "app-checksheet-review-button", inputs: { submission: "submission", viewType: "viewType", requestParams: "requestParams" }, outputs: { reviewed: "reviewed" }, ngImport: i0, template: "<ng-container\n *ngIf=\"submission?.status_id === 2 && submission?.creator_id !== user?.id\"\n>\n <button\n *ngIf=\"viewType === 'button'\"\n mat-raised-button\n color=\"primary\"\n type=\"button\"\n (click)=\"openDialog(reviewTemplate)\"\n >\n Review\n </button>\n\n <mat-icon\n *ngIf=\"viewType === 'icon'\"\n class=\"cursor-pointer\"\n matTooltip=\"Review\"\n (click)=\"openDialog(reviewTemplate)\"\n >\n rate_review\n </mat-icon>\n</ng-container>\n\n<ng-template #reviewTemplate>\n <h3 mat-dialog-title>Review Checksheet</h3>\n <div mat-dialog-content>\n <p>Are you sure you want to mark the Checksheet as Reviewed?</p>\n </div>\n <div mat-dialog-actions class=\"d-flex justify-content-end align-items-center\">\n <button [disabled]=\"isWorking\" mat-flat-button mat-dialog-close>\n Cancel\n </button>\n <button\n [disabled]=\"isWorking\"\n mat-raised-button\n color=\"primary\"\n (click)=\"reviewChecksheet()\"\n >\n Review\n </button>\n </div>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i8.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: i1$1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1$1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1$1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i6$3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }] });
1607
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ChecksheetReviewButtonComponent, selector: "app-checksheet-review-button", inputs: { submission: "submission", viewType: "viewType", requestParams: "requestParams" }, outputs: { reviewed: "reviewed" }, ngImport: i0, template: "<ng-container\n *ngIf=\"submission?.status_id === 2 && submission?.creator_id !== user?.id\"\n>\n <button\n *ngIf=\"viewType === 'button'\"\n mat-raised-button\n color=\"primary\"\n type=\"button\"\n (click)=\"openDialog(reviewTemplate)\"\n >\n Review\n </button>\n\n <mat-icon\n *ngIf=\"viewType === 'icon'\"\n class=\"cursor-pointer\"\n matTooltip=\"Review\"\n (click)=\"openDialog(reviewTemplate)\"\n >\n rate_review\n </mat-icon>\n</ng-container>\n\n<ng-template #reviewTemplate>\n <h3 mat-dialog-title>Review Checksheet</h3>\n <div mat-dialog-content>\n <p>Are you sure you want to mark the Checksheet as Reviewed?</p>\n </div>\n <div mat-dialog-actions class=\"d-flex justify-content-end align-items-center\">\n <button [disabled]=\"isWorking\" mat-flat-button mat-dialog-close>\n Cancel\n </button>\n <button\n [disabled]=\"isWorking\"\n mat-raised-button\n color=\"primary\"\n (click)=\"reviewChecksheet()\"\n >\n Review\n </button>\n </div>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i8.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: i1$1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1$1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1$1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i6$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i7$3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }] });
1514
1608
  }
1515
1609
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetReviewButtonComponent, decorators: [{
1516
1610
  type: Component,
@@ -1528,9 +1622,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
1528
1622
  let ChecksheetListComponent = class ChecksheetListComponent extends TechlifyListingControllerInterface {
1529
1623
  alertService;
1530
1624
  fb;
1531
- checksheetSubmissionService;
1625
+ service;
1532
1626
  requestHelperService;
1533
1627
  activatedRoute;
1628
+ submittableId;
1629
+ submittableType;
1534
1630
  displayedColumns = [
1535
1631
  'index',
1536
1632
  'date',
@@ -1542,16 +1638,23 @@ let ChecksheetListComponent = class ChecksheetListComponent extends TechlifyList
1542
1638
  'actions'
1543
1639
  ];
1544
1640
  with = 'format,creator,reviewer,status,submittable';
1545
- constructor(alertService, fb, checksheetSubmissionService, requestHelperService, activatedRoute) {
1641
+ constructor(alertService, fb, service, requestHelperService, activatedRoute) {
1546
1642
  super();
1547
1643
  this.alertService = alertService;
1548
1644
  this.fb = fb;
1549
- this.checksheetSubmissionService = checksheetSubmissionService;
1645
+ this.service = service;
1550
1646
  this.requestHelperService = requestHelperService;
1551
1647
  this.activatedRoute = activatedRoute;
1552
1648
  this.createForm();
1553
1649
  }
1554
1650
  ngOnInit() {
1651
+ if (this.submittableId) {
1652
+ this.filterForm.get('submittable_ids')?.setValue(this.submittableId, { emitEvent: false });
1653
+ this.displayedColumns = this.displayedColumns.filter((column) => column !== 'for');
1654
+ }
1655
+ if (this.submittableType) {
1656
+ this.filterForm.get('submittable_type')?.setValue(this.submittableType, { emitEvent: false });
1657
+ }
1555
1658
  this.updateFormWithQueryParams();
1556
1659
  this.subscribeToFormChanges();
1557
1660
  this.subscribeToRouteChanges();
@@ -1567,6 +1670,8 @@ let ChecksheetListComponent = class ChecksheetListComponent extends TechlifyList
1567
1670
  reviewer_ids: [''],
1568
1671
  format_ids: [''],
1569
1672
  sort_by: ['created_at|DESC'],
1673
+ submittable_ids: [''],
1674
+ submittable_type: [''],
1570
1675
  with: [this.with]
1571
1676
  });
1572
1677
  }
@@ -1577,7 +1682,7 @@ let ChecksheetListComponent = class ChecksheetListComponent extends TechlifyList
1577
1682
  perPage: this.perPage,
1578
1683
  page: this.page
1579
1684
  };
1580
- this.checksheetSubmissionService.index(params).subscribe({
1685
+ this.service.index(params).subscribe({
1581
1686
  next: (response) => {
1582
1687
  this.models = this.models.concat(response?.data);
1583
1688
  this.lastPage = response?.last_page;
@@ -1591,7 +1696,7 @@ let ChecksheetListComponent = class ChecksheetListComponent extends TechlifyList
1591
1696
  this.filterForm.patchValue({
1592
1697
  date_from: date_from ? moment(date_from).format('YYYY-MM-DD') : '',
1593
1698
  date_to: date_to ? moment(date_to).format('YYYY-MM-DD') : ''
1594
- });
1699
+ }, { emitEvent: false });
1595
1700
  }
1596
1701
  /**
1597
1702
  * Handle Checksheet delete event.
@@ -1601,7 +1706,9 @@ let ChecksheetListComponent = class ChecksheetListComponent extends TechlifyList
1601
1706
  this.reload();
1602
1707
  }
1603
1708
  updateFormWithQueryParams() {
1604
- this.requestHelperService.updateFormWithQueryParams(this.filterForm, {});
1709
+ this.requestHelperService.updateFormWithQueryParams(this.filterForm, {
1710
+ submittable_ids: { multiple: true }
1711
+ });
1605
1712
  }
1606
1713
  subscribeToFormChanges() {
1607
1714
  this.filterForm.valueChanges.pipe(debounceTime$1(800)).subscribe({
@@ -1626,41 +1733,95 @@ let ChecksheetListComponent = class ChecksheetListComponent extends TechlifyList
1626
1733
  this.filterForm.get('sort_by')?.setValue(active + '|' + direction);
1627
1734
  }
1628
1735
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetListComponent, deps: [{ token: i1.AlertService }, { token: i2.UntypedFormBuilder }, { token: ChecksheetService }, { token: i1.RequestHelperService }, { token: i6$2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
1629
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ChecksheetListComponent, selector: "app-checksheet-list", usesInheritance: true, ngImport: i0, template: "<mat-card>\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-2\">\n <div class=\"d-flex justify-content-center align-items-center gap-2\">\n <h3 class=\"m-0 font-weight-bold\">Checksheets</h3>\n <app-checksheet-form-button class=\"mt-1\"></app-checksheet-form-button>\n <a\n [routerLink]=\"['checksheet-formats']\"\n mat-raised-button\n >\n Formats\n </a>\n </div>\n\n <form fxLayout=\"row wrap\" fxLayoutGap=\"1rem\" [formGroup]=\"filterForm\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input matInput formControlName=\"search\" placeholder=\"Search Checksheets\">\n </mat-form-field>\n\n <app-timeline-filter\n formControlName=\"duration\"\n (selectionChange)=\"onDurationChange($event)\"\n [dateFrom]=\"filterForm.value?.date_from\"\n [dateTo]=\"filterForm.value?.date_to\"\n appearance=\"fill\"\n ></app-timeline-filter>\n\n <mat-form-field>\n <mat-label>Status</mat-label>\n <app-searchable-selector\n formControlName=\"status_ids\"\n apiUrl=\"api/checksheet-submission-statuses\"\n [enableSearch]=\"false\"\n [multiple]=\"true\"\n >\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field *ngxPermissionsOnly=\"['user_read']\">\n <mat-label>Creator</mat-label>\n <app-searchable-selector\n formControlName=\"creator_ids\"\n apiUrl=\"api/users\"\n [enableSearch]=\"true\"\n titleField=\"name\"\n [multiple]=\"true\"\n >\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field *ngxPermissionsOnly=\"['user_read']\">\n <mat-label>Reviewer</mat-label>\n <app-searchable-selector\n formControlName=\"reviewer_ids\"\n apiUrl=\"api/users\"\n [enableSearch]=\"true\"\n titleField=\"name\"\n [multiple]=\"true\"\n >\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Format</mat-label>\n <app-searchable-selector\n formControlName=\"format_ids\"\n apiUrl=\"api/checksheet-formats?is_published=1\"\n [enableSearch]=\"true\"\n [multiple]=\"true\"\n >\n </app-searchable-selector>\n </mat-form-field>\n </form>\n </mat-card-content>\n</mat-card>\n\n<mat-card\n class=\"p-0 mt-3\"\n infiniteScroll\n [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\"\n (scrolled)=\"onScroll()\"\n [fromRoot]=\"true\"\n>\n <table\n mat-table\n [dataSource]=\"models\"\n class=\"w-100\"\n multiTemplateDataRows\n aria-describedby=\"Checksheets\"\n matSort\n (matSortChange)=\"onSortChange($event)\"\n >\n <!-- Index Column -->\n <ng-container matColumnDef=\"index\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = dataIndex\">\n {{ i + 1 }}\n </td>\n </ng-container>\n\n <!-- Format Column -->\n <ng-container matColumnDef=\"format.title\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Format</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.format?.title }}\n </td>\n </ng-container>\n\n <!-- Creator Column -->\n <ng-container matColumnDef=\"creator.name\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Creator</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{ element?.creator?.name }}</p>\n <small class=\"text-secondary\">{{ element?.created_at | date }}</small>\n </td>\n </ng-container>\n\n <!-- Reviewer Column -->\n <ng-container matColumnDef=\"reviewer.name\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Reviewer</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{ element?.reviewer?.name }}</p>\n <small class=\"text-secondary\" *ngIf=\"element?.reviewed_at\">{{ element?.reviewed_at | date }}</small>\n </td>\n </ng-container>\n\n <!-- For Column -->\n <ng-container matColumnDef=\"for\">\n <th mat-header-cell *matHeaderCellDef>For</th>\n <td mat-cell *matCellDef=\"let element\">\n <a\n class=\"mb-0 text-decoration-none text-dark\"\n *ngIf=\"element?.submittable\"\n [routerLink]=\"['/fixed-assets/', element?.submittable_id, 'read']\"\n >\n {{ element?.submittable?.name }}\n </a> <br>\n <small class=\"text-secondary\" *ngIf=\"element?.submittable_type\">{{ element?.submittable_type }}</small>\n </td>\n </ng-container>\n\n <!-- Status Column -->\n <ng-container matColumnDef=\"status.title\">\n <th mat-header-cell *matHeaderCellDef>Status</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.status?.title }}\n </td>\n </ng-container>\n\n <!-- Date Column -->\n <ng-container matColumnDef=\"date\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Date</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element.date | date }}\n </td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element;\">\n <div class=\"d-flex gap-2\">\n <mat-icon\n [routerLink]=\"['../checksheets-view', element?.id]\"\n class=\"cursor-pointer\"\n >\n visibility\n </mat-icon>\n\n <mat-icon\n *ngIf=\"element.status_id === 1\"\n [routerLink]=\"[element?.id, 'view']\"\n class=\"cursor-pointer\"\n >\n edit\n </mat-icon>\n <app-checksheet-review-button\n [submission]=\"element\"\n [requestParams]=\"{ with: this.with }\"\n (reviewed)=\"reload()\"\n ></app-checksheet-review-button>\n <app-checksheet-submission-delete-button\n [checksheetSubmission]=\"element\"\n (deleted)=\"onDeleted()\"\n ></app-checksheet-submission-delete-button>\n </div>\n </td>\n </ng-container>\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n <mat-progress-bar *ngIf=\"isWorking\" mode=\"indeterminate\"></mat-progress-bar>\n</mat-card>\n", styles: [".scroll-container{max-height:800px;overflow-y:auto}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6$2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i6.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i6.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "component", type: i8.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i7.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i7.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i10.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i10.MatLabel, selector: "mat-label" }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i12.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i8$1.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: i13.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i13.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i6$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i6$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i6$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i6$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i6$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i6$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i6$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i6$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i6$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i6$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i15.NgxPermissionsDirective, selector: "[ngxPermissionsOnly],[ngxPermissionsExcept]", inputs: ["ngxPermissionsOnly", "ngxPermissionsOnlyThen", "ngxPermissionsOnlyElse", "ngxPermissionsExcept", "ngxPermissionsExceptElse", "ngxPermissionsExceptThen", "ngxPermissionsThen", "ngxPermissionsElse", "ngxPermissionsOnlyAuthorisedStrategy", "ngxPermissionsOnlyUnauthorisedStrategy", "ngxPermissionsExceptUnauthorisedStrategy", "ngxPermissionsExceptAuthorisedStrategy", "ngxPermissionsUnauthorisedStrategy", "ngxPermissionsAuthorisedStrategy"], outputs: ["permissionsAuthorized", "permissionsUnauthorized"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i9$2.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "component", type: i1.TimelineFilterComponent, selector: "app-timeline-filter", inputs: ["defaultValue", "required", "disabled", "value", "timelines", "dateFrom", "dateTo", "appearance", "showClearButton", "form", "labelText"], outputs: ["selectionChange"] }, { kind: "component", type: ChecksheetFormButtonComponent, selector: "app-checksheet-form-button", inputs: ["submittableType", "submittableId"], outputs: ["saved"] }, { kind: "component", type: ChecksheetSubmissionDeleteButtonComponent, selector: "app-checksheet-submission-delete-button", inputs: ["checksheetSubmission"], outputs: ["deleted"] }, { kind: "component", type: ChecksheetReviewButtonComponent, selector: "app-checksheet-review-button", inputs: ["submission", "viewType", "requestParams"], outputs: ["reviewed"] }, { kind: "pipe", type: i4.DatePipe, name: "date" }] });
1736
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ChecksheetListComponent, selector: "app-checksheet-list", inputs: { submittableId: "submittableId", submittableType: "submittableType" }, usesInheritance: true, ngImport: i0, template: "<mat-card>\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-2\">\n <div class=\"d-flex justify-content-center align-items-center gap-2\">\n <h3 class=\"m-0 font-weight-bold\">Checksheets</h3>\n <app-checksheet-form-button class=\"mt-1\" [submittableType]=\"submittableType\" [submittableId]=\"submittableId\">\n </app-checksheet-form-button>\n <a [routerLink]=\"['checksheet-formats']\" mat-raised-button>Formats</a>\n </div>\n\n <form fxLayout=\"row wrap\" fxLayoutGap=\"1rem\" [formGroup]=\"filterForm\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input matInput formControlName=\"search\" placeholder=\"Search Checksheets\">\n </mat-form-field>\n\n <app-timeline-filter\n formControlName=\"duration\"\n (selectionChange)=\"onDurationChange($event)\"\n [dateFrom]=\"filterForm.value?.date_from\"\n [dateTo]=\"filterForm.value?.date_to\"\n appearance=\"fill\"\n ></app-timeline-filter>\n\n <mat-form-field>\n <mat-label>Status</mat-label>\n <app-searchable-selector\n formControlName=\"status_ids\"\n apiUrl=\"api/checksheet-submission-statuses\"\n [enableSearch]=\"false\"\n [multiple]=\"true\"\n >\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field *ngxPermissionsOnly=\"['user_read']\">\n <mat-label>Creator</mat-label>\n <app-searchable-selector\n formControlName=\"creator_ids\"\n apiUrl=\"api/users\"\n [enableSearch]=\"true\"\n titleField=\"name\"\n [multiple]=\"true\"\n >\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field *ngxPermissionsOnly=\"['user_read']\">\n <mat-label>Reviewer</mat-label>\n <app-searchable-selector\n formControlName=\"reviewer_ids\"\n apiUrl=\"api/users\"\n [enableSearch]=\"true\"\n titleField=\"name\"\n [multiple]=\"true\"\n >\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Format</mat-label>\n <app-searchable-selector\n formControlName=\"format_ids\"\n apiUrl=\"api/checksheet-formats?is_published=1\"\n [enableSearch]=\"true\"\n [multiple]=\"true\"\n >\n </app-searchable-selector>\n </mat-form-field>\n </form>\n </mat-card-content>\n</mat-card>\n\n<mat-card\n class=\"p-0 mt-3\"\n infiniteScroll\n [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\"\n (scrolled)=\"onScroll()\"\n [fromRoot]=\"true\"\n>\n <table\n mat-table\n [dataSource]=\"models\"\n class=\"w-100\"\n multiTemplateDataRows\n aria-describedby=\"Checksheets\"\n matSort\n (matSortChange)=\"onSortChange($event)\"\n >\n <!-- Index Column -->\n <ng-container matColumnDef=\"index\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = dataIndex\">\n {{ i + 1 }}\n </td>\n </ng-container>\n\n <!-- Format Column -->\n <ng-container matColumnDef=\"format.title\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Format</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.format?.title }}\n </td>\n </ng-container>\n\n <!-- Creator Column -->\n <ng-container matColumnDef=\"creator.name\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Creator</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{ element?.creator?.name }}</p>\n <small class=\"text-secondary\">{{ element?.created_at | date }}</small>\n </td>\n </ng-container>\n\n <!-- Reviewer Column -->\n <ng-container matColumnDef=\"reviewer.name\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Reviewer</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{ element?.reviewer?.name }}</p>\n <small class=\"text-secondary\" *ngIf=\"element?.reviewed_at\">{{ element?.reviewed_at | date }}</small>\n </td>\n </ng-container>\n\n <!-- For Column -->\n <ng-container matColumnDef=\"for\">\n <th mat-header-cell *matHeaderCellDef>For</th>\n <td mat-cell *matCellDef=\"let element\">\n <a\n class=\"mb-0 text-decoration-none text-dark\"\n *ngIf=\"element?.submittable\"\n [routerLink]=\"['/fixed-assets/', element?.submittable_id, 'read']\"\n >\n {{ element?.submittable?.name }}\n </a> <br>\n <small class=\"text-secondary\" *ngIf=\"element?.submittable_type\">{{ element?.submittable_type }}</small>\n </td>\n </ng-container>\n\n <!-- Status Column -->\n <ng-container matColumnDef=\"status.title\">\n <th mat-header-cell *matHeaderCellDef>Status</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.status?.title }}\n </td>\n </ng-container>\n\n <!-- Date Column -->\n <ng-container matColumnDef=\"date\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Date</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element.date | date }}\n </td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element;\">\n <div class=\"d-flex gap-2\">\n <mat-icon\n [routerLink]=\"['/checksheets/checksheets-view', element?.id]\"\n class=\"cursor-pointer\"\n >\n visibility\n </mat-icon>\n\n <mat-icon\n *ngIf=\"element.status_id === 1\"\n [routerLink]=\"['/checksheets/checksheets', element?.id, 'view']\"\n class=\"cursor-pointer\"\n >\n edit\n </mat-icon>\n <app-checksheet-review-button\n [submission]=\"element\"\n [requestParams]=\"{ with: this.with }\"\n (reviewed)=\"reload()\"\n ></app-checksheet-review-button>\n <app-checksheet-submission-delete-button\n [checksheetSubmission]=\"element\"\n (deleted)=\"onDeleted()\"\n ></app-checksheet-submission-delete-button>\n </div>\n </td>\n </ng-container>\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n <mat-progress-bar *ngIf=\"isWorking\" mode=\"indeterminate\"></mat-progress-bar>\n</mat-card>\n", styles: [".scroll-container{max-height:800px;overflow-y:auto}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6$2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i6.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i6.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "component", type: i8.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i4$1.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4$1.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i10.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i10.MatLabel, selector: "mat-label" }, { kind: "component", type: i6$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: i13.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i13.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i7.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i7.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i7.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i7.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i7.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i7.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i7.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i7.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i7.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i7.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i15.NgxPermissionsDirective, selector: "[ngxPermissionsOnly],[ngxPermissionsExcept]", inputs: ["ngxPermissionsOnly", "ngxPermissionsOnlyThen", "ngxPermissionsOnlyElse", "ngxPermissionsExcept", "ngxPermissionsExceptElse", "ngxPermissionsExceptThen", "ngxPermissionsThen", "ngxPermissionsElse", "ngxPermissionsOnlyAuthorisedStrategy", "ngxPermissionsOnlyUnauthorisedStrategy", "ngxPermissionsExceptUnauthorisedStrategy", "ngxPermissionsExceptAuthorisedStrategy", "ngxPermissionsUnauthorisedStrategy", "ngxPermissionsAuthorisedStrategy"], outputs: ["permissionsAuthorized", "permissionsUnauthorized"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i7$1.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "component", type: i1.TimelineFilterComponent, selector: "app-timeline-filter", inputs: ["defaultValue", "required", "disabled", "value", "timelines", "dateFrom", "dateTo", "appearance", "showClearButton", "form", "labelText"], outputs: ["selectionChange"] }, { kind: "component", type: ChecksheetFormButtonComponent, selector: "app-checksheet-form-button", inputs: ["submittableType", "submittableId"], outputs: ["saved"] }, { kind: "component", type: ChecksheetSubmissionDeleteButtonComponent, selector: "app-checksheet-submission-delete-button", inputs: ["checksheetSubmission"], outputs: ["deleted"] }, { kind: "component", type: ChecksheetReviewButtonComponent, selector: "app-checksheet-review-button", inputs: ["submission", "viewType", "requestParams"], outputs: ["reviewed"] }, { kind: "pipe", type: i4.DatePipe, name: "date" }] });
1630
1737
  };
1631
1738
  ChecksheetListComponent = __decorate([
1632
1739
  UntilDestroy()
1633
1740
  ], ChecksheetListComponent);
1634
1741
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetListComponent, decorators: [{
1635
1742
  type: Component,
1636
- args: [{ selector: 'app-checksheet-list', template: "<mat-card>\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-2\">\n <div class=\"d-flex justify-content-center align-items-center gap-2\">\n <h3 class=\"m-0 font-weight-bold\">Checksheets</h3>\n <app-checksheet-form-button class=\"mt-1\"></app-checksheet-form-button>\n <a\n [routerLink]=\"['checksheet-formats']\"\n mat-raised-button\n >\n Formats\n </a>\n </div>\n\n <form fxLayout=\"row wrap\" fxLayoutGap=\"1rem\" [formGroup]=\"filterForm\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input matInput formControlName=\"search\" placeholder=\"Search Checksheets\">\n </mat-form-field>\n\n <app-timeline-filter\n formControlName=\"duration\"\n (selectionChange)=\"onDurationChange($event)\"\n [dateFrom]=\"filterForm.value?.date_from\"\n [dateTo]=\"filterForm.value?.date_to\"\n appearance=\"fill\"\n ></app-timeline-filter>\n\n <mat-form-field>\n <mat-label>Status</mat-label>\n <app-searchable-selector\n formControlName=\"status_ids\"\n apiUrl=\"api/checksheet-submission-statuses\"\n [enableSearch]=\"false\"\n [multiple]=\"true\"\n >\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field *ngxPermissionsOnly=\"['user_read']\">\n <mat-label>Creator</mat-label>\n <app-searchable-selector\n formControlName=\"creator_ids\"\n apiUrl=\"api/users\"\n [enableSearch]=\"true\"\n titleField=\"name\"\n [multiple]=\"true\"\n >\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field *ngxPermissionsOnly=\"['user_read']\">\n <mat-label>Reviewer</mat-label>\n <app-searchable-selector\n formControlName=\"reviewer_ids\"\n apiUrl=\"api/users\"\n [enableSearch]=\"true\"\n titleField=\"name\"\n [multiple]=\"true\"\n >\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Format</mat-label>\n <app-searchable-selector\n formControlName=\"format_ids\"\n apiUrl=\"api/checksheet-formats?is_published=1\"\n [enableSearch]=\"true\"\n [multiple]=\"true\"\n >\n </app-searchable-selector>\n </mat-form-field>\n </form>\n </mat-card-content>\n</mat-card>\n\n<mat-card\n class=\"p-0 mt-3\"\n infiniteScroll\n [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\"\n (scrolled)=\"onScroll()\"\n [fromRoot]=\"true\"\n>\n <table\n mat-table\n [dataSource]=\"models\"\n class=\"w-100\"\n multiTemplateDataRows\n aria-describedby=\"Checksheets\"\n matSort\n (matSortChange)=\"onSortChange($event)\"\n >\n <!-- Index Column -->\n <ng-container matColumnDef=\"index\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = dataIndex\">\n {{ i + 1 }}\n </td>\n </ng-container>\n\n <!-- Format Column -->\n <ng-container matColumnDef=\"format.title\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Format</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.format?.title }}\n </td>\n </ng-container>\n\n <!-- Creator Column -->\n <ng-container matColumnDef=\"creator.name\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Creator</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{ element?.creator?.name }}</p>\n <small class=\"text-secondary\">{{ element?.created_at | date }}</small>\n </td>\n </ng-container>\n\n <!-- Reviewer Column -->\n <ng-container matColumnDef=\"reviewer.name\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Reviewer</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{ element?.reviewer?.name }}</p>\n <small class=\"text-secondary\" *ngIf=\"element?.reviewed_at\">{{ element?.reviewed_at | date }}</small>\n </td>\n </ng-container>\n\n <!-- For Column -->\n <ng-container matColumnDef=\"for\">\n <th mat-header-cell *matHeaderCellDef>For</th>\n <td mat-cell *matCellDef=\"let element\">\n <a\n class=\"mb-0 text-decoration-none text-dark\"\n *ngIf=\"element?.submittable\"\n [routerLink]=\"['/fixed-assets/', element?.submittable_id, 'read']\"\n >\n {{ element?.submittable?.name }}\n </a> <br>\n <small class=\"text-secondary\" *ngIf=\"element?.submittable_type\">{{ element?.submittable_type }}</small>\n </td>\n </ng-container>\n\n <!-- Status Column -->\n <ng-container matColumnDef=\"status.title\">\n <th mat-header-cell *matHeaderCellDef>Status</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.status?.title }}\n </td>\n </ng-container>\n\n <!-- Date Column -->\n <ng-container matColumnDef=\"date\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Date</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element.date | date }}\n </td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element;\">\n <div class=\"d-flex gap-2\">\n <mat-icon\n [routerLink]=\"['../checksheets-view', element?.id]\"\n class=\"cursor-pointer\"\n >\n visibility\n </mat-icon>\n\n <mat-icon\n *ngIf=\"element.status_id === 1\"\n [routerLink]=\"[element?.id, 'view']\"\n class=\"cursor-pointer\"\n >\n edit\n </mat-icon>\n <app-checksheet-review-button\n [submission]=\"element\"\n [requestParams]=\"{ with: this.with }\"\n (reviewed)=\"reload()\"\n ></app-checksheet-review-button>\n <app-checksheet-submission-delete-button\n [checksheetSubmission]=\"element\"\n (deleted)=\"onDeleted()\"\n ></app-checksheet-submission-delete-button>\n </div>\n </td>\n </ng-container>\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n <mat-progress-bar *ngIf=\"isWorking\" mode=\"indeterminate\"></mat-progress-bar>\n</mat-card>\n", styles: [".scroll-container{max-height:800px;overflow-y:auto}\n"] }]
1637
- }], ctorParameters: () => [{ type: i1.AlertService }, { type: i2.UntypedFormBuilder }, { type: ChecksheetService }, { type: i1.RequestHelperService }, { type: i6$2.ActivatedRoute }] });
1743
+ args: [{ selector: 'app-checksheet-list', template: "<mat-card>\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-2\">\n <div class=\"d-flex justify-content-center align-items-center gap-2\">\n <h3 class=\"m-0 font-weight-bold\">Checksheets</h3>\n <app-checksheet-form-button class=\"mt-1\" [submittableType]=\"submittableType\" [submittableId]=\"submittableId\">\n </app-checksheet-form-button>\n <a [routerLink]=\"['checksheet-formats']\" mat-raised-button>Formats</a>\n </div>\n\n <form fxLayout=\"row wrap\" fxLayoutGap=\"1rem\" [formGroup]=\"filterForm\">\n <mat-form-field>\n <mat-label>Search</mat-label>\n <input matInput formControlName=\"search\" placeholder=\"Search Checksheets\">\n </mat-form-field>\n\n <app-timeline-filter\n formControlName=\"duration\"\n (selectionChange)=\"onDurationChange($event)\"\n [dateFrom]=\"filterForm.value?.date_from\"\n [dateTo]=\"filterForm.value?.date_to\"\n appearance=\"fill\"\n ></app-timeline-filter>\n\n <mat-form-field>\n <mat-label>Status</mat-label>\n <app-searchable-selector\n formControlName=\"status_ids\"\n apiUrl=\"api/checksheet-submission-statuses\"\n [enableSearch]=\"false\"\n [multiple]=\"true\"\n >\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field *ngxPermissionsOnly=\"['user_read']\">\n <mat-label>Creator</mat-label>\n <app-searchable-selector\n formControlName=\"creator_ids\"\n apiUrl=\"api/users\"\n [enableSearch]=\"true\"\n titleField=\"name\"\n [multiple]=\"true\"\n >\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field *ngxPermissionsOnly=\"['user_read']\">\n <mat-label>Reviewer</mat-label>\n <app-searchable-selector\n formControlName=\"reviewer_ids\"\n apiUrl=\"api/users\"\n [enableSearch]=\"true\"\n titleField=\"name\"\n [multiple]=\"true\"\n >\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Format</mat-label>\n <app-searchable-selector\n formControlName=\"format_ids\"\n apiUrl=\"api/checksheet-formats?is_published=1\"\n [enableSearch]=\"true\"\n [multiple]=\"true\"\n >\n </app-searchable-selector>\n </mat-form-field>\n </form>\n </mat-card-content>\n</mat-card>\n\n<mat-card\n class=\"p-0 mt-3\"\n infiniteScroll\n [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\"\n (scrolled)=\"onScroll()\"\n [fromRoot]=\"true\"\n>\n <table\n mat-table\n [dataSource]=\"models\"\n class=\"w-100\"\n multiTemplateDataRows\n aria-describedby=\"Checksheets\"\n matSort\n (matSortChange)=\"onSortChange($event)\"\n >\n <!-- Index Column -->\n <ng-container matColumnDef=\"index\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = dataIndex\">\n {{ i + 1 }}\n </td>\n </ng-container>\n\n <!-- Format Column -->\n <ng-container matColumnDef=\"format.title\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Format</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.format?.title }}\n </td>\n </ng-container>\n\n <!-- Creator Column -->\n <ng-container matColumnDef=\"creator.name\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Creator</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{ element?.creator?.name }}</p>\n <small class=\"text-secondary\">{{ element?.created_at | date }}</small>\n </td>\n </ng-container>\n\n <!-- Reviewer Column -->\n <ng-container matColumnDef=\"reviewer.name\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Reviewer</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{ element?.reviewer?.name }}</p>\n <small class=\"text-secondary\" *ngIf=\"element?.reviewed_at\">{{ element?.reviewed_at | date }}</small>\n </td>\n </ng-container>\n\n <!-- For Column -->\n <ng-container matColumnDef=\"for\">\n <th mat-header-cell *matHeaderCellDef>For</th>\n <td mat-cell *matCellDef=\"let element\">\n <a\n class=\"mb-0 text-decoration-none text-dark\"\n *ngIf=\"element?.submittable\"\n [routerLink]=\"['/fixed-assets/', element?.submittable_id, 'read']\"\n >\n {{ element?.submittable?.name }}\n </a> <br>\n <small class=\"text-secondary\" *ngIf=\"element?.submittable_type\">{{ element?.submittable_type }}</small>\n </td>\n </ng-container>\n\n <!-- Status Column -->\n <ng-container matColumnDef=\"status.title\">\n <th mat-header-cell *matHeaderCellDef>Status</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.status?.title }}\n </td>\n </ng-container>\n\n <!-- Date Column -->\n <ng-container matColumnDef=\"date\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Date</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element.date | date }}\n </td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element;\">\n <div class=\"d-flex gap-2\">\n <mat-icon\n [routerLink]=\"['/checksheets/checksheets-view', element?.id]\"\n class=\"cursor-pointer\"\n >\n visibility\n </mat-icon>\n\n <mat-icon\n *ngIf=\"element.status_id === 1\"\n [routerLink]=\"['/checksheets/checksheets', element?.id, 'view']\"\n class=\"cursor-pointer\"\n >\n edit\n </mat-icon>\n <app-checksheet-review-button\n [submission]=\"element\"\n [requestParams]=\"{ with: this.with }\"\n (reviewed)=\"reload()\"\n ></app-checksheet-review-button>\n <app-checksheet-submission-delete-button\n [checksheetSubmission]=\"element\"\n (deleted)=\"onDeleted()\"\n ></app-checksheet-submission-delete-button>\n </div>\n </td>\n </ng-container>\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n <mat-progress-bar *ngIf=\"isWorking\" mode=\"indeterminate\"></mat-progress-bar>\n</mat-card>\n", styles: [".scroll-container{max-height:800px;overflow-y:auto}\n"] }]
1744
+ }], ctorParameters: () => [{ type: i1.AlertService }, { type: i2.UntypedFormBuilder }, { type: ChecksheetService }, { type: i1.RequestHelperService }, { type: i6$2.ActivatedRoute }], propDecorators: { submittableId: [{
1745
+ type: Input
1746
+ }], submittableType: [{
1747
+ type: Input
1748
+ }] } });
1749
+
1750
+ class ChecksheetListWidgetComponent extends TechlifyListingControllerInterface {
1751
+ service;
1752
+ submittable;
1753
+ submittableType;
1754
+ title = 'Checksheets';
1755
+ submittableTitleField = 'name';
1756
+ showChecksheetButton = false;
1757
+ constructor(service) {
1758
+ super();
1759
+ this.service = service;
1760
+ this.perPage = 5;
1761
+ }
1762
+ ngOnInit() {
1763
+ this.loadData();
1764
+ }
1765
+ loadData() {
1766
+ const params = {
1767
+ page: 1,
1768
+ perPage: this.perPage,
1769
+ submittable_type: this.submittableType,
1770
+ submittable_ids: this.submittable?.id,
1771
+ with: 'creator',
1772
+ };
1773
+ this.isWorking = true;
1774
+ this.service.index(params).subscribe({
1775
+ next: (response) => {
1776
+ this.models = this.models.concat(response?.data);
1777
+ this.isWorking = false;
1778
+ },
1779
+ error: () => { this.isWorking = false; }
1780
+ });
1781
+ }
1782
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetListWidgetComponent, deps: [{ token: ChecksheetService }], target: i0.ɵɵFactoryTarget.Component });
1783
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ChecksheetListWidgetComponent, selector: "app-checksheet-list-widget", inputs: { submittable: "submittable", submittableType: "submittableType", title: "title", submittableTitleField: "submittableTitleField", showChecksheetButton: "showChecksheetButton" }, usesInheritance: true, ngImport: i0, template: "<mat-card>\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-3\">\n <h3 class=\"mb-0 fw-bold\">{{ title }}</h3>\n <span class=\"flex-fill\"></span>\n <app-checksheet-form-button *ngIf=\"showChecksheetButton\" [submittableType]=\"submittableType\"\n [submittableId]=\"submittable?.id\"></app-checksheet-form-button>\n </mat-card-content>\n <mat-card-content>\n <p class=\"mb-0\">Checksheets for <span class=\"badge bg-secondary\">{{ submittableType }}</span>\n # {{ submittable?.id }} : {{ submittable[submittableTitleField] }}\n </p>\n </mat-card-content>\n <mat-card-content>\n <a *ngFor=\"let model of models\" [routerLink]=\"['/checksheets/checksheets-view', model?.id]\"\n class=\"d-flex justify-content-start align-items-center gap-2 p-2 cursor-pointer text-decoration-none text-dark\">\n <span class=\"material-symbols-outlined fs-2\">\n article\n </span>\n <div class=\"d-flex flex-column gap-1\">\n <p class=\"mb-0\">on {{ model?.date | date }}</p>\n <small class=\"text-secondary\">By {{ model?.creator?.name }}</small>\n </div>\n </a>\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isWorking\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6$2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i4$1.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4$1.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: ChecksheetFormButtonComponent, selector: "app-checksheet-form-button", inputs: ["submittableType", "submittableId"], outputs: ["saved"] }, { kind: "pipe", type: i4.DatePipe, name: "date" }] });
1784
+ }
1785
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetListWidgetComponent, decorators: [{
1786
+ type: Component,
1787
+ args: [{ selector: 'app-checksheet-list-widget', template: "<mat-card>\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-3\">\n <h3 class=\"mb-0 fw-bold\">{{ title }}</h3>\n <span class=\"flex-fill\"></span>\n <app-checksheet-form-button *ngIf=\"showChecksheetButton\" [submittableType]=\"submittableType\"\n [submittableId]=\"submittable?.id\"></app-checksheet-form-button>\n </mat-card-content>\n <mat-card-content>\n <p class=\"mb-0\">Checksheets for <span class=\"badge bg-secondary\">{{ submittableType }}</span>\n # {{ submittable?.id }} : {{ submittable[submittableTitleField] }}\n </p>\n </mat-card-content>\n <mat-card-content>\n <a *ngFor=\"let model of models\" [routerLink]=\"['/checksheets/checksheets-view', model?.id]\"\n class=\"d-flex justify-content-start align-items-center gap-2 p-2 cursor-pointer text-decoration-none text-dark\">\n <span class=\"material-symbols-outlined fs-2\">\n article\n </span>\n <div class=\"d-flex flex-column gap-1\">\n <p class=\"mb-0\">on {{ model?.date | date }}</p>\n <small class=\"text-secondary\">By {{ model?.creator?.name }}</small>\n </div>\n </a>\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isWorking\"></mat-progress-bar>\n </mat-card-content>\n</mat-card>\n" }]
1788
+ }], ctorParameters: () => [{ type: ChecksheetService }], propDecorators: { submittable: [{
1789
+ type: Input
1790
+ }], submittableType: [{
1791
+ type: Input
1792
+ }], title: [{
1793
+ type: Input
1794
+ }], submittableTitleField: [{
1795
+ type: Input
1796
+ }], showChecksheetButton: [{
1797
+ type: Input
1798
+ }] } });
1638
1799
 
1639
1800
  class ChecksheetNodeViewComponent {
1640
- location;
1641
1801
  route;
1642
- checksheetSubmissionService;
1802
+ service;
1643
1803
  submission;
1644
1804
  submissionId;
1645
1805
  isLoading = false;
1646
- with = 'format.questions.answers,format.questions.type,creator,reviewer,status';
1647
- constructor(location, route, checksheetSubmissionService) {
1648
- this.location = location;
1806
+ with = 'format.questions.answers,format.questions.type,creator,reviewer,status,submittable';
1807
+ constructor(route, service) {
1649
1808
  this.route = route;
1650
- this.checksheetSubmissionService = checksheetSubmissionService;
1651
- this.submissionId = parseInt(this.route.snapshot.params?.['submissionId']);
1809
+ this.service = service;
1652
1810
  }
1653
1811
  ngOnInit() {
1654
- if (this.submissionId) {
1655
- this.loadSubmission();
1656
- }
1812
+ this.route.params.subscribe((params) => {
1813
+ this.submissionId = params['submissionId'];
1814
+ if (this.submissionId) {
1815
+ this.loadSubmission();
1816
+ }
1817
+ });
1657
1818
  }
1658
1819
  loadSubmission() {
1659
1820
  const params = {
1660
1821
  with: this.with
1661
1822
  };
1662
1823
  this.isLoading = true;
1663
- this.checksheetSubmissionService.show(this.submissionId, params).subscribe({
1824
+ this.service.show(this.submissionId, params).subscribe({
1664
1825
  next: (response) => {
1665
1826
  this.submission = response?.item;
1666
1827
  this.isLoading = false;
@@ -1676,13 +1837,13 @@ class ChecksheetNodeViewComponent {
1676
1837
  onUpdated(model) {
1677
1838
  this.submission = model;
1678
1839
  }
1679
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetNodeViewComponent, deps: [{ token: i4.Location }, { token: i6$2.ActivatedRoute }, { token: ChecksheetService }], target: i0.ɵɵFactoryTarget.Component });
1680
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ChecksheetNodeViewComponent, selector: "app-checksheet-node-view", ngImport: i0, template: "<div\n fxLayout=\"column\"\n fxLayoutGap=\"0.5rem\"\n id=\"pdfable-section\"\n *ngIf=\"submission\"\n>\n <div fxLayout fxLayoutAlign=\"start center\">\n <h2 class=\"m-auto\">Checksheet</h2>\n </div>\n\n <div fxLayout=\"column\">\n <mat-card class=\"w-100\">\n <h4>Date: {{ submission?.date | date }}</h4>\n <h4>Format: {{ submission?.format?.title }}</h4>\n <h4>Creator: {{ submission?.creator?.name }}</h4>\n <h4 *ngIf=\"submission?.reviewer\">\n Reviewer: {{ submission?.reviewer?.name }}\n </h4>\n <h4 *ngIf=\"submission?.status\">\n Status: {{ submission?.status?.title }}\n </h4>\n\n <div\n class=\"my-2 d-print-none\"\n fxLayout=\"row\"\n fxLayoutGap=\"5px\"\n fxLayoutAlign=\"center\"\n >\n <app-checksheet-review-button\n [submission]=\"submission\"\n viewType=\"button\"\n [requestParams]=\"{ with: this.with }\"\n (reviewed)=\"onUpdated($event)\"\n ></app-checksheet-review-button>\n </div>\n </mat-card>\n </div>\n\n <div fxLayout=\"column\" *ngIf=\"submission\">\n <h2>Submission</h2>\n <app-checksheet-question-list\n class=\"w-100 pt-0 pr-4\"\n [submission]=\"submission\"\n [disableInput]=\"true\"\n >\n </app-checksheet-question-list>\n </div>\n\n <app-note-list\n *ngIf=\"submission?.id\"\n [relatedModelId]=\"submission?.id\"\n modelType=\"ChecksheetSubmission\"\n ></app-note-list>\n</div>\n\n<mat-progress-bar *ngIf=\"isLoading\" mode=\"indeterminate\"></mat-progress-bar>\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i6.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i6.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "component", type: i7.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "component", type: i8$1.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: i1.NoteListComponent, selector: "app-note-list", inputs: ["relatedModelId", "modelType", "readonly", "labelText", "commentsView", "viewMode"] }, { kind: "component", type: ChecksheetQuestionListComponent, selector: "app-checksheet-question-list", inputs: ["checksheet", "submission", "disableInput"], outputs: ["checksheetChange"] }, { kind: "component", type: ChecksheetReviewButtonComponent, selector: "app-checksheet-review-button", inputs: ["submission", "viewType", "requestParams"], outputs: ["reviewed"] }, { kind: "pipe", type: i4.DatePipe, name: "date" }] });
1840
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetNodeViewComponent, deps: [{ token: i6$2.ActivatedRoute }, { token: ChecksheetService }], target: i0.ɵɵFactoryTarget.Component });
1841
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ChecksheetNodeViewComponent, selector: "app-checksheet-node-view", ngImport: i0, template: "<div class=\"d-flex justify-content-start gap-3 w-100\" id=\"pdfable-section\" *ngIf=\"submission\">\n <div class=\"d-flex flex-column gap-3\" style=\"width: 85%\">\n <mat-card>\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-3\">\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <span class=\"material-symbols-outlined fs-1\">\n list_alt_check\n </span>\n <div>\n <h2 class=\"mb-0\">{{ submission?.format?.title }}</h2>\n <p class=\"mb-0\" *ngIf=\"submission?.details\">{{ submission?.details }}</p>\n </div>\n </div>\n <div class=\"d-flex justify-content-end align-items-center gap-2\">\n <div class=\"d-flex flex-column gap-1\">\n <p class=\"mb-0 text-secondary\">for <span class=\"badge bg-secondary\">{{ submission?.submittable_type }}</span>\n #{{ submission?.submittable_id }} : {{ submission?.submittable?.name }}\n </p>\n <div class=\"d-flex justify-content-end align-items-center gap-2\">\n <p class=\"mb-0 text-secondary\">By</p> <ngx-avatars [name]=\"submission?.creator?.name\" size=\"30\"></ngx-avatars>\n <p class=\"text-dark mb-0\">{{ submission?.creator?.name }}</p>\n <p class=\"mb-0 text-secondary\">on {{ submission?.date | date }}</p>\n </div>\n </div>\n </div>\n </mat-card-content>\n </mat-card>\n\n <app-checksheet-question-list [submission]=\"submission\" [disableInput]=\"true\"></app-checksheet-question-list>\n\n </div>\n <div class=\"d-flex flex-column gap-3\" style=\"width: calc(15% - 1rem)\">\n <app-checksheet-list-widget title=\"Previous Checksheets\" [submittableType]=\"submission?.submittable_type\"\n [submittable]=\"submission?.submittable\"></app-checksheet-list-widget>\n <app-note-list *ngIf=\"submission?.id && !isLoading\" [relatedModelId]=\"submission?.id\" class=\"w-100\"\n modelType=\"ChecksheetSubmission\" viewMode=\"timeline\"></app-note-list>\n </div>\n</div>\n\n<mat-progress-bar *ngIf=\"isLoading\" mode=\"indeterminate\"></mat-progress-bar>\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4$1.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4$1.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: i1.NoteListComponent, selector: "app-note-list", inputs: ["relatedModelId", "modelType", "readonly", "labelText", "commentsView", "viewMode"] }, { kind: "component", type: i7$4.AvatarComponent, selector: "ngx-avatars", inputs: ["round", "size", "textSizeRatio", "bgColor", "fgColor", "borderColor", "style", "cornerRadius", "facebookId", "twitterId", "googleId", "instagramId", "vkontakteId", "skypeId", "gravatarId", "githubId", "src", "alt", "name", "value", "referrerpolicy", "placeholder", "initialsSize"], outputs: ["clickOnAvatar"] }, { kind: "component", type: ChecksheetQuestionListComponent, selector: "app-checksheet-question-list", inputs: ["checksheet", "submission", "disableInput"], outputs: ["checksheetChange"] }, { kind: "component", type: ChecksheetListWidgetComponent, selector: "app-checksheet-list-widget", inputs: ["submittable", "submittableType", "title", "submittableTitleField", "showChecksheetButton"] }, { kind: "pipe", type: i4.DatePipe, name: "date" }] });
1681
1842
  }
1682
1843
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetNodeViewComponent, decorators: [{
1683
1844
  type: Component,
1684
- args: [{ selector: 'app-checksheet-node-view', template: "<div\n fxLayout=\"column\"\n fxLayoutGap=\"0.5rem\"\n id=\"pdfable-section\"\n *ngIf=\"submission\"\n>\n <div fxLayout fxLayoutAlign=\"start center\">\n <h2 class=\"m-auto\">Checksheet</h2>\n </div>\n\n <div fxLayout=\"column\">\n <mat-card class=\"w-100\">\n <h4>Date: {{ submission?.date | date }}</h4>\n <h4>Format: {{ submission?.format?.title }}</h4>\n <h4>Creator: {{ submission?.creator?.name }}</h4>\n <h4 *ngIf=\"submission?.reviewer\">\n Reviewer: {{ submission?.reviewer?.name }}\n </h4>\n <h4 *ngIf=\"submission?.status\">\n Status: {{ submission?.status?.title }}\n </h4>\n\n <div\n class=\"my-2 d-print-none\"\n fxLayout=\"row\"\n fxLayoutGap=\"5px\"\n fxLayoutAlign=\"center\"\n >\n <app-checksheet-review-button\n [submission]=\"submission\"\n viewType=\"button\"\n [requestParams]=\"{ with: this.with }\"\n (reviewed)=\"onUpdated($event)\"\n ></app-checksheet-review-button>\n </div>\n </mat-card>\n </div>\n\n <div fxLayout=\"column\" *ngIf=\"submission\">\n <h2>Submission</h2>\n <app-checksheet-question-list\n class=\"w-100 pt-0 pr-4\"\n [submission]=\"submission\"\n [disableInput]=\"true\"\n >\n </app-checksheet-question-list>\n </div>\n\n <app-note-list\n *ngIf=\"submission?.id\"\n [relatedModelId]=\"submission?.id\"\n modelType=\"ChecksheetSubmission\"\n ></app-note-list>\n</div>\n\n<mat-progress-bar *ngIf=\"isLoading\" mode=\"indeterminate\"></mat-progress-bar>\n" }]
1685
- }], ctorParameters: () => [{ type: i4.Location }, { type: i6$2.ActivatedRoute }, { type: ChecksheetService }] });
1845
+ args: [{ selector: 'app-checksheet-node-view', template: "<div class=\"d-flex justify-content-start gap-3 w-100\" id=\"pdfable-section\" *ngIf=\"submission\">\n <div class=\"d-flex flex-column gap-3\" style=\"width: 85%\">\n <mat-card>\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-3\">\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <span class=\"material-symbols-outlined fs-1\">\n list_alt_check\n </span>\n <div>\n <h2 class=\"mb-0\">{{ submission?.format?.title }}</h2>\n <p class=\"mb-0\" *ngIf=\"submission?.details\">{{ submission?.details }}</p>\n </div>\n </div>\n <div class=\"d-flex justify-content-end align-items-center gap-2\">\n <div class=\"d-flex flex-column gap-1\">\n <p class=\"mb-0 text-secondary\">for <span class=\"badge bg-secondary\">{{ submission?.submittable_type }}</span>\n #{{ submission?.submittable_id }} : {{ submission?.submittable?.name }}\n </p>\n <div class=\"d-flex justify-content-end align-items-center gap-2\">\n <p class=\"mb-0 text-secondary\">By</p> <ngx-avatars [name]=\"submission?.creator?.name\" size=\"30\"></ngx-avatars>\n <p class=\"text-dark mb-0\">{{ submission?.creator?.name }}</p>\n <p class=\"mb-0 text-secondary\">on {{ submission?.date | date }}</p>\n </div>\n </div>\n </div>\n </mat-card-content>\n </mat-card>\n\n <app-checksheet-question-list [submission]=\"submission\" [disableInput]=\"true\"></app-checksheet-question-list>\n\n </div>\n <div class=\"d-flex flex-column gap-3\" style=\"width: calc(15% - 1rem)\">\n <app-checksheet-list-widget title=\"Previous Checksheets\" [submittableType]=\"submission?.submittable_type\"\n [submittable]=\"submission?.submittable\"></app-checksheet-list-widget>\n <app-note-list *ngIf=\"submission?.id && !isLoading\" [relatedModelId]=\"submission?.id\" class=\"w-100\"\n modelType=\"ChecksheetSubmission\" viewMode=\"timeline\"></app-note-list>\n </div>\n</div>\n\n<mat-progress-bar *ngIf=\"isLoading\" mode=\"indeterminate\"></mat-progress-bar>\n" }]
1846
+ }], ctorParameters: () => [{ type: i6$2.ActivatedRoute }, { type: ChecksheetService }] });
1686
1847
 
1687
1848
  const errorMessages$1 = {
1688
1849
  date: {
@@ -1699,7 +1860,7 @@ const errorMessages$1 = {
1699
1860
  required: 'Status is required'
1700
1861
  }
1701
1862
  };
1702
- class ChecksheetViewComponent {
1863
+ class ChecksheetFormatViewComponent {
1703
1864
  formValidatorService;
1704
1865
  fb;
1705
1866
  spinnerService;
@@ -1804,13 +1965,13 @@ class ChecksheetViewComponent {
1804
1965
  this.alertService.addAlert('Checksheet saved successfully!', 'success');
1805
1966
  this.redirectBack();
1806
1967
  }
1807
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetViewComponent, deps: [{ token: i1.FormValidatorService }, { token: i2.UntypedFormBuilder }, { token: i3$1.NgxSpinnerService }, { token: i1.AlertService }, { token: i4.Location }, { token: i1.ErrorHandlerService }, { token: i1.DataManager }, { token: i1$1.MatDialog }, { token: i6$2.ActivatedRoute }, { token: ChecksheetService }], target: i0.ɵɵFactoryTarget.Component });
1808
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ChecksheetViewComponent, selector: "app-checksheet-view", ngImport: i0, template: "<app-checksheet-form [disableInput]=\"false\"></app-checksheet-form>\n", styles: [""], dependencies: [{ kind: "component", type: ChecksheetFormComponent, selector: "app-checksheet-form", inputs: ["disableInput"] }] });
1968
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetFormatViewComponent, deps: [{ token: i1.FormValidatorService }, { token: i2.UntypedFormBuilder }, { token: i3.NgxSpinnerService }, { token: i1.AlertService }, { token: i4.Location }, { token: i1.ErrorHandlerService }, { token: i1.DataManager }, { token: i1$1.MatDialog }, { token: i6$2.ActivatedRoute }, { token: ChecksheetService }], target: i0.ɵɵFactoryTarget.Component });
1969
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ChecksheetFormatViewComponent, selector: "app-checksheet-format-view", ngImport: i0, template: "<app-checksheet-format-form [disableInput]=\"false\"></app-checksheet-format-form>\n", styles: [""], dependencies: [{ kind: "component", type: ChecksheetFormatFormComponent, selector: "app-checksheet-format-form", inputs: ["disableInput"] }] });
1809
1970
  }
1810
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetViewComponent, decorators: [{
1971
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetFormatViewComponent, decorators: [{
1811
1972
  type: Component,
1812
- args: [{ selector: 'app-checksheet-view', template: "<app-checksheet-form [disableInput]=\"false\"></app-checksheet-form>\n" }]
1813
- }], ctorParameters: () => [{ type: i1.FormValidatorService }, { type: i2.UntypedFormBuilder }, { type: i3$1.NgxSpinnerService }, { type: i1.AlertService }, { type: i4.Location }, { type: i1.ErrorHandlerService }, { type: i1.DataManager }, { type: i1$1.MatDialog }, { type: i6$2.ActivatedRoute }, { type: ChecksheetService }] });
1973
+ args: [{ selector: 'app-checksheet-format-view', template: "<app-checksheet-format-form [disableInput]=\"false\"></app-checksheet-format-form>\n" }]
1974
+ }], ctorParameters: () => [{ type: i1.FormValidatorService }, { type: i2.UntypedFormBuilder }, { type: i3.NgxSpinnerService }, { type: i1.AlertService }, { type: i4.Location }, { type: i1.ErrorHandlerService }, { type: i1.DataManager }, { type: i1$1.MatDialog }, { type: i6$2.ActivatedRoute }, { type: ChecksheetService }] });
1814
1975
 
1815
1976
  const errorMessages = {
1816
1977
  date: {
@@ -1932,20 +2093,20 @@ class ChecksheetSubmissionViewComponent {
1932
2093
  checksheet_format_id: ['', Validators.required]
1933
2094
  });
1934
2095
  }
1935
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetSubmissionViewComponent, deps: [{ token: i1.FormValidatorService }, { token: i2.UntypedFormBuilder }, { token: i3$1.NgxSpinnerService }, { token: i1.AlertService }, { token: i4.Location }, { token: i1.ErrorHandlerService }, { token: i1.DataManager }, { token: i1$1.MatDialog }, { token: i6$2.ActivatedRoute }, { token: ChecksheetService }], target: i0.ɵɵFactoryTarget.Component });
1936
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ChecksheetSubmissionViewComponent, selector: "app-checksheet-submission-view", ngImport: i0, template: "<div>\n <h2 class=\"m-0\">Checksheet</h2>\n\n <div class=\"d-flex justify-content-start align-items-start gap-1\">\n <app-checksheet-question-list\n *ngIf=\"submission\"\n class=\"w-100 p-4\"\n [submission]=\"submission\"\n style=\"width: calc(70% - 1rem)\"\n >\n </app-checksheet-question-list>\n <div style=\"width: calc(30% - 1rem)\">\n <mat-card class=\"w-100\" *ngIf=\"submission\">\n <app-checksheet-submission-form\n (cancelled)=\"redirectBack()\"\n (saved)=\"onSaved()\"\n [checksheetSubmission]=\"submission\"\n ></app-checksheet-submission-form>\n </mat-card>\n <mat-card class=\"mt-2 p-0\" *ngIf=\"submission?.id\">\n <app-note-list\n [relatedModelId]=\"submission?.id\"\n modelType=\"ChecksheetSubmission\"\n ></app-note-list>\n </mat-card>\n </div>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i7.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "component", type: i1.NoteListComponent, selector: "app-note-list", inputs: ["relatedModelId", "modelType", "readonly", "labelText", "commentsView", "viewMode"] }, { kind: "component", type: ChecksheetQuestionListComponent, selector: "app-checksheet-question-list", inputs: ["checksheet", "submission", "disableInput"], outputs: ["checksheetChange"] }, { kind: "component", type: ChecksheetSubmissionFormComponent, selector: "app-checksheet-submission-form", inputs: ["submittableType", "submittableId", "checksheetSubmission"], outputs: ["cancelled", "saved"] }] });
2096
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetSubmissionViewComponent, deps: [{ token: i1.FormValidatorService }, { token: i2.UntypedFormBuilder }, { token: i3.NgxSpinnerService }, { token: i1.AlertService }, { token: i4.Location }, { token: i1.ErrorHandlerService }, { token: i1.DataManager }, { token: i1$1.MatDialog }, { token: i6$2.ActivatedRoute }, { token: ChecksheetService }], target: i0.ɵɵFactoryTarget.Component });
2097
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ChecksheetSubmissionViewComponent, selector: "app-checksheet-submission-view", ngImport: i0, template: "<div>\n <h2 class=\"m-0\">Checksheet</h2>\n\n <div class=\"d-flex justify-content-start align-items-start gap-1\">\n <app-checksheet-question-list\n *ngIf=\"submission\"\n class=\"w-100 p-4\"\n [submission]=\"submission\"\n style=\"width: calc(70% - 1rem)\"\n >\n </app-checksheet-question-list>\n <div style=\"width: calc(30% - 1rem)\">\n <mat-card class=\"w-100\" *ngIf=\"submission\">\n <app-checksheet-form\n (cancelled)=\"redirectBack()\"\n (saved)=\"onSaved()\"\n [checksheetSubmission]=\"submission\"\n [submittableType]=\"submission?.submittable_type\"\n [submittableId]=\"submission?.submission_id\"\n ></app-checksheet-form>\n </mat-card>\n <mat-card class=\"mt-2 p-0\" *ngIf=\"submission?.id\">\n <app-note-list\n [relatedModelId]=\"submission?.id\"\n modelType=\"ChecksheetSubmission\"\n ></app-note-list>\n </mat-card>\n </div>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4$1.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "component", type: i1.NoteListComponent, selector: "app-note-list", inputs: ["relatedModelId", "modelType", "readonly", "labelText", "commentsView", "viewMode"] }, { kind: "component", type: ChecksheetQuestionListComponent, selector: "app-checksheet-question-list", inputs: ["checksheet", "submission", "disableInput"], outputs: ["checksheetChange"] }, { kind: "component", type: ChecksheetFormComponent, selector: "app-checksheet-form", inputs: ["submittableType", "submittableId", "checksheetSubmission"], outputs: ["cancelled", "saved"] }] });
1937
2098
  }
1938
2099
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetSubmissionViewComponent, decorators: [{
1939
2100
  type: Component,
1940
- args: [{ selector: 'app-checksheet-submission-view', template: "<div>\n <h2 class=\"m-0\">Checksheet</h2>\n\n <div class=\"d-flex justify-content-start align-items-start gap-1\">\n <app-checksheet-question-list\n *ngIf=\"submission\"\n class=\"w-100 p-4\"\n [submission]=\"submission\"\n style=\"width: calc(70% - 1rem)\"\n >\n </app-checksheet-question-list>\n <div style=\"width: calc(30% - 1rem)\">\n <mat-card class=\"w-100\" *ngIf=\"submission\">\n <app-checksheet-submission-form\n (cancelled)=\"redirectBack()\"\n (saved)=\"onSaved()\"\n [checksheetSubmission]=\"submission\"\n ></app-checksheet-submission-form>\n </mat-card>\n <mat-card class=\"mt-2 p-0\" *ngIf=\"submission?.id\">\n <app-note-list\n [relatedModelId]=\"submission?.id\"\n modelType=\"ChecksheetSubmission\"\n ></app-note-list>\n </mat-card>\n </div>\n </div>\n</div>\n" }]
1941
- }], ctorParameters: () => [{ type: i1.FormValidatorService }, { type: i2.UntypedFormBuilder }, { type: i3$1.NgxSpinnerService }, { type: i1.AlertService }, { type: i4.Location }, { type: i1.ErrorHandlerService }, { type: i1.DataManager }, { type: i1$1.MatDialog }, { type: i6$2.ActivatedRoute }, { type: ChecksheetService }] });
2101
+ args: [{ selector: 'app-checksheet-submission-view', template: "<div>\n <h2 class=\"m-0\">Checksheet</h2>\n\n <div class=\"d-flex justify-content-start align-items-start gap-1\">\n <app-checksheet-question-list\n *ngIf=\"submission\"\n class=\"w-100 p-4\"\n [submission]=\"submission\"\n style=\"width: calc(70% - 1rem)\"\n >\n </app-checksheet-question-list>\n <div style=\"width: calc(30% - 1rem)\">\n <mat-card class=\"w-100\" *ngIf=\"submission\">\n <app-checksheet-form\n (cancelled)=\"redirectBack()\"\n (saved)=\"onSaved()\"\n [checksheetSubmission]=\"submission\"\n [submittableType]=\"submission?.submittable_type\"\n [submittableId]=\"submission?.submission_id\"\n ></app-checksheet-form>\n </mat-card>\n <mat-card class=\"mt-2 p-0\" *ngIf=\"submission?.id\">\n <app-note-list\n [relatedModelId]=\"submission?.id\"\n modelType=\"ChecksheetSubmission\"\n ></app-note-list>\n </mat-card>\n </div>\n </div>\n</div>\n" }]
2102
+ }], ctorParameters: () => [{ type: i1.FormValidatorService }, { type: i2.UntypedFormBuilder }, { type: i3.NgxSpinnerService }, { type: i1.AlertService }, { type: i4.Location }, { type: i1.ErrorHandlerService }, { type: i1.DataManager }, { type: i1$1.MatDialog }, { type: i6$2.ActivatedRoute }, { type: ChecksheetService }] });
1942
2103
 
1943
2104
  const routes = [
1944
2105
  { path: 'checksheet-format-list', component: ChecksheetFormatListComponent },
1945
2106
  { path: 'checksheet-report', component: ChecksheetReportComponent },
1946
- { path: 'checksheet-form', component: ChecksheetFormComponent },
1947
- { path: 'checksheet-view/:checksheetId', component: ChecksheetViewComponent },
1948
- { path: 'checksheet-form/:checksheetId', component: ChecksheetFormComponent },
2107
+ { path: 'checksheet-format-form', component: ChecksheetFormatFormComponent },
2108
+ { path: 'checksheet-format-view/:checksheetId', component: ChecksheetFormatViewComponent },
2109
+ { path: 'checksheet-format-form/:checksheetId', component: ChecksheetFormatFormComponent },
1949
2110
  {
1950
2111
  path: 'checksheets',
1951
2112
  component: ChecksheetListComponent
@@ -2024,8 +2185,8 @@ class MechanicalIssueFormComponent {
2024
2185
  }
2025
2186
  }
2026
2187
  }
2027
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MechanicalIssueFormComponent, deps: [{ token: i1$1.MatDialogRef }, { token: MAT_DIALOG_DATA }, { token: ChecksheetService }, { token: i1.ErrorHandlerService }, { token: i3$1.NgxSpinnerService }], target: i0.ɵɵFactoryTarget.Component });
2028
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: MechanicalIssueFormComponent, selector: "app-mechanical-issue-form", ngImport: i0, template: "<div>\n <h4>Mechanical Issues Form</h4>\n <form>\n <div *ngFor=\"let issue of mechanicalIssues\">\n <mat-checkbox name=\"mechanicalIssues[]\" [(ngModel)]=\"issue.is_selected\">\n {{issue.question.label}}: {{issue.answer.value}}\n </mat-checkbox>\n </div>\n <div>\n <button mat-raised-button type=\"submit\" color=\"primary\" (click)=\"submit()\">Save</button>\n </div>\n </form>\n</div>", styles: [""], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i8.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i4$1.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }] });
2188
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MechanicalIssueFormComponent, deps: [{ token: i1$1.MatDialogRef }, { token: MAT_DIALOG_DATA }, { token: ChecksheetService }, { token: i1.ErrorHandlerService }, { token: i3.NgxSpinnerService }], target: i0.ɵɵFactoryTarget.Component });
2189
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: MechanicalIssueFormComponent, selector: "app-mechanical-issue-form", ngImport: i0, template: "<div>\n <h4>Mechanical Issues Form</h4>\n <form>\n <div *ngFor=\"let issue of mechanicalIssues\">\n <mat-checkbox name=\"mechanicalIssues[]\" [(ngModel)]=\"issue.is_selected\">\n {{issue.question.label}}: {{issue.answer.value}}\n </mat-checkbox>\n </div>\n <div>\n <button mat-raised-button type=\"submit\" color=\"primary\" (click)=\"submit()\">Save</button>\n </div>\n </form>\n</div>", styles: [""], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i8.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i5.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }] });
2029
2190
  }
2030
2191
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MechanicalIssueFormComponent, decorators: [{
2031
2192
  type: Component,
@@ -2033,7 +2194,89 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
2033
2194
  }], ctorParameters: () => [{ type: i1$1.MatDialogRef }, { type: undefined, decorators: [{
2034
2195
  type: Inject,
2035
2196
  args: [MAT_DIALOG_DATA]
2036
- }] }, { type: ChecksheetService }, { type: i1.ErrorHandlerService }, { type: i3$1.NgxSpinnerService }] });
2197
+ }] }, { type: ChecksheetService }, { type: i1.ErrorHandlerService }, { type: i3.NgxSpinnerService }] });
2198
+
2199
+ class FileUploadButtonComponent {
2200
+ entityFileService;
2201
+ config;
2202
+ uploaded = new EventEmitter();
2203
+ DEFAULT_FILE_ID = 'file-upload-button';
2204
+ isUploading;
2205
+ constructor(entityFileService) {
2206
+ this.entityFileService = entityFileService;
2207
+ }
2208
+ async onFileChange(event) {
2209
+ if (event.target.files && event.target.files.length) {
2210
+ const fileArray = Array.from(event.target.files);
2211
+ const fileInput = document.getElementById(this.config?.fileId ?? this.DEFAULT_FILE_ID);
2212
+ fileInput.value = '';
2213
+ this.isUploading = true;
2214
+ const results = await this.uploadFiles(fileArray);
2215
+ this.uploaded.emit(results);
2216
+ this.isUploading = false;
2217
+ }
2218
+ }
2219
+ selectFiles(event) {
2220
+ event.preventDefault();
2221
+ document
2222
+ .getElementById(this.config?.fileId ?? this.DEFAULT_FILE_ID)
2223
+ ?.click();
2224
+ }
2225
+ async uploadFiles(files) {
2226
+ const uploadPromises = files.map((file) => this.entityFileService.uploadEntityFile(file));
2227
+ return await Promise.all(uploadPromises);
2228
+ }
2229
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FileUploadButtonComponent, deps: [{ token: i1.EntityFileService }], target: i0.ɵɵFactoryTarget.Component });
2230
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: FileUploadButtonComponent, isStandalone: true, selector: "app-file-upload-button", inputs: { config: "config" }, outputs: { uploaded: "uploaded" }, ngImport: i0, template: "<button\n [disabled]=\"isUploading\"\n mat-stroked-button\n type=\"button\"\n (click)=\"selectFiles($event)\"\n>\n <mat-icon>attachment</mat-icon> Attach\n</button>\n\n<input\n type=\"file\"\n id=\"{{ config.fileId ?? DEFAULT_FILE_ID }}\"\n [accept]=\"config.accept ?? '*'\"\n (change)=\"onFileChange($event)\"\n [multiple]=\"config.multiple ?? false\"\n class=\"d-none\"\n/>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i8.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i6$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
2231
+ }
2232
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FileUploadButtonComponent, decorators: [{
2233
+ type: Component,
2234
+ args: [{ selector: 'app-file-upload-button', standalone: true, imports: [CommonModule, MatButtonModule, MatIconModule], template: "<button\n [disabled]=\"isUploading\"\n mat-stroked-button\n type=\"button\"\n (click)=\"selectFiles($event)\"\n>\n <mat-icon>attachment</mat-icon> Attach\n</button>\n\n<input\n type=\"file\"\n id=\"{{ config.fileId ?? DEFAULT_FILE_ID }}\"\n [accept]=\"config.accept ?? '*'\"\n (change)=\"onFileChange($event)\"\n [multiple]=\"config.multiple ?? false\"\n class=\"d-none\"\n/>\n" }]
2235
+ }], ctorParameters: () => [{ type: i1.EntityFileService }], propDecorators: { config: [{
2236
+ type: Input
2237
+ }], uploaded: [{
2238
+ type: Output
2239
+ }] } });
2240
+
2241
+ class ChecksheetSubmissionFileUploadComponent {
2242
+ checksheetSubmissionFileService;
2243
+ submissionId;
2244
+ questionId;
2245
+ uploaded = new EventEmitter();
2246
+ constructor(checksheetSubmissionFileService) {
2247
+ this.checksheetSubmissionFileService = checksheetSubmissionFileService;
2248
+ }
2249
+ onUploadComplete(uploadedFiles) {
2250
+ const uploadObservables = uploadedFiles.map((file) => {
2251
+ const data = {
2252
+ file_name: file.item.file_name,
2253
+ file_url: file.item.url,
2254
+ submission_id: this.submissionId,
2255
+ question_id: this.questionId
2256
+ };
2257
+ return this.checksheetSubmissionFileService
2258
+ .store(data)
2259
+ .pipe(map((response) => response?.item));
2260
+ });
2261
+ forkJoin(uploadObservables).subscribe({
2262
+ next: (checksheetSubmissionFiles) => {
2263
+ this.uploaded.emit(checksheetSubmissionFiles);
2264
+ }
2265
+ });
2266
+ }
2267
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetSubmissionFileUploadComponent, deps: [{ token: ChecksheetSubmissionFileService }], target: i0.ɵɵFactoryTarget.Component });
2268
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ChecksheetSubmissionFileUploadComponent, isStandalone: true, selector: "app-checksheet-submission-file-upload", inputs: { submissionId: "submissionId", questionId: "questionId" }, outputs: { uploaded: "uploaded" }, ngImport: i0, template: "<app-file-upload-button\n (uploaded)=\"onUploadComplete($event)\"\n [config]=\"{ fileId: 'question-' + questionId }\"\n></app-file-upload-button>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: FileUploadButtonComponent, selector: "app-file-upload-button", inputs: ["config"], outputs: ["uploaded"] }] });
2269
+ }
2270
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetSubmissionFileUploadComponent, decorators: [{
2271
+ type: Component,
2272
+ args: [{ selector: 'app-checksheet-submission-file-upload', standalone: true, imports: [CommonModule, FileUploadButtonComponent], template: "<app-file-upload-button\n (uploaded)=\"onUploadComplete($event)\"\n [config]=\"{ fileId: 'question-' + questionId }\"\n></app-file-upload-button>\n" }]
2273
+ }], ctorParameters: () => [{ type: ChecksheetSubmissionFileService }], propDecorators: { submissionId: [{
2274
+ type: Input
2275
+ }], questionId: [{
2276
+ type: Input
2277
+ }], uploaded: [{
2278
+ type: Output
2279
+ }] } });
2037
2280
 
2038
2281
  /*
2039
2282
  * This module imports and re-exports all Angular Material modules for convenience,
@@ -2214,55 +2457,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
2214
2457
  }]
2215
2458
  }] });
2216
2459
 
2217
- class ChecksheetSubmissionFormButtonComponent {
2218
- matDialog;
2219
- alertService;
2220
- router;
2221
- submittableType = 'fixed-asset';
2222
- submittableId;
2223
- saved = new EventEmitter();
2224
- constructor(matDialog, alertService, router) {
2225
- this.matDialog = matDialog;
2226
- this.alertService = alertService;
2227
- this.router = router;
2228
- }
2229
- /**
2230
- * Open checksheet submission form.
2231
- *
2232
- * @param templateRef
2233
- */
2234
- openForm(templateRef) {
2235
- this.matDialog.open(templateRef, { width: '500px' });
2236
- }
2237
- /**
2238
- * Handle checksheet submission save event.
2239
- *
2240
- * @param checksheetSubmission
2241
- */
2242
- onSaved(checksheetSubmission) {
2243
- this.saved.emit(checksheetSubmission);
2244
- this.matDialog.closeAll();
2245
- this.alertService.addAlert('The checksheet submission is saved successfully!', 'success');
2246
- this.router.navigate([
2247
- 'fixed-assets/checksheets/checksheet-submissions',
2248
- checksheetSubmission?.id,
2249
- 'view'
2250
- ]);
2251
- }
2252
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetSubmissionFormButtonComponent, deps: [{ token: i1$1.MatDialog }, { token: i1.AlertService }, { token: i6$2.Router }], target: i0.ɵɵFactoryTarget.Component });
2253
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ChecksheetSubmissionFormButtonComponent, selector: "app-checksheet-submission-form-button", inputs: { submittableType: "submittableType", submittableId: "submittableId" }, outputs: { saved: "saved" }, ngImport: i0, template: "<span\n *ngIf=\"submittableId\"\n class=\"material-symbols-outlined text-secondary\"\n matTooltip=\"Add Checksheet Submission\"\n (click)=\"openForm(formTemplate)\"\n>\n assignment_turned_in\n</span>\n<mat-icon\n *ngIf=\"!submittableId\"\n class=\"cursor-pointer text-secondary\"\n (click)=\"openForm(formTemplate)\"\n>\n add\n</mat-icon>\n\n<ng-template #formTemplate>\n <app-checksheet-submission-form\n mat-dialog-content\n (cancelled)=\"matDialog.closeAll()\"\n (saved)=\"onSaved($event)\"\n [submittableType]=\"submittableType\"\n [submittableId]=\"submittableId\"\n ></app-checksheet-submission-form>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i6$3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: ChecksheetSubmissionFormComponent, selector: "app-checksheet-submission-form", inputs: ["submittableType", "submittableId", "checksheetSubmission"], outputs: ["cancelled", "saved"] }] });
2254
- }
2255
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetSubmissionFormButtonComponent, decorators: [{
2256
- type: Component,
2257
- args: [{ selector: 'app-checksheet-submission-form-button', template: "<span\n *ngIf=\"submittableId\"\n class=\"material-symbols-outlined text-secondary\"\n matTooltip=\"Add Checksheet Submission\"\n (click)=\"openForm(formTemplate)\"\n>\n assignment_turned_in\n</span>\n<mat-icon\n *ngIf=\"!submittableId\"\n class=\"cursor-pointer text-secondary\"\n (click)=\"openForm(formTemplate)\"\n>\n add\n</mat-icon>\n\n<ng-template #formTemplate>\n <app-checksheet-submission-form\n mat-dialog-content\n (cancelled)=\"matDialog.closeAll()\"\n (saved)=\"onSaved($event)\"\n [submittableType]=\"submittableType\"\n [submittableId]=\"submittableId\"\n ></app-checksheet-submission-form>\n</ng-template>\n" }]
2258
- }], ctorParameters: () => [{ type: i1$1.MatDialog }, { type: i1.AlertService }, { type: i6$2.Router }], propDecorators: { submittableType: [{
2259
- type: Input
2260
- }], submittableId: [{
2261
- type: Input
2262
- }], saved: [{
2263
- type: Output
2264
- }] } });
2265
-
2266
2460
  class ChecksheetSubmissionService extends TechlifyServiceBaseClass {
2267
2461
  constructor(httpService) {
2268
2462
  super(httpService, 'checksheet-submissions');
@@ -2339,7 +2533,7 @@ class ChecksheetSubmissionReviewButtonComponent {
2339
2533
  });
2340
2534
  }
2341
2535
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetSubmissionReviewButtonComponent, deps: [{ token: i1$1.MatDialog }, { token: i1.CredentialsService }, { token: ChecksheetSubmissionService }, { token: i1.AlertService }], target: i0.ɵɵFactoryTarget.Component });
2342
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ChecksheetSubmissionReviewButtonComponent, selector: "app-checksheet-submission-review-button", inputs: { submission: "submission", viewType: "viewType", requestParams: "requestParams" }, outputs: { reviewed: "reviewed" }, ngImport: i0, template: "<ng-container\n *ngIf=\"submission?.status_id === 2 && submission?.creator_id !== user?.id\"\n>\n <button\n *ngIf=\"viewType === 'button'\"\n mat-raised-button\n color=\"primary\"\n type=\"button\"\n (click)=\"openDialog(reviewTemplate)\"\n >\n Review\n </button>\n\n <mat-icon\n *ngIf=\"viewType === 'icon'\"\n class=\"cursor-pointer\"\n matTooltip=\"Review\"\n (click)=\"openDialog(reviewTemplate)\"\n >\n rate_review\n </mat-icon>\n</ng-container>\n\n<ng-template #reviewTemplate>\n <h3 mat-dialog-title>Review Checksheet Submission</h3>\n <div mat-dialog-content>\n <p>Are you sure you want to mark the checksheet submission as Reviewed?</p>\n </div>\n <div mat-dialog-actions class=\"d-flex justify-content-end align-items-center\">\n <button [disabled]=\"isWorking\" mat-flat-button mat-dialog-close>\n Cancel\n </button>\n <button\n [disabled]=\"isWorking\"\n mat-raised-button\n color=\"primary\"\n (click)=\"reviewChecksheet()\"\n >\n Review\n </button>\n </div>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i8.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: i1$1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1$1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1$1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i6$3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }] });
2536
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ChecksheetSubmissionReviewButtonComponent, selector: "app-checksheet-submission-review-button", inputs: { submission: "submission", viewType: "viewType", requestParams: "requestParams" }, outputs: { reviewed: "reviewed" }, ngImport: i0, template: "<ng-container\n *ngIf=\"submission?.status_id === 2 && submission?.creator_id !== user?.id\"\n>\n <button\n *ngIf=\"viewType === 'button'\"\n mat-raised-button\n color=\"primary\"\n type=\"button\"\n (click)=\"openDialog(reviewTemplate)\"\n >\n Review\n </button>\n\n <mat-icon\n *ngIf=\"viewType === 'icon'\"\n class=\"cursor-pointer\"\n matTooltip=\"Review\"\n (click)=\"openDialog(reviewTemplate)\"\n >\n rate_review\n </mat-icon>\n</ng-container>\n\n<ng-template #reviewTemplate>\n <h3 mat-dialog-title>Review Checksheet Submission</h3>\n <div mat-dialog-content>\n <p>Are you sure you want to mark the checksheet submission as Reviewed?</p>\n </div>\n <div mat-dialog-actions class=\"d-flex justify-content-end align-items-center\">\n <button [disabled]=\"isWorking\" mat-flat-button mat-dialog-close>\n Cancel\n </button>\n <button\n [disabled]=\"isWorking\"\n mat-raised-button\n color=\"primary\"\n (click)=\"reviewChecksheet()\"\n >\n Review\n </button>\n </div>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i8.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: i1$1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1$1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1$1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i6$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i7$3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }] });
2343
2537
  }
2344
2538
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetSubmissionReviewButtonComponent, decorators: [{
2345
2539
  type: Component,
@@ -2427,26 +2621,26 @@ let ChecksheetSubmissionListComponent = class ChecksheetSubmissionListComponent
2427
2621
  this.reload();
2428
2622
  }
2429
2623
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetSubmissionListComponent, deps: [{ token: i1.AlertService }, { token: i2.UntypedFormBuilder }, { token: ChecksheetSubmissionService }, { token: i1.RequestHelperService }], target: i0.ɵɵFactoryTarget.Component });
2430
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ChecksheetSubmissionListComponent, selector: "app-checksheet-submission-list", usesInheritance: true, ngImport: i0, template: "<div class=\"d-flex justify-content-center align-items-center gap-3\">\n <h3 class=\"m-0 font-weight-bold\">Checksheet Submissions</h3>\n <app-checksheet-submission-form-button></app-checksheet-submission-form-button>\n</div>\n\n<mat-card class=\"mt-3\">\n <mat-card-content>\n <form fxLayout=\"row wrap\" fxLayoutGap=\"1rem\" [formGroup]=\"filterForm\">\n <app-timeline-filter\n formControlName=\"duration\"\n (selectionChange)=\"onDurationChange($event)\"\n [dateFrom]=\"filterForm.value?.date_from\"\n [dateTo]=\"filterForm.value?.date_to\"\n appearance=\"fill\"\n ></app-timeline-filter>\n\n <mat-form-field>\n <mat-label>Status</mat-label>\n <app-searchable-selector\n formControlName=\"status_ids\"\n apiUrl=\"api/checksheet-submission-statuses\"\n [enableSearch]=\"false\"\n [multiple]=\"true\"\n >\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field *ngxPermissionsOnly=\"['user_read']\">\n <mat-label>Creator</mat-label>\n <app-searchable-selector\n formControlName=\"creator_ids\"\n apiUrl=\"api/users\"\n [enableSearch]=\"true\"\n titleField=\"name\"\n [multiple]=\"true\"\n >\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field *ngxPermissionsOnly=\"['user_read']\">\n <mat-label>Reviewer</mat-label>\n <app-searchable-selector\n formControlName=\"reviewer_ids\"\n apiUrl=\"api/users\"\n [enableSearch]=\"true\"\n titleField=\"name\"\n [multiple]=\"true\"\n >\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Checksheet Format</mat-label>\n <app-searchable-selector\n formControlName=\"format_ids\"\n apiUrl=\"api/checksheet-formats?is_published=1\"\n [enableSearch]=\"true\"\n [multiple]=\"true\"\n >\n </app-searchable-selector>\n </mat-form-field>\n </form>\n </mat-card-content>\n</mat-card>\n\n<mat-card\n class=\"p-0 mt-3\"\n infiniteScroll\n [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\"\n (scrolled)=\"onScroll()\"\n [fromRoot]=\"true\"\n>\n <table\n mat-table\n [dataSource]=\"models\"\n class=\"w-100\"\n multiTemplateDataRows\n aria-describedby=\"Checksheet Submissions\"\n >\n <!-- Index Column -->\n <ng-container matColumnDef=\"index\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = dataIndex\">\n {{ i + 1 }}\n </td>\n </ng-container>\n\n <!-- Checksheet Format Column -->\n <ng-container matColumnDef=\"format.title\">\n <th mat-header-cell *matHeaderCellDef>Checksheet Format</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.format?.title }}\n </td>\n </ng-container>\n\n <!-- Creator Column -->\n <ng-container matColumnDef=\"creator.name\">\n <th mat-header-cell *matHeaderCellDef>Creator</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.creator?.name }}\n </td>\n </ng-container>\n\n <!-- Reviewer Column -->\n <ng-container matColumnDef=\"reviewer.name\">\n <th mat-header-cell *matHeaderCellDef>Reviewer</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.reviewer?.name }}\n </td>\n </ng-container>\n\n <!-- Status Column -->\n <ng-container matColumnDef=\"status.title\">\n <th mat-header-cell *matHeaderCellDef>Status</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.status?.title }}\n </td>\n </ng-container>\n\n <!-- Date Column -->\n <ng-container matColumnDef=\"date\">\n <th mat-header-cell *matHeaderCellDef>Date</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element.date | date }}\n </td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element;\">\n <div class=\"d-flex gap-2\">\n <mat-icon\n [routerLink]=\"['../checksheet-submissions-view', element?.id]\"\n class=\"cursor-pointer\"\n >\n visibility\n </mat-icon>\n\n <mat-icon\n *ngIf=\"element.status_id === 1\"\n [routerLink]=\"[element?.id, 'view']\"\n class=\"cursor-pointer\"\n >\n edit\n </mat-icon>\n <app-checksheet-submission-review-button\n [submission]=\"element\"\n [requestParams]=\"{ with: this.with }\"\n (reviewed)=\"reload()\"\n ></app-checksheet-submission-review-button>\n <app-checksheet-submission-delete-button\n [checksheetSubmission]=\"element\"\n (deleted)=\"onDeleted()\"\n ></app-checksheet-submission-delete-button>\n </div>\n </td>\n </ng-container>\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n <mat-progress-bar *ngIf=\"isWorking\" mode=\"indeterminate\"></mat-progress-bar>\n</mat-card>\n", styles: [".scroll-container{max-height:800px;overflow-y:auto}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6$2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i6.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i6.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "component", type: i7.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i7.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i10.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i10.MatLabel, selector: "mat-label" }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i8$1.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: i6$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i6$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i6$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i6$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i6$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i6$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i6$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i6$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i6$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i6$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i15.NgxPermissionsDirective, selector: "[ngxPermissionsOnly],[ngxPermissionsExcept]", inputs: ["ngxPermissionsOnly", "ngxPermissionsOnlyThen", "ngxPermissionsOnlyElse", "ngxPermissionsExcept", "ngxPermissionsExceptElse", "ngxPermissionsExceptThen", "ngxPermissionsThen", "ngxPermissionsElse", "ngxPermissionsOnlyAuthorisedStrategy", "ngxPermissionsOnlyUnauthorisedStrategy", "ngxPermissionsExceptUnauthorisedStrategy", "ngxPermissionsExceptAuthorisedStrategy", "ngxPermissionsUnauthorisedStrategy", "ngxPermissionsAuthorisedStrategy"], outputs: ["permissionsAuthorized", "permissionsUnauthorized"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i9$2.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "component", type: i1.TimelineFilterComponent, selector: "app-timeline-filter", inputs: ["defaultValue", "required", "disabled", "value", "timelines", "dateFrom", "dateTo", "appearance", "showClearButton", "form", "labelText"], outputs: ["selectionChange"] }, { kind: "component", type: ChecksheetSubmissionDeleteButtonComponent, selector: "app-checksheet-submission-delete-button", inputs: ["checksheetSubmission"], outputs: ["deleted"] }, { kind: "component", type: ChecksheetSubmissionFormButtonComponent, selector: "app-checksheet-submission-form-button", inputs: ["submittableType", "submittableId"], outputs: ["saved"] }, { kind: "component", type: ChecksheetSubmissionReviewButtonComponent, selector: "app-checksheet-submission-review-button", inputs: ["submission", "viewType", "requestParams"], outputs: ["reviewed"] }, { kind: "pipe", type: i4.DatePipe, name: "date" }] });
2624
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ChecksheetSubmissionListComponent, selector: "app-checksheet-submission-list", usesInheritance: true, ngImport: i0, template: "<div class=\"d-flex justify-content-center align-items-center gap-3\">\n <h3 class=\"m-0 font-weight-bold\">Checksheet Submissions</h3>\n <app-checksheet-form-button></app-checksheet-form-button>\n</div>\n\n<mat-card class=\"mt-3\">\n <mat-card-content>\n <form fxLayout=\"row wrap\" fxLayoutGap=\"1rem\" [formGroup]=\"filterForm\">\n <app-timeline-filter\n formControlName=\"duration\"\n (selectionChange)=\"onDurationChange($event)\"\n [dateFrom]=\"filterForm.value?.date_from\"\n [dateTo]=\"filterForm.value?.date_to\"\n appearance=\"fill\"\n ></app-timeline-filter>\n\n <mat-form-field>\n <mat-label>Status</mat-label>\n <app-searchable-selector\n formControlName=\"status_ids\"\n apiUrl=\"api/checksheet-submission-statuses\"\n [enableSearch]=\"false\"\n [multiple]=\"true\"\n >\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field *ngxPermissionsOnly=\"['user_read']\">\n <mat-label>Creator</mat-label>\n <app-searchable-selector\n formControlName=\"creator_ids\"\n apiUrl=\"api/users\"\n [enableSearch]=\"true\"\n titleField=\"name\"\n [multiple]=\"true\"\n >\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field *ngxPermissionsOnly=\"['user_read']\">\n <mat-label>Reviewer</mat-label>\n <app-searchable-selector\n formControlName=\"reviewer_ids\"\n apiUrl=\"api/users\"\n [enableSearch]=\"true\"\n titleField=\"name\"\n [multiple]=\"true\"\n >\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Checksheet Format</mat-label>\n <app-searchable-selector\n formControlName=\"format_ids\"\n apiUrl=\"api/checksheet-formats?is_published=1\"\n [enableSearch]=\"true\"\n [multiple]=\"true\"\n >\n </app-searchable-selector>\n </mat-form-field>\n </form>\n </mat-card-content>\n</mat-card>\n\n<mat-card\n class=\"p-0 mt-3\"\n infiniteScroll\n [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\"\n (scrolled)=\"onScroll()\"\n [fromRoot]=\"true\"\n>\n <table\n mat-table\n [dataSource]=\"models\"\n class=\"w-100\"\n multiTemplateDataRows\n aria-describedby=\"Checksheet Submissions\"\n >\n <!-- Index Column -->\n <ng-container matColumnDef=\"index\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = dataIndex\">\n {{ i + 1 }}\n </td>\n </ng-container>\n\n <!-- Checksheet Format Column -->\n <ng-container matColumnDef=\"format.title\">\n <th mat-header-cell *matHeaderCellDef>Checksheet Format</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.format?.title }}\n </td>\n </ng-container>\n\n <!-- Creator Column -->\n <ng-container matColumnDef=\"creator.name\">\n <th mat-header-cell *matHeaderCellDef>Creator</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.creator?.name }}\n </td>\n </ng-container>\n\n <!-- Reviewer Column -->\n <ng-container matColumnDef=\"reviewer.name\">\n <th mat-header-cell *matHeaderCellDef>Reviewer</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.reviewer?.name }}\n </td>\n </ng-container>\n\n <!-- Status Column -->\n <ng-container matColumnDef=\"status.title\">\n <th mat-header-cell *matHeaderCellDef>Status</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.status?.title }}\n </td>\n </ng-container>\n\n <!-- Date Column -->\n <ng-container matColumnDef=\"date\">\n <th mat-header-cell *matHeaderCellDef>Date</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element.date | date }}\n </td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element;\">\n <div class=\"d-flex gap-2\">\n <mat-icon\n [routerLink]=\"['../checksheet-submissions-view', element?.id]\"\n class=\"cursor-pointer\"\n >\n visibility\n </mat-icon>\n\n <mat-icon\n *ngIf=\"element.status_id === 1\"\n [routerLink]=\"[element?.id, 'view']\"\n class=\"cursor-pointer\"\n >\n edit\n </mat-icon>\n <app-checksheet-submission-review-button\n [submission]=\"element\"\n [requestParams]=\"{ with: this.with }\"\n (reviewed)=\"reload()\"\n ></app-checksheet-submission-review-button>\n <app-checksheet-submission-delete-button\n [checksheetSubmission]=\"element\"\n (deleted)=\"onDeleted()\"\n ></app-checksheet-submission-delete-button>\n </div>\n </td>\n </ng-container>\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n <mat-progress-bar *ngIf=\"isWorking\" mode=\"indeterminate\"></mat-progress-bar>\n</mat-card>\n", styles: [".scroll-container{max-height:800px;overflow-y:auto}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6$2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i6.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i6.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "component", type: i4$1.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4$1.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i10.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i10.MatLabel, selector: "mat-label" }, { kind: "component", type: i6$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: i7.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i7.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i7.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i7.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i7.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i7.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i7.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i7.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i7.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i7.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i15.NgxPermissionsDirective, selector: "[ngxPermissionsOnly],[ngxPermissionsExcept]", inputs: ["ngxPermissionsOnly", "ngxPermissionsOnlyThen", "ngxPermissionsOnlyElse", "ngxPermissionsExcept", "ngxPermissionsExceptElse", "ngxPermissionsExceptThen", "ngxPermissionsThen", "ngxPermissionsElse", "ngxPermissionsOnlyAuthorisedStrategy", "ngxPermissionsOnlyUnauthorisedStrategy", "ngxPermissionsExceptUnauthorisedStrategy", "ngxPermissionsExceptAuthorisedStrategy", "ngxPermissionsUnauthorisedStrategy", "ngxPermissionsAuthorisedStrategy"], outputs: ["permissionsAuthorized", "permissionsUnauthorized"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i7$1.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "component", type: i1.SearchableSelectorComponent, selector: "app-searchable-selector", inputs: ["valueField", "titleField", "subtitleField", "apiUrl", "multiple", "selectedValue", "enableSearch", "add", "addConfig", "edit", "editConfig", "sort", "sortBy", "searchField", "itemComponent", "items", "apiDataProperty", "cache", "perPage", "inDataSearch", "panelWidth", "focusSearchOnOpen", "required", "disabled", "value"], outputs: ["selectedValueChange", "selectionChange", "itemsChange"] }, { kind: "component", type: i1.TimelineFilterComponent, selector: "app-timeline-filter", inputs: ["defaultValue", "required", "disabled", "value", "timelines", "dateFrom", "dateTo", "appearance", "showClearButton", "form", "labelText"], outputs: ["selectionChange"] }, { kind: "component", type: ChecksheetFormButtonComponent, selector: "app-checksheet-form-button", inputs: ["submittableType", "submittableId"], outputs: ["saved"] }, { kind: "component", type: ChecksheetSubmissionDeleteButtonComponent, selector: "app-checksheet-submission-delete-button", inputs: ["checksheetSubmission"], outputs: ["deleted"] }, { kind: "component", type: ChecksheetSubmissionReviewButtonComponent, selector: "app-checksheet-submission-review-button", inputs: ["submission", "viewType", "requestParams"], outputs: ["reviewed"] }, { kind: "pipe", type: i4.DatePipe, name: "date" }] });
2431
2625
  };
2432
2626
  ChecksheetSubmissionListComponent = __decorate([
2433
2627
  UntilDestroy()
2434
2628
  ], ChecksheetSubmissionListComponent);
2435
2629
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetSubmissionListComponent, decorators: [{
2436
2630
  type: Component,
2437
- args: [{ selector: 'app-checksheet-submission-list', template: "<div class=\"d-flex justify-content-center align-items-center gap-3\">\n <h3 class=\"m-0 font-weight-bold\">Checksheet Submissions</h3>\n <app-checksheet-submission-form-button></app-checksheet-submission-form-button>\n</div>\n\n<mat-card class=\"mt-3\">\n <mat-card-content>\n <form fxLayout=\"row wrap\" fxLayoutGap=\"1rem\" [formGroup]=\"filterForm\">\n <app-timeline-filter\n formControlName=\"duration\"\n (selectionChange)=\"onDurationChange($event)\"\n [dateFrom]=\"filterForm.value?.date_from\"\n [dateTo]=\"filterForm.value?.date_to\"\n appearance=\"fill\"\n ></app-timeline-filter>\n\n <mat-form-field>\n <mat-label>Status</mat-label>\n <app-searchable-selector\n formControlName=\"status_ids\"\n apiUrl=\"api/checksheet-submission-statuses\"\n [enableSearch]=\"false\"\n [multiple]=\"true\"\n >\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field *ngxPermissionsOnly=\"['user_read']\">\n <mat-label>Creator</mat-label>\n <app-searchable-selector\n formControlName=\"creator_ids\"\n apiUrl=\"api/users\"\n [enableSearch]=\"true\"\n titleField=\"name\"\n [multiple]=\"true\"\n >\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field *ngxPermissionsOnly=\"['user_read']\">\n <mat-label>Reviewer</mat-label>\n <app-searchable-selector\n formControlName=\"reviewer_ids\"\n apiUrl=\"api/users\"\n [enableSearch]=\"true\"\n titleField=\"name\"\n [multiple]=\"true\"\n >\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Checksheet Format</mat-label>\n <app-searchable-selector\n formControlName=\"format_ids\"\n apiUrl=\"api/checksheet-formats?is_published=1\"\n [enableSearch]=\"true\"\n [multiple]=\"true\"\n >\n </app-searchable-selector>\n </mat-form-field>\n </form>\n </mat-card-content>\n</mat-card>\n\n<mat-card\n class=\"p-0 mt-3\"\n infiniteScroll\n [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\"\n (scrolled)=\"onScroll()\"\n [fromRoot]=\"true\"\n>\n <table\n mat-table\n [dataSource]=\"models\"\n class=\"w-100\"\n multiTemplateDataRows\n aria-describedby=\"Checksheet Submissions\"\n >\n <!-- Index Column -->\n <ng-container matColumnDef=\"index\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = dataIndex\">\n {{ i + 1 }}\n </td>\n </ng-container>\n\n <!-- Checksheet Format Column -->\n <ng-container matColumnDef=\"format.title\">\n <th mat-header-cell *matHeaderCellDef>Checksheet Format</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.format?.title }}\n </td>\n </ng-container>\n\n <!-- Creator Column -->\n <ng-container matColumnDef=\"creator.name\">\n <th mat-header-cell *matHeaderCellDef>Creator</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.creator?.name }}\n </td>\n </ng-container>\n\n <!-- Reviewer Column -->\n <ng-container matColumnDef=\"reviewer.name\">\n <th mat-header-cell *matHeaderCellDef>Reviewer</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.reviewer?.name }}\n </td>\n </ng-container>\n\n <!-- Status Column -->\n <ng-container matColumnDef=\"status.title\">\n <th mat-header-cell *matHeaderCellDef>Status</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.status?.title }}\n </td>\n </ng-container>\n\n <!-- Date Column -->\n <ng-container matColumnDef=\"date\">\n <th mat-header-cell *matHeaderCellDef>Date</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element.date | date }}\n </td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element;\">\n <div class=\"d-flex gap-2\">\n <mat-icon\n [routerLink]=\"['../checksheet-submissions-view', element?.id]\"\n class=\"cursor-pointer\"\n >\n visibility\n </mat-icon>\n\n <mat-icon\n *ngIf=\"element.status_id === 1\"\n [routerLink]=\"[element?.id, 'view']\"\n class=\"cursor-pointer\"\n >\n edit\n </mat-icon>\n <app-checksheet-submission-review-button\n [submission]=\"element\"\n [requestParams]=\"{ with: this.with }\"\n (reviewed)=\"reload()\"\n ></app-checksheet-submission-review-button>\n <app-checksheet-submission-delete-button\n [checksheetSubmission]=\"element\"\n (deleted)=\"onDeleted()\"\n ></app-checksheet-submission-delete-button>\n </div>\n </td>\n </ng-container>\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n <mat-progress-bar *ngIf=\"isWorking\" mode=\"indeterminate\"></mat-progress-bar>\n</mat-card>\n", styles: [".scroll-container{max-height:800px;overflow-y:auto}\n"] }]
2631
+ args: [{ selector: 'app-checksheet-submission-list', template: "<div class=\"d-flex justify-content-center align-items-center gap-3\">\n <h3 class=\"m-0 font-weight-bold\">Checksheet Submissions</h3>\n <app-checksheet-form-button></app-checksheet-form-button>\n</div>\n\n<mat-card class=\"mt-3\">\n <mat-card-content>\n <form fxLayout=\"row wrap\" fxLayoutGap=\"1rem\" [formGroup]=\"filterForm\">\n <app-timeline-filter\n formControlName=\"duration\"\n (selectionChange)=\"onDurationChange($event)\"\n [dateFrom]=\"filterForm.value?.date_from\"\n [dateTo]=\"filterForm.value?.date_to\"\n appearance=\"fill\"\n ></app-timeline-filter>\n\n <mat-form-field>\n <mat-label>Status</mat-label>\n <app-searchable-selector\n formControlName=\"status_ids\"\n apiUrl=\"api/checksheet-submission-statuses\"\n [enableSearch]=\"false\"\n [multiple]=\"true\"\n >\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field *ngxPermissionsOnly=\"['user_read']\">\n <mat-label>Creator</mat-label>\n <app-searchable-selector\n formControlName=\"creator_ids\"\n apiUrl=\"api/users\"\n [enableSearch]=\"true\"\n titleField=\"name\"\n [multiple]=\"true\"\n >\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field *ngxPermissionsOnly=\"['user_read']\">\n <mat-label>Reviewer</mat-label>\n <app-searchable-selector\n formControlName=\"reviewer_ids\"\n apiUrl=\"api/users\"\n [enableSearch]=\"true\"\n titleField=\"name\"\n [multiple]=\"true\"\n >\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Checksheet Format</mat-label>\n <app-searchable-selector\n formControlName=\"format_ids\"\n apiUrl=\"api/checksheet-formats?is_published=1\"\n [enableSearch]=\"true\"\n [multiple]=\"true\"\n >\n </app-searchable-selector>\n </mat-form-field>\n </form>\n </mat-card-content>\n</mat-card>\n\n<mat-card\n class=\"p-0 mt-3\"\n infiniteScroll\n [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\"\n (scrolled)=\"onScroll()\"\n [fromRoot]=\"true\"\n>\n <table\n mat-table\n [dataSource]=\"models\"\n class=\"w-100\"\n multiTemplateDataRows\n aria-describedby=\"Checksheet Submissions\"\n >\n <!-- Index Column -->\n <ng-container matColumnDef=\"index\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = dataIndex\">\n {{ i + 1 }}\n </td>\n </ng-container>\n\n <!-- Checksheet Format Column -->\n <ng-container matColumnDef=\"format.title\">\n <th mat-header-cell *matHeaderCellDef>Checksheet Format</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.format?.title }}\n </td>\n </ng-container>\n\n <!-- Creator Column -->\n <ng-container matColumnDef=\"creator.name\">\n <th mat-header-cell *matHeaderCellDef>Creator</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.creator?.name }}\n </td>\n </ng-container>\n\n <!-- Reviewer Column -->\n <ng-container matColumnDef=\"reviewer.name\">\n <th mat-header-cell *matHeaderCellDef>Reviewer</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.reviewer?.name }}\n </td>\n </ng-container>\n\n <!-- Status Column -->\n <ng-container matColumnDef=\"status.title\">\n <th mat-header-cell *matHeaderCellDef>Status</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.status?.title }}\n </td>\n </ng-container>\n\n <!-- Date Column -->\n <ng-container matColumnDef=\"date\">\n <th mat-header-cell *matHeaderCellDef>Date</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element.date | date }}\n </td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element;\">\n <div class=\"d-flex gap-2\">\n <mat-icon\n [routerLink]=\"['../checksheet-submissions-view', element?.id]\"\n class=\"cursor-pointer\"\n >\n visibility\n </mat-icon>\n\n <mat-icon\n *ngIf=\"element.status_id === 1\"\n [routerLink]=\"[element?.id, 'view']\"\n class=\"cursor-pointer\"\n >\n edit\n </mat-icon>\n <app-checksheet-submission-review-button\n [submission]=\"element\"\n [requestParams]=\"{ with: this.with }\"\n (reviewed)=\"reload()\"\n ></app-checksheet-submission-review-button>\n <app-checksheet-submission-delete-button\n [checksheetSubmission]=\"element\"\n (deleted)=\"onDeleted()\"\n ></app-checksheet-submission-delete-button>\n </div>\n </td>\n </ng-container>\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n <mat-progress-bar *ngIf=\"isWorking\" mode=\"indeterminate\"></mat-progress-bar>\n</mat-card>\n", styles: [".scroll-container{max-height:800px;overflow-y:auto}\n"] }]
2438
2632
  }], ctorParameters: () => [{ type: i1.AlertService }, { type: i2.UntypedFormBuilder }, { type: ChecksheetSubmissionService }, { type: i1.RequestHelperService }] });
2439
2633
 
2440
2634
  class ChecksheetModule {
2441
2635
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2442
2636
  static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetModule, declarations: [ChecksheetFormatListComponent,
2443
- ChecksheetFormComponent,
2637
+ ChecksheetFormatFormComponent,
2444
2638
  ChecksheetQuestionFormComponent,
2445
2639
  ChecksheetQuestionComponent,
2446
2640
  ChecksheetQuestionListComponent,
2447
2641
  ChecksheetListComponent,
2448
- ChecksheetSubmissionFormComponent,
2449
- ChecksheetViewComponent,
2642
+ ChecksheetFormComponent,
2643
+ ChecksheetFormatViewComponent,
2450
2644
  ChecksheetNodeViewComponent,
2451
2645
  MechanicalIssueFormComponent,
2452
2646
  ChecksheetReportComponent,
@@ -2454,9 +2648,9 @@ class ChecksheetModule {
2454
2648
  ChecksheetSubmissionDeleteButtonComponent,
2455
2649
  ChecksheetReviewButtonComponent,
2456
2650
  ChecksheetSubmissionViewComponent,
2457
- ChecksheetSubmissionFormButtonComponent,
2458
2651
  ChecksheetSubmissionListComponent,
2459
- ChecksheetSubmissionReviewButtonComponent], imports: [CommonModule,
2652
+ ChecksheetSubmissionReviewButtonComponent,
2653
+ ChecksheetListWidgetComponent], imports: [CommonModule,
2460
2654
  ChecksheetRoutingModule,
2461
2655
  SharedModule,
2462
2656
  InfiniteScrollModule,
@@ -2471,8 +2665,14 @@ class ChecksheetModule {
2471
2665
  TimelineFilterModule,
2472
2666
  ChecksheetSubmissionFileUploadComponent,
2473
2667
  ChecksheetSubmissionFilesComponent,
2474
- SharedModule], exports: [ChecksheetListComponent,
2475
- ChecksheetFormButtonComponent] });
2668
+ SharedModule,
2669
+ AvatarComponent,
2670
+ ChecksheetFormatCopyButtonComponent,
2671
+ ChecksheetFormatDeleteButtonComponent,
2672
+ ChecksheetFormatUnpublishButtonComponent,
2673
+ ChecksheetFormatPublishButtonComponent], exports: [ChecksheetListComponent,
2674
+ ChecksheetFormButtonComponent,
2675
+ ChecksheetListWidgetComponent] });
2476
2676
  static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetModule, imports: [CommonModule,
2477
2677
  ChecksheetRoutingModule,
2478
2678
  SharedModule,
@@ -2488,20 +2688,25 @@ class ChecksheetModule {
2488
2688
  TimelineFilterModule,
2489
2689
  ChecksheetSubmissionFileUploadComponent,
2490
2690
  ChecksheetSubmissionFilesComponent,
2491
- SharedModule] });
2691
+ SharedModule,
2692
+ AvatarComponent,
2693
+ ChecksheetFormatCopyButtonComponent,
2694
+ ChecksheetFormatDeleteButtonComponent,
2695
+ ChecksheetFormatUnpublishButtonComponent,
2696
+ ChecksheetFormatPublishButtonComponent] });
2492
2697
  }
2493
2698
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetModule, decorators: [{
2494
2699
  type: NgModule,
2495
2700
  args: [{
2496
2701
  declarations: [
2497
2702
  ChecksheetFormatListComponent,
2498
- ChecksheetFormComponent,
2703
+ ChecksheetFormatFormComponent,
2499
2704
  ChecksheetQuestionFormComponent,
2500
2705
  ChecksheetQuestionComponent,
2501
2706
  ChecksheetQuestionListComponent,
2502
2707
  ChecksheetListComponent,
2503
- ChecksheetSubmissionFormComponent,
2504
- ChecksheetViewComponent,
2708
+ ChecksheetFormComponent,
2709
+ ChecksheetFormatViewComponent,
2505
2710
  ChecksheetNodeViewComponent,
2506
2711
  MechanicalIssueFormComponent,
2507
2712
  ChecksheetReportComponent,
@@ -2509,9 +2714,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
2509
2714
  ChecksheetSubmissionDeleteButtonComponent,
2510
2715
  ChecksheetReviewButtonComponent,
2511
2716
  ChecksheetSubmissionViewComponent,
2512
- ChecksheetSubmissionFormButtonComponent,
2513
2717
  ChecksheetSubmissionListComponent,
2514
- ChecksheetSubmissionReviewButtonComponent
2718
+ ChecksheetSubmissionReviewButtonComponent,
2719
+ ChecksheetListWidgetComponent
2515
2720
  ],
2516
2721
  imports: [
2517
2722
  CommonModule,
@@ -2529,11 +2734,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
2529
2734
  TimelineFilterModule,
2530
2735
  ChecksheetSubmissionFileUploadComponent,
2531
2736
  ChecksheetSubmissionFilesComponent,
2532
- SharedModule
2737
+ SharedModule,
2738
+ AvatarComponent,
2739
+ ChecksheetFormatCopyButtonComponent,
2740
+ ChecksheetFormatDeleteButtonComponent,
2741
+ ChecksheetFormatUnpublishButtonComponent,
2742
+ ChecksheetFormatPublishButtonComponent
2533
2743
  ],
2534
2744
  exports: [
2535
2745
  ChecksheetListComponent,
2536
- ChecksheetFormButtonComponent
2746
+ ChecksheetFormButtonComponent,
2747
+ ChecksheetListWidgetComponent
2537
2748
  ]
2538
2749
  }]
2539
2750
  }] });
@@ -2546,5 +2757,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
2546
2757
  * Generated bundle index. Do not edit.
2547
2758
  */
2548
2759
 
2549
- export { ChecksheetFormButtonComponent, ChecksheetListComponent, ChecksheetModule, ChecksheetSubmissionFormButtonComponent, ChecksheetSubmissionListComponent };
2760
+ export { ChecksheetFormButtonComponent, ChecksheetListComponent, ChecksheetListWidgetComponent, ChecksheetModule, ChecksheetSubmissionListComponent };
2550
2761
  //# sourceMappingURL=ngx-techlify-checksheet.mjs.map