@masterteam/delegations 0.0.28 → 0.0.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@masterteam/delegations",
3
- "version": "0.0.28",
3
+ "version": "0.0.29",
4
4
  "publishConfig": {
5
5
  "directory": "../../../dist/masterteam/delegations",
6
6
  "linkDirectory": false,
@@ -1,10 +1,11 @@
1
1
  import * as _masterteam_components_entities from '@masterteam/components/entities';
2
+ import { EntityUserValue } from '@masterteam/components/entities';
2
3
  import * as _masterteam_delegations from '@masterteam/delegations';
3
4
  import * as _angular_core from '@angular/core';
4
- import { OnInit, TemplateRef } from '@angular/core';
5
+ import { OnInit } from '@angular/core';
5
6
  import { Popover } from 'primeng/popover';
6
7
  import { PageHeaderTab } from '@masterteam/components/page-header';
7
- import { TableAction, ColumnDef } from '@masterteam/components/table';
8
+ import { TableAction, TableStatusMapValue, ColumnDef } from '@masterteam/components/table';
8
9
  import { FormControl } from '@angular/forms';
9
10
  import { HttpContext, HttpInterceptorFn } from '@angular/common/http';
10
11
  import { DynamicFormConfig } from '@masterteam/components';
@@ -334,7 +335,7 @@ declare class TopbarDelegationMenu implements OnInit {
334
335
  protected readonly onBehalfOf: _angular_core.Signal<_masterteam_delegations.DelegationParty | null>;
335
336
  protected readonly executedBy: _angular_core.Signal<_masterteam_delegations.DelegationParty | null>;
336
337
  private readonly promptShown;
337
- protected readonly mode: _angular_core.Signal<"hidden" | "candidates" | "active">;
338
+ protected readonly mode: _angular_core.Signal<"active" | "candidates" | "hidden">;
338
339
  constructor();
339
340
  ngOnInit(): void;
340
341
  protected formatScopeSummary(summary: DelegationRow['scopeSummary']): string;
@@ -374,7 +375,7 @@ declare class StartSessionDialog {
374
375
  private readonly transloco;
375
376
  protected readonly isBusy: _angular_core.Signal<boolean>;
376
377
  protected readonly bodyKey: _angular_core.Signal<"delegations.session.switchConfirmBody" | "delegations.session.startConfirmBody">;
377
- protected readonly confirmLabelKey: _angular_core.Signal<"delegations.action.switchSession" | "delegations.action.startSession">;
378
+ protected readonly confirmLabelKey: _angular_core.Signal<"delegations.action.startSession" | "delegations.action.switchSession">;
378
379
  protected readonly successMessageKey: _angular_core.Signal<"delegations.session.switched" | "delegations.session.started">;
379
380
  protected formatScopeSummary(summary: DelegationRow['scopeSummary']): string;
380
381
  protected userEntity(party: DelegationRow['delegator']): _masterteam_components_entities.EntityData;
@@ -422,7 +423,15 @@ declare class Delegations implements OnInit {
422
423
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<Delegations, "mt-delegations", never, {}, {}, never, never, true, never>;
423
424
  }
424
425
 
426
+ declare function toDelegationUserValue(party: DelegationParty | null | undefined): EntityUserValue;
427
+
425
428
  type DelegationTab = 'my' | 'assigned' | 'approvals';
429
+ type DelegationTableRow = DelegationRow & {
430
+ listedUser: ReturnType<typeof toDelegationUserValue>;
431
+ delegatorUser: ReturnType<typeof toDelegationUserValue>;
432
+ delegatedToUser: ReturnType<typeof toDelegationUserValue>;
433
+ daysText: string;
434
+ };
426
435
  /**
427
436
  * Delegations portal page (doc 02, 09): two lists — My Delegations (current user
428
437
  * is delegator) and Delegated To Me (current user is delegate). Rows render only
@@ -482,14 +491,12 @@ declare class DelegationsList implements OnInit {
482
491
  }[]>;
483
492
  protected readonly isLoading: _angular_core.Signal<boolean>;
484
493
  protected readonly rows: _angular_core.Signal<DelegationRow[]>;
494
+ protected readonly tableRows: _angular_core.Signal<DelegationTableRow[]>;
485
495
  protected readonly emptyStateKey: _angular_core.Signal<string>;
486
- statusCol: _angular_core.Signal<TemplateRef<unknown>>;
487
- userCol: _angular_core.Signal<TemplateRef<unknown>>;
488
- delegatorCol: _angular_core.Signal<TemplateRef<unknown>>;
489
- delegatedUserCol: _angular_core.Signal<TemplateRef<unknown>>;
490
- daysCol: _angular_core.Signal<TemplateRef<unknown>>;
491
496
  protected readonly tableActions: _angular_core.Signal<TableAction[]>;
492
497
  protected readonly rowActions: _angular_core.WritableSignal<TableAction[]>;
498
+ private readonly statusColors;
499
+ protected readonly statusMap: _angular_core.WritableSignal<Record<DelegationEffectiveStatus, TableStatusMapValue>>;
493
500
  protected readonly tableColumns: _angular_core.WritableSignal<ColumnDef[]>;
494
501
  private readonly busyIds;
495
502
  private readonly weekdayKeys;
@@ -500,8 +507,7 @@ declare class DelegationsList implements OnInit {
500
507
  private reloadCurrentTab;
501
508
  protected has(row: DelegationRow, action: DelegationAllowedAction): boolean;
502
509
  protected formatDays(row: DelegationRow): string;
503
- protected getListedParty(row: DelegationRow): DelegationParty;
504
- protected userEntity(party: DelegationParty | null | undefined): _masterteam_components_entities.EntityData;
510
+ protected getListedParty(row: DelegationRow): _masterteam_delegations.DelegationParty;
505
511
  private viewDetails;
506
512
  private openForm;
507
513
  private approve;