@salesforce/webapp-template-app-react-sample-b2x-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 (21) 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/appreactsampleb2x/package.json +3 -3
  12. package/dist/force-app/main/default/webapplications/appreactsampleb2x/src/api/maintenanceRequestApi.ts +1 -1
  13. package/dist/force-app/main/default/webapplications/appreactsampleb2x/src/api/propertyDetailGraphQL.ts +1 -1
  14. package/dist/force-app/main/default/webapplications/appreactsampleb2x/src/api/propertyListingGraphQL.ts +2 -2
  15. package/dist/force-app/main/default/webapplications/appreactsampleb2x/src/components/PropertyListingCard.tsx +1 -1
  16. package/dist/force-app/main/default/webapplications/appreactsampleb2x/src/hooks/usePropertyAddresses.ts +1 -1
  17. package/dist/force-app/main/default/webapplications/appreactsampleb2x/src/hooks/usePropertyListingSearch.ts +1 -1
  18. package/dist/force-app/main/default/webapplications/appreactsampleb2x/src/hooks/usePropertyMapMarkers.ts +1 -1
  19. package/dist/force-app/main/default/webapplications/appreactsampleb2x/src/hooks/usePropertyPrimaryImages.ts +1 -1
  20. package/dist/package.json +1 -1
  21. package/package.json +1 -1
package/dist/CHANGELOG.md CHANGED
@@ -3,6 +3,22 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [1.82.0](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.81.0...v1.82.0) (2026-03-09)
7
+
8
+ **Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
9
+
10
+
11
+
12
+
13
+
14
+ # [1.81.0](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.80.1...v1.81.0) (2026-03-09)
15
+
16
+ **Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
17
+
18
+
19
+
20
+
21
+
6
22
  ## [1.80.1](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.80.0...v1.80.1) (2026-03-09)
7
23
 
8
24
  **Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
@@ -0,0 +1,66 @@
1
+ public with sharing class MaintenanceRequestTriggerHandler {
2
+
3
+ /**
4
+ * Handles before insert logic for Maintenance Request records
5
+ * Automatically assigns workers based on request type and updates status to Assigned
6
+ */
7
+ public static void handleBeforeInsert(List<Maintenance_Request__c> newRequests) {
8
+ // Map to store request type to worker type mappings
9
+ Map<String, String> requestTypeToWorkerType = new Map<String, String>{
10
+ 'Plumbing' => 'Plumbing',
11
+ 'Electrical' => 'Electrical',
12
+ 'HVAC' => 'HVAC (Heating & Cooling)',
13
+ 'Appliance' => 'Appliance Repair',
14
+ 'Pest' => 'Pest Control'
15
+ };
16
+
17
+ // Collect unique worker types needed
18
+ Set<String> workerTypesNeeded = new Set<String>();
19
+ for (Maintenance_Request__c request : newRequests) {
20
+ if (request.Type__c != null && requestTypeToWorkerType.containsKey(request.Type__c)) {
21
+ workerTypesNeeded.add(requestTypeToWorkerType.get(request.Type__c));
22
+ }
23
+ }
24
+
25
+ // Query for available workers by type
26
+ Map<String, List<Maintenance_Worker__c>> workersByType = new Map<String, List<Maintenance_Worker__c>>();
27
+ if (!workerTypesNeeded.isEmpty()) {
28
+ for (Maintenance_Worker__c worker : [
29
+ SELECT Id, Name, Type__c, Rating__c
30
+ FROM Maintenance_Worker__c
31
+ WHERE Type__c IN :workerTypesNeeded
32
+ AND IsActive__c = true
33
+ ORDER BY Rating__c DESC NULLS LAST, Name ASC
34
+ ]) {
35
+ if (!workersByType.containsKey(worker.Type__c)) {
36
+ workersByType.put(worker.Type__c, new List<Maintenance_Worker__c>());
37
+ }
38
+ workersByType.get(worker.Type__c).add(worker);
39
+ }
40
+ }
41
+
42
+ // Assign workers to requests
43
+ for (Maintenance_Request__c request : newRequests) {
44
+ // Only process requests with 'New' status (or null, since 'New' is the default)
45
+ if ((request.Status__c == 'New' || request.Status__c == null) &&
46
+ request.Type__c != null && requestTypeToWorkerType.containsKey(request.Type__c)) {
47
+ String workerType = requestTypeToWorkerType.get(request.Type__c);
48
+
49
+ // Check if we have available workers for this type
50
+ if (workersByType.containsKey(workerType) && !workersByType.get(workerType).isEmpty()) {
51
+ // Assign the first available worker (highest rated)
52
+ Maintenance_Worker__c assignedWorker = workersByType.get(workerType).get(0);
53
+ request.Assigned_Worker__c = assignedWorker.Id;
54
+ request.Status__c = 'Assigned';
55
+
56
+ // Set scheduled date to 3 days from now
57
+ request.Scheduled__c = DateTime.now().addDays(3);
58
+
59
+ // Rotate worker to end of list for round-robin assignment
60
+ workersByType.get(workerType).remove(0);
61
+ workersByType.get(workerType).add(assignedWorker);
62
+ }
63
+ }
64
+ }
65
+ }
66
+ }
@@ -0,0 +1,5 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
3
+ <apiVersion>65.0</apiVersion>
4
+ <status>Active</status>
5
+ </ApexClass>
@@ -0,0 +1,308 @@
1
+ /**
2
+ * Test class for MaintenanceRequestTriggerHandler
3
+ * Validates automatic worker assignment, status updates to Assigned, and scheduled date setting
4
+ */
5
+ @isTest
6
+ private class MaintenanceRequestTriggerHandler_Test {
7
+
8
+ /**
9
+ * Setup test data for all test methods
10
+ */
11
+ @testSetup
12
+ static void setupTestData() {
13
+ // Create test maintenance workers with different specialties
14
+ List<Maintenance_Worker__c> workers = new List<Maintenance_Worker__c>{
15
+ new Maintenance_Worker__c(
16
+ Name = 'John Plumber',
17
+ Type__c = 'Plumbing',
18
+ IsActive__c = true,
19
+ Rating__c = 4.5,
20
+ Phone__c = '555-0001'
21
+ ),
22
+ new Maintenance_Worker__c(
23
+ Name = 'Jane Electrician',
24
+ Type__c = 'Electrical',
25
+ IsActive__c = true,
26
+ Rating__c = 4.8,
27
+ Phone__c = '555-0002'
28
+ ),
29
+ new Maintenance_Worker__c(
30
+ Name = 'Bob HVAC',
31
+ Type__c = 'HVAC (Heating & Cooling)',
32
+ IsActive__c = true,
33
+ Rating__c = 4.2,
34
+ Phone__c = '555-0003'
35
+ ),
36
+ new Maintenance_Worker__c(
37
+ Name = 'Alice Appliance',
38
+ Type__c = 'Appliance Repair',
39
+ IsActive__c = true,
40
+ Rating__c = 4.7,
41
+ Phone__c = '555-0004'
42
+ ),
43
+ new Maintenance_Worker__c(
44
+ Name = 'Charlie Pest',
45
+ Type__c = 'Pest Control',
46
+ IsActive__c = true,
47
+ Rating__c = 4.3,
48
+ Phone__c = '555-0005'
49
+ ),
50
+ new Maintenance_Worker__c(
51
+ Name = 'Inactive Worker',
52
+ Type__c = 'Plumbing',
53
+ IsActive__c = false,
54
+ Rating__c = 5.0,
55
+ Phone__c = '555-0006'
56
+ )
57
+ };
58
+ insert workers;
59
+ }
60
+
61
+ /**
62
+ * Test that plumbing requests are assigned to plumbing workers
63
+ */
64
+ @isTest
65
+ static void testPlumbingRequestAssignment() {
66
+ // Query for plumbing worker
67
+ Maintenance_Worker__c plumber = [SELECT Id FROM Maintenance_Worker__c WHERE Type__c = 'Plumbing' AND IsActive__c = true LIMIT 1];
68
+
69
+ Test.startTest();
70
+ Maintenance_Request__c request = new Maintenance_Request__c(
71
+ Type__c = 'Plumbing',
72
+ Description__c = 'Leaky faucet in bathroom',
73
+ Priority__c = 'Standard'
74
+ );
75
+ insert request;
76
+ Test.stopTest();
77
+
78
+ // Verify assignment
79
+ Maintenance_Request__c insertedRequest = [
80
+ SELECT Id, Assigned_Worker__c, Status__c, Scheduled__c, Type__c
81
+ FROM Maintenance_Request__c
82
+ WHERE Id = :request.Id
83
+ ];
84
+
85
+ System.assertEquals(plumber.Id, insertedRequest.Assigned_Worker__c, 'Worker should be assigned');
86
+ System.assertEquals('Assigned', insertedRequest.Status__c, 'Status should be Assigned');
87
+ System.assertNotEquals(null, insertedRequest.Scheduled__c, 'Scheduled date should be set');
88
+
89
+ // Verify scheduled date is approximately 3 days from now (within 1 minute tolerance)
90
+ DateTime expectedDate = DateTime.now().addDays(3);
91
+ Long timeDiff = Math.abs(insertedRequest.Scheduled__c.getTime() - expectedDate.getTime());
92
+ System.assert(timeDiff < 60000, 'Scheduled date should be 3 days from now');
93
+ }
94
+
95
+ /**
96
+ * Test that electrical requests are assigned to electrical workers
97
+ */
98
+ @isTest
99
+ static void testElectricalRequestAssignment() {
100
+ Maintenance_Worker__c electrician = [SELECT Id FROM Maintenance_Worker__c WHERE Type__c = 'Electrical' AND IsActive__c = true LIMIT 1];
101
+
102
+ Test.startTest();
103
+ Maintenance_Request__c request = new Maintenance_Request__c(
104
+ Type__c = 'Electrical',
105
+ Description__c = 'Outlet not working',
106
+ Priority__c = 'High (Same Day)'
107
+ );
108
+ insert request;
109
+ Test.stopTest();
110
+
111
+ Maintenance_Request__c insertedRequest = [
112
+ SELECT Id, Assigned_Worker__c, Status__c
113
+ FROM Maintenance_Request__c
114
+ WHERE Id = :request.Id
115
+ ];
116
+
117
+ System.assertEquals(electrician.Id, insertedRequest.Assigned_Worker__c, 'Electrician should be assigned');
118
+ System.assertEquals('Assigned', insertedRequest.Status__c, 'Status should be Assigned');
119
+ }
120
+
121
+ /**
122
+ * Test that HVAC requests are assigned to HVAC workers
123
+ */
124
+ @isTest
125
+ static void testHVACRequestAssignment() {
126
+ Maintenance_Worker__c hvacWorker = [SELECT Id FROM Maintenance_Worker__c WHERE Type__c = 'HVAC (Heating & Cooling)' AND IsActive__c = true LIMIT 1];
127
+
128
+ Test.startTest();
129
+ Maintenance_Request__c request = new Maintenance_Request__c(
130
+ Type__c = 'HVAC',
131
+ Description__c = 'AC not cooling',
132
+ Priority__c = 'High (Same Day)'
133
+ );
134
+ insert request;
135
+ Test.stopTest();
136
+
137
+ Maintenance_Request__c insertedRequest = [
138
+ SELECT Id, Assigned_Worker__c, Status__c
139
+ FROM Maintenance_Request__c
140
+ WHERE Id = :request.Id
141
+ ];
142
+
143
+ System.assertEquals(hvacWorker.Id, insertedRequest.Assigned_Worker__c, 'HVAC worker should be assigned');
144
+ System.assertEquals('Assigned', insertedRequest.Status__c, 'Status should be Assigned');
145
+ }
146
+
147
+ /**
148
+ * Test that appliance requests are assigned to appliance repair workers
149
+ */
150
+ @isTest
151
+ static void testApplianceRequestAssignment() {
152
+ Maintenance_Worker__c applianceWorker = [SELECT Id FROM Maintenance_Worker__c WHERE Type__c = 'Appliance Repair' AND IsActive__c = true LIMIT 1];
153
+
154
+ Test.startTest();
155
+ Maintenance_Request__c request = new Maintenance_Request__c(
156
+ Type__c = 'Appliance',
157
+ Description__c = 'Dishwasher not draining',
158
+ Priority__c = 'Standard'
159
+ );
160
+ insert request;
161
+ Test.stopTest();
162
+
163
+ Maintenance_Request__c insertedRequest = [
164
+ SELECT Id, Assigned_Worker__c, Status__c
165
+ FROM Maintenance_Request__c
166
+ WHERE Id = :request.Id
167
+ ];
168
+
169
+ System.assertEquals(applianceWorker.Id, insertedRequest.Assigned_Worker__c, 'Appliance worker should be assigned');
170
+ System.assertEquals('Assigned', insertedRequest.Status__c, 'Status should be Assigned');
171
+ }
172
+
173
+ /**
174
+ * Test that pest requests are assigned to pest control workers
175
+ */
176
+ @isTest
177
+ static void testPestRequestAssignment() {
178
+ Maintenance_Worker__c pestWorker = [SELECT Id FROM Maintenance_Worker__c WHERE Type__c = 'Pest Control' AND IsActive__c = true LIMIT 1];
179
+
180
+ Test.startTest();
181
+ Maintenance_Request__c request = new Maintenance_Request__c(
182
+ Type__c = 'Pest',
183
+ Description__c = 'Ants in kitchen',
184
+ Priority__c = 'Standard'
185
+ );
186
+ insert request;
187
+ Test.stopTest();
188
+
189
+ Maintenance_Request__c insertedRequest = [
190
+ SELECT Id, Assigned_Worker__c, Status__c
191
+ FROM Maintenance_Request__c
192
+ WHERE Id = :request.Id
193
+ ];
194
+
195
+ System.assertEquals(pestWorker.Id, insertedRequest.Assigned_Worker__c, 'Pest control worker should be assigned');
196
+ System.assertEquals('Assigned', insertedRequest.Status__c, 'Status should be Assigned');
197
+ }
198
+
199
+ /**
200
+ * Test bulk insert with multiple request types
201
+ */
202
+ @isTest
203
+ static void testBulkRequestAssignment() {
204
+ Test.startTest();
205
+ List<Maintenance_Request__c> requests = new List<Maintenance_Request__c>{
206
+ new Maintenance_Request__c(Type__c = 'Plumbing', Description__c = 'Leak 1', Priority__c = 'High (Same Day)'),
207
+ new Maintenance_Request__c(Type__c = 'Electrical', Description__c = 'Issue 1', Priority__c = 'Standard'),
208
+ new Maintenance_Request__c(Type__c = 'Plumbing', Description__c = 'Leak 2', Priority__c = 'Standard'),
209
+ new Maintenance_Request__c(Type__c = 'HVAC', Description__c = 'AC Issue', Priority__c = 'High (Same Day)'),
210
+ new Maintenance_Request__c(Type__c = 'Appliance', Description__c = 'Fridge Issue', Priority__c = 'Standard')
211
+ };
212
+ insert requests;
213
+ Test.stopTest();
214
+
215
+ List<Maintenance_Request__c> insertedRequests = [
216
+ SELECT Id, Assigned_Worker__c, Status__c, Type__c
217
+ FROM Maintenance_Request__c
218
+ WHERE Id IN :requests
219
+ ];
220
+
221
+ // Verify all requests were assigned
222
+ for (Maintenance_Request__c req : insertedRequests) {
223
+ System.assertNotEquals(null, req.Assigned_Worker__c, 'All requests should have assigned workers');
224
+ System.assertEquals('Assigned', req.Status__c, 'All requests should be Assigned');
225
+ }
226
+
227
+ System.assertEquals(5, insertedRequests.size(), 'All 5 requests should be inserted');
228
+ }
229
+
230
+ /**
231
+ * Test that requests without type are not assigned
232
+ */
233
+ @isTest
234
+ static void testRequestWithoutType() {
235
+ Test.startTest();
236
+ Maintenance_Request__c request = new Maintenance_Request__c(
237
+ Description__c = 'General maintenance',
238
+ Priority__c = 'Standard'
239
+ );
240
+ insert request;
241
+ Test.stopTest();
242
+
243
+ Maintenance_Request__c insertedRequest = [
244
+ SELECT Id, Assigned_Worker__c, Status__c
245
+ FROM Maintenance_Request__c
246
+ WHERE Id = :request.Id
247
+ ];
248
+
249
+ System.assertEquals(null, insertedRequest.Assigned_Worker__c, 'Worker should not be assigned without type');
250
+ }
251
+
252
+ /**
253
+ * Test that inactive workers are not assigned
254
+ */
255
+ @isTest
256
+ static void testInactiveWorkerNotAssigned() {
257
+ // Delete all active plumbing workers
258
+ delete [SELECT Id FROM Maintenance_Worker__c WHERE Type__c = 'Plumbing' AND IsActive__c = true];
259
+
260
+ Test.startTest();
261
+ Maintenance_Request__c request = new Maintenance_Request__c(
262
+ Type__c = 'Plumbing',
263
+ Description__c = 'Emergency leak',
264
+ Priority__c = 'High (Same Day)'
265
+ );
266
+ insert request;
267
+ Test.stopTest();
268
+
269
+ Maintenance_Request__c insertedRequest = [
270
+ SELECT Id, Assigned_Worker__c, Status__c
271
+ FROM Maintenance_Request__c
272
+ WHERE Id = :request.Id
273
+ ];
274
+
275
+ System.assertEquals(null, insertedRequest.Assigned_Worker__c, 'Inactive worker should not be assigned');
276
+ }
277
+
278
+ /**
279
+ * Test that requests with non-New status are not automatically processed
280
+ */
281
+ @isTest
282
+ static void testNonNewStatusNotProcessed() {
283
+ // Query for plumbing worker
284
+ Maintenance_Worker__c plumber = [SELECT Id FROM Maintenance_Worker__c WHERE Type__c = 'Plumbing' AND IsActive__c = true LIMIT 1];
285
+
286
+ Test.startTest();
287
+ // Create a request with status explicitly set to 'In Progress'
288
+ Maintenance_Request__c request = new Maintenance_Request__c(
289
+ Type__c = 'Plumbing',
290
+ Description__c = 'Manually assigned request',
291
+ Priority__c = 'Standard',
292
+ Status__c = 'In Progress'
293
+ );
294
+ insert request;
295
+ Test.stopTest();
296
+
297
+ // Verify the request was not processed by trigger (no worker assigned)
298
+ Maintenance_Request__c insertedRequest = [
299
+ SELECT Id, Assigned_Worker__c, Status__c, Scheduled__c
300
+ FROM Maintenance_Request__c
301
+ WHERE Id = :request.Id
302
+ ];
303
+
304
+ System.assertEquals(null, insertedRequest.Assigned_Worker__c, 'Worker should not be auto-assigned for non-New status');
305
+ System.assertEquals('In Progress', insertedRequest.Status__c, 'Status should remain as originally set');
306
+ System.assertEquals(null, insertedRequest.Scheduled__c, 'Scheduled date should not be set by trigger');
307
+ }
308
+ }
@@ -0,0 +1,5 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
3
+ <apiVersion>65.0</apiVersion>
4
+ <status>Active</status>
5
+ </ApexClass>
@@ -27,6 +27,11 @@
27
27
  <default>false</default>
28
28
  <label>Background Check</label>
29
29
  </value>
30
+ <value>
31
+ <fullName>Under Review</fullName>
32
+ <default>false</default>
33
+ <label>Under Review</label>
34
+ </value>
30
35
  <value>
31
36
  <fullName>Approved</fullName>
32
37
  <default>false</default>
@@ -0,0 +1,15 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
3
+ <fullName>Assigned_Worker__c</fullName>
4
+ <deleteConstraint>SetNull</deleteConstraint>
5
+ <description>The maintenance worker assigned to handle this request</description>
6
+ <externalId>false</externalId>
7
+ <label>Assigned Worker</label>
8
+ <referenceTo>Maintenance_Worker__c</referenceTo>
9
+ <relationshipLabel>Maintenance Requests</relationshipLabel>
10
+ <relationshipName>Maintenance_Requests</relationshipName>
11
+ <required>false</required>
12
+ <trackHistory>true</trackHistory>
13
+ <trackTrending>false</trackTrending>
14
+ <type>Lookup</type>
15
+ </CustomField>
@@ -272,6 +272,11 @@
272
272
  <field>Maintenance_Request__c.Tenant_Home__c</field>
273
273
  <readable>true</readable>
274
274
  </fieldPermissions>
275
+ <fieldPermissions>
276
+ <editable>true</editable>
277
+ <field>Maintenance_Request__c.Assigned_Worker__c</field>
278
+ <readable>true</readable>
279
+ </fieldPermissions>
275
280
 
276
281
  <!-- Field Permissions: Maintenance_Worker__c -->
277
282
  <fieldPermissions>
@@ -363,12 +368,6 @@
363
368
  <readable>true</readable>
364
369
  </fieldPermissions>
365
370
 
366
- <!-- Tab Visibility -->
367
- <tabSettings>
368
- <tab>Property__c</tab>
369
- <visibility>Visible</visibility>
370
- </tabSettings>
371
-
372
371
  <fieldPermissions>
373
372
  <editable>true</editable>
374
373
  <field>Agent__c.License_Expiry__c</field>
@@ -633,50 +632,4 @@
633
632
  <field>Tenant__c.Status__c</field>
634
633
  <readable>true</readable>
635
634
  </fieldPermissions>
636
-
637
- <!-- Tab Settings -->
638
- <tabSettings>
639
- <tab>Application__c</tab>
640
- <visibility>Visible</visibility>
641
- </tabSettings>
642
- <tabSettings>
643
- <tab>KPI_Snapshot__c</tab>
644
- <visibility>Visible</visibility>
645
- </tabSettings>
646
- <tabSettings>
647
- <tab>Lease__c</tab>
648
- <visibility>Visible</visibility>
649
- </tabSettings>
650
- <tabSettings>
651
- <tab>Maintenance_Request__c</tab>
652
- <visibility>Visible</visibility>
653
- </tabSettings>
654
- <tabSettings>
655
- <tab>Maintenance_Worker__c</tab>
656
- <visibility>Visible</visibility>
657
- </tabSettings>
658
- <tabSettings>
659
- <tab>Notification__c</tab>
660
- <visibility>Visible</visibility>
661
- </tabSettings>
662
- <tabSettings>
663
- <tab>Payment__c</tab>
664
- <visibility>Visible</visibility>
665
- </tabSettings>
666
- <tabSettings>
667
- <tab>Property__c</tab>
668
- <visibility>Visible</visibility>
669
- </tabSettings>
670
- <tabSettings>
671
- <tab>Property_Owner__c</tab>
672
- <visibility>Visible</visibility>
673
- </tabSettings>
674
- <tabSettings>
675
- <tab>Property_Sale__c</tab>
676
- <visibility>Visible</visibility>
677
- </tabSettings>
678
- <tabSettings>
679
- <tab>Tenant__c</tab>
680
- <visibility>Visible</visibility>
681
- </tabSettings>
682
635
  </PermissionSet>
@@ -0,0 +1,5 @@
1
+ trigger MaintenanceRequestTrigger on Maintenance_Request__c (before insert) {
2
+ if (Trigger.isBefore && Trigger.isInsert) {
3
+ MaintenanceRequestTriggerHandler.handleBeforeInsert(Trigger.new);
4
+ }
5
+ }
@@ -0,0 +1,5 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <ApexTrigger xmlns="http://soap.sforce.com/2006/04/metadata">
3
+ <apiVersion>65.0</apiVersion>
4
+ <status>Active</status>
5
+ </ApexTrigger>
@@ -15,8 +15,8 @@
15
15
  "graphql:schema": "node scripts/get-graphql-schema.mjs"
16
16
  },
17
17
  "dependencies": {
18
- "@salesforce/sdk-data": "^1.80.1",
19
- "@salesforce/webapp-experimental": "^1.80.1",
18
+ "@salesforce/sdk-data": "^1.82.0",
19
+ "@salesforce/webapp-experimental": "^1.82.0",
20
20
  "@tailwindcss/vite": "^4.1.17",
21
21
  "@tanstack/react-form": "^1.28.4",
22
22
  "@types/leaflet": "^1.9.21",
@@ -43,7 +43,7 @@
43
43
  "@graphql-eslint/eslint-plugin": "^4.1.0",
44
44
  "@graphql-tools/utils": "^11.0.0",
45
45
  "@playwright/test": "^1.49.0",
46
- "@salesforce/vite-plugin-webapp-experimental": "^1.80.1",
46
+ "@salesforce/vite-plugin-webapp-experimental": "^1.82.0",
47
47
  "@testing-library/jest-dom": "^6.6.3",
48
48
  "@testing-library/react": "^16.1.0",
49
49
  "@testing-library/user-event": "^14.5.2",
@@ -2,7 +2,7 @@
2
2
  * Maintenance_Request__c: list via GraphQL, create via createRecord.
3
3
  */
4
4
  import { createRecord } from "@salesforce/webapp-experimental/api";
5
- import { executeGraphQL } from "./graphqlClient.js";
5
+ import { executeGraphQL } from "./graphqlClient";
6
6
 
7
7
  const OBJECT_API_NAME = "Maintenance_Request__c";
8
8
 
@@ -2,7 +2,7 @@
2
2
  * GraphQL queries for Property_Listing__c detail and related Property__c data:
3
3
  * Property_Image__c, Property_Cost__c, Property_Feature__c.
4
4
  */
5
- import { executeGraphQL } from "./graphqlClient.js";
5
+ import { executeGraphQL } from "./graphqlClient";
6
6
 
7
7
  // ---- Listing by Id ----
8
8
  const LISTING_QUERY = /* GraphQL */ `
@@ -2,12 +2,12 @@
2
2
  * Property Listing search via Salesforce GraphQL.
3
3
  * Replaces REST keyword search with uiapi.query.Property_Listing__c.
4
4
  */
5
- import { executeGraphQL } from "./graphqlClient.js";
5
+ import { executeGraphQL } from "./graphqlClient";
6
6
  import type {
7
7
  SearchResultRecord,
8
8
  SearchResultRecordData,
9
9
  FieldValue,
10
- } from "../features/global-search/types/search/searchResults.js";
10
+ } from "../features/global-search/types/search/searchResults";
11
11
 
12
12
  const OBJECT_API_NAME = "Property_Listing__c";
13
13
 
@@ -4,7 +4,7 @@
4
4
  import { useNavigate } from "react-router";
5
5
  import { useCallback, useState } from "react";
6
6
  import { Button } from "./ui/button";
7
- import type { SearchResultRecordData } from "../features/global-search/types/search/searchResults.js";
7
+ import type { SearchResultRecordData } from "../features/global-search/types/search/searchResults";
8
8
  import { Heart } from "lucide-react";
9
9
 
10
10
  function fieldDisplay(
@@ -5,7 +5,7 @@
5
5
  import { useState, useEffect } from "react";
6
6
  import { fetchPropertyAddresses } from "@/api/propertyDetailGraphQL";
7
7
  import { getPropertyIdFromRecord } from "./usePropertyPrimaryImages";
8
- import type { SearchResultRecord } from "../features/global-search/types/search/searchResults.js";
8
+ import type { SearchResultRecord } from "../features/global-search/types/search/searchResults";
9
9
 
10
10
  export function usePropertyAddresses(results: SearchResultRecord[]): Record<string, string> {
11
11
  const [map, setMap] = useState<Record<string, string>>({});
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import { useState, useEffect, useRef, useCallback } from "react";
5
5
  import { queryPropertyListingsGraphQL } from "@/api/propertyListingGraphQL";
6
- import type { SearchResultRecord } from "../features/global-search/types/search/searchResults.js";
6
+ import type { SearchResultRecord } from "../features/global-search/types/search/searchResults";
7
7
 
8
8
  export function usePropertyListingSearch(searchQuery: string, pageSize: number, pageToken: string) {
9
9
  const [results, setResults] = useState<SearchResultRecord[]>([]);
@@ -6,7 +6,7 @@ import { useState, useEffect } from "react";
6
6
  import { fetchPropertyAddresses } from "@/api/propertyDetailGraphQL";
7
7
  import { geocodeAddress } from "@/utils/geocode";
8
8
  import { getPropertyIdFromRecord } from "./usePropertyPrimaryImages";
9
- import type { SearchResultRecord } from "../features/global-search/types/search/searchResults.js";
9
+ import type { SearchResultRecord } from "../features/global-search/types/search/searchResults";
10
10
  import type { MapMarker } from "@/components/PropertyMap";
11
11
 
12
12
  function getListingName(record: {
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import { useState, useEffect } from "react";
6
6
  import { fetchPrimaryImagesByPropertyIds } from "@/api/propertyDetailGraphQL";
7
- import type { SearchResultRecord } from "../features/global-search/types/search/searchResults.js";
7
+ import type { SearchResultRecord } from "../features/global-search/types/search/searchResults";
8
8
 
9
9
  export function getPropertyIdFromRecord(record: {
10
10
  fields?: Record<string, { value?: unknown }>;
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/webapp-template-base-sfdx-project-experimental",
3
- "version": "1.80.1",
3
+ "version": "1.82.0",
4
4
  "description": "Base SFDX project template",
5
5
  "private": true,
6
6
  "files": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/webapp-template-app-react-sample-b2x-experimental",
3
- "version": "1.80.1",
3
+ "version": "1.82.0",
4
4
  "description": "B2C sample app template with app shell",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "author": "",