@salesforce/webapp-template-app-react-sample-b2x-experimental 1.116.9 → 1.116.10
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 +8 -0
- package/dist/force-app/main/default/classes/MaintenanceRequestTriggerHandler.cls +9 -6
- package/dist/force-app/main/default/classes/TenantTriggerHandler.cls +8 -0
- package/dist/force-app/main/default/classes/TenantTriggerHandler_Test.cls +4 -0
- package/dist/force-app/main/default/objects/Maintenance_Request__c/fields/Type__c.field-meta.xml +20 -0
- package/dist/force-app/main/default/webapplications/propertyrentalapp/package.json +3 -3
- package/dist/force-app/main/default/webapplications/propertyrentalapp/src/api/graphql-operations-types.ts +1329 -14589
- package/dist/force-app/main/default/webapplications/propertyrentalapp/src/api/query/tenantAccess.graphql +13 -0
- package/dist/force-app/main/default/webapplications/propertyrentalapp/src/api/tenantApi.ts +12 -0
- package/dist/force-app/main/default/webapplications/propertyrentalapp/src/components/layout/VerticalNav.tsx +13 -3
- package/dist/force-app/main/default/webapplications/propertyrentalapp/src/features/authentication/layouts/TenantRoute.tsx +22 -0
- package/dist/force-app/main/default/webapplications/propertyrentalapp/src/hooks/useTenantAccess.ts +38 -0
- package/dist/force-app/main/default/webapplications/propertyrentalapp/src/pages/Maintenance.tsx +13 -13
- package/dist/force-app/main/default/webapplications/propertyrentalapp/src/routes.tsx +10 -4
- package/dist/package-lock.json +2 -2
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
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.116.10](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.116.9...v1.116.10) (2026-03-27)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [1.116.9](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.116.8...v1.116.9) (2026-03-27)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
public
|
|
1
|
+
public without sharing class MaintenanceRequestTriggerHandler {
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Handles before insert logic for Maintenance Request records
|
|
@@ -7,11 +7,14 @@ public with sharing class MaintenanceRequestTriggerHandler {
|
|
|
7
7
|
public static void handleBeforeInsert(List<Maintenance_Request__c> newRequests) {
|
|
8
8
|
// Map to store request type to worker type mappings
|
|
9
9
|
Map<String, String> requestTypeToWorkerType = new Map<String, String>{
|
|
10
|
-
'Plumbing'
|
|
11
|
-
'Electrical'
|
|
12
|
-
'HVAC'
|
|
13
|
-
'Appliance'
|
|
14
|
-
'
|
|
10
|
+
'Plumbing' => 'Plumbing',
|
|
11
|
+
'Electrical' => 'Electrical',
|
|
12
|
+
'HVAC' => 'HVAC (Heating & Cooling)',
|
|
13
|
+
'Appliance' => 'Appliance Repair',
|
|
14
|
+
'Carpentry' => 'General Carpentry',
|
|
15
|
+
'Landscaping' => 'Landscaping / Grounds',
|
|
16
|
+
'Cleaning' => 'Janitorial / Cleaning',
|
|
17
|
+
'Pest' => 'Pest Control'
|
|
15
18
|
};
|
|
16
19
|
|
|
17
20
|
// Collect unique worker types needed
|
|
@@ -29,7 +29,15 @@ public with sharing class TenantTriggerHandler {
|
|
|
29
29
|
if (userIds.isEmpty()) {
|
|
30
30
|
return;
|
|
31
31
|
}
|
|
32
|
+
assignTenantMaintenanceAccessAsync(new List<Id>(userIds));
|
|
33
|
+
}
|
|
32
34
|
|
|
35
|
+
@future
|
|
36
|
+
private static void assignTenantMaintenanceAccessAsync(List<Id> userIdsList) {
|
|
37
|
+
Set<Id> userIds = new Set<Id>(userIdsList);
|
|
38
|
+
if (userIds.isEmpty()) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
33
41
|
List<PermissionSet> permSets = [
|
|
34
42
|
SELECT Id
|
|
35
43
|
FROM PermissionSet
|
|
@@ -73,7 +73,9 @@ private class TenantTriggerHandler_Test {
|
|
|
73
73
|
static void testNoDuplicateAssign() {
|
|
74
74
|
Id runAsUserId = UserInfo.getUserId();
|
|
75
75
|
Tenant__c tenant = new Tenant__c(User__c = runAsUserId);
|
|
76
|
+
Test.startTest();
|
|
76
77
|
insert tenant;
|
|
78
|
+
Test.stopTest();
|
|
77
79
|
|
|
78
80
|
Integer countBefore = [
|
|
79
81
|
SELECT COUNT()
|
|
@@ -82,8 +84,10 @@ private class TenantTriggerHandler_Test {
|
|
|
82
84
|
AND PermissionSet.Name = 'Tenant_Maintenance_Access'
|
|
83
85
|
];
|
|
84
86
|
|
|
87
|
+
Test.startTest();
|
|
85
88
|
tenant.Status__c = 'Active';
|
|
86
89
|
update tenant;
|
|
90
|
+
Test.stopTest();
|
|
87
91
|
|
|
88
92
|
Integer countAfter = [
|
|
89
93
|
SELECT COUNT()
|
package/dist/force-app/main/default/objects/Maintenance_Request__c/fields/Type__c.field-meta.xml
CHANGED
|
@@ -32,11 +32,31 @@
|
|
|
32
32
|
<default>false</default>
|
|
33
33
|
<label>Appliance</label>
|
|
34
34
|
</value>
|
|
35
|
+
<value>
|
|
36
|
+
<fullName>Carpentry</fullName>
|
|
37
|
+
<default>false</default>
|
|
38
|
+
<label>Carpentry</label>
|
|
39
|
+
</value>
|
|
40
|
+
<value>
|
|
41
|
+
<fullName>Landscaping</fullName>
|
|
42
|
+
<default>false</default>
|
|
43
|
+
<label>Landscaping</label>
|
|
44
|
+
</value>
|
|
45
|
+
<value>
|
|
46
|
+
<fullName>Cleaning</fullName>
|
|
47
|
+
<default>false</default>
|
|
48
|
+
<label>Cleaning</label>
|
|
49
|
+
</value>
|
|
35
50
|
<value>
|
|
36
51
|
<fullName>Pest</fullName>
|
|
37
52
|
<default>false</default>
|
|
38
53
|
<label>Pest Control</label>
|
|
39
54
|
</value>
|
|
55
|
+
<value>
|
|
56
|
+
<fullName>Other</fullName>
|
|
57
|
+
<default>false</default>
|
|
58
|
+
<label>Other</label>
|
|
59
|
+
</value>
|
|
40
60
|
</valueSetDefinition>
|
|
41
61
|
</valueSet>
|
|
42
62
|
</CustomField>
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"graphql:schema": "node scripts/get-graphql-schema.mjs"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@salesforce/sdk-data": "^1.116.
|
|
19
|
-
"@salesforce/webapp-experimental": "^1.116.
|
|
18
|
+
"@salesforce/sdk-data": "^1.116.10",
|
|
19
|
+
"@salesforce/webapp-experimental": "^1.116.10",
|
|
20
20
|
"@tailwindcss/vite": "^4.1.17",
|
|
21
21
|
"class-variance-authority": "^0.7.1",
|
|
22
22
|
"clsx": "^2.1.1",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@graphql-eslint/eslint-plugin": "^4.1.0",
|
|
48
48
|
"@graphql-tools/utils": "^11.0.0",
|
|
49
49
|
"@playwright/test": "^1.49.0",
|
|
50
|
-
"@salesforce/vite-plugin-webapp-experimental": "^1.116.
|
|
50
|
+
"@salesforce/vite-plugin-webapp-experimental": "^1.116.10",
|
|
51
51
|
"@testing-library/jest-dom": "^6.6.3",
|
|
52
52
|
"@testing-library/react": "^16.1.0",
|
|
53
53
|
"@testing-library/user-event": "^14.5.2",
|