@juice-js/tenants 1.1.2-alpha.4 → 1.2.0-alpha.1
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/shared/models/tenant.create.model.mjs +1 -2
- package/esm2022/lib/shared/models/tenant.model.mjs +1 -1
- package/esm2022/lib/shared/models/tenant.update.model.mjs +1 -2
- package/esm2022/lib/shared/services/tenant-admin.service.mjs +4 -1
- package/esm2022/lib/tenant-create/tenant-create.component.mjs +6 -3
- package/esm2022/lib/tenant-detail/tenant-detail.component.mjs +3 -3
- package/esm2022/lib/tenant-settings/tenant-settings.component.mjs +1 -1
- package/esm2022/lib/tenant-update/tenant-update.component.mjs +3 -6
- package/esm2022/lib/tenants.component.mjs +43 -4
- package/fesm2022/juice-js-tenants.mjs +54 -14
- package/fesm2022/juice-js-tenants.mjs.map +1 -1
- package/lib/shared/models/tenant.create.model.d.ts +0 -1
- package/lib/shared/models/tenant.model.d.ts +0 -1
- package/lib/shared/models/tenant.update.model.d.ts +0 -1
- package/lib/shared/services/tenant-admin.service.d.ts +1 -0
- package/lib/tenant-create/tenant-create.component.d.ts +2 -0
- package/lib/tenant-update/tenant-update.component.d.ts +0 -2
- package/lib/tenants.component.d.ts +1 -0
- package/package.json +3 -3
|
@@ -133,6 +133,9 @@ class TenantAdminService {
|
|
|
133
133
|
updateTenantSettings(id, settings) {
|
|
134
134
|
return this.http.put(`${this.options.apiEndpoint}/api/v${this.options.apiVersion}/admin/${id}/settings`, settings);
|
|
135
135
|
}
|
|
136
|
+
updateTenantProperties(id, properties) {
|
|
137
|
+
return this.http.put(`${this.options.apiEndpoint}/api/v${this.options.apiVersion}/admin/${id}/properties`, { properties });
|
|
138
|
+
}
|
|
136
139
|
getRootSettings() {
|
|
137
140
|
return this.http.get(`${this.options.apiEndpoint}/api/v${this.options.apiVersion}/settings`);
|
|
138
141
|
}
|
|
@@ -264,7 +267,7 @@ class TenantsComponent {
|
|
|
264
267
|
this.tenantStatus = TenantStatus;
|
|
265
268
|
this.statusHelper = TenantStatusHelper;
|
|
266
269
|
this.statusOptions = Object.values(TenantStatus).filter(value => typeof value === 'string')
|
|
267
|
-
.map(value => value);
|
|
270
|
+
.map(value => this.tenantStatus[value]);
|
|
268
271
|
this.form = new FormGroup({});
|
|
269
272
|
this.table = new TableData([
|
|
270
273
|
{ id: 'id', name: 'Id' },
|
|
@@ -636,6 +639,45 @@ class TenantsComponent {
|
|
|
636
639
|
dialogRef.close();
|
|
637
640
|
});
|
|
638
641
|
}
|
|
642
|
+
properties(id) {
|
|
643
|
+
const dialogRef = this.dialog.open(TenantSettingsComponent, {
|
|
644
|
+
width: this.options.dialogWidth,
|
|
645
|
+
maxHeight: this.options.dialogMaxHeight,
|
|
646
|
+
});
|
|
647
|
+
let instance = dialogRef.componentInstance;
|
|
648
|
+
instance.title = "Tenant properties";
|
|
649
|
+
instance.loading = true;
|
|
650
|
+
instance.type = ModelType.Configuration;
|
|
651
|
+
this.tenantService.getTenant(id).subscribe({
|
|
652
|
+
next: (tenant) => {
|
|
653
|
+
let props = JSON.parse(tenant.serializedProperties);
|
|
654
|
+
instance.loading = false;
|
|
655
|
+
instance.setModel(Object.keys(props).map(s => new KeyValue(s, props[s], false, false)));
|
|
656
|
+
}, error: (error) => {
|
|
657
|
+
this.openSnackBar("Error getting tenant properties!");
|
|
658
|
+
console.debug(error);
|
|
659
|
+
}
|
|
660
|
+
});
|
|
661
|
+
instance.saved.subscribe((model) => {
|
|
662
|
+
var props = instance.getModel().reduce((acc, m) => {
|
|
663
|
+
acc[m.key] = m.value;
|
|
664
|
+
return acc;
|
|
665
|
+
}, {});
|
|
666
|
+
this.tenantService.updateTenantProperties(id, props).subscribe({
|
|
667
|
+
next: () => {
|
|
668
|
+
this.openSnackBar("Tenant properties was updated!");
|
|
669
|
+
dialogRef.close();
|
|
670
|
+
}, error: (error) => {
|
|
671
|
+
this.openSnackBar("Error updating tenant properties!");
|
|
672
|
+
console.debug(error);
|
|
673
|
+
}
|
|
674
|
+
});
|
|
675
|
+
});
|
|
676
|
+
instance.cancelled.subscribe(() => {
|
|
677
|
+
this.openSnackBar("Tenant property modification was cancelled!");
|
|
678
|
+
dialogRef.close();
|
|
679
|
+
});
|
|
680
|
+
}
|
|
639
681
|
//#endregion
|
|
640
682
|
//#region status rules
|
|
641
683
|
canActivate(status) {
|
|
@@ -703,11 +745,11 @@ class TenantsComponent {
|
|
|
703
745
|
});
|
|
704
746
|
}
|
|
705
747
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TenantsComponent, deps: [{ token: TenantAdminService }, { token: i2.Router }, { token: i2.ActivatedRoute }, { token: i3$1.Location }, { token: i2.UrlSerializer }, { token: i4$2.FormBuilder }, { token: i4.MatDialog }, { token: i6.MatSnackBar }, { token: i7.TranslateService }, { token: TenantConfiguration }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
706
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TenantsComponent, selector: "juice-tenants", viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true }, { propertyName: "sort", first: true, predicate: MatMultiSort, descendants: true }], ngImport: i0, template: "<div class=\"mat-elevation-z2 density-compact\">\n <div class=\"controls\">\n <form [formGroup]=\"form\" class=\"table-form \">\n <mat-form-field [style.width.px]=\"300\">\n <input matInput type=\"text\" placeholder=\"{{ 'Search' | translate }}\" formControlName=\"filterText\" (keyup.enter)=\"getData()\">\n <button *ngIf=\"filterText?.value\" type=\"button\" matSuffix mat-icon-button aria-label=\"Clear\" (click)=\"clearFilterText();\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n <mat-form-field [style.width.px]=\"200\">\n <mat-label>{{ 'Statuses' | translate }}</mat-label>\n <mat-select formControlName=\"statuses\" multiple [compareWith]=\"statusCompareFn\" placeholder=\"{{ 'Any status' | translate }}\">\n <mat-select-trigger>\n {{statusOptions[statuses?.value?.[0]||-1] || ('Any status' | translate)}}\n <span *ngIf=\"(statuses?.value?.length || 0) > 1\" class=\"additional-selection\">\n (+{{(statuses?.value?.length || 0) - 1}} {{statuses?.value?.length === 2 ? 'other' : 'others'}})\n </span>\n </mat-select-trigger>\n <option class=\"clear-statuses mat-mdc-option\" (click)=\"clearStatuses()\">{{'Any status' | translate}}</option>\n <mat-option *ngFor=\"let s of statusOptions | keyvalue\" [value]=\"s.key\">\n {{s.value}}\n </mat-option>\n </mat-select>\n </mat-form-field>\n \n </form>\n <div class=\"control-buttons\">\n <div class=\"control-buttons-container\">\n <button mat-button (click)=\"rootSettings()\">\n <mat-icon>settings</mat-icon>{{'Settings' | translate}}\n </button>\n <button type=\"button\" mat-button (click)=\"add()\" color=\"primary\"><mat-icon>add</mat-icon> {{ 'New Organization'}}</button>\n </div>\n <div class=\"spacer\"></div>\n </div>\n </div>\n <table mat-table [dataSource]=\"table.dataSource\" matMultiSort (matSortChange)=\"table.onSortEvent()\">\n \n <!--- Note that these columns can be defined in any order.\n The actual rendered columns are set as a property on the row definition\" -->\n <ng-container matColumnDef=\"identifier\">\n <th mat-header-cell *matHeaderCellDef mat-multi-sort-header=\"identifier\" disableClear=\"true\"> {{ 'Identifier' | translate }} </th>\n <td class=\"button-cell\" mat-cell *matCellDef=\"let row\"> {{row.identifier}} \n <button mat-icon-button [cdkCopyToClipboard]=\"row.identifier\" \n [attr.aria-label]=\"'Copy' | translate\">\n <mat-icon>content_copy</mat-icon>\n </button>\n </td>\n </ng-container>\n <ng-container matColumnDef=\"name\">\n <th mat-header-cell *matHeaderCellDef > {{'Name'|translate}} </th>\n <td mat-cell *matCellDef=\"let row\"> \n {{row.name}}\n </td>\n </ng-container>\n <ng-container matColumnDef=\"status\">\n <th mat-header-cell *matHeaderCellDef > {{'Status'|translate}} </th>\n <td mat-cell *matCellDef=\"let row\" [class]=\"statusHelper.getColor(row.status)\"> \n {{row.status}}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef style=\"text-align: center;\"> {{'Actions'|translate}} </th>\n <td mat-cell *matCellDef=\"let row\" > \n <div class=\"actions-cell\">\n <button mat-button (click)=\"settings(row.id)\">\n <mat-icon>settings</mat-icon>{{'Settings' | translate}}\n </button>\n <button mat-button (click)=\"detail(row.id)\">\n <mat-icon>info</mat-icon>{{'Detail' | translate}}\n </button>\n <button mat-button (click)=\"edit(row.id)\">\n <mat-icon>edit</mat-icon>{{'Edit' | translate}}\n </button>\n \n <button mat-icon-button [matMenuTriggerFor]=\"appMenu\" [matMenuTriggerData]=\"{id: row.id, status: row.status}\">\n <mat-icon>more_vert</mat-icon>\n </button>\n </div>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\n </table>\n <mat-paginator [pageSize]=\"table.pageSize\" [pageIndex]=\"table.pageIndex\" \n [pageSizeOptions]=\"table.pageSizeOptions\"\n [length]=\"table.totalElements ? table.totalElements : 0\" \n (page)=\"table.onPaginationEvent($event)\"\n aria-label=\"Items per page\"\n showFirstLastButtons>\n </mat-paginator>\n\n</div>\n<mat-menu #appMenu=\"matMenu\" class=\"minimum-density\">\n <ng-template matMenuContent let-id=\"id\" let-status=\"status\">\n <button *ngIf=\"canApproval(status)\" class=\"color-success\" mat-menu-item (click)=\"approve(id)\">\n <mat-icon>check_circle_outline</mat-icon>{{'Approve' | translate}}\n </button>\n <button *ngIf=\"canApproval(status)\" class=\"color-warn\" mat-menu-item (click)=\"reject(id)\">\n <mat-icon>highlight_off</mat-icon>{{'Reject' | translate}}\n </button>\n <button *ngIf=\"canActivate(status)\" class=\"color-success\" mat-menu-item (click)=\"activate(id)\">\n <mat-icon>present_to_all</mat-icon>{{'Activate' | translate}}\n </button>\n <button *ngIf=\"canReactivate(status)\" class=\"color-success\" mat-menu-item (click)=\"reactivate(id)\">\n <mat-icon >present_to_all</mat-icon>{{'Activate' | translate}}\n </button>\n <button *ngIf=\"canDeactivate(status)\" class=\"color-warn\" mat-menu-item (click)=\"deactivate(id)\">\n <mat-icon >cancel_presentation</mat-icon>{{'Deactivate' | translate}}\n </button>\n <button *ngIf=\"canSuspend(status)\" class=\"color-warn\" mat-menu-item (click)=\"suspend(id)\">\n <mat-icon >cancel_presentation</mat-icon>{{'Suspend' | translate}}\n </button>\n <button [disabled]=\"!canAbandon(status)\" mat-menu-item (click)=\"abandon(id)\" class=\"color-warn\">\n <mat-icon >delete</mat-icon>{{'Abandon' | translate}}\n </button>\n <button *ngIf=\"canDelete(status)\" class=\"color-warn\" mat-menu-item (click)=\"delete(id)\">\n <mat-icon >delete</mat-icon>{{'Delete' | translate}}\n </button>\n </ng-template>\n</mat-menu>", styles: [":host{display:block}mat-form-field{width:100%}.additional-selection{opacity:.75;font-size:.75em;line-height:0}.clear-statuses{padding:10px;cursor:pointer}.button-cell,.actions-cell{display:flex;align-items:center;padding-top:2px;padding-bottom:2px}.button-cell{justify-content:space-between}.actions-cell{justify-content:center}.actions-cell .mdc-button{padding-top:20px;padding-bottom:20px}.table-form{display:flex;flex-direction:row;align-items:center}.table-form mat-card-actions{flex:1 1 auto}.mat-mdc-menu-item{min-height:38px}.controls{display:flex}.controls .control-buttons{flex:1;display:flex;flex-direction:column}.controls .control-buttons .control-buttons-container{flex:1;display:flex;align-items:center;justify-content:flex-end}.controls .spacer{height:22px}\n"], dependencies: [{ kind: "directive", type: i4$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i4$2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i4$2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i4$2.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: i4$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i4$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i7$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: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "directive", type: i8.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i13.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "component", type: i13.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i13.MatMenuContent, selector: "ng-template[matMenuContent]" }, { kind: "directive", type: i13.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "component", type: i14.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }, { kind: "component", type: i15.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "panelWidth", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "directive", type: i15.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i16.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i17.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i17.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i17.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i17.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i17.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i17.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i17.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i17.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i17.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i17.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i18.CdkCopyToClipboard, selector: "[cdkCopyToClipboard]", inputs: ["cdkCopyToClipboard", "cdkCopyToClipboardAttempts"], outputs: ["cdkCopyToClipboardCopied"] }, { kind: "component", type: i19.MatMultiSortHeaderComponent, selector: "[mat-multi-sort-header]", inputs: ["mat-multi-sort-header"], exportAs: ["matMultiSortHeader"] }, { kind: "directive", type: i19.MatMultiSort, selector: "[matMultiSort]", exportAs: ["matMultiSort"] }, { kind: "pipe", type: i7.TranslatePipe, name: "translate" }, { kind: "pipe", type: i3$1.KeyValuePipe, name: "keyvalue" }] }); }
|
|
748
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TenantsComponent, selector: "juice-tenants", viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true }, { propertyName: "sort", first: true, predicate: MatMultiSort, descendants: true }], ngImport: i0, template: "<div class=\"mat-elevation-z2 density-compact\">\n <div class=\"controls\">\n <form [formGroup]=\"form\" class=\"table-form \">\n <mat-form-field [style.width.px]=\"300\">\n <input matInput type=\"text\" placeholder=\"{{ 'Search' | translate }}\" formControlName=\"filterText\" (keyup.enter)=\"getData()\">\n <button *ngIf=\"filterText?.value\" type=\"button\" matSuffix mat-icon-button aria-label=\"Clear\" (click)=\"clearFilterText();\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n <mat-form-field [style.width.px]=\"200\">\n <mat-label>{{ 'Statuses' | translate }}</mat-label>\n <mat-select formControlName=\"statuses\" multiple [compareWith]=\"statusCompareFn\" placeholder=\"{{ 'Any status' | translate }}\">\n <mat-select-trigger>\n {{statusOptions[statuses?.value?.[0]||-1] || ('Any status' | translate)}}\n <span *ngIf=\"(statuses?.value?.length || 0) > 1\" class=\"additional-selection\">\n (+{{(statuses?.value?.length || 0) - 1}} {{statuses?.value?.length === 2 ? 'other' : 'others'}})\n </span>\n </mat-select-trigger>\n <option class=\"clear-statuses mat-mdc-option\" (click)=\"clearStatuses()\">{{'Any status' | translate}}</option>\n <mat-option *ngFor=\"let s of statusOptions | keyvalue\" [value]=\"s.key\">\n {{s.value}}\n </mat-option>\n </mat-select>\n </mat-form-field>\n \n </form>\n <div class=\"control-buttons\">\n <div class=\"control-buttons-container\">\n <button mat-button (click)=\"rootSettings()\">\n <mat-icon>settings</mat-icon>{{'Settings' | translate}}\n </button>\n <button type=\"button\" mat-button (click)=\"add()\" color=\"primary\"><mat-icon>add</mat-icon> {{ 'New Organization'}}</button>\n </div>\n <div class=\"spacer\"></div>\n </div>\n </div>\n <table mat-table [dataSource]=\"table.dataSource\" matMultiSort (matSortChange)=\"table.onSortEvent()\">\n \n <!--- Note that these columns can be defined in any order.\n The actual rendered columns are set as a property on the row definition\" -->\n <ng-container matColumnDef=\"identifier\">\n <th mat-header-cell *matHeaderCellDef mat-multi-sort-header=\"identifier\" disableClear=\"true\"> {{ 'Identifier' | translate }} </th>\n <td class=\"button-cell\" mat-cell *matCellDef=\"let row\"> {{row.identifier}} \n <button mat-icon-button [cdkCopyToClipboard]=\"row.identifier\" \n [attr.aria-label]=\"'Copy' | translate\">\n <mat-icon>content_copy</mat-icon>\n </button>\n </td>\n </ng-container>\n <ng-container matColumnDef=\"name\">\n <th mat-header-cell *matHeaderCellDef > {{'Name'|translate}} </th>\n <td mat-cell *matCellDef=\"let row\"> \n {{row.name}}\n </td>\n </ng-container>\n <ng-container matColumnDef=\"status\">\n <th mat-header-cell *matHeaderCellDef > {{'Status'|translate}} </th>\n <td mat-cell *matCellDef=\"let row\" [class]=\"statusHelper.getColor(row.status)\"> \n {{row.status}}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef style=\"text-align: center;\"> {{'Actions'|translate}} </th>\n <td mat-cell *matCellDef=\"let row\" > \n <div class=\"actions-cell\">\n <button mat-button (click)=\"settings(row.id)\">\n <mat-icon>settings</mat-icon>{{'Settings' | translate}}\n </button>\n <button mat-button (click)=\"detail(row.id)\">\n <mat-icon>info</mat-icon>{{'Detail' | translate}}\n </button>\n <button mat-button (click)=\"edit(row.id)\">\n <mat-icon>edit</mat-icon>{{'Edit' | translate}}\n </button>\n <button mat-button (click)=\"properties(row.id)\">\n <mat-icon>data_object</mat-icon>{{'Properties' | translate}}\n </button>\n <button mat-icon-button [matMenuTriggerFor]=\"appMenu\" [matMenuTriggerData]=\"{id: row.id, status: row.status}\">\n <mat-icon>more_vert</mat-icon>\n </button>\n </div>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\n </table>\n <mat-paginator [pageSize]=\"table.pageSize\" [pageIndex]=\"table.pageIndex\" \n [pageSizeOptions]=\"table.pageSizeOptions\"\n [length]=\"table.totalElements ? table.totalElements : 0\" \n (page)=\"table.onPaginationEvent($event)\"\n aria-label=\"Items per page\"\n showFirstLastButtons>\n </mat-paginator>\n\n</div>\n<mat-menu #appMenu=\"matMenu\" class=\"minimum-density\">\n <ng-template matMenuContent let-id=\"id\" let-status=\"status\">\n <button *ngIf=\"canApproval(status)\" class=\"color-success\" mat-menu-item (click)=\"approve(id)\">\n <mat-icon>check_circle_outline</mat-icon>{{'Approve' | translate}}\n </button>\n <button *ngIf=\"canApproval(status)\" class=\"color-warn\" mat-menu-item (click)=\"reject(id)\">\n <mat-icon>highlight_off</mat-icon>{{'Reject' | translate}}\n </button>\n <button *ngIf=\"canActivate(status)\" class=\"color-success\" mat-menu-item (click)=\"activate(id)\">\n <mat-icon>present_to_all</mat-icon>{{'Activate' | translate}}\n </button>\n <button *ngIf=\"canReactivate(status)\" class=\"color-success\" mat-menu-item (click)=\"reactivate(id)\">\n <mat-icon >present_to_all</mat-icon>{{'Activate' | translate}}\n </button>\n <button *ngIf=\"canDeactivate(status)\" class=\"color-warn\" mat-menu-item (click)=\"deactivate(id)\">\n <mat-icon >cancel_presentation</mat-icon>{{'Deactivate' | translate}}\n </button>\n <button *ngIf=\"canSuspend(status)\" class=\"color-warn\" mat-menu-item (click)=\"suspend(id)\">\n <mat-icon >cancel_presentation</mat-icon>{{'Suspend' | translate}}\n </button>\n <button [disabled]=\"!canAbandon(status)\" mat-menu-item (click)=\"abandon(id)\" class=\"color-warn\">\n <mat-icon >delete</mat-icon>{{'Abandon' | translate}}\n </button>\n <button *ngIf=\"canDelete(status)\" class=\"color-warn\" mat-menu-item (click)=\"delete(id)\">\n <mat-icon >delete</mat-icon>{{'Delete' | translate}}\n </button>\n </ng-template>\n</mat-menu>", styles: [":host{display:block}mat-form-field{width:100%}.additional-selection{opacity:.75;font-size:.75em;line-height:0}.clear-statuses{padding:10px;cursor:pointer}.button-cell,.actions-cell{display:flex;align-items:center;padding-top:2px;padding-bottom:2px}.button-cell{justify-content:space-between}.actions-cell{justify-content:center}.actions-cell .mdc-button{padding-top:20px;padding-bottom:20px}.table-form{display:flex;flex-direction:row;align-items:center}.table-form mat-card-actions{flex:1 1 auto}.mat-mdc-menu-item{min-height:38px}.controls{display:flex}.controls .control-buttons{flex:1;display:flex;flex-direction:column}.controls .control-buttons .control-buttons-container{flex:1;display:flex;align-items:center;justify-content:flex-end}.controls .spacer{height:22px}\n"], dependencies: [{ kind: "directive", type: i4$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i4$2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i4$2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i4$2.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: i4$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i4$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i7$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: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "directive", type: i8.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i13.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "component", type: i13.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i13.MatMenuContent, selector: "ng-template[matMenuContent]" }, { kind: "directive", type: i13.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "component", type: i14.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }, { kind: "component", type: i15.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "panelWidth", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "directive", type: i15.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i16.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i17.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i17.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i17.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i17.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i17.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i17.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i17.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i17.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i17.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i17.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i18.CdkCopyToClipboard, selector: "[cdkCopyToClipboard]", inputs: ["cdkCopyToClipboard", "cdkCopyToClipboardAttempts"], outputs: ["cdkCopyToClipboardCopied"] }, { kind: "component", type: i19.MatMultiSortHeaderComponent, selector: "[mat-multi-sort-header]", inputs: ["mat-multi-sort-header"], exportAs: ["matMultiSortHeader"] }, { kind: "directive", type: i19.MatMultiSort, selector: "[matMultiSort]", exportAs: ["matMultiSort"] }, { kind: "pipe", type: i7.TranslatePipe, name: "translate" }, { kind: "pipe", type: i3$1.KeyValuePipe, name: "keyvalue" }] }); }
|
|
707
749
|
}
|
|
708
750
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TenantsComponent, decorators: [{
|
|
709
751
|
type: Component,
|
|
710
|
-
args: [{ selector: 'juice-tenants', template: "<div class=\"mat-elevation-z2 density-compact\">\n <div class=\"controls\">\n <form [formGroup]=\"form\" class=\"table-form \">\n <mat-form-field [style.width.px]=\"300\">\n <input matInput type=\"text\" placeholder=\"{{ 'Search' | translate }}\" formControlName=\"filterText\" (keyup.enter)=\"getData()\">\n <button *ngIf=\"filterText?.value\" type=\"button\" matSuffix mat-icon-button aria-label=\"Clear\" (click)=\"clearFilterText();\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n <mat-form-field [style.width.px]=\"200\">\n <mat-label>{{ 'Statuses' | translate }}</mat-label>\n <mat-select formControlName=\"statuses\" multiple [compareWith]=\"statusCompareFn\" placeholder=\"{{ 'Any status' | translate }}\">\n <mat-select-trigger>\n {{statusOptions[statuses?.value?.[0]||-1] || ('Any status' | translate)}}\n <span *ngIf=\"(statuses?.value?.length || 0) > 1\" class=\"additional-selection\">\n (+{{(statuses?.value?.length || 0) - 1}} {{statuses?.value?.length === 2 ? 'other' : 'others'}})\n </span>\n </mat-select-trigger>\n <option class=\"clear-statuses mat-mdc-option\" (click)=\"clearStatuses()\">{{'Any status' | translate}}</option>\n <mat-option *ngFor=\"let s of statusOptions | keyvalue\" [value]=\"s.key\">\n {{s.value}}\n </mat-option>\n </mat-select>\n </mat-form-field>\n \n </form>\n <div class=\"control-buttons\">\n <div class=\"control-buttons-container\">\n <button mat-button (click)=\"rootSettings()\">\n <mat-icon>settings</mat-icon>{{'Settings' | translate}}\n </button>\n <button type=\"button\" mat-button (click)=\"add()\" color=\"primary\"><mat-icon>add</mat-icon> {{ 'New Organization'}}</button>\n </div>\n <div class=\"spacer\"></div>\n </div>\n </div>\n <table mat-table [dataSource]=\"table.dataSource\" matMultiSort (matSortChange)=\"table.onSortEvent()\">\n \n <!--- Note that these columns can be defined in any order.\n The actual rendered columns are set as a property on the row definition\" -->\n <ng-container matColumnDef=\"identifier\">\n <th mat-header-cell *matHeaderCellDef mat-multi-sort-header=\"identifier\" disableClear=\"true\"> {{ 'Identifier' | translate }} </th>\n <td class=\"button-cell\" mat-cell *matCellDef=\"let row\"> {{row.identifier}} \n <button mat-icon-button [cdkCopyToClipboard]=\"row.identifier\" \n [attr.aria-label]=\"'Copy' | translate\">\n <mat-icon>content_copy</mat-icon>\n </button>\n </td>\n </ng-container>\n <ng-container matColumnDef=\"name\">\n <th mat-header-cell *matHeaderCellDef > {{'Name'|translate}} </th>\n <td mat-cell *matCellDef=\"let row\"> \n {{row.name}}\n </td>\n </ng-container>\n <ng-container matColumnDef=\"status\">\n <th mat-header-cell *matHeaderCellDef > {{'Status'|translate}} </th>\n <td mat-cell *matCellDef=\"let row\" [class]=\"statusHelper.getColor(row.status)\"> \n {{row.status}}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef style=\"text-align: center;\"> {{'Actions'|translate}} </th>\n <td mat-cell *matCellDef=\"let row\" > \n <div class=\"actions-cell\">\n <button mat-button (click)=\"settings(row.id)\">\n <mat-icon>settings</mat-icon>{{'Settings' | translate}}\n </button>\n <button mat-button (click)=\"detail(row.id)\">\n <mat-icon>info</mat-icon>{{'Detail' | translate}}\n </button>\n <button mat-button (click)=\"edit(row.id)\">\n <mat-icon>edit</mat-icon>{{'Edit' | translate}}\n </button>\n \n <button mat-icon-button [matMenuTriggerFor]=\"appMenu\" [matMenuTriggerData]=\"{id: row.id, status: row.status}\">\n <mat-icon>more_vert</mat-icon>\n </button>\n </div>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\n </table>\n <mat-paginator [pageSize]=\"table.pageSize\" [pageIndex]=\"table.pageIndex\" \n [pageSizeOptions]=\"table.pageSizeOptions\"\n [length]=\"table.totalElements ? table.totalElements : 0\" \n (page)=\"table.onPaginationEvent($event)\"\n aria-label=\"Items per page\"\n showFirstLastButtons>\n </mat-paginator>\n\n</div>\n<mat-menu #appMenu=\"matMenu\" class=\"minimum-density\">\n <ng-template matMenuContent let-id=\"id\" let-status=\"status\">\n <button *ngIf=\"canApproval(status)\" class=\"color-success\" mat-menu-item (click)=\"approve(id)\">\n <mat-icon>check_circle_outline</mat-icon>{{'Approve' | translate}}\n </button>\n <button *ngIf=\"canApproval(status)\" class=\"color-warn\" mat-menu-item (click)=\"reject(id)\">\n <mat-icon>highlight_off</mat-icon>{{'Reject' | translate}}\n </button>\n <button *ngIf=\"canActivate(status)\" class=\"color-success\" mat-menu-item (click)=\"activate(id)\">\n <mat-icon>present_to_all</mat-icon>{{'Activate' | translate}}\n </button>\n <button *ngIf=\"canReactivate(status)\" class=\"color-success\" mat-menu-item (click)=\"reactivate(id)\">\n <mat-icon >present_to_all</mat-icon>{{'Activate' | translate}}\n </button>\n <button *ngIf=\"canDeactivate(status)\" class=\"color-warn\" mat-menu-item (click)=\"deactivate(id)\">\n <mat-icon >cancel_presentation</mat-icon>{{'Deactivate' | translate}}\n </button>\n <button *ngIf=\"canSuspend(status)\" class=\"color-warn\" mat-menu-item (click)=\"suspend(id)\">\n <mat-icon >cancel_presentation</mat-icon>{{'Suspend' | translate}}\n </button>\n <button [disabled]=\"!canAbandon(status)\" mat-menu-item (click)=\"abandon(id)\" class=\"color-warn\">\n <mat-icon >delete</mat-icon>{{'Abandon' | translate}}\n </button>\n <button *ngIf=\"canDelete(status)\" class=\"color-warn\" mat-menu-item (click)=\"delete(id)\">\n <mat-icon >delete</mat-icon>{{'Delete' | translate}}\n </button>\n </ng-template>\n</mat-menu>", styles: [":host{display:block}mat-form-field{width:100%}.additional-selection{opacity:.75;font-size:.75em;line-height:0}.clear-statuses{padding:10px;cursor:pointer}.button-cell,.actions-cell{display:flex;align-items:center;padding-top:2px;padding-bottom:2px}.button-cell{justify-content:space-between}.actions-cell{justify-content:center}.actions-cell .mdc-button{padding-top:20px;padding-bottom:20px}.table-form{display:flex;flex-direction:row;align-items:center}.table-form mat-card-actions{flex:1 1 auto}.mat-mdc-menu-item{min-height:38px}.controls{display:flex}.controls .control-buttons{flex:1;display:flex;flex-direction:column}.controls .control-buttons .control-buttons-container{flex:1;display:flex;align-items:center;justify-content:flex-end}.controls .spacer{height:22px}\n"] }]
|
|
752
|
+
args: [{ selector: 'juice-tenants', template: "<div class=\"mat-elevation-z2 density-compact\">\n <div class=\"controls\">\n <form [formGroup]=\"form\" class=\"table-form \">\n <mat-form-field [style.width.px]=\"300\">\n <input matInput type=\"text\" placeholder=\"{{ 'Search' | translate }}\" formControlName=\"filterText\" (keyup.enter)=\"getData()\">\n <button *ngIf=\"filterText?.value\" type=\"button\" matSuffix mat-icon-button aria-label=\"Clear\" (click)=\"clearFilterText();\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n <mat-form-field [style.width.px]=\"200\">\n <mat-label>{{ 'Statuses' | translate }}</mat-label>\n <mat-select formControlName=\"statuses\" multiple [compareWith]=\"statusCompareFn\" placeholder=\"{{ 'Any status' | translate }}\">\n <mat-select-trigger>\n {{statusOptions[statuses?.value?.[0]||-1] || ('Any status' | translate)}}\n <span *ngIf=\"(statuses?.value?.length || 0) > 1\" class=\"additional-selection\">\n (+{{(statuses?.value?.length || 0) - 1}} {{statuses?.value?.length === 2 ? 'other' : 'others'}})\n </span>\n </mat-select-trigger>\n <option class=\"clear-statuses mat-mdc-option\" (click)=\"clearStatuses()\">{{'Any status' | translate}}</option>\n <mat-option *ngFor=\"let s of statusOptions | keyvalue\" [value]=\"s.key\">\n {{s.value}}\n </mat-option>\n </mat-select>\n </mat-form-field>\n \n </form>\n <div class=\"control-buttons\">\n <div class=\"control-buttons-container\">\n <button mat-button (click)=\"rootSettings()\">\n <mat-icon>settings</mat-icon>{{'Settings' | translate}}\n </button>\n <button type=\"button\" mat-button (click)=\"add()\" color=\"primary\"><mat-icon>add</mat-icon> {{ 'New Organization'}}</button>\n </div>\n <div class=\"spacer\"></div>\n </div>\n </div>\n <table mat-table [dataSource]=\"table.dataSource\" matMultiSort (matSortChange)=\"table.onSortEvent()\">\n \n <!--- Note that these columns can be defined in any order.\n The actual rendered columns are set as a property on the row definition\" -->\n <ng-container matColumnDef=\"identifier\">\n <th mat-header-cell *matHeaderCellDef mat-multi-sort-header=\"identifier\" disableClear=\"true\"> {{ 'Identifier' | translate }} </th>\n <td class=\"button-cell\" mat-cell *matCellDef=\"let row\"> {{row.identifier}} \n <button mat-icon-button [cdkCopyToClipboard]=\"row.identifier\" \n [attr.aria-label]=\"'Copy' | translate\">\n <mat-icon>content_copy</mat-icon>\n </button>\n </td>\n </ng-container>\n <ng-container matColumnDef=\"name\">\n <th mat-header-cell *matHeaderCellDef > {{'Name'|translate}} </th>\n <td mat-cell *matCellDef=\"let row\"> \n {{row.name}}\n </td>\n </ng-container>\n <ng-container matColumnDef=\"status\">\n <th mat-header-cell *matHeaderCellDef > {{'Status'|translate}} </th>\n <td mat-cell *matCellDef=\"let row\" [class]=\"statusHelper.getColor(row.status)\"> \n {{row.status}}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef style=\"text-align: center;\"> {{'Actions'|translate}} </th>\n <td mat-cell *matCellDef=\"let row\" > \n <div class=\"actions-cell\">\n <button mat-button (click)=\"settings(row.id)\">\n <mat-icon>settings</mat-icon>{{'Settings' | translate}}\n </button>\n <button mat-button (click)=\"detail(row.id)\">\n <mat-icon>info</mat-icon>{{'Detail' | translate}}\n </button>\n <button mat-button (click)=\"edit(row.id)\">\n <mat-icon>edit</mat-icon>{{'Edit' | translate}}\n </button>\n <button mat-button (click)=\"properties(row.id)\">\n <mat-icon>data_object</mat-icon>{{'Properties' | translate}}\n </button>\n <button mat-icon-button [matMenuTriggerFor]=\"appMenu\" [matMenuTriggerData]=\"{id: row.id, status: row.status}\">\n <mat-icon>more_vert</mat-icon>\n </button>\n </div>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\n </table>\n <mat-paginator [pageSize]=\"table.pageSize\" [pageIndex]=\"table.pageIndex\" \n [pageSizeOptions]=\"table.pageSizeOptions\"\n [length]=\"table.totalElements ? table.totalElements : 0\" \n (page)=\"table.onPaginationEvent($event)\"\n aria-label=\"Items per page\"\n showFirstLastButtons>\n </mat-paginator>\n\n</div>\n<mat-menu #appMenu=\"matMenu\" class=\"minimum-density\">\n <ng-template matMenuContent let-id=\"id\" let-status=\"status\">\n <button *ngIf=\"canApproval(status)\" class=\"color-success\" mat-menu-item (click)=\"approve(id)\">\n <mat-icon>check_circle_outline</mat-icon>{{'Approve' | translate}}\n </button>\n <button *ngIf=\"canApproval(status)\" class=\"color-warn\" mat-menu-item (click)=\"reject(id)\">\n <mat-icon>highlight_off</mat-icon>{{'Reject' | translate}}\n </button>\n <button *ngIf=\"canActivate(status)\" class=\"color-success\" mat-menu-item (click)=\"activate(id)\">\n <mat-icon>present_to_all</mat-icon>{{'Activate' | translate}}\n </button>\n <button *ngIf=\"canReactivate(status)\" class=\"color-success\" mat-menu-item (click)=\"reactivate(id)\">\n <mat-icon >present_to_all</mat-icon>{{'Activate' | translate}}\n </button>\n <button *ngIf=\"canDeactivate(status)\" class=\"color-warn\" mat-menu-item (click)=\"deactivate(id)\">\n <mat-icon >cancel_presentation</mat-icon>{{'Deactivate' | translate}}\n </button>\n <button *ngIf=\"canSuspend(status)\" class=\"color-warn\" mat-menu-item (click)=\"suspend(id)\">\n <mat-icon >cancel_presentation</mat-icon>{{'Suspend' | translate}}\n </button>\n <button [disabled]=\"!canAbandon(status)\" mat-menu-item (click)=\"abandon(id)\" class=\"color-warn\">\n <mat-icon >delete</mat-icon>{{'Abandon' | translate}}\n </button>\n <button *ngIf=\"canDelete(status)\" class=\"color-warn\" mat-menu-item (click)=\"delete(id)\">\n <mat-icon >delete</mat-icon>{{'Delete' | translate}}\n </button>\n </ng-template>\n</mat-menu>", styles: [":host{display:block}mat-form-field{width:100%}.additional-selection{opacity:.75;font-size:.75em;line-height:0}.clear-statuses{padding:10px;cursor:pointer}.button-cell,.actions-cell{display:flex;align-items:center;padding-top:2px;padding-bottom:2px}.button-cell{justify-content:space-between}.actions-cell{justify-content:center}.actions-cell .mdc-button{padding-top:20px;padding-bottom:20px}.table-form{display:flex;flex-direction:row;align-items:center}.table-form mat-card-actions{flex:1 1 auto}.mat-mdc-menu-item{min-height:38px}.controls{display:flex}.controls .control-buttons{flex:1;display:flex;flex-direction:column}.controls .control-buttons .control-buttons-container{flex:1;display:flex;align-items:center;justify-content:flex-end}.controls .spacer{height:22px}\n"] }]
|
|
711
753
|
}], ctorParameters: function () { return [{ type: TenantAdminService }, { type: i2.Router }, { type: i2.ActivatedRoute }, { type: i3$1.Location }, { type: i2.UrlSerializer }, { type: i4$2.FormBuilder }, { type: i4.MatDialog }, { type: i6.MatSnackBar }, { type: i7.TranslateService }, { type: TenantConfiguration }]; }, propDecorators: { paginator: [{
|
|
712
754
|
type: ViewChild,
|
|
713
755
|
args: [MatPaginator]
|
|
@@ -736,11 +778,11 @@ class TenantDetailComponent {
|
|
|
736
778
|
this.loadTenant(this.tenantIdentifier);
|
|
737
779
|
}
|
|
738
780
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TenantDetailComponent, deps: [{ token: TenantAdminService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
739
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TenantDetailComponent, selector: "juice-tenant-detail", inputs: { tenantIdentifier: "tenantIdentifier" }, usesOnChanges: true, ngImport: i0, template: "<h2 mat-dialog-title>{{ 'Organization information' | translate }}</h2>\n\n<mat-dialog-content *ngIf=\"tenant\">\n <h3>{{ tenant.name }}</h3>\n\n <mat-list>\n <mat-list-item>\n <span matListItemTitle>{{ 'Unique Id' | translate }}</span>\n <span matListItemLine>{{ tenant.id }} \n <button style=\"margin-left: 6px;\" mat-icon-button [cdkCopyToClipboard]=\"tenant.id\" \n [attr.aria-label]=\"'Copy' | translate\">\n <mat-icon>content_copy</mat-icon>\n </button>\n </span>\n </mat-list-item>\n\n <mat-list-item>\n <span matListItemTitle>{{ 'Identifier' | translate }}</span>\n <span matListItemLine>{{ tenant.identifier }}</span>\n </mat-list-item>\n\n <mat-list-item>\n <span matListItemTitle>{{ 'Status' | translate }}</span>\n <span matListItemLine [class]=\"statusHelper.getColor(tenant.status)\">{{ tenant.status }}</span>\n </mat-list-item>\n\n <mat-list-item>\n <span matListItemTitle>{{ '
|
|
781
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TenantDetailComponent, selector: "juice-tenant-detail", inputs: { tenantIdentifier: "tenantIdentifier" }, usesOnChanges: true, ngImport: i0, template: "<h2 mat-dialog-title>{{ 'Organization information' | translate }}</h2>\n\n<mat-dialog-content *ngIf=\"tenant\">\n <h3>{{ tenant.name }}</h3>\n\n <mat-list>\n <mat-list-item>\n <span matListItemTitle>{{ 'Unique Id' | translate }}</span>\n <span matListItemLine>{{ tenant.id }} \n <button style=\"margin-left: 6px;\" mat-icon-button [cdkCopyToClipboard]=\"tenant.id\" \n [attr.aria-label]=\"'Copy' | translate\">\n <mat-icon>content_copy</mat-icon>\n </button>\n </span>\n </mat-list-item>\n\n <mat-list-item>\n <span matListItemTitle>{{ 'Identifier' | translate }}</span>\n <span matListItemLine>{{ tenant.identifier }}</span>\n </mat-list-item>\n\n <mat-list-item>\n <span matListItemTitle>{{ 'Status' | translate }}</span>\n <span matListItemLine [class]=\"statusHelper.getColor(tenant.status)\">{{ tenant.status }}</span>\n </mat-list-item>\n\n <mat-list-item>\n <span matListItemTitle>{{ 'Owner' | translate }}</span>\n <span matListItemLine>{{ tenant.ownerName }}</span>\n </mat-list-item>\n\n <mat-list-item>\n <span matListItemTitle>{{ 'Properties' | translate }}</span>\n <span matListItemLine *ngFor=\"let property of properties | keyvalue\">\n {{ property.key }}: {{ property.value }}\n </span>\n </mat-list-item>\n </mat-list>\n</mat-dialog-content>\n<mat-dialog-actions align=\"end\">\n <button mat-raised-button mat-dialog-close>{{ 'Close' | translate }}</button>\n</mat-dialog-actions>", styles: [":host{display:block}\n"], dependencies: [{ kind: "directive", type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i4.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i4.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i4.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i4.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i6$1.MatList, selector: "mat-list", exportAs: ["matList"] }, { kind: "component", type: i6$1.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "directive", type: i6$1.MatListItemLine, selector: "[matListItemLine]" }, { kind: "directive", type: i6$1.MatListItemTitle, selector: "[matListItemTitle]" }, { kind: "directive", type: i18.CdkCopyToClipboard, selector: "[cdkCopyToClipboard]", inputs: ["cdkCopyToClipboard", "cdkCopyToClipboardAttempts"], outputs: ["cdkCopyToClipboardCopied"] }, { kind: "pipe", type: i7.TranslatePipe, name: "translate" }, { kind: "pipe", type: i3$1.KeyValuePipe, name: "keyvalue" }] }); }
|
|
740
782
|
}
|
|
741
783
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TenantDetailComponent, decorators: [{
|
|
742
784
|
type: Component,
|
|
743
|
-
args: [{ selector: 'juice-tenant-detail', template: "<h2 mat-dialog-title>{{ 'Organization information' | translate }}</h2>\n\n<mat-dialog-content *ngIf=\"tenant\">\n <h3>{{ tenant.name }}</h3>\n\n <mat-list>\n <mat-list-item>\n <span matListItemTitle>{{ 'Unique Id' | translate }}</span>\n <span matListItemLine>{{ tenant.id }} \n <button style=\"margin-left: 6px;\" mat-icon-button [cdkCopyToClipboard]=\"tenant.id\" \n [attr.aria-label]=\"'Copy' | translate\">\n <mat-icon>content_copy</mat-icon>\n </button>\n </span>\n </mat-list-item>\n\n <mat-list-item>\n <span matListItemTitle>{{ 'Identifier' | translate }}</span>\n <span matListItemLine>{{ tenant.identifier }}</span>\n </mat-list-item>\n\n <mat-list-item>\n <span matListItemTitle>{{ 'Status' | translate }}</span>\n <span matListItemLine [class]=\"statusHelper.getColor(tenant.status)\">{{ tenant.status }}</span>\n </mat-list-item>\n\n <mat-list-item>\n <span matListItemTitle>{{ '
|
|
785
|
+
args: [{ selector: 'juice-tenant-detail', template: "<h2 mat-dialog-title>{{ 'Organization information' | translate }}</h2>\n\n<mat-dialog-content *ngIf=\"tenant\">\n <h3>{{ tenant.name }}</h3>\n\n <mat-list>\n <mat-list-item>\n <span matListItemTitle>{{ 'Unique Id' | translate }}</span>\n <span matListItemLine>{{ tenant.id }} \n <button style=\"margin-left: 6px;\" mat-icon-button [cdkCopyToClipboard]=\"tenant.id\" \n [attr.aria-label]=\"'Copy' | translate\">\n <mat-icon>content_copy</mat-icon>\n </button>\n </span>\n </mat-list-item>\n\n <mat-list-item>\n <span matListItemTitle>{{ 'Identifier' | translate }}</span>\n <span matListItemLine>{{ tenant.identifier }}</span>\n </mat-list-item>\n\n <mat-list-item>\n <span matListItemTitle>{{ 'Status' | translate }}</span>\n <span matListItemLine [class]=\"statusHelper.getColor(tenant.status)\">{{ tenant.status }}</span>\n </mat-list-item>\n\n <mat-list-item>\n <span matListItemTitle>{{ 'Owner' | translate }}</span>\n <span matListItemLine>{{ tenant.ownerName }}</span>\n </mat-list-item>\n\n <mat-list-item>\n <span matListItemTitle>{{ 'Properties' | translate }}</span>\n <span matListItemLine *ngFor=\"let property of properties | keyvalue\">\n {{ property.key }}: {{ property.value }}\n </span>\n </mat-list-item>\n </mat-list>\n</mat-dialog-content>\n<mat-dialog-actions align=\"end\">\n <button mat-raised-button mat-dialog-close>{{ 'Close' | translate }}</button>\n</mat-dialog-actions>", styles: [":host{display:block}\n"] }]
|
|
744
786
|
}], ctorParameters: function () { return [{ type: TenantAdminService }]; }, propDecorators: { tenantIdentifier: [{
|
|
745
787
|
type: Input
|
|
746
788
|
}] } });
|
|
@@ -772,7 +814,6 @@ class TenantCreate {
|
|
|
772
814
|
constructor() {
|
|
773
815
|
this.name = "";
|
|
774
816
|
this.identifier = "";
|
|
775
|
-
this.connectionString = "";
|
|
776
817
|
this.adminUser = "";
|
|
777
818
|
this.adminEmail = "";
|
|
778
819
|
this.properties = {};
|
|
@@ -797,12 +838,14 @@ class TenantCreateComponent {
|
|
|
797
838
|
constructor(tenantService) {
|
|
798
839
|
this.tenantService = tenantService;
|
|
799
840
|
this.model = new TenantCreate();
|
|
841
|
+
this.userFormControl = new FormControl('', [Validators.pattern(/^[a-zA-Z0-9@]+$/)]);
|
|
800
842
|
this.emailFormControl = new FormControl('', [Validators.email]);
|
|
801
843
|
this.identifierFormControl = new FormControl('', [Validators.required]);
|
|
802
844
|
this.nameFormControl = new FormControl('', [Validators.required]);
|
|
803
845
|
this.createForm = new FormGroup({
|
|
804
846
|
identifier: this.identifierFormControl,
|
|
805
847
|
name: this.nameFormControl,
|
|
848
|
+
user: this.userFormControl,
|
|
806
849
|
email: this.emailFormControl
|
|
807
850
|
});
|
|
808
851
|
this.matcher = new CustomErrorStateMatcher();
|
|
@@ -815,6 +858,7 @@ class TenantCreateComponent {
|
|
|
815
858
|
var value = this.createForm.value;
|
|
816
859
|
this.model.identifier = value.identifier ?? '';
|
|
817
860
|
this.model.name = value.name ?? '';
|
|
861
|
+
this.model.adminUser = value.user ?? '';
|
|
818
862
|
this.model.adminEmail = value.email ?? '';
|
|
819
863
|
}
|
|
820
864
|
submit() {
|
|
@@ -837,11 +881,11 @@ class TenantCreateComponent {
|
|
|
837
881
|
this.cancelled.emit();
|
|
838
882
|
}
|
|
839
883
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TenantCreateComponent, deps: [{ token: TenantAdminService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
840
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TenantCreateComponent, selector: "juice-tenant-create", outputs: { created: "created", cancelled: "cancelled" }, ngImport: i0, template: "<h2 mat-dialog-title>{{ 'Create new organization' | translate }}</h2>\n\n<mat-dialog-content>\n <mat-form-field>\n <mat-label>{{ 'Identifier' | translate }}</mat-label>\n <input matInput [formControl]=\"identifierFormControl\" [errorStateMatcher]=\"matcher\">\n <mat-error *ngIf=\"identifierFormControl.hasError('required')\">\n {{ 'Please enter an identifier' | translate }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>{{ 'Organization name' | translate }}</mat-label>\n <input matInput [formControl]=\"nameFormControl\" [errorStateMatcher]=\"matcher\">\n <mat-error *ngIf=\"nameFormControl.hasError('required')\">\n {{ 'Please enter a name' | translate }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>{{ 'Admin user' | translate }}</mat-label>\n <input matInput [(ngModel)]=\"model.
|
|
884
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TenantCreateComponent, selector: "juice-tenant-create", outputs: { created: "created", cancelled: "cancelled" }, ngImport: i0, template: "<h2 mat-dialog-title>{{ 'Create new organization' | translate }}</h2>\n\n<mat-dialog-content>\n <mat-form-field>\n <mat-label>{{ 'Identifier' | translate }}</mat-label>\n <input matInput [formControl]=\"identifierFormControl\" [errorStateMatcher]=\"matcher\">\n <mat-error *ngIf=\"identifierFormControl.hasError('required')\">\n {{ 'Please enter an identifier' | translate }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>{{ 'Organization name' | translate }}</mat-label>\n <input matInput [formControl]=\"nameFormControl\" [errorStateMatcher]=\"matcher\">\n <mat-error *ngIf=\"nameFormControl.hasError('required')\">\n {{ 'Please enter a name' | translate }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>{{ 'Admin user' | translate }}</mat-label>\n <input matInput [formControl]=\"userFormControl\" [errorStateMatcher]=\"matcher\">\n <mat-error *ngIf=\"userFormControl.hasError('email') && !emailFormControl.hasError('required')\">\n {{ 'Please enter a valid user name' | translate }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>{{ 'Admin password' | translate }}</mat-label>\n <input matInput type=\"password\" [(ngModel)]=\"model.properties.AdminPassword\">\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>{{ 'Admin email' | translate }}</mat-label>\n <input matInput [formControl]=\"emailFormControl\" [errorStateMatcher]=\"matcher\">\n <mat-error *ngIf=\"emailFormControl.hasError('email') && !emailFormControl.hasError('required')\">\n {{ 'Please enter a valid email address' | translate }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>{{ 'DB connection' | translate }}</mat-label>\n <input matInput [(ngModel)]=\"model.properties.ConnectionString\">\n </mat-form-field>\n</mat-dialog-content>\n<mat-dialog-actions align=\"end\">\n <button mat-raised-button color=\"primary\" (click)=\"submit()\" [disabled]=\"createForm.invalid\"><mat-icon>save</mat-icon>{{ 'Submit' | translate }}</button>\n <button mat-raised-button (click)=\"cancel()\"><mat-icon>cancel</mat-icon>{{ 'Cancel' | translate }}</button>\n</mat-dialog-actions>\n", styles: [":host{display:block}mat-form-field{width:100%}.mat-mdc-button-base{margin:0 8px 8px 0}\n"], dependencies: [{ kind: "directive", type: i4$2.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: i4$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i4$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i4.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i4.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i4.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i7$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: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "directive", type: i8.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "pipe", type: i7.TranslatePipe, name: "translate" }] }); }
|
|
841
885
|
}
|
|
842
886
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TenantCreateComponent, decorators: [{
|
|
843
887
|
type: Component,
|
|
844
|
-
args: [{ selector: 'juice-tenant-create', template: "<h2 mat-dialog-title>{{ 'Create new organization' | translate }}</h2>\n\n<mat-dialog-content>\n <mat-form-field>\n <mat-label>{{ 'Identifier' | translate }}</mat-label>\n <input matInput [formControl]=\"identifierFormControl\" [errorStateMatcher]=\"matcher\">\n <mat-error *ngIf=\"identifierFormControl.hasError('required')\">\n {{ 'Please enter an identifier' | translate }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>{{ 'Organization name' | translate }}</mat-label>\n <input matInput [formControl]=\"nameFormControl\" [errorStateMatcher]=\"matcher\">\n <mat-error *ngIf=\"nameFormControl.hasError('required')\">\n {{ 'Please enter a name' | translate }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>{{ 'Admin user' | translate }}</mat-label>\n <input matInput [(ngModel)]=\"model.
|
|
888
|
+
args: [{ selector: 'juice-tenant-create', template: "<h2 mat-dialog-title>{{ 'Create new organization' | translate }}</h2>\n\n<mat-dialog-content>\n <mat-form-field>\n <mat-label>{{ 'Identifier' | translate }}</mat-label>\n <input matInput [formControl]=\"identifierFormControl\" [errorStateMatcher]=\"matcher\">\n <mat-error *ngIf=\"identifierFormControl.hasError('required')\">\n {{ 'Please enter an identifier' | translate }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>{{ 'Organization name' | translate }}</mat-label>\n <input matInput [formControl]=\"nameFormControl\" [errorStateMatcher]=\"matcher\">\n <mat-error *ngIf=\"nameFormControl.hasError('required')\">\n {{ 'Please enter a name' | translate }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>{{ 'Admin user' | translate }}</mat-label>\n <input matInput [formControl]=\"userFormControl\" [errorStateMatcher]=\"matcher\">\n <mat-error *ngIf=\"userFormControl.hasError('email') && !emailFormControl.hasError('required')\">\n {{ 'Please enter a valid user name' | translate }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>{{ 'Admin password' | translate }}</mat-label>\n <input matInput type=\"password\" [(ngModel)]=\"model.properties.AdminPassword\">\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>{{ 'Admin email' | translate }}</mat-label>\n <input matInput [formControl]=\"emailFormControl\" [errorStateMatcher]=\"matcher\">\n <mat-error *ngIf=\"emailFormControl.hasError('email') && !emailFormControl.hasError('required')\">\n {{ 'Please enter a valid email address' | translate }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>{{ 'DB connection' | translate }}</mat-label>\n <input matInput [(ngModel)]=\"model.properties.ConnectionString\">\n </mat-form-field>\n</mat-dialog-content>\n<mat-dialog-actions align=\"end\">\n <button mat-raised-button color=\"primary\" (click)=\"submit()\" [disabled]=\"createForm.invalid\"><mat-icon>save</mat-icon>{{ 'Submit' | translate }}</button>\n <button mat-raised-button (click)=\"cancel()\"><mat-icon>cancel</mat-icon>{{ 'Cancel' | translate }}</button>\n</mat-dialog-actions>\n", styles: [":host{display:block}mat-form-field{width:100%}.mat-mdc-button-base{margin:0 8px 8px 0}\n"] }]
|
|
845
889
|
}], ctorParameters: function () { return [{ type: TenantAdminService }]; }, propDecorators: { created: [{
|
|
846
890
|
type: Output
|
|
847
891
|
}], cancelled: [{
|
|
@@ -852,7 +896,6 @@ class TenantUpdate {
|
|
|
852
896
|
constructor() {
|
|
853
897
|
this.name = "";
|
|
854
898
|
this.identifier = "";
|
|
855
|
-
this.connectionString = "";
|
|
856
899
|
}
|
|
857
900
|
}
|
|
858
901
|
|
|
@@ -862,11 +905,9 @@ class TenantUpdateComponent {
|
|
|
862
905
|
this.model = new TenantUpdate();
|
|
863
906
|
this.identifierFormControl = new FormControl(this.model.identifier, [Validators.required]);
|
|
864
907
|
this.nameFormControl = new FormControl(this.model.name, [Validators.required]);
|
|
865
|
-
this.coneectionFormControl = new FormControl(this.model.connectionString, []);
|
|
866
908
|
this.updateForm = new FormGroup({
|
|
867
909
|
identifier: this.identifierFormControl,
|
|
868
910
|
name: this.nameFormControl,
|
|
869
|
-
connectionString: this.coneectionFormControl
|
|
870
911
|
});
|
|
871
912
|
this.matcher = new CustomErrorStateMatcher();
|
|
872
913
|
this.updated = new EventEmitter();
|
|
@@ -885,7 +926,6 @@ class TenantUpdateComponent {
|
|
|
885
926
|
var value = this.updateForm.value;
|
|
886
927
|
this.model.identifier = value.identifier ?? '';
|
|
887
928
|
this.model.name = value.name ?? '';
|
|
888
|
-
this.model.connectionString = value.connectionString ?? '';
|
|
889
929
|
}
|
|
890
930
|
// for modal control
|
|
891
931
|
setId(value) {
|
|
@@ -906,11 +946,11 @@ class TenantUpdateComponent {
|
|
|
906
946
|
this.cancelled.emit(this.id);
|
|
907
947
|
}
|
|
908
948
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TenantUpdateComponent, deps: [{ token: TenantAdminService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
909
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TenantUpdateComponent, selector: "juice-tenant-update", inputs: { id: "id" }, outputs: { updated: "updated", cancelled: "cancelled" }, usesOnChanges: true, ngImport: i0, template: "\n<h2 mat-dialog-title>{{ 'Update organization information' | translate }}</h2>\n\n<mat-dialog-content>\n <mat-form-field>\n <mat-label>{{ 'Identifier' | translate }}</mat-label>\n <input matInput [formControl]=\"identifierFormControl\" [errorStateMatcher]=\"matcher\">\n <mat-error *ngIf=\"identifierFormControl.hasError('required')\">\n {{ 'Please enter an identifier' | translate }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>{{ 'Organization name' | translate }}</mat-label>\n <input matInput [formControl]=\"nameFormControl\" [errorStateMatcher]=\"matcher\">\n <mat-error *ngIf=\"nameFormControl.hasError('required')\">\n {{ 'Please enter a name' | translate }}\n </mat-error>\n </mat-form-field>\n
|
|
949
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TenantUpdateComponent, selector: "juice-tenant-update", inputs: { id: "id" }, outputs: { updated: "updated", cancelled: "cancelled" }, usesOnChanges: true, ngImport: i0, template: "\n<h2 mat-dialog-title>{{ 'Update organization information' | translate }}</h2>\n\n<mat-dialog-content>\n <mat-form-field>\n <mat-label>{{ 'Identifier' | translate }}</mat-label>\n <input matInput [formControl]=\"identifierFormControl\" [errorStateMatcher]=\"matcher\">\n <mat-error *ngIf=\"identifierFormControl.hasError('required')\">\n {{ 'Please enter an identifier' | translate }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>{{ 'Organization name' | translate }}</mat-label>\n <input matInput [formControl]=\"nameFormControl\" [errorStateMatcher]=\"matcher\">\n <mat-error *ngIf=\"nameFormControl.hasError('required')\">\n {{ 'Please enter a name' | translate }}\n </mat-error>\n </mat-form-field>\n</mat-dialog-content>\n\n<mat-dialog-actions align=\"end\">\n <button mat-raised-button color=\"primary\" (click)=\"submit()\" [disabled]=\"updateForm.invalid\"><mat-icon>save</mat-icon>{{ 'Submit' | translate }}</button>\n <button mat-raised-button (click)=\"cancel()\"><mat-icon>cancel</mat-icon>{{ 'Cancel' | translate }}</button>\n</mat-dialog-actions>", styles: [":host{display:block}mat-form-field{width:100%}.mat-mdc-button-base{margin:0 8px 8px 0}\n"], dependencies: [{ kind: "directive", type: i4$2.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: i4$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i4.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i4.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i4.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i7$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: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "directive", type: i8.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "pipe", type: i7.TranslatePipe, name: "translate" }] }); }
|
|
910
950
|
}
|
|
911
951
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TenantUpdateComponent, decorators: [{
|
|
912
952
|
type: Component,
|
|
913
|
-
args: [{ selector: 'juice-tenant-update', template: "\n<h2 mat-dialog-title>{{ 'Update organization information' | translate }}</h2>\n\n<mat-dialog-content>\n <mat-form-field>\n <mat-label>{{ 'Identifier' | translate }}</mat-label>\n <input matInput [formControl]=\"identifierFormControl\" [errorStateMatcher]=\"matcher\">\n <mat-error *ngIf=\"identifierFormControl.hasError('required')\">\n {{ 'Please enter an identifier' | translate }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>{{ 'Organization name' | translate }}</mat-label>\n <input matInput [formControl]=\"nameFormControl\" [errorStateMatcher]=\"matcher\">\n <mat-error *ngIf=\"nameFormControl.hasError('required')\">\n {{ 'Please enter a name' | translate }}\n </mat-error>\n </mat-form-field>\n
|
|
953
|
+
args: [{ selector: 'juice-tenant-update', template: "\n<h2 mat-dialog-title>{{ 'Update organization information' | translate }}</h2>\n\n<mat-dialog-content>\n <mat-form-field>\n <mat-label>{{ 'Identifier' | translate }}</mat-label>\n <input matInput [formControl]=\"identifierFormControl\" [errorStateMatcher]=\"matcher\">\n <mat-error *ngIf=\"identifierFormControl.hasError('required')\">\n {{ 'Please enter an identifier' | translate }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>{{ 'Organization name' | translate }}</mat-label>\n <input matInput [formControl]=\"nameFormControl\" [errorStateMatcher]=\"matcher\">\n <mat-error *ngIf=\"nameFormControl.hasError('required')\">\n {{ 'Please enter a name' | translate }}\n </mat-error>\n </mat-form-field>\n</mat-dialog-content>\n\n<mat-dialog-actions align=\"end\">\n <button mat-raised-button color=\"primary\" (click)=\"submit()\" [disabled]=\"updateForm.invalid\"><mat-icon>save</mat-icon>{{ 'Submit' | translate }}</button>\n <button mat-raised-button (click)=\"cancel()\"><mat-icon>cancel</mat-icon>{{ 'Cancel' | translate }}</button>\n</mat-dialog-actions>", styles: [":host{display:block}mat-form-field{width:100%}.mat-mdc-button-base{margin:0 8px 8px 0}\n"] }]
|
|
914
954
|
}], ctorParameters: function () { return [{ type: TenantAdminService }]; }, propDecorators: { id: [{
|
|
915
955
|
type: Input
|
|
916
956
|
}], updated: [{
|