ngx-techlify-core 18.35.0 → 18.37.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/column-selector/column-selector/column-selector.component.mjs +16 -10
- package/esm2022/lib/role/permission/permissions-management.component.mjs +3 -3
- package/esm2022/lib/role/role-form.component.mjs +3 -4
- package/esm2022/lib/role/role-view/role-view.component.mjs +3 -3
- package/esm2022/lib/role/role.model.mjs +2 -2
- package/esm2022/lib/role/roles-view-all.component.mjs +3 -4
- package/esm2022/lib/subscription/subscription-listing/subscription-listing.component.mjs +7 -4
- package/fesm2022/ngx-techlify-core.mjs +30 -23
- package/fesm2022/ngx-techlify-core.mjs.map +1 -1
- package/lib/role/role.model.d.ts +1 -1
- package/lib/subscription/subscription-listing/subscription-listing.component.d.ts +3 -1
- package/package.json +1 -1
|
@@ -10365,7 +10365,6 @@ class RoleFormComponent {
|
|
|
10365
10365
|
label: new UntypedFormControl('', Validators.compose([Validators.required])),
|
|
10366
10366
|
description: new UntypedFormControl(''),
|
|
10367
10367
|
is_editable: [true],
|
|
10368
|
-
is_global: [false],
|
|
10369
10368
|
client_id: [this.data.client_id ? this.data.client_id : 1]
|
|
10370
10369
|
});
|
|
10371
10370
|
if (this.data.role) {
|
|
@@ -10402,11 +10401,11 @@ class RoleFormComponent {
|
|
|
10402
10401
|
return this.formValidatorService.getErrorMessage(field, this.roleForm, errorMessages$2);
|
|
10403
10402
|
}
|
|
10404
10403
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RoleFormComponent, deps: [{ token: AlertService }, { token: CredentialsService }, { token: i1$5.UntypedFormBuilder }, { token: FormValidatorService }, { token: UserConfigService }, { token: i1.MatDialogRef }, { token: MAT_DIALOG_DATA }, { token: RoleService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10405
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: RoleFormComponent, selector: "role-form", ngImport: i0, template: "<form [formGroup]=\"roleForm\" (ngSubmit)=\"save()\" class=\"p-3\">\n <div fxLayout=\"column\">\n <div mat-dialog-title class=\"text-center\">\n <div>Role Form</div>\n </div>\n <mat-form-field fxFlex=\"100%\">\n <input matInput formControlName=\"label\" placeholder=\"Role\" type=\"text\" autocomplete=\"off\" required />\n <mat-error *ngIf=\"isFieldValid('label')\">{{getErrorMessage('label')}}</mat-error>\n </mat-form-field>\n <mat-form-field fxFlex=\"100%\">\n <textarea matInput placeholder=\"Description\" formControlName=\"description\"></textarea>\n </mat-form-field>\n\n <ng-container *ngIf=\"isAdminUser\">\n <mat-checkbox formControlName=\"is_editable\"> Is Editable</mat-checkbox>\n
|
|
10404
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: RoleFormComponent, selector: "role-form", ngImport: i0, template: "<form [formGroup]=\"roleForm\" (ngSubmit)=\"save()\" class=\"p-3\">\n <div fxLayout=\"column\">\n <div mat-dialog-title class=\"text-center\">\n <div>Role Form</div>\n </div>\n <mat-form-field fxFlex=\"100%\">\n <input matInput formControlName=\"label\" placeholder=\"Role\" type=\"text\" autocomplete=\"off\" required />\n <mat-error *ngIf=\"isFieldValid('label')\">{{getErrorMessage('label')}}</mat-error>\n </mat-form-field>\n <mat-form-field fxFlex=\"100%\">\n <textarea matInput placeholder=\"Description\" formControlName=\"description\"></textarea>\n </mat-form-field>\n\n <ng-container *ngIf=\"isAdminUser\">\n <mat-checkbox formControlName=\"is_editable\"> Is Editable</mat-checkbox>\n </ng-container>\n\n <div fxFlex=\"100%\" fxLayout fxLayoutAlign=\"end\" fxLayoutGap=\"1rem\">\n <button mat-button class=\"mt-2\" type=\"button\" (click)=\"dialogRef.close()\">\n Cancel\n </button>\n <button mat-raised-button color=\"primary\" class=\"mt-2\" type=\"submit\">\n Save\n </button>\n </div>\n </div>\n</form>", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i8.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: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "component", type: i7$2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i7$2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i9$1.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: i7.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: i7.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: i7.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: i7.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: "directive", type: i1$5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$5.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: i1$5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$5.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$5.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$5.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] }); }
|
|
10406
10405
|
}
|
|
10407
10406
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RoleFormComponent, decorators: [{
|
|
10408
10407
|
type: Component,
|
|
10409
|
-
args: [{ selector: 'role-form', template: "<form [formGroup]=\"roleForm\" (ngSubmit)=\"save()\" class=\"p-3\">\n <div fxLayout=\"column\">\n <div mat-dialog-title class=\"text-center\">\n <div>Role Form</div>\n </div>\n <mat-form-field fxFlex=\"100%\">\n <input matInput formControlName=\"label\" placeholder=\"Role\" type=\"text\" autocomplete=\"off\" required />\n <mat-error *ngIf=\"isFieldValid('label')\">{{getErrorMessage('label')}}</mat-error>\n </mat-form-field>\n <mat-form-field fxFlex=\"100%\">\n <textarea matInput placeholder=\"Description\" formControlName=\"description\"></textarea>\n </mat-form-field>\n\n <ng-container *ngIf=\"isAdminUser\">\n <mat-checkbox formControlName=\"is_editable\"> Is Editable</mat-checkbox>\n
|
|
10408
|
+
args: [{ selector: 'role-form', template: "<form [formGroup]=\"roleForm\" (ngSubmit)=\"save()\" class=\"p-3\">\n <div fxLayout=\"column\">\n <div mat-dialog-title class=\"text-center\">\n <div>Role Form</div>\n </div>\n <mat-form-field fxFlex=\"100%\">\n <input matInput formControlName=\"label\" placeholder=\"Role\" type=\"text\" autocomplete=\"off\" required />\n <mat-error *ngIf=\"isFieldValid('label')\">{{getErrorMessage('label')}}</mat-error>\n </mat-form-field>\n <mat-form-field fxFlex=\"100%\">\n <textarea matInput placeholder=\"Description\" formControlName=\"description\"></textarea>\n </mat-form-field>\n\n <ng-container *ngIf=\"isAdminUser\">\n <mat-checkbox formControlName=\"is_editable\"> Is Editable</mat-checkbox>\n </ng-container>\n\n <div fxFlex=\"100%\" fxLayout fxLayoutAlign=\"end\" fxLayoutGap=\"1rem\">\n <button mat-button class=\"mt-2\" type=\"button\" (click)=\"dialogRef.close()\">\n Cancel\n </button>\n <button mat-raised-button color=\"primary\" class=\"mt-2\" type=\"submit\">\n Save\n </button>\n </div>\n </div>\n</form>" }]
|
|
10410
10409
|
}], ctorParameters: () => [{ type: AlertService }, { type: CredentialsService }, { type: i1$5.UntypedFormBuilder }, { type: FormValidatorService }, { type: UserConfigService }, { type: i1.MatDialogRef }, { type: undefined, decorators: [{
|
|
10411
10410
|
type: Inject,
|
|
10412
10411
|
args: [MAT_DIALOG_DATA]
|
|
@@ -10427,8 +10426,8 @@ class Role {
|
|
|
10427
10426
|
this.id = data.id;
|
|
10428
10427
|
this.slug = data.slug;
|
|
10429
10428
|
this.label = data.label;
|
|
10430
|
-
this.is_global = data.is_global;
|
|
10431
10429
|
this.is_editable = data.is_editable;
|
|
10430
|
+
this.client_id = data.client_id;
|
|
10432
10431
|
if (data.permissions != undefined) {
|
|
10433
10432
|
this.permissions = data.permissions;
|
|
10434
10433
|
}
|
|
@@ -10549,7 +10548,6 @@ class RolesViewAllComponent {
|
|
|
10549
10548
|
'description',
|
|
10550
10549
|
'module',
|
|
10551
10550
|
'editable',
|
|
10552
|
-
'is_global',
|
|
10553
10551
|
'users',
|
|
10554
10552
|
'actions',
|
|
10555
10553
|
'permissions'
|
|
@@ -10605,11 +10603,11 @@ class RolesViewAllComponent {
|
|
|
10605
10603
|
});
|
|
10606
10604
|
}
|
|
10607
10605
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RolesViewAllComponent, deps: [{ token: HttpService }, { token: i1$1.ActivatedRoute }, { token: CredentialsService }, { token: UserConfigService }, { token: i1.MatDialog }, { token: CurrentUserService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10608
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: RolesViewAllComponent, selector: "roles-view-all", inputs: { clientId: "clientId" }, ngImport: i0, template: "<div fxLayout=\"column\" class=\"m-2\">\n <mat-card appearance=\"outlined\">\n <mat-card-content class=\"d-flex justify-content-start align-items-center gap-2\">\n <h3 class=\"m-0\">\n Manage Roles\n </h3>\n <app-role-form-button (success)=\"reload()\" class=\"mt-2\"\n
|
|
10606
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: RolesViewAllComponent, selector: "roles-view-all", inputs: { clientId: "clientId" }, ngImport: i0, template: "<div fxLayout=\"column\" class=\"m-2\">\n <mat-card appearance=\"outlined\">\n <mat-card-content class=\"d-flex justify-content-start align-items-center gap-2\">\n <h3 class=\"m-0\">\n Manage Roles\n </h3>\n <app-role-form-button (success)=\"reload()\" class=\"mt-2\"\n *ngIf=\"(!config.roleConfig.disableAddRole) && currentUserService?.hasPermission('role_create')\"\n [clientId]=\"clientId\"></app-role-form-button>\n <button mat-raised-button type=\"button\" [routerLink]=\"['../users']\" *ngIf=\"!config.roleConfig.disableUsers\"\n class=\"ml-1\">\n <mat-icon>people</mat-icon>\n Users\n </button>\n <button mat-raised-button type=\"button\" [routerLink]=\"['../role-permissions']\"\n *ngIf=\"!config.roleConfig.disablePermissions\" class=\"ml-1\">\n <mat-icon>lock</mat-icon>\n Role Permissions\n </button>\n </mat-card-content>\n </mat-card>\n\n <mat-card appearance=\"outlined\" class=\"mt-2 p-0\">\n <mat-card-content>\n <table mat-table [dataSource]=\"roles\" class=\"w-100\" infiniteScroll [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" aria-describedby=\"Roles\">\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\"> {{ i+1 }} </td>\n </ng-container>\n\n <!-- Label Column -->\n <ng-container matColumnDef=\"label\">\n <th mat-header-cell *matHeaderCellDef> Label </th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{element?.label}}</p>\n <span class=\"badge\"\n [ngClass]=\"{'badge-primary':element?.client_id == null, 'badge-secondary': element?.client_id != null}\">\n {{(element?.client_id == null) ? 'App role' : 'Custom role'}}\n </span>\n </td>\n </ng-container>\n\n <!-- Description Column -->\n <ng-container matColumnDef=\"description\">\n <th mat-header-cell *matHeaderCellDef> Description </th>\n <td mat-cell *matCellDef=\"let element\"> {{element?.description }} </td>\n </ng-container>\n\n <!-- Module Column -->\n <ng-container matColumnDef=\"module\">\n <th mat-header-cell *matHeaderCellDef> Module </th>\n <td mat-cell *matCellDef=\"let element\"> {{element?.module?.name}} </td>\n </ng-container>\n\n <!-- Editable Column -->\n <ng-container matColumnDef=\"editable\">\n <th mat-header-cell *matHeaderCellDef> Editable </th>\n <td mat-cell *matCellDef=\"let element\">\n <span *ngIf=\"element?.is_editable\" class=\"btn btn-success btn-xs\">Yes</span>\n <span *ngIf=\"!element?.is_editable\" class=\"btn btn-danger btn-xs\">No</span>\n </td>\n </ng-container>\n\n <!-- Users Column -->\n <ng-container matColumnDef=\"users\">\n <th mat-header-cell *matHeaderCellDef> # Users </th>\n <td mat-cell *matCellDef=\"let element\"> {{element?.role_users_count}} </td>\n </ng-container>\n\n <!-- Permissions Column -->\n <ng-container matColumnDef=\"permissions\">\n <th mat-header-cell *matHeaderCellDef> Permissions </th>\n <td mat-cell *matCellDef=\"let element\"> {{element?.permissions_count}} </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 role\" class=\"text-muted\">\n <button mat-icon-button type=\"button\" [routerLink]=\"['../roles/', role?.id]\">\n <mat-icon>remove_red_eye</mat-icon>\n </button>\n <app-role-form-button (success)=\"reload()\" [role]=\"role\" [isUpdate]=\"true\"\n *ngIf=\"(isAdminUser || role.is_editable) && currentUserService.hasPermission('role_update')\"\n [clientId]=\"clientId\"></app-role-form-button>\n\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 *ngIf=\"isWorking\" mode=\"indeterminate\"></mat-progress-bar>\n </mat-card-content>\n </mat-card>\n\n</div>", dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i6.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i6.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i8$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i9.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i9.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i9.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i9.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i9.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i9.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i9.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i9.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i9.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i9.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i5.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: i7.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: i2.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { kind: "directive", type: i6$1.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "component", type: RoleFormButtonComponent, selector: "app-role-form-button", inputs: ["config", "clientId", "isUpdate", "role"], outputs: ["success"] }] }); }
|
|
10609
10607
|
}
|
|
10610
10608
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RolesViewAllComponent, decorators: [{
|
|
10611
10609
|
type: Component,
|
|
10612
|
-
args: [{ selector: 'roles-view-all', template: "<div fxLayout=\"column\" class=\"m-2\">\n <mat-card appearance=\"outlined\">\n <mat-card-content class=\"d-flex justify-content-start align-items-center gap-2\">\n <h3 class=\"m-0\">\n Manage Roles\n </h3>\n <app-role-form-button (success)=\"reload()\" class=\"mt-2\"\n
|
|
10610
|
+
args: [{ selector: 'roles-view-all', template: "<div fxLayout=\"column\" class=\"m-2\">\n <mat-card appearance=\"outlined\">\n <mat-card-content class=\"d-flex justify-content-start align-items-center gap-2\">\n <h3 class=\"m-0\">\n Manage Roles\n </h3>\n <app-role-form-button (success)=\"reload()\" class=\"mt-2\"\n *ngIf=\"(!config.roleConfig.disableAddRole) && currentUserService?.hasPermission('role_create')\"\n [clientId]=\"clientId\"></app-role-form-button>\n <button mat-raised-button type=\"button\" [routerLink]=\"['../users']\" *ngIf=\"!config.roleConfig.disableUsers\"\n class=\"ml-1\">\n <mat-icon>people</mat-icon>\n Users\n </button>\n <button mat-raised-button type=\"button\" [routerLink]=\"['../role-permissions']\"\n *ngIf=\"!config.roleConfig.disablePermissions\" class=\"ml-1\">\n <mat-icon>lock</mat-icon>\n Role Permissions\n </button>\n </mat-card-content>\n </mat-card>\n\n <mat-card appearance=\"outlined\" class=\"mt-2 p-0\">\n <mat-card-content>\n <table mat-table [dataSource]=\"roles\" class=\"w-100\" infiniteScroll [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" aria-describedby=\"Roles\">\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\"> {{ i+1 }} </td>\n </ng-container>\n\n <!-- Label Column -->\n <ng-container matColumnDef=\"label\">\n <th mat-header-cell *matHeaderCellDef> Label </th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-0\">{{element?.label}}</p>\n <span class=\"badge\"\n [ngClass]=\"{'badge-primary':element?.client_id == null, 'badge-secondary': element?.client_id != null}\">\n {{(element?.client_id == null) ? 'App role' : 'Custom role'}}\n </span>\n </td>\n </ng-container>\n\n <!-- Description Column -->\n <ng-container matColumnDef=\"description\">\n <th mat-header-cell *matHeaderCellDef> Description </th>\n <td mat-cell *matCellDef=\"let element\"> {{element?.description }} </td>\n </ng-container>\n\n <!-- Module Column -->\n <ng-container matColumnDef=\"module\">\n <th mat-header-cell *matHeaderCellDef> Module </th>\n <td mat-cell *matCellDef=\"let element\"> {{element?.module?.name}} </td>\n </ng-container>\n\n <!-- Editable Column -->\n <ng-container matColumnDef=\"editable\">\n <th mat-header-cell *matHeaderCellDef> Editable </th>\n <td mat-cell *matCellDef=\"let element\">\n <span *ngIf=\"element?.is_editable\" class=\"btn btn-success btn-xs\">Yes</span>\n <span *ngIf=\"!element?.is_editable\" class=\"btn btn-danger btn-xs\">No</span>\n </td>\n </ng-container>\n\n <!-- Users Column -->\n <ng-container matColumnDef=\"users\">\n <th mat-header-cell *matHeaderCellDef> # Users </th>\n <td mat-cell *matCellDef=\"let element\"> {{element?.role_users_count}} </td>\n </ng-container>\n\n <!-- Permissions Column -->\n <ng-container matColumnDef=\"permissions\">\n <th mat-header-cell *matHeaderCellDef> Permissions </th>\n <td mat-cell *matCellDef=\"let element\"> {{element?.permissions_count}} </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 role\" class=\"text-muted\">\n <button mat-icon-button type=\"button\" [routerLink]=\"['../roles/', role?.id]\">\n <mat-icon>remove_red_eye</mat-icon>\n </button>\n <app-role-form-button (success)=\"reload()\" [role]=\"role\" [isUpdate]=\"true\"\n *ngIf=\"(isAdminUser || role.is_editable) && currentUserService.hasPermission('role_update')\"\n [clientId]=\"clientId\"></app-role-form-button>\n\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 *ngIf=\"isWorking\" mode=\"indeterminate\"></mat-progress-bar>\n </mat-card-content>\n </mat-card>\n\n</div>" }]
|
|
10613
10611
|
}], ctorParameters: () => [{ type: HttpService }, { type: i1$1.ActivatedRoute }, { type: CredentialsService }, { type: UserConfigService }, { type: i1.MatDialog }, { type: CurrentUserService }], propDecorators: { clientId: [{
|
|
10614
10612
|
type: Input
|
|
10615
10613
|
}] } });
|
|
@@ -10713,11 +10711,11 @@ class PermissionsManagementComponent {
|
|
|
10713
10711
|
}
|
|
10714
10712
|
}
|
|
10715
10713
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: PermissionsManagementComponent, deps: [{ token: HttpService }, { token: AlertService }, { token: i1$1.ActivatedRoute }, { token: CredentialsService }, { token: ErrorHandlerService }, { token: UserConfigService }, { token: i1$5.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10716
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: PermissionsManagementComponent, selector: "role-permissions-management", inputs: { clientId: "clientId" }, ngImport: i0, template: "<div class=\"d-flex flex-column justify-content-start gap-3\">\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 <h3 class=\"m-0 fw-bold\">\n Manage Role Permissions\n </h3>\n <button *ngIf=\"!config.permissionConfig.disableUsers\" [routerLink]=\"['../users']\" class=\"ml-1\"\n
|
|
10714
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: PermissionsManagementComponent, selector: "role-permissions-management", inputs: { clientId: "clientId" }, ngImport: i0, template: "<div class=\"d-flex flex-column justify-content-start gap-3\">\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 <h3 class=\"m-0 fw-bold\">\n Manage Role Permissions\n </h3>\n <button *ngIf=\"!config.permissionConfig.disableUsers\" [routerLink]=\"['../users']\" class=\"ml-1\"\n mat-raised-button>\n <i class=\"icon fas fa-users\"></i> Users\n </button>\n <button *ngIf=\"!config.permissionConfig.disableRoles\" [routerLink]=\"['../roles']\" class=\"ml-1\"\n mat-raised-button>\n <i class=\"fas fa-user-md\"></i> Manage Roles\n </button>\n </div>\n <form [formGroup]=\"filterForm\" class=\"d-flex justify-content-end align-items-center gap-2\">\n <mat-form-field appearance=\"outline\">\n <mat-label>Search</mat-label>\n <input autocomplete=\"off\" formControlName=\"search\" matInput placeholder=\"Search Permissions\" type=\"text\" />\n <button (click)=\"filterForm.get('search').setValue('')\" *ngIf=\"filterForm.get('search').value\" mat-icon-button\n matSuffix type=\"button\">\n <mat-icon>clear</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field *ngIf=\"roles\" appearance=\"outline\" class=\"ml-2\">\n <mat-label>Show Roles</mat-label>\n <mat-select formControlName='role_ids' multiple>\n <mat-option *ngFor=\"let role of roles\" [value]=\"role?.id\">\n {{ role.label }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </form>\n </mat-card-content>\n </mat-card>\n\n <mat-card class=\"mt-2\">\n <mat-card-content class=\"p-0\">\n <form>\n <table aria-describedby=\"Role Permissions\" class=\"table table-sm table-bordered table-condensed table-striped\">\n <thead>\n <tr>\n <th>Permissions</th>\n <ng-container *ngFor=\"let role of roles\">\n <th *ngIf=\"filterForm.get('role_ids').value.includes(role.id)\" class=\"text-center\">\n {{ role.label }}\n </th>\n </ng-container>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let permission of filteredPermissions\">\n <td>\n {{ permission.label }}\n </td>\n <ng-container *ngFor=\"let role of roles\">\n <td *ngIf=\"filterForm.get('role_ids').value.includes(role.id)\" class=\"text-center align-middle\">\n <div class=\"d-flex justify-content-center align-items-center h-100\">\n <input (change)=\"updateRolePermission(role, permission)\"\n [checked]=\"role.hasPermission(permission.slug)\"\n [disabled]=\"isDisabled(role?.client_id == null, role.is_editable)\"\n name=\"{{role.id}}[{{permission?.label}}]\" type=\"checkbox\" />\n </div>\n </td>\n </ng-container>\n </tr>\n </tbody>\n </table>\n </form>\n </mat-card-content>\n </mat-card>\n</div>", dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i6.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i6.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i7$2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i7$2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i7$2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i8$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i9$1.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$2.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i9$2.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: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "directive", type: i1$5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$5.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: i1$5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$5.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$5.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$5.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] }); }
|
|
10717
10715
|
}
|
|
10718
10716
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: PermissionsManagementComponent, decorators: [{
|
|
10719
10717
|
type: Component,
|
|
10720
|
-
args: [{ selector: 'role-permissions-management', template: "<div class=\"d-flex flex-column justify-content-start gap-3\">\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 <h3 class=\"m-0 fw-bold\">\n Manage Role Permissions\n </h3>\n <button *ngIf=\"!config.permissionConfig.disableUsers\" [routerLink]=\"['../users']\" class=\"ml-1\"\n
|
|
10718
|
+
args: [{ selector: 'role-permissions-management', template: "<div class=\"d-flex flex-column justify-content-start gap-3\">\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 <h3 class=\"m-0 fw-bold\">\n Manage Role Permissions\n </h3>\n <button *ngIf=\"!config.permissionConfig.disableUsers\" [routerLink]=\"['../users']\" class=\"ml-1\"\n mat-raised-button>\n <i class=\"icon fas fa-users\"></i> Users\n </button>\n <button *ngIf=\"!config.permissionConfig.disableRoles\" [routerLink]=\"['../roles']\" class=\"ml-1\"\n mat-raised-button>\n <i class=\"fas fa-user-md\"></i> Manage Roles\n </button>\n </div>\n <form [formGroup]=\"filterForm\" class=\"d-flex justify-content-end align-items-center gap-2\">\n <mat-form-field appearance=\"outline\">\n <mat-label>Search</mat-label>\n <input autocomplete=\"off\" formControlName=\"search\" matInput placeholder=\"Search Permissions\" type=\"text\" />\n <button (click)=\"filterForm.get('search').setValue('')\" *ngIf=\"filterForm.get('search').value\" mat-icon-button\n matSuffix type=\"button\">\n <mat-icon>clear</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field *ngIf=\"roles\" appearance=\"outline\" class=\"ml-2\">\n <mat-label>Show Roles</mat-label>\n <mat-select formControlName='role_ids' multiple>\n <mat-option *ngFor=\"let role of roles\" [value]=\"role?.id\">\n {{ role.label }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </form>\n </mat-card-content>\n </mat-card>\n\n <mat-card class=\"mt-2\">\n <mat-card-content class=\"p-0\">\n <form>\n <table aria-describedby=\"Role Permissions\" class=\"table table-sm table-bordered table-condensed table-striped\">\n <thead>\n <tr>\n <th>Permissions</th>\n <ng-container *ngFor=\"let role of roles\">\n <th *ngIf=\"filterForm.get('role_ids').value.includes(role.id)\" class=\"text-center\">\n {{ role.label }}\n </th>\n </ng-container>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let permission of filteredPermissions\">\n <td>\n {{ permission.label }}\n </td>\n <ng-container *ngFor=\"let role of roles\">\n <td *ngIf=\"filterForm.get('role_ids').value.includes(role.id)\" class=\"text-center align-middle\">\n <div class=\"d-flex justify-content-center align-items-center h-100\">\n <input (change)=\"updateRolePermission(role, permission)\"\n [checked]=\"role.hasPermission(permission.slug)\"\n [disabled]=\"isDisabled(role?.client_id == null, role.is_editable)\"\n name=\"{{role.id}}[{{permission?.label}}]\" type=\"checkbox\" />\n </div>\n </td>\n </ng-container>\n </tr>\n </tbody>\n </table>\n </form>\n </mat-card-content>\n </mat-card>\n</div>" }]
|
|
10721
10719
|
}], ctorParameters: () => [{ type: HttpService }, { type: AlertService }, { type: i1$1.ActivatedRoute }, { type: CredentialsService }, { type: ErrorHandlerService }, { type: UserConfigService }, { type: i1$5.FormBuilder }], propDecorators: { clientId: [{
|
|
10722
10720
|
type: Input
|
|
10723
10721
|
}] } });
|
|
@@ -10756,11 +10754,11 @@ class RoleViewComponent {
|
|
|
10756
10754
|
}
|
|
10757
10755
|
}
|
|
10758
10756
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RoleViewComponent, deps: [{ token: HttpService }, { token: ErrorHandlerService }, { token: i1$1.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10759
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: RoleViewComponent, selector: "app-role-view", ngImport: i0, template: "<div fxLayout=\"column\" fxLayoutGap=\"1rem\" class=\"p-4\">\n <h3 fxLayoutAlign=\"center\" class=\"pb-4\">Role View</h3>\n <div fxLayout=\"row wrap\" fxLayoutGap=\"1rem grid\">\n <div fxFlex.lt-md=\"100%\" fxFlex=\"0 1 calc(50%-1rem)\">\n <mat-card fxFlex=\"100%\">\n <mat-card-title>Basic Info.</mat-card-title>\n <mat-card-content fxLayout=\"column wrap\" fxLayoutGap=\"1rem\">\n <div>\n <span class=\"font-weight-bold\">Role:</span> {{role?.label}}\n </div>\n <div>\n <span class=\"font-weight-bold\">Description:</span> {{role?.description}}\n </div>\n <div>\n <span class=\"font-weight-bold\">Is App Role:</span> {{role?.
|
|
10757
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: RoleViewComponent, selector: "app-role-view", ngImport: i0, template: "<div fxLayout=\"column\" fxLayoutGap=\"1rem\" class=\"p-4\">\n <h3 fxLayoutAlign=\"center\" class=\"pb-4\">Role View</h3>\n <div fxLayout=\"row wrap\" fxLayoutGap=\"1rem grid\">\n <div fxFlex.lt-md=\"100%\" fxFlex=\"0 1 calc(50%-1rem)\">\n <mat-card fxFlex=\"100%\">\n <mat-card-title>Basic Info.</mat-card-title>\n <mat-card-content fxLayout=\"column wrap\" fxLayoutGap=\"1rem\">\n <div>\n <span class=\"font-weight-bold\">Role:</span> {{role?.label}}\n </div>\n <div>\n <span class=\"font-weight-bold\">Description:</span> {{role?.description}}\n </div>\n <div>\n <span class=\"font-weight-bold\">Is App Role:</span> {{(role?.client_id == null) ? 'Yes' : 'No'}}\n </div>\n <div>\n <span class=\"font-weight-bold\"># Users:</span> {{role?.role_users_count}}\n </div>\n </mat-card-content>\n </mat-card>\n </div>\n <div fxFlex.lt-md=\"100%\" fxFlex=\"0 1 calc(50%-1rem)\">\n <mat-card fxFlex=\"100%\">\n <mat-card-title>Permissions ({{role?.permissions.length}})</mat-card-title>\n <mat-card-content style=\"height:400px;overflow-y: scroll;\">\n <div fxLayout=\"column wrap\">\n <div *ngFor=\"let permission of role?.permissions;let i=index;\">\n {{i+1}}. {{permission.label}}\n </div>\n </div>\n </mat-card-content>\n </mat-card>\n </div>\n </div>\n</div>", styles: [""], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "directive", type: i4.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "directive", type: i7.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: i7.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: i7.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: i7.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"] }] }); }
|
|
10760
10758
|
}
|
|
10761
10759
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RoleViewComponent, decorators: [{
|
|
10762
10760
|
type: Component,
|
|
10763
|
-
args: [{ selector: 'app-role-view', template: "<div fxLayout=\"column\" fxLayoutGap=\"1rem\" class=\"p-4\">\n <h3 fxLayoutAlign=\"center\" class=\"pb-4\">Role View</h3>\n <div fxLayout=\"row wrap\" fxLayoutGap=\"1rem grid\">\n <div fxFlex.lt-md=\"100%\" fxFlex=\"0 1 calc(50%-1rem)\">\n <mat-card fxFlex=\"100%\">\n <mat-card-title>Basic Info.</mat-card-title>\n <mat-card-content fxLayout=\"column wrap\" fxLayoutGap=\"1rem\">\n <div>\n <span class=\"font-weight-bold\">Role:</span> {{role?.label}}\n </div>\n <div>\n <span class=\"font-weight-bold\">Description:</span> {{role?.description}}\n </div>\n <div>\n <span class=\"font-weight-bold\">Is App Role:</span> {{role?.
|
|
10761
|
+
args: [{ selector: 'app-role-view', template: "<div fxLayout=\"column\" fxLayoutGap=\"1rem\" class=\"p-4\">\n <h3 fxLayoutAlign=\"center\" class=\"pb-4\">Role View</h3>\n <div fxLayout=\"row wrap\" fxLayoutGap=\"1rem grid\">\n <div fxFlex.lt-md=\"100%\" fxFlex=\"0 1 calc(50%-1rem)\">\n <mat-card fxFlex=\"100%\">\n <mat-card-title>Basic Info.</mat-card-title>\n <mat-card-content fxLayout=\"column wrap\" fxLayoutGap=\"1rem\">\n <div>\n <span class=\"font-weight-bold\">Role:</span> {{role?.label}}\n </div>\n <div>\n <span class=\"font-weight-bold\">Description:</span> {{role?.description}}\n </div>\n <div>\n <span class=\"font-weight-bold\">Is App Role:</span> {{(role?.client_id == null) ? 'Yes' : 'No'}}\n </div>\n <div>\n <span class=\"font-weight-bold\"># Users:</span> {{role?.role_users_count}}\n </div>\n </mat-card-content>\n </mat-card>\n </div>\n <div fxFlex.lt-md=\"100%\" fxFlex=\"0 1 calc(50%-1rem)\">\n <mat-card fxFlex=\"100%\">\n <mat-card-title>Permissions ({{role?.permissions.length}})</mat-card-title>\n <mat-card-content style=\"height:400px;overflow-y: scroll;\">\n <div fxLayout=\"column wrap\">\n <div *ngFor=\"let permission of role?.permissions;let i=index;\">\n {{i+1}}. {{permission.label}}\n </div>\n </div>\n </mat-card-content>\n </mat-card>\n </div>\n </div>\n</div>" }]
|
|
10764
10762
|
}], ctorParameters: () => [{ type: HttpService }, { type: ErrorHandlerService }, { type: i1$1.ActivatedRoute }] });
|
|
10765
10763
|
|
|
10766
10764
|
const routes$e = [
|
|
@@ -12987,18 +12985,24 @@ class ColumnSelectorComponent {
|
|
|
12987
12985
|
}
|
|
12988
12986
|
updateEmittedColumns() {
|
|
12989
12987
|
let finalColumns;
|
|
12988
|
+
const selectedDefs = this.columnSelector.value || [];
|
|
12990
12989
|
if (this.isExportWorking) {
|
|
12991
|
-
|
|
12992
|
-
|
|
12993
|
-
|
|
12994
|
-
|
|
12995
|
-
|
|
12996
|
-
//
|
|
12997
|
-
|
|
12990
|
+
//Export mode
|
|
12991
|
+
//User-selected columns
|
|
12992
|
+
let selected = this.columnConfigs.filter(c => selectedDefs.includes(c.def));
|
|
12993
|
+
//Auto-include: isExportable === true
|
|
12994
|
+
let forcedInclude = this.columnConfigs.filter(c => c.isExportable === true);
|
|
12995
|
+
// Merge selected + force-included
|
|
12996
|
+
let merged = [...selected, ...forcedInclude];
|
|
12997
|
+
//Force exclude: isExportable === false
|
|
12998
|
+
merged = merged.filter(c => c.isExportable !== false);
|
|
12999
|
+
//Remove duplicates
|
|
13000
|
+
const uniqueDefs = new Set(merged.map(c => c.def));
|
|
13001
|
+
//Keep original order from columnConfigs
|
|
13002
|
+
finalColumns = this.columnConfigs.filter(c => uniqueDefs.has(c.def));
|
|
12998
13003
|
}
|
|
12999
13004
|
else {
|
|
13000
|
-
|
|
13001
|
-
// Restore REAL user-selected columns
|
|
13005
|
+
// NORMAL MODE
|
|
13002
13006
|
finalColumns = this.columnConfigs.filter(c => selectedDefs.includes(c.def));
|
|
13003
13007
|
}
|
|
13004
13008
|
this.selectedColumns = finalColumns;
|
|
@@ -14094,11 +14098,12 @@ let SubscriptionListingComponent = class SubscriptionListingComponent extends Te
|
|
|
14094
14098
|
get isFilterPatchFromRoute() {
|
|
14095
14099
|
return !this.subscriptionPackage?.id;
|
|
14096
14100
|
}
|
|
14097
|
-
constructor(subscriptionService, fb, dialog) {
|
|
14101
|
+
constructor(subscriptionService, fb, dialog, datePipe) {
|
|
14098
14102
|
super();
|
|
14099
14103
|
this.subscriptionService = subscriptionService;
|
|
14100
14104
|
this.fb = fb;
|
|
14101
14105
|
this.dialog = dialog;
|
|
14106
|
+
this.datePipe = datePipe;
|
|
14102
14107
|
this.subscriptionStatus = SubscriptionStatus;
|
|
14103
14108
|
this.displayedColumns = [
|
|
14104
14109
|
'index',
|
|
@@ -14145,6 +14150,8 @@ let SubscriptionListingComponent = class SubscriptionListingComponent extends Te
|
|
|
14145
14150
|
filters.perPage = this.perPage;
|
|
14146
14151
|
filters.package_ids = this.subscriptionPackage?.id || filters?.package_ids?.toString();
|
|
14147
14152
|
filters.status_ids = filters?.status_ids?.toString();
|
|
14153
|
+
filters.date_from = this.datePipe.transform(filters.date_from, 'yyyy-MM-dd') ?? '';
|
|
14154
|
+
filters.date_to = this.datePipe.transform(filters.date_to, 'yyyy-MM-dd') ?? '';
|
|
14148
14155
|
this.subscriptionService.index(filters)
|
|
14149
14156
|
.pipe(finalize$1(() => this.isWorking = false)).subscribe((res) => {
|
|
14150
14157
|
this.lastPage = res?.last_page || this.page;
|
|
@@ -14175,7 +14182,7 @@ let SubscriptionListingComponent = class SubscriptionListingComponent extends Te
|
|
|
14175
14182
|
}
|
|
14176
14183
|
});
|
|
14177
14184
|
}
|
|
14178
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SubscriptionListingComponent, deps: [{ token: SubscriptionService }, { token: i1$5.UntypedFormBuilder }, { token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
14185
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SubscriptionListingComponent, deps: [{ token: SubscriptionService }, { token: i1$5.UntypedFormBuilder }, { token: i1.MatDialog }, { token: i3.DatePipe }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
14179
14186
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: SubscriptionListingComponent, selector: "app-subscription-listing", inputs: { subscriptionPackage: "subscriptionPackage" }, usesInheritance: true, ngImport: i0, template: "<div fxLayout=\"column\" class=\"m-2\">\n <mat-card appearance=\"outlined\" fxLayout fxLayoutGap=\"0.5rem\" fxLayoutAlign=\"start center\">\n <div fxLayout fxLayoutAlign=\"start center\">\n <h5 class=\"m-0\">{{subscriptionPackage?'Package':'Tenant'}} Subscriptions</h5>\n <app-subscription-form (success)=\"reload()\"\n [subscriptionPackage]=\"subscriptionPackage\"></app-subscription-form>\n </div>\n <div fxFlex>\n </div>\n <form [formGroup]=\"filterForm\" fxLayout=\"row\" fxLayoutGap=\"0.3rem\" class=\"d-print-none\"\n fxLayoutAlign=\"start start\">\n <mat-form-field appearance=\"outline\" class=\" fl-md\">\n <mat-label>Search</mat-label>\n <input type=\"text\" matInput formControlName=\"search\" placeholder=\"Search Tenant, Details\"\n autocomplete=\"off\" />\n <button *ngIf=\"filterForm.get('search').value\" matSuffix mat-icon-button\n (click)=\"resetFilter('search')\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n\n <mat-form-field class=\" fl-sm\" appearance=\"outline\" *ngIf=\"!subscriptionPackage\">\n <mat-label>Package</mat-label>\n <app-searchable-selector formControlName=\"package_ids\" apiUrl=\"api/subscription-packages\"\n [multiple]=\"true\">\n </app-searchable-selector>\n <button mat-icon-button matSuffix type=\"button\" *ngIf=\"filterForm.get('package_ids').value\"\n (click)=\"resetFilter('package_ids')\">\n <mat-icon>clear</mat-icon>\n </button>\n </mat-form-field>\n\n <app-timeline-filter [showClearButton]=\"true\" [form]=\"filterForm\" appearance=\"outline\"\n formControlName=\"date_period_id\" labelText=\"Start\">\n </app-timeline-filter>\n\n <mat-form-field class=\"fl-sm\" appearance=\"outline\">\n <mat-label>Status</mat-label>\n <mat-select formControlName=\"status_ids\" multiple>\n <mat-option [value]=\"1\">Active</mat-option>\n <mat-option [value]=\"2\">Inactive</mat-option>\n </mat-select>\n <button mat-icon-button matSuffix type=\"button\" *ngIf=\"filterForm.get('status_ids').value\"\n (click)=\"resetFilter('status_ids')\">\n <mat-icon>clear</mat-icon>\n </button>\n </mat-form-field>\n\n </form>\n </mat-card>\n <mat-card appearance=\"outlined\" class=\"p-0 mt-2\">\n <table mat-table matSort [dataSource]=\"models\" class=\"w-100\" infiniteScroll [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" (matSortChange)=\"sortColumn($event)\">\n\n <ng-container matColumnDef=\"index\">\n <th mat-header-cell *matHeaderCellDef> # </th>\n <td mat-cell *matCellDef=\"let tenantSubscription; let i = index\"> {{ i+1 }} </td>\n </ng-container>\n\n <ng-container matColumnDef=\"tenant\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header disableClear> Tenant </th>\n <td mat-cell *matCellDef=\"let tenantSubscription\">\n <div>\n <div>{{tenantSubscription?.tenant?.name }}</div>\n <div><span>{{tenantSubscription?.tenant?.phone }}</span> <span> |\n {{tenantSubscription?.tenant?.email }}</span></div>\n </div>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"period\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header disableClear> Period </th>\n <td mat-cell *matCellDef=\"let tenantSubscription\">\n <span *ngIf=\"tenantSubscription?.started_at\">{{tenantSubscription?.started_at | date:'mediumDate' }}\n -> {{(tenantSubscription?.ended_at | date:'mediumDate') ?? 'NA' }}</span>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"package\">\n <th mat-header-cell *matHeaderCellDef> Package </th>\n <td mat-cell *matCellDef=\"let tenantSubscription\">\n <div>{{tenantSubscription?.package?.title }}</div>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"status\">\n <th mat-header-cell *matHeaderCellDef> Status </th>\n <td mat-cell *matCellDef=\"let tenantSubscription\">\n <div>{{tenantSubscription?.status?.title }}</div>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"cost_per_unit\">\n <th mat-header-cell *matHeaderCellDef> Cost/Units </th>\n <td mat-cell *matCellDef=\"let tenantSubscription\">\n <div>{{tenantSubscription?.cost_per_unit | currency:'USD':'symbol':'1.0-2' }}</div>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"units\">\n <th mat-header-cell *matHeaderCellDef> Units </th>\n <td mat-cell *matCellDef=\"let tenantSubscription\">\n <div>{{tenantSubscription?.units | number}}</div>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"is_unit_limitation_enforced\">\n <th mat-header-cell *matHeaderCellDef> Is Units Limited </th>\n <td mat-cell *matCellDef=\"let tenantSubscription\">\n <div>{{tenantSubscription?.is_unit_limitation_enforced ? 'Yes' : 'No' }}</div>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"total\">\n <th mat-header-cell *matHeaderCellDef> Total Cost </th>\n <td mat-cell *matCellDef=\"let tenantSubscription\">\n <div>{{tenantSubscription?.total | currency:'USD':'symbol':'1.0-2' }}</div>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"is_trail\">\n <th mat-header-cell *matHeaderCellDef> Is Trail</th>\n <td mat-cell *matCellDef=\"let tenantSubscription\">\n <div>\n <div>{{tenantSubscription?.is_trail ? 'Yes' : 'No' }}</div>\n <div *ngIf=\"tenantSubscription?.is_trail\"><span>{{tenantSubscription?.trail_started_at |\n date:'mediumDate' }} -> {{tenantSubscription?.trail_ended_at | date:'mediumDate'\n }}</span></div>\n </div>\n </td>\n </ng-container>\n\n\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef> Actions </th>\n <td mat-cell *matCellDef=\"let tenantSubscription\">\n <div class=\"text-secondary\" fxLayout>\n <div *ngIf=\"tenantSubscription?.creator_id\">\n <app-subscription-form *ngIf=\"tenantSubscription.status_id == subscriptionStatus.ACTIVE\"\n (success)=\"reload()\" [tenantSubscriptionInfo]=\"tenantSubscription\"\n [subscriptionPackage]=\"subscriptionPackage\"></app-subscription-form>\n <button *ngIf=\"tenantSubscription.status_id == subscriptionStatus.ACTIVE\"\n matTooltip=\"Cancel Subscription\" type=\"button\" mat-icon-button\n (click)=\"cancel(tenantSubscription)\">\n <mat-icon>cancel</mat-icon>\n </button>\n </div>\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>\n</div>", styles: [".add-icon{position:relative;top:5px}.add-icon:hover{cursor:pointer}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i7$2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i7$2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i7$2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i8$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i9$1.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$2.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i9$2.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: i11.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i11.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i9.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i9.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i9.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i9.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i9.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i9.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i9.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i9.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i9.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i9.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i5$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: i5.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: 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: "directive", type: i1$5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$5.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: i1$5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$5.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$5.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: SubscriptionFormComponent, selector: "app-subscription-form", inputs: ["isUpdate", "subscriptionPackage", "tenantSubscriptionInfo"], outputs: ["success"] }, { kind: "directive", type: i7.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: i7.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: i7.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: i7.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: "directive", type: i6$1.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "component", type: TimelineFilterComponent, selector: "app-timeline-filter", inputs: ["defaultValue", "required", "disabled", "value", "timelines", "dateFrom", "dateTo", "appearance", "showClearButton", "form", "labelText"], outputs: ["selectionChange"] }, { kind: "pipe", type: i3.DecimalPipe, name: "number" }, { kind: "pipe", type: i3.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i3.DatePipe, name: "date" }] }); }
|
|
14180
14187
|
};
|
|
14181
14188
|
SubscriptionListingComponent = __decorate([
|
|
@@ -14184,7 +14191,7 @@ SubscriptionListingComponent = __decorate([
|
|
|
14184
14191
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SubscriptionListingComponent, decorators: [{
|
|
14185
14192
|
type: Component,
|
|
14186
14193
|
args: [{ selector: 'app-subscription-listing', template: "<div fxLayout=\"column\" class=\"m-2\">\n <mat-card appearance=\"outlined\" fxLayout fxLayoutGap=\"0.5rem\" fxLayoutAlign=\"start center\">\n <div fxLayout fxLayoutAlign=\"start center\">\n <h5 class=\"m-0\">{{subscriptionPackage?'Package':'Tenant'}} Subscriptions</h5>\n <app-subscription-form (success)=\"reload()\"\n [subscriptionPackage]=\"subscriptionPackage\"></app-subscription-form>\n </div>\n <div fxFlex>\n </div>\n <form [formGroup]=\"filterForm\" fxLayout=\"row\" fxLayoutGap=\"0.3rem\" class=\"d-print-none\"\n fxLayoutAlign=\"start start\">\n <mat-form-field appearance=\"outline\" class=\" fl-md\">\n <mat-label>Search</mat-label>\n <input type=\"text\" matInput formControlName=\"search\" placeholder=\"Search Tenant, Details\"\n autocomplete=\"off\" />\n <button *ngIf=\"filterForm.get('search').value\" matSuffix mat-icon-button\n (click)=\"resetFilter('search')\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n\n <mat-form-field class=\" fl-sm\" appearance=\"outline\" *ngIf=\"!subscriptionPackage\">\n <mat-label>Package</mat-label>\n <app-searchable-selector formControlName=\"package_ids\" apiUrl=\"api/subscription-packages\"\n [multiple]=\"true\">\n </app-searchable-selector>\n <button mat-icon-button matSuffix type=\"button\" *ngIf=\"filterForm.get('package_ids').value\"\n (click)=\"resetFilter('package_ids')\">\n <mat-icon>clear</mat-icon>\n </button>\n </mat-form-field>\n\n <app-timeline-filter [showClearButton]=\"true\" [form]=\"filterForm\" appearance=\"outline\"\n formControlName=\"date_period_id\" labelText=\"Start\">\n </app-timeline-filter>\n\n <mat-form-field class=\"fl-sm\" appearance=\"outline\">\n <mat-label>Status</mat-label>\n <mat-select formControlName=\"status_ids\" multiple>\n <mat-option [value]=\"1\">Active</mat-option>\n <mat-option [value]=\"2\">Inactive</mat-option>\n </mat-select>\n <button mat-icon-button matSuffix type=\"button\" *ngIf=\"filterForm.get('status_ids').value\"\n (click)=\"resetFilter('status_ids')\">\n <mat-icon>clear</mat-icon>\n </button>\n </mat-form-field>\n\n </form>\n </mat-card>\n <mat-card appearance=\"outlined\" class=\"p-0 mt-2\">\n <table mat-table matSort [dataSource]=\"models\" class=\"w-100\" infiniteScroll [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" (matSortChange)=\"sortColumn($event)\">\n\n <ng-container matColumnDef=\"index\">\n <th mat-header-cell *matHeaderCellDef> # </th>\n <td mat-cell *matCellDef=\"let tenantSubscription; let i = index\"> {{ i+1 }} </td>\n </ng-container>\n\n <ng-container matColumnDef=\"tenant\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header disableClear> Tenant </th>\n <td mat-cell *matCellDef=\"let tenantSubscription\">\n <div>\n <div>{{tenantSubscription?.tenant?.name }}</div>\n <div><span>{{tenantSubscription?.tenant?.phone }}</span> <span> |\n {{tenantSubscription?.tenant?.email }}</span></div>\n </div>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"period\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header disableClear> Period </th>\n <td mat-cell *matCellDef=\"let tenantSubscription\">\n <span *ngIf=\"tenantSubscription?.started_at\">{{tenantSubscription?.started_at | date:'mediumDate' }}\n -> {{(tenantSubscription?.ended_at | date:'mediumDate') ?? 'NA' }}</span>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"package\">\n <th mat-header-cell *matHeaderCellDef> Package </th>\n <td mat-cell *matCellDef=\"let tenantSubscription\">\n <div>{{tenantSubscription?.package?.title }}</div>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"status\">\n <th mat-header-cell *matHeaderCellDef> Status </th>\n <td mat-cell *matCellDef=\"let tenantSubscription\">\n <div>{{tenantSubscription?.status?.title }}</div>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"cost_per_unit\">\n <th mat-header-cell *matHeaderCellDef> Cost/Units </th>\n <td mat-cell *matCellDef=\"let tenantSubscription\">\n <div>{{tenantSubscription?.cost_per_unit | currency:'USD':'symbol':'1.0-2' }}</div>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"units\">\n <th mat-header-cell *matHeaderCellDef> Units </th>\n <td mat-cell *matCellDef=\"let tenantSubscription\">\n <div>{{tenantSubscription?.units | number}}</div>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"is_unit_limitation_enforced\">\n <th mat-header-cell *matHeaderCellDef> Is Units Limited </th>\n <td mat-cell *matCellDef=\"let tenantSubscription\">\n <div>{{tenantSubscription?.is_unit_limitation_enforced ? 'Yes' : 'No' }}</div>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"total\">\n <th mat-header-cell *matHeaderCellDef> Total Cost </th>\n <td mat-cell *matCellDef=\"let tenantSubscription\">\n <div>{{tenantSubscription?.total | currency:'USD':'symbol':'1.0-2' }}</div>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"is_trail\">\n <th mat-header-cell *matHeaderCellDef> Is Trail</th>\n <td mat-cell *matCellDef=\"let tenantSubscription\">\n <div>\n <div>{{tenantSubscription?.is_trail ? 'Yes' : 'No' }}</div>\n <div *ngIf=\"tenantSubscription?.is_trail\"><span>{{tenantSubscription?.trail_started_at |\n date:'mediumDate' }} -> {{tenantSubscription?.trail_ended_at | date:'mediumDate'\n }}</span></div>\n </div>\n </td>\n </ng-container>\n\n\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef> Actions </th>\n <td mat-cell *matCellDef=\"let tenantSubscription\">\n <div class=\"text-secondary\" fxLayout>\n <div *ngIf=\"tenantSubscription?.creator_id\">\n <app-subscription-form *ngIf=\"tenantSubscription.status_id == subscriptionStatus.ACTIVE\"\n (success)=\"reload()\" [tenantSubscriptionInfo]=\"tenantSubscription\"\n [subscriptionPackage]=\"subscriptionPackage\"></app-subscription-form>\n <button *ngIf=\"tenantSubscription.status_id == subscriptionStatus.ACTIVE\"\n matTooltip=\"Cancel Subscription\" type=\"button\" mat-icon-button\n (click)=\"cancel(tenantSubscription)\">\n <mat-icon>cancel</mat-icon>\n </button>\n </div>\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>\n</div>", styles: [".add-icon{position:relative;top:5px}.add-icon:hover{cursor:pointer}\n"] }]
|
|
14187
|
-
}], ctorParameters: () => [{ type: SubscriptionService }, { type: i1$5.UntypedFormBuilder }, { type: i1.MatDialog }], propDecorators: { subscriptionPackage: [{
|
|
14194
|
+
}], ctorParameters: () => [{ type: SubscriptionService }, { type: i1$5.UntypedFormBuilder }, { type: i1.MatDialog }, { type: i3.DatePipe }], propDecorators: { subscriptionPackage: [{
|
|
14188
14195
|
type: Input
|
|
14189
14196
|
}] } });
|
|
14190
14197
|
|