@salesforce/ui-bundle-template-app-react-sample-b2e 11.20.0 → 11.21.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 +8 -0
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/package.json +4 -4
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/api/applications/applicationSearchService.ts +25 -43
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/api/maintenanceRequests/maintenanceRequestSearchService.ts +31 -65
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/api/maintenanceWorkers/maintenanceWorkerSearchService.ts +21 -43
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/api/properties/propertySearchService.ts +33 -53
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/components/applications/ApplicationCard.tsx +80 -0
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/components/dashboard/GlobalSearchBar.tsx +2 -2
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/components/layout/VerticalNav.tsx +28 -18
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/components/maintenanceRequests/MaintenanceRequestCard.tsx +79 -52
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/components/maintenanceWorkers/WorkerCard.tsx +87 -0
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/components/search/UnifiedSearch.tsx +213 -0
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/search/api/distinctValuesService.ts +84 -0
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/search/api/searchService.ts +71 -0
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/search/components/MergedSearchResults.tsx +263 -0
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/search/components/Search.tsx +185 -0
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/search/components/SearchResults.tsx +77 -0
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/search/components/SourceSection.tsx +166 -0
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/search/components/controls/PaginationControls.tsx +185 -0
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/search/components/controls/ScopeSelector.tsx +55 -0
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/search/components/controls/SearchBar.tsx +55 -0
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/search/components/controls/SortControl.tsx +62 -0
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/search/components/filters/ActiveFilters.tsx +61 -0
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/search/components/filters/DefaultFilterPanel.tsx +125 -0
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/{object-search/components → search/components/filters}/FilterContext.tsx +7 -20
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/search/components/filters/inputs/BooleanFilter.tsx +50 -0
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/search/components/filters/inputs/DateRangeFilter.tsx +160 -0
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/search/components/filters/inputs/FilterFieldWrapper.tsx +26 -0
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/search/components/filters/inputs/MultiSelectFilter.tsx +88 -0
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/search/components/filters/inputs/NumericRangeFilter.tsx +78 -0
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/search/components/filters/inputs/SelectFilter.tsx +46 -0
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/search/components/filters/inputs/TextFilter.tsx +52 -0
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/search/components/results/DefaultResultRow.tsx +109 -0
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/search/config.json +83 -0
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/{object-search → search}/hooks/useAsyncData.ts +3 -10
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/search/hooks/useDistinctValues.ts +59 -0
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/search/hooks/useSearch.ts +703 -0
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/search/index.ts +90 -0
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/search/loadConfig.ts +14 -0
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/search/queryBuilder.ts +156 -0
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/search/types.ts +307 -0
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/search/utils/debounce.ts +17 -0
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/search/utils/fieldUtils.ts +14 -0
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/search/utils/filterUtils.ts +285 -0
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/search/utils/sortUtils.ts +34 -0
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/lib/constants.ts +16 -29
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/lib/routeConfig.ts +1 -0
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/lib/searchConfig.ts +190 -0
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/pages/ApplicationSearch.tsx +8 -385
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/pages/Home.tsx +4 -2
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/pages/MaintenanceRequestSearch.tsx +8 -458
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/pages/MaintenanceWorkerSearch.tsx +8 -341
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/pages/PropertySearch.tsx +7 -243
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/pages/Search.tsx +16 -0
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/routes.tsx +6 -0
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/tsconfig.tsbuildinfo +1 -1
- package/dist/package-lock.json +2 -2
- package/dist/package.json +1 -1
- package/package.json +2 -2
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/api/applications/query/distinctApplicationStatus.graphql +0 -19
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/api/applications/query/searchApplications.graphql +0 -65
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/api/maintenanceRequests/query/distinctMaintenanceRequestPriority.graphql +0 -19
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/api/maintenanceRequests/query/distinctMaintenanceRequestStatus.graphql +0 -19
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/api/maintenanceRequests/query/distinctMaintenanceRequestType.graphql +0 -19
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/api/maintenanceRequests/query/searchMaintenanceRequests.graphql +0 -82
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/api/maintenanceWorkers/query/distinctMaintenanceWorkerEmploymentType.graphql +0 -19
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/api/maintenanceWorkers/query/searchMaintenanceWorkers.graphql +0 -64
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/api/properties/query/distinctPropertyStatus.graphql +0 -19
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/api/properties/query/distinctPropertyType.graphql +0 -19
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/api/properties/query/searchProperties.graphql +0 -105
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/components/shared/ObjectSearchErrorState.tsx +0 -45
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/components/shared/UserAvatar.tsx +0 -35
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/object-search/__examples__/api/accountSearchService.ts +0 -46
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/object-search/__examples__/api/query/distinctAccountIndustries.graphql +0 -19
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/object-search/__examples__/api/query/distinctAccountTypes.graphql +0 -19
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/object-search/__examples__/api/query/getAccountDetail.graphql +0 -121
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/object-search/__examples__/api/query/searchAccounts.graphql +0 -51
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/object-search/__examples__/pages/AccountObjectDetailPage.tsx +0 -355
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/object-search/__examples__/pages/AccountSearch.tsx +0 -304
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/object-search/__examples__/pages/Home.tsx +0 -34
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/object-search/api/objectSearchService.ts +0 -82
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/object-search/components/ActiveFilters.tsx +0 -89
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/object-search/components/ObjectBreadcrumb.tsx +0 -66
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/object-search/components/PaginationControls.tsx +0 -109
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/object-search/components/SearchBar.tsx +0 -41
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/object-search/components/SortControl.tsx +0 -143
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/object-search/components/filters/BooleanFilter.tsx +0 -78
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/object-search/components/filters/DateFilter.tsx +0 -128
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/object-search/components/filters/DateRangeFilter.tsx +0 -70
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/object-search/components/filters/FilterFieldWrapper.tsx +0 -43
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/object-search/components/filters/MultiSelectFilter.tsx +0 -105
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/object-search/components/filters/NumericRangeFilter.tsx +0 -171
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/object-search/components/filters/SearchFilter.tsx +0 -52
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/object-search/components/filters/SelectFilter.tsx +0 -97
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/object-search/components/filters/TextFilter.tsx +0 -93
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/object-search/hooks/useDebouncedCallback.ts +0 -34
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/object-search/hooks/useObjectSearchParams.ts +0 -254
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/object-search/utils/debounce.ts +0 -25
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/object-search/utils/fieldUtils.ts +0 -29
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/object-search/utils/filterUtils.ts +0 -404
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/object-search/utils/sortUtils.ts +0 -38
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/lib/filterUtils.ts +0 -11
package/dist/package-lock.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/ui-bundle-template-base-sfdx-project",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.21.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@salesforce/ui-bundle-template-base-sfdx-project",
|
|
9
|
-
"version": "11.
|
|
9
|
+
"version": "11.21.0",
|
|
10
10
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"fast-xml-parser": "^5.9.3",
|
package/dist/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/ui-bundle-template-app-react-sample-b2e",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.21.0",
|
|
4
4
|
"description": "Salesforce sample property rental React app",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"author": "",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"clean": "rm -rf dist"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@salesforce/ui-bundle": "^11.
|
|
19
|
+
"@salesforce/ui-bundle": "^11.21.0",
|
|
20
20
|
"sonner": "^1.7.0"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
query SearchApplications(
|
|
2
|
-
$first: Int
|
|
3
|
-
$after: String
|
|
4
|
-
$where: Application__c_Filter
|
|
5
|
-
$orderBy: Application__c_OrderBy
|
|
6
|
-
) {
|
|
7
|
-
uiapi {
|
|
8
|
-
query {
|
|
9
|
-
Application__c(first: $first, after: $after, where: $where, orderBy: $orderBy) {
|
|
10
|
-
edges {
|
|
11
|
-
node {
|
|
12
|
-
Id
|
|
13
|
-
Name {
|
|
14
|
-
value
|
|
15
|
-
displayValue
|
|
16
|
-
}
|
|
17
|
-
Status__c {
|
|
18
|
-
value
|
|
19
|
-
displayValue
|
|
20
|
-
}
|
|
21
|
-
Start_Date__c {
|
|
22
|
-
value
|
|
23
|
-
displayValue
|
|
24
|
-
}
|
|
25
|
-
Employment__c {
|
|
26
|
-
value
|
|
27
|
-
displayValue
|
|
28
|
-
}
|
|
29
|
-
References__c {
|
|
30
|
-
value
|
|
31
|
-
displayValue
|
|
32
|
-
}
|
|
33
|
-
Property__r {
|
|
34
|
-
Name {
|
|
35
|
-
value
|
|
36
|
-
displayValue
|
|
37
|
-
}
|
|
38
|
-
Address__c {
|
|
39
|
-
value
|
|
40
|
-
displayValue
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
User__r {
|
|
44
|
-
Name {
|
|
45
|
-
value
|
|
46
|
-
displayValue
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
CreatedDate {
|
|
50
|
-
value
|
|
51
|
-
displayValue
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
pageInfo {
|
|
56
|
-
hasNextPage
|
|
57
|
-
hasPreviousPage
|
|
58
|
-
endCursor
|
|
59
|
-
startCursor
|
|
60
|
-
}
|
|
61
|
-
totalCount
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
query DistinctMaintenanceRequestPriority {
|
|
2
|
-
uiapi {
|
|
3
|
-
aggregate {
|
|
4
|
-
Maintenance_Request__c(groupBy: { Priority__c: { group: true } }) {
|
|
5
|
-
edges {
|
|
6
|
-
node {
|
|
7
|
-
aggregate {
|
|
8
|
-
Priority__c {
|
|
9
|
-
value
|
|
10
|
-
displayValue
|
|
11
|
-
label
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
query DistinctMaintenanceRequestStatus {
|
|
2
|
-
uiapi {
|
|
3
|
-
aggregate {
|
|
4
|
-
Maintenance_Request__c(groupBy: { Status__c: { group: true } }) {
|
|
5
|
-
edges {
|
|
6
|
-
node {
|
|
7
|
-
aggregate {
|
|
8
|
-
Status__c {
|
|
9
|
-
value
|
|
10
|
-
displayValue
|
|
11
|
-
label
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
query DistinctMaintenanceRequestType {
|
|
2
|
-
uiapi {
|
|
3
|
-
aggregate {
|
|
4
|
-
Maintenance_Request__c(groupBy: { Type__c: { group: true } }) {
|
|
5
|
-
edges {
|
|
6
|
-
node {
|
|
7
|
-
aggregate {
|
|
8
|
-
Type__c {
|
|
9
|
-
value
|
|
10
|
-
displayValue
|
|
11
|
-
label
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
query SearchMaintenanceRequests(
|
|
2
|
-
$first: Int
|
|
3
|
-
$after: String
|
|
4
|
-
$where: Maintenance_Request__c_Filter
|
|
5
|
-
$orderBy: Maintenance_Request__c_OrderBy
|
|
6
|
-
) {
|
|
7
|
-
uiapi {
|
|
8
|
-
query {
|
|
9
|
-
Maintenance_Request__c(first: $first, after: $after, where: $where, orderBy: $orderBy) {
|
|
10
|
-
edges {
|
|
11
|
-
node {
|
|
12
|
-
Id
|
|
13
|
-
Name {
|
|
14
|
-
value
|
|
15
|
-
displayValue
|
|
16
|
-
}
|
|
17
|
-
Description__c {
|
|
18
|
-
value
|
|
19
|
-
displayValue
|
|
20
|
-
}
|
|
21
|
-
Type__c {
|
|
22
|
-
value
|
|
23
|
-
displayValue
|
|
24
|
-
}
|
|
25
|
-
Priority__c {
|
|
26
|
-
value
|
|
27
|
-
displayValue
|
|
28
|
-
}
|
|
29
|
-
Status__c {
|
|
30
|
-
value
|
|
31
|
-
displayValue
|
|
32
|
-
}
|
|
33
|
-
Scheduled__c {
|
|
34
|
-
value
|
|
35
|
-
displayValue
|
|
36
|
-
}
|
|
37
|
-
Property__r {
|
|
38
|
-
Address__c {
|
|
39
|
-
value
|
|
40
|
-
displayValue
|
|
41
|
-
}
|
|
42
|
-
Name {
|
|
43
|
-
value
|
|
44
|
-
displayValue
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
User__r {
|
|
48
|
-
Name {
|
|
49
|
-
value
|
|
50
|
-
displayValue
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
Assigned_Worker__r {
|
|
54
|
-
Name {
|
|
55
|
-
value
|
|
56
|
-
displayValue
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
ContentDocumentLinks(first: 1) @optional {
|
|
60
|
-
edges {
|
|
61
|
-
node {
|
|
62
|
-
ContentDocument @optional {
|
|
63
|
-
LatestPublishedVersionId @optional {
|
|
64
|
-
value
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
pageInfo {
|
|
73
|
-
hasNextPage
|
|
74
|
-
hasPreviousPage
|
|
75
|
-
endCursor
|
|
76
|
-
startCursor
|
|
77
|
-
}
|
|
78
|
-
totalCount
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
query DistinctMaintenanceWorkerEmploymentType {
|
|
2
|
-
uiapi {
|
|
3
|
-
aggregate {
|
|
4
|
-
Maintenance_Worker__c(groupBy: { Employment_Type__c: { group: true } }) {
|
|
5
|
-
edges {
|
|
6
|
-
node {
|
|
7
|
-
aggregate {
|
|
8
|
-
Employment_Type__c {
|
|
9
|
-
value
|
|
10
|
-
displayValue
|
|
11
|
-
label
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
query SearchMaintenanceWorkers(
|
|
2
|
-
$first: Int
|
|
3
|
-
$after: String
|
|
4
|
-
$where: Maintenance_Worker__c_Filter
|
|
5
|
-
$orderBy: Maintenance_Worker__c_OrderBy
|
|
6
|
-
) {
|
|
7
|
-
uiapi {
|
|
8
|
-
query {
|
|
9
|
-
Maintenance_Worker__c(first: $first, after: $after, where: $where, orderBy: $orderBy) {
|
|
10
|
-
edges {
|
|
11
|
-
node {
|
|
12
|
-
Id
|
|
13
|
-
Name {
|
|
14
|
-
value
|
|
15
|
-
displayValue
|
|
16
|
-
}
|
|
17
|
-
Type__c {
|
|
18
|
-
value
|
|
19
|
-
displayValue
|
|
20
|
-
}
|
|
21
|
-
Employment_Type__c {
|
|
22
|
-
value
|
|
23
|
-
displayValue
|
|
24
|
-
}
|
|
25
|
-
Phone__c {
|
|
26
|
-
value
|
|
27
|
-
displayValue
|
|
28
|
-
}
|
|
29
|
-
Location__c {
|
|
30
|
-
value
|
|
31
|
-
displayValue
|
|
32
|
-
}
|
|
33
|
-
IsActive__c {
|
|
34
|
-
value
|
|
35
|
-
displayValue
|
|
36
|
-
}
|
|
37
|
-
Rating__c {
|
|
38
|
-
value
|
|
39
|
-
displayValue
|
|
40
|
-
}
|
|
41
|
-
Hourly_Rate__c {
|
|
42
|
-
value
|
|
43
|
-
displayValue
|
|
44
|
-
}
|
|
45
|
-
CreatedDate {
|
|
46
|
-
value
|
|
47
|
-
displayValue
|
|
48
|
-
}
|
|
49
|
-
Maintenance_Requests__r(where: { Status__c: { ne: "Resolved" } }) @optional {
|
|
50
|
-
totalCount
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
pageInfo {
|
|
55
|
-
hasNextPage
|
|
56
|
-
hasPreviousPage
|
|
57
|
-
endCursor
|
|
58
|
-
startCursor
|
|
59
|
-
}
|
|
60
|
-
totalCount
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
query SearchProperties(
|
|
2
|
-
$first: Int
|
|
3
|
-
$after: String
|
|
4
|
-
$where: Property__c_Filter
|
|
5
|
-
$orderBy: Property__c_OrderBy
|
|
6
|
-
) {
|
|
7
|
-
uiapi {
|
|
8
|
-
query {
|
|
9
|
-
Property__c(first: $first, after: $after, where: $where, orderBy: $orderBy) {
|
|
10
|
-
edges {
|
|
11
|
-
node {
|
|
12
|
-
Id
|
|
13
|
-
Name {
|
|
14
|
-
value
|
|
15
|
-
displayValue
|
|
16
|
-
}
|
|
17
|
-
Address__c {
|
|
18
|
-
value
|
|
19
|
-
displayValue
|
|
20
|
-
}
|
|
21
|
-
Status__c {
|
|
22
|
-
value
|
|
23
|
-
displayValue
|
|
24
|
-
}
|
|
25
|
-
Type__c {
|
|
26
|
-
value
|
|
27
|
-
displayValue
|
|
28
|
-
}
|
|
29
|
-
Monthly_Rent__c {
|
|
30
|
-
value
|
|
31
|
-
displayValue
|
|
32
|
-
}
|
|
33
|
-
Bedrooms__c {
|
|
34
|
-
value
|
|
35
|
-
displayValue
|
|
36
|
-
}
|
|
37
|
-
Bathrooms__c {
|
|
38
|
-
value
|
|
39
|
-
displayValue
|
|
40
|
-
}
|
|
41
|
-
Description__c {
|
|
42
|
-
value
|
|
43
|
-
displayValue
|
|
44
|
-
}
|
|
45
|
-
Hero_Image__c {
|
|
46
|
-
value
|
|
47
|
-
displayValue
|
|
48
|
-
}
|
|
49
|
-
Sq_Ft__c {
|
|
50
|
-
value
|
|
51
|
-
displayValue
|
|
52
|
-
}
|
|
53
|
-
Year_Built__c {
|
|
54
|
-
value
|
|
55
|
-
displayValue
|
|
56
|
-
}
|
|
57
|
-
Deposit__c {
|
|
58
|
-
value
|
|
59
|
-
displayValue
|
|
60
|
-
}
|
|
61
|
-
Parking__c {
|
|
62
|
-
value
|
|
63
|
-
displayValue
|
|
64
|
-
}
|
|
65
|
-
Pet_Friendly__c {
|
|
66
|
-
value
|
|
67
|
-
displayValue
|
|
68
|
-
}
|
|
69
|
-
Available_Date__c {
|
|
70
|
-
value
|
|
71
|
-
displayValue
|
|
72
|
-
}
|
|
73
|
-
Lease_Term__c {
|
|
74
|
-
value
|
|
75
|
-
displayValue
|
|
76
|
-
}
|
|
77
|
-
Features__c {
|
|
78
|
-
value
|
|
79
|
-
displayValue
|
|
80
|
-
}
|
|
81
|
-
Utilities__c {
|
|
82
|
-
value
|
|
83
|
-
displayValue
|
|
84
|
-
}
|
|
85
|
-
Tour_URL__c {
|
|
86
|
-
value
|
|
87
|
-
displayValue
|
|
88
|
-
}
|
|
89
|
-
CreatedDate {
|
|
90
|
-
value
|
|
91
|
-
displayValue
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
pageInfo {
|
|
96
|
-
hasNextPage
|
|
97
|
-
hasPreviousPage
|
|
98
|
-
endCursor
|
|
99
|
-
startCursor
|
|
100
|
-
}
|
|
101
|
-
totalCount
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
export interface ObjectSearchErrorStateProps {
|
|
2
|
-
message?: string;
|
|
3
|
-
/** Called when user clicks "Go to home" */
|
|
4
|
-
onGoHome: () => void;
|
|
5
|
-
/** Called when user clicks "Retry" */
|
|
6
|
-
onRetry: () => void;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Shared error state for object-search pages. Shows a friendly message with Go home and Retry actions.
|
|
11
|
-
* Renders the same layout (header + filters) to avoid layout shift.
|
|
12
|
-
*/
|
|
13
|
-
export function ObjectSearchErrorState({
|
|
14
|
-
message = "There was an error loading the data. Please try again.",
|
|
15
|
-
onGoHome,
|
|
16
|
-
onRetry,
|
|
17
|
-
}: ObjectSearchErrorStateProps) {
|
|
18
|
-
return (
|
|
19
|
-
<>
|
|
20
|
-
<div
|
|
21
|
-
className="flex flex-col items-center justify-center py-16 px-4 rounded-lg border border-gray-200 bg-gray-50"
|
|
22
|
-
role="alert"
|
|
23
|
-
aria-live="assertive"
|
|
24
|
-
>
|
|
25
|
-
<p className="text-gray-700 mb-6 text-center">{message}</p>
|
|
26
|
-
<div className="flex gap-3">
|
|
27
|
-
<button
|
|
28
|
-
type="button"
|
|
29
|
-
onClick={onGoHome}
|
|
30
|
-
className="px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50"
|
|
31
|
-
>
|
|
32
|
-
Go to home
|
|
33
|
-
</button>
|
|
34
|
-
<button
|
|
35
|
-
type="button"
|
|
36
|
-
onClick={onRetry}
|
|
37
|
-
className="px-4 py-2 text-sm font-medium text-white bg-purple-700 rounded-lg hover:bg-purple-800"
|
|
38
|
-
>
|
|
39
|
-
Retry
|
|
40
|
-
</button>
|
|
41
|
-
</div>
|
|
42
|
-
</div>
|
|
43
|
-
</>
|
|
44
|
-
);
|
|
45
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
|
|
3
|
-
interface UserAvatarProps {
|
|
4
|
-
name: string;
|
|
5
|
-
imageUrl?: string;
|
|
6
|
-
size?: "sm" | "md" | "lg";
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export const UserAvatar: React.FC<UserAvatarProps> = ({ name, imageUrl, size = "md" }) => {
|
|
10
|
-
const sizeClasses = {
|
|
11
|
-
sm: "w-8 h-8 text-xs",
|
|
12
|
-
md: "w-10 h-10 text-sm",
|
|
13
|
-
lg: "w-12 h-12 text-base",
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
const getInitials = (name: string) => {
|
|
17
|
-
const parts = name.trim().split(" ");
|
|
18
|
-
if (parts.length >= 2) {
|
|
19
|
-
return `${parts[0][0]}${parts[1][0]}`.toUpperCase();
|
|
20
|
-
}
|
|
21
|
-
return name.substring(0, 2).toUpperCase();
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
return (
|
|
25
|
-
<div
|
|
26
|
-
className={`${sizeClasses[size]} rounded-full bg-gray-200 flex items-center justify-center flex-shrink-0 overflow-hidden`}
|
|
27
|
-
>
|
|
28
|
-
{imageUrl ? (
|
|
29
|
-
<img src={imageUrl} alt={name} className="w-full h-full object-cover" />
|
|
30
|
-
) : (
|
|
31
|
-
<span className="font-medium text-gray-700">{getInitials(name)}</span>
|
|
32
|
-
)}
|
|
33
|
-
</div>
|
|
34
|
-
);
|
|
35
|
-
};
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import SEARCH_ACCOUNTS_QUERY from "./query/searchAccounts.graphql?raw";
|
|
2
|
-
import DISTINCT_INDUSTRIES_QUERY from "./query/distinctAccountIndustries.graphql?raw";
|
|
3
|
-
import DISTINCT_TYPES_QUERY from "./query/distinctAccountTypes.graphql?raw";
|
|
4
|
-
import {
|
|
5
|
-
searchObjects,
|
|
6
|
-
fetchDistinctValues,
|
|
7
|
-
type ObjectSearchOptions,
|
|
8
|
-
type PicklistOption,
|
|
9
|
-
} from "../../api/objectSearchService";
|
|
10
|
-
import type {
|
|
11
|
-
SearchAccountsQuery,
|
|
12
|
-
SearchAccountsQueryVariables,
|
|
13
|
-
DistinctAccountIndustriesQuery,
|
|
14
|
-
DistinctAccountTypesQuery,
|
|
15
|
-
} from "../../../../api/graphql-operations-types";
|
|
16
|
-
|
|
17
|
-
export type AccountSearchResult = NonNullable<SearchAccountsQuery["uiapi"]["query"]["Account"]>;
|
|
18
|
-
|
|
19
|
-
export type AccountSearchOptions = ObjectSearchOptions<
|
|
20
|
-
SearchAccountsQueryVariables["where"],
|
|
21
|
-
SearchAccountsQueryVariables["orderBy"]
|
|
22
|
-
>;
|
|
23
|
-
|
|
24
|
-
export type { PicklistOption };
|
|
25
|
-
|
|
26
|
-
export async function searchAccounts(
|
|
27
|
-
options: AccountSearchOptions = {},
|
|
28
|
-
): Promise<AccountSearchResult> {
|
|
29
|
-
return searchObjects<AccountSearchResult, SearchAccountsQuery, SearchAccountsQueryVariables>(
|
|
30
|
-
SEARCH_ACCOUNTS_QUERY,
|
|
31
|
-
"Account",
|
|
32
|
-
options,
|
|
33
|
-
);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export async function fetchDistinctIndustries(): Promise<PicklistOption[]> {
|
|
37
|
-
return fetchDistinctValues<DistinctAccountIndustriesQuery>(
|
|
38
|
-
DISTINCT_INDUSTRIES_QUERY,
|
|
39
|
-
"Account",
|
|
40
|
-
"Industry",
|
|
41
|
-
);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export async function fetchDistinctTypes(): Promise<PicklistOption[]> {
|
|
45
|
-
return fetchDistinctValues<DistinctAccountTypesQuery>(DISTINCT_TYPES_QUERY, "Account", "Type");
|
|
46
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
query DistinctAccountIndustries {
|
|
2
|
-
uiapi {
|
|
3
|
-
aggregate {
|
|
4
|
-
Account(groupBy: { Industry: { group: true } }) {
|
|
5
|
-
edges {
|
|
6
|
-
node {
|
|
7
|
-
aggregate @optional {
|
|
8
|
-
Industry @optional {
|
|
9
|
-
value
|
|
10
|
-
displayValue
|
|
11
|
-
label
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|