Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Display "Processing..." for claimed sites in ResultsTableComponent #66

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/demo/public/options.json
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@
}
]
}
]
],
"claimedText": "Processing..."
},
"resultSummaryOptions": {
"title": "Ergebnisse",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@

export let title: string = "";

let claimedText: string;
$: claimedText =
(($lensOptions?.tableOptions &&
$lensOptions.tableOptions?.claimedText &&
$lensOptions.tableOptions.claimedText) as string) ||
"Processing...";

/**
* data-types for the table
* can be set via options component
Expand All @@ -47,7 +54,7 @@
tableRowData = [];

responseStore.forEach((value: Site, key: string): void => {
if (value.status !== "succeeded") return;
if (!["claimed", "succeeded"].includes(value.status)) return;

let tableRow: (string | number)[] = [];

Expand All @@ -65,6 +72,12 @@
tableRow.push(name);
return;
}

if (value.status === "claimed") {
tableRow.push(claimedText);
return;
}

if (header.dataKey) {
tableRow.push(
getSitePopulationForCode(
Expand Down
Loading