@memberjunction/ng-dashboards 6.2.0-edge.5 → 6.2.0-edge.6

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.
Files changed (143) hide show
  1. package/README.md +28 -0
  2. package/dist/AI/components/autotagging/autotagging-pipeline-resource.component.d.ts +1 -1
  3. package/dist/AI/components/autotagging/autotagging-pipeline-resource.component.d.ts.map +1 -1
  4. package/dist/AI/components/autotagging/autotagging-pipeline-resource.component.js +15 -7
  5. package/dist/AI/components/autotagging/autotagging-pipeline-resource.component.js.map +1 -1
  6. package/dist/AI/components/duplicates/duplicate-detection-resource.component.d.ts +7 -1
  7. package/dist/AI/components/duplicates/duplicate-detection-resource.component.d.ts.map +1 -1
  8. package/dist/AI/components/duplicates/duplicate-detection-resource.component.js +209 -57
  9. package/dist/AI/components/duplicates/duplicate-detection-resource.component.js.map +1 -1
  10. package/dist/AI/components/duplicates/duplicate-detection-run-scope.d.ts +12 -11
  11. package/dist/AI/components/duplicates/duplicate-detection-run-scope.d.ts.map +1 -1
  12. package/dist/AI/components/duplicates/duplicate-detection-run-scope.js +15 -15
  13. package/dist/AI/components/duplicates/duplicate-detection-run-scope.js.map +1 -1
  14. package/dist/AI/components/execution-monitoring.component.d.ts.map +1 -1
  15. package/dist/AI/components/execution-monitoring.component.js +28 -16
  16. package/dist/AI/components/execution-monitoring.component.js.map +1 -1
  17. package/dist/AI/components/prompts/model-prompt-priority-matrix.component.d.ts +1 -0
  18. package/dist/AI/components/prompts/model-prompt-priority-matrix.component.d.ts.map +1 -1
  19. package/dist/AI/components/prompts/model-prompt-priority-matrix.component.js +30 -6
  20. package/dist/AI/components/prompts/model-prompt-priority-matrix.component.js.map +1 -1
  21. package/dist/AI/components/tags/tags-resource.component.d.ts +1 -1
  22. package/dist/AI/components/tags/tags-resource.component.d.ts.map +1 -1
  23. package/dist/AI/components/tags/tags-resource.component.js +15 -7
  24. package/dist/AI/components/tags/tags-resource.component.js.map +1 -1
  25. package/dist/AI/components/vectors/sensitive-fields.d.ts +9 -4
  26. package/dist/AI/components/vectors/sensitive-fields.d.ts.map +1 -1
  27. package/dist/AI/components/vectors/sensitive-fields.js +39 -14
  28. package/dist/AI/components/vectors/sensitive-fields.js.map +1 -1
  29. package/dist/AI/components/vectors/vector-document-rules.d.ts +13 -0
  30. package/dist/AI/components/vectors/vector-document-rules.d.ts.map +1 -1
  31. package/dist/AI/components/vectors/vector-document-rules.js +14 -0
  32. package/dist/AI/components/vectors/vector-document-rules.js.map +1 -1
  33. package/dist/AI/components/vectors/vector-management-resource.component.d.ts +34 -14
  34. package/dist/AI/components/vectors/vector-management-resource.component.d.ts.map +1 -1
  35. package/dist/AI/components/vectors/vector-management-resource.component.js +127 -50
  36. package/dist/AI/components/vectors/vector-management-resource.component.js.map +1 -1
  37. package/dist/AI/components/vectors/vector-store-selection.d.ts +32 -0
  38. package/dist/AI/components/vectors/vector-store-selection.d.ts.map +1 -0
  39. package/dist/AI/components/vectors/vector-store-selection.js +57 -0
  40. package/dist/AI/components/vectors/vector-store-selection.js.map +1 -0
  41. package/dist/ChiefOfStaff/chief-of-staff-agent-context.d.ts +236 -0
  42. package/dist/ChiefOfStaff/chief-of-staff-agent-context.d.ts.map +1 -0
  43. package/dist/ChiefOfStaff/chief-of-staff-agent-context.js +374 -0
  44. package/dist/ChiefOfStaff/chief-of-staff-agent-context.js.map +1 -0
  45. package/dist/ChiefOfStaff/chief-of-staff-dashboard.component.d.ts +195 -0
  46. package/dist/ChiefOfStaff/chief-of-staff-dashboard.component.d.ts.map +1 -0
  47. package/dist/ChiefOfStaff/chief-of-staff-dashboard.component.js +2910 -0
  48. package/dist/ChiefOfStaff/chief-of-staff-dashboard.component.js.map +1 -0
  49. package/dist/ChiefOfStaff/index.d.ts +3 -0
  50. package/dist/ChiefOfStaff/index.d.ts.map +1 -0
  51. package/dist/ChiefOfStaff/index.js +3 -0
  52. package/dist/ChiefOfStaff/index.js.map +1 -0
  53. package/dist/Communication/communication-logs-resource.component.d.ts.map +1 -1
  54. package/dist/Communication/communication-logs-resource.component.js +2 -1
  55. package/dist/Communication/communication-logs-resource.component.js.map +1 -1
  56. package/dist/Communication/communication-monitor-resource.component.d.ts.map +1 -1
  57. package/dist/Communication/communication-monitor-resource.component.js +23 -18
  58. package/dist/Communication/communication-monitor-resource.component.js.map +1 -1
  59. package/dist/Communication/communication-runs-resource.component.d.ts.map +1 -1
  60. package/dist/Communication/communication-runs-resource.component.js +11 -10
  61. package/dist/Communication/communication-runs-resource.component.js.map +1 -1
  62. package/dist/DashboardEditor/dashboard-editor.component.d.ts +17 -2
  63. package/dist/DashboardEditor/dashboard-editor.component.d.ts.map +1 -1
  64. package/dist/DashboardEditor/dashboard-editor.component.js +94 -43
  65. package/dist/DashboardEditor/dashboard-editor.component.js.map +1 -1
  66. package/dist/DataExplorer/data-explorer-dashboard.component.d.ts +24 -0
  67. package/dist/DataExplorer/data-explorer-dashboard.component.d.ts.map +1 -1
  68. package/dist/DataExplorer/data-explorer-dashboard.component.js +146 -50
  69. package/dist/DataExplorer/data-explorer-dashboard.component.js.map +1 -1
  70. package/dist/DataExplorer/models/explorer-state.interface.d.ts +2 -0
  71. package/dist/DataExplorer/models/explorer-state.interface.d.ts.map +1 -1
  72. package/dist/DataExplorer/models/explorer-state.interface.js.map +1 -1
  73. package/dist/LoginStudio/login-studio-resource.component.d.ts +10 -2
  74. package/dist/LoginStudio/login-studio-resource.component.d.ts.map +1 -1
  75. package/dist/LoginStudio/login-studio-resource.component.js +110 -77
  76. package/dist/LoginStudio/login-studio-resource.component.js.map +1 -1
  77. package/dist/MCP/mcp-dashboard.component.d.ts +24 -4
  78. package/dist/MCP/mcp-dashboard.component.d.ts.map +1 -1
  79. package/dist/MCP/mcp-dashboard.component.js +118 -65
  80. package/dist/MCP/mcp-dashboard.component.js.map +1 -1
  81. package/dist/PredictiveStudio/business-predictions.view-models.d.ts +1 -1
  82. package/dist/PredictiveStudio/business-predictions.view-models.d.ts.map +1 -1
  83. package/dist/PredictiveStudio/business-predictions.view-models.js +3 -3
  84. package/dist/PredictiveStudio/business-predictions.view-models.js.map +1 -1
  85. package/dist/PredictiveStudio/components/ps-experiments.component.d.ts +6 -63
  86. package/dist/PredictiveStudio/components/ps-experiments.component.d.ts.map +1 -1
  87. package/dist/PredictiveStudio/components/ps-experiments.component.js +256 -521
  88. package/dist/PredictiveStudio/components/ps-experiments.component.js.map +1 -1
  89. package/dist/PredictiveStudio/components/ps-pipeline-wizard.component.d.ts +0 -18
  90. package/dist/PredictiveStudio/components/ps-pipeline-wizard.component.d.ts.map +1 -1
  91. package/dist/PredictiveStudio/components/ps-pipeline-wizard.component.js +122 -249
  92. package/dist/PredictiveStudio/components/ps-pipeline-wizard.component.js.map +1 -1
  93. package/dist/PredictiveStudio/components/ps-pipelines.component.d.ts +5 -9
  94. package/dist/PredictiveStudio/components/ps-pipelines.component.d.ts.map +1 -1
  95. package/dist/PredictiveStudio/components/ps-pipelines.component.js +98 -130
  96. package/dist/PredictiveStudio/components/ps-pipelines.component.js.map +1 -1
  97. package/dist/PredictiveStudio/components/ps-predictions-grid.component.d.ts +53 -4
  98. package/dist/PredictiveStudio/components/ps-predictions-grid.component.d.ts.map +1 -1
  99. package/dist/PredictiveStudio/components/ps-predictions-grid.component.js +335 -326
  100. package/dist/PredictiveStudio/components/ps-predictions-grid.component.js.map +1 -1
  101. package/dist/PredictiveStudio/components/ps-row-drivers.component.d.ts +19 -0
  102. package/dist/PredictiveStudio/components/ps-row-drivers.component.d.ts.map +1 -0
  103. package/dist/PredictiveStudio/components/ps-row-drivers.component.js +85 -0
  104. package/dist/PredictiveStudio/components/ps-row-drivers.component.js.map +1 -0
  105. package/dist/PredictiveStudio/engine/predictive-studio.engine.d.ts +19 -1
  106. package/dist/PredictiveStudio/engine/predictive-studio.engine.d.ts.map +1 -1
  107. package/dist/PredictiveStudio/engine/predictive-studio.engine.js +51 -2
  108. package/dist/PredictiveStudio/engine/predictive-studio.engine.js.map +1 -1
  109. package/dist/PredictiveStudio/predictive-studio-agent-context.d.ts +3 -1
  110. package/dist/PredictiveStudio/predictive-studio-agent-context.d.ts.map +1 -1
  111. package/dist/PredictiveStudio/predictive-studio-agent-context.js +3 -0
  112. package/dist/PredictiveStudio/predictive-studio-agent-context.js.map +1 -1
  113. package/dist/PredictiveStudio/predictive-studio-score-history.service.d.ts +27 -4
  114. package/dist/PredictiveStudio/predictive-studio-score-history.service.d.ts.map +1 -1
  115. package/dist/PredictiveStudio/predictive-studio-score-history.service.js +94 -61
  116. package/dist/PredictiveStudio/predictive-studio-score-history.service.js.map +1 -1
  117. package/dist/PredictiveStudio/resources/ps-predictions-resource.component.d.ts +29 -5
  118. package/dist/PredictiveStudio/resources/ps-predictions-resource.component.d.ts.map +1 -1
  119. package/dist/PredictiveStudio/resources/ps-predictions-resource.component.js +185 -103
  120. package/dist/PredictiveStudio/resources/ps-predictions-resource.component.js.map +1 -1
  121. package/dist/PredictiveStudio/resources/ps-studio-resource.component.js +1 -1
  122. package/dist/PredictiveStudio/resources/ps-studio-resource.component.js.map +1 -1
  123. package/dist/ai-dashboards.module.d.ts +22 -21
  124. package/dist/ai-dashboards.module.d.ts.map +1 -1
  125. package/dist/ai-dashboards.module.js +8 -2
  126. package/dist/ai-dashboards.module.js.map +1 -1
  127. package/dist/public-api.d.ts +2 -0
  128. package/dist/public-api.d.ts.map +1 -1
  129. package/dist/public-api.js +3 -0
  130. package/dist/public-api.js.map +1 -1
  131. package/package.json +71 -71
  132. package/dist/PredictiveStudio/at-risk.view-models.d.ts +0 -120
  133. package/dist/PredictiveStudio/at-risk.view-models.d.ts.map +0 -1
  134. package/dist/PredictiveStudio/at-risk.view-models.js +0 -261
  135. package/dist/PredictiveStudio/at-risk.view-models.js.map +0 -1
  136. package/dist/PredictiveStudio/components/ps-confirm-modal.component.d.ts +0 -109
  137. package/dist/PredictiveStudio/components/ps-confirm-modal.component.d.ts.map +0 -1
  138. package/dist/PredictiveStudio/components/ps-confirm-modal.component.js +0 -323
  139. package/dist/PredictiveStudio/components/ps-confirm-modal.component.js.map +0 -1
  140. package/dist/PredictiveStudio/components/ps-run-experiment-modal.component.d.ts +0 -137
  141. package/dist/PredictiveStudio/components/ps-run-experiment-modal.component.d.ts.map +0 -1
  142. package/dist/PredictiveStudio/components/ps-run-experiment-modal.component.js +0 -826
  143. package/dist/PredictiveStudio/components/ps-run-experiment-modal.component.js.map +0 -1
@@ -0,0 +1,2910 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, inject, } from '@angular/core';
8
+ import { Subject } from 'rxjs';
9
+ import { filter, takeUntil } from 'rxjs/operators';
10
+ import { CompositeKey, LogError, RunView } from '@memberjunction/core';
11
+ import { RegisterClass, UUIDsEqual, UUIDSet, MJGlobal } from '@memberjunction/global';
12
+ import { GraphQLActionClient } from '@memberjunction/graphql-dataprovider';
13
+ import { BaseResourceComponent } from '@memberjunction/ng-shared';
14
+ import { BaseFormComponent } from '@memberjunction/ng-base-forms';
15
+ import { AIEngineBase } from '@memberjunction/ai-engine-base';
16
+ import { BuildTaskRecordKey, BuildChiefOfStaffAgentContext, BuildCockpitScopeFilters, CalculateChiefOfStaffMetrics, CHIEF_OF_STAFF_AGENT_NAME, GetTaskPriorityClass, IsApprovalRequest, ResolvePersonTaskScope, ResolvePriorityObjectiveByIDOrName, VALID_CHIEF_OF_STAFF_TABS, VALID_HEALTH_FILTERS, ValidateChiefOfStaffTabParam, ValidateHealthFilterParam, ValidateSearchQueryParam, } from './chief-of-staff-agent-context';
17
+ import * as i0 from "@angular/core";
18
+ import * as i1 from "@angular/forms";
19
+ import * as i2 from "@memberjunction/ng-shared-generic";
20
+ import * as i3 from "@memberjunction/ng-agent-requests";
21
+ import * as i4 from "@memberjunction/ng-ui-components";
22
+ import * as i5 from "@angular/common";
23
+ const _forTrack0 = ($index, $item) => $item.Task.ID;
24
+ const _forTrack1 = ($index, $item) => $item.ID;
25
+ const _forTrack2 = ($index, $item) => $item.Value;
26
+ function ChiefOfStaffDashboardComponent_Conditional_4_Template(rf, ctx) { if (rf & 1) {
27
+ i0.ɵɵelement(0, "mj-stat-badge", 3);
28
+ } if (rf & 2) {
29
+ const ctx_r0 = i0.ɵɵnextContext();
30
+ i0.ɵɵproperty("Count", ctx_r0.Metrics.AtRiskCount + ctx_r0.Metrics.OffTrackCount);
31
+ } }
32
+ function ChiefOfStaffDashboardComponent_Conditional_5_Template(rf, ctx) { if (rf & 1) {
33
+ i0.ɵɵelement(0, "mj-stat-badge", 4);
34
+ } if (rf & 2) {
35
+ const ctx_r0 = i0.ɵɵnextContext();
36
+ i0.ɵɵproperty("Count", ctx_r0.Metrics.PendingApprovalCount);
37
+ } }
38
+ function ChiefOfStaffDashboardComponent_Conditional_6_Template(rf, ctx) { if (rf & 1) {
39
+ i0.ɵɵelement(0, "mj-stat-badge", 5);
40
+ } if (rf & 2) {
41
+ i0.ɵɵproperty("Count", 0);
42
+ } }
43
+ function ChiefOfStaffDashboardComponent_Conditional_12_Template(rf, ctx) { if (rf & 1) {
44
+ const _r2 = i0.ɵɵgetCurrentView();
45
+ i0.ɵɵelementStart(0, "div", 14)(1, "div", 15);
46
+ i0.ɵɵelement(2, "i", 16);
47
+ i0.ɵɵelementStart(3, "span");
48
+ i0.ɵɵtext(4);
49
+ i0.ɵɵelementEnd()();
50
+ i0.ɵɵelementStart(5, "button", 17);
51
+ i0.ɵɵlistener("click", function ChiefOfStaffDashboardComponent_Conditional_12_Template_button_click_5_listener() { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.DismissBanner()); });
52
+ i0.ɵɵelement(6, "i", 18);
53
+ i0.ɵɵelementEnd()();
54
+ } if (rf & 2) {
55
+ const ctx_r0 = i0.ɵɵnextContext();
56
+ i0.ɵɵclassProp("cos-banner--success", ctx_r0.FeedbackBanner.Type === "success")("cos-banner--error", ctx_r0.FeedbackBanner.Type === "error");
57
+ i0.ɵɵadvance(2);
58
+ i0.ɵɵclassProp("fa-circle-check", ctx_r0.FeedbackBanner.Type === "success")("fa-circle-exclamation", ctx_r0.FeedbackBanner.Type === "error");
59
+ i0.ɵɵadvance(2);
60
+ i0.ɵɵtextInterpolate(ctx_r0.FeedbackBanner.Message);
61
+ } }
62
+ function ChiefOfStaffDashboardComponent_Conditional_14_Template(rf, ctx) { if (rf & 1) {
63
+ i0.ɵɵelementStart(0, "div", 12);
64
+ i0.ɵɵelement(1, "mj-loading", 19);
65
+ i0.ɵɵelementEnd();
66
+ } }
67
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_0_Conditional_20_Template(rf, ctx) { if (rf & 1) {
68
+ i0.ɵɵtext(0);
69
+ } if (rf & 2) {
70
+ const ctx_r0 = i0.ɵɵnextContext(3);
71
+ i0.ɵɵtextInterpolate1(" Avg confidence: ", ctx_r0.Metrics.AverageConfidenceScore, "% ");
72
+ } }
73
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_0_Conditional_21_Template(rf, ctx) { if (rf & 1) {
74
+ i0.ɵɵtext(0);
75
+ } if (rf & 2) {
76
+ const ctx_r0 = i0.ɵɵnextContext(3);
77
+ i0.ɵɵtextInterpolate1(" ", ctx_r0.Metrics.CompletedPriorityCount, " completed objectives ");
78
+ } }
79
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_0_Conditional_31_Template(rf, ctx) { if (rf & 1) {
80
+ i0.ɵɵtext(0);
81
+ } if (rf & 2) {
82
+ const ctx_r0 = i0.ɵɵnextContext(3);
83
+ i0.ɵɵtextInterpolate1(" ", ctx_r0.Metrics.HighPriorityPendingCount, " high-priority awaiting decision ");
84
+ } }
85
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_0_Conditional_32_Template(rf, ctx) { if (rf & 1) {
86
+ i0.ɵɵtext(0, " All high-priority requests clear ");
87
+ } }
88
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_0_Conditional_54_Template(rf, ctx) { if (rf & 1) {
89
+ i0.ɵɵelementStart(0, "div", 40);
90
+ i0.ɵɵelement(1, "i", 27);
91
+ i0.ɵɵelementStart(2, "p");
92
+ i0.ɵɵtext(3, "No priority objectives found. Ask your Chief of Staff in chat to establish your quarterly priorities.");
93
+ i0.ɵɵelementEnd()();
94
+ } }
95
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_0_Conditional_55_For_2_Conditional_16_Template(rf, ctx) { if (rf & 1) {
96
+ i0.ɵɵelementStart(0, "span");
97
+ i0.ɵɵelement(1, "i", 53);
98
+ i0.ɵɵtext(2);
99
+ i0.ɵɵelementEnd();
100
+ } if (rf & 2) {
101
+ const card_r5 = i0.ɵɵnextContext().$implicit;
102
+ i0.ɵɵadvance(2);
103
+ i0.ɵɵtextInterpolate1(" ", card_r5.Task.CheckInCadence, " ");
104
+ } }
105
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_0_Conditional_55_For_2_Conditional_17_Template(rf, ctx) { if (rf & 1) {
106
+ i0.ɵɵelementStart(0, "span");
107
+ i0.ɵɵelement(1, "i", 54);
108
+ i0.ɵɵtext(2);
109
+ i0.ɵɵpipe(3, "date");
110
+ i0.ɵɵelementEnd();
111
+ } if (rf & 2) {
112
+ const card_r5 = i0.ɵɵnextContext().$implicit;
113
+ i0.ɵɵclassProp("cos-overdue-text", card_r5.IsOverdue);
114
+ i0.ɵɵadvance(2);
115
+ i0.ɵɵtextInterpolate1(" Due ", i0.ɵɵpipeBind2(3, 3, card_r5.Task.DueAt, "mediumDate"), " ");
116
+ } }
117
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_0_Conditional_55_For_2_Template(rf, ctx) { if (rf & 1) {
118
+ const _r4 = i0.ɵɵgetCurrentView();
119
+ i0.ɵɵelementStart(0, "div", 44);
120
+ i0.ɵɵlistener("click", function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_0_Conditional_55_For_2_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r4); const ctx_r0 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r0.OnTabChange("priorities")); });
121
+ i0.ɵɵelementStart(1, "div", 45)(2, "span", 46);
122
+ i0.ɵɵtext(3);
123
+ i0.ɵɵelementEnd();
124
+ i0.ɵɵelementStart(4, "span");
125
+ i0.ɵɵelement(5, "i");
126
+ i0.ɵɵtext(6);
127
+ i0.ɵɵelementEnd()();
128
+ i0.ɵɵelementStart(7, "div", 47)(8, "div", 48);
129
+ i0.ɵɵelement(9, "div");
130
+ i0.ɵɵelementEnd();
131
+ i0.ɵɵelementStart(10, "span", 49);
132
+ i0.ɵɵtext(11);
133
+ i0.ɵɵelementEnd()();
134
+ i0.ɵɵelementStart(12, "div", 50)(13, "span");
135
+ i0.ɵɵelement(14, "i", 51);
136
+ i0.ɵɵtext(15);
137
+ i0.ɵɵelementEnd();
138
+ i0.ɵɵconditionalCreate(16, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_0_Conditional_55_For_2_Conditional_16_Template, 3, 1, "span");
139
+ i0.ɵɵconditionalCreate(17, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_0_Conditional_55_For_2_Conditional_17_Template, 4, 6, "span", 52);
140
+ i0.ɵɵelementEnd()();
141
+ } if (rf & 2) {
142
+ const card_r5 = ctx.$implicit;
143
+ const ctx_r0 = i0.ɵɵnextContext(4);
144
+ i0.ɵɵadvance(3);
145
+ i0.ɵɵtextInterpolate(card_r5.Task.Name);
146
+ i0.ɵɵadvance();
147
+ i0.ɵɵclassMap(i0.ɵɵinterpolate1("cos-health-pill cos-health-pill--", card_r5.EffectiveHealth.toLowerCase()));
148
+ i0.ɵɵadvance();
149
+ i0.ɵɵclassMap(ctx_r0.GetHealthBadgeIcon(card_r5.EffectiveHealth));
150
+ i0.ɵɵadvance();
151
+ i0.ɵɵtextInterpolate1(" ", ctx_r0.GetHealthBadgeLabel(card_r5.EffectiveHealth), " ");
152
+ i0.ɵɵadvance(3);
153
+ i0.ɵɵclassMap(i0.ɵɵinterpolate1("cos-progress-bar__fill cos-progress-bar__fill--", card_r5.EffectiveHealth.toLowerCase()));
154
+ i0.ɵɵstyleProp("width", card_r5.EffectivePercentComplete, "%");
155
+ i0.ɵɵadvance(2);
156
+ i0.ɵɵtextInterpolate1("", card_r5.EffectivePercentComplete, "%");
157
+ i0.ɵɵadvance(4);
158
+ i0.ɵɵtextInterpolate2(" ", card_r5.CompletedSubtaskCount, "/", card_r5.Subtasks.length, " milestones ");
159
+ i0.ɵɵadvance();
160
+ i0.ɵɵconditional(card_r5.Task.CheckInCadence ? 16 : -1);
161
+ i0.ɵɵadvance();
162
+ i0.ɵɵconditional(card_r5.Task.DueAt ? 17 : -1);
163
+ } }
164
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_0_Conditional_55_Template(rf, ctx) { if (rf & 1) {
165
+ i0.ɵɵelementStart(0, "div", 41);
166
+ i0.ɵɵrepeaterCreate(1, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_0_Conditional_55_For_2_Template, 18, 17, "div", 43, _forTrack0);
167
+ i0.ɵɵelementEnd();
168
+ } if (rf & 2) {
169
+ const ctx_r0 = i0.ɵɵnextContext(3);
170
+ i0.ɵɵadvance();
171
+ i0.ɵɵrepeater(ctx_r0.FilteredPriorityCards.slice(0, 4));
172
+ } }
173
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_0_Conditional_67_Template(rf, ctx) { if (rf & 1) {
174
+ i0.ɵɵelementStart(0, "div", 40);
175
+ i0.ɵɵelement(1, "i", 55);
176
+ i0.ɵɵelementStart(2, "p");
177
+ i0.ɵɵtext(3, "No pending requests awaiting approval.");
178
+ i0.ɵɵelementEnd()();
179
+ } }
180
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_0_Conditional_68_For_2_Conditional_4_Template(rf, ctx) { if (rf & 1) {
181
+ i0.ɵɵelementStart(0, "span", 59);
182
+ i0.ɵɵtext(1);
183
+ i0.ɵɵelementEnd();
184
+ } if (rf & 2) {
185
+ const req_r7 = i0.ɵɵnextContext().$implicit;
186
+ i0.ɵɵadvance();
187
+ i0.ɵɵtextInterpolate(req_r7.RequestType);
188
+ } }
189
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_0_Conditional_68_For_2_Template(rf, ctx) { if (rf & 1) {
190
+ const _r6 = i0.ɵɵgetCurrentView();
191
+ i0.ɵɵelementStart(0, "div", 57);
192
+ i0.ɵɵlistener("click", function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_0_Conditional_68_For_2_Template_div_click_0_listener() { const req_r7 = i0.ɵɵrestoreView(_r6).$implicit; const ctx_r0 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r0.OpenRequestDetail(req_r7)); });
193
+ i0.ɵɵelementStart(1, "div", 58)(2, "span");
194
+ i0.ɵɵtext(3);
195
+ i0.ɵɵelementEnd();
196
+ i0.ɵɵconditionalCreate(4, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_0_Conditional_68_For_2_Conditional_4_Template, 2, 1, "span", 59);
197
+ i0.ɵɵelementStart(5, "span", 60);
198
+ i0.ɵɵtext(6);
199
+ i0.ɵɵpipe(7, "date");
200
+ i0.ɵɵelementEnd()();
201
+ i0.ɵɵelementStart(8, "p", 61);
202
+ i0.ɵɵtext(9);
203
+ i0.ɵɵelementEnd();
204
+ i0.ɵɵelementStart(10, "div", 62)(11, "button", 63);
205
+ i0.ɵɵlistener("click", function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_0_Conditional_68_For_2_Template_button_click_11_listener($event) { const req_r7 = i0.ɵɵrestoreView(_r6).$implicit; const ctx_r0 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r0.QuickRespondToRequest(req_r7, "Approved", $event)); });
206
+ i0.ɵɵelement(12, "i", 64);
207
+ i0.ɵɵtext(13, " Approve ");
208
+ i0.ɵɵelementEnd();
209
+ i0.ɵɵelementStart(14, "button", 65);
210
+ i0.ɵɵlistener("click", function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_0_Conditional_68_For_2_Template_button_click_14_listener($event) { const req_r7 = i0.ɵɵrestoreView(_r6).$implicit; const ctx_r0 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r0.QuickRespondToRequest(req_r7, "Rejected", $event)); });
211
+ i0.ɵɵelement(15, "i", 18);
212
+ i0.ɵɵtext(16, " Reject ");
213
+ i0.ɵɵelementEnd();
214
+ i0.ɵɵelementStart(17, "button", 39);
215
+ i0.ɵɵlistener("click", function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_0_Conditional_68_For_2_Template_button_click_17_listener($event) { const req_r7 = i0.ɵɵrestoreView(_r6).$implicit; const ctx_r0 = i0.ɵɵnextContext(4); ctx_r0.OpenRequestDetail(req_r7); return i0.ɵɵresetView($event.stopPropagation()); });
216
+ i0.ɵɵtext(18, " Inspect ");
217
+ i0.ɵɵelementEnd()()();
218
+ } if (rf & 2) {
219
+ const req_r7 = ctx.$implicit;
220
+ const ctx_r0 = i0.ɵɵnextContext(4);
221
+ i0.ɵɵadvance(2);
222
+ i0.ɵɵclassMap(i0.ɵɵinterpolate1("cos-priority-tag ", ctx_r0.GetPriorityTierClass(req_r7.Priority)));
223
+ i0.ɵɵadvance();
224
+ i0.ɵɵtextInterpolate2(" ", ctx_r0.GetPriorityTierLabel(req_r7.Priority), " (", req_r7.Priority, ") ");
225
+ i0.ɵɵadvance();
226
+ i0.ɵɵconditional(req_r7.RequestType ? 4 : -1);
227
+ i0.ɵɵadvance(2);
228
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(7, 10, req_r7.RequestedAt, "short"), " ");
229
+ i0.ɵɵadvance(3);
230
+ i0.ɵɵtextInterpolate(req_r7.Request);
231
+ i0.ɵɵadvance(2);
232
+ i0.ɵɵproperty("disabled", ctx_r0.BusyRequestID === req_r7.ID);
233
+ i0.ɵɵadvance(3);
234
+ i0.ɵɵproperty("disabled", ctx_r0.BusyRequestID === req_r7.ID);
235
+ } }
236
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_0_Conditional_68_Template(rf, ctx) { if (rf & 1) {
237
+ i0.ɵɵelementStart(0, "div", 41);
238
+ i0.ɵɵrepeaterCreate(1, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_0_Conditional_68_For_2_Template, 19, 13, "div", 56, _forTrack1);
239
+ i0.ɵɵelementEnd();
240
+ } if (rf & 2) {
241
+ const ctx_r0 = i0.ɵɵnextContext(3);
242
+ i0.ɵɵadvance();
243
+ i0.ɵɵrepeater(ctx_r0.PendingRequests.slice(0, 3));
244
+ } }
245
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_0_Conditional_79_Template(rf, ctx) { if (rf & 1) {
246
+ i0.ɵɵelementStart(0, "div", 40);
247
+ i0.ɵɵelement(1, "i", 66);
248
+ i0.ɵɵelementStart(2, "p");
249
+ i0.ɵɵtext(3, "No wake routines configured yet.");
250
+ i0.ɵɵelementEnd()();
251
+ } }
252
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_0_Conditional_80_For_2_Conditional_8_Template(rf, ctx) { if (rf & 1) {
253
+ i0.ɵɵelementStart(0, "span");
254
+ i0.ɵɵtext(1);
255
+ i0.ɵɵpipe(2, "date");
256
+ i0.ɵɵelementEnd();
257
+ } if (rf & 2) {
258
+ const routine_r9 = i0.ɵɵnextContext().$implicit;
259
+ i0.ɵɵadvance();
260
+ i0.ɵɵtextInterpolate1("Next wake: ", i0.ɵɵpipeBind2(2, 1, routine_r9.NextRunAt, "short"));
261
+ } }
262
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_0_Conditional_80_For_2_Conditional_9_Template(rf, ctx) { if (rf & 1) {
263
+ i0.ɵɵelementStart(0, "span");
264
+ i0.ɵɵtext(1, "No next wake scheduled");
265
+ i0.ɵɵelementEnd();
266
+ } }
267
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_0_Conditional_80_For_2_Conditional_10_Template(rf, ctx) { if (rf & 1) {
268
+ i0.ɵɵelementStart(0, "span");
269
+ i0.ɵɵtext(1, "\u00B7 Cron: ");
270
+ i0.ɵɵelementStart(2, "code");
271
+ i0.ɵɵtext(3);
272
+ i0.ɵɵelementEnd()();
273
+ } if (rf & 2) {
274
+ const routine_r9 = i0.ɵɵnextContext().$implicit;
275
+ i0.ɵɵadvance(3);
276
+ i0.ɵɵtextInterpolate(routine_r9.CronExpression);
277
+ } }
278
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_0_Conditional_80_For_2_Template(rf, ctx) { if (rf & 1) {
279
+ const _r8 = i0.ɵɵgetCurrentView();
280
+ i0.ɵɵelementStart(0, "div", 67)(1, "div", 68)(2, "div", 69)(3, "span", 70);
281
+ i0.ɵɵtext(4);
282
+ i0.ɵɵelementEnd();
283
+ i0.ɵɵelementStart(5, "span");
284
+ i0.ɵɵtext(6);
285
+ i0.ɵɵelementEnd()();
286
+ i0.ɵɵelementStart(7, "div", 71);
287
+ i0.ɵɵconditionalCreate(8, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_0_Conditional_80_For_2_Conditional_8_Template, 3, 4, "span")(9, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_0_Conditional_80_For_2_Conditional_9_Template, 2, 0, "span");
288
+ i0.ɵɵconditionalCreate(10, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_0_Conditional_80_For_2_Conditional_10_Template, 4, 1, "span");
289
+ i0.ɵɵelementEnd()();
290
+ i0.ɵɵelementStart(11, "div", 72)(12, "button", 63);
291
+ i0.ɵɵlistener("click", function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_0_Conditional_80_For_2_Template_button_click_12_listener($event) { const routine_r9 = i0.ɵɵrestoreView(_r8).$implicit; const ctx_r0 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r0.TriggerWakeNow(routine_r9, $event)); });
292
+ i0.ɵɵelement(13, "i", 73);
293
+ i0.ɵɵtext(14, " Wake Now ");
294
+ i0.ɵɵelementEnd()()();
295
+ } if (rf & 2) {
296
+ const routine_r9 = ctx.$implicit;
297
+ const ctx_r0 = i0.ɵɵnextContext(4);
298
+ i0.ɵɵadvance(4);
299
+ i0.ɵɵtextInterpolate(routine_r9.Name);
300
+ i0.ɵɵadvance();
301
+ i0.ɵɵclassMap(i0.ɵɵinterpolate1("cos-status-chip cos-status-chip--", routine_r9.Status.toLowerCase()));
302
+ i0.ɵɵadvance();
303
+ i0.ɵɵtextInterpolate1(" ", routine_r9.Status, " ");
304
+ i0.ɵɵadvance(2);
305
+ i0.ɵɵconditional(routine_r9.NextRunAt ? 8 : 9);
306
+ i0.ɵɵadvance(2);
307
+ i0.ɵɵconditional(routine_r9.CronExpression ? 10 : -1);
308
+ i0.ɵɵadvance(2);
309
+ i0.ɵɵproperty("disabled", ctx_r0.BusyRoutineID === routine_r9.ID);
310
+ } }
311
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_0_Conditional_80_Template(rf, ctx) { if (rf & 1) {
312
+ i0.ɵɵelementStart(0, "div", 41);
313
+ i0.ɵɵrepeaterCreate(1, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_0_Conditional_80_For_2_Template, 15, 8, "div", 67, _forTrack1);
314
+ i0.ɵɵelementEnd();
315
+ } if (rf & 2) {
316
+ const ctx_r0 = i0.ɵɵnextContext(3);
317
+ i0.ɵɵadvance();
318
+ i0.ɵɵrepeater(ctx_r0.Routines.slice(0, 3));
319
+ } }
320
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_0_Template(rf, ctx) { if (rf & 1) {
321
+ const _r3 = i0.ɵɵgetCurrentView();
322
+ i0.ɵɵelementStart(0, "div", 22)(1, "div", 23);
323
+ i0.ɵɵlistener("click", function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_0_Template_div_click_1_listener() { i0.ɵɵrestoreView(_r3); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.OnTabChange("priorities")); });
324
+ i0.ɵɵelementStart(2, "div", 24)(3, "span", 25);
325
+ i0.ɵɵtext(4, "Priority Objectives");
326
+ i0.ɵɵelementEnd();
327
+ i0.ɵɵelementStart(5, "div", 26);
328
+ i0.ɵɵelement(6, "i", 27);
329
+ i0.ɵɵelementEnd()();
330
+ i0.ɵɵelementStart(7, "div", 28);
331
+ i0.ɵɵtext(8);
332
+ i0.ɵɵelementEnd();
333
+ i0.ɵɵelementStart(9, "div", 29);
334
+ i0.ɵɵtext(10);
335
+ i0.ɵɵelementEnd()();
336
+ i0.ɵɵelementStart(11, "div", 23);
337
+ i0.ɵɵlistener("click", function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_0_Template_div_click_11_listener() { i0.ɵɵrestoreView(_r3); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.OnTabChange("priorities")); });
338
+ i0.ɵɵelementStart(12, "div", 24)(13, "span", 25);
339
+ i0.ɵɵtext(14, "Avg Objective Progress");
340
+ i0.ɵɵelementEnd();
341
+ i0.ɵɵelementStart(15, "div", 30);
342
+ i0.ɵɵelement(16, "i", 31);
343
+ i0.ɵɵelementEnd()();
344
+ i0.ɵɵelementStart(17, "div", 28);
345
+ i0.ɵɵtext(18);
346
+ i0.ɵɵelementEnd();
347
+ i0.ɵɵelementStart(19, "div", 29);
348
+ i0.ɵɵconditionalCreate(20, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_0_Conditional_20_Template, 1, 1)(21, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_0_Conditional_21_Template, 1, 1);
349
+ i0.ɵɵelementEnd()();
350
+ i0.ɵɵelementStart(22, "div", 23);
351
+ i0.ɵɵlistener("click", function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_0_Template_div_click_22_listener() { i0.ɵɵrestoreView(_r3); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.OnTabChange("approvals-wakes")); });
352
+ i0.ɵɵelementStart(23, "div", 24)(24, "span", 25);
353
+ i0.ɵɵtext(25, "Pending Approvals");
354
+ i0.ɵɵelementEnd();
355
+ i0.ɵɵelementStart(26, "div", 32);
356
+ i0.ɵɵelement(27, "i", 33);
357
+ i0.ɵɵelementEnd()();
358
+ i0.ɵɵelementStart(28, "div", 28);
359
+ i0.ɵɵtext(29);
360
+ i0.ɵɵelementEnd();
361
+ i0.ɵɵelementStart(30, "div", 29);
362
+ i0.ɵɵconditionalCreate(31, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_0_Conditional_31_Template, 1, 1)(32, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_0_Conditional_32_Template, 1, 0);
363
+ i0.ɵɵelementEnd()();
364
+ i0.ɵɵelementStart(33, "div", 23);
365
+ i0.ɵɵlistener("click", function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_0_Template_div_click_33_listener() { i0.ɵɵrestoreView(_r3); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.OnTabChange("governance")); });
366
+ i0.ɵɵelementStart(34, "div", 24)(35, "span", 25);
367
+ i0.ɵɵtext(36, "Governance Posture");
368
+ i0.ɵɵelementEnd();
369
+ i0.ɵɵelementStart(37, "div", 26);
370
+ i0.ɵɵelement(38, "i", 34);
371
+ i0.ɵɵelementEnd()();
372
+ i0.ɵɵelementStart(39, "div", 28);
373
+ i0.ɵɵtext(40);
374
+ i0.ɵɵelementEnd();
375
+ i0.ɵɵelementStart(41, "div", 29);
376
+ i0.ɵɵtext(42);
377
+ i0.ɵɵelementEnd()()();
378
+ i0.ɵɵelementStart(43, "div", 20)(44, "section", 35)(45, "div", 36)(46, "div")(47, "h3", 37);
379
+ i0.ɵɵelement(48, "i", 27);
380
+ i0.ɵɵtext(49, " Strategic Priorities & OKRs ");
381
+ i0.ɵɵelementEnd();
382
+ i0.ɵɵelementStart(50, "p", 38);
383
+ i0.ɵɵtext(51, " Active priority objectives tracked in MJ_BizApps_Tasks ");
384
+ i0.ɵɵelementEnd()();
385
+ i0.ɵɵelementStart(52, "button", 39);
386
+ i0.ɵɵlistener("click", function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_0_Template_button_click_52_listener() { i0.ɵɵrestoreView(_r3); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.OnTabChange("priorities")); });
387
+ i0.ɵɵtext(53);
388
+ i0.ɵɵelementEnd()();
389
+ i0.ɵɵconditionalCreate(54, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_0_Conditional_54_Template, 4, 0, "div", 40)(55, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_0_Conditional_55_Template, 3, 0, "div", 41);
390
+ i0.ɵɵelementEnd();
391
+ i0.ɵɵelementStart(56, "div", 41)(57, "section", 35)(58, "div", 36)(59, "div")(60, "h3", 37);
392
+ i0.ɵɵelement(61, "i", 33);
393
+ i0.ɵɵtext(62, " Pending Approvals ");
394
+ i0.ɵɵelementEnd();
395
+ i0.ɵɵelementStart(63, "p", 38);
396
+ i0.ɵɵtext(64, " Requests awaiting your decision ");
397
+ i0.ɵɵelementEnd()();
398
+ i0.ɵɵelementStart(65, "button", 39);
399
+ i0.ɵɵlistener("click", function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_0_Template_button_click_65_listener() { i0.ɵɵrestoreView(_r3); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.OnTabChange("approvals-wakes")); });
400
+ i0.ɵɵtext(66);
401
+ i0.ɵɵelementEnd()();
402
+ i0.ɵɵconditionalCreate(67, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_0_Conditional_67_Template, 4, 0, "div", 40)(68, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_0_Conditional_68_Template, 3, 0, "div", 41);
403
+ i0.ɵɵelementEnd();
404
+ i0.ɵɵelementStart(69, "section", 35)(70, "div", 36)(71, "div")(72, "h3", 37);
405
+ i0.ɵɵelement(73, "i", 42);
406
+ i0.ɵɵtext(74, " Autonomous Wake Schedule ");
407
+ i0.ɵɵelementEnd();
408
+ i0.ɵɵelementStart(75, "p", 38);
409
+ i0.ɵɵtext(76, " Proactive AgentWake routines for your Chief of Staff ");
410
+ i0.ɵɵelementEnd()();
411
+ i0.ɵɵelementStart(77, "button", 39);
412
+ i0.ɵɵlistener("click", function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_0_Template_button_click_77_listener() { i0.ɵɵrestoreView(_r3); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.OnTabChange("approvals-wakes")); });
413
+ i0.ɵɵtext(78);
414
+ i0.ɵɵelementEnd()();
415
+ i0.ɵɵconditionalCreate(79, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_0_Conditional_79_Template, 4, 0, "div", 40)(80, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_0_Conditional_80_Template, 3, 0, "div", 41);
416
+ i0.ɵɵelementEnd()()();
417
+ } if (rf & 2) {
418
+ const ctx_r0 = i0.ɵɵnextContext(2);
419
+ i0.ɵɵadvance(8);
420
+ i0.ɵɵtextInterpolate(ctx_r0.Metrics.PriorityObjectiveCount);
421
+ i0.ɵɵadvance(2);
422
+ i0.ɵɵtextInterpolate2(" ", ctx_r0.Metrics.OnTrackCount, " on track \u00B7 ", ctx_r0.Metrics.SubtaskCount, " milestones ");
423
+ i0.ɵɵadvance(8);
424
+ i0.ɵɵtextInterpolate1("", ctx_r0.Metrics.AveragePriorityProgress, "%");
425
+ i0.ɵɵadvance(2);
426
+ i0.ɵɵconditional(ctx_r0.Metrics.AverageConfidenceScore !== null ? 20 : 21);
427
+ i0.ɵɵadvance(6);
428
+ i0.ɵɵclassProp("cos-kpi-card__icon--warning", ctx_r0.Metrics.PendingApprovalCount > 0)("cos-kpi-card__icon--success", ctx_r0.Metrics.PendingApprovalCount === 0);
429
+ i0.ɵɵadvance(3);
430
+ i0.ɵɵtextInterpolate(ctx_r0.Metrics.PendingApprovalCount);
431
+ i0.ɵɵadvance(2);
432
+ i0.ɵɵconditional(ctx_r0.Metrics.HighPriorityPendingCount > 0 ? 31 : 32);
433
+ i0.ɵɵadvance(9);
434
+ i0.ɵɵtextInterpolate(ctx_r0.DraftPolicy.CoordinationMode);
435
+ i0.ɵɵadvance(2);
436
+ i0.ɵɵtextInterpolate2(" Status: ", ctx_r0.DraftPolicy.Status, " \u00B7 Email: ", ctx_r0.DraftPolicy.EmailChannelMode, " ");
437
+ i0.ɵɵadvance(11);
438
+ i0.ɵɵtextInterpolate1(" View All (", ctx_r0.Metrics.PriorityObjectiveCount, ") ");
439
+ i0.ɵɵadvance();
440
+ i0.ɵɵconditional(ctx_r0.FilteredPriorityCards.length === 0 ? 54 : 55);
441
+ i0.ɵɵadvance(12);
442
+ i0.ɵɵtextInterpolate1(" Manage (", ctx_r0.PendingRequests.length, ") ");
443
+ i0.ɵɵadvance();
444
+ i0.ɵɵconditional(ctx_r0.PendingRequests.length === 0 ? 67 : 68);
445
+ i0.ɵɵadvance(11);
446
+ i0.ɵɵtextInterpolate1(" Routines (", ctx_r0.Routines.length, ") ");
447
+ i0.ɵɵadvance();
448
+ i0.ɵɵconditional(ctx_r0.Routines.length === 0 ? 79 : 80);
449
+ } }
450
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_1_For_3_Template(rf, ctx) { if (rf & 1) {
451
+ const _r10 = i0.ɵɵgetCurrentView();
452
+ i0.ɵɵelementStart(0, "button", 80);
453
+ i0.ɵɵlistener("click", function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_1_For_3_Template_button_click_0_listener() { const opt_r11 = i0.ɵɵrestoreView(_r10).$implicit; const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.OnHealthFilterChange(opt_r11.Value)); });
454
+ i0.ɵɵtext(1);
455
+ i0.ɵɵelementEnd();
456
+ } if (rf & 2) {
457
+ const opt_r11 = ctx.$implicit;
458
+ const ctx_r0 = i0.ɵɵnextContext(3);
459
+ i0.ɵɵproperty("variant", ctx_r0.HealthFilter === opt_r11.Value ? "primary" : "outline");
460
+ i0.ɵɵadvance();
461
+ i0.ɵɵtextInterpolate1(" ", opt_r11.Label, " ");
462
+ } }
463
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_1_Conditional_4_Template(rf, ctx) { if (rf & 1) {
464
+ const _r12 = i0.ɵɵgetCurrentView();
465
+ i0.ɵɵelementStart(0, "button", 81);
466
+ i0.ɵɵlistener("click", function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_1_Conditional_4_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r12); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.ClearFilters()); });
467
+ i0.ɵɵelement(1, "i", 82);
468
+ i0.ɵɵtext(2, " Clear Filters ");
469
+ i0.ɵɵelementEnd();
470
+ } }
471
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_1_Conditional_5_Template(rf, ctx) { if (rf & 1) {
472
+ const _r13 = i0.ɵɵgetCurrentView();
473
+ i0.ɵɵelementStart(0, "mj-empty-state", 83);
474
+ i0.ɵɵlistener("Action", function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_1_Conditional_5_Template_mj_empty_state_Action_0_listener() { i0.ɵɵrestoreView(_r13); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.ClearFilters()); });
475
+ i0.ɵɵelementEnd();
476
+ } if (rf & 2) {
477
+ const ctx_r0 = i0.ɵɵnextContext(3);
478
+ i0.ɵɵproperty("Variant", ctx_r0.Metrics.PriorityCards.length === 0 ? "empty" : "no-results")("Title", !ctx_r0.HasLinkedPerson ? "No People Record Linked to Your User" : ctx_r0.Metrics.PriorityCards.length === 0 ? "No Priority Objectives Tracked Yet" : "No Priority Objectives Match Your Filter")("Message", !ctx_r0.HasLinkedPerson ? "Priorities are read from tasks you created or are assigned to. Ask an administrator to link your People record to your user account." : ctx_r0.Metrics.PriorityCards.length === 0 ? "Chat with your Chief of Staff to onboard your quarterly priorities and milestone schedule." : "Try clearing your search or health filter.")("ActionText", ctx_r0.Metrics.PriorityCards.length === 0 ? "" : "Clear Filters");
479
+ } }
480
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_1_Conditional_6_For_2_Conditional_7_Template(rf, ctx) { if (rf & 1) {
481
+ i0.ɵɵelementStart(0, "span");
482
+ i0.ɵɵelement(1, "i", 101);
483
+ i0.ɵɵtext(2);
484
+ i0.ɵɵelementEnd();
485
+ } if (rf & 2) {
486
+ const card_r15 = i0.ɵɵnextContext().$implicit;
487
+ const ctx_r0 = i0.ɵɵnextContext(4);
488
+ i0.ɵɵclassMap(i0.ɵɵinterpolate1("cos-priority-tag ", ctx_r0.GetTaskPriorityClass(card_r15.Task.Priority)));
489
+ i0.ɵɵadvance(2);
490
+ i0.ɵɵtextInterpolate1(" ", card_r15.Task.Priority, " ");
491
+ } }
492
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_1_Conditional_6_For_2_Conditional_11_Template(rf, ctx) { if (rf & 1) {
493
+ i0.ɵɵelementStart(0, "span", 59);
494
+ i0.ɵɵelement(1, "i", 102);
495
+ i0.ɵɵtext(2);
496
+ i0.ɵɵelementEnd();
497
+ } if (rf & 2) {
498
+ const card_r15 = i0.ɵɵnextContext().$implicit;
499
+ i0.ɵɵadvance(2);
500
+ i0.ɵɵtextInterpolate1(" ", card_r15.Task.PlanningPeriod, " ");
501
+ } }
502
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_1_Conditional_6_For_2_Conditional_12_Template(rf, ctx) { if (rf & 1) {
503
+ i0.ɵɵelementStart(0, "span", 59);
504
+ i0.ɵɵelement(1, "i", 53);
505
+ i0.ɵɵtext(2);
506
+ i0.ɵɵelementEnd();
507
+ } if (rf & 2) {
508
+ const card_r15 = i0.ɵɵnextContext().$implicit;
509
+ i0.ɵɵadvance(2);
510
+ i0.ɵɵtextInterpolate1(" ", card_r15.Task.CheckInCadence, " Check-In ");
511
+ } }
512
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_1_Conditional_6_For_2_Conditional_13_Template(rf, ctx) { if (rf & 1) {
513
+ i0.ɵɵelementStart(0, "span", 59);
514
+ i0.ɵɵelement(1, "i", 103);
515
+ i0.ɵɵtext(2);
516
+ i0.ɵɵelementEnd();
517
+ } if (rf & 2) {
518
+ const card_r15 = i0.ɵɵnextContext().$implicit;
519
+ i0.ɵɵadvance(2);
520
+ i0.ɵɵtextInterpolate1(" ", card_r15.Task.ConfidenceScore, "% Confidence ");
521
+ } }
522
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_1_Conditional_6_For_2_Conditional_26_Template(rf, ctx) { if (rf & 1) {
523
+ i0.ɵɵelementStart(0, "p", 97);
524
+ i0.ɵɵtext(1);
525
+ i0.ɵɵelementEnd();
526
+ } if (rf & 2) {
527
+ const card_r15 = i0.ɵɵnextContext().$implicit;
528
+ i0.ɵɵadvance();
529
+ i0.ɵɵtextInterpolate(card_r15.Task.Description);
530
+ } }
531
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_1_Conditional_6_For_2_Conditional_30_Template(rf, ctx) { if (rf & 1) {
532
+ i0.ɵɵelementStart(0, "span", 98);
533
+ i0.ɵɵelement(1, "i", 104);
534
+ i0.ɵɵtext(2);
535
+ i0.ɵɵelementEnd();
536
+ } if (rf & 2) {
537
+ const card_r15 = i0.ɵɵnextContext().$implicit;
538
+ i0.ɵɵadvance(2);
539
+ i0.ɵɵtextInterpolate1(" ", card_r15.MetricProgressLabel, " ");
540
+ } }
541
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_1_Conditional_6_For_2_Conditional_36_Conditional_6_Template(rf, ctx) { if (rf & 1) {
542
+ i0.ɵɵelementStart(0, "strong");
543
+ i0.ɵɵtext(1, "(Overdue)");
544
+ i0.ɵɵelementEnd();
545
+ } }
546
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_1_Conditional_6_For_2_Conditional_36_Template(rf, ctx) { if (rf & 1) {
547
+ i0.ɵɵelementStart(0, "span");
548
+ i0.ɵɵelement(1, "i", 54);
549
+ i0.ɵɵelementStart(2, "strong");
550
+ i0.ɵɵtext(3, "Target Due:");
551
+ i0.ɵɵelementEnd();
552
+ i0.ɵɵtext(4);
553
+ i0.ɵɵpipe(5, "date");
554
+ i0.ɵɵconditionalCreate(6, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_1_Conditional_6_For_2_Conditional_36_Conditional_6_Template, 2, 0, "strong");
555
+ i0.ɵɵelementEnd();
556
+ } if (rf & 2) {
557
+ const card_r15 = i0.ɵɵnextContext().$implicit;
558
+ i0.ɵɵclassProp("cos-overdue-text", card_r15.IsOverdue);
559
+ i0.ɵɵadvance(4);
560
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(5, 4, card_r15.Task.DueAt, "mediumDate"), " ");
561
+ i0.ɵɵadvance(2);
562
+ i0.ɵɵconditional(card_r15.IsOverdue ? 6 : -1);
563
+ } }
564
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_1_Conditional_6_For_2_Conditional_37_Template(rf, ctx) { if (rf & 1) {
565
+ i0.ɵɵelementStart(0, "span");
566
+ i0.ɵɵelement(1, "i", 105);
567
+ i0.ɵɵelementStart(2, "strong");
568
+ i0.ɵɵtext(3, "Next Check-In:");
569
+ i0.ɵɵelementEnd();
570
+ i0.ɵɵtext(4);
571
+ i0.ɵɵpipe(5, "date");
572
+ i0.ɵɵelementEnd();
573
+ } if (rf & 2) {
574
+ const card_r15 = i0.ɵɵnextContext().$implicit;
575
+ i0.ɵɵadvance(4);
576
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(5, 1, card_r15.Task.NextCheckInDueAt, "mediumDate"), " ");
577
+ } }
578
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_1_Conditional_6_For_2_Conditional_38_For_6_Conditional_6_Template(rf, ctx) { if (rf & 1) {
579
+ i0.ɵɵelementStart(0, "div", 112);
580
+ i0.ɵɵtext(1);
581
+ i0.ɵɵelementEnd();
582
+ } if (rf & 2) {
583
+ const sub_r17 = i0.ɵɵnextContext().$implicit;
584
+ i0.ɵɵadvance();
585
+ i0.ɵɵtextInterpolate(sub_r17.Description);
586
+ } }
587
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_1_Conditional_6_For_2_Conditional_38_For_6_Conditional_10_Template(rf, ctx) { if (rf & 1) {
588
+ i0.ɵɵelementStart(0, "span", 114);
589
+ i0.ɵɵelement(1, "i", 54);
590
+ i0.ɵɵtext(2);
591
+ i0.ɵɵpipe(3, "date");
592
+ i0.ɵɵelementEnd();
593
+ } if (rf & 2) {
594
+ const sub_r17 = i0.ɵɵnextContext().$implicit;
595
+ i0.ɵɵadvance(2);
596
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(3, 1, sub_r17.DueAt, "shortDate"), " ");
597
+ } }
598
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_1_Conditional_6_For_2_Conditional_38_For_6_Template(rf, ctx) { if (rf & 1) {
599
+ const _r16 = i0.ɵɵgetCurrentView();
600
+ i0.ɵɵelementStart(0, "div", 109);
601
+ i0.ɵɵlistener("click", function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_1_Conditional_6_For_2_Conditional_38_For_6_Template_div_click_0_listener($event) { const sub_r17 = i0.ɵɵrestoreView(_r16).$implicit; const ctx_r0 = i0.ɵɵnextContext(6); return i0.ɵɵresetView(ctx_r0.OpenTaskRecord(sub_r17.ID, $event)); });
602
+ i0.ɵɵelementStart(1, "div", 110);
603
+ i0.ɵɵelement(2, "i", 16);
604
+ i0.ɵɵelementStart(3, "div")(4, "div", 111);
605
+ i0.ɵɵtext(5);
606
+ i0.ɵɵelementEnd();
607
+ i0.ɵɵconditionalCreate(6, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_1_Conditional_6_For_2_Conditional_38_For_6_Conditional_6_Template, 2, 1, "div", 112);
608
+ i0.ɵɵelementEnd()();
609
+ i0.ɵɵelementStart(7, "div", 113)(8, "span", 59);
610
+ i0.ɵɵtext(9);
611
+ i0.ɵɵelementEnd();
612
+ i0.ɵɵconditionalCreate(10, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_1_Conditional_6_For_2_Conditional_38_For_6_Conditional_10_Template, 4, 4, "span", 114);
613
+ i0.ɵɵelement(11, "i", 115);
614
+ i0.ɵɵelementEnd()();
615
+ } if (rf & 2) {
616
+ const sub_r17 = ctx.$implicit;
617
+ i0.ɵɵadvance(2);
618
+ i0.ɵɵclassProp("fa-circle-check", sub_r17.Status === "Completed" || sub_r17.Status === "Done")("fa-circle-half-stroke", sub_r17.Status === "In Progress")("fa-regular", sub_r17.Status !== "Completed" && sub_r17.Status !== "Done" && sub_r17.Status !== "In Progress")("fa-circle", sub_r17.Status !== "Completed" && sub_r17.Status !== "Done" && sub_r17.Status !== "In Progress");
619
+ i0.ɵɵadvance(3);
620
+ i0.ɵɵtextInterpolate(sub_r17.Name);
621
+ i0.ɵɵadvance();
622
+ i0.ɵɵconditional(sub_r17.Description ? 6 : -1);
623
+ i0.ɵɵadvance(3);
624
+ i0.ɵɵtextInterpolate(sub_r17.Status);
625
+ i0.ɵɵadvance();
626
+ i0.ɵɵconditional(sub_r17.DueAt ? 10 : -1);
627
+ } }
628
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_1_Conditional_6_For_2_Conditional_38_Template(rf, ctx) { if (rf & 1) {
629
+ i0.ɵɵelementStart(0, "div", 100)(1, "div", 106)(2, "span");
630
+ i0.ɵɵtext(3);
631
+ i0.ɵɵelementEnd()();
632
+ i0.ɵɵelementStart(4, "div", 107);
633
+ i0.ɵɵrepeaterCreate(5, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_1_Conditional_6_For_2_Conditional_38_For_6_Template, 12, 12, "div", 108, _forTrack1);
634
+ i0.ɵɵelementEnd()();
635
+ } if (rf & 2) {
636
+ const card_r15 = i0.ɵɵnextContext().$implicit;
637
+ i0.ɵɵadvance(3);
638
+ i0.ɵɵtextInterpolate1("Milestones & Workstreams (", card_r15.Subtasks.length, ")");
639
+ i0.ɵɵadvance(2);
640
+ i0.ɵɵrepeater(card_r15.Subtasks);
641
+ } }
642
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_1_Conditional_6_For_2_Template(rf, ctx) { if (rf & 1) {
643
+ const _r14 = i0.ɵɵgetCurrentView();
644
+ i0.ɵɵelementStart(0, "article", 84)(1, "div", 85);
645
+ i0.ɵɵlistener("click", function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_1_Conditional_6_For_2_Template_div_click_1_listener() { const card_r15 = i0.ɵɵrestoreView(_r14).$implicit; const ctx_r0 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r0.TogglePriorityExpanded(card_r15.Task.ID)); });
646
+ i0.ɵɵelementStart(2, "div", 86)(3, "button", 87);
647
+ i0.ɵɵlistener("click", function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_1_Conditional_6_For_2_Template_button_click_3_listener($event) { const card_r15 = i0.ɵɵrestoreView(_r14).$implicit; const ctx_r0 = i0.ɵɵnextContext(4); ctx_r0.TogglePriorityExpanded(card_r15.Task.ID); return i0.ɵɵresetView($event.stopPropagation()); });
648
+ i0.ɵɵelement(4, "i", 16);
649
+ i0.ɵɵelementEnd();
650
+ i0.ɵɵelementStart(5, "div")(6, "div", 88);
651
+ i0.ɵɵconditionalCreate(7, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_1_Conditional_6_For_2_Conditional_7_Template, 3, 4, "span", 89);
652
+ i0.ɵɵelementStart(8, "span");
653
+ i0.ɵɵelement(9, "i");
654
+ i0.ɵɵtext(10);
655
+ i0.ɵɵelementEnd();
656
+ i0.ɵɵconditionalCreate(11, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_1_Conditional_6_For_2_Conditional_11_Template, 3, 1, "span", 59);
657
+ i0.ɵɵconditionalCreate(12, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_1_Conditional_6_For_2_Conditional_12_Template, 3, 1, "span", 59);
658
+ i0.ɵɵconditionalCreate(13, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_1_Conditional_6_For_2_Conditional_13_Template, 3, 1, "span", 59);
659
+ i0.ɵɵelementEnd();
660
+ i0.ɵɵelementStart(14, "h3", 90);
661
+ i0.ɵɵtext(15);
662
+ i0.ɵɵelementEnd()()();
663
+ i0.ɵɵelementStart(16, "div", 91)(17, "div", 92)(18, "span", 93);
664
+ i0.ɵɵtext(19);
665
+ i0.ɵɵelementEnd();
666
+ i0.ɵɵelementStart(20, "span", 94);
667
+ i0.ɵɵtext(21);
668
+ i0.ɵɵelementEnd()();
669
+ i0.ɵɵelementStart(22, "button", 39);
670
+ i0.ɵɵlistener("click", function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_1_Conditional_6_For_2_Template_button_click_22_listener($event) { const card_r15 = i0.ɵɵrestoreView(_r14).$implicit; const ctx_r0 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r0.OpenTaskRecord(card_r15.Task.ID, $event)); });
671
+ i0.ɵɵelement(23, "i", 95);
672
+ i0.ɵɵtext(24, " Inspect & Edit ");
673
+ i0.ɵɵelementEnd()()();
674
+ i0.ɵɵelementStart(25, "div", 96);
675
+ i0.ɵɵconditionalCreate(26, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_1_Conditional_6_For_2_Conditional_26_Template, 2, 1, "p", 97);
676
+ i0.ɵɵelementStart(27, "div", 47)(28, "div", 48);
677
+ i0.ɵɵelement(29, "div");
678
+ i0.ɵɵelementEnd();
679
+ i0.ɵɵconditionalCreate(30, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_1_Conditional_6_For_2_Conditional_30_Template, 3, 1, "span", 98);
680
+ i0.ɵɵelementEnd();
681
+ i0.ɵɵelementStart(31, "div", 99)(32, "span")(33, "strong");
682
+ i0.ɵɵtext(34, "Status:");
683
+ i0.ɵɵelementEnd();
684
+ i0.ɵɵtext(35);
685
+ i0.ɵɵelementEnd();
686
+ i0.ɵɵconditionalCreate(36, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_1_Conditional_6_For_2_Conditional_36_Template, 7, 7, "span", 52);
687
+ i0.ɵɵconditionalCreate(37, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_1_Conditional_6_For_2_Conditional_37_Template, 6, 4, "span");
688
+ i0.ɵɵelementEnd();
689
+ i0.ɵɵconditionalCreate(38, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_1_Conditional_6_For_2_Conditional_38_Template, 7, 1, "div", 100);
690
+ i0.ɵɵelementEnd()();
691
+ } if (rf & 2) {
692
+ const card_r15 = ctx.$implicit;
693
+ const ctx_r0 = i0.ɵɵnextContext(4);
694
+ i0.ɵɵadvance(3);
695
+ i0.ɵɵattribute("aria-expanded", ctx_r0.IsPriorityExpanded(card_r15.Task.ID));
696
+ i0.ɵɵadvance();
697
+ i0.ɵɵclassProp("fa-chevron-down", ctx_r0.IsPriorityExpanded(card_r15.Task.ID))("fa-chevron-right", !ctx_r0.IsPriorityExpanded(card_r15.Task.ID));
698
+ i0.ɵɵadvance(3);
699
+ i0.ɵɵconditional(card_r15.Task.Priority ? 7 : -1);
700
+ i0.ɵɵadvance();
701
+ i0.ɵɵclassMap(i0.ɵɵinterpolate1("cos-health-pill cos-health-pill--", card_r15.EffectiveHealth.toLowerCase()));
702
+ i0.ɵɵadvance();
703
+ i0.ɵɵclassMap(ctx_r0.GetHealthBadgeIcon(card_r15.EffectiveHealth));
704
+ i0.ɵɵadvance();
705
+ i0.ɵɵtextInterpolate1(" ", ctx_r0.GetHealthBadgeLabel(card_r15.EffectiveHealth), " ");
706
+ i0.ɵɵadvance();
707
+ i0.ɵɵconditional(card_r15.Task.PlanningPeriod ? 11 : -1);
708
+ i0.ɵɵadvance();
709
+ i0.ɵɵconditional(card_r15.Task.CheckInCadence ? 12 : -1);
710
+ i0.ɵɵadvance();
711
+ i0.ɵɵconditional(card_r15.Task.ConfidenceScore !== null ? 13 : -1);
712
+ i0.ɵɵadvance(2);
713
+ i0.ɵɵtextInterpolate(card_r15.Task.Name);
714
+ i0.ɵɵadvance(4);
715
+ i0.ɵɵtextInterpolate1("", card_r15.EffectivePercentComplete, "%");
716
+ i0.ɵɵadvance(2);
717
+ i0.ɵɵtextInterpolate2(" ", card_r15.CompletedSubtaskCount, "/", card_r15.Subtasks.length, " milestones ");
718
+ i0.ɵɵadvance(5);
719
+ i0.ɵɵconditional(card_r15.Task.Description ? 26 : -1);
720
+ i0.ɵɵadvance(3);
721
+ i0.ɵɵclassMap(i0.ɵɵinterpolate1("cos-progress-bar__fill cos-progress-bar__fill--", card_r15.EffectiveHealth.toLowerCase()));
722
+ i0.ɵɵstyleProp("width", card_r15.EffectivePercentComplete, "%");
723
+ i0.ɵɵadvance();
724
+ i0.ɵɵconditional(card_r15.MetricProgressLabel ? 30 : -1);
725
+ i0.ɵɵadvance(5);
726
+ i0.ɵɵtextInterpolate1(" ", card_r15.Task.Status, " ");
727
+ i0.ɵɵadvance();
728
+ i0.ɵɵconditional(card_r15.Task.DueAt ? 36 : -1);
729
+ i0.ɵɵadvance();
730
+ i0.ɵɵconditional(card_r15.Task.NextCheckInDueAt ? 37 : -1);
731
+ i0.ɵɵadvance();
732
+ i0.ɵɵconditional(ctx_r0.IsPriorityExpanded(card_r15.Task.ID) && card_r15.Subtasks.length > 0 ? 38 : -1);
733
+ } }
734
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_1_Conditional_6_Template(rf, ctx) { if (rf & 1) {
735
+ i0.ɵɵelementStart(0, "div", 79);
736
+ i0.ɵɵrepeaterCreate(1, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_1_Conditional_6_For_2_Template, 39, 30, "article", 84, _forTrack0);
737
+ i0.ɵɵelementEnd();
738
+ } if (rf & 2) {
739
+ const ctx_r0 = i0.ɵɵnextContext(3);
740
+ i0.ɵɵadvance();
741
+ i0.ɵɵrepeater(ctx_r0.FilteredPriorityCards);
742
+ } }
743
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_1_Template(rf, ctx) { if (rf & 1) {
744
+ i0.ɵɵelementStart(0, "div", 74)(1, "div", 75);
745
+ i0.ɵɵrepeaterCreate(2, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_1_For_3_Template, 2, 2, "button", 76, _forTrack2);
746
+ i0.ɵɵelementEnd();
747
+ i0.ɵɵconditionalCreate(4, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_1_Conditional_4_Template, 3, 0, "button", 77);
748
+ i0.ɵɵelementEnd();
749
+ i0.ɵɵconditionalCreate(5, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_1_Conditional_5_Template, 1, 4, "mj-empty-state", 78)(6, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_1_Conditional_6_Template, 3, 0, "div", 79);
750
+ } if (rf & 2) {
751
+ const ctx_r0 = i0.ɵɵnextContext(2);
752
+ i0.ɵɵadvance(2);
753
+ i0.ɵɵrepeater(ctx_r0.HealthFilterOptions);
754
+ i0.ɵɵadvance(2);
755
+ i0.ɵɵconditional(ctx_r0.HealthFilter !== "all" || ctx_r0.SearchText.trim().length > 0 ? 4 : -1);
756
+ i0.ɵɵadvance();
757
+ i0.ɵɵconditional(ctx_r0.FilteredPriorityCards.length === 0 ? 5 : 6);
758
+ } }
759
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_2_Conditional_9_Template(rf, ctx) { if (rf & 1) {
760
+ i0.ɵɵelementStart(0, "div", 40);
761
+ i0.ɵɵelement(1, "i", 55);
762
+ i0.ɵɵelementStart(2, "p");
763
+ i0.ɵɵtext(3, "Inbox Zero \u2014 no pending requests awaiting your decision.");
764
+ i0.ɵɵelementEnd()();
765
+ } }
766
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_2_Conditional_10_For_2_Conditional_5_Template(rf, ctx) { if (rf & 1) {
767
+ i0.ɵɵelementStart(0, "span", 59);
768
+ i0.ɵɵelement(1, "i", 121);
769
+ i0.ɵɵtext(2);
770
+ i0.ɵɵelementEnd();
771
+ } if (rf & 2) {
772
+ const req_r19 = i0.ɵɵnextContext().$implicit;
773
+ i0.ɵɵadvance(2);
774
+ i0.ɵɵtextInterpolate1(" ", req_r19.RequestType);
775
+ } }
776
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_2_Conditional_10_For_2_Conditional_8_Template(rf, ctx) { if (rf & 1) {
777
+ i0.ɵɵelementStart(0, "span", 119);
778
+ i0.ɵɵtext(1, " Expired ");
779
+ i0.ɵɵelementEnd();
780
+ } }
781
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_2_Conditional_10_For_2_Template(rf, ctx) { if (rf & 1) {
782
+ const _r18 = i0.ɵɵgetCurrentView();
783
+ i0.ɵɵelementStart(0, "div", 57);
784
+ i0.ɵɵlistener("click", function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_2_Conditional_10_For_2_Template_div_click_0_listener() { const req_r19 = i0.ɵɵrestoreView(_r18).$implicit; const ctx_r0 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r0.OpenRequestDetail(req_r19)); });
785
+ i0.ɵɵelementStart(1, "div", 58)(2, "div", 117)(3, "span");
786
+ i0.ɵɵtext(4);
787
+ i0.ɵɵelementEnd();
788
+ i0.ɵɵconditionalCreate(5, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_2_Conditional_10_For_2_Conditional_5_Template, 3, 1, "span", 59);
789
+ i0.ɵɵelementStart(6, "span", 118);
790
+ i0.ɵɵtext(7);
791
+ i0.ɵɵelementEnd();
792
+ i0.ɵɵconditionalCreate(8, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_2_Conditional_10_For_2_Conditional_8_Template, 2, 0, "span", 119);
793
+ i0.ɵɵelementEnd();
794
+ i0.ɵɵelementStart(9, "span", 60);
795
+ i0.ɵɵtext(10);
796
+ i0.ɵɵpipe(11, "date");
797
+ i0.ɵɵelementEnd()();
798
+ i0.ɵɵelementStart(12, "p", 61);
799
+ i0.ɵɵtext(13);
800
+ i0.ɵɵelementEnd();
801
+ i0.ɵɵelementStart(14, "div", 62)(15, "button", 63);
802
+ i0.ɵɵlistener("click", function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_2_Conditional_10_For_2_Template_button_click_15_listener($event) { const req_r19 = i0.ɵɵrestoreView(_r18).$implicit; const ctx_r0 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r0.QuickRespondToRequest(req_r19, "Approved", $event)); });
803
+ i0.ɵɵelement(16, "i", 64);
804
+ i0.ɵɵtext(17, " Approve ");
805
+ i0.ɵɵelementEnd();
806
+ i0.ɵɵelementStart(18, "button", 65);
807
+ i0.ɵɵlistener("click", function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_2_Conditional_10_For_2_Template_button_click_18_listener($event) { const req_r19 = i0.ɵɵrestoreView(_r18).$implicit; const ctx_r0 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r0.QuickRespondToRequest(req_r19, "Rejected", $event)); });
808
+ i0.ɵɵelement(19, "i", 18);
809
+ i0.ɵɵtext(20, " Reject ");
810
+ i0.ɵɵelementEnd();
811
+ i0.ɵɵelementStart(21, "button", 39);
812
+ i0.ɵɵlistener("click", function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_2_Conditional_10_For_2_Template_button_click_21_listener($event) { const req_r19 = i0.ɵɵrestoreView(_r18).$implicit; const ctx_r0 = i0.ɵɵnextContext(4); ctx_r0.OpenRequestDetail(req_r19); return i0.ɵɵresetView($event.stopPropagation()); });
813
+ i0.ɵɵelement(22, "i", 120);
814
+ i0.ɵɵtext(23, " Full Details / Comment ");
815
+ i0.ɵɵelementEnd()()();
816
+ } if (rf & 2) {
817
+ const req_r19 = ctx.$implicit;
818
+ const ctx_r0 = i0.ɵɵnextContext(4);
819
+ i0.ɵɵadvance(3);
820
+ i0.ɵɵclassMap(i0.ɵɵinterpolate1("cos-priority-tag ", ctx_r0.GetPriorityTierClass(req_r19.Priority)));
821
+ i0.ɵɵadvance();
822
+ i0.ɵɵtextInterpolate2(" ", ctx_r0.GetPriorityTierLabel(req_r19.Priority), " (", req_r19.Priority, ") ");
823
+ i0.ɵɵadvance();
824
+ i0.ɵɵconditional(req_r19.RequestType ? 5 : -1);
825
+ i0.ɵɵadvance(2);
826
+ i0.ɵɵtextInterpolate1(" ", req_r19.Status, " ");
827
+ i0.ɵɵadvance();
828
+ i0.ɵɵconditional(ctx_r0.IsRequestExpired(req_r19) ? 8 : -1);
829
+ i0.ɵɵadvance(2);
830
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(11, 12, req_r19.RequestedAt, "short"), " ");
831
+ i0.ɵɵadvance(3);
832
+ i0.ɵɵtextInterpolate(req_r19.Request);
833
+ i0.ɵɵadvance(2);
834
+ i0.ɵɵproperty("disabled", ctx_r0.BusyRequestID === req_r19.ID);
835
+ i0.ɵɵadvance(3);
836
+ i0.ɵɵproperty("disabled", ctx_r0.BusyRequestID === req_r19.ID);
837
+ } }
838
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_2_Conditional_10_Template(rf, ctx) { if (rf & 1) {
839
+ i0.ɵɵelementStart(0, "div", 41);
840
+ i0.ɵɵrepeaterCreate(1, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_2_Conditional_10_For_2_Template, 24, 15, "div", 56, _forTrack1);
841
+ i0.ɵɵelementEnd();
842
+ } if (rf & 2) {
843
+ const ctx_r0 = i0.ɵɵnextContext(3);
844
+ i0.ɵɵadvance();
845
+ i0.ɵɵrepeater(ctx_r0.PendingRequests);
846
+ } }
847
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_2_Conditional_11_For_5_Template(rf, ctx) { if (rf & 1) {
848
+ const _r20 = i0.ɵɵgetCurrentView();
849
+ i0.ɵɵelementStart(0, "div", 124);
850
+ i0.ɵɵlistener("click", function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_2_Conditional_11_For_5_Template_div_click_0_listener() { const req_r21 = i0.ɵɵrestoreView(_r20).$implicit; const ctx_r0 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r0.OpenRequestDetail(req_r21)); });
851
+ i0.ɵɵelementStart(1, "div", 125)(2, "span");
852
+ i0.ɵɵtext(3);
853
+ i0.ɵɵelementEnd();
854
+ i0.ɵɵelementStart(4, "span", 126);
855
+ i0.ɵɵtext(5);
856
+ i0.ɵɵelementEnd()();
857
+ i0.ɵɵelementStart(6, "span", 60);
858
+ i0.ɵɵtext(7);
859
+ i0.ɵɵpipe(8, "date");
860
+ i0.ɵɵelementEnd()();
861
+ } if (rf & 2) {
862
+ const req_r21 = ctx.$implicit;
863
+ i0.ɵɵadvance(2);
864
+ i0.ɵɵclassMap(i0.ɵɵinterpolate1("cos-status-chip cos-status-chip--", req_r21.Status.toLowerCase()));
865
+ i0.ɵɵadvance();
866
+ i0.ɵɵtextInterpolate1(" ", req_r21.Status, " ");
867
+ i0.ɵɵadvance(2);
868
+ i0.ɵɵtextInterpolate(req_r21.Request);
869
+ i0.ɵɵadvance(2);
870
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(8, 6, req_r21.RespondedAt || req_r21.RequestedAt, "shortDate"), " ");
871
+ } }
872
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_2_Conditional_11_Template(rf, ctx) { if (rf & 1) {
873
+ i0.ɵɵelementStart(0, "div", 116)(1, "h4", 122);
874
+ i0.ɵɵtext(2, "Recent Resolved Decisions");
875
+ i0.ɵɵelementEnd();
876
+ i0.ɵɵelementStart(3, "div", 41);
877
+ i0.ɵɵrepeaterCreate(4, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_2_Conditional_11_For_5_Template, 9, 9, "div", 123, _forTrack1);
878
+ i0.ɵɵelementEnd()();
879
+ } if (rf & 2) {
880
+ const ctx_r0 = i0.ɵɵnextContext(3);
881
+ i0.ɵɵadvance(4);
882
+ i0.ɵɵrepeater(ctx_r0.RecentResolvedRequests);
883
+ } }
884
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_2_Conditional_20_Template(rf, ctx) { if (rf & 1) {
885
+ i0.ɵɵelementStart(0, "div", 40);
886
+ i0.ɵɵelement(1, "i", 66);
887
+ i0.ɵɵelementStart(2, "p");
888
+ i0.ɵɵtext(3, "No AgentWake routines found for your Chief of Staff.");
889
+ i0.ɵɵelementEnd()();
890
+ } }
891
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_2_Conditional_21_For_2_Conditional_10_Template(rf, ctx) { if (rf & 1) {
892
+ i0.ɵɵelementStart(0, "p", 131);
893
+ i0.ɵɵtext(1);
894
+ i0.ɵɵelementEnd();
895
+ } if (rf & 2) {
896
+ const routine_r23 = i0.ɵɵnextContext().$implicit;
897
+ i0.ɵɵadvance();
898
+ i0.ɵɵtextInterpolate(routine_r23.Description);
899
+ } }
900
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_2_Conditional_21_For_2_Conditional_15_Template(rf, ctx) { if (rf & 1) {
901
+ i0.ɵɵtext(0);
902
+ i0.ɵɵpipe(1, "date");
903
+ } if (rf & 2) {
904
+ const routine_r23 = i0.ɵɵnextContext().$implicit;
905
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(1, 1, routine_r23.NextRunAt, "medium"), " ");
906
+ } }
907
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_2_Conditional_21_For_2_Conditional_16_Template(rf, ctx) { if (rf & 1) {
908
+ i0.ɵɵtext(0, " Not scheduled ");
909
+ } }
910
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_2_Conditional_21_For_2_Conditional_17_Conditional_5_Template(rf, ctx) { if (rf & 1) {
911
+ i0.ɵɵelementStart(0, "span");
912
+ i0.ɵɵtext(1);
913
+ i0.ɵɵelementEnd();
914
+ } if (rf & 2) {
915
+ const routine_r23 = i0.ɵɵnextContext(2).$implicit;
916
+ i0.ɵɵadvance();
917
+ i0.ɵɵtextInterpolate1("(", routine_r23.Timezone, ")");
918
+ } }
919
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_2_Conditional_21_For_2_Conditional_17_Template(rf, ctx) { if (rf & 1) {
920
+ i0.ɵɵelementStart(0, "div")(1, "strong");
921
+ i0.ɵɵtext(2, "Cron:");
922
+ i0.ɵɵelementEnd();
923
+ i0.ɵɵelementStart(3, "code");
924
+ i0.ɵɵtext(4);
925
+ i0.ɵɵelementEnd();
926
+ i0.ɵɵconditionalCreate(5, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_2_Conditional_21_For_2_Conditional_17_Conditional_5_Template, 2, 1, "span");
927
+ i0.ɵɵelementEnd();
928
+ } if (rf & 2) {
929
+ const routine_r23 = i0.ɵɵnextContext().$implicit;
930
+ i0.ɵɵadvance(4);
931
+ i0.ɵɵtextInterpolate(routine_r23.CronExpression);
932
+ i0.ɵɵadvance();
933
+ i0.ɵɵconditional(routine_r23.Timezone ? 5 : -1);
934
+ } }
935
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_2_Conditional_21_For_2_Conditional_18_Conditional_5_Template(rf, ctx) { if (rf & 1) {
936
+ i0.ɵɵelementStart(0, "span", 59);
937
+ i0.ɵɵtext(1);
938
+ i0.ɵɵelementEnd();
939
+ } if (rf & 2) {
940
+ const routine_r23 = i0.ɵɵnextContext(2).$implicit;
941
+ i0.ɵɵadvance();
942
+ i0.ɵɵtextInterpolate(routine_r23.LastRunStatus);
943
+ } }
944
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_2_Conditional_21_For_2_Conditional_18_Template(rf, ctx) { if (rf & 1) {
945
+ i0.ɵɵelementStart(0, "div")(1, "strong");
946
+ i0.ɵɵtext(2, "Last Run:");
947
+ i0.ɵɵelementEnd();
948
+ i0.ɵɵtext(3);
949
+ i0.ɵɵpipe(4, "date");
950
+ i0.ɵɵconditionalCreate(5, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_2_Conditional_21_For_2_Conditional_18_Conditional_5_Template, 2, 1, "span", 59);
951
+ i0.ɵɵelementEnd();
952
+ } if (rf & 2) {
953
+ const routine_r23 = i0.ɵɵnextContext().$implicit;
954
+ i0.ɵɵadvance(3);
955
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(4, 2, routine_r23.LastRunAt, "short"), " ");
956
+ i0.ɵɵadvance(2);
957
+ i0.ɵɵconditional(routine_r23.LastRunStatus ? 5 : -1);
958
+ } }
959
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_2_Conditional_21_For_2_Conditional_24_Template(rf, ctx) { if (rf & 1) {
960
+ i0.ɵɵelement(0, "i", 136);
961
+ i0.ɵɵtext(1, " Pause ");
962
+ } }
963
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_2_Conditional_21_For_2_Conditional_25_Template(rf, ctx) { if (rf & 1) {
964
+ i0.ɵɵelement(0, "i", 137);
965
+ i0.ɵɵtext(1, " Resume ");
966
+ } }
967
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_2_Conditional_21_For_2_Template(rf, ctx) { if (rf & 1) {
968
+ const _r22 = i0.ɵɵgetCurrentView();
969
+ i0.ɵɵelementStart(0, "div", 127)(1, "div", 128)(2, "div")(3, "div", 129)(4, "h4", 130);
970
+ i0.ɵɵtext(5);
971
+ i0.ɵɵelementEnd();
972
+ i0.ɵɵelementStart(6, "span");
973
+ i0.ɵɵtext(7);
974
+ i0.ɵɵelementEnd();
975
+ i0.ɵɵelementStart(8, "span", 59);
976
+ i0.ɵɵtext(9);
977
+ i0.ɵɵelementEnd()();
978
+ i0.ɵɵconditionalCreate(10, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_2_Conditional_21_For_2_Conditional_10_Template, 2, 1, "p", 131);
979
+ i0.ɵɵelementEnd()();
980
+ i0.ɵɵelementStart(11, "div", 132)(12, "div")(13, "strong");
981
+ i0.ɵɵtext(14, "Next Wake:");
982
+ i0.ɵɵelementEnd();
983
+ i0.ɵɵconditionalCreate(15, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_2_Conditional_21_For_2_Conditional_15_Template, 2, 4)(16, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_2_Conditional_21_For_2_Conditional_16_Template, 1, 0);
984
+ i0.ɵɵelementEnd();
985
+ i0.ɵɵconditionalCreate(17, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_2_Conditional_21_For_2_Conditional_17_Template, 6, 2, "div");
986
+ i0.ɵɵconditionalCreate(18, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_2_Conditional_21_For_2_Conditional_18_Template, 6, 5, "div");
987
+ i0.ɵɵelementEnd();
988
+ i0.ɵɵelementStart(19, "div", 133)(20, "button", 63);
989
+ i0.ɵɵlistener("click", function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_2_Conditional_21_For_2_Template_button_click_20_listener($event) { const routine_r23 = i0.ɵɵrestoreView(_r22).$implicit; const ctx_r0 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r0.TriggerWakeNow(routine_r23, $event)); });
990
+ i0.ɵɵelement(21, "i", 73);
991
+ i0.ɵɵtext(22, " Wake Now ");
992
+ i0.ɵɵelementEnd();
993
+ i0.ɵɵelementStart(23, "button", 134);
994
+ i0.ɵɵlistener("click", function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_2_Conditional_21_For_2_Template_button_click_23_listener($event) { const routine_r23 = i0.ɵɵrestoreView(_r22).$implicit; const ctx_r0 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r0.ToggleRoutineStatus(routine_r23, $event)); });
995
+ i0.ɵɵconditionalCreate(24, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_2_Conditional_21_For_2_Conditional_24_Template, 2, 0)(25, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_2_Conditional_21_For_2_Conditional_25_Template, 2, 0);
996
+ i0.ɵɵelementEnd();
997
+ i0.ɵɵelementStart(26, "button", 81);
998
+ i0.ɵɵlistener("click", function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_2_Conditional_21_For_2_Template_button_click_26_listener($event) { const routine_r23 = i0.ɵɵrestoreView(_r22).$implicit; const ctx_r0 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r0.OpenRoutineEntityRecord(routine_r23.ID, $event)); });
999
+ i0.ɵɵelement(27, "i", 135);
1000
+ i0.ɵɵtext(28, " Open Record ");
1001
+ i0.ɵɵelementEnd()()();
1002
+ } if (rf & 2) {
1003
+ const routine_r23 = ctx.$implicit;
1004
+ const ctx_r0 = i0.ɵɵnextContext(4);
1005
+ i0.ɵɵadvance(5);
1006
+ i0.ɵɵtextInterpolate(routine_r23.Name);
1007
+ i0.ɵɵadvance();
1008
+ i0.ɵɵclassMap(i0.ɵɵinterpolate1("cos-status-chip cos-status-chip--", routine_r23.Status.toLowerCase()));
1009
+ i0.ɵɵadvance();
1010
+ i0.ɵɵtextInterpolate1(" ", routine_r23.Status, " ");
1011
+ i0.ɵɵadvance(2);
1012
+ i0.ɵɵtextInterpolate1(" ", routine_r23.ScheduleMode, " ");
1013
+ i0.ɵɵadvance();
1014
+ i0.ɵɵconditional(routine_r23.Description ? 10 : -1);
1015
+ i0.ɵɵadvance(5);
1016
+ i0.ɵɵconditional(routine_r23.NextRunAt ? 15 : 16);
1017
+ i0.ɵɵadvance(2);
1018
+ i0.ɵɵconditional(routine_r23.CronExpression ? 17 : -1);
1019
+ i0.ɵɵadvance();
1020
+ i0.ɵɵconditional(routine_r23.LastRunAt ? 18 : -1);
1021
+ i0.ɵɵadvance(2);
1022
+ i0.ɵɵproperty("disabled", ctx_r0.BusyRoutineID === routine_r23.ID);
1023
+ i0.ɵɵadvance(3);
1024
+ i0.ɵɵproperty("disabled", ctx_r0.BusyRoutineID === routine_r23.ID);
1025
+ i0.ɵɵadvance();
1026
+ i0.ɵɵconditional(routine_r23.Status === "Active" ? 24 : 25);
1027
+ } }
1028
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_2_Conditional_21_Template(rf, ctx) { if (rf & 1) {
1029
+ i0.ɵɵelementStart(0, "div", 41);
1030
+ i0.ɵɵrepeaterCreate(1, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_2_Conditional_21_For_2_Template, 29, 13, "div", 127, _forTrack1);
1031
+ i0.ɵɵelementEnd();
1032
+ } if (rf & 2) {
1033
+ const ctx_r0 = i0.ɵɵnextContext(3);
1034
+ i0.ɵɵadvance();
1035
+ i0.ɵɵrepeater(ctx_r0.FilteredRoutines);
1036
+ } }
1037
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_2_Template(rf, ctx) { if (rf & 1) {
1038
+ i0.ɵɵelementStart(0, "div", 20)(1, "section", 35)(2, "div", 36)(3, "div")(4, "h3", 37);
1039
+ i0.ɵɵelement(5, "i", 33);
1040
+ i0.ɵɵtext(6);
1041
+ i0.ɵɵelementEnd();
1042
+ i0.ɵɵelementStart(7, "p", 38);
1043
+ i0.ɵɵtext(8, " Approve or reject escalations from your Chief of Staff ");
1044
+ i0.ɵɵelementEnd()()();
1045
+ i0.ɵɵconditionalCreate(9, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_2_Conditional_9_Template, 4, 0, "div", 40)(10, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_2_Conditional_10_Template, 3, 0, "div", 41);
1046
+ i0.ɵɵconditionalCreate(11, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_2_Conditional_11_Template, 6, 0, "div", 116);
1047
+ i0.ɵɵelementEnd();
1048
+ i0.ɵɵelementStart(12, "section", 35)(13, "div", 36)(14, "div")(15, "h3", 37);
1049
+ i0.ɵɵelement(16, "i", 42);
1050
+ i0.ɵɵtext(17);
1051
+ i0.ɵɵelementEnd();
1052
+ i0.ɵɵelementStart(18, "p", 38);
1053
+ i0.ɵɵtext(19, " Scheduled AgentWake routines in MJ: User Routines ");
1054
+ i0.ɵɵelementEnd()()();
1055
+ i0.ɵɵconditionalCreate(20, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_2_Conditional_20_Template, 4, 0, "div", 40)(21, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_2_Conditional_21_Template, 3, 0, "div", 41);
1056
+ i0.ɵɵelementEnd()();
1057
+ } if (rf & 2) {
1058
+ const ctx_r0 = i0.ɵɵnextContext(2);
1059
+ i0.ɵɵadvance(6);
1060
+ i0.ɵɵtextInterpolate1(" Pending Agent Approvals (", ctx_r0.PendingRequests.length, ") ");
1061
+ i0.ɵɵadvance(3);
1062
+ i0.ɵɵconditional(ctx_r0.PendingRequests.length === 0 ? 9 : 10);
1063
+ i0.ɵɵadvance(2);
1064
+ i0.ɵɵconditional(ctx_r0.RecentResolvedRequests.length > 0 ? 11 : -1);
1065
+ i0.ɵɵadvance(6);
1066
+ i0.ɵɵtextInterpolate1(" Autonomous Wake Routines (", ctx_r0.FilteredRoutines.length, ") ");
1067
+ i0.ɵɵadvance(3);
1068
+ i0.ɵɵconditional(ctx_r0.FilteredRoutines.length === 0 ? 20 : 21);
1069
+ } }
1070
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_3_Conditional_12_Template(rf, ctx) { if (rf & 1) {
1071
+ const _r25 = i0.ɵɵgetCurrentView();
1072
+ i0.ɵɵelementStart(0, "button", 39);
1073
+ i0.ɵɵlistener("click", function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_3_Conditional_12_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r25); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.OpenPolicyEntityRecord()); });
1074
+ i0.ɵɵelement(1, "i", 135);
1075
+ i0.ɵɵtext(2, " Open Policy Record ");
1076
+ i0.ɵɵelementEnd();
1077
+ } }
1078
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_3_Conditional_13_Template(rf, ctx) { if (rf & 1) {
1079
+ const _r26 = i0.ɵɵgetCurrentView();
1080
+ i0.ɵɵelementStart(0, "button", 134);
1081
+ i0.ɵɵlistener("click", function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_3_Conditional_13_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r26); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.ResetDraftPolicy()); });
1082
+ i0.ɵɵtext(1, " Reset Changes ");
1083
+ i0.ɵɵelementEnd();
1084
+ } if (rf & 2) {
1085
+ const ctx_r0 = i0.ɵɵnextContext(3);
1086
+ i0.ɵɵproperty("disabled", ctx_r0.IsSavingPolicy);
1087
+ } }
1088
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_3_For_26_Template(rf, ctx) { if (rf & 1) {
1089
+ const _r27 = i0.ɵɵgetCurrentView();
1090
+ i0.ɵɵelementStart(0, "button", 80);
1091
+ i0.ɵɵlistener("click", function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_3_For_26_Template_button_click_0_listener() { const st_r28 = i0.ɵɵrestoreView(_r27).$implicit; const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.SetPolicyStatus(st_r28)); });
1092
+ i0.ɵɵtext(1);
1093
+ i0.ɵɵelementEnd();
1094
+ } if (rf & 2) {
1095
+ const st_r28 = ctx.$implicit;
1096
+ const ctx_r0 = i0.ɵɵnextContext(3);
1097
+ i0.ɵɵproperty("variant", ctx_r0.DraftPolicy.Status === st_r28 ? "primary" : "outline");
1098
+ i0.ɵɵadvance();
1099
+ i0.ɵɵtextInterpolate1(" ", st_r28, " ");
1100
+ } }
1101
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_3_For_29_Conditional_4_Template(rf, ctx) { if (rf & 1) {
1102
+ i0.ɵɵelement(0, "i", 167);
1103
+ } }
1104
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_3_For_29_Template(rf, ctx) { if (rf & 1) {
1105
+ const _r29 = i0.ɵɵgetCurrentView();
1106
+ i0.ɵɵelementStart(0, "div", 164);
1107
+ i0.ɵɵlistener("click", function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_3_For_29_Template_div_click_0_listener() { const mode_r30 = i0.ɵɵrestoreView(_r29).$implicit; const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.SetCoordinationMode(mode_r30.Value)); });
1108
+ i0.ɵɵelementStart(1, "div", 165)(2, "span", 166);
1109
+ i0.ɵɵtext(3);
1110
+ i0.ɵɵelementEnd();
1111
+ i0.ɵɵconditionalCreate(4, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_3_For_29_Conditional_4_Template, 1, 0, "i", 167);
1112
+ i0.ɵɵelementEnd();
1113
+ i0.ɵɵelementStart(5, "p", 168);
1114
+ i0.ɵɵtext(6);
1115
+ i0.ɵɵelementEnd()();
1116
+ } if (rf & 2) {
1117
+ const mode_r30 = ctx.$implicit;
1118
+ const ctx_r0 = i0.ɵɵnextContext(3);
1119
+ i0.ɵɵclassProp("cos-mode-card--selected", ctx_r0.DraftPolicy.CoordinationMode === mode_r30.Value);
1120
+ i0.ɵɵadvance(3);
1121
+ i0.ɵɵtextInterpolate(mode_r30.Label);
1122
+ i0.ɵɵadvance();
1123
+ i0.ɵɵconditional(ctx_r0.DraftPolicy.CoordinationMode === mode_r30.Value ? 4 : -1);
1124
+ i0.ɵɵadvance(2);
1125
+ i0.ɵɵtextInterpolate(mode_r30.Description);
1126
+ } }
1127
+ function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_3_Template(rf, ctx) { if (rf & 1) {
1128
+ const _r24 = i0.ɵɵgetCurrentView();
1129
+ i0.ɵɵelementStart(0, "div", 21)(1, "div", 138)(2, "div")(3, "h3", 139);
1130
+ i0.ɵɵelement(4, "i", 34);
1131
+ i0.ɵɵtext(5, " Chief of Staff Governance Policy ");
1132
+ i0.ɵɵelementEnd();
1133
+ i0.ɵɵelementStart(6, "p", 140);
1134
+ i0.ɵɵtext(7, " Backed by ");
1135
+ i0.ɵɵelementStart(8, "code");
1136
+ i0.ɵɵtext(9, "MJ: AI Agent User Policies");
1137
+ i0.ɵɵelementEnd();
1138
+ i0.ɵɵtext(10, " \u2014 controls coordination autonomy, communication channels, and approval guardrails for your Chief of Staff. ");
1139
+ i0.ɵɵelementEnd()();
1140
+ i0.ɵɵelementStart(11, "div", 141);
1141
+ i0.ɵɵconditionalCreate(12, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_3_Conditional_12_Template, 3, 0, "button", 142);
1142
+ i0.ɵɵconditionalCreate(13, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_3_Conditional_13_Template, 2, 1, "button", 143);
1143
+ i0.ɵɵelementStart(14, "button", 63);
1144
+ i0.ɵɵlistener("click", function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_3_Template_button_click_14_listener() { i0.ɵɵrestoreView(_r24); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.SaveGovernancePolicy()); });
1145
+ i0.ɵɵelement(15, "i", 144);
1146
+ i0.ɵɵtext(16);
1147
+ i0.ɵɵelementEnd()()();
1148
+ i0.ɵɵelementStart(17, "section", 35)(18, "div", 36)(19, "div")(20, "h4", 37);
1149
+ i0.ɵɵtext(21, "1. Autonomy & Coordination Mode");
1150
+ i0.ɵɵelementEnd();
1151
+ i0.ɵɵelementStart(22, "p", 38);
1152
+ i0.ɵɵtext(23, " Select how proactively your Chief of Staff operates across your workspace ");
1153
+ i0.ɵɵelementEnd()();
1154
+ i0.ɵɵelementStart(24, "div", 145);
1155
+ i0.ɵɵrepeaterCreate(25, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_3_For_26_Template, 2, 2, "button", 76, i0.ɵɵrepeaterTrackByIdentity);
1156
+ i0.ɵɵelementEnd()();
1157
+ i0.ɵɵelementStart(27, "div", 146);
1158
+ i0.ɵɵrepeaterCreate(28, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_3_For_29_Template, 7, 5, "div", 147, _forTrack2);
1159
+ i0.ɵɵelementEnd();
1160
+ i0.ɵɵelementStart(30, "div", 148)(31, "label", 149)(32, "span", 150);
1161
+ i0.ɵɵtext(33, "Custom Display Name");
1162
+ i0.ɵɵelementEnd();
1163
+ i0.ɵɵelementStart(34, "input", 151);
1164
+ i0.ɵɵlistener("input", function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_3_Template_input_input_34_listener($event) { i0.ɵɵrestoreView(_r24); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.OnDisplayNameInput($event)); });
1165
+ i0.ɵɵelementEnd()();
1166
+ i0.ɵɵelementStart(35, "label", 149)(36, "span", 150);
1167
+ i0.ɵɵtext(37, "Default Data Access Mode");
1168
+ i0.ɵɵelementEnd();
1169
+ i0.ɵɵelementStart(38, "mj-dropdown", 152);
1170
+ i0.ɵɵtwoWayListener("ngModelChange", function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_3_Template_mj_dropdown_ngModelChange_38_listener($event) { i0.ɵɵrestoreView(_r24); const ctx_r0 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r0.DraftPolicy.DefaultDataAccessMode, $event) || (ctx_r0.DraftPolicy.DefaultDataAccessMode = $event); return i0.ɵɵresetView($event); });
1171
+ i0.ɵɵlistener("ValueChange", function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_3_Template_mj_dropdown_ValueChange_38_listener() { i0.ɵɵrestoreView(_r24); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.MarkPolicyDirty()); });
1172
+ i0.ɵɵelementEnd()()()();
1173
+ i0.ɵɵelementStart(39, "section", 35)(40, "div", 36)(41, "div")(42, "h4", 37);
1174
+ i0.ɵɵtext(43, "2. Communication Channel Permissions");
1175
+ i0.ɵɵelementEnd();
1176
+ i0.ɵɵelementStart(44, "p", 38);
1177
+ i0.ɵɵtext(45, " Configure what your Chief of Staff is permitted to do on each channel ");
1178
+ i0.ɵɵelementEnd()()();
1179
+ i0.ɵɵelementStart(46, "div", 148)(47, "label", 149)(48, "span", 150);
1180
+ i0.ɵɵelement(49, "i", 153);
1181
+ i0.ɵɵtext(50, " Email Channel Mode ");
1182
+ i0.ɵɵelementEnd();
1183
+ i0.ɵɵelementStart(51, "mj-dropdown", 152);
1184
+ i0.ɵɵtwoWayListener("ngModelChange", function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_3_Template_mj_dropdown_ngModelChange_51_listener($event) { i0.ɵɵrestoreView(_r24); const ctx_r0 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r0.DraftPolicy.EmailChannelMode, $event) || (ctx_r0.DraftPolicy.EmailChannelMode = $event); return i0.ɵɵresetView($event); });
1185
+ i0.ɵɵlistener("ValueChange", function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_3_Template_mj_dropdown_ValueChange_51_listener() { i0.ɵɵrestoreView(_r24); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.MarkPolicyDirty()); });
1186
+ i0.ɵɵelementEnd()();
1187
+ i0.ɵɵelementStart(52, "label", 149)(53, "span", 150);
1188
+ i0.ɵɵelement(54, "i", 54);
1189
+ i0.ɵɵtext(55, " Calendar Channel Mode ");
1190
+ i0.ɵɵelementEnd();
1191
+ i0.ɵɵelementStart(56, "mj-dropdown", 152);
1192
+ i0.ɵɵtwoWayListener("ngModelChange", function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_3_Template_mj_dropdown_ngModelChange_56_listener($event) { i0.ɵɵrestoreView(_r24); const ctx_r0 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r0.DraftPolicy.CalendarChannelMode, $event) || (ctx_r0.DraftPolicy.CalendarChannelMode = $event); return i0.ɵɵresetView($event); });
1193
+ i0.ɵɵlistener("ValueChange", function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_3_Template_mj_dropdown_ValueChange_56_listener() { i0.ɵɵrestoreView(_r24); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.MarkPolicyDirty()); });
1194
+ i0.ɵɵelementEnd()();
1195
+ i0.ɵɵelementStart(57, "label", 149)(58, "span", 150);
1196
+ i0.ɵɵelement(59, "i", 154);
1197
+ i0.ɵɵtext(60, " Phone Channel Mode ");
1198
+ i0.ɵɵelementEnd();
1199
+ i0.ɵɵelementStart(61, "mj-dropdown", 152);
1200
+ i0.ɵɵtwoWayListener("ngModelChange", function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_3_Template_mj_dropdown_ngModelChange_61_listener($event) { i0.ɵɵrestoreView(_r24); const ctx_r0 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r0.DraftPolicy.PhoneChannelMode, $event) || (ctx_r0.DraftPolicy.PhoneChannelMode = $event); return i0.ɵɵresetView($event); });
1201
+ i0.ɵɵlistener("ValueChange", function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_3_Template_mj_dropdown_ValueChange_61_listener() { i0.ɵɵrestoreView(_r24); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.MarkPolicyDirty()); });
1202
+ i0.ɵɵelementEnd()();
1203
+ i0.ɵɵelementStart(62, "label", 149)(63, "span", 150);
1204
+ i0.ɵɵelement(64, "i", 155);
1205
+ i0.ɵɵtext(65, " Messaging Channel Mode ");
1206
+ i0.ɵɵelementEnd();
1207
+ i0.ɵɵelementStart(66, "mj-dropdown", 152);
1208
+ i0.ɵɵtwoWayListener("ngModelChange", function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_3_Template_mj_dropdown_ngModelChange_66_listener($event) { i0.ɵɵrestoreView(_r24); const ctx_r0 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r0.DraftPolicy.MessagingChannelMode, $event) || (ctx_r0.DraftPolicy.MessagingChannelMode = $event); return i0.ɵɵresetView($event); });
1209
+ i0.ɵɵlistener("ValueChange", function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_3_Template_mj_dropdown_ValueChange_66_listener() { i0.ɵɵrestoreView(_r24); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.MarkPolicyDirty()); });
1210
+ i0.ɵɵelementEnd()()()();
1211
+ i0.ɵɵelementStart(67, "section", 35)(68, "div", 36)(69, "div")(70, "h4", 37);
1212
+ i0.ɵɵtext(71, "3. Approval Guardrails & Standing Instructions");
1213
+ i0.ɵɵelementEnd();
1214
+ i0.ɵɵelementStart(72, "p", 38);
1215
+ i0.ɵɵtext(73, " Enforce mandatory human-in-the-loop approval gates before sensitive actions execute ");
1216
+ i0.ɵɵelementEnd()()();
1217
+ i0.ɵɵelementStart(74, "div", 156)(75, "div", 157);
1218
+ i0.ɵɵlistener("click", function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_3_Template_div_click_75_listener() { i0.ɵɵrestoreView(_r24); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.ToggleApprovalGuardrail("RequireApprovalForExternalComms")); });
1219
+ i0.ɵɵelementStart(76, "div")(77, "div", 158);
1220
+ i0.ɵɵtext(78, "Require Approval for External Communications");
1221
+ i0.ɵɵelementEnd();
1222
+ i0.ɵɵelementStart(79, "div", 159);
1223
+ i0.ɵɵtext(80, " Always create an approval request before sending emails or messages to external recipients. ");
1224
+ i0.ɵɵelementEnd()();
1225
+ i0.ɵɵelementStart(81, "button", 80);
1226
+ i0.ɵɵlistener("click", function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_3_Template_button_click_81_listener($event) { i0.ɵɵrestoreView(_r24); const ctx_r0 = i0.ɵɵnextContext(2); ctx_r0.ToggleApprovalGuardrail("RequireApprovalForExternalComms"); return i0.ɵɵresetView($event.stopPropagation()); });
1227
+ i0.ɵɵtext(82);
1228
+ i0.ɵɵelementEnd()();
1229
+ i0.ɵɵelementStart(83, "div", 157);
1230
+ i0.ɵɵlistener("click", function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_3_Template_div_click_83_listener() { i0.ɵɵrestoreView(_r24); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.ToggleApprovalGuardrail("RequireApprovalForFinancials")); });
1231
+ i0.ɵɵelementStart(84, "div")(85, "div", 158);
1232
+ i0.ɵɵtext(86, "Require Approval for Financial Commitments");
1233
+ i0.ɵɵelementEnd();
1234
+ i0.ɵɵelementStart(87, "div", 159);
1235
+ i0.ɵɵtext(88, " Require explicit approval for any financial transaction above the auto-approve threshold. ");
1236
+ i0.ɵɵelementEnd()();
1237
+ i0.ɵɵelementStart(89, "button", 80);
1238
+ i0.ɵɵlistener("click", function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_3_Template_button_click_89_listener($event) { i0.ɵɵrestoreView(_r24); const ctx_r0 = i0.ɵɵnextContext(2); ctx_r0.ToggleApprovalGuardrail("RequireApprovalForFinancials"); return i0.ɵɵresetView($event.stopPropagation()); });
1239
+ i0.ɵɵtext(90);
1240
+ i0.ɵɵelementEnd()();
1241
+ i0.ɵɵelementStart(91, "div", 157);
1242
+ i0.ɵɵlistener("click", function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_3_Template_div_click_91_listener() { i0.ɵɵrestoreView(_r24); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.ToggleApprovalGuardrail("RequireApprovalForDestructiveActions")); });
1243
+ i0.ɵɵelementStart(92, "div")(93, "div", 158);
1244
+ i0.ɵɵtext(94, "Require Approval for Destructive Actions");
1245
+ i0.ɵɵelementEnd();
1246
+ i0.ɵɵelementStart(95, "div", 159);
1247
+ i0.ɵɵtext(96, " Require human confirmation before deleting records, canceling events, or revoking access. ");
1248
+ i0.ɵɵelementEnd()();
1249
+ i0.ɵɵelementStart(97, "button", 80);
1250
+ i0.ɵɵlistener("click", function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_3_Template_button_click_97_listener($event) { i0.ɵɵrestoreView(_r24); const ctx_r0 = i0.ɵɵnextContext(2); ctx_r0.ToggleApprovalGuardrail("RequireApprovalForDestructiveActions"); return i0.ɵɵresetView($event.stopPropagation()); });
1251
+ i0.ɵɵtext(98);
1252
+ i0.ɵɵelementEnd()();
1253
+ i0.ɵɵelementStart(99, "div", 157);
1254
+ i0.ɵɵlistener("click", function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_3_Template_div_click_99_listener() { i0.ɵɵrestoreView(_r24); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.ToggleApprovalGuardrail("AllowInterAgentCoordination")); });
1255
+ i0.ɵɵelementStart(100, "div")(101, "div", 158);
1256
+ i0.ɵɵtext(102, "Allow Inter-Agent Delegation & Coordination");
1257
+ i0.ɵɵelementEnd();
1258
+ i0.ɵɵelementStart(103, "div", 159);
1259
+ i0.ɵɵtext(104, " Permit your Chief of Staff to invoke specialist sub-agents and coordinate with peer agents. ");
1260
+ i0.ɵɵelementEnd()();
1261
+ i0.ɵɵelementStart(105, "button", 80);
1262
+ i0.ɵɵlistener("click", function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_3_Template_button_click_105_listener($event) { i0.ɵɵrestoreView(_r24); const ctx_r0 = i0.ɵɵnextContext(2); ctx_r0.ToggleApprovalGuardrail("AllowInterAgentCoordination"); return i0.ɵɵresetView($event.stopPropagation()); });
1263
+ i0.ɵɵtext(106);
1264
+ i0.ɵɵelementEnd()()();
1265
+ i0.ɵɵelementStart(107, "div", 160)(108, "label", 149)(109, "span", 150);
1266
+ i0.ɵɵtext(110, "Auto-Approve Financial Threshold (USD)");
1267
+ i0.ɵɵelementEnd();
1268
+ i0.ɵɵelementStart(111, "input", 161);
1269
+ i0.ɵɵlistener("input", function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_3_Template_input_input_111_listener($event) { i0.ɵɵrestoreView(_r24); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.OnThresholdInputEvent($event)); });
1270
+ i0.ɵɵelementEnd()();
1271
+ i0.ɵɵelementStart(112, "label", 162)(113, "span", 150);
1272
+ i0.ɵɵtext(114, "Standing Executive Instructions Override");
1273
+ i0.ɵɵelementEnd();
1274
+ i0.ɵɵelementStart(115, "textarea", 163);
1275
+ i0.ɵɵlistener("input", function ChiefOfStaffDashboardComponent_Conditional_15_Conditional_3_Template_textarea_input_115_listener($event) { i0.ɵɵrestoreView(_r24); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.OnInstructionsOverrideInput($event)); });
1276
+ i0.ɵɵelementEnd()()()()();
1277
+ } if (rf & 2) {
1278
+ const ctx_r0 = i0.ɵɵnextContext(2);
1279
+ i0.ɵɵadvance(12);
1280
+ i0.ɵɵconditional(ctx_r0.PolicyEntity ? 12 : -1);
1281
+ i0.ɵɵadvance();
1282
+ i0.ɵɵconditional(ctx_r0.PolicyDirty ? 13 : -1);
1283
+ i0.ɵɵadvance();
1284
+ i0.ɵɵproperty("disabled", ctx_r0.IsSavingPolicy || !ctx_r0.PolicyDirty);
1285
+ i0.ɵɵadvance(2);
1286
+ i0.ɵɵtextInterpolate1(" ", ctx_r0.IsSavingPolicy ? "Saving..." : "Save Policy Changes", " ");
1287
+ i0.ɵɵadvance(9);
1288
+ i0.ɵɵrepeater(ctx_r0.StatusOptions);
1289
+ i0.ɵɵadvance(3);
1290
+ i0.ɵɵrepeater(ctx_r0.CoordinationModeOptions);
1291
+ i0.ɵɵadvance(6);
1292
+ i0.ɵɵproperty("value", ctx_r0.DraftPolicy.DisplayNameOverride);
1293
+ i0.ɵɵadvance(4);
1294
+ i0.ɵɵproperty("Data", ctx_r0.DataAccessModeOptions)("ValuePrimitive", true);
1295
+ i0.ɵɵtwoWayProperty("ngModel", ctx_r0.DraftPolicy.DefaultDataAccessMode);
1296
+ i0.ɵɵadvance(13);
1297
+ i0.ɵɵproperty("Data", ctx_r0.EmailChannelOptions)("ValuePrimitive", true);
1298
+ i0.ɵɵtwoWayProperty("ngModel", ctx_r0.DraftPolicy.EmailChannelMode);
1299
+ i0.ɵɵadvance(5);
1300
+ i0.ɵɵproperty("Data", ctx_r0.CalendarChannelOptions)("ValuePrimitive", true);
1301
+ i0.ɵɵtwoWayProperty("ngModel", ctx_r0.DraftPolicy.CalendarChannelMode);
1302
+ i0.ɵɵadvance(5);
1303
+ i0.ɵɵproperty("Data", ctx_r0.PhoneChannelOptions)("ValuePrimitive", true);
1304
+ i0.ɵɵtwoWayProperty("ngModel", ctx_r0.DraftPolicy.PhoneChannelMode);
1305
+ i0.ɵɵadvance(5);
1306
+ i0.ɵɵproperty("Data", ctx_r0.MessagingChannelOptions)("ValuePrimitive", true);
1307
+ i0.ɵɵtwoWayProperty("ngModel", ctx_r0.DraftPolicy.MessagingChannelMode);
1308
+ i0.ɵɵadvance(15);
1309
+ i0.ɵɵproperty("variant", ctx_r0.DraftPolicy.RequireApprovalForExternalComms ? "primary" : "outline");
1310
+ i0.ɵɵadvance();
1311
+ i0.ɵɵtextInterpolate1(" ", ctx_r0.DraftPolicy.RequireApprovalForExternalComms ? "Required" : "Not Required", " ");
1312
+ i0.ɵɵadvance(7);
1313
+ i0.ɵɵproperty("variant", ctx_r0.DraftPolicy.RequireApprovalForFinancials ? "primary" : "outline");
1314
+ i0.ɵɵadvance();
1315
+ i0.ɵɵtextInterpolate1(" ", ctx_r0.DraftPolicy.RequireApprovalForFinancials ? "Required" : "Not Required", " ");
1316
+ i0.ɵɵadvance(7);
1317
+ i0.ɵɵproperty("variant", ctx_r0.DraftPolicy.RequireApprovalForDestructiveActions ? "primary" : "outline");
1318
+ i0.ɵɵadvance();
1319
+ i0.ɵɵtextInterpolate1(" ", ctx_r0.DraftPolicy.RequireApprovalForDestructiveActions ? "Required" : "Not Required", " ");
1320
+ i0.ɵɵadvance(7);
1321
+ i0.ɵɵproperty("variant", ctx_r0.DraftPolicy.AllowInterAgentCoordination ? "primary" : "outline");
1322
+ i0.ɵɵadvance();
1323
+ i0.ɵɵtextInterpolate1(" ", ctx_r0.DraftPolicy.AllowInterAgentCoordination ? "Allowed" : "Blocked", " ");
1324
+ i0.ɵɵadvance(5);
1325
+ i0.ɵɵproperty("value", ctx_r0.DraftPolicy.AutoApproveAmountThreshold ?? "");
1326
+ i0.ɵɵadvance(4);
1327
+ i0.ɵɵproperty("value", ctx_r0.DraftPolicy.InstructionsOverride);
1328
+ } }
1329
+ function ChiefOfStaffDashboardComponent_Conditional_15_Template(rf, ctx) { if (rf & 1) {
1330
+ i0.ɵɵconditionalCreate(0, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_0_Template, 81, 20);
1331
+ i0.ɵɵconditionalCreate(1, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_1_Template, 7, 2);
1332
+ i0.ɵɵconditionalCreate(2, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_2_Template, 22, 5, "div", 20);
1333
+ i0.ɵɵconditionalCreate(3, ChiefOfStaffDashboardComponent_Conditional_15_Conditional_3_Template, 116, 30, "div", 21);
1334
+ } if (rf & 2) {
1335
+ const ctx_r0 = i0.ɵɵnextContext();
1336
+ i0.ɵɵconditional(ctx_r0.ActiveTab === "overview" ? 0 : -1);
1337
+ i0.ɵɵadvance();
1338
+ i0.ɵɵconditional(ctx_r0.ActiveTab === "priorities" ? 1 : -1);
1339
+ i0.ɵɵadvance();
1340
+ i0.ɵɵconditional(ctx_r0.ActiveTab === "approvals-wakes" ? 2 : -1);
1341
+ i0.ɵɵadvance();
1342
+ i0.ɵɵconditional(ctx_r0.ActiveTab === "governance" ? 3 : -1);
1343
+ } }
1344
+ function ChiefOfStaffDashboardComponent_Conditional_16_Template(rf, ctx) { if (rf & 1) {
1345
+ const _r31 = i0.ɵɵgetCurrentView();
1346
+ i0.ɵɵelementStart(0, "mj-agent-request-dialog", 169);
1347
+ i0.ɵɵlistener("Close", function ChiefOfStaffDashboardComponent_Conditional_16_Template_mj_agent_request_dialog_Close_0_listener($event) { i0.ɵɵrestoreView(_r31); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.OnRequestDialogClose($event)); });
1348
+ i0.ɵɵelementEnd();
1349
+ } if (rf & 2) {
1350
+ const ctx_r0 = i0.ɵɵnextContext();
1351
+ i0.ɵɵproperty("Visible", ctx_r0.ShowRequestDialog)("Request", ctx_r0.SelectedRequest);
1352
+ } }
1353
+ function ChiefOfStaffDashboardComponent_Conditional_17_Conditional_5_Template(rf, ctx) { if (rf & 1) {
1354
+ i0.ɵɵelementStart(0, "span", 174);
1355
+ i0.ɵɵelement(1, "i", 27);
1356
+ i0.ɵɵtext(2, " Priority Objective ");
1357
+ i0.ɵɵelementEnd();
1358
+ } }
1359
+ function ChiefOfStaffDashboardComponent_Conditional_17_Conditional_6_Conditional_3_Template(rf, ctx) { if (rf & 1) {
1360
+ const _r33 = i0.ɵɵgetCurrentView();
1361
+ i0.ɵɵelementStart(0, "button", 198);
1362
+ i0.ɵɵlistener("click", function ChiefOfStaffDashboardComponent_Conditional_17_Conditional_6_Conditional_3_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r33); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.OpenTaskRecord(ctx_r0.SelectedTaskParent.ID)); });
1363
+ i0.ɵɵelement(1, "i", 199);
1364
+ i0.ɵɵtext(2);
1365
+ i0.ɵɵelementEnd();
1366
+ } if (rf & 2) {
1367
+ const ctx_r0 = i0.ɵɵnextContext(3);
1368
+ i0.ɵɵadvance(2);
1369
+ i0.ɵɵtextInterpolate1(" ", ctx_r0.SelectedTaskParent.Name, " ");
1370
+ } }
1371
+ function ChiefOfStaffDashboardComponent_Conditional_17_Conditional_6_Template(rf, ctx) { if (rf & 1) {
1372
+ i0.ɵɵelementStart(0, "span", 196);
1373
+ i0.ɵɵelement(1, "i", 51);
1374
+ i0.ɵɵtext(2, " Milestone ");
1375
+ i0.ɵɵelementEnd();
1376
+ i0.ɵɵconditionalCreate(3, ChiefOfStaffDashboardComponent_Conditional_17_Conditional_6_Conditional_3_Template, 3, 1, "button", 197);
1377
+ } if (rf & 2) {
1378
+ const ctx_r0 = i0.ɵɵnextContext(2);
1379
+ i0.ɵɵadvance(3);
1380
+ i0.ɵɵconditional(ctx_r0.SelectedTaskParent ? 3 : -1);
1381
+ } }
1382
+ function ChiefOfStaffDashboardComponent_Conditional_17_Conditional_10_Template(rf, ctx) { if (rf & 1) {
1383
+ const _r34 = i0.ɵɵgetCurrentView();
1384
+ i0.ɵɵelementStart(0, "button", 200);
1385
+ i0.ɵɵlistener("click", function ChiefOfStaffDashboardComponent_Conditional_17_Conditional_10_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r34); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.OpenFullTaskForm()); });
1386
+ i0.ɵɵelement(1, "i", 135);
1387
+ i0.ɵɵtext(2, " Full Form ");
1388
+ i0.ɵɵelementEnd();
1389
+ } }
1390
+ function ChiefOfStaffDashboardComponent_Conditional_17_Conditional_15_Template(rf, ctx) { if (rf & 1) {
1391
+ i0.ɵɵelementStart(0, "span");
1392
+ i0.ɵɵelement(1, "i");
1393
+ i0.ɵɵtext(2);
1394
+ i0.ɵɵelementEnd();
1395
+ } if (rf & 2) {
1396
+ const ctx_r0 = i0.ɵɵnextContext(2);
1397
+ i0.ɵɵclassMap(i0.ɵɵinterpolate1("cos-health-pill cos-health-pill--", ctx_r0.SelectedTask.HealthStatus.toLowerCase()));
1398
+ i0.ɵɵadvance();
1399
+ i0.ɵɵclassMap(ctx_r0.GetHealthBadgeIcon(ctx_r0.SelectedTask.HealthStatus));
1400
+ i0.ɵɵadvance();
1401
+ i0.ɵɵtextInterpolate1(" ", ctx_r0.GetHealthBadgeLabel(ctx_r0.SelectedTask.HealthStatus), " ");
1402
+ } }
1403
+ function ChiefOfStaffDashboardComponent_Conditional_17_Conditional_16_Template(rf, ctx) { if (rf & 1) {
1404
+ i0.ɵɵelementStart(0, "span", 59);
1405
+ i0.ɵɵelement(1, "i", 102);
1406
+ i0.ɵɵtext(2);
1407
+ i0.ɵɵelementEnd();
1408
+ } if (rf & 2) {
1409
+ const ctx_r0 = i0.ɵɵnextContext(2);
1410
+ i0.ɵɵadvance(2);
1411
+ i0.ɵɵtextInterpolate1(" ", ctx_r0.SelectedTask.PlanningPeriod, " ");
1412
+ } }
1413
+ function ChiefOfStaffDashboardComponent_Conditional_17_Conditional_17_Template(rf, ctx) { if (rf & 1) {
1414
+ i0.ɵɵelementStart(0, "span", 59);
1415
+ i0.ɵɵelement(1, "i", 53);
1416
+ i0.ɵɵtext(2);
1417
+ i0.ɵɵelementEnd();
1418
+ } if (rf & 2) {
1419
+ const ctx_r0 = i0.ɵɵnextContext(2);
1420
+ i0.ɵɵadvance(2);
1421
+ i0.ɵɵtextInterpolate1(" ", ctx_r0.SelectedTask.CheckInCadence, " ");
1422
+ } }
1423
+ function ChiefOfStaffDashboardComponent_Conditional_17_Conditional_18_Template(rf, ctx) { if (rf & 1) {
1424
+ i0.ɵɵelementStart(0, "span", 59);
1425
+ i0.ɵɵelement(1, "i", 101);
1426
+ i0.ɵɵtext(2);
1427
+ i0.ɵɵelementEnd();
1428
+ } if (rf & 2) {
1429
+ const ctx_r0 = i0.ɵɵnextContext(2);
1430
+ i0.ɵɵadvance(2);
1431
+ i0.ɵɵtextInterpolate1(" Priority: ", ctx_r0.SelectedTask.Priority, " ");
1432
+ } }
1433
+ function ChiefOfStaffDashboardComponent_Conditional_17_Conditional_19_For_5_Conditional_6_Template(rf, ctx) { if (rf & 1) {
1434
+ i0.ɵɵelementStart(0, "div", 112);
1435
+ i0.ɵɵtext(1);
1436
+ i0.ɵɵelementEnd();
1437
+ } if (rf & 2) {
1438
+ const sub_r36 = i0.ɵɵnextContext().$implicit;
1439
+ i0.ɵɵadvance();
1440
+ i0.ɵɵtextInterpolate(sub_r36.Description);
1441
+ } }
1442
+ function ChiefOfStaffDashboardComponent_Conditional_17_Conditional_19_For_5_Conditional_10_Template(rf, ctx) { if (rf & 1) {
1443
+ i0.ɵɵelementStart(0, "span", 114);
1444
+ i0.ɵɵelement(1, "i", 54);
1445
+ i0.ɵɵtext(2);
1446
+ i0.ɵɵpipe(3, "date");
1447
+ i0.ɵɵelementEnd();
1448
+ } if (rf & 2) {
1449
+ const sub_r36 = i0.ɵɵnextContext().$implicit;
1450
+ i0.ɵɵadvance(2);
1451
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(3, 1, sub_r36.DueAt, "shortDate"), " ");
1452
+ } }
1453
+ function ChiefOfStaffDashboardComponent_Conditional_17_Conditional_19_For_5_Template(rf, ctx) { if (rf & 1) {
1454
+ const _r35 = i0.ɵɵgetCurrentView();
1455
+ i0.ɵɵelementStart(0, "div", 109);
1456
+ i0.ɵɵlistener("click", function ChiefOfStaffDashboardComponent_Conditional_17_Conditional_19_For_5_Template_div_click_0_listener() { const sub_r36 = i0.ɵɵrestoreView(_r35).$implicit; const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.OpenTaskRecord(sub_r36.ID)); });
1457
+ i0.ɵɵelementStart(1, "div", 110);
1458
+ i0.ɵɵelement(2, "i", 16);
1459
+ i0.ɵɵelementStart(3, "div")(4, "div", 111);
1460
+ i0.ɵɵtext(5);
1461
+ i0.ɵɵelementEnd();
1462
+ i0.ɵɵconditionalCreate(6, ChiefOfStaffDashboardComponent_Conditional_17_Conditional_19_For_5_Conditional_6_Template, 2, 1, "div", 112);
1463
+ i0.ɵɵelementEnd()();
1464
+ i0.ɵɵelementStart(7, "div", 113)(8, "span", 59);
1465
+ i0.ɵɵtext(9);
1466
+ i0.ɵɵelementEnd();
1467
+ i0.ɵɵconditionalCreate(10, ChiefOfStaffDashboardComponent_Conditional_17_Conditional_19_For_5_Conditional_10_Template, 4, 4, "span", 114);
1468
+ i0.ɵɵelement(11, "i", 115);
1469
+ i0.ɵɵelementEnd()();
1470
+ } if (rf & 2) {
1471
+ const sub_r36 = ctx.$implicit;
1472
+ i0.ɵɵadvance(2);
1473
+ i0.ɵɵclassProp("fa-circle-check", sub_r36.Status === "Completed" || sub_r36.Status === "Done")("fa-circle-half-stroke", sub_r36.Status === "In Progress")("fa-regular", sub_r36.Status !== "Completed" && sub_r36.Status !== "Done" && sub_r36.Status !== "In Progress")("fa-circle", sub_r36.Status !== "Completed" && sub_r36.Status !== "Done" && sub_r36.Status !== "In Progress");
1474
+ i0.ɵɵadvance(3);
1475
+ i0.ɵɵtextInterpolate(sub_r36.Name);
1476
+ i0.ɵɵadvance();
1477
+ i0.ɵɵconditional(sub_r36.Description ? 6 : -1);
1478
+ i0.ɵɵadvance(3);
1479
+ i0.ɵɵtextInterpolate(sub_r36.Status);
1480
+ i0.ɵɵadvance();
1481
+ i0.ɵɵconditional(sub_r36.DueAt ? 10 : -1);
1482
+ } }
1483
+ function ChiefOfStaffDashboardComponent_Conditional_17_Conditional_19_Template(rf, ctx) { if (rf & 1) {
1484
+ i0.ɵɵelementStart(0, "div", 181)(1, "h4", 182);
1485
+ i0.ɵɵtext(2);
1486
+ i0.ɵɵelementEnd();
1487
+ i0.ɵɵelementStart(3, "div", 107);
1488
+ i0.ɵɵrepeaterCreate(4, ChiefOfStaffDashboardComponent_Conditional_17_Conditional_19_For_5_Template, 12, 12, "div", 108, _forTrack1);
1489
+ i0.ɵɵelementEnd()();
1490
+ } if (rf & 2) {
1491
+ const ctx_r0 = i0.ɵɵnextContext(2);
1492
+ i0.ɵɵadvance(2);
1493
+ i0.ɵɵtextInterpolate1(" Milestones & Workstreams (", ctx_r0.SelectedTaskSubtasks.length, ") ");
1494
+ i0.ɵɵadvance(2);
1495
+ i0.ɵɵrepeater(ctx_r0.SelectedTaskSubtasks);
1496
+ } }
1497
+ function ChiefOfStaffDashboardComponent_Conditional_17_For_29_Template(rf, ctx) { if (rf & 1) {
1498
+ i0.ɵɵelementStart(0, "option", 184);
1499
+ i0.ɵɵtext(1);
1500
+ i0.ɵɵelementEnd();
1501
+ } if (rf & 2) {
1502
+ const st_r37 = ctx.$implicit;
1503
+ const ctx_r0 = i0.ɵɵnextContext(2);
1504
+ i0.ɵɵproperty("value", st_r37)("selected", ctx_r0.DraftTaskEdits.Status === st_r37);
1505
+ i0.ɵɵadvance();
1506
+ i0.ɵɵtextInterpolate(st_r37);
1507
+ } }
1508
+ function ChiefOfStaffDashboardComponent_Conditional_17_Template(rf, ctx) { if (rf & 1) {
1509
+ const _r32 = i0.ɵɵgetCurrentView();
1510
+ i0.ɵɵelementStart(0, "div", 170);
1511
+ i0.ɵɵlistener("click", function ChiefOfStaffDashboardComponent_Conditional_17_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r32); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.CloseTaskDrawer()); });
1512
+ i0.ɵɵelementEnd();
1513
+ i0.ɵɵelementStart(1, "aside", 171)(2, "header", 172)(3, "div")(4, "div", 173);
1514
+ i0.ɵɵconditionalCreate(5, ChiefOfStaffDashboardComponent_Conditional_17_Conditional_5_Template, 3, 0, "span", 174)(6, ChiefOfStaffDashboardComponent_Conditional_17_Conditional_6_Template, 4, 1);
1515
+ i0.ɵɵelementEnd();
1516
+ i0.ɵɵelementStart(7, "h3", 175);
1517
+ i0.ɵɵtext(8);
1518
+ i0.ɵɵelementEnd()();
1519
+ i0.ɵɵelementStart(9, "div", 176);
1520
+ i0.ɵɵconditionalCreate(10, ChiefOfStaffDashboardComponent_Conditional_17_Conditional_10_Template, 3, 0, "button", 177);
1521
+ i0.ɵɵelementStart(11, "button", 178);
1522
+ i0.ɵɵlistener("click", function ChiefOfStaffDashboardComponent_Conditional_17_Template_button_click_11_listener() { i0.ɵɵrestoreView(_r32); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.CloseTaskDrawer()); });
1523
+ i0.ɵɵelement(12, "i", 18);
1524
+ i0.ɵɵelementEnd()()();
1525
+ i0.ɵɵelementStart(13, "div", 179)(14, "div", 180);
1526
+ i0.ɵɵconditionalCreate(15, ChiefOfStaffDashboardComponent_Conditional_17_Conditional_15_Template, 3, 6, "span", 89);
1527
+ i0.ɵɵconditionalCreate(16, ChiefOfStaffDashboardComponent_Conditional_17_Conditional_16_Template, 3, 1, "span", 59);
1528
+ i0.ɵɵconditionalCreate(17, ChiefOfStaffDashboardComponent_Conditional_17_Conditional_17_Template, 3, 1, "span", 59);
1529
+ i0.ɵɵconditionalCreate(18, ChiefOfStaffDashboardComponent_Conditional_17_Conditional_18_Template, 3, 1, "span", 59);
1530
+ i0.ɵɵelementEnd();
1531
+ i0.ɵɵconditionalCreate(19, ChiefOfStaffDashboardComponent_Conditional_17_Conditional_19_Template, 6, 1, "div", 181);
1532
+ i0.ɵɵelementStart(20, "div", 181)(21, "h4", 182);
1533
+ i0.ɵɵtext(22, "Update Status & Progress");
1534
+ i0.ɵɵelementEnd();
1535
+ i0.ɵɵelementStart(23, "div", 148)(24, "label", 149)(25, "span", 150);
1536
+ i0.ɵɵtext(26, "Status");
1537
+ i0.ɵɵelementEnd();
1538
+ i0.ɵɵelementStart(27, "select", 183);
1539
+ i0.ɵɵlistener("change", function ChiefOfStaffDashboardComponent_Conditional_17_Template_select_change_27_listener($event) { i0.ɵɵrestoreView(_r32); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.OnTaskStatusChange($event)); });
1540
+ i0.ɵɵrepeaterCreate(28, ChiefOfStaffDashboardComponent_Conditional_17_For_29_Template, 2, 3, "option", 184, i0.ɵɵrepeaterTrackByIdentity);
1541
+ i0.ɵɵelementEnd()();
1542
+ i0.ɵɵelementStart(30, "label", 149)(31, "span", 150);
1543
+ i0.ɵɵtext(32, "Health Status");
1544
+ i0.ɵɵelementEnd();
1545
+ i0.ɵɵelementStart(33, "select", 183);
1546
+ i0.ɵɵlistener("change", function ChiefOfStaffDashboardComponent_Conditional_17_Template_select_change_33_listener($event) { i0.ɵɵrestoreView(_r32); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.OnTaskHealthChange($event)); });
1547
+ i0.ɵɵelementStart(34, "option", 185);
1548
+ i0.ɵɵtext(35, "None");
1549
+ i0.ɵɵelementEnd();
1550
+ i0.ɵɵelementStart(36, "option", 186);
1551
+ i0.ɵɵtext(37, "On Track");
1552
+ i0.ɵɵelementEnd();
1553
+ i0.ɵɵelementStart(38, "option", 187);
1554
+ i0.ɵɵtext(39, "At Risk");
1555
+ i0.ɵɵelementEnd();
1556
+ i0.ɵɵelementStart(40, "option", 188);
1557
+ i0.ɵɵtext(41, "Off Track");
1558
+ i0.ɵɵelementEnd();
1559
+ i0.ɵɵelementStart(42, "option", 189);
1560
+ i0.ɵɵtext(43, "Completed");
1561
+ i0.ɵɵelementEnd();
1562
+ i0.ɵɵelementStart(44, "option", 190);
1563
+ i0.ɵɵtext(45, "Paused");
1564
+ i0.ɵɵelementEnd()()();
1565
+ i0.ɵɵelementStart(46, "label", 149)(47, "span", 150);
1566
+ i0.ɵɵtext(48, "Percent Complete (%)");
1567
+ i0.ɵɵelementEnd();
1568
+ i0.ɵɵelementStart(49, "input", 191);
1569
+ i0.ɵɵlistener("input", function ChiefOfStaffDashboardComponent_Conditional_17_Template_input_input_49_listener($event) { i0.ɵɵrestoreView(_r32); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.OnTaskPercentChange($event)); });
1570
+ i0.ɵɵelementEnd()();
1571
+ i0.ɵɵelementStart(50, "label", 149)(51, "span", 150);
1572
+ i0.ɵɵtext(52, "Confidence Score (%)");
1573
+ i0.ɵɵelementEnd();
1574
+ i0.ɵɵelementStart(53, "input", 192);
1575
+ i0.ɵɵlistener("input", function ChiefOfStaffDashboardComponent_Conditional_17_Template_input_input_53_listener($event) { i0.ɵɵrestoreView(_r32); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.OnTaskConfidenceChange($event)); });
1576
+ i0.ɵɵelementEnd()();
1577
+ i0.ɵɵelementStart(54, "label", 162)(55, "span", 150);
1578
+ i0.ɵɵtext(56, "Due Date");
1579
+ i0.ɵɵelementEnd();
1580
+ i0.ɵɵelementStart(57, "input", 193);
1581
+ i0.ɵɵlistener("change", function ChiefOfStaffDashboardComponent_Conditional_17_Template_input_change_57_listener($event) { i0.ɵɵrestoreView(_r32); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.OnTaskDueAtChange($event)); });
1582
+ i0.ɵɵelementEnd()();
1583
+ i0.ɵɵelementStart(58, "label", 162)(59, "span", 150);
1584
+ i0.ɵɵtext(60, "Description & Notes");
1585
+ i0.ɵɵelementEnd();
1586
+ i0.ɵɵelementStart(61, "textarea", 194);
1587
+ i0.ɵɵlistener("input", function ChiefOfStaffDashboardComponent_Conditional_17_Template_textarea_input_61_listener($event) { i0.ɵɵrestoreView(_r32); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.OnTaskDescriptionChange($event)); });
1588
+ i0.ɵɵelementEnd()()()()();
1589
+ i0.ɵɵelementStart(62, "footer", 195)(63, "button", 81);
1590
+ i0.ɵɵlistener("click", function ChiefOfStaffDashboardComponent_Conditional_17_Template_button_click_63_listener() { i0.ɵɵrestoreView(_r32); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.CloseTaskDrawer()); });
1591
+ i0.ɵɵtext(64, " Cancel ");
1592
+ i0.ɵɵelementEnd();
1593
+ i0.ɵɵelementStart(65, "button", 63);
1594
+ i0.ɵɵlistener("click", function ChiefOfStaffDashboardComponent_Conditional_17_Template_button_click_65_listener() { i0.ɵɵrestoreView(_r32); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.SaveTaskEdits()); });
1595
+ i0.ɵɵelement(66, "i", 144);
1596
+ i0.ɵɵtext(67);
1597
+ i0.ɵɵelementEnd()()();
1598
+ } if (rf & 2) {
1599
+ const ctx_r0 = i0.ɵɵnextContext();
1600
+ i0.ɵɵadvance();
1601
+ i0.ɵɵattribute("aria-label", ctx_r0.SelectedTask.Name);
1602
+ i0.ɵɵadvance(4);
1603
+ i0.ɵɵconditional(ctx_r0.SelectedTaskIsObjective ? 5 : 6);
1604
+ i0.ɵɵadvance(3);
1605
+ i0.ɵɵtextInterpolate(ctx_r0.SelectedTask.Name);
1606
+ i0.ɵɵadvance(2);
1607
+ i0.ɵɵconditional(ctx_r0.CanOpenFullTaskForm ? 10 : -1);
1608
+ i0.ɵɵadvance(5);
1609
+ i0.ɵɵconditional(ctx_r0.SelectedTask.HealthStatus ? 15 : -1);
1610
+ i0.ɵɵadvance();
1611
+ i0.ɵɵconditional(ctx_r0.SelectedTask.PlanningPeriod ? 16 : -1);
1612
+ i0.ɵɵadvance();
1613
+ i0.ɵɵconditional(ctx_r0.SelectedTask.CheckInCadence ? 17 : -1);
1614
+ i0.ɵɵadvance();
1615
+ i0.ɵɵconditional(ctx_r0.SelectedTask.Priority ? 18 : -1);
1616
+ i0.ɵɵadvance();
1617
+ i0.ɵɵconditional(ctx_r0.SelectedTaskIsObjective && ctx_r0.SelectedTaskSubtasks.length > 0 ? 19 : -1);
1618
+ i0.ɵɵadvance(8);
1619
+ i0.ɵɵproperty("value", ctx_r0.DraftTaskEdits.Status);
1620
+ i0.ɵɵadvance();
1621
+ i0.ɵɵrepeater(ctx_r0.TaskStatusOptions);
1622
+ i0.ɵɵadvance(5);
1623
+ i0.ɵɵproperty("value", ctx_r0.DraftTaskEdits.HealthStatus ?? "none");
1624
+ i0.ɵɵadvance(3);
1625
+ i0.ɵɵproperty("selected", ctx_r0.DraftTaskEdits.HealthStatus === "OnTrack");
1626
+ i0.ɵɵadvance(2);
1627
+ i0.ɵɵproperty("selected", ctx_r0.DraftTaskEdits.HealthStatus === "AtRisk");
1628
+ i0.ɵɵadvance(2);
1629
+ i0.ɵɵproperty("selected", ctx_r0.DraftTaskEdits.HealthStatus === "OffTrack");
1630
+ i0.ɵɵadvance(2);
1631
+ i0.ɵɵproperty("selected", ctx_r0.DraftTaskEdits.HealthStatus === "Completed");
1632
+ i0.ɵɵadvance(2);
1633
+ i0.ɵɵproperty("selected", ctx_r0.DraftTaskEdits.HealthStatus === "Paused");
1634
+ i0.ɵɵadvance(5);
1635
+ i0.ɵɵproperty("value", ctx_r0.DraftTaskEdits.PercentComplete ?? 0);
1636
+ i0.ɵɵadvance(4);
1637
+ i0.ɵɵproperty("value", ctx_r0.DraftTaskEdits.ConfidenceScore ?? "");
1638
+ i0.ɵɵadvance(4);
1639
+ i0.ɵɵproperty("value", ctx_r0.DraftTaskEdits.DueAt);
1640
+ i0.ɵɵadvance(4);
1641
+ i0.ɵɵproperty("value", ctx_r0.DraftTaskEdits.Description);
1642
+ i0.ɵɵadvance(4);
1643
+ i0.ɵɵproperty("disabled", !ctx_r0.TaskDirty || ctx_r0.IsSavingTask);
1644
+ i0.ɵɵadvance(2);
1645
+ i0.ɵɵtextInterpolate1(" ", ctx_r0.IsSavingTask ? "Saving..." : "Save Changes", " ");
1646
+ } }
1647
+ /** OpenApp entity the cockpit reads and edits for priorities and OKRs. Not a core entity: never assume its key is `ID`. */
1648
+ const BIZAPPS_TASKS_ENTITY_NAME = 'MJ_BizApps_Tasks: Tasks';
1649
+ let ChiefOfStaffDashboardComponent = class ChiefOfStaffDashboardComponent extends BaseResourceComponent {
1650
+ cdr = inject(ChangeDetectorRef);
1651
+ destroy$ = new Subject();
1652
+ initialParamsApplied = false;
1653
+ IsLoading = true;
1654
+ IsSavingPolicy = false;
1655
+ BusyRequestID = null;
1656
+ BusyRoutineID = null;
1657
+ FeedbackBanner = null;
1658
+ ActiveTab = 'overview';
1659
+ SearchText = '';
1660
+ HealthFilter = 'all';
1661
+ PolicyEntity = null;
1662
+ DraftPolicy = this.createDefaultDraftPolicy();
1663
+ PolicyDirty = false;
1664
+ Tasks = [];
1665
+ /** False when the signed-in user has no `MJ_BizApps_Common: People` record linked via `LinkedUserID`; the Priorities tab then shows guidance instead of tasks. */
1666
+ HasLinkedPerson = true;
1667
+ Routines = [];
1668
+ Requests = [];
1669
+ Metrics = CalculateChiefOfStaffMetrics([], [], []);
1670
+ ExpandedPriorityIDs = new UUIDSet();
1671
+ SelectedRequest = null;
1672
+ ShowRequestDialog = false;
1673
+ SelectedTask = null;
1674
+ ShowTaskDrawer = false;
1675
+ IsSavingTask = false;
1676
+ TaskDirty = false;
1677
+ DraftTaskEdits = {
1678
+ Status: 'Open',
1679
+ HealthStatus: 'OnTrack',
1680
+ PercentComplete: 0,
1681
+ ConfidenceScore: null,
1682
+ DueAt: '',
1683
+ Description: '',
1684
+ };
1685
+ TaskStatusOptions = [
1686
+ 'Open',
1687
+ 'In Progress',
1688
+ 'Waiting on dependency',
1689
+ 'Blocked',
1690
+ 'Completed',
1691
+ ];
1692
+ StatusOptions = ['Active', 'Paused', 'Disabled'];
1693
+ CoordinationModeOptions = [
1694
+ {
1695
+ Value: 'Observer',
1696
+ Label: 'Observer',
1697
+ Description: 'Monitors signals and prepares briefings; never initiates changes.',
1698
+ },
1699
+ {
1700
+ Value: 'Coordinator',
1701
+ Label: 'Coordinator',
1702
+ Description: 'Tracks priorities, drafts communications, and requests approval before high-impact actions.',
1703
+ },
1704
+ {
1705
+ Value: 'Autonomous',
1706
+ Label: 'Autonomous',
1707
+ Description: 'Executes within policy guardrails and auto-approval thresholds.',
1708
+ },
1709
+ ];
1710
+ DataAccessModeOptions = [
1711
+ { Value: 'ReadOnly', Label: 'Read Only' },
1712
+ { Value: 'AllowListOnly', Label: 'Allow-List Only' },
1713
+ { Value: 'UserCeiling', Label: 'User Ceiling (Full Delegated Access)' },
1714
+ ];
1715
+ EmailChannelOptions = [
1716
+ { Value: 'Disabled', Label: 'Disabled' },
1717
+ { Value: 'ReadOnly', Label: 'Read Only' },
1718
+ { Value: 'DraftOnly', Label: 'Draft Only' },
1719
+ { Value: 'SendAsAgent', Label: 'Send as Chief of Staff' },
1720
+ { Value: 'SendAsUser', Label: 'Send on Behalf of User' },
1721
+ ];
1722
+ CalendarChannelOptions = [
1723
+ { Value: 'Disabled', Label: 'Disabled' },
1724
+ { Value: 'ReadOnly', Label: 'Read Only' },
1725
+ { Value: 'ProposeWithApproval', Label: 'Propose with Approval' },
1726
+ { Value: 'Autonomous', Label: 'Autonomous Scheduling' },
1727
+ ];
1728
+ PhoneChannelOptions = [
1729
+ { Value: 'Disabled', Label: 'Disabled' },
1730
+ { Value: 'InboundOnly', Label: 'Inbound Only' },
1731
+ { Value: 'OutboundWithApproval', Label: 'Outbound with Approval' },
1732
+ { Value: 'OutboundAutonomous', Label: 'Outbound Autonomous' },
1733
+ ];
1734
+ MessagingChannelOptions = [
1735
+ { Value: 'Disabled', Label: 'Disabled' },
1736
+ { Value: 'Enabled', Label: 'Enabled' },
1737
+ ];
1738
+ HealthFilterOptions = [
1739
+ { Value: 'all', Label: 'All Health States' },
1740
+ { Value: 'OnTrack', Label: 'On Track' },
1741
+ { Value: 'AtRisk', Label: 'At Risk' },
1742
+ { Value: 'OffTrack', Label: 'Off Track' },
1743
+ { Value: 'Completed', Label: 'Completed' },
1744
+ { Value: 'Paused', Label: 'Paused' },
1745
+ ];
1746
+ get Tabs() {
1747
+ return [
1748
+ { key: 'overview', label: 'Overview', icon: 'fa-solid fa-compass' },
1749
+ {
1750
+ key: 'priorities',
1751
+ label: 'Priorities & OKRs',
1752
+ icon: 'fa-solid fa-bullseye',
1753
+ badge: this.Metrics.PriorityObjectiveCount > 0
1754
+ ? this.Metrics.PriorityObjectiveCount
1755
+ : null,
1756
+ },
1757
+ {
1758
+ key: 'approvals-wakes',
1759
+ label: 'Approvals & Wakes',
1760
+ icon: 'fa-solid fa-bell-concierge',
1761
+ badge: this.Metrics.PendingApprovalCount > 0
1762
+ ? this.Metrics.PendingApprovalCount
1763
+ : null,
1764
+ badgeVariant: this.Metrics.PendingApprovalCount > 0 ? 'warning' : undefined,
1765
+ },
1766
+ {
1767
+ key: 'governance',
1768
+ label: 'Governance Policy',
1769
+ icon: 'fa-solid fa-shield-halved',
1770
+ },
1771
+ ];
1772
+ }
1773
+ get ChiefOfStaffDisplayName() {
1774
+ const override = this.DraftPolicy.DisplayNameOverride.trim();
1775
+ return override.length > 0 ? override : 'My Chief of Staff';
1776
+ }
1777
+ get FilteredPriorityCards() {
1778
+ const search = this.SearchText.trim().toLowerCase();
1779
+ return this.Metrics.PriorityCards.filter((card) => {
1780
+ if (this.HealthFilter !== 'all' && card.EffectiveHealth !== this.HealthFilter) {
1781
+ return false;
1782
+ }
1783
+ if (!search) {
1784
+ return true;
1785
+ }
1786
+ const nameMatch = card.Task.Name.toLowerCase().includes(search);
1787
+ const descMatch = (card.Task.Description ?? '').toLowerCase().includes(search);
1788
+ const subtaskMatch = card.Subtasks.some((sub) => sub.Name.toLowerCase().includes(search));
1789
+ return nameMatch || descMatch || subtaskMatch;
1790
+ });
1791
+ }
1792
+ get PendingRequests() {
1793
+ const search = this.SearchText.trim().toLowerCase();
1794
+ return this.Requests.filter((r) => {
1795
+ if (r.Status !== 'Requested' || !IsApprovalRequest(r)) {
1796
+ return false;
1797
+ }
1798
+ if (!search) {
1799
+ return true;
1800
+ }
1801
+ return (r.Request ?? '').toLowerCase().includes(search);
1802
+ });
1803
+ }
1804
+ get RecentResolvedRequests() {
1805
+ return this.Requests.filter((r) => r.Status !== 'Requested' && IsApprovalRequest(r)).slice(0, 8);
1806
+ }
1807
+ get FilteredRoutines() {
1808
+ const search = this.SearchText.trim().toLowerCase();
1809
+ if (!search) {
1810
+ return this.Routines;
1811
+ }
1812
+ return this.Routines.filter((r) => r.Name.toLowerCase().includes(search) ||
1813
+ (r.Description ?? '').toLowerCase().includes(search));
1814
+ }
1815
+ async ngOnInit() {
1816
+ super.ngOnInit();
1817
+ const initial = this.GetQueryParams();
1818
+ this.applyQueryParams(initial);
1819
+ this.initialParamsApplied = true;
1820
+ await this.LoadCockpitData();
1821
+ this.registerAgentTools();
1822
+ this.navigationService.ResourceReattached$.pipe(filter((c) => c === this), takeUntil(this.destroy$)).subscribe(() => this.publishAgentContext());
1823
+ this.NotifyLoadComplete();
1824
+ }
1825
+ ngOnDestroy() {
1826
+ super.ngOnDestroy();
1827
+ this.destroy$.next();
1828
+ this.destroy$.complete();
1829
+ }
1830
+ async GetResourceDisplayName(_data) {
1831
+ return 'Chief of Staff';
1832
+ }
1833
+ async GetResourceIconClass(_data) {
1834
+ return 'fa-solid fa-user-tie';
1835
+ }
1836
+ OnQueryParamsChanged(params, _source) {
1837
+ this.applyQueryParams(params);
1838
+ this.publishAgentContext();
1839
+ this.cdr.markForCheck();
1840
+ }
1841
+ applyQueryParams(params) {
1842
+ const rawTab = params['tab'];
1843
+ this.ActiveTab =
1844
+ rawTab && VALID_CHIEF_OF_STAFF_TABS.includes(rawTab) ? rawTab : 'overview';
1845
+ this.SearchText = params['search'] ?? '';
1846
+ const rawHealth = params['health'];
1847
+ this.HealthFilter =
1848
+ rawHealth && VALID_HEALTH_FILTERS.includes(rawHealth) ? rawHealth : 'all';
1849
+ }
1850
+ syncQueryParams() {
1851
+ if (!this.initialParamsApplied) {
1852
+ return;
1853
+ }
1854
+ this.UpdateQueryParams({
1855
+ tab: this.ActiveTab === 'overview' ? null : this.ActiveTab,
1856
+ search: this.SearchText.trim().length > 0 ? this.SearchText.trim() : null,
1857
+ health: this.HealthFilter === 'all' ? null : this.HealthFilter,
1858
+ });
1859
+ }
1860
+ async LoadCockpitData() {
1861
+ this.IsLoading = true;
1862
+ this.cdr.markForCheck();
1863
+ try {
1864
+ const rv = RunView.FromMetadataProvider(this.ProviderToUse);
1865
+ const currentUserId = this.ProviderToUse.CurrentUser?.ID;
1866
+ if (!currentUserId) {
1867
+ // Every cockpit query is user-scoped; without a user there is nothing safe to show.
1868
+ this.showBanner('error', 'No signed-in user is available; the cockpit cannot load.');
1869
+ return;
1870
+ }
1871
+ const chiefOfStaffAgentId = await this.resolveChiefOfStaffAgentId();
1872
+ if (!chiefOfStaffAgentId) {
1873
+ this.showBanner('error', `The "${CHIEF_OF_STAFF_AGENT_NAME}" agent is not installed in this environment.`);
1874
+ return;
1875
+ }
1876
+ this.chiefOfStaffAgentId = chiefOfStaffAgentId;
1877
+ const bizAppsTasksEntity = this.bizAppsTasksEntityInfo;
1878
+ const scope = BuildCockpitScopeFilters(currentUserId, chiefOfStaffAgentId);
1879
+ const viewParams = [
1880
+ {
1881
+ EntityName: 'MJ: AI Agent User Policies',
1882
+ ExtraFilter: scope.Policy,
1883
+ OrderBy: '__mj_UpdatedAt DESC',
1884
+ ResultType: 'entity_object',
1885
+ },
1886
+ {
1887
+ EntityName: 'MJ: User Routines',
1888
+ ExtraFilter: scope.Routines,
1889
+ OrderBy: 'NextRunAt ASC, Name ASC',
1890
+ ResultType: 'entity_object',
1891
+ },
1892
+ {
1893
+ EntityName: 'MJ: AI Agent Requests',
1894
+ ExtraFilter: scope.Requests,
1895
+ OrderBy: 'Priority DESC, RequestedAt DESC',
1896
+ MaxRows: 100,
1897
+ ResultType: 'entity_object',
1898
+ },
1899
+ ];
1900
+ const taskScopeFilter = bizAppsTasksEntity
1901
+ ? await this.resolveTaskScopeFilter(rv, currentUserId)
1902
+ : null;
1903
+ if (bizAppsTasksEntity && taskScopeFilter) {
1904
+ viewParams.push(this.buildTasksViewParams(bizAppsTasksEntity, taskScopeFilter));
1905
+ }
1906
+ const results = await rv.RunViews(viewParams);
1907
+ const [policyRes, routineRes, requestRes, taskRes] = results;
1908
+ const policies = policyRes?.Success
1909
+ ? policyRes.Results
1910
+ : [];
1911
+ this.PolicyEntity = policies.length > 0 ? policies[0] : null;
1912
+ this.DraftPolicy = this.buildDraftFromEntity(this.PolicyEntity);
1913
+ this.PolicyDirty = false;
1914
+ this.Routines = routineRes?.Success
1915
+ ? routineRes.Results
1916
+ : [];
1917
+ this.Requests = requestRes?.Success
1918
+ ? requestRes.Results
1919
+ : [];
1920
+ if (taskRes && !taskRes.Success) {
1921
+ this.showBanner('error', `Failed to load Priorities & OKRs: ${taskRes.ErrorMessage || 'Unknown error'}`);
1922
+ }
1923
+ this.Tasks =
1924
+ taskRes && taskRes.Success
1925
+ ? taskRes.Results
1926
+ : [];
1927
+ this.recalculateMetrics();
1928
+ // Auto-expand the first priority card if none expanded yet
1929
+ if (this.ExpandedPriorityIDs.Size === 0 && this.Metrics.PriorityCards.length > 0) {
1930
+ this.ExpandedPriorityIDs.Add(this.Metrics.PriorityCards[0].Task.ID);
1931
+ }
1932
+ }
1933
+ catch (err) {
1934
+ const msg = err instanceof Error ? err.message : String(err);
1935
+ this.showBanner('error', `Failed to load Chief of Staff data: ${msg}`);
1936
+ }
1937
+ finally {
1938
+ this.IsLoading = false;
1939
+ this.publishAgentContext();
1940
+ this.cdr.markForCheck();
1941
+ }
1942
+ }
1943
+ recalculateMetrics() {
1944
+ const routineSummaries = this.Routines.map((r) => ({
1945
+ ID: r.ID,
1946
+ Name: r.Name,
1947
+ Status: r.Status,
1948
+ ScheduleMode: r.ScheduleMode,
1949
+ CronExpression: r.CronExpression,
1950
+ NextRunAt: r.NextRunAt,
1951
+ LastRunAt: r.LastRunAt,
1952
+ LastRunStatus: r.LastRunStatus,
1953
+ }));
1954
+ const requestSummaries = this.Requests.map((req) => ({
1955
+ ID: req.ID,
1956
+ Request: req.Request,
1957
+ Status: req.Status,
1958
+ Priority: req.Priority,
1959
+ RequestedAt: req.RequestedAt,
1960
+ ExpiresAt: req.ExpiresAt,
1961
+ RequestType: req.RequestType,
1962
+ RequestTypeID: req.RequestTypeID,
1963
+ }));
1964
+ this.Metrics = CalculateChiefOfStaffMetrics(this.Tasks, routineSummaries, requestSummaries);
1965
+ }
1966
+ createDefaultDraftPolicy() {
1967
+ return {
1968
+ DisplayNameOverride: 'Chief of Staff',
1969
+ Status: 'Active',
1970
+ OnboardingStatus: 'Completed',
1971
+ CoordinationMode: 'Coordinator',
1972
+ DefaultDataAccessMode: 'UserCeiling',
1973
+ EmailChannelMode: 'DraftOnly',
1974
+ CalendarChannelMode: 'ProposeWithApproval',
1975
+ PhoneChannelMode: 'Disabled',
1976
+ MessagingChannelMode: 'Enabled',
1977
+ AllowInterAgentCoordination: true,
1978
+ RequireApprovalForExternalComms: true,
1979
+ RequireApprovalForFinancials: true,
1980
+ RequireApprovalForDestructiveActions: true,
1981
+ AutoApproveAmountThreshold: 0,
1982
+ InstructionsOverride: '',
1983
+ };
1984
+ }
1985
+ buildDraftFromEntity(entity) {
1986
+ if (!entity) {
1987
+ return this.createDefaultDraftPolicy();
1988
+ }
1989
+ return {
1990
+ DisplayNameOverride: entity.DisplayNameOverride ?? '',
1991
+ Status: entity.Status,
1992
+ OnboardingStatus: entity.OnboardingStatus,
1993
+ CoordinationMode: entity.CoordinationMode,
1994
+ DefaultDataAccessMode: entity.DefaultDataAccessMode,
1995
+ EmailChannelMode: entity.EmailChannelMode,
1996
+ CalendarChannelMode: entity.CalendarChannelMode,
1997
+ PhoneChannelMode: entity.PhoneChannelMode,
1998
+ MessagingChannelMode: entity.MessagingChannelMode,
1999
+ AllowInterAgentCoordination: entity.AllowInterAgentCoordination,
2000
+ RequireApprovalForExternalComms: entity.RequireApprovalForExternalComms,
2001
+ RequireApprovalForFinancials: entity.RequireApprovalForFinancials,
2002
+ RequireApprovalForDestructiveActions: entity.RequireApprovalForDestructiveActions,
2003
+ AutoApproveAmountThreshold: entity.AutoApproveAmountThreshold,
2004
+ InstructionsOverride: entity.InstructionsOverride ?? '',
2005
+ };
2006
+ }
2007
+ buildGovernanceSummary() {
2008
+ return {
2009
+ HasPolicyRecord: this.PolicyEntity !== null,
2010
+ DisplayName: this.ChiefOfStaffDisplayName,
2011
+ Status: this.DraftPolicy.Status,
2012
+ OnboardingStatus: this.DraftPolicy.OnboardingStatus,
2013
+ CoordinationMode: this.DraftPolicy.CoordinationMode,
2014
+ DefaultDataAccessMode: this.DraftPolicy.DefaultDataAccessMode,
2015
+ EmailChannelMode: this.DraftPolicy.EmailChannelMode,
2016
+ CalendarChannelMode: this.DraftPolicy.CalendarChannelMode,
2017
+ PhoneChannelMode: this.DraftPolicy.PhoneChannelMode,
2018
+ MessagingChannelMode: this.DraftPolicy.MessagingChannelMode,
2019
+ AllowInterAgentCoordination: this.DraftPolicy.AllowInterAgentCoordination,
2020
+ RequireApprovalForExternalComms: this.DraftPolicy.RequireApprovalForExternalComms,
2021
+ RequireApprovalForFinancials: this.DraftPolicy.RequireApprovalForFinancials,
2022
+ RequireApprovalForDestructiveActions: this.DraftPolicy.RequireApprovalForDestructiveActions,
2023
+ AutoApproveAmountThreshold: this.DraftPolicy.AutoApproveAmountThreshold,
2024
+ };
2025
+ }
2026
+ // =========================================================================
2027
+ // Tab / Filter / Search Actions
2028
+ // =========================================================================
2029
+ OnTabChange(tabId) {
2030
+ if (VALID_CHIEF_OF_STAFF_TABS.includes(tabId)) {
2031
+ this.ActiveTab = tabId;
2032
+ this.syncQueryParams();
2033
+ this.publishAgentContext();
2034
+ this.cdr.markForCheck();
2035
+ }
2036
+ }
2037
+ OnSearchChange(value) {
2038
+ this.SearchText = value;
2039
+ this.syncQueryParams();
2040
+ this.publishAgentContext();
2041
+ this.cdr.markForCheck();
2042
+ }
2043
+ OnHealthFilterChange(filterVal) {
2044
+ this.HealthFilter = filterVal;
2045
+ this.syncQueryParams();
2046
+ this.publishAgentContext();
2047
+ this.cdr.markForCheck();
2048
+ }
2049
+ ClearFilters() {
2050
+ this.SearchText = '';
2051
+ this.HealthFilter = 'all';
2052
+ this.syncQueryParams();
2053
+ this.publishAgentContext();
2054
+ this.cdr.markForCheck();
2055
+ }
2056
+ TogglePriorityExpanded(taskId) {
2057
+ if (this.ExpandedPriorityIDs.Has(taskId)) {
2058
+ this.ExpandedPriorityIDs.Delete(taskId);
2059
+ }
2060
+ else {
2061
+ this.ExpandedPriorityIDs.Add(taskId);
2062
+ }
2063
+ this.cdr.markForCheck();
2064
+ }
2065
+ IsPriorityExpanded(taskId) {
2066
+ return this.ExpandedPriorityIDs.Has(taskId);
2067
+ }
2068
+ get CanOpenFullTaskForm() {
2069
+ if (!this.SelectedTask)
2070
+ return false;
2071
+ return !!MJGlobal.Instance.ClassFactory.GetRegistration(BaseFormComponent, BIZAPPS_TASKS_ENTITY_NAME);
2072
+ }
2073
+ get SelectedTaskIsObjective() {
2074
+ if (!this.SelectedTask)
2075
+ return false;
2076
+ return !this.SelectedTask.ParentID;
2077
+ }
2078
+ /** Resolved once per load from the agent's metadata name; null until LoadCockpitData has run. */
2079
+ chiefOfStaffAgentId = null;
2080
+ /**
2081
+ * Looks the Chief of Staff agent up by name through the AI engine's cached agents, so the
2082
+ * cockpit carries no hardcoded agent id and follows whichever provider it is embedded under.
2083
+ */
2084
+ async resolveChiefOfStaffAgentId() {
2085
+ const engine = AIEngineBase.GetProviderInstance(this.ProviderToUse, AIEngineBase);
2086
+ await engine.EnsureLoaded(this.ProviderToUse.CurrentUser, this.ProviderToUse);
2087
+ const agent = engine.GetAgentByName(CHIEF_OF_STAFF_AGENT_NAME);
2088
+ return agent?.ID ?? null;
2089
+ }
2090
+ get bizAppsTasksEntityInfo() {
2091
+ return this.ProviderToUse.EntityByName(BIZAPPS_TASKS_ENTITY_NAME);
2092
+ }
2093
+ /**
2094
+ * Builds the primary key for a BizApps task. Tasks is an OpenApp entity, so the key is
2095
+ * derived from its metadata rather than assuming a column named `ID`. Returns null (and
2096
+ * surfaces an error banner) when the entity is not installed in this environment.
2097
+ */
2098
+ taskRecordKey(task) {
2099
+ const entityInfo = this.requireTasksEntityInfo();
2100
+ return entityInfo ? BuildTaskRecordKey(entityInfo, task) : null;
2101
+ }
2102
+ /** For a task id that is not in the loaded list: the bare value maps onto the entity's first key column. */
2103
+ taskRecordKeyFromId(taskId) {
2104
+ const entityInfo = this.requireTasksEntityInfo();
2105
+ return entityInfo ? CompositeKey.FromURLSegment(entityInfo, taskId) : null;
2106
+ }
2107
+ requireTasksEntityInfo() {
2108
+ const entityInfo = this.bizAppsTasksEntityInfo;
2109
+ if (!entityInfo) {
2110
+ this.showBanner('error', 'The BizApps Tasks entity is not available in this environment.');
2111
+ }
2112
+ return entityInfo;
2113
+ }
2114
+ get SelectedTaskSubtasks() {
2115
+ if (!this.SelectedTask)
2116
+ return [];
2117
+ const id = this.SelectedTask.ID;
2118
+ return this.Tasks.filter((t) => UUIDsEqual(t.ParentID, id));
2119
+ }
2120
+ get SelectedTaskParent() {
2121
+ if (!this.SelectedTask || !this.SelectedTask.ParentID)
2122
+ return null;
2123
+ const parentId = this.SelectedTask.ParentID;
2124
+ return this.Tasks.find((t) => UUIDsEqual(t.ID, parentId)) ?? null;
2125
+ }
2126
+ OpenTaskRecord(taskId, event) {
2127
+ event?.stopPropagation();
2128
+ const task = this.Tasks.find((t) => UUIDsEqual(t.ID, taskId));
2129
+ if (task) {
2130
+ this.SelectedTask = task;
2131
+ this.DraftTaskEdits = {
2132
+ Status: task.Status || 'Open',
2133
+ HealthStatus: task.HealthStatus || null,
2134
+ PercentComplete: task.PercentComplete ?? 0,
2135
+ ConfidenceScore: task.ConfidenceScore ?? null,
2136
+ DueAt: task.DueAt ? this.formatDateForInput(task.DueAt) : '',
2137
+ Description: task.Description ?? '',
2138
+ };
2139
+ this.TaskDirty = false;
2140
+ this.ShowTaskDrawer = true;
2141
+ this.cdr.markForCheck();
2142
+ }
2143
+ else {
2144
+ const key = this.taskRecordKeyFromId(taskId);
2145
+ if (key) {
2146
+ this.navigationService.OpenEntityRecord(BIZAPPS_TASKS_ENTITY_NAME, key);
2147
+ }
2148
+ }
2149
+ }
2150
+ CloseTaskDrawer() {
2151
+ this.ShowTaskDrawer = false;
2152
+ this.SelectedTask = null;
2153
+ this.TaskDirty = false;
2154
+ this.cdr.markForCheck();
2155
+ }
2156
+ OpenFullTaskForm() {
2157
+ if (!this.SelectedTask)
2158
+ return;
2159
+ const key = this.taskRecordKey(this.SelectedTask);
2160
+ if (key) {
2161
+ this.navigationService.OpenEntityRecord(BIZAPPS_TASKS_ENTITY_NAME, key);
2162
+ }
2163
+ }
2164
+ MarkTaskDirty() {
2165
+ this.TaskDirty = true;
2166
+ this.cdr.markForCheck();
2167
+ }
2168
+ OnTaskStatusChange(event) {
2169
+ if (event.target instanceof HTMLSelectElement) {
2170
+ this.DraftTaskEdits.Status = event.target.value;
2171
+ this.MarkTaskDirty();
2172
+ }
2173
+ }
2174
+ OnTaskHealthChange(event) {
2175
+ if (event.target instanceof HTMLSelectElement) {
2176
+ const val = event.target.value;
2177
+ this.DraftTaskEdits.HealthStatus =
2178
+ val === 'none' ? null : val;
2179
+ this.MarkTaskDirty();
2180
+ }
2181
+ }
2182
+ OnTaskPercentChange(event) {
2183
+ if (event.target instanceof HTMLInputElement) {
2184
+ const num = Number(event.target.value);
2185
+ this.DraftTaskEdits.PercentComplete = Number.isFinite(num)
2186
+ ? Math.max(0, Math.min(100, Math.round(num)))
2187
+ : null;
2188
+ this.MarkTaskDirty();
2189
+ }
2190
+ }
2191
+ OnTaskConfidenceChange(event) {
2192
+ if (event.target instanceof HTMLInputElement) {
2193
+ const raw = event.target.value.trim();
2194
+ if (!raw) {
2195
+ this.DraftTaskEdits.ConfidenceScore = null;
2196
+ }
2197
+ else {
2198
+ const num = Number(raw);
2199
+ this.DraftTaskEdits.ConfidenceScore = Number.isFinite(num)
2200
+ ? Math.max(0, Math.min(100, Math.round(num)))
2201
+ : null;
2202
+ }
2203
+ this.MarkTaskDirty();
2204
+ }
2205
+ }
2206
+ OnTaskDueAtChange(event) {
2207
+ if (event.target instanceof HTMLInputElement) {
2208
+ this.DraftTaskEdits.DueAt = event.target.value;
2209
+ this.MarkTaskDirty();
2210
+ }
2211
+ }
2212
+ OnTaskDescriptionChange(event) {
2213
+ if (event.target instanceof HTMLTextAreaElement) {
2214
+ this.DraftTaskEdits.Description = event.target.value;
2215
+ this.MarkTaskDirty();
2216
+ }
2217
+ }
2218
+ _updateRecordActionId = null;
2219
+ async resolveUpdateRecordActionId() {
2220
+ if (this._updateRecordActionId) {
2221
+ return this._updateRecordActionId;
2222
+ }
2223
+ try {
2224
+ const rv = RunView.FromMetadataProvider(this.ProviderToUse);
2225
+ const result = await rv.RunView({
2226
+ EntityName: 'MJ: Actions',
2227
+ ExtraFilter: "Name = 'Update Record'",
2228
+ Fields: ['ID'],
2229
+ MaxRows: 1,
2230
+ ResultType: 'simple',
2231
+ });
2232
+ if (result.Success && result.Results && result.Results.length > 0) {
2233
+ this._updateRecordActionId = result.Results[0].ID;
2234
+ return this._updateRecordActionId;
2235
+ }
2236
+ return null;
2237
+ }
2238
+ catch (err) {
2239
+ const msg = err instanceof Error ? err.message : String(err);
2240
+ LogError(`ChiefOfStaffDashboard: failed to resolve 'Update Record' action: ${msg}`);
2241
+ return null;
2242
+ }
2243
+ }
2244
+ async SaveTaskEdits() {
2245
+ if (!this.SelectedTask || this.IsSavingTask)
2246
+ return;
2247
+ this.IsSavingTask = true;
2248
+ this.cdr.markForCheck();
2249
+ try {
2250
+ const taskId = this.SelectedTask.ID;
2251
+ const key = this.taskRecordKey(this.SelectedTask);
2252
+ if (!key) {
2253
+ return;
2254
+ }
2255
+ const actionId = await this.resolveUpdateRecordActionId();
2256
+ if (!actionId) {
2257
+ throw new Error("Action 'Update Record' not found in metadata.");
2258
+ }
2259
+ const updates = {
2260
+ Status: this.DraftTaskEdits.Status,
2261
+ HealthStatus: this.DraftTaskEdits.HealthStatus,
2262
+ PercentComplete: this.DraftTaskEdits.PercentComplete,
2263
+ ConfidenceScore: this.DraftTaskEdits.ConfidenceScore,
2264
+ DueAt: this.DraftTaskEdits.DueAt ? new Date(this.DraftTaskEdits.DueAt) : null,
2265
+ Description: this.DraftTaskEdits.Description.trim().length > 0
2266
+ ? this.DraftTaskEdits.Description.trim()
2267
+ : null,
2268
+ };
2269
+ const primaryKeyObj = {};
2270
+ for (const kvp of key.KeyValuePairs) {
2271
+ primaryKeyObj[kvp.FieldName] = kvp.Value;
2272
+ }
2273
+ const provider = this.ProviderToUse;
2274
+ const actionClient = new GraphQLActionClient(provider);
2275
+ const params = [
2276
+ { Name: 'EntityName', Value: BIZAPPS_TASKS_ENTITY_NAME, Type: 'Input' },
2277
+ { Name: 'PrimaryKey', Value: primaryKeyObj, Type: 'Input' },
2278
+ { Name: 'Fields', Value: updates, Type: 'Input' },
2279
+ ];
2280
+ const result = await actionClient.RunAction(actionId, params);
2281
+ if (result.Success) {
2282
+ this.showBanner('success', `Task "${this.SelectedTask.Name}" updated successfully.`);
2283
+ this.TaskDirty = false;
2284
+ await this.LoadCockpitData();
2285
+ this.SelectedTask = this.Tasks.find((t) => UUIDsEqual(t.ID, taskId)) ?? null;
2286
+ }
2287
+ else {
2288
+ const errText = result.Message || 'Failed to update task.';
2289
+ this.showBanner('error', errText);
2290
+ }
2291
+ }
2292
+ catch (err) {
2293
+ const msg = err instanceof Error ? err.message : String(err);
2294
+ this.showBanner('error', `Failed to update task: ${msg}`);
2295
+ }
2296
+ finally {
2297
+ this.IsSavingTask = false;
2298
+ this.cdr.markForCheck();
2299
+ }
2300
+ }
2301
+ formatDateForInput(val) {
2302
+ const d = val instanceof Date ? val : new Date(val);
2303
+ if (isNaN(d.getTime()))
2304
+ return '';
2305
+ const yyyy = d.getFullYear();
2306
+ const mm = String(d.getMonth() + 1).padStart(2, '0');
2307
+ const dd = String(d.getDate()).padStart(2, '0');
2308
+ return `${yyyy}-${mm}-${dd}`;
2309
+ }
2310
+ OpenPolicyEntityRecord() {
2311
+ if (this.PolicyEntity) {
2312
+ this.navigationService.OpenEntityRecord('MJ: AI Agent User Policies', CompositeKey.FromID(this.PolicyEntity.ID));
2313
+ }
2314
+ }
2315
+ OpenRoutineEntityRecord(routineId, event) {
2316
+ event?.stopPropagation();
2317
+ this.navigationService.OpenEntityRecord('MJ: User Routines', CompositeKey.FromID(routineId));
2318
+ }
2319
+ // =========================================================================
2320
+ // Approvals & Requests Actions
2321
+ // =========================================================================
2322
+ OpenRequestDetail(request) {
2323
+ this.SelectedRequest = request;
2324
+ this.ShowRequestDialog = true;
2325
+ this.cdr.markForCheck();
2326
+ }
2327
+ OnRequestDialogClose(result) {
2328
+ this.ShowRequestDialog = false;
2329
+ this.SelectedRequest = null;
2330
+ if (result.Success) {
2331
+ void this.LoadCockpitData();
2332
+ }
2333
+ else {
2334
+ this.cdr.markForCheck();
2335
+ }
2336
+ }
2337
+ async QuickRespondToRequest(request, decision, event) {
2338
+ event.stopPropagation();
2339
+ if (this.BusyRequestID) {
2340
+ return;
2341
+ }
2342
+ this.BusyRequestID = request.ID;
2343
+ this.cdr.markForCheck();
2344
+ try {
2345
+ const currentUserId = this.ProviderToUse.CurrentUser?.ID ?? null;
2346
+ request.Status = decision;
2347
+ request.RespondedAt = new Date();
2348
+ request.ResponseSource = 'Dashboard';
2349
+ if (currentUserId) {
2350
+ request.ResponseByUserID = currentUserId;
2351
+ }
2352
+ request.Response = `${decision} via Chief of Staff Executive Cockpit`;
2353
+ const saved = await request.Save();
2354
+ if (saved) {
2355
+ this.showBanner('success', `Request marked as ${decision}.`);
2356
+ this.recalculateMetrics();
2357
+ this.publishAgentContext();
2358
+ }
2359
+ else {
2360
+ const errText = request.LatestResult?.CompleteMessage ?? 'Failed to save request decision.';
2361
+ this.showBanner('error', errText);
2362
+ }
2363
+ }
2364
+ catch (err) {
2365
+ const msg = err instanceof Error ? err.message : String(err);
2366
+ this.showBanner('error', `Failed to update request: ${msg}`);
2367
+ }
2368
+ finally {
2369
+ this.BusyRequestID = null;
2370
+ this.cdr.markForCheck();
2371
+ }
2372
+ }
2373
+ // =========================================================================
2374
+ // Wake Routines Actions
2375
+ // =========================================================================
2376
+ async TriggerWakeNow(routine, event) {
2377
+ event?.stopPropagation();
2378
+ if (this.BusyRoutineID) {
2379
+ return;
2380
+ }
2381
+ this.BusyRoutineID = routine.ID;
2382
+ this.cdr.markForCheck();
2383
+ try {
2384
+ routine.Status = 'Active';
2385
+ routine.NextRunAt = new Date();
2386
+ const saved = await routine.Save();
2387
+ if (saved) {
2388
+ this.showBanner('success', `Scheduled immediate wake for "${routine.Name}". The User Routine Scheduler will dispatch it on its next tick.`);
2389
+ this.recalculateMetrics();
2390
+ this.publishAgentContext();
2391
+ }
2392
+ else {
2393
+ const errText = routine.LatestResult?.CompleteMessage ?? 'Failed to schedule immediate wake.';
2394
+ this.showBanner('error', errText);
2395
+ }
2396
+ }
2397
+ catch (err) {
2398
+ const msg = err instanceof Error ? err.message : String(err);
2399
+ this.showBanner('error', `Failed to trigger wake: ${msg}`);
2400
+ }
2401
+ finally {
2402
+ this.BusyRoutineID = null;
2403
+ this.cdr.markForCheck();
2404
+ }
2405
+ }
2406
+ async ToggleRoutineStatus(routine, event) {
2407
+ event?.stopPropagation();
2408
+ if (this.BusyRoutineID) {
2409
+ return;
2410
+ }
2411
+ this.BusyRoutineID = routine.ID;
2412
+ this.cdr.markForCheck();
2413
+ try {
2414
+ const nextStatus = routine.Status === 'Active' ? 'Paused' : 'Active';
2415
+ routine.Status = nextStatus;
2416
+ const saved = await routine.Save();
2417
+ if (saved) {
2418
+ this.showBanner('success', `Routine "${routine.Name}" is now ${nextStatus}.`);
2419
+ this.recalculateMetrics();
2420
+ this.publishAgentContext();
2421
+ }
2422
+ else {
2423
+ const errText = routine.LatestResult?.CompleteMessage ?? 'Failed to update routine status.';
2424
+ this.showBanner('error', errText);
2425
+ }
2426
+ }
2427
+ catch (err) {
2428
+ const msg = err instanceof Error ? err.message : String(err);
2429
+ this.showBanner('error', `Failed to update routine: ${msg}`);
2430
+ }
2431
+ finally {
2432
+ this.BusyRoutineID = null;
2433
+ this.cdr.markForCheck();
2434
+ }
2435
+ }
2436
+ // =========================================================================
2437
+ // Governance Policy Quick-Toggles & Save
2438
+ // =========================================================================
2439
+ MarkPolicyDirty() {
2440
+ this.PolicyDirty = true;
2441
+ this.cdr.markForCheck();
2442
+ }
2443
+ SetCoordinationMode(mode) {
2444
+ this.DraftPolicy.CoordinationMode = mode;
2445
+ this.PolicyDirty = true;
2446
+ this.cdr.markForCheck();
2447
+ }
2448
+ SetPolicyStatus(status) {
2449
+ this.DraftPolicy.Status = status;
2450
+ this.PolicyDirty = true;
2451
+ this.cdr.markForCheck();
2452
+ }
2453
+ ToggleApprovalGuardrail(field) {
2454
+ this.DraftPolicy[field] = !this.DraftPolicy[field];
2455
+ this.PolicyDirty = true;
2456
+ this.cdr.markForCheck();
2457
+ }
2458
+ OnDisplayNameInput(event) {
2459
+ if (event.target instanceof HTMLInputElement) {
2460
+ this.DraftPolicy.DisplayNameOverride = event.target.value;
2461
+ this.MarkPolicyDirty();
2462
+ }
2463
+ }
2464
+ OnThresholdInputEvent(event) {
2465
+ if (event.target instanceof HTMLInputElement) {
2466
+ this.OnThresholdInput(event.target.value);
2467
+ }
2468
+ }
2469
+ OnInstructionsOverrideInput(event) {
2470
+ if (event.target instanceof HTMLTextAreaElement) {
2471
+ this.DraftPolicy.InstructionsOverride = event.target.value;
2472
+ this.MarkPolicyDirty();
2473
+ }
2474
+ }
2475
+ OnThresholdInput(rawValue) {
2476
+ const trimmed = rawValue.trim();
2477
+ if (!trimmed) {
2478
+ this.DraftPolicy.AutoApproveAmountThreshold = null;
2479
+ }
2480
+ else {
2481
+ const parsed = Number(trimmed);
2482
+ if (Number.isFinite(parsed) && parsed >= 0) {
2483
+ this.DraftPolicy.AutoApproveAmountThreshold = parsed;
2484
+ }
2485
+ }
2486
+ this.PolicyDirty = true;
2487
+ this.cdr.markForCheck();
2488
+ }
2489
+ ResetDraftPolicy() {
2490
+ this.DraftPolicy = this.buildDraftFromEntity(this.PolicyEntity);
2491
+ this.PolicyDirty = false;
2492
+ this.cdr.markForCheck();
2493
+ }
2494
+ async SaveGovernancePolicy() {
2495
+ if (this.IsSavingPolicy) {
2496
+ return;
2497
+ }
2498
+ this.IsSavingPolicy = true;
2499
+ this.cdr.markForCheck();
2500
+ try {
2501
+ let entity = this.PolicyEntity;
2502
+ if (!entity) {
2503
+ entity = await this.ProviderToUse.GetEntityObject('MJ: AI Agent User Policies', this.ProviderToUse.CurrentUser);
2504
+ entity.NewRecord();
2505
+ if (!this.chiefOfStaffAgentId) {
2506
+ throw new Error(`The "${CHIEF_OF_STAFF_AGENT_NAME}" agent id has not been resolved; reload the cockpit.`);
2507
+ }
2508
+ entity.AgentID = this.chiefOfStaffAgentId;
2509
+ const currentUserId = this.ProviderToUse.CurrentUser?.ID;
2510
+ if (currentUserId) {
2511
+ entity.UserID = currentUserId;
2512
+ }
2513
+ }
2514
+ entity.DisplayNameOverride =
2515
+ this.DraftPolicy.DisplayNameOverride.trim().length > 0
2516
+ ? this.DraftPolicy.DisplayNameOverride.trim()
2517
+ : null;
2518
+ entity.Status = this.DraftPolicy.Status;
2519
+ entity.OnboardingStatus = this.DraftPolicy.OnboardingStatus;
2520
+ entity.CoordinationMode = this.DraftPolicy.CoordinationMode;
2521
+ entity.DefaultDataAccessMode = this.DraftPolicy.DefaultDataAccessMode;
2522
+ entity.EmailChannelMode = this.DraftPolicy.EmailChannelMode;
2523
+ entity.CalendarChannelMode = this.DraftPolicy.CalendarChannelMode;
2524
+ entity.PhoneChannelMode = this.DraftPolicy.PhoneChannelMode;
2525
+ entity.MessagingChannelMode = this.DraftPolicy.MessagingChannelMode;
2526
+ entity.AllowInterAgentCoordination = this.DraftPolicy.AllowInterAgentCoordination;
2527
+ entity.RequireApprovalForExternalComms =
2528
+ this.DraftPolicy.RequireApprovalForExternalComms;
2529
+ entity.RequireApprovalForFinancials = this.DraftPolicy.RequireApprovalForFinancials;
2530
+ entity.RequireApprovalForDestructiveActions =
2531
+ this.DraftPolicy.RequireApprovalForDestructiveActions;
2532
+ entity.AutoApproveAmountThreshold = this.DraftPolicy.AutoApproveAmountThreshold;
2533
+ entity.InstructionsOverride =
2534
+ this.DraftPolicy.InstructionsOverride.trim().length > 0
2535
+ ? this.DraftPolicy.InstructionsOverride.trim()
2536
+ : null;
2537
+ const saved = await entity.Save();
2538
+ if (saved) {
2539
+ this.PolicyEntity = entity;
2540
+ this.DraftPolicy = this.buildDraftFromEntity(entity);
2541
+ this.PolicyDirty = false;
2542
+ this.showBanner('success', 'Chief of Staff governance policy saved.');
2543
+ this.publishAgentContext();
2544
+ }
2545
+ else {
2546
+ const errText = entity.LatestResult?.CompleteMessage ?? 'Failed to save governance policy.';
2547
+ this.showBanner('error', errText);
2548
+ }
2549
+ }
2550
+ catch (err) {
2551
+ const msg = err instanceof Error ? err.message : String(err);
2552
+ this.showBanner('error', `Failed to save governance policy: ${msg}`);
2553
+ }
2554
+ finally {
2555
+ this.IsSavingPolicy = false;
2556
+ this.cdr.markForCheck();
2557
+ }
2558
+ }
2559
+ DismissBanner() {
2560
+ this.FeedbackBanner = null;
2561
+ this.cdr.markForCheck();
2562
+ }
2563
+ /**
2564
+ * Resolve the filter scoping Tasks to the signed-in user's linked person. Returns null (and clears
2565
+ * `HasLinkedPerson`) when no person is linked, or when the lookup fails after surfacing the error.
2566
+ */
2567
+ async resolveTaskScopeFilter(rv, currentUserId) {
2568
+ try {
2569
+ const scope = await ResolvePersonTaskScope(rv, currentUserId);
2570
+ this.HasLinkedPerson = scope.HasLinkedPerson;
2571
+ return scope.HasLinkedPerson ? scope.Filter : null;
2572
+ }
2573
+ catch (err) {
2574
+ const msg = err instanceof Error ? err.message : String(err);
2575
+ this.showBanner('error', `Failed to resolve your People record for Priorities & OKRs: ${msg}`);
2576
+ return null;
2577
+ }
2578
+ }
2579
+ buildTasksViewParams(tasksEntity, extraFilter) {
2580
+ const fieldNames = new Set((tasksEntity.Fields ?? []).map((f) => f.Name.toLowerCase()));
2581
+ const orderParts = [];
2582
+ if (fieldNames.has('ispriority')) {
2583
+ orderParts.push('IsPriority DESC');
2584
+ }
2585
+ if (fieldNames.has('dueat')) {
2586
+ orderParts.push('DueAt ASC');
2587
+ }
2588
+ if (fieldNames.has('name')) {
2589
+ orderParts.push('Name ASC');
2590
+ }
2591
+ return {
2592
+ EntityName: BIZAPPS_TASKS_ENTITY_NAME,
2593
+ ExtraFilter: extraFilter,
2594
+ OrderBy: orderParts.length > 0 ? orderParts.join(', ') : 'DueAt ASC, Name ASC',
2595
+ MaxRows: 250,
2596
+ ResultType: 'simple',
2597
+ };
2598
+ }
2599
+ /** Badge class for a task's `Priority` (Critical/High/Medium/Low). */
2600
+ GetTaskPriorityClass(priority) {
2601
+ return GetTaskPriorityClass(priority);
2602
+ }
2603
+ showBanner(type, message) {
2604
+ this.FeedbackBanner = { Type: type, Message: message };
2605
+ this.cdr.markForCheck();
2606
+ }
2607
+ // =========================================================================
2608
+ // UI Formatting Helpers
2609
+ // =========================================================================
2610
+ GetHealthBadgeLabel(health) {
2611
+ switch (health) {
2612
+ case 'OnTrack':
2613
+ return 'On Track';
2614
+ case 'AtRisk':
2615
+ return 'At Risk';
2616
+ case 'OffTrack':
2617
+ return 'Off Track';
2618
+ case 'Completed':
2619
+ return 'Completed';
2620
+ case 'Paused':
2621
+ return 'Paused';
2622
+ default:
2623
+ return health;
2624
+ }
2625
+ }
2626
+ GetHealthBadgeIcon(health) {
2627
+ switch (health) {
2628
+ case 'OnTrack':
2629
+ return 'fa-solid fa-circle-check';
2630
+ case 'AtRisk':
2631
+ return 'fa-solid fa-triangle-exclamation';
2632
+ case 'OffTrack':
2633
+ return 'fa-solid fa-circle-exclamation';
2634
+ case 'Completed':
2635
+ return 'fa-solid fa-flag-checkered';
2636
+ case 'Paused':
2637
+ return 'fa-solid fa-circle-pause';
2638
+ default:
2639
+ return 'fa-solid fa-circle';
2640
+ }
2641
+ }
2642
+ GetPriorityTierLabel(priority) {
2643
+ if (priority >= 76)
2644
+ return 'Critical';
2645
+ if (priority >= 51)
2646
+ return 'High';
2647
+ if (priority >= 26)
2648
+ return 'Normal';
2649
+ return 'Low';
2650
+ }
2651
+ GetPriorityTierClass(priority) {
2652
+ if (priority >= 76)
2653
+ return 'priority-critical';
2654
+ if (priority >= 51)
2655
+ return 'priority-high';
2656
+ if (priority >= 26)
2657
+ return 'priority-normal';
2658
+ return 'priority-low';
2659
+ }
2660
+ IsRequestExpired(request) {
2661
+ if (!request.ExpiresAt)
2662
+ return false;
2663
+ const expires = request.ExpiresAt instanceof Date ? request.ExpiresAt : new Date(request.ExpiresAt);
2664
+ return expires.getTime() < Date.now();
2665
+ }
2666
+ // =========================================================================
2667
+ // Agent Context & Client Tools Wiring
2668
+ // =========================================================================
2669
+ publishAgentContext() {
2670
+ if (this.navigationService.IsResourceDetached(this)) {
2671
+ return;
2672
+ }
2673
+ const routineSummaries = this.Routines.map((r) => ({
2674
+ ID: r.ID,
2675
+ Name: r.Name,
2676
+ Status: r.Status,
2677
+ ScheduleMode: r.ScheduleMode,
2678
+ CronExpression: r.CronExpression,
2679
+ NextRunAt: r.NextRunAt,
2680
+ LastRunAt: r.LastRunAt,
2681
+ LastRunStatus: r.LastRunStatus,
2682
+ }));
2683
+ const pendingSummaries = this.PendingRequests.map((req) => ({
2684
+ ID: req.ID,
2685
+ Request: req.Request,
2686
+ Status: req.Status,
2687
+ Priority: req.Priority,
2688
+ RequestedAt: req.RequestedAt,
2689
+ ExpiresAt: req.ExpiresAt,
2690
+ }));
2691
+ const context = BuildChiefOfStaffAgentContext({
2692
+ ActiveTab: this.ActiveTab,
2693
+ SearchText: this.SearchText,
2694
+ HealthFilter: this.HealthFilter,
2695
+ Metrics: this.Metrics,
2696
+ Governance: this.buildGovernanceSummary(),
2697
+ Routines: routineSummaries,
2698
+ PendingRequests: pendingSummaries,
2699
+ });
2700
+ this.navigationService.SetAgentContext(this, context);
2701
+ }
2702
+ registerAgentTools() {
2703
+ this.navigationService.SetAgentClientTools(this, [
2704
+ {
2705
+ Name: 'SwitchChiefOfStaffTab',
2706
+ Description: "Switch the active tab in the Chief of Staff Cockpit ('overview', 'priorities', 'approvals-wakes', or 'governance').",
2707
+ ParameterSchema: {
2708
+ type: 'object',
2709
+ properties: {
2710
+ tab: {
2711
+ type: 'string',
2712
+ enum: VALID_CHIEF_OF_STAFF_TABS,
2713
+ description: 'Target tab ID',
2714
+ },
2715
+ },
2716
+ required: ['tab'],
2717
+ },
2718
+ Handler: async (params) => {
2719
+ const raw = params['tab'];
2720
+ const check = ValidateChiefOfStaffTabParam(raw);
2721
+ if (!check.ok) {
2722
+ return check.result;
2723
+ }
2724
+ this.OnTabChange(check.value);
2725
+ return { Success: true, Data: { ActiveTab: this.ActiveTab } };
2726
+ },
2727
+ },
2728
+ {
2729
+ Name: 'FilterPrioritiesByHealth',
2730
+ Description: "Filter priority objectives by health status ('all', 'OnTrack', 'AtRisk', 'OffTrack', 'Completed', 'Paused').",
2731
+ ParameterSchema: {
2732
+ type: 'object',
2733
+ properties: {
2734
+ health: {
2735
+ type: 'string',
2736
+ enum: VALID_HEALTH_FILTERS,
2737
+ description: 'Health status filter',
2738
+ },
2739
+ },
2740
+ required: ['health'],
2741
+ },
2742
+ Handler: async (params) => {
2743
+ const raw = params['health'];
2744
+ const check = ValidateHealthFilterParam(raw);
2745
+ if (!check.ok) {
2746
+ return check.result;
2747
+ }
2748
+ this.OnHealthFilterChange(check.value);
2749
+ if (this.ActiveTab !== 'priorities') {
2750
+ this.OnTabChange('priorities');
2751
+ }
2752
+ return {
2753
+ Success: true,
2754
+ Data: {
2755
+ HealthFilter: this.HealthFilter,
2756
+ FilteredPriorityCount: this.FilteredPriorityCards.length,
2757
+ },
2758
+ };
2759
+ },
2760
+ },
2761
+ {
2762
+ Name: 'SearchChiefOfStaffCockpit',
2763
+ Description: 'Filter visible priority objectives, requests, and wake routines by search text. Pass empty string to clear.',
2764
+ ParameterSchema: {
2765
+ type: 'object',
2766
+ properties: {
2767
+ query: {
2768
+ type: 'string',
2769
+ description: 'Search text; empty string clears.',
2770
+ },
2771
+ },
2772
+ required: ['query'],
2773
+ },
2774
+ Handler: async (params) => {
2775
+ const raw = params['query'];
2776
+ const check = ValidateSearchQueryParam(raw);
2777
+ if (!check.ok) {
2778
+ return check.result;
2779
+ }
2780
+ this.OnSearchChange(check.value);
2781
+ return {
2782
+ Success: true,
2783
+ Data: {
2784
+ SearchText: this.SearchText,
2785
+ FilteredPriorityCount: this.FilteredPriorityCards.length,
2786
+ },
2787
+ };
2788
+ },
2789
+ },
2790
+ {
2791
+ Name: 'InspectPriorityObjective',
2792
+ Description: 'Expand and focus a priority objective card by ID or name in the Priorities & OKRs tab.',
2793
+ ParameterSchema: {
2794
+ type: 'object',
2795
+ properties: {
2796
+ objective: {
2797
+ type: 'string',
2798
+ description: 'Priority objective ID or name (partial match supported)',
2799
+ },
2800
+ },
2801
+ required: ['objective'],
2802
+ },
2803
+ Handler: async (params) => {
2804
+ const raw = params['objective'];
2805
+ const resolved = ResolvePriorityObjectiveByIDOrName(this.Metrics.PriorityCards, raw);
2806
+ if (!resolved.ok) {
2807
+ return { Success: false, ErrorMessage: resolved.error };
2808
+ }
2809
+ this.ExpandedPriorityIDs.Add(resolved.value.Task.ID);
2810
+ this.OnTabChange('priorities');
2811
+ return {
2812
+ Success: true,
2813
+ Data: {
2814
+ TaskID: resolved.value.Task.ID,
2815
+ Name: resolved.value.Task.Name,
2816
+ SubtaskCount: resolved.value.Subtasks.length,
2817
+ EffectivePercentComplete: resolved.value.EffectivePercentComplete,
2818
+ },
2819
+ };
2820
+ },
2821
+ },
2822
+ {
2823
+ Name: 'RefreshChiefOfStaffCockpit',
2824
+ Description: 'Reload priority objectives, pending approvals, wake routines, and governance policy from the server.',
2825
+ ParameterSchema: {
2826
+ type: 'object',
2827
+ properties: {},
2828
+ },
2829
+ Handler: async () => {
2830
+ await this.LoadCockpitData();
2831
+ return {
2832
+ Success: true,
2833
+ Data: {
2834
+ PriorityObjectiveCount: this.Metrics.PriorityObjectiveCount,
2835
+ PendingApprovalCount: this.Metrics.PendingApprovalCount,
2836
+ ActiveWakeRoutineCount: this.Metrics.ActiveWakeRoutineCount,
2837
+ },
2838
+ };
2839
+ },
2840
+ },
2841
+ ]);
2842
+ }
2843
+ static ɵfac = /*@__PURE__*/ (() => { let ɵChiefOfStaffDashboardComponent_BaseFactory; return function ChiefOfStaffDashboardComponent_Factory(__ngFactoryType__) { return (ɵChiefOfStaffDashboardComponent_BaseFactory || (ɵChiefOfStaffDashboardComponent_BaseFactory = i0.ɵɵgetInheritedFactory(ChiefOfStaffDashboardComponent)))(__ngFactoryType__ || ChiefOfStaffDashboardComponent); }; })();
2844
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ChiefOfStaffDashboardComponent, selectors: [["mj-chief-of-staff-dashboard"]], standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 18, vars: 14, consts: [["Subtitle", "Executive cockpit for strategic priorities, pending approvals, wake routines, and governance policy", "Icon", "fa-solid fa-user-tie", 3, "Title"], ["meta", ""], ["Icon", "fa-solid fa-bullseye", "Label", "priorities", "Variant", "info", 3, "Count"], ["Icon", "fa-solid fa-triangle-exclamation", "Label", "at risk", "Variant", "warning", 3, "Count"], ["Icon", "fa-solid fa-bell-concierge", "Label", "pending approvals", "Variant", "warning", 3, "Count"], ["Icon", "fa-solid fa-circle-check", "Label", "pending approvals", "Variant", "success", 3, "Count"], ["Icon", "fa-solid fa-clock-rotate-left", "Label", "active wakes", "Variant", "info", 3, "Count"], ["toolbar", ""], ["Placeholder", "Filter priorities, requests, or routines...", 3, "ValueChange", "Value"], [3, "Refresh", "Loading", "ShowLabel"], ["role", "status", 1, "cos-banner", 3, "cos-banner--success", "cos-banner--error"], [3, "TabChange", "Tabs", "ActiveKey"], [1, "cos-loading"], [3, "Visible", "Request"], ["role", "status", 1, "cos-banner"], [1, "cos-banner__content"], [1, "fa-solid"], ["mjButton", "", "variant", "flat", "size", "sm", "aria-label", "Dismiss notification", 3, "click"], [1, "fa-solid", "fa-xmark"], ["text", "Loading Chief of Staff cockpit..."], [1, "cos-overview-columns"], [1, "cos-governance-container"], [1, "cos-kpi-grid"], [1, "cos-kpi-card", 3, "click"], [1, "cos-kpi-card__header"], [1, "cos-kpi-card__label"], [1, "cos-kpi-card__icon", "cos-kpi-card__icon--brand"], [1, "fa-solid", "fa-bullseye"], [1, "cos-kpi-card__value"], [1, "cos-kpi-card__sub"], [1, "cos-kpi-card__icon", "cos-kpi-card__icon--success"], [1, "fa-solid", "fa-chart-line"], [1, "cos-kpi-card__icon"], [1, "fa-solid", "fa-bell-concierge"], [1, "fa-solid", "fa-shield-halved"], [1, "cos-panel"], [1, "cos-panel__header"], [1, "cos-panel__title"], [1, "cos-panel__subtitle"], ["mjButton", "", "variant", "outline", "size", "sm", 3, "click"], [1, "cos-inline-empty"], [1, "cos-stack"], [1, "fa-solid", "fa-clock-rotate-left"], [1, "cos-priority-mini"], [1, "cos-priority-mini", 3, "click"], [1, "cos-priority-mini__top"], [1, "cos-priority-mini__name"], [1, "cos-progress-row"], [1, "cos-progress-bar"], [1, "cos-progress-row__pct"], [1, "cos-priority-mini__meta"], [1, "fa-solid", "fa-list-check"], [3, "cos-overdue-text"], [1, "fa-solid", "fa-repeat"], [1, "fa-regular", "fa-calendar"], [1, "fa-solid", "fa-circle-check"], [1, "cos-request-card"], [1, "cos-request-card", 3, "click"], [1, "cos-request-card__top"], [1, "cos-meta-badge"], [1, "cos-timestamp"], [1, "cos-request-card__text"], [1, "cos-request-card__actions"], ["mjButton", "", "variant", "primary", "size", "sm", 3, "click", "disabled"], [1, "fa-solid", "fa-check"], ["mjButton", "", "variant", "danger", "size", "sm", 3, "click", "disabled"], [1, "fa-regular", "fa-clock"], [1, "cos-routine-mini"], [1, "cos-routine-mini__info"], [1, "cos-routine-mini__title-row"], [1, "cos-routine-mini__name"], [1, "cos-routine-mini__meta"], [1, "cos-routine-mini__actions"], [1, "fa-solid", "fa-bolt"], [1, "cos-filter-bar"], ["role", "group", "aria-label", "Filter priorities by health", 1, "cos-filter-pills"], ["mjButton", "", "size", "sm", 3, "variant"], ["mjButton", "", "variant", "flat", "size", "sm"], ["Icon", "fa-solid fa-bullseye", "ActionIcon", "fa-solid fa-rotate-left", 3, "Variant", "Title", "Message", "ActionText"], [1, "cos-priority-list"], ["mjButton", "", "size", "sm", 3, "click", "variant"], ["mjButton", "", "variant", "flat", "size", "sm", 3, "click"], [1, "fa-solid", "fa-rotate-left"], ["Icon", "fa-solid fa-bullseye", "ActionIcon", "fa-solid fa-rotate-left", 3, "Action", "Variant", "Title", "Message", "ActionText"], [1, "cos-priority-card"], [1, "cos-priority-card__header", 3, "click"], [1, "cos-priority-card__title-group"], ["mjButton", "", "variant", "flat", "size", "sm", 1, "cos-expand-btn", 3, "click"], [1, "cos-priority-card__badges"], [3, "class"], [1, "cos-priority-card__title"], [1, "cos-priority-card__right"], [1, "cos-priority-card__progress-summary"], [1, "cos-priority-card__pct"], [1, "cos-priority-card__milestone-count"], [1, "fa-solid", "fa-sliders"], [1, "cos-priority-card__body"], [1, "cos-priority-card__desc"], [1, "cos-metric-target-label"], [1, "cos-priority-card__dates"], [1, "cos-subtasks"], [1, "fa-solid", "fa-flag"], [1, "fa-regular", "fa-calendar-check"], [1, "fa-solid", "fa-gauge-high"], [1, "fa-solid", "fa-chart-simple"], [1, "fa-regular", "fa-bell"], [1, "cos-subtasks__header"], [1, "cos-subtasks__list"], [1, "cos-subtask-row"], [1, "cos-subtask-row", 3, "click"], [1, "cos-subtask-row__left"], [1, "cos-subtask-row__name"], [1, "cos-subtask-row__desc"], [1, "cos-subtask-row__right"], [1, "cos-subtask-row__due"], [1, "fa-solid", "fa-chevron-right", "cos-subtask-row__chevron"], [1, "cos-resolved-section"], [1, "cos-request-card__badges"], [1, "cos-status-chip", "cos-status-chip--requested"], [1, "cos-status-chip", "cos-status-chip--disabled"], [1, "fa-solid", "fa-expand"], [1, "fa-solid", "fa-tag"], [1, "cos-resolved-section__title"], [1, "cos-resolved-row"], [1, "cos-resolved-row", 3, "click"], [1, "cos-resolved-row__main"], [1, "cos-resolved-row__text"], [1, "cos-routine-card"], [1, "cos-routine-card__header"], [1, "cos-routine-card__title-row"], [1, "cos-routine-card__name"], [1, "cos-routine-card__desc"], [1, "cos-routine-card__schedule"], [1, "cos-routine-card__actions"], ["mjButton", "", "variant", "outline", "size", "sm", 3, "click", "disabled"], [1, "fa-solid", "fa-arrow-up-right-from-square"], [1, "fa-solid", "fa-pause"], [1, "fa-solid", "fa-play"], [1, "cos-governance-header"], [1, "cos-governance-header__title"], [1, "cos-governance-header__subtitle"], [1, "cos-governance-header__actions"], ["mjButton", "", "variant", "outline", "size", "sm"], ["mjButton", "", "variant", "outline", "size", "sm", 3, "disabled"], [1, "fa-solid", "fa-floppy-disk"], ["role", "group", "aria-label", "Agent Status", 1, "cos-status-segmented"], [1, "cos-mode-cards"], [1, "cos-mode-card", 3, "cos-mode-card--selected"], [1, "cos-form-grid"], [1, "cos-form-field"], [1, "cos-form-field__label"], ["type", "text", "placeholder", "e.g., Chief of Staff", 1, "cos-input", 3, "input", "value"], ["TextField", "Label", "ValueField", "Value", 3, "ngModelChange", "ValueChange", "Data", "ValuePrimitive", "ngModel"], [1, "fa-solid", "fa-envelope"], [1, "fa-solid", "fa-phone"], [1, "fa-solid", "fa-comments"], [1, "cos-toggle-list"], [1, "cos-toggle-row", 3, "click"], [1, "cos-toggle-row__title"], [1, "cos-toggle-row__desc"], [1, "cos-form-grid", "cos-form-grid--spaced"], ["type", "number", "min", "0", "step", "50", "placeholder", "0.00", 1, "cos-input", 3, "input", "value"], [1, "cos-form-field", "cos-form-field--full"], ["rows", "3", "placeholder", "Optional standing instructions injected into every Chief of Staff run (e.g., preferred briefing style, VIP contacts, scheduling windows)...", 1, "cos-textarea", 3, "input", "value"], [1, "cos-mode-card", 3, "click"], [1, "cos-mode-card__top"], [1, "cos-mode-card__title"], [1, "fa-solid", "fa-circle-check", "cos-mode-card__check"], [1, "cos-mode-card__desc"], [3, "Close", "Visible", "Request"], ["aria-hidden", "true", 1, "cos-drawer-backdrop", 3, "click"], ["role", "dialog", "aria-modal", "true", 1, "cos-drawer"], [1, "cos-drawer__header"], [1, "cos-drawer__category-strip"], [1, "cos-badge-objective"], [1, "cos-drawer__title"], [1, "cos-drawer__header-actions"], ["mjButton", "", "variant", "outline", "size", "sm", "title", "Open in standard record form"], ["mjButton", "", "variant", "flat", "size", "sm", "aria-label", "Close task drawer", 1, "cos-drawer__close-btn", 3, "click"], [1, "cos-drawer__body"], [1, "cos-drawer__ribbon"], [1, "cos-drawer__section"], [1, "cos-drawer__section-title"], [1, "cos-select", 3, "change", "value"], [3, "value", "selected"], ["value", "none"], ["value", "OnTrack", 3, "selected"], ["value", "AtRisk", 3, "selected"], ["value", "OffTrack", 3, "selected"], ["value", "Completed", 3, "selected"], ["value", "Paused", 3, "selected"], ["type", "number", "min", "0", "max", "100", 1, "cos-input", 3, "input", "value"], ["type", "number", "min", "0", "max", "100", "placeholder", "0\u2013100", 1, "cos-input", 3, "input", "value"], ["type", "date", 1, "cos-input", 3, "change", "value"], ["rows", "4", "placeholder", "Task description, objectives, milestones, or current blockers...", 1, "cos-textarea", 3, "input", "value"], [1, "cos-drawer__footer"], [1, "cos-badge-milestone"], ["type", "button", 1, "cos-drawer__parent-link"], ["type", "button", 1, "cos-drawer__parent-link", 3, "click"], [1, "fa-solid", "fa-arrow-turn-up"], ["mjButton", "", "variant", "outline", "size", "sm", "title", "Open in standard record form", 3, "click"]], template: function ChiefOfStaffDashboardComponent_Template(rf, ctx) { if (rf & 1) {
2845
+ i0.ɵɵelementStart(0, "mj-page-layout")(1, "mj-page-header", 0);
2846
+ i0.ɵɵelementContainerStart(2, 1);
2847
+ i0.ɵɵelement(3, "mj-stat-badge", 2);
2848
+ i0.ɵɵconditionalCreate(4, ChiefOfStaffDashboardComponent_Conditional_4_Template, 1, 1, "mj-stat-badge", 3);
2849
+ i0.ɵɵconditionalCreate(5, ChiefOfStaffDashboardComponent_Conditional_5_Template, 1, 1, "mj-stat-badge", 4)(6, ChiefOfStaffDashboardComponent_Conditional_6_Template, 1, 1, "mj-stat-badge", 5);
2850
+ i0.ɵɵelement(7, "mj-stat-badge", 6);
2851
+ i0.ɵɵelementContainerEnd();
2852
+ i0.ɵɵelementContainerStart(8, 7);
2853
+ i0.ɵɵelementStart(9, "mj-page-search", 8);
2854
+ i0.ɵɵlistener("ValueChange", function ChiefOfStaffDashboardComponent_Template_mj_page_search_ValueChange_9_listener($event) { return ctx.OnSearchChange($event); });
2855
+ i0.ɵɵelementEnd();
2856
+ i0.ɵɵelementStart(10, "mj-refresh-button", 9);
2857
+ i0.ɵɵlistener("Refresh", function ChiefOfStaffDashboardComponent_Template_mj_refresh_button_Refresh_10_listener() { return ctx.LoadCockpitData(); });
2858
+ i0.ɵɵelementEnd();
2859
+ i0.ɵɵelementContainerEnd();
2860
+ i0.ɵɵelementEnd();
2861
+ i0.ɵɵelementStart(11, "mj-page-body");
2862
+ i0.ɵɵconditionalCreate(12, ChiefOfStaffDashboardComponent_Conditional_12_Template, 7, 9, "div", 10);
2863
+ i0.ɵɵelementStart(13, "mj-tab-nav", 11);
2864
+ i0.ɵɵlistener("TabChange", function ChiefOfStaffDashboardComponent_Template_mj_tab_nav_TabChange_13_listener($event) { return ctx.OnTabChange($event); });
2865
+ i0.ɵɵelementEnd();
2866
+ i0.ɵɵconditionalCreate(14, ChiefOfStaffDashboardComponent_Conditional_14_Template, 2, 0, "div", 12)(15, ChiefOfStaffDashboardComponent_Conditional_15_Template, 4, 4);
2867
+ i0.ɵɵelementEnd()();
2868
+ i0.ɵɵconditionalCreate(16, ChiefOfStaffDashboardComponent_Conditional_16_Template, 1, 2, "mj-agent-request-dialog", 13);
2869
+ i0.ɵɵconditionalCreate(17, ChiefOfStaffDashboardComponent_Conditional_17_Template, 68, 22);
2870
+ } if (rf & 2) {
2871
+ i0.ɵɵadvance();
2872
+ i0.ɵɵproperty("Title", ctx.ChiefOfStaffDisplayName);
2873
+ i0.ɵɵadvance(2);
2874
+ i0.ɵɵproperty("Count", ctx.Metrics.PriorityObjectiveCount);
2875
+ i0.ɵɵadvance();
2876
+ i0.ɵɵconditional(ctx.Metrics.AtRiskCount + ctx.Metrics.OffTrackCount > 0 ? 4 : -1);
2877
+ i0.ɵɵadvance();
2878
+ i0.ɵɵconditional(ctx.Metrics.PendingApprovalCount > 0 ? 5 : 6);
2879
+ i0.ɵɵadvance(2);
2880
+ i0.ɵɵproperty("Count", ctx.Metrics.ActiveWakeRoutineCount);
2881
+ i0.ɵɵadvance(2);
2882
+ i0.ɵɵproperty("Value", ctx.SearchText);
2883
+ i0.ɵɵadvance();
2884
+ i0.ɵɵproperty("Loading", ctx.IsLoading)("ShowLabel", true);
2885
+ i0.ɵɵadvance(2);
2886
+ i0.ɵɵconditional(ctx.FeedbackBanner ? 12 : -1);
2887
+ i0.ɵɵadvance();
2888
+ i0.ɵɵproperty("Tabs", ctx.Tabs)("ActiveKey", ctx.ActiveTab);
2889
+ i0.ɵɵadvance();
2890
+ i0.ɵɵconditional(ctx.IsLoading ? 14 : 15);
2891
+ i0.ɵɵadvance(2);
2892
+ i0.ɵɵconditional(ctx.ShowRequestDialog && ctx.SelectedRequest ? 16 : -1);
2893
+ i0.ɵɵadvance();
2894
+ i0.ɵɵconditional(ctx.ShowTaskDrawer && ctx.SelectedTask ? 17 : -1);
2895
+ } }, dependencies: [i1.NgSelectOption, i1.ɵNgSelectMultipleOption, i1.NgControlStatus, i1.NgModel, i2.LoadingComponent, i3.AgentRequestDialogComponent, i4.MJButtonDirective, i4.MJDropdownComponent, i4.MJPageHeaderComponent, i4.MJPageLayoutComponent, i4.MJPageBodyComponent, i4.MJPageSearchComponent, i4.MJTabNavComponent, i4.MJStatBadgeComponent, i4.MJRefreshButtonComponent, i4.MJEmptyStateComponent, i5.DatePipe], styles: ["[_nghost-%COMP%] {\n display: block;\n height: 100%;\n}\n\n.cos-loading[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 280px;\n}\n\n.cos-banner[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n padding: 12px 16px;\n margin-bottom: 16px;\n border-radius: 8px;\n border: 1px solid var(--mj-border-default);\n font-size: 13px;\n}\n\n.cos-banner__content[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 10px;\n}\n\n.cos-banner--success[_ngcontent-%COMP%] {\n background-color: var(--mj-status-success-bg);\n border-color: var(--mj-status-success);\n color: var(--mj-status-success);\n}\n\n.cos-banner--error[_ngcontent-%COMP%] {\n background-color: var(--mj-status-error-bg);\n border-color: var(--mj-status-error);\n color: var(--mj-status-error);\n}\n\n\n.cos-kpi-grid[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));\n gap: 16px;\n margin-top: 16px;\n margin-bottom: 20px;\n}\n\n.cos-kpi-card[_ngcontent-%COMP%] {\n background-color: var(--mj-bg-surface-card);\n border: 1px solid var(--mj-border-default);\n border-radius: 10px;\n padding: 16px 18px;\n cursor: pointer;\n transition: border-color 0.15s ease, transform 0.15s ease;\n}\n\n.cos-kpi-card[_ngcontent-%COMP%]:hover {\n border-color: var(--mj-brand-primary);\n}\n\n.cos-kpi-card__header[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 8px;\n}\n\n.cos-kpi-card__label[_ngcontent-%COMP%] {\n font-size: 12px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.04em;\n color: var(--mj-text-secondary);\n}\n\n.cos-kpi-card__icon[_ngcontent-%COMP%] {\n width: 34px;\n height: 34px;\n border-radius: 8px;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 15px;\n background-color: var(--mj-bg-surface-sunken);\n color: var(--mj-text-secondary);\n}\n\n.cos-kpi-card__icon--brand[_ngcontent-%COMP%] {\n background-color: var(--mj-bg-surface-sunken);\n color: var(--mj-brand-primary);\n}\n\n.cos-kpi-card__icon--success[_ngcontent-%COMP%] {\n background-color: var(--mj-status-success-bg);\n color: var(--mj-status-success);\n}\n\n.cos-kpi-card__icon--warning[_ngcontent-%COMP%] {\n background-color: var(--mj-status-warning-bg);\n color: var(--mj-status-warning);\n}\n\n.cos-kpi-card__value[_ngcontent-%COMP%] {\n font-size: 26px;\n font-weight: 700;\n color: var(--mj-text-primary);\n line-height: 1.2;\n}\n\n.cos-kpi-card__sub[_ngcontent-%COMP%] {\n margin-top: 4px;\n font-size: 12px;\n color: var(--mj-text-muted);\n}\n\n\n.cos-overview-columns[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));\n gap: 20px;\n margin-top: 16px;\n}\n\n.cos-stack[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 14px;\n}\n\n.cos-panel[_ngcontent-%COMP%] {\n background-color: var(--mj-bg-surface-card);\n border: 1px solid var(--mj-border-default);\n border-radius: 10px;\n padding: 18px 20px;\n}\n\n.cos-panel__header[_ngcontent-%COMP%] {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: 12px;\n margin-bottom: 16px;\n}\n\n.cos-panel__title[_ngcontent-%COMP%] {\n margin: 0;\n font-size: 15px;\n font-weight: 600;\n color: var(--mj-text-primary);\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.cos-panel__subtitle[_ngcontent-%COMP%] {\n margin: 4px 0 0;\n font-size: 12px;\n color: var(--mj-text-muted);\n}\n\n.cos-inline-empty[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n padding: 28px 16px;\n color: var(--mj-text-muted);\n gap: 8px;\n background-color: var(--mj-bg-surface-sunken);\n border-radius: 8px;\n}\n\n.cos-inline-empty[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 22px;\n color: var(--mj-text-secondary);\n}\n\n.cos-inline-empty[_ngcontent-%COMP%] p[_ngcontent-%COMP%] {\n margin: 0;\n font-size: 13px;\n}\n\n\n.cos-priority-mini[_ngcontent-%COMP%] {\n padding: 14px;\n border-radius: 8px;\n border: 1px solid var(--mj-border-subtle);\n background-color: var(--mj-bg-surface);\n cursor: pointer;\n transition: border-color 0.15s ease;\n}\n\n.cos-priority-mini[_ngcontent-%COMP%]:hover {\n border-color: var(--mj-brand-primary);\n}\n\n.cos-priority-mini__top[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 10px;\n margin-bottom: 10px;\n}\n\n.cos-priority-mini__name[_ngcontent-%COMP%] {\n font-size: 14px;\n font-weight: 600;\n color: var(--mj-text-primary);\n}\n\n.cos-priority-mini__meta[_ngcontent-%COMP%] {\n display: flex;\n flex-wrap: wrap;\n gap: 12px;\n margin-top: 8px;\n font-size: 12px;\n color: var(--mj-text-secondary);\n}\n\n\n.cos-progress-row[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 10px;\n}\n\n.cos-progress-bar[_ngcontent-%COMP%] {\n flex: 1;\n height: 8px;\n border-radius: 999px;\n background-color: var(--mj-bg-surface-sunken);\n overflow: hidden;\n}\n\n.cos-progress-bar__fill[_ngcontent-%COMP%] {\n height: 100%;\n border-radius: 999px;\n background-color: var(--mj-brand-primary);\n transition: width 0.25s ease;\n}\n\n.cos-progress-bar__fill--ontrack[_ngcontent-%COMP%], \n.cos-progress-bar__fill--completed[_ngcontent-%COMP%] {\n background-color: var(--mj-status-success);\n}\n\n.cos-progress-bar__fill--atrisk[_ngcontent-%COMP%] {\n background-color: var(--mj-status-warning);\n}\n\n.cos-progress-bar__fill--offtrack[_ngcontent-%COMP%] {\n background-color: var(--mj-status-error);\n}\n\n.cos-progress-row__pct[_ngcontent-%COMP%] {\n font-size: 12px;\n font-weight: 600;\n color: var(--mj-text-secondary);\n min-width: 36px;\n text-align: right;\n}\n\n\n.cos-health-pill[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 3px 9px;\n border-radius: 999px;\n font-size: 11px;\n font-weight: 600;\n white-space: nowrap;\n}\n\n.cos-health-pill--ontrack[_ngcontent-%COMP%], \n.cos-health-pill--completed[_ngcontent-%COMP%] {\n background-color: var(--mj-status-success-bg);\n color: var(--mj-status-success);\n}\n\n.cos-health-pill--atrisk[_ngcontent-%COMP%] {\n background-color: var(--mj-status-warning-bg);\n color: var(--mj-status-warning);\n}\n\n.cos-health-pill--offtrack[_ngcontent-%COMP%] {\n background-color: var(--mj-status-error-bg);\n color: var(--mj-status-error);\n}\n\n.cos-health-pill--paused[_ngcontent-%COMP%] {\n background-color: var(--mj-bg-surface-sunken);\n color: var(--mj-text-secondary);\n}\n\n.cos-meta-badge[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 2px 8px;\n border-radius: 6px;\n font-size: 11px;\n font-weight: 500;\n background-color: var(--mj-bg-surface-sunken);\n color: var(--mj-text-secondary);\n}\n\n.cos-status-chip[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n padding: 2px 8px;\n border-radius: 999px;\n font-size: 11px;\n font-weight: 600;\n background-color: var(--mj-bg-surface-sunken);\n color: var(--mj-text-secondary);\n}\n\n.cos-status-chip--active[_ngcontent-%COMP%], \n.cos-status-chip--approved[_ngcontent-%COMP%] {\n background-color: var(--mj-status-success-bg);\n color: var(--mj-status-success);\n}\n\n.cos-status-chip--requested[_ngcontent-%COMP%], \n.cos-status-chip--paused[_ngcontent-%COMP%] {\n background-color: var(--mj-status-warning-bg);\n color: var(--mj-status-warning);\n}\n\n.cos-status-chip--rejected[_ngcontent-%COMP%], \n.cos-status-chip--disabled[_ngcontent-%COMP%] {\n background-color: var(--mj-status-error-bg);\n color: var(--mj-status-error);\n}\n\n.cos-overdue-text[_ngcontent-%COMP%] {\n color: var(--mj-status-error);\n}\n\n\n.cos-filter-bar[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex-wrap: wrap;\n gap: 10px;\n margin: 16px 0;\n}\n\n.cos-filter-pills[_ngcontent-%COMP%] {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n}\n\n.cos-priority-list[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n\n.cos-priority-card[_ngcontent-%COMP%] {\n background-color: var(--mj-bg-surface-card);\n border: 1px solid var(--mj-border-default);\n border-radius: 10px;\n overflow: hidden;\n}\n\n.cos-priority-card__header[_ngcontent-%COMP%] {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: 16px;\n padding: 16px 20px;\n cursor: pointer;\n border-bottom: 1px solid var(--mj-border-subtle);\n}\n\n.cos-priority-card__title-group[_ngcontent-%COMP%] {\n display: flex;\n align-items: flex-start;\n gap: 10px;\n}\n\n.cos-priority-card__badges[_ngcontent-%COMP%] {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n margin-bottom: 6px;\n}\n\n.cos-priority-card__title[_ngcontent-%COMP%] {\n margin: 0;\n font-size: 16px;\n font-weight: 600;\n color: var(--mj-text-primary);\n}\n\n.cos-priority-card__right[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 14px;\n flex-shrink: 0;\n}\n\n.cos-priority-card__progress-summary[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n}\n\n.cos-priority-card__pct[_ngcontent-%COMP%] {\n font-size: 18px;\n font-weight: 700;\n color: var(--mj-text-primary);\n}\n\n.cos-priority-card__milestone-count[_ngcontent-%COMP%] {\n font-size: 11px;\n color: var(--mj-text-muted);\n}\n\n.cos-priority-card__body[_ngcontent-%COMP%] {\n padding: 16px 20px;\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n\n.cos-priority-card__desc[_ngcontent-%COMP%] {\n margin: 0;\n font-size: 13px;\n color: var(--mj-text-secondary);\n line-height: 1.5;\n}\n\n.cos-metric-target-label[_ngcontent-%COMP%] {\n font-size: 12px;\n font-weight: 600;\n color: var(--mj-text-secondary);\n white-space: nowrap;\n}\n\n.cos-priority-card__dates[_ngcontent-%COMP%] {\n display: flex;\n flex-wrap: wrap;\n gap: 16px;\n font-size: 12px;\n color: var(--mj-text-secondary);\n}\n\n\n.cos-subtasks[_ngcontent-%COMP%] {\n margin-top: 6px;\n border-top: 1px solid var(--mj-border-subtle);\n padding-top: 12px;\n}\n\n.cos-subtasks__header[_ngcontent-%COMP%] {\n font-size: 12px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.04em;\n color: var(--mj-text-muted);\n margin-bottom: 8px;\n}\n\n.cos-subtasks__list[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.cos-subtask-row[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n padding: 10px 12px;\n border-radius: 8px;\n background-color: var(--mj-bg-surface-sunken);\n cursor: pointer;\n transition: background-color 0.15s ease;\n}\n\n.cos-subtask-row[_ngcontent-%COMP%]:hover {\n background-color: var(--mj-bg-surface-hover);\n}\n\n.cos-subtask-row__left[_ngcontent-%COMP%] {\n display: flex;\n align-items: flex-start;\n gap: 10px;\n}\n\n.cos-subtask-row__left[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n margin-top: 3px;\n color: var(--mj-brand-primary);\n}\n\n.cos-subtask-row__name[_ngcontent-%COMP%] {\n font-size: 13px;\n font-weight: 600;\n color: var(--mj-text-primary);\n}\n\n.cos-subtask-row__desc[_ngcontent-%COMP%] {\n font-size: 12px;\n color: var(--mj-text-muted);\n margin-top: 2px;\n}\n\n.cos-subtask-row__right[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 10px;\n flex-shrink: 0;\n}\n\n.cos-subtask-row__due[_ngcontent-%COMP%] {\n font-size: 12px;\n color: var(--mj-text-secondary);\n}\n\n.cos-subtask-row__chevron[_ngcontent-%COMP%] {\n font-size: 11px;\n color: var(--mj-text-muted);\n}\n\n\n.cos-request-card[_ngcontent-%COMP%] {\n padding: 14px;\n border-radius: 8px;\n border: 1px solid var(--mj-border-default);\n background-color: var(--mj-bg-surface);\n cursor: pointer;\n transition: border-color 0.15s ease;\n}\n\n.cos-request-card[_ngcontent-%COMP%]:hover {\n border-color: var(--mj-brand-primary);\n}\n\n.cos-request-card__top[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n margin-bottom: 8px;\n}\n\n.cos-request-card__badges[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n.cos-priority-tag[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n padding: 2px 8px;\n border-radius: 6px;\n font-size: 11px;\n font-weight: 600;\n}\n\n.cos-priority-tag.priority-critical[_ngcontent-%COMP%], \n.cos-priority-tag.priority-high[_ngcontent-%COMP%] {\n background-color: var(--mj-status-error-bg);\n color: var(--mj-status-error);\n}\n\n.cos-priority-tag.priority-normal[_ngcontent-%COMP%] {\n background-color: var(--mj-status-warning-bg);\n color: var(--mj-status-warning);\n}\n\n.cos-priority-tag.priority-low[_ngcontent-%COMP%] {\n background-color: var(--mj-bg-surface-sunken);\n color: var(--mj-text-secondary);\n}\n\n.cos-timestamp[_ngcontent-%COMP%] {\n font-size: 11px;\n color: var(--mj-text-muted);\n white-space: nowrap;\n}\n\n.cos-request-card__text[_ngcontent-%COMP%] {\n margin: 0 0 12px;\n font-size: 13px;\n color: var(--mj-text-primary);\n line-height: 1.45;\n}\n\n.cos-request-card__actions[_ngcontent-%COMP%] {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n}\n\n.cos-resolved-section[_ngcontent-%COMP%] {\n margin-top: 20px;\n padding-top: 16px;\n border-top: 1px solid var(--mj-border-subtle);\n}\n\n.cos-resolved-section__title[_ngcontent-%COMP%] {\n margin: 0 0 10px;\n font-size: 12px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.04em;\n color: var(--mj-text-muted);\n}\n\n.cos-resolved-row[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 10px;\n padding: 8px 10px;\n border-radius: 6px;\n background-color: var(--mj-bg-surface-sunken);\n cursor: pointer;\n}\n\n.cos-resolved-row__main[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n min-width: 0;\n}\n\n.cos-resolved-row__text[_ngcontent-%COMP%] {\n font-size: 12px;\n color: var(--mj-text-secondary);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n\n.cos-routine-mini[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n padding: 12px 14px;\n border-radius: 8px;\n border: 1px solid var(--mj-border-subtle);\n background-color: var(--mj-bg-surface);\n}\n\n.cos-routine-mini__title-row[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.cos-routine-mini__name[_ngcontent-%COMP%] {\n font-size: 13px;\n font-weight: 600;\n color: var(--mj-text-primary);\n}\n\n.cos-routine-mini__meta[_ngcontent-%COMP%] {\n margin-top: 4px;\n font-size: 12px;\n color: var(--mj-text-muted);\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n}\n\n.cos-routine-card[_ngcontent-%COMP%] {\n padding: 16px;\n border-radius: 8px;\n border: 1px solid var(--mj-border-default);\n background-color: var(--mj-bg-surface);\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n\n.cos-routine-card__title-row[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 8px;\n}\n\n.cos-routine-card__name[_ngcontent-%COMP%] {\n margin: 0;\n font-size: 14px;\n font-weight: 600;\n color: var(--mj-text-primary);\n}\n\n.cos-routine-card__desc[_ngcontent-%COMP%] {\n margin: 4px 0 0;\n font-size: 12px;\n color: var(--mj-text-secondary);\n}\n\n.cos-routine-card__schedule[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 4px;\n font-size: 12px;\n color: var(--mj-text-secondary);\n padding: 10px 12px;\n border-radius: 6px;\n background-color: var(--mj-bg-surface-sunken);\n}\n\n.cos-routine-card__actions[_ngcontent-%COMP%] {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n}\n\n\n.cos-governance-container[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 18px;\n margin-top: 16px;\n}\n\n.cos-governance-header[_ngcontent-%COMP%] {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n flex-wrap: wrap;\n gap: 12px;\n padding: 16px 20px;\n border-radius: 10px;\n background-color: var(--mj-bg-surface-card);\n border: 1px solid var(--mj-border-default);\n}\n\n.cos-governance-header__title[_ngcontent-%COMP%] {\n margin: 0;\n font-size: 16px;\n font-weight: 600;\n color: var(--mj-text-primary);\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.cos-governance-header__subtitle[_ngcontent-%COMP%] {\n margin: 4px 0 0;\n font-size: 12px;\n color: var(--mj-text-secondary);\n}\n\n.cos-governance-header__actions[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.cos-status-segmented[_ngcontent-%COMP%] {\n display: flex;\n gap: 6px;\n}\n\n.cos-mode-cards[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));\n gap: 12px;\n margin-bottom: 16px;\n}\n\n.cos-mode-card[_ngcontent-%COMP%] {\n padding: 14px 16px;\n border-radius: 8px;\n border: 1px solid var(--mj-border-default);\n background-color: var(--mj-bg-surface);\n cursor: pointer;\n transition: border-color 0.15s ease, background-color 0.15s ease;\n}\n\n.cos-mode-card[_ngcontent-%COMP%]:hover {\n border-color: var(--mj-brand-primary);\n}\n\n.cos-mode-card--selected[_ngcontent-%COMP%] {\n border-color: var(--mj-brand-primary);\n background-color: var(--mj-bg-surface-sunken);\n}\n\n.cos-mode-card__top[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 6px;\n}\n\n.cos-mode-card__title[_ngcontent-%COMP%] {\n font-size: 14px;\n font-weight: 600;\n color: var(--mj-text-primary);\n}\n\n.cos-mode-card__check[_ngcontent-%COMP%] {\n color: var(--mj-brand-primary);\n}\n\n.cos-mode-card__desc[_ngcontent-%COMP%] {\n margin: 0;\n font-size: 12px;\n color: var(--mj-text-secondary);\n line-height: 1.45;\n}\n\n.cos-form-grid[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));\n gap: 14px;\n}\n\n.cos-form-grid--spaced[_ngcontent-%COMP%] {\n margin-top: 16px;\n}\n\n.cos-form-field[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n\n.cos-form-field--full[_ngcontent-%COMP%] {\n grid-column: 1 / -1;\n}\n\n.cos-form-field__label[_ngcontent-%COMP%] {\n font-size: 12px;\n font-weight: 600;\n color: var(--mj-text-secondary);\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n.cos-input[_ngcontent-%COMP%], \n.cos-select[_ngcontent-%COMP%], \n.cos-textarea[_ngcontent-%COMP%] {\n width: 100%;\n padding: 8px 10px;\n border-radius: 6px;\n border: 1px solid var(--mj-border-default);\n background-color: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n font-size: 13px;\n font-family: inherit;\n box-sizing: border-box;\n}\n\n.cos-input[_ngcontent-%COMP%]:focus, \n.cos-select[_ngcontent-%COMP%]:focus, \n.cos-textarea[_ngcontent-%COMP%]:focus {\n outline: none;\n border-color: var(--mj-brand-primary);\n}\n\n.cos-toggle-list[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 10px;\n}\n\n.cos-toggle-row[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 16px;\n padding: 12px 14px;\n border-radius: 8px;\n border: 1px solid var(--mj-border-subtle);\n background-color: var(--mj-bg-surface);\n cursor: pointer;\n}\n\n.cos-toggle-row__title[_ngcontent-%COMP%] {\n font-size: 13px;\n font-weight: 600;\n color: var(--mj-text-primary);\n}\n\n.cos-toggle-row__desc[_ngcontent-%COMP%] {\n margin-top: 2px;\n font-size: 12px;\n color: var(--mj-text-muted);\n}\n\n\n\n\n\n.cos-drawer-backdrop[_ngcontent-%COMP%] {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: rgba(0, 0, 0, 0.45);\n z-index: 1000;\n backdrop-filter: blur(1px);\n}\n\n.cos-drawer[_ngcontent-%COMP%] {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n width: 520px;\n max-width: 92vw;\n background-color: var(--mj-bg-surface-card);\n border-left: 1px solid var(--mj-border-default);\n box-shadow: -6px 0 28px rgba(0, 0, 0, 0.25);\n z-index: 1001;\n display: flex;\n flex-direction: column;\n animation: _ngcontent-%COMP%_cosDrawerSlideIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);\n}\n\n@keyframes _ngcontent-%COMP%_cosDrawerSlideIn {\n from {\n transform: translateX(100%);\n }\n to {\n transform: translateX(0);\n }\n}\n\n.cos-drawer__header[_ngcontent-%COMP%] {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: 16px;\n padding: 18px 20px;\n border-bottom: 1px solid var(--mj-border-subtle);\n background-color: var(--mj-bg-surface);\n}\n\n.cos-drawer__category-strip[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 8px;\n margin-bottom: 6px;\n}\n\n.cos-badge-objective[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 2px 8px;\n border-radius: 999px;\n font-size: 11px;\n font-weight: 600;\n background-color: var(--mj-bg-surface-sunken);\n color: var(--mj-brand-primary);\n border: 1px solid var(--mj-border-default);\n}\n\n.cos-badge-milestone[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 2px 8px;\n border-radius: 999px;\n font-size: 11px;\n font-weight: 600;\n background-color: var(--mj-bg-surface-sunken);\n color: var(--mj-text-secondary);\n border: 1px solid var(--mj-border-subtle);\n}\n\n.cos-drawer__parent-link[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 2px 8px;\n border-radius: 6px;\n font-size: 11px;\n font-weight: 500;\n background: none;\n border: 1px dashed var(--mj-border-default);\n color: var(--mj-text-secondary);\n cursor: pointer;\n transition: color 0.15s ease, border-color 0.15s ease;\n}\n\n.cos-drawer__parent-link[_ngcontent-%COMP%]:hover {\n color: var(--mj-brand-primary);\n border-color: var(--mj-brand-primary);\n}\n\n.cos-drawer__title[_ngcontent-%COMP%] {\n margin: 0;\n font-size: 16px;\n font-weight: 600;\n color: var(--mj-text-primary);\n line-height: 1.35;\n}\n\n.cos-drawer__header-actions[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n flex-shrink: 0;\n}\n\n.cos-drawer__close-btn[_ngcontent-%COMP%] {\n color: var(--mj-text-secondary);\n}\n\n.cos-drawer__body[_ngcontent-%COMP%] {\n flex: 1;\n overflow-y: auto;\n padding: 20px;\n display: flex;\n flex-direction: column;\n gap: 20px;\n}\n\n.cos-drawer__ribbon[_ngcontent-%COMP%] {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 8px;\n padding: 10px 14px;\n border-radius: 8px;\n background-color: var(--mj-bg-surface-sunken);\n border: 1px solid var(--mj-border-subtle);\n}\n\n.cos-drawer__section[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n\n.cos-drawer__section-title[_ngcontent-%COMP%] {\n margin: 0;\n font-size: 12px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.04em;\n color: var(--mj-text-muted);\n}\n\n.cos-drawer__footer[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n gap: 10px;\n padding: 14px 20px;\n border-top: 1px solid var(--mj-border-default);\n background-color: var(--mj-bg-surface);\n}"], changeDetection: 0 });
2896
+ };
2897
+ ChiefOfStaffDashboardComponent = __decorate([
2898
+ RegisterClass(BaseResourceComponent, 'ChiefOfStaffDashboard'),
2899
+ RegisterClass(BaseResourceComponent, 'ChiefOfStaffResource')
2900
+ ], ChiefOfStaffDashboardComponent);
2901
+ export { ChiefOfStaffDashboardComponent };
2902
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ChiefOfStaffDashboardComponent, [{
2903
+ type: Component,
2904
+ args: [{ standalone: false, selector: 'mj-chief-of-staff-dashboard', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mj-page-layout>\n <mj-page-header\n [Title]=\"ChiefOfStaffDisplayName\"\n Subtitle=\"Executive cockpit for strategic priorities, pending approvals, wake routines, and governance policy\"\n Icon=\"fa-solid fa-user-tie\">\n\n <ng-container meta>\n <mj-stat-badge\n Icon=\"fa-solid fa-bullseye\"\n [Count]=\"Metrics.PriorityObjectiveCount\"\n Label=\"priorities\"\n Variant=\"info\">\n </mj-stat-badge>\n @if (Metrics.AtRiskCount + Metrics.OffTrackCount > 0) {\n <mj-stat-badge\n Icon=\"fa-solid fa-triangle-exclamation\"\n [Count]=\"Metrics.AtRiskCount + Metrics.OffTrackCount\"\n Label=\"at risk\"\n Variant=\"warning\">\n </mj-stat-badge>\n }\n @if (Metrics.PendingApprovalCount > 0) {\n <mj-stat-badge\n Icon=\"fa-solid fa-bell-concierge\"\n [Count]=\"Metrics.PendingApprovalCount\"\n Label=\"pending approvals\"\n Variant=\"warning\">\n </mj-stat-badge>\n } @else {\n <mj-stat-badge\n Icon=\"fa-solid fa-circle-check\"\n [Count]=\"0\"\n Label=\"pending approvals\"\n Variant=\"success\">\n </mj-stat-badge>\n }\n <mj-stat-badge\n Icon=\"fa-solid fa-clock-rotate-left\"\n [Count]=\"Metrics.ActiveWakeRoutineCount\"\n Label=\"active wakes\"\n Variant=\"info\">\n </mj-stat-badge>\n </ng-container>\n\n <ng-container toolbar>\n <mj-page-search\n Placeholder=\"Filter priorities, requests, or routines...\"\n [Value]=\"SearchText\"\n (ValueChange)=\"OnSearchChange($event)\">\n </mj-page-search>\n <mj-refresh-button\n [Loading]=\"IsLoading\"\n [ShowLabel]=\"true\"\n (Refresh)=\"LoadCockpitData()\">\n </mj-refresh-button>\n </ng-container>\n </mj-page-header>\n\n <mj-page-body>\n @if (FeedbackBanner) {\n <div class=\"cos-banner\"\n [class.cos-banner--success]=\"FeedbackBanner.Type === 'success'\"\n [class.cos-banner--error]=\"FeedbackBanner.Type === 'error'\"\n role=\"status\">\n <div class=\"cos-banner__content\">\n <i class=\"fa-solid\"\n [class.fa-circle-check]=\"FeedbackBanner.Type === 'success'\"\n [class.fa-circle-exclamation]=\"FeedbackBanner.Type === 'error'\"></i>\n <span>{{ FeedbackBanner.Message }}</span>\n </div>\n <button mjButton variant=\"flat\" size=\"sm\" (click)=\"DismissBanner()\" aria-label=\"Dismiss notification\">\n <i class=\"fa-solid fa-xmark\"></i>\n </button>\n </div>\n }\n\n <mj-tab-nav\n [Tabs]=\"Tabs\"\n [ActiveKey]=\"ActiveTab\"\n (TabChange)=\"OnTabChange($event)\">\n </mj-tab-nav>\n\n @if (IsLoading) {\n <div class=\"cos-loading\">\n <mj-loading text=\"Loading Chief of Staff cockpit...\"></mj-loading>\n </div>\n } @else {\n <!-- ========================================================= -->\n <!-- TAB 1: OVERVIEW -->\n <!-- ========================================================= -->\n @if (ActiveTab === 'overview') {\n <div class=\"cos-kpi-grid\">\n <div class=\"cos-kpi-card\" (click)=\"OnTabChange('priorities')\">\n <div class=\"cos-kpi-card__header\">\n <span class=\"cos-kpi-card__label\">Priority Objectives</span>\n <div class=\"cos-kpi-card__icon cos-kpi-card__icon--brand\">\n <i class=\"fa-solid fa-bullseye\"></i>\n </div>\n </div>\n <div class=\"cos-kpi-card__value\">{{ Metrics.PriorityObjectiveCount }}</div>\n <div class=\"cos-kpi-card__sub\">\n {{ Metrics.OnTrackCount }} on track \u00B7 {{ Metrics.SubtaskCount }} milestones\n </div>\n </div>\n\n <div class=\"cos-kpi-card\" (click)=\"OnTabChange('priorities')\">\n <div class=\"cos-kpi-card__header\">\n <span class=\"cos-kpi-card__label\">Avg Objective Progress</span>\n <div class=\"cos-kpi-card__icon cos-kpi-card__icon--success\">\n <i class=\"fa-solid fa-chart-line\"></i>\n </div>\n </div>\n <div class=\"cos-kpi-card__value\">{{ Metrics.AveragePriorityProgress }}%</div>\n <div class=\"cos-kpi-card__sub\">\n @if (Metrics.AverageConfidenceScore !== null) {\n Avg confidence: {{ Metrics.AverageConfidenceScore }}%\n } @else {\n {{ Metrics.CompletedPriorityCount }} completed objectives\n }\n </div>\n </div>\n\n <div class=\"cos-kpi-card\" (click)=\"OnTabChange('approvals-wakes')\">\n <div class=\"cos-kpi-card__header\">\n <span class=\"cos-kpi-card__label\">Pending Approvals</span>\n <div class=\"cos-kpi-card__icon\"\n [class.cos-kpi-card__icon--warning]=\"Metrics.PendingApprovalCount > 0\"\n [class.cos-kpi-card__icon--success]=\"Metrics.PendingApprovalCount === 0\">\n <i class=\"fa-solid fa-bell-concierge\"></i>\n </div>\n </div>\n <div class=\"cos-kpi-card__value\">{{ Metrics.PendingApprovalCount }}</div>\n <div class=\"cos-kpi-card__sub\">\n @if (Metrics.HighPriorityPendingCount > 0) {\n {{ Metrics.HighPriorityPendingCount }} high-priority awaiting decision\n } @else {\n All high-priority requests clear\n }\n </div>\n </div>\n\n <div class=\"cos-kpi-card\" (click)=\"OnTabChange('governance')\">\n <div class=\"cos-kpi-card__header\">\n <span class=\"cos-kpi-card__label\">Governance Posture</span>\n <div class=\"cos-kpi-card__icon cos-kpi-card__icon--brand\">\n <i class=\"fa-solid fa-shield-halved\"></i>\n </div>\n </div>\n <div class=\"cos-kpi-card__value\">{{ DraftPolicy.CoordinationMode }}</div>\n <div class=\"cos-kpi-card__sub\">\n Status: {{ DraftPolicy.Status }} \u00B7 Email: {{ DraftPolicy.EmailChannelMode }}\n </div>\n </div>\n </div>\n\n <div class=\"cos-overview-columns\">\n <!-- Column 1: Strategic Priorities -->\n <section class=\"cos-panel\">\n <div class=\"cos-panel__header\">\n <div>\n <h3 class=\"cos-panel__title\">\n <i class=\"fa-solid fa-bullseye\"></i> Strategic Priorities & OKRs\n </h3>\n <p class=\"cos-panel__subtitle\">\n Active priority objectives tracked in MJ_BizApps_Tasks\n </p>\n </div>\n <button mjButton variant=\"outline\" size=\"sm\" (click)=\"OnTabChange('priorities')\">\n View All ({{ Metrics.PriorityObjectiveCount }})\n </button>\n </div>\n\n @if (FilteredPriorityCards.length === 0) {\n <div class=\"cos-inline-empty\">\n <i class=\"fa-solid fa-bullseye\"></i>\n <p>No priority objectives found. Ask your Chief of Staff in chat to establish your quarterly priorities.</p>\n </div>\n } @else {\n <div class=\"cos-stack\">\n @for (card of FilteredPriorityCards.slice(0, 4); track card.Task.ID) {\n <div class=\"cos-priority-mini\" (click)=\"OnTabChange('priorities')\">\n <div class=\"cos-priority-mini__top\">\n <span class=\"cos-priority-mini__name\">{{ card.Task.Name }}</span>\n <span class=\"cos-health-pill cos-health-pill--{{ card.EffectiveHealth.toLowerCase() }}\">\n <i class=\"{{ GetHealthBadgeIcon(card.EffectiveHealth) }}\"></i>\n {{ GetHealthBadgeLabel(card.EffectiveHealth) }}\n </span>\n </div>\n <div class=\"cos-progress-row\">\n <div class=\"cos-progress-bar\">\n <div class=\"cos-progress-bar__fill cos-progress-bar__fill--{{ card.EffectiveHealth.toLowerCase() }}\"\n [style.width.%]=\"card.EffectivePercentComplete\"></div>\n </div>\n <span class=\"cos-progress-row__pct\">{{ card.EffectivePercentComplete }}%</span>\n </div>\n <div class=\"cos-priority-mini__meta\">\n <span>\n <i class=\"fa-solid fa-list-check\"></i>\n {{ card.CompletedSubtaskCount }}/{{ card.Subtasks.length }} milestones\n </span>\n @if (card.Task.CheckInCadence) {\n <span>\n <i class=\"fa-solid fa-repeat\"></i> {{ card.Task.CheckInCadence }}\n </span>\n }\n @if (card.Task.DueAt) {\n <span [class.cos-overdue-text]=\"card.IsOverdue\">\n <i class=\"fa-regular fa-calendar\"></i> Due {{ card.Task.DueAt | date:'mediumDate' }}\n </span>\n }\n </div>\n </div>\n }\n </div>\n }\n </section>\n\n <!-- Column 2: Pending Approvals & Wake Schedule -->\n <div class=\"cos-stack\">\n <section class=\"cos-panel\">\n <div class=\"cos-panel__header\">\n <div>\n <h3 class=\"cos-panel__title\">\n <i class=\"fa-solid fa-bell-concierge\"></i> Pending Approvals\n </h3>\n <p class=\"cos-panel__subtitle\">\n Requests awaiting your decision\n </p>\n </div>\n <button mjButton variant=\"outline\" size=\"sm\" (click)=\"OnTabChange('approvals-wakes')\">\n Manage ({{ PendingRequests.length }})\n </button>\n </div>\n\n @if (PendingRequests.length === 0) {\n <div class=\"cos-inline-empty\">\n <i class=\"fa-solid fa-circle-check\"></i>\n <p>No pending requests awaiting approval.</p>\n </div>\n } @else {\n <div class=\"cos-stack\">\n @for (req of PendingRequests.slice(0, 3); track req.ID) {\n <div class=\"cos-request-card\" (click)=\"OpenRequestDetail(req)\">\n <div class=\"cos-request-card__top\">\n <span class=\"cos-priority-tag {{ GetPriorityTierClass(req.Priority) }}\">\n {{ GetPriorityTierLabel(req.Priority) }} ({{ req.Priority }})\n </span>\n @if (req.RequestType) {\n <span class=\"cos-meta-badge\">{{ req.RequestType }}</span>\n }\n <span class=\"cos-timestamp\">\n {{ req.RequestedAt | date:'short' }}\n </span>\n </div>\n <p class=\"cos-request-card__text\">{{ req.Request }}</p>\n <div class=\"cos-request-card__actions\">\n <button mjButton variant=\"primary\" size=\"sm\"\n [disabled]=\"BusyRequestID === req.ID\"\n (click)=\"QuickRespondToRequest(req, 'Approved', $event)\">\n <i class=\"fa-solid fa-check\"></i> Approve\n </button>\n <button mjButton variant=\"danger\" size=\"sm\"\n [disabled]=\"BusyRequestID === req.ID\"\n (click)=\"QuickRespondToRequest(req, 'Rejected', $event)\">\n <i class=\"fa-solid fa-xmark\"></i> Reject\n </button>\n <button mjButton variant=\"outline\" size=\"sm\"\n (click)=\"OpenRequestDetail(req); $event.stopPropagation()\">\n Inspect\n </button>\n </div>\n </div>\n }\n </div>\n }\n </section>\n\n <section class=\"cos-panel\">\n <div class=\"cos-panel__header\">\n <div>\n <h3 class=\"cos-panel__title\">\n <i class=\"fa-solid fa-clock-rotate-left\"></i> Autonomous Wake Schedule\n </h3>\n <p class=\"cos-panel__subtitle\">\n Proactive AgentWake routines for your Chief of Staff\n </p>\n </div>\n <button mjButton variant=\"outline\" size=\"sm\" (click)=\"OnTabChange('approvals-wakes')\">\n Routines ({{ Routines.length }})\n </button>\n </div>\n\n @if (Routines.length === 0) {\n <div class=\"cos-inline-empty\">\n <i class=\"fa-regular fa-clock\"></i>\n <p>No wake routines configured yet.</p>\n </div>\n } @else {\n <div class=\"cos-stack\">\n @for (routine of Routines.slice(0, 3); track routine.ID) {\n <div class=\"cos-routine-mini\">\n <div class=\"cos-routine-mini__info\">\n <div class=\"cos-routine-mini__title-row\">\n <span class=\"cos-routine-mini__name\">{{ routine.Name }}</span>\n <span class=\"cos-status-chip cos-status-chip--{{ routine.Status.toLowerCase() }}\">\n {{ routine.Status }}\n </span>\n </div>\n <div class=\"cos-routine-mini__meta\">\n @if (routine.NextRunAt) {\n <span>Next wake: {{ routine.NextRunAt | date:'short' }}</span>\n } @else {\n <span>No next wake scheduled</span>\n }\n @if (routine.CronExpression) {\n <span>\u00B7 Cron: <code>{{ routine.CronExpression }}</code></span>\n }\n </div>\n </div>\n <div class=\"cos-routine-mini__actions\">\n <button mjButton variant=\"primary\" size=\"sm\"\n [disabled]=\"BusyRoutineID === routine.ID\"\n (click)=\"TriggerWakeNow(routine, $event)\">\n <i class=\"fa-solid fa-bolt\"></i> Wake Now\n </button>\n </div>\n </div>\n }\n </div>\n }\n </section>\n </div>\n </div>\n }\n\n <!-- ========================================================= -->\n <!-- TAB 2: PRIORITIES & OKRS -->\n <!-- ========================================================= -->\n @if (ActiveTab === 'priorities') {\n <div class=\"cos-filter-bar\">\n <div class=\"cos-filter-pills\" role=\"group\" aria-label=\"Filter priorities by health\">\n @for (opt of HealthFilterOptions; track opt.Value) {\n <button mjButton\n [variant]=\"HealthFilter === opt.Value ? 'primary' : 'outline'\"\n size=\"sm\"\n (click)=\"OnHealthFilterChange(opt.Value)\">\n {{ opt.Label }}\n </button>\n }\n </div>\n @if (HealthFilter !== 'all' || SearchText.trim().length > 0) {\n <button mjButton variant=\"flat\" size=\"sm\" (click)=\"ClearFilters()\">\n <i class=\"fa-solid fa-rotate-left\"></i> Clear Filters\n </button>\n }\n </div>\n\n @if (FilteredPriorityCards.length === 0) {\n <mj-empty-state\n [Variant]=\"Metrics.PriorityCards.length === 0 ? 'empty' : 'no-results'\"\n Icon=\"fa-solid fa-bullseye\"\n [Title]=\"!HasLinkedPerson ? 'No People Record Linked to Your User' : Metrics.PriorityCards.length === 0 ? 'No Priority Objectives Tracked Yet' : 'No Priority Objectives Match Your Filter'\"\n [Message]=\"!HasLinkedPerson ? 'Priorities are read from tasks you created or are assigned to. Ask an administrator to link your People record to your user account.' : Metrics.PriorityCards.length === 0 ? 'Chat with your Chief of Staff to onboard your quarterly priorities and milestone schedule.' : 'Try clearing your search or health filter.'\"\n [ActionText]=\"Metrics.PriorityCards.length === 0 ? '' : 'Clear Filters'\"\n ActionIcon=\"fa-solid fa-rotate-left\"\n (Action)=\"ClearFilters()\">\n </mj-empty-state>\n } @else {\n <div class=\"cos-priority-list\">\n @for (card of FilteredPriorityCards; track card.Task.ID) {\n <article class=\"cos-priority-card\">\n <div class=\"cos-priority-card__header\" (click)=\"TogglePriorityExpanded(card.Task.ID)\">\n <div class=\"cos-priority-card__title-group\">\n <button mjButton variant=\"flat\" size=\"sm\"\n class=\"cos-expand-btn\"\n [attr.aria-expanded]=\"IsPriorityExpanded(card.Task.ID)\"\n (click)=\"TogglePriorityExpanded(card.Task.ID); $event.stopPropagation()\">\n <i class=\"fa-solid\"\n [class.fa-chevron-down]=\"IsPriorityExpanded(card.Task.ID)\"\n [class.fa-chevron-right]=\"!IsPriorityExpanded(card.Task.ID)\"></i>\n </button>\n <div>\n <div class=\"cos-priority-card__badges\">\n @if (card.Task.Priority) {\n <span class=\"cos-priority-tag {{ GetTaskPriorityClass(card.Task.Priority) }}\">\n <i class=\"fa-solid fa-flag\"></i> {{ card.Task.Priority }}\n </span>\n }\n <span class=\"cos-health-pill cos-health-pill--{{ card.EffectiveHealth.toLowerCase() }}\">\n <i class=\"{{ GetHealthBadgeIcon(card.EffectiveHealth) }}\"></i>\n {{ GetHealthBadgeLabel(card.EffectiveHealth) }}\n </span>\n @if (card.Task.PlanningPeriod) {\n <span class=\"cos-meta-badge\">\n <i class=\"fa-regular fa-calendar-check\"></i> {{ card.Task.PlanningPeriod }}\n </span>\n }\n @if (card.Task.CheckInCadence) {\n <span class=\"cos-meta-badge\">\n <i class=\"fa-solid fa-repeat\"></i> {{ card.Task.CheckInCadence }} Check-In\n </span>\n }\n @if (card.Task.ConfidenceScore !== null) {\n <span class=\"cos-meta-badge\">\n <i class=\"fa-solid fa-gauge-high\"></i> {{ card.Task.ConfidenceScore }}% Confidence\n </span>\n }\n </div>\n <h3 class=\"cos-priority-card__title\">{{ card.Task.Name }}</h3>\n </div>\n </div>\n\n <div class=\"cos-priority-card__right\">\n <div class=\"cos-priority-card__progress-summary\">\n <span class=\"cos-priority-card__pct\">{{ card.EffectivePercentComplete }}%</span>\n <span class=\"cos-priority-card__milestone-count\">\n {{ card.CompletedSubtaskCount }}/{{ card.Subtasks.length }} milestones\n </span>\n </div>\n <button mjButton variant=\"outline\" size=\"sm\"\n (click)=\"OpenTaskRecord(card.Task.ID, $event)\">\n <i class=\"fa-solid fa-sliders\"></i> Inspect & Edit\n </button>\n </div>\n </div>\n\n <div class=\"cos-priority-card__body\">\n @if (card.Task.Description) {\n <p class=\"cos-priority-card__desc\">{{ card.Task.Description }}</p>\n }\n\n <div class=\"cos-progress-row\">\n <div class=\"cos-progress-bar\">\n <div class=\"cos-progress-bar__fill cos-progress-bar__fill--{{ card.EffectiveHealth.toLowerCase() }}\"\n [style.width.%]=\"card.EffectivePercentComplete\"></div>\n </div>\n @if (card.MetricProgressLabel) {\n <span class=\"cos-metric-target-label\">\n <i class=\"fa-solid fa-chart-simple\"></i> {{ card.MetricProgressLabel }}\n </span>\n }\n </div>\n\n <div class=\"cos-priority-card__dates\">\n <span>\n <strong>Status:</strong> {{ card.Task.Status }}\n </span>\n @if (card.Task.DueAt) {\n <span [class.cos-overdue-text]=\"card.IsOverdue\">\n <i class=\"fa-regular fa-calendar\"></i>\n <strong>Target Due:</strong> {{ card.Task.DueAt | date:'mediumDate' }}\n @if (card.IsOverdue) {\n <strong>(Overdue)</strong>\n }\n </span>\n }\n @if (card.Task.NextCheckInDueAt) {\n <span>\n <i class=\"fa-regular fa-bell\"></i>\n <strong>Next Check-In:</strong> {{ card.Task.NextCheckInDueAt | date:'mediumDate' }}\n </span>\n }\n </div>\n\n @if (IsPriorityExpanded(card.Task.ID) && card.Subtasks.length > 0) {\n <div class=\"cos-subtasks\">\n <div class=\"cos-subtasks__header\">\n <span>Milestones & Workstreams ({{ card.Subtasks.length }})</span>\n </div>\n <div class=\"cos-subtasks__list\">\n @for (sub of card.Subtasks; track sub.ID) {\n <div class=\"cos-subtask-row\" (click)=\"OpenTaskRecord(sub.ID, $event)\">\n <div class=\"cos-subtask-row__left\">\n <i class=\"fa-solid\"\n [class.fa-circle-check]=\"sub.Status === 'Completed' || sub.Status === 'Done'\"\n [class.fa-circle-half-stroke]=\"sub.Status === 'In Progress'\"\n [class.fa-regular]=\"sub.Status !== 'Completed' && sub.Status !== 'Done' && sub.Status !== 'In Progress'\"\n [class.fa-circle]=\"sub.Status !== 'Completed' && sub.Status !== 'Done' && sub.Status !== 'In Progress'\"></i>\n <div>\n <div class=\"cos-subtask-row__name\">{{ sub.Name }}</div>\n @if (sub.Description) {\n <div class=\"cos-subtask-row__desc\">{{ sub.Description }}</div>\n }\n </div>\n </div>\n <div class=\"cos-subtask-row__right\">\n <span class=\"cos-meta-badge\">{{ sub.Status }}</span>\n @if (sub.DueAt) {\n <span class=\"cos-subtask-row__due\">\n <i class=\"fa-regular fa-calendar\"></i> {{ sub.DueAt | date:'shortDate' }}\n </span>\n }\n <i class=\"fa-solid fa-chevron-right cos-subtask-row__chevron\"></i>\n </div>\n </div>\n }\n </div>\n </div>\n }\n </div>\n </article>\n }\n </div>\n }\n }\n\n <!-- ========================================================= -->\n <!-- TAB 3: APPROVALS & WAKES -->\n <!-- ========================================================= -->\n @if (ActiveTab === 'approvals-wakes') {\n <div class=\"cos-overview-columns\">\n <!-- Left Column: Pending & Resolved Agent Requests -->\n <section class=\"cos-panel\">\n <div class=\"cos-panel__header\">\n <div>\n <h3 class=\"cos-panel__title\">\n <i class=\"fa-solid fa-bell-concierge\"></i> Pending Agent Approvals ({{ PendingRequests.length }})\n </h3>\n <p class=\"cos-panel__subtitle\">\n Approve or reject escalations from your Chief of Staff\n </p>\n </div>\n </div>\n\n @if (PendingRequests.length === 0) {\n <div class=\"cos-inline-empty\">\n <i class=\"fa-solid fa-circle-check\"></i>\n <p>Inbox Zero \u2014 no pending requests awaiting your decision.</p>\n </div>\n } @else {\n <div class=\"cos-stack\">\n @for (req of PendingRequests; track req.ID) {\n <div class=\"cos-request-card\" (click)=\"OpenRequestDetail(req)\">\n <div class=\"cos-request-card__top\">\n <div class=\"cos-request-card__badges\">\n <span class=\"cos-priority-tag {{ GetPriorityTierClass(req.Priority) }}\">\n {{ GetPriorityTierLabel(req.Priority) }} ({{ req.Priority }})\n </span>\n @if (req.RequestType) {\n <span class=\"cos-meta-badge\"><i class=\"fa-solid fa-tag\"></i> {{ req.RequestType }}</span>\n }\n <span class=\"cos-status-chip cos-status-chip--requested\">\n {{ req.Status }}\n </span>\n @if (IsRequestExpired(req)) {\n <span class=\"cos-status-chip cos-status-chip--disabled\">\n Expired\n </span>\n }\n </div>\n <span class=\"cos-timestamp\">\n {{ req.RequestedAt | date:'short' }}\n </span>\n </div>\n <p class=\"cos-request-card__text\">{{ req.Request }}</p>\n <div class=\"cos-request-card__actions\">\n <button mjButton variant=\"primary\" size=\"sm\"\n [disabled]=\"BusyRequestID === req.ID\"\n (click)=\"QuickRespondToRequest(req, 'Approved', $event)\">\n <i class=\"fa-solid fa-check\"></i> Approve\n </button>\n <button mjButton variant=\"danger\" size=\"sm\"\n [disabled]=\"BusyRequestID === req.ID\"\n (click)=\"QuickRespondToRequest(req, 'Rejected', $event)\">\n <i class=\"fa-solid fa-xmark\"></i> Reject\n </button>\n <button mjButton variant=\"outline\" size=\"sm\"\n (click)=\"OpenRequestDetail(req); $event.stopPropagation()\">\n <i class=\"fa-solid fa-expand\"></i> Full Details / Comment\n </button>\n </div>\n </div>\n }\n </div>\n }\n\n @if (RecentResolvedRequests.length > 0) {\n <div class=\"cos-resolved-section\">\n <h4 class=\"cos-resolved-section__title\">Recent Resolved Decisions</h4>\n <div class=\"cos-stack\">\n @for (req of RecentResolvedRequests; track req.ID) {\n <div class=\"cos-resolved-row\" (click)=\"OpenRequestDetail(req)\">\n <div class=\"cos-resolved-row__main\">\n <span class=\"cos-status-chip cos-status-chip--{{ req.Status.toLowerCase() }}\">\n {{ req.Status }}\n </span>\n <span class=\"cos-resolved-row__text\">{{ req.Request }}</span>\n </div>\n <span class=\"cos-timestamp\">\n {{ (req.RespondedAt || req.RequestedAt) | date:'shortDate' }}\n </span>\n </div>\n }\n </div>\n </div>\n }\n </section>\n\n <!-- Right Column: Autonomous Wake Routines -->\n <section class=\"cos-panel\">\n <div class=\"cos-panel__header\">\n <div>\n <h3 class=\"cos-panel__title\">\n <i class=\"fa-solid fa-clock-rotate-left\"></i> Autonomous Wake Routines ({{ FilteredRoutines.length }})\n </h3>\n <p class=\"cos-panel__subtitle\">\n Scheduled AgentWake routines in MJ: User Routines\n </p>\n </div>\n </div>\n\n @if (FilteredRoutines.length === 0) {\n <div class=\"cos-inline-empty\">\n <i class=\"fa-regular fa-clock\"></i>\n <p>No AgentWake routines found for your Chief of Staff.</p>\n </div>\n } @else {\n <div class=\"cos-stack\">\n @for (routine of FilteredRoutines; track routine.ID) {\n <div class=\"cos-routine-card\">\n <div class=\"cos-routine-card__header\">\n <div>\n <div class=\"cos-routine-card__title-row\">\n <h4 class=\"cos-routine-card__name\">{{ routine.Name }}</h4>\n <span class=\"cos-status-chip cos-status-chip--{{ routine.Status.toLowerCase() }}\">\n {{ routine.Status }}\n </span>\n <span class=\"cos-meta-badge\">\n {{ routine.ScheduleMode }}\n </span>\n </div>\n @if (routine.Description) {\n <p class=\"cos-routine-card__desc\">{{ routine.Description }}</p>\n }\n </div>\n </div>\n\n <div class=\"cos-routine-card__schedule\">\n <div>\n <strong>Next Wake:</strong>\n @if (routine.NextRunAt) {\n {{ routine.NextRunAt | date:'medium' }}\n } @else {\n Not scheduled\n }\n </div>\n @if (routine.CronExpression) {\n <div>\n <strong>Cron:</strong> <code>{{ routine.CronExpression }}</code>\n @if (routine.Timezone) {\n <span>({{ routine.Timezone }})</span>\n }\n </div>\n }\n @if (routine.LastRunAt) {\n <div>\n <strong>Last Run:</strong> {{ routine.LastRunAt | date:'short' }}\n @if (routine.LastRunStatus) {\n <span class=\"cos-meta-badge\">{{ routine.LastRunStatus }}</span>\n }\n </div>\n }\n </div>\n\n <div class=\"cos-routine-card__actions\">\n <button mjButton variant=\"primary\" size=\"sm\"\n [disabled]=\"BusyRoutineID === routine.ID\"\n (click)=\"TriggerWakeNow(routine, $event)\">\n <i class=\"fa-solid fa-bolt\"></i> Wake Now\n </button>\n <button mjButton variant=\"outline\" size=\"sm\"\n [disabled]=\"BusyRoutineID === routine.ID\"\n (click)=\"ToggleRoutineStatus(routine, $event)\">\n @if (routine.Status === 'Active') {\n <i class=\"fa-solid fa-pause\"></i> Pause\n } @else {\n <i class=\"fa-solid fa-play\"></i> Resume\n }\n </button>\n <button mjButton variant=\"flat\" size=\"sm\"\n (click)=\"OpenRoutineEntityRecord(routine.ID, $event)\">\n <i class=\"fa-solid fa-arrow-up-right-from-square\"></i> Open Record\n </button>\n </div>\n </div>\n }\n </div>\n }\n </section>\n </div>\n }\n\n <!-- ========================================================= -->\n <!-- TAB 4: GOVERNANCE POLICY -->\n <!-- ========================================================= -->\n @if (ActiveTab === 'governance') {\n <div class=\"cos-governance-container\">\n <div class=\"cos-governance-header\">\n <div>\n <h3 class=\"cos-governance-header__title\">\n <i class=\"fa-solid fa-shield-halved\"></i> Chief of Staff Governance Policy\n </h3>\n <p class=\"cos-governance-header__subtitle\">\n Backed by <code>MJ: AI Agent User Policies</code> \u2014 controls coordination autonomy, communication channels, and approval guardrails for your Chief of Staff.\n </p>\n </div>\n <div class=\"cos-governance-header__actions\">\n @if (PolicyEntity) {\n <button mjButton variant=\"outline\" size=\"sm\" (click)=\"OpenPolicyEntityRecord()\">\n <i class=\"fa-solid fa-arrow-up-right-from-square\"></i> Open Policy Record\n </button>\n }\n @if (PolicyDirty) {\n <button mjButton variant=\"outline\" size=\"sm\"\n [disabled]=\"IsSavingPolicy\"\n (click)=\"ResetDraftPolicy()\">\n Reset Changes\n </button>\n }\n <button mjButton variant=\"primary\" size=\"sm\"\n [disabled]=\"IsSavingPolicy || !PolicyDirty\"\n (click)=\"SaveGovernancePolicy()\">\n <i class=\"fa-solid fa-floppy-disk\"></i>\n {{ IsSavingPolicy ? 'Saving...' : 'Save Policy Changes' }}\n </button>\n </div>\n </div>\n\n <!-- Section 1: Coordination Mode -->\n <section class=\"cos-panel\">\n <div class=\"cos-panel__header\">\n <div>\n <h4 class=\"cos-panel__title\">1. Autonomy & Coordination Mode</h4>\n <p class=\"cos-panel__subtitle\">\n Select how proactively your Chief of Staff operates across your workspace\n </p>\n </div>\n <div class=\"cos-status-segmented\" role=\"group\" aria-label=\"Agent Status\">\n @for (st of StatusOptions; track st) {\n <button mjButton\n [variant]=\"DraftPolicy.Status === st ? 'primary' : 'outline'\"\n size=\"sm\"\n (click)=\"SetPolicyStatus(st)\">\n {{ st }}\n </button>\n }\n </div>\n </div>\n\n <div class=\"cos-mode-cards\">\n @for (mode of CoordinationModeOptions; track mode.Value) {\n <div class=\"cos-mode-card\"\n [class.cos-mode-card--selected]=\"DraftPolicy.CoordinationMode === mode.Value\"\n (click)=\"SetCoordinationMode(mode.Value)\">\n <div class=\"cos-mode-card__top\">\n <span class=\"cos-mode-card__title\">{{ mode.Label }}</span>\n @if (DraftPolicy.CoordinationMode === mode.Value) {\n <i class=\"fa-solid fa-circle-check cos-mode-card__check\"></i>\n }\n </div>\n <p class=\"cos-mode-card__desc\">{{ mode.Description }}</p>\n </div>\n }\n </div>\n\n <div class=\"cos-form-grid\">\n <label class=\"cos-form-field\">\n <span class=\"cos-form-field__label\">Custom Display Name</span>\n <input class=\"cos-input\"\n type=\"text\"\n [value]=\"DraftPolicy.DisplayNameOverride\"\n placeholder=\"e.g., Chief of Staff\"\n (input)=\"OnDisplayNameInput($event)\" />\n </label>\n\n <label class=\"cos-form-field\">\n <span class=\"cos-form-field__label\">Default Data Access Mode</span>\n <mj-dropdown [Data]=\"DataAccessModeOptions\" TextField=\"Label\" ValueField=\"Value\" [ValuePrimitive]=\"true\"\n [(ngModel)]=\"DraftPolicy.DefaultDataAccessMode\" (ValueChange)=\"MarkPolicyDirty()\">\n </mj-dropdown>\n </label>\n </div>\n </section>\n\n <!-- Section 2: Communication Channel Permissions -->\n <section class=\"cos-panel\">\n <div class=\"cos-panel__header\">\n <div>\n <h4 class=\"cos-panel__title\">2. Communication Channel Permissions</h4>\n <p class=\"cos-panel__subtitle\">\n Configure what your Chief of Staff is permitted to do on each channel\n </p>\n </div>\n </div>\n\n <div class=\"cos-form-grid\">\n <label class=\"cos-form-field\">\n <span class=\"cos-form-field__label\">\n <i class=\"fa-solid fa-envelope\"></i> Email Channel Mode\n </span>\n <mj-dropdown [Data]=\"EmailChannelOptions\" TextField=\"Label\" ValueField=\"Value\" [ValuePrimitive]=\"true\"\n [(ngModel)]=\"DraftPolicy.EmailChannelMode\" (ValueChange)=\"MarkPolicyDirty()\">\n </mj-dropdown>\n </label>\n\n <label class=\"cos-form-field\">\n <span class=\"cos-form-field__label\">\n <i class=\"fa-regular fa-calendar\"></i> Calendar Channel Mode\n </span>\n <mj-dropdown [Data]=\"CalendarChannelOptions\" TextField=\"Label\" ValueField=\"Value\" [ValuePrimitive]=\"true\"\n [(ngModel)]=\"DraftPolicy.CalendarChannelMode\" (ValueChange)=\"MarkPolicyDirty()\">\n </mj-dropdown>\n </label>\n\n <label class=\"cos-form-field\">\n <span class=\"cos-form-field__label\">\n <i class=\"fa-solid fa-phone\"></i> Phone Channel Mode\n </span>\n <mj-dropdown [Data]=\"PhoneChannelOptions\" TextField=\"Label\" ValueField=\"Value\" [ValuePrimitive]=\"true\"\n [(ngModel)]=\"DraftPolicy.PhoneChannelMode\" (ValueChange)=\"MarkPolicyDirty()\">\n </mj-dropdown>\n </label>\n\n <label class=\"cos-form-field\">\n <span class=\"cos-form-field__label\">\n <i class=\"fa-solid fa-comments\"></i> Messaging Channel Mode\n </span>\n <mj-dropdown [Data]=\"MessagingChannelOptions\" TextField=\"Label\" ValueField=\"Value\" [ValuePrimitive]=\"true\"\n [(ngModel)]=\"DraftPolicy.MessagingChannelMode\" (ValueChange)=\"MarkPolicyDirty()\">\n </mj-dropdown>\n </label>\n </div>\n </section>\n\n <!-- Section 3: Approval Guardrails & Financial Threshold -->\n <section class=\"cos-panel\">\n <div class=\"cos-panel__header\">\n <div>\n <h4 class=\"cos-panel__title\">3. Approval Guardrails & Standing Instructions</h4>\n <p class=\"cos-panel__subtitle\">\n Enforce mandatory human-in-the-loop approval gates before sensitive actions execute\n </p>\n </div>\n </div>\n\n <div class=\"cos-toggle-list\">\n <div class=\"cos-toggle-row\" (click)=\"ToggleApprovalGuardrail('RequireApprovalForExternalComms')\">\n <div>\n <div class=\"cos-toggle-row__title\">Require Approval for External Communications</div>\n <div class=\"cos-toggle-row__desc\">\n Always create an approval request before sending emails or messages to external recipients.\n </div>\n </div>\n <button mjButton\n [variant]=\"DraftPolicy.RequireApprovalForExternalComms ? 'primary' : 'outline'\"\n size=\"sm\"\n (click)=\"ToggleApprovalGuardrail('RequireApprovalForExternalComms'); $event.stopPropagation()\">\n {{ DraftPolicy.RequireApprovalForExternalComms ? 'Required' : 'Not Required' }}\n </button>\n </div>\n\n <div class=\"cos-toggle-row\" (click)=\"ToggleApprovalGuardrail('RequireApprovalForFinancials')\">\n <div>\n <div class=\"cos-toggle-row__title\">Require Approval for Financial Commitments</div>\n <div class=\"cos-toggle-row__desc\">\n Require explicit approval for any financial transaction above the auto-approve threshold.\n </div>\n </div>\n <button mjButton\n [variant]=\"DraftPolicy.RequireApprovalForFinancials ? 'primary' : 'outline'\"\n size=\"sm\"\n (click)=\"ToggleApprovalGuardrail('RequireApprovalForFinancials'); $event.stopPropagation()\">\n {{ DraftPolicy.RequireApprovalForFinancials ? 'Required' : 'Not Required' }}\n </button>\n </div>\n\n <div class=\"cos-toggle-row\" (click)=\"ToggleApprovalGuardrail('RequireApprovalForDestructiveActions')\">\n <div>\n <div class=\"cos-toggle-row__title\">Require Approval for Destructive Actions</div>\n <div class=\"cos-toggle-row__desc\">\n Require human confirmation before deleting records, canceling events, or revoking access.\n </div>\n </div>\n <button mjButton\n [variant]=\"DraftPolicy.RequireApprovalForDestructiveActions ? 'primary' : 'outline'\"\n size=\"sm\"\n (click)=\"ToggleApprovalGuardrail('RequireApprovalForDestructiveActions'); $event.stopPropagation()\">\n {{ DraftPolicy.RequireApprovalForDestructiveActions ? 'Required' : 'Not Required' }}\n </button>\n </div>\n\n <div class=\"cos-toggle-row\" (click)=\"ToggleApprovalGuardrail('AllowInterAgentCoordination')\">\n <div>\n <div class=\"cos-toggle-row__title\">Allow Inter-Agent Delegation & Coordination</div>\n <div class=\"cos-toggle-row__desc\">\n Permit your Chief of Staff to invoke specialist sub-agents and coordinate with peer agents.\n </div>\n </div>\n <button mjButton\n [variant]=\"DraftPolicy.AllowInterAgentCoordination ? 'primary' : 'outline'\"\n size=\"sm\"\n (click)=\"ToggleApprovalGuardrail('AllowInterAgentCoordination'); $event.stopPropagation()\">\n {{ DraftPolicy.AllowInterAgentCoordination ? 'Allowed' : 'Blocked' }}\n </button>\n </div>\n </div>\n\n <div class=\"cos-form-grid cos-form-grid--spaced\">\n <label class=\"cos-form-field\">\n <span class=\"cos-form-field__label\">Auto-Approve Financial Threshold (USD)</span>\n <input class=\"cos-input\"\n type=\"number\"\n min=\"0\"\n step=\"50\"\n [value]=\"DraftPolicy.AutoApproveAmountThreshold ?? ''\"\n placeholder=\"0.00\"\n (input)=\"OnThresholdInputEvent($event)\" />\n </label>\n\n <label class=\"cos-form-field cos-form-field--full\">\n <span class=\"cos-form-field__label\">Standing Executive Instructions Override</span>\n <textarea class=\"cos-textarea\"\n rows=\"3\"\n [value]=\"DraftPolicy.InstructionsOverride\"\n placeholder=\"Optional standing instructions injected into every Chief of Staff run (e.g., preferred briefing style, VIP contacts, scheduling windows)...\"\n (input)=\"OnInstructionsOverrideInput($event)\"></textarea>\n </label>\n </div>\n </section>\n </div>\n }\n }\n </mj-page-body>\n</mj-page-layout>\n\n@if (ShowRequestDialog && SelectedRequest) {\n <mj-agent-request-dialog\n [Visible]=\"ShowRequestDialog\"\n [Request]=\"SelectedRequest\"\n (Close)=\"OnRequestDialogClose($event)\">\n </mj-agent-request-dialog>\n}\n\n@if (ShowTaskDrawer && SelectedTask) {\n <div class=\"cos-drawer-backdrop\" (click)=\"CloseTaskDrawer()\" aria-hidden=\"true\"></div>\n <aside class=\"cos-drawer\" role=\"dialog\" aria-modal=\"true\" [attr.aria-label]=\"SelectedTask.Name\">\n <header class=\"cos-drawer__header\">\n <div>\n <div class=\"cos-drawer__category-strip\">\n @if (SelectedTaskIsObjective) {\n <span class=\"cos-badge-objective\">\n <i class=\"fa-solid fa-bullseye\"></i> Priority Objective\n </span>\n } @else {\n <span class=\"cos-badge-milestone\">\n <i class=\"fa-solid fa-list-check\"></i> Milestone\n </span>\n @if (SelectedTaskParent) {\n <button type=\"button\" class=\"cos-drawer__parent-link\" (click)=\"OpenTaskRecord(SelectedTaskParent.ID)\">\n <i class=\"fa-solid fa-arrow-turn-up\"></i> {{ SelectedTaskParent.Name }}\n </button>\n }\n }\n </div>\n <h3 class=\"cos-drawer__title\">{{ SelectedTask.Name }}</h3>\n </div>\n <div class=\"cos-drawer__header-actions\">\n @if (CanOpenFullTaskForm) {\n <button mjButton variant=\"outline\" size=\"sm\" (click)=\"OpenFullTaskForm()\" title=\"Open in standard record form\">\n <i class=\"fa-solid fa-arrow-up-right-from-square\"></i> Full Form\n </button>\n }\n <button mjButton variant=\"flat\" size=\"sm\" class=\"cos-drawer__close-btn\" (click)=\"CloseTaskDrawer()\" aria-label=\"Close task drawer\">\n <i class=\"fa-solid fa-xmark\"></i>\n </button>\n </div>\n </header>\n\n <div class=\"cos-drawer__body\">\n <!-- Health & Status Ribbon -->\n <div class=\"cos-drawer__ribbon\">\n @if (SelectedTask.HealthStatus) {\n <span class=\"cos-health-pill cos-health-pill--{{ SelectedTask.HealthStatus.toLowerCase() }}\">\n <i class=\"{{ GetHealthBadgeIcon(SelectedTask.HealthStatus) }}\"></i>\n {{ GetHealthBadgeLabel(SelectedTask.HealthStatus) }}\n </span>\n }\n @if (SelectedTask.PlanningPeriod) {\n <span class=\"cos-meta-badge\">\n <i class=\"fa-regular fa-calendar-check\"></i> {{ SelectedTask.PlanningPeriod }}\n </span>\n }\n @if (SelectedTask.CheckInCadence) {\n <span class=\"cos-meta-badge\">\n <i class=\"fa-solid fa-repeat\"></i> {{ SelectedTask.CheckInCadence }}\n </span>\n }\n @if (SelectedTask.Priority) {\n <span class=\"cos-meta-badge\">\n <i class=\"fa-solid fa-flag\"></i> Priority: {{ SelectedTask.Priority }}\n </span>\n }\n </div>\n\n <!-- Child Milestones list when viewing an Objective -->\n @if (SelectedTaskIsObjective && SelectedTaskSubtasks.length > 0) {\n <div class=\"cos-drawer__section\">\n <h4 class=\"cos-drawer__section-title\">\n Milestones & Workstreams ({{ SelectedTaskSubtasks.length }})\n </h4>\n <div class=\"cos-subtasks__list\">\n @for (sub of SelectedTaskSubtasks; track sub.ID) {\n <div class=\"cos-subtask-row\" (click)=\"OpenTaskRecord(sub.ID)\">\n <div class=\"cos-subtask-row__left\">\n <i class=\"fa-solid\"\n [class.fa-circle-check]=\"sub.Status === 'Completed' || sub.Status === 'Done'\"\n [class.fa-circle-half-stroke]=\"sub.Status === 'In Progress'\"\n [class.fa-regular]=\"sub.Status !== 'Completed' && sub.Status !== 'Done' && sub.Status !== 'In Progress'\"\n [class.fa-circle]=\"sub.Status !== 'Completed' && sub.Status !== 'Done' && sub.Status !== 'In Progress'\"></i>\n <div>\n <div class=\"cos-subtask-row__name\">{{ sub.Name }}</div>\n @if (sub.Description) {\n <div class=\"cos-subtask-row__desc\">{{ sub.Description }}</div>\n }\n </div>\n </div>\n <div class=\"cos-subtask-row__right\">\n <span class=\"cos-meta-badge\">{{ sub.Status }}</span>\n @if (sub.DueAt) {\n <span class=\"cos-subtask-row__due\">\n <i class=\"fa-regular fa-calendar\"></i> {{ sub.DueAt | date:'shortDate' }}\n </span>\n }\n <i class=\"fa-solid fa-chevron-right cos-subtask-row__chevron\"></i>\n </div>\n </div>\n }\n </div>\n </div>\n }\n\n <!-- Quick Edit Form Fields -->\n <div class=\"cos-drawer__section\">\n <h4 class=\"cos-drawer__section-title\">Update Status & Progress</h4>\n\n <div class=\"cos-form-grid\">\n <label class=\"cos-form-field\">\n <span class=\"cos-form-field__label\">Status</span>\n <select class=\"cos-select\"\n [value]=\"DraftTaskEdits.Status\"\n (change)=\"OnTaskStatusChange($event)\">\n @for (st of TaskStatusOptions; track st) {\n <option [value]=\"st\" [selected]=\"DraftTaskEdits.Status === st\">{{ st }}</option>\n }\n </select>\n </label>\n\n <label class=\"cos-form-field\">\n <span class=\"cos-form-field__label\">Health Status</span>\n <select class=\"cos-select\"\n [value]=\"DraftTaskEdits.HealthStatus ?? 'none'\"\n (change)=\"OnTaskHealthChange($event)\">\n <option value=\"none\">None</option>\n <option value=\"OnTrack\" [selected]=\"DraftTaskEdits.HealthStatus === 'OnTrack'\">On Track</option>\n <option value=\"AtRisk\" [selected]=\"DraftTaskEdits.HealthStatus === 'AtRisk'\">At Risk</option>\n <option value=\"OffTrack\" [selected]=\"DraftTaskEdits.HealthStatus === 'OffTrack'\">Off Track</option>\n <option value=\"Completed\" [selected]=\"DraftTaskEdits.HealthStatus === 'Completed'\">Completed</option>\n <option value=\"Paused\" [selected]=\"DraftTaskEdits.HealthStatus === 'Paused'\">Paused</option>\n </select>\n </label>\n\n <label class=\"cos-form-field\">\n <span class=\"cos-form-field__label\">Percent Complete (%)</span>\n <input class=\"cos-input\"\n type=\"number\"\n min=\"0\"\n max=\"100\"\n [value]=\"DraftTaskEdits.PercentComplete ?? 0\"\n (input)=\"OnTaskPercentChange($event)\" />\n </label>\n\n <label class=\"cos-form-field\">\n <span class=\"cos-form-field__label\">Confidence Score (%)</span>\n <input class=\"cos-input\"\n type=\"number\"\n min=\"0\"\n max=\"100\"\n placeholder=\"0\u2013100\"\n [value]=\"DraftTaskEdits.ConfidenceScore ?? ''\"\n (input)=\"OnTaskConfidenceChange($event)\" />\n </label>\n\n <label class=\"cos-form-field cos-form-field--full\">\n <span class=\"cos-form-field__label\">Due Date</span>\n <input class=\"cos-input\"\n type=\"date\"\n [value]=\"DraftTaskEdits.DueAt\"\n (change)=\"OnTaskDueAtChange($event)\" />\n </label>\n\n <label class=\"cos-form-field cos-form-field--full\">\n <span class=\"cos-form-field__label\">Description & Notes</span>\n <textarea class=\"cos-textarea\"\n rows=\"4\"\n placeholder=\"Task description, objectives, milestones, or current blockers...\"\n [value]=\"DraftTaskEdits.Description\"\n (input)=\"OnTaskDescriptionChange($event)\"></textarea>\n </label>\n </div>\n </div>\n </div>\n\n <footer class=\"cos-drawer__footer\">\n <button mjButton variant=\"flat\" size=\"sm\" (click)=\"CloseTaskDrawer()\">\n Cancel\n </button>\n <button mjButton variant=\"primary\" size=\"sm\"\n [disabled]=\"!TaskDirty || IsSavingTask\"\n (click)=\"SaveTaskEdits()\">\n <i class=\"fa-solid fa-floppy-disk\"></i>\n {{ IsSavingTask ? 'Saving...' : 'Save Changes' }}\n </button>\n </footer>\n </aside>\n}\n", styles: [":host {\n display: block;\n height: 100%;\n}\n\n.cos-loading {\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 280px;\n}\n\n.cos-banner {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n padding: 12px 16px;\n margin-bottom: 16px;\n border-radius: 8px;\n border: 1px solid var(--mj-border-default);\n font-size: 13px;\n}\n\n.cos-banner__content {\n display: flex;\n align-items: center;\n gap: 10px;\n}\n\n.cos-banner--success {\n background-color: var(--mj-status-success-bg);\n border-color: var(--mj-status-success);\n color: var(--mj-status-success);\n}\n\n.cos-banner--error {\n background-color: var(--mj-status-error-bg);\n border-color: var(--mj-status-error);\n color: var(--mj-status-error);\n}\n\n/* KPI Grid */\n.cos-kpi-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));\n gap: 16px;\n margin-top: 16px;\n margin-bottom: 20px;\n}\n\n.cos-kpi-card {\n background-color: var(--mj-bg-surface-card);\n border: 1px solid var(--mj-border-default);\n border-radius: 10px;\n padding: 16px 18px;\n cursor: pointer;\n transition: border-color 0.15s ease, transform 0.15s ease;\n}\n\n.cos-kpi-card:hover {\n border-color: var(--mj-brand-primary);\n}\n\n.cos-kpi-card__header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 8px;\n}\n\n.cos-kpi-card__label {\n font-size: 12px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.04em;\n color: var(--mj-text-secondary);\n}\n\n.cos-kpi-card__icon {\n width: 34px;\n height: 34px;\n border-radius: 8px;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 15px;\n background-color: var(--mj-bg-surface-sunken);\n color: var(--mj-text-secondary);\n}\n\n.cos-kpi-card__icon--brand {\n background-color: var(--mj-bg-surface-sunken);\n color: var(--mj-brand-primary);\n}\n\n.cos-kpi-card__icon--success {\n background-color: var(--mj-status-success-bg);\n color: var(--mj-status-success);\n}\n\n.cos-kpi-card__icon--warning {\n background-color: var(--mj-status-warning-bg);\n color: var(--mj-status-warning);\n}\n\n.cos-kpi-card__value {\n font-size: 26px;\n font-weight: 700;\n color: var(--mj-text-primary);\n line-height: 1.2;\n}\n\n.cos-kpi-card__sub {\n margin-top: 4px;\n font-size: 12px;\n color: var(--mj-text-muted);\n}\n\n/* Columns & Panels */\n.cos-overview-columns {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));\n gap: 20px;\n margin-top: 16px;\n}\n\n.cos-stack {\n display: flex;\n flex-direction: column;\n gap: 14px;\n}\n\n.cos-panel {\n background-color: var(--mj-bg-surface-card);\n border: 1px solid var(--mj-border-default);\n border-radius: 10px;\n padding: 18px 20px;\n}\n\n.cos-panel__header {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: 12px;\n margin-bottom: 16px;\n}\n\n.cos-panel__title {\n margin: 0;\n font-size: 15px;\n font-weight: 600;\n color: var(--mj-text-primary);\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.cos-panel__subtitle {\n margin: 4px 0 0;\n font-size: 12px;\n color: var(--mj-text-muted);\n}\n\n.cos-inline-empty {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n padding: 28px 16px;\n color: var(--mj-text-muted);\n gap: 8px;\n background-color: var(--mj-bg-surface-sunken);\n border-radius: 8px;\n}\n\n.cos-inline-empty i {\n font-size: 22px;\n color: var(--mj-text-secondary);\n}\n\n.cos-inline-empty p {\n margin: 0;\n font-size: 13px;\n}\n\n/* Priority Mini Cards */\n.cos-priority-mini {\n padding: 14px;\n border-radius: 8px;\n border: 1px solid var(--mj-border-subtle);\n background-color: var(--mj-bg-surface);\n cursor: pointer;\n transition: border-color 0.15s ease;\n}\n\n.cos-priority-mini:hover {\n border-color: var(--mj-brand-primary);\n}\n\n.cos-priority-mini__top {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 10px;\n margin-bottom: 10px;\n}\n\n.cos-priority-mini__name {\n font-size: 14px;\n font-weight: 600;\n color: var(--mj-text-primary);\n}\n\n.cos-priority-mini__meta {\n display: flex;\n flex-wrap: wrap;\n gap: 12px;\n margin-top: 8px;\n font-size: 12px;\n color: var(--mj-text-secondary);\n}\n\n/* Progress Bars */\n.cos-progress-row {\n display: flex;\n align-items: center;\n gap: 10px;\n}\n\n.cos-progress-bar {\n flex: 1;\n height: 8px;\n border-radius: 999px;\n background-color: var(--mj-bg-surface-sunken);\n overflow: hidden;\n}\n\n.cos-progress-bar__fill {\n height: 100%;\n border-radius: 999px;\n background-color: var(--mj-brand-primary);\n transition: width 0.25s ease;\n}\n\n.cos-progress-bar__fill--ontrack,\n.cos-progress-bar__fill--completed {\n background-color: var(--mj-status-success);\n}\n\n.cos-progress-bar__fill--atrisk {\n background-color: var(--mj-status-warning);\n}\n\n.cos-progress-bar__fill--offtrack {\n background-color: var(--mj-status-error);\n}\n\n.cos-progress-row__pct {\n font-size: 12px;\n font-weight: 600;\n color: var(--mj-text-secondary);\n min-width: 36px;\n text-align: right;\n}\n\n/* Health & Status Badges */\n.cos-health-pill {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 3px 9px;\n border-radius: 999px;\n font-size: 11px;\n font-weight: 600;\n white-space: nowrap;\n}\n\n.cos-health-pill--ontrack,\n.cos-health-pill--completed {\n background-color: var(--mj-status-success-bg);\n color: var(--mj-status-success);\n}\n\n.cos-health-pill--atrisk {\n background-color: var(--mj-status-warning-bg);\n color: var(--mj-status-warning);\n}\n\n.cos-health-pill--offtrack {\n background-color: var(--mj-status-error-bg);\n color: var(--mj-status-error);\n}\n\n.cos-health-pill--paused {\n background-color: var(--mj-bg-surface-sunken);\n color: var(--mj-text-secondary);\n}\n\n.cos-meta-badge {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 2px 8px;\n border-radius: 6px;\n font-size: 11px;\n font-weight: 500;\n background-color: var(--mj-bg-surface-sunken);\n color: var(--mj-text-secondary);\n}\n\n.cos-status-chip {\n display: inline-flex;\n align-items: center;\n padding: 2px 8px;\n border-radius: 999px;\n font-size: 11px;\n font-weight: 600;\n background-color: var(--mj-bg-surface-sunken);\n color: var(--mj-text-secondary);\n}\n\n.cos-status-chip--active,\n.cos-status-chip--approved {\n background-color: var(--mj-status-success-bg);\n color: var(--mj-status-success);\n}\n\n.cos-status-chip--requested,\n.cos-status-chip--paused {\n background-color: var(--mj-status-warning-bg);\n color: var(--mj-status-warning);\n}\n\n.cos-status-chip--rejected,\n.cos-status-chip--disabled {\n background-color: var(--mj-status-error-bg);\n color: var(--mj-status-error);\n}\n\n.cos-overdue-text {\n color: var(--mj-status-error);\n}\n\n/* Filter Bar & Full Priority Cards */\n.cos-filter-bar {\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex-wrap: wrap;\n gap: 10px;\n margin: 16px 0;\n}\n\n.cos-filter-pills {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n}\n\n.cos-priority-list {\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n\n.cos-priority-card {\n background-color: var(--mj-bg-surface-card);\n border: 1px solid var(--mj-border-default);\n border-radius: 10px;\n overflow: hidden;\n}\n\n.cos-priority-card__header {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: 16px;\n padding: 16px 20px;\n cursor: pointer;\n border-bottom: 1px solid var(--mj-border-subtle);\n}\n\n.cos-priority-card__title-group {\n display: flex;\n align-items: flex-start;\n gap: 10px;\n}\n\n.cos-priority-card__badges {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n margin-bottom: 6px;\n}\n\n.cos-priority-card__title {\n margin: 0;\n font-size: 16px;\n font-weight: 600;\n color: var(--mj-text-primary);\n}\n\n.cos-priority-card__right {\n display: flex;\n align-items: center;\n gap: 14px;\n flex-shrink: 0;\n}\n\n.cos-priority-card__progress-summary {\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n}\n\n.cos-priority-card__pct {\n font-size: 18px;\n font-weight: 700;\n color: var(--mj-text-primary);\n}\n\n.cos-priority-card__milestone-count {\n font-size: 11px;\n color: var(--mj-text-muted);\n}\n\n.cos-priority-card__body {\n padding: 16px 20px;\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n\n.cos-priority-card__desc {\n margin: 0;\n font-size: 13px;\n color: var(--mj-text-secondary);\n line-height: 1.5;\n}\n\n.cos-metric-target-label {\n font-size: 12px;\n font-weight: 600;\n color: var(--mj-text-secondary);\n white-space: nowrap;\n}\n\n.cos-priority-card__dates {\n display: flex;\n flex-wrap: wrap;\n gap: 16px;\n font-size: 12px;\n color: var(--mj-text-secondary);\n}\n\n/* Subtasks / Milestones */\n.cos-subtasks {\n margin-top: 6px;\n border-top: 1px solid var(--mj-border-subtle);\n padding-top: 12px;\n}\n\n.cos-subtasks__header {\n font-size: 12px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.04em;\n color: var(--mj-text-muted);\n margin-bottom: 8px;\n}\n\n.cos-subtasks__list {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.cos-subtask-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n padding: 10px 12px;\n border-radius: 8px;\n background-color: var(--mj-bg-surface-sunken);\n cursor: pointer;\n transition: background-color 0.15s ease;\n}\n\n.cos-subtask-row:hover {\n background-color: var(--mj-bg-surface-hover);\n}\n\n.cos-subtask-row__left {\n display: flex;\n align-items: flex-start;\n gap: 10px;\n}\n\n.cos-subtask-row__left i {\n margin-top: 3px;\n color: var(--mj-brand-primary);\n}\n\n.cos-subtask-row__name {\n font-size: 13px;\n font-weight: 600;\n color: var(--mj-text-primary);\n}\n\n.cos-subtask-row__desc {\n font-size: 12px;\n color: var(--mj-text-muted);\n margin-top: 2px;\n}\n\n.cos-subtask-row__right {\n display: flex;\n align-items: center;\n gap: 10px;\n flex-shrink: 0;\n}\n\n.cos-subtask-row__due {\n font-size: 12px;\n color: var(--mj-text-secondary);\n}\n\n.cos-subtask-row__chevron {\n font-size: 11px;\n color: var(--mj-text-muted);\n}\n\n/* Requests & Routines */\n.cos-request-card {\n padding: 14px;\n border-radius: 8px;\n border: 1px solid var(--mj-border-default);\n background-color: var(--mj-bg-surface);\n cursor: pointer;\n transition: border-color 0.15s ease;\n}\n\n.cos-request-card:hover {\n border-color: var(--mj-brand-primary);\n}\n\n.cos-request-card__top {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n margin-bottom: 8px;\n}\n\n.cos-request-card__badges {\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n.cos-priority-tag {\n display: inline-flex;\n align-items: center;\n padding: 2px 8px;\n border-radius: 6px;\n font-size: 11px;\n font-weight: 600;\n}\n\n.cos-priority-tag.priority-critical,\n.cos-priority-tag.priority-high {\n background-color: var(--mj-status-error-bg);\n color: var(--mj-status-error);\n}\n\n.cos-priority-tag.priority-normal {\n background-color: var(--mj-status-warning-bg);\n color: var(--mj-status-warning);\n}\n\n.cos-priority-tag.priority-low {\n background-color: var(--mj-bg-surface-sunken);\n color: var(--mj-text-secondary);\n}\n\n.cos-timestamp {\n font-size: 11px;\n color: var(--mj-text-muted);\n white-space: nowrap;\n}\n\n.cos-request-card__text {\n margin: 0 0 12px;\n font-size: 13px;\n color: var(--mj-text-primary);\n line-height: 1.45;\n}\n\n.cos-request-card__actions {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n}\n\n.cos-resolved-section {\n margin-top: 20px;\n padding-top: 16px;\n border-top: 1px solid var(--mj-border-subtle);\n}\n\n.cos-resolved-section__title {\n margin: 0 0 10px;\n font-size: 12px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.04em;\n color: var(--mj-text-muted);\n}\n\n.cos-resolved-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 10px;\n padding: 8px 10px;\n border-radius: 6px;\n background-color: var(--mj-bg-surface-sunken);\n cursor: pointer;\n}\n\n.cos-resolved-row__main {\n display: flex;\n align-items: center;\n gap: 8px;\n min-width: 0;\n}\n\n.cos-resolved-row__text {\n font-size: 12px;\n color: var(--mj-text-secondary);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n/* Routine Cards */\n.cos-routine-mini {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n padding: 12px 14px;\n border-radius: 8px;\n border: 1px solid var(--mj-border-subtle);\n background-color: var(--mj-bg-surface);\n}\n\n.cos-routine-mini__title-row {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.cos-routine-mini__name {\n font-size: 13px;\n font-weight: 600;\n color: var(--mj-text-primary);\n}\n\n.cos-routine-mini__meta {\n margin-top: 4px;\n font-size: 12px;\n color: var(--mj-text-muted);\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n}\n\n.cos-routine-card {\n padding: 16px;\n border-radius: 8px;\n border: 1px solid var(--mj-border-default);\n background-color: var(--mj-bg-surface);\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n\n.cos-routine-card__title-row {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 8px;\n}\n\n.cos-routine-card__name {\n margin: 0;\n font-size: 14px;\n font-weight: 600;\n color: var(--mj-text-primary);\n}\n\n.cos-routine-card__desc {\n margin: 4px 0 0;\n font-size: 12px;\n color: var(--mj-text-secondary);\n}\n\n.cos-routine-card__schedule {\n display: flex;\n flex-direction: column;\n gap: 4px;\n font-size: 12px;\n color: var(--mj-text-secondary);\n padding: 10px 12px;\n border-radius: 6px;\n background-color: var(--mj-bg-surface-sunken);\n}\n\n.cos-routine-card__actions {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n}\n\n/* Governance Tab */\n.cos-governance-container {\n display: flex;\n flex-direction: column;\n gap: 18px;\n margin-top: 16px;\n}\n\n.cos-governance-header {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n flex-wrap: wrap;\n gap: 12px;\n padding: 16px 20px;\n border-radius: 10px;\n background-color: var(--mj-bg-surface-card);\n border: 1px solid var(--mj-border-default);\n}\n\n.cos-governance-header__title {\n margin: 0;\n font-size: 16px;\n font-weight: 600;\n color: var(--mj-text-primary);\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.cos-governance-header__subtitle {\n margin: 4px 0 0;\n font-size: 12px;\n color: var(--mj-text-secondary);\n}\n\n.cos-governance-header__actions {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.cos-status-segmented {\n display: flex;\n gap: 6px;\n}\n\n.cos-mode-cards {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));\n gap: 12px;\n margin-bottom: 16px;\n}\n\n.cos-mode-card {\n padding: 14px 16px;\n border-radius: 8px;\n border: 1px solid var(--mj-border-default);\n background-color: var(--mj-bg-surface);\n cursor: pointer;\n transition: border-color 0.15s ease, background-color 0.15s ease;\n}\n\n.cos-mode-card:hover {\n border-color: var(--mj-brand-primary);\n}\n\n.cos-mode-card--selected {\n border-color: var(--mj-brand-primary);\n background-color: var(--mj-bg-surface-sunken);\n}\n\n.cos-mode-card__top {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 6px;\n}\n\n.cos-mode-card__title {\n font-size: 14px;\n font-weight: 600;\n color: var(--mj-text-primary);\n}\n\n.cos-mode-card__check {\n color: var(--mj-brand-primary);\n}\n\n.cos-mode-card__desc {\n margin: 0;\n font-size: 12px;\n color: var(--mj-text-secondary);\n line-height: 1.45;\n}\n\n.cos-form-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));\n gap: 14px;\n}\n\n.cos-form-grid--spaced {\n margin-top: 16px;\n}\n\n.cos-form-field {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n\n.cos-form-field--full {\n grid-column: 1 / -1;\n}\n\n.cos-form-field__label {\n font-size: 12px;\n font-weight: 600;\n color: var(--mj-text-secondary);\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n.cos-input,\n.cos-select,\n.cos-textarea {\n width: 100%;\n padding: 8px 10px;\n border-radius: 6px;\n border: 1px solid var(--mj-border-default);\n background-color: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n font-size: 13px;\n font-family: inherit;\n box-sizing: border-box;\n}\n\n.cos-input:focus,\n.cos-select:focus,\n.cos-textarea:focus {\n outline: none;\n border-color: var(--mj-brand-primary);\n}\n\n.cos-toggle-list {\n display: flex;\n flex-direction: column;\n gap: 10px;\n}\n\n.cos-toggle-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 16px;\n padding: 12px 14px;\n border-radius: 8px;\n border: 1px solid var(--mj-border-subtle);\n background-color: var(--mj-bg-surface);\n cursor: pointer;\n}\n\n.cos-toggle-row__title {\n font-size: 13px;\n font-weight: 600;\n color: var(--mj-text-primary);\n}\n\n.cos-toggle-row__desc {\n margin-top: 2px;\n font-size: 12px;\n color: var(--mj-text-muted);\n}\n\n/* ========================================================================= */\n/* Task / Priority Detail & Quick-Edit Drawer */\n/* ========================================================================= */\n\n.cos-drawer-backdrop {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: rgba(0, 0, 0, 0.45);\n z-index: 1000;\n backdrop-filter: blur(1px);\n}\n\n.cos-drawer {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n width: 520px;\n max-width: 92vw;\n background-color: var(--mj-bg-surface-card);\n border-left: 1px solid var(--mj-border-default);\n box-shadow: -6px 0 28px rgba(0, 0, 0, 0.25);\n z-index: 1001;\n display: flex;\n flex-direction: column;\n animation: cosDrawerSlideIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);\n}\n\n@keyframes cosDrawerSlideIn {\n from {\n transform: translateX(100%);\n }\n to {\n transform: translateX(0);\n }\n}\n\n.cos-drawer__header {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: 16px;\n padding: 18px 20px;\n border-bottom: 1px solid var(--mj-border-subtle);\n background-color: var(--mj-bg-surface);\n}\n\n.cos-drawer__category-strip {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 8px;\n margin-bottom: 6px;\n}\n\n.cos-badge-objective {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 2px 8px;\n border-radius: 999px;\n font-size: 11px;\n font-weight: 600;\n background-color: var(--mj-bg-surface-sunken);\n color: var(--mj-brand-primary);\n border: 1px solid var(--mj-border-default);\n}\n\n.cos-badge-milestone {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 2px 8px;\n border-radius: 999px;\n font-size: 11px;\n font-weight: 600;\n background-color: var(--mj-bg-surface-sunken);\n color: var(--mj-text-secondary);\n border: 1px solid var(--mj-border-subtle);\n}\n\n.cos-drawer__parent-link {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 2px 8px;\n border-radius: 6px;\n font-size: 11px;\n font-weight: 500;\n background: none;\n border: 1px dashed var(--mj-border-default);\n color: var(--mj-text-secondary);\n cursor: pointer;\n transition: color 0.15s ease, border-color 0.15s ease;\n}\n\n.cos-drawer__parent-link:hover {\n color: var(--mj-brand-primary);\n border-color: var(--mj-brand-primary);\n}\n\n.cos-drawer__title {\n margin: 0;\n font-size: 16px;\n font-weight: 600;\n color: var(--mj-text-primary);\n line-height: 1.35;\n}\n\n.cos-drawer__header-actions {\n display: flex;\n align-items: center;\n gap: 8px;\n flex-shrink: 0;\n}\n\n.cos-drawer__close-btn {\n color: var(--mj-text-secondary);\n}\n\n.cos-drawer__body {\n flex: 1;\n overflow-y: auto;\n padding: 20px;\n display: flex;\n flex-direction: column;\n gap: 20px;\n}\n\n.cos-drawer__ribbon {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 8px;\n padding: 10px 14px;\n border-radius: 8px;\n background-color: var(--mj-bg-surface-sunken);\n border: 1px solid var(--mj-border-subtle);\n}\n\n.cos-drawer__section {\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n\n.cos-drawer__section-title {\n margin: 0;\n font-size: 12px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.04em;\n color: var(--mj-text-muted);\n}\n\n.cos-drawer__footer {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n gap: 10px;\n padding: 14px 20px;\n border-top: 1px solid var(--mj-border-default);\n background-color: var(--mj-bg-surface);\n}\n"] }]
2905
+ }], null, null); })();
2906
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ChiefOfStaffDashboardComponent, { className: "ChiefOfStaffDashboardComponent", filePath: "src/ChiefOfStaff/chief-of-staff-dashboard.component.ts", lineNumber: 98 }); })();
2907
+ export function LoadChiefOfStaffDashboard() {
2908
+ // Intentionally empty: forces inclusion of the @RegisterClass side effect.
2909
+ }
2910
+ //# sourceMappingURL=chief-of-staff-dashboard.component.js.map