@schandlergarcia/sf-web-components 2.0.0 → 2.2.0

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.
@@ -0,0 +1,234 @@
1
+ @import '@heroui/styles';
2
+
3
+ @layer base {
4
+ html,
5
+ body,
6
+ #root {
7
+ @apply min-h-screen;
8
+ }
9
+
10
+ body {
11
+ @apply antialiased bg-white;
12
+ }
13
+ }
14
+
15
+ @import 'tw-animate-css';
16
+ @import 'shadcn/tailwind.css';
17
+
18
+ @custom-variant dark (&:is(.dark *));
19
+
20
+ @source "../components/library";
21
+ @source "../components/pages";
22
+
23
+ @theme inline {
24
+ --color-background: var(--background);
25
+ --color-foreground: var(--foreground);
26
+ --color-card: var(--card);
27
+ --color-card-foreground: var(--card-foreground);
28
+ --color-popover: var(--popover);
29
+ --color-popover-foreground: var(--popover-foreground);
30
+ --color-primary: var(--primary);
31
+ --color-primary-foreground: var(--primary-foreground);
32
+ --color-secondary: var(--secondary);
33
+ --color-secondary-foreground: var(--secondary-foreground);
34
+ --color-muted: var(--muted);
35
+ --color-muted-foreground: var(--muted-foreground);
36
+ --color-accent: var(--accent);
37
+ --color-accent-foreground: var(--accent-foreground);
38
+ --color-destructive: var(--destructive);
39
+ --color-destructive-foreground: var(--destructive-foreground);
40
+ --color-border: var(--border);
41
+ --color-input: var(--input);
42
+ --color-ring: var(--ring);
43
+ --color-chart-1: var(--chart-1);
44
+ --color-chart-2: var(--chart-2);
45
+ --color-chart-3: var(--chart-3);
46
+ --color-chart-4: var(--chart-4);
47
+ --color-chart-5: var(--chart-5);
48
+ --radius-sm: calc(var(--radius) - 4px);
49
+ --radius-md: calc(var(--radius) - 2px);
50
+ --radius-lg: var(--radius);
51
+ --radius-xl: calc(var(--radius) + 4px);
52
+ --color-sidebar: var(--sidebar);
53
+ --color-sidebar-foreground: var(--sidebar-foreground);
54
+ --color-sidebar-primary: var(--sidebar-primary);
55
+ --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
56
+ --color-sidebar-accent: var(--sidebar-accent);
57
+ --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
58
+ --color-sidebar-border: var(--sidebar-border);
59
+ --color-sidebar-ring: var(--sidebar-ring);
60
+
61
+ /* Engine brand palette — official guidelines */
62
+ --color-engine-black: #0D1117;
63
+ --color-engine-cyan: #7DCBD9;
64
+ --color-engine-green: #1E9D6D;
65
+ --color-engine-blue: #157DE5;
66
+ --color-engine-orange: #FD4B23;
67
+ --color-engine-amber: #FFB200;
68
+ --color-engine-bg: #F3F3F4;
69
+ --color-engine-border: #B0B1B3;
70
+ --color-engine-text: #0D1117;
71
+ --color-engine-muted: #616368;
72
+ --color-engine-label: #B0B1B3;
73
+
74
+ /* Engine Cyan brand ramp */
75
+ --color-brand-50: #F0FAFB;
76
+ --color-brand-100: #D9F2F5;
77
+ --color-brand-200: #B3E5EB;
78
+ --color-brand-300: #7DCBD9;
79
+ --color-brand-400: #5BB8CA;
80
+ --color-brand-500: #3AA0B5;
81
+ --color-brand-600: #2D849A;
82
+ --color-brand-700: #266B7E;
83
+ --color-brand-800: #235768;
84
+ --color-brand-900: #1F4858;
85
+ --color-brand-950: #112E3A;
86
+
87
+ --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
88
+ --font-mono: 'JetBrains Mono', ui-monospace, monospace;
89
+
90
+ --radius-pill: 9999px;
91
+ --radius-card: 10px;
92
+ }
93
+
94
+ :root {
95
+ --radius: 0.625rem;
96
+ --background: oklch(1 0 0);
97
+ --foreground: oklch(0.145 0 0);
98
+ --card: oklch(1 0 0);
99
+ --card-foreground: oklch(0.145 0 0);
100
+ --popover: oklch(1 0 0);
101
+ --popover-foreground: oklch(0.145 0 0);
102
+ --primary: oklch(0.205 0 0);
103
+ --primary-foreground: oklch(0.985 0 0);
104
+ --secondary: oklch(0.97 0 0);
105
+ --secondary-foreground: oklch(0.205 0 0);
106
+ --muted: oklch(0.97 0 0);
107
+ --muted-foreground: oklch(0.556 0 0);
108
+ --accent: oklch(0.97 0 0);
109
+ --accent-foreground: oklch(0.205 0 0);
110
+ --destructive: oklch(0.577 0.245 27.325);
111
+ --border: oklch(0.922 0 0);
112
+ --input: oklch(0.922 0 0);
113
+ --ring: oklch(0.708 0 0);
114
+ --chart-1: oklch(0.646 0.222 41.116);
115
+ --chart-2: oklch(0.6 0.118 184.704);
116
+ --chart-3: oklch(0.398 0.07 227.392);
117
+ --chart-4: oklch(0.828 0.189 84.429);
118
+ --chart-5: oklch(0.769 0.188 70.08);
119
+ --sidebar: oklch(0.985 0 0);
120
+ --sidebar-foreground: oklch(0.145 0 0);
121
+ --sidebar-primary: oklch(0.205 0 0);
122
+ --sidebar-primary-foreground: oklch(0.985 0 0);
123
+ --sidebar-accent: oklch(0.97 0 0);
124
+ --sidebar-accent-foreground: oklch(0.205 0 0);
125
+ --sidebar-border: oklch(0.922 0 0);
126
+ --sidebar-ring: oklch(0.708 0 0);
127
+ }
128
+
129
+ .dark {
130
+ --background: oklch(0.145 0 0);
131
+ --foreground: oklch(0.985 0 0);
132
+ --card: oklch(0.205 0 0);
133
+ --card-foreground: oklch(0.985 0 0);
134
+ --popover: oklch(0.205 0 0);
135
+ --popover-foreground: oklch(0.985 0 0);
136
+ --primary: oklch(0.922 0 0);
137
+ --primary-foreground: oklch(0.205 0 0);
138
+ --secondary: oklch(0.269 0 0);
139
+ --secondary-foreground: oklch(0.985 0 0);
140
+ --muted: oklch(0.269 0 0);
141
+ --muted-foreground: oklch(0.708 0 0);
142
+ --accent: oklch(0.269 0 0);
143
+ --accent-foreground: oklch(0.985 0 0);
144
+ --destructive: oklch(0.704 0.191 22.216);
145
+ --border: oklch(1 0 0 / 10%);
146
+ --input: oklch(1 0 0 / 15%);
147
+ --ring: oklch(0.556 0 0);
148
+ --chart-1: oklch(0.488 0.243 264.376);
149
+ --chart-2: oklch(0.696 0.17 162.48);
150
+ --chart-3: oklch(0.769 0.188 70.08);
151
+ --chart-4: oklch(0.627 0.265 303.9);
152
+ --chart-5: oklch(0.645 0.246 16.439);
153
+ --sidebar: oklch(0.205 0 0);
154
+ --sidebar-foreground: oklch(0.985 0 0);
155
+ --sidebar-primary: oklch(0.488 0.243 264.376);
156
+ --sidebar-primary-foreground: oklch(0.985 0 0);
157
+ --sidebar-accent: oklch(0.269 0 0);
158
+ --sidebar-accent-foreground: oklch(0.985 0 0);
159
+ --sidebar-border: oklch(1 0 0 / 10%);
160
+ --sidebar-ring: oklch(0.556 0 0);
161
+ }
162
+
163
+ @layer base {
164
+ * {
165
+ @apply border-border outline-ring/50;
166
+ }
167
+ body {
168
+ @apply bg-background text-foreground;
169
+ }
170
+ }
171
+
172
+ /*
173
+ * Restore HeroUI theme variables inside the Command Center scope.
174
+ * Uses Engine brand colors: Cyan #7DCBD9 as secondary, Orange-Red #FD4B23 as danger.
175
+ */
176
+ .heroui-scope {
177
+ --primary: #0D1117;
178
+ --primary-foreground: oklch(0.9911 0 0);
179
+ --secondary: #7DCBD9;
180
+ --secondary-foreground: #0D1117;
181
+ --success: #1E9D6D;
182
+ --success-foreground: oklch(0.9911 0 0);
183
+ --warning: #FFB200;
184
+ --warning-foreground: #0D1117;
185
+ --danger: #FD4B23;
186
+ --danger-foreground: oklch(0.9911 0 0);
187
+
188
+ --muted: oklch(0.5517 0.0138 285.94);
189
+ --accent: oklch(0.6204 0.195 253.83);
190
+ --accent-foreground: oklch(0.9911 0 0);
191
+ --background: #F3F3F4;
192
+ --foreground: #0D1117;
193
+ --default: oklch(94% 0.001 286.375);
194
+ --default-foreground: #0D1117;
195
+ --border: #B0B1B3;
196
+ --separator: oklch(92% 0.004 286.32);
197
+ --segment: oklch(100% 0 0);
198
+ --segment-foreground: #0D1117;
199
+ --surface: oklch(100% 0 0);
200
+ --surface-foreground: #0D1117;
201
+ --overlay: oklch(100% 0 0);
202
+ --overlay-foreground: #0D1117;
203
+ --focus: #157DE5;
204
+ --link: #0D1117;
205
+ }
206
+
207
+ /* ChatBar expanded overlay — horizontal padding so it doesn't hit window edges */
208
+ body > .fixed.inset-x-0.rounded-2xl {
209
+ left: 1.5rem !important;
210
+ right: 1.5rem !important;
211
+ }
212
+
213
+ .dark .heroui-scope,
214
+ .heroui-scope.dark {
215
+ --muted: oklch(70.5% 0.015 286.067);
216
+ --background: oklch(12% 0.005 285.823);
217
+ --foreground: oklch(0.9911 0 0);
218
+ --default: oklch(27.4% 0.006 286.033);
219
+ --default-foreground: oklch(0.9911 0 0);
220
+ --border: oklch(28% 0.006 286.033);
221
+ --separator: oklch(25% 0.006 286.033);
222
+ --segment: oklch(0.3964 0.01 285.93);
223
+ --segment-foreground: oklch(0.9911 0 0);
224
+ --surface: oklch(0.2103 0.0059 285.89);
225
+ --surface-foreground: oklch(0.9911 0 0);
226
+ --overlay: oklch(0.2103 0.0059 285.89);
227
+ --overlay-foreground: oklch(0.9911 0 0);
228
+ --warning: oklch(0.8203 0.1388 76.34);
229
+ --warning-foreground: #0D1117;
230
+ --danger: oklch(0.594 0.1967 24.63);
231
+ --danger-foreground: oklch(0.9911 0 0);
232
+ --focus: #157DE5;
233
+ --link: oklch(0.9911 0 0);
234
+ }
@@ -0,0 +1,191 @@
1
+ /**
2
+ * Engine Partner Hub — Sample Data
3
+ *
4
+ * Field names match the Salesforce org schema (Property__c, Contract__c,
5
+ * Invoice__c, Attrition_Penalty__c, etc.) so switching from sample → live
6
+ * Data Cloud queries requires only a data-source swap, not a field-name refactor.
7
+ *
8
+ * Each section exports both the raw records AND dashboard-ready derivatives
9
+ * (KPI metrics, chart data, formatted card items).
10
+ */
11
+
12
+ // ─── PARTNERS (Account with RecordType = Hotel_Partner) ────────────────────
13
+ export const PARTNERS = [
14
+ { Id: "001P1", Name: "Marriott International", Partner_Tier__c: "Gold", Commission_Rate__c: 18, Partner_Status__c: "Active", Total_Properties__c: 5, Total_Reservations__c: 12, Total_Revenue__c: 284000, Contract_Start_Date__c: "2025-01-01", Contract_End_Date__c: "2026-12-31" },
15
+ { Id: "001P2", Name: "Hilton Hotels Corporation", Partner_Tier__c: "Gold", Commission_Rate__c: 17, Partner_Status__c: "Active", Total_Properties__c: 4, Total_Reservations__c: 10, Total_Revenue__c: 238000, Contract_Start_Date__c: "2025-03-01", Contract_End_Date__c: "2027-02-28" },
16
+ { Id: "001P3", Name: "Hyatt Hotels Corporation", Partner_Tier__c: "Silver", Commission_Rate__c: 15, Partner_Status__c: "Active", Total_Properties__c: 3, Total_Reservations__c: 8, Total_Revenue__c: 156000, Contract_Start_Date__c: "2025-06-01", Contract_End_Date__c: "2026-05-31" },
17
+ { Id: "001P4", Name: "InterContinental Hotels Group", Partner_Tier__c: "Gold", Commission_Rate__c: 16, Partner_Status__c: "Active", Total_Properties__c: 4, Total_Reservations__c: 7, Total_Revenue__c: 198000, Contract_Start_Date__c: "2025-04-01", Contract_End_Date__c: "2027-03-31" },
18
+ { Id: "001P5", Name: "Wyndham Hotels & Resorts", Partner_Tier__c: "Silver", Commission_Rate__c: 14, Partner_Status__c: "Active", Total_Properties__c: 3, Total_Reservations__c: 5, Total_Revenue__c: 112000, Contract_Start_Date__c: "2025-07-01", Contract_End_Date__c: "2026-06-30" },
19
+ { Id: "001P6", Name: "Best Western Hotels", Partner_Tier__c: "Bronze", Commission_Rate__c: 12, Partner_Status__c: "Active", Total_Properties__c: 2, Total_Reservations__c: 3, Total_Revenue__c: 64000, Contract_Start_Date__c: "2025-09-01", Contract_End_Date__c: "2026-08-31" },
20
+ { Id: "001P7", Name: "Four Seasons Hotels", Partner_Tier__c: "Gold", Commission_Rate__c: 20, Partner_Status__c: "Active", Total_Properties__c: 3, Total_Reservations__c: 4, Total_Revenue__c: 312000, Contract_Start_Date__c: "2025-02-01", Contract_End_Date__c: "2027-01-31" },
21
+ { Id: "001P8", Name: "Radisson Hotel Group", Partner_Tier__c: "Silver", Commission_Rate__c: 13, Partner_Status__c: "Active", Total_Properties__c: 3, Total_Reservations__c: 4, Total_Revenue__c: 89000, Contract_Start_Date__c: "2025-05-01", Contract_End_Date__c: "2026-04-30" },
22
+ { Id: "001P9", Name: "Accor Hotels", Partner_Tier__c: "Silver", Commission_Rate__c: 14, Partner_Status__c: "Pending", Total_Properties__c: 2, Total_Reservations__c: 0, Total_Revenue__c: 0, Contract_Start_Date__c: "2026-04-01", Contract_End_Date__c: "2027-03-31" },
23
+ { Id: "001P10", Name: "Choice Hotels International", Partner_Tier__c: "Bronze", Commission_Rate__c: 11, Partner_Status__c: "Active", Total_Properties__c: 2, Total_Reservations__c: 2, Total_Revenue__c: 42000, Contract_Start_Date__c: "2025-10-01", Contract_End_Date__c: "2026-09-30" },
24
+ { Id: "001P11", Name: "Omni Hotels & Resorts", Partner_Tier__c: "Silver", Commission_Rate__c: 15, Partner_Status__c: "Active", Total_Properties__c: 2, Total_Reservations__c: 3, Total_Revenue__c: 97000, Contract_Start_Date__c: "2025-08-01", Contract_End_Date__c: "2026-07-31" },
25
+ { Id: "001P12", Name: "Loews Hotels & Co", Partner_Tier__c: "Bronze", Commission_Rate__c: 12, Partner_Status__c: "Inactive", Total_Properties__c: 1, Total_Reservations__c: 1, Total_Revenue__c: 28000, Contract_Start_Date__c: "2024-06-01", Contract_End_Date__c: "2025-05-31" },
26
+ ];
27
+
28
+ // ─── CONTRACTS ──────────────────────────────────────────────────────────────
29
+ export const CONTRACTS = [
30
+ { Id: "a10C1", Name: "CNTR-00001", Account__c: "001P1", Partner_Name: "Marriott International", Status__c: "Active", Attrition_Calculation_Method__c: "Per Night", Attrition_Threshold_Percentage__c: 80, Resale_Credit_Policy__c: "Full Credit", Resale_Credit_Percentage__c: 100, Commission_Rate__c: 18, Start_Date__c: "2025-01-01", End_Date__c: "2026-12-31" },
31
+ { Id: "a10C2", Name: "CNTR-00002", Account__c: "001P2", Partner_Name: "Hilton Hotels Corporation", Status__c: "Active", Attrition_Calculation_Method__c: "Per Night", Attrition_Threshold_Percentage__c: 80, Resale_Credit_Policy__c: "Partial Credit", Resale_Credit_Percentage__c: 50, Commission_Rate__c: 17, Start_Date__c: "2025-03-01", End_Date__c: "2027-02-28" },
32
+ { Id: "a10C3", Name: "CNTR-00003", Account__c: "001P3", Partner_Name: "Hyatt Hotels Corporation", Status__c: "Active", Attrition_Calculation_Method__c: "Cumulative", Attrition_Threshold_Percentage__c: 75, Resale_Credit_Policy__c: "Partial Credit", Resale_Credit_Percentage__c: 50, Commission_Rate__c: 15, Start_Date__c: "2025-06-01", End_Date__c: "2026-05-31" },
33
+ { Id: "a10C4", Name: "CNTR-00004", Account__c: "001P4", Partner_Name: "InterContinental Hotels Group", Status__c: "Active", Attrition_Calculation_Method__c: "Revenue Based", Attrition_Threshold_Percentage__c: 70, Resale_Credit_Policy__c: "No Credit", Resale_Credit_Percentage__c: 0, Commission_Rate__c: 16, Start_Date__c: "2025-04-01", End_Date__c: "2027-03-31" },
34
+ { Id: "a10C5", Name: "CNTR-00005", Account__c: "001P5", Partner_Name: "Wyndham Hotels & Resorts", Status__c: "Active", Attrition_Calculation_Method__c: "Per Night", Attrition_Threshold_Percentage__c: 85, Resale_Credit_Policy__c: "Full Credit", Resale_Credit_Percentage__c: 100, Commission_Rate__c: 14, Start_Date__c: "2025-07-01", End_Date__c: "2026-06-30" },
35
+ { Id: "a10C6", Name: "CNTR-00006", Account__c: "001P6", Partner_Name: "Best Western Hotels", Status__c: "Active", Attrition_Calculation_Method__c: "Cumulative", Attrition_Threshold_Percentage__c: 70, Resale_Credit_Policy__c: "No Credit", Resale_Credit_Percentage__c: 0, Commission_Rate__c: 12, Start_Date__c: "2025-09-01", End_Date__c: "2026-08-31" },
36
+ { Id: "a10C7", Name: "CNTR-00007", Account__c: "001P7", Partner_Name: "Four Seasons Hotels", Status__c: "Active", Attrition_Calculation_Method__c: "Per Night", Attrition_Threshold_Percentage__c: 90, Resale_Credit_Policy__c: "Full Credit", Resale_Credit_Percentage__c: 100, Commission_Rate__c: 20, Start_Date__c: "2025-02-01", End_Date__c: "2027-01-31" },
37
+ { Id: "a10C8", Name: "CNTR-00008", Account__c: "001P8", Partner_Name: "Radisson Hotel Group", Status__c: "Active", Attrition_Calculation_Method__c: "Per Night", Attrition_Threshold_Percentage__c: 80, Resale_Credit_Policy__c: "Partial Credit", Resale_Credit_Percentage__c: 50, Commission_Rate__c: 13, Start_Date__c: "2025-05-01", End_Date__c: "2026-04-30" },
38
+ { Id: "a10C9", Name: "CNTR-00009", Account__c: "001P9", Partner_Name: "Accor Hotels", Status__c: "Active", Attrition_Calculation_Method__c: "Revenue Based", Attrition_Threshold_Percentage__c: 75, Resale_Credit_Policy__c: "Partial Credit", Resale_Credit_Percentage__c: 50, Commission_Rate__c: 14, Start_Date__c: "2026-04-01", End_Date__c: "2027-03-31" },
39
+ { Id: "a10C10", Name: "CNTR-00010", Account__c: "001P10", Partner_Name: "Choice Hotels International", Status__c: "Active", Attrition_Calculation_Method__c: "Cumulative", Attrition_Threshold_Percentage__c: 70, Resale_Credit_Policy__c: "No Credit", Resale_Credit_Percentage__c: 0, Commission_Rate__c: 11, Start_Date__c: "2025-10-01", End_Date__c: "2026-09-30" },
40
+ { Id: "a10C11", Name: "CNTR-00011", Account__c: "001P11", Partner_Name: "Omni Hotels & Resorts", Status__c: "Active", Attrition_Calculation_Method__c: "Per Night", Attrition_Threshold_Percentage__c: 80, Resale_Credit_Policy__c: "Full Credit", Resale_Credit_Percentage__c: 100, Commission_Rate__c: 15, Start_Date__c: "2025-08-01", End_Date__c: "2026-07-31" },
41
+ { Id: "a10C12", Name: "CNTR-00012", Account__c: "001P12", Partner_Name: "Loews Hotels & Co", Status__c: "Expired", Attrition_Calculation_Method__c: "Per Night", Attrition_Threshold_Percentage__c: 80, Resale_Credit_Policy__c: "No Credit", Resale_Credit_Percentage__c: 0, Commission_Rate__c: 12, Start_Date__c: "2024-06-01", End_Date__c: "2025-05-31" },
42
+ ];
43
+
44
+ // ─── INVOICES ───────────────────────────────────────────────────────────────
45
+ export const INVOICES = [
46
+ { Id: "a20I1", Name: "INV-00001", Account__c: "001P1", Partner_Name: "Marriott International", Status__c: "Paid", Invoice_Date__c: "2026-01-15", Due_Date__c: "2026-02-15", Period_Start__c: "2025-12-01", Period_End__c: "2025-12-31", Total_Amount__c: 24500, Commission_Amount__c: 4410 },
47
+ { Id: "a20I2", Name: "INV-00002", Account__c: "001P2", Partner_Name: "Hilton Hotels Corporation", Status__c: "Paid", Invoice_Date__c: "2026-01-15", Due_Date__c: "2026-02-15", Period_Start__c: "2025-12-01", Period_End__c: "2025-12-31", Total_Amount__c: 19800, Commission_Amount__c: 3366 },
48
+ { Id: "a20I3", Name: "INV-00003", Account__c: "001P3", Partner_Name: "Hyatt Hotels Corporation", Status__c: "Paid", Invoice_Date__c: "2026-01-15", Due_Date__c: "2026-02-15", Period_Start__c: "2025-12-01", Period_End__c: "2025-12-31", Total_Amount__c: 13200, Commission_Amount__c: 1980 },
49
+ { Id: "a20I4", Name: "INV-00004", Account__c: "001P1", Partner_Name: "Marriott International", Status__c: "Paid", Invoice_Date__c: "2026-02-15", Due_Date__c: "2026-03-15", Period_Start__c: "2026-01-01", Period_End__c: "2026-01-31", Total_Amount__c: 27200, Commission_Amount__c: 4896 },
50
+ { Id: "a20I5", Name: "INV-00005", Account__c: "001P2", Partner_Name: "Hilton Hotels Corporation", Status__c: "Paid", Invoice_Date__c: "2026-02-15", Due_Date__c: "2026-03-15", Period_Start__c: "2026-01-01", Period_End__c: "2026-01-31", Total_Amount__c: 21400, Commission_Amount__c: 3638 },
51
+ { Id: "a20I6", Name: "INV-00006", Account__c: "001P4", Partner_Name: "InterContinental Hotels Group", Status__c: "Paid", Invoice_Date__c: "2026-02-15", Due_Date__c: "2026-03-15", Period_Start__c: "2026-01-01", Period_End__c: "2026-01-31", Total_Amount__c: 18600, Commission_Amount__c: 2976 },
52
+ { Id: "a20I7", Name: "INV-00007", Account__c: "001P1", Partner_Name: "Marriott International", Status__c: "Sent", Invoice_Date__c: "2026-03-15", Due_Date__c: "2026-04-15", Period_Start__c: "2026-02-01", Period_End__c: "2026-02-28", Total_Amount__c: 26800, Commission_Amount__c: 4824 },
53
+ { Id: "a20I8", Name: "INV-00008", Account__c: "001P2", Partner_Name: "Hilton Hotels Corporation", Status__c: "Sent", Invoice_Date__c: "2026-03-15", Due_Date__c: "2026-04-15", Period_Start__c: "2026-02-01", Period_End__c: "2026-02-28", Total_Amount__c: 22100, Commission_Amount__c: 3757 },
54
+ { Id: "a20I9", Name: "INV-00009", Account__c: "001P3", Partner_Name: "Hyatt Hotels Corporation", Status__c: "Sent", Invoice_Date__c: "2026-03-15", Due_Date__c: "2026-04-15", Period_Start__c: "2026-02-01", Period_End__c: "2026-02-28", Total_Amount__c: 14800, Commission_Amount__c: 2220 },
55
+ { Id: "a20I10", Name: "INV-00010", Account__c: "001P4", Partner_Name: "InterContinental Hotels Group", Status__c: "Sent", Invoice_Date__c: "2026-03-15", Due_Date__c: "2026-04-15", Period_Start__c: "2026-02-01", Period_End__c: "2026-02-28", Total_Amount__c: 17200, Commission_Amount__c: 2752 },
56
+ { Id: "a20I11", Name: "INV-00011", Account__c: "001P5", Partner_Name: "Wyndham Hotels & Resorts", Status__c: "Overdue", Invoice_Date__c: "2026-02-15", Due_Date__c: "2026-03-15", Period_Start__c: "2026-01-01", Period_End__c: "2026-01-31", Total_Amount__c: 9400, Commission_Amount__c: 1316 },
57
+ { Id: "a20I12", Name: "INV-00012", Account__c: "001P6", Partner_Name: "Best Western Hotels", Status__c: "Overdue", Invoice_Date__c: "2026-02-15", Due_Date__c: "2026-03-15", Period_Start__c: "2026-01-01", Period_End__c: "2026-01-31", Total_Amount__c: 5200, Commission_Amount__c: 624 },
58
+ { Id: "a20I13", Name: "INV-00013", Account__c: "001P7", Partner_Name: "Four Seasons Hotels", Status__c: "Sent", Invoice_Date__c: "2026-03-15", Due_Date__c: "2026-04-15", Period_Start__c: "2026-02-01", Period_End__c: "2026-02-28", Total_Amount__c: 31200, Commission_Amount__c: 6240 },
59
+ { Id: "a20I14", Name: "INV-00014", Account__c: "001P8", Partner_Name: "Radisson Hotel Group", Status__c: "Sent", Invoice_Date__c: "2026-03-15", Due_Date__c: "2026-04-15", Period_Start__c: "2026-02-01", Period_End__c: "2026-02-28", Total_Amount__c: 8900, Commission_Amount__c: 1157 },
60
+ { Id: "a20I15", Name: "INV-00015", Account__c: "001P5", Partner_Name: "Wyndham Hotels & Resorts", Status__c: "Sent", Invoice_Date__c: "2026-03-15", Due_Date__c: "2026-04-15", Period_Start__c: "2026-02-01", Period_End__c: "2026-02-28", Total_Amount__c: 10800, Commission_Amount__c: 1512 },
61
+ { Id: "a20I16", Name: "INV-00016", Account__c: "001P10", Partner_Name: "Choice Hotels International", Status__c: "Sent", Invoice_Date__c: "2026-03-15", Due_Date__c: "2026-04-15", Period_Start__c: "2026-02-01", Period_End__c: "2026-02-28", Total_Amount__c: 4200, Commission_Amount__c: 462 },
62
+ { Id: "a20I17", Name: "INV-00017", Account__c: "001P11", Partner_Name: "Omni Hotels & Resorts", Status__c: "Draft", Invoice_Date__c: "2026-04-01", Due_Date__c: "2026-05-01", Period_Start__c: "2026-03-01", Period_End__c: "2026-03-31", Total_Amount__c: 11400, Commission_Amount__c: 1710 },
63
+ ];
64
+
65
+ // ─── ATTRITION PENALTIES ────────────────────────────────────────────────────
66
+ export const ATTRITION_PENALTIES = [
67
+ { Id: "a30A1", Name: "ATR-00001", Partner_Name: "Hilton Hotels Corporation", Property_Name: "Hilton Austin Convention Center Hotel", Contract__c: "a10C2", Customer_Name: "TechCorp Inc.", Status__c: "Approved", Original_Room_Block__c: 50, Actual_Rooms_Used__c: 35, Unused_Rooms__c: 15, Room_Rate__c: 200, Number_of_Nights__c: 3, Rooms_Resold__c: 8, Penalty_Amount_Calculated__c: 9000, Resale_Credit_Applied__c: 0, Final_Penalty_Amount__c: 9000, Calculation_Method: "Per Night", Resale_Policy: "Partial Credit (50%)", Is_Hero: true },
68
+ { Id: "a30A2", Name: "ATR-00002", Partner_Name: "Hyatt Hotels Corporation", Property_Name: "Hyatt Regency Chicago", Contract__c: "a10C3", Customer_Name: "GlobalTech Ltd.", Status__c: "Reviewed", Original_Room_Block__c: 30, Actual_Rooms_Used__c: 22, Unused_Rooms__c: 8, Room_Rate__c: 250, Number_of_Nights__c: 2, Rooms_Resold__c: 5, Penalty_Amount_Calculated__c: 4000, Resale_Credit_Applied__c: 1250, Final_Penalty_Amount__c: 2750, Calculation_Method: "Cumulative", Resale_Policy: "Partial Credit (50%)" },
69
+ { Id: "a30A3", Name: "ATR-00003", Partner_Name: "Marriott International", Property_Name: "Marriott Marquis NYC", Contract__c: "a10C1", Customer_Name: "Acme Corp.", Status__c: "Approved", Original_Room_Block__c: 40, Actual_Rooms_Used__c: 30, Unused_Rooms__c: 10, Room_Rate__c: 300, Number_of_Nights__c: 2, Rooms_Resold__c: 4, Penalty_Amount_Calculated__c: 6000, Resale_Credit_Applied__c: 2400, Final_Penalty_Amount__c: 3600, Calculation_Method: "Per Night", Resale_Policy: "Full Credit" },
70
+ { Id: "a30A4", Name: "ATR-00004", Partner_Name: "InterContinental Hotels Group", Property_Name: "InterContinental San Francisco", Contract__c: "a10C4", Customer_Name: "StartupX Inc.", Status__c: "Calculated", Original_Room_Block__c: 25, Actual_Rooms_Used__c: 18, Unused_Rooms__c: 7, Room_Rate__c: 275, Number_of_Nights__c: 1, Rooms_Resold__c: 3, Penalty_Amount_Calculated__c: 1925, Resale_Credit_Applied__c: 0, Final_Penalty_Amount__c: 1925, Calculation_Method: "Revenue Based", Resale_Policy: "No Credit" },
71
+ { Id: "a30A5", Name: "ATR-00005", Partner_Name: "Wyndham Hotels & Resorts", Property_Name: "Wyndham Grand Orlando", Contract__c: "a10C5", Customer_Name: "MediaCo LLC", Status__c: "Disputed", Original_Room_Block__c: 20, Actual_Rooms_Used__c: 14, Unused_Rooms__c: 6, Room_Rate__c: 150, Number_of_Nights__c: 2, Rooms_Resold__c: 4, Penalty_Amount_Calculated__c: 1800, Resale_Credit_Applied__c: 1200, Final_Penalty_Amount__c: 600, Calculation_Method: "Per Night", Resale_Policy: "Full Credit" },
72
+ { Id: "a30A6", Name: "ATR-00006", Partner_Name: "Radisson Hotel Group", Property_Name: "Radisson Blu Aqua Chicago", Contract__c: "a10C8", Customer_Name: "FinanceFirst Corp.", Status__c: "Approved", Original_Room_Block__c: 35, Actual_Rooms_Used__c: 25, Unused_Rooms__c: 10, Room_Rate__c: 175, Number_of_Nights__c: 2, Rooms_Resold__c: 3, Penalty_Amount_Calculated__c: 3500, Resale_Credit_Applied__c: 525, Final_Penalty_Amount__c: 2975, Calculation_Method: "Per Night", Resale_Policy: "Partial Credit (50%)" },
73
+ ];
74
+
75
+ // ─── DISPUTES (Case with RecordType = Partner_Dispute) ──────────────────────
76
+ export const DISPUTES = [
77
+ { Id: "500D1", CaseNumber: "00001045", Subject: "ATR-00001 — Resale credit not applied", Partner_Name: "Hilton Hotels Corporation", Dispute_Type__c: "Resale Credit", Disputed_Amount__c: 2400, Status: "Open", Priority: "High", Agent_Handled__c: true, CreatedDate: "2026-04-02", Escalation_Reason__c: "$2,400 Partial Credit for 8 resold rooms was never applied to ATR-00001" },
78
+ { Id: "500D2", CaseNumber: "00001038", Subject: "ATR-00005 — Penalty exceeds contract terms", Partner_Name: "Wyndham Hotels & Resorts", Dispute_Type__c: "Attrition Calculation", Disputed_Amount__c: 1200, Status: "Open", Priority: "Medium", Agent_Handled__c: false, CreatedDate: "2026-03-28", Escalation_Reason__c: "Partner claims full resale credit was not applied correctly" },
79
+ { Id: "500D3", CaseNumber: "00001032", Subject: "INV-00011 — Commission rate discrepancy", Partner_Name: "Wyndham Hotels & Resorts", Dispute_Type__c: "Commission Rate", Disputed_Amount__c: 470, Status: "Open", Priority: "Low", Agent_Handled__c: false, CreatedDate: "2026-03-22", Escalation_Reason__c: "Invoice shows 12% rate but contract specifies 14%" },
80
+ { Id: "500D4", CaseNumber: "00001025", Subject: "INV-00006 — Duplicate line items", Partner_Name: "InterContinental Hotels Group", Dispute_Type__c: "Invoice Amount", Disputed_Amount__c: 2976, Status: "Resolved", Priority: "High", Agent_Handled__c: true, CreatedDate: "2026-03-15", Escalation_Reason__c: "Duplicate commission line items on January invoice" },
81
+ { Id: "500D5", CaseNumber: "00001018", Subject: "ATR-00002 — Threshold not met", Partner_Name: "Hyatt Hotels Corporation", Dispute_Type__c: "Attrition Calculation", Disputed_Amount__c: 2750, Status: "Resolved", Priority: "Medium", Agent_Handled__c: true, CreatedDate: "2026-03-10", Escalation_Reason__c: "Usage was 73% (below 75% threshold) — cumulative method applies" },
82
+ { Id: "500D6", CaseNumber: "00001010", Subject: "General — Contract renewal terms", Partner_Name: "Omni Hotels & Resorts", Dispute_Type__c: "Other", Disputed_Amount__c: 0, Status: "Open", Priority: "Low", Agent_Handled__c: false, CreatedDate: "2026-03-05", Escalation_Reason__c: "Partner requesting revised commission rate for renewal" },
83
+ { Id: "500D7", CaseNumber: "00001005", Subject: "ATR-00004 — Revenue-based method questioned", Partner_Name: "InterContinental Hotels Group", Dispute_Type__c: "Attrition Calculation", Disputed_Amount__c: 1925, Status: "Escalated", Priority: "High", Agent_Handled__c: true, CreatedDate: "2026-02-28", Escalation_Reason__c: "Partner disagrees with revenue-based calculation — wants per-night method" },
84
+ ];
85
+
86
+ // ─── RECENT ACTIVITY (for ActivityCard / FeedPanel) ─────────────────────────
87
+ export const RECENT_ACTIVITY = [
88
+ { id: "act-1", title: "Penalty Dispute Created", description: "Agent flagged $2,400 missing resale credit on ATR-00001", status: "alert", timestamp: "2 hours ago", partner: "Hilton Hotels Corporation" },
89
+ { id: "act-2", title: "Invoice Sent", description: "INV-00013 sent to Four Seasons Hotels ($31,200)", status: "info", timestamp: "4 hours ago", partner: "Four Seasons Hotels" },
90
+ { id: "act-3", title: "Contract Renewed", description: "CNTR-00007 renewed through Jan 2027", status: "success", timestamp: "1 day ago", partner: "Four Seasons Hotels" },
91
+ { id: "act-4", title: "Dispute Resolved", description: "Case #00001025 — duplicate line items corrected on INV-00006", status: "success", timestamp: "1 day ago", partner: "InterContinental Hotels Group" },
92
+ { id: "act-5", title: "Overdue Invoice Alert", description: "INV-00011 past due — $9,400 outstanding since Mar 15", status: "warning", timestamp: "2 days ago", partner: "Wyndham Hotels & Resorts" },
93
+ { id: "act-6", title: "New Partner Onboarding", description: "Accor Hotels contract signed — pending property setup", status: "info", timestamp: "3 days ago", partner: "Accor Hotels" },
94
+ { id: "act-7", title: "Attrition Penalty Calculated", description: "ATR-00004 calculated at $1,925 (revenue-based method)", status: "info", timestamp: "4 days ago", partner: "InterContinental Hotels Group" },
95
+ { id: "act-8", title: "Dispute Escalated", description: "Case #00001005 escalated — IHG disputes revenue-based calculation", status: "alert", timestamp: "5 days ago", partner: "InterContinental Hotels Group" },
96
+ ];
97
+
98
+ // ─── DASHBOARD-READY DERIVATIVES ────────────────────────────────────────────
99
+
100
+ // KPI metrics
101
+ const activePartners = PARTNERS.filter(p => p.Partner_Status__c === "Active").length;
102
+ const totalRevenue = PARTNERS.reduce((sum, p) => sum + p.Total_Revenue__c, 0);
103
+ const openDisputes = DISPUTES.filter(d => d.Status === "Open" || d.Status === "Escalated").length;
104
+ const overdueInvoices = INVOICES.filter(i => i.Status__c === "Overdue").length;
105
+ const totalPenalties = ATTRITION_PENALTIES.reduce((sum, p) => sum + p.Final_Penalty_Amount__c, 0);
106
+ const avgCommission = (PARTNERS.filter(p => p.Partner_Status__c === "Active").reduce((sum, p) => sum + p.Commission_Rate__c, 0) / activePartners).toFixed(1);
107
+
108
+ export const METRICS = {
109
+ activePartners,
110
+ totalRevenue,
111
+ openDisputes,
112
+ overdueInvoices,
113
+ totalPenalties,
114
+ avgCommission,
115
+ totalProperties: PARTNERS.reduce((sum, p) => sum + p.Total_Properties__c, 0),
116
+ totalReservations: PARTNERS.reduce((sum, p) => sum + p.Total_Reservations__c, 0),
117
+ };
118
+
119
+ // Partner tier breakdown (for ChartCard — pie or bar)
120
+ export const PARTNER_TIER_CHART = [
121
+ { label: "Gold", value: PARTNERS.filter(p => p.Partner_Tier__c === "Gold").length, color: "#FFC107" },
122
+ { label: "Silver", value: PARTNERS.filter(p => p.Partner_Tier__c === "Silver").length, color: "#90A4AE" },
123
+ { label: "Bronze", value: PARTNERS.filter(p => p.Partner_Tier__c === "Bronze").length, color: "#CD7F32" },
124
+ ];
125
+
126
+ // Revenue by partner (for ChartCard — horizontal bar)
127
+ export const REVENUE_BY_PARTNER = PARTNERS
128
+ .filter(p => p.Total_Revenue__c > 0)
129
+ .sort((a, b) => b.Total_Revenue__c - a.Total_Revenue__c)
130
+ .map(p => ({ label: p.Name, value: p.Total_Revenue__c }));
131
+
132
+ // Monthly invoice trend (for ChartCard — line/area)
133
+ export const INVOICE_TREND = [
134
+ { month: "Dec 2025", total: 57500, commission: 9756 },
135
+ { month: "Jan 2026", total: 76600, commission: 12826 },
136
+ { month: "Feb 2026", total: 143400, commission: 22422 },
137
+ { month: "Mar 2026", total: 11400, commission: 1710 },
138
+ ];
139
+
140
+ // Attrition penalties for TableCard
141
+ export const PENALTY_TABLE_ITEMS = ATTRITION_PENALTIES.map(p => ({
142
+ id: p.Id,
143
+ name: p.Name,
144
+ partner: p.Partner_Name,
145
+ property: p.Property_Name,
146
+ customer: p.Customer_Name,
147
+ status: p.Status__c,
148
+ penalty: p.Final_Penalty_Amount__c,
149
+ credit: p.Resale_Credit_Applied__c,
150
+ method: p.Calculation_Method,
151
+ isHero: p.Is_Hero,
152
+ }));
153
+
154
+ // Dispute cards for ListCard
155
+ export const DISPUTE_CARDS = DISPUTES.filter(d => d.Status !== "Resolved").map(d => ({
156
+ id: d.Id,
157
+ title: d.Subject,
158
+ description: `${d.Partner_Name} · ${d.Dispute_Type__c}`,
159
+ status: d.Priority === "High" ? "critical" : d.Priority === "Medium" ? "warning" : "info",
160
+ badge: d.Status,
161
+ amount: d.Disputed_Amount__c,
162
+ agentHandled: d.Agent_Handled__c,
163
+ }));
164
+
165
+ // Invoice cards for ListCard
166
+ export const INVOICE_CARDS = INVOICES.filter(i => i.Status__c !== "Paid").map(i => ({
167
+ id: i.Id,
168
+ title: `${i.Name} — ${i.Partner_Name}`,
169
+ description: `${i.Period_Start__c} to ${i.Period_End__c}`,
170
+ status: i.Status__c === "Overdue" ? "critical" : i.Status__c === "Draft" ? "info" : "default",
171
+ badge: i.Status__c,
172
+ amount: i.Total_Amount__c,
173
+ due: i.Due_Date__c,
174
+ }));
175
+
176
+ // Contract expiration (upcoming 6 months)
177
+ export const EXPIRING_CONTRACTS = CONTRACTS
178
+ .filter(c => {
179
+ const end = new Date(c.End_Date__c);
180
+ const now = new Date("2026-04-01");
181
+ const sixMonths = new Date("2026-10-01");
182
+ return c.Status__c === "Active" && end >= now && end <= sixMonths;
183
+ })
184
+ .sort((a, b) => new Date(a.End_Date__c) - new Date(b.End_Date__c))
185
+ .map(c => ({
186
+ id: c.Id,
187
+ title: `${c.Name} — ${c.Partner_Name}`,
188
+ description: `Expires ${c.End_Date__c} · ${c.Attrition_Calculation_Method__c} · ${c.Resale_Credit_Policy__c}`,
189
+ status: "warning",
190
+ badge: c.End_Date__c,
191
+ }));