diff options
| author | Yasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com> | 2026-10-23 09:27:06 +0900 |
|---|---|---|
| committer | Yasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com> | 2026-10-23 09:27:06 +0900 |
| commit | b5b6471b5a5420d1bd410907ac12570b8436702e (patch) | |
| tree | ec04b6e36653e3f7aa02090f3936e45c0abac384 /src/components/SanpiAllTable.astro | |
| parent | 09ab25113c299b8f3208a717cee9e9b8c7b07fe9 (diff) | |
sanpi: 集計・全期間一覧・前後リンクを修正し、非公開に戻す
Diffstat (limited to 'src/components/SanpiAllTable.astro')
| -rw-r--r-- | src/components/SanpiAllTable.astro | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/src/components/SanpiAllTable.astro b/src/components/SanpiAllTable.astro new file mode 100644 index 0000000..bd0f131 --- /dev/null +++ b/src/components/SanpiAllTable.astro @@ -0,0 +1,52 @@ +--- +// 全期間の議案賛否一覧。年度別ページの表から安竹洋平の列だけを取り出し、 +// 市側の議案・議員提出の議案・請願に分けて表示する。 +import { computeSanpiBills, type BillType } from "@/utils/sanpiStats"; + +interface Props { + type: BillType; +} + +const { type } = Astro.props; +const rows = computeSanpiBills().filter((row) => row.type === type); + +const PASS = ["可決", "認定", "採択", "同意", "承認"]; +const STOP = ["否決", "不採択"]; + +function kekkaClass(result: string): string { + if (STOP.some((key) => result.includes(key))) return "stop"; + if (PASS.some((key) => result.includes(key))) return "pass"; + return ""; +} +--- + +<table> + <thead> + <tr> + <th>議案</th> + <th>年度</th> + <th>定例会</th> + <th>議決結果</th> + <th><span class="sanpi-me">安竹</span></th> + </tr> + </thead> + <tbody> + { + rows.map((row) => ( + <tr> + <td>{row.title}</td> + <td> + <a href={row.yearHref}>{row.year}</a> + </td> + <td>{row.session}</td> + <td> + <span class={`sanpi-kekka ${kekkaClass(row.result)}`}>{row.result}</span> + </td> + <td> + <span class="sanpi-me">{row.me}</span> + </td> + </tr> + )) + } + </tbody> +</table> |
