Skip to content

Commit

Permalink
Merge pull request #977 from Esri/handle-tables
Browse files Browse the repository at this point in the history
add type check and sort order for tables
  • Loading branch information
jmhauck authored Oct 22, 2024
2 parents a9cbc92 + 3096990 commit 62b6d5b
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ export class SolutionItemAccordion {
"Web Scene",
"Feature Layer (hosted, view)",
"Feature Layer (hosted)",
"Table (hosted, view)",
"Table (hosted)",
"Tile Layer",
"CSV",
"Microsoft Excel",
Expand Down Expand Up @@ -348,8 +350,10 @@ export class SolutionItemAccordion {
): string {
let _type = type;
if (type === "Feature Service") {
_type = typeKeywords.indexOf("View Service") > -1 ?
"Feature Layer (hosted, view)" : "Feature Layer (hosted)";
const isView = typeKeywords.indexOf("View Service") > -1;
const isTable = typeKeywords.indexOf("Table") > -1
_type = isView && isTable ? "Table (hosted, view)" : isTable ? "Table (hosted)" :
isView ? "Feature Layer (hosted, view)" : "Feature Layer (hosted)";
}

if (type === "Web Mapping Application") {
Expand Down
32 changes: 32 additions & 0 deletions src/demos/solution-item-accordion.html
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,38 @@
],
"snippet": "A feature layer view used to share volunteers and clearing activities with the Adopt-A-Catch Basin site."
},
{
"id": "aa2a7f901eb9492a829ab918cd38318d",
"type": "Feature Service",
"title": "CatchBasinVolunteers_public_table",
"typeKeywords": [
"ArcGIS Server",
"Data",
"Feature Access",
"Feature Service",
"Multilayer",
"Service",
"Hosted Service",
"View Service",
"Table"
],
"snippet": "A feature table view"
},
{
"id": "bb2a7f901eb9492a829ab918cd38318d",
"type": "Feature Service",
"title": "CatchBasinVolunteers_table",
"typeKeywords": [
"ArcGIS Server",
"Data",
"Feature Access",
"Feature Service",
"Multilayer",
"Service",
"Table"
],
"snippet": "A feature table"
},
{
"id": "cb7f74af39c64abfbe7c7fc5b69587b1",
"type": "Feature Service",
Expand Down

0 comments on commit 62b6d5b

Please sign in to comment.