@salesforce/webapp-template-app-react-sample-b2e-experimental 1.80.1 → 1.82.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.
Files changed (53) hide show
  1. package/dist/CHANGELOG.md +16 -0
  2. package/dist/force-app/main/default/classes/MaintenanceRequestTriggerHandler.cls +66 -0
  3. package/dist/force-app/main/default/classes/MaintenanceRequestTriggerHandler.cls-meta.xml +5 -0
  4. package/dist/force-app/main/default/classes/MaintenanceRequestTriggerHandler_Test.cls +308 -0
  5. package/dist/force-app/main/default/classes/MaintenanceRequestTriggerHandler_Test.cls-meta.xml +5 -0
  6. package/dist/force-app/main/default/objects/Application__c/fields/Status__c.field-meta.xml +5 -0
  7. package/dist/force-app/main/default/objects/Maintenance_Request__c/fields/Assigned_Worker__c.field-meta.xml +15 -0
  8. package/dist/force-app/main/default/permissionsets/Property_Management_Access.permissionset-meta.xml +5 -52
  9. package/dist/force-app/main/default/triggers/MaintenanceRequestTrigger.trigger +5 -0
  10. package/dist/force-app/main/default/triggers/MaintenanceRequestTrigger.trigger-meta.xml +5 -0
  11. package/dist/force-app/main/default/webapplications/appreactsampleb2e/package.json +4 -4
  12. package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/api/applications.ts +3 -3
  13. package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/api/dashboard.ts +1 -1
  14. package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/api/graphql-operations-types.ts +161 -13
  15. package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/api/maintenance.ts +11 -9
  16. package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/api/maintenanceWorkers.ts +2 -2
  17. package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/api/properties.ts +1 -1
  18. package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/appLayout.tsx +2 -2
  19. package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/assets/icons/maintenance-worker.svg +8 -0
  20. package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/components/ApplicationCard.tsx +1 -1
  21. package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/components/ApplicationDetailsModal.tsx +1 -1
  22. package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/components/ApplicationsTable.tsx +1 -1
  23. package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/components/IssuesDonutChart.tsx +23 -3
  24. package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/components/ListPageFilters.tsx +1 -1
  25. package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/components/MaintenanceDetailsModal.tsx +6 -6
  26. package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/components/MaintenanceRequestCard.tsx +1 -1
  27. package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/components/MaintenanceTable.tsx +2 -2
  28. package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/components/PropertyCard.tsx +1 -1
  29. package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/components/PropertyDetailsModal.tsx +1 -1
  30. package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/components/TopBar.tsx +1 -1
  31. package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/components/VerticalNav.tsx +4 -3
  32. package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/components/dashboard/GlobalSearchBar.tsx +2 -2
  33. package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/components/filters/FilterFieldRange.tsx +1 -1
  34. package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/components/filters/FilterFieldSelect.tsx +1 -1
  35. package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/components/filters/ListPageFilterRow.tsx +3 -3
  36. package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/components/list/ListPageWithFilters.tsx +5 -5
  37. package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/hooks/useListPage.ts +4 -4
  38. package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/lib/applicationAdapter.ts +1 -1
  39. package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/lib/fieldMappers.ts +1 -1
  40. package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/lib/globalSearchConstants.ts +1 -1
  41. package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/lib/listPageConfig.ts +9 -9
  42. package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/lib/maintenanceAdapter.ts +8 -4
  43. package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/lib/maintenanceColumns.ts +12 -0
  44. package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/lib/maintenanceWorkerAdapter.ts +1 -1
  45. package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/lib/propertyAdapter.ts +1 -1
  46. package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/pages/Applications.tsx +8 -8
  47. package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/pages/Home.tsx +19 -20
  48. package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/pages/Maintenance.tsx +9 -9
  49. package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/pages/MaintenanceWorkers.tsx +51 -10
  50. package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/pages/Properties.tsx +15 -15
  51. package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/routes.tsx +1 -1
  52. package/dist/package.json +1 -1
  53. package/package.json +3 -3
@@ -22,6 +22,7 @@ export type Scalars = {
22
22
  DateTime: { input: string; output: string };
23
23
  Double: { input: number | string; output: number };
24
24
  Email: { input: string; output: string };
25
+ EncryptedString: { input: string; output: string };
25
26
  /** Can be set to an ID or a Reference to the result of another mutation operation. */
26
27
  IdOrRef: { input: string; output: string };
27
28
  Latitude: { input: number | string; output: number };
@@ -45,8 +46,13 @@ export type Application__CUpdateInput = {
45
46
  };
46
47
 
47
48
  export type Application__CUpdateRepresentation = {
49
+ Employment__c?: InputMaybe<Scalars["LongTextArea"]["input"]>;
48
50
  OwnerId?: InputMaybe<Scalars["IdOrRef"]["input"]>;
51
+ Property__c?: InputMaybe<Scalars["IdOrRef"]["input"]>;
52
+ References__c?: InputMaybe<Scalars["LongTextArea"]["input"]>;
53
+ Start_Date__c?: InputMaybe<Scalars["Date"]["input"]>;
49
54
  Status__c?: InputMaybe<Scalars["Picklist"]["input"]>;
55
+ User__c?: InputMaybe<Scalars["IdOrRef"]["input"]>;
50
56
  };
51
57
 
52
58
  export enum DataType {
@@ -88,14 +94,52 @@ export enum FieldExtraTypeInfo {
88
94
  SwitchablePersonname = "SWITCHABLE_PERSONNAME",
89
95
  }
90
96
 
97
+ export enum LayoutComponentType {
98
+ Canvas = "CANVAS",
99
+ CustomLink = "CUSTOM_LINK",
100
+ EmptySpace = "EMPTY_SPACE",
101
+ Field = "FIELD",
102
+ ReportChart = "REPORT_CHART",
103
+ VisualforcePage = "VISUALFORCE_PAGE",
104
+ }
105
+
106
+ export enum LayoutMode {
107
+ Create = "CREATE",
108
+ Edit = "EDIT",
109
+ View = "VIEW",
110
+ }
111
+
112
+ export enum LayoutType {
113
+ Compact = "COMPACT",
114
+ Full = "FULL",
115
+ }
116
+
91
117
  export type Maintenance_Request__CUpdateInput = {
92
118
  Id: Scalars["IdOrRef"]["input"];
93
119
  Maintenance_Request__c: Maintenance_Request__CUpdateRepresentation;
94
120
  };
95
121
 
96
122
  export type Maintenance_Request__CUpdateRepresentation = {
123
+ Actual_Cost__c?: InputMaybe<Scalars["Currency"]["input"]>;
124
+ Assigned_Worker__c?: InputMaybe<Scalars["IdOrRef"]["input"]>;
125
+ Completed__c?: InputMaybe<Scalars["DateTime"]["input"]>;
126
+ Description__c?: InputMaybe<Scalars["LongTextArea"]["input"]>;
127
+ Est_Cost__c?: InputMaybe<Scalars["Currency"]["input"]>;
97
128
  OwnerId?: InputMaybe<Scalars["IdOrRef"]["input"]>;
129
+ Priority__c?: InputMaybe<Scalars["Picklist"]["input"]>;
130
+ Property__c?: InputMaybe<Scalars["IdOrRef"]["input"]>;
131
+ Scheduled__c?: InputMaybe<Scalars["DateTime"]["input"]>;
98
132
  Status__c?: InputMaybe<Scalars["Picklist"]["input"]>;
133
+ Tenant_Home__c?: InputMaybe<Scalars["Boolean"]["input"]>;
134
+ Type__c?: InputMaybe<Scalars["Picklist"]["input"]>;
135
+ User__c?: InputMaybe<Scalars["IdOrRef"]["input"]>;
136
+ };
137
+
138
+ /** Input for ObjectInfo and PickValues */
139
+ export type ObjectInfoInput = {
140
+ apiName: Scalars["String"]["input"];
141
+ fieldNames?: InputMaybe<Array<Scalars["String"]["input"]>>;
142
+ recordTypeIDs?: InputMaybe<Array<Scalars["ID"]["input"]>>;
99
143
  };
100
144
 
101
145
  export enum ResultOrder {
@@ -103,6 +147,17 @@ export enum ResultOrder {
103
147
  Desc = "DESC",
104
148
  }
105
149
 
150
+ export enum TabOrder {
151
+ LeftRight = "LEFT_RIGHT",
152
+ TopDown = "TOP_DOWN",
153
+ }
154
+
155
+ export enum UiBehavior {
156
+ Edit = "EDIT",
157
+ Readonly = "READONLY",
158
+ Required = "REQUIRED",
159
+ }
160
+
106
161
  export type GetApplicationsQueryVariables = Exact<{ [key: string]: never }>;
107
162
 
108
163
  export type GetApplicationsQuery = {
@@ -113,10 +168,9 @@ export type GetApplicationsQuery = {
113
168
  node?: {
114
169
  Id: string;
115
170
  Name?: { value?: string | null } | null;
116
- Contact__r?: {
171
+ User__r?: {
117
172
  FirstName?: { value?: string | null } | null;
118
173
  LastName?: { value?: string | null } | null;
119
- Name?: { value?: string | null } | null;
120
174
  } | null;
121
175
  Property__r?: {
122
176
  Name?: { value?: string | null } | null;
@@ -177,7 +231,7 @@ export type GetOpenApplicationsQuery = {
177
231
  node?: {
178
232
  Id: string;
179
233
  Name?: { value?: string | null } | null;
180
- Contact__r?: { Name?: { value?: string | null } | null } | null;
234
+ User__r?: { Name?: { value?: string | null } | null } | null;
181
235
  Property__r?: { Address__c?: { value?: string | null } | null } | null;
182
236
  Status__c?: { value?: string | null } | null;
183
237
  CreatedDate?: { value?: string | null } | null;
@@ -215,10 +269,7 @@ export type GetMaintenanceRequestsQuery = {
215
269
  Id: string;
216
270
  Name?: { value?: string | null } | null;
217
271
  Property__r?: { Address__c?: { value?: string | null } | null } | null;
218
- Tenant__r?: {
219
- Name?: { value?: string | null } | null;
220
- User__r?: { Name?: { value?: string | null } | null } | null;
221
- } | null;
272
+ User__r?: { Name?: { value?: string | null } | null } | null;
222
273
  Type__c?: { value?: string | null } | null;
223
274
  Priority__c?: { value?: string | null } | null;
224
275
  Status__c?: { value?: string | null } | null;
@@ -253,11 +304,11 @@ export type GetAllMaintenanceRequestsQuery = {
253
304
  Address__c?: { value?: string | null } | null;
254
305
  Name?: { value?: string | null } | null;
255
306
  } | null;
256
- Tenant__r?: {
307
+ User__r?: { Name?: { value?: string | null } | null } | null;
308
+ Assigned_Worker__r?: {
257
309
  Name?: { value?: string | null } | null;
258
- User__r?: { Name?: { value?: string | null } | null } | null;
310
+ Employment_Type__c?: { value?: string | null } | null;
259
311
  } | null;
260
- Owner?: { Name?: { value?: string | null } | null } | Record<PropertyKey, never> | null;
261
312
  ContentDocumentLinks?: {
262
313
  edges?: Array<{
263
314
  node?: {
@@ -312,10 +363,10 @@ export type GetPropertiesQuery = {
312
363
  Year_Built__c?: { value?: number | null } | null;
313
364
  Hero_Image__c?: { value?: string | null } | null;
314
365
  Deposit__c?: { value?: number | null } | null;
315
- Parking__c?: { value?: string | null } | null;
316
- Pet_Friendly__c?: { value?: string | null } | null;
366
+ Parking__c?: { value?: number | null } | null;
367
+ Pet_Friendly__c?: { value?: boolean | null } | null;
317
368
  Available_Date__c?: { value?: string | null } | null;
318
- Lease_Term__c?: { value?: string | null } | null;
369
+ Lease_Term__c?: { value?: number | null } | null;
319
370
  Features__c?: { value?: string | null } | null;
320
371
  Utilities__c?: { value?: string | null } | null;
321
372
  Tour_URL__c?: { value?: string | null } | null;
@@ -327,3 +378,100 @@ export type GetPropertiesQuery = {
327
378
  };
328
379
  };
329
380
  };
381
+
382
+ export type GetObjectInfosQueryVariables = Exact<{
383
+ apiNames: Array<Scalars["String"]["input"]> | Scalars["String"]["input"];
384
+ }>;
385
+
386
+ export type GetObjectInfosQuery = {
387
+ uiapi: {
388
+ objectInfos?: Array<{
389
+ ApiName: string;
390
+ label?: string | null;
391
+ labelPlural?: string | null;
392
+ nameFields: Array<string | null>;
393
+ defaultRecordTypeId?: string | null;
394
+ keyPrefix?: string | null;
395
+ layoutable: boolean;
396
+ queryable: boolean;
397
+ searchable: boolean;
398
+ updateable: boolean;
399
+ deletable: boolean;
400
+ createable: boolean;
401
+ custom: boolean;
402
+ mruEnabled: boolean;
403
+ feedEnabled: boolean;
404
+ fields: Array<
405
+ | {
406
+ ApiName: string;
407
+ label?: string | null;
408
+ dataType?: DataType | null;
409
+ relationshipName?: string | null;
410
+ reference: boolean;
411
+ compound: boolean;
412
+ compoundFieldName?: string | null;
413
+ compoundComponentName?: string | null;
414
+ controllingFields: Array<string | null>;
415
+ controllerName?: string | null;
416
+ referenceToInfos: Array<{ ApiName: string; nameFields: Array<string | null> } | null>;
417
+ }
418
+ | {
419
+ ApiName: string;
420
+ label?: string | null;
421
+ dataType?: DataType | null;
422
+ relationshipName?: string | null;
423
+ reference: boolean;
424
+ compound: boolean;
425
+ compoundFieldName?: string | null;
426
+ compoundComponentName?: string | null;
427
+ controllingFields: Array<string | null>;
428
+ controllerName?: string | null;
429
+ referenceToInfos: Array<{ ApiName: string; nameFields: Array<string | null> } | null>;
430
+ }
431
+ | null
432
+ >;
433
+ recordTypeInfos: Array<{
434
+ recordTypeId?: string | null;
435
+ name?: string | null;
436
+ master: boolean;
437
+ available: boolean;
438
+ defaultRecordTypeMapping: boolean;
439
+ } | null>;
440
+ themeInfo?: { color?: string | null; iconUrl?: string | null } | null;
441
+ childRelationships: Array<{
442
+ relationshipName?: string | null;
443
+ fieldName?: string | null;
444
+ childObjectApiName: string;
445
+ } | null>;
446
+ dependentFields: Array<{ controllingField: string } | null>;
447
+ } | null> | null;
448
+ };
449
+ };
450
+
451
+ export type GetPicklistValuesQueryVariables = Exact<{
452
+ objectInfoInputs: Array<ObjectInfoInput> | ObjectInfoInput;
453
+ }>;
454
+
455
+ export type GetPicklistValuesQuery = {
456
+ uiapi: {
457
+ objectInfos?: Array<{
458
+ ApiName: string;
459
+ fields: Array<
460
+ | {
461
+ ApiName: string;
462
+ picklistValuesByRecordTypeIDs?: Array<{
463
+ recordTypeID: string;
464
+ defaultValue?: { value?: string | null } | null;
465
+ picklistValues?: Array<{
466
+ label?: string | null;
467
+ value?: string | null;
468
+ validFor?: Array<number | null> | null;
469
+ }> | null;
470
+ } | null> | null;
471
+ }
472
+ | { ApiName: string }
473
+ | null
474
+ >;
475
+ } | null> | null;
476
+ };
477
+ };
@@ -1,5 +1,5 @@
1
1
  import { getDataSDK, gql } from "@salesforce/sdk-data";
2
- import type { MaintenanceRequest } from "../lib/types.js";
2
+ import type { MaintenanceRequest } from "../lib/types";
3
3
  import type {
4
4
  GetMaintenanceRequestsQuery,
5
5
  GetMaintenanceRequestsQueryVariables,
@@ -98,11 +98,12 @@ const GET_ALL_MAINTENANCE_REQUESTS = gql`
98
98
  value
99
99
  }
100
100
  }
101
- Owner {
102
- ... on User {
103
- Name {
104
- value
105
- }
101
+ Assigned_Worker__r {
102
+ Name {
103
+ value
104
+ }
105
+ Employment_Type__c {
106
+ value
106
107
  }
107
108
  }
108
109
  ContentDocumentLinks(first: 1) {
@@ -241,8 +242,9 @@ function transformMaintenanceTaskFull(node: any): MaintenanceRequest {
241
242
  // Get tenant unit from Property
242
243
  const tenantUnit = node.Property__r?.Name?.value || node.Property__r?.Address__c?.value;
243
244
 
244
- // Get assigned worker name from Owner
245
- const assignedWorkerName = node.Owner?.Name?.value;
245
+ // Get assigned worker name and employment type from Assigned_Worker__r
246
+ const assignedWorkerName = node.Assigned_Worker__r?.Name?.value;
247
+ const assignedWorkerOrg = node.Assigned_Worker__r?.Employment_Type__c?.value;
246
248
 
247
249
  return {
248
250
  id: node.Id,
@@ -257,7 +259,7 @@ function transformMaintenanceTaskFull(node: any): MaintenanceRequest {
257
259
  imageUrl,
258
260
  tenantUnit,
259
261
  assignedWorkerName,
260
- assignedWorkerOrg: "ABC Diamond Technicians", // This would come from a related object in real scenario
262
+ assignedWorkerOrg,
261
263
  formattedDate,
262
264
  };
263
265
  }
@@ -1,5 +1,5 @@
1
- import type { MaintenanceWorker } from "../lib/types.js";
2
- import { getAllMaintenanceRequests } from "./maintenance.js";
1
+ import type { MaintenanceWorker } from "../lib/types";
2
+ import { getAllMaintenanceRequests } from "./maintenance";
3
3
 
4
4
  /**
5
5
  * Fetches maintenance workers. Derives unique workers from maintenance requests
@@ -1,5 +1,5 @@
1
1
  import { getDataSDK, gql } from "@salesforce/sdk-data";
2
- import type { Property } from "../lib/types.js";
2
+ import type { Property } from "../lib/types";
3
3
  import type { GetPropertiesQueryVariables, GetPropertiesQuery } from "./graphql-operations-types";
4
4
 
5
5
  // GraphQL query to get properties with pagination
@@ -1,6 +1,6 @@
1
1
  import { Outlet } from "react-router";
2
- import { TopBar } from "./components/TopBar.js";
3
- import { VerticalNav } from "./components/VerticalNav.js";
2
+ import { TopBar } from "./components/TopBar";
3
+ import { VerticalNav } from "./components/VerticalNav";
4
4
  import { AgentforceConversationClient } from "./components/AgentforceConversationClient";
5
5
 
6
6
  export default function AppLayout() {
@@ -0,0 +1,8 @@
1
+ <svg width="16" height="19" viewBox="0 0 16 19" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M8 1.5L8.00006 0.5H7.99995L8 1.5ZM13.5967 6.56836L12.6015 6.66614L12.6826 7.49179L13.509 7.56451L13.5967 6.56836ZM13.4844 9.09375V10.0938V9.09375ZM2.40137 6.56836L2.49054 7.56438L3.31559 7.49051L3.39658 6.66612L2.40137 6.56836ZM8 1.5L7.99994 2.5C10.3989 2.50015 12.3717 4.32767 12.6015 6.66614L13.5967 6.56836L14.5919 6.47058C14.2626 3.11875 11.4383 0.500219 8.00006 0.5L8 1.5ZM13.5967 6.56836L13.509 7.56451C13.6446 7.57644 13.75 7.69093 13.75 7.82812H14.75H15.75C15.75 6.6431 14.8414 5.67402 13.6843 5.57221L13.5967 6.56836ZM14.75 7.82812H13.75C13.75 7.97483 13.6311 8.09375 13.4844 8.09375V9.09375V10.0938C14.7356 10.0938 15.75 9.0794 15.75 7.82812H14.75ZM13.4844 9.09375V8.09375H2.51562V9.09375V10.0938H13.4844V9.09375ZM2.51562 9.09375V8.09375C2.36892 8.09375 2.25 7.97483 2.25 7.82812H1.25H0.25C0.25 9.0794 1.26435 10.0938 2.51562 10.0938V9.09375ZM1.25 7.82812H2.25C2.25 7.69089 2.35531 7.57648 2.49054 7.56438L2.40137 6.56836L2.31219 5.57234C1.1566 5.67581 0.25 6.64446 0.25 7.82812H1.25ZM2.40137 6.56836L3.39658 6.66612C3.62626 4.32802 5.60062 2.50011 8.00005 2.5L8 1.5L7.99995 0.5C4.56208 0.500164 1.73548 3.11823 1.40616 6.47059L2.40137 6.56836Z" fill="#65185C"/>
3
+ <line x1="8.25" y1="1" x2="8.25" y2="3.5" stroke="#65185C" stroke-width="2" stroke-linecap="round"/>
4
+ <line x1="13.25" y1="3.66421" x2="11.6642" y2="5.25" stroke="#65185C" stroke-width="2" stroke-linecap="round"/>
5
+ <line x1="4.33579" y1="5.25" x2="2.75" y2="3.66421" stroke="#65185C" stroke-width="2" stroke-linecap="round"/>
6
+ <path d="M4 11C5.90288 13.8543 10.0971 13.8543 12 11" stroke="#65185C" stroke-width="2" stroke-linecap="round"/>
7
+ <path d="M1 18C4.70577 13.7648 11.2942 13.7648 15 18" stroke="#65185C" stroke-width="2" stroke-linecap="round"/>
8
+ </svg>
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import { Card } from "./ui/card";
3
3
  import { Button } from "./ui/button";
4
- import type { Application } from "../lib/types.js";
4
+ import type { Application } from "../lib/types";
5
5
 
6
6
  interface ApplicationCardProps {
7
7
  application: Application;
@@ -1,7 +1,7 @@
1
1
  import React, { useState } from "react";
2
2
  import { X } from "lucide-react";
3
3
  import { Button } from "./ui/button";
4
- import type { Application } from "../lib/types.js";
4
+ import type { Application } from "../lib/types";
5
5
 
6
6
  interface ApplicationDetailsModalProps {
7
7
  application: Application;
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import type { Application } from "../lib/types.js";
2
+ import type { Application } from "../lib/types";
3
3
 
4
4
  interface ApplicationsTableProps {
5
5
  applications: Application[];
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { PieChart, Pie, Cell, ResponsiveContainer } from "recharts";
2
+ import { PieChart, Pie, Cell, ResponsiveContainer, Tooltip } from "recharts";
3
3
  import { Card } from "./ui/card";
4
4
  import { MoreVertical } from "lucide-react";
5
5
 
@@ -15,7 +15,26 @@ interface IssuesDonutChartProps {
15
15
 
16
16
  export const IssuesDonutChart: React.FC<IssuesDonutChartProps> = ({ data }) => {
17
17
  const total = data.reduce((sum, item) => sum + item.value, 0);
18
- const mainPercentage = total > 0 ? Math.round((data[0]?.value / total) * 100) : 0;
18
+ const maxValue = data.length > 0 ? Math.max(...data.map((item) => item.value)) : 0;
19
+ const mainPercentage = total > 0 ? Math.round((maxValue / total) * 100) : 0;
20
+
21
+ const CustomTooltip = ({ active, payload }: any) => {
22
+ if (active && payload && payload.length) {
23
+ const percentage = total > 0 ? Math.round((payload[0].value / total) * 100) : 0;
24
+ return (
25
+ <div className="bg-white p-3 border border-gray-200 rounded shadow-lg z-50">
26
+ <p className="text-sm font-semibold text-gray-800">{payload[0].name}</p>
27
+ <p className="text-sm text-gray-600">
28
+ Count: <span className="font-medium">{payload[0].value}</span>
29
+ </p>
30
+ <p className="text-sm text-gray-600">
31
+ Percentage: <span className="font-medium">{percentage}%</span>
32
+ </p>
33
+ </div>
34
+ );
35
+ }
36
+ return null;
37
+ };
19
38
 
20
39
  return (
21
40
  <Card className="p-4 border-gray-200 shadow-sm flex flex-col relative">
@@ -43,10 +62,11 @@ export const IssuesDonutChart: React.FC<IssuesDonutChartProps> = ({ data }) => {
43
62
  <Cell key={`cell-${index}`} fill={entry.color} />
44
63
  ))}
45
64
  </Pie>
65
+ <Tooltip content={<CustomTooltip />} wrapperStyle={{ zIndex: 1000 }} />
46
66
  </PieChart>
47
67
  </ResponsiveContainer>
48
68
  {/* Center text */}
49
- <div className="absolute inset-0 flex items-center justify-center">
69
+ <div className="absolute inset-0 flex items-center justify-center pointer-events-none">
50
70
  <div className="text-center">
51
71
  <div className="text-5xl font-bold text-primary-purple">{mainPercentage}%</div>
52
72
  </div>
@@ -1,4 +1,4 @@
1
- import type { ActiveFilter, FilterFieldConfig } from "../lib/listFilters.js";
1
+ import type { ActiveFilter, FilterFieldConfig } from "../lib/listFilters";
2
2
 
3
3
  const inputClass =
4
4
  "h-9 rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm focus:outline-none focus:ring-2 focus:ring-primary-purple/20 focus:border-primary-purple";
@@ -1,8 +1,8 @@
1
1
  import React, { useState } from "react";
2
2
  import { X } from "lucide-react";
3
3
  import { Button } from "./ui/button";
4
- import { PriorityBadge } from "./PriorityBadge.js";
5
- import type { MaintenanceRequest } from "../lib/types.js";
4
+ import { PriorityBadge } from "./PriorityBadge";
5
+ import type { MaintenanceRequest } from "../lib/types";
6
6
 
7
7
  interface MaintenanceDetailsModalProps {
8
8
  request: MaintenanceRequest;
@@ -21,11 +21,11 @@ export const MaintenanceDetailsModal: React.FC<MaintenanceDetailsModalProps> = (
21
21
  const [isSaving, setIsSaving] = useState(false);
22
22
 
23
23
  // Determine if status is editable
24
- // Only New and In Progress can be updated to Resolved
25
- const isStatusEditable = request.status === "New" || request.status === "In Progress";
24
+ // All statuses except Resolved can be edited
25
+ const isStatusEditable = request.status !== "Resolved";
26
26
 
27
- // Status options
28
- const statusOptions = ["New", "In Progress", "Resolved"];
27
+ // Status options - all possible statuses
28
+ const statusOptions = ["New", "Assigned", "In Progress", "On Hold", "Resolved"];
29
29
 
30
30
  const handleSave = async () => {
31
31
  if (!isStatusEditable) return;
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import { Card } from "./ui/card";
3
3
  import { Button } from "./ui/button";
4
- import type { MaintenanceRequest } from "../lib/types.js";
4
+ import type { MaintenanceRequest } from "../lib/types";
5
5
 
6
6
  interface MaintenanceRequestCardProps {
7
7
  request: MaintenanceRequest;
@@ -1,9 +1,9 @@
1
1
  import React from "react";
2
2
  import { useNavigate } from "react-router";
3
- import { PATHS } from "../lib/routeConfig.js";
3
+ import { PATHS } from "../lib/routeConfig";
4
4
  import { Card } from "./ui/card";
5
5
  import { Button } from "./ui/button";
6
- import type { MaintenanceRequest } from "../lib/types.js";
6
+ import type { MaintenanceRequest } from "../lib/types";
7
7
  import PlumbingIcon from "../assets/icons/plumbing.svg";
8
8
  import HVACIcon from "../assets/icons/hvac.svg";
9
9
  import ElectricalIcon from "../assets/icons/electrical.svg";
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import type { Property } from "../lib/types.js";
2
+ import type { Property } from "../lib/types";
3
3
 
4
4
  interface PropertyCardProps {
5
5
  property: Property;
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import { X } from "lucide-react";
3
3
  import { Button } from "./ui/button";
4
- import type { Property } from "../lib/types.js";
4
+ import type { Property } from "../lib/types";
5
5
 
6
6
  interface PropertyDetailsModalProps {
7
7
  property: Property;
@@ -1,7 +1,7 @@
1
1
  import React, { useEffect, useState } from "react";
2
2
  import { Search, Bell, ChevronDown, Menu } from "lucide-react";
3
3
  import zenLogo from "../assets/icons/zen-logo.svg";
4
- import { getUserInfo } from "../api/dashboard.js";
4
+ import { getUserInfo } from "../api/dashboard";
5
5
 
6
6
  interface TopBarProps {
7
7
  onMenuClick?: () => void;
@@ -4,7 +4,8 @@ import dashboardIcon from "../assets/icons/dashboard.svg";
4
4
  import filesIcon from "../assets/icons/files.svg";
5
5
  import propertiesIcon from "../assets/icons/properties.svg";
6
6
  import maintenanceIcon from "../assets/icons/maintenance.svg";
7
- import { PATHS } from "../lib/routeConfig.js";
7
+ import maintenanceWorkerIcon from "../assets/icons/maintenance-worker.svg";
8
+ import { PATHS } from "../lib/routeConfig";
8
9
 
9
10
  interface NavItem {
10
11
  path: string;
@@ -17,7 +18,7 @@ const navItems: NavItem[] = [
17
18
  { path: PATHS.APPLICATIONS, icon: filesIcon, label: "Applications" },
18
19
  { path: PATHS.PROPERTIES, icon: propertiesIcon, label: "Properties" },
19
20
  { path: PATHS.MAINTENANCE_REQUESTS, icon: maintenanceIcon, label: "Maintenance Requests" },
20
- { path: PATHS.MAINTENANCE_WORKERS, icon: maintenanceIcon, label: "Maintenance Workers" },
21
+ { path: PATHS.MAINTENANCE_WORKERS, icon: maintenanceWorkerIcon, label: "Maintenance Workers" },
21
22
  ];
22
23
 
23
24
  export const VerticalNav: React.FC = () => {
@@ -44,7 +45,7 @@ export const VerticalNav: React.FC = () => {
44
45
  title={item.label}
45
46
  >
46
47
  <img src={item.icon} alt={item.label} className="w-6 h-6" />
47
- <span className="text-xs font-medium">{item.label}</span>
48
+ <span className="text-xs font-medium text-center">{item.label}</span>
48
49
  </Link>
49
50
  ))}
50
51
  </div>
@@ -1,5 +1,5 @@
1
- import type { ObjectInfoResult } from "../../features/global-search/types/objectInfo/objectInfo.js";
2
- import type { SearchableObjectConfig } from "../../lib/globalSearchConstants.js";
1
+ import type { ObjectInfoResult } from "../../features/global-search/types/objectInfo/objectInfo";
2
+ import type { SearchableObjectConfig } from "../../lib/globalSearchConstants";
3
3
  import {
4
4
  Select,
5
5
  SelectContent,
@@ -1,5 +1,5 @@
1
1
  import type { Filter } from "../../features/global-search/types/filters/filters";
2
- import { getRangeMinKey, getRangeMaxKey } from "../../lib/filterUtils.js";
2
+ import { getRangeMinKey, getRangeMaxKey } from "../../lib/filterUtils";
3
3
 
4
4
  const inputClass =
5
5
  "h-9 px-3 rounded-md border border-gray-300 bg-white text-sm focus:outline-none focus:ring-2 focus:ring-purple-500 focus:border-transparent w-20";
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
  import type { Filter } from "../../features/global-search/types/filters/filters";
3
- import { ALL_PLACEHOLDER_VALUE, MULTI_VALUE_SEP } from "../../lib/filterUtils.js";
3
+ import { ALL_PLACEHOLDER_VALUE, MULTI_VALUE_SEP } from "../../lib/filterUtils";
4
4
  import {
5
5
  Select,
6
6
  SelectContent,
@@ -1,7 +1,7 @@
1
1
  import type { Filter } from "../../features/global-search/types/filters/filters";
2
- import { FilterFieldRange } from "./FilterFieldRange.js";
3
- import { FilterFieldSelect } from "./FilterFieldSelect.js";
4
- import { FilterFieldText } from "./FilterFieldText.js";
2
+ import { FilterFieldRange } from "./FilterFieldRange";
3
+ import { FilterFieldSelect } from "./FilterFieldSelect";
4
+ import { FilterFieldText } from "./FilterFieldText";
5
5
 
6
6
  /** Compatible with feature picklist option shape (label/value). */
7
7
  interface PicklistOption {
@@ -1,10 +1,10 @@
1
1
  import type { ReactNode } from "react";
2
2
  import type { Filter } from "../../features/global-search/types/filters/filters";
3
- import { PageContainer } from "../layout/PageContainer.js";
4
- import { PageLoadingState } from "../feedback/PageLoadingState.js";
5
- import { PageErrorState } from "../feedback/PageErrorState.js";
6
- import { FilterErrorAlert } from "../feedback/FilterErrorAlert.js";
7
- import { ListPageFilterRow } from "../filters/ListPageFilterRow.js";
3
+ import { PageContainer } from "../layout/PageContainer";
4
+ import { PageLoadingState } from "../feedback/PageLoadingState";
5
+ import { PageErrorState } from "../feedback/PageErrorState";
6
+ import { FilterErrorAlert } from "../feedback/FilterErrorAlert";
7
+ import { ListPageFilterRow } from "../filters/ListPageFilterRow";
8
8
 
9
9
  /** Compatible with feature picklist option shape. */
10
10
  interface PicklistOption {
@@ -3,14 +3,14 @@ import { useSearchParams } from "react-router";
3
3
  import { useObjectListMetadata } from "../features/global-search/hooks/useObjectSearchData";
4
4
  import type { FilterCriteria } from "../features/global-search/types/filters/filters";
5
5
  import { useRecordListGraphQL } from "../features/global-search/hooks/useRecordListGraphQL";
6
- import { PAGE_SIZE_LIST } from "../lib/constants.js";
6
+ import { PAGE_SIZE_LIST } from "../lib/constants";
7
7
  import {
8
8
  buildFilterCriteriaFromFormValues,
9
9
  getDefaultFilterFormValues,
10
10
  getApplicableFilters,
11
- } from "../lib/filterUtils.js";
12
- import { useAccumulatedListPages } from "./useAccumulatedListPages.js";
13
- import type { ListPageConfig } from "../lib/listPageConfig.js";
11
+ } from "../lib/filterUtils";
12
+ import { useAccumulatedListPages } from "./useAccumulatedListPages";
13
+ import type { ListPageConfig } from "../lib/listPageConfig";
14
14
 
15
15
  /** Picklist option shape from useObjectListMetadata (label/value). */
16
16
  export interface PicklistOption {
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Adapter: maps Application__c GraphQL node to app Application type.
3
3
  */
4
- import type { Application } from "./types.js";
4
+ import type { Application } from "./types";
5
5
 
6
6
  interface ApplicationNode {
7
7
  Id?: string;
@@ -2,7 +2,7 @@
2
2
  * Maps Salesforce API field paths (from getObjectListFilters) to our app record properties.
3
3
  * Used by applyFilterCriteria when filtering list data with FilterCriteria from the feature API.
4
4
  */
5
- import type { Property, MaintenanceRequest, Application } from "./types.js";
5
+ import type { Property, MaintenanceRequest, Application } from "./types";
6
6
 
7
7
  const PROPERTY_FIELD_MAP: Record<string, (p: Property) => string | number | undefined> = {
8
8
  Name: (p) => p.name,
@@ -7,7 +7,7 @@ import {
7
7
  FALLBACK_LABEL_MAINTENANCE_PLURAL,
8
8
  FALLBACK_LABEL_MAINTENANCE_WORKERS_PLURAL,
9
9
  FALLBACK_LABEL_APPLICATIONS_PLURAL,
10
- } from "./constants.js";
10
+ } from "./constants";
11
11
 
12
12
  export const GLOBAL_SEARCH_OBJECT_API_NAME = "Property__c" as const;
13
13
  export const MAINTENANCE_OBJECT_API_NAME = "Maintenance_Request__c" as const;