ngx-techlify-checksheet 18.0.0 → 18.2.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 +139 -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 +594 -378
  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 +39 -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';
5
- import * as i6$2 from '@angular/router';
4
+ import { NgIf, CommonModule } from '@angular/common';
5
+ import * as i4$1 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';
12
- import * as i1$1 from '@angular/material/dialog';
13
- import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
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';
14
11
  import * as i6 from '@angular/flex-layout/flex';
15
- import * as i8 from '@angular/material/button';
16
- import { MatButtonModule } from '@angular/material/button';
17
- import * as i7 from '@angular/material/card';
12
+ import * as i7 from '@angular/material/button';
13
+ import { MatButton, MatButtonModule } from '@angular/material/button';
14
+ import * as i8 from '@angular/material/card';
18
15
  import { MatCardModule } from '@angular/material/card';
19
16
  import * as i10 from '@angular/material/form-field';
20
17
  import { MatFormFieldModule } from '@angular/material/form-field';
21
- import * as i12 from '@angular/material/input';
18
+ import * as i6$1 from '@angular/material/icon';
19
+ import { MatIcon, MatIconModule } from '@angular/material/icon';
20
+ import * as i11 from '@angular/material/input';
22
21
  import { MatInputModule } from '@angular/material/input';
23
- import * as i8$1 from '@angular/material/progress-bar';
22
+ import * as i9 from '@angular/material/progress-bar';
24
23
  import { MatProgressBarModule } from '@angular/material/progress-bar';
25
- import * as i11 from 'ngx-editor';
24
+ import * as i7$4 from '@angular/material/tooltip';
25
+ import { MatTooltip, MatTooltipModule } from '@angular/material/tooltip';
26
+ import * as i1$1 from '@angular/material/dialog';
27
+ import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
28
+ import * as i11$1 from 'ngx-editor';
26
29
  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';
30
+ import * as i1$2 from 'ngx-spinner';
31
+ import * as i7$2 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$1 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$3 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$5 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: i7.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i7.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: i7.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$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i7$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i7$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i7$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i7$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i7$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i7$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i7$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i7$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i7$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i8.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i8.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\">{{ questionInfo?.type?.title }}</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\">{{ questionInfo?.type?.title }}</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: i8.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i8.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\">{{ questionInfo?.type?.title }}</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\">{{ questionInfo?.type?.title }}</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: i1$2.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: i8.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i8.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$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"] }] });
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: i1$2.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,33 +933,26 @@ 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
- spinnerService;
758
939
  alertService;
759
940
  location;
760
- errorHandler;
761
- dataManager;
762
- dialog;
763
941
  route;
764
942
  checksheetFormatService;
765
943
  checksheetForm;
766
944
  updateMode;
767
- checksheet;
945
+ checksheetFormat;
768
946
  isSaving = false;
769
947
  id;
770
948
  disableInput;
771
949
  isLoading = false;
772
- constructor(formValidatorService, fb, spinnerService, alertService, location, errorHandler, dataManager, dialog, route, checksheetFormatService) {
950
+ isShowChecksheetInfo = false;
951
+ constructor(formValidatorService, fb, alertService, location, route, checksheetFormatService) {
773
952
  this.formValidatorService = formValidatorService;
774
953
  this.fb = fb;
775
- this.spinnerService = spinnerService;
776
954
  this.alertService = alertService;
777
955
  this.location = location;
778
- this.errorHandler = errorHandler;
779
- this.dataManager = dataManager;
780
- this.dialog = dialog;
781
956
  this.route = route;
782
957
  this.checksheetFormatService = checksheetFormatService;
783
958
  this.id = parseInt(this.route.snapshot.params?.['checksheetId']);
@@ -824,68 +999,51 @@ class ChecksheetFormComponent {
824
999
  request.subscribe({
825
1000
  next: (result) => {
826
1001
  this.isSaving = false;
827
- if (!this.updateMode) {
828
- this.checksheet = result.item;
829
- this.checksheetForm.patchValue({ ...this.checksheet });
830
- }
1002
+ this.checksheetFormat = result?.item;
1003
+ this.checksheetForm.patchValue({ ...this.checksheetFormat });
831
1004
  this.updateMode = true;
832
- this.alertService.addAlert('Checksheet saved successfully', 'success');
1005
+ this.isShowChecksheetInfo = false;
1006
+ this.alertService.addAlert('Checksheet format saved successfully', 'success');
833
1007
  },
834
- error: (error) => {
1008
+ error: () => {
835
1009
  this.isSaving = false;
836
1010
  }
837
1011
  });
838
1012
  }
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
1013
  loadChecksheetFormat() {
869
1014
  this.isLoading = true;
870
- const params = { with: 'questions.answers,questions.type' };
871
- this.checksheetFormatService.show(this.id, params).subscribe({
1015
+ const params = { with: 'questions.answers,questions.type,creator', withCount: 'submissions' };
1016
+ const formatId = this.checksheetFormat ? this.checksheetFormat?.id : this.id;
1017
+ if (!formatId) {
1018
+ this.alertService.addAlert('Unable to load the checksheet format.', 'error');
1019
+ return;
1020
+ }
1021
+ this.checksheetFormatService.show(formatId, params).subscribe({
872
1022
  next: (result) => {
873
1023
  this.isLoading = false;
874
1024
  this.checksheetForm.patchValue(result?.item);
875
- this.checksheet = result?.item;
1025
+ this.checksheetFormat = result?.item;
876
1026
  },
877
1027
  error: () => {
878
1028
  this.isLoading = false;
879
1029
  }
880
1030
  });
881
1031
  }
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"] }] });
1032
+ handleCancel() {
1033
+ if (this.checksheetFormat) {
1034
+ this.isShowChecksheetInfo = false;
1035
+ }
1036
+ else {
1037
+ this.location.back();
1038
+ }
1039
+ }
1040
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetFormatFormComponent, deps: [{ token: i1.FormValidatorService }, { token: i2.UntypedFormBuilder }, { token: i1.AlertService }, { token: i4.Location }, { token: i4$1.ActivatedRoute }, { token: ChecksheetFormatService }], target: i0.ɵɵFactoryTarget.Component });
1041
+ 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 || isShowChecksheetInfo\">\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 d-flex justify-content-end align-items-center gap-1 flex-wrap\" *ngIf=\"!disableInput\">\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\n <button [disabled]=\"isSaving\" mat-flat-button type=\"button\" (click)=\"handleCancel()\">\n Cancel\n </button>\n </div>\n </form>\n </mat-card-content>\n </mat-card>\n\n <mat-card *ngIf=\"checksheetFormat && !isShowChecksheetInfo\">\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)=\"isShowChecksheetInfo = 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 <div class=\"d-flex flex-wrap justify-content-center align-items-center gap-2\">\n <span class=\"badge bg-secondary\">{{ checksheetFormat?.submissions_count }} Checksheet Submissions</span>\n <span class=\"badge\" [class.bg-success]=\"checksheetFormat?.is_published\"\n [class.bg-danger]=\"!checksheetFormat?.is_published\">\n {{ checksheetFormat?.is_published ? 'Published' : 'Unpublished' }}\n </span>\n </div>\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: "component", type: i7.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i8.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i8.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
1042
  }
885
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetFormComponent, decorators: [{
1043
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetFormatFormComponent, decorators: [{
886
1044
  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: [{
1045
+ 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 || isShowChecksheetInfo\">\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 d-flex justify-content-end align-items-center gap-1 flex-wrap\" *ngIf=\"!disableInput\">\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\n <button [disabled]=\"isSaving\" mat-flat-button type=\"button\" (click)=\"handleCancel()\">\n Cancel\n </button>\n </div>\n </form>\n </mat-card-content>\n </mat-card>\n\n <mat-card *ngIf=\"checksheetFormat && !isShowChecksheetInfo\">\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)=\"isShowChecksheetInfo = 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 <div class=\"d-flex flex-wrap justify-content-center align-items-center gap-2\">\n <span class=\"badge bg-secondary\">{{ checksheetFormat?.submissions_count }} Checksheet Submissions</span>\n <span class=\"badge\" [class.bg-success]=\"checksheetFormat?.is_published\"\n [class.bg-danger]=\"!checksheetFormat?.is_published\">\n {{ checksheetFormat?.is_published ? 'Published' : 'Unpublished' }}\n </span>\n </div>\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" }]
1046
+ }], ctorParameters: () => [{ type: i1.FormValidatorService }, { type: i2.UntypedFormBuilder }, { type: i1.AlertService }, { type: i4.Location }, { type: i4$1.ActivatedRoute }, { type: ChecksheetFormatService }], propDecorators: { disableInput: [{
889
1047
  type: Input
890
1048
  }] } });
891
1049
 
@@ -910,67 +1068,6 @@ class ChecksheetFormatListComponent extends TechlifyListingControllerInterface {
910
1068
  ngOnInit() {
911
1069
  this.loadData();
912
1070
  }
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
1071
  loadData() {
975
1072
  this.isWorking = true;
976
1073
  const params = {
@@ -991,11 +1088,11 @@ class ChecksheetFormatListComponent extends TechlifyListingControllerInterface {
991
1088
  });
992
1089
  }
993
1090
  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"] }] });
1091
+ 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: i4$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i8.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i8.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$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i7$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i7$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i7$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i7$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i7$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i7$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i7$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i7$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i7$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i7$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: 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
1092
  }
996
1093
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetFormatListComponent, decorators: [{
997
1094
  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"] }]
1095
+ 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
1096
  }], ctorParameters: () => [{ type: i1$1.MatDialog }, { type: ChecksheetFormatService }, { type: i1.AlertService }] });
1000
1097
 
1001
1098
  class ChecksheetService extends TechlifyServiceBaseClass {
@@ -1038,9 +1135,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
1038
1135
  }]
1039
1136
  }], ctorParameters: () => [{ type: i1.HttpService }, { type: i1.DataManager }] });
1040
1137
 
1041
- class ChecksheetSubmissionFormComponent extends TechlifyFormComponentInterface {
1138
+ class ChecksheetFormComponent extends TechlifyFormComponentInterface {
1042
1139
  fb;
1043
- checksheetSubmissionService;
1140
+ service;
1044
1141
  alertService;
1045
1142
  dialog;
1046
1143
  submittableType;
@@ -1050,10 +1147,10 @@ class ChecksheetSubmissionFormComponent extends TechlifyFormComponentInterface {
1050
1147
  updateMode;
1051
1148
  checksheetSubmission;
1052
1149
  isSaving = false;
1053
- constructor(formValidatorService, fb, checksheetSubmissionService, alertService, dialog) {
1150
+ constructor(formValidatorService, fb, service, alertService, dialog) {
1054
1151
  super(formValidatorService);
1055
1152
  this.fb = fb;
1056
- this.checksheetSubmissionService = checksheetSubmissionService;
1153
+ this.service = service;
1057
1154
  this.alertService = alertService;
1058
1155
  this.dialog = dialog;
1059
1156
  this.errorMessages = {
@@ -1077,6 +1174,7 @@ class ChecksheetSubmissionFormComponent extends TechlifyFormComponentInterface {
1077
1174
  });
1078
1175
  }
1079
1176
  ngOnInit() {
1177
+ console.log(this.submittableType, this.submittableId);
1080
1178
  // Set the submittable type and id and make it readonly
1081
1179
  if (this.submittableType && this.submittableId) {
1082
1180
  this.form.patchValue({
@@ -1099,8 +1197,8 @@ class ChecksheetSubmissionFormComponent extends TechlifyFormComponentInterface {
1099
1197
  }
1100
1198
  const data = { ...this.form.value };
1101
1199
  const request = this.updateMode
1102
- ? this.checksheetSubmissionService.update(data)
1103
- : this.checksheetSubmissionService.store(data);
1200
+ ? this.service.update(data)
1201
+ : this.service.store(data);
1104
1202
  this.isSaving = true;
1105
1203
  request.subscribe({
1106
1204
  next: (response) => {
@@ -1117,14 +1215,15 @@ class ChecksheetSubmissionFormComponent extends TechlifyFormComponentInterface {
1117
1215
  width: '400px',
1118
1216
  data: {
1119
1217
  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?`
1218
+ message: `Review the checksheet completely before submitting, you cannot alter once it is submitted.
1219
+ Are you sure to submit the Checksheet?`
1121
1220
  },
1122
1221
  autoFocus: false
1123
1222
  });
1124
1223
  dialogRef.afterClosed().subscribe(async (result) => {
1125
1224
  if (result) {
1126
1225
  // Action confirmed
1127
- this.checksheetSubmissionService
1226
+ this.service
1128
1227
  .submit(this.checksheetSubmission?.id)
1129
1228
  .subscribe({
1130
1229
  next: (response) => {
@@ -1135,12 +1234,12 @@ class ChecksheetSubmissionFormComponent extends TechlifyFormComponentInterface {
1135
1234
  }
1136
1235
  });
1137
1236
  }
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"] }] });
1237
+ 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 });
1238
+ 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$3.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i7.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
1239
  }
1141
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetSubmissionFormComponent, decorators: [{
1240
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetFormComponent, decorators: [{
1142
1241
  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" }]
1242
+ 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
1243
  }], ctorParameters: () => [{ type: i1.FormValidatorService }, { type: i2.UntypedFormBuilder }, { type: ChecksheetService }, { type: i1.AlertService }, { type: i1$1.MatDialog }], propDecorators: { submittableType: [{
1145
1244
  type: Input
1146
1245
  }], submittableId: [{
@@ -1252,7 +1351,7 @@ let ChecksheetReportComponent = class ChecksheetReportComponent {
1252
1351
  return this.currentUserService.getUser().id;
1253
1352
  }
1254
1353
  createChecksheetSubmission() {
1255
- const dialogRef = this.dialog.open(ChecksheetSubmissionFormComponent, {
1354
+ const dialogRef = this.dialog.open(ChecksheetFormComponent, {
1256
1355
  width: '400px',
1257
1356
  data: {
1258
1357
  submission: {},
@@ -1358,8 +1457,8 @@ let ChecksheetReportComponent = class ChecksheetReportComponent {
1358
1457
  getErrorMessage(field) {
1359
1458
  return this.formValidator.getErrorMessage(field, this.filterFormGroup, errorMessages$2);
1360
1459
  }
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" }] });
1460
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetReportComponent, deps: [{ token: i1$2.NgxSpinnerService }, { token: i1.AlertService }, { token: i4$1.Router }, { token: i1.DataManager }, { token: i1.CurrentUserService }, { token: i1$1.MatDialog }, { token: i1.FormValidatorService }, { token: i2.UntypedFormBuilder }, { token: i4.DatePipe }], target: i0.ɵɵFactoryTarget.Component });
1461
+ 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: i7.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i7.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$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i7$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i7$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i7$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i7$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i7$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i7$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i7$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i7$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i7$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: i7$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" }] });
1363
1462
  };
1364
1463
  ChecksheetReportComponent = __decorate([
1365
1464
  UntilDestroy()
@@ -1367,7 +1466,7 @@ ChecksheetReportComponent = __decorate([
1367
1466
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetReportComponent, decorators: [{
1368
1467
  type: Component,
1369
1468
  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: [{
1469
+ }], ctorParameters: () => [{ type: i1$2.NgxSpinnerService }, { type: i1.AlertService }, { type: i4$1.Router }, { type: i1.DataManager }, { type: i1.CurrentUserService }, { type: i1$1.MatDialog }, { type: i1.FormValidatorService }, { type: i2.UntypedFormBuilder }, { type: i4.DatePipe }], propDecorators: { vehicle: [{
1371
1470
  type: Input
1372
1471
  }] } });
1373
1472
 
@@ -1394,25 +1493,25 @@ class ChecksheetFormButtonComponent {
1394
1493
  /**
1395
1494
  * Handle Checksheet save event.
1396
1495
  *
1397
- * @param checksheetSubmission
1496
+ * @param checksheet
1398
1497
  */
1399
- onSaved(checksheetSubmission) {
1400
- this.saved.emit(checksheetSubmission);
1498
+ onSaved(checksheet) {
1499
+ this.saved.emit(checksheet);
1401
1500
  this.matDialog.closeAll();
1402
1501
  this.alertService.addAlert('The Checksheet is saved successfully!', 'success');
1403
1502
  this.router.navigate([
1404
- 'fixed-assets/checksheets/checksheets',
1405
- checksheetSubmission?.id,
1503
+ '/checksheets/checksheets',
1504
+ checksheet?.id,
1406
1505
  'view'
1407
1506
  ]);
1408
1507
  }
1409
- 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"] }] });
1508
+ 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: i4$1.Router }], target: i0.ɵɵFactoryTarget.Component });
1509
+ 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
1510
  }
1412
1511
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetFormButtonComponent, decorators: [{
1413
1512
  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" }]
1415
- }], ctorParameters: () => [{ type: i1$1.MatDialog }, { type: i1.AlertService }, { type: i6$2.Router }], propDecorators: { submittableType: [{
1513
+ 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" }]
1514
+ }], ctorParameters: () => [{ type: i1$1.MatDialog }, { type: i1.AlertService }, { type: i4$1.Router }], propDecorators: { submittableType: [{
1416
1515
  type: Input
1417
1516
  }], submittableId: [{
1418
1517
  type: Input
@@ -1455,7 +1554,7 @@ class ChecksheetSubmissionDeleteButtonComponent {
1455
1554
  });
1456
1555
  }
1457
1556
  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"] }] });
1557
+ 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: i7.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
1558
  }
1460
1559
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetSubmissionDeleteButtonComponent, decorators: [{
1461
1560
  type: Component,
@@ -1510,7 +1609,7 @@ class ChecksheetReviewButtonComponent {
1510
1609
  });
1511
1610
  }
1512
1611
  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"] }] });
1612
+ 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: i7.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$4.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }] });
1514
1613
  }
1515
1614
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetReviewButtonComponent, decorators: [{
1516
1615
  type: Component,
@@ -1528,9 +1627,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
1528
1627
  let ChecksheetListComponent = class ChecksheetListComponent extends TechlifyListingControllerInterface {
1529
1628
  alertService;
1530
1629
  fb;
1531
- checksheetSubmissionService;
1630
+ service;
1532
1631
  requestHelperService;
1533
1632
  activatedRoute;
1633
+ submittableId;
1634
+ submittableType;
1534
1635
  displayedColumns = [
1535
1636
  'index',
1536
1637
  'date',
@@ -1542,16 +1643,23 @@ let ChecksheetListComponent = class ChecksheetListComponent extends TechlifyList
1542
1643
  'actions'
1543
1644
  ];
1544
1645
  with = 'format,creator,reviewer,status,submittable';
1545
- constructor(alertService, fb, checksheetSubmissionService, requestHelperService, activatedRoute) {
1646
+ constructor(alertService, fb, service, requestHelperService, activatedRoute) {
1546
1647
  super();
1547
1648
  this.alertService = alertService;
1548
1649
  this.fb = fb;
1549
- this.checksheetSubmissionService = checksheetSubmissionService;
1650
+ this.service = service;
1550
1651
  this.requestHelperService = requestHelperService;
1551
1652
  this.activatedRoute = activatedRoute;
1552
1653
  this.createForm();
1553
1654
  }
1554
1655
  ngOnInit() {
1656
+ if (this.submittableId) {
1657
+ this.filterForm.get('submittable_ids')?.setValue(this.submittableId, { emitEvent: false });
1658
+ this.displayedColumns = this.displayedColumns.filter((column) => column !== 'for');
1659
+ }
1660
+ if (this.submittableType) {
1661
+ this.filterForm.get('submittable_type')?.setValue(this.submittableType, { emitEvent: false });
1662
+ }
1555
1663
  this.updateFormWithQueryParams();
1556
1664
  this.subscribeToFormChanges();
1557
1665
  this.subscribeToRouteChanges();
@@ -1567,6 +1675,8 @@ let ChecksheetListComponent = class ChecksheetListComponent extends TechlifyList
1567
1675
  reviewer_ids: [''],
1568
1676
  format_ids: [''],
1569
1677
  sort_by: ['created_at|DESC'],
1678
+ submittable_ids: [''],
1679
+ submittable_type: [''],
1570
1680
  with: [this.with]
1571
1681
  });
1572
1682
  }
@@ -1577,7 +1687,7 @@ let ChecksheetListComponent = class ChecksheetListComponent extends TechlifyList
1577
1687
  perPage: this.perPage,
1578
1688
  page: this.page
1579
1689
  };
1580
- this.checksheetSubmissionService.index(params).subscribe({
1690
+ this.service.index(params).subscribe({
1581
1691
  next: (response) => {
1582
1692
  this.models = this.models.concat(response?.data);
1583
1693
  this.lastPage = response?.last_page;
@@ -1591,7 +1701,7 @@ let ChecksheetListComponent = class ChecksheetListComponent extends TechlifyList
1591
1701
  this.filterForm.patchValue({
1592
1702
  date_from: date_from ? moment(date_from).format('YYYY-MM-DD') : '',
1593
1703
  date_to: date_to ? moment(date_to).format('YYYY-MM-DD') : ''
1594
- });
1704
+ }, { emitEvent: false });
1595
1705
  }
1596
1706
  /**
1597
1707
  * Handle Checksheet delete event.
@@ -1601,7 +1711,9 @@ let ChecksheetListComponent = class ChecksheetListComponent extends TechlifyList
1601
1711
  this.reload();
1602
1712
  }
1603
1713
  updateFormWithQueryParams() {
1604
- this.requestHelperService.updateFormWithQueryParams(this.filterForm, {});
1714
+ this.requestHelperService.updateFormWithQueryParams(this.filterForm, {
1715
+ submittable_ids: { multiple: true }
1716
+ });
1605
1717
  }
1606
1718
  subscribeToFormChanges() {
1607
1719
  this.filterForm.valueChanges.pipe(debounceTime$1(800)).subscribe({
@@ -1625,42 +1737,96 @@ let ChecksheetListComponent = class ChecksheetListComponent extends TechlifyList
1625
1737
  direction = 'desc';
1626
1738
  this.filterForm.get('sort_by')?.setValue(active + '|' + direction);
1627
1739
  }
1628
- 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" }] });
1740
+ 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: i4$1.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
1741
+ 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: i4$1.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.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i8.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i8.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$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i7$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i7$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i7$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i7$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i7$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i7$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i7$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i7$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i7$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: i7$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" }] });
1630
1742
  };
1631
1743
  ChecksheetListComponent = __decorate([
1632
1744
  UntilDestroy()
1633
1745
  ], ChecksheetListComponent);
1634
1746
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetListComponent, decorators: [{
1635
1747
  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 }] });
1748
+ 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"] }]
1749
+ }], ctorParameters: () => [{ type: i1.AlertService }, { type: i2.UntypedFormBuilder }, { type: ChecksheetService }, { type: i1.RequestHelperService }, { type: i4$1.ActivatedRoute }], propDecorators: { submittableId: [{
1750
+ type: Input
1751
+ }], submittableType: [{
1752
+ type: Input
1753
+ }] } });
1754
+
1755
+ class ChecksheetListWidgetComponent extends TechlifyListingControllerInterface {
1756
+ service;
1757
+ submittable;
1758
+ submittableType;
1759
+ title = 'Checksheets';
1760
+ submittableTitleField = 'name';
1761
+ showChecksheetButton = false;
1762
+ constructor(service) {
1763
+ super();
1764
+ this.service = service;
1765
+ this.perPage = 5;
1766
+ }
1767
+ ngOnInit() {
1768
+ this.loadData();
1769
+ }
1770
+ loadData() {
1771
+ const params = {
1772
+ page: 1,
1773
+ perPage: this.perPage,
1774
+ submittable_type: this.submittableType,
1775
+ submittable_ids: this.submittable?.id,
1776
+ with: 'creator',
1777
+ };
1778
+ this.isWorking = true;
1779
+ this.service.index(params).subscribe({
1780
+ next: (response) => {
1781
+ this.models = this.models.concat(response?.data);
1782
+ this.isWorking = false;
1783
+ },
1784
+ error: () => { this.isWorking = false; }
1785
+ });
1786
+ }
1787
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetListWidgetComponent, deps: [{ token: ChecksheetService }], target: i0.ɵɵFactoryTarget.Component });
1788
+ 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: i4$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i8.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i8.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" }] });
1789
+ }
1790
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetListWidgetComponent, decorators: [{
1791
+ type: Component,
1792
+ 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" }]
1793
+ }], ctorParameters: () => [{ type: ChecksheetService }], propDecorators: { submittable: [{
1794
+ type: Input
1795
+ }], submittableType: [{
1796
+ type: Input
1797
+ }], title: [{
1798
+ type: Input
1799
+ }], submittableTitleField: [{
1800
+ type: Input
1801
+ }], showChecksheetButton: [{
1802
+ type: Input
1803
+ }] } });
1638
1804
 
1639
1805
  class ChecksheetNodeViewComponent {
1640
- location;
1641
1806
  route;
1642
- checksheetSubmissionService;
1807
+ service;
1643
1808
  submission;
1644
1809
  submissionId;
1645
1810
  isLoading = false;
1646
- with = 'format.questions.answers,format.questions.type,creator,reviewer,status';
1647
- constructor(location, route, checksheetSubmissionService) {
1648
- this.location = location;
1811
+ with = 'format.questions.answers,format.questions.type,creator,reviewer,status,submittable';
1812
+ constructor(route, service) {
1649
1813
  this.route = route;
1650
- this.checksheetSubmissionService = checksheetSubmissionService;
1651
- this.submissionId = parseInt(this.route.snapshot.params?.['submissionId']);
1814
+ this.service = service;
1652
1815
  }
1653
1816
  ngOnInit() {
1654
- if (this.submissionId) {
1655
- this.loadSubmission();
1656
- }
1817
+ this.route.params.subscribe((params) => {
1818
+ this.submissionId = params['submissionId'];
1819
+ if (this.submissionId) {
1820
+ this.loadSubmission();
1821
+ }
1822
+ });
1657
1823
  }
1658
1824
  loadSubmission() {
1659
1825
  const params = {
1660
1826
  with: this.with
1661
1827
  };
1662
1828
  this.isLoading = true;
1663
- this.checksheetSubmissionService.show(this.submissionId, params).subscribe({
1829
+ this.service.show(this.submissionId, params).subscribe({
1664
1830
  next: (response) => {
1665
1831
  this.submission = response?.item;
1666
1832
  this.isLoading = false;
@@ -1676,13 +1842,13 @@ class ChecksheetNodeViewComponent {
1676
1842
  onUpdated(model) {
1677
1843
  this.submission = model;
1678
1844
  }
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" }] });
1845
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetNodeViewComponent, deps: [{ token: i4$1.ActivatedRoute }, { token: ChecksheetService }], target: i0.ɵɵFactoryTarget.Component });
1846
+ 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: i8.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i8.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$5.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
1847
  }
1682
1848
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetNodeViewComponent, decorators: [{
1683
1849
  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 }] });
1850
+ 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" }]
1851
+ }], ctorParameters: () => [{ type: i4$1.ActivatedRoute }, { type: ChecksheetService }] });
1686
1852
 
1687
1853
  const errorMessages$1 = {
1688
1854
  date: {
@@ -1699,7 +1865,7 @@ const errorMessages$1 = {
1699
1865
  required: 'Status is required'
1700
1866
  }
1701
1867
  };
1702
- class ChecksheetViewComponent {
1868
+ class ChecksheetFormatViewComponent {
1703
1869
  formValidatorService;
1704
1870
  fb;
1705
1871
  spinnerService;
@@ -1804,13 +1970,13 @@ class ChecksheetViewComponent {
1804
1970
  this.alertService.addAlert('Checksheet saved successfully!', 'success');
1805
1971
  this.redirectBack();
1806
1972
  }
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"] }] });
1973
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetFormatViewComponent, deps: [{ token: i1.FormValidatorService }, { token: i2.UntypedFormBuilder }, { token: i1$2.NgxSpinnerService }, { token: i1.AlertService }, { token: i4.Location }, { token: i1.ErrorHandlerService }, { token: i1.DataManager }, { token: i1$1.MatDialog }, { token: i4$1.ActivatedRoute }, { token: ChecksheetService }], target: i0.ɵɵFactoryTarget.Component });
1974
+ 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
1975
  }
1810
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetViewComponent, decorators: [{
1976
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetFormatViewComponent, decorators: [{
1811
1977
  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 }] });
1978
+ args: [{ selector: 'app-checksheet-format-view', template: "<app-checksheet-format-form [disableInput]=\"false\"></app-checksheet-format-form>\n" }]
1979
+ }], ctorParameters: () => [{ type: i1.FormValidatorService }, { type: i2.UntypedFormBuilder }, { type: i1$2.NgxSpinnerService }, { type: i1.AlertService }, { type: i4.Location }, { type: i1.ErrorHandlerService }, { type: i1.DataManager }, { type: i1$1.MatDialog }, { type: i4$1.ActivatedRoute }, { type: ChecksheetService }] });
1814
1980
 
1815
1981
  const errorMessages = {
1816
1982
  date: {
@@ -1932,20 +2098,20 @@ class ChecksheetSubmissionViewComponent {
1932
2098
  checksheet_format_id: ['', Validators.required]
1933
2099
  });
1934
2100
  }
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"] }] });
2101
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetSubmissionViewComponent, deps: [{ token: i1.FormValidatorService }, { token: i2.UntypedFormBuilder }, { token: i1$2.NgxSpinnerService }, { token: i1.AlertService }, { token: i4.Location }, { token: i1.ErrorHandlerService }, { token: i1.DataManager }, { token: i1$1.MatDialog }, { token: i4$1.ActivatedRoute }, { token: ChecksheetService }], target: i0.ɵɵFactoryTarget.Component });
2102
+ 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: i8.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
2103
  }
1938
2104
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetSubmissionViewComponent, decorators: [{
1939
2105
  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 }] });
2106
+ 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" }]
2107
+ }], ctorParameters: () => [{ type: i1.FormValidatorService }, { type: i2.UntypedFormBuilder }, { type: i1$2.NgxSpinnerService }, { type: i1.AlertService }, { type: i4.Location }, { type: i1.ErrorHandlerService }, { type: i1.DataManager }, { type: i1$1.MatDialog }, { type: i4$1.ActivatedRoute }, { type: ChecksheetService }] });
1942
2108
 
1943
2109
  const routes = [
1944
2110
  { path: 'checksheet-format-list', component: ChecksheetFormatListComponent },
1945
2111
  { 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 },
2112
+ { path: 'checksheet-format-form', component: ChecksheetFormatFormComponent },
2113
+ { path: 'checksheet-format-view/:checksheetId', component: ChecksheetFormatViewComponent },
2114
+ { path: 'checksheet-format-form/:checksheetId', component: ChecksheetFormatFormComponent },
1949
2115
  {
1950
2116
  path: 'checksheets',
1951
2117
  component: ChecksheetListComponent
@@ -1962,7 +2128,7 @@ const routes = [
1962
2128
  ];
1963
2129
  class ChecksheetRoutingModule {
1964
2130
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1965
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetRoutingModule, imports: [i6$2.RouterModule], exports: [RouterModule] });
2131
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetRoutingModule, imports: [i4$1.RouterModule], exports: [RouterModule] });
1966
2132
  static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetRoutingModule, imports: [RouterModule.forChild(routes), RouterModule] });
1967
2133
  }
1968
2134
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetRoutingModule, decorators: [{
@@ -2024,8 +2190,8 @@ class MechanicalIssueFormComponent {
2024
2190
  }
2025
2191
  }
2026
2192
  }
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"] }] });
2193
+ 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: i1$2.NgxSpinnerService }], target: i0.ɵɵFactoryTarget.Component });
2194
+ 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: i7.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
2195
  }
2030
2196
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MechanicalIssueFormComponent, decorators: [{
2031
2197
  type: Component,
@@ -2033,7 +2199,89 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
2033
2199
  }], ctorParameters: () => [{ type: i1$1.MatDialogRef }, { type: undefined, decorators: [{
2034
2200
  type: Inject,
2035
2201
  args: [MAT_DIALOG_DATA]
2036
- }] }, { type: ChecksheetService }, { type: i1.ErrorHandlerService }, { type: i3$1.NgxSpinnerService }] });
2202
+ }] }, { type: ChecksheetService }, { type: i1.ErrorHandlerService }, { type: i1$2.NgxSpinnerService }] });
2203
+
2204
+ class FileUploadButtonComponent {
2205
+ entityFileService;
2206
+ config;
2207
+ uploaded = new EventEmitter();
2208
+ DEFAULT_FILE_ID = 'file-upload-button';
2209
+ isUploading;
2210
+ constructor(entityFileService) {
2211
+ this.entityFileService = entityFileService;
2212
+ }
2213
+ async onFileChange(event) {
2214
+ if (event.target.files && event.target.files.length) {
2215
+ const fileArray = Array.from(event.target.files);
2216
+ const fileInput = document.getElementById(this.config?.fileId ?? this.DEFAULT_FILE_ID);
2217
+ fileInput.value = '';
2218
+ this.isUploading = true;
2219
+ const results = await this.uploadFiles(fileArray);
2220
+ this.uploaded.emit(results);
2221
+ this.isUploading = false;
2222
+ }
2223
+ }
2224
+ selectFiles(event) {
2225
+ event.preventDefault();
2226
+ document
2227
+ .getElementById(this.config?.fileId ?? this.DEFAULT_FILE_ID)
2228
+ ?.click();
2229
+ }
2230
+ async uploadFiles(files) {
2231
+ const uploadPromises = files.map((file) => this.entityFileService.uploadEntityFile(file));
2232
+ return await Promise.all(uploadPromises);
2233
+ }
2234
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FileUploadButtonComponent, deps: [{ token: i1.EntityFileService }], target: i0.ɵɵFactoryTarget.Component });
2235
+ 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: i7.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"] }] });
2236
+ }
2237
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FileUploadButtonComponent, decorators: [{
2238
+ type: Component,
2239
+ 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" }]
2240
+ }], ctorParameters: () => [{ type: i1.EntityFileService }], propDecorators: { config: [{
2241
+ type: Input
2242
+ }], uploaded: [{
2243
+ type: Output
2244
+ }] } });
2245
+
2246
+ class ChecksheetSubmissionFileUploadComponent {
2247
+ checksheetSubmissionFileService;
2248
+ submissionId;
2249
+ questionId;
2250
+ uploaded = new EventEmitter();
2251
+ constructor(checksheetSubmissionFileService) {
2252
+ this.checksheetSubmissionFileService = checksheetSubmissionFileService;
2253
+ }
2254
+ onUploadComplete(uploadedFiles) {
2255
+ const uploadObservables = uploadedFiles.map((file) => {
2256
+ const data = {
2257
+ file_name: file.item.file_name,
2258
+ file_url: file.item.url,
2259
+ submission_id: this.submissionId,
2260
+ question_id: this.questionId
2261
+ };
2262
+ return this.checksheetSubmissionFileService
2263
+ .store(data)
2264
+ .pipe(map((response) => response?.item));
2265
+ });
2266
+ forkJoin(uploadObservables).subscribe({
2267
+ next: (checksheetSubmissionFiles) => {
2268
+ this.uploaded.emit(checksheetSubmissionFiles);
2269
+ }
2270
+ });
2271
+ }
2272
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetSubmissionFileUploadComponent, deps: [{ token: ChecksheetSubmissionFileService }], target: i0.ɵɵFactoryTarget.Component });
2273
+ 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"] }] });
2274
+ }
2275
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetSubmissionFileUploadComponent, decorators: [{
2276
+ type: Component,
2277
+ 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" }]
2278
+ }], ctorParameters: () => [{ type: ChecksheetSubmissionFileService }], propDecorators: { submissionId: [{
2279
+ type: Input
2280
+ }], questionId: [{
2281
+ type: Input
2282
+ }], uploaded: [{
2283
+ type: Output
2284
+ }] } });
2037
2285
 
2038
2286
  /*
2039
2287
  * This module imports and re-exports all Angular Material modules for convenience,
@@ -2214,55 +2462,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
2214
2462
  }]
2215
2463
  }] });
2216
2464
 
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
2465
  class ChecksheetSubmissionService extends TechlifyServiceBaseClass {
2267
2466
  constructor(httpService) {
2268
2467
  super(httpService, 'checksheet-submissions');
@@ -2339,7 +2538,7 @@ class ChecksheetSubmissionReviewButtonComponent {
2339
2538
  });
2340
2539
  }
2341
2540
  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"] }] });
2541
+ 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: i7.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$4.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }] });
2343
2542
  }
2344
2543
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetSubmissionReviewButtonComponent, decorators: [{
2345
2544
  type: Component,
@@ -2427,26 +2626,26 @@ let ChecksheetSubmissionListComponent = class ChecksheetSubmissionListComponent
2427
2626
  this.reload();
2428
2627
  }
2429
2628
  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" }] });
2629
+ 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: i4$1.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.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i8.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$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i7$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i7$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i7$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i7$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i7$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i7$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i7$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i7$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i7$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: i7$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: ChecksheetSubmissionReviewButtonComponent, selector: "app-checksheet-submission-review-button", inputs: ["submission", "viewType", "requestParams"], outputs: ["reviewed"] }, { kind: "pipe", type: i4.DatePipe, name: "date" }] });
2431
2630
  };
2432
2631
  ChecksheetSubmissionListComponent = __decorate([
2433
2632
  UntilDestroy()
2434
2633
  ], ChecksheetSubmissionListComponent);
2435
2634
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetSubmissionListComponent, decorators: [{
2436
2635
  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"] }]
2636
+ 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
2637
  }], ctorParameters: () => [{ type: i1.AlertService }, { type: i2.UntypedFormBuilder }, { type: ChecksheetSubmissionService }, { type: i1.RequestHelperService }] });
2439
2638
 
2440
2639
  class ChecksheetModule {
2441
2640
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2442
2641
  static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetModule, declarations: [ChecksheetFormatListComponent,
2443
- ChecksheetFormComponent,
2642
+ ChecksheetFormatFormComponent,
2444
2643
  ChecksheetQuestionFormComponent,
2445
2644
  ChecksheetQuestionComponent,
2446
2645
  ChecksheetQuestionListComponent,
2447
2646
  ChecksheetListComponent,
2448
- ChecksheetSubmissionFormComponent,
2449
- ChecksheetViewComponent,
2647
+ ChecksheetFormComponent,
2648
+ ChecksheetFormatViewComponent,
2450
2649
  ChecksheetNodeViewComponent,
2451
2650
  MechanicalIssueFormComponent,
2452
2651
  ChecksheetReportComponent,
@@ -2454,9 +2653,9 @@ class ChecksheetModule {
2454
2653
  ChecksheetSubmissionDeleteButtonComponent,
2455
2654
  ChecksheetReviewButtonComponent,
2456
2655
  ChecksheetSubmissionViewComponent,
2457
- ChecksheetSubmissionFormButtonComponent,
2458
2656
  ChecksheetSubmissionListComponent,
2459
- ChecksheetSubmissionReviewButtonComponent], imports: [CommonModule,
2657
+ ChecksheetSubmissionReviewButtonComponent,
2658
+ ChecksheetListWidgetComponent], imports: [CommonModule,
2460
2659
  ChecksheetRoutingModule,
2461
2660
  SharedModule,
2462
2661
  InfiniteScrollModule,
@@ -2471,8 +2670,14 @@ class ChecksheetModule {
2471
2670
  TimelineFilterModule,
2472
2671
  ChecksheetSubmissionFileUploadComponent,
2473
2672
  ChecksheetSubmissionFilesComponent,
2474
- SharedModule], exports: [ChecksheetListComponent,
2475
- ChecksheetFormButtonComponent] });
2673
+ SharedModule,
2674
+ AvatarComponent,
2675
+ ChecksheetFormatCopyButtonComponent,
2676
+ ChecksheetFormatDeleteButtonComponent,
2677
+ ChecksheetFormatUnpublishButtonComponent,
2678
+ ChecksheetFormatPublishButtonComponent], exports: [ChecksheetListComponent,
2679
+ ChecksheetFormButtonComponent,
2680
+ ChecksheetListWidgetComponent] });
2476
2681
  static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetModule, imports: [CommonModule,
2477
2682
  ChecksheetRoutingModule,
2478
2683
  SharedModule,
@@ -2488,20 +2693,25 @@ class ChecksheetModule {
2488
2693
  TimelineFilterModule,
2489
2694
  ChecksheetSubmissionFileUploadComponent,
2490
2695
  ChecksheetSubmissionFilesComponent,
2491
- SharedModule] });
2696
+ SharedModule,
2697
+ AvatarComponent,
2698
+ ChecksheetFormatCopyButtonComponent,
2699
+ ChecksheetFormatDeleteButtonComponent,
2700
+ ChecksheetFormatUnpublishButtonComponent,
2701
+ ChecksheetFormatPublishButtonComponent] });
2492
2702
  }
2493
2703
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetModule, decorators: [{
2494
2704
  type: NgModule,
2495
2705
  args: [{
2496
2706
  declarations: [
2497
2707
  ChecksheetFormatListComponent,
2498
- ChecksheetFormComponent,
2708
+ ChecksheetFormatFormComponent,
2499
2709
  ChecksheetQuestionFormComponent,
2500
2710
  ChecksheetQuestionComponent,
2501
2711
  ChecksheetQuestionListComponent,
2502
2712
  ChecksheetListComponent,
2503
- ChecksheetSubmissionFormComponent,
2504
- ChecksheetViewComponent,
2713
+ ChecksheetFormComponent,
2714
+ ChecksheetFormatViewComponent,
2505
2715
  ChecksheetNodeViewComponent,
2506
2716
  MechanicalIssueFormComponent,
2507
2717
  ChecksheetReportComponent,
@@ -2509,9 +2719,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
2509
2719
  ChecksheetSubmissionDeleteButtonComponent,
2510
2720
  ChecksheetReviewButtonComponent,
2511
2721
  ChecksheetSubmissionViewComponent,
2512
- ChecksheetSubmissionFormButtonComponent,
2513
2722
  ChecksheetSubmissionListComponent,
2514
- ChecksheetSubmissionReviewButtonComponent
2723
+ ChecksheetSubmissionReviewButtonComponent,
2724
+ ChecksheetListWidgetComponent
2515
2725
  ],
2516
2726
  imports: [
2517
2727
  CommonModule,
@@ -2529,11 +2739,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
2529
2739
  TimelineFilterModule,
2530
2740
  ChecksheetSubmissionFileUploadComponent,
2531
2741
  ChecksheetSubmissionFilesComponent,
2532
- SharedModule
2742
+ SharedModule,
2743
+ AvatarComponent,
2744
+ ChecksheetFormatCopyButtonComponent,
2745
+ ChecksheetFormatDeleteButtonComponent,
2746
+ ChecksheetFormatUnpublishButtonComponent,
2747
+ ChecksheetFormatPublishButtonComponent
2533
2748
  ],
2534
2749
  exports: [
2535
2750
  ChecksheetListComponent,
2536
- ChecksheetFormButtonComponent
2751
+ ChecksheetFormButtonComponent,
2752
+ ChecksheetListWidgetComponent
2537
2753
  ]
2538
2754
  }]
2539
2755
  }] });
@@ -2546,5 +2762,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
2546
2762
  * Generated bundle index. Do not edit.
2547
2763
  */
2548
2764
 
2549
- export { ChecksheetFormButtonComponent, ChecksheetListComponent, ChecksheetModule, ChecksheetSubmissionFormButtonComponent, ChecksheetSubmissionListComponent };
2765
+ export { ChecksheetFormButtonComponent, ChecksheetListComponent, ChecksheetListWidgetComponent, ChecksheetModule, ChecksheetSubmissionListComponent };
2550
2766
  //# sourceMappingURL=ngx-techlify-checksheet.mjs.map