@brggroup/share-lib 0.2.0 → 0.2.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.
@@ -275,6 +275,14 @@ class AppGlobals {
275
275
  static SYSTEM_SUB_NAME_RIGHT = '';
276
276
  static filterSet = {};
277
277
  static selectedIdSet = {};
278
+ static PUBLIC_OR_BYPASS_PATHS = new Set([
279
+ '/',
280
+ '/login',
281
+ '/register',
282
+ '/no-permission',
283
+ '/module',
284
+ '/dashboard',
285
+ ]);
278
286
  /**
279
287
  * Clears all cached grid filters.
280
288
  * Kept `clearFillter` for backward compatibility alongside `clearFilter`.
@@ -17241,15 +17249,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImpor
17241
17249
  }]
17242
17250
  }], ctorParameters: () => [{ type: i0.Injector }, { type: i0.NgZone }] });
17243
17251
 
17244
- const PUBLIC_OR_BYPASS_PATHS = new Set([
17245
- '/',
17246
- '/login',
17247
- '/register',
17248
- '/no-permission',
17249
- '/module',
17250
- '/dashboard',
17251
- '/map-chart',
17252
- ]);
17253
17252
  class RouteMonitorService {
17254
17253
  router;
17255
17254
  authService;
@@ -17321,9 +17320,7 @@ class RouteMonitorService {
17321
17320
  return { originalUrl: rawUrl, urlToCheck };
17322
17321
  }
17323
17322
  isBypassRoute(path) {
17324
- if (PUBLIC_OR_BYPASS_PATHS.has(path))
17325
- return true;
17326
- return path.startsWith('/login') || path.startsWith('/register') || path.startsWith('/drive-share/');
17323
+ return AppGlobals.PUBLIC_OR_BYPASS_PATHS.has(path);
17327
17324
  }
17328
17325
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: RouteMonitorService, deps: [{ token: i1$4.Router }, { token: AuthService }, { token: NotiService }], target: i0.ɵɵFactoryTarget.Injectable });
17329
17326
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: RouteMonitorService, providedIn: 'root' });
@@ -24184,6 +24181,7 @@ class DriveService extends HTTPService {
24184
24181
  currentPhysicalPath = signal(null);
24185
24182
  activeUserKey = signal(TokenStorage.getUsername() || '');
24186
24183
  uploadQueue = signal([]);
24184
+ folderTemplates = signal([]);
24187
24185
  // Chỉ hiển thị tiến trình tải lên của đúng User đang đăng nhập hiện tại
24188
24186
  userUploadQueue = computed(() => {
24189
24187
  const currentUser = this.activeUserKey() || TokenStorage.getUsername() || '';
@@ -24320,11 +24318,246 @@ class DriveService extends HTTPService {
24320
24318
  CanManage: s.CanManage ?? s.canManage ?? false,
24321
24319
  })));
24322
24320
  }
24321
+ if (this.folderTemplates().length === 0) {
24322
+ this.loadFolderTemplates();
24323
+ }
24323
24324
  }
24324
24325
  finally {
24325
24326
  this.loading.set(false);
24326
24327
  }
24327
24328
  }
24329
+ // ==================== QUẢN LÝ & TẠO NHANH TỪ CÂY THƯ MỤC MẪU (FOLDER TEMPLATES) ====================
24330
+ mapTemplateNodesRecursive(rawNodes) {
24331
+ if (!Array.isArray(rawNodes))
24332
+ return [];
24333
+ return rawNodes
24334
+ .map((n) => ({
24335
+ Name: n.Name ?? n.name ?? '',
24336
+ BreakInheritance: n.BreakInheritance ?? n.breakInheritance ?? false,
24337
+ Permissions: this.mapTemplatePermissions(n.Permissions ?? n.permissions ?? []),
24338
+ Children: this.mapTemplateNodesRecursive(n.Children ?? n.children ?? []),
24339
+ }))
24340
+ .filter((n) => !!n.Name.trim());
24341
+ }
24342
+ mapFolderTemplate(t) {
24343
+ const perms = this.mapTemplatePermissions(t.Permissions ?? t.permissions ?? []);
24344
+ const nodes = this.mapTemplateNodesRecursive(t.Nodes ?? t.nodes ?? []);
24345
+ return {
24346
+ Id: t.Id ?? t.id ?? '',
24347
+ Code: t.Code ?? t.code ?? '',
24348
+ Name: t.Name ?? t.name ?? '',
24349
+ Description: t.Description ?? t.description ?? '',
24350
+ Icon: t.Icon ?? t.icon ?? 'gold',
24351
+ IsVisibleToAllUsers: t.IsVisibleToAllUsers ?? t.isVisibleToAllUsers ?? false,
24352
+ CreateWrapperRootFolder: t.CreateWrapperRootFolder ?? t.createWrapperRootFolder ?? true,
24353
+ OwnerId: t.OwnerId ?? t.ownerId ?? '',
24354
+ OwnerName: t.OwnerName ?? t.ownerName ?? '',
24355
+ CanManage: t.CanManage ?? t.canManage ?? false,
24356
+ TotalFolderCount: t.TotalFolderCount ?? t.totalFolderCount ?? 0,
24357
+ TotalPermissionCount: t.TotalPermissionCount ?? t.totalPermissionCount ?? perms.length,
24358
+ Permissions: perms,
24359
+ Nodes: nodes,
24360
+ UpdatedDate: t.UpdatedDate ?? t.updatedDate,
24361
+ };
24362
+ }
24363
+ async loadFolderTemplates() {
24364
+ try {
24365
+ const raw = await this.get(`${this.apiUrl}/folder-templates`, true);
24366
+ const res = this.unwrapResponse(raw);
24367
+ if (!res.IsSuccess || !Array.isArray(res.Data))
24368
+ return [];
24369
+ const list = res.Data.map((x) => this.mapFolderTemplate(x));
24370
+ this.folderTemplates.set(list);
24371
+ return list;
24372
+ }
24373
+ catch {
24374
+ return [];
24375
+ }
24376
+ }
24377
+ async createFolderTemplate(payload) {
24378
+ const raw = await this.postData(`${this.apiUrl}/folder-templates`, payload);
24379
+ const res = this.unwrapResponse(raw);
24380
+ if (res.IsSuccess)
24381
+ await this.loadFolderTemplates();
24382
+ return res;
24383
+ }
24384
+ async updateFolderTemplate(templateId, payload) {
24385
+ const raw = await firstValueFrom(this.http.put(`${this.apiUrl}/folder-templates/${encodeURIComponent(templateId)}`, payload));
24386
+ const res = this.unwrapResponse(raw);
24387
+ if (res.IsSuccess)
24388
+ await this.loadFolderTemplates();
24389
+ return res;
24390
+ }
24391
+ async deleteFolderTemplate(templateId) {
24392
+ const raw = await firstValueFrom(this.http.delete(`${this.apiUrl}/folder-templates/${encodeURIComponent(templateId)}`));
24393
+ const res = this.unwrapResponse(raw);
24394
+ if (res.IsSuccess)
24395
+ await this.loadFolderTemplates();
24396
+ return res;
24397
+ }
24398
+ async applyFolderTemplate(payload) {
24399
+ const effectiveIsOrg = payload.IsOrgNode !== undefined && payload.IsOrgNode !== null
24400
+ ? payload.IsOrgNode
24401
+ : this.currentViewMode() === 'ORG_DRIVE' || this.currentViewMode() === 'CUSTOM_SPACE';
24402
+ const effectiveParentId = payload.TargetParentId !== undefined
24403
+ ? payload.TargetParentId
24404
+ : this.currentFolderId() || (this.currentViewMode() === 'CUSTOM_SPACE' ? this.currentCustomSpaceId() : null);
24405
+ const raw = await this.postData(`${this.apiUrl}/folder-templates/apply`, {
24406
+ ApplyTemplatePermissions: true,
24407
+ ...payload,
24408
+ TargetParentId: effectiveParentId,
24409
+ IsOrgNode: effectiveIsOrg,
24410
+ });
24411
+ const res = this.unwrapResponse(raw);
24412
+ if (res.IsSuccess)
24413
+ await this.loadNodes();
24414
+ return res;
24415
+ }
24416
+ /**
24417
+ * Đầu hàm Service cho phép các Module khác gọi sang để khởi tạo cây thư mục từ Mẫu kèm phân quyền
24418
+ */
24419
+ async applyTemplateToModuleRecord(payload) {
24420
+ const raw = await this.postData(`${this.apiUrl}/integration/module-record/apply-template`, payload, true);
24421
+ const res = this.unwrapResponse(raw);
24422
+ if (!res.IsSuccess || !res.Data)
24423
+ return null;
24424
+ const d = res.Data;
24425
+ const rawCreated = d.CreatedFolders ?? d.createdFolders ?? [];
24426
+ const rootFolder = d.RootCreatedFolder ?? d.rootCreatedFolder;
24427
+ return {
24428
+ TemplateId: d.TemplateId ?? d.templateId,
24429
+ TemplateCode: d.TemplateCode ?? d.templateCode,
24430
+ TemplateName: d.TemplateName ?? d.templateName,
24431
+ RootCreatedFolder: rootFolder ? this.mapNode(rootFolder) : null,
24432
+ CreatedFolderCount: d.CreatedFolderCount ?? d.createdFolderCount ?? 0,
24433
+ ReusedFolderCount: d.ReusedFolderCount ?? d.reusedFolderCount ?? 0,
24434
+ AppliedPermissionCount: d.AppliedPermissionCount ?? d.appliedPermissionCount ?? 0,
24435
+ CreatedFolders: rawCreated.map((x) => this.mapNode(x)),
24436
+ };
24437
+ }
24438
+ /**
24439
+ * Chuyển đổi văn bản thụt đầu dòng (Indented Text) sang cây FolderTemplateNodeDto[]
24440
+ * đồng thời ghép cấu hình phân quyền riêng & BreakInheritance của từng nhánh theo RelativePath hoặc Name.
24441
+ */
24442
+ parseIndentedTextToTemplateTree(text, nodeConfigMap) {
24443
+ if (!text || !text.trim())
24444
+ return [];
24445
+ const lines = text.split(/\r?\n/);
24446
+ const rootNodes = [];
24447
+ const stack = [];
24448
+ for (const rawLine of lines) {
24449
+ if (!rawLine.trim())
24450
+ continue;
24451
+ const expanded = rawLine.replace(/\t/g, ' ');
24452
+ const leadingSpaces = expanded.match(/^\s*/)?.[0].length ?? 0;
24453
+ const cleanedLine = expanded.trim();
24454
+ const dashMatch = cleanedLine.match(/^([-*+–—•]+)\s*(.*)$/);
24455
+ const dashDepth = dashMatch ? Math.max(0, dashMatch[1].length - 1) : 0;
24456
+ const folderName = (dashMatch ? dashMatch[2] : cleanedLine).replace(/^📁\s*/, '').trim();
24457
+ if (!folderName)
24458
+ continue;
24459
+ const effectiveIndent = leadingSpaces + dashDepth * 2;
24460
+ while (stack.length > 0 && stack[stack.length - 1].indent >= effectiveIndent) {
24461
+ stack.pop();
24462
+ }
24463
+ const parentPath = stack.length > 0 ? stack[stack.length - 1].path : '';
24464
+ const currentPath = parentPath ? `${parentPath}/${folderName}` : folderName;
24465
+ const matchedCfg = nodeConfigMap?.[currentPath] ?? nodeConfigMap?.[folderName];
24466
+ const newNode = {
24467
+ Name: folderName,
24468
+ BreakInheritance: matchedCfg?.BreakInheritance ?? false,
24469
+ Permissions: matchedCfg?.Permissions ? [...matchedCfg.Permissions] : [],
24470
+ Children: [],
24471
+ };
24472
+ if (stack.length === 0) {
24473
+ rootNodes.push(newNode);
24474
+ }
24475
+ else {
24476
+ const parent = stack[stack.length - 1].node;
24477
+ parent.Children = parent.Children || [];
24478
+ parent.Children.push(newNode);
24479
+ }
24480
+ stack.push({ indent: effectiveIndent, path: currentPath, node: newNode });
24481
+ }
24482
+ return rootNodes;
24483
+ }
24484
+ /**
24485
+ * Trích xuất Map cấu hình phân quyền của từng nhánh từ cây FolderTemplateNodeDto[] (dùng khi mở Sửa mẫu)
24486
+ */
24487
+ extractNodeConfigMapFromTemplateTree(nodes, parentPath = '') {
24488
+ const map = {};
24489
+ if (!nodes || !nodes.length)
24490
+ return map;
24491
+ for (const n of nodes) {
24492
+ if (!n?.Name)
24493
+ continue;
24494
+ const currentPath = parentPath ? `${parentPath}/${n.Name}` : n.Name;
24495
+ if (n.BreakInheritance || (n.Permissions && n.Permissions.length > 0)) {
24496
+ map[currentPath] = {
24497
+ BreakInheritance: !!n.BreakInheritance,
24498
+ Permissions: [...(n.Permissions || [])],
24499
+ };
24500
+ }
24501
+ if (n.Children?.length) {
24502
+ Object.assign(map, this.extractNodeConfigMapFromTemplateTree(n.Children, currentPath));
24503
+ }
24504
+ }
24505
+ return map;
24506
+ }
24507
+ /**
24508
+ * Chuyển đổi cây FolderTemplateNodeDto[] ngược lại thành văn bản thụt đầu dòng để sửa trên Form
24509
+ */
24510
+ serializeTemplateTreeToIndentedText(nodes, depth = 0) {
24511
+ if (!nodes || !nodes.length)
24512
+ return '';
24513
+ const lines = [];
24514
+ const prefix = ' '.repeat(depth);
24515
+ for (const n of nodes) {
24516
+ if (!n?.Name)
24517
+ continue;
24518
+ lines.push(`${prefix}- ${n.Name}`);
24519
+ if (n.Children?.length) {
24520
+ lines.push(this.serializeTemplateTreeToIndentedText(n.Children, depth + 1));
24521
+ }
24522
+ }
24523
+ return lines.join('\n');
24524
+ }
24525
+ flattenTemplateTreeForPreview(nodes, level = 0, parentPath = '') {
24526
+ const result = [];
24527
+ if (!nodes)
24528
+ return result;
24529
+ for (const n of nodes) {
24530
+ if (!n?.Name)
24531
+ continue;
24532
+ const currentPath = parentPath ? `${parentPath}/${n.Name}` : n.Name;
24533
+ result.push({
24534
+ Name: n.Name,
24535
+ Level: level,
24536
+ RelativePath: currentPath,
24537
+ BreakInheritance: !!n.BreakInheritance,
24538
+ PermissionsCount: n.Permissions?.length ?? 0,
24539
+ });
24540
+ if (n.Children?.length) {
24541
+ result.push(...this.flattenTemplateTreeForPreview(n.Children, level + 1, currentPath));
24542
+ }
24543
+ }
24544
+ return result;
24545
+ }
24546
+ mapTemplatePermissions(rawPerms) {
24547
+ if (!Array.isArray(rawPerms))
24548
+ return [];
24549
+ return rawPerms
24550
+ .map((p) => ({
24551
+ GranteeType: p.GranteeType ?? p.granteeType ?? DriveGranteeType.User,
24552
+ GranteeId: p.GranteeId ?? p.granteeId ?? '',
24553
+ GranteeName: p.GranteeName ?? p.granteeName ?? p.GranteeId ?? p.granteeId ?? '',
24554
+ AccessLevel: p.AccessLevel ?? p.accessLevel ?? DriveAccessLevel.Downloader,
24555
+ IsDeny: p.IsDeny ?? p.isDeny ?? false,
24556
+ CanShare: p.CanShare ?? p.canShare ?? false,
24557
+ CanDownload: p.CanDownload ?? p.canDownload ?? true,
24558
+ }))
24559
+ .filter((p) => !!p.GranteeId);
24560
+ }
24328
24561
  async setStorageMode(usePhysicalFolders, useSharedPhysicalRoot, newStorageRootPath) {
24329
24562
  let params = new HttpParams().set('usePhysicalFolders', usePhysicalFolders);
24330
24563
  if (useSharedPhysicalRoot !== undefined) {
@@ -26637,6 +26870,7 @@ class DriveExplorerComponent extends BaseComponent {
26637
26870
  selectedContextItem = signal(null);
26638
26871
  activeActionNode = signal(null);
26639
26872
  activeShareToken = signal(null);
26873
+ DriveGranteeType = DriveGranteeType;
26640
26874
  static VI_NATURAL_COLLATOR = new Intl.Collator('vi', {
26641
26875
  numeric: true,
26642
26876
  sensitivity: 'base',
@@ -26725,6 +26959,68 @@ class DriveExplorerComponent extends BaseComponent {
26725
26959
  appendNodesRecursive(rootItems, 0, new Set());
26726
26960
  return result;
26727
26961
  });
26962
+ // Trạng thái tạo nhanh từ Mẫu cây thư mục ngay trên Drawer Tạo thư mục mới
26963
+ folderDrawerSelectedTemplateId = null;
26964
+ folderDrawerUseWrapperFolder = true;
26965
+ // Trạng thái Kéo thả Mẫu cây thư mục từ Sidebar vào Folder đích / Bảng chính / Breadcrumb
26966
+ draggedTemplate = signal(null);
26967
+ // Trạng thái Drawer Định nghĩa / Quản lý Mẫu cây thư mục (DRAWER 11)
26968
+ // Trạng thái Drawer Định nghĩa / Quản lý Mẫu cây thư mục & Phân quyền mẫu (DRAWER 11)
26969
+ templateDrawerVisible = false;
26970
+ templateDrawerMode = 'create';
26971
+ editingTemplate = null;
26972
+ templateInputCode = '';
26973
+ templateInputName = '';
26974
+ templateInputDesc = '';
26975
+ templateInputIcon = 'gold';
26976
+ templateVisibleToAll = false;
26977
+ templateCreateWrapperRoot = true;
26978
+ templateSourceFolderId = null;
26979
+ templateCopyPermissionsFromSource = true;
26980
+ _templateIndentedText = signal('');
26981
+ get templateIndentedText() {
26982
+ return this._templateIndentedText();
26983
+ }
26984
+ set templateIndentedText(value) {
26985
+ this._templateIndentedText.set(value ?? '');
26986
+ }
26987
+ // Phân quyền gắn sẵn cho Cây thư mục mẫu:
26988
+ // - '__ROOT__': Quyền mặc định toàn bộ mẫu cây thư mục
26989
+ // - Chuỗi RelativePath (VD: '01. Hồ sơ pháp lý/01.1. Tờ trình'): Quyền riêng cho nhánh thư mục con đó
26990
+ selectedTemplatePermTarget = signal('__ROOT__');
26991
+ templateRootPermissions = signal([]);
26992
+ templateNodePermissionsMap = signal({});
26993
+ // Bộ chọn User / Đơn vị (App_Org) / Vai trò (App_Role) để thêm quyền vào Mẫu
26994
+ templatePermGranteeType = DriveGranteeType.Org;
26995
+ templatePermSelectedGrantee = null;
26996
+ templatePermAccessLevel = DriveAccessLevel.Downloader;
26997
+ templatePermIsDeny = false;
26998
+ templateGranteeOptions = signal([]);
26999
+ previewTemplateFlatNodes = computed(() => {
27000
+ const tree = this.drive.parseIndentedTextToTemplateTree(this._templateIndentedText(), this.templateNodePermissionsMap());
27001
+ return this.drive.flattenTemplateTreeForPreview(tree);
27002
+ });
27003
+ activeTemplateTargetPermissions = computed(() => {
27004
+ const target = this.selectedTemplatePermTarget();
27005
+ if (target === '__ROOT__') {
27006
+ return this.templateRootPermissions();
27007
+ }
27008
+ return this.templateNodePermissionsMap()[target]?.Permissions ?? [];
27009
+ });
27010
+ activeTemplateTargetBreakInheritance = computed(() => {
27011
+ const target = this.selectedTemplatePermTarget();
27012
+ if (target === '__ROOT__')
27013
+ return false;
27014
+ return !!this.templateNodePermissionsMap()[target]?.BreakInheritance;
27015
+ });
27016
+ totalConfiguredTemplatePermissions = computed(() => {
27017
+ let total = this.templateRootPermissions().length;
27018
+ const map = this.templateNodePermissionsMap();
27019
+ Object.values(map).forEach((cfg) => {
27020
+ total += cfg?.Permissions?.length ?? 0;
27021
+ });
27022
+ return total;
27023
+ });
26728
27024
  sortNodesList(nodes) {
26729
27025
  if (!nodes || nodes.length <= 1)
26730
27026
  return nodes || [];
@@ -26819,6 +27115,7 @@ class DriveExplorerComponent extends BaseComponent {
26819
27115
  }
26820
27116
  this.updateHeaderBreadcrumb();
26821
27117
  this.drive.loadNodes(1);
27118
+ this.drive.loadFolderTemplates();
26822
27119
  }
26823
27120
  ngOnDestroy() {
26824
27121
  if (this.showMenuOndestroy) {
@@ -26972,6 +27269,21 @@ class DriveExplorerComponent extends BaseComponent {
26972
27269
  catch (err) {
26973
27270
  console.warn('[DriveExplorer] Failed to refresh expanded tree folders:', err);
26974
27271
  }
27272
+ if (!this.drive.isTreeTableView())
27273
+ return;
27274
+ const expandedIds = Array.from(this.expandedTreeFolderIds());
27275
+ if (!expandedIds.length)
27276
+ return;
27277
+ const nextCache = {};
27278
+ for (const fid of expandedIds) {
27279
+ try {
27280
+ nextCache[fid] = await this.drive.fetchFolderChildrenForTree(fid);
27281
+ }
27282
+ catch {
27283
+ // Ignore error
27284
+ }
27285
+ }
27286
+ this.treeChildrenCache.set(nextCache);
26975
27287
  }
26976
27288
  async toggleExpandTreeFolder(item, expand) {
26977
27289
  if (!this.isFolderLike(item) || item.IsBrokenShortcut)
@@ -27197,17 +27509,36 @@ class DriveExplorerComponent extends BaseComponent {
27197
27509
  return false;
27198
27510
  return this.folderDrawerTargetNode.EffectiveAccess >= DriveAccessLevel.Editor;
27199
27511
  }
27200
- openFolderDrawer(mode, targetNode) {
27512
+ openFolderDrawer(mode, targetNode, preselectedTemplate) {
27201
27513
  this.folderDrawerMode = mode;
27202
27514
  this.folderDrawerTargetNode = targetNode || null;
27203
27515
  this.activeActionNode.set(targetNode || null);
27204
- this.folderDrawerInputName = mode === 'rename' && targetNode ? targetNode.Name : 'Thư mục mới';
27516
+ this.folderDrawerSelectedTemplateId = preselectedTemplate?.Id || null;
27517
+ this.folderDrawerUseWrapperFolder = preselectedTemplate ? preselectedTemplate.CreateWrapperRootFolder : true;
27518
+ this.folderDrawerInputName =
27519
+ mode === 'rename' && targetNode
27520
+ ? targetNode.Name
27521
+ : preselectedTemplate
27522
+ ? preselectedTemplate.Name
27523
+ : 'Thư mục mới';
27205
27524
  this.nodeActivities.set([]);
27206
27525
  this.folderDrawerVisible = true;
27207
27526
  if (mode === 'rename' && targetNode) {
27208
27527
  this.drive.getNodeActivities(targetNode.Id).then((logs) => this.nodeActivities.set(logs));
27209
27528
  }
27210
27529
  }
27530
+ onFolderDrawerTemplateSelect(templateId) {
27531
+ this.folderDrawerSelectedTemplateId = templateId;
27532
+ if (!templateId)
27533
+ return;
27534
+ const tpl = this.drive.folderTemplates().find((x) => x.Id === templateId);
27535
+ if (tpl) {
27536
+ this.folderDrawerUseWrapperFolder = tpl.CreateWrapperRootFolder;
27537
+ if (!this.folderDrawerInputName.trim() || this.folderDrawerInputName === 'Thư mục mới') {
27538
+ this.folderDrawerInputName = tpl.Name;
27539
+ }
27540
+ }
27541
+ }
27211
27542
  formatActivityAction(actionType) {
27212
27543
  switch (actionType) {
27213
27544
  case 'CREATE_FOLDER':
@@ -27304,12 +27635,40 @@ class DriveExplorerComponent extends BaseComponent {
27304
27635
  if (this.folderDrawerMode === 'rename' && !this.canRenameTargetNode())
27305
27636
  return;
27306
27637
  const name = this.folderDrawerInputName.trim();
27638
+ if (this.folderDrawerMode === 'create' && this.folderDrawerSelectedTemplateId) {
27639
+ if (this.folderDrawerUseWrapperFolder && !name) {
27640
+ this.warning('Vui lòng nhập tên thư mục gốc.');
27641
+ return;
27642
+ }
27643
+ try {
27644
+ const res = await this.drive.applyFolderTemplate({
27645
+ TemplateId: this.folderDrawerSelectedTemplateId,
27646
+ TargetParentId: this.drive.currentFolderId(),
27647
+ CreateWrapperRootFolder: this.folderDrawerUseWrapperFolder,
27648
+ WrapperRootFolderName: this.folderDrawerUseWrapperFolder ? name : null,
27649
+ });
27650
+ if (res.IsSuccess) {
27651
+ const count = res.Data?.CreatedFolderCount ?? res.Data?.createdFolderCount ?? 0;
27652
+ await this.reloadExpandedTreeFolders();
27653
+ this.success(`Đã khởi tạo cây thư mục từ mẫu thành công (${count} thư mục mới).`);
27654
+ this.folderDrawerVisible = false;
27655
+ }
27656
+ else {
27657
+ this.error(res.ErrorMessage);
27658
+ }
27659
+ }
27660
+ catch (err) {
27661
+ this.handleError(err);
27662
+ }
27663
+ return;
27664
+ }
27307
27665
  if (!name)
27308
27666
  return;
27309
27667
  try {
27310
27668
  if (this.folderDrawerMode === 'create') {
27311
27669
  const res = await this.drive.createFolder(name, this.drive.currentFolderId());
27312
27670
  if (res.IsSuccess) {
27671
+ await this.reloadExpandedTreeFolders();
27313
27672
  this.success('Đã tạo thư mục mới.');
27314
27673
  this.folderDrawerVisible = false;
27315
27674
  }
@@ -27320,6 +27679,7 @@ class DriveExplorerComponent extends BaseComponent {
27320
27679
  else if (this.folderDrawerTargetNode) {
27321
27680
  const res = await this.drive.renameNode(this.folderDrawerTargetNode.Id, name);
27322
27681
  if (res.IsSuccess) {
27682
+ await this.reloadExpandedTreeFolders();
27323
27683
  this.success('Đã đổi tên thành công.');
27324
27684
  this.folderDrawerVisible = false;
27325
27685
  }
@@ -27332,6 +27692,412 @@ class DriveExplorerComponent extends BaseComponent {
27332
27692
  this.handleError(err);
27333
27693
  }
27334
27694
  }
27695
+ openTemplateDrawer(mode, tpl, fromFolder) {
27696
+ this.templateDrawerMode = mode;
27697
+ this.editingTemplate = tpl || null;
27698
+ this.templateSourceFolderId = fromFolder?.Id || null;
27699
+ this.templateCopyPermissionsFromSource = true;
27700
+ this.selectedTemplatePermTarget.set('__ROOT__');
27701
+ this.templatePermSelectedGrantee = null;
27702
+ this.templatePermAccessLevel = DriveAccessLevel.Downloader;
27703
+ this.templatePermIsDeny = false;
27704
+ this.onSearchTemplateGrantee('');
27705
+ if (mode === 'edit' && tpl) {
27706
+ this.templateInputCode = tpl.Code;
27707
+ this.templateInputName = tpl.Name;
27708
+ this.templateInputDesc = tpl.Description || '';
27709
+ this.templateInputIcon = tpl.Icon || 'gold';
27710
+ this.templateVisibleToAll = !!tpl.IsVisibleToAllUsers;
27711
+ this.templateCreateWrapperRoot = tpl.CreateWrapperRootFolder !== false;
27712
+ this.templateRootPermissions.set([...(tpl.Permissions || [])]);
27713
+ this.templateNodePermissionsMap.set(this.drive.extractNodeConfigMapFromTemplateTree(tpl.Nodes || []));
27714
+ this.templateIndentedText = this.drive.serializeTemplateTreeToIndentedText(tpl.Nodes);
27715
+ }
27716
+ else if (fromFolder) {
27717
+ this.templateInputCode = '';
27718
+ this.templateInputName = `Mẫu: ${fromFolder.Name}`;
27719
+ this.templateInputDesc = `Trích xuất cấu trúc & phân quyền từ thư mục "${fromFolder.Name}"`;
27720
+ this.templateInputIcon = 'gold';
27721
+ this.templateVisibleToAll = this.drive.isCurrentUserAdmin();
27722
+ this.templateCreateWrapperRoot = true;
27723
+ this.templateRootPermissions.set([]);
27724
+ this.templateNodePermissionsMap.set({});
27725
+ this.templateIndentedText = '';
27726
+ this.loadFolderSubtreeIntoTemplateEditor(fromFolder.Id);
27727
+ }
27728
+ else {
27729
+ this.templateInputCode = '';
27730
+ this.templateInputName = 'Hồ sơ Dự án Mẫu';
27731
+ this.templateInputDesc = 'Cấu trúc cây thư mục chuẩn cho dự án / hồ sơ nghiệp vụ';
27732
+ this.templateInputIcon = 'gold';
27733
+ this.templateVisibleToAll = this.drive.isCurrentUserAdmin();
27734
+ this.templateCreateWrapperRoot = true;
27735
+ this.templateRootPermissions.set([]);
27736
+ this.templateNodePermissionsMap.set({});
27737
+ this.templateIndentedText = [
27738
+ '- 01. Hồ sơ pháp lý & Chủ trương',
27739
+ ' - 01.1. Tờ trình phê duyệt',
27740
+ ' - 01.2. Quyết định & Văn bản pháp lý',
27741
+ '- 02. Hồ sơ đấu thầu & Hợp đồng',
27742
+ ' - 02.1. Hồ sơ mời thầu (HSMT)',
27743
+ ' - 02.2. Hợp đồng & Phụ lục',
27744
+ '- 03. Triển khai & Thiết kế kỹ thuật',
27745
+ '- 04. Nghiệm thu, Thanh quyết toán & Đóng dự án',
27746
+ ].join('\n');
27747
+ }
27748
+ this.templateDrawerVisible = true;
27749
+ }
27750
+ async loadFolderSubtreeIntoTemplateEditor(folderId) {
27751
+ try {
27752
+ // 1. Trích xuất quyền trực tiếp của thư mục gốc
27753
+ const rootShare = await this.drive.getShareDetails(folderId);
27754
+ if (rootShare?.Permissions?.length) {
27755
+ const directRootPerms = rootShare.Permissions.filter((p) => !p.IsInherited).map((p) => ({
27756
+ GranteeType: p.GranteeType,
27757
+ GranteeId: p.GranteeId,
27758
+ GranteeName: p.GranteeName || p.GranteeId,
27759
+ AccessLevel: p.AccessLevel,
27760
+ IsDeny: p.IsDeny,
27761
+ CanDownload: p.CanDownload,
27762
+ CanShare: p.CanShare,
27763
+ }));
27764
+ this.templateRootPermissions.set(directRootPerms);
27765
+ }
27766
+ // 2. Quét đệ quy cây thư mục con và quyền riêng của từng nhánh
27767
+ const nodePermMap = {};
27768
+ const buildLinesRecursive = async (parentId, depth, parentPath) => {
27769
+ const children = await this.drive.fetchFolderChildrenForTree(parentId);
27770
+ const subFolders = children.filter((c) => c.NodeType === DriveNodeType.Folder && !c.IsDeleted);
27771
+ const lines = [];
27772
+ for (const sf of subFolders) {
27773
+ const currentPath = parentPath ? `${parentPath}/${sf.Name}` : sf.Name;
27774
+ lines.push(`${' '.repeat(depth)}- ${sf.Name}`);
27775
+ if (sf.IsShared || !sf.InheritPermissions) {
27776
+ try {
27777
+ const sfShare = await this.drive.getShareDetails(sf.Id);
27778
+ const directPerms = (sfShare?.Permissions || [])
27779
+ .filter((p) => !p.IsInherited)
27780
+ .map((p) => ({
27781
+ GranteeType: p.GranteeType,
27782
+ GranteeId: p.GranteeId,
27783
+ GranteeName: p.GranteeName || p.GranteeId,
27784
+ AccessLevel: p.AccessLevel,
27785
+ IsDeny: p.IsDeny,
27786
+ CanDownload: p.CanDownload,
27787
+ CanShare: p.CanShare,
27788
+ }));
27789
+ if (!sf.InheritPermissions || directPerms.length > 0) {
27790
+ nodePermMap[currentPath] = {
27791
+ BreakInheritance: !sf.InheritPermissions,
27792
+ Permissions: directPerms,
27793
+ };
27794
+ }
27795
+ }
27796
+ catch {
27797
+ // Ignore single subfolder share error
27798
+ }
27799
+ }
27800
+ const childLines = await buildLinesRecursive(sf.Id, depth + 1, currentPath);
27801
+ lines.push(...childLines);
27802
+ }
27803
+ return lines;
27804
+ };
27805
+ const lines = await buildLinesRecursive(folderId, 0, '');
27806
+ this.templateNodePermissionsMap.set(nodePermMap);
27807
+ if (lines.length > 0) {
27808
+ this.templateIndentedText = lines.join('\n');
27809
+ }
27810
+ else {
27811
+ this.templateIndentedText = '- 01. Tài liệu chung\n- 02. Biểu mẫu đính kèm';
27812
+ }
27813
+ }
27814
+ catch {
27815
+ // Fallback
27816
+ }
27817
+ }
27818
+ selectTemplatePermissionTarget(targetKey) {
27819
+ this.selectedTemplatePermTarget.set(targetKey || '__ROOT__');
27820
+ }
27821
+ onTemplatePermGranteeTypeChange() {
27822
+ this.templatePermSelectedGrantee = null;
27823
+ this.onSearchTemplateGrantee('');
27824
+ }
27825
+ onSearchTemplateGrantee(keyword) {
27826
+ this.drive
27827
+ .searchGrantees(keyword || '', this.templatePermGranteeType)
27828
+ .then((list) => this.templateGranteeOptions.set(list))
27829
+ .catch(() => this.templateGranteeOptions.set([]));
27830
+ }
27831
+ addPermissionToTemplateTarget() {
27832
+ const g = this.templatePermSelectedGrantee;
27833
+ if (!g) {
27834
+ this.warning('Vui lòng chọn Cá nhân, Đơn vị hoặc Vai trò cần gán vào mẫu.');
27835
+ return;
27836
+ }
27837
+ const isDeny = this.templatePermIsDeny;
27838
+ const access = isDeny ? DriveAccessLevel.None : this.templatePermAccessLevel;
27839
+ const newPerm = {
27840
+ GranteeType: g.GranteeType,
27841
+ GranteeId: g.GranteeId,
27842
+ GranteeName: g.DisplayName || g.Code || g.GranteeId,
27843
+ AccessLevel: access,
27844
+ IsDeny: isDeny,
27845
+ CanDownload: !isDeny && access >= DriveAccessLevel.Downloader,
27846
+ CanShare: !isDeny && access >= DriveAccessLevel.Manager,
27847
+ };
27848
+ const target = this.selectedTemplatePermTarget();
27849
+ const upsertInList = (list) => {
27850
+ const idx = list.findIndex((x) => x.GranteeType === newPerm.GranteeType && x.GranteeId.toLowerCase() === newPerm.GranteeId.toLowerCase());
27851
+ if (idx >= 0) {
27852
+ const copy = [...list];
27853
+ copy[idx] = newPerm;
27854
+ return copy;
27855
+ }
27856
+ return [...list, newPerm];
27857
+ };
27858
+ if (target === '__ROOT__') {
27859
+ this.templateRootPermissions.update((prev) => upsertInList(prev));
27860
+ }
27861
+ else {
27862
+ this.templateNodePermissionsMap.update((prev) => {
27863
+ const current = prev[target] || { BreakInheritance: false, Permissions: [] };
27864
+ return {
27865
+ ...prev,
27866
+ [target]: {
27867
+ ...current,
27868
+ Permissions: upsertInList(current.Permissions || []),
27869
+ },
27870
+ };
27871
+ });
27872
+ }
27873
+ this.templatePermSelectedGrantee = null;
27874
+ this.templatePermIsDeny = false;
27875
+ }
27876
+ updateTemplatePermissionLevel(perm, newLevel) {
27877
+ const target = this.selectedTemplatePermTarget();
27878
+ const updateList = (list) => list.map((x) => {
27879
+ if (x.GranteeType === perm.GranteeType && x.GranteeId === perm.GranteeId) {
27880
+ if (newLevel === 'DENY') {
27881
+ return {
27882
+ ...x,
27883
+ IsDeny: true,
27884
+ AccessLevel: DriveAccessLevel.None,
27885
+ CanDownload: false,
27886
+ CanShare: false,
27887
+ };
27888
+ }
27889
+ return {
27890
+ ...x,
27891
+ IsDeny: false,
27892
+ AccessLevel: newLevel,
27893
+ CanDownload: newLevel >= DriveAccessLevel.Downloader,
27894
+ CanShare: newLevel >= DriveAccessLevel.Manager,
27895
+ };
27896
+ }
27897
+ return x;
27898
+ });
27899
+ if (target === '__ROOT__') {
27900
+ this.templateRootPermissions.update((prev) => updateList(prev));
27901
+ }
27902
+ else {
27903
+ this.templateNodePermissionsMap.update((prev) => {
27904
+ const current = prev[target];
27905
+ if (!current)
27906
+ return prev;
27907
+ return {
27908
+ ...prev,
27909
+ [target]: {
27910
+ ...current,
27911
+ Permissions: updateList(current.Permissions || []),
27912
+ },
27913
+ };
27914
+ });
27915
+ }
27916
+ }
27917
+ removePermissionFromTemplateTarget(perm) {
27918
+ const target = this.selectedTemplatePermTarget();
27919
+ const filterList = (list) => list.filter((x) => !(x.GranteeType === perm.GranteeType && x.GranteeId === perm.GranteeId));
27920
+ if (target === '__ROOT__') {
27921
+ this.templateRootPermissions.update((prev) => filterList(prev));
27922
+ }
27923
+ else {
27924
+ this.templateNodePermissionsMap.update((prev) => {
27925
+ const current = prev[target];
27926
+ if (!current)
27927
+ return prev;
27928
+ return {
27929
+ ...prev,
27930
+ [target]: {
27931
+ ...current,
27932
+ Permissions: filterList(current.Permissions || []),
27933
+ },
27934
+ };
27935
+ });
27936
+ }
27937
+ }
27938
+ onToggleTemplateNodeBreakInheritance(breakInheritance) {
27939
+ const target = this.selectedTemplatePermTarget();
27940
+ if (target === '__ROOT__')
27941
+ return;
27942
+ this.templateNodePermissionsMap.update((prev) => {
27943
+ const current = prev[target] || { BreakInheritance: false, Permissions: [] };
27944
+ return {
27945
+ ...prev,
27946
+ [target]: {
27947
+ ...current,
27948
+ BreakInheritance: breakInheritance,
27949
+ },
27950
+ };
27951
+ });
27952
+ }
27953
+ loadPresetTemplateStructure(presetType) {
27954
+ if (presetType === 'PROJECT') {
27955
+ this.templateInputName = 'Mẫu Hồ sơ Dự án Chuẩn';
27956
+ this.templateInputCode = 'MAU_DU_AN';
27957
+ this.templateIndentedText = [
27958
+ '- 01. Chuẩn bị đầu tư & Chủ trương',
27959
+ ' - 01.1. Đề xuất & Tờ trình',
27960
+ ' - 01.2. Quyết định phê duyệt',
27961
+ '- 02. Đấu thầu & Hợp đồng',
27962
+ ' - 02.1. Hồ sơ thầu',
27963
+ ' - 02.2. Hợp đồng & Bảo lãnh',
27964
+ '- 03. Tổ chức triển khai & Giám sát',
27965
+ ' - 03.1. Bản vẽ & Thiết kế',
27966
+ ' - 03.2. Biên bản họp & Báo cáo tuần',
27967
+ '- 04. Nghiệm thu & Bàn giao',
27968
+ '- 05. Quyết toán & Lưu trữ',
27969
+ ].join('\n');
27970
+ }
27971
+ else if (presetType === 'CONTRACT') {
27972
+ this.templateInputName = 'Mẫu Hồ sơ Hợp đồng Kinh tế';
27973
+ this.templateInputCode = 'MAU_HOP_DONG';
27974
+ this.templateIndentedText = [
27975
+ '- 01. Dự thảo & Thẩm định hợp đồng',
27976
+ '- 02. Hợp đồng chính thức & Phụ lục',
27977
+ '- 03. Hồ sơ giao nhận & Biên bản nghiệm thu',
27978
+ '- 04. Hóa đơn, Chứng từ thanh toán & Thanh lý',
27979
+ ].join('\n');
27980
+ }
27981
+ else {
27982
+ this.templateInputName = 'Mẫu Hồ sơ Khóa đào tạo / Đề tài KHCN';
27983
+ this.templateInputCode = 'MAU_DAO_TAO_KHCN';
27984
+ this.templateIndentedText = [
27985
+ '- 01. Kế hoạch & Đề cương chương trình',
27986
+ '- 02. Tài liệu giảng dạy & Bài giảng',
27987
+ '- 03. Danh sách học viên & Điểm danh',
27988
+ '- 04. Bài kiểm tra, Đánh giá & Chứng chỉ',
27989
+ ].join('\n');
27990
+ }
27991
+ }
27992
+ async submitTemplateDrawer() {
27993
+ const name = this.templateInputName.trim();
27994
+ if (!name) {
27995
+ this.warning('Vui lòng nhập tên mẫu cây thư mục.');
27996
+ return;
27997
+ }
27998
+ const parsedNodes = this.drive.parseIndentedTextToTemplateTree(this.templateIndentedText, this.templateNodePermissionsMap());
27999
+ if (!parsedNodes.length && !this.templateSourceFolderId) {
28000
+ this.warning('Vui lòng nhập ít nhất 1 dòng tên thư mục trong cấu trúc cây thư mục mẫu.');
28001
+ return;
28002
+ }
28003
+ const payload = {
28004
+ Code: this.templateInputCode.trim() || undefined,
28005
+ Name: name,
28006
+ Description: this.templateInputDesc.trim() || undefined,
28007
+ Icon: this.templateInputIcon || 'gold',
28008
+ IsVisibleToAllUsers: this.drive.isCurrentUserAdmin() ? this.templateVisibleToAll : false,
28009
+ CreateWrapperRootFolder: this.templateCreateWrapperRoot,
28010
+ Permissions: this.templateRootPermissions(),
28011
+ Nodes: parsedNodes,
28012
+ SourceFolderId: this.templateSourceFolderId,
28013
+ CopyPermissionsFromSource: this.templateCopyPermissionsFromSource,
28014
+ };
28015
+ try {
28016
+ if (this.templateDrawerMode === 'create') {
28017
+ const res = await this.drive.createFolderTemplate(payload);
28018
+ if (res.IsSuccess) {
28019
+ this.success(`Đã lưu mẫu cây thư mục "${name}" kèm cấu hình phân quyền.`);
28020
+ this.templateDrawerVisible = false;
28021
+ }
28022
+ else {
28023
+ this.error(res.ErrorMessage);
28024
+ }
28025
+ }
28026
+ else if (this.editingTemplate) {
28027
+ const res = await this.drive.updateFolderTemplate(this.editingTemplate.Id, payload);
28028
+ if (res.IsSuccess) {
28029
+ this.success(`Đã cập nhật mẫu cây thư mục "${name}".`);
28030
+ this.templateDrawerVisible = false;
28031
+ }
28032
+ else {
28033
+ this.error(res.ErrorMessage);
28034
+ }
28035
+ }
28036
+ }
28037
+ catch (err) {
28038
+ this.handleError(err);
28039
+ }
28040
+ }
28041
+ async onDeleteTemplate(tpl) {
28042
+ if (!(await this.confirm(`Xác nhận xóa mẫu cây thư mục "${tpl.Name}"?`)))
28043
+ return;
28044
+ try {
28045
+ const res = await this.drive.deleteFolderTemplate(tpl.Id);
28046
+ if (res.IsSuccess) {
28047
+ this.success(`Đã xóa mẫu "${tpl.Name}".`);
28048
+ this.templateDrawerVisible = false;
28049
+ }
28050
+ else {
28051
+ this.error(res.ErrorMessage);
28052
+ }
28053
+ }
28054
+ catch (err) {
28055
+ this.handleError(err);
28056
+ }
28057
+ }
28058
+ onTemplateDragStart(event, tpl) {
28059
+ this.draggedTemplate.set(tpl);
28060
+ if (event.dataTransfer) {
28061
+ event.dataTransfer.effectAllowed = 'copy';
28062
+ event.dataTransfer.setData('application/x-drive-folder-template', tpl.Id);
28063
+ event.dataTransfer.setData('text/plain', tpl.Id);
28064
+ }
28065
+ }
28066
+ onTemplateDragEnd() {
28067
+ this.resetDragState();
28068
+ }
28069
+ async applyTemplateToTargetFolder(tpl, targetParentId, targetFolderDisplayName, targetIsOrg) {
28070
+ if (!(await this.confirm('Tạo folder theo mẫu?')))
28071
+ return;
28072
+ try {
28073
+ const res = await this.drive.applyFolderTemplate({
28074
+ TemplateId: tpl.Id,
28075
+ TargetParentId: targetParentId,
28076
+ IsOrgNode: targetIsOrg,
28077
+ CreateWrapperRootFolder: tpl.CreateWrapperRootFolder,
28078
+ WrapperRootFolderName: tpl.Name,
28079
+ });
28080
+ if (res.IsSuccess) {
28081
+ const count = res.Data?.CreatedFolderCount ?? res.Data?.createdFolderCount ?? 0;
28082
+ if (targetParentId && this.drive.isTreeTableView()) {
28083
+ this.expandedTreeFolderIds.update((set) => {
28084
+ const next = new Set(set);
28085
+ next.add(targetParentId);
28086
+ return next;
28087
+ });
28088
+ }
28089
+ await this.reloadExpandedTreeFolders();
28090
+ const destLabel = targetFolderDisplayName ? `"${targetFolderDisplayName}"` : 'thư mục hiện tại';
28091
+ this.success(`Đã tạo nhanh cây thư mục mẫu "${tpl.Name}" (${count} thư mục) vào ${destLabel}.`);
28092
+ }
28093
+ else {
28094
+ this.error(res.ErrorMessage || 'Không thể tạo cây thư mục từ mẫu.');
28095
+ }
28096
+ }
28097
+ catch (err) {
28098
+ this.handleError(err);
28099
+ }
28100
+ }
27335
28101
  pendingResumeTaskId = null;
27336
28102
  onFilesSelected(event) {
27337
28103
  const input = event.target;
@@ -27487,6 +28253,14 @@ class DriveExplorerComponent extends BaseComponent {
27487
28253
  }
27488
28254
  }
27489
28255
  onMainDragOver(event) {
28256
+ if (this.draggedTemplate()) {
28257
+ if (!this.drive.canUploadCurrentFolder())
28258
+ return;
28259
+ event.preventDefault();
28260
+ if (event.dataTransfer)
28261
+ event.dataTransfer.dropEffect = 'copy';
28262
+ return;
28263
+ }
27490
28264
  if (!this.isExternalFileDrag(event))
27491
28265
  return;
27492
28266
  event.preventDefault();
@@ -27509,6 +28283,18 @@ class DriveExplorerComponent extends BaseComponent {
27509
28283
  }
27510
28284
  }
27511
28285
  async onMainDrop(event) {
28286
+ const draggedTpl = this.draggedTemplate();
28287
+ if (draggedTpl) {
28288
+ event.preventDefault();
28289
+ event.stopPropagation();
28290
+ this.resetDragState();
28291
+ if (!this.drive.canUploadCurrentFolder()) {
28292
+ this.warning('Bạn không có quyền tạo thư mục tại vị trí này.');
28293
+ return;
28294
+ }
28295
+ await this.applyTemplateToTargetFolder(draggedTpl, this.drive.currentFolderId());
28296
+ return;
28297
+ }
27512
28298
  if (!this.isExternalFileDrag(event))
27513
28299
  return;
27514
28300
  event.preventDefault();
@@ -27542,6 +28328,7 @@ class DriveExplorerComponent extends BaseComponent {
27542
28328
  this.dragOverNavSpace.set(null);
27543
28329
  this.dragOverCustomSpaceId.set(null);
27544
28330
  this.isExternalFileDragging.set(false);
28331
+ this.draggedTemplate.set(null);
27545
28332
  this.externalDragCounter = 0;
27546
28333
  }
27547
28334
  onCustomSpaceDragOver(event, space) {
@@ -27653,6 +28440,18 @@ class DriveExplorerComponent extends BaseComponent {
27653
28440
  }
27654
28441
  }
27655
28442
  onRowDragOver(event, targetItem) {
28443
+ if (this.draggedTemplate()) {
28444
+ if (!this.isFolderLike(targetItem) || targetItem.IsBrokenShortcut)
28445
+ return;
28446
+ if (targetItem.EffectiveAccess < DriveAccessLevel.Uploader)
28447
+ return;
28448
+ event.preventDefault();
28449
+ if (event.dataTransfer)
28450
+ event.dataTransfer.dropEffect = 'copy';
28451
+ this.dragOverFolderId.set(targetItem.Id);
28452
+ this.dragOverFolderName.set(targetItem.Name);
28453
+ return;
28454
+ }
27656
28455
  // Trường hợp 1: Kéo file/folder từ File Explorer của máy tính thả vào 1 dòng Thư mục trên bảng
27657
28456
  if (this.isExternalFileDrag(event)) {
27658
28457
  if (!this.isFolderLike(targetItem) || targetItem.IsBrokenShortcut)
@@ -27687,6 +28486,17 @@ class DriveExplorerComponent extends BaseComponent {
27687
28486
  }
27688
28487
  }
27689
28488
  async onRowDrop(event, targetItem) {
28489
+ const draggedTpl = this.draggedTemplate();
28490
+ if (draggedTpl) {
28491
+ event.preventDefault();
28492
+ event.stopPropagation();
28493
+ const destFolderId = targetItem.NodeType === DriveNodeType.Shortcut ? (targetItem.ShortcutTargetId ?? null) : targetItem.Id;
28494
+ this.resetDragState();
28495
+ if (this.isFolderLike(targetItem) && destFolderId) {
28496
+ await this.applyTemplateToTargetFolder(draggedTpl, destFolderId, targetItem.Name, targetItem.IsOrgNode);
28497
+ }
28498
+ return;
28499
+ }
27690
28500
  // Trường hợp 1: Thả file/folder từ File Explorer vào thẳng 1 dòng Thư mục trên bảng
27691
28501
  if (this.isExternalFileDrag(event)) {
27692
28502
  event.preventDefault();
@@ -27733,6 +28543,13 @@ class DriveExplorerComponent extends BaseComponent {
27733
28543
  }
27734
28544
  }
27735
28545
  onBreadcrumbDragOver(event, bcKey) {
28546
+ if (this.draggedTemplate()) {
28547
+ event.preventDefault();
28548
+ if (event.dataTransfer)
28549
+ event.dataTransfer.dropEffect = 'copy';
28550
+ this.dragOverBreadcrumbId.set(bcKey);
28551
+ return;
28552
+ }
27736
28553
  if (this.isExternalFileDrag(event)) {
27737
28554
  event.preventDefault();
27738
28555
  if (event.dataTransfer)
@@ -27757,6 +28574,14 @@ class DriveExplorerComponent extends BaseComponent {
27757
28574
  }
27758
28575
  }
27759
28576
  async onBreadcrumbDrop(event, targetFolderId) {
28577
+ const draggedTpl = this.draggedTemplate();
28578
+ if (draggedTpl) {
28579
+ event.preventDefault();
28580
+ event.stopPropagation();
28581
+ this.resetDragState();
28582
+ await this.applyTemplateToTargetFolder(draggedTpl, targetFolderId);
28583
+ return;
28584
+ }
27760
28585
  if (this.isExternalFileDrag(event)) {
27761
28586
  event.preventDefault();
27762
28587
  event.stopPropagation();
@@ -28227,7 +29052,7 @@ class DriveExplorerComponent extends BaseComponent {
28227
29052
  this.matrixDrawerVisible = true;
28228
29053
  }
28229
29054
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: DriveExplorerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
28230
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.7", type: DriveExplorerComponent, isStandalone: true, selector: "lib-drive-explorer", providers: [NzImageService], usesInheritance: true, ngImport: i0, template: "@if (activeShareToken(); as sToken) {\n <lib-drive-share-viewer [token]=\"sToken\" (backToDrive)=\"closeEmbeddedShareViewer()\"></lib-drive-share-viewer>\n} @else {\n <div class=\"drive-shell\">\n <!-- SIDEBAR \u0110I\u1EC0U H\u01AF\u1EDANG & QUOTA -->\n <aside class=\"drive-sidebar\">\n <div nz-flex nzVertical nzGap=\"small\">\n <button\n nz-button\n nzType=\"primary\"\n nzBlock\n [disabled]=\"!drive.canUploadCurrentFolder()\"\n (click)=\"fileInput.click()\"\n >\n <nz-icon nzType=\"cloud-upload\"></nz-icon> T\u1EA3i t\u1EADp tin l\u00EAn\n </button>\n <input #fileInput type=\"file\" multiple hidden (change)=\"onFilesSelected($event)\" />\n <button\n nz-button\n nzType=\"default\"\n nzBlock\n [disabled]=\"!drive.canUploadCurrentFolder()\"\n (click)=\"openFolderDrawer('create')\"\n >\n <nz-icon nzType=\"folder-add\"></nz-icon> T\u1EA1o th\u01B0 m\u1EE5c m\u1EDBi\n </button>\n </div>\n <nav class=\"drive-nav\">\n <a\n [class.active]=\"drive.currentViewMode() === 'MY_DRIVE'\"\n [class.nav-drop-active]=\"dragOverNavSpace() === 'MY_DRIVE'\"\n (click)=\"switchView('MY_DRIVE')\"\n (dragover)=\"onNavSpaceDragOver($event, 'MY_DRIVE')\"\n (dragleave)=\"onNavSpaceDragLeave('MY_DRIVE')\"\n (drop)=\"onNavSpaceDrop($event, 'MY_DRIVE')\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"K\u00E9o th\u1EA3 t\u1EADp tin / th\u01B0 m\u1EE5c v\u00E0o \u0111\u00E2y \u0111\u1EC3 chuy\u1EC3n v\u1EC1 g\u1ED1c Drive c\u00E1 nh\u00E2n\"\n -->\n <nz-icon nzType=\"hdd\"></nz-icon> Drive c\u00E1 nh\u00E2n\n </a>\n <div class=\"org-nav-group\">\n <a\n [class.active]=\"drive.currentViewMode() === 'ORG_DRIVE'\"\n [class.nav-drop-active]=\"dragOverNavSpace() === 'ORG_DRIVE'\"\n (click)=\"switchView('ORG_DRIVE')\"\n (dragover)=\"onNavSpaceDragOver($event, 'ORG_DRIVE')\"\n (dragleave)=\"onNavSpaceDragLeave('ORG_DRIVE')\"\n (drop)=\"onNavSpaceDrop($event, 'ORG_DRIVE')\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"K\u00E9o th\u1EA3 t\u1EADp tin / th\u01B0 m\u1EE5c v\u00E0o \u0111\u00E2y \u0111\u1EC3 chuy\u1EC3n sang g\u1ED1c T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB\"\n -->\n <nz-icon nzType=\"apartment\"></nz-icon>\n <span style=\"flex: 1\">T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB</span>\n <button\n type=\"button\"\n class=\"nav-inline-btn\"\n (click)=\"$event.stopPropagation(); openCustomSpaceDrawer('create')\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"Th\u00EAm m\u1EE5c t\u00F9y ch\u1EC9nh b\u00EAn d\u01B0\u1EDBi T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB (VD: T\u00E0i li\u1EC7u d\u1EF1 \u00E1n)\"\n -->\n <nz-icon nzType=\"plus\"></nz-icon>\n </button>\n </a>\n <!-- DANH S\u00C1CH C\u00C1C M\u1EE4C CUSTOM B\u00CAN D\u01AF\u1EDAI \"T\u00C0I LI\u1EC6U \u0110\u01A0N V\u1ECA\" (VD: \"T\u00E0i li\u1EC7u d\u1EF1 \u00E1n\") -->\n @for (sp of drive.customSpaces(); track sp.Id) {\n <a\n class=\"custom-space-link\"\n [class.active]=\"drive.currentViewMode() === 'CUSTOM_SPACE' && drive.currentCustomSpaceId() === sp.Id\"\n [class.nav-drop-active]=\"dragOverCustomSpaceId() === sp.Id\"\n (click)=\"switchCustomSpace(sp)\"\n (dragover)=\"onCustomSpaceDragOver($event, sp)\"\n (dragleave)=\"onCustomSpaceDragLeave(sp)\"\n (drop)=\"onCustomSpaceDrop($event, sp)\"\n >\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"sp.Name + (sp.IsVisibleToAllUsers ? ' (Hi\u1EC3n th\u1ECB cho t\u1EA5t c\u1EA3 User)' : ' (M\u1EE5c c\u00E1 nh\u00E2n)')\"\n -->\n <nz-icon [nzType]=\"sp.Icon || 'project'\"></nz-icon>\n <span class=\"custom-space-title\">{{ sp.Name }}</span>\n @if (sp.IsVisibleToAllUsers) {\n <nz-tag nzColor=\"cyan\" class=\"custom-space-badge\">All</nz-tag>\n }\n @if (sp.CanManage || drive.isCurrentUserAdmin()) {\n <button\n type=\"button\"\n class=\"nav-inline-btn\"\n (click)=\"$event.stopPropagation(); openCustomSpaceDrawer('edit', sp)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"C\u1EA5u h\u00ECnh m\u1EE5c t\u00F9y ch\u1EC9nh\"\n -->\n <nz-icon nzType=\"setting\"></nz-icon>\n </button>\n }\n </a>\n }\n </div>\n <a [class.active]=\"drive.currentViewMode() === 'SHARED_WITH_ME'\" (click)=\"switchView('SHARED_WITH_ME')\">\n <nz-icon nzType=\"share-alt\"></nz-icon> \u0110\u01B0\u1EE3c chia s\u1EBB v\u1EDBi t\u00F4i\n </a>\n <a [class.active]=\"drive.currentViewMode() === 'RECENT'\" (click)=\"switchView('RECENT')\">\n <nz-icon nzType=\"clock-circle\"></nz-icon> G\u1EA7n \u0111\u00E2y\n </a>\n <a [class.active]=\"drive.currentViewMode() === 'STARRED'\" (click)=\"switchView('STARRED')\">\n <nz-icon nzType=\"star\"></nz-icon> C\u00F3 g\u1EAFn d\u1EA5u sao\n </a>\n <a [class.active]=\"drive.currentViewMode() === 'TRASH'\" (click)=\"switchView('TRASH')\">\n <nz-icon nzType=\"delete\"></nz-icon> Th\u00F9ng r\u00E1c\n </a>\n </nav>\n <!-- H\u1ED8P C\u1EA4U H\u00CCNH CH\u1EBE \u0110\u1ED8 TH\u01AF M\u1EE4C V\u1EACT L\u00DD vs \u1EA2O H\u00D3A -->\n @if (drive.isCurrentUserAdmin() && false) {\n <div class=\"storage-mode-box\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\">\n <span style=\"font-size: 12px; font-weight: 600\">Th\u01B0 m\u1EE5c v\u1EADt l\u00FD (Disk)</span>\n <nz-switch\n nzSize=\"small\"\n [ngModel]=\"drive.usePhysicalFolders()\"\n (ngModelChange)=\"onTogglePhysicalMode($event)\"\n ></nz-switch>\n\n <!-- \n nz-tooltip\n nzTooltipTitle=\"Khi b\u1EADt: T\u1EA1o c\u00E2y th\u01B0 m\u1EE5c & t\u00EAn file th\u1EADt 1-1 tr\u00EAn \u1ED5 c\u1EE9ng m\u00E1y ch\u1EE7\"\n -->\n </div>\n <div class=\"quota-sub\">\n Ch\u1EBF \u0111\u1ED9: <strong>{{ drive.usePhysicalFolders() ? \"V\u1EADt l\u00FD 1:1 (Physical)\" : \"\u1EA2o h\u00F3a (Virtual)\" }}</strong>\n </div>\n @if (drive.usePhysicalFolders()) {\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"margin-top: 8px\">\n <span style=\"font-size: 12px\">\n <!-- \n nz-tooltip\n nzTooltipTitle=\"Khi b\u1EADt: T\u1EA5t c\u1EA3 User c\u00F9ng d\u00F9ng chung 1 RootPath duy nh\u1EA5t \u0111\u1EC3 l\u01B0u tr\u1EEF t\u00E0i li\u1EC7u d\u1EF1 \u00E1n\"\n -->\n D\u00F9ng chung RootPath\n </span>\n <nz-switch\n nzSize=\"small\"\n [ngModel]=\"drive.useSharedPhysicalRoot()\"\n (ngModelChange)=\"onToggleSharedRootMode($event)\"\n ></nz-switch>\n </div>\n <div class=\"quota-sub\">\n Ph\u1EA1m vi \u0111\u0129a:\n <strong>{{ drive.useSharedPhysicalRoot() ? \"Chung to\u00E0n d\u1EF1 \u00E1n\" : \"T\u00E1ch theo t\u1EEBng User\" }}</strong>\n </div>\n <div nz-flex nzVertical [nzGap]=\"6\" style=\"margin-top: 8px\">\n <button nz-button nzType=\"dashed\" nzSize=\"small\" nzBlock (click)=\"onSyncPhysicalDisk()\">\n <!-- \n nz-tooltip\n nzTooltipTitle=\"Qu\u00E9t c\u00E1c file/th\u01B0 m\u1EE5c copy tr\u1EF1c ti\u1EBFp tr\u00EAn \u1ED5 \u0111\u0129a Server \u0111\u1EC3 n\u1EA1p v\u00E0o Drive\"\n -->\n <nz-icon nzType=\"sync\"></nz-icon> \u0110\u1ED3ng b\u1ED9 t\u1EEB \u1ED5 \u0111\u0129a\n </button>\n <button nz-button nzType=\"default\" nzSize=\"small\" nzBlock (click)=\"openRelocateDrawer(null)\">\n <!-- \n nz-tooltip\n nzTooltipTitle=\"\u0110\u1ED5i \u0111\u01B0\u1EDDng d\u1EABn RootPath ho\u1EB7c \u00E1nh x\u1EA1 sang \u1ED5 c\u1EE9ng l\u01B0u tr\u1EEF kh\u00E1c\"\n -->\n <nz-icon nzType=\"folder-open\"></nz-icon> \u0110\u1ED5i RootPath / \u1ED4 \u0111\u0129a\n </button>\n </div>\n }\n </div>\n }\n <!-- H\u1ED8P TI\u1EBEN TR\u00CCNH UPLOAD (H\u1ED6 TR\u1EE2 T\u1EA2I TI\u1EBEP KHI L\u1ED6I / T\u1EA0M D\u1EEANG / H\u1EE6Y) -->\n @if (drive.userUploadQueue().length > 0) {\n <div class=\"upload-queue-box\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"margin-bottom: 6px\">\n <strong>Ti\u1EBFn tr\u00ECnh t\u1EA3i l\u00EAn ({{ drive.userUploadQueue().length }})</strong>\n <a (click)=\"drive.clearCompletedUploads()\" style=\"font-size: 12px\">\u1EA8n \u0111\u00E3 xong</a>\n </div>\n <input #resumeFileInput type=\"file\" hidden (change)=\"onResumeFileSelected($event)\" />\n @for (task of drive.userUploadQueue(); track task.id) {\n <div class=\"upload-task-row\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" [nzGap]=\"4\">\n <div class=\"upload-task-name\" [title]=\"task.fileName\">{{ task.fileName }}</div>\n <div nz-flex nzAlign=\"center\" [nzGap]=\"2\">\n @if (task.status === \"uploading\" && (task.fileSize || 0) >= 20971520) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n (click)=\"drive.pauseUploadTask(task.id)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"T\u1EA1m d\u1EEBng t\u1EA3i l\u00EAn\"\n -->\n <nz-icon nzType=\"pause-circle\"></nz-icon>\n </button>\n }\n @if (task.status === \"error\" || task.status === \"paused\") {\n <button\n type=\"button\"\n nz-button\n nzType=\"link\"\n nzSize=\"small\"\n style=\"padding: 0 4px; font-size: 12px; font-weight: 600\"\n (click)=\"onResumeUploadClick(task, resumeFileInput)\"\n >\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"task.errorMessage || 'T\u1EA3i l\u00EAn ti\u1EBFp t\u1EEB ph\u1EA7n tr\u0103m \u0111\u00E3 l\u01B0u (Resume Upload)'\"\n -->\n <nz-icon nzType=\"reload\"></nz-icon> T\u1EA3i ti\u1EBFp\n </button>\n }\n @if (task.status !== \"uploading\") {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzDanger\n nzSize=\"small\"\n style=\"padding: 0 4px\"\n (click)=\"drive.removeUploadTask(task.id)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"X\u00F3a kh\u1ECFi danh s\u00E1ch & h\u1EE7y phi\u00EAn t\u1EA1m\"\n -->\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n }\n </div>\n </div>\n <nz-progress\n [nzPercent]=\"task.progress\"\n nzSize=\"small\"\n [nzStatus]=\"\n task.status === 'error'\n ? 'exception'\n : task.status === 'success'\n ? 'success'\n : task.status === 'paused'\n ? 'normal'\n : 'active'\n \"\n ></nz-progress>\n @if (task.status === \"error\") {\n <div style=\"font-size: 11px; color: #ef4444; margin-top: 2px\">\n {{ task.errorMessage || \"B\u1ECB ng\u1EAFt k\u1EBFt n\u1ED1i.\" }} \u2014 B\u1EA5m <strong>T\u1EA3i ti\u1EBFp</strong> \u0111\u1EC3 n\u1ED1i l\u1EA1i t\u1EEB\n {{ task.progress }}%.\n </div>\n }\n @if (task.status === \"paused\") {\n <div style=\"font-size: 11px; color: #f59e0b; margin-top: 2px\">\n \u0110\u00E3 t\u1EA1m d\u1EEBng \u1EDF {{ task.progress }}% \u2014 B\u1EA5m <strong>T\u1EA3i ti\u1EBFp</strong> \u0111\u1EC3 ti\u1EBFp t\u1EE5c.\n </div>\n }\n </div>\n }\n </div>\n }\n <div class=\"quota-box\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\">\n <div class=\"quota-title\" style=\"margin-bottom: 0\">\n <nz-icon nzType=\"cloud\"></nz-icon> Dung l\u01B0\u1EE3ng ({{ drive.quotaPercent() }}%)\n </div>\n @if (drive.isCurrentUserAdmin()) {\n <nz-tag nzColor=\"gold\" style=\"margin-right: 0; font-size: 11px\">Admin</nz-tag>\n }\n </div>\n <nz-progress [nzPercent]=\"drive.quotaPercent()\" nzSize=\"small\" [nzShowInfo]=\"false\"></nz-progress>\n <div class=\"quota-sub\">{{ drive.usedBytes() | formatBytes }} / {{ drive.quotaLimitBytes() | formatBytes }}</div>\n @if (drive.isCurrentUserAdmin()) {\n <button\n nz-button\n nzType=\"dashed\"\n nzSize=\"small\"\n nzBlock\n style=\"margin-top: 8px\"\n (click)=\"openPermissionMatrixDrawer(drive.currentFolderId())\"\n >\n <nz-icon nzType=\"table\"></nz-icon>\n Ma tr\u1EADn ph\u00E2n quy\u1EC1n\n </button>\n <button\n nz-button\n nzType=\"dashed\"\n nzSize=\"small\"\n nzBlock\n style=\"margin-top: 8px\"\n (click)=\"openQuotaAdminDrawer()\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"\u0110\u1EB7t Quota m\u1EB7c \u0111\u1ECBnh to\u00E0n h\u1EC7 th\u1ED1ng v\u00E0 thi\u1EBFt l\u1EADp Quota ri\u00EAng cho t\u1EEBng ng\u01B0\u1EDDi d\u00F9ng (Ch\u1EC9 Admin)\"\n -->\n <nz-icon nzType=\"setting\"></nz-icon> Qu\u1EA3n l\u00FD Quota (Admin)\n </button>\n }\n </div>\n </aside>\n <!-- KHU V\u1EF0C N\u1ED8I DUNG CH\u00CDNH (H\u1ED6 TR\u1EE2 K\u00C9O TH\u1EA2 FILE & FOLDER T\u1EEA FILE EXPLORER) -->\n <main\n class=\"drive-main\"\n [class.external-drag-active]=\"isExternalFileDragging()\"\n (dragenter)=\"onMainDragEnter($event)\"\n (dragover)=\"onMainDragOver($event)\"\n (dragleave)=\"onMainDragLeave($event)\"\n (drop)=\"onMainDrop($event)\"\n >\n @if (isExternalFileDragging()) {\n <div class=\"external-drop-banner\">\n <nz-icon nzType=\"cloud-upload\" class=\"drop-banner-icon\"></nz-icon>\n <div>\n <div class=\"drop-banner-title\">\n @if (dragOverFolderName(); as targetName) {\n Th\u1EA3 t\u1EADp tin / th\u01B0 m\u1EE5c t\u1EEB m\u00E1y t\u00EDnh \u0111\u1EC3 t\u1EA3i th\u1EB3ng v\u00E0o th\u01B0 m\u1EE5c: <strong>\"{{ targetName }}\"</strong>\n } @else {\n Th\u1EA3 t\u1EADp tin ho\u1EB7c th\u01B0 m\u1EE5c t\u1EEB File Explorer v\u00E0o \u0111\u00E2y \u0111\u1EC3 t\u1EA3i l\u00EAn th\u01B0 m\u1EE5c hi\u1EC7n t\u1EA1i\n }\n </div>\n <div class=\"drop-banner-sub\">\n H\u1ED7 tr\u1EE3 k\u00E9o th\u1EA3 nhi\u1EC1u file c\u00F9ng l\u00FAc ho\u1EB7c k\u00E9o nguy\u00EAn c\u1EA3 c\u00E2y th\u01B0 m\u1EE5c t\u1EEB m\u00E1y t\u00EDnh (T\u1EF1 \u0111\u1ED9ng Chunk Upload n\u1EBFu\n file &ge; 20MB)\n </div>\n </div>\n </div>\n }\n <!-- TOOLBAR + PAGINATION -->\n <header class=\"drive-toolbar\">\n <div>\n <nz-breadcrumb>\n <nz-breadcrumb-item\n (click)=\"navigateToFolder(null)\"\n (dragover)=\"onBreadcrumbDragOver($event, '__ROOT__')\"\n (dragleave)=\"onBreadcrumbDragLeave('__ROOT__')\"\n (drop)=\"onBreadcrumbDrop($event, null)\"\n [class.bc-drop-active]=\"dragOverBreadcrumbId() === '__ROOT__'\"\n class=\"cursor-pointer\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"K\u00E9o th\u1EA3 m\u1EE5c v\u00E0o \u0111\u00E2y \u0111\u1EC3 chuy\u1EC3n v\u1EC1 th\u01B0 m\u1EE5c g\u1ED1c\"\n -->\n <nz-icon nzType=\"home\"></nz-icon>\n {{ getRootTitle() }}\n </nz-breadcrumb-item>\n @for (bc of drive.breadcrumbs(); track bc.Id) {\n <nz-breadcrumb-item\n (click)=\"navigateToFolder(bc.Id)\"\n (dragover)=\"onBreadcrumbDragOver($event, bc.Id)\"\n (dragleave)=\"onBreadcrumbDragLeave(bc.Id)\"\n (drop)=\"onBreadcrumbDrop($event, bc.Id)\"\n [class.bc-drop-active]=\"dragOverBreadcrumbId() === bc.Id\"\n class=\"cursor-pointer\"\n >\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"'K\u00E9o th\u1EA3 v\u00E0o \u0111\u00E2y \u0111\u1EC3 chuy\u1EC3n t\u1EDBi: ' + bc.Name\"\n -->\n {{ bc.Name }}\n </nz-breadcrumb-item>\n }\n </nz-breadcrumb>\n <!-- @if (drive.isCurrentUserAdmin() && drive.usePhysicalFolders() && drive.currentPhysicalPath(); as physPath) {\n <div class=\"physical-path-bar\">\n <nz-icon nzType=\"folder-open\"></nz-icon>\n <span>\n \u0110\u01B0\u1EDDng d\u1EABn v\u1EADt l\u00FD: <code>{{ physPath }}</code>\n </span>\n <icon-copy [textToCopy]=\"physPath\" tooltip=\"Sao ch\u00E9p \u0111\u01B0\u1EDDng d\u1EABn v\u1EADt l\u00FD tr\u00EAn Server\"></icon-copy>\n </div>\n } -->\n </div>\n <div class=\"toolbar-actions\">\n <nz-input-group [nzSuffix]=\"suffixIconSearch\" style=\"width: 250px\">\n <input\n type=\"text\"\n nz-input\n placeholder=\"T\u00ECm ki\u1EBFm t\u00E0i li\u1EC7u, th\u01B0 m\u1EE5c...\"\n [ngModel]=\"drive.keyword()\"\n (ngModelChange)=\"drive.keyword.set($event)\"\n (keyup.enter)=\"onSearch()\"\n />\n </nz-input-group>\n <ng-template #suffixIconSearch>\n <nz-icon nzType=\"search\" class=\"cursor-pointer\" (click)=\"onSearch()\"></nz-icon>\n </ng-template>\n <label\n nz-checkbox\n [ngModel]=\"drive.includeSubfolders()\"\n (ngModelChange)=\"onToggleIncludeSubfolders($event)\"\n style=\"user-select: none; white-space: nowrap; font-size: 13px\"\n nz-tooltip\n nzTooltipTitle=\"T\u00ECm c\u1EA3 th\u01B0 m\u1EE5c con\"\n >\n </label>\n <!-- T\u00D9Y CH\u1ECCN CH\u1EBE \u0110\u1ED8 XEM: B\u1EA2NG PH\u1EB2NG vs C\u00C2Y TH\u01AF M\u1EE4C (TREE TABLE) -->\n <div class=\"view-mode-switch\" nz-flex nzAlign=\"center\" [nzGap]=\"4\">\n <button\n nz-button\n nzSize=\"small\"\n [nzType]=\"!drive.isTreeTableView() ? 'primary' : 'default'\"\n (click)=\"onToggleTreeTableView(false)\"\n nz-tooltip\n nzTooltipTitle=\"Flat Table\"\n >\n <nz-icon nzType=\"unordered-list\"></nz-icon>\n <!-- B\u1EA3ng ph\u1EB3ng -->\n </button>\n <button\n nz-button\n nzSize=\"small\"\n [nzType]=\"drive.isTreeTableView() ? 'primary' : 'default'\"\n (click)=\"onToggleTreeTableView(true)\"\n nz-tooltip\n nzTooltipTitle=\"Tree Table\"\n >\n <nz-icon nzType=\"apartment\"></nz-icon>\n <!-- Tree Table -->\n </button>\n @if (drive.isTreeTableView()) {\n <button\n nz-button\n nzSize=\"small\"\n nzType=\"dashed\"\n (click)=\"expandAllTreeFolders()\"\n nz-tooltip\n nzTooltipTitle=\"M\u1EDF r\u1ED9ng\"\n >\n <nz-icon nzType=\"node-expand\"></nz-icon>\n </button>\n <button\n nz-button\n nzSize=\"small\"\n nzType=\"dashed\"\n (click)=\"collapseAllTreeFolders()\"\n nz-tooltip\n nzTooltipTitle=\"Thu g\u1ECDn\"\n >\n <nz-icon nzType=\"node-collapse\"></nz-icon>\n </button>\n }\n </div>\n <button\n nz-button\n nzSize=\"small\"\n nzType=\"default\"\n nz-tooltip\n [nzTooltipTitle]=\"drive.sortDesc() ? 'A \u2192 Z' : 'Z \u2192 A'\"\n (click)=\"toggleSortDirection()\"\n >\n <nz-icon [nzType]=\"drive.sortDesc() ? 'sort-descending' : 'sort-ascending'\"></nz-icon>\n </button>\n <button\n nz-button\n nzType=\"default\"\n nzSize=\"small\"\n (click)=\"refreshExplorer()\"\n nz-tooltip\n nzTooltipTitle=\"L\u00E0m m\u1EDBi\"\n >\n <nz-icon nzType=\"reload\"></nz-icon>\n </button>\n <nz-pagination\n [nzSize]=\"'small'\"\n [nzPageIndex]=\"drive.pageIndex()\"\n [nzPageSize]=\"drive.pageSize()\"\n [nzTotal]=\"drive.totalCount()\"\n [nzShowSizeChanger]=\"true\"\n [nzPageSizeOptions]=\"AppGlobals.pageSizeOptions\"\n (nzPageIndexChange)=\"drive.loadNodes($event, drive.pageSize())\"\n (nzPageSizeChange)=\"drive.loadNodes(1, $event)\"\n >\n </nz-pagination>\n </div>\n </header>\n <!-- DANH S\u00C1CH T\u1EACP TIN / TH\u01AF M\u1EE4C (H\u1ED6 TR\u1EE2 C\u1EA2 FLAT TABLE V\u00C0 TREE TABLE) -->\n <nz-table\n #explorerTable\n [nzData]=\"displayedTableItems()\"\n [nzLoading]=\"drive.loading()\"\n [nzBordered]=\"true\"\n [nzFrontPagination]=\"false\"\n [nzShowPagination]=\"false\"\n nzSize=\"small\"\n >\n <thead>\n <tr>\n <th nzWidth=\"45px\" class=\"text-center\">#</th>\n <th class=\"sortable-th\" (click)=\"onSortColumn('Name')\">\n <div class=\"th-sort-wrap\">\n <span>T\u00EAn t\u00E0i li\u1EC7u / Th\u01B0 m\u1EE5c</span>\n <span class=\"sort-icon\" [class.active]=\"drive.sortBy() === 'Name'\">\n <nz-icon\n [nzType]=\"\n drive.sortBy() === 'Name' ? (drive.sortDesc() ? 'sort-descending' : 'sort-ascending') : 'swap'\n \"\n ></nz-icon>\n </span>\n </div>\n </th>\n <th nzWidth=\"150px\" class=\"sortable-th\" (click)=\"onSortColumn('OwnerName')\">\n <div class=\"th-sort-wrap\">\n <span>Ch\u1EE7 s\u1EDF h\u1EEFu</span>\n @if (drive.sortBy() === \"OwnerName\") {\n <nz-icon [nzType]=\"drive.sortDesc() ? 'caret-down' : 'caret-up'\" class=\"sort-icon active\"></nz-icon>\n }\n </div>\n </th>\n <th nzWidth=\"130px\" class=\"text-center sortable-th\" (click)=\"onSortColumn('AccessLevel')\">\n <div class=\"th-sort-wrap justify-center\">\n <span>Quy\u1EC1n truy c\u1EADp</span>\n @if (drive.sortBy() === \"AccessLevel\") {\n <nz-icon [nzType]=\"drive.sortDesc() ? 'caret-down' : 'caret-up'\" class=\"sort-icon active\"></nz-icon>\n }\n </div>\n </th>\n <th nzWidth=\"110px\" class=\"text-right sortable-th\" (click)=\"onSortColumn('SizeBytes')\">\n <div class=\"th-sort-wrap justify-end\">\n <span>K\u00EDch th\u01B0\u1EDBc</span>\n @if (drive.sortBy() === \"SizeBytes\") {\n <nz-icon [nzType]=\"drive.sortDesc() ? 'caret-down' : 'caret-up'\" class=\"sort-icon active\"></nz-icon>\n }\n </div>\n </th>\n <th nzWidth=\"145px\" class=\"text-center sortable-th\" (click)=\"onSortColumn('UpdatedDate')\">\n <div class=\"th-sort-wrap justify-center\">\n <span>C\u1EADp nh\u1EADt cu\u1ED1i</span>\n @if (drive.sortBy() === \"UpdatedDate\") {\n <nz-icon [nzType]=\"drive.sortDesc() ? 'caret-down' : 'caret-up'\" class=\"sort-icon active\"></nz-icon>\n }\n </div>\n </th>\n <th nzWidth=\"210px\" class=\"text-center\">Thao t\u00E1c</th>\n </tr>\n </thead>\n <tbody>\n @for (item of explorerTable.data; track item.Id; let i = $index) {\n <tr\n [attr.draggable]=\"drive.currentViewMode() !== 'TRASH' && item.EffectiveAccess >= DriveAccessLevel.Editor\"\n (dragstart)=\"onRowDragStart($event, item)\"\n (dragend)=\"onRowDragEnd()\"\n (dragover)=\"onRowDragOver($event, item)\"\n (dragleave)=\"onRowDragLeave($event, item)\"\n (drop)=\"onRowDrop($event, item)\"\n (dblclick)=\"onRowDoubleClick(item)\"\n (contextmenu)=\"onContextMenu($event, menu, item)\"\n class=\"drive-row\"\n [class.dragging-row]=\"draggedNode()?.Id === item.Id\"\n [class.drop-target-active]=\"dragOverFolderId() === item.Id\"\n >\n <td class=\"text-center\">{{ i + 1 + (drive.pageIndex() - 1) * drive.pageSize() }}</td>\n <td\n [nzIndentSize]=\"drive.isTreeTableView() ? (item.treeLevel || 0) * 22 : 0\"\n [nzShowExpand]=\"drive.isTreeTableView() && isFolderLike(item) && !item.IsBrokenShortcut\"\n [nzExpand]=\"!!item.treeExpanded\"\n (nzExpandChange)=\"toggleExpandTreeFolder(item, $event)\"\n >\n <div class=\"node-name-cell\">\n <span class=\"node-icon-wrap\">\n <nz-icon\n [nzType]=\"isFolderLike(item) ? 'folder-fill' : getFileIcon(item)\"\n [style.color]=\"isFolderLike(item) ? '#f59e0b' : 'var(--primary-color)'\"\n class=\"node-icon\"\n ></nz-icon>\n @if (item.NodeType === DriveNodeType.Shortcut) {\n <span class=\"shortcut-badge\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"'L\u1ED1i t\u1EAFt tr\u1ECF t\u1EDBi: ' + (item.ShortcutTargetName || item.Name)\"\n -->\n <nz-icon nzType=\"select\"></nz-icon>\n </span>\n }\n </span>\n <span class=\"node-title link-detail\" (click)=\"onRowSingleClick(item)\">{{ item.Name }}</span>\n @if (drive.keyword().trim() && item.ParentFolderName && item.ParentId !== drive.currentFolderId()) {\n <nz-tag\n nzColor=\"default\"\n style=\"margin-left: 6px; cursor: pointer\"\n (click)=\"$event.stopPropagation(); navigateToFolder(item.ParentId || null)\"\n >\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"'\u0110ang n\u1EB1m trong th\u01B0 m\u1EE5c: ' + item.ParentFolderName + ' (Nh\u1EA5n \u0111\u1EC3 m\u1EDF th\u01B0 m\u1EE5c)'\"\n -->\n <nz-icon nzType=\"folder\"></nz-icon> {{ item.ParentFolderName }}\n </nz-tag>\n }\n @if (item.NodeType === DriveNodeType.Shortcut) {\n @if (item.IsBrokenShortcut) {\n <nz-tag nzColor=\"error\" style=\"margin-left: 6px\">M\u1EE5c g\u1ED1c \u0111\u00E3 x\u00F3a</nz-tag>\n } @else {\n <nz-tag nzColor=\"purple\" style=\"margin-left: 6px\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"'\u0110\u00EDch: ' + (item.ShortcutTargetName || item.Name)\"\n -->\n <nz-icon nzType=\"link\"></nz-icon> L\u1ED1i t\u1EAFt\n </nz-tag>\n }\n }\n @if (item.IsStarred) {\n <nz-icon nzType=\"star\" nzTheme=\"fill\" style=\"color: #eab308; margin-left: 4px\"></nz-icon>\n }\n @if (item.IsShared) {\n <nz-tag nzColor=\"processing\" style=\"margin-left: 6px\">\u0110\u00E3 chia s\u1EBB</nz-tag>\n }\n @if (!item.InheritPermissions) {\n <nz-tag nzColor=\"warning\" nz-tooltip nzTooltipTitle=\"\u0110\u00E3 ng\u1EAFt k\u1EBF th\u1EEBa quy\u1EC1n t\u1EEB th\u01B0 m\u1EE5c cha\">\n \u0110\u1ED9c l\u1EADp\n </nz-tag>\n }\n </div>\n </td>\n <td>{{ item.OwnerName || item.OwnerId }}</td>\n <td class=\"text-center\">\n <nz-tag\n [nzColor]=\"\n item.EffectiveAccess >= DriveAccessLevel.Editor\n ? 'green'\n : item.EffectiveAccess >= DriveAccessLevel.Uploader\n ? 'cyan'\n : 'default'\n \"\n >\n {{\n item.EffectiveAccess >= DriveAccessLevel.Manager\n ? \"Qu\u1EA3n tr\u1ECB\"\n : item.EffectiveAccess >= DriveAccessLevel.Editor\n ? \"Ch\u1EC9nh s\u1EEDa\"\n : item.EffectiveAccess >= DriveAccessLevel.Uploader\n ? \"Xem & T\u1EA3i l\u00EAn\"\n : item.CanDownload && item.EffectiveAccess >= DriveAccessLevel.Downloader\n ? \"Xem & T\u1EA3i\"\n : \"Ch\u1EC9 xem\"\n }}\n </nz-tag>\n </td>\n <td class=\"text-right\">\n {{ isFolderLike(item) ? \"\u2014\" : (item.SizeBytes | formatBytes) }}\n </td>\n <td class=\"text-center\">{{ item.UpdatedDate | date: \"dd/MM/yyyy HH:mm\" }}</td>\n <td class=\"text-center\">\n <div class=\"action-btn-group\">\n @if (drive.currentViewMode() !== \"TRASH\") {\n @if (item.CanShare || item.EffectiveAccess >= DriveAccessLevel.Manager) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); openShareDrawer(item)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"Chia s\u1EBB & Ph\u00E2n quy\u1EC1n (Drawer)\"\n -->\n <nz-icon nzType=\"share-alt\"></nz-icon>\n </button>\n }\n @if (item.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); openMoveDrawer(item)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"Di chuy\u1EC3n sang th\u01B0 m\u1EE5c kh\u00E1c (Move Drawer ho\u1EB7c K\u00E9o th\u1EA3)\"\n -->\n <nz-icon nzType=\"drag\"></nz-icon>\n </button>\n }\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); openCopyDrawer(item)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"Sao ch\u00E9p t\u1EDBi... (Copy To Drawer)\"\n -->\n <nz-icon nzType=\"copy\"></nz-icon>\n </button>\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); openShortcutDrawer(item)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"T\u1EA1o l\u1ED1i t\u1EAFt (Shortcut Drawer)\"\n -->\n <nz-icon nzType=\"link\"></nz-icon>\n </button>\n @if (\n item.NodeType === DriveNodeType.Folder &&\n drive.usePhysicalFolders() &&\n item.EffectiveAccess >= DriveAccessLevel.Manager\n ) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); openRelocateDrawer(item)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"\u0110\u1ED5i \u0111\u01B0\u1EDDng d\u1EABn v\u1EADt l\u00FD / \u00C1nh x\u1EA1 \u1ED5 c\u1EE9ng l\u01B0u tr\u1EEF (Drawer)\"\n -->\n <nz-icon nzType=\"hdd\"></nz-icon>\n </button>\n }\n @if (\n isFileLike(item) &&\n !item.IsBrokenShortcut &&\n item.CanDownload &&\n item.EffectiveAccess >= DriveAccessLevel.Downloader\n ) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); onDownloadItem(item)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"T\u1EA3i xu\u1ED1ng\"\n -->\n <nz-icon nzType=\"download\"></nz-icon>\n </button>\n }\n @if (\n isFileLike(item) && !item.IsBrokenShortcut && item.EffectiveAccess >= DriveAccessLevel.Editor\n ) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); openVersionDrawer(item)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"L\u1ECBch s\u1EED phi\u00EAn b\u1EA3n (Drawer)\"\n -->\n <nz-icon nzType=\"history\"></nz-icon>\n </button>\n }\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); openFolderDrawer('rename', item)\"\n >\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"\n item.EffectiveAccess >= DriveAccessLevel.Editor\n ? '\u0110\u1ED5i t\u00EAn & Chi ti\u1EBFt (Drawer)'\n : 'Xem chi ti\u1EBFt & Nh\u1EADt k\u00FD (Drawer)'\n \"\n -->\n <nz-icon\n [nzType]=\"item.EffectiveAccess >= DriveAccessLevel.Editor ? 'edit' : 'info-circle'\"\n ></nz-icon>\n </button>\n @if (item.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-warn\"\n (click)=\"$event.stopPropagation(); onSoftDelete(item)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"Chuy\u1EC3n v\u00E0o th\u00F9ng r\u00E1c\"\n -->\n <nz-icon nzType=\"delete\"></nz-icon>\n </button>\n }\n } @else {\n @if (item.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); onRestore(item)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"Kh\u00F4i ph\u1EE5c\"\n -->\n <nz-icon nzType=\"rollback\"></nz-icon>\n </button>\n }\n @if (item.EffectiveAccess >= DriveAccessLevel.Manager) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-warn\"\n (click)=\"$event.stopPropagation(); onPermanentDelete(item)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"X\u00F3a v\u0129nh vi\u1EC5n\"\n -->\n <nz-icon nzType=\"delete\"></nz-icon>\n </button>\n }\n }\n </div>\n </td>\n </tr>\n }\n </tbody>\n </nz-table>\n <!-- CONTEXT MENU CHU\u1ED8T PH\u1EA2I -->\n <nz-dropdown-menu #menu=\"nzDropdownMenu\">\n @if (selectedContextItem(); as ctx) {\n <ul nz-menu>\n @if (ctx.NodeType === DriveNodeType.File) {\n <li nz-menu-item (click)=\"previewFile(ctx)\">\n <nz-icon nzType=\"eye\"></nz-icon> Xem tr\u1EF1c ti\u1EBFp (Drawer Preview)\n </li>\n @if (ctx.CanDownload && ctx.EffectiveAccess >= DriveAccessLevel.Downloader) {\n <li nz-menu-item (click)=\"onDownloadItem(ctx)\"><nz-icon nzType=\"download\"></nz-icon> T\u1EA3i xu\u1ED1ng</li>\n }\n @if (ctx.EffectiveAccess >= DriveAccessLevel.Editor) {\n <li nz-menu-item (click)=\"openVersionDrawer(ctx)\">\n <nz-icon nzType=\"history\"></nz-icon> L\u1ECBch s\u1EED phi\u00EAn b\u1EA3n...\n </li>\n }\n <li nz-menu-divider></li>\n }\n @if (ctx.CanShare || ctx.EffectiveAccess >= DriveAccessLevel.Manager) {\n <li nz-menu-item (click)=\"openShareDrawer(ctx)\">\n <nz-icon nzType=\"usergroup-add\"></nz-icon> Ph\u00E2n quy\u1EC1n & Chia s\u1EBB...\n </li>\n }\n @if (ctx.EffectiveAccess >= DriveAccessLevel.Editor) {\n <li nz-menu-item (click)=\"openMoveDrawer(ctx)\">\n <nz-icon nzType=\"drag\"></nz-icon> Di chuy\u1EC3n sang th\u01B0 m\u1EE5c kh\u00E1c...\n </li>\n }\n <li nz-menu-item (click)=\"openCopyDrawer(ctx)\">\n <nz-icon nzType=\"copy\"></nz-icon> Sao ch\u00E9p t\u1EDBi (Copy to)...\n </li>\n <li nz-menu-item (click)=\"openShortcutDrawer(ctx)\">\n <nz-icon nzType=\"link\"></nz-icon> T\u1EA1o l\u1ED1i t\u1EAFt (Shortcut)...\n </li>\n @if (\n ctx.NodeType === DriveNodeType.Folder &&\n drive.usePhysicalFolders() &&\n ctx.EffectiveAccess >= DriveAccessLevel.Manager\n ) {\n <li nz-menu-item (click)=\"openRelocateDrawer(ctx)\">\n <nz-icon nzType=\"hdd\"></nz-icon> \u0110\u1ED5i \u0111\u01B0\u1EDDng d\u1EABn v\u1EADt l\u00FD / Chuy\u1EC3n \u1ED5 \u0111\u0129a...\n </li>\n }\n <li nz-menu-item (click)=\"openFolderDrawer('rename', ctx)\">\n <nz-icon [nzType]=\"ctx.EffectiveAccess >= DriveAccessLevel.Editor ? 'edit' : 'info-circle'\"></nz-icon>\n {{\n ctx.EffectiveAccess >= DriveAccessLevel.Editor ? \"\u0110\u1ED5i t\u00EAn & Chi ti\u1EBFt...\" : \"Xem chi ti\u1EBFt & Nh\u1EADt k\u00FD...\"\n }}\n </li>\n <li nz-menu-item (click)=\"drive.toggleStar(ctx.Id)\">\n <nz-icon nzType=\"star\"></nz-icon> {{ ctx.IsStarred ? \"B\u1ECF d\u1EA5u sao\" : \"Th\u00EAm d\u1EA5u sao\" }}\n </li>\n @if (ctx.EffectiveAccess >= DriveAccessLevel.Editor) {\n <li nz-menu-divider></li>\n <li nz-menu-item nzDanger (click)=\"onSoftDelete(ctx)\">\n <nz-icon nzType=\"delete\"></nz-icon> Chuy\u1EC3n v\u00E0o th\u00F9ng r\u00E1c\n </li>\n }\n </ul>\n }\n </nz-dropdown-menu>\n </main>\n </div>\n <!-- ========================================================================= -->\n <!-- DRAWER 1: CHIA S\u1EBA & PH\u00C2N QUY\u1EC0N (ACL / RBAC / SHARE LINKS) -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"shareDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"840\"\n [nzClosable]=\"false\"\n [nzTitle]=\"shareDrawerTitleTpl\"\n [nzFooter]=\"shareDrawerFooterTpl\"\n (nzOnClose)=\"shareDrawerVisible = false\"\n >\n <ng-template #shareDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n @if (activeActionNode(); as node) {\n <nz-icon\n [nzType]=\"node.NodeType === DriveNodeType.Folder ? 'folder-fill' : getFileIcon(node)\"\n [style.color]=\"node.NodeType === DriveNodeType.Folder ? '#f59e0b' : 'var(--primary-color)'\"\n style=\"font-size: 18px\"\n ></nz-icon>\n <strong>Chia s\u1EBB & Ph\u00E2n quy\u1EC1n: {{ node.Name }}</strong>\n <nz-tag nzColor=\"blue\">{{ node.NodeType === DriveNodeType.Folder ? \"Th\u01B0 m\u1EE5c\" : \"T\u1EADp tin\" }}</nz-tag>\n }\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"shareDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n @if (activeActionNode(); as node) {\n <lib-drive-share-modal [nodeId]=\"node.Id\"></lib-drive-share-modal>\n }\n </ng-container>\n <ng-template #shareDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"shareDrawerVisible = false\">\u0110\u00F3ng</button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 2: L\u1ECACH S\u1EEC PHI\u00CAN B\u1EA2N T\u1EACP TIN (FILE VERSIONS) -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"versionDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"760\"\n [nzClosable]=\"false\"\n [nzTitle]=\"versionDrawerTitleTpl\"\n [nzFooter]=\"versionDrawerFooterTpl\"\n (nzOnClose)=\"versionDrawerVisible = false\"\n >\n <ng-template #versionDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"history\" style=\"font-size: 18px; color: var(--primary-color)\"></nz-icon>\n <strong>L\u1ECBch s\u1EED phi\u00EAn b\u1EA3n: {{ activeActionNode()?.Name }}</strong>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"versionDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n @if (activeActionNode(); as node) {\n <lib-drive-version-modal\n [nodeId]=\"node.Id\"\n [nodeName]=\"node.Name\"\n [canEdit]=\"node.EffectiveAccess >= DriveAccessLevel.Editor\"\n [canDownload]=\"node.CanDownload && node.EffectiveAccess >= DriveAccessLevel.Downloader\"\n (closed)=\"versionDrawerVisible = false\"\n ></lib-drive-version-modal>\n }\n </ng-container>\n <ng-template #versionDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"versionDrawerVisible = false\">\u0110\u00F3ng</button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 3: T\u1EA0O TH\u01AF M\u1EE4C M\u1EDAI / \u0110\u1ED4I T\u00CAN & CHI TI\u1EBET THU\u1ED8C T\u00CDNH + ACTIVITY LOG -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"folderDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"480\"\n [nzClosable]=\"false\"\n [nzTitle]=\"folderDrawerTitleTpl\"\n [nzFooter]=\"folderDrawerFooterTpl\"\n (nzOnClose)=\"folderDrawerVisible = false\"\n >\n <ng-template #folderDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon\n [nzType]=\"folderDrawerMode === 'create' ? 'folder-add' : canRenameTargetNode() ? 'edit' : 'info-circle'\"\n style=\"font-size: 18px; color: var(--primary-color)\"\n ></nz-icon>\n <strong>\n {{\n folderDrawerMode === \"create\"\n ? \"T\u1EA1o th\u01B0 m\u1EE5c m\u1EDBi\"\n : canRenameTargetNode()\n ? \"\u0110\u1ED5i t\u00EAn & Chi ti\u1EBFt m\u1EE5c\"\n : \"Chi ti\u1EBFt & Nh\u1EADt k\u00FD ho\u1EA1t \u0111\u1ED9ng\"\n }}\n </strong>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"folderDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n <div nz-flex nzVertical [nzGap]=\"16\">\n <div>\n <label class=\"drawer-field-label\">\n {{ folderDrawerMode === \"create\" ? \"T\u00EAn th\u01B0 m\u1EE5c m\u1EDBi\" : \"T\u00EAn hi\u1EC3n th\u1ECB\" }}\n </label>\n <input\n nz-input\n [(ngModel)]=\"folderDrawerInputName\"\n [disabled]=\"folderDrawerMode === 'rename' && !canRenameTargetNode()\"\n [appAutoFocus]=\"folderDrawerVisible && (folderDrawerMode === 'create' || canRenameTargetNode())\"\n placeholder=\"Nh\u1EADp t\u00EAn th\u01B0 m\u1EE5c / t\u00E0i li\u1EC7u...\"\n (keyup.enter)=\"submitFolderDrawer()\"\n />\n </div>\n @if (folderDrawerMode === \"create\" && drive.usePhysicalFolders() && drive.currentPhysicalPath(); as phys) {\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">Ch\u1EBF \u0111\u1ED9 l\u01B0u tr\u1EEF:</span>\n <nz-tag nzColor=\"green\">Th\u01B0 m\u1EE5c v\u1EADt l\u00FD (Disk)</nz-tag>\n </div>\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">Th\u01B0 m\u1EE5c cha tr\u00EAn \u0111\u0129a:</span>\n <code class=\"break-word\">{{ phys }}</code>\n </div>\n </div>\n }\n @if (folderDrawerMode === \"rename\" && folderDrawerTargetNode; as target) {\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-header\">\n <nz-icon\n [nzType]=\"target.NodeType === DriveNodeType.Folder ? 'folder-fill' : getFileIcon(target)\"\n [style.color]=\"target.NodeType === DriveNodeType.Folder ? '#f59e0b' : 'var(--primary-color)'\"\n style=\"font-size: 22px\"\n ></nz-icon>\n <div>\n <div style=\"font-weight: 600\">{{ target.Name }}</div>\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">\n {{\n target.NodeType === DriveNodeType.Folder\n ? \"Th\u01B0 m\u1EE5c\"\n : \"T\u1EADp tin (\" + (target.Extension || target.MimeType || \"File\") + \")\"\n }}\n </div>\n </div>\n </div>\n <nz-divider style=\"margin: 10px 0\"></nz-divider>\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">Ch\u1EE7 s\u1EDF h\u1EEFu:</span>\n <strong>{{ target.OwnerName || target.OwnerId }}</strong>\n </div>\n @if (target.NodeType === DriveNodeType.File) {\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">K\u00EDch th\u01B0\u1EDBc:</span>\n <span>{{ target.SizeBytes | formatBytes }}</span>\n </div>\n }\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">Quy\u1EC1n c\u1EE7a b\u1EA1n:</span>\n <nz-tag\n [nzColor]=\"\n target.EffectiveAccess >= DriveAccessLevel.Editor\n ? 'green'\n : target.EffectiveAccess >= DriveAccessLevel.Uploader\n ? 'cyan'\n : 'default'\n \"\n >\n {{\n target.EffectiveAccess >= DriveAccessLevel.Manager\n ? \"Qu\u1EA3n tr\u1ECB (Manager)\"\n : target.EffectiveAccess >= DriveAccessLevel.Editor\n ? \"Ch\u1EC9nh s\u1EEDa (Editor)\"\n : target.EffectiveAccess >= DriveAccessLevel.Uploader\n ? \"Xem & T\u1EA3i l\u00EAn (Uploader)\"\n : target.CanDownload && target.EffectiveAccess >= DriveAccessLevel.Downloader\n ? \"Xem & T\u1EA3i xu\u1ED1ng\"\n : \"Ch\u1EC9 xem (Viewer)\"\n }}\n </nz-tag>\n </div>\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">K\u1EBF th\u1EEBa quy\u1EC1n:</span>\n <nz-tag [nzColor]=\"target.InheritPermissions ? 'blue' : 'warning'\">\n {{ target.InheritPermissions ? \"\u0110ang k\u1EBF th\u1EEBa\" : \"\u0110\u1ED9c l\u1EADp\" }}\n </nz-tag>\n </div>\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">C\u1EADp nh\u1EADt cu\u1ED1i:</span>\n <span>{{ target.UpdatedDate | date: \"dd/MM/yyyy HH:mm\" }}</span>\n </div>\n @if (target.PhysicalRelativePath) {\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">\u0110\u01B0\u1EDDng d\u1EABn \u0111\u0129a:</span>\n <code class=\"break-word\">{{ target.PhysicalRelativePath }}</code>\n </div>\n }\n @if (drive.isCurrentUserAdmin() && drive.usePhysicalFolders() && drive.currentPhysicalPath(); as physPath) {\n <div class=\"physical-path-bar\">\n <span style=\"word-break: break-all\">\n \u0110\u01B0\u1EDDng d\u1EABn v\u1EADt l\u00FD: <code style=\"padding-top: 0px\">{{ physPath }}</code>\n </span>\n <icon-copy [textToCopy]=\"physPath\" tooltip=\"Sao ch\u00E9p \u0111\u01B0\u1EDDng d\u1EABn v\u1EADt l\u00FD tr\u00EAn Server\"></icon-copy>\n </div>\n }\n </div>\n <div>\n <label class=\"drawer-field-label\">Thao t\u00E1c nhanh</label>\n <div nz-flex nzWrap=\"wrap\" [nzGap]=\"8\">\n @if (target.CanShare || target.EffectiveAccess >= DriveAccessLevel.Manager) {\n <button nz-button nzSize=\"small\" (click)=\"folderDrawerVisible = false; openShareDrawer(target)\">\n <nz-icon nzType=\"share-alt\"></nz-icon> Chia s\u1EBB & Ph\u00E2n quy\u1EC1n\n </button>\n }\n @if (target.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button nz-button nzSize=\"small\" (click)=\"folderDrawerVisible = false; openMoveDrawer(target)\">\n <nz-icon nzType=\"drag\"></nz-icon> Di chuy\u1EC3n\n </button>\n }\n <button nz-button nzSize=\"small\" (click)=\"folderDrawerVisible = false; openCopyDrawer(target)\">\n <nz-icon nzType=\"copy\"></nz-icon> Sao ch\u00E9p t\u1EDBi\n </button>\n <button nz-button nzSize=\"small\" (click)=\"folderDrawerVisible = false; openShortcutDrawer(target)\">\n <nz-icon nzType=\"link\"></nz-icon> T\u1EA1o l\u1ED1i t\u1EAFt\n </button>\n @if (\n target.NodeType === DriveNodeType.Folder &&\n drive.usePhysicalFolders() &&\n target.EffectiveAccess >= DriveAccessLevel.Manager\n ) {\n <button nz-button nzSize=\"small\" (click)=\"folderDrawerVisible = false; openRelocateDrawer(target)\">\n <nz-icon nzType=\"hdd\"></nz-icon> \u0110\u1ED5i \u1ED5 \u0111\u0129a v\u1EADt l\u00FD\n </button>\n }\n @if (target.NodeType === DriveNodeType.File) {\n @if (target.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button nz-button nzSize=\"small\" (click)=\"folderDrawerVisible = false; openVersionDrawer(target)\">\n <nz-icon nzType=\"history\"></nz-icon> L\u1ECBch s\u1EED phi\u00EAn b\u1EA3n\n </button>\n }\n @if (target.CanDownload && target.EffectiveAccess >= DriveAccessLevel.Downloader) {\n <button nz-button nzSize=\"small\" (click)=\"onDownloadItem(target)\">\n <nz-icon nzType=\"download\"></nz-icon> T\u1EA3i xu\u1ED1ng\n </button>\n }\n }\n <button nz-button nzSize=\"small\" (click)=\"drive.toggleStar(target.Id)\">\n <nz-icon nzType=\"star\" [nzTheme]=\"target.IsStarred ? 'fill' : 'outline'\"></nz-icon>\n {{ target.IsStarred ? \"B\u1ECF sao\" : \"G\u1EAFn sao\" }}\n </button>\n </div>\n </div>\n <!-- NH\u1EACT K\u00DD HO\u1EA0T \u0110\u1ED8NG (ACTIVITY LOG) -->\n <div>\n <label class=\"drawer-field-label\">\n <nz-icon nzType=\"OrderedList\"></nz-icon> Nh\u1EADt k\u00FD ho\u1EA1t \u0111\u1ED9ng g\u1EA7n \u0111\u00E2y ({{ nodeActivities().length }})\n </label>\n <div class=\"drawer-meta-card\" style=\"max-height: 240px; overflow-y: auto\">\n @if (nodeActivities().length === 0) {\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">Ch\u01B0a c\u00F3 nh\u1EADt k\u00FD ho\u1EA1t \u0111\u1ED9ng.</div>\n } @else {\n @for (act of nodeActivities(); track act.Id) {\n <div style=\"padding: 6px 0; border-bottom: 1px dashed var(--app-border, #e2e8f0); font-size: 12px\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\">\n <nz-tag nzColor=\"blue\">{{ formatActivityAction(act.ActionType) }}</nz-tag>\n <span style=\"color: var(--app-text-muted, #64748b)\">{{\n act.CreatedDate | date: \"dd/MM/yyyy HH:mm:ss\"\n }}</span>\n </div>\n <div style=\"margin-top: 4px\">\n Th\u1EF1c hi\u1EC7n b\u1EDFi: <strong>{{ act.ActorUserName || act.ActorUserId || \"H\u1EC7 th\u1ED1ng\" }}</strong>\n </div>\n @if (act.DetailJson) {\n <div style=\"margin-top: 2px; color: var(--app-text-muted, #64748b); word-break: break-all\">\n <code>{{ formatActivityDetail(act) }}</code>\n </div>\n }\n </div>\n }\n }\n </div>\n </div>\n }\n </div>\n </ng-container>\n <ng-template #folderDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"folderDrawerVisible = false\">\u0110\u00F3ng</button>\n @if (folderDrawerMode === \"create\" || canRenameTargetNode()) {\n <button nz-button nzType=\"primary\" (click)=\"submitFolderDrawer()\">\n <nz-icon nzType=\"check\"></nz-icon>\n {{ folderDrawerMode === \"create\" ? \"T\u1EA1o th\u01B0 m\u1EE5c\" : \"L\u01B0u t\u00EAn m\u1EDBi\" }}\n </button>\n }\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 4: XEM TR\u1EF0C TUY\u1EBEN T\u00C0I LI\u1EC6U (PREVIEW DRAWER) -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"previewDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"'75vw'\"\n [nzClosable]=\"false\"\n [nzTitle]=\"previewDrawerTitleTpl\"\n [nzFooter]=\"previewDrawerFooterTpl\"\n (nzOnClose)=\"previewDrawerVisible = false\"\n >\n <ng-template #previewDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"eye\" style=\"font-size: 18px; color: var(--primary-color)\"></nz-icon>\n <strong>{{ previewFileName }}</strong>\n </div>\n <div nz-flex nzAlign=\"center\" [nzGap]=\"8\">\n @if (activeActionNode(); as node) {\n @if (node.CanDownload && node.EffectiveAccess >= DriveAccessLevel.Downloader) {\n <button nz-button nzSize=\"small\" nzType=\"primary\" (click)=\"onDownloadItem(node)\">\n <nz-icon nzType=\"download\"></nz-icon> T\u1EA3i xu\u1ED1ng\n </button>\n }\n @if (node.CanShare || node.EffectiveAccess >= DriveAccessLevel.Manager) {\n <button nz-button nzSize=\"small\" (click)=\"previewDrawerVisible = false; openShareDrawer(node)\">\n <nz-icon nzType=\"share-alt\"></nz-icon> Chia s\u1EBB\n </button>\n }\n @if (node.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button nz-button nzSize=\"small\" (click)=\"previewDrawerVisible = false; openVersionDrawer(node)\">\n <nz-icon nzType=\"history\"></nz-icon> Phi\u00EAn b\u1EA3n\n </button>\n }\n }\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"previewDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n <extend-view-file-content\n [previewType]=\"previewType\"\n [previewContent]=\"previewContent\"\n ></extend-view-file-content>\n </ng-container>\n <ng-template #previewDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button type=\"button\" nz-button (click)=\"previewDrawerVisible = false\">\u0110\u00F3ng</button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 5: T\u1EA0O L\u1ED0I T\u1EAET (CREATE SHORTCUT DRAWER CHO FILE & FOLDER) -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"shortcutDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"460\"\n [nzClosable]=\"false\"\n [nzTitle]=\"shortcutDrawerTitleTpl\"\n [nzFooter]=\"shortcutDrawerFooterTpl\"\n (nzOnClose)=\"shortcutDrawerVisible = false\"\n >\n <ng-template #shortcutDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"link\" style=\"font-size: 18px; color: #7c3aed\"></nz-icon>\n <strong>T\u1EA1o l\u1ED1i t\u1EAFt (Shortcut)</strong>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"shortcutDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n @if (shortcutSourceNode(); as src) {\n <div nz-flex nzVertical [nzGap]=\"16\">\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-header\">\n <nz-icon\n [nzType]=\"isFolderLike(src) ? 'folder-fill' : getFileIcon(src)\"\n [style.color]=\"isFolderLike(src) ? '#f59e0b' : 'var(--primary-color)'\"\n style=\"font-size: 22px\"\n ></nz-icon>\n <div>\n <div style=\"font-weight: 600\">{{ src.ShortcutTargetName || src.Name }}</div>\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">\n M\u1EE5c g\u1ED1c: {{ isFolderLike(src) ? \"Th\u01B0 m\u1EE5c\" : \"T\u1EADp tin\" }} \u2022 Ch\u1EE7 s\u1EDF h\u1EEFu:\n {{ src.OwnerName || src.OwnerId }}\n </div>\n </div>\n </div>\n </div>\n <div>\n <label class=\"drawer-field-label\">T\u00EAn l\u1ED1i t\u1EAFt</label>\n <input\n nz-input\n [(ngModel)]=\"shortcutInputName\"\n [appAutoFocus]=\"shortcutDrawerVisible\"\n placeholder=\"Nh\u1EADp t\u00EAn hi\u1EC3n th\u1ECB c\u1EE7a l\u1ED1i t\u1EAFt...\"\n (keyup.enter)=\"submitShortcutDrawer()\"\n />\n </div>\n <div>\n <label class=\"drawer-field-label\">Kh\u00F4ng gian l\u01B0u l\u1ED1i t\u1EAFt</label>\n <nz-select\n [(ngModel)]=\"shortcutSpaceKey\"\n (ngModelChange)=\"onShortcutSpaceKeyChange($event)\"\n style=\"width: 100%\"\n >\n <nz-option nzValue=\"MY_DRIVE\" nzLabel=\"Drive c\u00E1 nh\u00E2n (My Drive)\"></nz-option>\n <nz-option nzValue=\"ORG_DRIVE\" nzLabel=\"Kho T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB (Org Drive)\"></nz-option>\n @for (sp of drive.customSpaces(); track sp.Id) {\n <nz-option [nzValue]=\"'CUSTOM:' + sp.Id\" [nzLabel]=\"'\uD83D\uDCC2 ' + sp.Name\"></nz-option>\n }\n </nz-select>\n </div>\n <div>\n <label class=\"drawer-field-label\">Th\u01B0 m\u1EE5c \u0111\u00EDch ch\u1EE9a l\u1ED1i t\u1EAFt</label>\n <nz-select\n nzShowSearch\n nzAllowClear\n nzPlaceHolder=\"-- Th\u01B0 m\u1EE5c g\u1ED1c (Root) --\"\n [(ngModel)]=\"shortcutDestFolderId\"\n style=\"width: 100%\"\n >\n <nz-option [nzValue]=\"null\" nzLabel=\"\uD83D\uDCC1 Th\u01B0 m\u1EE5c g\u1ED1c (Root)\"></nz-option>\n @for (f of availableFolders(); track f.Id) {\n <nz-option [nzValue]=\"f.Id\" [nzLabel]=\"'\uD83D\uDCC2 ' + f.Name\"></nz-option>\n }\n </nz-select>\n <div class=\"quota-sub\" style=\"margin-top: 6px\">\n L\u1ED1i t\u1EAFt tr\u1ECF tr\u1EF1c ti\u1EBFp t\u1EDBi m\u1EE5c g\u1ED1c m\u00E0 kh\u00F4ng t\u1ED1n th\u00EAm dung l\u01B0\u1EE3ng l\u01B0u tr\u1EEF (0 B).\n </div>\n </div>\n </div>\n }\n </ng-container>\n <ng-template #shortcutDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"shortcutDrawerVisible = false\">H\u1EE7y</button>\n <button nz-button nzType=\"primary\" (click)=\"submitShortcutDrawer()\">\n <nz-icon nzType=\"link\"></nz-icon> T\u1EA1o l\u1ED1i t\u1EAFt\n </button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 6: DI CHUY\u1EC2N FILE / FOLDER SANG TH\u01AF M\u1EE4C HO\u1EB6C KH\u00D4NG GIAN KH\u00C1C -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"moveDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"460\"\n [nzClosable]=\"false\"\n [nzTitle]=\"moveDrawerTitleTpl\"\n [nzFooter]=\"moveDrawerFooterTpl\"\n (nzOnClose)=\"moveDrawerVisible = false\"\n >\n <ng-template #moveDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"drag\" style=\"font-size: 18px; color: var(--primary-color)\"></nz-icon>\n <strong>Di chuy\u1EC3n sang th\u01B0 m\u1EE5c / kh\u00F4ng gian kh\u00E1c</strong>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"moveDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n @if (moveSourceNode(); as src) {\n <div nz-flex nzVertical [nzGap]=\"16\">\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-header\">\n <nz-icon\n [nzType]=\"isFolderLike(src) ? 'folder-fill' : getFileIcon(src)\"\n [style.color]=\"isFolderLike(src) ? '#f59e0b' : 'var(--primary-color)'\"\n style=\"font-size: 22px\"\n ></nz-icon>\n <div>\n <div style=\"font-weight: 600\">{{ src.Name }}</div>\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">\n Lo\u1EA1i:\n {{\n src.NodeType === DriveNodeType.Folder\n ? \"Th\u01B0 m\u1EE5c\"\n : src.NodeType === DriveNodeType.Shortcut\n ? \"L\u1ED1i t\u1EAFt\"\n : \"T\u1EADp tin\"\n }}\n \u2022 Kh\u00F4ng gian hi\u1EC7n t\u1EA1i: {{ src.IsOrgNode ? \"T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB\" : \"Drive c\u00E1 nh\u00E2n\" }}\n </div>\n </div>\n </div>\n </div>\n <div>\n <label class=\"drawer-field-label\">Kh\u00F4ng gian \u0111\u00EDch</label>\n <nz-select\n [(ngModel)]=\"moveTargetSpaceKey\"\n (ngModelChange)=\"onMoveSpaceKeyChange($event)\"\n style=\"width: 100%\"\n >\n <nz-option nzValue=\"MY_DRIVE\" nzLabel=\"Drive c\u00E1 nh\u00E2n (My Drive)\"></nz-option>\n <nz-option nzValue=\"ORG_DRIVE\" nzLabel=\"Kho T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB (Org Drive)\"></nz-option>\n @for (sp of drive.customSpaces(); track sp.Id) {\n <nz-option [nzValue]=\"'CUSTOM:' + sp.Id\" [nzLabel]=\"'\uD83D\uDCC2 ' + sp.Name\"></nz-option>\n }\n </nz-select>\n </div>\n <div>\n <label class=\"drawer-field-label\">Ch\u1ECDn th\u01B0 m\u1EE5c \u0111\u00EDch</label>\n <nz-select\n nzShowSearch\n nzAllowClear\n nzPlaceHolder=\"-- Th\u01B0 m\u1EE5c g\u1ED1c (Root) --\"\n [(ngModel)]=\"moveTargetFolderId\"\n style=\"width: 100%\"\n >\n <nz-option [nzValue]=\"null\" nzLabel=\"\uD83D\uDCC1 Th\u01B0 m\u1EE5c g\u1ED1c (Root)\"></nz-option>\n @for (f of moveTargetFolders(); track f.Id) {\n <nz-option [nzValue]=\"f.Id\" [nzLabel]=\"'\uD83D\uDCC2 ' + f.Name\"></nz-option>\n }\n </nz-select>\n <div class=\"quota-sub\" style=\"margin-top: 6px\">\n M\u1EB9o: B\u1EA1n c\u00F3 th\u1EC3 k\u00E9o th\u1EA3 tr\u1EF1c ti\u1EBFp d\u00F2ng t\u00E0i li\u1EC7u/th\u01B0 m\u1EE5c v\u00E0o m\u1EE5c <strong>\"Drive c\u00E1 nh\u00E2n\"</strong> ho\u1EB7c\n <strong>\"T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB\"</strong> \u1EDF thanh menu b\u00EAn tr\u00E1i \u0111\u1EC3 chuy\u1EC3n nhanh qua l\u1EA1i gi\u1EEFa 2 kh\u00F4ng gian.\n </div>\n </div>\n </div>\n }\n </ng-container>\n <ng-template #moveDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"moveDrawerVisible = false\">H\u1EE7y</button>\n <button nz-button nzType=\"primary\" (click)=\"submitMoveDrawer()\">\n <nz-icon nzType=\"check\"></nz-icon> Di chuy\u1EC3n t\u1EDBi \u0111\u00E2y\n </button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 9: SAO CH\u00C9P T\u1EDAI (COPY TO DRAWER CHO FILE / FOLDER / SHORTCUT) -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"copyDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"460\"\n [nzClosable]=\"false\"\n [nzTitle]=\"copyDrawerTitleTpl\"\n [nzFooter]=\"copyDrawerFooterTpl\"\n (nzOnClose)=\"copyDrawerVisible = false\"\n >\n <ng-template #copyDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"copy\" style=\"font-size: 18px; color: var(--primary-color)\"></nz-icon>\n <strong>Sao ch\u00E9p t\u1EDBi (Copy To)</strong>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"copyDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n @if (copySourceNode(); as src) {\n <div nz-flex nzVertical [nzGap]=\"16\">\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-header\">\n <nz-icon\n [nzType]=\"isFolderLike(src) ? 'folder-fill' : getFileIcon(src)\"\n [style.color]=\"isFolderLike(src) ? '#f59e0b' : 'var(--primary-color)'\"\n style=\"font-size: 22px\"\n ></nz-icon>\n <div>\n <div style=\"font-weight: 600\">{{ src.Name }}</div>\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">\n M\u1EE5c ngu\u1ED3n:\n {{\n src.NodeType === DriveNodeType.Folder\n ? \"Th\u01B0 m\u1EE5c (Sao ch\u00E9p \u0111\u1EC7 quy to\u00E0n b\u1ED9 nh\u00E1nh con)\"\n : src.NodeType === DriveNodeType.Shortcut\n ? \"L\u1ED1i t\u1EAFt\"\n : \"T\u1EADp tin\"\n }}\n </div>\n </div>\n </div>\n </div>\n <div>\n <label class=\"drawer-field-label\">T\u00EAn b\u1EA3n sao (\u0110\u1EC3 tr\u1ED1ng \u0111\u1EC3 h\u1EC7 th\u1ED1ng t\u1EF1 \u0111\u1EB7t t\u00EAn)</label>\n <input\n nz-input\n [(ngModel)]=\"copyCustomName\"\n [appAutoFocus]=\"copyDrawerVisible\"\n placeholder=\"Nh\u1EADp t\u00EAn m\u1EDBi cho b\u1EA3n sao...\"\n (keyup.enter)=\"submitCopyDrawer()\"\n />\n </div>\n <div>\n <label class=\"drawer-field-label\">Kh\u00F4ng gian \u0111\u00EDch</label>\n <nz-select\n [(ngModel)]=\"copyTargetSpaceKey\"\n (ngModelChange)=\"onCopySpaceKeyChange($event)\"\n style=\"width: 100%\"\n >\n <nz-option nzValue=\"MY_DRIVE\" nzLabel=\"Drive c\u00E1 nh\u00E2n (My Drive)\"></nz-option>\n <nz-option nzValue=\"ORG_DRIVE\" nzLabel=\"Kho T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB (Org Drive)\"></nz-option>\n @for (sp of drive.customSpaces(); track sp.Id) {\n <nz-option [nzValue]=\"'CUSTOM:' + sp.Id\" [nzLabel]=\"'\uD83D\uDCC2 ' + sp.Name\"></nz-option>\n }\n </nz-select>\n </div>\n <div>\n <label class=\"drawer-field-label\">Ch\u1ECDn th\u01B0 m\u1EE5c \u0111\u00EDch ch\u1EE9a b\u1EA3n sao</label>\n <nz-select\n nzShowSearch\n nzAllowClear\n nzPlaceHolder=\"-- Th\u01B0 m\u1EE5c g\u1ED1c (Root) --\"\n [(ngModel)]=\"copyTargetFolderId\"\n style=\"width: 100%\"\n >\n <nz-option [nzValue]=\"null\" nzLabel=\"\uD83D\uDCC1 Th\u01B0 m\u1EE5c g\u1ED1c (Root)\"></nz-option>\n @for (f of copyTargetFolders(); track f.Id) {\n <nz-option [nzValue]=\"f.Id\" [nzLabel]=\"'\uD83D\uDCC2 ' + f.Name\"></nz-option>\n }\n </nz-select>\n <div class=\"quota-sub\" style=\"margin-top: 6px\">\n B\u1EA3n sao ho\u00E0n to\u00E0n \u0111\u1ED9c l\u1EADp v\u1EDBi m\u1EE5c g\u1ED1c v\u00E0 \u0111\u01B0\u1EE3c t\u00EDnh v\u00E0o h\u1EA1n ng\u1EA1ch c\u1EE7a ng\u01B0\u1EDDi t\u1EA1o b\u1EA3n sao.\n </div>\n </div>\n </div>\n }\n </ng-container>\n <ng-template #copyDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"copyDrawerVisible = false\">H\u1EE7y</button>\n <button nz-button nzType=\"primary\" (click)=\"submitCopyDrawer()\">\n <nz-icon nzType=\"copy\"></nz-icon> Sao ch\u00E9p t\u1EDBi \u0111\u00E2y\n </button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 7: \u0110\u1ED4I \u0110\u01AF\u1EDCNG D\u1EAAN V\u1EACT L\u00DD / \u00C1NH X\u1EA0 \u1ED4 C\u1EE8NG M\u1EDAI KHI K\u1EBET TH\u00DAC D\u1EF0 \u00C1N -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"relocateDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"500\"\n [nzClosable]=\"false\"\n [nzTitle]=\"relocateDrawerTitleTpl\"\n [nzFooter]=\"relocateDrawerFooterTpl\"\n (nzOnClose)=\"relocateDrawerVisible = false\"\n >\n <ng-template #relocateDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"hdd\" style=\"font-size: 18px; color: var(--primary-color)\"></nz-icon>\n <strong>\n {{ relocateTargetFolder() ? \"\u00C1nh x\u1EA1 / Chuy\u1EC3n \u1ED5 \u0111\u0129a th\u01B0 m\u1EE5c\" : \"C\u1EA5u h\u00ECnh RootPath l\u01B0u tr\u1EEF chung\" }}\n </strong>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"relocateDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n <div nz-flex nzVertical [nzGap]=\"16\">\n @if (relocateTargetFolder(); as folder) {\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-header\">\n <nz-icon nzType=\"folder-fill\" style=\"font-size: 22px; color: #f59e0b\"></nz-icon>\n <div>\n <div style=\"font-weight: 600\">{{ folder.Name }}</div>\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">\n \u0110\u01B0\u1EDDng d\u1EABn hi\u1EC7n t\u1EA1i:\n <code>{{ folder.PhysicalRelativePath || drive.currentPhysicalPath() || \"M\u1EB7c \u0111\u1ECBnh\" }}</code>\n </div>\n </div>\n </div>\n </div>\n <div>\n <label class=\"drawer-field-label\">\u0110\u01B0\u1EDDng d\u1EABn v\u1EADt l\u00FD m\u1EDBi c\u1EE7a th\u01B0 m\u1EE5c (H\u1ED7 tr\u1EE3 \u1ED5 c\u1EE9ng kh\u00E1c / NAS)</label>\n <input\n nz-input\n [(ngModel)]=\"relocateNewPath\"\n [appAutoFocus]=\"relocateDrawerVisible\"\n placeholder=\"VD: E:Archive_2026DuAn_A ho\u1EB7c \\\\NAS01StorageDuAn_A\"\n (keyup.enter)=\"submitRelocateDrawer()\"\n />\n <div class=\"quota-sub\" style=\"margin-top: 6px\">\n Khi d\u1EF1 \u00E1n k\u1EBFt th\u00FAc v\u00E0 h\u1EA1 t\u1EA7ng chuy\u1EC3n th\u01B0 m\u1EE5c sang \u1ED5 c\u1EE9ng kh\u00E1c, \u0111\u1EB7t \u0111\u01B0\u1EDDng d\u1EABn m\u1EDBi t\u1EA1i \u0111\u00E2y \u0111\u1EC3 to\u00E0n b\u1ED9 th\u01B0\n m\u1EE5c con v\u00E0 file b\u00EAn trong t\u1EF1 \u0111\u1ED9ng map sang \u1ED5 c\u1EE9ng m\u1EDBi.\n </div>\n </div>\n <div class=\"drawer-meta-card\">\n <label nz-checkbox [(ngModel)]=\"relocateMoveFilesOnDisk\">\n <strong>T\u1EF1 \u0111\u1ED9ng di chuy\u1EC3n d\u1EEF li\u1EC7u v\u1EADt l\u00FD t\u1EEB \u0111\u01B0\u1EDDng d\u1EABn c\u0169 sang \u1ED5 \u0111\u0129a m\u1EDBi</strong>\n </label>\n <div class=\"quota-sub\" style=\"margin-left: 24px\">\n N\u1EBFu b\u1ED9 ph\u1EADn H\u1EA1 t\u1EA7ng \u0111\u00E3 copy/move s\u1EB5n th\u01B0 m\u1EE5c sang \u1ED5 c\u1EE9ng m\u1EDBi r\u1ED3i, h\u00E3y <strong>b\u1ECF ch\u1ECDn</strong> m\u1EE5c n\u00E0y \u0111\u1EC3\n h\u1EC7 th\u1ED1ng ch\u1EC9 c\u1EADp nh\u1EADt l\u1EA1i \u00E1nh x\u1EA1 \u0111\u01B0\u1EDDng d\u1EABn trong Database.\n </div>\n <label nz-checkbox [(ngModel)]=\"relocateSyncNewFiles\" style=\"margin-top: 6px\">\n <strong>\u0110\u1ED3ng b\u1ED9 b\u1ED5 sung c\u00E1c file/folder c\u00F3 s\u1EB5n t\u1EA1i \u0111\u01B0\u1EDDng d\u1EABn m\u1EDBi v\u00E0o Drive</strong>\n </label>\n </div>\n } @else {\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">RootPath hi\u1EC7n t\u1EA1i:</span>\n <code class=\"break-word\">{{ drive.storageRootPath() || drive.currentPhysicalPath() }}</code>\n </div>\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">Ch\u1EBF \u0111\u1ED9 th\u01B0 m\u1EE5c g\u1ED1c:</span>\n <nz-tag [nzColor]=\"drive.useSharedPhysicalRoot() ? 'green' : 'blue'\">\n {{\n drive.useSharedPhysicalRoot() ? \"D\u00F9ng chung 1 RootPath cho t\u1EA5t c\u1EA3 User\" : \"T\u00E1ch theo t\u1EEBng Username\"\n }}\n </nz-tag>\n </div>\n </div>\n <div>\n <label class=\"drawer-field-label\">\u0110\u01B0\u1EDDng d\u1EABn RootPath chung m\u1EDBi tr\u00EAn Server</label>\n <input\n nz-input\n [(ngModel)]=\"relocateNewPath\"\n [appAutoFocus]=\"relocateDrawerVisible\"\n placeholder=\"VD: D:ProjectStorageDriveRoot ho\u1EB7c E:ArchiveDrive\"\n (keyup.enter)=\"submitRelocateDrawer()\"\n />\n <div class=\"quota-sub\" style=\"margin-top: 6px\">\n T\u1EA5t c\u1EA3 c\u00E1c th\u01B0 m\u1EE5c ch\u01B0a ghim \u1ED5 \u0111\u0129a ri\u00EAng s\u1EBD t\u1EF1 \u0111\u1ED9ng \u0111\u1ECDc/ghi theo RootPath m\u1EDBi n\u00E0y.\n </div>\n </div>\n }\n </div>\n </ng-container>\n <ng-template #relocateDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"relocateDrawerVisible = false\">H\u1EE7y</button>\n <button nz-button nzType=\"primary\" (click)=\"submitRelocateDrawer()\">\n <nz-icon nzType=\"save\"></nz-icon> L\u01B0u \u00E1nh x\u1EA1 v\u1EADt l\u00FD\n </button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 8: QU\u1EA2N L\u00DD H\u1EA0N NG\u1EA0CH DUNG L\u01AF\u1EE2NG (DEFAULT QUOTA & PER-USER QUOTA) -->\n <!-- CH\u1EC8 D\u00C0NH RI\u00CANG CHO QU\u1EA2N TR\u1ECA VI\u00CAN (ADMIN) -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"quotaAdminDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"980\"\n [nzClosable]=\"false\"\n [nzTitle]=\"quotaAdminDrawerTitleTpl\"\n [nzFooter]=\"quotaAdminDrawerFooterTpl\"\n (nzOnClose)=\"quotaAdminDrawerVisible = false\"\n >\n <ng-template #quotaAdminDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"pie-chart\" style=\"font-size: 18px; color: var(--primary-color)\"></nz-icon>\n <strong>Qu\u1EA3n l\u00FD H\u1EA1n ng\u1EA1ch Dung l\u01B0\u1EE3ng (Quota Management)</strong>\n <nz-tag nzColor=\"gold\">Ch\u1EC9 Admin</nz-tag>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"quotaAdminDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n <div nz-flex nzVertical [nzGap]=\"16\">\n <!-- PH\u1EA6N 1: C\u1EA4U H\u00CCNH QUOTA M\u1EB6C \u0110\u1ECANH TO\u00C0N H\u1EC6 TH\u1ED0NG -->\n <div class=\"drawer-meta-card\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" nzWrap=\"wrap\" [nzGap]=\"8\">\n <div>\n <div style=\"font-size: 14px; font-weight: 600\">\n <nz-icon nzType=\"cloud-server\" style=\"color: var(--primary-color); margin-right: 6px\"></nz-icon>\n 1. C\u1EA5u h\u00ECnh Quota m\u1EB7c \u0111\u1ECBnh (Default Quota)\n </div>\n <div class=\"quota-sub\">\n \u00C1p d\u1EE5ng t\u1EF1 \u0111\u1ED9ng cho ng\u01B0\u1EDDi d\u00F9ng m\u1EDBi ho\u1EB7c ng\u01B0\u1EDDi d\u00F9ng ch\u01B0a \u0111\u01B0\u1EE3c g\u00E1n h\u1EA1n ng\u1EA1ch ri\u00EAng.\n </div>\n </div>\n @if (quotaOverview(); as ov) {\n <div nz-flex nzAlign=\"center\" [nzGap]=\"8\">\n <nz-tag nzColor=\"blue\">\n M\u1EB7c \u0111\u1ECBnh hi\u1EC7n t\u1EA1i: <strong>{{ ov.DefaultUserQuotaBytes | formatBytes }}</strong>\n </nz-tag>\n <nz-tag nzColor=\"purple\">\n T\u1ED5ng \u0111\u00E3 d\u00F9ng to\u00E0n h\u1EC7 th\u1ED1ng: <strong>{{ ov.TotalSystemUsedBytes | formatBytes }}</strong>\n </nz-tag>\n </div>\n }\n </div>\n <nz-divider style=\"margin: 8px 0\"></nz-divider>\n <div nz-flex nzAlign=\"center\" nzWrap=\"wrap\" [nzGap]=\"8\">\n <span style=\"font-size: 13px; font-weight: 500\">M\u1EE9c Quota m\u1EB7c \u0111\u1ECBnh:</span>\n <input\n nz-input\n type=\"number\"\n min=\"1\"\n [(ngModel)]=\"defaultQuotaInputValue\"\n style=\"width: 120px\"\n placeholder=\"Nh\u1EADp dung l\u01B0\u1EE3ng\"\n />\n <nz-select [(ngModel)]=\"defaultQuotaInputUnit\" style=\"width: 90px\">\n <nz-option nzValue=\"MB\" nzLabel=\"MB\"></nz-option>\n <nz-option nzValue=\"GB\" nzLabel=\"GB\"></nz-option>\n <nz-option nzValue=\"TB\" nzLabel=\"TB\"></nz-option>\n </nz-select>\n <!-- C\u00E1c n\u00FAt ch\u1ECDn nhanh (Quick Presets) -->\n <div nz-flex nzAlign=\"center\" [nzGap]=\"4\">\n <button nz-button nzSize=\"small\" (click)=\"setDefaultQuotaPreset(1, 'GB')\">1 GB</button>\n <button nz-button nzSize=\"small\" (click)=\"setDefaultQuotaPreset(5, 'GB')\">5 GB</button>\n <button nz-button nzSize=\"small\" (click)=\"setDefaultQuotaPreset(10, 'GB')\">10 GB</button>\n <button nz-button nzSize=\"small\" (click)=\"setDefaultQuotaPreset(20, 'GB')\">20 GB</button>\n <button nz-button nzSize=\"small\" (click)=\"setDefaultQuotaPreset(50, 'GB')\">50 GB</button>\n <button nz-button nzSize=\"small\" (click)=\"setDefaultQuotaPreset(100, 'GB')\">100 GB</button>\n </div>\n <button nz-button nzType=\"primary\" (click)=\"onSaveDefaultQuota()\">\n <nz-icon nzType=\"save\"></nz-icon> L\u01B0u Quota m\u1EB7c \u0111\u1ECBnh\n </button>\n </div>\n <div style=\"margin-top: 4px\">\n <label nz-checkbox [(ngModel)]=\"applyDefaultToExistingUsers\">\n \u0110\u1ED3ng th\u1EDDi c\u1EADp nh\u1EADt m\u1EE9c Quota m\u1EB7c \u0111\u1ECBnh m\u1EDBi n\u00E0y cho t\u1EA5t c\u1EA3 c\u00E1c ng\u01B0\u1EDDi d\u00F9ng hi\u1EC7n c\u00F3\n </label>\n </div>\n </div>\n <!-- PH\u1EA6N 2: \u0110\u1EB6T QUOTA RI\u00CANG CHO T\u1EEANG NG\u01AF\u1EDCI D\u00D9NG -->\n <div>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" nzWrap=\"wrap\" [nzGap]=\"8\" style=\"margin-bottom: 10px\">\n <div>\n <div style=\"font-size: 14px; font-weight: 600\">\n <nz-icon nzType=\"team\" style=\"color: var(--primary-color); margin-right: 6px\"></nz-icon>\n 2. Thi\u1EBFt l\u1EADp Quota cho t\u1EEBng ng\u01B0\u1EDDi d\u00F9ng ({{ quotaUsers().length }})\n </div>\n <div class=\"quota-sub\">\n T\u00F9y ch\u1EC9nh h\u1EA1n ng\u1EA1ch dung l\u01B0\u1EE3ng ri\u00EAng cho t\u1EEBng c\u00E1 nh\u00E2n ho\u1EB7c \u0111\u1EB7t l\u1EA1i v\u1EC1 m\u1EE9c m\u1EB7c \u0111\u1ECBnh.\n </div>\n </div>\n <div nz-flex nzAlign=\"center\" [nzGap]=\"8\">\n <nz-input-group [nzSuffix]=\"quotaUserSearchSuffix\" style=\"width: 260px\">\n <input\n nz-input\n type=\"text\"\n placeholder=\"T\u00ECm theo t\u00E0i kho\u1EA3n, h\u1ECD t\u00EAn, email...\"\n [(ngModel)]=\"quotaUserSearchKeyword\"\n (keyup.enter)=\"reloadQuotaOverview()\"\n />\n </nz-input-group>\n <ng-template #quotaUserSearchSuffix>\n <nz-icon nzType=\"search\" class=\"cursor-pointer\" (click)=\"reloadQuotaOverview()\"></nz-icon>\n </ng-template>\n <button nz-button nzType=\"default\" (click)=\"reloadQuotaOverview()\" nz-tooltip nzTooltipTitle=\"T\u1EA3i l\u1EA1i\">\n <nz-icon nzType=\"reload\"></nz-icon>\n </button>\n </div>\n </div>\n <nz-table\n #userQuotaTable\n [nzData]=\"quotaUsers()\"\n [nzLoading]=\"quotaLoading()\"\n nzSize=\"small\"\n [nzBordered]=\"true\"\n [nzPageSize]=\"10\"\n [nzShowPagination]=\"true\"\n >\n <thead>\n <tr>\n <th nzWidth=\"45px\" class=\"text-center\">#</th>\n <th>Ng\u01B0\u1EDDi d\u00F9ng</th>\n <th nzWidth=\"220px\">\u0110\u00E3 d\u00F9ng / H\u1EA1n ng\u1EA1ch</th>\n <th nzWidth=\"105px\" class=\"text-center\">Lo\u1EA1i Quota</th>\n <th nzWidth=\"210px\">\u0110\u1EB7t h\u1EA1n ng\u1EA1ch m\u1EDBi</th>\n <th nzWidth=\"145px\" class=\"text-center\">Thao t\u00E1c</th>\n </tr>\n </thead>\n <tbody>\n @for (u of userQuotaTable.data; track u.UserId; let idx = $index) {\n <tr>\n <td class=\"text-center\">{{ idx + 1 }}</td>\n <td>\n <div style=\"font-weight: 600\">{{ u.FullName || u.UserName }}</div>\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">\n <code>{{ u.UserName }}</code>\n @if (u.OrgName) {\n <span> \u2022 {{ u.OrgName }}</span>\n }\n @if (u.Email) {\n <span> \u2022 {{ u.Email }}</span>\n }\n </div>\n </td>\n <td>\n <div nz-flex nzJustify=\"space-between\" style=\"font-size: 12px; margin-bottom: 2px\">\n <span\n >{{ u.UsedBytes | formatBytes }} / <strong>{{ u.QuotaLimitBytes | formatBytes }}</strong></span\n >\n <span>{{ getUserQuotaPercent(u) }}%</span>\n </div>\n <nz-progress\n [nzPercent]=\"getUserQuotaPercent(u)\"\n nzSize=\"small\"\n [nzShowInfo]=\"false\"\n [nzStatus]=\"getUserQuotaPercent(u) >= 95 ? 'exception' : 'normal'\"\n ></nz-progress>\n </td>\n <td class=\"text-center\">\n @if (u.IsCustomQuota) {\n <nz-tag nzColor=\"orange\">T\u00F9y ch\u1EC9nh</nz-tag>\n } @else {\n <nz-tag nzColor=\"default\">M\u1EB7c \u0111\u1ECBnh</nz-tag>\n }\n </td>\n <td>\n <div nz-flex nzAlign=\"center\" [nzGap]=\"6\">\n <input nz-input type=\"number\" min=\"1\" [(ngModel)]=\"u.editQuotaValue\" style=\"width: 90px\" />\n <nz-select [(ngModel)]=\"u.editQuotaUnit\" style=\"width: 80px\">\n <nz-option nzValue=\"MB\" nzLabel=\"MB\"></nz-option>\n <nz-option nzValue=\"GB\" nzLabel=\"GB\"></nz-option>\n <nz-option nzValue=\"TB\" nzLabel=\"TB\"></nz-option>\n </nz-select>\n </div>\n </td>\n <td class=\"text-center\">\n <div nz-flex nzJustify=\"center\" [nzGap]=\"6\">\n <button nz-button nzType=\"primary\" nzSize=\"small\" (click)=\"onSaveUserQuota(u)\">\n <!-- \n nz-tooltip\n nzTooltipTitle=\"L\u01B0u h\u1EA1n ng\u1EA1ch ri\u00EAng cho ng\u01B0\u1EDDi d\u00F9ng n\u00E0y\"\n -->\n <nz-icon nzType=\"check\"></nz-icon> L\u01B0u\n </button>\n <button\n nz-button\n nzType=\"default\"\n nzSize=\"small\"\n [disabled]=\"!u.IsCustomQuota\"\n nz-tooltip\n nzTooltipTitle=\"\u0110\u1EB7t l\u1EA1i v\u1EC1 m\u1EE9c Quota m\u1EB7c \u0111\u1ECBnh c\u1EE7a h\u1EC7 th\u1ED1ng\"\n (click)=\"onResetUserQuota(u)\"\n >\n <nz-icon nzType=\"undo\"></nz-icon>\n </button>\n </div>\n </td>\n </tr>\n }\n </tbody>\n </nz-table>\n </div>\n </div>\n </ng-container>\n <ng-template #quotaAdminDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"quotaAdminDrawerVisible = false\">\u0110\u00F3ng</button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 10: TH\u00CAM / C\u1EA4U H\u00CCNH M\u1EE4C CUSTOM B\u00CAN D\u01AF\u1EDAI \"T\u00C0I LI\u1EC6U \u0110\u01A0N V\u1ECA\" -->\n <!-- (V\u00ED d\u1EE5: \"T\u00E0i li\u1EC7u d\u1EF1 \u00E1n\" - Admin c\u00F3 th\u1EC3 b\u1EADt hi\u1EC3n th\u1ECB cho t\u1EA5t c\u1EA3 User) -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"customSpaceDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"480\"\n [nzClosable]=\"false\"\n [nzTitle]=\"customSpaceDrawerTitleTpl\"\n [nzFooter]=\"customSpaceDrawerFooterTpl\"\n (nzOnClose)=\"customSpaceDrawerVisible = false\"\n >\n <ng-template #customSpaceDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button\n nz-button\n nzSize=\"small\"\n nzType=\"default\"\n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n (click)=\"toggleDrawerPlacement()\"\n >\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon\n [nzType]=\"customSpaceIcon || 'project'\"\n style=\"font-size: 18px; color: var(--primary-color)\"\n ></nz-icon>\n <strong>{{\n customSpaceDrawerMode === \"create\" ? \"Th\u00EAm m\u1EE5c t\u00F9y ch\u1EC9nh d\u01B0\u1EDBi T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB\" : \"C\u1EA5u h\u00ECnh m\u1EE5c t\u00F9y ch\u1EC9nh\"\n }}</strong>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"customSpaceDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n <div nz-flex nzVertical [nzGap]=\"16\">\n <div>\n <label class=\"drawer-field-label\">T\u00EAn m\u1EE5c hi\u1EC3n th\u1ECB tr\u00EAn thanh menu tr\u00E1i</label>\n <input\n nz-input\n [(ngModel)]=\"customSpaceName\"\n [appAutoFocus]=\"customSpaceDrawerVisible\"\n placeholder=\"V\u00ED d\u1EE5: T\u00E0i li\u1EC7u d\u1EF1 \u00E1n, H\u1ED3 s\u01A1 th\u1EA7u, Quy tr\u00ECnh ISO...\"\n (keyup.enter)=\"submitCustomSpaceDrawer()\"\n />\n <div class=\"quota-sub\" style=\"margin-top: 4px\">\n M\u1EE5c n\u00E0y s\u1EBD xu\u1EA5t hi\u1EC7n ngay b\u00EAn d\u01B0\u1EDBi m\u1EE5c <strong>\"T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB\"</strong> tr\u00EAn thanh \u0111i\u1EC1u h\u01B0\u1EDBng b\u00EAn tr\u00E1i.\n </div>\n </div>\n <div>\n <label class=\"drawer-field-label\">Bi\u1EC3u t\u01B0\u1EE3ng (Icon)</label>\n <nz-select [(ngModel)]=\"customSpaceIcon\" style=\"width: 100%\">\n <nz-option nzValue=\"project\" nzLabel=\"\uD83D\uDCCA D\u1EF1 \u00E1n (project)\"></nz-option>\n <nz-option nzValue=\"folder-open\" nzLabel=\"\uD83D\uDCC2 Th\u01B0 m\u1EE5c m\u1EDF (folder-open)\"></nz-option>\n <nz-option nzValue=\"book\" nzLabel=\"\uD83D\uDCD8 T\u00E0i li\u1EC7u / C\u1EA9m nang (book)\"></nz-option>\n <nz-option nzValue=\"safety-certificate\" nzLabel=\"\uD83D\uDEE1 Quy chu\u1EA9n / ISO (safety-certificate)\"></nz-option>\n <nz-option nzValue=\"solution\" nzLabel=\"\uD83D\uDCCB H\u1ED3 s\u01A1 nghi\u1EC7p v\u1EE5 (solution)\"></nz-option>\n <nz-option nzValue=\"database\" nzLabel=\"\uD83D\uDDC4 Kho d\u1EEF li\u1EC7u (database)\"></nz-option>\n </nz-select>\n </div>\n <div class=\"drawer-meta-card\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\">\n <div>\n <div style=\"font-weight: 600; font-size: 13px\">Hi\u1EC3n th\u1ECB cho t\u1EA5t c\u1EA3 ng\u01B0\u1EDDi d\u00F9ng (All Users)</div>\n <div class=\"quota-sub\">\n @if (drive.isCurrentUserAdmin()) {\n Khi b\u1EADt: T\u1EA5t c\u1EA3 t\u00E0i kho\u1EA3n trong h\u1EC7 th\u1ED1ng \u0111\u1EC1u nh\u00ECn th\u1EA5y v\u00E0 truy c\u1EADp \u0111\u01B0\u1EE3c m\u1EE5c n\u00E0y b\u00EAn d\u01B0\u1EDBi \"T\u00E0i li\u1EC7u \u0110\u01A1n\n v\u1ECB\".\n } @else {\n Ch\u1EC9 Qu\u1EA3n tr\u1ECB vi\u00EAn (Admin) m\u1EDBi c\u00F3 quy\u1EC1n b\u1EADt hi\u1EC3n th\u1ECB chung cho to\u00E0n b\u1ED9 ng\u01B0\u1EDDi d\u00F9ng.\n }\n </div>\n </div>\n <nz-switch\n [(ngModel)]=\"customSpaceVisibleToAll\"\n [nzDisabled]=\"!drive.isCurrentUserAdmin()\"\n nzCheckedChildren=\"All Users\"\n nzUnCheckedChildren=\"C\u00E1 nh\u00E2n\"\n ></nz-switch>\n </div>\n @if (customSpaceVisibleToAll) {\n <nz-divider style=\"margin: 8px 0\"></nz-divider>\n <div>\n <label class=\"drawer-field-label\">M\u1EE9c quy\u1EC1n m\u1EB7c \u0111\u1ECBnh cho to\u00E0n b\u1ED9 ng\u01B0\u1EDDi d\u00F9ng</label>\n <nz-select\n [(ngModel)]=\"customSpaceDefaultAccessLevel\"\n [nzDisabled]=\"!drive.isCurrentUserAdmin()\"\n style=\"width: 100%\"\n >\n <nz-option [nzValue]=\"DriveAccessLevel.None\" nzLabel=\"None\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Viewer\" nzLabel=\"Ch\u1EC9 xem (Viewer)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Downloader\" nzLabel=\"Xem & T\u1EA3i xu\u1ED1ng\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Uploader\" nzLabel=\"Xem & T\u1EA3i l\u00EAn (Kh\u00F4ng \u0111\u01B0\u1EE3c x\u00F3a)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Editor\" nzLabel=\"Ch\u1EC9nh s\u1EEDa (Editor)\"></nz-option>\n </nz-select>\n </div>\n }\n </div>\n </div>\n </ng-container>\n <ng-template #customSpaceDrawerFooterTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div>\n @if (customSpaceDrawerMode === \"edit\" && editingCustomSpace) {\n <button nz-button nzDanger nzType=\"default\" (click)=\"onDeleteCustomSpace(editingCustomSpace)\">\n <nz-icon nzType=\"delete\"></nz-icon> X\u00F3a m\u1EE5c n\u00E0y\n </button>\n }\n </div>\n <div nz-flex [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"customSpaceDrawerVisible = false\">H\u1EE7y</button>\n <button nz-button nzType=\"primary\" (click)=\"submitCustomSpaceDrawer()\">\n <nz-icon nzType=\"check\"></nz-icon>\n {{ customSpaceDrawerMode === \"create\" ? \"T\u1EA1o m\u1EE5c m\u1EDBi\" : \"L\u01B0u thay \u0111\u1ED5i\" }}\n </button>\n </div>\n </div>\n </ng-template>\n </nz-drawer>\n\n <nz-drawer\n [nzVisible]=\"matrixDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"'92vw'\"\n nzTitle=\"Ma tr\u1EADn Ph\u00E2n quy\u1EC1n T\u00E0i li\u1EC7u & Th\u01B0 m\u1EE5c\"\n (nzOnClose)=\"matrixDrawerVisible = false\"\n >\n <!-- (ACL / RBAC Matrix) -->\n <ng-container *nzDrawerContent>\n <lib-drive-permission-matrix\n [rootFolderId]=\"matrixRootNodeId\"\n [viewMode]=\"\n drive.currentViewMode() === 'ORG_DRIVE'\n ? 'ORG_DRIVE'\n : drive.currentViewMode() === 'CUSTOM_SPACE'\n ? 'CUSTOM_SPACE'\n : 'MY_DRIVE'\n \"\n [customSpaceId]=\"drive.currentCustomSpaceId()\"\n (saved)=\"drive.loadNodes()\"\n (closed)=\"matrixDrawerVisible = false\"\n >\n </lib-drive-permission-matrix>\n </ng-container>\n </nz-drawer>\n}\n", styles: [".drive-shell{display:grid;grid-template-columns:245px 1fr;min-height:calc(100vh - 110px);background:var(--app-container-bg, #ffffff);border:1px solid var(--app-border, #e2e8f0);border-radius:6px;overflow:hidden}.drive-sidebar{padding:14px;background:var(--app-sidebar-bg, #f8fafc);border-right:1px solid var(--app-border, #e2e8f0);display:flex;flex-direction:column;gap:14px}.drive-nav{display:flex;flex-direction:column;gap:4px}.drive-nav a{display:flex;align-items:center;gap:10px;padding:9px 12px;border-radius:6px;color:var(--app-text, #334155);cursor:pointer;transition:background .15s}.drive-nav a:hover,.drive-nav a.active{background:color-mix(in srgb,var(--primary-color, #1890ff) 16%,transparent);color:var(--primary-color, #1890ff);font-weight:600}.org-nav-group{display:flex;flex-direction:column;gap:2px}.custom-space-link{padding-left:26px!important;font-size:13px}.custom-space-title{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.custom-space-badge{margin:0!important;font-size:10px;line-height:16px;padding:0 4px}.nav-inline-btn{border:none;background:transparent;color:inherit;cursor:pointer;padding:2px 4px;border-radius:4px;display:inline-flex;align-items:center;justify-content:center;opacity:.7}.nav-inline-btn:hover{opacity:1;background:color-mix(in srgb,var(--primary-color, #1890ff) 18%,transparent)}.storage-mode-box{padding:10px 12px;background:var(--app-container-bg, #ffffff);border:1px solid var(--app-border, #e2e8f0);border-radius:6px}.upload-queue-box{padding:10px;background:var(--app-container-bg, #ffffff);border:1px solid var(--app-border, #e2e8f0);border-radius:6px;max-height:180px;overflow-y:auto}.upload-task-row{margin-bottom:6px}.upload-task-name{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.quota-box{margin-top:auto;padding:12px;background:var(--app-container-bg, #ffffff);border:1px solid var(--app-border, #e2e8f0);border-radius:6px}.quota-title{font-size:13px;font-weight:600;margin-bottom:6px}.quota-sub{font-size:12px;color:var(--app-text-muted, #64748b);margin-top:4px}.drive-main{position:relative;padding:16px;display:flex;flex-direction:column;gap:12px;transition:background .15s,border-color .15s}.drive-main.external-drag-active{background:color-mix(in srgb,var(--primary-color, #1890ff) 6%,var(--app-container-bg, #ffffff));outline:2px dashed var(--primary-color, #1890ff);outline-offset:-6px}.external-drop-banner{pointer-events:none;display:flex;align-items:center;gap:14px;padding:12px 18px;border-radius:8px;background:color-mix(in srgb,var(--primary-color, #1890ff) 14%,var(--app-container-bg, #ffffff));border:1px dashed var(--primary-color, #1890ff);color:var(--app-text, #1e293b)}.drop-banner-icon{font-size:28px;color:var(--primary-color, #1890ff)}.drop-banner-title{font-size:14px;font-weight:500}.drop-banner-sub{font-size:12px;color:var(--app-text-muted, #64748b);margin-top:2px}.drive-toolbar{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px;padding-bottom:10px;border-bottom:1px solid var(--app-border, #f1f5f9)}.physical-path-bar{display:flex;align-items:center;gap:6px;margin-top:4px;font-size:12px;color:var(--app-text-muted, #64748b)}.toolbar-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.drive-row{cursor:pointer;transition:background .15s,outline .15s}.drive-row.dragging-row{opacity:.45}.drive-row.drop-target-active>td{background:color-mix(in srgb,var(--primary-color, #1890ff) 18%,transparent)!important;border-top:1px dashed var(--primary-color, #1890ff);border-bottom:1px dashed var(--primary-color, #1890ff)}.bc-drop-active,.drive-nav a.nav-drop-active{background:color-mix(in srgb,var(--primary-color, #1890ff) 22%,transparent)!important;outline:1.5px dashed var(--primary-color, #1890ff);color:var(--primary-color, #1890ff);font-weight:600}.node-name-cell{display:flex;align-items:center;gap:8px}.node-icon-wrap{position:relative;display:inline-flex;align-items:center;justify-content:center}.node-icon{font-size:18px}.shortcut-badge{position:absolute;right:-5px;bottom:-3px;width:13px;height:13px;border-radius:50%;background:#7c3aed;color:#fff;font-size:9px;display:inline-flex;align-items:center;justify-content:center;box-shadow:0 0 0 1.5px var(--app-container-bg, #ffffff)}.node-title{font-weight:500}.action-btn-group{display:inline-flex;align-items:center;justify-content:center;gap:4px}.action-icon-btn{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border:none;background:transparent;border-radius:6px;cursor:pointer;font-size:15px;transition:background .15s,transform .1s}.action-icon-btn:hover{background:color-mix(in srgb,var(--primary-color, #1890ff) 12%,transparent);transform:translateY(-1px)}.action-icon-btn.color-warn:hover{background:#ef44441f}.drawer-field-label{display:block;font-size:13px;font-weight:600;margin-bottom:6px;color:var(--app-text, #334155)}.drawer-meta-card{padding:12px 14px;background:var(--app-sidebar-bg, #f8fafc);border:1px solid var(--app-border, #e2e8f0);border-radius:8px;display:flex;flex-direction:column;gap:8px}.drawer-meta-header{display:flex;align-items:center;gap:10px}.drawer-meta-row{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:13px}.meta-label{color:var(--app-text-muted, #64748b)}.sortable-th{cursor:pointer;-webkit-user-select:none;user-select:none;transition:background .15s,color .15s}.sortable-th:hover{background:color-mix(in srgb,var(--primary-color, #1890ff) 8%,var(--app-sidebar-bg, #f8fafc))!important;color:var(--primary-color, #1890ff)}.th-sort-wrap{display:inline-flex;align-items:center;gap:6px;width:100%}.th-sort-wrap.justify-center{justify-content:center}.th-sort-wrap.justify-end{justify-content:flex-end}.sort-icon{font-size:13px;opacity:.35;transition:opacity .15s,color .15s}.sort-icon.active{opacity:1;color:var(--primary-color, #1890ff)}.sortable-th:hover .sort-icon{opacity:.85}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$1.DatePipe, name: "date" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: NzGridModule }, { kind: "ngmodule", type: NzFlexModule }, { kind: "directive", type: i3$3.NzFlexDirective, selector: "[nz-flex],nz-flex", inputs: ["nzVertical", "nzJustify", "nzAlign", "nzGap", "nzWrap", "nzFlex"], exportAs: ["nzFlex"] }, { kind: "ngmodule", type: NzTableModule }, { kind: "component", type: i6.NzTableComponent, selector: "nz-table", inputs: ["nzTableLayout", "nzShowTotal", "nzItemRender", "nzTitle", "nzFooter", "nzNoResult", "nzPageSizeOptions", "nzVirtualItemSize", "nzVirtualMaxBufferPx", "nzVirtualMinBufferPx", "nzVirtualForTrackBy", "nzLoadingDelay", "nzPageIndex", "nzPageSize", "nzTotal", "nzWidthConfig", "nzData", "nzCustomColumn", "nzPaginationPosition", "nzScroll", "noDataVirtualHeight", "nzPaginationType", "nzFrontPagination", "nzTemplateMode", "nzShowPagination", "nzLoading", "nzOuterBordered", "nzLoadingIndicator", "nzBordered", "nzSize", "nzShowSizeChanger", "nzHideOnSinglePage", "nzShowQuickJumper", "nzSimple"], outputs: ["nzPageSizeChange", "nzPageIndexChange", "nzQueryParams", "nzCurrentPageDataChange", "nzCustomColumnChange"], exportAs: ["nzTable"] }, { kind: "directive", type: i6.NzTableCellDirective, selector: "th:not(.nz-disable-th):not([mat-cell]), td:not(.nz-disable-td):not([mat-cell])" }, { kind: "directive", type: i6.NzThMeasureDirective, selector: "th", inputs: ["nzWidth", "colspan", "colSpan", "rowspan", "rowSpan"] }, { kind: "component", type: i6.NzTdAddOnComponent, selector: "td[nzChecked], td[nzDisabled], td[nzIndeterminate], td[nzIndentSize], td[nzExpand], td[nzShowExpand], td[nzShowCheckbox]", inputs: ["nzChecked", "nzDisabled", "nzIndeterminate", "nzLabel", "nzIndentSize", "nzShowExpand", "nzShowCheckbox", "nzExpand", "nzExpandIcon"], outputs: ["nzCheckedChange", "nzExpandChange"] }, { kind: "component", type: i6.NzTheadComponent, selector: "thead:not(.ant-table-thead)", outputs: ["nzSortOrderChange"] }, { kind: "component", type: i6.NzTbodyComponent, selector: "tbody" }, { kind: "directive", type: i6.NzTrDirective, selector: "tr:not([mat-row]):not([mat-header-row]):not([nz-table-measure-row]):not([nzExpand]):not([nz-table-fixed-row])" }, { kind: "ngmodule", type: NzPaginationModule }, { kind: "component", type: i7.NzPaginationComponent, selector: "nz-pagination", inputs: ["nzShowTotal", "nzItemRender", "nzSize", "nzPageSizeOptions", "nzShowSizeChanger", "nzShowQuickJumper", "nzSimple", "nzDisabled", "nzResponsive", "nzHideOnSinglePage", "nzTotal", "nzPageIndex", "nzPageSize"], outputs: ["nzPageSizeChange", "nzPageIndexChange"], exportAs: ["nzPagination"] }, { 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$1.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i1$2.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: NzInputModule }, { kind: "directive", type: i12.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzBorderless", "nzSize", "nzStepperless", "nzStatus", "disabled"], exportAs: ["nzInput"] }, { kind: "component", type: i12.NzInputGroupComponent, selector: "nz-input-group", inputs: ["nzAddOnBeforeIcon", "nzAddOnAfterIcon", "nzPrefixIcon", "nzSuffixIcon", "nzAddOnBefore", "nzAddOnAfter", "nzPrefix", "nzStatus", "nzSuffix", "nzSize", "nzSearch", "nzCompact"], exportAs: ["nzInputGroup"] }, { kind: "directive", type: i12.NzInputGroupWhitSuffixOrPrefixDirective, selector: "nz-input-group[nzSuffix], nz-input-group[nzPrefix]" }, { kind: "ngmodule", type: NzBreadCrumbModule }, { kind: "component", type: i10.NzBreadCrumbComponent, selector: "nz-breadcrumb", inputs: ["nzAutoGenerate", "nzSeparator", "nzRouteLabel", "nzRouteLabelFn", "nzRouteFn"], exportAs: ["nzBreadcrumb"] }, { kind: "component", type: i10.NzBreadCrumbItemComponent, selector: "nz-breadcrumb-item", inputs: ["nzOverlay"], exportAs: ["nzBreadcrumbItem"] }, { kind: "ngmodule", type: NzDropDownModule }, { kind: "directive", type: i4$2.NzMenuDirective, selector: "[nz-menu]", inputs: ["nzInlineIndent", "nzTheme", "nzMode", "nzInlineCollapsed", "nzSelectable"], outputs: ["nzClick"], exportAs: ["nzMenu"] }, { kind: "component", type: i4$2.NzMenuItemComponent, selector: "[nz-menu-item]", inputs: ["nzPaddingLeft", "nzDisabled", "nzSelected", "nzDanger", "nzMatchRouterExact", "nzMatchRouter"], exportAs: ["nzMenuItem"] }, { kind: "directive", type: i4$2.NzMenuDividerDirective, selector: "[nz-menu-divider]", exportAs: ["nzMenuDivider"] }, { kind: "component", type: i5$3.NzDropdownMenuComponent, selector: "nz-dropdown-menu", exportAs: ["nzDropdownMenu"] }, { kind: "ngmodule", type: NzModalModule }, { kind: "ngmodule", type: NzDrawerModule }, { kind: "component", type: i14.NzDrawerComponent, selector: "nz-drawer", inputs: ["nzContent", "nzCloseIcon", "nzClosable", "nzMaskClosable", "nzMask", "nzCloseOnNavigation", "nzNoAnimation", "nzKeyboard", "nzTitle", "nzExtra", "nzFooter", "nzPlacement", "nzSize", "nzMaskStyle", "nzBodyStyle", "nzWrapClassName", "nzWidth", "nzHeight", "nzZIndex", "nzOffsetX", "nzOffsetY", "nzVisible"], outputs: ["nzOnViewInit", "nzOnClose", "nzVisibleChange"], exportAs: ["nzDrawer"] }, { kind: "directive", type: i14.NzDrawerContentDirective, selector: "[nzDrawerContent]", exportAs: ["nzDrawerContent"] }, { kind: "ngmodule", type: NzProgressModule }, { kind: "component", type: i2$7.NzProgressComponent, selector: "nz-progress", inputs: ["nzShowInfo", "nzWidth", "nzStrokeColor", "nzSize", "nzFormat", "nzSuccessPercent", "nzPercent", "nzStrokeWidth", "nzGapDegree", "nzStatus", "nzType", "nzGapPosition", "nzStrokeLinecap", "nzSteps"], exportAs: ["nzProgress"] }, { kind: "ngmodule", type: NzTagModule }, { kind: "component", type: i11.NzTagComponent, selector: "nz-tag", inputs: ["nzMode", "nzColor", "nzChecked", "nzBordered"], outputs: ["nzOnClose", "nzCheckedChange"], exportAs: ["nzTag"] }, { kind: "ngmodule", type: NzToolTipModule }, { kind: "directive", type: i12$1.NzTooltipDirective, selector: "[nz-tooltip]", inputs: ["nzTooltipTitle", "nzTooltipTitleContext", "nz-tooltip", "nzTooltipTrigger", "nzTooltipPlacement", "nzTooltipOrigin", "nzTooltipVisible", "nzTooltipMouseEnterDelay", "nzTooltipMouseLeaveDelay", "nzTooltipOverlayClassName", "nzTooltipOverlayStyle", "nzTooltipArrowPointAtCenter", "cdkConnectedOverlayPush", "nzTooltipColor"], outputs: ["nzTooltipVisibleChange"], exportAs: ["nzTooltip"] }, { kind: "ngmodule", type: NzEmptyModule }, { kind: "ngmodule", type: NzDividerModule }, { kind: "component", type: i20.NzDividerComponent, selector: "nz-divider", inputs: ["nzText", "nzType", "nzOrientation", "nzVariant", "nzDashed", "nzPlain"], exportAs: ["nzDivider"] }, { kind: "ngmodule", type: NzSwitchModule }, { kind: "component", type: i13$3.NzSwitchComponent, selector: "nz-switch", inputs: ["nzLoading", "nzDisabled", "nzControl", "nzCheckedChildren", "nzUnCheckedChildren", "nzSize", "nzId"], exportAs: ["nzSwitch"] }, { kind: "ngmodule", type: NzSelectModule }, { kind: "component", type: i13$2.NzOptionComponent, selector: "nz-option", inputs: ["nzTitle", "nzLabel", "nzValue", "nzKey", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }, { kind: "component", type: i13$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: NzCheckboxModule }, { kind: "component", type: i13.NzCheckboxComponent, selector: "[nz-checkbox]", inputs: ["nzValue", "nzAutoFocus", "nzDisabled", "nzIndeterminate", "nzChecked", "nzId", "nzName"], outputs: ["nzCheckedChange"], exportAs: ["nzCheckbox"] }, { kind: "pipe", type: FormatBytesPipe, name: "formatBytes" }, { kind: "directive", type: AutoFocusDirective, selector: "[appAutoFocus]", inputs: ["appAutoFocus"] }, { kind: "component", type: ExtendViewFileContentComponent, selector: "extend-view-file-content", inputs: ["previewType", "previewContent"] }, { kind: "component", type: DriveShareModalComponent, selector: "lib-drive-share-modal", inputs: ["nodeId"] }, { kind: "component", type: DriveVersionModalComponent, selector: "lib-drive-version-modal", inputs: ["nodeId", "nodeName", "canEdit", "canDownload"], outputs: ["closed"] }, { kind: "component", type: DriveShareViewerComponent, selector: "lib-drive-share-viewer", inputs: ["token"], outputs: ["backToDrive"] }, { kind: "component", type: IconCopy, selector: "icon-copy", inputs: ["textToCopy", "tooltip", "size"] }, { kind: "component", type: DrivePermissionMatrixComponent, selector: "lib-drive-permission-matrix", inputs: ["viewMode", "scope", "customSpaceId", "rootFolderId", "rootNodeId"], outputs: ["saved", "closed"] }] });
29055
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.7", type: DriveExplorerComponent, isStandalone: true, selector: "lib-drive-explorer", providers: [NzImageService], usesInheritance: true, ngImport: i0, template: "@if (activeShareToken(); as sToken) {\n <lib-drive-share-viewer [token]=\"sToken\" (backToDrive)=\"closeEmbeddedShareViewer()\"></lib-drive-share-viewer>\n} @else {\n <div class=\"drive-shell\">\n <!-- SIDEBAR \u0110I\u1EC0U H\u01AF\u1EDANG & QUOTA -->\n <aside class=\"drive-sidebar\">\n <div nz-flex nzVertical nzGap=\"small\">\n <button\n nz-button\n nzType=\"primary\"\n nzBlock\n [disabled]=\"!drive.canUploadCurrentFolder()\"\n (click)=\"fileInput.click()\"\n >\n <nz-icon nzType=\"cloud-upload\"></nz-icon> T\u1EA3i t\u1EADp tin l\u00EAn\n </button>\n <input #fileInput type=\"file\" multiple hidden (change)=\"onFilesSelected($event)\" />\n <button\n nz-button\n nzType=\"default\"\n nzBlock\n [disabled]=\"!drive.canUploadCurrentFolder()\"\n (click)=\"openFolderDrawer('create')\"\n >\n <nz-icon nzType=\"folder-add\"></nz-icon> T\u1EA1o th\u01B0 m\u1EE5c m\u1EDBi\n </button>\n </div>\n <nav class=\"drive-nav\">\n <a\n [class.active]=\"drive.currentViewMode() === 'MY_DRIVE'\"\n [class.nav-drop-active]=\"dragOverNavSpace() === 'MY_DRIVE'\"\n (click)=\"switchView('MY_DRIVE')\"\n (dragover)=\"onNavSpaceDragOver($event, 'MY_DRIVE')\"\n (dragleave)=\"onNavSpaceDragLeave('MY_DRIVE')\"\n (drop)=\"onNavSpaceDrop($event, 'MY_DRIVE')\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"K\u00E9o th\u1EA3 t\u1EADp tin / th\u01B0 m\u1EE5c v\u00E0o \u0111\u00E2y \u0111\u1EC3 chuy\u1EC3n v\u1EC1 g\u1ED1c Drive c\u00E1 nh\u00E2n\"\n -->\n <nz-icon nzType=\"hdd\"></nz-icon> Drive c\u00E1 nh\u00E2n\n </a>\n <div class=\"org-nav-group\">\n <a\n [class.active]=\"drive.currentViewMode() === 'ORG_DRIVE'\"\n [class.nav-drop-active]=\"dragOverNavSpace() === 'ORG_DRIVE'\"\n (click)=\"switchView('ORG_DRIVE')\"\n (dragover)=\"onNavSpaceDragOver($event, 'ORG_DRIVE')\"\n (dragleave)=\"onNavSpaceDragLeave('ORG_DRIVE')\"\n (drop)=\"onNavSpaceDrop($event, 'ORG_DRIVE')\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"K\u00E9o th\u1EA3 t\u1EADp tin / th\u01B0 m\u1EE5c v\u00E0o \u0111\u00E2y \u0111\u1EC3 chuy\u1EC3n sang g\u1ED1c T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB\"\n -->\n <nz-icon nzType=\"apartment\"></nz-icon>\n <span style=\"flex: 1\">T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB</span>\n <button\n type=\"button\"\n class=\"nav-inline-btn\"\n (click)=\"$event.stopPropagation(); openCustomSpaceDrawer('create')\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"Th\u00EAm m\u1EE5c t\u00F9y ch\u1EC9nh b\u00EAn d\u01B0\u1EDBi T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB (VD: T\u00E0i li\u1EC7u d\u1EF1 \u00E1n)\"\n -->\n <nz-icon nzType=\"plus\"></nz-icon>\n </button>\n </a>\n <!-- DANH S\u00C1CH C\u00C1C M\u1EE4C CUSTOM B\u00CAN D\u01AF\u1EDAI \"T\u00C0I LI\u1EC6U \u0110\u01A0N V\u1ECA\" (VD: \"T\u00E0i li\u1EC7u d\u1EF1 \u00E1n\") -->\n @for (sp of drive.customSpaces(); track sp.Id) {\n <a\n class=\"custom-space-link\"\n [class.active]=\"drive.currentViewMode() === 'CUSTOM_SPACE' && drive.currentCustomSpaceId() === sp.Id\"\n [class.nav-drop-active]=\"dragOverCustomSpaceId() === sp.Id\"\n (click)=\"switchCustomSpace(sp)\"\n (dragover)=\"onCustomSpaceDragOver($event, sp)\"\n (dragleave)=\"onCustomSpaceDragLeave(sp)\"\n (drop)=\"onCustomSpaceDrop($event, sp)\"\n >\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"sp.Name + (sp.IsVisibleToAllUsers ? ' (Hi\u1EC3n th\u1ECB cho t\u1EA5t c\u1EA3 User)' : ' (M\u1EE5c c\u00E1 nh\u00E2n)')\"\n -->\n <nz-icon [nzType]=\"sp.Icon || 'project'\"></nz-icon>\n <span class=\"custom-space-title\">{{ sp.Name }}</span>\n @if (sp.IsVisibleToAllUsers) {\n <nz-tag nzColor=\"cyan\" class=\"custom-space-badge\">All</nz-tag>\n }\n @if (sp.CanManage || drive.isCurrentUserAdmin()) {\n <button\n type=\"button\"\n class=\"nav-inline-btn\"\n (click)=\"$event.stopPropagation(); openCustomSpaceDrawer('edit', sp)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"C\u1EA5u h\u00ECnh m\u1EE5c t\u00F9y ch\u1EC9nh\"\n -->\n <nz-icon nzType=\"setting\"></nz-icon>\n </button>\n }\n </a>\n }\n </div>\n <a [class.active]=\"drive.currentViewMode() === 'SHARED_WITH_ME'\" (click)=\"switchView('SHARED_WITH_ME')\">\n <nz-icon nzType=\"share-alt\"></nz-icon> \u0110\u01B0\u1EE3c chia s\u1EBB v\u1EDBi t\u00F4i\n </a>\n <a [class.active]=\"drive.currentViewMode() === 'RECENT'\" (click)=\"switchView('RECENT')\">\n <nz-icon nzType=\"clock-circle\"></nz-icon> G\u1EA7n \u0111\u00E2y\n </a>\n <a [class.active]=\"drive.currentViewMode() === 'STARRED'\" (click)=\"switchView('STARRED')\">\n <nz-icon nzType=\"star\"></nz-icon> C\u00F3 g\u1EAFn d\u1EA5u sao\n </a>\n <a [class.active]=\"drive.currentViewMode() === 'TRASH'\" (click)=\"switchView('TRASH')\">\n <nz-icon nzType=\"delete\"></nz-icon> Th\u00F9ng r\u00E1c\n </a>\n </nav>\n <!-- KHUNG M\u1EAAU C\u00C2Y TH\u01AF M\u1EE4C (H\u1ED6 TR\u1EE2 K\u00C9O TH\u1EA2 V\u00C0O TH\u01AF M\u1EE4C \u0110\u00CDCH HO\u1EB6C B\u1EA4M T\u1EA0O NHANH) -->\n @if (drive.isCurrentUserAdmin()) {\n <div class=\"template-sidebar-box\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"margin-bottom: 6px\">\n <span style=\"font-size: 12px; font-weight: 600\">\n <nz-icon nzType=\"apartment\" style=\"color: #d97706; margin-right: 4px\"></nz-icon>\n M\u1EABu c\u00E2y th\u01B0 m\u1EE5c ({{ drive.folderTemplates().length }})\n </span>\n <button\n type=\"button\"\n nz-button\n nzType=\"link\"\n nzSize=\"small\"\n style=\"padding: 0 4px; font-size: 12px\"\n (click)=\"openTemplateDrawer('create')\"\n >\n <!-- nz-tooltip\n nzTooltipTitle=\"\u0110\u1ECBnh ngh\u0129a m\u1EABu c\u00E2y th\u01B0 m\u1EE5c m\u1EDBi\" -->\n <nz-icon nzType=\"plus\"></nz-icon> T\u1EA1o m\u1EABu\n </button>\n </div>\n\n @if (drive.folderTemplates().length === 0) {\n <div class=\"quota-sub\" style=\"font-size: 11px\">\n Ch\u01B0a c\u00F3 m\u1EABu n\u00E0o. B\u1EA5m <strong>+ T\u1EA1o m\u1EABu</strong> \u0111\u1EC3 \u0111\u1ECBnh ngh\u0129a c\u00E2y th\u01B0 m\u1EE5c chu\u1EA9n.\n </div>\n } @else {\n <div class=\"template-chip-list\">\n @for (tpl of drive.folderTemplates(); track tpl.Id) {\n <div\n class=\"template-drag-item\"\n draggable=\"true\"\n (dragstart)=\"onTemplateDragStart($event, tpl)\"\n (dragend)=\"onTemplateDragEnd()\"\n >\n <!-- nz-tooltip\n [nzTooltipTitle]=\"\n 'K\u00E9o th\u1EA3 m\u1EABu [' +\n tpl.Name +\n '] (' +\n tpl.TotalFolderCount +\n ' th\u01B0 m\u1EE5c) v\u00E0o m\u1ED9t Th\u01B0 m\u1EE5c \u0111\u00EDch tr\u00EAn b\u1EA3ng, ho\u1EB7c b\u1EA5m \u0111\u1EC3 t\u1EA1o t\u1EA1i \u0111\u00E2y'\n \" -->\n <div\n nz-flex\n nzAlign=\"center\"\n [nzGap]=\"6\"\n style=\"flex: 1; min-width: 0\"\n (click)=\"openFolderDrawer('create', undefined, tpl)\"\n >\n <nz-icon nzType=\"folder-add\" style=\"color: #d97706; font-size: 15px\"></nz-icon>\n <div style=\"flex: 1; min-width: 0\">\n <div class=\"template-item-title\">{{ tpl.Name }}</div>\n <div class=\"template-item-sub\">\n <code>{{ tpl.Code }}</code> \u2022 {{ tpl.TotalFolderCount }} m\u1EE5c\n @if (tpl.TotalPermissionCount > 0) {\n <span style=\"color: #0284c7; font-weight: 600\">\n \u2022 \uD83D\uDEE1 {{ tpl.TotalPermissionCount }} quy\u1EC1n</span\n >\n }\n </div>\n </div>\n </div>\n <div nz-flex nzAlign=\"center\" [nzGap]=\"2\">\n <button\n type=\"button\"\n class=\"nav-inline-btn\"\n [disabled]=\"!drive.canUploadCurrentFolder()\"\n (click)=\"$event.stopPropagation(); applyTemplateToTargetFolder(tpl, drive.currentFolderId())\"\n >\n <!-- nz-tooltip\n nzTooltipTitle=\"\u00C1p d\u1EE5ng ngay v\u00E0o th\u01B0 m\u1EE5c \u0111ang m\u1EDF\" -->\n <nz-icon nzType=\"thunderbolt\" style=\"color: var(--primary-color)\"></nz-icon>\n </button>\n @if (tpl.CanManage || drive.isCurrentUserAdmin()) {\n <button\n type=\"button\"\n class=\"nav-inline-btn\"\n (click)=\"$event.stopPropagation(); openTemplateDrawer('edit', tpl)\"\n >\n <!-- nz-tooltip\n nzTooltipTitle=\"S\u1EEDa / X\u00F3a m\u1EABu c\u00E2y th\u01B0 m\u1EE5c\" -->\n <nz-icon nzType=\"setting\"></nz-icon>\n </button>\n }\n </div>\n </div>\n }\n </div>\n }\n </div>\n }\n <!-- H\u1ED8P C\u1EA4U H\u00CCNH CH\u1EBE \u0110\u1ED8 TH\u01AF M\u1EE4C V\u1EACT L\u00DD vs \u1EA2O H\u00D3A -->\n @if (drive.isCurrentUserAdmin() && false) {\n <div class=\"storage-mode-box\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\">\n <span style=\"font-size: 12px; font-weight: 600\">Th\u01B0 m\u1EE5c v\u1EADt l\u00FD (Disk)</span>\n <nz-switch\n nzSize=\"small\"\n [ngModel]=\"drive.usePhysicalFolders()\"\n (ngModelChange)=\"onTogglePhysicalMode($event)\"\n ></nz-switch>\n\n <!-- \n nz-tooltip\n nzTooltipTitle=\"Khi b\u1EADt: T\u1EA1o c\u00E2y th\u01B0 m\u1EE5c & t\u00EAn file th\u1EADt 1-1 tr\u00EAn \u1ED5 c\u1EE9ng m\u00E1y ch\u1EE7\"\n -->\n </div>\n <div class=\"quota-sub\">\n Ch\u1EBF \u0111\u1ED9: <strong>{{ drive.usePhysicalFolders() ? \"V\u1EADt l\u00FD 1:1 (Physical)\" : \"\u1EA2o h\u00F3a (Virtual)\" }}</strong>\n </div>\n @if (drive.usePhysicalFolders()) {\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"margin-top: 8px\">\n <span style=\"font-size: 12px\">\n <!-- \n nz-tooltip\n nzTooltipTitle=\"Khi b\u1EADt: T\u1EA5t c\u1EA3 User c\u00F9ng d\u00F9ng chung 1 RootPath duy nh\u1EA5t \u0111\u1EC3 l\u01B0u tr\u1EEF t\u00E0i li\u1EC7u d\u1EF1 \u00E1n\"\n -->\n D\u00F9ng chung RootPath\n </span>\n <nz-switch\n nzSize=\"small\"\n [ngModel]=\"drive.useSharedPhysicalRoot()\"\n (ngModelChange)=\"onToggleSharedRootMode($event)\"\n ></nz-switch>\n </div>\n <div class=\"quota-sub\">\n Ph\u1EA1m vi \u0111\u0129a:\n <strong>{{ drive.useSharedPhysicalRoot() ? \"Chung to\u00E0n d\u1EF1 \u00E1n\" : \"T\u00E1ch theo t\u1EEBng User\" }}</strong>\n </div>\n <div nz-flex nzVertical [nzGap]=\"6\" style=\"margin-top: 8px\">\n <button nz-button nzType=\"dashed\" nzSize=\"small\" nzBlock (click)=\"onSyncPhysicalDisk()\">\n <!-- \n nz-tooltip\n nzTooltipTitle=\"Qu\u00E9t c\u00E1c file/th\u01B0 m\u1EE5c copy tr\u1EF1c ti\u1EBFp tr\u00EAn \u1ED5 \u0111\u0129a Server \u0111\u1EC3 n\u1EA1p v\u00E0o Drive\"\n -->\n <nz-icon nzType=\"sync\"></nz-icon> \u0110\u1ED3ng b\u1ED9 t\u1EEB \u1ED5 \u0111\u0129a\n </button>\n <button nz-button nzType=\"default\" nzSize=\"small\" nzBlock (click)=\"openRelocateDrawer(null)\">\n <!-- \n nz-tooltip\n nzTooltipTitle=\"\u0110\u1ED5i \u0111\u01B0\u1EDDng d\u1EABn RootPath ho\u1EB7c \u00E1nh x\u1EA1 sang \u1ED5 c\u1EE9ng l\u01B0u tr\u1EEF kh\u00E1c\"\n -->\n <nz-icon nzType=\"folder-open\"></nz-icon> \u0110\u1ED5i RootPath / \u1ED4 \u0111\u0129a\n </button>\n </div>\n }\n </div>\n }\n <!-- H\u1ED8P TI\u1EBEN TR\u00CCNH UPLOAD (H\u1ED6 TR\u1EE2 T\u1EA2I TI\u1EBEP KHI L\u1ED6I / T\u1EA0M D\u1EEANG / H\u1EE6Y) -->\n @if (drive.userUploadQueue().length > 0) {\n <div class=\"upload-queue-box\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"margin-bottom: 6px\">\n <strong>Ti\u1EBFn tr\u00ECnh t\u1EA3i l\u00EAn ({{ drive.userUploadQueue().length }})</strong>\n <a (click)=\"drive.clearCompletedUploads()\" style=\"font-size: 12px\">\u1EA8n \u0111\u00E3 xong</a>\n </div>\n <input #resumeFileInput type=\"file\" hidden (change)=\"onResumeFileSelected($event)\" />\n @for (task of drive.userUploadQueue(); track task.id) {\n <div class=\"upload-task-row\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" [nzGap]=\"4\">\n <div class=\"upload-task-name\" [title]=\"task.fileName\">{{ task.fileName }}</div>\n <div nz-flex nzAlign=\"center\" [nzGap]=\"2\">\n @if (task.status === \"uploading\" && (task.fileSize || 0) >= 20971520) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n (click)=\"drive.pauseUploadTask(task.id)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"T\u1EA1m d\u1EEBng t\u1EA3i l\u00EAn\"\n -->\n <nz-icon nzType=\"pause-circle\"></nz-icon>\n </button>\n }\n @if (task.status === \"error\" || task.status === \"paused\") {\n <button\n type=\"button\"\n nz-button\n nzType=\"link\"\n nzSize=\"small\"\n style=\"padding: 0 4px; font-size: 12px; font-weight: 600\"\n (click)=\"onResumeUploadClick(task, resumeFileInput)\"\n >\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"task.errorMessage || 'T\u1EA3i l\u00EAn ti\u1EBFp t\u1EEB ph\u1EA7n tr\u0103m \u0111\u00E3 l\u01B0u (Resume Upload)'\"\n -->\n <nz-icon nzType=\"reload\"></nz-icon> T\u1EA3i ti\u1EBFp\n </button>\n }\n @if (task.status !== \"uploading\") {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzDanger\n nzSize=\"small\"\n style=\"padding: 0 4px\"\n (click)=\"drive.removeUploadTask(task.id)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"X\u00F3a kh\u1ECFi danh s\u00E1ch & h\u1EE7y phi\u00EAn t\u1EA1m\"\n -->\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n }\n </div>\n </div>\n <nz-progress\n [nzPercent]=\"task.progress\"\n nzSize=\"small\"\n [nzStatus]=\"\n task.status === 'error'\n ? 'exception'\n : task.status === 'success'\n ? 'success'\n : task.status === 'paused'\n ? 'normal'\n : 'active'\n \"\n ></nz-progress>\n @if (task.status === \"error\") {\n <div style=\"font-size: 11px; color: #ef4444; margin-top: 2px\">\n {{ task.errorMessage || \"B\u1ECB ng\u1EAFt k\u1EBFt n\u1ED1i.\" }} \u2014 B\u1EA5m <strong>T\u1EA3i ti\u1EBFp</strong> \u0111\u1EC3 n\u1ED1i l\u1EA1i t\u1EEB\n {{ task.progress }}%.\n </div>\n }\n @if (task.status === \"paused\") {\n <div style=\"font-size: 11px; color: #f59e0b; margin-top: 2px\">\n \u0110\u00E3 t\u1EA1m d\u1EEBng \u1EDF {{ task.progress }}% \u2014 B\u1EA5m <strong>T\u1EA3i ti\u1EBFp</strong> \u0111\u1EC3 ti\u1EBFp t\u1EE5c.\n </div>\n }\n </div>\n }\n </div>\n }\n <div class=\"quota-box\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\">\n <div class=\"quota-title\" style=\"margin-bottom: 0\">\n <nz-icon nzType=\"cloud\"></nz-icon> Dung l\u01B0\u1EE3ng ({{ drive.quotaPercent() }}%)\n </div>\n @if (drive.isCurrentUserAdmin()) {\n <nz-tag nzColor=\"gold\" style=\"margin-right: 0; font-size: 11px\">Admin</nz-tag>\n }\n </div>\n <nz-progress [nzPercent]=\"drive.quotaPercent()\" nzSize=\"small\" [nzShowInfo]=\"false\"></nz-progress>\n <div class=\"quota-sub\">{{ drive.usedBytes() | formatBytes }} / {{ drive.quotaLimitBytes() | formatBytes }}</div>\n @if (drive.isCurrentUserAdmin()) {\n <button\n nz-button\n nzType=\"dashed\"\n nzSize=\"small\"\n nzBlock\n style=\"margin-top: 8px\"\n (click)=\"openPermissionMatrixDrawer(drive.currentFolderId())\"\n >\n <nz-icon nzType=\"table\"></nz-icon>\n Ma tr\u1EADn ph\u00E2n quy\u1EC1n\n </button>\n <button\n nz-button\n nzType=\"dashed\"\n nzSize=\"small\"\n nzBlock\n style=\"margin-top: 8px\"\n (click)=\"openQuotaAdminDrawer()\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"\u0110\u1EB7t Quota m\u1EB7c \u0111\u1ECBnh to\u00E0n h\u1EC7 th\u1ED1ng v\u00E0 thi\u1EBFt l\u1EADp Quota ri\u00EAng cho t\u1EEBng ng\u01B0\u1EDDi d\u00F9ng (Ch\u1EC9 Admin)\"\n -->\n <nz-icon nzType=\"setting\"></nz-icon> Qu\u1EA3n l\u00FD Quota (Admin)\n </button>\n }\n </div>\n </aside>\n <!-- KHU V\u1EF0C N\u1ED8I DUNG CH\u00CDNH (H\u1ED6 TR\u1EE2 K\u00C9O TH\u1EA2 FILE & FOLDER T\u1EEA FILE EXPLORER) -->\n <main\n class=\"drive-main\"\n [class.external-drag-active]=\"isExternalFileDragging()\"\n (dragenter)=\"onMainDragEnter($event)\"\n (dragover)=\"onMainDragOver($event)\"\n (dragleave)=\"onMainDragLeave($event)\"\n (drop)=\"onMainDrop($event)\"\n >\n @if (isExternalFileDragging()) {\n <div class=\"external-drop-banner\">\n <nz-icon nzType=\"cloud-upload\" class=\"drop-banner-icon\"></nz-icon>\n <div>\n <div class=\"drop-banner-title\">\n @if (dragOverFolderName(); as targetName) {\n Th\u1EA3 t\u1EADp tin / th\u01B0 m\u1EE5c t\u1EEB m\u00E1y t\u00EDnh \u0111\u1EC3 t\u1EA3i th\u1EB3ng v\u00E0o th\u01B0 m\u1EE5c: <strong>\"{{ targetName }}\"</strong>\n } @else {\n Th\u1EA3 t\u1EADp tin ho\u1EB7c th\u01B0 m\u1EE5c t\u1EEB File Explorer v\u00E0o \u0111\u00E2y \u0111\u1EC3 t\u1EA3i l\u00EAn th\u01B0 m\u1EE5c hi\u1EC7n t\u1EA1i\n }\n </div>\n <div class=\"drop-banner-sub\">\n H\u1ED7 tr\u1EE3 k\u00E9o th\u1EA3 nhi\u1EC1u file c\u00F9ng l\u00FAc ho\u1EB7c k\u00E9o nguy\u00EAn c\u1EA3 c\u00E2y th\u01B0 m\u1EE5c t\u1EEB m\u00E1y t\u00EDnh (T\u1EF1 \u0111\u1ED9ng Chunk Upload n\u1EBFu\n file &ge; 20MB)\n </div>\n </div>\n </div>\n }\n <!-- TOOLBAR + PAGINATION -->\n <header class=\"drive-toolbar\">\n <div>\n <nz-breadcrumb>\n <nz-breadcrumb-item\n (click)=\"navigateToFolder(null)\"\n (dragover)=\"onBreadcrumbDragOver($event, '__ROOT__')\"\n (dragleave)=\"onBreadcrumbDragLeave('__ROOT__')\"\n (drop)=\"onBreadcrumbDrop($event, null)\"\n [class.bc-drop-active]=\"dragOverBreadcrumbId() === '__ROOT__'\"\n class=\"cursor-pointer\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"K\u00E9o th\u1EA3 m\u1EE5c v\u00E0o \u0111\u00E2y \u0111\u1EC3 chuy\u1EC3n v\u1EC1 th\u01B0 m\u1EE5c g\u1ED1c\"\n -->\n <nz-icon nzType=\"home\"></nz-icon>\n {{ getRootTitle() }}\n </nz-breadcrumb-item>\n @for (bc of drive.breadcrumbs(); track bc.Id) {\n <nz-breadcrumb-item\n (click)=\"navigateToFolder(bc.Id)\"\n (dragover)=\"onBreadcrumbDragOver($event, bc.Id)\"\n (dragleave)=\"onBreadcrumbDragLeave(bc.Id)\"\n (drop)=\"onBreadcrumbDrop($event, bc.Id)\"\n [class.bc-drop-active]=\"dragOverBreadcrumbId() === bc.Id\"\n class=\"cursor-pointer\"\n >\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"'K\u00E9o th\u1EA3 v\u00E0o \u0111\u00E2y \u0111\u1EC3 chuy\u1EC3n t\u1EDBi: ' + bc.Name\"\n -->\n {{ bc.Name }}\n </nz-breadcrumb-item>\n }\n </nz-breadcrumb>\n <!-- @if (drive.isCurrentUserAdmin() && drive.usePhysicalFolders() && drive.currentPhysicalPath(); as physPath) {\n <div class=\"physical-path-bar\">\n <nz-icon nzType=\"folder-open\"></nz-icon>\n <span>\n \u0110\u01B0\u1EDDng d\u1EABn v\u1EADt l\u00FD: <code>{{ physPath }}</code>\n </span>\n <icon-copy [textToCopy]=\"physPath\" tooltip=\"Sao ch\u00E9p \u0111\u01B0\u1EDDng d\u1EABn v\u1EADt l\u00FD tr\u00EAn Server\"></icon-copy>\n </div>\n } -->\n </div>\n <div class=\"toolbar-actions\">\n <nz-input-group [nzSuffix]=\"suffixIconSearch\" style=\"width: 250px\">\n <input\n type=\"text\"\n nz-input\n placeholder=\"T\u00ECm ki\u1EBFm t\u00E0i li\u1EC7u, th\u01B0 m\u1EE5c...\"\n [ngModel]=\"drive.keyword()\"\n (ngModelChange)=\"drive.keyword.set($event)\"\n (keyup.enter)=\"onSearch()\"\n />\n </nz-input-group>\n <ng-template #suffixIconSearch>\n <nz-icon nzType=\"search\" class=\"cursor-pointer\" (click)=\"onSearch()\"></nz-icon>\n </ng-template>\n <label\n nz-checkbox\n [ngModel]=\"drive.includeSubfolders()\"\n (ngModelChange)=\"onToggleIncludeSubfolders($event)\"\n style=\"user-select: none; white-space: nowrap; font-size: 13px\"\n nz-tooltip\n nzTooltipTitle=\"T\u00ECm c\u1EA3 th\u01B0 m\u1EE5c con\"\n >\n </label>\n <!-- T\u00D9Y CH\u1ECCN CH\u1EBE \u0110\u1ED8 XEM: B\u1EA2NG PH\u1EB2NG vs C\u00C2Y TH\u01AF M\u1EE4C (TREE TABLE) -->\n <div class=\"view-mode-switch\" nz-flex nzAlign=\"center\" [nzGap]=\"4\">\n <button\n nz-button\n nzSize=\"small\"\n [nzType]=\"!drive.isTreeTableView() ? 'primary' : 'default'\"\n (click)=\"onToggleTreeTableView(false)\"\n nz-tooltip\n nzTooltipTitle=\"Flat Table\"\n >\n <nz-icon nzType=\"unordered-list\"></nz-icon>\n <!-- B\u1EA3ng ph\u1EB3ng -->\n </button>\n <button\n nz-button\n nzSize=\"small\"\n [nzType]=\"drive.isTreeTableView() ? 'primary' : 'default'\"\n (click)=\"onToggleTreeTableView(true)\"\n nz-tooltip\n nzTooltipTitle=\"Tree Table\"\n >\n <nz-icon nzType=\"apartment\"></nz-icon>\n <!-- Tree Table -->\n </button>\n @if (drive.isTreeTableView()) {\n <button\n nz-button\n nzSize=\"small\"\n nzType=\"dashed\"\n (click)=\"expandAllTreeFolders()\"\n nz-tooltip\n nzTooltipTitle=\"M\u1EDF r\u1ED9ng\"\n >\n <nz-icon nzType=\"node-expand\"></nz-icon>\n </button>\n <button\n nz-button\n nzSize=\"small\"\n nzType=\"dashed\"\n (click)=\"collapseAllTreeFolders()\"\n nz-tooltip\n nzTooltipTitle=\"Thu g\u1ECDn\"\n >\n <nz-icon nzType=\"node-collapse\"></nz-icon>\n </button>\n }\n </div>\n <button\n nz-button\n nzSize=\"small\"\n nzType=\"default\"\n nz-tooltip\n [nzTooltipTitle]=\"drive.sortDesc() ? 'A \u2192 Z' : 'Z \u2192 A'\"\n (click)=\"toggleSortDirection()\"\n >\n <nz-icon [nzType]=\"drive.sortDesc() ? 'sort-descending' : 'sort-ascending'\"></nz-icon>\n </button>\n <button\n nz-button\n nzType=\"default\"\n nzSize=\"small\"\n (click)=\"refreshExplorer()\"\n nz-tooltip\n nzTooltipTitle=\"L\u00E0m m\u1EDBi\"\n >\n <nz-icon nzType=\"reload\"></nz-icon>\n </button>\n <nz-pagination\n [nzSize]=\"'small'\"\n [nzPageIndex]=\"drive.pageIndex()\"\n [nzPageSize]=\"drive.pageSize()\"\n [nzTotal]=\"drive.totalCount()\"\n [nzShowSizeChanger]=\"true\"\n [nzPageSizeOptions]=\"AppGlobals.pageSizeOptions\"\n (nzPageIndexChange)=\"drive.loadNodes($event, drive.pageSize())\"\n (nzPageSizeChange)=\"drive.loadNodes(1, $event)\"\n >\n </nz-pagination>\n </div>\n </header>\n <!-- DANH S\u00C1CH T\u1EACP TIN / TH\u01AF M\u1EE4C (H\u1ED6 TR\u1EE2 C\u1EA2 FLAT TABLE V\u00C0 TREE TABLE) -->\n <nz-table\n #explorerTable\n [nzData]=\"displayedTableItems()\"\n [nzLoading]=\"drive.loading()\"\n [nzBordered]=\"true\"\n [nzFrontPagination]=\"false\"\n [nzShowPagination]=\"false\"\n nzSize=\"small\"\n >\n <thead>\n <tr>\n <th nzWidth=\"45px\" class=\"text-center\">#</th>\n <th class=\"sortable-th\" (click)=\"onSortColumn('Name')\">\n <div class=\"th-sort-wrap\">\n <span>T\u00EAn t\u00E0i li\u1EC7u / Th\u01B0 m\u1EE5c</span>\n <span class=\"sort-icon\" [class.active]=\"drive.sortBy() === 'Name'\">\n <nz-icon\n [nzType]=\"\n drive.sortBy() === 'Name' ? (drive.sortDesc() ? 'sort-descending' : 'sort-ascending') : 'swap'\n \"\n ></nz-icon>\n </span>\n </div>\n </th>\n <th nzWidth=\"150px\" class=\"sortable-th\" (click)=\"onSortColumn('OwnerName')\">\n <div class=\"th-sort-wrap\">\n <span>Ch\u1EE7 s\u1EDF h\u1EEFu</span>\n @if (drive.sortBy() === \"OwnerName\") {\n <nz-icon [nzType]=\"drive.sortDesc() ? 'caret-down' : 'caret-up'\" class=\"sort-icon active\"></nz-icon>\n }\n </div>\n </th>\n <th nzWidth=\"130px\" class=\"text-center sortable-th\" (click)=\"onSortColumn('AccessLevel')\">\n <div class=\"th-sort-wrap justify-center\">\n <span>Quy\u1EC1n truy c\u1EADp</span>\n @if (drive.sortBy() === \"AccessLevel\") {\n <nz-icon [nzType]=\"drive.sortDesc() ? 'caret-down' : 'caret-up'\" class=\"sort-icon active\"></nz-icon>\n }\n </div>\n </th>\n <th nzWidth=\"110px\" class=\"text-right sortable-th\" (click)=\"onSortColumn('SizeBytes')\">\n <div class=\"th-sort-wrap justify-end\">\n <span>K\u00EDch th\u01B0\u1EDBc</span>\n @if (drive.sortBy() === \"SizeBytes\") {\n <nz-icon [nzType]=\"drive.sortDesc() ? 'caret-down' : 'caret-up'\" class=\"sort-icon active\"></nz-icon>\n }\n </div>\n </th>\n <th nzWidth=\"145px\" class=\"text-center sortable-th\" (click)=\"onSortColumn('UpdatedDate')\">\n <div class=\"th-sort-wrap justify-center\">\n <span>C\u1EADp nh\u1EADt cu\u1ED1i</span>\n @if (drive.sortBy() === \"UpdatedDate\") {\n <nz-icon [nzType]=\"drive.sortDesc() ? 'caret-down' : 'caret-up'\" class=\"sort-icon active\"></nz-icon>\n }\n </div>\n </th>\n <th nzWidth=\"210px\" class=\"text-center\">Thao t\u00E1c</th>\n </tr>\n </thead>\n <tbody>\n @for (item of explorerTable.data; track item.Id; let i = $index) {\n <tr\n [attr.draggable]=\"drive.currentViewMode() !== 'TRASH' && item.EffectiveAccess >= DriveAccessLevel.Editor\"\n (dragstart)=\"onRowDragStart($event, item)\"\n (dragend)=\"onRowDragEnd()\"\n (dragover)=\"onRowDragOver($event, item)\"\n (dragleave)=\"onRowDragLeave($event, item)\"\n (drop)=\"onRowDrop($event, item)\"\n (dblclick)=\"onRowDoubleClick(item)\"\n (contextmenu)=\"onContextMenu($event, menu, item)\"\n class=\"drive-row\"\n [class.dragging-row]=\"draggedNode()?.Id === item.Id\"\n [class.drop-target-active]=\"dragOverFolderId() === item.Id\"\n >\n <td class=\"text-center\">{{ i + 1 + (drive.pageIndex() - 1) * drive.pageSize() }}</td>\n <td\n [nzIndentSize]=\"drive.isTreeTableView() ? (item.treeLevel || 0) * 22 : 0\"\n [nzShowExpand]=\"drive.isTreeTableView() && isFolderLike(item) && !item.IsBrokenShortcut\"\n [nzExpand]=\"!!item.treeExpanded\"\n (nzExpandChange)=\"toggleExpandTreeFolder(item, $event)\"\n >\n <div class=\"node-name-cell\">\n <span class=\"node-icon-wrap\">\n <nz-icon\n [nzType]=\"isFolderLike(item) ? 'folder-fill' : getFileIcon(item)\"\n [style.color]=\"isFolderLike(item) ? '#f59e0b' : 'var(--primary-color)'\"\n class=\"node-icon\"\n ></nz-icon>\n @if (item.NodeType === DriveNodeType.Shortcut) {\n <span class=\"shortcut-badge\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"'L\u1ED1i t\u1EAFt tr\u1ECF t\u1EDBi: ' + (item.ShortcutTargetName || item.Name)\"\n -->\n <nz-icon nzType=\"select\"></nz-icon>\n </span>\n }\n </span>\n <span class=\"node-title link-detail\" (click)=\"onRowSingleClick(item)\">{{ item.Name }}</span>\n @if (drive.keyword().trim() && item.ParentFolderName && item.ParentId !== drive.currentFolderId()) {\n <nz-tag\n nzColor=\"default\"\n style=\"margin-left: 6px; cursor: pointer\"\n (click)=\"$event.stopPropagation(); navigateToFolder(item.ParentId || null)\"\n >\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"'\u0110ang n\u1EB1m trong th\u01B0 m\u1EE5c: ' + item.ParentFolderName + ' (Nh\u1EA5n \u0111\u1EC3 m\u1EDF th\u01B0 m\u1EE5c)'\"\n -->\n <nz-icon nzType=\"folder\"></nz-icon> {{ item.ParentFolderName }}\n </nz-tag>\n }\n @if (item.NodeType === DriveNodeType.Shortcut) {\n @if (item.IsBrokenShortcut) {\n <nz-tag nzColor=\"error\" style=\"margin-left: 6px\">M\u1EE5c g\u1ED1c \u0111\u00E3 x\u00F3a</nz-tag>\n } @else {\n <nz-tag nzColor=\"purple\" style=\"margin-left: 6px\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"'\u0110\u00EDch: ' + (item.ShortcutTargetName || item.Name)\"\n -->\n <nz-icon nzType=\"link\"></nz-icon> L\u1ED1i t\u1EAFt\n </nz-tag>\n }\n }\n @if (item.IsStarred) {\n <nz-icon nzType=\"star\" nzTheme=\"fill\" style=\"color: #eab308; margin-left: 4px\"></nz-icon>\n }\n @if (item.IsShared) {\n <nz-tag nzColor=\"processing\" style=\"margin-left: 6px\">\u0110\u00E3 chia s\u1EBB</nz-tag>\n }\n @if (!item.InheritPermissions) {\n <nz-tag nzColor=\"warning\" nz-tooltip nzTooltipTitle=\"\u0110\u00E3 ng\u1EAFt k\u1EBF th\u1EEBa quy\u1EC1n t\u1EEB th\u01B0 m\u1EE5c cha\">\n \u0110\u1ED9c l\u1EADp\n </nz-tag>\n }\n </div>\n </td>\n <td>{{ item.OwnerName || item.OwnerId }}</td>\n <td class=\"text-center\">\n <nz-tag\n [nzColor]=\"\n item.EffectiveAccess >= DriveAccessLevel.Editor\n ? 'green'\n : item.EffectiveAccess >= DriveAccessLevel.Uploader\n ? 'cyan'\n : 'default'\n \"\n >\n {{\n item.EffectiveAccess >= DriveAccessLevel.Manager\n ? \"Qu\u1EA3n tr\u1ECB\"\n : item.EffectiveAccess >= DriveAccessLevel.Editor\n ? \"Ch\u1EC9nh s\u1EEDa\"\n : item.EffectiveAccess >= DriveAccessLevel.Uploader\n ? \"Xem & T\u1EA3i l\u00EAn\"\n : item.CanDownload && item.EffectiveAccess >= DriveAccessLevel.Downloader\n ? \"Xem & T\u1EA3i\"\n : \"Ch\u1EC9 xem\"\n }}\n </nz-tag>\n </td>\n <td class=\"text-right\">\n {{ isFolderLike(item) ? \"\u2014\" : (item.SizeBytes | formatBytes) }}\n </td>\n <td class=\"text-center\">{{ item.UpdatedDate | date: \"dd/MM/yyyy HH:mm\" }}</td>\n <td class=\"text-center\">\n <div class=\"action-btn-group\">\n @if (drive.currentViewMode() !== \"TRASH\") {\n @if (item.CanShare || item.EffectiveAccess >= DriveAccessLevel.Manager) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); openShareDrawer(item)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"Chia s\u1EBB & Ph\u00E2n quy\u1EC1n (Drawer)\"\n -->\n <nz-icon nzType=\"share-alt\"></nz-icon>\n </button>\n }\n @if (item.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); openMoveDrawer(item)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"Di chuy\u1EC3n sang th\u01B0 m\u1EE5c kh\u00E1c (Move Drawer ho\u1EB7c K\u00E9o th\u1EA3)\"\n -->\n <nz-icon nzType=\"drag\"></nz-icon>\n </button>\n }\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); openCopyDrawer(item)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"Sao ch\u00E9p t\u1EDBi... (Copy To Drawer)\"\n -->\n <nz-icon nzType=\"copy\"></nz-icon>\n </button>\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); openShortcutDrawer(item)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"T\u1EA1o l\u1ED1i t\u1EAFt (Shortcut Drawer)\"\n -->\n <nz-icon nzType=\"link\"></nz-icon>\n </button>\n @if (\n item.NodeType === DriveNodeType.Folder &&\n drive.usePhysicalFolders() &&\n item.EffectiveAccess >= DriveAccessLevel.Manager\n ) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); openRelocateDrawer(item)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"\u0110\u1ED5i \u0111\u01B0\u1EDDng d\u1EABn v\u1EADt l\u00FD / \u00C1nh x\u1EA1 \u1ED5 c\u1EE9ng l\u01B0u tr\u1EEF (Drawer)\"\n -->\n <nz-icon nzType=\"hdd\"></nz-icon>\n </button>\n }\n @if (\n isFileLike(item) &&\n !item.IsBrokenShortcut &&\n item.CanDownload &&\n item.EffectiveAccess >= DriveAccessLevel.Downloader\n ) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); onDownloadItem(item)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"T\u1EA3i xu\u1ED1ng\"\n -->\n <nz-icon nzType=\"download\"></nz-icon>\n </button>\n }\n @if (\n isFileLike(item) && !item.IsBrokenShortcut && item.EffectiveAccess >= DriveAccessLevel.Editor\n ) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); openVersionDrawer(item)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"L\u1ECBch s\u1EED phi\u00EAn b\u1EA3n (Drawer)\"\n -->\n <nz-icon nzType=\"history\"></nz-icon>\n </button>\n }\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); openFolderDrawer('rename', item)\"\n >\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"\n item.EffectiveAccess >= DriveAccessLevel.Editor\n ? '\u0110\u1ED5i t\u00EAn & Chi ti\u1EBFt (Drawer)'\n : 'Xem chi ti\u1EBFt & Nh\u1EADt k\u00FD (Drawer)'\n \"\n -->\n <nz-icon\n [nzType]=\"item.EffectiveAccess >= DriveAccessLevel.Editor ? 'edit' : 'info-circle'\"\n ></nz-icon>\n </button>\n @if (item.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-warn\"\n (click)=\"$event.stopPropagation(); onSoftDelete(item)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"Chuy\u1EC3n v\u00E0o th\u00F9ng r\u00E1c\"\n -->\n <nz-icon nzType=\"delete\"></nz-icon>\n </button>\n }\n } @else {\n @if (item.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); onRestore(item)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"Kh\u00F4i ph\u1EE5c\"\n -->\n <nz-icon nzType=\"rollback\"></nz-icon>\n </button>\n }\n @if (item.EffectiveAccess >= DriveAccessLevel.Manager) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-warn\"\n (click)=\"$event.stopPropagation(); onPermanentDelete(item)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"X\u00F3a v\u0129nh vi\u1EC5n\"\n -->\n <nz-icon nzType=\"delete\"></nz-icon>\n </button>\n }\n }\n </div>\n </td>\n </tr>\n }\n </tbody>\n </nz-table>\n <!-- CONTEXT MENU CHU\u1ED8T PH\u1EA2I -->\n <nz-dropdown-menu #menu=\"nzDropdownMenu\">\n @if (selectedContextItem(); as ctx) {\n <ul nz-menu>\n @if (ctx.NodeType === DriveNodeType.File) {\n <li nz-menu-item (click)=\"previewFile(ctx)\">\n <nz-icon nzType=\"eye\"></nz-icon> Xem tr\u1EF1c ti\u1EBFp (Drawer Preview)\n </li>\n @if (ctx.CanDownload && ctx.EffectiveAccess >= DriveAccessLevel.Downloader) {\n <li nz-menu-item (click)=\"onDownloadItem(ctx)\"><nz-icon nzType=\"download\"></nz-icon> T\u1EA3i xu\u1ED1ng</li>\n }\n @if (ctx.EffectiveAccess >= DriveAccessLevel.Editor) {\n <li nz-menu-item (click)=\"openVersionDrawer(ctx)\">\n <nz-icon nzType=\"history\"></nz-icon> L\u1ECBch s\u1EED phi\u00EAn b\u1EA3n...\n </li>\n }\n <li nz-menu-divider></li>\n }\n @if (ctx.CanShare || ctx.EffectiveAccess >= DriveAccessLevel.Manager) {\n <li nz-menu-item (click)=\"openShareDrawer(ctx)\">\n <nz-icon nzType=\"usergroup-add\"></nz-icon> Ph\u00E2n quy\u1EC1n & Chia s\u1EBB...\n </li>\n }\n @if (ctx.EffectiveAccess >= DriveAccessLevel.Editor) {\n <li nz-menu-item (click)=\"openMoveDrawer(ctx)\">\n <nz-icon nzType=\"drag\"></nz-icon> Di chuy\u1EC3n sang th\u01B0 m\u1EE5c kh\u00E1c...\n </li>\n }\n <li nz-menu-item (click)=\"openCopyDrawer(ctx)\">\n <nz-icon nzType=\"copy\"></nz-icon> Sao ch\u00E9p t\u1EDBi (Copy to)...\n </li>\n <li nz-menu-item (click)=\"openShortcutDrawer(ctx)\">\n <nz-icon nzType=\"link\"></nz-icon> T\u1EA1o l\u1ED1i t\u1EAFt (Shortcut)...\n </li>\n @if (\n ctx.NodeType === DriveNodeType.Folder &&\n drive.usePhysicalFolders() &&\n ctx.EffectiveAccess >= DriveAccessLevel.Manager\n ) {\n <li nz-menu-item (click)=\"openRelocateDrawer(ctx)\">\n <nz-icon nzType=\"hdd\"></nz-icon> \u0110\u1ED5i \u0111\u01B0\u1EDDng d\u1EABn v\u1EADt l\u00FD / Chuy\u1EC3n \u1ED5 \u0111\u0129a...\n </li>\n }\n <li nz-menu-item (click)=\"openFolderDrawer('rename', ctx)\">\n <nz-icon [nzType]=\"ctx.EffectiveAccess >= DriveAccessLevel.Editor ? 'edit' : 'info-circle'\"></nz-icon>\n {{\n ctx.EffectiveAccess >= DriveAccessLevel.Editor ? \"\u0110\u1ED5i t\u00EAn & Chi ti\u1EBFt...\" : \"Xem chi ti\u1EBFt & Nh\u1EADt k\u00FD...\"\n }}\n </li>\n <li nz-menu-item (click)=\"drive.toggleStar(ctx.Id)\">\n <nz-icon nzType=\"star\"></nz-icon> {{ ctx.IsStarred ? \"B\u1ECF d\u1EA5u sao\" : \"Th\u00EAm d\u1EA5u sao\" }}\n </li>\n @if (ctx.EffectiveAccess >= DriveAccessLevel.Editor) {\n <li nz-menu-divider></li>\n <li nz-menu-item nzDanger (click)=\"onSoftDelete(ctx)\">\n <nz-icon nzType=\"delete\"></nz-icon> Chuy\u1EC3n v\u00E0o th\u00F9ng r\u00E1c\n </li>\n }\n @if (ctx.NodeType === DriveNodeType.Folder) {\n <li nz-menu-item (click)=\"openTemplateDrawer('create', undefined, ctx)\">\n <nz-icon nzType=\"apartment\"></nz-icon> L\u01B0u c\u1EA5u tr\u00FAc th\u01B0 m\u1EE5c l\u00E0m M\u1EABu...\n </li>\n }\n </ul>\n }\n </nz-dropdown-menu>\n </main>\n </div>\n <!-- ========================================================================= -->\n <!-- DRAWER 1: CHIA S\u1EBA & PH\u00C2N QUY\u1EC0N (ACL / RBAC / SHARE LINKS) -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"shareDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"840\"\n [nzClosable]=\"false\"\n [nzTitle]=\"shareDrawerTitleTpl\"\n [nzFooter]=\"shareDrawerFooterTpl\"\n (nzOnClose)=\"shareDrawerVisible = false\"\n >\n <ng-template #shareDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n @if (activeActionNode(); as node) {\n <nz-icon\n [nzType]=\"node.NodeType === DriveNodeType.Folder ? 'folder-fill' : getFileIcon(node)\"\n [style.color]=\"node.NodeType === DriveNodeType.Folder ? '#f59e0b' : 'var(--primary-color)'\"\n style=\"font-size: 18px\"\n ></nz-icon>\n <strong>Chia s\u1EBB & Ph\u00E2n quy\u1EC1n: {{ node.Name }}</strong>\n <nz-tag nzColor=\"blue\">{{ node.NodeType === DriveNodeType.Folder ? \"Th\u01B0 m\u1EE5c\" : \"T\u1EADp tin\" }}</nz-tag>\n }\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"shareDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n @if (activeActionNode(); as node) {\n <lib-drive-share-modal [nodeId]=\"node.Id\"></lib-drive-share-modal>\n }\n </ng-container>\n <ng-template #shareDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"shareDrawerVisible = false\">\u0110\u00F3ng</button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 2: L\u1ECACH S\u1EEC PHI\u00CAN B\u1EA2N T\u1EACP TIN (FILE VERSIONS) -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"versionDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"760\"\n [nzClosable]=\"false\"\n [nzTitle]=\"versionDrawerTitleTpl\"\n [nzFooter]=\"versionDrawerFooterTpl\"\n (nzOnClose)=\"versionDrawerVisible = false\"\n >\n <ng-template #versionDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"history\" style=\"font-size: 18px; color: var(--primary-color)\"></nz-icon>\n <strong>L\u1ECBch s\u1EED phi\u00EAn b\u1EA3n: {{ activeActionNode()?.Name }}</strong>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"versionDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n @if (activeActionNode(); as node) {\n <lib-drive-version-modal\n [nodeId]=\"node.Id\"\n [nodeName]=\"node.Name\"\n [canEdit]=\"node.EffectiveAccess >= DriveAccessLevel.Editor\"\n [canDownload]=\"node.CanDownload && node.EffectiveAccess >= DriveAccessLevel.Downloader\"\n (closed)=\"versionDrawerVisible = false\"\n ></lib-drive-version-modal>\n }\n </ng-container>\n <ng-template #versionDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"versionDrawerVisible = false\">\u0110\u00F3ng</button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 3: T\u1EA0O TH\u01AF M\u1EE4C M\u1EDAI / \u0110\u1ED4I T\u00CAN & CHI TI\u1EBET THU\u1ED8C T\u00CDNH + ACTIVITY LOG -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"folderDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"480\"\n [nzClosable]=\"false\"\n [nzTitle]=\"folderDrawerTitleTpl\"\n [nzFooter]=\"folderDrawerFooterTpl\"\n (nzOnClose)=\"folderDrawerVisible = false\"\n >\n <ng-template #folderDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon\n [nzType]=\"folderDrawerMode === 'create' ? 'folder-add' : canRenameTargetNode() ? 'edit' : 'info-circle'\"\n style=\"font-size: 18px; color: var(--primary-color)\"\n ></nz-icon>\n <strong>\n {{\n folderDrawerMode === \"create\"\n ? \"T\u1EA1o th\u01B0 m\u1EE5c m\u1EDBi\"\n : canRenameTargetNode()\n ? \"\u0110\u1ED5i t\u00EAn & Chi ti\u1EBFt m\u1EE5c\"\n : \"Chi ti\u1EBFt & Nh\u1EADt k\u00FD ho\u1EA1t \u0111\u1ED9ng\"\n }}\n </strong>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"folderDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n <div nz-flex nzVertical [nzGap]=\"16\">\n <div>\n <label class=\"drawer-field-label\">\n {{ folderDrawerMode === \"create\" ? \"T\u00EAn th\u01B0 m\u1EE5c m\u1EDBi\" : \"T\u00EAn hi\u1EC3n th\u1ECB\" }}\n </label>\n <input\n nz-input\n [(ngModel)]=\"folderDrawerInputName\"\n [disabled]=\"folderDrawerMode === 'rename' && !canRenameTargetNode()\"\n [appAutoFocus]=\"folderDrawerVisible && (folderDrawerMode === 'create' || canRenameTargetNode())\"\n placeholder=\"Nh\u1EADp t\u00EAn th\u01B0 m\u1EE5c / t\u00E0i li\u1EC7u...\"\n (keyup.enter)=\"submitFolderDrawer()\"\n />\n </div>\n @if (folderDrawerMode === \"create\" && drive.usePhysicalFolders() && drive.currentPhysicalPath(); as phys) {\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">Ch\u1EBF \u0111\u1ED9 l\u01B0u tr\u1EEF:</span>\n <nz-tag nzColor=\"green\">Th\u01B0 m\u1EE5c v\u1EADt l\u00FD (Disk)</nz-tag>\n </div>\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">Th\u01B0 m\u1EE5c cha tr\u00EAn \u0111\u0129a:</span>\n <code class=\"break-word\">{{ phys }}</code>\n </div>\n </div>\n }\n @if (folderDrawerMode === \"rename\" && folderDrawerTargetNode; as target) {\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-header\">\n <nz-icon\n [nzType]=\"target.NodeType === DriveNodeType.Folder ? 'folder-fill' : getFileIcon(target)\"\n [style.color]=\"target.NodeType === DriveNodeType.Folder ? '#f59e0b' : 'var(--primary-color)'\"\n style=\"font-size: 22px\"\n ></nz-icon>\n <div>\n <div style=\"font-weight: 600\">{{ target.Name }}</div>\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">\n {{\n target.NodeType === DriveNodeType.Folder\n ? \"Th\u01B0 m\u1EE5c\"\n : \"T\u1EADp tin (\" + (target.Extension || target.MimeType || \"File\") + \")\"\n }}\n </div>\n </div>\n </div>\n <nz-divider style=\"margin: 10px 0\"></nz-divider>\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">Ch\u1EE7 s\u1EDF h\u1EEFu:</span>\n <strong>{{ target.OwnerName || target.OwnerId }}</strong>\n </div>\n @if (target.NodeType === DriveNodeType.File) {\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">K\u00EDch th\u01B0\u1EDBc:</span>\n <span>{{ target.SizeBytes | formatBytes }}</span>\n </div>\n }\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">Quy\u1EC1n c\u1EE7a b\u1EA1n:</span>\n <nz-tag\n [nzColor]=\"\n target.EffectiveAccess >= DriveAccessLevel.Editor\n ? 'green'\n : target.EffectiveAccess >= DriveAccessLevel.Uploader\n ? 'cyan'\n : 'default'\n \"\n >\n {{\n target.EffectiveAccess >= DriveAccessLevel.Manager\n ? \"Qu\u1EA3n tr\u1ECB (Manager)\"\n : target.EffectiveAccess >= DriveAccessLevel.Editor\n ? \"Ch\u1EC9nh s\u1EEDa (Editor)\"\n : target.EffectiveAccess >= DriveAccessLevel.Uploader\n ? \"Xem & T\u1EA3i l\u00EAn (Uploader)\"\n : target.CanDownload && target.EffectiveAccess >= DriveAccessLevel.Downloader\n ? \"Xem & T\u1EA3i xu\u1ED1ng\"\n : \"Ch\u1EC9 xem (Viewer)\"\n }}\n </nz-tag>\n </div>\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">K\u1EBF th\u1EEBa quy\u1EC1n:</span>\n <nz-tag [nzColor]=\"target.InheritPermissions ? 'blue' : 'warning'\">\n {{ target.InheritPermissions ? \"\u0110ang k\u1EBF th\u1EEBa\" : \"\u0110\u1ED9c l\u1EADp\" }}\n </nz-tag>\n </div>\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">C\u1EADp nh\u1EADt cu\u1ED1i:</span>\n <span>{{ target.UpdatedDate | date: \"dd/MM/yyyy HH:mm\" }}</span>\n </div>\n @if (target.PhysicalRelativePath) {\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">\u0110\u01B0\u1EDDng d\u1EABn \u0111\u0129a:</span>\n <code class=\"break-word\">{{ target.PhysicalRelativePath }}</code>\n </div>\n }\n @if (drive.isCurrentUserAdmin() && drive.usePhysicalFolders() && drive.currentPhysicalPath(); as physPath) {\n <div class=\"physical-path-bar\">\n <span style=\"word-break: break-all\">\n \u0110\u01B0\u1EDDng d\u1EABn v\u1EADt l\u00FD: <code style=\"padding-top: 0px\">{{ physPath }}</code>\n </span>\n <icon-copy [textToCopy]=\"physPath\" tooltip=\"Sao ch\u00E9p \u0111\u01B0\u1EDDng d\u1EABn v\u1EADt l\u00FD tr\u00EAn Server\"></icon-copy>\n </div>\n }\n </div>\n <div>\n <label class=\"drawer-field-label\">Thao t\u00E1c nhanh</label>\n <div nz-flex nzWrap=\"wrap\" [nzGap]=\"8\">\n @if (target.CanShare || target.EffectiveAccess >= DriveAccessLevel.Manager) {\n <button nz-button nzSize=\"small\" (click)=\"folderDrawerVisible = false; openShareDrawer(target)\">\n <nz-icon nzType=\"share-alt\"></nz-icon> Chia s\u1EBB & Ph\u00E2n quy\u1EC1n\n </button>\n }\n @if (target.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button nz-button nzSize=\"small\" (click)=\"folderDrawerVisible = false; openMoveDrawer(target)\">\n <nz-icon nzType=\"drag\"></nz-icon> Di chuy\u1EC3n\n </button>\n }\n <button nz-button nzSize=\"small\" (click)=\"folderDrawerVisible = false; openCopyDrawer(target)\">\n <nz-icon nzType=\"copy\"></nz-icon> Sao ch\u00E9p t\u1EDBi\n </button>\n <button nz-button nzSize=\"small\" (click)=\"folderDrawerVisible = false; openShortcutDrawer(target)\">\n <nz-icon nzType=\"link\"></nz-icon> T\u1EA1o l\u1ED1i t\u1EAFt\n </button>\n @if (\n target.NodeType === DriveNodeType.Folder &&\n drive.usePhysicalFolders() &&\n target.EffectiveAccess >= DriveAccessLevel.Manager\n ) {\n <button nz-button nzSize=\"small\" (click)=\"folderDrawerVisible = false; openRelocateDrawer(target)\">\n <nz-icon nzType=\"hdd\"></nz-icon> \u0110\u1ED5i \u1ED5 \u0111\u0129a v\u1EADt l\u00FD\n </button>\n }\n @if (target.NodeType === DriveNodeType.File) {\n @if (target.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button nz-button nzSize=\"small\" (click)=\"folderDrawerVisible = false; openVersionDrawer(target)\">\n <nz-icon nzType=\"history\"></nz-icon> L\u1ECBch s\u1EED phi\u00EAn b\u1EA3n\n </button>\n }\n @if (target.CanDownload && target.EffectiveAccess >= DriveAccessLevel.Downloader) {\n <button nz-button nzSize=\"small\" (click)=\"onDownloadItem(target)\">\n <nz-icon nzType=\"download\"></nz-icon> T\u1EA3i xu\u1ED1ng\n </button>\n }\n }\n <button nz-button nzSize=\"small\" (click)=\"drive.toggleStar(target.Id)\">\n <nz-icon nzType=\"star\" [nzTheme]=\"target.IsStarred ? 'fill' : 'outline'\"></nz-icon>\n {{ target.IsStarred ? \"B\u1ECF sao\" : \"G\u1EAFn sao\" }}\n </button>\n </div>\n </div>\n <!-- NH\u1EACT K\u00DD HO\u1EA0T \u0110\u1ED8NG (ACTIVITY LOG) -->\n <div>\n <label class=\"drawer-field-label\">\n <nz-icon nzType=\"OrderedList\"></nz-icon> Nh\u1EADt k\u00FD ho\u1EA1t \u0111\u1ED9ng g\u1EA7n \u0111\u00E2y ({{ nodeActivities().length }})\n </label>\n <div class=\"drawer-meta-card\" style=\"max-height: 240px; overflow-y: auto\">\n @if (nodeActivities().length === 0) {\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">Ch\u01B0a c\u00F3 nh\u1EADt k\u00FD ho\u1EA1t \u0111\u1ED9ng.</div>\n } @else {\n @for (act of nodeActivities(); track act.Id) {\n <div style=\"padding: 6px 0; border-bottom: 1px dashed var(--app-border, #e2e8f0); font-size: 12px\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\">\n <nz-tag nzColor=\"blue\">{{ formatActivityAction(act.ActionType) }}</nz-tag>\n <span style=\"color: var(--app-text-muted, #64748b)\">{{\n act.CreatedDate | date: \"dd/MM/yyyy HH:mm:ss\"\n }}</span>\n </div>\n <div style=\"margin-top: 4px\">\n Th\u1EF1c hi\u1EC7n b\u1EDFi: <strong>{{ act.ActorUserName || act.ActorUserId || \"H\u1EC7 th\u1ED1ng\" }}</strong>\n </div>\n @if (act.DetailJson) {\n <div style=\"margin-top: 2px; color: var(--app-text-muted, #64748b); word-break: break-all\">\n <code>{{ formatActivityDetail(act) }}</code>\n </div>\n }\n </div>\n }\n }\n </div>\n </div>\n }\n @if (folderDrawerMode === \"create\") {\n <div class=\"drawer-meta-card\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\">\n <label class=\"drawer-field-label\" style=\"margin-bottom: 0\">\n <nz-icon nzType=\"apartment\" style=\"color: #d97706; margin-right: 4px\"></nz-icon>\n T\u1EA1o nhanh t\u1EEB M\u1EABu c\u00E2y th\u01B0 m\u1EE5c (T\u00F9y ch\u1ECDn)\n </label>\n <a style=\"font-size: 12px\" (click)=\"folderDrawerVisible = false; openTemplateDrawer('create')\">\n + \u0110\u1ECBnh ngh\u0129a m\u1EABu m\u1EDBi\n </a>\n </div>\n <nz-select\n nzShowSearch\n nzAllowClear\n nzPlaceHolder=\"-- Kh\u00F4ng d\u00F9ng m\u1EABu (Ch\u1EC9 t\u1EA1o 1 th\u01B0 m\u1EE5c \u0111\u01A1n) --\"\n [(ngModel)]=\"folderDrawerSelectedTemplateId\"\n (ngModelChange)=\"onFolderDrawerTemplateSelect($event)\"\n style=\"width: 100%\"\n >\n <nz-option [nzValue]=\"null\" nzLabel=\"\uD83D\uDCC1 Ch\u1EC9 t\u1EA1o 1 th\u01B0 m\u1EE5c \u0111\u01A1n\"></nz-option>\n @for (tpl of drive.folderTemplates(); track tpl.Id) {\n <nz-option\n [nzValue]=\"tpl.Id\"\n [nzLabel]=\"'\uD83D\uDDC2 ' + tpl.Name + ' [' + tpl.Code + '] (' + tpl.TotalFolderCount + ' th\u01B0 m\u1EE5c)'\"\n ></nz-option>\n }\n </nz-select>\n\n @if (folderDrawerSelectedTemplateId) {\n <label nz-checkbox [(ngModel)]=\"folderDrawerUseWrapperFolder\" style=\"font-size: 12px; margin-top: 4px\">\n \u0110\u1EB7t to\u00E0n b\u1ED9 c\u00E2y th\u01B0 m\u1EE5c m\u1EABu b\u00EAn trong th\u01B0 m\u1EE5c g\u1ED1c\n <strong>\"{{ folderDrawerInputName || \"...\" }}\"</strong>\n </label>\n <div class=\"quota-sub\" style=\"margin-top: 2px\">\n N\u1EBFu b\u1ECF t\u00EDch, c\u00E1c nh\u00E1nh th\u01B0 m\u1EE5c con c\u1EE7a m\u1EABu s\u1EBD \u0111\u01B0\u1EE3c t\u1EA1o tr\u1EF1c ti\u1EBFp ngay trong th\u01B0 m\u1EE5c \u0111ang m\u1EDF.\n </div>\n }\n </div>\n }\n </div>\n </ng-container>\n <ng-template #folderDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"folderDrawerVisible = false\">\u0110\u00F3ng</button>\n @if (folderDrawerMode === \"create\" || canRenameTargetNode()) {\n <button nz-button nzType=\"primary\" (click)=\"submitFolderDrawer()\">\n <nz-icon nzType=\"check\"></nz-icon>\n {{ folderDrawerMode === \"create\" ? \"T\u1EA1o th\u01B0 m\u1EE5c\" : \"L\u01B0u t\u00EAn m\u1EDBi\" }}\n </button>\n }\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 4: XEM TR\u1EF0C TUY\u1EBEN T\u00C0I LI\u1EC6U (PREVIEW DRAWER) -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"previewDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"'75vw'\"\n [nzClosable]=\"false\"\n [nzTitle]=\"previewDrawerTitleTpl\"\n [nzFooter]=\"previewDrawerFooterTpl\"\n (nzOnClose)=\"previewDrawerVisible = false\"\n >\n <ng-template #previewDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"eye\" style=\"font-size: 18px; color: var(--primary-color)\"></nz-icon>\n <strong>{{ previewFileName }}</strong>\n </div>\n <div nz-flex nzAlign=\"center\" [nzGap]=\"8\">\n @if (activeActionNode(); as node) {\n @if (node.CanDownload && node.EffectiveAccess >= DriveAccessLevel.Downloader) {\n <button nz-button nzSize=\"small\" nzType=\"primary\" (click)=\"onDownloadItem(node)\">\n <nz-icon nzType=\"download\"></nz-icon> T\u1EA3i xu\u1ED1ng\n </button>\n }\n @if (node.CanShare || node.EffectiveAccess >= DriveAccessLevel.Manager) {\n <button nz-button nzSize=\"small\" (click)=\"previewDrawerVisible = false; openShareDrawer(node)\">\n <nz-icon nzType=\"share-alt\"></nz-icon> Chia s\u1EBB\n </button>\n }\n @if (node.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button nz-button nzSize=\"small\" (click)=\"previewDrawerVisible = false; openVersionDrawer(node)\">\n <nz-icon nzType=\"history\"></nz-icon> Phi\u00EAn b\u1EA3n\n </button>\n }\n }\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"previewDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n <extend-view-file-content\n [previewType]=\"previewType\"\n [previewContent]=\"previewContent\"\n ></extend-view-file-content>\n </ng-container>\n <ng-template #previewDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button type=\"button\" nz-button (click)=\"previewDrawerVisible = false\">\u0110\u00F3ng</button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 5: T\u1EA0O L\u1ED0I T\u1EAET (CREATE SHORTCUT DRAWER CHO FILE & FOLDER) -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"shortcutDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"460\"\n [nzClosable]=\"false\"\n [nzTitle]=\"shortcutDrawerTitleTpl\"\n [nzFooter]=\"shortcutDrawerFooterTpl\"\n (nzOnClose)=\"shortcutDrawerVisible = false\"\n >\n <ng-template #shortcutDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"link\" style=\"font-size: 18px; color: #7c3aed\"></nz-icon>\n <strong>T\u1EA1o l\u1ED1i t\u1EAFt (Shortcut)</strong>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"shortcutDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n @if (shortcutSourceNode(); as src) {\n <div nz-flex nzVertical [nzGap]=\"16\">\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-header\">\n <nz-icon\n [nzType]=\"isFolderLike(src) ? 'folder-fill' : getFileIcon(src)\"\n [style.color]=\"isFolderLike(src) ? '#f59e0b' : 'var(--primary-color)'\"\n style=\"font-size: 22px\"\n ></nz-icon>\n <div>\n <div style=\"font-weight: 600\">{{ src.ShortcutTargetName || src.Name }}</div>\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">\n M\u1EE5c g\u1ED1c: {{ isFolderLike(src) ? \"Th\u01B0 m\u1EE5c\" : \"T\u1EADp tin\" }} \u2022 Ch\u1EE7 s\u1EDF h\u1EEFu:\n {{ src.OwnerName || src.OwnerId }}\n </div>\n </div>\n </div>\n </div>\n <div>\n <label class=\"drawer-field-label\">T\u00EAn l\u1ED1i t\u1EAFt</label>\n <input\n nz-input\n [(ngModel)]=\"shortcutInputName\"\n [appAutoFocus]=\"shortcutDrawerVisible\"\n placeholder=\"Nh\u1EADp t\u00EAn hi\u1EC3n th\u1ECB c\u1EE7a l\u1ED1i t\u1EAFt...\"\n (keyup.enter)=\"submitShortcutDrawer()\"\n />\n </div>\n <div>\n <label class=\"drawer-field-label\">Kh\u00F4ng gian l\u01B0u l\u1ED1i t\u1EAFt</label>\n <nz-select\n [(ngModel)]=\"shortcutSpaceKey\"\n (ngModelChange)=\"onShortcutSpaceKeyChange($event)\"\n style=\"width: 100%\"\n >\n <nz-option nzValue=\"MY_DRIVE\" nzLabel=\"Drive c\u00E1 nh\u00E2n (My Drive)\"></nz-option>\n <nz-option nzValue=\"ORG_DRIVE\" nzLabel=\"Kho T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB (Org Drive)\"></nz-option>\n @for (sp of drive.customSpaces(); track sp.Id) {\n <nz-option [nzValue]=\"'CUSTOM:' + sp.Id\" [nzLabel]=\"'\uD83D\uDCC2 ' + sp.Name\"></nz-option>\n }\n </nz-select>\n </div>\n <div>\n <label class=\"drawer-field-label\">Th\u01B0 m\u1EE5c \u0111\u00EDch ch\u1EE9a l\u1ED1i t\u1EAFt</label>\n <nz-select\n nzShowSearch\n nzAllowClear\n nzPlaceHolder=\"-- Th\u01B0 m\u1EE5c g\u1ED1c (Root) --\"\n [(ngModel)]=\"shortcutDestFolderId\"\n style=\"width: 100%\"\n >\n <nz-option [nzValue]=\"null\" nzLabel=\"\uD83D\uDCC1 Th\u01B0 m\u1EE5c g\u1ED1c (Root)\"></nz-option>\n @for (f of availableFolders(); track f.Id) {\n <nz-option [nzValue]=\"f.Id\" [nzLabel]=\"'\uD83D\uDCC2 ' + f.Name\"></nz-option>\n }\n </nz-select>\n <div class=\"quota-sub\" style=\"margin-top: 6px\">\n L\u1ED1i t\u1EAFt tr\u1ECF tr\u1EF1c ti\u1EBFp t\u1EDBi m\u1EE5c g\u1ED1c m\u00E0 kh\u00F4ng t\u1ED1n th\u00EAm dung l\u01B0\u1EE3ng l\u01B0u tr\u1EEF (0 B).\n </div>\n </div>\n </div>\n }\n </ng-container>\n <ng-template #shortcutDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"shortcutDrawerVisible = false\">H\u1EE7y</button>\n <button nz-button nzType=\"primary\" (click)=\"submitShortcutDrawer()\">\n <nz-icon nzType=\"link\"></nz-icon> T\u1EA1o l\u1ED1i t\u1EAFt\n </button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 6: DI CHUY\u1EC2N FILE / FOLDER SANG TH\u01AF M\u1EE4C HO\u1EB6C KH\u00D4NG GIAN KH\u00C1C -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"moveDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"460\"\n [nzClosable]=\"false\"\n [nzTitle]=\"moveDrawerTitleTpl\"\n [nzFooter]=\"moveDrawerFooterTpl\"\n (nzOnClose)=\"moveDrawerVisible = false\"\n >\n <ng-template #moveDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"drag\" style=\"font-size: 18px; color: var(--primary-color)\"></nz-icon>\n <strong>Di chuy\u1EC3n sang th\u01B0 m\u1EE5c / kh\u00F4ng gian kh\u00E1c</strong>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"moveDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n @if (moveSourceNode(); as src) {\n <div nz-flex nzVertical [nzGap]=\"16\">\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-header\">\n <nz-icon\n [nzType]=\"isFolderLike(src) ? 'folder-fill' : getFileIcon(src)\"\n [style.color]=\"isFolderLike(src) ? '#f59e0b' : 'var(--primary-color)'\"\n style=\"font-size: 22px\"\n ></nz-icon>\n <div>\n <div style=\"font-weight: 600\">{{ src.Name }}</div>\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">\n Lo\u1EA1i:\n {{\n src.NodeType === DriveNodeType.Folder\n ? \"Th\u01B0 m\u1EE5c\"\n : src.NodeType === DriveNodeType.Shortcut\n ? \"L\u1ED1i t\u1EAFt\"\n : \"T\u1EADp tin\"\n }}\n \u2022 Kh\u00F4ng gian hi\u1EC7n t\u1EA1i: {{ src.IsOrgNode ? \"T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB\" : \"Drive c\u00E1 nh\u00E2n\" }}\n </div>\n </div>\n </div>\n </div>\n <div>\n <label class=\"drawer-field-label\">Kh\u00F4ng gian \u0111\u00EDch</label>\n <nz-select\n [(ngModel)]=\"moveTargetSpaceKey\"\n (ngModelChange)=\"onMoveSpaceKeyChange($event)\"\n style=\"width: 100%\"\n >\n <nz-option nzValue=\"MY_DRIVE\" nzLabel=\"Drive c\u00E1 nh\u00E2n (My Drive)\"></nz-option>\n <nz-option nzValue=\"ORG_DRIVE\" nzLabel=\"Kho T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB (Org Drive)\"></nz-option>\n @for (sp of drive.customSpaces(); track sp.Id) {\n <nz-option [nzValue]=\"'CUSTOM:' + sp.Id\" [nzLabel]=\"'\uD83D\uDCC2 ' + sp.Name\"></nz-option>\n }\n </nz-select>\n </div>\n <div>\n <label class=\"drawer-field-label\">Ch\u1ECDn th\u01B0 m\u1EE5c \u0111\u00EDch</label>\n <nz-select\n nzShowSearch\n nzAllowClear\n nzPlaceHolder=\"-- Th\u01B0 m\u1EE5c g\u1ED1c (Root) --\"\n [(ngModel)]=\"moveTargetFolderId\"\n style=\"width: 100%\"\n >\n <nz-option [nzValue]=\"null\" nzLabel=\"\uD83D\uDCC1 Th\u01B0 m\u1EE5c g\u1ED1c (Root)\"></nz-option>\n @for (f of moveTargetFolders(); track f.Id) {\n <nz-option [nzValue]=\"f.Id\" [nzLabel]=\"'\uD83D\uDCC2 ' + f.Name\"></nz-option>\n }\n </nz-select>\n <div class=\"quota-sub\" style=\"margin-top: 6px\">\n M\u1EB9o: B\u1EA1n c\u00F3 th\u1EC3 k\u00E9o th\u1EA3 tr\u1EF1c ti\u1EBFp d\u00F2ng t\u00E0i li\u1EC7u/th\u01B0 m\u1EE5c v\u00E0o m\u1EE5c <strong>\"Drive c\u00E1 nh\u00E2n\"</strong> ho\u1EB7c\n <strong>\"T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB\"</strong> \u1EDF thanh menu b\u00EAn tr\u00E1i \u0111\u1EC3 chuy\u1EC3n nhanh qua l\u1EA1i gi\u1EEFa 2 kh\u00F4ng gian.\n </div>\n </div>\n </div>\n }\n </ng-container>\n <ng-template #moveDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"moveDrawerVisible = false\">H\u1EE7y</button>\n <button nz-button nzType=\"primary\" (click)=\"submitMoveDrawer()\">\n <nz-icon nzType=\"check\"></nz-icon> Di chuy\u1EC3n t\u1EDBi \u0111\u00E2y\n </button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 9: SAO CH\u00C9P T\u1EDAI (COPY TO DRAWER CHO FILE / FOLDER / SHORTCUT) -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"copyDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"460\"\n [nzClosable]=\"false\"\n [nzTitle]=\"copyDrawerTitleTpl\"\n [nzFooter]=\"copyDrawerFooterTpl\"\n (nzOnClose)=\"copyDrawerVisible = false\"\n >\n <ng-template #copyDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"copy\" style=\"font-size: 18px; color: var(--primary-color)\"></nz-icon>\n <strong>Sao ch\u00E9p t\u1EDBi (Copy To)</strong>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"copyDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n @if (copySourceNode(); as src) {\n <div nz-flex nzVertical [nzGap]=\"16\">\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-header\">\n <nz-icon\n [nzType]=\"isFolderLike(src) ? 'folder-fill' : getFileIcon(src)\"\n [style.color]=\"isFolderLike(src) ? '#f59e0b' : 'var(--primary-color)'\"\n style=\"font-size: 22px\"\n ></nz-icon>\n <div>\n <div style=\"font-weight: 600\">{{ src.Name }}</div>\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">\n M\u1EE5c ngu\u1ED3n:\n {{\n src.NodeType === DriveNodeType.Folder\n ? \"Th\u01B0 m\u1EE5c (Sao ch\u00E9p \u0111\u1EC7 quy to\u00E0n b\u1ED9 nh\u00E1nh con)\"\n : src.NodeType === DriveNodeType.Shortcut\n ? \"L\u1ED1i t\u1EAFt\"\n : \"T\u1EADp tin\"\n }}\n </div>\n </div>\n </div>\n </div>\n <div>\n <label class=\"drawer-field-label\">T\u00EAn b\u1EA3n sao (\u0110\u1EC3 tr\u1ED1ng \u0111\u1EC3 h\u1EC7 th\u1ED1ng t\u1EF1 \u0111\u1EB7t t\u00EAn)</label>\n <input\n nz-input\n [(ngModel)]=\"copyCustomName\"\n [appAutoFocus]=\"copyDrawerVisible\"\n placeholder=\"Nh\u1EADp t\u00EAn m\u1EDBi cho b\u1EA3n sao...\"\n (keyup.enter)=\"submitCopyDrawer()\"\n />\n </div>\n <div>\n <label class=\"drawer-field-label\">Kh\u00F4ng gian \u0111\u00EDch</label>\n <nz-select\n [(ngModel)]=\"copyTargetSpaceKey\"\n (ngModelChange)=\"onCopySpaceKeyChange($event)\"\n style=\"width: 100%\"\n >\n <nz-option nzValue=\"MY_DRIVE\" nzLabel=\"Drive c\u00E1 nh\u00E2n (My Drive)\"></nz-option>\n <nz-option nzValue=\"ORG_DRIVE\" nzLabel=\"Kho T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB (Org Drive)\"></nz-option>\n @for (sp of drive.customSpaces(); track sp.Id) {\n <nz-option [nzValue]=\"'CUSTOM:' + sp.Id\" [nzLabel]=\"'\uD83D\uDCC2 ' + sp.Name\"></nz-option>\n }\n </nz-select>\n </div>\n <div>\n <label class=\"drawer-field-label\">Ch\u1ECDn th\u01B0 m\u1EE5c \u0111\u00EDch ch\u1EE9a b\u1EA3n sao</label>\n <nz-select\n nzShowSearch\n nzAllowClear\n nzPlaceHolder=\"-- Th\u01B0 m\u1EE5c g\u1ED1c (Root) --\"\n [(ngModel)]=\"copyTargetFolderId\"\n style=\"width: 100%\"\n >\n <nz-option [nzValue]=\"null\" nzLabel=\"\uD83D\uDCC1 Th\u01B0 m\u1EE5c g\u1ED1c (Root)\"></nz-option>\n @for (f of copyTargetFolders(); track f.Id) {\n <nz-option [nzValue]=\"f.Id\" [nzLabel]=\"'\uD83D\uDCC2 ' + f.Name\"></nz-option>\n }\n </nz-select>\n <div class=\"quota-sub\" style=\"margin-top: 6px\">\n B\u1EA3n sao ho\u00E0n to\u00E0n \u0111\u1ED9c l\u1EADp v\u1EDBi m\u1EE5c g\u1ED1c v\u00E0 \u0111\u01B0\u1EE3c t\u00EDnh v\u00E0o h\u1EA1n ng\u1EA1ch c\u1EE7a ng\u01B0\u1EDDi t\u1EA1o b\u1EA3n sao.\n </div>\n </div>\n </div>\n }\n </ng-container>\n <ng-template #copyDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"copyDrawerVisible = false\">H\u1EE7y</button>\n <button nz-button nzType=\"primary\" (click)=\"submitCopyDrawer()\">\n <nz-icon nzType=\"copy\"></nz-icon> Sao ch\u00E9p t\u1EDBi \u0111\u00E2y\n </button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 7: \u0110\u1ED4I \u0110\u01AF\u1EDCNG D\u1EAAN V\u1EACT L\u00DD / \u00C1NH X\u1EA0 \u1ED4 C\u1EE8NG M\u1EDAI KHI K\u1EBET TH\u00DAC D\u1EF0 \u00C1N -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"relocateDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"500\"\n [nzClosable]=\"false\"\n [nzTitle]=\"relocateDrawerTitleTpl\"\n [nzFooter]=\"relocateDrawerFooterTpl\"\n (nzOnClose)=\"relocateDrawerVisible = false\"\n >\n <ng-template #relocateDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"hdd\" style=\"font-size: 18px; color: var(--primary-color)\"></nz-icon>\n <strong>\n {{ relocateTargetFolder() ? \"\u00C1nh x\u1EA1 / Chuy\u1EC3n \u1ED5 \u0111\u0129a th\u01B0 m\u1EE5c\" : \"C\u1EA5u h\u00ECnh RootPath l\u01B0u tr\u1EEF chung\" }}\n </strong>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"relocateDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n <div nz-flex nzVertical [nzGap]=\"16\">\n @if (relocateTargetFolder(); as folder) {\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-header\">\n <nz-icon nzType=\"folder-fill\" style=\"font-size: 22px; color: #f59e0b\"></nz-icon>\n <div>\n <div style=\"font-weight: 600\">{{ folder.Name }}</div>\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">\n \u0110\u01B0\u1EDDng d\u1EABn hi\u1EC7n t\u1EA1i:\n <code>{{ folder.PhysicalRelativePath || drive.currentPhysicalPath() || \"M\u1EB7c \u0111\u1ECBnh\" }}</code>\n </div>\n </div>\n </div>\n </div>\n <div>\n <label class=\"drawer-field-label\">\u0110\u01B0\u1EDDng d\u1EABn v\u1EADt l\u00FD m\u1EDBi c\u1EE7a th\u01B0 m\u1EE5c (H\u1ED7 tr\u1EE3 \u1ED5 c\u1EE9ng kh\u00E1c / NAS)</label>\n <input\n nz-input\n [(ngModel)]=\"relocateNewPath\"\n [appAutoFocus]=\"relocateDrawerVisible\"\n placeholder=\"VD: E:Archive_2026DuAn_A ho\u1EB7c \\\\NAS01StorageDuAn_A\"\n (keyup.enter)=\"submitRelocateDrawer()\"\n />\n <div class=\"quota-sub\" style=\"margin-top: 6px\">\n Khi d\u1EF1 \u00E1n k\u1EBFt th\u00FAc v\u00E0 h\u1EA1 t\u1EA7ng chuy\u1EC3n th\u01B0 m\u1EE5c sang \u1ED5 c\u1EE9ng kh\u00E1c, \u0111\u1EB7t \u0111\u01B0\u1EDDng d\u1EABn m\u1EDBi t\u1EA1i \u0111\u00E2y \u0111\u1EC3 to\u00E0n b\u1ED9 th\u01B0\n m\u1EE5c con v\u00E0 file b\u00EAn trong t\u1EF1 \u0111\u1ED9ng map sang \u1ED5 c\u1EE9ng m\u1EDBi.\n </div>\n </div>\n <div class=\"drawer-meta-card\">\n <label nz-checkbox [(ngModel)]=\"relocateMoveFilesOnDisk\">\n <strong>T\u1EF1 \u0111\u1ED9ng di chuy\u1EC3n d\u1EEF li\u1EC7u v\u1EADt l\u00FD t\u1EEB \u0111\u01B0\u1EDDng d\u1EABn c\u0169 sang \u1ED5 \u0111\u0129a m\u1EDBi</strong>\n </label>\n <div class=\"quota-sub\" style=\"margin-left: 24px\">\n N\u1EBFu b\u1ED9 ph\u1EADn H\u1EA1 t\u1EA7ng \u0111\u00E3 copy/move s\u1EB5n th\u01B0 m\u1EE5c sang \u1ED5 c\u1EE9ng m\u1EDBi r\u1ED3i, h\u00E3y <strong>b\u1ECF ch\u1ECDn</strong> m\u1EE5c n\u00E0y \u0111\u1EC3\n h\u1EC7 th\u1ED1ng ch\u1EC9 c\u1EADp nh\u1EADt l\u1EA1i \u00E1nh x\u1EA1 \u0111\u01B0\u1EDDng d\u1EABn trong Database.\n </div>\n <label nz-checkbox [(ngModel)]=\"relocateSyncNewFiles\" style=\"margin-top: 6px\">\n <strong>\u0110\u1ED3ng b\u1ED9 b\u1ED5 sung c\u00E1c file/folder c\u00F3 s\u1EB5n t\u1EA1i \u0111\u01B0\u1EDDng d\u1EABn m\u1EDBi v\u00E0o Drive</strong>\n </label>\n </div>\n } @else {\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">RootPath hi\u1EC7n t\u1EA1i:</span>\n <code class=\"break-word\">{{ drive.storageRootPath() || drive.currentPhysicalPath() }}</code>\n </div>\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">Ch\u1EBF \u0111\u1ED9 th\u01B0 m\u1EE5c g\u1ED1c:</span>\n <nz-tag [nzColor]=\"drive.useSharedPhysicalRoot() ? 'green' : 'blue'\">\n {{\n drive.useSharedPhysicalRoot() ? \"D\u00F9ng chung 1 RootPath cho t\u1EA5t c\u1EA3 User\" : \"T\u00E1ch theo t\u1EEBng Username\"\n }}\n </nz-tag>\n </div>\n </div>\n <div>\n <label class=\"drawer-field-label\">\u0110\u01B0\u1EDDng d\u1EABn RootPath chung m\u1EDBi tr\u00EAn Server</label>\n <input\n nz-input\n [(ngModel)]=\"relocateNewPath\"\n [appAutoFocus]=\"relocateDrawerVisible\"\n placeholder=\"VD: D:ProjectStorageDriveRoot ho\u1EB7c E:ArchiveDrive\"\n (keyup.enter)=\"submitRelocateDrawer()\"\n />\n <div class=\"quota-sub\" style=\"margin-top: 6px\">\n T\u1EA5t c\u1EA3 c\u00E1c th\u01B0 m\u1EE5c ch\u01B0a ghim \u1ED5 \u0111\u0129a ri\u00EAng s\u1EBD t\u1EF1 \u0111\u1ED9ng \u0111\u1ECDc/ghi theo RootPath m\u1EDBi n\u00E0y.\n </div>\n </div>\n }\n </div>\n </ng-container>\n <ng-template #relocateDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"relocateDrawerVisible = false\">H\u1EE7y</button>\n <button nz-button nzType=\"primary\" (click)=\"submitRelocateDrawer()\">\n <nz-icon nzType=\"save\"></nz-icon> L\u01B0u \u00E1nh x\u1EA1 v\u1EADt l\u00FD\n </button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 8: QU\u1EA2N L\u00DD H\u1EA0N NG\u1EA0CH DUNG L\u01AF\u1EE2NG (DEFAULT QUOTA & PER-USER QUOTA) -->\n <!-- CH\u1EC8 D\u00C0NH RI\u00CANG CHO QU\u1EA2N TR\u1ECA VI\u00CAN (ADMIN) -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"quotaAdminDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"980\"\n [nzClosable]=\"false\"\n [nzTitle]=\"quotaAdminDrawerTitleTpl\"\n [nzFooter]=\"quotaAdminDrawerFooterTpl\"\n (nzOnClose)=\"quotaAdminDrawerVisible = false\"\n >\n <ng-template #quotaAdminDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"pie-chart\" style=\"font-size: 18px; color: var(--primary-color)\"></nz-icon>\n <strong>Qu\u1EA3n l\u00FD H\u1EA1n ng\u1EA1ch Dung l\u01B0\u1EE3ng (Quota Management)</strong>\n <nz-tag nzColor=\"gold\">Ch\u1EC9 Admin</nz-tag>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"quotaAdminDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n <div nz-flex nzVertical [nzGap]=\"16\">\n <!-- PH\u1EA6N 1: C\u1EA4U H\u00CCNH QUOTA M\u1EB6C \u0110\u1ECANH TO\u00C0N H\u1EC6 TH\u1ED0NG -->\n <div class=\"drawer-meta-card\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" nzWrap=\"wrap\" [nzGap]=\"8\">\n <div>\n <div style=\"font-size: 14px; font-weight: 600\">\n <nz-icon nzType=\"cloud-server\" style=\"color: var(--primary-color); margin-right: 6px\"></nz-icon>\n 1. C\u1EA5u h\u00ECnh Quota m\u1EB7c \u0111\u1ECBnh (Default Quota)\n </div>\n <div class=\"quota-sub\">\n \u00C1p d\u1EE5ng t\u1EF1 \u0111\u1ED9ng cho ng\u01B0\u1EDDi d\u00F9ng m\u1EDBi ho\u1EB7c ng\u01B0\u1EDDi d\u00F9ng ch\u01B0a \u0111\u01B0\u1EE3c g\u00E1n h\u1EA1n ng\u1EA1ch ri\u00EAng.\n </div>\n </div>\n @if (quotaOverview(); as ov) {\n <div nz-flex nzAlign=\"center\" [nzGap]=\"8\">\n <nz-tag nzColor=\"blue\">\n M\u1EB7c \u0111\u1ECBnh hi\u1EC7n t\u1EA1i: <strong>{{ ov.DefaultUserQuotaBytes | formatBytes }}</strong>\n </nz-tag>\n <nz-tag nzColor=\"purple\">\n T\u1ED5ng \u0111\u00E3 d\u00F9ng to\u00E0n h\u1EC7 th\u1ED1ng: <strong>{{ ov.TotalSystemUsedBytes | formatBytes }}</strong>\n </nz-tag>\n </div>\n }\n </div>\n <nz-divider style=\"margin: 8px 0\"></nz-divider>\n <div nz-flex nzAlign=\"center\" nzWrap=\"wrap\" [nzGap]=\"8\">\n <span style=\"font-size: 13px; font-weight: 500\">M\u1EE9c Quota m\u1EB7c \u0111\u1ECBnh:</span>\n <input\n nz-input\n type=\"number\"\n min=\"1\"\n [(ngModel)]=\"defaultQuotaInputValue\"\n style=\"width: 120px\"\n placeholder=\"Nh\u1EADp dung l\u01B0\u1EE3ng\"\n />\n <nz-select [(ngModel)]=\"defaultQuotaInputUnit\" style=\"width: 90px\">\n <nz-option nzValue=\"MB\" nzLabel=\"MB\"></nz-option>\n <nz-option nzValue=\"GB\" nzLabel=\"GB\"></nz-option>\n <nz-option nzValue=\"TB\" nzLabel=\"TB\"></nz-option>\n </nz-select>\n <!-- C\u00E1c n\u00FAt ch\u1ECDn nhanh (Quick Presets) -->\n <div nz-flex nzAlign=\"center\" [nzGap]=\"4\">\n <button nz-button nzSize=\"small\" (click)=\"setDefaultQuotaPreset(1, 'GB')\">1 GB</button>\n <button nz-button nzSize=\"small\" (click)=\"setDefaultQuotaPreset(5, 'GB')\">5 GB</button>\n <button nz-button nzSize=\"small\" (click)=\"setDefaultQuotaPreset(10, 'GB')\">10 GB</button>\n <button nz-button nzSize=\"small\" (click)=\"setDefaultQuotaPreset(20, 'GB')\">20 GB</button>\n <button nz-button nzSize=\"small\" (click)=\"setDefaultQuotaPreset(50, 'GB')\">50 GB</button>\n <button nz-button nzSize=\"small\" (click)=\"setDefaultQuotaPreset(100, 'GB')\">100 GB</button>\n </div>\n <button nz-button nzType=\"primary\" (click)=\"onSaveDefaultQuota()\">\n <nz-icon nzType=\"save\"></nz-icon> L\u01B0u Quota m\u1EB7c \u0111\u1ECBnh\n </button>\n </div>\n <div style=\"margin-top: 4px\">\n <label nz-checkbox [(ngModel)]=\"applyDefaultToExistingUsers\">\n \u0110\u1ED3ng th\u1EDDi c\u1EADp nh\u1EADt m\u1EE9c Quota m\u1EB7c \u0111\u1ECBnh m\u1EDBi n\u00E0y cho t\u1EA5t c\u1EA3 c\u00E1c ng\u01B0\u1EDDi d\u00F9ng hi\u1EC7n c\u00F3\n </label>\n </div>\n </div>\n <!-- PH\u1EA6N 2: \u0110\u1EB6T QUOTA RI\u00CANG CHO T\u1EEANG NG\u01AF\u1EDCI D\u00D9NG -->\n <div>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" nzWrap=\"wrap\" [nzGap]=\"8\" style=\"margin-bottom: 10px\">\n <div>\n <div style=\"font-size: 14px; font-weight: 600\">\n <nz-icon nzType=\"team\" style=\"color: var(--primary-color); margin-right: 6px\"></nz-icon>\n 2. Thi\u1EBFt l\u1EADp Quota cho t\u1EEBng ng\u01B0\u1EDDi d\u00F9ng ({{ quotaUsers().length }})\n </div>\n <div class=\"quota-sub\">\n T\u00F9y ch\u1EC9nh h\u1EA1n ng\u1EA1ch dung l\u01B0\u1EE3ng ri\u00EAng cho t\u1EEBng c\u00E1 nh\u00E2n ho\u1EB7c \u0111\u1EB7t l\u1EA1i v\u1EC1 m\u1EE9c m\u1EB7c \u0111\u1ECBnh.\n </div>\n </div>\n <div nz-flex nzAlign=\"center\" [nzGap]=\"8\">\n <nz-input-group [nzSuffix]=\"quotaUserSearchSuffix\" style=\"width: 260px\">\n <input\n nz-input\n type=\"text\"\n placeholder=\"T\u00ECm theo t\u00E0i kho\u1EA3n, h\u1ECD t\u00EAn, email...\"\n [(ngModel)]=\"quotaUserSearchKeyword\"\n (keyup.enter)=\"reloadQuotaOverview()\"\n />\n </nz-input-group>\n <ng-template #quotaUserSearchSuffix>\n <nz-icon nzType=\"search\" class=\"cursor-pointer\" (click)=\"reloadQuotaOverview()\"></nz-icon>\n </ng-template>\n <button nz-button nzType=\"default\" (click)=\"reloadQuotaOverview()\" nz-tooltip nzTooltipTitle=\"T\u1EA3i l\u1EA1i\">\n <nz-icon nzType=\"reload\"></nz-icon>\n </button>\n </div>\n </div>\n <nz-table\n #userQuotaTable\n [nzData]=\"quotaUsers()\"\n [nzLoading]=\"quotaLoading()\"\n nzSize=\"small\"\n [nzBordered]=\"true\"\n [nzPageSize]=\"10\"\n [nzShowPagination]=\"true\"\n >\n <thead>\n <tr>\n <th nzWidth=\"45px\" class=\"text-center\">#</th>\n <th>Ng\u01B0\u1EDDi d\u00F9ng</th>\n <th nzWidth=\"220px\">\u0110\u00E3 d\u00F9ng / H\u1EA1n ng\u1EA1ch</th>\n <th nzWidth=\"105px\" class=\"text-center\">Lo\u1EA1i Quota</th>\n <th nzWidth=\"210px\">\u0110\u1EB7t h\u1EA1n ng\u1EA1ch m\u1EDBi</th>\n <th nzWidth=\"145px\" class=\"text-center\">Thao t\u00E1c</th>\n </tr>\n </thead>\n <tbody>\n @for (u of userQuotaTable.data; track u.UserId; let idx = $index) {\n <tr>\n <td class=\"text-center\">{{ idx + 1 }}</td>\n <td>\n <div style=\"font-weight: 600\">{{ u.FullName || u.UserName }}</div>\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">\n <code>{{ u.UserName }}</code>\n @if (u.OrgName) {\n <span> \u2022 {{ u.OrgName }}</span>\n }\n @if (u.Email) {\n <span> \u2022 {{ u.Email }}</span>\n }\n </div>\n </td>\n <td>\n <div nz-flex nzJustify=\"space-between\" style=\"font-size: 12px; margin-bottom: 2px\">\n <span\n >{{ u.UsedBytes | formatBytes }} / <strong>{{ u.QuotaLimitBytes | formatBytes }}</strong></span\n >\n <span>{{ getUserQuotaPercent(u) }}%</span>\n </div>\n <nz-progress\n [nzPercent]=\"getUserQuotaPercent(u)\"\n nzSize=\"small\"\n [nzShowInfo]=\"false\"\n [nzStatus]=\"getUserQuotaPercent(u) >= 95 ? 'exception' : 'normal'\"\n ></nz-progress>\n </td>\n <td class=\"text-center\">\n @if (u.IsCustomQuota) {\n <nz-tag nzColor=\"orange\">T\u00F9y ch\u1EC9nh</nz-tag>\n } @else {\n <nz-tag nzColor=\"default\">M\u1EB7c \u0111\u1ECBnh</nz-tag>\n }\n </td>\n <td>\n <div nz-flex nzAlign=\"center\" [nzGap]=\"6\">\n <input nz-input type=\"number\" min=\"1\" [(ngModel)]=\"u.editQuotaValue\" style=\"width: 90px\" />\n <nz-select [(ngModel)]=\"u.editQuotaUnit\" style=\"width: 80px\">\n <nz-option nzValue=\"MB\" nzLabel=\"MB\"></nz-option>\n <nz-option nzValue=\"GB\" nzLabel=\"GB\"></nz-option>\n <nz-option nzValue=\"TB\" nzLabel=\"TB\"></nz-option>\n </nz-select>\n </div>\n </td>\n <td class=\"text-center\">\n <div nz-flex nzJustify=\"center\" [nzGap]=\"6\">\n <button nz-button nzType=\"primary\" nzSize=\"small\" (click)=\"onSaveUserQuota(u)\">\n <!-- \n nz-tooltip\n nzTooltipTitle=\"L\u01B0u h\u1EA1n ng\u1EA1ch ri\u00EAng cho ng\u01B0\u1EDDi d\u00F9ng n\u00E0y\"\n -->\n <nz-icon nzType=\"check\"></nz-icon> L\u01B0u\n </button>\n <button\n nz-button\n nzType=\"default\"\n nzSize=\"small\"\n [disabled]=\"!u.IsCustomQuota\"\n nz-tooltip\n nzTooltipTitle=\"\u0110\u1EB7t l\u1EA1i v\u1EC1 m\u1EE9c Quota m\u1EB7c \u0111\u1ECBnh c\u1EE7a h\u1EC7 th\u1ED1ng\"\n (click)=\"onResetUserQuota(u)\"\n >\n <nz-icon nzType=\"undo\"></nz-icon>\n </button>\n </div>\n </td>\n </tr>\n }\n </tbody>\n </nz-table>\n </div>\n </div>\n </ng-container>\n <ng-template #quotaAdminDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"quotaAdminDrawerVisible = false\">\u0110\u00F3ng</button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 10: TH\u00CAM / C\u1EA4U H\u00CCNH M\u1EE4C CUSTOM B\u00CAN D\u01AF\u1EDAI \"T\u00C0I LI\u1EC6U \u0110\u01A0N V\u1ECA\" -->\n <!-- (V\u00ED d\u1EE5: \"T\u00E0i li\u1EC7u d\u1EF1 \u00E1n\" - Admin c\u00F3 th\u1EC3 b\u1EADt hi\u1EC3n th\u1ECB cho t\u1EA5t c\u1EA3 User) -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"customSpaceDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"480\"\n [nzClosable]=\"false\"\n [nzTitle]=\"customSpaceDrawerTitleTpl\"\n [nzFooter]=\"customSpaceDrawerFooterTpl\"\n (nzOnClose)=\"customSpaceDrawerVisible = false\"\n >\n <ng-template #customSpaceDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button\n nz-button\n nzSize=\"small\"\n nzType=\"default\"\n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n (click)=\"toggleDrawerPlacement()\"\n >\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon\n [nzType]=\"customSpaceIcon || 'project'\"\n style=\"font-size: 18px; color: var(--primary-color)\"\n ></nz-icon>\n <strong>{{\n customSpaceDrawerMode === \"create\" ? \"Th\u00EAm m\u1EE5c t\u00F9y ch\u1EC9nh d\u01B0\u1EDBi T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB\" : \"C\u1EA5u h\u00ECnh m\u1EE5c t\u00F9y ch\u1EC9nh\"\n }}</strong>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"customSpaceDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n <div nz-flex nzVertical [nzGap]=\"16\">\n <div>\n <label class=\"drawer-field-label\">T\u00EAn m\u1EE5c hi\u1EC3n th\u1ECB tr\u00EAn thanh menu tr\u00E1i</label>\n <input\n nz-input\n [(ngModel)]=\"customSpaceName\"\n [appAutoFocus]=\"customSpaceDrawerVisible\"\n placeholder=\"V\u00ED d\u1EE5: T\u00E0i li\u1EC7u d\u1EF1 \u00E1n, H\u1ED3 s\u01A1 th\u1EA7u, Quy tr\u00ECnh ISO...\"\n (keyup.enter)=\"submitCustomSpaceDrawer()\"\n />\n <div class=\"quota-sub\" style=\"margin-top: 4px\">\n M\u1EE5c n\u00E0y s\u1EBD xu\u1EA5t hi\u1EC7n ngay b\u00EAn d\u01B0\u1EDBi m\u1EE5c <strong>\"T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB\"</strong> tr\u00EAn thanh \u0111i\u1EC1u h\u01B0\u1EDBng b\u00EAn tr\u00E1i.\n </div>\n </div>\n <div>\n <label class=\"drawer-field-label\">Bi\u1EC3u t\u01B0\u1EE3ng (Icon)</label>\n <nz-select [(ngModel)]=\"customSpaceIcon\" style=\"width: 100%\">\n <nz-option nzValue=\"project\" nzLabel=\"\uD83D\uDCCA D\u1EF1 \u00E1n (project)\"></nz-option>\n <nz-option nzValue=\"folder-open\" nzLabel=\"\uD83D\uDCC2 Th\u01B0 m\u1EE5c m\u1EDF (folder-open)\"></nz-option>\n <nz-option nzValue=\"book\" nzLabel=\"\uD83D\uDCD8 T\u00E0i li\u1EC7u / C\u1EA9m nang (book)\"></nz-option>\n <nz-option nzValue=\"safety-certificate\" nzLabel=\"\uD83D\uDEE1 Quy chu\u1EA9n / ISO (safety-certificate)\"></nz-option>\n <nz-option nzValue=\"solution\" nzLabel=\"\uD83D\uDCCB H\u1ED3 s\u01A1 nghi\u1EC7p v\u1EE5 (solution)\"></nz-option>\n <nz-option nzValue=\"database\" nzLabel=\"\uD83D\uDDC4 Kho d\u1EEF li\u1EC7u (database)\"></nz-option>\n </nz-select>\n </div>\n <div class=\"drawer-meta-card\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\">\n <div>\n <div style=\"font-weight: 600; font-size: 13px\">Hi\u1EC3n th\u1ECB cho t\u1EA5t c\u1EA3 ng\u01B0\u1EDDi d\u00F9ng (All Users)</div>\n <div class=\"quota-sub\">\n @if (drive.isCurrentUserAdmin()) {\n Khi b\u1EADt: T\u1EA5t c\u1EA3 t\u00E0i kho\u1EA3n trong h\u1EC7 th\u1ED1ng \u0111\u1EC1u nh\u00ECn th\u1EA5y v\u00E0 truy c\u1EADp \u0111\u01B0\u1EE3c m\u1EE5c n\u00E0y b\u00EAn d\u01B0\u1EDBi \"T\u00E0i li\u1EC7u \u0110\u01A1n\n v\u1ECB\".\n } @else {\n Ch\u1EC9 Qu\u1EA3n tr\u1ECB vi\u00EAn (Admin) m\u1EDBi c\u00F3 quy\u1EC1n b\u1EADt hi\u1EC3n th\u1ECB chung cho to\u00E0n b\u1ED9 ng\u01B0\u1EDDi d\u00F9ng.\n }\n </div>\n </div>\n <nz-switch\n [(ngModel)]=\"customSpaceVisibleToAll\"\n [nzDisabled]=\"!drive.isCurrentUserAdmin()\"\n nzCheckedChildren=\"All Users\"\n nzUnCheckedChildren=\"C\u00E1 nh\u00E2n\"\n ></nz-switch>\n </div>\n @if (customSpaceVisibleToAll) {\n <nz-divider style=\"margin: 8px 0\"></nz-divider>\n <div>\n <label class=\"drawer-field-label\">M\u1EE9c quy\u1EC1n m\u1EB7c \u0111\u1ECBnh cho to\u00E0n b\u1ED9 ng\u01B0\u1EDDi d\u00F9ng</label>\n <nz-select\n [(ngModel)]=\"customSpaceDefaultAccessLevel\"\n [nzDisabled]=\"!drive.isCurrentUserAdmin()\"\n style=\"width: 100%\"\n >\n <nz-option [nzValue]=\"DriveAccessLevel.None\" nzLabel=\"None\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Viewer\" nzLabel=\"Ch\u1EC9 xem (Viewer)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Downloader\" nzLabel=\"Xem & T\u1EA3i xu\u1ED1ng\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Uploader\" nzLabel=\"Xem & T\u1EA3i l\u00EAn (Kh\u00F4ng \u0111\u01B0\u1EE3c x\u00F3a)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Editor\" nzLabel=\"Ch\u1EC9nh s\u1EEDa (Editor)\"></nz-option>\n </nz-select>\n </div>\n }\n </div>\n </div>\n </ng-container>\n <ng-template #customSpaceDrawerFooterTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div>\n @if (customSpaceDrawerMode === \"edit\" && editingCustomSpace) {\n <button nz-button nzDanger nzType=\"default\" (click)=\"onDeleteCustomSpace(editingCustomSpace)\">\n <nz-icon nzType=\"delete\"></nz-icon> X\u00F3a m\u1EE5c n\u00E0y\n </button>\n }\n </div>\n <div nz-flex [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"customSpaceDrawerVisible = false\">H\u1EE7y</button>\n <button nz-button nzType=\"primary\" (click)=\"submitCustomSpaceDrawer()\">\n <nz-icon nzType=\"check\"></nz-icon>\n {{ customSpaceDrawerMode === \"create\" ? \"T\u1EA1o m\u1EE5c m\u1EDBi\" : \"L\u01B0u thay \u0111\u1ED5i\" }}\n </button>\n </div>\n </div>\n </ng-template>\n </nz-drawer>\n\n <nz-drawer\n [nzVisible]=\"matrixDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"'92vw'\"\n nzTitle=\"Ma tr\u1EADn Ph\u00E2n quy\u1EC1n T\u00E0i li\u1EC7u & Th\u01B0 m\u1EE5c\"\n (nzOnClose)=\"matrixDrawerVisible = false\"\n >\n <!-- (ACL / RBAC Matrix) -->\n <ng-container *nzDrawerContent>\n <lib-drive-permission-matrix\n [rootFolderId]=\"matrixRootNodeId\"\n [viewMode]=\"\n drive.currentViewMode() === 'ORG_DRIVE'\n ? 'ORG_DRIVE'\n : drive.currentViewMode() === 'CUSTOM_SPACE'\n ? 'CUSTOM_SPACE'\n : 'MY_DRIVE'\n \"\n [customSpaceId]=\"drive.currentCustomSpaceId()\"\n (saved)=\"drive.loadNodes()\"\n (closed)=\"matrixDrawerVisible = false\"\n >\n </lib-drive-permission-matrix>\n </ng-container>\n </nz-drawer>\n\n <!-- ========================================================================= -->\n <!-- DRAWER 11: \u0110\u1ECANH NGH\u0128A & C\u1EA4U H\u00CCNH C\u00C2Y TH\u01AF M\u1EE4C M\u1EAAU K\u00C8M PH\u00C2N QUY\u1EC0N T\u1EF0 \u0110\u1ED8NG -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"templateDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"760\"\n [nzClosable]=\"false\"\n [nzTitle]=\"templateDrawerTitleTpl\"\n [nzFooter]=\"templateDrawerFooterTpl\"\n (nzOnClose)=\"templateDrawerVisible = false\"\n >\n <ng-template #templateDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button\n nz-button\n nzSize=\"small\"\n nzType=\"default\"\n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n (click)=\"toggleDrawerPlacement()\"\n >\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"apartment\" style=\"font-size: 18px; color: #d97706\"></nz-icon>\n <strong>\n {{ templateDrawerMode === \"create\" ? \"\u0110\u1ECBnh ngh\u0129a M\u1EABu C\u00E2y Th\u01B0 M\u1EE5c M\u1EDBi\" : \"C\u1EADp nh\u1EADt M\u1EABu C\u00E2y Th\u01B0 M\u1EE5c\" }}\n </strong>\n @if (totalConfiguredTemplatePermissions() > 0) {\n <nz-tag nzColor=\"cyan\">\uD83D\uDEE1 {{ totalConfiguredTemplatePermissions() }} quy\u1EC1n c\u00E0i s\u1EB5n</nz-tag>\n }\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"templateDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n\n <ng-container *nzDrawerContent>\n <div nz-flex nzVertical [nzGap]=\"14\">\n <div nz-flex [nzGap]=\"12\" nzWrap=\"wrap\">\n <div style=\"flex: 1.4; min-width: 220px\">\n <label class=\"drawer-field-label\">T\u00EAn m\u1EABu c\u00E2y th\u01B0 m\u1EE5c *</label>\n <input\n nz-input\n [(ngModel)]=\"templateInputName\"\n [appAutoFocus]=\"templateDrawerVisible\"\n placeholder=\"VD: H\u1ED3 s\u01A1 D\u1EF1 \u00E1n \u0110\u1EA5u th\u1EA7u, H\u1ED3 s\u01A1 H\u1EE3p \u0111\u1ED3ng...\"\n />\n </div>\n <div style=\"flex: 1; min-width: 170px\">\n <label class=\"drawer-field-label\">M\u00E3 m\u1EABu (D\u00F9ng g\u1ECDi API t\u1EEB Module kh\u00E1c)</label>\n <input nz-input [(ngModel)]=\"templateInputCode\" placeholder=\"VD: MAU_DU_AN, MAU_HOP_DONG...\" />\n </div>\n </div>\n\n <div>\n <label class=\"drawer-field-label\">M\u00F4 t\u1EA3 ng\u1EAFn</label>\n <input\n nz-input\n [(ngModel)]=\"templateInputDesc\"\n placeholder=\"M\u00F4 t\u1EA3 m\u1EE5c \u0111\u00EDch s\u1EED d\u1EE5ng ho\u1EB7c ph\u00E2n h\u1EC7 \u00E1p d\u1EE5ng...\"\n />\n </div>\n\n <div class=\"drawer-meta-card\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" [nzGap]=\"12\">\n <div style=\"flex: 1\">\n <div style=\"font-weight: 600; font-size: 13px\">T\u1EA1o th\u01B0 m\u1EE5c g\u1ED1c b\u1ECDc ngo\u00E0i khi k\u00E9o th\u1EA3</div>\n <div class=\"quota-sub\">\n Khi b\u1EADt: K\u00E9o th\u1EA3 m\u1EABu v\u00E0o th\u01B0 m\u1EE5c \u0111\u00EDch s\u1EBD t\u1EA1o 1 th\u01B0 m\u1EE5c mang t\u00EAn m\u1EABu r\u1ED3i ch\u1EE9a c\u00E2y con b\u00EAn trong.\n </div>\n </div>\n <nz-switch\n style=\"flex-shrink: 0\"\n [(ngModel)]=\"templateCreateWrapperRoot\"\n nzCheckedChildren=\"C\u00F3 b\u1ECDc g\u1ED1c\"\n nzUnCheckedChildren=\"Bung tr\u1EF1c ti\u1EBFp\"\n ></nz-switch>\n </div>\n\n <nz-divider style=\"margin: 6px 0\"></nz-divider>\n\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" [nzGap]=\"12\">\n <div style=\"flex: 1\">\n <div style=\"font-weight: 600; font-size: 13px\">Chia s\u1EBB m\u1EABu n\u00E0y cho to\u00E0n b\u1ED9 ng\u01B0\u1EDDi d\u00F9ng & ph\u00E2n h\u1EC7</div>\n <div class=\"quota-sub\">Cho ph\u00E9p m\u1ECDi ng\u01B0\u1EDDi d\u00F9ng v\u00E0 c\u00E1c Module nghi\u1EC7p v\u1EE5 kh\u00E1c s\u1EED d\u1EE5ng chung m\u1EABu n\u00E0y.</div>\n </div>\n <nz-switch\n style=\"flex-shrink: 0\"\n [(ngModel)]=\"templateVisibleToAll\"\n [nzDisabled]=\"!drive.isCurrentUserAdmin()\"\n nzCheckedChildren=\"To\u00E0n h\u1EC7 th\u1ED1ng\"\n nzUnCheckedChildren=\"C\u00E1 nh\u00E2n\"\n ></nz-switch>\n </div>\n </div>\n\n <!-- SO\u1EA0N TH\u1EA2O C\u1EA4U TR\u00DAC C\u00C2Y \u0110A C\u1EA4P & XEM TR\u01AF\u1EDAC TR\u1EF0C QUAN (NH\u1EA4N V\u00C0O D\u00D2NG \u0110\u1EC2 G\u00C1N QUY\u1EC0N RI\u00CANG) -->\n <div>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" nzWrap=\"wrap\" [nzGap]=\"6\" style=\"margin-bottom: 6px\">\n <label class=\"drawer-field-label\" style=\"margin-bottom: 0\">\n 1. C\u1EA5u tr\u00FAc C\u00E2y th\u01B0 m\u1EE5c (M\u1ED7i d\u00F2ng 1 th\u01B0 m\u1EE5c, th\u1EE5t l\u1EC1 2 kho\u1EA3ng tr\u1EAFng \u0111\u1EC3 t\u1EA1o c\u1EA5p con)\n </label>\n <div nz-flex [nzGap]=\"4\">\n <button type=\"button\" nz-button nzSize=\"small\" (click)=\"loadPresetTemplateStructure('PROJECT')\">\n M\u1EABu D\u1EF1 \u00E1n\n </button>\n <button type=\"button\" nz-button nzSize=\"small\" (click)=\"loadPresetTemplateStructure('CONTRACT')\">\n M\u1EABu H\u1EE3p \u0111\u1ED3ng\n </button>\n <button type=\"button\" nz-button nzSize=\"small\" (click)=\"loadPresetTemplateStructure('TRAINING')\">\n M\u1EABu \u0110\u00E0o t\u1EA1o / KHCN\n </button>\n </div>\n </div>\n\n <div class=\"template-editor-grid\">\n <div>\n <textarea\n nz-input\n rows=\"11\"\n [(ngModel)]=\"templateIndentedText\"\n style=\"font-family: monospace; font-size: 12.5px; line-height: 1.55\"\n placeholder=\"- 01. H\u1ED3 s\u01A1 ph\u00E1p l\u00FD&#10; - 01.1. T\u1EDD tr\u00ECnh&#10; - 01.2. Quy\u1EBFt \u0111\u1ECBnh&#10;- 02. H\u1EE3p \u0111\u1ED3ng & Nghi\u1EC7m thu\"\n ></textarea>\n </div>\n\n <div class=\"template-tree-preview\">\n <div\n nz-flex\n nzJustify=\"space-between\"\n nzAlign=\"center\"\n style=\"font-size: 12px; font-weight: 600; margin-bottom: 6px; color: var(--app-text-muted, #64748b)\"\n >\n <span>Xem tr\u01B0\u1EDBc ({{ previewTemplateFlatNodes().length }} th\u01B0 m\u1EE5c) \u2014 Nh\u1EA5n \u0111\u1EC3 g\u00E1n quy\u1EC1n:</span>\n </div>\n\n <!-- D\u00F2ng ch\u1ECDn Quy\u1EC1n g\u1ED1c to\u00E0n b\u1ED9 m\u1EABu -->\n <div\n class=\"preview-tree-row selectable-preview-row\"\n [class.active-perm-target]=\"selectedTemplatePermTarget() === '__ROOT__'\"\n (click)=\"selectTemplatePermissionTarget('__ROOT__')\"\n >\n <nz-icon nzType=\"global\" style=\"color: #0284c7; margin-right: 6px\"></nz-icon>\n <strong style=\"flex: 1; font-size: 12px\">To\u00E0n b\u1ED9 c\u00E2y th\u01B0 m\u1EE5c m\u1EABu (Quy\u1EC1n g\u1ED1c)</strong>\n @if (templateRootPermissions().length > 0) {\n <nz-tag nzColor=\"blue\" style=\"margin: 0; font-size: 10.5px; line-height: 16px; padding: 0 5px\">\n \uD83D\uDEE1 {{ templateRootPermissions().length }}\n </nz-tag>\n }\n </div>\n\n @for (node of previewTemplateFlatNodes(); track node.RelativePath) {\n <div\n class=\"preview-tree-row selectable-preview-row\"\n [class.active-perm-target]=\"selectedTemplatePermTarget() === node.RelativePath\"\n [style.padding-left.px]=\"8 + node.Level * 16\"\n (click)=\"selectTemplatePermissionTarget(node.RelativePath)\"\n >\n <!-- nz-tooltip\n nzTooltipTitle=\"Nh\u1EA5n \u0111\u1EC3 c\u1EA5u h\u00ECnh ph\u00E2n quy\u1EC1n ri\u00EAng cho nh\u00E1nh th\u01B0 m\u1EE5c n\u00E0y\" -->\n <nz-icon nzType=\"folder-fill\" style=\"color: #f59e0b; margin-right: 6px\"></nz-icon>\n <span style=\"flex: 1; overflow: hidden; text-overflow: ellipsis\">{{ node.Name }}</span>\n @if (node.BreakInheritance) {\n <nz-tag\n nzColor=\"warning\"\n style=\"margin: 0 2px 0 0; font-size: 10px; line-height: 15px; padding: 0 4px\"\n nz-tooltip\n nzTooltipTitle=\"Ng\u1EAFt k\u1EBF th\u1EEBa quy\u1EC1n t\u1EEB th\u01B0 m\u1EE5c cha\"\n >\n \u0110\u1ED9c l\u1EADp\n </nz-tag>\n }\n @if (node.PermissionsCount > 0) {\n <nz-tag nzColor=\"cyan\" style=\"margin: 0; font-size: 10px; line-height: 15px; padding: 0 5px\">\n \uD83D\uDEE1 {{ node.PermissionsCount }}\n </nz-tag>\n }\n </div>\n }\n </div>\n </div>\n </div>\n\n <!-- ========================================================================= -->\n <!-- 2. C\u1EA4U H\u00CCNH PH\u00C2N QUY\u1EC0N M\u1EB6C \u0110\u1ECANH CHO M\u1EAAU C\u00C2Y TH\u01AF M\u1EE4C (ACL & RBAC) -->\n <!-- ========================================================================= -->\n <div class=\"drawer-meta-card\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" nzWrap=\"wrap\" [nzGap]=\"8\">\n <div>\n <div style=\"font-weight: 600; font-size: 13px\">\n <nz-icon nzType=\"safety-certificate\" style=\"color: #0284c7; margin-right: 4px\"></nz-icon>\n 2. Ph\u00E2n quy\u1EC1n c\u00E0i s\u1EB5n khi t\u1EA1o m\u1EDBi t\u1EEB M\u1EABu c\u00E2y th\u01B0 m\u1EE5c\n </div>\n <div class=\"quota-sub\">\n @if (selectedTemplatePermTarget() === \"__ROOT__\") {\n \u0110ang c\u1EA5u h\u00ECnh cho: <strong style=\"color: #0284c7\">\uD83C\uDF10 To\u00E0n b\u1ED9 c\u00E2y th\u01B0 m\u1EE5c m\u1EABu (Quy\u1EC1n g\u1ED1c)</strong> \u2014 T\u1EF1\n \u0111\u1ED9ng k\u1EBF th\u1EEBa xu\u1ED1ng m\u1ECDi th\u01B0 m\u1EE5c con.\n } @else {\n \u0110ang c\u1EA5u h\u00ECnh ri\u00EAng cho nh\u00E1nh:\n <strong style=\"color: #d97706\">\uD83D\uDCC2 {{ selectedTemplatePermTarget() }}</strong>\n <a style=\"margin-left: 8px; font-weight: 600\" (click)=\"selectTemplatePermissionTarget('__ROOT__')\">\n \u21A9 Quay v\u1EC1 Quy\u1EC1n g\u1ED1c to\u00E0n m\u1EABu\n </a>\n }\n </div>\n </div>\n\n @if (selectedTemplatePermTarget() !== \"__ROOT__\") {\n <div nz-flex nzAlign=\"center\" [nzGap]=\"6\">\n <span style=\"font-size: 12px\">Ng\u1EAFt k\u1EBF th\u1EEBa cha:</span>\n <nz-switch\n nzSize=\"small\"\n [ngModel]=\"activeTemplateTargetBreakInheritance()\"\n (ngModelChange)=\"onToggleTemplateNodeBreakInheritance($event)\"\n nzCheckedChildren=\"\u0110\u1ED9c l\u1EADp\"\n nzUnCheckedChildren=\"K\u1EBF th\u1EEBa\"\n nz-tooltip\n nzTooltipTitle=\"Khi b\u1EADt \u0110\u1ED9c l\u1EADp: Th\u01B0 m\u1EE5c con n\u00E0y s\u1EBD ng\u1EAFt k\u1EBF th\u1EEBa quy\u1EC1n t\u1EEB th\u01B0 m\u1EE5c cha v\u00E0 ch\u1EC9 \u00E1p d\u1EE5ng danh s\u00E1ch quy\u1EC1n ri\u00EAng b\u00EAn d\u01B0\u1EDBi\"\n ></nz-switch>\n </div>\n }\n </div>\n\n <!-- Thanh ch\u1ECDn \u0110\u1ED1i t\u01B0\u1EE3ng (User / \u0110\u01A1n v\u1ECB / Vai tr\u00F2) & M\u1EE9c quy\u1EC1n -->\n <div nz-flex nzWrap=\"wrap\" [nzGap]=\"6\" nzAlign=\"center\" style=\"margin-top: 6px\">\n <nz-select\n [(ngModel)]=\"templatePermGranteeType\"\n (ngModelChange)=\"onTemplatePermGranteeTypeChange()\"\n nzSize=\"small\"\n style=\"width: 140px\"\n >\n <nz-option [nzValue]=\"DriveGranteeType.Org\" nzLabel=\"\uD83C\uDFE2 \u0110\u01A1n v\u1ECB (Org)\"></nz-option>\n <nz-option [nzValue]=\"DriveGranteeType.Role\" nzLabel=\"\uD83D\uDEE1 Vai tr\u00F2 (Role)\"></nz-option>\n <nz-option [nzValue]=\"DriveGranteeType.User\" nzLabel=\"\uD83D\uDC64 C\u00E1 nh\u00E2n (User)\"></nz-option>\n </nz-select>\n\n <nz-select\n nzShowSearch\n nzServerSearch\n nzSize=\"small\"\n nzPlaceHolder=\"T\u00ECm ch\u1ECDn User / \u0110\u01A1n v\u1ECB / Vai tr\u00F2...\"\n [(ngModel)]=\"templatePermSelectedGrantee\"\n (nzOnSearch)=\"onSearchTemplateGrantee($event)\"\n style=\"flex: 1; min-width: 210px\"\n >\n @for (g of templateGranteeOptions(); track g.GranteeId) {\n <nz-option [nzValue]=\"g\" [nzLabel]=\"g.DisplayName + ' (' + g.Code + ')'\"></nz-option>\n }\n </nz-select>\n\n <nz-select\n [(ngModel)]=\"templatePermAccessLevel\"\n [nzDisabled]=\"templatePermIsDeny\"\n nzSize=\"small\"\n style=\"width: 155px\"\n >\n <nz-option [nzValue]=\"DriveAccessLevel.Viewer\" nzLabel=\"\uD83D\uDC41 Ch\u1EC9 xem (10)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Downloader\" nzLabel=\"\u2B07 Xem & T\u1EA3i (20)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Uploader\" nzLabel=\"\u2601 Xem & T\u1EA3i l\u00EAn (35)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Editor\" nzLabel=\"\u270E Ch\u1EC9nh s\u1EEDa (40)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Manager\" nzLabel=\"\uD83D\uDC51 Qu\u1EA3n tr\u1ECB (50)\"></nz-option>\n </nz-select>\n\n <label\n nz-checkbox\n [(ngModel)]=\"templatePermIsDeny\"\n nz-tooltip\n nzTooltipTitle=\"C\u1EA5m truy c\u1EADp t\u01B0\u1EDDng minh (Explicit Deny) \u0111\u1ED1i v\u1EDBi \u0111\u1ED1i t\u01B0\u1EE3ng n\u00E0y tr\u00EAn nh\u00E1nh \u0111ang ch\u1ECDn\"\n style=\"font-size: 12px\"\n >\n C\u1EA5m (Deny)\n </label>\n\n <button\n type=\"button\"\n nz-button\n nzType=\"primary\"\n nzSize=\"small\"\n [disabled]=\"!templatePermSelectedGrantee\"\n (click)=\"addPermissionToTemplateTarget()\"\n >\n <nz-icon nzType=\"user-add\"></nz-icon> Th\u00EAm quy\u1EC1n\n </button>\n </div>\n\n <!-- Danh s\u00E1ch c\u00E1c quy\u1EC1n \u0111\u00E3 \u0111\u1EB7t cho m\u1EE5c \u0111ang ch\u1ECDn -->\n @if (activeTemplateTargetPermissions().length === 0) {\n <div class=\"quota-sub\" style=\"padding: 8px 4px 2px\">\n @if (selectedTemplatePermTarget() === \"__ROOT__\") {\n Ch\u01B0a \u0111\u1EB7t quy\u1EC1n m\u1EB7c \u0111\u1ECBnh cho to\u00E0n m\u1EABu. H\u00E3y ch\u1ECDn \u0110\u01A1n v\u1ECB / Vai tr\u00F2 / C\u00E1 nh\u00E2n \u1EDF tr\u00EAn r\u1ED3i b\u1EA5m\n <strong>+ Th\u00EAm quy\u1EC1n</strong> (ho\u1EB7c b\u1EA5m v\u00E0o t\u1EEBng th\u01B0 m\u1EE5c b\u00EAn khung Xem tr\u01B0\u1EDBc \u0111\u1EC3 \u0111\u1EB7t quy\u1EC1n ri\u00EAng cho\n nh\u00E1nh con).\n } @else {\n Nh\u00E1nh <strong>\"{{ selectedTemplatePermTarget() }}\"</strong> ch\u01B0a c\u00F3 quy\u1EC1n ri\u00EAng (m\u1EB7c \u0111\u1ECBnh k\u1EBF th\u1EEBa t\u1EEB th\u01B0\n m\u1EE5c cha).\n }\n </div>\n } @else {\n <nz-table\n #tplPermTable\n [nzData]=\"activeTemplateTargetPermissions()\"\n nzSize=\"small\"\n [nzBordered]=\"true\"\n [nzFrontPagination]=\"false\"\n [nzShowPagination]=\"false\"\n style=\"margin-top: 6px\"\n >\n <thead>\n <tr>\n <th>\u0110\u1ED1i t\u01B0\u1EE3ng nh\u1EADn quy\u1EC1n</th>\n <th nzWidth=\"185px\">M\u1EE9c quy\u1EC1n \u00E1p d\u1EE5ng</th>\n <th nzWidth=\"95px\" class=\"text-center\">T\u1EA3i xu\u1ED1ng</th>\n <th nzWidth=\"65px\" class=\"text-center\">X\u00F3a</th>\n </tr>\n </thead>\n <tbody>\n @for (p of tplPermTable.data; track p.GranteeType + \":\" + p.GranteeId) {\n <tr>\n <td>\n <nz-tag\n [nzColor]=\"\n p.GranteeType === DriveGranteeType.User\n ? 'blue'\n : p.GranteeType === DriveGranteeType.Org\n ? 'cyan'\n : 'purple'\n \"\n >\n {{\n p.GranteeType === DriveGranteeType.User\n ? \"User\"\n : p.GranteeType === DriveGranteeType.Org\n ? \"\u0110\u01A1n v\u1ECB\"\n : \"Role\"\n }}\n </nz-tag>\n <strong>{{ p.GranteeName || p.GranteeId }}</strong>\n </td>\n <td>\n <nz-select\n nzSize=\"small\"\n [ngModel]=\"p.IsDeny ? 'DENY' : p.AccessLevel\"\n (ngModelChange)=\"updateTemplatePermissionLevel(p, $event)\"\n style=\"width: 100%\"\n >\n <nz-option [nzValue]=\"DriveAccessLevel.Viewer\" nzLabel=\"\uD83D\uDC41 Ch\u1EC9 xem (10)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Downloader\" nzLabel=\"\u2B07 Xem & T\u1EA3i (20)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Uploader\" nzLabel=\"\u2601 Xem & T\u1EA3i l\u00EAn (35)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Editor\" nzLabel=\"\u270E Ch\u1EC9nh s\u1EEDa (40)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Manager\" nzLabel=\"\uD83D\uDC51 Qu\u1EA3n tr\u1ECB (50)\"></nz-option>\n <nz-option nzValue=\"DENY\" nzLabel=\"\uD83D\uDEAB C\u1EA5m (Deny)\"></nz-option>\n </nz-select>\n </td>\n <td class=\"text-center\">\n <nz-tag [nzColor]=\"p.CanDownload && !p.IsDeny ? 'green' : 'default'\">\n {{ p.CanDownload && !p.IsDeny ? \"Cho ph\u00E9p\" : \"Ch\u1EB7n\" }}\n </nz-tag>\n </td>\n <td class=\"text-center\">\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzDanger\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"G\u1EE1 quy\u1EC1n n\u00E0y kh\u1ECFi m\u1EABu\"\n (click)=\"removePermissionFromTemplateTarget(p)\"\n >\n <nz-icon nzType=\"delete\"></nz-icon>\n </button>\n </td>\n </tr>\n }\n </tbody>\n </nz-table>\n }\n </div>\n </div>\n </ng-container>\n\n <ng-template #templateDrawerFooterTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div>\n @if (templateDrawerMode === \"edit\" && editingTemplate) {\n <button nz-button nzDanger nzType=\"default\" (click)=\"onDeleteTemplate(editingTemplate)\">\n <nz-icon nzType=\"delete\"></nz-icon> X\u00F3a m\u1EABu n\u00E0y\n </button>\n }\n </div>\n <div nz-flex [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"templateDrawerVisible = false\">H\u1EE7y</button>\n <button nz-button nzType=\"primary\" (click)=\"submitTemplateDrawer()\">\n <nz-icon nzType=\"save\"></nz-icon>\n {{ templateDrawerMode === \"create\" ? \"L\u01B0u m\u1EABu c\u00E2y th\u01B0 m\u1EE5c\" : \"C\u1EADp nh\u1EADt m\u1EABu\" }}\n </button>\n </div>\n </div>\n </ng-template>\n </nz-drawer>\n}\n", styles: [".drive-shell{display:grid;grid-template-columns:245px 1fr;min-height:calc(100vh - 110px);background:var(--app-container-bg, #ffffff);border:1px solid var(--app-border, #e2e8f0);border-radius:6px;overflow:hidden}.drive-sidebar{padding:14px;background:var(--app-sidebar-bg, #f8fafc);border-right:1px solid var(--app-border, #e2e8f0);display:flex;flex-direction:column;gap:14px}.drive-nav{display:flex;flex-direction:column;gap:4px}.drive-nav a{display:flex;align-items:center;gap:10px;padding:9px 12px;border-radius:6px;color:var(--app-text, #334155);cursor:pointer;transition:background .15s}.drive-nav a:hover,.drive-nav a.active{background:color-mix(in srgb,var(--primary-color, #1890ff) 16%,transparent);color:var(--primary-color, #1890ff);font-weight:600}.org-nav-group{display:flex;flex-direction:column;gap:2px}.custom-space-link{padding-left:26px!important;font-size:13px}.custom-space-title{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.custom-space-badge{margin:0!important;font-size:10px;line-height:16px;padding:0 4px}.nav-inline-btn{border:none;background:transparent;color:inherit;cursor:pointer;padding:2px 4px;border-radius:4px;display:inline-flex;align-items:center;justify-content:center;opacity:.7}.nav-inline-btn:hover{opacity:1;background:color-mix(in srgb,var(--primary-color, #1890ff) 18%,transparent)}.storage-mode-box{padding:10px 12px;background:var(--app-container-bg, #ffffff);border:1px solid var(--app-border, #e2e8f0);border-radius:6px}.upload-queue-box{padding:10px;background:var(--app-container-bg, #ffffff);border:1px solid var(--app-border, #e2e8f0);border-radius:6px;max-height:180px;overflow-y:auto}.upload-task-row{margin-bottom:6px}.upload-task-name{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.quota-box{margin-top:auto;padding:12px;background:var(--app-container-bg, #ffffff);border:1px solid var(--app-border, #e2e8f0);border-radius:6px}.quota-title{font-size:13px;font-weight:600;margin-bottom:6px}.quota-sub{font-size:12px;color:var(--app-text-muted, #64748b);margin-top:4px}.drive-main{position:relative;padding:16px;display:flex;flex-direction:column;gap:12px;transition:background .15s,border-color .15s}.drive-main.external-drag-active{background:color-mix(in srgb,var(--primary-color, #1890ff) 6%,var(--app-container-bg, #ffffff));outline:2px dashed var(--primary-color, #1890ff);outline-offset:-6px}.external-drop-banner{pointer-events:none;display:flex;align-items:center;gap:14px;padding:12px 18px;border-radius:8px;background:color-mix(in srgb,var(--primary-color, #1890ff) 14%,var(--app-container-bg, #ffffff));border:1px dashed var(--primary-color, #1890ff);color:var(--app-text, #1e293b)}.drop-banner-icon{font-size:28px;color:var(--primary-color, #1890ff)}.drop-banner-title{font-size:14px;font-weight:500}.drop-banner-sub{font-size:12px;color:var(--app-text-muted, #64748b);margin-top:2px}.drive-toolbar{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px;padding-bottom:10px;border-bottom:1px solid var(--app-border, #f1f5f9)}.physical-path-bar{display:flex;align-items:center;gap:6px;margin-top:4px;font-size:12px;color:var(--app-text-muted, #64748b)}.toolbar-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.drive-row{cursor:pointer;transition:background .15s,outline .15s}.drive-row.dragging-row{opacity:.45}.drive-row.drop-target-active>td{background:color-mix(in srgb,var(--primary-color, #1890ff) 18%,transparent)!important;border-top:1px dashed var(--primary-color, #1890ff);border-bottom:1px dashed var(--primary-color, #1890ff)}.bc-drop-active,.drive-nav a.nav-drop-active{background:color-mix(in srgb,var(--primary-color, #1890ff) 22%,transparent)!important;outline:1.5px dashed var(--primary-color, #1890ff);color:var(--primary-color, #1890ff);font-weight:600}.node-name-cell{display:flex;align-items:center;gap:8px}.node-icon-wrap{position:relative;display:inline-flex;align-items:center;justify-content:center}.node-icon{font-size:18px}.shortcut-badge{position:absolute;right:-5px;bottom:-3px;width:13px;height:13px;border-radius:50%;background:#7c3aed;color:#fff;font-size:9px;display:inline-flex;align-items:center;justify-content:center;box-shadow:0 0 0 1.5px var(--app-container-bg, #ffffff)}.node-title{font-weight:500}.action-btn-group{display:inline-flex;align-items:center;justify-content:center;gap:4px}.action-icon-btn{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border:none;background:transparent;border-radius:6px;cursor:pointer;font-size:15px;transition:background .15s,transform .1s}.action-icon-btn:hover{background:color-mix(in srgb,var(--primary-color, #1890ff) 12%,transparent);transform:translateY(-1px)}.action-icon-btn.color-warn:hover{background:#ef44441f}.drawer-field-label{display:block;font-size:13px;font-weight:600;margin-bottom:6px;color:var(--app-text, #334155)}.drawer-meta-card{padding:12px 14px;background:var(--app-sidebar-bg, #f8fafc);border:1px solid var(--app-border, #e2e8f0);border-radius:8px;display:flex;flex-direction:column;gap:8px}.drawer-meta-header{display:flex;align-items:center;gap:10px}.drawer-meta-row{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:13px}.meta-label{color:var(--app-text-muted, #64748b)}.sortable-th{cursor:pointer;-webkit-user-select:none;user-select:none;transition:background .15s,color .15s}.sortable-th:hover{background:color-mix(in srgb,var(--primary-color, #1890ff) 8%,var(--app-sidebar-bg, #f8fafc))!important;color:var(--primary-color, #1890ff)}.th-sort-wrap{display:inline-flex;align-items:center;gap:6px;width:100%}.th-sort-wrap.justify-center{justify-content:center}.th-sort-wrap.justify-end{justify-content:flex-end}.sort-icon{font-size:13px;opacity:.35;transition:opacity .15s,color .15s}.sort-icon.active{opacity:1;color:var(--primary-color, #1890ff)}.sortable-th:hover .sort-icon{opacity:.85}.template-sidebar-box{padding:10px 12px;background:var(--app-container-bg, #ffffff);border:1px solid var(--app-border, #e2e8f0);border-radius:6px}.template-chip-list{display:flex;flex-direction:column;gap:6px;max-height:175px;overflow-y:auto}.template-drag-item{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:6px 8px;border-radius:6px;border:1px dashed var(--app-border, #cbd5e1);background:var(--app-sidebar-bg, #f8fafc);cursor:grab;transition:all .15s}.template-drag-item:hover{border-color:var(--primary-color, #1890ff);background:color-mix(in srgb,var(--primary-color, #1890ff) 10%,transparent)}.template-item-title{font-size:12px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.template-item-sub{font-size:10.5px;color:var(--app-text-muted, #64748b)}.template-editor-grid{display:grid;grid-template-columns:1.15fr 1fr;gap:10px}.template-tree-preview{border:1px solid var(--app-border, #e2e8f0);border-radius:6px;padding:10px;background:var(--app-sidebar-bg, #f8fafc);max-height:450px;overflow-y:auto}.preview-tree-row{display:flex;align-items:center;font-size:12.5px;padding:2.5px 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.selectable-preview-row{cursor:pointer;padding:4px 6px;border-radius:5px;transition:background .12s,border-color .12s;border:1px solid transparent}.selectable-preview-row:hover{background:color-mix(in srgb,var(--primary-color, #1890ff) 10%,transparent)}.selectable-preview-row.active-perm-target{background:color-mix(in srgb,var(--primary-color, #1890ff) 16%,transparent);border-color:var(--primary-color, #1890ff);font-weight:600}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$1.DatePipe, name: "date" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: NzGridModule }, { kind: "ngmodule", type: NzFlexModule }, { kind: "directive", type: i3$3.NzFlexDirective, selector: "[nz-flex],nz-flex", inputs: ["nzVertical", "nzJustify", "nzAlign", "nzGap", "nzWrap", "nzFlex"], exportAs: ["nzFlex"] }, { kind: "ngmodule", type: NzTableModule }, { kind: "component", type: i6.NzTableComponent, selector: "nz-table", inputs: ["nzTableLayout", "nzShowTotal", "nzItemRender", "nzTitle", "nzFooter", "nzNoResult", "nzPageSizeOptions", "nzVirtualItemSize", "nzVirtualMaxBufferPx", "nzVirtualMinBufferPx", "nzVirtualForTrackBy", "nzLoadingDelay", "nzPageIndex", "nzPageSize", "nzTotal", "nzWidthConfig", "nzData", "nzCustomColumn", "nzPaginationPosition", "nzScroll", "noDataVirtualHeight", "nzPaginationType", "nzFrontPagination", "nzTemplateMode", "nzShowPagination", "nzLoading", "nzOuterBordered", "nzLoadingIndicator", "nzBordered", "nzSize", "nzShowSizeChanger", "nzHideOnSinglePage", "nzShowQuickJumper", "nzSimple"], outputs: ["nzPageSizeChange", "nzPageIndexChange", "nzQueryParams", "nzCurrentPageDataChange", "nzCustomColumnChange"], exportAs: ["nzTable"] }, { kind: "directive", type: i6.NzTableCellDirective, selector: "th:not(.nz-disable-th):not([mat-cell]), td:not(.nz-disable-td):not([mat-cell])" }, { kind: "directive", type: i6.NzThMeasureDirective, selector: "th", inputs: ["nzWidth", "colspan", "colSpan", "rowspan", "rowSpan"] }, { kind: "component", type: i6.NzTdAddOnComponent, selector: "td[nzChecked], td[nzDisabled], td[nzIndeterminate], td[nzIndentSize], td[nzExpand], td[nzShowExpand], td[nzShowCheckbox]", inputs: ["nzChecked", "nzDisabled", "nzIndeterminate", "nzLabel", "nzIndentSize", "nzShowExpand", "nzShowCheckbox", "nzExpand", "nzExpandIcon"], outputs: ["nzCheckedChange", "nzExpandChange"] }, { kind: "component", type: i6.NzTheadComponent, selector: "thead:not(.ant-table-thead)", outputs: ["nzSortOrderChange"] }, { kind: "component", type: i6.NzTbodyComponent, selector: "tbody" }, { kind: "directive", type: i6.NzTrDirective, selector: "tr:not([mat-row]):not([mat-header-row]):not([nz-table-measure-row]):not([nzExpand]):not([nz-table-fixed-row])" }, { kind: "ngmodule", type: NzPaginationModule }, { kind: "component", type: i7.NzPaginationComponent, selector: "nz-pagination", inputs: ["nzShowTotal", "nzItemRender", "nzSize", "nzPageSizeOptions", "nzShowSizeChanger", "nzShowQuickJumper", "nzSimple", "nzDisabled", "nzResponsive", "nzHideOnSinglePage", "nzTotal", "nzPageIndex", "nzPageSize"], outputs: ["nzPageSizeChange", "nzPageIndexChange"], exportAs: ["nzPagination"] }, { 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$1.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i1$2.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: NzInputModule }, { kind: "directive", type: i12.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzBorderless", "nzSize", "nzStepperless", "nzStatus", "disabled"], exportAs: ["nzInput"] }, { kind: "component", type: i12.NzInputGroupComponent, selector: "nz-input-group", inputs: ["nzAddOnBeforeIcon", "nzAddOnAfterIcon", "nzPrefixIcon", "nzSuffixIcon", "nzAddOnBefore", "nzAddOnAfter", "nzPrefix", "nzStatus", "nzSuffix", "nzSize", "nzSearch", "nzCompact"], exportAs: ["nzInputGroup"] }, { kind: "directive", type: i12.NzInputGroupWhitSuffixOrPrefixDirective, selector: "nz-input-group[nzSuffix], nz-input-group[nzPrefix]" }, { kind: "ngmodule", type: NzBreadCrumbModule }, { kind: "component", type: i10.NzBreadCrumbComponent, selector: "nz-breadcrumb", inputs: ["nzAutoGenerate", "nzSeparator", "nzRouteLabel", "nzRouteLabelFn", "nzRouteFn"], exportAs: ["nzBreadcrumb"] }, { kind: "component", type: i10.NzBreadCrumbItemComponent, selector: "nz-breadcrumb-item", inputs: ["nzOverlay"], exportAs: ["nzBreadcrumbItem"] }, { kind: "ngmodule", type: NzDropDownModule }, { kind: "directive", type: i4$2.NzMenuDirective, selector: "[nz-menu]", inputs: ["nzInlineIndent", "nzTheme", "nzMode", "nzInlineCollapsed", "nzSelectable"], outputs: ["nzClick"], exportAs: ["nzMenu"] }, { kind: "component", type: i4$2.NzMenuItemComponent, selector: "[nz-menu-item]", inputs: ["nzPaddingLeft", "nzDisabled", "nzSelected", "nzDanger", "nzMatchRouterExact", "nzMatchRouter"], exportAs: ["nzMenuItem"] }, { kind: "directive", type: i4$2.NzMenuDividerDirective, selector: "[nz-menu-divider]", exportAs: ["nzMenuDivider"] }, { kind: "component", type: i5$3.NzDropdownMenuComponent, selector: "nz-dropdown-menu", exportAs: ["nzDropdownMenu"] }, { kind: "ngmodule", type: NzModalModule }, { kind: "ngmodule", type: NzDrawerModule }, { kind: "component", type: i14.NzDrawerComponent, selector: "nz-drawer", inputs: ["nzContent", "nzCloseIcon", "nzClosable", "nzMaskClosable", "nzMask", "nzCloseOnNavigation", "nzNoAnimation", "nzKeyboard", "nzTitle", "nzExtra", "nzFooter", "nzPlacement", "nzSize", "nzMaskStyle", "nzBodyStyle", "nzWrapClassName", "nzWidth", "nzHeight", "nzZIndex", "nzOffsetX", "nzOffsetY", "nzVisible"], outputs: ["nzOnViewInit", "nzOnClose", "nzVisibleChange"], exportAs: ["nzDrawer"] }, { kind: "directive", type: i14.NzDrawerContentDirective, selector: "[nzDrawerContent]", exportAs: ["nzDrawerContent"] }, { kind: "ngmodule", type: NzProgressModule }, { kind: "component", type: i2$7.NzProgressComponent, selector: "nz-progress", inputs: ["nzShowInfo", "nzWidth", "nzStrokeColor", "nzSize", "nzFormat", "nzSuccessPercent", "nzPercent", "nzStrokeWidth", "nzGapDegree", "nzStatus", "nzType", "nzGapPosition", "nzStrokeLinecap", "nzSteps"], exportAs: ["nzProgress"] }, { kind: "ngmodule", type: NzTagModule }, { kind: "component", type: i11.NzTagComponent, selector: "nz-tag", inputs: ["nzMode", "nzColor", "nzChecked", "nzBordered"], outputs: ["nzOnClose", "nzCheckedChange"], exportAs: ["nzTag"] }, { kind: "ngmodule", type: NzToolTipModule }, { kind: "directive", type: i12$1.NzTooltipDirective, selector: "[nz-tooltip]", inputs: ["nzTooltipTitle", "nzTooltipTitleContext", "nz-tooltip", "nzTooltipTrigger", "nzTooltipPlacement", "nzTooltipOrigin", "nzTooltipVisible", "nzTooltipMouseEnterDelay", "nzTooltipMouseLeaveDelay", "nzTooltipOverlayClassName", "nzTooltipOverlayStyle", "nzTooltipArrowPointAtCenter", "cdkConnectedOverlayPush", "nzTooltipColor"], outputs: ["nzTooltipVisibleChange"], exportAs: ["nzTooltip"] }, { kind: "ngmodule", type: NzEmptyModule }, { kind: "ngmodule", type: NzDividerModule }, { kind: "component", type: i20.NzDividerComponent, selector: "nz-divider", inputs: ["nzText", "nzType", "nzOrientation", "nzVariant", "nzDashed", "nzPlain"], exportAs: ["nzDivider"] }, { kind: "ngmodule", type: NzSwitchModule }, { kind: "component", type: i13$3.NzSwitchComponent, selector: "nz-switch", inputs: ["nzLoading", "nzDisabled", "nzControl", "nzCheckedChildren", "nzUnCheckedChildren", "nzSize", "nzId"], exportAs: ["nzSwitch"] }, { kind: "ngmodule", type: NzSelectModule }, { kind: "component", type: i13$2.NzOptionComponent, selector: "nz-option", inputs: ["nzTitle", "nzLabel", "nzValue", "nzKey", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }, { kind: "component", type: i13$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: NzCheckboxModule }, { kind: "component", type: i13.NzCheckboxComponent, selector: "[nz-checkbox]", inputs: ["nzValue", "nzAutoFocus", "nzDisabled", "nzIndeterminate", "nzChecked", "nzId", "nzName"], outputs: ["nzCheckedChange"], exportAs: ["nzCheckbox"] }, { kind: "pipe", type: FormatBytesPipe, name: "formatBytes" }, { kind: "directive", type: AutoFocusDirective, selector: "[appAutoFocus]", inputs: ["appAutoFocus"] }, { kind: "component", type: ExtendViewFileContentComponent, selector: "extend-view-file-content", inputs: ["previewType", "previewContent"] }, { kind: "component", type: DriveShareModalComponent, selector: "lib-drive-share-modal", inputs: ["nodeId"] }, { kind: "component", type: DriveVersionModalComponent, selector: "lib-drive-version-modal", inputs: ["nodeId", "nodeName", "canEdit", "canDownload"], outputs: ["closed"] }, { kind: "component", type: DriveShareViewerComponent, selector: "lib-drive-share-viewer", inputs: ["token"], outputs: ["backToDrive"] }, { kind: "component", type: IconCopy, selector: "icon-copy", inputs: ["textToCopy", "tooltip", "size"] }, { kind: "component", type: DrivePermissionMatrixComponent, selector: "lib-drive-permission-matrix", inputs: ["viewMode", "scope", "customSpaceId", "rootFolderId", "rootNodeId"], outputs: ["saved", "closed"] }] });
28231
29056
  }
28232
29057
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: DriveExplorerComponent, decorators: [{
28233
29058
  type: Component,
@@ -28262,7 +29087,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImpor
28262
29087
  DriveShareViewerComponent,
28263
29088
  IconCopy,
28264
29089
  DrivePermissionMatrixComponent,
28265
- ], providers: [NzImageService], template: "@if (activeShareToken(); as sToken) {\n <lib-drive-share-viewer [token]=\"sToken\" (backToDrive)=\"closeEmbeddedShareViewer()\"></lib-drive-share-viewer>\n} @else {\n <div class=\"drive-shell\">\n <!-- SIDEBAR \u0110I\u1EC0U H\u01AF\u1EDANG & QUOTA -->\n <aside class=\"drive-sidebar\">\n <div nz-flex nzVertical nzGap=\"small\">\n <button\n nz-button\n nzType=\"primary\"\n nzBlock\n [disabled]=\"!drive.canUploadCurrentFolder()\"\n (click)=\"fileInput.click()\"\n >\n <nz-icon nzType=\"cloud-upload\"></nz-icon> T\u1EA3i t\u1EADp tin l\u00EAn\n </button>\n <input #fileInput type=\"file\" multiple hidden (change)=\"onFilesSelected($event)\" />\n <button\n nz-button\n nzType=\"default\"\n nzBlock\n [disabled]=\"!drive.canUploadCurrentFolder()\"\n (click)=\"openFolderDrawer('create')\"\n >\n <nz-icon nzType=\"folder-add\"></nz-icon> T\u1EA1o th\u01B0 m\u1EE5c m\u1EDBi\n </button>\n </div>\n <nav class=\"drive-nav\">\n <a\n [class.active]=\"drive.currentViewMode() === 'MY_DRIVE'\"\n [class.nav-drop-active]=\"dragOverNavSpace() === 'MY_DRIVE'\"\n (click)=\"switchView('MY_DRIVE')\"\n (dragover)=\"onNavSpaceDragOver($event, 'MY_DRIVE')\"\n (dragleave)=\"onNavSpaceDragLeave('MY_DRIVE')\"\n (drop)=\"onNavSpaceDrop($event, 'MY_DRIVE')\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"K\u00E9o th\u1EA3 t\u1EADp tin / th\u01B0 m\u1EE5c v\u00E0o \u0111\u00E2y \u0111\u1EC3 chuy\u1EC3n v\u1EC1 g\u1ED1c Drive c\u00E1 nh\u00E2n\"\n -->\n <nz-icon nzType=\"hdd\"></nz-icon> Drive c\u00E1 nh\u00E2n\n </a>\n <div class=\"org-nav-group\">\n <a\n [class.active]=\"drive.currentViewMode() === 'ORG_DRIVE'\"\n [class.nav-drop-active]=\"dragOverNavSpace() === 'ORG_DRIVE'\"\n (click)=\"switchView('ORG_DRIVE')\"\n (dragover)=\"onNavSpaceDragOver($event, 'ORG_DRIVE')\"\n (dragleave)=\"onNavSpaceDragLeave('ORG_DRIVE')\"\n (drop)=\"onNavSpaceDrop($event, 'ORG_DRIVE')\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"K\u00E9o th\u1EA3 t\u1EADp tin / th\u01B0 m\u1EE5c v\u00E0o \u0111\u00E2y \u0111\u1EC3 chuy\u1EC3n sang g\u1ED1c T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB\"\n -->\n <nz-icon nzType=\"apartment\"></nz-icon>\n <span style=\"flex: 1\">T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB</span>\n <button\n type=\"button\"\n class=\"nav-inline-btn\"\n (click)=\"$event.stopPropagation(); openCustomSpaceDrawer('create')\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"Th\u00EAm m\u1EE5c t\u00F9y ch\u1EC9nh b\u00EAn d\u01B0\u1EDBi T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB (VD: T\u00E0i li\u1EC7u d\u1EF1 \u00E1n)\"\n -->\n <nz-icon nzType=\"plus\"></nz-icon>\n </button>\n </a>\n <!-- DANH S\u00C1CH C\u00C1C M\u1EE4C CUSTOM B\u00CAN D\u01AF\u1EDAI \"T\u00C0I LI\u1EC6U \u0110\u01A0N V\u1ECA\" (VD: \"T\u00E0i li\u1EC7u d\u1EF1 \u00E1n\") -->\n @for (sp of drive.customSpaces(); track sp.Id) {\n <a\n class=\"custom-space-link\"\n [class.active]=\"drive.currentViewMode() === 'CUSTOM_SPACE' && drive.currentCustomSpaceId() === sp.Id\"\n [class.nav-drop-active]=\"dragOverCustomSpaceId() === sp.Id\"\n (click)=\"switchCustomSpace(sp)\"\n (dragover)=\"onCustomSpaceDragOver($event, sp)\"\n (dragleave)=\"onCustomSpaceDragLeave(sp)\"\n (drop)=\"onCustomSpaceDrop($event, sp)\"\n >\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"sp.Name + (sp.IsVisibleToAllUsers ? ' (Hi\u1EC3n th\u1ECB cho t\u1EA5t c\u1EA3 User)' : ' (M\u1EE5c c\u00E1 nh\u00E2n)')\"\n -->\n <nz-icon [nzType]=\"sp.Icon || 'project'\"></nz-icon>\n <span class=\"custom-space-title\">{{ sp.Name }}</span>\n @if (sp.IsVisibleToAllUsers) {\n <nz-tag nzColor=\"cyan\" class=\"custom-space-badge\">All</nz-tag>\n }\n @if (sp.CanManage || drive.isCurrentUserAdmin()) {\n <button\n type=\"button\"\n class=\"nav-inline-btn\"\n (click)=\"$event.stopPropagation(); openCustomSpaceDrawer('edit', sp)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"C\u1EA5u h\u00ECnh m\u1EE5c t\u00F9y ch\u1EC9nh\"\n -->\n <nz-icon nzType=\"setting\"></nz-icon>\n </button>\n }\n </a>\n }\n </div>\n <a [class.active]=\"drive.currentViewMode() === 'SHARED_WITH_ME'\" (click)=\"switchView('SHARED_WITH_ME')\">\n <nz-icon nzType=\"share-alt\"></nz-icon> \u0110\u01B0\u1EE3c chia s\u1EBB v\u1EDBi t\u00F4i\n </a>\n <a [class.active]=\"drive.currentViewMode() === 'RECENT'\" (click)=\"switchView('RECENT')\">\n <nz-icon nzType=\"clock-circle\"></nz-icon> G\u1EA7n \u0111\u00E2y\n </a>\n <a [class.active]=\"drive.currentViewMode() === 'STARRED'\" (click)=\"switchView('STARRED')\">\n <nz-icon nzType=\"star\"></nz-icon> C\u00F3 g\u1EAFn d\u1EA5u sao\n </a>\n <a [class.active]=\"drive.currentViewMode() === 'TRASH'\" (click)=\"switchView('TRASH')\">\n <nz-icon nzType=\"delete\"></nz-icon> Th\u00F9ng r\u00E1c\n </a>\n </nav>\n <!-- H\u1ED8P C\u1EA4U H\u00CCNH CH\u1EBE \u0110\u1ED8 TH\u01AF M\u1EE4C V\u1EACT L\u00DD vs \u1EA2O H\u00D3A -->\n @if (drive.isCurrentUserAdmin() && false) {\n <div class=\"storage-mode-box\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\">\n <span style=\"font-size: 12px; font-weight: 600\">Th\u01B0 m\u1EE5c v\u1EADt l\u00FD (Disk)</span>\n <nz-switch\n nzSize=\"small\"\n [ngModel]=\"drive.usePhysicalFolders()\"\n (ngModelChange)=\"onTogglePhysicalMode($event)\"\n ></nz-switch>\n\n <!-- \n nz-tooltip\n nzTooltipTitle=\"Khi b\u1EADt: T\u1EA1o c\u00E2y th\u01B0 m\u1EE5c & t\u00EAn file th\u1EADt 1-1 tr\u00EAn \u1ED5 c\u1EE9ng m\u00E1y ch\u1EE7\"\n -->\n </div>\n <div class=\"quota-sub\">\n Ch\u1EBF \u0111\u1ED9: <strong>{{ drive.usePhysicalFolders() ? \"V\u1EADt l\u00FD 1:1 (Physical)\" : \"\u1EA2o h\u00F3a (Virtual)\" }}</strong>\n </div>\n @if (drive.usePhysicalFolders()) {\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"margin-top: 8px\">\n <span style=\"font-size: 12px\">\n <!-- \n nz-tooltip\n nzTooltipTitle=\"Khi b\u1EADt: T\u1EA5t c\u1EA3 User c\u00F9ng d\u00F9ng chung 1 RootPath duy nh\u1EA5t \u0111\u1EC3 l\u01B0u tr\u1EEF t\u00E0i li\u1EC7u d\u1EF1 \u00E1n\"\n -->\n D\u00F9ng chung RootPath\n </span>\n <nz-switch\n nzSize=\"small\"\n [ngModel]=\"drive.useSharedPhysicalRoot()\"\n (ngModelChange)=\"onToggleSharedRootMode($event)\"\n ></nz-switch>\n </div>\n <div class=\"quota-sub\">\n Ph\u1EA1m vi \u0111\u0129a:\n <strong>{{ drive.useSharedPhysicalRoot() ? \"Chung to\u00E0n d\u1EF1 \u00E1n\" : \"T\u00E1ch theo t\u1EEBng User\" }}</strong>\n </div>\n <div nz-flex nzVertical [nzGap]=\"6\" style=\"margin-top: 8px\">\n <button nz-button nzType=\"dashed\" nzSize=\"small\" nzBlock (click)=\"onSyncPhysicalDisk()\">\n <!-- \n nz-tooltip\n nzTooltipTitle=\"Qu\u00E9t c\u00E1c file/th\u01B0 m\u1EE5c copy tr\u1EF1c ti\u1EBFp tr\u00EAn \u1ED5 \u0111\u0129a Server \u0111\u1EC3 n\u1EA1p v\u00E0o Drive\"\n -->\n <nz-icon nzType=\"sync\"></nz-icon> \u0110\u1ED3ng b\u1ED9 t\u1EEB \u1ED5 \u0111\u0129a\n </button>\n <button nz-button nzType=\"default\" nzSize=\"small\" nzBlock (click)=\"openRelocateDrawer(null)\">\n <!-- \n nz-tooltip\n nzTooltipTitle=\"\u0110\u1ED5i \u0111\u01B0\u1EDDng d\u1EABn RootPath ho\u1EB7c \u00E1nh x\u1EA1 sang \u1ED5 c\u1EE9ng l\u01B0u tr\u1EEF kh\u00E1c\"\n -->\n <nz-icon nzType=\"folder-open\"></nz-icon> \u0110\u1ED5i RootPath / \u1ED4 \u0111\u0129a\n </button>\n </div>\n }\n </div>\n }\n <!-- H\u1ED8P TI\u1EBEN TR\u00CCNH UPLOAD (H\u1ED6 TR\u1EE2 T\u1EA2I TI\u1EBEP KHI L\u1ED6I / T\u1EA0M D\u1EEANG / H\u1EE6Y) -->\n @if (drive.userUploadQueue().length > 0) {\n <div class=\"upload-queue-box\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"margin-bottom: 6px\">\n <strong>Ti\u1EBFn tr\u00ECnh t\u1EA3i l\u00EAn ({{ drive.userUploadQueue().length }})</strong>\n <a (click)=\"drive.clearCompletedUploads()\" style=\"font-size: 12px\">\u1EA8n \u0111\u00E3 xong</a>\n </div>\n <input #resumeFileInput type=\"file\" hidden (change)=\"onResumeFileSelected($event)\" />\n @for (task of drive.userUploadQueue(); track task.id) {\n <div class=\"upload-task-row\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" [nzGap]=\"4\">\n <div class=\"upload-task-name\" [title]=\"task.fileName\">{{ task.fileName }}</div>\n <div nz-flex nzAlign=\"center\" [nzGap]=\"2\">\n @if (task.status === \"uploading\" && (task.fileSize || 0) >= 20971520) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n (click)=\"drive.pauseUploadTask(task.id)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"T\u1EA1m d\u1EEBng t\u1EA3i l\u00EAn\"\n -->\n <nz-icon nzType=\"pause-circle\"></nz-icon>\n </button>\n }\n @if (task.status === \"error\" || task.status === \"paused\") {\n <button\n type=\"button\"\n nz-button\n nzType=\"link\"\n nzSize=\"small\"\n style=\"padding: 0 4px; font-size: 12px; font-weight: 600\"\n (click)=\"onResumeUploadClick(task, resumeFileInput)\"\n >\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"task.errorMessage || 'T\u1EA3i l\u00EAn ti\u1EBFp t\u1EEB ph\u1EA7n tr\u0103m \u0111\u00E3 l\u01B0u (Resume Upload)'\"\n -->\n <nz-icon nzType=\"reload\"></nz-icon> T\u1EA3i ti\u1EBFp\n </button>\n }\n @if (task.status !== \"uploading\") {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzDanger\n nzSize=\"small\"\n style=\"padding: 0 4px\"\n (click)=\"drive.removeUploadTask(task.id)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"X\u00F3a kh\u1ECFi danh s\u00E1ch & h\u1EE7y phi\u00EAn t\u1EA1m\"\n -->\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n }\n </div>\n </div>\n <nz-progress\n [nzPercent]=\"task.progress\"\n nzSize=\"small\"\n [nzStatus]=\"\n task.status === 'error'\n ? 'exception'\n : task.status === 'success'\n ? 'success'\n : task.status === 'paused'\n ? 'normal'\n : 'active'\n \"\n ></nz-progress>\n @if (task.status === \"error\") {\n <div style=\"font-size: 11px; color: #ef4444; margin-top: 2px\">\n {{ task.errorMessage || \"B\u1ECB ng\u1EAFt k\u1EBFt n\u1ED1i.\" }} \u2014 B\u1EA5m <strong>T\u1EA3i ti\u1EBFp</strong> \u0111\u1EC3 n\u1ED1i l\u1EA1i t\u1EEB\n {{ task.progress }}%.\n </div>\n }\n @if (task.status === \"paused\") {\n <div style=\"font-size: 11px; color: #f59e0b; margin-top: 2px\">\n \u0110\u00E3 t\u1EA1m d\u1EEBng \u1EDF {{ task.progress }}% \u2014 B\u1EA5m <strong>T\u1EA3i ti\u1EBFp</strong> \u0111\u1EC3 ti\u1EBFp t\u1EE5c.\n </div>\n }\n </div>\n }\n </div>\n }\n <div class=\"quota-box\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\">\n <div class=\"quota-title\" style=\"margin-bottom: 0\">\n <nz-icon nzType=\"cloud\"></nz-icon> Dung l\u01B0\u1EE3ng ({{ drive.quotaPercent() }}%)\n </div>\n @if (drive.isCurrentUserAdmin()) {\n <nz-tag nzColor=\"gold\" style=\"margin-right: 0; font-size: 11px\">Admin</nz-tag>\n }\n </div>\n <nz-progress [nzPercent]=\"drive.quotaPercent()\" nzSize=\"small\" [nzShowInfo]=\"false\"></nz-progress>\n <div class=\"quota-sub\">{{ drive.usedBytes() | formatBytes }} / {{ drive.quotaLimitBytes() | formatBytes }}</div>\n @if (drive.isCurrentUserAdmin()) {\n <button\n nz-button\n nzType=\"dashed\"\n nzSize=\"small\"\n nzBlock\n style=\"margin-top: 8px\"\n (click)=\"openPermissionMatrixDrawer(drive.currentFolderId())\"\n >\n <nz-icon nzType=\"table\"></nz-icon>\n Ma tr\u1EADn ph\u00E2n quy\u1EC1n\n </button>\n <button\n nz-button\n nzType=\"dashed\"\n nzSize=\"small\"\n nzBlock\n style=\"margin-top: 8px\"\n (click)=\"openQuotaAdminDrawer()\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"\u0110\u1EB7t Quota m\u1EB7c \u0111\u1ECBnh to\u00E0n h\u1EC7 th\u1ED1ng v\u00E0 thi\u1EBFt l\u1EADp Quota ri\u00EAng cho t\u1EEBng ng\u01B0\u1EDDi d\u00F9ng (Ch\u1EC9 Admin)\"\n -->\n <nz-icon nzType=\"setting\"></nz-icon> Qu\u1EA3n l\u00FD Quota (Admin)\n </button>\n }\n </div>\n </aside>\n <!-- KHU V\u1EF0C N\u1ED8I DUNG CH\u00CDNH (H\u1ED6 TR\u1EE2 K\u00C9O TH\u1EA2 FILE & FOLDER T\u1EEA FILE EXPLORER) -->\n <main\n class=\"drive-main\"\n [class.external-drag-active]=\"isExternalFileDragging()\"\n (dragenter)=\"onMainDragEnter($event)\"\n (dragover)=\"onMainDragOver($event)\"\n (dragleave)=\"onMainDragLeave($event)\"\n (drop)=\"onMainDrop($event)\"\n >\n @if (isExternalFileDragging()) {\n <div class=\"external-drop-banner\">\n <nz-icon nzType=\"cloud-upload\" class=\"drop-banner-icon\"></nz-icon>\n <div>\n <div class=\"drop-banner-title\">\n @if (dragOverFolderName(); as targetName) {\n Th\u1EA3 t\u1EADp tin / th\u01B0 m\u1EE5c t\u1EEB m\u00E1y t\u00EDnh \u0111\u1EC3 t\u1EA3i th\u1EB3ng v\u00E0o th\u01B0 m\u1EE5c: <strong>\"{{ targetName }}\"</strong>\n } @else {\n Th\u1EA3 t\u1EADp tin ho\u1EB7c th\u01B0 m\u1EE5c t\u1EEB File Explorer v\u00E0o \u0111\u00E2y \u0111\u1EC3 t\u1EA3i l\u00EAn th\u01B0 m\u1EE5c hi\u1EC7n t\u1EA1i\n }\n </div>\n <div class=\"drop-banner-sub\">\n H\u1ED7 tr\u1EE3 k\u00E9o th\u1EA3 nhi\u1EC1u file c\u00F9ng l\u00FAc ho\u1EB7c k\u00E9o nguy\u00EAn c\u1EA3 c\u00E2y th\u01B0 m\u1EE5c t\u1EEB m\u00E1y t\u00EDnh (T\u1EF1 \u0111\u1ED9ng Chunk Upload n\u1EBFu\n file &ge; 20MB)\n </div>\n </div>\n </div>\n }\n <!-- TOOLBAR + PAGINATION -->\n <header class=\"drive-toolbar\">\n <div>\n <nz-breadcrumb>\n <nz-breadcrumb-item\n (click)=\"navigateToFolder(null)\"\n (dragover)=\"onBreadcrumbDragOver($event, '__ROOT__')\"\n (dragleave)=\"onBreadcrumbDragLeave('__ROOT__')\"\n (drop)=\"onBreadcrumbDrop($event, null)\"\n [class.bc-drop-active]=\"dragOverBreadcrumbId() === '__ROOT__'\"\n class=\"cursor-pointer\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"K\u00E9o th\u1EA3 m\u1EE5c v\u00E0o \u0111\u00E2y \u0111\u1EC3 chuy\u1EC3n v\u1EC1 th\u01B0 m\u1EE5c g\u1ED1c\"\n -->\n <nz-icon nzType=\"home\"></nz-icon>\n {{ getRootTitle() }}\n </nz-breadcrumb-item>\n @for (bc of drive.breadcrumbs(); track bc.Id) {\n <nz-breadcrumb-item\n (click)=\"navigateToFolder(bc.Id)\"\n (dragover)=\"onBreadcrumbDragOver($event, bc.Id)\"\n (dragleave)=\"onBreadcrumbDragLeave(bc.Id)\"\n (drop)=\"onBreadcrumbDrop($event, bc.Id)\"\n [class.bc-drop-active]=\"dragOverBreadcrumbId() === bc.Id\"\n class=\"cursor-pointer\"\n >\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"'K\u00E9o th\u1EA3 v\u00E0o \u0111\u00E2y \u0111\u1EC3 chuy\u1EC3n t\u1EDBi: ' + bc.Name\"\n -->\n {{ bc.Name }}\n </nz-breadcrumb-item>\n }\n </nz-breadcrumb>\n <!-- @if (drive.isCurrentUserAdmin() && drive.usePhysicalFolders() && drive.currentPhysicalPath(); as physPath) {\n <div class=\"physical-path-bar\">\n <nz-icon nzType=\"folder-open\"></nz-icon>\n <span>\n \u0110\u01B0\u1EDDng d\u1EABn v\u1EADt l\u00FD: <code>{{ physPath }}</code>\n </span>\n <icon-copy [textToCopy]=\"physPath\" tooltip=\"Sao ch\u00E9p \u0111\u01B0\u1EDDng d\u1EABn v\u1EADt l\u00FD tr\u00EAn Server\"></icon-copy>\n </div>\n } -->\n </div>\n <div class=\"toolbar-actions\">\n <nz-input-group [nzSuffix]=\"suffixIconSearch\" style=\"width: 250px\">\n <input\n type=\"text\"\n nz-input\n placeholder=\"T\u00ECm ki\u1EBFm t\u00E0i li\u1EC7u, th\u01B0 m\u1EE5c...\"\n [ngModel]=\"drive.keyword()\"\n (ngModelChange)=\"drive.keyword.set($event)\"\n (keyup.enter)=\"onSearch()\"\n />\n </nz-input-group>\n <ng-template #suffixIconSearch>\n <nz-icon nzType=\"search\" class=\"cursor-pointer\" (click)=\"onSearch()\"></nz-icon>\n </ng-template>\n <label\n nz-checkbox\n [ngModel]=\"drive.includeSubfolders()\"\n (ngModelChange)=\"onToggleIncludeSubfolders($event)\"\n style=\"user-select: none; white-space: nowrap; font-size: 13px\"\n nz-tooltip\n nzTooltipTitle=\"T\u00ECm c\u1EA3 th\u01B0 m\u1EE5c con\"\n >\n </label>\n <!-- T\u00D9Y CH\u1ECCN CH\u1EBE \u0110\u1ED8 XEM: B\u1EA2NG PH\u1EB2NG vs C\u00C2Y TH\u01AF M\u1EE4C (TREE TABLE) -->\n <div class=\"view-mode-switch\" nz-flex nzAlign=\"center\" [nzGap]=\"4\">\n <button\n nz-button\n nzSize=\"small\"\n [nzType]=\"!drive.isTreeTableView() ? 'primary' : 'default'\"\n (click)=\"onToggleTreeTableView(false)\"\n nz-tooltip\n nzTooltipTitle=\"Flat Table\"\n >\n <nz-icon nzType=\"unordered-list\"></nz-icon>\n <!-- B\u1EA3ng ph\u1EB3ng -->\n </button>\n <button\n nz-button\n nzSize=\"small\"\n [nzType]=\"drive.isTreeTableView() ? 'primary' : 'default'\"\n (click)=\"onToggleTreeTableView(true)\"\n nz-tooltip\n nzTooltipTitle=\"Tree Table\"\n >\n <nz-icon nzType=\"apartment\"></nz-icon>\n <!-- Tree Table -->\n </button>\n @if (drive.isTreeTableView()) {\n <button\n nz-button\n nzSize=\"small\"\n nzType=\"dashed\"\n (click)=\"expandAllTreeFolders()\"\n nz-tooltip\n nzTooltipTitle=\"M\u1EDF r\u1ED9ng\"\n >\n <nz-icon nzType=\"node-expand\"></nz-icon>\n </button>\n <button\n nz-button\n nzSize=\"small\"\n nzType=\"dashed\"\n (click)=\"collapseAllTreeFolders()\"\n nz-tooltip\n nzTooltipTitle=\"Thu g\u1ECDn\"\n >\n <nz-icon nzType=\"node-collapse\"></nz-icon>\n </button>\n }\n </div>\n <button\n nz-button\n nzSize=\"small\"\n nzType=\"default\"\n nz-tooltip\n [nzTooltipTitle]=\"drive.sortDesc() ? 'A \u2192 Z' : 'Z \u2192 A'\"\n (click)=\"toggleSortDirection()\"\n >\n <nz-icon [nzType]=\"drive.sortDesc() ? 'sort-descending' : 'sort-ascending'\"></nz-icon>\n </button>\n <button\n nz-button\n nzType=\"default\"\n nzSize=\"small\"\n (click)=\"refreshExplorer()\"\n nz-tooltip\n nzTooltipTitle=\"L\u00E0m m\u1EDBi\"\n >\n <nz-icon nzType=\"reload\"></nz-icon>\n </button>\n <nz-pagination\n [nzSize]=\"'small'\"\n [nzPageIndex]=\"drive.pageIndex()\"\n [nzPageSize]=\"drive.pageSize()\"\n [nzTotal]=\"drive.totalCount()\"\n [nzShowSizeChanger]=\"true\"\n [nzPageSizeOptions]=\"AppGlobals.pageSizeOptions\"\n (nzPageIndexChange)=\"drive.loadNodes($event, drive.pageSize())\"\n (nzPageSizeChange)=\"drive.loadNodes(1, $event)\"\n >\n </nz-pagination>\n </div>\n </header>\n <!-- DANH S\u00C1CH T\u1EACP TIN / TH\u01AF M\u1EE4C (H\u1ED6 TR\u1EE2 C\u1EA2 FLAT TABLE V\u00C0 TREE TABLE) -->\n <nz-table\n #explorerTable\n [nzData]=\"displayedTableItems()\"\n [nzLoading]=\"drive.loading()\"\n [nzBordered]=\"true\"\n [nzFrontPagination]=\"false\"\n [nzShowPagination]=\"false\"\n nzSize=\"small\"\n >\n <thead>\n <tr>\n <th nzWidth=\"45px\" class=\"text-center\">#</th>\n <th class=\"sortable-th\" (click)=\"onSortColumn('Name')\">\n <div class=\"th-sort-wrap\">\n <span>T\u00EAn t\u00E0i li\u1EC7u / Th\u01B0 m\u1EE5c</span>\n <span class=\"sort-icon\" [class.active]=\"drive.sortBy() === 'Name'\">\n <nz-icon\n [nzType]=\"\n drive.sortBy() === 'Name' ? (drive.sortDesc() ? 'sort-descending' : 'sort-ascending') : 'swap'\n \"\n ></nz-icon>\n </span>\n </div>\n </th>\n <th nzWidth=\"150px\" class=\"sortable-th\" (click)=\"onSortColumn('OwnerName')\">\n <div class=\"th-sort-wrap\">\n <span>Ch\u1EE7 s\u1EDF h\u1EEFu</span>\n @if (drive.sortBy() === \"OwnerName\") {\n <nz-icon [nzType]=\"drive.sortDesc() ? 'caret-down' : 'caret-up'\" class=\"sort-icon active\"></nz-icon>\n }\n </div>\n </th>\n <th nzWidth=\"130px\" class=\"text-center sortable-th\" (click)=\"onSortColumn('AccessLevel')\">\n <div class=\"th-sort-wrap justify-center\">\n <span>Quy\u1EC1n truy c\u1EADp</span>\n @if (drive.sortBy() === \"AccessLevel\") {\n <nz-icon [nzType]=\"drive.sortDesc() ? 'caret-down' : 'caret-up'\" class=\"sort-icon active\"></nz-icon>\n }\n </div>\n </th>\n <th nzWidth=\"110px\" class=\"text-right sortable-th\" (click)=\"onSortColumn('SizeBytes')\">\n <div class=\"th-sort-wrap justify-end\">\n <span>K\u00EDch th\u01B0\u1EDBc</span>\n @if (drive.sortBy() === \"SizeBytes\") {\n <nz-icon [nzType]=\"drive.sortDesc() ? 'caret-down' : 'caret-up'\" class=\"sort-icon active\"></nz-icon>\n }\n </div>\n </th>\n <th nzWidth=\"145px\" class=\"text-center sortable-th\" (click)=\"onSortColumn('UpdatedDate')\">\n <div class=\"th-sort-wrap justify-center\">\n <span>C\u1EADp nh\u1EADt cu\u1ED1i</span>\n @if (drive.sortBy() === \"UpdatedDate\") {\n <nz-icon [nzType]=\"drive.sortDesc() ? 'caret-down' : 'caret-up'\" class=\"sort-icon active\"></nz-icon>\n }\n </div>\n </th>\n <th nzWidth=\"210px\" class=\"text-center\">Thao t\u00E1c</th>\n </tr>\n </thead>\n <tbody>\n @for (item of explorerTable.data; track item.Id; let i = $index) {\n <tr\n [attr.draggable]=\"drive.currentViewMode() !== 'TRASH' && item.EffectiveAccess >= DriveAccessLevel.Editor\"\n (dragstart)=\"onRowDragStart($event, item)\"\n (dragend)=\"onRowDragEnd()\"\n (dragover)=\"onRowDragOver($event, item)\"\n (dragleave)=\"onRowDragLeave($event, item)\"\n (drop)=\"onRowDrop($event, item)\"\n (dblclick)=\"onRowDoubleClick(item)\"\n (contextmenu)=\"onContextMenu($event, menu, item)\"\n class=\"drive-row\"\n [class.dragging-row]=\"draggedNode()?.Id === item.Id\"\n [class.drop-target-active]=\"dragOverFolderId() === item.Id\"\n >\n <td class=\"text-center\">{{ i + 1 + (drive.pageIndex() - 1) * drive.pageSize() }}</td>\n <td\n [nzIndentSize]=\"drive.isTreeTableView() ? (item.treeLevel || 0) * 22 : 0\"\n [nzShowExpand]=\"drive.isTreeTableView() && isFolderLike(item) && !item.IsBrokenShortcut\"\n [nzExpand]=\"!!item.treeExpanded\"\n (nzExpandChange)=\"toggleExpandTreeFolder(item, $event)\"\n >\n <div class=\"node-name-cell\">\n <span class=\"node-icon-wrap\">\n <nz-icon\n [nzType]=\"isFolderLike(item) ? 'folder-fill' : getFileIcon(item)\"\n [style.color]=\"isFolderLike(item) ? '#f59e0b' : 'var(--primary-color)'\"\n class=\"node-icon\"\n ></nz-icon>\n @if (item.NodeType === DriveNodeType.Shortcut) {\n <span class=\"shortcut-badge\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"'L\u1ED1i t\u1EAFt tr\u1ECF t\u1EDBi: ' + (item.ShortcutTargetName || item.Name)\"\n -->\n <nz-icon nzType=\"select\"></nz-icon>\n </span>\n }\n </span>\n <span class=\"node-title link-detail\" (click)=\"onRowSingleClick(item)\">{{ item.Name }}</span>\n @if (drive.keyword().trim() && item.ParentFolderName && item.ParentId !== drive.currentFolderId()) {\n <nz-tag\n nzColor=\"default\"\n style=\"margin-left: 6px; cursor: pointer\"\n (click)=\"$event.stopPropagation(); navigateToFolder(item.ParentId || null)\"\n >\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"'\u0110ang n\u1EB1m trong th\u01B0 m\u1EE5c: ' + item.ParentFolderName + ' (Nh\u1EA5n \u0111\u1EC3 m\u1EDF th\u01B0 m\u1EE5c)'\"\n -->\n <nz-icon nzType=\"folder\"></nz-icon> {{ item.ParentFolderName }}\n </nz-tag>\n }\n @if (item.NodeType === DriveNodeType.Shortcut) {\n @if (item.IsBrokenShortcut) {\n <nz-tag nzColor=\"error\" style=\"margin-left: 6px\">M\u1EE5c g\u1ED1c \u0111\u00E3 x\u00F3a</nz-tag>\n } @else {\n <nz-tag nzColor=\"purple\" style=\"margin-left: 6px\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"'\u0110\u00EDch: ' + (item.ShortcutTargetName || item.Name)\"\n -->\n <nz-icon nzType=\"link\"></nz-icon> L\u1ED1i t\u1EAFt\n </nz-tag>\n }\n }\n @if (item.IsStarred) {\n <nz-icon nzType=\"star\" nzTheme=\"fill\" style=\"color: #eab308; margin-left: 4px\"></nz-icon>\n }\n @if (item.IsShared) {\n <nz-tag nzColor=\"processing\" style=\"margin-left: 6px\">\u0110\u00E3 chia s\u1EBB</nz-tag>\n }\n @if (!item.InheritPermissions) {\n <nz-tag nzColor=\"warning\" nz-tooltip nzTooltipTitle=\"\u0110\u00E3 ng\u1EAFt k\u1EBF th\u1EEBa quy\u1EC1n t\u1EEB th\u01B0 m\u1EE5c cha\">\n \u0110\u1ED9c l\u1EADp\n </nz-tag>\n }\n </div>\n </td>\n <td>{{ item.OwnerName || item.OwnerId }}</td>\n <td class=\"text-center\">\n <nz-tag\n [nzColor]=\"\n item.EffectiveAccess >= DriveAccessLevel.Editor\n ? 'green'\n : item.EffectiveAccess >= DriveAccessLevel.Uploader\n ? 'cyan'\n : 'default'\n \"\n >\n {{\n item.EffectiveAccess >= DriveAccessLevel.Manager\n ? \"Qu\u1EA3n tr\u1ECB\"\n : item.EffectiveAccess >= DriveAccessLevel.Editor\n ? \"Ch\u1EC9nh s\u1EEDa\"\n : item.EffectiveAccess >= DriveAccessLevel.Uploader\n ? \"Xem & T\u1EA3i l\u00EAn\"\n : item.CanDownload && item.EffectiveAccess >= DriveAccessLevel.Downloader\n ? \"Xem & T\u1EA3i\"\n : \"Ch\u1EC9 xem\"\n }}\n </nz-tag>\n </td>\n <td class=\"text-right\">\n {{ isFolderLike(item) ? \"\u2014\" : (item.SizeBytes | formatBytes) }}\n </td>\n <td class=\"text-center\">{{ item.UpdatedDate | date: \"dd/MM/yyyy HH:mm\" }}</td>\n <td class=\"text-center\">\n <div class=\"action-btn-group\">\n @if (drive.currentViewMode() !== \"TRASH\") {\n @if (item.CanShare || item.EffectiveAccess >= DriveAccessLevel.Manager) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); openShareDrawer(item)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"Chia s\u1EBB & Ph\u00E2n quy\u1EC1n (Drawer)\"\n -->\n <nz-icon nzType=\"share-alt\"></nz-icon>\n </button>\n }\n @if (item.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); openMoveDrawer(item)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"Di chuy\u1EC3n sang th\u01B0 m\u1EE5c kh\u00E1c (Move Drawer ho\u1EB7c K\u00E9o th\u1EA3)\"\n -->\n <nz-icon nzType=\"drag\"></nz-icon>\n </button>\n }\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); openCopyDrawer(item)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"Sao ch\u00E9p t\u1EDBi... (Copy To Drawer)\"\n -->\n <nz-icon nzType=\"copy\"></nz-icon>\n </button>\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); openShortcutDrawer(item)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"T\u1EA1o l\u1ED1i t\u1EAFt (Shortcut Drawer)\"\n -->\n <nz-icon nzType=\"link\"></nz-icon>\n </button>\n @if (\n item.NodeType === DriveNodeType.Folder &&\n drive.usePhysicalFolders() &&\n item.EffectiveAccess >= DriveAccessLevel.Manager\n ) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); openRelocateDrawer(item)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"\u0110\u1ED5i \u0111\u01B0\u1EDDng d\u1EABn v\u1EADt l\u00FD / \u00C1nh x\u1EA1 \u1ED5 c\u1EE9ng l\u01B0u tr\u1EEF (Drawer)\"\n -->\n <nz-icon nzType=\"hdd\"></nz-icon>\n </button>\n }\n @if (\n isFileLike(item) &&\n !item.IsBrokenShortcut &&\n item.CanDownload &&\n item.EffectiveAccess >= DriveAccessLevel.Downloader\n ) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); onDownloadItem(item)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"T\u1EA3i xu\u1ED1ng\"\n -->\n <nz-icon nzType=\"download\"></nz-icon>\n </button>\n }\n @if (\n isFileLike(item) && !item.IsBrokenShortcut && item.EffectiveAccess >= DriveAccessLevel.Editor\n ) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); openVersionDrawer(item)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"L\u1ECBch s\u1EED phi\u00EAn b\u1EA3n (Drawer)\"\n -->\n <nz-icon nzType=\"history\"></nz-icon>\n </button>\n }\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); openFolderDrawer('rename', item)\"\n >\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"\n item.EffectiveAccess >= DriveAccessLevel.Editor\n ? '\u0110\u1ED5i t\u00EAn & Chi ti\u1EBFt (Drawer)'\n : 'Xem chi ti\u1EBFt & Nh\u1EADt k\u00FD (Drawer)'\n \"\n -->\n <nz-icon\n [nzType]=\"item.EffectiveAccess >= DriveAccessLevel.Editor ? 'edit' : 'info-circle'\"\n ></nz-icon>\n </button>\n @if (item.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-warn\"\n (click)=\"$event.stopPropagation(); onSoftDelete(item)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"Chuy\u1EC3n v\u00E0o th\u00F9ng r\u00E1c\"\n -->\n <nz-icon nzType=\"delete\"></nz-icon>\n </button>\n }\n } @else {\n @if (item.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); onRestore(item)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"Kh\u00F4i ph\u1EE5c\"\n -->\n <nz-icon nzType=\"rollback\"></nz-icon>\n </button>\n }\n @if (item.EffectiveAccess >= DriveAccessLevel.Manager) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-warn\"\n (click)=\"$event.stopPropagation(); onPermanentDelete(item)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"X\u00F3a v\u0129nh vi\u1EC5n\"\n -->\n <nz-icon nzType=\"delete\"></nz-icon>\n </button>\n }\n }\n </div>\n </td>\n </tr>\n }\n </tbody>\n </nz-table>\n <!-- CONTEXT MENU CHU\u1ED8T PH\u1EA2I -->\n <nz-dropdown-menu #menu=\"nzDropdownMenu\">\n @if (selectedContextItem(); as ctx) {\n <ul nz-menu>\n @if (ctx.NodeType === DriveNodeType.File) {\n <li nz-menu-item (click)=\"previewFile(ctx)\">\n <nz-icon nzType=\"eye\"></nz-icon> Xem tr\u1EF1c ti\u1EBFp (Drawer Preview)\n </li>\n @if (ctx.CanDownload && ctx.EffectiveAccess >= DriveAccessLevel.Downloader) {\n <li nz-menu-item (click)=\"onDownloadItem(ctx)\"><nz-icon nzType=\"download\"></nz-icon> T\u1EA3i xu\u1ED1ng</li>\n }\n @if (ctx.EffectiveAccess >= DriveAccessLevel.Editor) {\n <li nz-menu-item (click)=\"openVersionDrawer(ctx)\">\n <nz-icon nzType=\"history\"></nz-icon> L\u1ECBch s\u1EED phi\u00EAn b\u1EA3n...\n </li>\n }\n <li nz-menu-divider></li>\n }\n @if (ctx.CanShare || ctx.EffectiveAccess >= DriveAccessLevel.Manager) {\n <li nz-menu-item (click)=\"openShareDrawer(ctx)\">\n <nz-icon nzType=\"usergroup-add\"></nz-icon> Ph\u00E2n quy\u1EC1n & Chia s\u1EBB...\n </li>\n }\n @if (ctx.EffectiveAccess >= DriveAccessLevel.Editor) {\n <li nz-menu-item (click)=\"openMoveDrawer(ctx)\">\n <nz-icon nzType=\"drag\"></nz-icon> Di chuy\u1EC3n sang th\u01B0 m\u1EE5c kh\u00E1c...\n </li>\n }\n <li nz-menu-item (click)=\"openCopyDrawer(ctx)\">\n <nz-icon nzType=\"copy\"></nz-icon> Sao ch\u00E9p t\u1EDBi (Copy to)...\n </li>\n <li nz-menu-item (click)=\"openShortcutDrawer(ctx)\">\n <nz-icon nzType=\"link\"></nz-icon> T\u1EA1o l\u1ED1i t\u1EAFt (Shortcut)...\n </li>\n @if (\n ctx.NodeType === DriveNodeType.Folder &&\n drive.usePhysicalFolders() &&\n ctx.EffectiveAccess >= DriveAccessLevel.Manager\n ) {\n <li nz-menu-item (click)=\"openRelocateDrawer(ctx)\">\n <nz-icon nzType=\"hdd\"></nz-icon> \u0110\u1ED5i \u0111\u01B0\u1EDDng d\u1EABn v\u1EADt l\u00FD / Chuy\u1EC3n \u1ED5 \u0111\u0129a...\n </li>\n }\n <li nz-menu-item (click)=\"openFolderDrawer('rename', ctx)\">\n <nz-icon [nzType]=\"ctx.EffectiveAccess >= DriveAccessLevel.Editor ? 'edit' : 'info-circle'\"></nz-icon>\n {{\n ctx.EffectiveAccess >= DriveAccessLevel.Editor ? \"\u0110\u1ED5i t\u00EAn & Chi ti\u1EBFt...\" : \"Xem chi ti\u1EBFt & Nh\u1EADt k\u00FD...\"\n }}\n </li>\n <li nz-menu-item (click)=\"drive.toggleStar(ctx.Id)\">\n <nz-icon nzType=\"star\"></nz-icon> {{ ctx.IsStarred ? \"B\u1ECF d\u1EA5u sao\" : \"Th\u00EAm d\u1EA5u sao\" }}\n </li>\n @if (ctx.EffectiveAccess >= DriveAccessLevel.Editor) {\n <li nz-menu-divider></li>\n <li nz-menu-item nzDanger (click)=\"onSoftDelete(ctx)\">\n <nz-icon nzType=\"delete\"></nz-icon> Chuy\u1EC3n v\u00E0o th\u00F9ng r\u00E1c\n </li>\n }\n </ul>\n }\n </nz-dropdown-menu>\n </main>\n </div>\n <!-- ========================================================================= -->\n <!-- DRAWER 1: CHIA S\u1EBA & PH\u00C2N QUY\u1EC0N (ACL / RBAC / SHARE LINKS) -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"shareDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"840\"\n [nzClosable]=\"false\"\n [nzTitle]=\"shareDrawerTitleTpl\"\n [nzFooter]=\"shareDrawerFooterTpl\"\n (nzOnClose)=\"shareDrawerVisible = false\"\n >\n <ng-template #shareDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n @if (activeActionNode(); as node) {\n <nz-icon\n [nzType]=\"node.NodeType === DriveNodeType.Folder ? 'folder-fill' : getFileIcon(node)\"\n [style.color]=\"node.NodeType === DriveNodeType.Folder ? '#f59e0b' : 'var(--primary-color)'\"\n style=\"font-size: 18px\"\n ></nz-icon>\n <strong>Chia s\u1EBB & Ph\u00E2n quy\u1EC1n: {{ node.Name }}</strong>\n <nz-tag nzColor=\"blue\">{{ node.NodeType === DriveNodeType.Folder ? \"Th\u01B0 m\u1EE5c\" : \"T\u1EADp tin\" }}</nz-tag>\n }\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"shareDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n @if (activeActionNode(); as node) {\n <lib-drive-share-modal [nodeId]=\"node.Id\"></lib-drive-share-modal>\n }\n </ng-container>\n <ng-template #shareDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"shareDrawerVisible = false\">\u0110\u00F3ng</button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 2: L\u1ECACH S\u1EEC PHI\u00CAN B\u1EA2N T\u1EACP TIN (FILE VERSIONS) -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"versionDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"760\"\n [nzClosable]=\"false\"\n [nzTitle]=\"versionDrawerTitleTpl\"\n [nzFooter]=\"versionDrawerFooterTpl\"\n (nzOnClose)=\"versionDrawerVisible = false\"\n >\n <ng-template #versionDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"history\" style=\"font-size: 18px; color: var(--primary-color)\"></nz-icon>\n <strong>L\u1ECBch s\u1EED phi\u00EAn b\u1EA3n: {{ activeActionNode()?.Name }}</strong>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"versionDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n @if (activeActionNode(); as node) {\n <lib-drive-version-modal\n [nodeId]=\"node.Id\"\n [nodeName]=\"node.Name\"\n [canEdit]=\"node.EffectiveAccess >= DriveAccessLevel.Editor\"\n [canDownload]=\"node.CanDownload && node.EffectiveAccess >= DriveAccessLevel.Downloader\"\n (closed)=\"versionDrawerVisible = false\"\n ></lib-drive-version-modal>\n }\n </ng-container>\n <ng-template #versionDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"versionDrawerVisible = false\">\u0110\u00F3ng</button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 3: T\u1EA0O TH\u01AF M\u1EE4C M\u1EDAI / \u0110\u1ED4I T\u00CAN & CHI TI\u1EBET THU\u1ED8C T\u00CDNH + ACTIVITY LOG -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"folderDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"480\"\n [nzClosable]=\"false\"\n [nzTitle]=\"folderDrawerTitleTpl\"\n [nzFooter]=\"folderDrawerFooterTpl\"\n (nzOnClose)=\"folderDrawerVisible = false\"\n >\n <ng-template #folderDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon\n [nzType]=\"folderDrawerMode === 'create' ? 'folder-add' : canRenameTargetNode() ? 'edit' : 'info-circle'\"\n style=\"font-size: 18px; color: var(--primary-color)\"\n ></nz-icon>\n <strong>\n {{\n folderDrawerMode === \"create\"\n ? \"T\u1EA1o th\u01B0 m\u1EE5c m\u1EDBi\"\n : canRenameTargetNode()\n ? \"\u0110\u1ED5i t\u00EAn & Chi ti\u1EBFt m\u1EE5c\"\n : \"Chi ti\u1EBFt & Nh\u1EADt k\u00FD ho\u1EA1t \u0111\u1ED9ng\"\n }}\n </strong>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"folderDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n <div nz-flex nzVertical [nzGap]=\"16\">\n <div>\n <label class=\"drawer-field-label\">\n {{ folderDrawerMode === \"create\" ? \"T\u00EAn th\u01B0 m\u1EE5c m\u1EDBi\" : \"T\u00EAn hi\u1EC3n th\u1ECB\" }}\n </label>\n <input\n nz-input\n [(ngModel)]=\"folderDrawerInputName\"\n [disabled]=\"folderDrawerMode === 'rename' && !canRenameTargetNode()\"\n [appAutoFocus]=\"folderDrawerVisible && (folderDrawerMode === 'create' || canRenameTargetNode())\"\n placeholder=\"Nh\u1EADp t\u00EAn th\u01B0 m\u1EE5c / t\u00E0i li\u1EC7u...\"\n (keyup.enter)=\"submitFolderDrawer()\"\n />\n </div>\n @if (folderDrawerMode === \"create\" && drive.usePhysicalFolders() && drive.currentPhysicalPath(); as phys) {\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">Ch\u1EBF \u0111\u1ED9 l\u01B0u tr\u1EEF:</span>\n <nz-tag nzColor=\"green\">Th\u01B0 m\u1EE5c v\u1EADt l\u00FD (Disk)</nz-tag>\n </div>\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">Th\u01B0 m\u1EE5c cha tr\u00EAn \u0111\u0129a:</span>\n <code class=\"break-word\">{{ phys }}</code>\n </div>\n </div>\n }\n @if (folderDrawerMode === \"rename\" && folderDrawerTargetNode; as target) {\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-header\">\n <nz-icon\n [nzType]=\"target.NodeType === DriveNodeType.Folder ? 'folder-fill' : getFileIcon(target)\"\n [style.color]=\"target.NodeType === DriveNodeType.Folder ? '#f59e0b' : 'var(--primary-color)'\"\n style=\"font-size: 22px\"\n ></nz-icon>\n <div>\n <div style=\"font-weight: 600\">{{ target.Name }}</div>\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">\n {{\n target.NodeType === DriveNodeType.Folder\n ? \"Th\u01B0 m\u1EE5c\"\n : \"T\u1EADp tin (\" + (target.Extension || target.MimeType || \"File\") + \")\"\n }}\n </div>\n </div>\n </div>\n <nz-divider style=\"margin: 10px 0\"></nz-divider>\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">Ch\u1EE7 s\u1EDF h\u1EEFu:</span>\n <strong>{{ target.OwnerName || target.OwnerId }}</strong>\n </div>\n @if (target.NodeType === DriveNodeType.File) {\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">K\u00EDch th\u01B0\u1EDBc:</span>\n <span>{{ target.SizeBytes | formatBytes }}</span>\n </div>\n }\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">Quy\u1EC1n c\u1EE7a b\u1EA1n:</span>\n <nz-tag\n [nzColor]=\"\n target.EffectiveAccess >= DriveAccessLevel.Editor\n ? 'green'\n : target.EffectiveAccess >= DriveAccessLevel.Uploader\n ? 'cyan'\n : 'default'\n \"\n >\n {{\n target.EffectiveAccess >= DriveAccessLevel.Manager\n ? \"Qu\u1EA3n tr\u1ECB (Manager)\"\n : target.EffectiveAccess >= DriveAccessLevel.Editor\n ? \"Ch\u1EC9nh s\u1EEDa (Editor)\"\n : target.EffectiveAccess >= DriveAccessLevel.Uploader\n ? \"Xem & T\u1EA3i l\u00EAn (Uploader)\"\n : target.CanDownload && target.EffectiveAccess >= DriveAccessLevel.Downloader\n ? \"Xem & T\u1EA3i xu\u1ED1ng\"\n : \"Ch\u1EC9 xem (Viewer)\"\n }}\n </nz-tag>\n </div>\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">K\u1EBF th\u1EEBa quy\u1EC1n:</span>\n <nz-tag [nzColor]=\"target.InheritPermissions ? 'blue' : 'warning'\">\n {{ target.InheritPermissions ? \"\u0110ang k\u1EBF th\u1EEBa\" : \"\u0110\u1ED9c l\u1EADp\" }}\n </nz-tag>\n </div>\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">C\u1EADp nh\u1EADt cu\u1ED1i:</span>\n <span>{{ target.UpdatedDate | date: \"dd/MM/yyyy HH:mm\" }}</span>\n </div>\n @if (target.PhysicalRelativePath) {\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">\u0110\u01B0\u1EDDng d\u1EABn \u0111\u0129a:</span>\n <code class=\"break-word\">{{ target.PhysicalRelativePath }}</code>\n </div>\n }\n @if (drive.isCurrentUserAdmin() && drive.usePhysicalFolders() && drive.currentPhysicalPath(); as physPath) {\n <div class=\"physical-path-bar\">\n <span style=\"word-break: break-all\">\n \u0110\u01B0\u1EDDng d\u1EABn v\u1EADt l\u00FD: <code style=\"padding-top: 0px\">{{ physPath }}</code>\n </span>\n <icon-copy [textToCopy]=\"physPath\" tooltip=\"Sao ch\u00E9p \u0111\u01B0\u1EDDng d\u1EABn v\u1EADt l\u00FD tr\u00EAn Server\"></icon-copy>\n </div>\n }\n </div>\n <div>\n <label class=\"drawer-field-label\">Thao t\u00E1c nhanh</label>\n <div nz-flex nzWrap=\"wrap\" [nzGap]=\"8\">\n @if (target.CanShare || target.EffectiveAccess >= DriveAccessLevel.Manager) {\n <button nz-button nzSize=\"small\" (click)=\"folderDrawerVisible = false; openShareDrawer(target)\">\n <nz-icon nzType=\"share-alt\"></nz-icon> Chia s\u1EBB & Ph\u00E2n quy\u1EC1n\n </button>\n }\n @if (target.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button nz-button nzSize=\"small\" (click)=\"folderDrawerVisible = false; openMoveDrawer(target)\">\n <nz-icon nzType=\"drag\"></nz-icon> Di chuy\u1EC3n\n </button>\n }\n <button nz-button nzSize=\"small\" (click)=\"folderDrawerVisible = false; openCopyDrawer(target)\">\n <nz-icon nzType=\"copy\"></nz-icon> Sao ch\u00E9p t\u1EDBi\n </button>\n <button nz-button nzSize=\"small\" (click)=\"folderDrawerVisible = false; openShortcutDrawer(target)\">\n <nz-icon nzType=\"link\"></nz-icon> T\u1EA1o l\u1ED1i t\u1EAFt\n </button>\n @if (\n target.NodeType === DriveNodeType.Folder &&\n drive.usePhysicalFolders() &&\n target.EffectiveAccess >= DriveAccessLevel.Manager\n ) {\n <button nz-button nzSize=\"small\" (click)=\"folderDrawerVisible = false; openRelocateDrawer(target)\">\n <nz-icon nzType=\"hdd\"></nz-icon> \u0110\u1ED5i \u1ED5 \u0111\u0129a v\u1EADt l\u00FD\n </button>\n }\n @if (target.NodeType === DriveNodeType.File) {\n @if (target.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button nz-button nzSize=\"small\" (click)=\"folderDrawerVisible = false; openVersionDrawer(target)\">\n <nz-icon nzType=\"history\"></nz-icon> L\u1ECBch s\u1EED phi\u00EAn b\u1EA3n\n </button>\n }\n @if (target.CanDownload && target.EffectiveAccess >= DriveAccessLevel.Downloader) {\n <button nz-button nzSize=\"small\" (click)=\"onDownloadItem(target)\">\n <nz-icon nzType=\"download\"></nz-icon> T\u1EA3i xu\u1ED1ng\n </button>\n }\n }\n <button nz-button nzSize=\"small\" (click)=\"drive.toggleStar(target.Id)\">\n <nz-icon nzType=\"star\" [nzTheme]=\"target.IsStarred ? 'fill' : 'outline'\"></nz-icon>\n {{ target.IsStarred ? \"B\u1ECF sao\" : \"G\u1EAFn sao\" }}\n </button>\n </div>\n </div>\n <!-- NH\u1EACT K\u00DD HO\u1EA0T \u0110\u1ED8NG (ACTIVITY LOG) -->\n <div>\n <label class=\"drawer-field-label\">\n <nz-icon nzType=\"OrderedList\"></nz-icon> Nh\u1EADt k\u00FD ho\u1EA1t \u0111\u1ED9ng g\u1EA7n \u0111\u00E2y ({{ nodeActivities().length }})\n </label>\n <div class=\"drawer-meta-card\" style=\"max-height: 240px; overflow-y: auto\">\n @if (nodeActivities().length === 0) {\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">Ch\u01B0a c\u00F3 nh\u1EADt k\u00FD ho\u1EA1t \u0111\u1ED9ng.</div>\n } @else {\n @for (act of nodeActivities(); track act.Id) {\n <div style=\"padding: 6px 0; border-bottom: 1px dashed var(--app-border, #e2e8f0); font-size: 12px\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\">\n <nz-tag nzColor=\"blue\">{{ formatActivityAction(act.ActionType) }}</nz-tag>\n <span style=\"color: var(--app-text-muted, #64748b)\">{{\n act.CreatedDate | date: \"dd/MM/yyyy HH:mm:ss\"\n }}</span>\n </div>\n <div style=\"margin-top: 4px\">\n Th\u1EF1c hi\u1EC7n b\u1EDFi: <strong>{{ act.ActorUserName || act.ActorUserId || \"H\u1EC7 th\u1ED1ng\" }}</strong>\n </div>\n @if (act.DetailJson) {\n <div style=\"margin-top: 2px; color: var(--app-text-muted, #64748b); word-break: break-all\">\n <code>{{ formatActivityDetail(act) }}</code>\n </div>\n }\n </div>\n }\n }\n </div>\n </div>\n }\n </div>\n </ng-container>\n <ng-template #folderDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"folderDrawerVisible = false\">\u0110\u00F3ng</button>\n @if (folderDrawerMode === \"create\" || canRenameTargetNode()) {\n <button nz-button nzType=\"primary\" (click)=\"submitFolderDrawer()\">\n <nz-icon nzType=\"check\"></nz-icon>\n {{ folderDrawerMode === \"create\" ? \"T\u1EA1o th\u01B0 m\u1EE5c\" : \"L\u01B0u t\u00EAn m\u1EDBi\" }}\n </button>\n }\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 4: XEM TR\u1EF0C TUY\u1EBEN T\u00C0I LI\u1EC6U (PREVIEW DRAWER) -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"previewDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"'75vw'\"\n [nzClosable]=\"false\"\n [nzTitle]=\"previewDrawerTitleTpl\"\n [nzFooter]=\"previewDrawerFooterTpl\"\n (nzOnClose)=\"previewDrawerVisible = false\"\n >\n <ng-template #previewDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"eye\" style=\"font-size: 18px; color: var(--primary-color)\"></nz-icon>\n <strong>{{ previewFileName }}</strong>\n </div>\n <div nz-flex nzAlign=\"center\" [nzGap]=\"8\">\n @if (activeActionNode(); as node) {\n @if (node.CanDownload && node.EffectiveAccess >= DriveAccessLevel.Downloader) {\n <button nz-button nzSize=\"small\" nzType=\"primary\" (click)=\"onDownloadItem(node)\">\n <nz-icon nzType=\"download\"></nz-icon> T\u1EA3i xu\u1ED1ng\n </button>\n }\n @if (node.CanShare || node.EffectiveAccess >= DriveAccessLevel.Manager) {\n <button nz-button nzSize=\"small\" (click)=\"previewDrawerVisible = false; openShareDrawer(node)\">\n <nz-icon nzType=\"share-alt\"></nz-icon> Chia s\u1EBB\n </button>\n }\n @if (node.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button nz-button nzSize=\"small\" (click)=\"previewDrawerVisible = false; openVersionDrawer(node)\">\n <nz-icon nzType=\"history\"></nz-icon> Phi\u00EAn b\u1EA3n\n </button>\n }\n }\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"previewDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n <extend-view-file-content\n [previewType]=\"previewType\"\n [previewContent]=\"previewContent\"\n ></extend-view-file-content>\n </ng-container>\n <ng-template #previewDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button type=\"button\" nz-button (click)=\"previewDrawerVisible = false\">\u0110\u00F3ng</button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 5: T\u1EA0O L\u1ED0I T\u1EAET (CREATE SHORTCUT DRAWER CHO FILE & FOLDER) -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"shortcutDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"460\"\n [nzClosable]=\"false\"\n [nzTitle]=\"shortcutDrawerTitleTpl\"\n [nzFooter]=\"shortcutDrawerFooterTpl\"\n (nzOnClose)=\"shortcutDrawerVisible = false\"\n >\n <ng-template #shortcutDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"link\" style=\"font-size: 18px; color: #7c3aed\"></nz-icon>\n <strong>T\u1EA1o l\u1ED1i t\u1EAFt (Shortcut)</strong>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"shortcutDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n @if (shortcutSourceNode(); as src) {\n <div nz-flex nzVertical [nzGap]=\"16\">\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-header\">\n <nz-icon\n [nzType]=\"isFolderLike(src) ? 'folder-fill' : getFileIcon(src)\"\n [style.color]=\"isFolderLike(src) ? '#f59e0b' : 'var(--primary-color)'\"\n style=\"font-size: 22px\"\n ></nz-icon>\n <div>\n <div style=\"font-weight: 600\">{{ src.ShortcutTargetName || src.Name }}</div>\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">\n M\u1EE5c g\u1ED1c: {{ isFolderLike(src) ? \"Th\u01B0 m\u1EE5c\" : \"T\u1EADp tin\" }} \u2022 Ch\u1EE7 s\u1EDF h\u1EEFu:\n {{ src.OwnerName || src.OwnerId }}\n </div>\n </div>\n </div>\n </div>\n <div>\n <label class=\"drawer-field-label\">T\u00EAn l\u1ED1i t\u1EAFt</label>\n <input\n nz-input\n [(ngModel)]=\"shortcutInputName\"\n [appAutoFocus]=\"shortcutDrawerVisible\"\n placeholder=\"Nh\u1EADp t\u00EAn hi\u1EC3n th\u1ECB c\u1EE7a l\u1ED1i t\u1EAFt...\"\n (keyup.enter)=\"submitShortcutDrawer()\"\n />\n </div>\n <div>\n <label class=\"drawer-field-label\">Kh\u00F4ng gian l\u01B0u l\u1ED1i t\u1EAFt</label>\n <nz-select\n [(ngModel)]=\"shortcutSpaceKey\"\n (ngModelChange)=\"onShortcutSpaceKeyChange($event)\"\n style=\"width: 100%\"\n >\n <nz-option nzValue=\"MY_DRIVE\" nzLabel=\"Drive c\u00E1 nh\u00E2n (My Drive)\"></nz-option>\n <nz-option nzValue=\"ORG_DRIVE\" nzLabel=\"Kho T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB (Org Drive)\"></nz-option>\n @for (sp of drive.customSpaces(); track sp.Id) {\n <nz-option [nzValue]=\"'CUSTOM:' + sp.Id\" [nzLabel]=\"'\uD83D\uDCC2 ' + sp.Name\"></nz-option>\n }\n </nz-select>\n </div>\n <div>\n <label class=\"drawer-field-label\">Th\u01B0 m\u1EE5c \u0111\u00EDch ch\u1EE9a l\u1ED1i t\u1EAFt</label>\n <nz-select\n nzShowSearch\n nzAllowClear\n nzPlaceHolder=\"-- Th\u01B0 m\u1EE5c g\u1ED1c (Root) --\"\n [(ngModel)]=\"shortcutDestFolderId\"\n style=\"width: 100%\"\n >\n <nz-option [nzValue]=\"null\" nzLabel=\"\uD83D\uDCC1 Th\u01B0 m\u1EE5c g\u1ED1c (Root)\"></nz-option>\n @for (f of availableFolders(); track f.Id) {\n <nz-option [nzValue]=\"f.Id\" [nzLabel]=\"'\uD83D\uDCC2 ' + f.Name\"></nz-option>\n }\n </nz-select>\n <div class=\"quota-sub\" style=\"margin-top: 6px\">\n L\u1ED1i t\u1EAFt tr\u1ECF tr\u1EF1c ti\u1EBFp t\u1EDBi m\u1EE5c g\u1ED1c m\u00E0 kh\u00F4ng t\u1ED1n th\u00EAm dung l\u01B0\u1EE3ng l\u01B0u tr\u1EEF (0 B).\n </div>\n </div>\n </div>\n }\n </ng-container>\n <ng-template #shortcutDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"shortcutDrawerVisible = false\">H\u1EE7y</button>\n <button nz-button nzType=\"primary\" (click)=\"submitShortcutDrawer()\">\n <nz-icon nzType=\"link\"></nz-icon> T\u1EA1o l\u1ED1i t\u1EAFt\n </button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 6: DI CHUY\u1EC2N FILE / FOLDER SANG TH\u01AF M\u1EE4C HO\u1EB6C KH\u00D4NG GIAN KH\u00C1C -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"moveDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"460\"\n [nzClosable]=\"false\"\n [nzTitle]=\"moveDrawerTitleTpl\"\n [nzFooter]=\"moveDrawerFooterTpl\"\n (nzOnClose)=\"moveDrawerVisible = false\"\n >\n <ng-template #moveDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"drag\" style=\"font-size: 18px; color: var(--primary-color)\"></nz-icon>\n <strong>Di chuy\u1EC3n sang th\u01B0 m\u1EE5c / kh\u00F4ng gian kh\u00E1c</strong>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"moveDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n @if (moveSourceNode(); as src) {\n <div nz-flex nzVertical [nzGap]=\"16\">\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-header\">\n <nz-icon\n [nzType]=\"isFolderLike(src) ? 'folder-fill' : getFileIcon(src)\"\n [style.color]=\"isFolderLike(src) ? '#f59e0b' : 'var(--primary-color)'\"\n style=\"font-size: 22px\"\n ></nz-icon>\n <div>\n <div style=\"font-weight: 600\">{{ src.Name }}</div>\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">\n Lo\u1EA1i:\n {{\n src.NodeType === DriveNodeType.Folder\n ? \"Th\u01B0 m\u1EE5c\"\n : src.NodeType === DriveNodeType.Shortcut\n ? \"L\u1ED1i t\u1EAFt\"\n : \"T\u1EADp tin\"\n }}\n \u2022 Kh\u00F4ng gian hi\u1EC7n t\u1EA1i: {{ src.IsOrgNode ? \"T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB\" : \"Drive c\u00E1 nh\u00E2n\" }}\n </div>\n </div>\n </div>\n </div>\n <div>\n <label class=\"drawer-field-label\">Kh\u00F4ng gian \u0111\u00EDch</label>\n <nz-select\n [(ngModel)]=\"moveTargetSpaceKey\"\n (ngModelChange)=\"onMoveSpaceKeyChange($event)\"\n style=\"width: 100%\"\n >\n <nz-option nzValue=\"MY_DRIVE\" nzLabel=\"Drive c\u00E1 nh\u00E2n (My Drive)\"></nz-option>\n <nz-option nzValue=\"ORG_DRIVE\" nzLabel=\"Kho T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB (Org Drive)\"></nz-option>\n @for (sp of drive.customSpaces(); track sp.Id) {\n <nz-option [nzValue]=\"'CUSTOM:' + sp.Id\" [nzLabel]=\"'\uD83D\uDCC2 ' + sp.Name\"></nz-option>\n }\n </nz-select>\n </div>\n <div>\n <label class=\"drawer-field-label\">Ch\u1ECDn th\u01B0 m\u1EE5c \u0111\u00EDch</label>\n <nz-select\n nzShowSearch\n nzAllowClear\n nzPlaceHolder=\"-- Th\u01B0 m\u1EE5c g\u1ED1c (Root) --\"\n [(ngModel)]=\"moveTargetFolderId\"\n style=\"width: 100%\"\n >\n <nz-option [nzValue]=\"null\" nzLabel=\"\uD83D\uDCC1 Th\u01B0 m\u1EE5c g\u1ED1c (Root)\"></nz-option>\n @for (f of moveTargetFolders(); track f.Id) {\n <nz-option [nzValue]=\"f.Id\" [nzLabel]=\"'\uD83D\uDCC2 ' + f.Name\"></nz-option>\n }\n </nz-select>\n <div class=\"quota-sub\" style=\"margin-top: 6px\">\n M\u1EB9o: B\u1EA1n c\u00F3 th\u1EC3 k\u00E9o th\u1EA3 tr\u1EF1c ti\u1EBFp d\u00F2ng t\u00E0i li\u1EC7u/th\u01B0 m\u1EE5c v\u00E0o m\u1EE5c <strong>\"Drive c\u00E1 nh\u00E2n\"</strong> ho\u1EB7c\n <strong>\"T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB\"</strong> \u1EDF thanh menu b\u00EAn tr\u00E1i \u0111\u1EC3 chuy\u1EC3n nhanh qua l\u1EA1i gi\u1EEFa 2 kh\u00F4ng gian.\n </div>\n </div>\n </div>\n }\n </ng-container>\n <ng-template #moveDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"moveDrawerVisible = false\">H\u1EE7y</button>\n <button nz-button nzType=\"primary\" (click)=\"submitMoveDrawer()\">\n <nz-icon nzType=\"check\"></nz-icon> Di chuy\u1EC3n t\u1EDBi \u0111\u00E2y\n </button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 9: SAO CH\u00C9P T\u1EDAI (COPY TO DRAWER CHO FILE / FOLDER / SHORTCUT) -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"copyDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"460\"\n [nzClosable]=\"false\"\n [nzTitle]=\"copyDrawerTitleTpl\"\n [nzFooter]=\"copyDrawerFooterTpl\"\n (nzOnClose)=\"copyDrawerVisible = false\"\n >\n <ng-template #copyDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"copy\" style=\"font-size: 18px; color: var(--primary-color)\"></nz-icon>\n <strong>Sao ch\u00E9p t\u1EDBi (Copy To)</strong>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"copyDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n @if (copySourceNode(); as src) {\n <div nz-flex nzVertical [nzGap]=\"16\">\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-header\">\n <nz-icon\n [nzType]=\"isFolderLike(src) ? 'folder-fill' : getFileIcon(src)\"\n [style.color]=\"isFolderLike(src) ? '#f59e0b' : 'var(--primary-color)'\"\n style=\"font-size: 22px\"\n ></nz-icon>\n <div>\n <div style=\"font-weight: 600\">{{ src.Name }}</div>\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">\n M\u1EE5c ngu\u1ED3n:\n {{\n src.NodeType === DriveNodeType.Folder\n ? \"Th\u01B0 m\u1EE5c (Sao ch\u00E9p \u0111\u1EC7 quy to\u00E0n b\u1ED9 nh\u00E1nh con)\"\n : src.NodeType === DriveNodeType.Shortcut\n ? \"L\u1ED1i t\u1EAFt\"\n : \"T\u1EADp tin\"\n }}\n </div>\n </div>\n </div>\n </div>\n <div>\n <label class=\"drawer-field-label\">T\u00EAn b\u1EA3n sao (\u0110\u1EC3 tr\u1ED1ng \u0111\u1EC3 h\u1EC7 th\u1ED1ng t\u1EF1 \u0111\u1EB7t t\u00EAn)</label>\n <input\n nz-input\n [(ngModel)]=\"copyCustomName\"\n [appAutoFocus]=\"copyDrawerVisible\"\n placeholder=\"Nh\u1EADp t\u00EAn m\u1EDBi cho b\u1EA3n sao...\"\n (keyup.enter)=\"submitCopyDrawer()\"\n />\n </div>\n <div>\n <label class=\"drawer-field-label\">Kh\u00F4ng gian \u0111\u00EDch</label>\n <nz-select\n [(ngModel)]=\"copyTargetSpaceKey\"\n (ngModelChange)=\"onCopySpaceKeyChange($event)\"\n style=\"width: 100%\"\n >\n <nz-option nzValue=\"MY_DRIVE\" nzLabel=\"Drive c\u00E1 nh\u00E2n (My Drive)\"></nz-option>\n <nz-option nzValue=\"ORG_DRIVE\" nzLabel=\"Kho T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB (Org Drive)\"></nz-option>\n @for (sp of drive.customSpaces(); track sp.Id) {\n <nz-option [nzValue]=\"'CUSTOM:' + sp.Id\" [nzLabel]=\"'\uD83D\uDCC2 ' + sp.Name\"></nz-option>\n }\n </nz-select>\n </div>\n <div>\n <label class=\"drawer-field-label\">Ch\u1ECDn th\u01B0 m\u1EE5c \u0111\u00EDch ch\u1EE9a b\u1EA3n sao</label>\n <nz-select\n nzShowSearch\n nzAllowClear\n nzPlaceHolder=\"-- Th\u01B0 m\u1EE5c g\u1ED1c (Root) --\"\n [(ngModel)]=\"copyTargetFolderId\"\n style=\"width: 100%\"\n >\n <nz-option [nzValue]=\"null\" nzLabel=\"\uD83D\uDCC1 Th\u01B0 m\u1EE5c g\u1ED1c (Root)\"></nz-option>\n @for (f of copyTargetFolders(); track f.Id) {\n <nz-option [nzValue]=\"f.Id\" [nzLabel]=\"'\uD83D\uDCC2 ' + f.Name\"></nz-option>\n }\n </nz-select>\n <div class=\"quota-sub\" style=\"margin-top: 6px\">\n B\u1EA3n sao ho\u00E0n to\u00E0n \u0111\u1ED9c l\u1EADp v\u1EDBi m\u1EE5c g\u1ED1c v\u00E0 \u0111\u01B0\u1EE3c t\u00EDnh v\u00E0o h\u1EA1n ng\u1EA1ch c\u1EE7a ng\u01B0\u1EDDi t\u1EA1o b\u1EA3n sao.\n </div>\n </div>\n </div>\n }\n </ng-container>\n <ng-template #copyDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"copyDrawerVisible = false\">H\u1EE7y</button>\n <button nz-button nzType=\"primary\" (click)=\"submitCopyDrawer()\">\n <nz-icon nzType=\"copy\"></nz-icon> Sao ch\u00E9p t\u1EDBi \u0111\u00E2y\n </button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 7: \u0110\u1ED4I \u0110\u01AF\u1EDCNG D\u1EAAN V\u1EACT L\u00DD / \u00C1NH X\u1EA0 \u1ED4 C\u1EE8NG M\u1EDAI KHI K\u1EBET TH\u00DAC D\u1EF0 \u00C1N -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"relocateDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"500\"\n [nzClosable]=\"false\"\n [nzTitle]=\"relocateDrawerTitleTpl\"\n [nzFooter]=\"relocateDrawerFooterTpl\"\n (nzOnClose)=\"relocateDrawerVisible = false\"\n >\n <ng-template #relocateDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"hdd\" style=\"font-size: 18px; color: var(--primary-color)\"></nz-icon>\n <strong>\n {{ relocateTargetFolder() ? \"\u00C1nh x\u1EA1 / Chuy\u1EC3n \u1ED5 \u0111\u0129a th\u01B0 m\u1EE5c\" : \"C\u1EA5u h\u00ECnh RootPath l\u01B0u tr\u1EEF chung\" }}\n </strong>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"relocateDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n <div nz-flex nzVertical [nzGap]=\"16\">\n @if (relocateTargetFolder(); as folder) {\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-header\">\n <nz-icon nzType=\"folder-fill\" style=\"font-size: 22px; color: #f59e0b\"></nz-icon>\n <div>\n <div style=\"font-weight: 600\">{{ folder.Name }}</div>\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">\n \u0110\u01B0\u1EDDng d\u1EABn hi\u1EC7n t\u1EA1i:\n <code>{{ folder.PhysicalRelativePath || drive.currentPhysicalPath() || \"M\u1EB7c \u0111\u1ECBnh\" }}</code>\n </div>\n </div>\n </div>\n </div>\n <div>\n <label class=\"drawer-field-label\">\u0110\u01B0\u1EDDng d\u1EABn v\u1EADt l\u00FD m\u1EDBi c\u1EE7a th\u01B0 m\u1EE5c (H\u1ED7 tr\u1EE3 \u1ED5 c\u1EE9ng kh\u00E1c / NAS)</label>\n <input\n nz-input\n [(ngModel)]=\"relocateNewPath\"\n [appAutoFocus]=\"relocateDrawerVisible\"\n placeholder=\"VD: E:Archive_2026DuAn_A ho\u1EB7c \\\\NAS01StorageDuAn_A\"\n (keyup.enter)=\"submitRelocateDrawer()\"\n />\n <div class=\"quota-sub\" style=\"margin-top: 6px\">\n Khi d\u1EF1 \u00E1n k\u1EBFt th\u00FAc v\u00E0 h\u1EA1 t\u1EA7ng chuy\u1EC3n th\u01B0 m\u1EE5c sang \u1ED5 c\u1EE9ng kh\u00E1c, \u0111\u1EB7t \u0111\u01B0\u1EDDng d\u1EABn m\u1EDBi t\u1EA1i \u0111\u00E2y \u0111\u1EC3 to\u00E0n b\u1ED9 th\u01B0\n m\u1EE5c con v\u00E0 file b\u00EAn trong t\u1EF1 \u0111\u1ED9ng map sang \u1ED5 c\u1EE9ng m\u1EDBi.\n </div>\n </div>\n <div class=\"drawer-meta-card\">\n <label nz-checkbox [(ngModel)]=\"relocateMoveFilesOnDisk\">\n <strong>T\u1EF1 \u0111\u1ED9ng di chuy\u1EC3n d\u1EEF li\u1EC7u v\u1EADt l\u00FD t\u1EEB \u0111\u01B0\u1EDDng d\u1EABn c\u0169 sang \u1ED5 \u0111\u0129a m\u1EDBi</strong>\n </label>\n <div class=\"quota-sub\" style=\"margin-left: 24px\">\n N\u1EBFu b\u1ED9 ph\u1EADn H\u1EA1 t\u1EA7ng \u0111\u00E3 copy/move s\u1EB5n th\u01B0 m\u1EE5c sang \u1ED5 c\u1EE9ng m\u1EDBi r\u1ED3i, h\u00E3y <strong>b\u1ECF ch\u1ECDn</strong> m\u1EE5c n\u00E0y \u0111\u1EC3\n h\u1EC7 th\u1ED1ng ch\u1EC9 c\u1EADp nh\u1EADt l\u1EA1i \u00E1nh x\u1EA1 \u0111\u01B0\u1EDDng d\u1EABn trong Database.\n </div>\n <label nz-checkbox [(ngModel)]=\"relocateSyncNewFiles\" style=\"margin-top: 6px\">\n <strong>\u0110\u1ED3ng b\u1ED9 b\u1ED5 sung c\u00E1c file/folder c\u00F3 s\u1EB5n t\u1EA1i \u0111\u01B0\u1EDDng d\u1EABn m\u1EDBi v\u00E0o Drive</strong>\n </label>\n </div>\n } @else {\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">RootPath hi\u1EC7n t\u1EA1i:</span>\n <code class=\"break-word\">{{ drive.storageRootPath() || drive.currentPhysicalPath() }}</code>\n </div>\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">Ch\u1EBF \u0111\u1ED9 th\u01B0 m\u1EE5c g\u1ED1c:</span>\n <nz-tag [nzColor]=\"drive.useSharedPhysicalRoot() ? 'green' : 'blue'\">\n {{\n drive.useSharedPhysicalRoot() ? \"D\u00F9ng chung 1 RootPath cho t\u1EA5t c\u1EA3 User\" : \"T\u00E1ch theo t\u1EEBng Username\"\n }}\n </nz-tag>\n </div>\n </div>\n <div>\n <label class=\"drawer-field-label\">\u0110\u01B0\u1EDDng d\u1EABn RootPath chung m\u1EDBi tr\u00EAn Server</label>\n <input\n nz-input\n [(ngModel)]=\"relocateNewPath\"\n [appAutoFocus]=\"relocateDrawerVisible\"\n placeholder=\"VD: D:ProjectStorageDriveRoot ho\u1EB7c E:ArchiveDrive\"\n (keyup.enter)=\"submitRelocateDrawer()\"\n />\n <div class=\"quota-sub\" style=\"margin-top: 6px\">\n T\u1EA5t c\u1EA3 c\u00E1c th\u01B0 m\u1EE5c ch\u01B0a ghim \u1ED5 \u0111\u0129a ri\u00EAng s\u1EBD t\u1EF1 \u0111\u1ED9ng \u0111\u1ECDc/ghi theo RootPath m\u1EDBi n\u00E0y.\n </div>\n </div>\n }\n </div>\n </ng-container>\n <ng-template #relocateDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"relocateDrawerVisible = false\">H\u1EE7y</button>\n <button nz-button nzType=\"primary\" (click)=\"submitRelocateDrawer()\">\n <nz-icon nzType=\"save\"></nz-icon> L\u01B0u \u00E1nh x\u1EA1 v\u1EADt l\u00FD\n </button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 8: QU\u1EA2N L\u00DD H\u1EA0N NG\u1EA0CH DUNG L\u01AF\u1EE2NG (DEFAULT QUOTA & PER-USER QUOTA) -->\n <!-- CH\u1EC8 D\u00C0NH RI\u00CANG CHO QU\u1EA2N TR\u1ECA VI\u00CAN (ADMIN) -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"quotaAdminDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"980\"\n [nzClosable]=\"false\"\n [nzTitle]=\"quotaAdminDrawerTitleTpl\"\n [nzFooter]=\"quotaAdminDrawerFooterTpl\"\n (nzOnClose)=\"quotaAdminDrawerVisible = false\"\n >\n <ng-template #quotaAdminDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"pie-chart\" style=\"font-size: 18px; color: var(--primary-color)\"></nz-icon>\n <strong>Qu\u1EA3n l\u00FD H\u1EA1n ng\u1EA1ch Dung l\u01B0\u1EE3ng (Quota Management)</strong>\n <nz-tag nzColor=\"gold\">Ch\u1EC9 Admin</nz-tag>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"quotaAdminDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n <div nz-flex nzVertical [nzGap]=\"16\">\n <!-- PH\u1EA6N 1: C\u1EA4U H\u00CCNH QUOTA M\u1EB6C \u0110\u1ECANH TO\u00C0N H\u1EC6 TH\u1ED0NG -->\n <div class=\"drawer-meta-card\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" nzWrap=\"wrap\" [nzGap]=\"8\">\n <div>\n <div style=\"font-size: 14px; font-weight: 600\">\n <nz-icon nzType=\"cloud-server\" style=\"color: var(--primary-color); margin-right: 6px\"></nz-icon>\n 1. C\u1EA5u h\u00ECnh Quota m\u1EB7c \u0111\u1ECBnh (Default Quota)\n </div>\n <div class=\"quota-sub\">\n \u00C1p d\u1EE5ng t\u1EF1 \u0111\u1ED9ng cho ng\u01B0\u1EDDi d\u00F9ng m\u1EDBi ho\u1EB7c ng\u01B0\u1EDDi d\u00F9ng ch\u01B0a \u0111\u01B0\u1EE3c g\u00E1n h\u1EA1n ng\u1EA1ch ri\u00EAng.\n </div>\n </div>\n @if (quotaOverview(); as ov) {\n <div nz-flex nzAlign=\"center\" [nzGap]=\"8\">\n <nz-tag nzColor=\"blue\">\n M\u1EB7c \u0111\u1ECBnh hi\u1EC7n t\u1EA1i: <strong>{{ ov.DefaultUserQuotaBytes | formatBytes }}</strong>\n </nz-tag>\n <nz-tag nzColor=\"purple\">\n T\u1ED5ng \u0111\u00E3 d\u00F9ng to\u00E0n h\u1EC7 th\u1ED1ng: <strong>{{ ov.TotalSystemUsedBytes | formatBytes }}</strong>\n </nz-tag>\n </div>\n }\n </div>\n <nz-divider style=\"margin: 8px 0\"></nz-divider>\n <div nz-flex nzAlign=\"center\" nzWrap=\"wrap\" [nzGap]=\"8\">\n <span style=\"font-size: 13px; font-weight: 500\">M\u1EE9c Quota m\u1EB7c \u0111\u1ECBnh:</span>\n <input\n nz-input\n type=\"number\"\n min=\"1\"\n [(ngModel)]=\"defaultQuotaInputValue\"\n style=\"width: 120px\"\n placeholder=\"Nh\u1EADp dung l\u01B0\u1EE3ng\"\n />\n <nz-select [(ngModel)]=\"defaultQuotaInputUnit\" style=\"width: 90px\">\n <nz-option nzValue=\"MB\" nzLabel=\"MB\"></nz-option>\n <nz-option nzValue=\"GB\" nzLabel=\"GB\"></nz-option>\n <nz-option nzValue=\"TB\" nzLabel=\"TB\"></nz-option>\n </nz-select>\n <!-- C\u00E1c n\u00FAt ch\u1ECDn nhanh (Quick Presets) -->\n <div nz-flex nzAlign=\"center\" [nzGap]=\"4\">\n <button nz-button nzSize=\"small\" (click)=\"setDefaultQuotaPreset(1, 'GB')\">1 GB</button>\n <button nz-button nzSize=\"small\" (click)=\"setDefaultQuotaPreset(5, 'GB')\">5 GB</button>\n <button nz-button nzSize=\"small\" (click)=\"setDefaultQuotaPreset(10, 'GB')\">10 GB</button>\n <button nz-button nzSize=\"small\" (click)=\"setDefaultQuotaPreset(20, 'GB')\">20 GB</button>\n <button nz-button nzSize=\"small\" (click)=\"setDefaultQuotaPreset(50, 'GB')\">50 GB</button>\n <button nz-button nzSize=\"small\" (click)=\"setDefaultQuotaPreset(100, 'GB')\">100 GB</button>\n </div>\n <button nz-button nzType=\"primary\" (click)=\"onSaveDefaultQuota()\">\n <nz-icon nzType=\"save\"></nz-icon> L\u01B0u Quota m\u1EB7c \u0111\u1ECBnh\n </button>\n </div>\n <div style=\"margin-top: 4px\">\n <label nz-checkbox [(ngModel)]=\"applyDefaultToExistingUsers\">\n \u0110\u1ED3ng th\u1EDDi c\u1EADp nh\u1EADt m\u1EE9c Quota m\u1EB7c \u0111\u1ECBnh m\u1EDBi n\u00E0y cho t\u1EA5t c\u1EA3 c\u00E1c ng\u01B0\u1EDDi d\u00F9ng hi\u1EC7n c\u00F3\n </label>\n </div>\n </div>\n <!-- PH\u1EA6N 2: \u0110\u1EB6T QUOTA RI\u00CANG CHO T\u1EEANG NG\u01AF\u1EDCI D\u00D9NG -->\n <div>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" nzWrap=\"wrap\" [nzGap]=\"8\" style=\"margin-bottom: 10px\">\n <div>\n <div style=\"font-size: 14px; font-weight: 600\">\n <nz-icon nzType=\"team\" style=\"color: var(--primary-color); margin-right: 6px\"></nz-icon>\n 2. Thi\u1EBFt l\u1EADp Quota cho t\u1EEBng ng\u01B0\u1EDDi d\u00F9ng ({{ quotaUsers().length }})\n </div>\n <div class=\"quota-sub\">\n T\u00F9y ch\u1EC9nh h\u1EA1n ng\u1EA1ch dung l\u01B0\u1EE3ng ri\u00EAng cho t\u1EEBng c\u00E1 nh\u00E2n ho\u1EB7c \u0111\u1EB7t l\u1EA1i v\u1EC1 m\u1EE9c m\u1EB7c \u0111\u1ECBnh.\n </div>\n </div>\n <div nz-flex nzAlign=\"center\" [nzGap]=\"8\">\n <nz-input-group [nzSuffix]=\"quotaUserSearchSuffix\" style=\"width: 260px\">\n <input\n nz-input\n type=\"text\"\n placeholder=\"T\u00ECm theo t\u00E0i kho\u1EA3n, h\u1ECD t\u00EAn, email...\"\n [(ngModel)]=\"quotaUserSearchKeyword\"\n (keyup.enter)=\"reloadQuotaOverview()\"\n />\n </nz-input-group>\n <ng-template #quotaUserSearchSuffix>\n <nz-icon nzType=\"search\" class=\"cursor-pointer\" (click)=\"reloadQuotaOverview()\"></nz-icon>\n </ng-template>\n <button nz-button nzType=\"default\" (click)=\"reloadQuotaOverview()\" nz-tooltip nzTooltipTitle=\"T\u1EA3i l\u1EA1i\">\n <nz-icon nzType=\"reload\"></nz-icon>\n </button>\n </div>\n </div>\n <nz-table\n #userQuotaTable\n [nzData]=\"quotaUsers()\"\n [nzLoading]=\"quotaLoading()\"\n nzSize=\"small\"\n [nzBordered]=\"true\"\n [nzPageSize]=\"10\"\n [nzShowPagination]=\"true\"\n >\n <thead>\n <tr>\n <th nzWidth=\"45px\" class=\"text-center\">#</th>\n <th>Ng\u01B0\u1EDDi d\u00F9ng</th>\n <th nzWidth=\"220px\">\u0110\u00E3 d\u00F9ng / H\u1EA1n ng\u1EA1ch</th>\n <th nzWidth=\"105px\" class=\"text-center\">Lo\u1EA1i Quota</th>\n <th nzWidth=\"210px\">\u0110\u1EB7t h\u1EA1n ng\u1EA1ch m\u1EDBi</th>\n <th nzWidth=\"145px\" class=\"text-center\">Thao t\u00E1c</th>\n </tr>\n </thead>\n <tbody>\n @for (u of userQuotaTable.data; track u.UserId; let idx = $index) {\n <tr>\n <td class=\"text-center\">{{ idx + 1 }}</td>\n <td>\n <div style=\"font-weight: 600\">{{ u.FullName || u.UserName }}</div>\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">\n <code>{{ u.UserName }}</code>\n @if (u.OrgName) {\n <span> \u2022 {{ u.OrgName }}</span>\n }\n @if (u.Email) {\n <span> \u2022 {{ u.Email }}</span>\n }\n </div>\n </td>\n <td>\n <div nz-flex nzJustify=\"space-between\" style=\"font-size: 12px; margin-bottom: 2px\">\n <span\n >{{ u.UsedBytes | formatBytes }} / <strong>{{ u.QuotaLimitBytes | formatBytes }}</strong></span\n >\n <span>{{ getUserQuotaPercent(u) }}%</span>\n </div>\n <nz-progress\n [nzPercent]=\"getUserQuotaPercent(u)\"\n nzSize=\"small\"\n [nzShowInfo]=\"false\"\n [nzStatus]=\"getUserQuotaPercent(u) >= 95 ? 'exception' : 'normal'\"\n ></nz-progress>\n </td>\n <td class=\"text-center\">\n @if (u.IsCustomQuota) {\n <nz-tag nzColor=\"orange\">T\u00F9y ch\u1EC9nh</nz-tag>\n } @else {\n <nz-tag nzColor=\"default\">M\u1EB7c \u0111\u1ECBnh</nz-tag>\n }\n </td>\n <td>\n <div nz-flex nzAlign=\"center\" [nzGap]=\"6\">\n <input nz-input type=\"number\" min=\"1\" [(ngModel)]=\"u.editQuotaValue\" style=\"width: 90px\" />\n <nz-select [(ngModel)]=\"u.editQuotaUnit\" style=\"width: 80px\">\n <nz-option nzValue=\"MB\" nzLabel=\"MB\"></nz-option>\n <nz-option nzValue=\"GB\" nzLabel=\"GB\"></nz-option>\n <nz-option nzValue=\"TB\" nzLabel=\"TB\"></nz-option>\n </nz-select>\n </div>\n </td>\n <td class=\"text-center\">\n <div nz-flex nzJustify=\"center\" [nzGap]=\"6\">\n <button nz-button nzType=\"primary\" nzSize=\"small\" (click)=\"onSaveUserQuota(u)\">\n <!-- \n nz-tooltip\n nzTooltipTitle=\"L\u01B0u h\u1EA1n ng\u1EA1ch ri\u00EAng cho ng\u01B0\u1EDDi d\u00F9ng n\u00E0y\"\n -->\n <nz-icon nzType=\"check\"></nz-icon> L\u01B0u\n </button>\n <button\n nz-button\n nzType=\"default\"\n nzSize=\"small\"\n [disabled]=\"!u.IsCustomQuota\"\n nz-tooltip\n nzTooltipTitle=\"\u0110\u1EB7t l\u1EA1i v\u1EC1 m\u1EE9c Quota m\u1EB7c \u0111\u1ECBnh c\u1EE7a h\u1EC7 th\u1ED1ng\"\n (click)=\"onResetUserQuota(u)\"\n >\n <nz-icon nzType=\"undo\"></nz-icon>\n </button>\n </div>\n </td>\n </tr>\n }\n </tbody>\n </nz-table>\n </div>\n </div>\n </ng-container>\n <ng-template #quotaAdminDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"quotaAdminDrawerVisible = false\">\u0110\u00F3ng</button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 10: TH\u00CAM / C\u1EA4U H\u00CCNH M\u1EE4C CUSTOM B\u00CAN D\u01AF\u1EDAI \"T\u00C0I LI\u1EC6U \u0110\u01A0N V\u1ECA\" -->\n <!-- (V\u00ED d\u1EE5: \"T\u00E0i li\u1EC7u d\u1EF1 \u00E1n\" - Admin c\u00F3 th\u1EC3 b\u1EADt hi\u1EC3n th\u1ECB cho t\u1EA5t c\u1EA3 User) -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"customSpaceDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"480\"\n [nzClosable]=\"false\"\n [nzTitle]=\"customSpaceDrawerTitleTpl\"\n [nzFooter]=\"customSpaceDrawerFooterTpl\"\n (nzOnClose)=\"customSpaceDrawerVisible = false\"\n >\n <ng-template #customSpaceDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button\n nz-button\n nzSize=\"small\"\n nzType=\"default\"\n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n (click)=\"toggleDrawerPlacement()\"\n >\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon\n [nzType]=\"customSpaceIcon || 'project'\"\n style=\"font-size: 18px; color: var(--primary-color)\"\n ></nz-icon>\n <strong>{{\n customSpaceDrawerMode === \"create\" ? \"Th\u00EAm m\u1EE5c t\u00F9y ch\u1EC9nh d\u01B0\u1EDBi T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB\" : \"C\u1EA5u h\u00ECnh m\u1EE5c t\u00F9y ch\u1EC9nh\"\n }}</strong>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"customSpaceDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n <div nz-flex nzVertical [nzGap]=\"16\">\n <div>\n <label class=\"drawer-field-label\">T\u00EAn m\u1EE5c hi\u1EC3n th\u1ECB tr\u00EAn thanh menu tr\u00E1i</label>\n <input\n nz-input\n [(ngModel)]=\"customSpaceName\"\n [appAutoFocus]=\"customSpaceDrawerVisible\"\n placeholder=\"V\u00ED d\u1EE5: T\u00E0i li\u1EC7u d\u1EF1 \u00E1n, H\u1ED3 s\u01A1 th\u1EA7u, Quy tr\u00ECnh ISO...\"\n (keyup.enter)=\"submitCustomSpaceDrawer()\"\n />\n <div class=\"quota-sub\" style=\"margin-top: 4px\">\n M\u1EE5c n\u00E0y s\u1EBD xu\u1EA5t hi\u1EC7n ngay b\u00EAn d\u01B0\u1EDBi m\u1EE5c <strong>\"T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB\"</strong> tr\u00EAn thanh \u0111i\u1EC1u h\u01B0\u1EDBng b\u00EAn tr\u00E1i.\n </div>\n </div>\n <div>\n <label class=\"drawer-field-label\">Bi\u1EC3u t\u01B0\u1EE3ng (Icon)</label>\n <nz-select [(ngModel)]=\"customSpaceIcon\" style=\"width: 100%\">\n <nz-option nzValue=\"project\" nzLabel=\"\uD83D\uDCCA D\u1EF1 \u00E1n (project)\"></nz-option>\n <nz-option nzValue=\"folder-open\" nzLabel=\"\uD83D\uDCC2 Th\u01B0 m\u1EE5c m\u1EDF (folder-open)\"></nz-option>\n <nz-option nzValue=\"book\" nzLabel=\"\uD83D\uDCD8 T\u00E0i li\u1EC7u / C\u1EA9m nang (book)\"></nz-option>\n <nz-option nzValue=\"safety-certificate\" nzLabel=\"\uD83D\uDEE1 Quy chu\u1EA9n / ISO (safety-certificate)\"></nz-option>\n <nz-option nzValue=\"solution\" nzLabel=\"\uD83D\uDCCB H\u1ED3 s\u01A1 nghi\u1EC7p v\u1EE5 (solution)\"></nz-option>\n <nz-option nzValue=\"database\" nzLabel=\"\uD83D\uDDC4 Kho d\u1EEF li\u1EC7u (database)\"></nz-option>\n </nz-select>\n </div>\n <div class=\"drawer-meta-card\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\">\n <div>\n <div style=\"font-weight: 600; font-size: 13px\">Hi\u1EC3n th\u1ECB cho t\u1EA5t c\u1EA3 ng\u01B0\u1EDDi d\u00F9ng (All Users)</div>\n <div class=\"quota-sub\">\n @if (drive.isCurrentUserAdmin()) {\n Khi b\u1EADt: T\u1EA5t c\u1EA3 t\u00E0i kho\u1EA3n trong h\u1EC7 th\u1ED1ng \u0111\u1EC1u nh\u00ECn th\u1EA5y v\u00E0 truy c\u1EADp \u0111\u01B0\u1EE3c m\u1EE5c n\u00E0y b\u00EAn d\u01B0\u1EDBi \"T\u00E0i li\u1EC7u \u0110\u01A1n\n v\u1ECB\".\n } @else {\n Ch\u1EC9 Qu\u1EA3n tr\u1ECB vi\u00EAn (Admin) m\u1EDBi c\u00F3 quy\u1EC1n b\u1EADt hi\u1EC3n th\u1ECB chung cho to\u00E0n b\u1ED9 ng\u01B0\u1EDDi d\u00F9ng.\n }\n </div>\n </div>\n <nz-switch\n [(ngModel)]=\"customSpaceVisibleToAll\"\n [nzDisabled]=\"!drive.isCurrentUserAdmin()\"\n nzCheckedChildren=\"All Users\"\n nzUnCheckedChildren=\"C\u00E1 nh\u00E2n\"\n ></nz-switch>\n </div>\n @if (customSpaceVisibleToAll) {\n <nz-divider style=\"margin: 8px 0\"></nz-divider>\n <div>\n <label class=\"drawer-field-label\">M\u1EE9c quy\u1EC1n m\u1EB7c \u0111\u1ECBnh cho to\u00E0n b\u1ED9 ng\u01B0\u1EDDi d\u00F9ng</label>\n <nz-select\n [(ngModel)]=\"customSpaceDefaultAccessLevel\"\n [nzDisabled]=\"!drive.isCurrentUserAdmin()\"\n style=\"width: 100%\"\n >\n <nz-option [nzValue]=\"DriveAccessLevel.None\" nzLabel=\"None\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Viewer\" nzLabel=\"Ch\u1EC9 xem (Viewer)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Downloader\" nzLabel=\"Xem & T\u1EA3i xu\u1ED1ng\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Uploader\" nzLabel=\"Xem & T\u1EA3i l\u00EAn (Kh\u00F4ng \u0111\u01B0\u1EE3c x\u00F3a)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Editor\" nzLabel=\"Ch\u1EC9nh s\u1EEDa (Editor)\"></nz-option>\n </nz-select>\n </div>\n }\n </div>\n </div>\n </ng-container>\n <ng-template #customSpaceDrawerFooterTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div>\n @if (customSpaceDrawerMode === \"edit\" && editingCustomSpace) {\n <button nz-button nzDanger nzType=\"default\" (click)=\"onDeleteCustomSpace(editingCustomSpace)\">\n <nz-icon nzType=\"delete\"></nz-icon> X\u00F3a m\u1EE5c n\u00E0y\n </button>\n }\n </div>\n <div nz-flex [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"customSpaceDrawerVisible = false\">H\u1EE7y</button>\n <button nz-button nzType=\"primary\" (click)=\"submitCustomSpaceDrawer()\">\n <nz-icon nzType=\"check\"></nz-icon>\n {{ customSpaceDrawerMode === \"create\" ? \"T\u1EA1o m\u1EE5c m\u1EDBi\" : \"L\u01B0u thay \u0111\u1ED5i\" }}\n </button>\n </div>\n </div>\n </ng-template>\n </nz-drawer>\n\n <nz-drawer\n [nzVisible]=\"matrixDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"'92vw'\"\n nzTitle=\"Ma tr\u1EADn Ph\u00E2n quy\u1EC1n T\u00E0i li\u1EC7u & Th\u01B0 m\u1EE5c\"\n (nzOnClose)=\"matrixDrawerVisible = false\"\n >\n <!-- (ACL / RBAC Matrix) -->\n <ng-container *nzDrawerContent>\n <lib-drive-permission-matrix\n [rootFolderId]=\"matrixRootNodeId\"\n [viewMode]=\"\n drive.currentViewMode() === 'ORG_DRIVE'\n ? 'ORG_DRIVE'\n : drive.currentViewMode() === 'CUSTOM_SPACE'\n ? 'CUSTOM_SPACE'\n : 'MY_DRIVE'\n \"\n [customSpaceId]=\"drive.currentCustomSpaceId()\"\n (saved)=\"drive.loadNodes()\"\n (closed)=\"matrixDrawerVisible = false\"\n >\n </lib-drive-permission-matrix>\n </ng-container>\n </nz-drawer>\n}\n", styles: [".drive-shell{display:grid;grid-template-columns:245px 1fr;min-height:calc(100vh - 110px);background:var(--app-container-bg, #ffffff);border:1px solid var(--app-border, #e2e8f0);border-radius:6px;overflow:hidden}.drive-sidebar{padding:14px;background:var(--app-sidebar-bg, #f8fafc);border-right:1px solid var(--app-border, #e2e8f0);display:flex;flex-direction:column;gap:14px}.drive-nav{display:flex;flex-direction:column;gap:4px}.drive-nav a{display:flex;align-items:center;gap:10px;padding:9px 12px;border-radius:6px;color:var(--app-text, #334155);cursor:pointer;transition:background .15s}.drive-nav a:hover,.drive-nav a.active{background:color-mix(in srgb,var(--primary-color, #1890ff) 16%,transparent);color:var(--primary-color, #1890ff);font-weight:600}.org-nav-group{display:flex;flex-direction:column;gap:2px}.custom-space-link{padding-left:26px!important;font-size:13px}.custom-space-title{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.custom-space-badge{margin:0!important;font-size:10px;line-height:16px;padding:0 4px}.nav-inline-btn{border:none;background:transparent;color:inherit;cursor:pointer;padding:2px 4px;border-radius:4px;display:inline-flex;align-items:center;justify-content:center;opacity:.7}.nav-inline-btn:hover{opacity:1;background:color-mix(in srgb,var(--primary-color, #1890ff) 18%,transparent)}.storage-mode-box{padding:10px 12px;background:var(--app-container-bg, #ffffff);border:1px solid var(--app-border, #e2e8f0);border-radius:6px}.upload-queue-box{padding:10px;background:var(--app-container-bg, #ffffff);border:1px solid var(--app-border, #e2e8f0);border-radius:6px;max-height:180px;overflow-y:auto}.upload-task-row{margin-bottom:6px}.upload-task-name{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.quota-box{margin-top:auto;padding:12px;background:var(--app-container-bg, #ffffff);border:1px solid var(--app-border, #e2e8f0);border-radius:6px}.quota-title{font-size:13px;font-weight:600;margin-bottom:6px}.quota-sub{font-size:12px;color:var(--app-text-muted, #64748b);margin-top:4px}.drive-main{position:relative;padding:16px;display:flex;flex-direction:column;gap:12px;transition:background .15s,border-color .15s}.drive-main.external-drag-active{background:color-mix(in srgb,var(--primary-color, #1890ff) 6%,var(--app-container-bg, #ffffff));outline:2px dashed var(--primary-color, #1890ff);outline-offset:-6px}.external-drop-banner{pointer-events:none;display:flex;align-items:center;gap:14px;padding:12px 18px;border-radius:8px;background:color-mix(in srgb,var(--primary-color, #1890ff) 14%,var(--app-container-bg, #ffffff));border:1px dashed var(--primary-color, #1890ff);color:var(--app-text, #1e293b)}.drop-banner-icon{font-size:28px;color:var(--primary-color, #1890ff)}.drop-banner-title{font-size:14px;font-weight:500}.drop-banner-sub{font-size:12px;color:var(--app-text-muted, #64748b);margin-top:2px}.drive-toolbar{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px;padding-bottom:10px;border-bottom:1px solid var(--app-border, #f1f5f9)}.physical-path-bar{display:flex;align-items:center;gap:6px;margin-top:4px;font-size:12px;color:var(--app-text-muted, #64748b)}.toolbar-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.drive-row{cursor:pointer;transition:background .15s,outline .15s}.drive-row.dragging-row{opacity:.45}.drive-row.drop-target-active>td{background:color-mix(in srgb,var(--primary-color, #1890ff) 18%,transparent)!important;border-top:1px dashed var(--primary-color, #1890ff);border-bottom:1px dashed var(--primary-color, #1890ff)}.bc-drop-active,.drive-nav a.nav-drop-active{background:color-mix(in srgb,var(--primary-color, #1890ff) 22%,transparent)!important;outline:1.5px dashed var(--primary-color, #1890ff);color:var(--primary-color, #1890ff);font-weight:600}.node-name-cell{display:flex;align-items:center;gap:8px}.node-icon-wrap{position:relative;display:inline-flex;align-items:center;justify-content:center}.node-icon{font-size:18px}.shortcut-badge{position:absolute;right:-5px;bottom:-3px;width:13px;height:13px;border-radius:50%;background:#7c3aed;color:#fff;font-size:9px;display:inline-flex;align-items:center;justify-content:center;box-shadow:0 0 0 1.5px var(--app-container-bg, #ffffff)}.node-title{font-weight:500}.action-btn-group{display:inline-flex;align-items:center;justify-content:center;gap:4px}.action-icon-btn{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border:none;background:transparent;border-radius:6px;cursor:pointer;font-size:15px;transition:background .15s,transform .1s}.action-icon-btn:hover{background:color-mix(in srgb,var(--primary-color, #1890ff) 12%,transparent);transform:translateY(-1px)}.action-icon-btn.color-warn:hover{background:#ef44441f}.drawer-field-label{display:block;font-size:13px;font-weight:600;margin-bottom:6px;color:var(--app-text, #334155)}.drawer-meta-card{padding:12px 14px;background:var(--app-sidebar-bg, #f8fafc);border:1px solid var(--app-border, #e2e8f0);border-radius:8px;display:flex;flex-direction:column;gap:8px}.drawer-meta-header{display:flex;align-items:center;gap:10px}.drawer-meta-row{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:13px}.meta-label{color:var(--app-text-muted, #64748b)}.sortable-th{cursor:pointer;-webkit-user-select:none;user-select:none;transition:background .15s,color .15s}.sortable-th:hover{background:color-mix(in srgb,var(--primary-color, #1890ff) 8%,var(--app-sidebar-bg, #f8fafc))!important;color:var(--primary-color, #1890ff)}.th-sort-wrap{display:inline-flex;align-items:center;gap:6px;width:100%}.th-sort-wrap.justify-center{justify-content:center}.th-sort-wrap.justify-end{justify-content:flex-end}.sort-icon{font-size:13px;opacity:.35;transition:opacity .15s,color .15s}.sort-icon.active{opacity:1;color:var(--primary-color, #1890ff)}.sortable-th:hover .sort-icon{opacity:.85}\n"] }]
29090
+ ], providers: [NzImageService], template: "@if (activeShareToken(); as sToken) {\n <lib-drive-share-viewer [token]=\"sToken\" (backToDrive)=\"closeEmbeddedShareViewer()\"></lib-drive-share-viewer>\n} @else {\n <div class=\"drive-shell\">\n <!-- SIDEBAR \u0110I\u1EC0U H\u01AF\u1EDANG & QUOTA -->\n <aside class=\"drive-sidebar\">\n <div nz-flex nzVertical nzGap=\"small\">\n <button\n nz-button\n nzType=\"primary\"\n nzBlock\n [disabled]=\"!drive.canUploadCurrentFolder()\"\n (click)=\"fileInput.click()\"\n >\n <nz-icon nzType=\"cloud-upload\"></nz-icon> T\u1EA3i t\u1EADp tin l\u00EAn\n </button>\n <input #fileInput type=\"file\" multiple hidden (change)=\"onFilesSelected($event)\" />\n <button\n nz-button\n nzType=\"default\"\n nzBlock\n [disabled]=\"!drive.canUploadCurrentFolder()\"\n (click)=\"openFolderDrawer('create')\"\n >\n <nz-icon nzType=\"folder-add\"></nz-icon> T\u1EA1o th\u01B0 m\u1EE5c m\u1EDBi\n </button>\n </div>\n <nav class=\"drive-nav\">\n <a\n [class.active]=\"drive.currentViewMode() === 'MY_DRIVE'\"\n [class.nav-drop-active]=\"dragOverNavSpace() === 'MY_DRIVE'\"\n (click)=\"switchView('MY_DRIVE')\"\n (dragover)=\"onNavSpaceDragOver($event, 'MY_DRIVE')\"\n (dragleave)=\"onNavSpaceDragLeave('MY_DRIVE')\"\n (drop)=\"onNavSpaceDrop($event, 'MY_DRIVE')\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"K\u00E9o th\u1EA3 t\u1EADp tin / th\u01B0 m\u1EE5c v\u00E0o \u0111\u00E2y \u0111\u1EC3 chuy\u1EC3n v\u1EC1 g\u1ED1c Drive c\u00E1 nh\u00E2n\"\n -->\n <nz-icon nzType=\"hdd\"></nz-icon> Drive c\u00E1 nh\u00E2n\n </a>\n <div class=\"org-nav-group\">\n <a\n [class.active]=\"drive.currentViewMode() === 'ORG_DRIVE'\"\n [class.nav-drop-active]=\"dragOverNavSpace() === 'ORG_DRIVE'\"\n (click)=\"switchView('ORG_DRIVE')\"\n (dragover)=\"onNavSpaceDragOver($event, 'ORG_DRIVE')\"\n (dragleave)=\"onNavSpaceDragLeave('ORG_DRIVE')\"\n (drop)=\"onNavSpaceDrop($event, 'ORG_DRIVE')\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"K\u00E9o th\u1EA3 t\u1EADp tin / th\u01B0 m\u1EE5c v\u00E0o \u0111\u00E2y \u0111\u1EC3 chuy\u1EC3n sang g\u1ED1c T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB\"\n -->\n <nz-icon nzType=\"apartment\"></nz-icon>\n <span style=\"flex: 1\">T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB</span>\n <button\n type=\"button\"\n class=\"nav-inline-btn\"\n (click)=\"$event.stopPropagation(); openCustomSpaceDrawer('create')\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"Th\u00EAm m\u1EE5c t\u00F9y ch\u1EC9nh b\u00EAn d\u01B0\u1EDBi T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB (VD: T\u00E0i li\u1EC7u d\u1EF1 \u00E1n)\"\n -->\n <nz-icon nzType=\"plus\"></nz-icon>\n </button>\n </a>\n <!-- DANH S\u00C1CH C\u00C1C M\u1EE4C CUSTOM B\u00CAN D\u01AF\u1EDAI \"T\u00C0I LI\u1EC6U \u0110\u01A0N V\u1ECA\" (VD: \"T\u00E0i li\u1EC7u d\u1EF1 \u00E1n\") -->\n @for (sp of drive.customSpaces(); track sp.Id) {\n <a\n class=\"custom-space-link\"\n [class.active]=\"drive.currentViewMode() === 'CUSTOM_SPACE' && drive.currentCustomSpaceId() === sp.Id\"\n [class.nav-drop-active]=\"dragOverCustomSpaceId() === sp.Id\"\n (click)=\"switchCustomSpace(sp)\"\n (dragover)=\"onCustomSpaceDragOver($event, sp)\"\n (dragleave)=\"onCustomSpaceDragLeave(sp)\"\n (drop)=\"onCustomSpaceDrop($event, sp)\"\n >\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"sp.Name + (sp.IsVisibleToAllUsers ? ' (Hi\u1EC3n th\u1ECB cho t\u1EA5t c\u1EA3 User)' : ' (M\u1EE5c c\u00E1 nh\u00E2n)')\"\n -->\n <nz-icon [nzType]=\"sp.Icon || 'project'\"></nz-icon>\n <span class=\"custom-space-title\">{{ sp.Name }}</span>\n @if (sp.IsVisibleToAllUsers) {\n <nz-tag nzColor=\"cyan\" class=\"custom-space-badge\">All</nz-tag>\n }\n @if (sp.CanManage || drive.isCurrentUserAdmin()) {\n <button\n type=\"button\"\n class=\"nav-inline-btn\"\n (click)=\"$event.stopPropagation(); openCustomSpaceDrawer('edit', sp)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"C\u1EA5u h\u00ECnh m\u1EE5c t\u00F9y ch\u1EC9nh\"\n -->\n <nz-icon nzType=\"setting\"></nz-icon>\n </button>\n }\n </a>\n }\n </div>\n <a [class.active]=\"drive.currentViewMode() === 'SHARED_WITH_ME'\" (click)=\"switchView('SHARED_WITH_ME')\">\n <nz-icon nzType=\"share-alt\"></nz-icon> \u0110\u01B0\u1EE3c chia s\u1EBB v\u1EDBi t\u00F4i\n </a>\n <a [class.active]=\"drive.currentViewMode() === 'RECENT'\" (click)=\"switchView('RECENT')\">\n <nz-icon nzType=\"clock-circle\"></nz-icon> G\u1EA7n \u0111\u00E2y\n </a>\n <a [class.active]=\"drive.currentViewMode() === 'STARRED'\" (click)=\"switchView('STARRED')\">\n <nz-icon nzType=\"star\"></nz-icon> C\u00F3 g\u1EAFn d\u1EA5u sao\n </a>\n <a [class.active]=\"drive.currentViewMode() === 'TRASH'\" (click)=\"switchView('TRASH')\">\n <nz-icon nzType=\"delete\"></nz-icon> Th\u00F9ng r\u00E1c\n </a>\n </nav>\n <!-- KHUNG M\u1EAAU C\u00C2Y TH\u01AF M\u1EE4C (H\u1ED6 TR\u1EE2 K\u00C9O TH\u1EA2 V\u00C0O TH\u01AF M\u1EE4C \u0110\u00CDCH HO\u1EB6C B\u1EA4M T\u1EA0O NHANH) -->\n @if (drive.isCurrentUserAdmin()) {\n <div class=\"template-sidebar-box\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"margin-bottom: 6px\">\n <span style=\"font-size: 12px; font-weight: 600\">\n <nz-icon nzType=\"apartment\" style=\"color: #d97706; margin-right: 4px\"></nz-icon>\n M\u1EABu c\u00E2y th\u01B0 m\u1EE5c ({{ drive.folderTemplates().length }})\n </span>\n <button\n type=\"button\"\n nz-button\n nzType=\"link\"\n nzSize=\"small\"\n style=\"padding: 0 4px; font-size: 12px\"\n (click)=\"openTemplateDrawer('create')\"\n >\n <!-- nz-tooltip\n nzTooltipTitle=\"\u0110\u1ECBnh ngh\u0129a m\u1EABu c\u00E2y th\u01B0 m\u1EE5c m\u1EDBi\" -->\n <nz-icon nzType=\"plus\"></nz-icon> T\u1EA1o m\u1EABu\n </button>\n </div>\n\n @if (drive.folderTemplates().length === 0) {\n <div class=\"quota-sub\" style=\"font-size: 11px\">\n Ch\u01B0a c\u00F3 m\u1EABu n\u00E0o. B\u1EA5m <strong>+ T\u1EA1o m\u1EABu</strong> \u0111\u1EC3 \u0111\u1ECBnh ngh\u0129a c\u00E2y th\u01B0 m\u1EE5c chu\u1EA9n.\n </div>\n } @else {\n <div class=\"template-chip-list\">\n @for (tpl of drive.folderTemplates(); track tpl.Id) {\n <div\n class=\"template-drag-item\"\n draggable=\"true\"\n (dragstart)=\"onTemplateDragStart($event, tpl)\"\n (dragend)=\"onTemplateDragEnd()\"\n >\n <!-- nz-tooltip\n [nzTooltipTitle]=\"\n 'K\u00E9o th\u1EA3 m\u1EABu [' +\n tpl.Name +\n '] (' +\n tpl.TotalFolderCount +\n ' th\u01B0 m\u1EE5c) v\u00E0o m\u1ED9t Th\u01B0 m\u1EE5c \u0111\u00EDch tr\u00EAn b\u1EA3ng, ho\u1EB7c b\u1EA5m \u0111\u1EC3 t\u1EA1o t\u1EA1i \u0111\u00E2y'\n \" -->\n <div\n nz-flex\n nzAlign=\"center\"\n [nzGap]=\"6\"\n style=\"flex: 1; min-width: 0\"\n (click)=\"openFolderDrawer('create', undefined, tpl)\"\n >\n <nz-icon nzType=\"folder-add\" style=\"color: #d97706; font-size: 15px\"></nz-icon>\n <div style=\"flex: 1; min-width: 0\">\n <div class=\"template-item-title\">{{ tpl.Name }}</div>\n <div class=\"template-item-sub\">\n <code>{{ tpl.Code }}</code> \u2022 {{ tpl.TotalFolderCount }} m\u1EE5c\n @if (tpl.TotalPermissionCount > 0) {\n <span style=\"color: #0284c7; font-weight: 600\">\n \u2022 \uD83D\uDEE1 {{ tpl.TotalPermissionCount }} quy\u1EC1n</span\n >\n }\n </div>\n </div>\n </div>\n <div nz-flex nzAlign=\"center\" [nzGap]=\"2\">\n <button\n type=\"button\"\n class=\"nav-inline-btn\"\n [disabled]=\"!drive.canUploadCurrentFolder()\"\n (click)=\"$event.stopPropagation(); applyTemplateToTargetFolder(tpl, drive.currentFolderId())\"\n >\n <!-- nz-tooltip\n nzTooltipTitle=\"\u00C1p d\u1EE5ng ngay v\u00E0o th\u01B0 m\u1EE5c \u0111ang m\u1EDF\" -->\n <nz-icon nzType=\"thunderbolt\" style=\"color: var(--primary-color)\"></nz-icon>\n </button>\n @if (tpl.CanManage || drive.isCurrentUserAdmin()) {\n <button\n type=\"button\"\n class=\"nav-inline-btn\"\n (click)=\"$event.stopPropagation(); openTemplateDrawer('edit', tpl)\"\n >\n <!-- nz-tooltip\n nzTooltipTitle=\"S\u1EEDa / X\u00F3a m\u1EABu c\u00E2y th\u01B0 m\u1EE5c\" -->\n <nz-icon nzType=\"setting\"></nz-icon>\n </button>\n }\n </div>\n </div>\n }\n </div>\n }\n </div>\n }\n <!-- H\u1ED8P C\u1EA4U H\u00CCNH CH\u1EBE \u0110\u1ED8 TH\u01AF M\u1EE4C V\u1EACT L\u00DD vs \u1EA2O H\u00D3A -->\n @if (drive.isCurrentUserAdmin() && false) {\n <div class=\"storage-mode-box\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\">\n <span style=\"font-size: 12px; font-weight: 600\">Th\u01B0 m\u1EE5c v\u1EADt l\u00FD (Disk)</span>\n <nz-switch\n nzSize=\"small\"\n [ngModel]=\"drive.usePhysicalFolders()\"\n (ngModelChange)=\"onTogglePhysicalMode($event)\"\n ></nz-switch>\n\n <!-- \n nz-tooltip\n nzTooltipTitle=\"Khi b\u1EADt: T\u1EA1o c\u00E2y th\u01B0 m\u1EE5c & t\u00EAn file th\u1EADt 1-1 tr\u00EAn \u1ED5 c\u1EE9ng m\u00E1y ch\u1EE7\"\n -->\n </div>\n <div class=\"quota-sub\">\n Ch\u1EBF \u0111\u1ED9: <strong>{{ drive.usePhysicalFolders() ? \"V\u1EADt l\u00FD 1:1 (Physical)\" : \"\u1EA2o h\u00F3a (Virtual)\" }}</strong>\n </div>\n @if (drive.usePhysicalFolders()) {\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"margin-top: 8px\">\n <span style=\"font-size: 12px\">\n <!-- \n nz-tooltip\n nzTooltipTitle=\"Khi b\u1EADt: T\u1EA5t c\u1EA3 User c\u00F9ng d\u00F9ng chung 1 RootPath duy nh\u1EA5t \u0111\u1EC3 l\u01B0u tr\u1EEF t\u00E0i li\u1EC7u d\u1EF1 \u00E1n\"\n -->\n D\u00F9ng chung RootPath\n </span>\n <nz-switch\n nzSize=\"small\"\n [ngModel]=\"drive.useSharedPhysicalRoot()\"\n (ngModelChange)=\"onToggleSharedRootMode($event)\"\n ></nz-switch>\n </div>\n <div class=\"quota-sub\">\n Ph\u1EA1m vi \u0111\u0129a:\n <strong>{{ drive.useSharedPhysicalRoot() ? \"Chung to\u00E0n d\u1EF1 \u00E1n\" : \"T\u00E1ch theo t\u1EEBng User\" }}</strong>\n </div>\n <div nz-flex nzVertical [nzGap]=\"6\" style=\"margin-top: 8px\">\n <button nz-button nzType=\"dashed\" nzSize=\"small\" nzBlock (click)=\"onSyncPhysicalDisk()\">\n <!-- \n nz-tooltip\n nzTooltipTitle=\"Qu\u00E9t c\u00E1c file/th\u01B0 m\u1EE5c copy tr\u1EF1c ti\u1EBFp tr\u00EAn \u1ED5 \u0111\u0129a Server \u0111\u1EC3 n\u1EA1p v\u00E0o Drive\"\n -->\n <nz-icon nzType=\"sync\"></nz-icon> \u0110\u1ED3ng b\u1ED9 t\u1EEB \u1ED5 \u0111\u0129a\n </button>\n <button nz-button nzType=\"default\" nzSize=\"small\" nzBlock (click)=\"openRelocateDrawer(null)\">\n <!-- \n nz-tooltip\n nzTooltipTitle=\"\u0110\u1ED5i \u0111\u01B0\u1EDDng d\u1EABn RootPath ho\u1EB7c \u00E1nh x\u1EA1 sang \u1ED5 c\u1EE9ng l\u01B0u tr\u1EEF kh\u00E1c\"\n -->\n <nz-icon nzType=\"folder-open\"></nz-icon> \u0110\u1ED5i RootPath / \u1ED4 \u0111\u0129a\n </button>\n </div>\n }\n </div>\n }\n <!-- H\u1ED8P TI\u1EBEN TR\u00CCNH UPLOAD (H\u1ED6 TR\u1EE2 T\u1EA2I TI\u1EBEP KHI L\u1ED6I / T\u1EA0M D\u1EEANG / H\u1EE6Y) -->\n @if (drive.userUploadQueue().length > 0) {\n <div class=\"upload-queue-box\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"margin-bottom: 6px\">\n <strong>Ti\u1EBFn tr\u00ECnh t\u1EA3i l\u00EAn ({{ drive.userUploadQueue().length }})</strong>\n <a (click)=\"drive.clearCompletedUploads()\" style=\"font-size: 12px\">\u1EA8n \u0111\u00E3 xong</a>\n </div>\n <input #resumeFileInput type=\"file\" hidden (change)=\"onResumeFileSelected($event)\" />\n @for (task of drive.userUploadQueue(); track task.id) {\n <div class=\"upload-task-row\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" [nzGap]=\"4\">\n <div class=\"upload-task-name\" [title]=\"task.fileName\">{{ task.fileName }}</div>\n <div nz-flex nzAlign=\"center\" [nzGap]=\"2\">\n @if (task.status === \"uploading\" && (task.fileSize || 0) >= 20971520) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n (click)=\"drive.pauseUploadTask(task.id)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"T\u1EA1m d\u1EEBng t\u1EA3i l\u00EAn\"\n -->\n <nz-icon nzType=\"pause-circle\"></nz-icon>\n </button>\n }\n @if (task.status === \"error\" || task.status === \"paused\") {\n <button\n type=\"button\"\n nz-button\n nzType=\"link\"\n nzSize=\"small\"\n style=\"padding: 0 4px; font-size: 12px; font-weight: 600\"\n (click)=\"onResumeUploadClick(task, resumeFileInput)\"\n >\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"task.errorMessage || 'T\u1EA3i l\u00EAn ti\u1EBFp t\u1EEB ph\u1EA7n tr\u0103m \u0111\u00E3 l\u01B0u (Resume Upload)'\"\n -->\n <nz-icon nzType=\"reload\"></nz-icon> T\u1EA3i ti\u1EBFp\n </button>\n }\n @if (task.status !== \"uploading\") {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzDanger\n nzSize=\"small\"\n style=\"padding: 0 4px\"\n (click)=\"drive.removeUploadTask(task.id)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"X\u00F3a kh\u1ECFi danh s\u00E1ch & h\u1EE7y phi\u00EAn t\u1EA1m\"\n -->\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n }\n </div>\n </div>\n <nz-progress\n [nzPercent]=\"task.progress\"\n nzSize=\"small\"\n [nzStatus]=\"\n task.status === 'error'\n ? 'exception'\n : task.status === 'success'\n ? 'success'\n : task.status === 'paused'\n ? 'normal'\n : 'active'\n \"\n ></nz-progress>\n @if (task.status === \"error\") {\n <div style=\"font-size: 11px; color: #ef4444; margin-top: 2px\">\n {{ task.errorMessage || \"B\u1ECB ng\u1EAFt k\u1EBFt n\u1ED1i.\" }} \u2014 B\u1EA5m <strong>T\u1EA3i ti\u1EBFp</strong> \u0111\u1EC3 n\u1ED1i l\u1EA1i t\u1EEB\n {{ task.progress }}%.\n </div>\n }\n @if (task.status === \"paused\") {\n <div style=\"font-size: 11px; color: #f59e0b; margin-top: 2px\">\n \u0110\u00E3 t\u1EA1m d\u1EEBng \u1EDF {{ task.progress }}% \u2014 B\u1EA5m <strong>T\u1EA3i ti\u1EBFp</strong> \u0111\u1EC3 ti\u1EBFp t\u1EE5c.\n </div>\n }\n </div>\n }\n </div>\n }\n <div class=\"quota-box\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\">\n <div class=\"quota-title\" style=\"margin-bottom: 0\">\n <nz-icon nzType=\"cloud\"></nz-icon> Dung l\u01B0\u1EE3ng ({{ drive.quotaPercent() }}%)\n </div>\n @if (drive.isCurrentUserAdmin()) {\n <nz-tag nzColor=\"gold\" style=\"margin-right: 0; font-size: 11px\">Admin</nz-tag>\n }\n </div>\n <nz-progress [nzPercent]=\"drive.quotaPercent()\" nzSize=\"small\" [nzShowInfo]=\"false\"></nz-progress>\n <div class=\"quota-sub\">{{ drive.usedBytes() | formatBytes }} / {{ drive.quotaLimitBytes() | formatBytes }}</div>\n @if (drive.isCurrentUserAdmin()) {\n <button\n nz-button\n nzType=\"dashed\"\n nzSize=\"small\"\n nzBlock\n style=\"margin-top: 8px\"\n (click)=\"openPermissionMatrixDrawer(drive.currentFolderId())\"\n >\n <nz-icon nzType=\"table\"></nz-icon>\n Ma tr\u1EADn ph\u00E2n quy\u1EC1n\n </button>\n <button\n nz-button\n nzType=\"dashed\"\n nzSize=\"small\"\n nzBlock\n style=\"margin-top: 8px\"\n (click)=\"openQuotaAdminDrawer()\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"\u0110\u1EB7t Quota m\u1EB7c \u0111\u1ECBnh to\u00E0n h\u1EC7 th\u1ED1ng v\u00E0 thi\u1EBFt l\u1EADp Quota ri\u00EAng cho t\u1EEBng ng\u01B0\u1EDDi d\u00F9ng (Ch\u1EC9 Admin)\"\n -->\n <nz-icon nzType=\"setting\"></nz-icon> Qu\u1EA3n l\u00FD Quota (Admin)\n </button>\n }\n </div>\n </aside>\n <!-- KHU V\u1EF0C N\u1ED8I DUNG CH\u00CDNH (H\u1ED6 TR\u1EE2 K\u00C9O TH\u1EA2 FILE & FOLDER T\u1EEA FILE EXPLORER) -->\n <main\n class=\"drive-main\"\n [class.external-drag-active]=\"isExternalFileDragging()\"\n (dragenter)=\"onMainDragEnter($event)\"\n (dragover)=\"onMainDragOver($event)\"\n (dragleave)=\"onMainDragLeave($event)\"\n (drop)=\"onMainDrop($event)\"\n >\n @if (isExternalFileDragging()) {\n <div class=\"external-drop-banner\">\n <nz-icon nzType=\"cloud-upload\" class=\"drop-banner-icon\"></nz-icon>\n <div>\n <div class=\"drop-banner-title\">\n @if (dragOverFolderName(); as targetName) {\n Th\u1EA3 t\u1EADp tin / th\u01B0 m\u1EE5c t\u1EEB m\u00E1y t\u00EDnh \u0111\u1EC3 t\u1EA3i th\u1EB3ng v\u00E0o th\u01B0 m\u1EE5c: <strong>\"{{ targetName }}\"</strong>\n } @else {\n Th\u1EA3 t\u1EADp tin ho\u1EB7c th\u01B0 m\u1EE5c t\u1EEB File Explorer v\u00E0o \u0111\u00E2y \u0111\u1EC3 t\u1EA3i l\u00EAn th\u01B0 m\u1EE5c hi\u1EC7n t\u1EA1i\n }\n </div>\n <div class=\"drop-banner-sub\">\n H\u1ED7 tr\u1EE3 k\u00E9o th\u1EA3 nhi\u1EC1u file c\u00F9ng l\u00FAc ho\u1EB7c k\u00E9o nguy\u00EAn c\u1EA3 c\u00E2y th\u01B0 m\u1EE5c t\u1EEB m\u00E1y t\u00EDnh (T\u1EF1 \u0111\u1ED9ng Chunk Upload n\u1EBFu\n file &ge; 20MB)\n </div>\n </div>\n </div>\n }\n <!-- TOOLBAR + PAGINATION -->\n <header class=\"drive-toolbar\">\n <div>\n <nz-breadcrumb>\n <nz-breadcrumb-item\n (click)=\"navigateToFolder(null)\"\n (dragover)=\"onBreadcrumbDragOver($event, '__ROOT__')\"\n (dragleave)=\"onBreadcrumbDragLeave('__ROOT__')\"\n (drop)=\"onBreadcrumbDrop($event, null)\"\n [class.bc-drop-active]=\"dragOverBreadcrumbId() === '__ROOT__'\"\n class=\"cursor-pointer\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"K\u00E9o th\u1EA3 m\u1EE5c v\u00E0o \u0111\u00E2y \u0111\u1EC3 chuy\u1EC3n v\u1EC1 th\u01B0 m\u1EE5c g\u1ED1c\"\n -->\n <nz-icon nzType=\"home\"></nz-icon>\n {{ getRootTitle() }}\n </nz-breadcrumb-item>\n @for (bc of drive.breadcrumbs(); track bc.Id) {\n <nz-breadcrumb-item\n (click)=\"navigateToFolder(bc.Id)\"\n (dragover)=\"onBreadcrumbDragOver($event, bc.Id)\"\n (dragleave)=\"onBreadcrumbDragLeave(bc.Id)\"\n (drop)=\"onBreadcrumbDrop($event, bc.Id)\"\n [class.bc-drop-active]=\"dragOverBreadcrumbId() === bc.Id\"\n class=\"cursor-pointer\"\n >\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"'K\u00E9o th\u1EA3 v\u00E0o \u0111\u00E2y \u0111\u1EC3 chuy\u1EC3n t\u1EDBi: ' + bc.Name\"\n -->\n {{ bc.Name }}\n </nz-breadcrumb-item>\n }\n </nz-breadcrumb>\n <!-- @if (drive.isCurrentUserAdmin() && drive.usePhysicalFolders() && drive.currentPhysicalPath(); as physPath) {\n <div class=\"physical-path-bar\">\n <nz-icon nzType=\"folder-open\"></nz-icon>\n <span>\n \u0110\u01B0\u1EDDng d\u1EABn v\u1EADt l\u00FD: <code>{{ physPath }}</code>\n </span>\n <icon-copy [textToCopy]=\"physPath\" tooltip=\"Sao ch\u00E9p \u0111\u01B0\u1EDDng d\u1EABn v\u1EADt l\u00FD tr\u00EAn Server\"></icon-copy>\n </div>\n } -->\n </div>\n <div class=\"toolbar-actions\">\n <nz-input-group [nzSuffix]=\"suffixIconSearch\" style=\"width: 250px\">\n <input\n type=\"text\"\n nz-input\n placeholder=\"T\u00ECm ki\u1EBFm t\u00E0i li\u1EC7u, th\u01B0 m\u1EE5c...\"\n [ngModel]=\"drive.keyword()\"\n (ngModelChange)=\"drive.keyword.set($event)\"\n (keyup.enter)=\"onSearch()\"\n />\n </nz-input-group>\n <ng-template #suffixIconSearch>\n <nz-icon nzType=\"search\" class=\"cursor-pointer\" (click)=\"onSearch()\"></nz-icon>\n </ng-template>\n <label\n nz-checkbox\n [ngModel]=\"drive.includeSubfolders()\"\n (ngModelChange)=\"onToggleIncludeSubfolders($event)\"\n style=\"user-select: none; white-space: nowrap; font-size: 13px\"\n nz-tooltip\n nzTooltipTitle=\"T\u00ECm c\u1EA3 th\u01B0 m\u1EE5c con\"\n >\n </label>\n <!-- T\u00D9Y CH\u1ECCN CH\u1EBE \u0110\u1ED8 XEM: B\u1EA2NG PH\u1EB2NG vs C\u00C2Y TH\u01AF M\u1EE4C (TREE TABLE) -->\n <div class=\"view-mode-switch\" nz-flex nzAlign=\"center\" [nzGap]=\"4\">\n <button\n nz-button\n nzSize=\"small\"\n [nzType]=\"!drive.isTreeTableView() ? 'primary' : 'default'\"\n (click)=\"onToggleTreeTableView(false)\"\n nz-tooltip\n nzTooltipTitle=\"Flat Table\"\n >\n <nz-icon nzType=\"unordered-list\"></nz-icon>\n <!-- B\u1EA3ng ph\u1EB3ng -->\n </button>\n <button\n nz-button\n nzSize=\"small\"\n [nzType]=\"drive.isTreeTableView() ? 'primary' : 'default'\"\n (click)=\"onToggleTreeTableView(true)\"\n nz-tooltip\n nzTooltipTitle=\"Tree Table\"\n >\n <nz-icon nzType=\"apartment\"></nz-icon>\n <!-- Tree Table -->\n </button>\n @if (drive.isTreeTableView()) {\n <button\n nz-button\n nzSize=\"small\"\n nzType=\"dashed\"\n (click)=\"expandAllTreeFolders()\"\n nz-tooltip\n nzTooltipTitle=\"M\u1EDF r\u1ED9ng\"\n >\n <nz-icon nzType=\"node-expand\"></nz-icon>\n </button>\n <button\n nz-button\n nzSize=\"small\"\n nzType=\"dashed\"\n (click)=\"collapseAllTreeFolders()\"\n nz-tooltip\n nzTooltipTitle=\"Thu g\u1ECDn\"\n >\n <nz-icon nzType=\"node-collapse\"></nz-icon>\n </button>\n }\n </div>\n <button\n nz-button\n nzSize=\"small\"\n nzType=\"default\"\n nz-tooltip\n [nzTooltipTitle]=\"drive.sortDesc() ? 'A \u2192 Z' : 'Z \u2192 A'\"\n (click)=\"toggleSortDirection()\"\n >\n <nz-icon [nzType]=\"drive.sortDesc() ? 'sort-descending' : 'sort-ascending'\"></nz-icon>\n </button>\n <button\n nz-button\n nzType=\"default\"\n nzSize=\"small\"\n (click)=\"refreshExplorer()\"\n nz-tooltip\n nzTooltipTitle=\"L\u00E0m m\u1EDBi\"\n >\n <nz-icon nzType=\"reload\"></nz-icon>\n </button>\n <nz-pagination\n [nzSize]=\"'small'\"\n [nzPageIndex]=\"drive.pageIndex()\"\n [nzPageSize]=\"drive.pageSize()\"\n [nzTotal]=\"drive.totalCount()\"\n [nzShowSizeChanger]=\"true\"\n [nzPageSizeOptions]=\"AppGlobals.pageSizeOptions\"\n (nzPageIndexChange)=\"drive.loadNodes($event, drive.pageSize())\"\n (nzPageSizeChange)=\"drive.loadNodes(1, $event)\"\n >\n </nz-pagination>\n </div>\n </header>\n <!-- DANH S\u00C1CH T\u1EACP TIN / TH\u01AF M\u1EE4C (H\u1ED6 TR\u1EE2 C\u1EA2 FLAT TABLE V\u00C0 TREE TABLE) -->\n <nz-table\n #explorerTable\n [nzData]=\"displayedTableItems()\"\n [nzLoading]=\"drive.loading()\"\n [nzBordered]=\"true\"\n [nzFrontPagination]=\"false\"\n [nzShowPagination]=\"false\"\n nzSize=\"small\"\n >\n <thead>\n <tr>\n <th nzWidth=\"45px\" class=\"text-center\">#</th>\n <th class=\"sortable-th\" (click)=\"onSortColumn('Name')\">\n <div class=\"th-sort-wrap\">\n <span>T\u00EAn t\u00E0i li\u1EC7u / Th\u01B0 m\u1EE5c</span>\n <span class=\"sort-icon\" [class.active]=\"drive.sortBy() === 'Name'\">\n <nz-icon\n [nzType]=\"\n drive.sortBy() === 'Name' ? (drive.sortDesc() ? 'sort-descending' : 'sort-ascending') : 'swap'\n \"\n ></nz-icon>\n </span>\n </div>\n </th>\n <th nzWidth=\"150px\" class=\"sortable-th\" (click)=\"onSortColumn('OwnerName')\">\n <div class=\"th-sort-wrap\">\n <span>Ch\u1EE7 s\u1EDF h\u1EEFu</span>\n @if (drive.sortBy() === \"OwnerName\") {\n <nz-icon [nzType]=\"drive.sortDesc() ? 'caret-down' : 'caret-up'\" class=\"sort-icon active\"></nz-icon>\n }\n </div>\n </th>\n <th nzWidth=\"130px\" class=\"text-center sortable-th\" (click)=\"onSortColumn('AccessLevel')\">\n <div class=\"th-sort-wrap justify-center\">\n <span>Quy\u1EC1n truy c\u1EADp</span>\n @if (drive.sortBy() === \"AccessLevel\") {\n <nz-icon [nzType]=\"drive.sortDesc() ? 'caret-down' : 'caret-up'\" class=\"sort-icon active\"></nz-icon>\n }\n </div>\n </th>\n <th nzWidth=\"110px\" class=\"text-right sortable-th\" (click)=\"onSortColumn('SizeBytes')\">\n <div class=\"th-sort-wrap justify-end\">\n <span>K\u00EDch th\u01B0\u1EDBc</span>\n @if (drive.sortBy() === \"SizeBytes\") {\n <nz-icon [nzType]=\"drive.sortDesc() ? 'caret-down' : 'caret-up'\" class=\"sort-icon active\"></nz-icon>\n }\n </div>\n </th>\n <th nzWidth=\"145px\" class=\"text-center sortable-th\" (click)=\"onSortColumn('UpdatedDate')\">\n <div class=\"th-sort-wrap justify-center\">\n <span>C\u1EADp nh\u1EADt cu\u1ED1i</span>\n @if (drive.sortBy() === \"UpdatedDate\") {\n <nz-icon [nzType]=\"drive.sortDesc() ? 'caret-down' : 'caret-up'\" class=\"sort-icon active\"></nz-icon>\n }\n </div>\n </th>\n <th nzWidth=\"210px\" class=\"text-center\">Thao t\u00E1c</th>\n </tr>\n </thead>\n <tbody>\n @for (item of explorerTable.data; track item.Id; let i = $index) {\n <tr\n [attr.draggable]=\"drive.currentViewMode() !== 'TRASH' && item.EffectiveAccess >= DriveAccessLevel.Editor\"\n (dragstart)=\"onRowDragStart($event, item)\"\n (dragend)=\"onRowDragEnd()\"\n (dragover)=\"onRowDragOver($event, item)\"\n (dragleave)=\"onRowDragLeave($event, item)\"\n (drop)=\"onRowDrop($event, item)\"\n (dblclick)=\"onRowDoubleClick(item)\"\n (contextmenu)=\"onContextMenu($event, menu, item)\"\n class=\"drive-row\"\n [class.dragging-row]=\"draggedNode()?.Id === item.Id\"\n [class.drop-target-active]=\"dragOverFolderId() === item.Id\"\n >\n <td class=\"text-center\">{{ i + 1 + (drive.pageIndex() - 1) * drive.pageSize() }}</td>\n <td\n [nzIndentSize]=\"drive.isTreeTableView() ? (item.treeLevel || 0) * 22 : 0\"\n [nzShowExpand]=\"drive.isTreeTableView() && isFolderLike(item) && !item.IsBrokenShortcut\"\n [nzExpand]=\"!!item.treeExpanded\"\n (nzExpandChange)=\"toggleExpandTreeFolder(item, $event)\"\n >\n <div class=\"node-name-cell\">\n <span class=\"node-icon-wrap\">\n <nz-icon\n [nzType]=\"isFolderLike(item) ? 'folder-fill' : getFileIcon(item)\"\n [style.color]=\"isFolderLike(item) ? '#f59e0b' : 'var(--primary-color)'\"\n class=\"node-icon\"\n ></nz-icon>\n @if (item.NodeType === DriveNodeType.Shortcut) {\n <span class=\"shortcut-badge\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"'L\u1ED1i t\u1EAFt tr\u1ECF t\u1EDBi: ' + (item.ShortcutTargetName || item.Name)\"\n -->\n <nz-icon nzType=\"select\"></nz-icon>\n </span>\n }\n </span>\n <span class=\"node-title link-detail\" (click)=\"onRowSingleClick(item)\">{{ item.Name }}</span>\n @if (drive.keyword().trim() && item.ParentFolderName && item.ParentId !== drive.currentFolderId()) {\n <nz-tag\n nzColor=\"default\"\n style=\"margin-left: 6px; cursor: pointer\"\n (click)=\"$event.stopPropagation(); navigateToFolder(item.ParentId || null)\"\n >\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"'\u0110ang n\u1EB1m trong th\u01B0 m\u1EE5c: ' + item.ParentFolderName + ' (Nh\u1EA5n \u0111\u1EC3 m\u1EDF th\u01B0 m\u1EE5c)'\"\n -->\n <nz-icon nzType=\"folder\"></nz-icon> {{ item.ParentFolderName }}\n </nz-tag>\n }\n @if (item.NodeType === DriveNodeType.Shortcut) {\n @if (item.IsBrokenShortcut) {\n <nz-tag nzColor=\"error\" style=\"margin-left: 6px\">M\u1EE5c g\u1ED1c \u0111\u00E3 x\u00F3a</nz-tag>\n } @else {\n <nz-tag nzColor=\"purple\" style=\"margin-left: 6px\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"'\u0110\u00EDch: ' + (item.ShortcutTargetName || item.Name)\"\n -->\n <nz-icon nzType=\"link\"></nz-icon> L\u1ED1i t\u1EAFt\n </nz-tag>\n }\n }\n @if (item.IsStarred) {\n <nz-icon nzType=\"star\" nzTheme=\"fill\" style=\"color: #eab308; margin-left: 4px\"></nz-icon>\n }\n @if (item.IsShared) {\n <nz-tag nzColor=\"processing\" style=\"margin-left: 6px\">\u0110\u00E3 chia s\u1EBB</nz-tag>\n }\n @if (!item.InheritPermissions) {\n <nz-tag nzColor=\"warning\" nz-tooltip nzTooltipTitle=\"\u0110\u00E3 ng\u1EAFt k\u1EBF th\u1EEBa quy\u1EC1n t\u1EEB th\u01B0 m\u1EE5c cha\">\n \u0110\u1ED9c l\u1EADp\n </nz-tag>\n }\n </div>\n </td>\n <td>{{ item.OwnerName || item.OwnerId }}</td>\n <td class=\"text-center\">\n <nz-tag\n [nzColor]=\"\n item.EffectiveAccess >= DriveAccessLevel.Editor\n ? 'green'\n : item.EffectiveAccess >= DriveAccessLevel.Uploader\n ? 'cyan'\n : 'default'\n \"\n >\n {{\n item.EffectiveAccess >= DriveAccessLevel.Manager\n ? \"Qu\u1EA3n tr\u1ECB\"\n : item.EffectiveAccess >= DriveAccessLevel.Editor\n ? \"Ch\u1EC9nh s\u1EEDa\"\n : item.EffectiveAccess >= DriveAccessLevel.Uploader\n ? \"Xem & T\u1EA3i l\u00EAn\"\n : item.CanDownload && item.EffectiveAccess >= DriveAccessLevel.Downloader\n ? \"Xem & T\u1EA3i\"\n : \"Ch\u1EC9 xem\"\n }}\n </nz-tag>\n </td>\n <td class=\"text-right\">\n {{ isFolderLike(item) ? \"\u2014\" : (item.SizeBytes | formatBytes) }}\n </td>\n <td class=\"text-center\">{{ item.UpdatedDate | date: \"dd/MM/yyyy HH:mm\" }}</td>\n <td class=\"text-center\">\n <div class=\"action-btn-group\">\n @if (drive.currentViewMode() !== \"TRASH\") {\n @if (item.CanShare || item.EffectiveAccess >= DriveAccessLevel.Manager) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); openShareDrawer(item)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"Chia s\u1EBB & Ph\u00E2n quy\u1EC1n (Drawer)\"\n -->\n <nz-icon nzType=\"share-alt\"></nz-icon>\n </button>\n }\n @if (item.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); openMoveDrawer(item)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"Di chuy\u1EC3n sang th\u01B0 m\u1EE5c kh\u00E1c (Move Drawer ho\u1EB7c K\u00E9o th\u1EA3)\"\n -->\n <nz-icon nzType=\"drag\"></nz-icon>\n </button>\n }\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); openCopyDrawer(item)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"Sao ch\u00E9p t\u1EDBi... (Copy To Drawer)\"\n -->\n <nz-icon nzType=\"copy\"></nz-icon>\n </button>\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); openShortcutDrawer(item)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"T\u1EA1o l\u1ED1i t\u1EAFt (Shortcut Drawer)\"\n -->\n <nz-icon nzType=\"link\"></nz-icon>\n </button>\n @if (\n item.NodeType === DriveNodeType.Folder &&\n drive.usePhysicalFolders() &&\n item.EffectiveAccess >= DriveAccessLevel.Manager\n ) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); openRelocateDrawer(item)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"\u0110\u1ED5i \u0111\u01B0\u1EDDng d\u1EABn v\u1EADt l\u00FD / \u00C1nh x\u1EA1 \u1ED5 c\u1EE9ng l\u01B0u tr\u1EEF (Drawer)\"\n -->\n <nz-icon nzType=\"hdd\"></nz-icon>\n </button>\n }\n @if (\n isFileLike(item) &&\n !item.IsBrokenShortcut &&\n item.CanDownload &&\n item.EffectiveAccess >= DriveAccessLevel.Downloader\n ) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); onDownloadItem(item)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"T\u1EA3i xu\u1ED1ng\"\n -->\n <nz-icon nzType=\"download\"></nz-icon>\n </button>\n }\n @if (\n isFileLike(item) && !item.IsBrokenShortcut && item.EffectiveAccess >= DriveAccessLevel.Editor\n ) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); openVersionDrawer(item)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"L\u1ECBch s\u1EED phi\u00EAn b\u1EA3n (Drawer)\"\n -->\n <nz-icon nzType=\"history\"></nz-icon>\n </button>\n }\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); openFolderDrawer('rename', item)\"\n >\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"\n item.EffectiveAccess >= DriveAccessLevel.Editor\n ? '\u0110\u1ED5i t\u00EAn & Chi ti\u1EBFt (Drawer)'\n : 'Xem chi ti\u1EBFt & Nh\u1EADt k\u00FD (Drawer)'\n \"\n -->\n <nz-icon\n [nzType]=\"item.EffectiveAccess >= DriveAccessLevel.Editor ? 'edit' : 'info-circle'\"\n ></nz-icon>\n </button>\n @if (item.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-warn\"\n (click)=\"$event.stopPropagation(); onSoftDelete(item)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"Chuy\u1EC3n v\u00E0o th\u00F9ng r\u00E1c\"\n -->\n <nz-icon nzType=\"delete\"></nz-icon>\n </button>\n }\n } @else {\n @if (item.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-primary\"\n (click)=\"$event.stopPropagation(); onRestore(item)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"Kh\u00F4i ph\u1EE5c\"\n -->\n <nz-icon nzType=\"rollback\"></nz-icon>\n </button>\n }\n @if (item.EffectiveAccess >= DriveAccessLevel.Manager) {\n <button\n type=\"button\"\n class=\"action-icon-btn color-warn\"\n (click)=\"$event.stopPropagation(); onPermanentDelete(item)\"\n >\n <!-- \n nz-tooltip\n nzTooltipTitle=\"X\u00F3a v\u0129nh vi\u1EC5n\"\n -->\n <nz-icon nzType=\"delete\"></nz-icon>\n </button>\n }\n }\n </div>\n </td>\n </tr>\n }\n </tbody>\n </nz-table>\n <!-- CONTEXT MENU CHU\u1ED8T PH\u1EA2I -->\n <nz-dropdown-menu #menu=\"nzDropdownMenu\">\n @if (selectedContextItem(); as ctx) {\n <ul nz-menu>\n @if (ctx.NodeType === DriveNodeType.File) {\n <li nz-menu-item (click)=\"previewFile(ctx)\">\n <nz-icon nzType=\"eye\"></nz-icon> Xem tr\u1EF1c ti\u1EBFp (Drawer Preview)\n </li>\n @if (ctx.CanDownload && ctx.EffectiveAccess >= DriveAccessLevel.Downloader) {\n <li nz-menu-item (click)=\"onDownloadItem(ctx)\"><nz-icon nzType=\"download\"></nz-icon> T\u1EA3i xu\u1ED1ng</li>\n }\n @if (ctx.EffectiveAccess >= DriveAccessLevel.Editor) {\n <li nz-menu-item (click)=\"openVersionDrawer(ctx)\">\n <nz-icon nzType=\"history\"></nz-icon> L\u1ECBch s\u1EED phi\u00EAn b\u1EA3n...\n </li>\n }\n <li nz-menu-divider></li>\n }\n @if (ctx.CanShare || ctx.EffectiveAccess >= DriveAccessLevel.Manager) {\n <li nz-menu-item (click)=\"openShareDrawer(ctx)\">\n <nz-icon nzType=\"usergroup-add\"></nz-icon> Ph\u00E2n quy\u1EC1n & Chia s\u1EBB...\n </li>\n }\n @if (ctx.EffectiveAccess >= DriveAccessLevel.Editor) {\n <li nz-menu-item (click)=\"openMoveDrawer(ctx)\">\n <nz-icon nzType=\"drag\"></nz-icon> Di chuy\u1EC3n sang th\u01B0 m\u1EE5c kh\u00E1c...\n </li>\n }\n <li nz-menu-item (click)=\"openCopyDrawer(ctx)\">\n <nz-icon nzType=\"copy\"></nz-icon> Sao ch\u00E9p t\u1EDBi (Copy to)...\n </li>\n <li nz-menu-item (click)=\"openShortcutDrawer(ctx)\">\n <nz-icon nzType=\"link\"></nz-icon> T\u1EA1o l\u1ED1i t\u1EAFt (Shortcut)...\n </li>\n @if (\n ctx.NodeType === DriveNodeType.Folder &&\n drive.usePhysicalFolders() &&\n ctx.EffectiveAccess >= DriveAccessLevel.Manager\n ) {\n <li nz-menu-item (click)=\"openRelocateDrawer(ctx)\">\n <nz-icon nzType=\"hdd\"></nz-icon> \u0110\u1ED5i \u0111\u01B0\u1EDDng d\u1EABn v\u1EADt l\u00FD / Chuy\u1EC3n \u1ED5 \u0111\u0129a...\n </li>\n }\n <li nz-menu-item (click)=\"openFolderDrawer('rename', ctx)\">\n <nz-icon [nzType]=\"ctx.EffectiveAccess >= DriveAccessLevel.Editor ? 'edit' : 'info-circle'\"></nz-icon>\n {{\n ctx.EffectiveAccess >= DriveAccessLevel.Editor ? \"\u0110\u1ED5i t\u00EAn & Chi ti\u1EBFt...\" : \"Xem chi ti\u1EBFt & Nh\u1EADt k\u00FD...\"\n }}\n </li>\n <li nz-menu-item (click)=\"drive.toggleStar(ctx.Id)\">\n <nz-icon nzType=\"star\"></nz-icon> {{ ctx.IsStarred ? \"B\u1ECF d\u1EA5u sao\" : \"Th\u00EAm d\u1EA5u sao\" }}\n </li>\n @if (ctx.EffectiveAccess >= DriveAccessLevel.Editor) {\n <li nz-menu-divider></li>\n <li nz-menu-item nzDanger (click)=\"onSoftDelete(ctx)\">\n <nz-icon nzType=\"delete\"></nz-icon> Chuy\u1EC3n v\u00E0o th\u00F9ng r\u00E1c\n </li>\n }\n @if (ctx.NodeType === DriveNodeType.Folder) {\n <li nz-menu-item (click)=\"openTemplateDrawer('create', undefined, ctx)\">\n <nz-icon nzType=\"apartment\"></nz-icon> L\u01B0u c\u1EA5u tr\u00FAc th\u01B0 m\u1EE5c l\u00E0m M\u1EABu...\n </li>\n }\n </ul>\n }\n </nz-dropdown-menu>\n </main>\n </div>\n <!-- ========================================================================= -->\n <!-- DRAWER 1: CHIA S\u1EBA & PH\u00C2N QUY\u1EC0N (ACL / RBAC / SHARE LINKS) -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"shareDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"840\"\n [nzClosable]=\"false\"\n [nzTitle]=\"shareDrawerTitleTpl\"\n [nzFooter]=\"shareDrawerFooterTpl\"\n (nzOnClose)=\"shareDrawerVisible = false\"\n >\n <ng-template #shareDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n @if (activeActionNode(); as node) {\n <nz-icon\n [nzType]=\"node.NodeType === DriveNodeType.Folder ? 'folder-fill' : getFileIcon(node)\"\n [style.color]=\"node.NodeType === DriveNodeType.Folder ? '#f59e0b' : 'var(--primary-color)'\"\n style=\"font-size: 18px\"\n ></nz-icon>\n <strong>Chia s\u1EBB & Ph\u00E2n quy\u1EC1n: {{ node.Name }}</strong>\n <nz-tag nzColor=\"blue\">{{ node.NodeType === DriveNodeType.Folder ? \"Th\u01B0 m\u1EE5c\" : \"T\u1EADp tin\" }}</nz-tag>\n }\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"shareDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n @if (activeActionNode(); as node) {\n <lib-drive-share-modal [nodeId]=\"node.Id\"></lib-drive-share-modal>\n }\n </ng-container>\n <ng-template #shareDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"shareDrawerVisible = false\">\u0110\u00F3ng</button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 2: L\u1ECACH S\u1EEC PHI\u00CAN B\u1EA2N T\u1EACP TIN (FILE VERSIONS) -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"versionDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"760\"\n [nzClosable]=\"false\"\n [nzTitle]=\"versionDrawerTitleTpl\"\n [nzFooter]=\"versionDrawerFooterTpl\"\n (nzOnClose)=\"versionDrawerVisible = false\"\n >\n <ng-template #versionDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"history\" style=\"font-size: 18px; color: var(--primary-color)\"></nz-icon>\n <strong>L\u1ECBch s\u1EED phi\u00EAn b\u1EA3n: {{ activeActionNode()?.Name }}</strong>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"versionDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n @if (activeActionNode(); as node) {\n <lib-drive-version-modal\n [nodeId]=\"node.Id\"\n [nodeName]=\"node.Name\"\n [canEdit]=\"node.EffectiveAccess >= DriveAccessLevel.Editor\"\n [canDownload]=\"node.CanDownload && node.EffectiveAccess >= DriveAccessLevel.Downloader\"\n (closed)=\"versionDrawerVisible = false\"\n ></lib-drive-version-modal>\n }\n </ng-container>\n <ng-template #versionDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"versionDrawerVisible = false\">\u0110\u00F3ng</button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 3: T\u1EA0O TH\u01AF M\u1EE4C M\u1EDAI / \u0110\u1ED4I T\u00CAN & CHI TI\u1EBET THU\u1ED8C T\u00CDNH + ACTIVITY LOG -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"folderDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"480\"\n [nzClosable]=\"false\"\n [nzTitle]=\"folderDrawerTitleTpl\"\n [nzFooter]=\"folderDrawerFooterTpl\"\n (nzOnClose)=\"folderDrawerVisible = false\"\n >\n <ng-template #folderDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon\n [nzType]=\"folderDrawerMode === 'create' ? 'folder-add' : canRenameTargetNode() ? 'edit' : 'info-circle'\"\n style=\"font-size: 18px; color: var(--primary-color)\"\n ></nz-icon>\n <strong>\n {{\n folderDrawerMode === \"create\"\n ? \"T\u1EA1o th\u01B0 m\u1EE5c m\u1EDBi\"\n : canRenameTargetNode()\n ? \"\u0110\u1ED5i t\u00EAn & Chi ti\u1EBFt m\u1EE5c\"\n : \"Chi ti\u1EBFt & Nh\u1EADt k\u00FD ho\u1EA1t \u0111\u1ED9ng\"\n }}\n </strong>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"folderDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n <div nz-flex nzVertical [nzGap]=\"16\">\n <div>\n <label class=\"drawer-field-label\">\n {{ folderDrawerMode === \"create\" ? \"T\u00EAn th\u01B0 m\u1EE5c m\u1EDBi\" : \"T\u00EAn hi\u1EC3n th\u1ECB\" }}\n </label>\n <input\n nz-input\n [(ngModel)]=\"folderDrawerInputName\"\n [disabled]=\"folderDrawerMode === 'rename' && !canRenameTargetNode()\"\n [appAutoFocus]=\"folderDrawerVisible && (folderDrawerMode === 'create' || canRenameTargetNode())\"\n placeholder=\"Nh\u1EADp t\u00EAn th\u01B0 m\u1EE5c / t\u00E0i li\u1EC7u...\"\n (keyup.enter)=\"submitFolderDrawer()\"\n />\n </div>\n @if (folderDrawerMode === \"create\" && drive.usePhysicalFolders() && drive.currentPhysicalPath(); as phys) {\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">Ch\u1EBF \u0111\u1ED9 l\u01B0u tr\u1EEF:</span>\n <nz-tag nzColor=\"green\">Th\u01B0 m\u1EE5c v\u1EADt l\u00FD (Disk)</nz-tag>\n </div>\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">Th\u01B0 m\u1EE5c cha tr\u00EAn \u0111\u0129a:</span>\n <code class=\"break-word\">{{ phys }}</code>\n </div>\n </div>\n }\n @if (folderDrawerMode === \"rename\" && folderDrawerTargetNode; as target) {\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-header\">\n <nz-icon\n [nzType]=\"target.NodeType === DriveNodeType.Folder ? 'folder-fill' : getFileIcon(target)\"\n [style.color]=\"target.NodeType === DriveNodeType.Folder ? '#f59e0b' : 'var(--primary-color)'\"\n style=\"font-size: 22px\"\n ></nz-icon>\n <div>\n <div style=\"font-weight: 600\">{{ target.Name }}</div>\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">\n {{\n target.NodeType === DriveNodeType.Folder\n ? \"Th\u01B0 m\u1EE5c\"\n : \"T\u1EADp tin (\" + (target.Extension || target.MimeType || \"File\") + \")\"\n }}\n </div>\n </div>\n </div>\n <nz-divider style=\"margin: 10px 0\"></nz-divider>\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">Ch\u1EE7 s\u1EDF h\u1EEFu:</span>\n <strong>{{ target.OwnerName || target.OwnerId }}</strong>\n </div>\n @if (target.NodeType === DriveNodeType.File) {\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">K\u00EDch th\u01B0\u1EDBc:</span>\n <span>{{ target.SizeBytes | formatBytes }}</span>\n </div>\n }\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">Quy\u1EC1n c\u1EE7a b\u1EA1n:</span>\n <nz-tag\n [nzColor]=\"\n target.EffectiveAccess >= DriveAccessLevel.Editor\n ? 'green'\n : target.EffectiveAccess >= DriveAccessLevel.Uploader\n ? 'cyan'\n : 'default'\n \"\n >\n {{\n target.EffectiveAccess >= DriveAccessLevel.Manager\n ? \"Qu\u1EA3n tr\u1ECB (Manager)\"\n : target.EffectiveAccess >= DriveAccessLevel.Editor\n ? \"Ch\u1EC9nh s\u1EEDa (Editor)\"\n : target.EffectiveAccess >= DriveAccessLevel.Uploader\n ? \"Xem & T\u1EA3i l\u00EAn (Uploader)\"\n : target.CanDownload && target.EffectiveAccess >= DriveAccessLevel.Downloader\n ? \"Xem & T\u1EA3i xu\u1ED1ng\"\n : \"Ch\u1EC9 xem (Viewer)\"\n }}\n </nz-tag>\n </div>\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">K\u1EBF th\u1EEBa quy\u1EC1n:</span>\n <nz-tag [nzColor]=\"target.InheritPermissions ? 'blue' : 'warning'\">\n {{ target.InheritPermissions ? \"\u0110ang k\u1EBF th\u1EEBa\" : \"\u0110\u1ED9c l\u1EADp\" }}\n </nz-tag>\n </div>\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">C\u1EADp nh\u1EADt cu\u1ED1i:</span>\n <span>{{ target.UpdatedDate | date: \"dd/MM/yyyy HH:mm\" }}</span>\n </div>\n @if (target.PhysicalRelativePath) {\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">\u0110\u01B0\u1EDDng d\u1EABn \u0111\u0129a:</span>\n <code class=\"break-word\">{{ target.PhysicalRelativePath }}</code>\n </div>\n }\n @if (drive.isCurrentUserAdmin() && drive.usePhysicalFolders() && drive.currentPhysicalPath(); as physPath) {\n <div class=\"physical-path-bar\">\n <span style=\"word-break: break-all\">\n \u0110\u01B0\u1EDDng d\u1EABn v\u1EADt l\u00FD: <code style=\"padding-top: 0px\">{{ physPath }}</code>\n </span>\n <icon-copy [textToCopy]=\"physPath\" tooltip=\"Sao ch\u00E9p \u0111\u01B0\u1EDDng d\u1EABn v\u1EADt l\u00FD tr\u00EAn Server\"></icon-copy>\n </div>\n }\n </div>\n <div>\n <label class=\"drawer-field-label\">Thao t\u00E1c nhanh</label>\n <div nz-flex nzWrap=\"wrap\" [nzGap]=\"8\">\n @if (target.CanShare || target.EffectiveAccess >= DriveAccessLevel.Manager) {\n <button nz-button nzSize=\"small\" (click)=\"folderDrawerVisible = false; openShareDrawer(target)\">\n <nz-icon nzType=\"share-alt\"></nz-icon> Chia s\u1EBB & Ph\u00E2n quy\u1EC1n\n </button>\n }\n @if (target.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button nz-button nzSize=\"small\" (click)=\"folderDrawerVisible = false; openMoveDrawer(target)\">\n <nz-icon nzType=\"drag\"></nz-icon> Di chuy\u1EC3n\n </button>\n }\n <button nz-button nzSize=\"small\" (click)=\"folderDrawerVisible = false; openCopyDrawer(target)\">\n <nz-icon nzType=\"copy\"></nz-icon> Sao ch\u00E9p t\u1EDBi\n </button>\n <button nz-button nzSize=\"small\" (click)=\"folderDrawerVisible = false; openShortcutDrawer(target)\">\n <nz-icon nzType=\"link\"></nz-icon> T\u1EA1o l\u1ED1i t\u1EAFt\n </button>\n @if (\n target.NodeType === DriveNodeType.Folder &&\n drive.usePhysicalFolders() &&\n target.EffectiveAccess >= DriveAccessLevel.Manager\n ) {\n <button nz-button nzSize=\"small\" (click)=\"folderDrawerVisible = false; openRelocateDrawer(target)\">\n <nz-icon nzType=\"hdd\"></nz-icon> \u0110\u1ED5i \u1ED5 \u0111\u0129a v\u1EADt l\u00FD\n </button>\n }\n @if (target.NodeType === DriveNodeType.File) {\n @if (target.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button nz-button nzSize=\"small\" (click)=\"folderDrawerVisible = false; openVersionDrawer(target)\">\n <nz-icon nzType=\"history\"></nz-icon> L\u1ECBch s\u1EED phi\u00EAn b\u1EA3n\n </button>\n }\n @if (target.CanDownload && target.EffectiveAccess >= DriveAccessLevel.Downloader) {\n <button nz-button nzSize=\"small\" (click)=\"onDownloadItem(target)\">\n <nz-icon nzType=\"download\"></nz-icon> T\u1EA3i xu\u1ED1ng\n </button>\n }\n }\n <button nz-button nzSize=\"small\" (click)=\"drive.toggleStar(target.Id)\">\n <nz-icon nzType=\"star\" [nzTheme]=\"target.IsStarred ? 'fill' : 'outline'\"></nz-icon>\n {{ target.IsStarred ? \"B\u1ECF sao\" : \"G\u1EAFn sao\" }}\n </button>\n </div>\n </div>\n <!-- NH\u1EACT K\u00DD HO\u1EA0T \u0110\u1ED8NG (ACTIVITY LOG) -->\n <div>\n <label class=\"drawer-field-label\">\n <nz-icon nzType=\"OrderedList\"></nz-icon> Nh\u1EADt k\u00FD ho\u1EA1t \u0111\u1ED9ng g\u1EA7n \u0111\u00E2y ({{ nodeActivities().length }})\n </label>\n <div class=\"drawer-meta-card\" style=\"max-height: 240px; overflow-y: auto\">\n @if (nodeActivities().length === 0) {\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">Ch\u01B0a c\u00F3 nh\u1EADt k\u00FD ho\u1EA1t \u0111\u1ED9ng.</div>\n } @else {\n @for (act of nodeActivities(); track act.Id) {\n <div style=\"padding: 6px 0; border-bottom: 1px dashed var(--app-border, #e2e8f0); font-size: 12px\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\">\n <nz-tag nzColor=\"blue\">{{ formatActivityAction(act.ActionType) }}</nz-tag>\n <span style=\"color: var(--app-text-muted, #64748b)\">{{\n act.CreatedDate | date: \"dd/MM/yyyy HH:mm:ss\"\n }}</span>\n </div>\n <div style=\"margin-top: 4px\">\n Th\u1EF1c hi\u1EC7n b\u1EDFi: <strong>{{ act.ActorUserName || act.ActorUserId || \"H\u1EC7 th\u1ED1ng\" }}</strong>\n </div>\n @if (act.DetailJson) {\n <div style=\"margin-top: 2px; color: var(--app-text-muted, #64748b); word-break: break-all\">\n <code>{{ formatActivityDetail(act) }}</code>\n </div>\n }\n </div>\n }\n }\n </div>\n </div>\n }\n @if (folderDrawerMode === \"create\") {\n <div class=\"drawer-meta-card\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\">\n <label class=\"drawer-field-label\" style=\"margin-bottom: 0\">\n <nz-icon nzType=\"apartment\" style=\"color: #d97706; margin-right: 4px\"></nz-icon>\n T\u1EA1o nhanh t\u1EEB M\u1EABu c\u00E2y th\u01B0 m\u1EE5c (T\u00F9y ch\u1ECDn)\n </label>\n <a style=\"font-size: 12px\" (click)=\"folderDrawerVisible = false; openTemplateDrawer('create')\">\n + \u0110\u1ECBnh ngh\u0129a m\u1EABu m\u1EDBi\n </a>\n </div>\n <nz-select\n nzShowSearch\n nzAllowClear\n nzPlaceHolder=\"-- Kh\u00F4ng d\u00F9ng m\u1EABu (Ch\u1EC9 t\u1EA1o 1 th\u01B0 m\u1EE5c \u0111\u01A1n) --\"\n [(ngModel)]=\"folderDrawerSelectedTemplateId\"\n (ngModelChange)=\"onFolderDrawerTemplateSelect($event)\"\n style=\"width: 100%\"\n >\n <nz-option [nzValue]=\"null\" nzLabel=\"\uD83D\uDCC1 Ch\u1EC9 t\u1EA1o 1 th\u01B0 m\u1EE5c \u0111\u01A1n\"></nz-option>\n @for (tpl of drive.folderTemplates(); track tpl.Id) {\n <nz-option\n [nzValue]=\"tpl.Id\"\n [nzLabel]=\"'\uD83D\uDDC2 ' + tpl.Name + ' [' + tpl.Code + '] (' + tpl.TotalFolderCount + ' th\u01B0 m\u1EE5c)'\"\n ></nz-option>\n }\n </nz-select>\n\n @if (folderDrawerSelectedTemplateId) {\n <label nz-checkbox [(ngModel)]=\"folderDrawerUseWrapperFolder\" style=\"font-size: 12px; margin-top: 4px\">\n \u0110\u1EB7t to\u00E0n b\u1ED9 c\u00E2y th\u01B0 m\u1EE5c m\u1EABu b\u00EAn trong th\u01B0 m\u1EE5c g\u1ED1c\n <strong>\"{{ folderDrawerInputName || \"...\" }}\"</strong>\n </label>\n <div class=\"quota-sub\" style=\"margin-top: 2px\">\n N\u1EBFu b\u1ECF t\u00EDch, c\u00E1c nh\u00E1nh th\u01B0 m\u1EE5c con c\u1EE7a m\u1EABu s\u1EBD \u0111\u01B0\u1EE3c t\u1EA1o tr\u1EF1c ti\u1EBFp ngay trong th\u01B0 m\u1EE5c \u0111ang m\u1EDF.\n </div>\n }\n </div>\n }\n </div>\n </ng-container>\n <ng-template #folderDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"folderDrawerVisible = false\">\u0110\u00F3ng</button>\n @if (folderDrawerMode === \"create\" || canRenameTargetNode()) {\n <button nz-button nzType=\"primary\" (click)=\"submitFolderDrawer()\">\n <nz-icon nzType=\"check\"></nz-icon>\n {{ folderDrawerMode === \"create\" ? \"T\u1EA1o th\u01B0 m\u1EE5c\" : \"L\u01B0u t\u00EAn m\u1EDBi\" }}\n </button>\n }\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 4: XEM TR\u1EF0C TUY\u1EBEN T\u00C0I LI\u1EC6U (PREVIEW DRAWER) -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"previewDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"'75vw'\"\n [nzClosable]=\"false\"\n [nzTitle]=\"previewDrawerTitleTpl\"\n [nzFooter]=\"previewDrawerFooterTpl\"\n (nzOnClose)=\"previewDrawerVisible = false\"\n >\n <ng-template #previewDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"eye\" style=\"font-size: 18px; color: var(--primary-color)\"></nz-icon>\n <strong>{{ previewFileName }}</strong>\n </div>\n <div nz-flex nzAlign=\"center\" [nzGap]=\"8\">\n @if (activeActionNode(); as node) {\n @if (node.CanDownload && node.EffectiveAccess >= DriveAccessLevel.Downloader) {\n <button nz-button nzSize=\"small\" nzType=\"primary\" (click)=\"onDownloadItem(node)\">\n <nz-icon nzType=\"download\"></nz-icon> T\u1EA3i xu\u1ED1ng\n </button>\n }\n @if (node.CanShare || node.EffectiveAccess >= DriveAccessLevel.Manager) {\n <button nz-button nzSize=\"small\" (click)=\"previewDrawerVisible = false; openShareDrawer(node)\">\n <nz-icon nzType=\"share-alt\"></nz-icon> Chia s\u1EBB\n </button>\n }\n @if (node.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button nz-button nzSize=\"small\" (click)=\"previewDrawerVisible = false; openVersionDrawer(node)\">\n <nz-icon nzType=\"history\"></nz-icon> Phi\u00EAn b\u1EA3n\n </button>\n }\n }\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"previewDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n <extend-view-file-content\n [previewType]=\"previewType\"\n [previewContent]=\"previewContent\"\n ></extend-view-file-content>\n </ng-container>\n <ng-template #previewDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button type=\"button\" nz-button (click)=\"previewDrawerVisible = false\">\u0110\u00F3ng</button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 5: T\u1EA0O L\u1ED0I T\u1EAET (CREATE SHORTCUT DRAWER CHO FILE & FOLDER) -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"shortcutDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"460\"\n [nzClosable]=\"false\"\n [nzTitle]=\"shortcutDrawerTitleTpl\"\n [nzFooter]=\"shortcutDrawerFooterTpl\"\n (nzOnClose)=\"shortcutDrawerVisible = false\"\n >\n <ng-template #shortcutDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"link\" style=\"font-size: 18px; color: #7c3aed\"></nz-icon>\n <strong>T\u1EA1o l\u1ED1i t\u1EAFt (Shortcut)</strong>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"shortcutDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n @if (shortcutSourceNode(); as src) {\n <div nz-flex nzVertical [nzGap]=\"16\">\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-header\">\n <nz-icon\n [nzType]=\"isFolderLike(src) ? 'folder-fill' : getFileIcon(src)\"\n [style.color]=\"isFolderLike(src) ? '#f59e0b' : 'var(--primary-color)'\"\n style=\"font-size: 22px\"\n ></nz-icon>\n <div>\n <div style=\"font-weight: 600\">{{ src.ShortcutTargetName || src.Name }}</div>\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">\n M\u1EE5c g\u1ED1c: {{ isFolderLike(src) ? \"Th\u01B0 m\u1EE5c\" : \"T\u1EADp tin\" }} \u2022 Ch\u1EE7 s\u1EDF h\u1EEFu:\n {{ src.OwnerName || src.OwnerId }}\n </div>\n </div>\n </div>\n </div>\n <div>\n <label class=\"drawer-field-label\">T\u00EAn l\u1ED1i t\u1EAFt</label>\n <input\n nz-input\n [(ngModel)]=\"shortcutInputName\"\n [appAutoFocus]=\"shortcutDrawerVisible\"\n placeholder=\"Nh\u1EADp t\u00EAn hi\u1EC3n th\u1ECB c\u1EE7a l\u1ED1i t\u1EAFt...\"\n (keyup.enter)=\"submitShortcutDrawer()\"\n />\n </div>\n <div>\n <label class=\"drawer-field-label\">Kh\u00F4ng gian l\u01B0u l\u1ED1i t\u1EAFt</label>\n <nz-select\n [(ngModel)]=\"shortcutSpaceKey\"\n (ngModelChange)=\"onShortcutSpaceKeyChange($event)\"\n style=\"width: 100%\"\n >\n <nz-option nzValue=\"MY_DRIVE\" nzLabel=\"Drive c\u00E1 nh\u00E2n (My Drive)\"></nz-option>\n <nz-option nzValue=\"ORG_DRIVE\" nzLabel=\"Kho T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB (Org Drive)\"></nz-option>\n @for (sp of drive.customSpaces(); track sp.Id) {\n <nz-option [nzValue]=\"'CUSTOM:' + sp.Id\" [nzLabel]=\"'\uD83D\uDCC2 ' + sp.Name\"></nz-option>\n }\n </nz-select>\n </div>\n <div>\n <label class=\"drawer-field-label\">Th\u01B0 m\u1EE5c \u0111\u00EDch ch\u1EE9a l\u1ED1i t\u1EAFt</label>\n <nz-select\n nzShowSearch\n nzAllowClear\n nzPlaceHolder=\"-- Th\u01B0 m\u1EE5c g\u1ED1c (Root) --\"\n [(ngModel)]=\"shortcutDestFolderId\"\n style=\"width: 100%\"\n >\n <nz-option [nzValue]=\"null\" nzLabel=\"\uD83D\uDCC1 Th\u01B0 m\u1EE5c g\u1ED1c (Root)\"></nz-option>\n @for (f of availableFolders(); track f.Id) {\n <nz-option [nzValue]=\"f.Id\" [nzLabel]=\"'\uD83D\uDCC2 ' + f.Name\"></nz-option>\n }\n </nz-select>\n <div class=\"quota-sub\" style=\"margin-top: 6px\">\n L\u1ED1i t\u1EAFt tr\u1ECF tr\u1EF1c ti\u1EBFp t\u1EDBi m\u1EE5c g\u1ED1c m\u00E0 kh\u00F4ng t\u1ED1n th\u00EAm dung l\u01B0\u1EE3ng l\u01B0u tr\u1EEF (0 B).\n </div>\n </div>\n </div>\n }\n </ng-container>\n <ng-template #shortcutDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"shortcutDrawerVisible = false\">H\u1EE7y</button>\n <button nz-button nzType=\"primary\" (click)=\"submitShortcutDrawer()\">\n <nz-icon nzType=\"link\"></nz-icon> T\u1EA1o l\u1ED1i t\u1EAFt\n </button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 6: DI CHUY\u1EC2N FILE / FOLDER SANG TH\u01AF M\u1EE4C HO\u1EB6C KH\u00D4NG GIAN KH\u00C1C -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"moveDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"460\"\n [nzClosable]=\"false\"\n [nzTitle]=\"moveDrawerTitleTpl\"\n [nzFooter]=\"moveDrawerFooterTpl\"\n (nzOnClose)=\"moveDrawerVisible = false\"\n >\n <ng-template #moveDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"drag\" style=\"font-size: 18px; color: var(--primary-color)\"></nz-icon>\n <strong>Di chuy\u1EC3n sang th\u01B0 m\u1EE5c / kh\u00F4ng gian kh\u00E1c</strong>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"moveDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n @if (moveSourceNode(); as src) {\n <div nz-flex nzVertical [nzGap]=\"16\">\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-header\">\n <nz-icon\n [nzType]=\"isFolderLike(src) ? 'folder-fill' : getFileIcon(src)\"\n [style.color]=\"isFolderLike(src) ? '#f59e0b' : 'var(--primary-color)'\"\n style=\"font-size: 22px\"\n ></nz-icon>\n <div>\n <div style=\"font-weight: 600\">{{ src.Name }}</div>\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">\n Lo\u1EA1i:\n {{\n src.NodeType === DriveNodeType.Folder\n ? \"Th\u01B0 m\u1EE5c\"\n : src.NodeType === DriveNodeType.Shortcut\n ? \"L\u1ED1i t\u1EAFt\"\n : \"T\u1EADp tin\"\n }}\n \u2022 Kh\u00F4ng gian hi\u1EC7n t\u1EA1i: {{ src.IsOrgNode ? \"T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB\" : \"Drive c\u00E1 nh\u00E2n\" }}\n </div>\n </div>\n </div>\n </div>\n <div>\n <label class=\"drawer-field-label\">Kh\u00F4ng gian \u0111\u00EDch</label>\n <nz-select\n [(ngModel)]=\"moveTargetSpaceKey\"\n (ngModelChange)=\"onMoveSpaceKeyChange($event)\"\n style=\"width: 100%\"\n >\n <nz-option nzValue=\"MY_DRIVE\" nzLabel=\"Drive c\u00E1 nh\u00E2n (My Drive)\"></nz-option>\n <nz-option nzValue=\"ORG_DRIVE\" nzLabel=\"Kho T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB (Org Drive)\"></nz-option>\n @for (sp of drive.customSpaces(); track sp.Id) {\n <nz-option [nzValue]=\"'CUSTOM:' + sp.Id\" [nzLabel]=\"'\uD83D\uDCC2 ' + sp.Name\"></nz-option>\n }\n </nz-select>\n </div>\n <div>\n <label class=\"drawer-field-label\">Ch\u1ECDn th\u01B0 m\u1EE5c \u0111\u00EDch</label>\n <nz-select\n nzShowSearch\n nzAllowClear\n nzPlaceHolder=\"-- Th\u01B0 m\u1EE5c g\u1ED1c (Root) --\"\n [(ngModel)]=\"moveTargetFolderId\"\n style=\"width: 100%\"\n >\n <nz-option [nzValue]=\"null\" nzLabel=\"\uD83D\uDCC1 Th\u01B0 m\u1EE5c g\u1ED1c (Root)\"></nz-option>\n @for (f of moveTargetFolders(); track f.Id) {\n <nz-option [nzValue]=\"f.Id\" [nzLabel]=\"'\uD83D\uDCC2 ' + f.Name\"></nz-option>\n }\n </nz-select>\n <div class=\"quota-sub\" style=\"margin-top: 6px\">\n M\u1EB9o: B\u1EA1n c\u00F3 th\u1EC3 k\u00E9o th\u1EA3 tr\u1EF1c ti\u1EBFp d\u00F2ng t\u00E0i li\u1EC7u/th\u01B0 m\u1EE5c v\u00E0o m\u1EE5c <strong>\"Drive c\u00E1 nh\u00E2n\"</strong> ho\u1EB7c\n <strong>\"T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB\"</strong> \u1EDF thanh menu b\u00EAn tr\u00E1i \u0111\u1EC3 chuy\u1EC3n nhanh qua l\u1EA1i gi\u1EEFa 2 kh\u00F4ng gian.\n </div>\n </div>\n </div>\n }\n </ng-container>\n <ng-template #moveDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"moveDrawerVisible = false\">H\u1EE7y</button>\n <button nz-button nzType=\"primary\" (click)=\"submitMoveDrawer()\">\n <nz-icon nzType=\"check\"></nz-icon> Di chuy\u1EC3n t\u1EDBi \u0111\u00E2y\n </button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 9: SAO CH\u00C9P T\u1EDAI (COPY TO DRAWER CHO FILE / FOLDER / SHORTCUT) -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"copyDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"460\"\n [nzClosable]=\"false\"\n [nzTitle]=\"copyDrawerTitleTpl\"\n [nzFooter]=\"copyDrawerFooterTpl\"\n (nzOnClose)=\"copyDrawerVisible = false\"\n >\n <ng-template #copyDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"copy\" style=\"font-size: 18px; color: var(--primary-color)\"></nz-icon>\n <strong>Sao ch\u00E9p t\u1EDBi (Copy To)</strong>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"copyDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n @if (copySourceNode(); as src) {\n <div nz-flex nzVertical [nzGap]=\"16\">\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-header\">\n <nz-icon\n [nzType]=\"isFolderLike(src) ? 'folder-fill' : getFileIcon(src)\"\n [style.color]=\"isFolderLike(src) ? '#f59e0b' : 'var(--primary-color)'\"\n style=\"font-size: 22px\"\n ></nz-icon>\n <div>\n <div style=\"font-weight: 600\">{{ src.Name }}</div>\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">\n M\u1EE5c ngu\u1ED3n:\n {{\n src.NodeType === DriveNodeType.Folder\n ? \"Th\u01B0 m\u1EE5c (Sao ch\u00E9p \u0111\u1EC7 quy to\u00E0n b\u1ED9 nh\u00E1nh con)\"\n : src.NodeType === DriveNodeType.Shortcut\n ? \"L\u1ED1i t\u1EAFt\"\n : \"T\u1EADp tin\"\n }}\n </div>\n </div>\n </div>\n </div>\n <div>\n <label class=\"drawer-field-label\">T\u00EAn b\u1EA3n sao (\u0110\u1EC3 tr\u1ED1ng \u0111\u1EC3 h\u1EC7 th\u1ED1ng t\u1EF1 \u0111\u1EB7t t\u00EAn)</label>\n <input\n nz-input\n [(ngModel)]=\"copyCustomName\"\n [appAutoFocus]=\"copyDrawerVisible\"\n placeholder=\"Nh\u1EADp t\u00EAn m\u1EDBi cho b\u1EA3n sao...\"\n (keyup.enter)=\"submitCopyDrawer()\"\n />\n </div>\n <div>\n <label class=\"drawer-field-label\">Kh\u00F4ng gian \u0111\u00EDch</label>\n <nz-select\n [(ngModel)]=\"copyTargetSpaceKey\"\n (ngModelChange)=\"onCopySpaceKeyChange($event)\"\n style=\"width: 100%\"\n >\n <nz-option nzValue=\"MY_DRIVE\" nzLabel=\"Drive c\u00E1 nh\u00E2n (My Drive)\"></nz-option>\n <nz-option nzValue=\"ORG_DRIVE\" nzLabel=\"Kho T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB (Org Drive)\"></nz-option>\n @for (sp of drive.customSpaces(); track sp.Id) {\n <nz-option [nzValue]=\"'CUSTOM:' + sp.Id\" [nzLabel]=\"'\uD83D\uDCC2 ' + sp.Name\"></nz-option>\n }\n </nz-select>\n </div>\n <div>\n <label class=\"drawer-field-label\">Ch\u1ECDn th\u01B0 m\u1EE5c \u0111\u00EDch ch\u1EE9a b\u1EA3n sao</label>\n <nz-select\n nzShowSearch\n nzAllowClear\n nzPlaceHolder=\"-- Th\u01B0 m\u1EE5c g\u1ED1c (Root) --\"\n [(ngModel)]=\"copyTargetFolderId\"\n style=\"width: 100%\"\n >\n <nz-option [nzValue]=\"null\" nzLabel=\"\uD83D\uDCC1 Th\u01B0 m\u1EE5c g\u1ED1c (Root)\"></nz-option>\n @for (f of copyTargetFolders(); track f.Id) {\n <nz-option [nzValue]=\"f.Id\" [nzLabel]=\"'\uD83D\uDCC2 ' + f.Name\"></nz-option>\n }\n </nz-select>\n <div class=\"quota-sub\" style=\"margin-top: 6px\">\n B\u1EA3n sao ho\u00E0n to\u00E0n \u0111\u1ED9c l\u1EADp v\u1EDBi m\u1EE5c g\u1ED1c v\u00E0 \u0111\u01B0\u1EE3c t\u00EDnh v\u00E0o h\u1EA1n ng\u1EA1ch c\u1EE7a ng\u01B0\u1EDDi t\u1EA1o b\u1EA3n sao.\n </div>\n </div>\n </div>\n }\n </ng-container>\n <ng-template #copyDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"copyDrawerVisible = false\">H\u1EE7y</button>\n <button nz-button nzType=\"primary\" (click)=\"submitCopyDrawer()\">\n <nz-icon nzType=\"copy\"></nz-icon> Sao ch\u00E9p t\u1EDBi \u0111\u00E2y\n </button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 7: \u0110\u1ED4I \u0110\u01AF\u1EDCNG D\u1EAAN V\u1EACT L\u00DD / \u00C1NH X\u1EA0 \u1ED4 C\u1EE8NG M\u1EDAI KHI K\u1EBET TH\u00DAC D\u1EF0 \u00C1N -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"relocateDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"500\"\n [nzClosable]=\"false\"\n [nzTitle]=\"relocateDrawerTitleTpl\"\n [nzFooter]=\"relocateDrawerFooterTpl\"\n (nzOnClose)=\"relocateDrawerVisible = false\"\n >\n <ng-template #relocateDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"hdd\" style=\"font-size: 18px; color: var(--primary-color)\"></nz-icon>\n <strong>\n {{ relocateTargetFolder() ? \"\u00C1nh x\u1EA1 / Chuy\u1EC3n \u1ED5 \u0111\u0129a th\u01B0 m\u1EE5c\" : \"C\u1EA5u h\u00ECnh RootPath l\u01B0u tr\u1EEF chung\" }}\n </strong>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"relocateDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n <div nz-flex nzVertical [nzGap]=\"16\">\n @if (relocateTargetFolder(); as folder) {\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-header\">\n <nz-icon nzType=\"folder-fill\" style=\"font-size: 22px; color: #f59e0b\"></nz-icon>\n <div>\n <div style=\"font-weight: 600\">{{ folder.Name }}</div>\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">\n \u0110\u01B0\u1EDDng d\u1EABn hi\u1EC7n t\u1EA1i:\n <code>{{ folder.PhysicalRelativePath || drive.currentPhysicalPath() || \"M\u1EB7c \u0111\u1ECBnh\" }}</code>\n </div>\n </div>\n </div>\n </div>\n <div>\n <label class=\"drawer-field-label\">\u0110\u01B0\u1EDDng d\u1EABn v\u1EADt l\u00FD m\u1EDBi c\u1EE7a th\u01B0 m\u1EE5c (H\u1ED7 tr\u1EE3 \u1ED5 c\u1EE9ng kh\u00E1c / NAS)</label>\n <input\n nz-input\n [(ngModel)]=\"relocateNewPath\"\n [appAutoFocus]=\"relocateDrawerVisible\"\n placeholder=\"VD: E:Archive_2026DuAn_A ho\u1EB7c \\\\NAS01StorageDuAn_A\"\n (keyup.enter)=\"submitRelocateDrawer()\"\n />\n <div class=\"quota-sub\" style=\"margin-top: 6px\">\n Khi d\u1EF1 \u00E1n k\u1EBFt th\u00FAc v\u00E0 h\u1EA1 t\u1EA7ng chuy\u1EC3n th\u01B0 m\u1EE5c sang \u1ED5 c\u1EE9ng kh\u00E1c, \u0111\u1EB7t \u0111\u01B0\u1EDDng d\u1EABn m\u1EDBi t\u1EA1i \u0111\u00E2y \u0111\u1EC3 to\u00E0n b\u1ED9 th\u01B0\n m\u1EE5c con v\u00E0 file b\u00EAn trong t\u1EF1 \u0111\u1ED9ng map sang \u1ED5 c\u1EE9ng m\u1EDBi.\n </div>\n </div>\n <div class=\"drawer-meta-card\">\n <label nz-checkbox [(ngModel)]=\"relocateMoveFilesOnDisk\">\n <strong>T\u1EF1 \u0111\u1ED9ng di chuy\u1EC3n d\u1EEF li\u1EC7u v\u1EADt l\u00FD t\u1EEB \u0111\u01B0\u1EDDng d\u1EABn c\u0169 sang \u1ED5 \u0111\u0129a m\u1EDBi</strong>\n </label>\n <div class=\"quota-sub\" style=\"margin-left: 24px\">\n N\u1EBFu b\u1ED9 ph\u1EADn H\u1EA1 t\u1EA7ng \u0111\u00E3 copy/move s\u1EB5n th\u01B0 m\u1EE5c sang \u1ED5 c\u1EE9ng m\u1EDBi r\u1ED3i, h\u00E3y <strong>b\u1ECF ch\u1ECDn</strong> m\u1EE5c n\u00E0y \u0111\u1EC3\n h\u1EC7 th\u1ED1ng ch\u1EC9 c\u1EADp nh\u1EADt l\u1EA1i \u00E1nh x\u1EA1 \u0111\u01B0\u1EDDng d\u1EABn trong Database.\n </div>\n <label nz-checkbox [(ngModel)]=\"relocateSyncNewFiles\" style=\"margin-top: 6px\">\n <strong>\u0110\u1ED3ng b\u1ED9 b\u1ED5 sung c\u00E1c file/folder c\u00F3 s\u1EB5n t\u1EA1i \u0111\u01B0\u1EDDng d\u1EABn m\u1EDBi v\u00E0o Drive</strong>\n </label>\n </div>\n } @else {\n <div class=\"drawer-meta-card\">\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">RootPath hi\u1EC7n t\u1EA1i:</span>\n <code class=\"break-word\">{{ drive.storageRootPath() || drive.currentPhysicalPath() }}</code>\n </div>\n <div class=\"drawer-meta-row\">\n <span class=\"meta-label\">Ch\u1EBF \u0111\u1ED9 th\u01B0 m\u1EE5c g\u1ED1c:</span>\n <nz-tag [nzColor]=\"drive.useSharedPhysicalRoot() ? 'green' : 'blue'\">\n {{\n drive.useSharedPhysicalRoot() ? \"D\u00F9ng chung 1 RootPath cho t\u1EA5t c\u1EA3 User\" : \"T\u00E1ch theo t\u1EEBng Username\"\n }}\n </nz-tag>\n </div>\n </div>\n <div>\n <label class=\"drawer-field-label\">\u0110\u01B0\u1EDDng d\u1EABn RootPath chung m\u1EDBi tr\u00EAn Server</label>\n <input\n nz-input\n [(ngModel)]=\"relocateNewPath\"\n [appAutoFocus]=\"relocateDrawerVisible\"\n placeholder=\"VD: D:ProjectStorageDriveRoot ho\u1EB7c E:ArchiveDrive\"\n (keyup.enter)=\"submitRelocateDrawer()\"\n />\n <div class=\"quota-sub\" style=\"margin-top: 6px\">\n T\u1EA5t c\u1EA3 c\u00E1c th\u01B0 m\u1EE5c ch\u01B0a ghim \u1ED5 \u0111\u0129a ri\u00EAng s\u1EBD t\u1EF1 \u0111\u1ED9ng \u0111\u1ECDc/ghi theo RootPath m\u1EDBi n\u00E0y.\n </div>\n </div>\n }\n </div>\n </ng-container>\n <ng-template #relocateDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"relocateDrawerVisible = false\">H\u1EE7y</button>\n <button nz-button nzType=\"primary\" (click)=\"submitRelocateDrawer()\">\n <nz-icon nzType=\"save\"></nz-icon> L\u01B0u \u00E1nh x\u1EA1 v\u1EADt l\u00FD\n </button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 8: QU\u1EA2N L\u00DD H\u1EA0N NG\u1EA0CH DUNG L\u01AF\u1EE2NG (DEFAULT QUOTA & PER-USER QUOTA) -->\n <!-- CH\u1EC8 D\u00C0NH RI\u00CANG CHO QU\u1EA2N TR\u1ECA VI\u00CAN (ADMIN) -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"quotaAdminDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"980\"\n [nzClosable]=\"false\"\n [nzTitle]=\"quotaAdminDrawerTitleTpl\"\n [nzFooter]=\"quotaAdminDrawerFooterTpl\"\n (nzOnClose)=\"quotaAdminDrawerVisible = false\"\n >\n <ng-template #quotaAdminDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"toggleDrawerPlacement()\">\n <!-- \n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n -->\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"pie-chart\" style=\"font-size: 18px; color: var(--primary-color)\"></nz-icon>\n <strong>Qu\u1EA3n l\u00FD H\u1EA1n ng\u1EA1ch Dung l\u01B0\u1EE3ng (Quota Management)</strong>\n <nz-tag nzColor=\"gold\">Ch\u1EC9 Admin</nz-tag>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"quotaAdminDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n <div nz-flex nzVertical [nzGap]=\"16\">\n <!-- PH\u1EA6N 1: C\u1EA4U H\u00CCNH QUOTA M\u1EB6C \u0110\u1ECANH TO\u00C0N H\u1EC6 TH\u1ED0NG -->\n <div class=\"drawer-meta-card\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" nzWrap=\"wrap\" [nzGap]=\"8\">\n <div>\n <div style=\"font-size: 14px; font-weight: 600\">\n <nz-icon nzType=\"cloud-server\" style=\"color: var(--primary-color); margin-right: 6px\"></nz-icon>\n 1. C\u1EA5u h\u00ECnh Quota m\u1EB7c \u0111\u1ECBnh (Default Quota)\n </div>\n <div class=\"quota-sub\">\n \u00C1p d\u1EE5ng t\u1EF1 \u0111\u1ED9ng cho ng\u01B0\u1EDDi d\u00F9ng m\u1EDBi ho\u1EB7c ng\u01B0\u1EDDi d\u00F9ng ch\u01B0a \u0111\u01B0\u1EE3c g\u00E1n h\u1EA1n ng\u1EA1ch ri\u00EAng.\n </div>\n </div>\n @if (quotaOverview(); as ov) {\n <div nz-flex nzAlign=\"center\" [nzGap]=\"8\">\n <nz-tag nzColor=\"blue\">\n M\u1EB7c \u0111\u1ECBnh hi\u1EC7n t\u1EA1i: <strong>{{ ov.DefaultUserQuotaBytes | formatBytes }}</strong>\n </nz-tag>\n <nz-tag nzColor=\"purple\">\n T\u1ED5ng \u0111\u00E3 d\u00F9ng to\u00E0n h\u1EC7 th\u1ED1ng: <strong>{{ ov.TotalSystemUsedBytes | formatBytes }}</strong>\n </nz-tag>\n </div>\n }\n </div>\n <nz-divider style=\"margin: 8px 0\"></nz-divider>\n <div nz-flex nzAlign=\"center\" nzWrap=\"wrap\" [nzGap]=\"8\">\n <span style=\"font-size: 13px; font-weight: 500\">M\u1EE9c Quota m\u1EB7c \u0111\u1ECBnh:</span>\n <input\n nz-input\n type=\"number\"\n min=\"1\"\n [(ngModel)]=\"defaultQuotaInputValue\"\n style=\"width: 120px\"\n placeholder=\"Nh\u1EADp dung l\u01B0\u1EE3ng\"\n />\n <nz-select [(ngModel)]=\"defaultQuotaInputUnit\" style=\"width: 90px\">\n <nz-option nzValue=\"MB\" nzLabel=\"MB\"></nz-option>\n <nz-option nzValue=\"GB\" nzLabel=\"GB\"></nz-option>\n <nz-option nzValue=\"TB\" nzLabel=\"TB\"></nz-option>\n </nz-select>\n <!-- C\u00E1c n\u00FAt ch\u1ECDn nhanh (Quick Presets) -->\n <div nz-flex nzAlign=\"center\" [nzGap]=\"4\">\n <button nz-button nzSize=\"small\" (click)=\"setDefaultQuotaPreset(1, 'GB')\">1 GB</button>\n <button nz-button nzSize=\"small\" (click)=\"setDefaultQuotaPreset(5, 'GB')\">5 GB</button>\n <button nz-button nzSize=\"small\" (click)=\"setDefaultQuotaPreset(10, 'GB')\">10 GB</button>\n <button nz-button nzSize=\"small\" (click)=\"setDefaultQuotaPreset(20, 'GB')\">20 GB</button>\n <button nz-button nzSize=\"small\" (click)=\"setDefaultQuotaPreset(50, 'GB')\">50 GB</button>\n <button nz-button nzSize=\"small\" (click)=\"setDefaultQuotaPreset(100, 'GB')\">100 GB</button>\n </div>\n <button nz-button nzType=\"primary\" (click)=\"onSaveDefaultQuota()\">\n <nz-icon nzType=\"save\"></nz-icon> L\u01B0u Quota m\u1EB7c \u0111\u1ECBnh\n </button>\n </div>\n <div style=\"margin-top: 4px\">\n <label nz-checkbox [(ngModel)]=\"applyDefaultToExistingUsers\">\n \u0110\u1ED3ng th\u1EDDi c\u1EADp nh\u1EADt m\u1EE9c Quota m\u1EB7c \u0111\u1ECBnh m\u1EDBi n\u00E0y cho t\u1EA5t c\u1EA3 c\u00E1c ng\u01B0\u1EDDi d\u00F9ng hi\u1EC7n c\u00F3\n </label>\n </div>\n </div>\n <!-- PH\u1EA6N 2: \u0110\u1EB6T QUOTA RI\u00CANG CHO T\u1EEANG NG\u01AF\u1EDCI D\u00D9NG -->\n <div>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" nzWrap=\"wrap\" [nzGap]=\"8\" style=\"margin-bottom: 10px\">\n <div>\n <div style=\"font-size: 14px; font-weight: 600\">\n <nz-icon nzType=\"team\" style=\"color: var(--primary-color); margin-right: 6px\"></nz-icon>\n 2. Thi\u1EBFt l\u1EADp Quota cho t\u1EEBng ng\u01B0\u1EDDi d\u00F9ng ({{ quotaUsers().length }})\n </div>\n <div class=\"quota-sub\">\n T\u00F9y ch\u1EC9nh h\u1EA1n ng\u1EA1ch dung l\u01B0\u1EE3ng ri\u00EAng cho t\u1EEBng c\u00E1 nh\u00E2n ho\u1EB7c \u0111\u1EB7t l\u1EA1i v\u1EC1 m\u1EE9c m\u1EB7c \u0111\u1ECBnh.\n </div>\n </div>\n <div nz-flex nzAlign=\"center\" [nzGap]=\"8\">\n <nz-input-group [nzSuffix]=\"quotaUserSearchSuffix\" style=\"width: 260px\">\n <input\n nz-input\n type=\"text\"\n placeholder=\"T\u00ECm theo t\u00E0i kho\u1EA3n, h\u1ECD t\u00EAn, email...\"\n [(ngModel)]=\"quotaUserSearchKeyword\"\n (keyup.enter)=\"reloadQuotaOverview()\"\n />\n </nz-input-group>\n <ng-template #quotaUserSearchSuffix>\n <nz-icon nzType=\"search\" class=\"cursor-pointer\" (click)=\"reloadQuotaOverview()\"></nz-icon>\n </ng-template>\n <button nz-button nzType=\"default\" (click)=\"reloadQuotaOverview()\" nz-tooltip nzTooltipTitle=\"T\u1EA3i l\u1EA1i\">\n <nz-icon nzType=\"reload\"></nz-icon>\n </button>\n </div>\n </div>\n <nz-table\n #userQuotaTable\n [nzData]=\"quotaUsers()\"\n [nzLoading]=\"quotaLoading()\"\n nzSize=\"small\"\n [nzBordered]=\"true\"\n [nzPageSize]=\"10\"\n [nzShowPagination]=\"true\"\n >\n <thead>\n <tr>\n <th nzWidth=\"45px\" class=\"text-center\">#</th>\n <th>Ng\u01B0\u1EDDi d\u00F9ng</th>\n <th nzWidth=\"220px\">\u0110\u00E3 d\u00F9ng / H\u1EA1n ng\u1EA1ch</th>\n <th nzWidth=\"105px\" class=\"text-center\">Lo\u1EA1i Quota</th>\n <th nzWidth=\"210px\">\u0110\u1EB7t h\u1EA1n ng\u1EA1ch m\u1EDBi</th>\n <th nzWidth=\"145px\" class=\"text-center\">Thao t\u00E1c</th>\n </tr>\n </thead>\n <tbody>\n @for (u of userQuotaTable.data; track u.UserId; let idx = $index) {\n <tr>\n <td class=\"text-center\">{{ idx + 1 }}</td>\n <td>\n <div style=\"font-weight: 600\">{{ u.FullName || u.UserName }}</div>\n <div style=\"font-size: 12px; color: var(--app-text-muted, #64748b)\">\n <code>{{ u.UserName }}</code>\n @if (u.OrgName) {\n <span> \u2022 {{ u.OrgName }}</span>\n }\n @if (u.Email) {\n <span> \u2022 {{ u.Email }}</span>\n }\n </div>\n </td>\n <td>\n <div nz-flex nzJustify=\"space-between\" style=\"font-size: 12px; margin-bottom: 2px\">\n <span\n >{{ u.UsedBytes | formatBytes }} / <strong>{{ u.QuotaLimitBytes | formatBytes }}</strong></span\n >\n <span>{{ getUserQuotaPercent(u) }}%</span>\n </div>\n <nz-progress\n [nzPercent]=\"getUserQuotaPercent(u)\"\n nzSize=\"small\"\n [nzShowInfo]=\"false\"\n [nzStatus]=\"getUserQuotaPercent(u) >= 95 ? 'exception' : 'normal'\"\n ></nz-progress>\n </td>\n <td class=\"text-center\">\n @if (u.IsCustomQuota) {\n <nz-tag nzColor=\"orange\">T\u00F9y ch\u1EC9nh</nz-tag>\n } @else {\n <nz-tag nzColor=\"default\">M\u1EB7c \u0111\u1ECBnh</nz-tag>\n }\n </td>\n <td>\n <div nz-flex nzAlign=\"center\" [nzGap]=\"6\">\n <input nz-input type=\"number\" min=\"1\" [(ngModel)]=\"u.editQuotaValue\" style=\"width: 90px\" />\n <nz-select [(ngModel)]=\"u.editQuotaUnit\" style=\"width: 80px\">\n <nz-option nzValue=\"MB\" nzLabel=\"MB\"></nz-option>\n <nz-option nzValue=\"GB\" nzLabel=\"GB\"></nz-option>\n <nz-option nzValue=\"TB\" nzLabel=\"TB\"></nz-option>\n </nz-select>\n </div>\n </td>\n <td class=\"text-center\">\n <div nz-flex nzJustify=\"center\" [nzGap]=\"6\">\n <button nz-button nzType=\"primary\" nzSize=\"small\" (click)=\"onSaveUserQuota(u)\">\n <!-- \n nz-tooltip\n nzTooltipTitle=\"L\u01B0u h\u1EA1n ng\u1EA1ch ri\u00EAng cho ng\u01B0\u1EDDi d\u00F9ng n\u00E0y\"\n -->\n <nz-icon nzType=\"check\"></nz-icon> L\u01B0u\n </button>\n <button\n nz-button\n nzType=\"default\"\n nzSize=\"small\"\n [disabled]=\"!u.IsCustomQuota\"\n nz-tooltip\n nzTooltipTitle=\"\u0110\u1EB7t l\u1EA1i v\u1EC1 m\u1EE9c Quota m\u1EB7c \u0111\u1ECBnh c\u1EE7a h\u1EC7 th\u1ED1ng\"\n (click)=\"onResetUserQuota(u)\"\n >\n <nz-icon nzType=\"undo\"></nz-icon>\n </button>\n </div>\n </td>\n </tr>\n }\n </tbody>\n </nz-table>\n </div>\n </div>\n </ng-container>\n <ng-template #quotaAdminDrawerFooterTpl>\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"quotaAdminDrawerVisible = false\">\u0110\u00F3ng</button>\n </div>\n </ng-template>\n </nz-drawer>\n <!-- ========================================================================= -->\n <!-- DRAWER 10: TH\u00CAM / C\u1EA4U H\u00CCNH M\u1EE4C CUSTOM B\u00CAN D\u01AF\u1EDAI \"T\u00C0I LI\u1EC6U \u0110\u01A0N V\u1ECA\" -->\n <!-- (V\u00ED d\u1EE5: \"T\u00E0i li\u1EC7u d\u1EF1 \u00E1n\" - Admin c\u00F3 th\u1EC3 b\u1EADt hi\u1EC3n th\u1ECB cho t\u1EA5t c\u1EA3 User) -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"customSpaceDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"480\"\n [nzClosable]=\"false\"\n [nzTitle]=\"customSpaceDrawerTitleTpl\"\n [nzFooter]=\"customSpaceDrawerFooterTpl\"\n (nzOnClose)=\"customSpaceDrawerVisible = false\"\n >\n <ng-template #customSpaceDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button\n nz-button\n nzSize=\"small\"\n nzType=\"default\"\n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n (click)=\"toggleDrawerPlacement()\"\n >\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon\n [nzType]=\"customSpaceIcon || 'project'\"\n style=\"font-size: 18px; color: var(--primary-color)\"\n ></nz-icon>\n <strong>{{\n customSpaceDrawerMode === \"create\" ? \"Th\u00EAm m\u1EE5c t\u00F9y ch\u1EC9nh d\u01B0\u1EDBi T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB\" : \"C\u1EA5u h\u00ECnh m\u1EE5c t\u00F9y ch\u1EC9nh\"\n }}</strong>\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"customSpaceDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n <ng-container *nzDrawerContent>\n <div nz-flex nzVertical [nzGap]=\"16\">\n <div>\n <label class=\"drawer-field-label\">T\u00EAn m\u1EE5c hi\u1EC3n th\u1ECB tr\u00EAn thanh menu tr\u00E1i</label>\n <input\n nz-input\n [(ngModel)]=\"customSpaceName\"\n [appAutoFocus]=\"customSpaceDrawerVisible\"\n placeholder=\"V\u00ED d\u1EE5: T\u00E0i li\u1EC7u d\u1EF1 \u00E1n, H\u1ED3 s\u01A1 th\u1EA7u, Quy tr\u00ECnh ISO...\"\n (keyup.enter)=\"submitCustomSpaceDrawer()\"\n />\n <div class=\"quota-sub\" style=\"margin-top: 4px\">\n M\u1EE5c n\u00E0y s\u1EBD xu\u1EA5t hi\u1EC7n ngay b\u00EAn d\u01B0\u1EDBi m\u1EE5c <strong>\"T\u00E0i li\u1EC7u \u0110\u01A1n v\u1ECB\"</strong> tr\u00EAn thanh \u0111i\u1EC1u h\u01B0\u1EDBng b\u00EAn tr\u00E1i.\n </div>\n </div>\n <div>\n <label class=\"drawer-field-label\">Bi\u1EC3u t\u01B0\u1EE3ng (Icon)</label>\n <nz-select [(ngModel)]=\"customSpaceIcon\" style=\"width: 100%\">\n <nz-option nzValue=\"project\" nzLabel=\"\uD83D\uDCCA D\u1EF1 \u00E1n (project)\"></nz-option>\n <nz-option nzValue=\"folder-open\" nzLabel=\"\uD83D\uDCC2 Th\u01B0 m\u1EE5c m\u1EDF (folder-open)\"></nz-option>\n <nz-option nzValue=\"book\" nzLabel=\"\uD83D\uDCD8 T\u00E0i li\u1EC7u / C\u1EA9m nang (book)\"></nz-option>\n <nz-option nzValue=\"safety-certificate\" nzLabel=\"\uD83D\uDEE1 Quy chu\u1EA9n / ISO (safety-certificate)\"></nz-option>\n <nz-option nzValue=\"solution\" nzLabel=\"\uD83D\uDCCB H\u1ED3 s\u01A1 nghi\u1EC7p v\u1EE5 (solution)\"></nz-option>\n <nz-option nzValue=\"database\" nzLabel=\"\uD83D\uDDC4 Kho d\u1EEF li\u1EC7u (database)\"></nz-option>\n </nz-select>\n </div>\n <div class=\"drawer-meta-card\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\">\n <div>\n <div style=\"font-weight: 600; font-size: 13px\">Hi\u1EC3n th\u1ECB cho t\u1EA5t c\u1EA3 ng\u01B0\u1EDDi d\u00F9ng (All Users)</div>\n <div class=\"quota-sub\">\n @if (drive.isCurrentUserAdmin()) {\n Khi b\u1EADt: T\u1EA5t c\u1EA3 t\u00E0i kho\u1EA3n trong h\u1EC7 th\u1ED1ng \u0111\u1EC1u nh\u00ECn th\u1EA5y v\u00E0 truy c\u1EADp \u0111\u01B0\u1EE3c m\u1EE5c n\u00E0y b\u00EAn d\u01B0\u1EDBi \"T\u00E0i li\u1EC7u \u0110\u01A1n\n v\u1ECB\".\n } @else {\n Ch\u1EC9 Qu\u1EA3n tr\u1ECB vi\u00EAn (Admin) m\u1EDBi c\u00F3 quy\u1EC1n b\u1EADt hi\u1EC3n th\u1ECB chung cho to\u00E0n b\u1ED9 ng\u01B0\u1EDDi d\u00F9ng.\n }\n </div>\n </div>\n <nz-switch\n [(ngModel)]=\"customSpaceVisibleToAll\"\n [nzDisabled]=\"!drive.isCurrentUserAdmin()\"\n nzCheckedChildren=\"All Users\"\n nzUnCheckedChildren=\"C\u00E1 nh\u00E2n\"\n ></nz-switch>\n </div>\n @if (customSpaceVisibleToAll) {\n <nz-divider style=\"margin: 8px 0\"></nz-divider>\n <div>\n <label class=\"drawer-field-label\">M\u1EE9c quy\u1EC1n m\u1EB7c \u0111\u1ECBnh cho to\u00E0n b\u1ED9 ng\u01B0\u1EDDi d\u00F9ng</label>\n <nz-select\n [(ngModel)]=\"customSpaceDefaultAccessLevel\"\n [nzDisabled]=\"!drive.isCurrentUserAdmin()\"\n style=\"width: 100%\"\n >\n <nz-option [nzValue]=\"DriveAccessLevel.None\" nzLabel=\"None\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Viewer\" nzLabel=\"Ch\u1EC9 xem (Viewer)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Downloader\" nzLabel=\"Xem & T\u1EA3i xu\u1ED1ng\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Uploader\" nzLabel=\"Xem & T\u1EA3i l\u00EAn (Kh\u00F4ng \u0111\u01B0\u1EE3c x\u00F3a)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Editor\" nzLabel=\"Ch\u1EC9nh s\u1EEDa (Editor)\"></nz-option>\n </nz-select>\n </div>\n }\n </div>\n </div>\n </ng-container>\n <ng-template #customSpaceDrawerFooterTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div>\n @if (customSpaceDrawerMode === \"edit\" && editingCustomSpace) {\n <button nz-button nzDanger nzType=\"default\" (click)=\"onDeleteCustomSpace(editingCustomSpace)\">\n <nz-icon nzType=\"delete\"></nz-icon> X\u00F3a m\u1EE5c n\u00E0y\n </button>\n }\n </div>\n <div nz-flex [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"customSpaceDrawerVisible = false\">H\u1EE7y</button>\n <button nz-button nzType=\"primary\" (click)=\"submitCustomSpaceDrawer()\">\n <nz-icon nzType=\"check\"></nz-icon>\n {{ customSpaceDrawerMode === \"create\" ? \"T\u1EA1o m\u1EE5c m\u1EDBi\" : \"L\u01B0u thay \u0111\u1ED5i\" }}\n </button>\n </div>\n </div>\n </ng-template>\n </nz-drawer>\n\n <nz-drawer\n [nzVisible]=\"matrixDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"'92vw'\"\n nzTitle=\"Ma tr\u1EADn Ph\u00E2n quy\u1EC1n T\u00E0i li\u1EC7u & Th\u01B0 m\u1EE5c\"\n (nzOnClose)=\"matrixDrawerVisible = false\"\n >\n <!-- (ACL / RBAC Matrix) -->\n <ng-container *nzDrawerContent>\n <lib-drive-permission-matrix\n [rootFolderId]=\"matrixRootNodeId\"\n [viewMode]=\"\n drive.currentViewMode() === 'ORG_DRIVE'\n ? 'ORG_DRIVE'\n : drive.currentViewMode() === 'CUSTOM_SPACE'\n ? 'CUSTOM_SPACE'\n : 'MY_DRIVE'\n \"\n [customSpaceId]=\"drive.currentCustomSpaceId()\"\n (saved)=\"drive.loadNodes()\"\n (closed)=\"matrixDrawerVisible = false\"\n >\n </lib-drive-permission-matrix>\n </ng-container>\n </nz-drawer>\n\n <!-- ========================================================================= -->\n <!-- DRAWER 11: \u0110\u1ECANH NGH\u0128A & C\u1EA4U H\u00CCNH C\u00C2Y TH\u01AF M\u1EE4C M\u1EAAU K\u00C8M PH\u00C2N QUY\u1EC0N T\u1EF0 \u0110\u1ED8NG -->\n <!-- ========================================================================= -->\n <nz-drawer\n [nzVisible]=\"templateDrawerVisible\"\n [nzPlacement]=\"drawerPlacement\"\n [nzWidth]=\"760\"\n [nzClosable]=\"false\"\n [nzTitle]=\"templateDrawerTitleTpl\"\n [nzFooter]=\"templateDrawerFooterTpl\"\n (nzOnClose)=\"templateDrawerVisible = false\"\n >\n <ng-template #templateDrawerTitleTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div nz-flex nzAlign=\"center\" nzGap=\"small\">\n <button\n nz-button\n nzSize=\"small\"\n nzType=\"default\"\n nz-tooltip\n [nzTooltipTitle]=\"drawerPlacement === 'right' ? 'Chuy\u1EC3n sang b\u00EAn tr\u00E1i' : 'Chuy\u1EC3n sang b\u00EAn ph\u1EA3i'\"\n (click)=\"toggleDrawerPlacement()\"\n >\n <nz-icon [nzType]=\"drawerPlacement === 'right' ? 'arrow-left' : 'arrow-right'\"></nz-icon>\n </button>\n <nz-icon nzType=\"apartment\" style=\"font-size: 18px; color: #d97706\"></nz-icon>\n <strong>\n {{ templateDrawerMode === \"create\" ? \"\u0110\u1ECBnh ngh\u0129a M\u1EABu C\u00E2y Th\u01B0 M\u1EE5c M\u1EDBi\" : \"C\u1EADp nh\u1EADt M\u1EABu C\u00E2y Th\u01B0 M\u1EE5c\" }}\n </strong>\n @if (totalConfiguredTemplatePermissions() > 0) {\n <nz-tag nzColor=\"cyan\">\uD83D\uDEE1 {{ totalConfiguredTemplatePermissions() }} quy\u1EC1n c\u00E0i s\u1EB5n</nz-tag>\n }\n </div>\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"templateDrawerVisible = false\">\n <nz-icon nzType=\"close\"></nz-icon>\n </button>\n </div>\n </ng-template>\n\n <ng-container *nzDrawerContent>\n <div nz-flex nzVertical [nzGap]=\"14\">\n <div nz-flex [nzGap]=\"12\" nzWrap=\"wrap\">\n <div style=\"flex: 1.4; min-width: 220px\">\n <label class=\"drawer-field-label\">T\u00EAn m\u1EABu c\u00E2y th\u01B0 m\u1EE5c *</label>\n <input\n nz-input\n [(ngModel)]=\"templateInputName\"\n [appAutoFocus]=\"templateDrawerVisible\"\n placeholder=\"VD: H\u1ED3 s\u01A1 D\u1EF1 \u00E1n \u0110\u1EA5u th\u1EA7u, H\u1ED3 s\u01A1 H\u1EE3p \u0111\u1ED3ng...\"\n />\n </div>\n <div style=\"flex: 1; min-width: 170px\">\n <label class=\"drawer-field-label\">M\u00E3 m\u1EABu (D\u00F9ng g\u1ECDi API t\u1EEB Module kh\u00E1c)</label>\n <input nz-input [(ngModel)]=\"templateInputCode\" placeholder=\"VD: MAU_DU_AN, MAU_HOP_DONG...\" />\n </div>\n </div>\n\n <div>\n <label class=\"drawer-field-label\">M\u00F4 t\u1EA3 ng\u1EAFn</label>\n <input\n nz-input\n [(ngModel)]=\"templateInputDesc\"\n placeholder=\"M\u00F4 t\u1EA3 m\u1EE5c \u0111\u00EDch s\u1EED d\u1EE5ng ho\u1EB7c ph\u00E2n h\u1EC7 \u00E1p d\u1EE5ng...\"\n />\n </div>\n\n <div class=\"drawer-meta-card\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" [nzGap]=\"12\">\n <div style=\"flex: 1\">\n <div style=\"font-weight: 600; font-size: 13px\">T\u1EA1o th\u01B0 m\u1EE5c g\u1ED1c b\u1ECDc ngo\u00E0i khi k\u00E9o th\u1EA3</div>\n <div class=\"quota-sub\">\n Khi b\u1EADt: K\u00E9o th\u1EA3 m\u1EABu v\u00E0o th\u01B0 m\u1EE5c \u0111\u00EDch s\u1EBD t\u1EA1o 1 th\u01B0 m\u1EE5c mang t\u00EAn m\u1EABu r\u1ED3i ch\u1EE9a c\u00E2y con b\u00EAn trong.\n </div>\n </div>\n <nz-switch\n style=\"flex-shrink: 0\"\n [(ngModel)]=\"templateCreateWrapperRoot\"\n nzCheckedChildren=\"C\u00F3 b\u1ECDc g\u1ED1c\"\n nzUnCheckedChildren=\"Bung tr\u1EF1c ti\u1EBFp\"\n ></nz-switch>\n </div>\n\n <nz-divider style=\"margin: 6px 0\"></nz-divider>\n\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" [nzGap]=\"12\">\n <div style=\"flex: 1\">\n <div style=\"font-weight: 600; font-size: 13px\">Chia s\u1EBB m\u1EABu n\u00E0y cho to\u00E0n b\u1ED9 ng\u01B0\u1EDDi d\u00F9ng & ph\u00E2n h\u1EC7</div>\n <div class=\"quota-sub\">Cho ph\u00E9p m\u1ECDi ng\u01B0\u1EDDi d\u00F9ng v\u00E0 c\u00E1c Module nghi\u1EC7p v\u1EE5 kh\u00E1c s\u1EED d\u1EE5ng chung m\u1EABu n\u00E0y.</div>\n </div>\n <nz-switch\n style=\"flex-shrink: 0\"\n [(ngModel)]=\"templateVisibleToAll\"\n [nzDisabled]=\"!drive.isCurrentUserAdmin()\"\n nzCheckedChildren=\"To\u00E0n h\u1EC7 th\u1ED1ng\"\n nzUnCheckedChildren=\"C\u00E1 nh\u00E2n\"\n ></nz-switch>\n </div>\n </div>\n\n <!-- SO\u1EA0N TH\u1EA2O C\u1EA4U TR\u00DAC C\u00C2Y \u0110A C\u1EA4P & XEM TR\u01AF\u1EDAC TR\u1EF0C QUAN (NH\u1EA4N V\u00C0O D\u00D2NG \u0110\u1EC2 G\u00C1N QUY\u1EC0N RI\u00CANG) -->\n <div>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" nzWrap=\"wrap\" [nzGap]=\"6\" style=\"margin-bottom: 6px\">\n <label class=\"drawer-field-label\" style=\"margin-bottom: 0\">\n 1. C\u1EA5u tr\u00FAc C\u00E2y th\u01B0 m\u1EE5c (M\u1ED7i d\u00F2ng 1 th\u01B0 m\u1EE5c, th\u1EE5t l\u1EC1 2 kho\u1EA3ng tr\u1EAFng \u0111\u1EC3 t\u1EA1o c\u1EA5p con)\n </label>\n <div nz-flex [nzGap]=\"4\">\n <button type=\"button\" nz-button nzSize=\"small\" (click)=\"loadPresetTemplateStructure('PROJECT')\">\n M\u1EABu D\u1EF1 \u00E1n\n </button>\n <button type=\"button\" nz-button nzSize=\"small\" (click)=\"loadPresetTemplateStructure('CONTRACT')\">\n M\u1EABu H\u1EE3p \u0111\u1ED3ng\n </button>\n <button type=\"button\" nz-button nzSize=\"small\" (click)=\"loadPresetTemplateStructure('TRAINING')\">\n M\u1EABu \u0110\u00E0o t\u1EA1o / KHCN\n </button>\n </div>\n </div>\n\n <div class=\"template-editor-grid\">\n <div>\n <textarea\n nz-input\n rows=\"11\"\n [(ngModel)]=\"templateIndentedText\"\n style=\"font-family: monospace; font-size: 12.5px; line-height: 1.55\"\n placeholder=\"- 01. H\u1ED3 s\u01A1 ph\u00E1p l\u00FD&#10; - 01.1. T\u1EDD tr\u00ECnh&#10; - 01.2. Quy\u1EBFt \u0111\u1ECBnh&#10;- 02. H\u1EE3p \u0111\u1ED3ng & Nghi\u1EC7m thu\"\n ></textarea>\n </div>\n\n <div class=\"template-tree-preview\">\n <div\n nz-flex\n nzJustify=\"space-between\"\n nzAlign=\"center\"\n style=\"font-size: 12px; font-weight: 600; margin-bottom: 6px; color: var(--app-text-muted, #64748b)\"\n >\n <span>Xem tr\u01B0\u1EDBc ({{ previewTemplateFlatNodes().length }} th\u01B0 m\u1EE5c) \u2014 Nh\u1EA5n \u0111\u1EC3 g\u00E1n quy\u1EC1n:</span>\n </div>\n\n <!-- D\u00F2ng ch\u1ECDn Quy\u1EC1n g\u1ED1c to\u00E0n b\u1ED9 m\u1EABu -->\n <div\n class=\"preview-tree-row selectable-preview-row\"\n [class.active-perm-target]=\"selectedTemplatePermTarget() === '__ROOT__'\"\n (click)=\"selectTemplatePermissionTarget('__ROOT__')\"\n >\n <nz-icon nzType=\"global\" style=\"color: #0284c7; margin-right: 6px\"></nz-icon>\n <strong style=\"flex: 1; font-size: 12px\">To\u00E0n b\u1ED9 c\u00E2y th\u01B0 m\u1EE5c m\u1EABu (Quy\u1EC1n g\u1ED1c)</strong>\n @if (templateRootPermissions().length > 0) {\n <nz-tag nzColor=\"blue\" style=\"margin: 0; font-size: 10.5px; line-height: 16px; padding: 0 5px\">\n \uD83D\uDEE1 {{ templateRootPermissions().length }}\n </nz-tag>\n }\n </div>\n\n @for (node of previewTemplateFlatNodes(); track node.RelativePath) {\n <div\n class=\"preview-tree-row selectable-preview-row\"\n [class.active-perm-target]=\"selectedTemplatePermTarget() === node.RelativePath\"\n [style.padding-left.px]=\"8 + node.Level * 16\"\n (click)=\"selectTemplatePermissionTarget(node.RelativePath)\"\n >\n <!-- nz-tooltip\n nzTooltipTitle=\"Nh\u1EA5n \u0111\u1EC3 c\u1EA5u h\u00ECnh ph\u00E2n quy\u1EC1n ri\u00EAng cho nh\u00E1nh th\u01B0 m\u1EE5c n\u00E0y\" -->\n <nz-icon nzType=\"folder-fill\" style=\"color: #f59e0b; margin-right: 6px\"></nz-icon>\n <span style=\"flex: 1; overflow: hidden; text-overflow: ellipsis\">{{ node.Name }}</span>\n @if (node.BreakInheritance) {\n <nz-tag\n nzColor=\"warning\"\n style=\"margin: 0 2px 0 0; font-size: 10px; line-height: 15px; padding: 0 4px\"\n nz-tooltip\n nzTooltipTitle=\"Ng\u1EAFt k\u1EBF th\u1EEBa quy\u1EC1n t\u1EEB th\u01B0 m\u1EE5c cha\"\n >\n \u0110\u1ED9c l\u1EADp\n </nz-tag>\n }\n @if (node.PermissionsCount > 0) {\n <nz-tag nzColor=\"cyan\" style=\"margin: 0; font-size: 10px; line-height: 15px; padding: 0 5px\">\n \uD83D\uDEE1 {{ node.PermissionsCount }}\n </nz-tag>\n }\n </div>\n }\n </div>\n </div>\n </div>\n\n <!-- ========================================================================= -->\n <!-- 2. C\u1EA4U H\u00CCNH PH\u00C2N QUY\u1EC0N M\u1EB6C \u0110\u1ECANH CHO M\u1EAAU C\u00C2Y TH\u01AF M\u1EE4C (ACL & RBAC) -->\n <!-- ========================================================================= -->\n <div class=\"drawer-meta-card\">\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" nzWrap=\"wrap\" [nzGap]=\"8\">\n <div>\n <div style=\"font-weight: 600; font-size: 13px\">\n <nz-icon nzType=\"safety-certificate\" style=\"color: #0284c7; margin-right: 4px\"></nz-icon>\n 2. Ph\u00E2n quy\u1EC1n c\u00E0i s\u1EB5n khi t\u1EA1o m\u1EDBi t\u1EEB M\u1EABu c\u00E2y th\u01B0 m\u1EE5c\n </div>\n <div class=\"quota-sub\">\n @if (selectedTemplatePermTarget() === \"__ROOT__\") {\n \u0110ang c\u1EA5u h\u00ECnh cho: <strong style=\"color: #0284c7\">\uD83C\uDF10 To\u00E0n b\u1ED9 c\u00E2y th\u01B0 m\u1EE5c m\u1EABu (Quy\u1EC1n g\u1ED1c)</strong> \u2014 T\u1EF1\n \u0111\u1ED9ng k\u1EBF th\u1EEBa xu\u1ED1ng m\u1ECDi th\u01B0 m\u1EE5c con.\n } @else {\n \u0110ang c\u1EA5u h\u00ECnh ri\u00EAng cho nh\u00E1nh:\n <strong style=\"color: #d97706\">\uD83D\uDCC2 {{ selectedTemplatePermTarget() }}</strong>\n <a style=\"margin-left: 8px; font-weight: 600\" (click)=\"selectTemplatePermissionTarget('__ROOT__')\">\n \u21A9 Quay v\u1EC1 Quy\u1EC1n g\u1ED1c to\u00E0n m\u1EABu\n </a>\n }\n </div>\n </div>\n\n @if (selectedTemplatePermTarget() !== \"__ROOT__\") {\n <div nz-flex nzAlign=\"center\" [nzGap]=\"6\">\n <span style=\"font-size: 12px\">Ng\u1EAFt k\u1EBF th\u1EEBa cha:</span>\n <nz-switch\n nzSize=\"small\"\n [ngModel]=\"activeTemplateTargetBreakInheritance()\"\n (ngModelChange)=\"onToggleTemplateNodeBreakInheritance($event)\"\n nzCheckedChildren=\"\u0110\u1ED9c l\u1EADp\"\n nzUnCheckedChildren=\"K\u1EBF th\u1EEBa\"\n nz-tooltip\n nzTooltipTitle=\"Khi b\u1EADt \u0110\u1ED9c l\u1EADp: Th\u01B0 m\u1EE5c con n\u00E0y s\u1EBD ng\u1EAFt k\u1EBF th\u1EEBa quy\u1EC1n t\u1EEB th\u01B0 m\u1EE5c cha v\u00E0 ch\u1EC9 \u00E1p d\u1EE5ng danh s\u00E1ch quy\u1EC1n ri\u00EAng b\u00EAn d\u01B0\u1EDBi\"\n ></nz-switch>\n </div>\n }\n </div>\n\n <!-- Thanh ch\u1ECDn \u0110\u1ED1i t\u01B0\u1EE3ng (User / \u0110\u01A1n v\u1ECB / Vai tr\u00F2) & M\u1EE9c quy\u1EC1n -->\n <div nz-flex nzWrap=\"wrap\" [nzGap]=\"6\" nzAlign=\"center\" style=\"margin-top: 6px\">\n <nz-select\n [(ngModel)]=\"templatePermGranteeType\"\n (ngModelChange)=\"onTemplatePermGranteeTypeChange()\"\n nzSize=\"small\"\n style=\"width: 140px\"\n >\n <nz-option [nzValue]=\"DriveGranteeType.Org\" nzLabel=\"\uD83C\uDFE2 \u0110\u01A1n v\u1ECB (Org)\"></nz-option>\n <nz-option [nzValue]=\"DriveGranteeType.Role\" nzLabel=\"\uD83D\uDEE1 Vai tr\u00F2 (Role)\"></nz-option>\n <nz-option [nzValue]=\"DriveGranteeType.User\" nzLabel=\"\uD83D\uDC64 C\u00E1 nh\u00E2n (User)\"></nz-option>\n </nz-select>\n\n <nz-select\n nzShowSearch\n nzServerSearch\n nzSize=\"small\"\n nzPlaceHolder=\"T\u00ECm ch\u1ECDn User / \u0110\u01A1n v\u1ECB / Vai tr\u00F2...\"\n [(ngModel)]=\"templatePermSelectedGrantee\"\n (nzOnSearch)=\"onSearchTemplateGrantee($event)\"\n style=\"flex: 1; min-width: 210px\"\n >\n @for (g of templateGranteeOptions(); track g.GranteeId) {\n <nz-option [nzValue]=\"g\" [nzLabel]=\"g.DisplayName + ' (' + g.Code + ')'\"></nz-option>\n }\n </nz-select>\n\n <nz-select\n [(ngModel)]=\"templatePermAccessLevel\"\n [nzDisabled]=\"templatePermIsDeny\"\n nzSize=\"small\"\n style=\"width: 155px\"\n >\n <nz-option [nzValue]=\"DriveAccessLevel.Viewer\" nzLabel=\"\uD83D\uDC41 Ch\u1EC9 xem (10)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Downloader\" nzLabel=\"\u2B07 Xem & T\u1EA3i (20)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Uploader\" nzLabel=\"\u2601 Xem & T\u1EA3i l\u00EAn (35)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Editor\" nzLabel=\"\u270E Ch\u1EC9nh s\u1EEDa (40)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Manager\" nzLabel=\"\uD83D\uDC51 Qu\u1EA3n tr\u1ECB (50)\"></nz-option>\n </nz-select>\n\n <label\n nz-checkbox\n [(ngModel)]=\"templatePermIsDeny\"\n nz-tooltip\n nzTooltipTitle=\"C\u1EA5m truy c\u1EADp t\u01B0\u1EDDng minh (Explicit Deny) \u0111\u1ED1i v\u1EDBi \u0111\u1ED1i t\u01B0\u1EE3ng n\u00E0y tr\u00EAn nh\u00E1nh \u0111ang ch\u1ECDn\"\n style=\"font-size: 12px\"\n >\n C\u1EA5m (Deny)\n </label>\n\n <button\n type=\"button\"\n nz-button\n nzType=\"primary\"\n nzSize=\"small\"\n [disabled]=\"!templatePermSelectedGrantee\"\n (click)=\"addPermissionToTemplateTarget()\"\n >\n <nz-icon nzType=\"user-add\"></nz-icon> Th\u00EAm quy\u1EC1n\n </button>\n </div>\n\n <!-- Danh s\u00E1ch c\u00E1c quy\u1EC1n \u0111\u00E3 \u0111\u1EB7t cho m\u1EE5c \u0111ang ch\u1ECDn -->\n @if (activeTemplateTargetPermissions().length === 0) {\n <div class=\"quota-sub\" style=\"padding: 8px 4px 2px\">\n @if (selectedTemplatePermTarget() === \"__ROOT__\") {\n Ch\u01B0a \u0111\u1EB7t quy\u1EC1n m\u1EB7c \u0111\u1ECBnh cho to\u00E0n m\u1EABu. H\u00E3y ch\u1ECDn \u0110\u01A1n v\u1ECB / Vai tr\u00F2 / C\u00E1 nh\u00E2n \u1EDF tr\u00EAn r\u1ED3i b\u1EA5m\n <strong>+ Th\u00EAm quy\u1EC1n</strong> (ho\u1EB7c b\u1EA5m v\u00E0o t\u1EEBng th\u01B0 m\u1EE5c b\u00EAn khung Xem tr\u01B0\u1EDBc \u0111\u1EC3 \u0111\u1EB7t quy\u1EC1n ri\u00EAng cho\n nh\u00E1nh con).\n } @else {\n Nh\u00E1nh <strong>\"{{ selectedTemplatePermTarget() }}\"</strong> ch\u01B0a c\u00F3 quy\u1EC1n ri\u00EAng (m\u1EB7c \u0111\u1ECBnh k\u1EBF th\u1EEBa t\u1EEB th\u01B0\n m\u1EE5c cha).\n }\n </div>\n } @else {\n <nz-table\n #tplPermTable\n [nzData]=\"activeTemplateTargetPermissions()\"\n nzSize=\"small\"\n [nzBordered]=\"true\"\n [nzFrontPagination]=\"false\"\n [nzShowPagination]=\"false\"\n style=\"margin-top: 6px\"\n >\n <thead>\n <tr>\n <th>\u0110\u1ED1i t\u01B0\u1EE3ng nh\u1EADn quy\u1EC1n</th>\n <th nzWidth=\"185px\">M\u1EE9c quy\u1EC1n \u00E1p d\u1EE5ng</th>\n <th nzWidth=\"95px\" class=\"text-center\">T\u1EA3i xu\u1ED1ng</th>\n <th nzWidth=\"65px\" class=\"text-center\">X\u00F3a</th>\n </tr>\n </thead>\n <tbody>\n @for (p of tplPermTable.data; track p.GranteeType + \":\" + p.GranteeId) {\n <tr>\n <td>\n <nz-tag\n [nzColor]=\"\n p.GranteeType === DriveGranteeType.User\n ? 'blue'\n : p.GranteeType === DriveGranteeType.Org\n ? 'cyan'\n : 'purple'\n \"\n >\n {{\n p.GranteeType === DriveGranteeType.User\n ? \"User\"\n : p.GranteeType === DriveGranteeType.Org\n ? \"\u0110\u01A1n v\u1ECB\"\n : \"Role\"\n }}\n </nz-tag>\n <strong>{{ p.GranteeName || p.GranteeId }}</strong>\n </td>\n <td>\n <nz-select\n nzSize=\"small\"\n [ngModel]=\"p.IsDeny ? 'DENY' : p.AccessLevel\"\n (ngModelChange)=\"updateTemplatePermissionLevel(p, $event)\"\n style=\"width: 100%\"\n >\n <nz-option [nzValue]=\"DriveAccessLevel.Viewer\" nzLabel=\"\uD83D\uDC41 Ch\u1EC9 xem (10)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Downloader\" nzLabel=\"\u2B07 Xem & T\u1EA3i (20)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Uploader\" nzLabel=\"\u2601 Xem & T\u1EA3i l\u00EAn (35)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Editor\" nzLabel=\"\u270E Ch\u1EC9nh s\u1EEDa (40)\"></nz-option>\n <nz-option [nzValue]=\"DriveAccessLevel.Manager\" nzLabel=\"\uD83D\uDC51 Qu\u1EA3n tr\u1ECB (50)\"></nz-option>\n <nz-option nzValue=\"DENY\" nzLabel=\"\uD83D\uDEAB C\u1EA5m (Deny)\"></nz-option>\n </nz-select>\n </td>\n <td class=\"text-center\">\n <nz-tag [nzColor]=\"p.CanDownload && !p.IsDeny ? 'green' : 'default'\">\n {{ p.CanDownload && !p.IsDeny ? \"Cho ph\u00E9p\" : \"Ch\u1EB7n\" }}\n </nz-tag>\n </td>\n <td class=\"text-center\">\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzDanger\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"G\u1EE1 quy\u1EC1n n\u00E0y kh\u1ECFi m\u1EABu\"\n (click)=\"removePermissionFromTemplateTarget(p)\"\n >\n <nz-icon nzType=\"delete\"></nz-icon>\n </button>\n </td>\n </tr>\n }\n </tbody>\n </nz-table>\n }\n </div>\n </div>\n </ng-container>\n\n <ng-template #templateDrawerFooterTpl>\n <div nz-flex nzJustify=\"space-between\" nzAlign=\"center\" style=\"width: 100%\">\n <div>\n @if (templateDrawerMode === \"edit\" && editingTemplate) {\n <button nz-button nzDanger nzType=\"default\" (click)=\"onDeleteTemplate(editingTemplate)\">\n <nz-icon nzType=\"delete\"></nz-icon> X\u00F3a m\u1EABu n\u00E0y\n </button>\n }\n </div>\n <div nz-flex [nzGap]=\"8\">\n <button nz-button nzType=\"default\" (click)=\"templateDrawerVisible = false\">H\u1EE7y</button>\n <button nz-button nzType=\"primary\" (click)=\"submitTemplateDrawer()\">\n <nz-icon nzType=\"save\"></nz-icon>\n {{ templateDrawerMode === \"create\" ? \"L\u01B0u m\u1EABu c\u00E2y th\u01B0 m\u1EE5c\" : \"C\u1EADp nh\u1EADt m\u1EABu\" }}\n </button>\n </div>\n </div>\n </ng-template>\n </nz-drawer>\n}\n", styles: [".drive-shell{display:grid;grid-template-columns:245px 1fr;min-height:calc(100vh - 110px);background:var(--app-container-bg, #ffffff);border:1px solid var(--app-border, #e2e8f0);border-radius:6px;overflow:hidden}.drive-sidebar{padding:14px;background:var(--app-sidebar-bg, #f8fafc);border-right:1px solid var(--app-border, #e2e8f0);display:flex;flex-direction:column;gap:14px}.drive-nav{display:flex;flex-direction:column;gap:4px}.drive-nav a{display:flex;align-items:center;gap:10px;padding:9px 12px;border-radius:6px;color:var(--app-text, #334155);cursor:pointer;transition:background .15s}.drive-nav a:hover,.drive-nav a.active{background:color-mix(in srgb,var(--primary-color, #1890ff) 16%,transparent);color:var(--primary-color, #1890ff);font-weight:600}.org-nav-group{display:flex;flex-direction:column;gap:2px}.custom-space-link{padding-left:26px!important;font-size:13px}.custom-space-title{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.custom-space-badge{margin:0!important;font-size:10px;line-height:16px;padding:0 4px}.nav-inline-btn{border:none;background:transparent;color:inherit;cursor:pointer;padding:2px 4px;border-radius:4px;display:inline-flex;align-items:center;justify-content:center;opacity:.7}.nav-inline-btn:hover{opacity:1;background:color-mix(in srgb,var(--primary-color, #1890ff) 18%,transparent)}.storage-mode-box{padding:10px 12px;background:var(--app-container-bg, #ffffff);border:1px solid var(--app-border, #e2e8f0);border-radius:6px}.upload-queue-box{padding:10px;background:var(--app-container-bg, #ffffff);border:1px solid var(--app-border, #e2e8f0);border-radius:6px;max-height:180px;overflow-y:auto}.upload-task-row{margin-bottom:6px}.upload-task-name{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.quota-box{margin-top:auto;padding:12px;background:var(--app-container-bg, #ffffff);border:1px solid var(--app-border, #e2e8f0);border-radius:6px}.quota-title{font-size:13px;font-weight:600;margin-bottom:6px}.quota-sub{font-size:12px;color:var(--app-text-muted, #64748b);margin-top:4px}.drive-main{position:relative;padding:16px;display:flex;flex-direction:column;gap:12px;transition:background .15s,border-color .15s}.drive-main.external-drag-active{background:color-mix(in srgb,var(--primary-color, #1890ff) 6%,var(--app-container-bg, #ffffff));outline:2px dashed var(--primary-color, #1890ff);outline-offset:-6px}.external-drop-banner{pointer-events:none;display:flex;align-items:center;gap:14px;padding:12px 18px;border-radius:8px;background:color-mix(in srgb,var(--primary-color, #1890ff) 14%,var(--app-container-bg, #ffffff));border:1px dashed var(--primary-color, #1890ff);color:var(--app-text, #1e293b)}.drop-banner-icon{font-size:28px;color:var(--primary-color, #1890ff)}.drop-banner-title{font-size:14px;font-weight:500}.drop-banner-sub{font-size:12px;color:var(--app-text-muted, #64748b);margin-top:2px}.drive-toolbar{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px;padding-bottom:10px;border-bottom:1px solid var(--app-border, #f1f5f9)}.physical-path-bar{display:flex;align-items:center;gap:6px;margin-top:4px;font-size:12px;color:var(--app-text-muted, #64748b)}.toolbar-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.drive-row{cursor:pointer;transition:background .15s,outline .15s}.drive-row.dragging-row{opacity:.45}.drive-row.drop-target-active>td{background:color-mix(in srgb,var(--primary-color, #1890ff) 18%,transparent)!important;border-top:1px dashed var(--primary-color, #1890ff);border-bottom:1px dashed var(--primary-color, #1890ff)}.bc-drop-active,.drive-nav a.nav-drop-active{background:color-mix(in srgb,var(--primary-color, #1890ff) 22%,transparent)!important;outline:1.5px dashed var(--primary-color, #1890ff);color:var(--primary-color, #1890ff);font-weight:600}.node-name-cell{display:flex;align-items:center;gap:8px}.node-icon-wrap{position:relative;display:inline-flex;align-items:center;justify-content:center}.node-icon{font-size:18px}.shortcut-badge{position:absolute;right:-5px;bottom:-3px;width:13px;height:13px;border-radius:50%;background:#7c3aed;color:#fff;font-size:9px;display:inline-flex;align-items:center;justify-content:center;box-shadow:0 0 0 1.5px var(--app-container-bg, #ffffff)}.node-title{font-weight:500}.action-btn-group{display:inline-flex;align-items:center;justify-content:center;gap:4px}.action-icon-btn{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border:none;background:transparent;border-radius:6px;cursor:pointer;font-size:15px;transition:background .15s,transform .1s}.action-icon-btn:hover{background:color-mix(in srgb,var(--primary-color, #1890ff) 12%,transparent);transform:translateY(-1px)}.action-icon-btn.color-warn:hover{background:#ef44441f}.drawer-field-label{display:block;font-size:13px;font-weight:600;margin-bottom:6px;color:var(--app-text, #334155)}.drawer-meta-card{padding:12px 14px;background:var(--app-sidebar-bg, #f8fafc);border:1px solid var(--app-border, #e2e8f0);border-radius:8px;display:flex;flex-direction:column;gap:8px}.drawer-meta-header{display:flex;align-items:center;gap:10px}.drawer-meta-row{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:13px}.meta-label{color:var(--app-text-muted, #64748b)}.sortable-th{cursor:pointer;-webkit-user-select:none;user-select:none;transition:background .15s,color .15s}.sortable-th:hover{background:color-mix(in srgb,var(--primary-color, #1890ff) 8%,var(--app-sidebar-bg, #f8fafc))!important;color:var(--primary-color, #1890ff)}.th-sort-wrap{display:inline-flex;align-items:center;gap:6px;width:100%}.th-sort-wrap.justify-center{justify-content:center}.th-sort-wrap.justify-end{justify-content:flex-end}.sort-icon{font-size:13px;opacity:.35;transition:opacity .15s,color .15s}.sort-icon.active{opacity:1;color:var(--primary-color, #1890ff)}.sortable-th:hover .sort-icon{opacity:.85}.template-sidebar-box{padding:10px 12px;background:var(--app-container-bg, #ffffff);border:1px solid var(--app-border, #e2e8f0);border-radius:6px}.template-chip-list{display:flex;flex-direction:column;gap:6px;max-height:175px;overflow-y:auto}.template-drag-item{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:6px 8px;border-radius:6px;border:1px dashed var(--app-border, #cbd5e1);background:var(--app-sidebar-bg, #f8fafc);cursor:grab;transition:all .15s}.template-drag-item:hover{border-color:var(--primary-color, #1890ff);background:color-mix(in srgb,var(--primary-color, #1890ff) 10%,transparent)}.template-item-title{font-size:12px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.template-item-sub{font-size:10.5px;color:var(--app-text-muted, #64748b)}.template-editor-grid{display:grid;grid-template-columns:1.15fr 1fr;gap:10px}.template-tree-preview{border:1px solid var(--app-border, #e2e8f0);border-radius:6px;padding:10px;background:var(--app-sidebar-bg, #f8fafc);max-height:450px;overflow-y:auto}.preview-tree-row{display:flex;align-items:center;font-size:12.5px;padding:2.5px 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.selectable-preview-row{cursor:pointer;padding:4px 6px;border-radius:5px;transition:background .12s,border-color .12s;border:1px solid transparent}.selectable-preview-row:hover{background:color-mix(in srgb,var(--primary-color, #1890ff) 10%,transparent)}.selectable-preview-row.active-perm-target{background:color-mix(in srgb,var(--primary-color, #1890ff) 16%,transparent);border-color:var(--primary-color, #1890ff);font-weight:600}\n"] }]
28266
29091
  }], ctorParameters: () => [] });
28267
29092
 
28268
29093
  // ============================================================================
@@ -28972,6 +29797,10 @@ class DriveFolderEmbedComponent extends BaseComponent {
28972
29797
  title = 'Hồ sơ tài liệu';
28973
29798
  isOrgNode = true;
28974
29799
  readonly = false;
29800
+ /** Mã mẫu cây thư mục tự động khởi tạo cho Hồ sơ nghiệp vụ (VD: 'MAU_DU_AN', 'MAU_HOP_DONG') */
29801
+ templateCode = '';
29802
+ /** Hoặc truyền ID của mẫu cây thư mục */
29803
+ templateId = '';
28975
29804
  DriveNodeType = DriveNodeType;
28976
29805
  DriveAccessLevel = DriveAccessLevel;
28977
29806
  loading = signal(false);
@@ -29001,13 +29830,21 @@ class DriveFolderEmbedComponent extends BaseComponent {
29001
29830
  }
29002
29831
  }
29003
29832
  async initializeEmbedFolder() {
29004
- if (this.moduleCode && this.moduleRecordId && this.defaultSubFolders?.length && !this.readonly) {
29833
+ if (this.drive.folderTemplates().length === 0) {
29834
+ this.drive.loadFolderTemplates();
29835
+ }
29836
+ if (this.moduleCode &&
29837
+ this.moduleRecordId &&
29838
+ (this.defaultSubFolders?.length || this.templateCode || this.templateId) &&
29839
+ !this.readonly) {
29005
29840
  await this.drive.ensureModuleRecordFolder({
29006
29841
  ModuleCode: this.moduleCode,
29007
29842
  ModuleRecordId: this.moduleRecordId,
29008
29843
  RecordFolderName: this.recordFolderName || undefined,
29009
29844
  IsOrgNode: this.isOrgNode,
29010
29845
  SubFolderNames: this.defaultSubFolders,
29846
+ TemplateCode: this.templateCode || undefined,
29847
+ TemplateId: this.templateId || undefined,
29011
29848
  });
29012
29849
  }
29013
29850
  this.currentParentId.set(this.rootFolderId);
@@ -29048,6 +29885,43 @@ class DriveFolderEmbedComponent extends BaseComponent {
29048
29885
  this.loading.set(false);
29049
29886
  }
29050
29887
  }
29888
+ async applyTemplateInEmbed(tpl) {
29889
+ try {
29890
+ if (this.moduleCode && this.moduleRecordId) {
29891
+ const res = await this.drive.applyTemplateToModuleRecord({
29892
+ ModuleCode: this.moduleCode,
29893
+ ModuleRecordId: this.moduleRecordId,
29894
+ RecordFolderName: this.recordFolderName || undefined,
29895
+ IsOrgNode: this.isOrgNode,
29896
+ TemplateId: tpl.Id,
29897
+ TargetSubFolderId: this.currentParentId(),
29898
+ CreateTemplateWrapperFolder: false,
29899
+ });
29900
+ if (res) {
29901
+ this.success(`Đã áp dụng mẫu "${tpl.Name}" (${res.CreatedFolderCount} thư mục mới).`);
29902
+ await this.loadEmbedItems();
29903
+ }
29904
+ }
29905
+ else {
29906
+ const res = await this.drive.applyFolderTemplate({
29907
+ TemplateId: tpl.Id,
29908
+ TargetParentId: this.currentParentId() || this.rootFolderId,
29909
+ IsOrgNode: this.isOrgNode,
29910
+ CreateWrapperRootFolder: false,
29911
+ });
29912
+ if (res.IsSuccess) {
29913
+ this.success(`Đã áp dụng mẫu "${tpl.Name}".`);
29914
+ await this.loadEmbedItems();
29915
+ }
29916
+ else {
29917
+ this.error(res.ErrorMessage);
29918
+ }
29919
+ }
29920
+ }
29921
+ catch (err) {
29922
+ this.handleError(err);
29923
+ }
29924
+ }
29051
29925
  isFolder(item) {
29052
29926
  return (item.NodeType === DriveNodeType.Folder ||
29053
29927
  (item.NodeType === DriveNodeType.Shortcut && item.ShortcutTargetType === DriveNodeType.Folder));
@@ -29239,7 +30113,7 @@ class DriveFolderEmbedComponent extends BaseComponent {
29239
30113
  return 'file-text';
29240
30114
  }
29241
30115
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: DriveFolderEmbedComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
29242
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.7", type: DriveFolderEmbedComponent, isStandalone: true, selector: "lib-drive-folder-embed", inputs: { moduleCode: "moduleCode", moduleRecordId: "moduleRecordId", recordFolderName: "recordFolderName", defaultSubFolders: "defaultSubFolders", rootFolderId: "rootFolderId", title: "title", isOrgNode: "isOrgNode", readonly: "readonly" }, providers: [NzImageService], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"drive-embed-shell\">\n <!-- TOOLBAR NH\u00DANG -->\n <div class=\"embed-toolbar\" nz-flex nzJustify=\"space-between\" nzAlign=\"center\" nzWrap=\"wrap\" [nzGap]=\"8\">\n <div>\n <nz-breadcrumb>\n <nz-breadcrumb-item\n class=\"cursor-pointer\"\n (click)=\"navigateEmbedFolder(recordRootFolder()?.Id || rootFolderId)\"\n >\n <nz-icon nzType=\"folder-open\"></nz-icon>\n <strong>{{ recordRootFolder()?.Name || title }}</strong>\n </nz-breadcrumb-item>\n @for (bc of subBreadcrumbs(); track bc.Id) {\n <nz-breadcrumb-item class=\"cursor-pointer\" (click)=\"navigateEmbedFolder(bc.Id)\">\n {{ bc.Name }}\n </nz-breadcrumb-item>\n }\n </nz-breadcrumb>\n </div>\n\n <div nz-flex nzAlign=\"center\" nzWrap=\"wrap\" [nzGap]=\"6\">\n <nz-input-group [nzSuffix]=\"embedSearchSuffix\" nzSize=\"small\" style=\"width: 210px\">\n <input\n nz-input\n type=\"text\"\n placeholder=\"T\u00ECm trong h\u1ED3 s\u01A1 n\u00E0y...\"\n [(ngModel)]=\"keyword\"\n (keyup.enter)=\"loadEmbedItems()\"\n />\n </nz-input-group>\n <ng-template #embedSearchSuffix>\n <nz-icon nzType=\"search\" class=\"cursor-pointer\" (click)=\"loadEmbedItems()\"></nz-icon>\n </ng-template>\n\n <input #embedFileInput type=\"file\" multiple hidden (change)=\"onEmbedUploadSelected($event)\" />\n @if (!readonly) {\n <button nz-button nzType=\"primary\" nzSize=\"small\" (click)=\"embedFileInput.click()\">\n <nz-icon nzType=\"cloud-upload\"></nz-icon> T\u1EA3i l\u00EAn\n </button>\n\n <button nz-button nzType=\"default\" nzSize=\"small\" (click)=\"openCreateSubFolder()\">\n <nz-icon nzType=\"folder-add\"></nz-icon> T\u1EA1o th\u01B0 m\u1EE5c con\n </button>\n\n <button nz-button nzType=\"dashed\" nzSize=\"small\" (click)=\"pickerDrawerVisible = true\">\n <nz-icon nzType=\"link\"></nz-icon> \u0110\u00EDnh k\u00E8m t\u1EEB Drive\n </button>\n }\n\n @if (recordRootFolder() && !readonly) {\n <button\n nz-button\n nzType=\"default\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"Ph\u00E2n quy\u1EC1n th\u01B0 m\u1EE5c h\u1ED3 s\u01A1\"\n (click)=\"openShare(recordRootFolder()!)\"\n >\n <nz-icon nzType=\"share-alt\"></nz-icon>\n </button>\n }\n\n <button nz-button nzType=\"default\" nzSize=\"small\" (click)=\"loadEmbedItems()\" nz-tooltip nzTooltipTitle=\"L\u00E0m m\u1EDBi\">\n <nz-icon nzType=\"reload\"></nz-icon>\n </button>\n </div>\n </div>\n\n <!-- B\u1EA2NG D\u1EEE LI\u1EC6U T\u1EACP TIN & TH\u01AF M\u1EE4C CON -->\n <nz-table #embedTable [nzData]=\"items()\" [nzLoading]=\"loading()\" nzSize=\"small\" [nzBordered]=\"true\" [nzPageSize]=\"15\">\n <thead>\n <tr>\n <th nzWidth=\"44px\" class=\"text-center\">#</th>\n <th>T\u00EAn th\u01B0 m\u1EE5c / T\u00E0i li\u1EC7u</th>\n <th nzWidth=\"135px\">Ng\u01B0\u1EDDi t\u1EA1o</th>\n <th nzWidth=\"105px\" class=\"text-right\">K\u00EDch th\u01B0\u1EDBc</th>\n <th nzWidth=\"135px\" class=\"text-center\">C\u1EADp nh\u1EADt</th>\n <th nzWidth=\"145px\" class=\"text-center\">Thao t\u00E1c</th>\n </tr>\n </thead>\n <tbody>\n @for (item of embedTable.data; track item.Id; let i = $index) {\n <tr class=\"drive-row\" (dblclick)=\"onItemClick(item)\">\n <td class=\"text-center\">{{ i + 1 }}</td>\n <td>\n <div nz-flex nzAlign=\"center\" [nzGap]=\"8\">\n <nz-icon\n [nzType]=\"isFolder(item) ? 'folder-fill' : getFileIcon(item)\"\n [style.color]=\"isFolder(item) ? '#f59e0b' : 'var(--primary-color, #1890ff)'\"\n style=\"font-size: 18px\"\n ></nz-icon>\n <span class=\"link-detail\" style=\"font-weight: 500\" (click)=\"onItemClick(item)\">{{ item.Name }}</span>\n @if (item.NodeType === DriveNodeType.Shortcut) {\n <nz-tag nzColor=\"purple\">L\u1ED1i t\u1EAFt</nz-tag>\n }\n </div>\n </td>\n <td>{{ item.OwnerName || item.OwnerId }}</td>\n <td class=\"text-right\">{{ isFolder(item) ? \"\u2014\" : (item.SizeBytes | formatBytes) }}</td>\n <td class=\"text-center\">{{ item.UpdatedDate | date: \"dd/MM/yyyy HH:mm\" }}</td>\n <td class=\"text-center\">\n <div nz-flex nzJustify=\"center\" [nzGap]=\"4\">\n @if (!isFolder(item)) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"Xem tr\u01B0\u1EDBc\"\n (click)=\"previewFile(item)\"\n >\n <nz-icon nzType=\"eye\"></nz-icon>\n </button>\n @if (item.CanDownload) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"T\u1EA3i xu\u1ED1ng\"\n (click)=\"downloadFile(item)\"\n >\n <nz-icon nzType=\"download\"></nz-icon>\n </button>\n }\n @if (!readonly && item.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"L\u1ECBch s\u1EED phi\u00EAn b\u1EA3n\"\n (click)=\"openVersion(item)\"\n >\n <nz-icon nzType=\"history\"></nz-icon>\n </button>\n }\n }\n @if (!readonly && (item.CanShare || item.EffectiveAccess >= DriveAccessLevel.Manager)) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"Ph\u00E2n quy\u1EC1n & Chia s\u1EBB\"\n (click)=\"openShare(item)\"\n >\n <nz-icon nzType=\"share-alt\"></nz-icon>\n </button>\n }\n @if (!readonly && item.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzDanger\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"X\u00F3a / G\u1EE1 kh\u1ECFi h\u1ED3 s\u01A1\"\n (click)=\"deleteOrDetachItem(item)\"\n >\n <nz-icon nzType=\"delete\"></nz-icon>\n </button>\n }\n </div>\n </td>\n </tr>\n }\n </tbody>\n </nz-table>\n</div>\n\n<!-- DRAWER T\u1EA0O TH\u01AF M\u1EE4C CON -->\n<nz-drawer\n [nzVisible]=\"subFolderDrawerVisible\"\n nzPlacement=\"right\"\n [nzWidth]=\"420\"\n nzTitle=\"T\u1EA1o th\u01B0 m\u1EE5c con trong h\u1ED3 s\u01A1\"\n (nzOnClose)=\"subFolderDrawerVisible = false\"\n>\n <ng-container *nzDrawerContent>\n <div nz-flex nzVertical [nzGap]=\"12\">\n <label style=\"font-weight: 600\">T\u00EAn th\u01B0 m\u1EE5c con</label>\n <input\n nz-input\n [(ngModel)]=\"newSubFolderName\"\n [appAutoFocus]=\"subFolderDrawerVisible\"\n placeholder=\"Nh\u1EADp t\u00EAn th\u01B0 m\u1EE5c con...\"\n (keyup.enter)=\"submitCreateSubFolder()\"\n />\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\" style=\"margin-top: 8px\">\n <button nz-button nzType=\"default\" (click)=\"subFolderDrawerVisible = false\">H\u1EE7y</button>\n <button nz-button nzType=\"primary\" (click)=\"submitCreateSubFolder()\">\n <nz-icon nzType=\"check\"></nz-icon> T\u1EA1o th\u01B0 m\u1EE5c\n </button>\n </div>\n </div>\n </ng-container>\n</nz-drawer>\n\n<!-- DRAWER \u0110\u00CDNH K\u00C8M T\u1EEA DRIVE -->\n<nz-drawer\n [nzVisible]=\"pickerDrawerVisible\"\n nzPlacement=\"right\"\n [nzWidth]=\"820\"\n nzTitle=\"\u0110\u00EDnh k\u00E8m t\u00E0i li\u1EC7u / th\u01B0 m\u1EE5c t\u1EEB Drive v\u00E0o H\u1ED3 s\u01A1\"\n (nzOnClose)=\"pickerDrawerVisible = false\"\n>\n <ng-container *nzDrawerContent>\n <lib-drive-picker\n [selectMode]=\"'both'\"\n [multiple]=\"true\"\n (confirmed)=\"onAttachFromDrive($event)\"\n (cancelled)=\"pickerDrawerVisible = false\"\n ></lib-drive-picker>\n </ng-container>\n</nz-drawer>\n\n<!-- DRAWER XEM TR\u1EF0C TUY\u1EBEN -->\n<nz-drawer\n [nzVisible]=\"previewDrawerVisible\"\n nzPlacement=\"right\"\n [nzWidth]=\"'72vw'\"\n [nzTitle]=\"previewTitle\"\n (nzOnClose)=\"previewDrawerVisible = false\"\n>\n <ng-container *nzDrawerContent>\n <extend-view-file-content [previewType]=\"previewType\" [previewContent]=\"previewContent\"></extend-view-file-content>\n </ng-container>\n</nz-drawer>\n\n<!-- DRAWER L\u1ECACH S\u1EEC PHI\u00CAN B\u1EA2N -->\n<nz-drawer\n [nzVisible]=\"versionDrawerVisible\"\n nzPlacement=\"right\"\n [nzWidth]=\"740\"\n [nzTitle]=\"'L\u1ECBch s\u1EED phi\u00EAn b\u1EA3n: ' + (activeNode()?.Name || '')\"\n (nzOnClose)=\"versionDrawerVisible = false\"\n>\n <ng-container *nzDrawerContent>\n @if (activeNode(); as node) {\n <lib-drive-version-modal\n [nodeId]=\"node.ShortcutTargetId || node.Id\"\n [nodeName]=\"node.Name\"\n [canEdit]=\"!readonly\"\n [canDownload]=\"node.CanDownload\"\n (closed)=\"versionDrawerVisible = false; loadEmbedItems()\"\n ></lib-drive-version-modal>\n }\n </ng-container>\n</nz-drawer>\n\n<!-- DRAWER CHIA S\u1EBA & PH\u00C2N QUY\u1EC0N -->\n<nz-drawer\n [nzVisible]=\"shareDrawerVisible\"\n nzPlacement=\"right\"\n [nzWidth]=\"820\"\n [nzTitle]=\"'Chia s\u1EBB & Ph\u00E2n quy\u1EC1n: ' + (activeNode()?.Name || '')\"\n (nzOnClose)=\"shareDrawerVisible = false\"\n>\n <ng-container *nzDrawerContent>\n @if (activeNode(); as node) {\n <lib-drive-share-modal [nodeId]=\"node.ShortcutTargetId || node.Id\"></lib-drive-share-modal>\n }\n </ng-container>\n</nz-drawer>\n", styles: [".drive-embed-shell{border:1px solid var(--app-border, #e2e8f0);border-radius:8px;padding:14px;background:var(--app-container-bg, #ffffff);display:flex;flex-direction:column;gap:12px}.embed-toolbar{padding-bottom:10px;border-bottom:1px solid var(--app-border, #f1f5f9)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$1.DatePipe, name: "date" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: NzFlexModule }, { kind: "directive", type: i3$3.NzFlexDirective, selector: "[nz-flex],nz-flex", inputs: ["nzVertical", "nzJustify", "nzAlign", "nzGap", "nzWrap", "nzFlex"], exportAs: ["nzFlex"] }, { kind: "ngmodule", type: NzTableModule }, { kind: "component", type: i6.NzTableComponent, selector: "nz-table", inputs: ["nzTableLayout", "nzShowTotal", "nzItemRender", "nzTitle", "nzFooter", "nzNoResult", "nzPageSizeOptions", "nzVirtualItemSize", "nzVirtualMaxBufferPx", "nzVirtualMinBufferPx", "nzVirtualForTrackBy", "nzLoadingDelay", "nzPageIndex", "nzPageSize", "nzTotal", "nzWidthConfig", "nzData", "nzCustomColumn", "nzPaginationPosition", "nzScroll", "noDataVirtualHeight", "nzPaginationType", "nzFrontPagination", "nzTemplateMode", "nzShowPagination", "nzLoading", "nzOuterBordered", "nzLoadingIndicator", "nzBordered", "nzSize", "nzShowSizeChanger", "nzHideOnSinglePage", "nzShowQuickJumper", "nzSimple"], outputs: ["nzPageSizeChange", "nzPageIndexChange", "nzQueryParams", "nzCurrentPageDataChange", "nzCustomColumnChange"], exportAs: ["nzTable"] }, { kind: "directive", type: i6.NzTableCellDirective, selector: "th:not(.nz-disable-th):not([mat-cell]), td:not(.nz-disable-td):not([mat-cell])" }, { kind: "directive", type: i6.NzThMeasureDirective, selector: "th", inputs: ["nzWidth", "colspan", "colSpan", "rowspan", "rowSpan"] }, { kind: "component", type: i6.NzTheadComponent, selector: "thead:not(.ant-table-thead)", outputs: ["nzSortOrderChange"] }, { kind: "component", type: i6.NzTbodyComponent, selector: "tbody" }, { kind: "directive", type: i6.NzTrDirective, selector: "tr:not([mat-row]):not([mat-header-row]):not([nz-table-measure-row]):not([nzExpand]):not([nz-table-fixed-row])" }, { 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$1.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i1$2.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: NzInputModule }, { kind: "directive", type: i12.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzBorderless", "nzSize", "nzStepperless", "nzStatus", "disabled"], exportAs: ["nzInput"] }, { kind: "component", type: i12.NzInputGroupComponent, selector: "nz-input-group", inputs: ["nzAddOnBeforeIcon", "nzAddOnAfterIcon", "nzPrefixIcon", "nzSuffixIcon", "nzAddOnBefore", "nzAddOnAfter", "nzPrefix", "nzStatus", "nzSuffix", "nzSize", "nzSearch", "nzCompact"], exportAs: ["nzInputGroup"] }, { kind: "directive", type: i12.NzInputGroupWhitSuffixOrPrefixDirective, selector: "nz-input-group[nzSuffix], nz-input-group[nzPrefix]" }, { kind: "ngmodule", type: NzBreadCrumbModule }, { kind: "component", type: i10.NzBreadCrumbComponent, selector: "nz-breadcrumb", inputs: ["nzAutoGenerate", "nzSeparator", "nzRouteLabel", "nzRouteLabelFn", "nzRouteFn"], exportAs: ["nzBreadcrumb"] }, { kind: "component", type: i10.NzBreadCrumbItemComponent, selector: "nz-breadcrumb-item", inputs: ["nzOverlay"], exportAs: ["nzBreadcrumbItem"] }, { kind: "ngmodule", type: NzTagModule }, { kind: "component", type: i11.NzTagComponent, selector: "nz-tag", inputs: ["nzMode", "nzColor", "nzChecked", "nzBordered"], outputs: ["nzOnClose", "nzCheckedChange"], exportAs: ["nzTag"] }, { kind: "ngmodule", type: NzToolTipModule }, { kind: "directive", type: i12$1.NzTooltipDirective, selector: "[nz-tooltip]", inputs: ["nzTooltipTitle", "nzTooltipTitleContext", "nz-tooltip", "nzTooltipTrigger", "nzTooltipPlacement", "nzTooltipOrigin", "nzTooltipVisible", "nzTooltipMouseEnterDelay", "nzTooltipMouseLeaveDelay", "nzTooltipOverlayClassName", "nzTooltipOverlayStyle", "nzTooltipArrowPointAtCenter", "cdkConnectedOverlayPush", "nzTooltipColor"], outputs: ["nzTooltipVisibleChange"], exportAs: ["nzTooltip"] }, { kind: "ngmodule", type: NzDrawerModule }, { kind: "component", type: i14.NzDrawerComponent, selector: "nz-drawer", inputs: ["nzContent", "nzCloseIcon", "nzClosable", "nzMaskClosable", "nzMask", "nzCloseOnNavigation", "nzNoAnimation", "nzKeyboard", "nzTitle", "nzExtra", "nzFooter", "nzPlacement", "nzSize", "nzMaskStyle", "nzBodyStyle", "nzWrapClassName", "nzWidth", "nzHeight", "nzZIndex", "nzOffsetX", "nzOffsetY", "nzVisible"], outputs: ["nzOnViewInit", "nzOnClose", "nzVisibleChange"], exportAs: ["nzDrawer"] }, { kind: "directive", type: i14.NzDrawerContentDirective, selector: "[nzDrawerContent]", exportAs: ["nzDrawerContent"] }, { kind: "ngmodule", type: NzCheckboxModule }, { kind: "pipe", type: FormatBytesPipe, name: "formatBytes" }, { kind: "directive", type: AutoFocusDirective, selector: "[appAutoFocus]", inputs: ["appAutoFocus"] }, { kind: "component", type: ExtendViewFileContentComponent, selector: "extend-view-file-content", inputs: ["previewType", "previewContent"] }, { kind: "component", type: DriveShareModalComponent, selector: "lib-drive-share-modal", inputs: ["nodeId"] }, { kind: "component", type: DriveVersionModalComponent, selector: "lib-drive-version-modal", inputs: ["nodeId", "nodeName", "canEdit", "canDownload"], outputs: ["closed"] }, { kind: "component", type: DrivePickerComponent, selector: "lib-drive-picker", inputs: ["selectMode", "multiple", "acceptExtensions", "allowUploadNew", "initialScope"], outputs: ["confirmed", "cancelled"] }] });
30116
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.7", type: DriveFolderEmbedComponent, isStandalone: true, selector: "lib-drive-folder-embed", inputs: { moduleCode: "moduleCode", moduleRecordId: "moduleRecordId", recordFolderName: "recordFolderName", defaultSubFolders: "defaultSubFolders", rootFolderId: "rootFolderId", title: "title", isOrgNode: "isOrgNode", readonly: "readonly", templateCode: "templateCode", templateId: "templateId" }, providers: [NzImageService], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"drive-embed-shell\">\n <!-- TOOLBAR NH\u00DANG -->\n <div class=\"embed-toolbar\" nz-flex nzJustify=\"space-between\" nzAlign=\"center\" nzWrap=\"wrap\" [nzGap]=\"8\">\n <div>\n <nz-breadcrumb>\n <nz-breadcrumb-item\n class=\"cursor-pointer\"\n (click)=\"navigateEmbedFolder(recordRootFolder()?.Id || rootFolderId)\"\n >\n <nz-icon nzType=\"folder-open\"></nz-icon>\n <strong>{{ recordRootFolder()?.Name || title }}</strong>\n </nz-breadcrumb-item>\n @for (bc of subBreadcrumbs(); track bc.Id) {\n <nz-breadcrumb-item class=\"cursor-pointer\" (click)=\"navigateEmbedFolder(bc.Id)\">\n {{ bc.Name }}\n </nz-breadcrumb-item>\n }\n </nz-breadcrumb>\n </div>\n\n <div nz-flex nzAlign=\"center\" nzWrap=\"wrap\" [nzGap]=\"6\">\n <nz-input-group [nzSuffix]=\"embedSearchSuffix\" nzSize=\"small\" style=\"width: 210px\">\n <input\n nz-input\n type=\"text\"\n placeholder=\"T\u00ECm trong h\u1ED3 s\u01A1 n\u00E0y...\"\n [(ngModel)]=\"keyword\"\n (keyup.enter)=\"loadEmbedItems()\"\n />\n </nz-input-group>\n <ng-template #embedSearchSuffix>\n <nz-icon nzType=\"search\" class=\"cursor-pointer\" (click)=\"loadEmbedItems()\"></nz-icon>\n </ng-template>\n\n <input #embedFileInput type=\"file\" multiple hidden (change)=\"onEmbedUploadSelected($event)\" />\n @if (!readonly) {\n <button nz-button nzType=\"primary\" nzSize=\"small\" (click)=\"embedFileInput.click()\">\n <nz-icon nzType=\"cloud-upload\"></nz-icon> T\u1EA3i l\u00EAn\n </button>\n\n <button nz-button nzType=\"default\" nzSize=\"small\" (click)=\"openCreateSubFolder()\">\n <nz-icon nzType=\"folder-add\"></nz-icon> T\u1EA1o th\u01B0 m\u1EE5c con\n </button>\n\n <button nz-button nzType=\"dashed\" nzSize=\"small\" (click)=\"pickerDrawerVisible = true\">\n <nz-icon nzType=\"link\"></nz-icon> \u0110\u00EDnh k\u00E8m t\u1EEB Drive\n </button>\n }\n\n @if (recordRootFolder() && !readonly) {\n <button\n nz-button\n nzType=\"default\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"Ph\u00E2n quy\u1EC1n th\u01B0 m\u1EE5c h\u1ED3 s\u01A1\"\n (click)=\"openShare(recordRootFolder()!)\"\n >\n <nz-icon nzType=\"share-alt\"></nz-icon>\n </button>\n }\n\n <button nz-button nzType=\"default\" nzSize=\"small\" (click)=\"loadEmbedItems()\" nz-tooltip nzTooltipTitle=\"L\u00E0m m\u1EDBi\">\n <nz-icon nzType=\"reload\"></nz-icon>\n </button>\n </div>\n </div>\n\n <!-- B\u1EA2NG D\u1EEE LI\u1EC6U T\u1EACP TIN & TH\u01AF M\u1EE4C CON -->\n <nz-table #embedTable [nzData]=\"items()\" [nzLoading]=\"loading()\" nzSize=\"small\" [nzBordered]=\"true\" [nzPageSize]=\"15\">\n <thead>\n <tr>\n <th nzWidth=\"44px\" class=\"text-center\">#</th>\n <th>T\u00EAn th\u01B0 m\u1EE5c / T\u00E0i li\u1EC7u</th>\n <th nzWidth=\"135px\">Ng\u01B0\u1EDDi t\u1EA1o</th>\n <th nzWidth=\"105px\" class=\"text-right\">K\u00EDch th\u01B0\u1EDBc</th>\n <th nzWidth=\"135px\" class=\"text-center\">C\u1EADp nh\u1EADt</th>\n <th nzWidth=\"145px\" class=\"text-center\">Thao t\u00E1c</th>\n </tr>\n </thead>\n <tbody>\n @for (item of embedTable.data; track item.Id; let i = $index) {\n <tr class=\"drive-row\" (dblclick)=\"onItemClick(item)\">\n <td class=\"text-center\">{{ i + 1 }}</td>\n <td>\n <div nz-flex nzAlign=\"center\" [nzGap]=\"8\">\n <nz-icon\n [nzType]=\"isFolder(item) ? 'folder-fill' : getFileIcon(item)\"\n [style.color]=\"isFolder(item) ? '#f59e0b' : 'var(--primary-color, #1890ff)'\"\n style=\"font-size: 18px\"\n ></nz-icon>\n <span class=\"link-detail\" style=\"font-weight: 500\" (click)=\"onItemClick(item)\">{{ item.Name }}</span>\n @if (item.NodeType === DriveNodeType.Shortcut) {\n <nz-tag nzColor=\"purple\">L\u1ED1i t\u1EAFt</nz-tag>\n }\n </div>\n </td>\n <td>{{ item.OwnerName || item.OwnerId }}</td>\n <td class=\"text-right\">{{ isFolder(item) ? \"\u2014\" : (item.SizeBytes | formatBytes) }}</td>\n <td class=\"text-center\">{{ item.UpdatedDate | date: \"dd/MM/yyyy HH:mm\" }}</td>\n <td class=\"text-center\">\n <div nz-flex nzJustify=\"center\" [nzGap]=\"4\">\n @if (!isFolder(item)) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"Xem tr\u01B0\u1EDBc\"\n (click)=\"previewFile(item)\"\n >\n <nz-icon nzType=\"eye\"></nz-icon>\n </button>\n @if (item.CanDownload) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"T\u1EA3i xu\u1ED1ng\"\n (click)=\"downloadFile(item)\"\n >\n <nz-icon nzType=\"download\"></nz-icon>\n </button>\n }\n @if (!readonly && item.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"L\u1ECBch s\u1EED phi\u00EAn b\u1EA3n\"\n (click)=\"openVersion(item)\"\n >\n <nz-icon nzType=\"history\"></nz-icon>\n </button>\n }\n }\n @if (!readonly && (item.CanShare || item.EffectiveAccess >= DriveAccessLevel.Manager)) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"Ph\u00E2n quy\u1EC1n & Chia s\u1EBB\"\n (click)=\"openShare(item)\"\n >\n <nz-icon nzType=\"share-alt\"></nz-icon>\n </button>\n }\n @if (!readonly && item.EffectiveAccess >= DriveAccessLevel.Editor) {\n <button\n type=\"button\"\n nz-button\n nzType=\"text\"\n nzDanger\n nzSize=\"small\"\n nz-tooltip\n nzTooltipTitle=\"X\u00F3a / G\u1EE1 kh\u1ECFi h\u1ED3 s\u01A1\"\n (click)=\"deleteOrDetachItem(item)\"\n >\n <nz-icon nzType=\"delete\"></nz-icon>\n </button>\n }\n </div>\n </td>\n </tr>\n }\n </tbody>\n </nz-table>\n</div>\n\n<!-- DRAWER T\u1EA0O TH\u01AF M\u1EE4C CON -->\n<nz-drawer\n [nzVisible]=\"subFolderDrawerVisible\"\n nzPlacement=\"right\"\n [nzWidth]=\"420\"\n nzTitle=\"T\u1EA1o th\u01B0 m\u1EE5c con trong h\u1ED3 s\u01A1\"\n (nzOnClose)=\"subFolderDrawerVisible = false\"\n>\n <ng-container *nzDrawerContent>\n <div nz-flex nzVertical [nzGap]=\"12\">\n <label style=\"font-weight: 600\">T\u00EAn th\u01B0 m\u1EE5c con</label>\n <input\n nz-input\n [(ngModel)]=\"newSubFolderName\"\n [appAutoFocus]=\"subFolderDrawerVisible\"\n placeholder=\"Nh\u1EADp t\u00EAn th\u01B0 m\u1EE5c con...\"\n (keyup.enter)=\"submitCreateSubFolder()\"\n />\n <div nz-flex nzJustify=\"end\" [nzGap]=\"8\" style=\"margin-top: 8px\">\n <button nz-button nzType=\"default\" (click)=\"subFolderDrawerVisible = false\">H\u1EE7y</button>\n <button nz-button nzType=\"primary\" (click)=\"submitCreateSubFolder()\">\n <nz-icon nzType=\"check\"></nz-icon> T\u1EA1o th\u01B0 m\u1EE5c\n </button>\n </div>\n </div>\n </ng-container>\n</nz-drawer>\n\n<!-- DRAWER \u0110\u00CDNH K\u00C8M T\u1EEA DRIVE -->\n<nz-drawer\n [nzVisible]=\"pickerDrawerVisible\"\n nzPlacement=\"right\"\n [nzWidth]=\"820\"\n nzTitle=\"\u0110\u00EDnh k\u00E8m t\u00E0i li\u1EC7u / th\u01B0 m\u1EE5c t\u1EEB Drive v\u00E0o H\u1ED3 s\u01A1\"\n (nzOnClose)=\"pickerDrawerVisible = false\"\n>\n <ng-container *nzDrawerContent>\n <lib-drive-picker\n [selectMode]=\"'both'\"\n [multiple]=\"true\"\n (confirmed)=\"onAttachFromDrive($event)\"\n (cancelled)=\"pickerDrawerVisible = false\"\n ></lib-drive-picker>\n </ng-container>\n</nz-drawer>\n\n<!-- DRAWER XEM TR\u1EF0C TUY\u1EBEN -->\n<nz-drawer\n [nzVisible]=\"previewDrawerVisible\"\n nzPlacement=\"right\"\n [nzWidth]=\"'72vw'\"\n [nzTitle]=\"previewTitle\"\n (nzOnClose)=\"previewDrawerVisible = false\"\n>\n <ng-container *nzDrawerContent>\n <extend-view-file-content [previewType]=\"previewType\" [previewContent]=\"previewContent\"></extend-view-file-content>\n </ng-container>\n</nz-drawer>\n\n<!-- DRAWER L\u1ECACH S\u1EEC PHI\u00CAN B\u1EA2N -->\n<nz-drawer\n [nzVisible]=\"versionDrawerVisible\"\n nzPlacement=\"right\"\n [nzWidth]=\"740\"\n [nzTitle]=\"'L\u1ECBch s\u1EED phi\u00EAn b\u1EA3n: ' + (activeNode()?.Name || '')\"\n (nzOnClose)=\"versionDrawerVisible = false\"\n>\n <ng-container *nzDrawerContent>\n @if (activeNode(); as node) {\n <lib-drive-version-modal\n [nodeId]=\"node.ShortcutTargetId || node.Id\"\n [nodeName]=\"node.Name\"\n [canEdit]=\"!readonly\"\n [canDownload]=\"node.CanDownload\"\n (closed)=\"versionDrawerVisible = false; loadEmbedItems()\"\n ></lib-drive-version-modal>\n }\n </ng-container>\n</nz-drawer>\n\n<!-- DRAWER CHIA S\u1EBA & PH\u00C2N QUY\u1EC0N -->\n<nz-drawer\n [nzVisible]=\"shareDrawerVisible\"\n nzPlacement=\"right\"\n [nzWidth]=\"820\"\n [nzTitle]=\"'Chia s\u1EBB & Ph\u00E2n quy\u1EC1n: ' + (activeNode()?.Name || '')\"\n (nzOnClose)=\"shareDrawerVisible = false\"\n>\n <ng-container *nzDrawerContent>\n @if (activeNode(); as node) {\n <lib-drive-share-modal [nodeId]=\"node.ShortcutTargetId || node.Id\"></lib-drive-share-modal>\n }\n </ng-container>\n</nz-drawer>\n", styles: [".drive-embed-shell{border:1px solid var(--app-border, #e2e8f0);border-radius:8px;padding:14px;background:var(--app-container-bg, #ffffff);display:flex;flex-direction:column;gap:12px}.embed-toolbar{padding-bottom:10px;border-bottom:1px solid var(--app-border, #f1f5f9)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$1.DatePipe, name: "date" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: NzFlexModule }, { kind: "directive", type: i3$3.NzFlexDirective, selector: "[nz-flex],nz-flex", inputs: ["nzVertical", "nzJustify", "nzAlign", "nzGap", "nzWrap", "nzFlex"], exportAs: ["nzFlex"] }, { kind: "ngmodule", type: NzTableModule }, { kind: "component", type: i6.NzTableComponent, selector: "nz-table", inputs: ["nzTableLayout", "nzShowTotal", "nzItemRender", "nzTitle", "nzFooter", "nzNoResult", "nzPageSizeOptions", "nzVirtualItemSize", "nzVirtualMaxBufferPx", "nzVirtualMinBufferPx", "nzVirtualForTrackBy", "nzLoadingDelay", "nzPageIndex", "nzPageSize", "nzTotal", "nzWidthConfig", "nzData", "nzCustomColumn", "nzPaginationPosition", "nzScroll", "noDataVirtualHeight", "nzPaginationType", "nzFrontPagination", "nzTemplateMode", "nzShowPagination", "nzLoading", "nzOuterBordered", "nzLoadingIndicator", "nzBordered", "nzSize", "nzShowSizeChanger", "nzHideOnSinglePage", "nzShowQuickJumper", "nzSimple"], outputs: ["nzPageSizeChange", "nzPageIndexChange", "nzQueryParams", "nzCurrentPageDataChange", "nzCustomColumnChange"], exportAs: ["nzTable"] }, { kind: "directive", type: i6.NzTableCellDirective, selector: "th:not(.nz-disable-th):not([mat-cell]), td:not(.nz-disable-td):not([mat-cell])" }, { kind: "directive", type: i6.NzThMeasureDirective, selector: "th", inputs: ["nzWidth", "colspan", "colSpan", "rowspan", "rowSpan"] }, { kind: "component", type: i6.NzTheadComponent, selector: "thead:not(.ant-table-thead)", outputs: ["nzSortOrderChange"] }, { kind: "component", type: i6.NzTbodyComponent, selector: "tbody" }, { kind: "directive", type: i6.NzTrDirective, selector: "tr:not([mat-row]):not([mat-header-row]):not([nz-table-measure-row]):not([nzExpand]):not([nz-table-fixed-row])" }, { 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$1.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i1$2.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: NzInputModule }, { kind: "directive", type: i12.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzBorderless", "nzSize", "nzStepperless", "nzStatus", "disabled"], exportAs: ["nzInput"] }, { kind: "component", type: i12.NzInputGroupComponent, selector: "nz-input-group", inputs: ["nzAddOnBeforeIcon", "nzAddOnAfterIcon", "nzPrefixIcon", "nzSuffixIcon", "nzAddOnBefore", "nzAddOnAfter", "nzPrefix", "nzStatus", "nzSuffix", "nzSize", "nzSearch", "nzCompact"], exportAs: ["nzInputGroup"] }, { kind: "directive", type: i12.NzInputGroupWhitSuffixOrPrefixDirective, selector: "nz-input-group[nzSuffix], nz-input-group[nzPrefix]" }, { kind: "ngmodule", type: NzBreadCrumbModule }, { kind: "component", type: i10.NzBreadCrumbComponent, selector: "nz-breadcrumb", inputs: ["nzAutoGenerate", "nzSeparator", "nzRouteLabel", "nzRouteLabelFn", "nzRouteFn"], exportAs: ["nzBreadcrumb"] }, { kind: "component", type: i10.NzBreadCrumbItemComponent, selector: "nz-breadcrumb-item", inputs: ["nzOverlay"], exportAs: ["nzBreadcrumbItem"] }, { kind: "ngmodule", type: NzTagModule }, { kind: "component", type: i11.NzTagComponent, selector: "nz-tag", inputs: ["nzMode", "nzColor", "nzChecked", "nzBordered"], outputs: ["nzOnClose", "nzCheckedChange"], exportAs: ["nzTag"] }, { kind: "ngmodule", type: NzToolTipModule }, { kind: "directive", type: i12$1.NzTooltipDirective, selector: "[nz-tooltip]", inputs: ["nzTooltipTitle", "nzTooltipTitleContext", "nz-tooltip", "nzTooltipTrigger", "nzTooltipPlacement", "nzTooltipOrigin", "nzTooltipVisible", "nzTooltipMouseEnterDelay", "nzTooltipMouseLeaveDelay", "nzTooltipOverlayClassName", "nzTooltipOverlayStyle", "nzTooltipArrowPointAtCenter", "cdkConnectedOverlayPush", "nzTooltipColor"], outputs: ["nzTooltipVisibleChange"], exportAs: ["nzTooltip"] }, { kind: "ngmodule", type: NzDrawerModule }, { kind: "component", type: i14.NzDrawerComponent, selector: "nz-drawer", inputs: ["nzContent", "nzCloseIcon", "nzClosable", "nzMaskClosable", "nzMask", "nzCloseOnNavigation", "nzNoAnimation", "nzKeyboard", "nzTitle", "nzExtra", "nzFooter", "nzPlacement", "nzSize", "nzMaskStyle", "nzBodyStyle", "nzWrapClassName", "nzWidth", "nzHeight", "nzZIndex", "nzOffsetX", "nzOffsetY", "nzVisible"], outputs: ["nzOnViewInit", "nzOnClose", "nzVisibleChange"], exportAs: ["nzDrawer"] }, { kind: "directive", type: i14.NzDrawerContentDirective, selector: "[nzDrawerContent]", exportAs: ["nzDrawerContent"] }, { kind: "ngmodule", type: NzCheckboxModule }, { kind: "pipe", type: FormatBytesPipe, name: "formatBytes" }, { kind: "directive", type: AutoFocusDirective, selector: "[appAutoFocus]", inputs: ["appAutoFocus"] }, { kind: "component", type: ExtendViewFileContentComponent, selector: "extend-view-file-content", inputs: ["previewType", "previewContent"] }, { kind: "component", type: DriveShareModalComponent, selector: "lib-drive-share-modal", inputs: ["nodeId"] }, { kind: "component", type: DriveVersionModalComponent, selector: "lib-drive-version-modal", inputs: ["nodeId", "nodeName", "canEdit", "canDownload"], outputs: ["closed"] }, { kind: "component", type: DrivePickerComponent, selector: "lib-drive-picker", inputs: ["selectMode", "multiple", "acceptExtensions", "allowUploadNew", "initialScope"], outputs: ["confirmed", "cancelled"] }] });
29243
30117
  }
29244
30118
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: DriveFolderEmbedComponent, decorators: [{
29245
30119
  type: Component,
@@ -29279,6 +30153,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImpor
29279
30153
  type: Input
29280
30154
  }], readonly: [{
29281
30155
  type: Input
30156
+ }], templateCode: [{
30157
+ type: Input
30158
+ }], templateId: [{
30159
+ type: Input
29282
30160
  }] } });
29283
30161
 
29284
30162
  /**