@brggroup/share-lib 0.1.52 → 0.1.53
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/fesm2022/brggroup-share-lib.mjs +172 -131
- package/fesm2022/brggroup-share-lib.mjs.map +1 -1
- package/lib/admin/component/permission/permission.component.d.ts +8 -0
- package/lib/admin/component/permission/permission.component.d.ts.map +1 -1
- package/lib/admin/component/permission/role-permission/role-permission.component.d.ts.map +1 -1
- package/lib/admin/component/permission/user-role/user-role.d.ts +2 -2
- package/lib/admin/component/permission/user-role/user-role.d.ts.map +1 -1
- package/lib/{services → admin/service}/file.service.d.ts +4 -4
- package/lib/admin/service/file.service.d.ts.map +1 -0
- package/lib/auth/auth-abac.d.ts.map +1 -1
- package/lib/auth/auth.service.d.ts +2 -1
- package/lib/auth/auth.service.d.ts.map +1 -1
- package/lib/auth/has-permission.pipe.d.ts +1 -0
- package/lib/auth/has-permission.pipe.d.ts.map +1 -1
- package/lib/auth/permission.service.d.ts +1 -0
- package/lib/auth/permission.service.d.ts.map +1 -1
- package/lib/components/layout/header/user/user.d.ts +1 -1
- package/lib/components/layout/header/user/user.d.ts.map +1 -1
- package/lib/components/layout/layout.component.d.ts +1 -1
- package/lib/components/layout/layout.component.d.ts.map +1 -1
- package/lib/components/login/login.component.d.ts +2 -2
- package/lib/components/login/login.component.d.ts.map +1 -1
- package/lib/model.d.ts +0 -18
- package/lib/model.d.ts.map +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/public-api.d.ts.map +1 -1
- package/lib/services/file.service.d.ts.map +0 -1
|
@@ -69,6 +69,8 @@ import { NzAutocompleteModule } from 'ng-zorro-antd/auto-complete';
|
|
|
69
69
|
import * as i4$2 from 'ng-zorro-antd/core/wave';
|
|
70
70
|
import * as i1$9 from 'ng-zorro-antd/tabs';
|
|
71
71
|
import { NzTabsModule } from 'ng-zorro-antd/tabs';
|
|
72
|
+
import * as i12 from '@angular/cdk/clipboard';
|
|
73
|
+
import { ClipboardModule } from '@angular/cdk/clipboard';
|
|
72
74
|
import * as i18 from 'ng-zorro-antd/popconfirm';
|
|
73
75
|
import { NzPopconfirmModule } from 'ng-zorro-antd/popconfirm';
|
|
74
76
|
import * as XLSX from 'xlsx';
|
|
@@ -827,7 +829,7 @@ function checkPermission(user, rules, resource, action, data) {
|
|
|
827
829
|
// Xử lý an toàn: Các mã quyền chứa '_own' bắt buộc phải có luật kiểm tra dữ liệu.
|
|
828
830
|
// Nếu không có luật -> CHẶN NGAY LẬP TỨC (Fail-Closed).
|
|
829
831
|
if (permCode.includes('_own')) {
|
|
830
|
-
console.error(`[Security Warning]: Thiếu khai báo rule cho quyền "${permCode}" trong APP_PERMISSION_RULES
|
|
832
|
+
console.error(`[Security Warning]: Thiếu khai báo rule cho quyền "${permCode}" trong APP_PERMISSION_RULES.`);
|
|
831
833
|
return false;
|
|
832
834
|
}
|
|
833
835
|
// Với các quyền toàn cục như '_all', 'create', 'export' -> Bỏ qua, cho phép hiển thị
|
|
@@ -852,6 +854,7 @@ function checkRole(user, expectedRole) {
|
|
|
852
854
|
}
|
|
853
855
|
|
|
854
856
|
let PermissionService$1 = class PermissionService {
|
|
857
|
+
static debug = false;
|
|
855
858
|
cms = inject(CommonService);
|
|
856
859
|
currentUser$ = new BehaviorSubject(null);
|
|
857
860
|
// Hứng luật từ App. Nếu App không truyền thì lấy object rỗng {}
|
|
@@ -3525,26 +3528,6 @@ class CheckModel {
|
|
|
3525
3528
|
ErrorMessage = '';
|
|
3526
3529
|
ErrorContent = '';
|
|
3527
3530
|
}
|
|
3528
|
-
class App_Org {
|
|
3529
|
-
// #region properties
|
|
3530
|
-
App_Org_Id;
|
|
3531
|
-
CreatedDate;
|
|
3532
|
-
CreatedUser;
|
|
3533
|
-
UpdatedDate;
|
|
3534
|
-
UpdatedUser;
|
|
3535
|
-
IsActive;
|
|
3536
|
-
Code;
|
|
3537
|
-
Name;
|
|
3538
|
-
NameEn;
|
|
3539
|
-
Type;
|
|
3540
|
-
Address;
|
|
3541
|
-
Description;
|
|
3542
|
-
ParentId;
|
|
3543
|
-
OrderValue;
|
|
3544
|
-
// #endregion properties
|
|
3545
|
-
TreeNodeName;
|
|
3546
|
-
LstUserId;
|
|
3547
|
-
}
|
|
3548
3531
|
|
|
3549
3532
|
class ReadMoreProComponent {
|
|
3550
3533
|
text = '';
|
|
@@ -6954,7 +6937,7 @@ class RoleMenuPermission extends BaseComponent {
|
|
|
6954
6937
|
// Quản lý trạng thái Checkbox của từng cột (Role) trên Thead
|
|
6955
6938
|
roleColumnState = {};
|
|
6956
6939
|
ngOnInit() {
|
|
6957
|
-
this.getData();
|
|
6940
|
+
// this.getData();
|
|
6958
6941
|
}
|
|
6959
6942
|
getData() {
|
|
6960
6943
|
Promise.all([
|
|
@@ -7161,7 +7144,7 @@ class UserRolePermission extends BaseComponent {
|
|
|
7161
7144
|
// Lưu trữ trạng thái Checkbox của cột "Chọn tất cả" cho từng User để tránh gọi hàm trong HTML
|
|
7162
7145
|
userRowState = {};
|
|
7163
7146
|
ngOnInit() {
|
|
7164
|
-
this.getData();
|
|
7147
|
+
// this.getData();
|
|
7165
7148
|
}
|
|
7166
7149
|
getData() {
|
|
7167
7150
|
Promise.all([
|
|
@@ -7275,7 +7258,7 @@ class RolePermissionComponent extends BaseComponent {
|
|
|
7275
7258
|
// Lưu trữ danh sách PermissionCode đang được tích chọn cho Role hiện tại
|
|
7276
7259
|
selectedPermissionIds = new Set();
|
|
7277
7260
|
ngOnInit() {
|
|
7278
|
-
this.loadRoles();
|
|
7261
|
+
// this.loadRoles();
|
|
7279
7262
|
// this.loadAllResources(); // Load khung Matrix (danh mục Module & Actions)
|
|
7280
7263
|
}
|
|
7281
7264
|
// --- 1. Gọi API lấy danh sách Role động ---
|
|
@@ -7331,7 +7314,7 @@ class RolePermissionComponent extends BaseComponent {
|
|
|
7331
7314
|
.finally(() => (this.isSaving = false));
|
|
7332
7315
|
}
|
|
7333
7316
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: RolePermissionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
7334
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.7", type: RolePermissionComponent, isStandalone: true, selector: "role-resource-permission", usesInheritance: true, ngImport: i0, template: "<nz-card [nzBordered]=\"false\" nzTitle=\"C\u1EA5u h\u00ECnh Ph\u00E2n quy\u1EC1n H\u1EC7 th\u1ED1ng\">\r\n <div class=\"header-action\" nz-row nzJustify=\"space-between\" nzAlign=\"middle\" style=\"margin-bottom: 24px\">\r\n <div nz-col>\r\n <span style=\"margin-right: 16px; font-weight: bold\">Ch\u1ECDn Nh\u00F3m quy\u1EC1n (Role):</span>\r\n <nz-select\r\n [(ngModel)]=\"selectedId\"\r\n (ngModelChange)=\"onRoleChange($event)\"\r\n nzPlaceHolder=\"-- Vui l\u00F2ng ch\u1ECDn Role --\"\r\n style=\"width: 300px\"\r\n >\r\n <nz-option *ngFor=\"let role of lstRole\" [nzValue]=\"role.App_Role_Id\" [nzLabel]=\"role.Name || ''\"></nz-option>\r\n </nz-select>\r\n </div>\r\n <div nz-col>\r\n <button nz-button nzType=\"primary\" (click)=\"savePermissions()\" [nzLoading]=\"isSaving\" [disabled]=\"!selectedId\">\r\n <i nz-icon nzType=\"save\"></i> L\u01B0u c\u1EA5u h\u00ECnh\r\n </button>\r\n </div>\r\n </div>\r\n\r\n <nz-divider></nz-divider>\r\n\r\n <nz-spin [nzSpinning]=\"isLoading\">\r\n <div *ngIf=\"!selectedId\" style=\"text-align: center; color: #999; padding: 40px 0\">\r\n Vui l\u00F2ng ch\u1ECDn m\u1ED9t Nh\u00F3m quy\u1EC1n \u0111\u1EC3 xem v\u00E0 c\u1EA5u h\u00ECnh.\r\n </div>\r\n\r\n <div *ngIf=\"selectedId\">\r\n <div *ngFor=\"let group of resourceGroups\" style=\"margin-bottom: 24px\">\r\n <h4 style=\"border-left: 4px solid #1890ff; padding-left: 8px; margin-bottom: 16px\">\r\n {{ group.ResourceName }}\r\n </h4>\r\n\r\n <nz-card [nzBordered]=\"true\" nzSize=\"small\">\r\n <nz-row [nzGutter]=\"[16, 16]\">\r\n <nz-col [nzSpan]=\"6\" *ngFor=\"let perm of group.permissions\">\r\n <label\r\n nz-checkbox\r\n [nzChecked]=\"isPermissionChecked(perm.App_Permission_Id)\"\r\n (nzCheckedChange)=\"onCheckChange(perm.App_Permission_Id, $event)\"\r\n >\r\n {{ perm.PermissionName }} <br />\r\n <small style=\"color: #888\">
|
|
7317
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.7", type: RolePermissionComponent, isStandalone: true, selector: "role-resource-permission", usesInheritance: true, ngImport: i0, template: "<nz-card [nzBordered]=\"false\" nzTitle=\"C\u1EA5u h\u00ECnh Ph\u00E2n quy\u1EC1n H\u1EC7 th\u1ED1ng\">\r\n <div class=\"header-action\" nz-row nzJustify=\"space-between\" nzAlign=\"middle\" style=\"margin-bottom: 24px\">\r\n <div nz-col>\r\n <span style=\"margin-right: 16px; font-weight: bold\">Ch\u1ECDn Nh\u00F3m quy\u1EC1n (Role):</span>\r\n <nz-select\r\n [(ngModel)]=\"selectedId\"\r\n (ngModelChange)=\"onRoleChange($event)\"\r\n nzPlaceHolder=\"-- Vui l\u00F2ng ch\u1ECDn Role --\"\r\n style=\"width: 300px\"\r\n >\r\n <nz-option *ngFor=\"let role of lstRole\" [nzValue]=\"role.App_Role_Id\" [nzLabel]=\"role.Name || ''\"></nz-option>\r\n </nz-select>\r\n </div>\r\n <div nz-col>\r\n <button nz-button nzType=\"primary\" (click)=\"savePermissions()\" [nzLoading]=\"isSaving\" [disabled]=\"!selectedId\">\r\n <i nz-icon nzType=\"save\"></i> L\u01B0u c\u1EA5u h\u00ECnh\r\n </button>\r\n </div>\r\n </div>\r\n\r\n <nz-divider></nz-divider>\r\n\r\n <nz-spin [nzSpinning]=\"isLoading\">\r\n <div *ngIf=\"!selectedId\" style=\"text-align: center; color: #999; padding: 40px 0\">\r\n Vui l\u00F2ng ch\u1ECDn m\u1ED9t Nh\u00F3m quy\u1EC1n \u0111\u1EC3 xem v\u00E0 c\u1EA5u h\u00ECnh.\r\n </div>\r\n\r\n <div *ngIf=\"selectedId\">\r\n <div *ngFor=\"let group of resourceGroups\" style=\"margin-bottom: 24px\">\r\n <h4 style=\"border-left: 4px solid #1890ff; padding-left: 8px; margin-bottom: 16px\">\r\n {{ group.ResourceName }}\r\n </h4>\r\n\r\n <nz-card [nzBordered]=\"true\" nzSize=\"small\">\r\n <nz-row [nzGutter]=\"[16, 16]\">\r\n <nz-col [nzSpan]=\"6\" *ngFor=\"let perm of group.permissions\">\r\n <label\r\n nz-checkbox\r\n [nzChecked]=\"isPermissionChecked(perm.App_Permission_Id)\"\r\n (nzCheckedChange)=\"onCheckChange(perm.App_Permission_Id, $event)\"\r\n >\r\n {{ perm.PermissionName }} <br />\r\n <small style=\"color: #888\">{{ perm.PermissionCode }}</small>\r\n <button\r\n nz-button\r\n nzType=\"text\"\r\n cdkCopyToClipboard=\"{{ perm.PermissionCode }}\"\r\n (click)=\"$event.stopPropagation(); success('\u0110\u00E3 copy: ' + perm.PermissionCode)\"\r\n >\r\n <i nz-icon nzType=\"copy\" style=\"color: #888\"></i>\r\n </button>\r\n </label>\r\n </nz-col>\r\n </nz-row>\r\n </nz-card>\r\n </div>\r\n </div>\r\n </nz-spin>\r\n</nz-card>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: NzCardModule }, { kind: "component", type: i3$3.NzCardComponent, selector: "nz-card", inputs: ["nzBordered", "nzLoading", "nzHoverable", "nzBodyStyle", "nzCover", "nzActions", "nzType", "nzSize", "nzTitle", "nzExtra"], exportAs: ["nzCard"] }, { kind: "ngmodule", type: NzSelectModule }, { kind: "component", type: i6$2.NzOptionComponent, selector: "nz-option", inputs: ["nzTitle", "nzLabel", "nzValue", "nzKey", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }, { kind: "component", type: i6$2.NzSelectComponent, selector: "nz-select", inputs: ["nzId", "nzSize", "nzStatus", "nzOptionHeightPx", "nzOptionOverflowSize", "nzDropdownClassName", "nzDropdownMatchSelectWidth", "nzDropdownStyle", "nzNotFoundContent", "nzPlaceHolder", "nzPlacement", "nzMaxTagCount", "nzDropdownRender", "nzCustomTemplate", "nzSuffixIcon", "nzClearIcon", "nzRemoveIcon", "nzMenuItemSelectedIcon", "nzTokenSeparators", "nzMaxTagPlaceholder", "nzMaxMultipleCount", "nzMode", "nzFilterOption", "compareWith", "nzAllowClear", "nzBorderless", "nzShowSearch", "nzLoading", "nzAutoFocus", "nzAutoClearSearchValue", "nzServerSearch", "nzDisabled", "nzOpen", "nzSelectOnTab", "nzBackdrop", "nzOptions", "nzShowArrow"], outputs: ["nzOnSearch", "nzScrollToBottom", "nzOpenChange", "nzBlur", "nzFocus"], exportAs: ["nzSelect"] }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i2$2.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i3$2.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], nz-icon, [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i4$2.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "ngmodule", type: NzDividerModule }, { kind: "component", type: i8.NzDividerComponent, selector: "nz-divider", inputs: ["nzText", "nzType", "nzOrientation", "nzVariant", "nzDashed", "nzPlain"], exportAs: ["nzDivider"] }, { kind: "ngmodule", type: NzSpinModule }, { kind: "component", type: i2$1.NzSpinComponent, selector: "nz-spin", inputs: ["nzIndicator", "nzSize", "nzTip", "nzDelay", "nzSimple", "nzSpinning"], exportAs: ["nzSpin"] }, { kind: "ngmodule", type: NzGridModule }, { kind: "directive", type: i4.NzColDirective, selector: "[nz-col],nz-col,nz-form-control,nz-form-label", inputs: ["nzFlex", "nzSpan", "nzOrder", "nzOffset", "nzPush", "nzPull", "nzXs", "nzSm", "nzMd", "nzLg", "nzXl", "nzXXl"], exportAs: ["nzCol"] }, { kind: "directive", type: i4.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { kind: "ngmodule", type: NzCheckboxModule }, { kind: "component", type: i3.NzCheckboxComponent, selector: "[nz-checkbox]", inputs: ["nzValue", "nzAutoFocus", "nzDisabled", "nzIndeterminate", "nzChecked", "nzId", "nzName"], outputs: ["nzCheckedChange"], exportAs: ["nzCheckbox"] }, { kind: "ngmodule", type: ClipboardModule }, { kind: "directive", type: i12.CdkCopyToClipboard, selector: "[cdkCopyToClipboard]", inputs: ["cdkCopyToClipboard", "cdkCopyToClipboardAttempts"], outputs: ["cdkCopyToClipboardCopied"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i1$3.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }] });
|
|
7335
7318
|
}
|
|
7336
7319
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: RolePermissionComponent, decorators: [{
|
|
7337
7320
|
type: Component,
|
|
@@ -7345,7 +7328,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImpor
|
|
|
7345
7328
|
NzSpinModule,
|
|
7346
7329
|
NzGridModule,
|
|
7347
7330
|
NzCheckboxModule,
|
|
7348
|
-
|
|
7331
|
+
ClipboardModule,
|
|
7332
|
+
NzIconModule,
|
|
7333
|
+
], template: "<nz-card [nzBordered]=\"false\" nzTitle=\"C\u1EA5u h\u00ECnh Ph\u00E2n quy\u1EC1n H\u1EC7 th\u1ED1ng\">\r\n <div class=\"header-action\" nz-row nzJustify=\"space-between\" nzAlign=\"middle\" style=\"margin-bottom: 24px\">\r\n <div nz-col>\r\n <span style=\"margin-right: 16px; font-weight: bold\">Ch\u1ECDn Nh\u00F3m quy\u1EC1n (Role):</span>\r\n <nz-select\r\n [(ngModel)]=\"selectedId\"\r\n (ngModelChange)=\"onRoleChange($event)\"\r\n nzPlaceHolder=\"-- Vui l\u00F2ng ch\u1ECDn Role --\"\r\n style=\"width: 300px\"\r\n >\r\n <nz-option *ngFor=\"let role of lstRole\" [nzValue]=\"role.App_Role_Id\" [nzLabel]=\"role.Name || ''\"></nz-option>\r\n </nz-select>\r\n </div>\r\n <div nz-col>\r\n <button nz-button nzType=\"primary\" (click)=\"savePermissions()\" [nzLoading]=\"isSaving\" [disabled]=\"!selectedId\">\r\n <i nz-icon nzType=\"save\"></i> L\u01B0u c\u1EA5u h\u00ECnh\r\n </button>\r\n </div>\r\n </div>\r\n\r\n <nz-divider></nz-divider>\r\n\r\n <nz-spin [nzSpinning]=\"isLoading\">\r\n <div *ngIf=\"!selectedId\" style=\"text-align: center; color: #999; padding: 40px 0\">\r\n Vui l\u00F2ng ch\u1ECDn m\u1ED9t Nh\u00F3m quy\u1EC1n \u0111\u1EC3 xem v\u00E0 c\u1EA5u h\u00ECnh.\r\n </div>\r\n\r\n <div *ngIf=\"selectedId\">\r\n <div *ngFor=\"let group of resourceGroups\" style=\"margin-bottom: 24px\">\r\n <h4 style=\"border-left: 4px solid #1890ff; padding-left: 8px; margin-bottom: 16px\">\r\n {{ group.ResourceName }}\r\n </h4>\r\n\r\n <nz-card [nzBordered]=\"true\" nzSize=\"small\">\r\n <nz-row [nzGutter]=\"[16, 16]\">\r\n <nz-col [nzSpan]=\"6\" *ngFor=\"let perm of group.permissions\">\r\n <label\r\n nz-checkbox\r\n [nzChecked]=\"isPermissionChecked(perm.App_Permission_Id)\"\r\n (nzCheckedChange)=\"onCheckChange(perm.App_Permission_Id, $event)\"\r\n >\r\n {{ perm.PermissionName }} <br />\r\n <small style=\"color: #888\">{{ perm.PermissionCode }}</small>\r\n <button\r\n nz-button\r\n nzType=\"text\"\r\n cdkCopyToClipboard=\"{{ perm.PermissionCode }}\"\r\n (click)=\"$event.stopPropagation(); success('\u0110\u00E3 copy: ' + perm.PermissionCode)\"\r\n >\r\n <i nz-icon nzType=\"copy\" style=\"color: #888\"></i>\r\n </button>\r\n </label>\r\n </nz-col>\r\n </nz-row>\r\n </nz-card>\r\n </div>\r\n </div>\r\n </nz-spin>\r\n</nz-card>\r\n" }]
|
|
7349
7334
|
}] });
|
|
7350
7335
|
|
|
7351
7336
|
class PermissionManagerComponent extends BaseComponent {
|
|
@@ -7380,7 +7365,7 @@ class PermissionManagerComponent extends BaseComponent {
|
|
|
7380
7365
|
this.initBulkForm();
|
|
7381
7366
|
}
|
|
7382
7367
|
ngOnInit() {
|
|
7383
|
-
this.loadData();
|
|
7368
|
+
// this.loadData();
|
|
7384
7369
|
}
|
|
7385
7370
|
initBulkForm() {
|
|
7386
7371
|
this.bulkForm = this.fb.group({
|
|
@@ -7539,9 +7524,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImpor
|
|
|
7539
7524
|
}], ctorParameters: () => [{ type: i2.FormBuilder }, { type: PermissionService }] });
|
|
7540
7525
|
|
|
7541
7526
|
class PermissionComponent extends BaseComponent {
|
|
7527
|
+
userRole;
|
|
7528
|
+
roleMenu;
|
|
7529
|
+
resource;
|
|
7530
|
+
roleResource;
|
|
7542
7531
|
ngOnInit() {
|
|
7543
7532
|
this.tab = +(this.getUrlQueryParam('tab') || 0);
|
|
7544
|
-
|
|
7533
|
+
setTimeout(() => {
|
|
7534
|
+
this.onSelectedIndexChange(this.tab);
|
|
7535
|
+
}, 0);
|
|
7545
7536
|
}
|
|
7546
7537
|
ngOnDestroy() {
|
|
7547
7538
|
Breadcrumb.lstBreadcrumb = [];
|
|
@@ -7550,6 +7541,7 @@ class PermissionComponent extends BaseComponent {
|
|
|
7550
7541
|
onSelectedIndexChange(tabIndex) {
|
|
7551
7542
|
this.setQueryParam('tab', tabIndex + '');
|
|
7552
7543
|
if (tabIndex == 0) {
|
|
7544
|
+
this.userRole.getData();
|
|
7553
7545
|
Breadcrumb.lstBreadcrumb = [
|
|
7554
7546
|
{
|
|
7555
7547
|
Name: 'Permission',
|
|
@@ -7560,6 +7552,7 @@ class PermissionComponent extends BaseComponent {
|
|
|
7560
7552
|
];
|
|
7561
7553
|
}
|
|
7562
7554
|
else if (tabIndex == 1) {
|
|
7555
|
+
this.roleMenu.getData();
|
|
7563
7556
|
Breadcrumb.lstBreadcrumb = [
|
|
7564
7557
|
{
|
|
7565
7558
|
Name: 'Permission',
|
|
@@ -7570,6 +7563,7 @@ class PermissionComponent extends BaseComponent {
|
|
|
7570
7563
|
];
|
|
7571
7564
|
}
|
|
7572
7565
|
else if (tabIndex == 2) {
|
|
7566
|
+
this.resource.loadData();
|
|
7573
7567
|
Breadcrumb.lstBreadcrumb = [
|
|
7574
7568
|
{
|
|
7575
7569
|
Name: 'Permission',
|
|
@@ -7580,6 +7574,7 @@ class PermissionComponent extends BaseComponent {
|
|
|
7580
7574
|
];
|
|
7581
7575
|
}
|
|
7582
7576
|
else if (tabIndex == 3) {
|
|
7577
|
+
this.roleResource.loadRoles();
|
|
7583
7578
|
Breadcrumb.lstBreadcrumb = [
|
|
7584
7579
|
{
|
|
7585
7580
|
Name: 'Permission',
|
|
@@ -7591,17 +7586,60 @@ class PermissionComponent extends BaseComponent {
|
|
|
7591
7586
|
}
|
|
7592
7587
|
}
|
|
7593
7588
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: PermissionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
7594
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.7", type: PermissionComponent, isStandalone: true, selector: "app-permision", usesInheritance: true, ngImport: i0, template: "<div class=\"panel\">\r\n <nz-tabset\r\n nzType=\"card\"\r\n [nzSize]=\"'small'\"\r\n [nzSelectedIndex]=\"tab\"\r\n (nzSelectedIndexChange)=\"onSelectedIndexChange($event)\"\r\n >\r\n <nz-tab nzTitle=\"User - Role\">\r\n <app-user-role-permission></app-user-role-permission>\r\n </nz-tab>\r\n <nz-tab nzTitle=\"Role - Menu\">\r\n <app-role-menu-permission></app-role-menu-permission>\r\n </nz-tab>\r\n <nz-tab nzTitle=\"Resource permission\">\r\n <resource-permission></resource-permission>\r\n </nz-tab>\r\n <nz-tab nzTitle=\"Role - Resource permission\">\r\n <role-resource-permission></role-resource-permission>\r\n </nz-tab>\r\n </nz-tabset>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: NzTabsModule }, { kind: "component", type: i1$9.NzTabSetComponent, selector: "nz-tabset", inputs: ["nzSelectedIndex", "nzTabPosition", "nzTabBarExtraContent", "nzCanDeactivate", "nzAddIcon", "nzTabBarStyle", "nzType", "nzSize", "nzAnimated", "nzTabBarGutter", "nzHideAdd", "nzCentered", "nzHideAll", "nzLinkRouter", "nzLinkExact", "nzDestroyInactiveTabPane"], outputs: ["nzSelectChange", "nzSelectedIndexChange", "nzTabListScroll", "nzClose", "nzAdd"], exportAs: ["nzTabset"] }, { kind: "component", type: i1$9.NzTabComponent, selector: "nz-tab", inputs: ["nzTitle", "nzClosable", "nzCloseIcon", "nzDisabled", "nzForceRender"], outputs: ["nzSelect", "nzDeselect", "nzClick", "nzContextmenu"], exportAs: ["nzTab"] }, { kind: "component", type: UserRolePermission, selector: "app-user-role-permission" }, { kind: "component", type: RoleMenuPermission, selector: "app-role-menu-permission" }, { kind: "component", type: RolePermissionComponent, selector: "role-resource-permission" }, { kind: "component", type: PermissionManagerComponent, selector: "resource-permission" }] });
|
|
7589
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.7", type: PermissionComponent, isStandalone: true, selector: "app-permision", viewQueries: [{ propertyName: "userRole", first: true, predicate: ["userRole"], descendants: true }, { propertyName: "roleMenu", first: true, predicate: ["roleMenu"], descendants: true }, { propertyName: "resource", first: true, predicate: ["resource"], descendants: true }, { propertyName: "roleResource", first: true, predicate: ["roleResource"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"panel\">\r\n <nz-tabset\r\n nzType=\"card\"\r\n [nzSize]=\"'small'\"\r\n [nzSelectedIndex]=\"tab\"\r\n (nzSelectedIndexChange)=\"onSelectedIndexChange($event)\"\r\n >\r\n <nz-tab nzTitle=\"User - Role\">\r\n <app-user-role-permission #userRole></app-user-role-permission>\r\n </nz-tab>\r\n <nz-tab nzTitle=\"Role - Menu\">\r\n <app-role-menu-permission #roleMenu></app-role-menu-permission>\r\n </nz-tab>\r\n <nz-tab nzTitle=\"Resource permission\">\r\n <resource-permission #resource></resource-permission>\r\n </nz-tab>\r\n <nz-tab nzTitle=\"Role - Resource permission\">\r\n <role-resource-permission #roleResource></role-resource-permission>\r\n </nz-tab>\r\n </nz-tabset>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: NzTabsModule }, { kind: "component", type: i1$9.NzTabSetComponent, selector: "nz-tabset", inputs: ["nzSelectedIndex", "nzTabPosition", "nzTabBarExtraContent", "nzCanDeactivate", "nzAddIcon", "nzTabBarStyle", "nzType", "nzSize", "nzAnimated", "nzTabBarGutter", "nzHideAdd", "nzCentered", "nzHideAll", "nzLinkRouter", "nzLinkExact", "nzDestroyInactiveTabPane"], outputs: ["nzSelectChange", "nzSelectedIndexChange", "nzTabListScroll", "nzClose", "nzAdd"], exportAs: ["nzTabset"] }, { kind: "component", type: i1$9.NzTabComponent, selector: "nz-tab", inputs: ["nzTitle", "nzClosable", "nzCloseIcon", "nzDisabled", "nzForceRender"], outputs: ["nzSelect", "nzDeselect", "nzClick", "nzContextmenu"], exportAs: ["nzTab"] }, { kind: "component", type: UserRolePermission, selector: "app-user-role-permission" }, { kind: "component", type: RoleMenuPermission, selector: "app-role-menu-permission" }, { kind: "component", type: RolePermissionComponent, selector: "role-resource-permission" }, { kind: "component", type: PermissionManagerComponent, selector: "resource-permission" }] });
|
|
7595
7590
|
}
|
|
7596
7591
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: PermissionComponent, decorators: [{
|
|
7597
7592
|
type: Component,
|
|
7598
|
-
args: [{ selector: 'app-permision', imports: [NzTabsModule, UserRolePermission, RoleMenuPermission, RolePermissionComponent, PermissionManagerComponent], template: "<div class=\"panel\">\r\n <nz-tabset\r\n nzType=\"card\"\r\n [nzSize]=\"'small'\"\r\n [nzSelectedIndex]=\"tab\"\r\n (nzSelectedIndexChange)=\"onSelectedIndexChange($event)\"\r\n >\r\n <nz-tab nzTitle=\"User - Role\">\r\n <app-user-role-permission></app-user-role-permission>\r\n </nz-tab>\r\n <nz-tab nzTitle=\"Role - Menu\">\r\n <app-role-menu-permission></app-role-menu-permission>\r\n </nz-tab>\r\n <nz-tab nzTitle=\"Resource permission\">\r\n <resource-permission></resource-permission>\r\n </nz-tab>\r\n <nz-tab nzTitle=\"Role - Resource permission\">\r\n <role-resource-permission></role-resource-permission>\r\n </nz-tab>\r\n </nz-tabset>\r\n</div>\r\n" }]
|
|
7599
|
-
}]
|
|
7593
|
+
args: [{ selector: 'app-permision', imports: [NzTabsModule, UserRolePermission, RoleMenuPermission, RolePermissionComponent, PermissionManagerComponent], template: "<div class=\"panel\">\r\n <nz-tabset\r\n nzType=\"card\"\r\n [nzSize]=\"'small'\"\r\n [nzSelectedIndex]=\"tab\"\r\n (nzSelectedIndexChange)=\"onSelectedIndexChange($event)\"\r\n >\r\n <nz-tab nzTitle=\"User - Role\">\r\n <app-user-role-permission #userRole></app-user-role-permission>\r\n </nz-tab>\r\n <nz-tab nzTitle=\"Role - Menu\">\r\n <app-role-menu-permission #roleMenu></app-role-menu-permission>\r\n </nz-tab>\r\n <nz-tab nzTitle=\"Resource permission\">\r\n <resource-permission #resource></resource-permission>\r\n </nz-tab>\r\n <nz-tab nzTitle=\"Role - Resource permission\">\r\n <role-resource-permission #roleResource></role-resource-permission>\r\n </nz-tab>\r\n </nz-tabset>\r\n</div>\r\n" }]
|
|
7594
|
+
}], propDecorators: { userRole: [{
|
|
7595
|
+
type: ViewChild,
|
|
7596
|
+
args: ['userRole']
|
|
7597
|
+
}], roleMenu: [{
|
|
7598
|
+
type: ViewChild,
|
|
7599
|
+
args: ['roleMenu']
|
|
7600
|
+
}], resource: [{
|
|
7601
|
+
type: ViewChild,
|
|
7602
|
+
args: ['resource']
|
|
7603
|
+
}], roleResource: [{
|
|
7604
|
+
type: ViewChild,
|
|
7605
|
+
args: ['roleResource']
|
|
7606
|
+
}] } });
|
|
7607
|
+
|
|
7608
|
+
class App_Org {
|
|
7609
|
+
// #region properties
|
|
7610
|
+
App_Org_Id;
|
|
7611
|
+
CreatedDate;
|
|
7612
|
+
CreatedUser;
|
|
7613
|
+
UpdatedDate;
|
|
7614
|
+
UpdatedUser;
|
|
7615
|
+
IsActive;
|
|
7616
|
+
Code;
|
|
7617
|
+
Name;
|
|
7618
|
+
NameEn;
|
|
7619
|
+
Type;
|
|
7620
|
+
Address;
|
|
7621
|
+
Description;
|
|
7622
|
+
ParentId;
|
|
7623
|
+
OrderValue;
|
|
7624
|
+
// #endregion properties
|
|
7625
|
+
ParentName;
|
|
7626
|
+
TreeNodeName;
|
|
7627
|
+
LstUserId;
|
|
7628
|
+
}
|
|
7629
|
+
class OrgFilter extends GridFilter {
|
|
7630
|
+
Code;
|
|
7631
|
+
Name;
|
|
7632
|
+
ParentName;
|
|
7633
|
+
}
|
|
7600
7634
|
|
|
7601
7635
|
class HasPermissionPipe {
|
|
7602
7636
|
permissionService;
|
|
7637
|
+
static debug = false;
|
|
7603
7638
|
constructor(permissionService) {
|
|
7604
7639
|
this.permissionService = permissionService;
|
|
7640
|
+
if (HasPermissionPipe.debug) {
|
|
7641
|
+
console.log('HasPermissionPipe > constructor');
|
|
7642
|
+
}
|
|
7605
7643
|
}
|
|
7606
7644
|
/**
|
|
7607
7645
|
* @example *ngIf="row | hasPermission: 'org' : 'update'"
|
|
@@ -7610,9 +7648,14 @@ class HasPermissionPipe {
|
|
|
7610
7648
|
* @param action Hành động (VD: 'update', 'delete')
|
|
7611
7649
|
*/
|
|
7612
7650
|
transform(data, resource, action) {
|
|
7651
|
+
if (HasPermissionPipe.debug) {
|
|
7652
|
+
console.log('HasPermissionPipe > transform: ', data, resource, action);
|
|
7653
|
+
}
|
|
7613
7654
|
if (data === null)
|
|
7614
7655
|
return false;
|
|
7615
|
-
|
|
7656
|
+
if (HasPermissionPipe.debug) {
|
|
7657
|
+
console.log(this.permissionService.hasAccess(resource, action, data));
|
|
7658
|
+
}
|
|
7616
7659
|
return this.permissionService.hasAccess(resource, action, data);
|
|
7617
7660
|
}
|
|
7618
7661
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: HasPermissionPipe, deps: [{ token: PermissionService$1 }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
@@ -8351,104 +8394,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImpor
|
|
|
8351
8394
|
}]
|
|
8352
8395
|
}] });
|
|
8353
8396
|
|
|
8354
|
-
const URLs$1 = {
|
|
8355
|
-
getById: '/api/file/GetById',
|
|
8356
|
-
getAll: '/api/file/GetAll',
|
|
8357
|
-
getList: '/api/file/GetList',
|
|
8358
|
-
getPaging: '/api/file/GetPaging',
|
|
8359
|
-
addOrEdit: '/api/file/AddOrEdit',
|
|
8360
|
-
delete: '/api/file/Delete',
|
|
8361
|
-
addFileWithRef: '/api/file/addFileWithRef',
|
|
8362
|
-
moveFileToDisk: '/api/file/MoveFileToDisk',
|
|
8363
|
-
};
|
|
8364
|
-
class FileService extends HTTPService {
|
|
8365
|
-
cms = inject(CommonService);
|
|
8366
|
-
getById(id) {
|
|
8367
|
-
return this.cms.ESP({
|
|
8368
|
-
SPN: 'App_File_getByIdJson',
|
|
8369
|
-
Params: [id],
|
|
8370
|
-
});
|
|
8371
|
-
}
|
|
8372
|
-
getAll() {
|
|
8373
|
-
return this.post(AppGlobals.apiEndpoint + URLs$1.getAll);
|
|
8374
|
-
}
|
|
8375
|
-
getList(filter) {
|
|
8376
|
-
return this.postData(AppGlobals.apiEndpoint + URLs$1.getList, filter);
|
|
8377
|
-
}
|
|
8378
|
-
getPaging(filter) {
|
|
8379
|
-
return this.cms.ESP({
|
|
8380
|
-
SPN: 'App_File_getpaging',
|
|
8381
|
-
Params: [filter],
|
|
8382
|
-
});
|
|
8383
|
-
}
|
|
8384
|
-
addOrEdit(obj) {
|
|
8385
|
-
return this.postData(AppGlobals.apiEndpoint + URLs$1.addOrEdit, obj);
|
|
8386
|
-
}
|
|
8387
|
-
delete(id) {
|
|
8388
|
-
const params = new HttpParams().append('id', id);
|
|
8389
|
-
return this.postParams(AppGlobals.apiEndpoint + URLs$1.delete, params);
|
|
8390
|
-
}
|
|
8391
|
-
downloadFile(id) {
|
|
8392
|
-
const params = new HttpParams().append('id', id);
|
|
8393
|
-
return firstValueFrom(this.httpClient.post(`${AppGlobals.apiEndpoint}/api/file/downloadFile`, {}, { responseType: ENUM_ResponseType.ARRAYBUFFER, params: params }));
|
|
8394
|
-
}
|
|
8395
|
-
downloadFileByCode(Code) {
|
|
8396
|
-
const params = new HttpParams().append('Code', Code);
|
|
8397
|
-
return firstValueFrom(this.httpClient.post(`${AppGlobals.apiEndpoint}/api/file/downloadFileByCode`, {}, { responseType: ENUM_ResponseType.BLOB, observe: 'response', params: params }));
|
|
8398
|
-
}
|
|
8399
|
-
downloadFileBase64(id) {
|
|
8400
|
-
const params = new HttpParams().append('id', id);
|
|
8401
|
-
return this.postParams(`${AppGlobals.apiEndpoint}/api/file/DownloadFileBase64`, params);
|
|
8402
|
-
}
|
|
8403
|
-
downloadFileBase64ByCode(Code) {
|
|
8404
|
-
const params = new HttpParams().append('Code', Code);
|
|
8405
|
-
return this.postParams(`${AppGlobals.apiEndpoint}/api/file/DownloadFileBase64ByCode`, params);
|
|
8406
|
-
}
|
|
8407
|
-
getFileVersion(code) {
|
|
8408
|
-
return this.httpClient.get(AppGlobals.apiEndpoint + '/api/file/fileversion?code=' + code);
|
|
8409
|
-
}
|
|
8410
|
-
getFile(id) {
|
|
8411
|
-
return this.httpClient.get(AppGlobals.apiEndpoint + '/api/file/image?id=' + id, {
|
|
8412
|
-
responseType: ENUM_ResponseType.BLOB,
|
|
8413
|
-
});
|
|
8414
|
-
}
|
|
8415
|
-
getImage(id) {
|
|
8416
|
-
return this.httpClient.get(AppGlobals.apiEndpoint + '/api/file/image?id=' + id, {
|
|
8417
|
-
responseType: ENUM_ResponseType.BLOB,
|
|
8418
|
-
});
|
|
8419
|
-
}
|
|
8420
|
-
getAudio(id) {
|
|
8421
|
-
return this.httpClient.get(AppGlobals.apiEndpoint + '/api/file/get-audio?id=' + id, {
|
|
8422
|
-
responseType: ENUM_ResponseType.BLOB,
|
|
8423
|
-
});
|
|
8424
|
-
}
|
|
8425
|
-
getVideo(id) {
|
|
8426
|
-
return this.httpClient.get(AppGlobals.apiEndpoint + '/api/file/get-video?id=' + id, {
|
|
8427
|
-
responseType: ENUM_ResponseType.BLOB,
|
|
8428
|
-
});
|
|
8429
|
-
}
|
|
8430
|
-
addFileWithRef(obj) {
|
|
8431
|
-
return this.postData(AppGlobals.apiEndpoint + URLs$1.addFileWithRef, obj);
|
|
8432
|
-
}
|
|
8433
|
-
getAnhWithRef(Ref_Table, Ref_Id) {
|
|
8434
|
-
return this.cms.ESP({
|
|
8435
|
-
SPN: 'App_File_getAnhWithRef',
|
|
8436
|
-
Params: [Ref_Table, Ref_Id],
|
|
8437
|
-
});
|
|
8438
|
-
}
|
|
8439
|
-
moveFileToDisk(obj) {
|
|
8440
|
-
return this.postData(AppGlobals.apiEndpoint + URLs$1.moveFileToDisk, obj);
|
|
8441
|
-
}
|
|
8442
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: FileService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
8443
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: FileService, providedIn: 'root' });
|
|
8444
|
-
}
|
|
8445
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: FileService, decorators: [{
|
|
8446
|
-
type: Injectable,
|
|
8447
|
-
args: [{
|
|
8448
|
-
providedIn: 'root',
|
|
8449
|
-
}]
|
|
8450
|
-
}] });
|
|
8451
|
-
|
|
8452
8397
|
const fadeInOut = trigger('fadeInOut', [
|
|
8453
8398
|
transition(':enter', [
|
|
8454
8399
|
style({ opacity: 0, transform: 'translateY(-5px)' }),
|
|
@@ -8788,6 +8733,102 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImpor
|
|
|
8788
8733
|
type: Output
|
|
8789
8734
|
}] } });
|
|
8790
8735
|
|
|
8736
|
+
const URLs$1 = {
|
|
8737
|
+
getById: '/api/file/GetById',
|
|
8738
|
+
getAll: '/api/file/GetAll',
|
|
8739
|
+
getList: '/api/file/GetList',
|
|
8740
|
+
getPaging: '/api/file/GetPaging',
|
|
8741
|
+
addOrEdit: '/api/file/AddOrEdit',
|
|
8742
|
+
delete: '/api/file/Delete',
|
|
8743
|
+
addFileWithRef: '/api/file/addFileWithRef',
|
|
8744
|
+
moveFileToDisk: '/api/file/MoveFileToDisk',
|
|
8745
|
+
};
|
|
8746
|
+
class FileService extends HTTPService {
|
|
8747
|
+
commonService = inject(CommonService);
|
|
8748
|
+
getById(id) {
|
|
8749
|
+
const params = new HttpParams().append('id', id);
|
|
8750
|
+
return this.postParams(AppGlobals.apiEndpoint + URLs$1.getById, params);
|
|
8751
|
+
}
|
|
8752
|
+
getAll() {
|
|
8753
|
+
return this.post(AppGlobals.apiEndpoint + URLs$1.getAll);
|
|
8754
|
+
}
|
|
8755
|
+
getList(filter) {
|
|
8756
|
+
return this.postData(AppGlobals.apiEndpoint + URLs$1.getList, filter);
|
|
8757
|
+
}
|
|
8758
|
+
getPaging(filter) {
|
|
8759
|
+
return this.commonService.ESP({
|
|
8760
|
+
SPN: 'App_File_getpaging',
|
|
8761
|
+
Params: [filter],
|
|
8762
|
+
});
|
|
8763
|
+
}
|
|
8764
|
+
addOrEdit(obj) {
|
|
8765
|
+
return this.postData(AppGlobals.apiEndpoint + URLs$1.addOrEdit, obj);
|
|
8766
|
+
}
|
|
8767
|
+
delete(id) {
|
|
8768
|
+
const params = new HttpParams().append('id', id);
|
|
8769
|
+
return this.postParams(AppGlobals.apiEndpoint + URLs$1.delete, params);
|
|
8770
|
+
}
|
|
8771
|
+
downloadFile(id) {
|
|
8772
|
+
const params = new HttpParams().append('id', id);
|
|
8773
|
+
return firstValueFrom(this.httpClient.post(`${AppGlobals.apiEndpoint}/api/file/downloadFile`, {}, { responseType: ENUM_ResponseType.ARRAYBUFFER, params: params }));
|
|
8774
|
+
}
|
|
8775
|
+
downloadFileByCode(Code) {
|
|
8776
|
+
const params = new HttpParams().append('Code', Code);
|
|
8777
|
+
return firstValueFrom(this.httpClient.post(`${AppGlobals.apiEndpoint}/api/file/downloadFileByCode`, {}, { responseType: ENUM_ResponseType.BLOB, observe: 'response', params: params }));
|
|
8778
|
+
}
|
|
8779
|
+
downloadFileBase64(id) {
|
|
8780
|
+
const params = new HttpParams().append('id', id);
|
|
8781
|
+
return this.postParams(`${AppGlobals.apiEndpoint}/api/file/DownloadFileBase64`, params);
|
|
8782
|
+
}
|
|
8783
|
+
downloadFileBase64ByCode(Code) {
|
|
8784
|
+
const params = new HttpParams().append('Code', Code);
|
|
8785
|
+
return this.postParams(`${AppGlobals.apiEndpoint}/api/file/DownloadFileBase64ByCode`, params);
|
|
8786
|
+
}
|
|
8787
|
+
getFileVersion(code) {
|
|
8788
|
+
return this.httpClient.get(AppGlobals.apiEndpoint + '/api/file/fileversion?code=' + code);
|
|
8789
|
+
}
|
|
8790
|
+
getFile(id) {
|
|
8791
|
+
return this.httpClient.get(AppGlobals.apiEndpoint + '/api/file/image?id=' + id, {
|
|
8792
|
+
responseType: ENUM_ResponseType.BLOB,
|
|
8793
|
+
});
|
|
8794
|
+
}
|
|
8795
|
+
getImage(id) {
|
|
8796
|
+
return this.httpClient.get(AppGlobals.apiEndpoint + '/api/file/image?id=' + id, {
|
|
8797
|
+
responseType: ENUM_ResponseType.BLOB,
|
|
8798
|
+
});
|
|
8799
|
+
}
|
|
8800
|
+
getAudio(id) {
|
|
8801
|
+
return this.httpClient.get(AppGlobals.apiEndpoint + '/api/file/get-audio?id=' + id, {
|
|
8802
|
+
responseType: ENUM_ResponseType.BLOB,
|
|
8803
|
+
});
|
|
8804
|
+
}
|
|
8805
|
+
getVideo(id) {
|
|
8806
|
+
return this.httpClient.get(AppGlobals.apiEndpoint + '/api/file/get-video?id=' + id, {
|
|
8807
|
+
responseType: ENUM_ResponseType.BLOB,
|
|
8808
|
+
});
|
|
8809
|
+
}
|
|
8810
|
+
addFileWithRef(obj) {
|
|
8811
|
+
return this.postData(AppGlobals.apiEndpoint + URLs$1.addFileWithRef, obj);
|
|
8812
|
+
}
|
|
8813
|
+
getAnhWithRef(Ref_Table, Ref_Id) {
|
|
8814
|
+
return this.commonService.ESP({
|
|
8815
|
+
SPN: 'App_File_getAnhWithRef',
|
|
8816
|
+
Params: [Ref_Table, Ref_Id],
|
|
8817
|
+
});
|
|
8818
|
+
}
|
|
8819
|
+
moveFileToDisk(obj) {
|
|
8820
|
+
return this.postData(AppGlobals.apiEndpoint + URLs$1.moveFileToDisk, obj);
|
|
8821
|
+
}
|
|
8822
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: FileService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
8823
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: FileService, providedIn: 'root' });
|
|
8824
|
+
}
|
|
8825
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: FileService, decorators: [{
|
|
8826
|
+
type: Injectable,
|
|
8827
|
+
args: [{
|
|
8828
|
+
providedIn: 'root',
|
|
8829
|
+
}]
|
|
8830
|
+
}] });
|
|
8831
|
+
|
|
8791
8832
|
class App_Menu {
|
|
8792
8833
|
// #region properties
|
|
8793
8834
|
App_Menu_Id;
|
|
@@ -9299,5 +9340,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImpor
|
|
|
9299
9340
|
* Generated bundle index. Do not edit.
|
|
9300
9341
|
*/
|
|
9301
9342
|
|
|
9302
|
-
export { ABAC_RULES_TOKEN, ActionRule, ActionRuleLine, AnimatedDigitComponent, AppGlobals, AppStorage, App_Org, AuthGuard, AuthService, AutoFocusDirective, BarGraphComponent, BaseComponent, BaseGuardChangeComponent, BaseOverlayComponent, Box, Breadcrumb, CheckModel, CommonService, CustomNotiComponent, CustomNotiService, DashcardComponent, DateInputParserDirective, DateTimeHelper, DicDomainPipe, DoughnutGraphComponent, DownloadHelper, ENUM_ResponseType, ExpandableSearchComponent, ExtendCheckbox, ExtendDatePicker, ExtendDateRangePicker, ExtendInput, ExtendInputNumber, ExtendPaginationComponent, ExtendSelectComponent, ExtendTableComponent, ExtendTextArea, GlobalSpinnerComponent, GridFilter, H3Icon, HTTPService, HasPermissionDirective, HasPermissionPipe, Height, HideIfErrorDirective, HighlightPipe, IconAdd, IconCheck, IconClose, IconDelete, IconEdit, IconSave, IconSearch, IconView, LayoutComponent, LimitWordsPipe, LineGraphComponent, LoadingService, LoginComponent, NoPermission, NotiService, NullIfEmptyDirective, NumberOnlyDirective, OrderOption, PagingData, PagingModel, PdfViewerComponent, PermissionComponent, ReadMoreProComponent, RouteMonitorService, SessionManagerService, TableHeader, ThemeService, TokenStorage, TranslateKey, URLs$7 as URLs, UnsavedChangesGuard, UpperCaseFirsLetterEachWordDirective, UppercaseDirective, UppercaseFirstLetterDirective, VscService, WF_TemplateActionRef, WF_TransitionRule, WF_TransitionRuleLine, Width, Workflow, WorkflowAction, WorkflowActionEditorOption, WorkflowActionRef, WorkflowEditorComponent, WorkflowEditorOption, WorkflowStage, WorkflowStageEditorOption, XLSXHelper, authInterceptor };
|
|
9343
|
+
export { ABAC_RULES_TOKEN, ActionRule, ActionRuleLine, AnimatedDigitComponent, AppGlobals, AppStorage, App_Org, AuthGuard, AuthService, AutoFocusDirective, BarGraphComponent, BaseComponent, BaseGuardChangeComponent, BaseOverlayComponent, Box, Breadcrumb, CheckModel, CommonService, CustomNotiComponent, CustomNotiService, DashcardComponent, DateInputParserDirective, DateTimeHelper, DicDomainPipe, DoughnutGraphComponent, DownloadHelper, ENUM_ResponseType, ExpandableSearchComponent, ExtendCheckbox, ExtendDatePicker, ExtendDateRangePicker, ExtendInput, ExtendInputNumber, ExtendPaginationComponent, ExtendSelectComponent, ExtendTableComponent, ExtendTextArea, GlobalSpinnerComponent, GridFilter, H3Icon, HTTPService, HasPermissionDirective, HasPermissionPipe, Height, HideIfErrorDirective, HighlightPipe, IconAdd, IconCheck, IconClose, IconDelete, IconEdit, IconSave, IconSearch, IconView, LayoutComponent, LimitWordsPipe, LineGraphComponent, LoadingService, LoginComponent, NoPermission, NotiService, NullIfEmptyDirective, NumberOnlyDirective, OrderOption, OrgFilter, PagingData, PagingModel, PdfViewerComponent, PermissionComponent, ReadMoreProComponent, RouteMonitorService, SessionManagerService, TableHeader, ThemeService, TokenStorage, TranslateKey, URLs$7 as URLs, UnsavedChangesGuard, UpperCaseFirsLetterEachWordDirective, UppercaseDirective, UppercaseFirstLetterDirective, VscService, WF_TemplateActionRef, WF_TransitionRule, WF_TransitionRuleLine, Width, Workflow, WorkflowAction, WorkflowActionEditorOption, WorkflowActionRef, WorkflowEditorComponent, WorkflowEditorOption, WorkflowStage, WorkflowStageEditorOption, XLSXHelper, authInterceptor };
|
|
9303
9344
|
//# sourceMappingURL=brggroup-share-lib.mjs.map
|