Skip to content

Commit

Permalink
switch syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
fgregg committed May 31, 2024
1 parent 3553641 commit c68ca04
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions example/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,17 @@
render: function (data, type, row, meta) {
if (type === "display") {
const encoded_doc_id = encodeURIComponent(row.filed_doc_id);
const path =
row.doc_name === "A-1"
? `A1List.aspx?FiledDocID=${encoded_doc_id}&ContributionType=wOGh3QTPfKqV2YWjeRmjTeStk426RfVK&Archived=Gl5sibpnFrQ%3d`
: row.doc_name === "Final"
? `D2Semiannual.aspx?id=${encoded_doc_id}`
: `D2Quarterly.aspx?id=${encoded_doc_id}`;
let path = "";
switch (row.doc_name) {
case "A-1":
path = `A1List.aspx?FiledDocID=${encoded_doc_id}&ContributionType=wOGh3QTPfKqV2YWjeRmjTeStk426RfVK&Archived=Gl5sibpnFrQ%3d`;
break;
case "Final":
path = `D2Semiannual.aspx?id=${encoded_doc_id}`;
break;
default:
path = `D2Quarterly.aspx?id=${encoded_doc_id}`;
}
return `<a href="https://www.elections.il.gov/CampaignDisclosure/${path}">${row.filed_doc_id}</a>`;
}
},
Expand Down

0 comments on commit c68ca04

Please sign in to comment.