ngx-techlify-checksheet 18.2.0 → 18.3.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.
- package/esm2022/lib/checksheet/checksheet-format-form/checksheet-format-form.component.mjs +3 -3
- package/esm2022/lib/checksheet/checksheet-list/checksheet-list.component.mjs +16 -6
- package/fesm2022/ngx-techlify-checksheet.mjs +17 -7
- package/fesm2022/ngx-techlify-checksheet.mjs.map +1 -1
- package/lib/checksheet/checksheet-list/checksheet-list.component.d.ts +6 -3
- package/package.json +1 -1
|
@@ -1038,11 +1038,11 @@ class ChecksheetFormatFormComponent {
|
|
|
1038
1038
|
}
|
|
1039
1039
|
}
|
|
1040
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)=\"
|
|
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)=\"location.back()\">\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" }] });
|
|
1042
1042
|
}
|
|
1043
1043
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetFormatFormComponent, decorators: [{
|
|
1044
1044
|
type: Component,
|
|
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)=\"
|
|
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)=\"location.back()\">\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
1046
|
}], ctorParameters: () => [{ type: i1.FormValidatorService }, { type: i2.UntypedFormBuilder }, { type: i1.AlertService }, { type: i4.Location }, { type: i4$1.ActivatedRoute }, { type: ChecksheetFormatService }], propDecorators: { disableInput: [{
|
|
1047
1047
|
type: Input
|
|
1048
1048
|
}] } });
|
|
@@ -1630,8 +1630,11 @@ let ChecksheetListComponent = class ChecksheetListComponent extends TechlifyList
|
|
|
1630
1630
|
service;
|
|
1631
1631
|
requestHelperService;
|
|
1632
1632
|
activatedRoute;
|
|
1633
|
+
router;
|
|
1633
1634
|
submittableId;
|
|
1634
1635
|
submittableType;
|
|
1636
|
+
// e.g., /inventory, /projects
|
|
1637
|
+
basePath = ['/'];
|
|
1635
1638
|
displayedColumns = [
|
|
1636
1639
|
'index',
|
|
1637
1640
|
'date',
|
|
@@ -1643,13 +1646,14 @@ let ChecksheetListComponent = class ChecksheetListComponent extends TechlifyList
|
|
|
1643
1646
|
'actions'
|
|
1644
1647
|
];
|
|
1645
1648
|
with = 'format,creator,reviewer,status,submittable';
|
|
1646
|
-
constructor(alertService, fb, service, requestHelperService, activatedRoute) {
|
|
1649
|
+
constructor(alertService, fb, service, requestHelperService, activatedRoute, router) {
|
|
1647
1650
|
super();
|
|
1648
1651
|
this.alertService = alertService;
|
|
1649
1652
|
this.fb = fb;
|
|
1650
1653
|
this.service = service;
|
|
1651
1654
|
this.requestHelperService = requestHelperService;
|
|
1652
1655
|
this.activatedRoute = activatedRoute;
|
|
1656
|
+
this.router = router;
|
|
1653
1657
|
this.createForm();
|
|
1654
1658
|
}
|
|
1655
1659
|
ngOnInit() {
|
|
@@ -1737,19 +1741,25 @@ let ChecksheetListComponent = class ChecksheetListComponent extends TechlifyList
|
|
|
1737
1741
|
direction = 'desc';
|
|
1738
1742
|
this.filterForm.get('sort_by')?.setValue(active + '|' + direction);
|
|
1739
1743
|
}
|
|
1740
|
-
|
|
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" }] });
|
|
1744
|
+
navigateTo(pathSegments) {
|
|
1745
|
+
const fullPath = [...this.basePath, ...pathSegments];
|
|
1746
|
+
return this.router.navigate(fullPath);
|
|
1747
|
+
}
|
|
1748
|
+
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 }, { token: i4$1.Router }], target: i0.ɵɵFactoryTarget.Component });
|
|
1749
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ChecksheetListComponent, selector: "app-checksheet-list", inputs: { submittableId: "submittableId", submittableType: "submittableType", basePath: "basePath" }, 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 (click)=\"navigateTo(['checksheets', 'checksheet-format-list'])\" 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 (click)=\"navigateTo(['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 (click)=\"navigateTo(['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" }] });
|
|
1742
1750
|
};
|
|
1743
1751
|
ChecksheetListComponent = __decorate([
|
|
1744
1752
|
UntilDestroy()
|
|
1745
1753
|
], ChecksheetListComponent);
|
|
1746
1754
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChecksheetListComponent, decorators: [{
|
|
1747
1755
|
type: Component,
|
|
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
|
|
1749
|
-
}], ctorParameters: () => [{ type: i1.AlertService }, { type: i2.UntypedFormBuilder }, { type: ChecksheetService }, { type: i1.RequestHelperService }, { type: i4$1.ActivatedRoute }], propDecorators: { submittableId: [{
|
|
1756
|
+
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 (click)=\"navigateTo(['checksheets', 'checksheet-format-list'])\" 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 (click)=\"navigateTo(['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 (click)=\"navigateTo(['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"] }]
|
|
1757
|
+
}], ctorParameters: () => [{ type: i1.AlertService }, { type: i2.UntypedFormBuilder }, { type: ChecksheetService }, { type: i1.RequestHelperService }, { type: i4$1.ActivatedRoute }, { type: i4$1.Router }], propDecorators: { submittableId: [{
|
|
1750
1758
|
type: Input
|
|
1751
1759
|
}], submittableType: [{
|
|
1752
1760
|
type: Input
|
|
1761
|
+
}], basePath: [{
|
|
1762
|
+
type: Input
|
|
1753
1763
|
}] } });
|
|
1754
1764
|
|
|
1755
1765
|
class ChecksheetListWidgetComponent extends TechlifyListingControllerInterface {
|