@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.
- package/dist/CHANGELOG.md +16 -0
- package/dist/force-app/main/default/classes/MaintenanceRequestTriggerHandler.cls +66 -0
- package/dist/force-app/main/default/classes/MaintenanceRequestTriggerHandler.cls-meta.xml +5 -0
- package/dist/force-app/main/default/classes/MaintenanceRequestTriggerHandler_Test.cls +308 -0
- package/dist/force-app/main/default/classes/MaintenanceRequestTriggerHandler_Test.cls-meta.xml +5 -0
- package/dist/force-app/main/default/objects/Application__c/fields/Status__c.field-meta.xml +5 -0
- package/dist/force-app/main/default/objects/Maintenance_Request__c/fields/Assigned_Worker__c.field-meta.xml +15 -0
- package/dist/force-app/main/default/permissionsets/Property_Management_Access.permissionset-meta.xml +5 -52
- package/dist/force-app/main/default/triggers/MaintenanceRequestTrigger.trigger +5 -0
- package/dist/force-app/main/default/triggers/MaintenanceRequestTrigger.trigger-meta.xml +5 -0
- package/dist/force-app/main/default/webapplications/appreactsampleb2e/package.json +4 -4
- package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/api/applications.ts +3 -3
- package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/api/dashboard.ts +1 -1
- package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/api/graphql-operations-types.ts +161 -13
- package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/api/maintenance.ts +11 -9
- package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/api/maintenanceWorkers.ts +2 -2
- package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/api/properties.ts +1 -1
- package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/appLayout.tsx +2 -2
- package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/assets/icons/maintenance-worker.svg +8 -0
- package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/components/ApplicationCard.tsx +1 -1
- package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/components/ApplicationDetailsModal.tsx +1 -1
- package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/components/ApplicationsTable.tsx +1 -1
- package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/components/IssuesDonutChart.tsx +23 -3
- package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/components/ListPageFilters.tsx +1 -1
- package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/components/MaintenanceDetailsModal.tsx +6 -6
- package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/components/MaintenanceRequestCard.tsx +1 -1
- package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/components/MaintenanceTable.tsx +2 -2
- package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/components/PropertyCard.tsx +1 -1
- package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/components/PropertyDetailsModal.tsx +1 -1
- package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/components/TopBar.tsx +1 -1
- package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/components/VerticalNav.tsx +4 -3
- package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/components/dashboard/GlobalSearchBar.tsx +2 -2
- package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/components/filters/FilterFieldRange.tsx +1 -1
- package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/components/filters/FilterFieldSelect.tsx +1 -1
- package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/components/filters/ListPageFilterRow.tsx +3 -3
- package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/components/list/ListPageWithFilters.tsx +5 -5
- package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/hooks/useListPage.ts +4 -4
- package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/lib/applicationAdapter.ts +1 -1
- package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/lib/fieldMappers.ts +1 -1
- package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/lib/globalSearchConstants.ts +1 -1
- package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/lib/listPageConfig.ts +9 -9
- package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/lib/maintenanceAdapter.ts +8 -4
- package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/lib/maintenanceColumns.ts +12 -0
- package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/lib/maintenanceWorkerAdapter.ts +1 -1
- package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/lib/propertyAdapter.ts +1 -1
- package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/pages/Applications.tsx +8 -8
- package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/pages/Home.tsx +19 -20
- package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/pages/Maintenance.tsx +9 -9
- package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/pages/MaintenanceWorkers.tsx +51 -10
- package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/pages/Properties.tsx +15 -15
- package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/routes.tsx +1 -1
- package/dist/package.json +1 -1
- 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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
307
|
+
User__r?: { Name?: { value?: string | null } | null } | null;
|
|
308
|
+
Assigned_Worker__r?: {
|
|
257
309
|
Name?: { value?: string | null } | null;
|
|
258
|
-
|
|
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?:
|
|
316
|
-
Pet_Friendly__c?: { value?:
|
|
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?:
|
|
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
|
+
};
|
package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/api/maintenance.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getDataSDK, gql } from "@salesforce/sdk-data";
|
|
2
|
-
import type { MaintenanceRequest } from "../lib/types
|
|
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
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
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
|
|
245
|
-
const assignedWorkerName = node.
|
|
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
|
|
262
|
+
assignedWorkerOrg,
|
|
261
263
|
formattedDate,
|
|
262
264
|
};
|
|
263
265
|
}
|
package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/api/maintenanceWorkers.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { MaintenanceWorker } from "../lib/types
|
|
2
|
-
import { getAllMaintenanceRequests } from "./maintenance
|
|
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
|
|
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
|
|
3
|
-
import { VerticalNav } from "./components/VerticalNav
|
|
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
|
|
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
|
|
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 { 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
|
|
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
|
|
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
|
|
5
|
-
import type { MaintenanceRequest } from "../lib/types
|
|
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
|
-
//
|
|
25
|
-
const isStatusEditable = request.status
|
|
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
|
|
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
|
|
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
|
|
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";
|
package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/components/TopBar.tsx
CHANGED
|
@@ -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
|
|
4
|
+
import { getUserInfo } from "../api/dashboard";
|
|
5
5
|
|
|
6
6
|
interface TopBarProps {
|
|
7
7
|
onMenuClick?: () => void;
|
package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/components/VerticalNav.tsx
CHANGED
|
@@ -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
|
|
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:
|
|
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
|
|
2
|
-
import type { SearchableObjectConfig } from "../../lib/globalSearchConstants
|
|
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
|
|
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
|
|
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
|
|
3
|
-
import { FilterFieldSelect } from "./FilterFieldSelect
|
|
4
|
-
import { FilterFieldText } from "./FilterFieldText
|
|
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
|
|
4
|
-
import { PageLoadingState } from "../feedback/PageLoadingState
|
|
5
|
-
import { PageErrorState } from "../feedback/PageErrorState
|
|
6
|
-
import { FilterErrorAlert } from "../feedback/FilterErrorAlert
|
|
7
|
-
import { ListPageFilterRow } from "../filters/ListPageFilterRow
|
|
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 {
|
package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/hooks/useListPage.ts
CHANGED
|
@@ -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
|
|
6
|
+
import { PAGE_SIZE_LIST } from "../lib/constants";
|
|
7
7
|
import {
|
|
8
8
|
buildFilterCriteriaFromFormValues,
|
|
9
9
|
getDefaultFilterFormValues,
|
|
10
10
|
getApplicableFilters,
|
|
11
|
-
} from "../lib/filterUtils
|
|
12
|
-
import { useAccumulatedListPages } from "./useAccumulatedListPages
|
|
13
|
-
import type { ListPageConfig } from "../lib/listPageConfig
|
|
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 {
|
package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/lib/fieldMappers.ts
CHANGED
|
@@ -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
|
|
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
|
|
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;
|