@salesforce/ui-bundle-template-app-react-sample-b2e 2.2.1 → 3.1.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 +17 -0
- package/dist/README.md +45 -10
- package/dist/force-app/main/default/applications/PropertyManagement.app-meta.xml +33 -0
- package/dist/force-app/main/default/data/Application__c.json +10 -10
- package/dist/force-app/main/default/data/data-plan.json +0 -6
- package/dist/force-app/main/default/objects/Application__c/fields/User__c.field-meta.xml +2 -2
- package/dist/force-app/main/default/objects/Property__c/Property__c.object-meta.xml +1 -1
- package/dist/force-app/main/default/permissionsets/Property_Management_Access.permissionset-meta.xml +76 -0
- package/dist/force-app/main/default/permissionsets/Tenant_Maintenance_Access.permissionset-meta.xml +1 -1
- package/dist/force-app/main/default/tabs/Agent__c.tab-meta.xml +5 -0
- package/dist/force-app/main/default/tabs/Application__c.tab-meta.xml +5 -0
- package/dist/force-app/main/default/tabs/KPI_Snapshot__c.tab-meta.xml +5 -0
- package/dist/force-app/main/default/tabs/Lease__c.tab-meta.xml +5 -0
- package/dist/force-app/main/default/tabs/Maintenance_Request__c.tab-meta.xml +5 -0
- package/dist/force-app/main/default/tabs/Maintenance_Worker__c.tab-meta.xml +5 -0
- package/dist/force-app/main/default/tabs/Notification__c.tab-meta.xml +5 -0
- package/dist/force-app/main/default/tabs/Payment__c.tab-meta.xml +5 -0
- package/dist/force-app/main/default/tabs/Property_Cost__c.tab-meta.xml +5 -0
- package/dist/force-app/main/default/tabs/Property_Feature__c.tab-meta.xml +5 -0
- package/dist/force-app/main/default/tabs/Property_Image__c.tab-meta.xml +5 -0
- package/dist/force-app/main/default/tabs/Property_Listing__c.tab-meta.xml +5 -0
- package/dist/force-app/main/default/tabs/Property_Management_Company__c.tab-meta.xml +5 -0
- package/dist/force-app/main/default/tabs/Property_Owner__c.tab-meta.xml +5 -0
- package/dist/force-app/main/default/tabs/Property_Sale__c.tab-meta.xml +5 -0
- package/dist/force-app/main/default/tabs/Property__c.tab-meta.xml +5 -0
- package/dist/force-app/main/default/tabs/Tenant__c.tab-meta.xml +5 -0
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/api/applications/applications.ts +2 -14
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/api/applications/query/getApplications.graphql +1 -4
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/api/graphql-operations-types.ts +17547 -5747
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/components/alerts/status-alert.tsx +11 -8
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/components/ui/input.tsx +1 -1
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/object-search/__examples__/pages/AccountObjectDetailPage.tsx +2 -4
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/object-search/__examples__/pages/AccountSearch.tsx +7 -15
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/object-search/components/filters/NumericRangeFilter.tsx +9 -5
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/object-search/components/filters/SearchFilter.tsx +5 -3
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/object-search/components/filters/TextFilter.tsx +5 -3
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/object-search/hooks/useAsyncData.ts +11 -4
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/hooks/useAsyncData.ts +67 -0
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/pages/ApplicationSearch.tsx +6 -9
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/pages/MaintenanceRequestSearch.tsx +5 -17
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/pages/MaintenanceWorkerSearch.tsx +3 -8
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/pages/PropertySearch.tsx +4 -12
- package/dist/force-app/{main/default/scripts → scripts}/org-setup.config.json +1 -1
- package/dist/package-lock.json +2 -2
- package/dist/package.json +1 -1
- package/dist/scripts/org-setup.config.json +0 -1
- package/dist/scripts/org-setup.mjs +528 -44
- package/package.json +2 -2
- package/dist/force-app/main/default/data/Contact.json +0 -44
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/object-search/hooks/useCachedAsyncData.ts +0 -188
package/dist/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,23 @@
|
|
|
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
|
+
## [3.1.0](https://github.com/salesforce-experience-platform-emu/webapps/compare/v3.0.0...v3.1.0) (2026-05-12)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* post tdx changes @W-22390798 ([#500](https://github.com/salesforce-experience-platform-emu/webapps/issues/500)) ([b611d9e](https://github.com/salesforce-experience-platform-emu/webapps/commit/b611d9ecbadd07d052bd7d9a4f5659dec422bf22))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## [3.0.0](https://github.com/salesforce-experience-platform-emu/webapps/compare/v2.2.1...v3.0.0) (2026-05-11)
|
|
16
|
+
|
|
17
|
+
**Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
6
23
|
## [2.2.1](https://github.com/salesforce-experience-platform-emu/webapps/compare/v2.2.0...v2.2.1) (2026-05-11)
|
|
7
24
|
|
|
8
25
|
**Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project
|
package/dist/README.md
CHANGED
|
@@ -11,7 +11,7 @@ A property management sample React UI Bundle for the Salesforce platform. Demons
|
|
|
11
11
|
- [1. Install Dependencies](#1-install-dependencies)
|
|
12
12
|
- [2. Authenticate Your Org](#2-authenticate-your-org)
|
|
13
13
|
- [3. Deploy Metadata](#3-deploy-metadata)
|
|
14
|
-
- [4. Assign Permission
|
|
14
|
+
- [4. Assign Permission Sets](#4-assign-permission-sets)
|
|
15
15
|
- [5. Import Sample Data](#5-import-sample-data)
|
|
16
16
|
- [6. Generate GraphQL Types](#6-generate-graphql-types)
|
|
17
17
|
- [7. Rebuild the UI Bundle](#7-rebuild-the-ui-bundle)
|
|
@@ -27,9 +27,9 @@ A property management sample React UI Bundle for the Salesforce platform. Demons
|
|
|
27
27
|
```
|
|
28
28
|
force-app/main/default/
|
|
29
29
|
├── uiBundles/ # React UI Bundle (source, config, tests)
|
|
30
|
-
├── objects/ #
|
|
30
|
+
├── objects/ # 18 Custom Objects (Property, Tenant, Lease, Agent, etc.)
|
|
31
31
|
├── layouts/ # Page layouts for all custom objects
|
|
32
|
-
├── permissionsets/ # Property_Management_Access (Full CRUD)
|
|
32
|
+
├── permissionsets/ # Property_Management_Access (Full CRUD) & Tenant_Maintenance_Access (Scoped)
|
|
33
33
|
└── data/ # Sample JSON data (use: sf data import tree)
|
|
34
34
|
```
|
|
35
35
|
|
|
@@ -92,6 +92,38 @@ For a full list of options:
|
|
|
92
92
|
npm run setup -- --help
|
|
93
93
|
```
|
|
94
94
|
|
|
95
|
+
### Setup Configuration (`scripts/org-setup.config.json`)
|
|
96
|
+
|
|
97
|
+
The `npm run setup` script reads `scripts/org-setup.config.json` to control permission set assignment behavior. Each top-level section is **optional** — if a section is absent, the corresponding step is hidden from the interactive picker.
|
|
98
|
+
|
|
99
|
+
```json
|
|
100
|
+
{
|
|
101
|
+
"permsetAssignments": {
|
|
102
|
+
"defaultAssignee": "skip",
|
|
103
|
+
"assignments": {
|
|
104
|
+
"Property_Management_Access": { "assignee": "currentUser" },
|
|
105
|
+
"Tenant_Maintenance_Access": { "assignee": "skip" }
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
#### `permsetAssignments`
|
|
112
|
+
|
|
113
|
+
| Field | Description |
|
|
114
|
+
| ----------------- | ---------------------------------------------------------------------------- |
|
|
115
|
+
| `defaultAssignee` | Fallback assignee for permission sets not explicitly listed in `assignments` |
|
|
116
|
+
| `assignments` | Per-permission-set overrides (key = permission set API name) |
|
|
117
|
+
|
|
118
|
+
Each assignment's `assignee` value controls who it is assigned to:
|
|
119
|
+
|
|
120
|
+
| Value | Behavior |
|
|
121
|
+
| ---------------- | --------------------------------------------------------------------------------- |
|
|
122
|
+
| `"currentUser"` | Assigns to the user running the script (resolved via `sf org display`) |
|
|
123
|
+
| `"skip"` | Explicitly skips this permission set |
|
|
124
|
+
| `"guestUser"` | Auto-resolves the site's guest user (requires `siteName` field on the same entry) |
|
|
125
|
+
| `"user@org.com"` | Assigns to a specific user by username |
|
|
126
|
+
|
|
95
127
|
---
|
|
96
128
|
|
|
97
129
|
## Step-by-Step Setup
|
|
@@ -167,18 +199,21 @@ sf project deploy start --source-dir force-app/main/default/uiBundles --target-o
|
|
|
167
199
|
|
|
168
200
|
Replace `<alias>` with your target org alias.
|
|
169
201
|
|
|
170
|
-
### 4. Assign Permission
|
|
202
|
+
### 4. Assign Permission Sets
|
|
203
|
+
|
|
204
|
+
After deploying the metadata, assign permission sets to grant access to the custom objects and fields:
|
|
171
205
|
|
|
172
|
-
|
|
206
|
+
| Permission Set | Purpose | Assign To |
|
|
207
|
+
| ---------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------- |
|
|
208
|
+
| `Property_Management_Access` | Full CRUD access to all custom objects. Intended for property managers and admin users. | Internal users managing the app |
|
|
209
|
+
| `Tenant_Maintenance_Access` | Scoped read/write access for tenants. Allows creating and updating their own maintenance requests only. | Tenant community users |
|
|
173
210
|
|
|
174
211
|
```bash
|
|
212
|
+
# Assign Property_Management_Access to the current user
|
|
175
213
|
sf org assign permset --name Property_Management_Access --target-org <alias>
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
To assign to a specific user:
|
|
179
214
|
|
|
180
|
-
|
|
181
|
-
sf org assign permset --name
|
|
215
|
+
# Assign Tenant_Maintenance_Access to a specific tenant user
|
|
216
|
+
sf org assign permset --name Tenant_Maintenance_Access --on-behalf-of <username> --target-org <alias>
|
|
182
217
|
```
|
|
183
218
|
|
|
184
219
|
Replace `<alias>` with your target org alias.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<CustomApplication xmlns="http://soap.sforce.com/2006/04/metadata">
|
|
3
|
+
<defaultLandingTab>standard-home</defaultLandingTab>
|
|
4
|
+
<description>Property Rental Management Application for managing properties, tenants, leases, payments, and maintenance.</description>
|
|
5
|
+
<formFactors>Large</formFactors>
|
|
6
|
+
<isNavAutoTempTabsDisabled>false</isNavAutoTempTabsDisabled>
|
|
7
|
+
<isNavPersonalizationDisabled>false</isNavPersonalizationDisabled>
|
|
8
|
+
<isNavTabPersistenceDisabled>false</isNavTabPersistenceDisabled>
|
|
9
|
+
<isOmniPinnedViewEnabled>false</isOmniPinnedViewEnabled>
|
|
10
|
+
<label>Property Management</label>
|
|
11
|
+
<navType>Standard</navType>
|
|
12
|
+
<tabs>standard-home</tabs>
|
|
13
|
+
<tabs>Property__c</tabs>
|
|
14
|
+
<tabs>Property_Listing__c</tabs>
|
|
15
|
+
<tabs>Tenant__c</tabs>
|
|
16
|
+
<tabs>Lease__c</tabs>
|
|
17
|
+
<tabs>Payment__c</tabs>
|
|
18
|
+
<tabs>Maintenance_Request__c</tabs>
|
|
19
|
+
<tabs>Maintenance_Worker__c</tabs>
|
|
20
|
+
<tabs>Application__c</tabs>
|
|
21
|
+
<tabs>Property_Owner__c</tabs>
|
|
22
|
+
<tabs>Property_Management_Company__c</tabs>
|
|
23
|
+
<tabs>Property_Cost__c</tabs>
|
|
24
|
+
<tabs>Property_Feature__c</tabs>
|
|
25
|
+
<tabs>Property_Image__c</tabs>
|
|
26
|
+
<tabs>Property_Sale__c</tabs>
|
|
27
|
+
<tabs>KPI_Snapshot__c</tabs>
|
|
28
|
+
<tabs>Notification__c</tabs>
|
|
29
|
+
<tabs>Agent__c</tabs>
|
|
30
|
+
<tabs>standard-report</tabs>
|
|
31
|
+
<tabs>standard-Dashboard</tabs>
|
|
32
|
+
<uiType>Lightning</uiType>
|
|
33
|
+
</CustomApplication>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"referenceId": "ApplicationRef1"
|
|
7
7
|
},
|
|
8
8
|
"Property__c": "@PropertyRef5",
|
|
9
|
-
"User__c":
|
|
9
|
+
"User__c": null,
|
|
10
10
|
"Status__c": "Submitted",
|
|
11
11
|
"Start_Date__c": "2024-12-01",
|
|
12
12
|
"Employment__c": "TechCorp Inc. - Senior Software Engineer - $95,000/year",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"referenceId": "ApplicationRef2"
|
|
19
19
|
},
|
|
20
20
|
"Property__c": "@PropertyRef8",
|
|
21
|
-
"User__c":
|
|
21
|
+
"User__c": null,
|
|
22
22
|
"Status__c": "Background Check",
|
|
23
23
|
"Start_Date__c": "2024-12-15",
|
|
24
24
|
"Employment__c": "City Hospital - Registered Nurse - $72,000/year",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"referenceId": "ApplicationRef3"
|
|
31
31
|
},
|
|
32
32
|
"Property__c": "@PropertyRef12",
|
|
33
|
-
"User__c":
|
|
33
|
+
"User__c": null,
|
|
34
34
|
"Status__c": "Approved",
|
|
35
35
|
"Start_Date__c": "2024-11-01",
|
|
36
36
|
"Employment__c": "Global Consulting LLC - Management Consultant - $110,000/year",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"referenceId": "ApplicationRef4"
|
|
43
43
|
},
|
|
44
44
|
"Property__c": "@PropertyRef5",
|
|
45
|
-
"User__c":
|
|
45
|
+
"User__c": null,
|
|
46
46
|
"Status__c": "Rejected",
|
|
47
47
|
"Start_Date__c": "2024-12-01",
|
|
48
48
|
"Employment__c": "Retail Store - Assistant Manager - $32,000/year",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"referenceId": "ApplicationRef5"
|
|
55
55
|
},
|
|
56
56
|
"Property__c": "@PropertyRef16",
|
|
57
|
-
"User__c":
|
|
57
|
+
"User__c": null,
|
|
58
58
|
"Status__c": "Draft",
|
|
59
59
|
"Start_Date__c": "2025-01-15",
|
|
60
60
|
"Employment__c": "University - Graduate Student - $18,000/year stipend",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"referenceId": "ApplicationRef6"
|
|
67
67
|
},
|
|
68
68
|
"Property__c": "@PropertyRef20",
|
|
69
|
-
"User__c":
|
|
69
|
+
"User__c": null,
|
|
70
70
|
"Status__c": "Submitted",
|
|
71
71
|
"Start_Date__c": "2025-01-01",
|
|
72
72
|
"Employment__c": "Local Business - Marketing Coordinator - $48,000/year (Co-signer: Parent, $85,000/year)",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"referenceId": "ApplicationRef7"
|
|
79
79
|
},
|
|
80
80
|
"Property__c": "@PropertyRef8",
|
|
81
|
-
"User__c":
|
|
81
|
+
"User__c": null,
|
|
82
82
|
"Status__c": "Background Check",
|
|
83
83
|
"Start_Date__c": "2024-12-20",
|
|
84
84
|
"Employment__c": "Finance Corp - Financial Analyst - $78,000/year",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"referenceId": "ApplicationRef8"
|
|
91
91
|
},
|
|
92
92
|
"Property__c": "@PropertyRef3",
|
|
93
|
-
"User__c":
|
|
93
|
+
"User__c": null,
|
|
94
94
|
"Status__c": "Approved",
|
|
95
95
|
"Start_Date__c": "2024-10-01",
|
|
96
96
|
"Employment__c": "Design Studio - UX Designer - $68,000/year",
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"referenceId": "ApplicationRef9"
|
|
103
103
|
},
|
|
104
104
|
"Property__c": "@PropertyRef12",
|
|
105
|
-
"User__c":
|
|
105
|
+
"User__c": null,
|
|
106
106
|
"Status__c": "Rejected",
|
|
107
107
|
"Start_Date__c": "2024-10-25",
|
|
108
108
|
"Employment__c": "Various part-time positions - $25,000/year",
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
"referenceId": "ApplicationRef10"
|
|
115
115
|
},
|
|
116
116
|
"Property__c": "@PropertyRef5",
|
|
117
|
-
"User__c":
|
|
117
|
+
"User__c": null,
|
|
118
118
|
"Status__c": "Submitted",
|
|
119
119
|
"Start_Date__c": "2024-12-10",
|
|
120
120
|
"Employment__c": "Teaching - High School Teacher - $55,000/year",
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
|
|
3
3
|
<fullName>User__c</fullName>
|
|
4
4
|
<deleteConstraint>SetNull</deleteConstraint>
|
|
5
|
-
<description>The person applying (
|
|
5
|
+
<description>The person applying (User record)</description>
|
|
6
6
|
<externalId>false</externalId>
|
|
7
7
|
<label>Applicant</label>
|
|
8
|
-
<referenceTo>
|
|
8
|
+
<referenceTo>User</referenceTo>
|
|
9
9
|
<relationshipLabel>Applications</relationshipLabel>
|
|
10
10
|
<relationshipName>Applications</relationshipName>
|
|
11
11
|
<required>false</required>
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
<enableSearch>true</enableSearch>
|
|
54
54
|
<enableSharing>true</enableSharing>
|
|
55
55
|
<enableStreamingApi>true</enableStreamingApi>
|
|
56
|
-
<externalSharingModel>
|
|
56
|
+
<externalSharingModel>Read</externalSharingModel>
|
|
57
57
|
<label>Property</label>
|
|
58
58
|
<nameField>
|
|
59
59
|
<label>Property Name</label>
|
package/dist/force-app/main/default/permissionsets/Property_Management_Access.permissionset-meta.xml
CHANGED
|
@@ -630,4 +630,80 @@
|
|
|
630
630
|
<field>Tenant__c.Status__c</field>
|
|
631
631
|
<readable>true</readable>
|
|
632
632
|
</fieldPermissions>
|
|
633
|
+
|
|
634
|
+
<!-- Application Permissions -->
|
|
635
|
+
<applicationVisibilities>
|
|
636
|
+
<application>PropertyManagement</application>
|
|
637
|
+
<visible>true</visible>
|
|
638
|
+
</applicationVisibilities>
|
|
639
|
+
|
|
640
|
+
<!-- Tab Permissions -->
|
|
641
|
+
<tabSettings>
|
|
642
|
+
<tab>Agent__c</tab>
|
|
643
|
+
<visibility>Visible</visibility>
|
|
644
|
+
</tabSettings>
|
|
645
|
+
<tabSettings>
|
|
646
|
+
<tab>Application__c</tab>
|
|
647
|
+
<visibility>Visible</visibility>
|
|
648
|
+
</tabSettings>
|
|
649
|
+
<tabSettings>
|
|
650
|
+
<tab>KPI_Snapshot__c</tab>
|
|
651
|
+
<visibility>Visible</visibility>
|
|
652
|
+
</tabSettings>
|
|
653
|
+
<tabSettings>
|
|
654
|
+
<tab>Lease__c</tab>
|
|
655
|
+
<visibility>Visible</visibility>
|
|
656
|
+
</tabSettings>
|
|
657
|
+
<tabSettings>
|
|
658
|
+
<tab>Maintenance_Request__c</tab>
|
|
659
|
+
<visibility>Visible</visibility>
|
|
660
|
+
</tabSettings>
|
|
661
|
+
<tabSettings>
|
|
662
|
+
<tab>Maintenance_Worker__c</tab>
|
|
663
|
+
<visibility>Visible</visibility>
|
|
664
|
+
</tabSettings>
|
|
665
|
+
<tabSettings>
|
|
666
|
+
<tab>Notification__c</tab>
|
|
667
|
+
<visibility>Visible</visibility>
|
|
668
|
+
</tabSettings>
|
|
669
|
+
<tabSettings>
|
|
670
|
+
<tab>Payment__c</tab>
|
|
671
|
+
<visibility>Visible</visibility>
|
|
672
|
+
</tabSettings>
|
|
673
|
+
<tabSettings>
|
|
674
|
+
<tab>Property__c</tab>
|
|
675
|
+
<visibility>Visible</visibility>
|
|
676
|
+
</tabSettings>
|
|
677
|
+
<tabSettings>
|
|
678
|
+
<tab>Property_Cost__c</tab>
|
|
679
|
+
<visibility>Visible</visibility>
|
|
680
|
+
</tabSettings>
|
|
681
|
+
<tabSettings>
|
|
682
|
+
<tab>Property_Feature__c</tab>
|
|
683
|
+
<visibility>Visible</visibility>
|
|
684
|
+
</tabSettings>
|
|
685
|
+
<tabSettings>
|
|
686
|
+
<tab>Property_Image__c</tab>
|
|
687
|
+
<visibility>Visible</visibility>
|
|
688
|
+
</tabSettings>
|
|
689
|
+
<tabSettings>
|
|
690
|
+
<tab>Property_Listing__c</tab>
|
|
691
|
+
<visibility>Visible</visibility>
|
|
692
|
+
</tabSettings>
|
|
693
|
+
<tabSettings>
|
|
694
|
+
<tab>Property_Management_Company__c</tab>
|
|
695
|
+
<visibility>Visible</visibility>
|
|
696
|
+
</tabSettings>
|
|
697
|
+
<tabSettings>
|
|
698
|
+
<tab>Property_Owner__c</tab>
|
|
699
|
+
<visibility>Visible</visibility>
|
|
700
|
+
</tabSettings>
|
|
701
|
+
<tabSettings>
|
|
702
|
+
<tab>Property_Sale__c</tab>
|
|
703
|
+
<visibility>Visible</visibility>
|
|
704
|
+
</tabSettings>
|
|
705
|
+
<tabSettings>
|
|
706
|
+
<tab>Tenant__c</tab>
|
|
707
|
+
<visibility>Visible</visibility>
|
|
708
|
+
</tabSettings>
|
|
633
709
|
</PermissionSet>
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import GET_APPLICATIONS from "./query/getApplications.graphql?raw";
|
|
2
2
|
import UPDATE_APPLICATION_STATUS from "./query/updateApplicationStatus.graphql?raw";
|
|
3
3
|
import APPLICATION_FOR_APPROVAL_QUERY from "./query/applicationForApproval.graphql?raw";
|
|
4
|
-
import USER_BY_CONTACT_QUERY from "./query/userByContact.graphql?raw";
|
|
5
4
|
import EXISTING_TENANT_QUERY from "./query/existingTenant.graphql?raw";
|
|
6
5
|
import { createRecord } from "@salesforce/ui-bundle/api";
|
|
7
6
|
import type {
|
|
@@ -11,8 +10,6 @@ import type {
|
|
|
11
10
|
UpdateApplicationStatusMutationVariables,
|
|
12
11
|
ApplicationForApprovalQuery,
|
|
13
12
|
ApplicationForApprovalQueryVariables,
|
|
14
|
-
UserByContactQuery,
|
|
15
|
-
UserByContactQueryVariables,
|
|
16
13
|
ExistingTenantQuery,
|
|
17
14
|
ExistingTenantQueryVariables,
|
|
18
15
|
} from "../graphql-operations-types.js";
|
|
@@ -81,20 +78,11 @@ async function ensureTenantForApprovedApplication(applicationId: string): Promis
|
|
|
81
78
|
throw new Error("Application record not found.");
|
|
82
79
|
}
|
|
83
80
|
|
|
84
|
-
const
|
|
81
|
+
const userId = applicationNode.User__c?.value ?? null;
|
|
85
82
|
const propertyId = applicationNode.Property__c?.value ?? null;
|
|
86
83
|
const startDate = applicationNode.Start_Date__c?.value ?? null;
|
|
87
84
|
|
|
88
|
-
if (!
|
|
89
|
-
return;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
const userData = await executeGraphQL<UserByContactQuery, UserByContactQueryVariables>(
|
|
93
|
-
USER_BY_CONTACT_QUERY,
|
|
94
|
-
{ contactId },
|
|
95
|
-
);
|
|
96
|
-
const userId = userData.uiapi?.query?.User?.edges?.[0]?.node?.Id ?? null;
|
|
97
|
-
if (!userId) {
|
|
85
|
+
if (!userId || !propertyId) {
|
|
98
86
|
return;
|
|
99
87
|
}
|
|
100
88
|
|