Skip to content

Commit

Permalink
fix: typos in README and components (#123)
Browse files Browse the repository at this point in the history
* Fix typos

Signed-off-by: Arthit Suriyawongkul <[email protected]>

* พรบ. -> พ.ร.บ.

Signed-off-by: Arthit Suriyawongkul <[email protected]>

* typo: customed -> custom

Signed-off-by: Arthit Suriyawongkul <[email protected]>

---------

Signed-off-by: Arthit Suriyawongkul <[email protected]>
  • Loading branch information
bact authored Oct 16, 2024
1 parent 62f41e1 commit 796c88d
Show file tree
Hide file tree
Showing 11 changed files with 111 additions and 111 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

Citizens are watching

> **Hacktoberfest 2024 is here!** every constibutor will receive a Parliament Watch sticker ✨ [see more](https://www.facebook.com/wevisdemo/posts/pfbid06t4zjUoG2noQW1pow9PiN2wmVQpUTHUSyE44SZcpP7bAaRRGaQy9JU1iWpUnVQAnl)
> **Hacktoberfest 2024 is here!** every contributor will receive a Parliament Watch sticker ✨ [see more](https://www.facebook.com/wevisdemo/posts/pfbid06t4zjUoG2noQW1pow9PiN2wmVQpUTHUSyE44SZcpP7bAaRRGaQy9JU1iWpUnVQAnl)
![Parliament Watch](https://parliamentwatch.wevis.info/images/sapasathan.svg)

**Table of Content**
**Table of Contents**

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
Expand Down Expand Up @@ -61,7 +61,7 @@ This project can be seen as a renovated combination of [They Work for Us](https:

- [Yarn v1](https://classic.yarnpkg.com) as a package manager
- Husky and lint-staged will
- Lint (ESLint) and format (Prettier) code before commiting
- Lint (ESLint) and format (Prettier) code before committing
- Validate that commit message is align with [conventional commit](https://www.conventionalcommits.org/en/v1.0.0/) using commitlint
- Run svelte-check before pushing
- For VSCode user, format on save is enabled and [prettier-vscode extension](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) will be recommended when open the project.
Expand Down Expand Up @@ -148,7 +148,7 @@ The project design system is based on Carbon Design System v10 with some modific
### Icons

- Use [Carbon Icons Svelte](https://carbon-icons-svelte.onrender.com)
- We have customed icon available in [src/components/icons](src/components/icons), using the same props as Carbon's icon. (Also available in Histoire)
- We have custom icon available in [src/components/icons](src/components/icons), using the same props as Carbon's icon. (Also available in Histoire)
- See [Figma file](<https://www.figma.com/file/TUob8dLak4FMugrqMQRm3R/Icons---IBM-Design-Language-(Community)>)

## 💾 Data Pipeline
Expand All @@ -167,10 +167,10 @@ flowchart TD
H --> |fetched by| E(GitHub Page)
```

- Original data is avaiable at our public [Google Sheets](https://docs.google.com/spreadsheets/d/1SbX2kgAGsslbhGuB-EI_YdSAnIt3reU1_OEtWmDVOVk/edit?usp=sharing)
- Original data is available at our public [Google Sheets](https://docs.google.com/spreadsheets/d/1SbX2kgAGsslbhGuB-EI_YdSAnIt3reU1_OEtWmDVOVk/edit?usp=sharing)
- [lib/datasheets](src/lib/datasheets/index.ts) provides fetch functions for each tables wrapping [d3-fetch](https://d3js.org/d3-fetch#csv) and [Zod](https://zod.dev)'s validation.
- Zod's schema for each data table are defined in [src/models](src/models) which also contains ER Diagram and other TypeScript's interfaces.
- Some data, such as politician ranking from external source, will be updated periodically through [scheduled Github Action](.github/workflows/update-ranking.yml) to reduce unnessesary build-time. The output JSON data is [served through Github Pages](https://wevisdemo.github.io/parliament-watch/politician-ranking.json) and can be fetch from the client-side.
- Some data, such as politician ranking from external source, will be updated periodically through [scheduled Github Action](.github/workflows/update-ranking.yml) to reduce unnecessary build-time. The output JSON data is [served through Github Pages](https://wevisdemo.github.io/parliament-watch/politician-ranking.json) and can be fetch from the client-side.

## 🤝 Contributing Guideline

Expand Down
24 changes: 12 additions & 12 deletions src/components/ComparisonTable/ComparisonTable.story.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,30 @@
let proposerComparisonTableData = [
{
'': 'ครม.',
'ร่าง พรบ.': 'มีสิทธิเสนอร่าง',
'ออก พรก.': 'มีสิทธิเสนอร่าง',
'ร่าง พรป.': 'มีสิทธิเสนอร่าง',
'ร่าง พ.ร.บ.': 'มีสิทธิเสนอร่าง',
'ออก พ.ร.ก.': 'มีสิทธิเสนอร่าง',
'ร่าง พ.ร.ป.': 'มีสิทธิเสนอร่าง',
'ร่างแก้ไขบทบัญญัติใน รธน.': 'มีสิทธิเสนอร่าง'
},
{
'': 'สส.',
'ร่าง พรบ.': '20 คน',
'ออก พรก.': '-',
'ร่าง พรป.': 'สส.ไม่น้อยกว่า 1 ใน 10',
'ร่าง พ.ร.บ.': '20 คน',
'ออก พ.ร.ก.': '-',
'ร่าง พ.ร.ป.': 'สส.ไม่น้อยกว่า 1 ใน 10',
'ร่างแก้ไขบทบัญญัติใน รธน.': 'สส.ไม่น้อยกว่า 1 ใน 5'
},
{
'': 'สมาชิกรัฐสภา',
'ร่าง พรบ.': '-',
'ออก พรก.': '-',
'ร่าง พรป.': '-',
'ร่าง พ.ร.บ.': '-',
'ออก พ.ร.ก.': '-',
'ร่าง พ.ร.ป.': '-',
'ร่างแก้ไขบทบัญญัติใน รธน.': 'สส.ไม่น้อยกว่า 1 ใน 5'
},
{
'': 'ประชาชนผู้มีสิทธิเลือกตั้ง',
'ร่าง พรบ.': '10,000 คน',
'ออก พรก.': '-',
'ร่าง พรป.': '-',
'ร่าง พ.ร.บ.': '10,000 คน',
'ออก พ.ร.ก.': '-',
'ร่าง พ.ร.ป.': '-',
'ร่างแก้ไขบทบัญญัติใน รธน.': '50,000 คน'
}
];
Expand Down
2 changes: 1 addition & 1 deletion src/components/DataPage/DataPage.story.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Props เหล่านี้ต้อง `bind:props` เพื่อให้
| ---------------------------- | ---------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
| `bind:searchQuery` | `string = ""` | ข้อความในกล่องค้นหา |
| `bind:selectedComboboxValue` | `SelectedComboboxValueType = ทุกช่องเป็น undefined*` | เป็น Object ที่จะมี key เป็น key ของ combobox นั้น และ value เป็น value ของ combobox นั้นๆ |
| `bind:selectedCheckboxValue` | `SelectedCheckboxValueType = ทุกชอยส์**` | เป็น Object ที่จะมี key เป็น key ของ checkbox กลุ่มนั้น และ value เป็น array ของ choice ขอกลุ่ม checkbox นั้นๆ |
| `bind:selectedCheckboxValue` | `SelectedCheckboxValueType = ทุกชอยส์**` | เป็น Object ที่จะมี key เป็น key ของ checkbox กลุ่มนั้น และ value เป็น array ของ choice ของกลุ่ม checkbox นั้นๆ |
| `bind:mounted` | `boolean = false` | เอาไว้ sync กับด้านนอกว่าตอนนี้ DataPage mount แล้วหรือยัง |

> - \*ทุกช่องเป็น undefined = `Object.fromEntries(comboboxFilterList.map((group) => [group.key, undefined]));`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ export interface Party {
| `lastname` | `string` | lastname or familyname of the politician |
| `avatar` | `string` | avatar image of the politician |
| `party` | `Party` | party of the politician |
| `role` | `string` | role of the politician in paliarment |
| `role` | `string` | role of the politician in parliament |
| `isLarge` | `boolean = false` | display a component in big scale type |
12 changes: 6 additions & 6 deletions src/components/SearchResult/SearchResult.story.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@
{ heading: 'สุชาติ ชมกลิ่น', description: 'สส.บัญชีรายชื่อ | รวมไทยสร้างชาติ', url: '' }
],
bills: [
{ heading: 'ร่าง พรบ.สุราก้าวหน้า', billStatus: BillStatus.InProgress, url: '' },
{ heading: 'ร่าง พรบ.สุขภาพจิต', billStatus: BillStatus.Merged, url: '' },
{ heading: 'ร่าง พรบ.สุขภาพแห่งชาติ', billStatus: BillStatus.Rejected, url: '' },
{ heading: 'ร่าง พรบ.สุขาภิบาล', billStatus: BillStatus.Rejected, url: '' },
{ heading: 'ร่าง พรบ.สุสานและฌาปนสถาน', billStatus: BillStatus.Enacted, url: '' }
{ heading: 'ร่าง พ.ร.บ.สุราก้าวหน้า', billStatus: BillStatus.InProgress, url: '' },
{ heading: 'ร่าง พ.ร.บ.สุขภาพจิต', billStatus: BillStatus.Merged, url: '' },
{ heading: 'ร่าง พ.ร.บ.สุขภาพแห่งชาติ', billStatus: BillStatus.Rejected, url: '' },
{ heading: 'ร่าง พ.ร.บ.สุขาภิบาล', billStatus: BillStatus.Rejected, url: '' },
{ heading: 'ร่าง พ.ร.บ.สุสานและฌาปนสถาน', billStatus: BillStatus.Enacted, url: '' }
],
votings: [
{
heading: 'ร่าง พรบ.สุราก้าวหน้า (วาระที่ 1)',
heading: 'ร่าง พ.ร.บ.สุราก้าวหน้า (วาระที่ 1)',
voteResult: DefaultVotingResult.Passed,
url: ''
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
const resultItems: SearchResultItem[] = [
{ heading: 'สุชาติ ชมกลิ่น', description: 'สส.บัญชีรายชื่อ | รวมไทยสร้างชาติ', url: '#a' },
{ heading: 'ร่าง พรบ.สุขาภิบาล', billStatus: BillStatus.InProgress, url: '#b' },
{ heading: 'ร่าง พ.ร.บ.สุขาภิบาล', billStatus: BillStatus.InProgress, url: '#b' },
{
heading: 'อภิปรายไม่ไว้วางใจ พลเอก ประวิตร วงษ์สุวรรณ (ก.พ. 65)',
voteResult: DefaultVotingResult.Passed,
Expand Down
4 changes: 2 additions & 2 deletions src/components/VoteCard/VoteCard.story.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
const passedVoting: VoteCardVoting = {
id: '1',
date: new Date('2023-08-31T17:00:00.000Z'),
nickname: 'ร่าง พรบ.สุราก้าวหน้า (ส่งไป ครม.)',
nickname: 'ร่าง พ.ร.บ.สุราก้าวหน้า (ส่งไป ครม.)',
result: DefaultVotingResult.Passed
};
const failedVoting: VoteCardVoting = {
id: '2',
date: new Date('2023-09-01T17:00:00.000Z'),
nickname: 'ร่าง พรบ.สุราก้าวหน้า (ส่งไป ครม.)',
nickname: 'ร่าง พ.ร.บ.สุราก้าวหน้า (ส่งไป ครม.)',
result: DefaultVotingResult.Failed
};
Expand Down
6 changes: 3 additions & 3 deletions src/mocks/data/bill.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { movingForwardPolitician } from './politician';
export const inProgressBill: Bill = {
id: '1',
acceptanceNumber: '1',
title: 'ร่าง พรบ.กำหนดระยะเวลาดำเนินงานในกระบวนการยุติธรรม',
nickname: 'ร่าง พรบ.กำหนดระยะเวลาดำเนินงานในกระบวนการยุติธรรม',
title: 'ร่าง พ.ร.บ.กำหนดระยะเวลาดำเนินงานในกระบวนการยุติธรรม',
nickname: 'ร่าง พ.ร.บ.กำหนดระยะเวลาดำเนินงานในกระบวนการยุติธรรม',
description:
'(ยังไม่ใช่ text จริง)ร่างรัฐธรรมนูญแห่งราชอาณาจักรไทย แก้ไขเพิ่มเติม พุทธศักราช .... (แก้ไขเพิ่มเติมหมวด 14 มาตรา 249 มาตรา 250 มาตรา 251 มาตรา 252 มาตรา 253 มาตรา 254 เพิ่มมาตรา 254/1 มาตรา 254/2 มาตรา 254/3 มาตรา 254/4 มาตรา 254/5 และมาตรา 254/6) ร่างรัฐธรรมนูญแห่งราชอาณาจักรไทย แก้ไขเพิ่มเติม พุทธศักราช',
status: BillStatus.InProgress,
Expand All @@ -27,7 +27,7 @@ export const enactedBill: Bill = {
id: '2',
acceptanceNumber: '2',
title: 'ร่างพระราชบัญญัติภาษีสรรพสามิต',
nickname: 'ร่าง พรบ.สุราก้าวหน้า',
nickname: 'ร่าง พ.ร.บ.สุราก้าวหน้า',
description:
'(ยังไม่ใช่ text จริง)ร่างรัฐธรรมนูญแห่งราชอาณาจักรไทย แก้ไขเพิ่มเติม พุทธศักราช .... (แก้ไขเพิ่มเติมหมวด 14 มาตรา 249 มาตรา 250 มาตรา 251 มาตรา 252 มาตรา 253 มาตรา 254 เพิ่มมาตรา 254/1 มาตรา 254/2 มาตรา 254/3 มาตรา 254/4 มาตรา 254/5 และมาตรา 254/6) ร่างรัฐธรรมนูญแห่งราชอาณาจักรไทย แก้ไขเพิ่มเติม พุทธศักราช',
status: BillStatus.Enacted,
Expand Down
28 changes: 14 additions & 14 deletions src/mocks/data/searchIndexes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,37 +28,37 @@ export const searchIndexes: SearchIndexes = {
bills: [
{
id: '1',
name: 'ร่าง พรบ.สุราก้าวหน้า',
name: 'ร่าง พ.ร.บ.สุราก้าวหน้า',
status: BillStatus.Rejected
},
{
id: '2',
name: 'ร่าง พรบ.งบประมาณรายจ่ายประจําปี 2566',
name: 'ร่าง พ.ร.บ.งบประมาณรายจ่ายประจําปี 2566',
status: BillStatus.InProgress
},
{
id: '3',
name: 'ร่าง พรบ.สมรสเท่าเทียม',
name: 'ร่าง พ.ร.บ.สมรสเท่าเทียม',
status: BillStatus.InProgress
},
{
id: '4',
name: 'ร่าง พรบ.แก้กฎหมายค้ามนุษย์',
name: 'ร่าง พ.ร.บ.แก้กฎหมายค้ามนุษย์',
status: BillStatus.Enacted
},
{
id: '5',
name: 'ร่าง พรบ.ควบคุมการครอบครองอาวุธปืน',
name: 'ร่าง พ.ร.บ.ควบคุมการครอบครองอาวุธปืน',
status: BillStatus.Rejected
},
{
id: '6',
name: 'ร่าง พรบ.คุ้มครองข้อมูลส่วนบุคคล',
name: 'ร่าง พ.ร.บ.คุ้มครองข้อมูลส่วนบุคคล',
status: BillStatus.InProgress
},
{
id: '7',
name: 'ร่าง พรบ.คุ้มครองสิทธิผู้บริโภค',
name: 'ร่าง พ.ร.บ.คุ้มครองสิทธิผู้บริโภค',
status: BillStatus.Enacted
}
],
Expand Down Expand Up @@ -87,37 +87,37 @@ export const searchIndexes: SearchIndexes = {
votings: [
{
id: '1',
name: 'ร่าง พรบ.สุราก้าวหน้า (วาระที่ 1)',
name: 'ร่าง พ.ร.บ.สุราก้าวหน้า (วาระที่ 1)',
result: DefaultVotingResult.Failed
},
{
id: '2',
name: 'ร่าง พรบ.แรงงานสัมพันธ์',
name: 'ร่าง พ.ร.บ.แรงงานสัมพันธ์',
result: DefaultVotingResult.Passed
},
{
id: '3',
name: 'ร่าง พรบ.ภาษีที่ดินและสิ่งปลูกสร้าง (วาระที่ 1)',
name: 'ร่าง พ.ร.บ.ภาษีที่ดินและสิ่งปลูกสร้าง (วาระที่ 1)',
result: DefaultVotingResult.Passed
},
{
id: '4',
name: 'ร่าง พรบ.ส่งเสริมการพัฒนาเศรษฐกิจดิจิทัล (วาระที่ 2)',
name: 'ร่าง พ.ร.บ.ส่งเสริมการพัฒนาเศรษฐกิจดิจิทัล (วาระที่ 2)',
result: DefaultVotingResult.Failed
},
{
id: '5',
name: 'ร่าง พรบ.คุ้มครองผู้บริโภค (วาระที่ 3)',
name: 'ร่าง พ.ร.บ.คุ้มครองผู้บริโภค (วาระที่ 3)',
result: DefaultVotingResult.Passed
},
{
id: '6',
name: 'ร่าง พรบ.คุ้มครองสิทธิส่วนบุคคล (วาระที่ 2)',
name: 'ร่าง พ.ร.บ.คุ้มครองข้อมูลส่วนบุคคล (วาระที่ 2)',
result: DefaultVotingResult.Failed
},
{
id: '7',
name: 'ร่าง พรบ.สมรสเท่าเทียม (วาระที่ 3)',
name: 'ร่าง พ.ร.บ.สมรสเท่าเทียม (วาระที่ 3)',
result: DefaultVotingResult.Failed
}
]
Expand Down
Loading

0 comments on commit 796c88d

Please sign in to comment.