Skip to content

Commit

Permalink
fix: new category, text on landing page
Browse files Browse the repository at this point in the history
  • Loading branch information
Nitikorn committed Jul 8, 2023
1 parent 44c9ac2 commit f4f1af6
Show file tree
Hide file tree
Showing 8 changed files with 54 additions and 50 deletions.
10 changes: 5 additions & 5 deletions components/explanation/status-legend.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,34 +45,34 @@ export default Vue.extend({
icon: '<svg width="18" height="18" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="12" r="12" fill="white"/><path fill-rule="evenodd" clip-rule="evenodd" d="M24 12C24 15.1826 22.7357 18.2348 20.4853 20.4853C18.2348 22.7357 15.1826 24 12 24C8.8174 24 5.76516 22.7357 3.51472 20.4853C1.26428 18.2348 0 15.1826 0 12C0 8.8174 1.26428 5.76516 3.51472 3.51472C5.76516 1.26428 8.8174 0 12 0C15.1826 0 18.2348 1.26428 20.4853 3.51472C22.7357 5.76516 24 8.8174 24 12ZM12 6C11.8104 6.00011 11.6229 6.03993 11.4497 6.11689C11.2764 6.19386 11.1212 6.30626 10.994 6.44687C10.8668 6.58747 10.7705 6.75316 10.7113 6.93325C10.652 7.11334 10.6311 7.30385 10.65 7.4925L11.175 12.753C11.1926 12.9597 11.2872 13.1522 11.44 13.2925C11.5927 13.4327 11.7926 13.5106 12 13.5106C12.2074 13.5106 12.4073 13.4327 12.56 13.2925C12.7128 13.1522 12.8074 12.9597 12.825 12.753L13.35 7.4925C13.3689 7.30385 13.348 7.11334 13.2887 6.93325C13.2295 6.75316 13.1332 6.58747 13.006 6.44687C12.8788 6.30626 12.7236 6.19386 12.5503 6.11689C12.3771 6.03993 12.1896 6.00011 12 6ZM12.003 15C11.6052 15 11.2236 15.158 10.9423 15.4393C10.661 15.7206 10.503 16.1022 10.503 16.5C10.503 16.8978 10.661 17.2794 10.9423 17.5607C11.2236 17.842 11.6052 18 12.003 18C12.4008 18 12.7824 17.842 13.0637 17.5607C13.345 17.2794 13.503 16.8978 13.503 16.5C13.503 16.1022 13.345 15.7206 13.0637 15.4393C12.7824 15.158 12.4008 15 12.003 15Z" fill="#8F8F8F"/></svg>',
name: 'ไม่พบความเคลื่อนไหว',
description:
'หลังจากมีคำสัญญาเกิดขึ้น แล้วเมื่อค้นหาข้อมูลการดำเนินการ แล้วไม่พบความเคลื่อนไหวของการดำเนินของคำสัญญานั้นๆ',
'อยู่ในระหว่างการเตรียมยื่นเข้าสู่สภา หรือยังไม่มีความเคลื่อนไหวของร่างกฎหมายนั้น ๆ',
},
{
id: 1,
icon: '<svg width="18" height="18" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="24" height="24" rx="24" fill="white"/><path fill-rule="evenodd" clip-rule="evenodd" d="M12 24C18.6274 24 24 18.6274 24 12C24 5.37258 18.6274 0 12 0C5.37258 0 0 5.37258 0 12C0 18.6274 5.37258 24 12 24ZM19.2547 12.6757L14.7413 15.9978C14.2631 16.2802 13.65 15.9393 13.65 15.3712V14.2428H6V9.85535H13.65V8.72697C13.6496 8.59904 13.683 8.47326 13.7469 8.36245C13.8109 8.25163 13.903 8.15972 14.014 8.09606C14.125 8.0324 14.2508 7.99926 14.3788 8.00001C14.5067 8.00077 14.6322 8.03539 14.7424 8.10035L19.2547 11.4225C19.3637 11.4868 19.4539 11.5785 19.5166 11.6884C19.5793 11.7983 19.6123 11.9226 19.6123 12.0491C19.6123 12.1756 19.5793 12.2999 19.5166 12.4098C19.4539 12.5197 19.3637 12.6114 19.2547 12.6757Z" fill="#0ea5e9"/></svg>',
name: 'ยื่นเข้าสภา',
description:
'การยื่นเรื่องเข้าพิจารณาตราเป็นกฎหมายหรือให้มีผลต่อสภาแล้ว ซึ่งส่วนมากใช้กับฝ่ายค้านเพราะเนื่องจากบทบาทของฝ่ายค้านน้อยกว่ารัฐบาลและเรื่องที่เสนอ สามารถถูกปัดตกได้ง่าย ทำให้การดำเนินการตามสัญญาไม่ค่อยได้ไปต่อ ดังนั้นการพยายามผลักดันหรือยื่นเรื่องต่อสภาให้พิจารณาเป็นบทบาทของการขับเคลื่อนคำสัญญาให้ไปต่อ',
'การนำร่างกฎหมายยื่นเข้าสู่สภา เพื่อให้รัฐสภาร่วมให้ความเห็นและพิจารณาร่วม เพื่อตราเป็นกฎหมาย',
},
{
id: 2,
icon: '<svg width="18" height="18" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="12" r="12" fill="white"/><path fill-rule="evenodd" clip-rule="evenodd" d="M12 0C5.37258 0 0 5.37258 0 12C0 18.6274 5.37258 24 12 24C18.6274 24 24 18.6274 24 12C24 5.37258 18.6274 0 12 0ZM6 8C6 7.44772 6.44772 7 7 7H10C10.5523 7 11 7.44772 11 8V16C11 16.5523 10.5523 17 10 17H7C6.44772 17 6 16.5523 6 16V8ZM13 8C13 7.44772 13.4477 7 14 7H17C17.5523 7 18 7.44772 18 8V16C18 16.5523 17.5523 17 17 17H14C13.4477 17 13 16.5523 13 16V8Z" fill="#E91E63"/></svg>',
name: 'ถูกระงับ',
description:
'ส่วนใหญ่จะเป็นกรณีพิเศษที่ทำให้คำสัญญานั้นถูกระงับไป ยังไม่ได้ทำต่อ หยุดไว้ก่อน หรือถูกปัดตกจากสภาฯ',
'กรณีที่ร่างกฎหมายหยุดไว้ก่อน หรือถูกปัดตกจากสภาฯ',
},
{
id: 3,
icon: '<svg width="18" height="18" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="12" r="12" fill="white"/><path fill-rule="evenodd" clip-rule="evenodd" d="M12 24C18.6274 24 24 18.6274 24 12C24 5.37258 18.6274 0 12 0C5.37258 0 0 5.37258 0 12C0 18.6274 5.37258 24 12 24ZM10.495 5.39L10.595 5.05C11.008 3.65 12.992 3.65 13.405 5.05L13.505 5.39C13.5667 5.59959 13.6745 5.79272 13.8206 5.95521C13.9667 6.11771 14.1472 6.24544 14.3491 6.32906C14.551 6.41268 14.769 6.45006 14.9872 6.43846C15.2053 6.42685 15.4182 6.36656 15.61 6.262L15.921 6.093C17.203 5.394 18.606 6.797 17.908 8.08L17.738 8.39C17.6334 8.58185 17.5731 8.79466 17.5615 9.01285C17.5499 9.23103 17.5873 9.44904 17.6709 9.6509C17.7546 9.85275 17.8823 10.0333 18.0448 10.1794C18.2073 10.3255 18.4004 10.4333 18.61 10.495L18.95 10.595C20.35 11.008 20.35 12.992 18.95 13.405L18.61 13.505C18.4004 13.5667 18.2073 13.6745 18.0448 13.8206C17.8823 13.9667 17.7546 14.1472 17.6709 14.3491C17.5873 14.551 17.5499 14.769 17.5615 14.9872C17.5731 15.2053 17.6334 15.4182 17.738 15.61L17.907 15.921C18.606 17.203 17.203 18.606 15.92 17.908L15.61 17.738C15.4182 17.6334 15.2053 17.5731 14.9872 17.5615C14.769 17.5499 14.551 17.5873 14.3491 17.6709C14.1472 17.7546 13.9667 17.8823 13.8206 18.0448C13.6745 18.2073 13.5667 18.4004 13.505 18.61L13.405 18.95C12.992 20.35 11.008 20.35 10.595 18.95L10.495 18.61C10.4333 18.4004 10.3255 18.2073 10.1794 18.0448C10.0333 17.8823 9.85275 17.7546 9.6509 17.6709C9.44904 17.5873 9.23103 17.5499 9.01285 17.5615C8.79466 17.5731 8.58185 17.6334 8.39 17.738L8.079 17.907C6.797 18.606 5.394 17.203 6.092 15.92L6.262 15.61C6.36656 15.4182 6.42685 15.2053 6.43846 14.9872C6.45006 14.769 6.41268 14.551 6.32906 14.3491C6.24544 14.1472 6.11771 13.9667 5.95521 13.8206C5.79272 13.6745 5.59959 13.5667 5.39 13.505L5.05 13.405C3.65 12.992 3.65 11.008 5.05 10.595L5.39 10.495C6.285 10.231 6.708 9.21 6.262 8.39L6.093 8.079C5.394 6.797 6.797 5.394 8.08 6.092L8.39 6.262C8.58185 6.36656 8.79466 6.42685 9.01285 6.43846C9.23103 6.45006 9.44904 6.41268 9.6509 6.32906C9.85275 6.24544 10.0333 6.11771 10.1794 5.95521C10.3255 5.79272 10.4333 5.59959 10.495 5.39ZM14.0718 14.0718C13.5223 14.6213 12.7771 14.93 12 14.93V14.928C11.2232 14.928 10.4782 14.6194 9.92888 14.0701C9.37959 13.5208 9.071 12.7758 9.071 11.999C9.071 11.2222 9.37959 10.4772 9.92888 9.92788C10.4782 9.37859 11.2232 9.07 12 9.07C12.7771 9.07 13.5223 9.3787 14.0718 9.92818C14.6213 10.4777 14.93 11.2229 14.93 12C14.93 12.7771 14.6213 13.5223 14.0718 14.0718Z" fill="#F4C51F"/></svg>',
name: 'กำลังดำเนินการ',
description:
'กำลังดำเนินการยังไม่สำเร็จ ถึงแม้จะเริ่มเป็นบางพื้นที่ แบ่งช่วงระยะ หรือทำสัญญาแต่เริ่มมีการดำเนินการ แล้ว จัดเป็นดำเนินการ อีกทั้งสัญญาที่ดำเนินการแล้ว แต่ไม่ได้ตามเป้าหมายที่ให้สัญญา จัดเป็นกำลังดำเนินการเช่นกัน ไม่จัดเป็นสำเร็จ',
'ร่างกฎหมายที่กำลังถูกพิจารณาอยู่ในสภา ตามแต่วาระที่ร่างกฎหมายนั้น ๆ ไปถึง',
},
{
id: 4,
icon: '<svg width="18" height="18" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="12" r="12" fill="white"/><path fill-rule="evenodd" clip-rule="evenodd" d="M12 24C18.6274 24 24 18.6274 24 12C24 5.37258 18.6274 0 12 0C5.37258 0 0 5.37258 0 12C0 18.6274 5.37258 24 12 24ZM17.6969 9.99725C18.1372 9.50191 18.0926 8.74342 17.5972 8.30312C17.1019 7.86282 16.3434 7.90744 15.9031 8.40278L10.4 14.5938L8.0969 12.0028C7.6566 11.5074 6.89812 11.4628 6.40278 11.9031C5.90744 12.3434 5.86282 13.1019 6.30312 13.5972L7.90312 15.3972L9.50312 17.1973C9.73084 17.4534 10.0572 17.6 10.4 17.6C10.7428 17.6 11.0692 17.4534 11.2969 17.1973L17.6969 9.99725Z" fill="#48DBDB"/></svg>',
name: 'สำเร็จ',
description: 'ดำเนินการสำเร็จตามที่ให้สัญญาไว้',
description: 'สามารถตราเป็นกฎหมายที่บังคับใช้ได้',
},
],
};
Expand Down
12 changes: 6 additions & 6 deletions components/landing.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@
<StatusAnimation />
<h2 class="wv-h6 wv-font-bold wv-font-kondolar py-2">ติดตาม</h2>
<h1 class="wv-h4 wv-font-bold wv-font-kondolar text-mfp-orange pb-2">
45+ ร่างกฎหมาย<br class="block sm:hidden" /><br
14 ชุดกฎหมาย<br class="block sm:hidden" /><br
class="hidden sm:block"
/>
</h1>
<h1 class="wv-h4 wv-font-bold wv-font-kondolar pb-2">พรรคก้าวไกล</h1>
<h4 class="wv-b5 wv-font-kondolar px-4">ที่พร้อมยื่นทันทีหลังเปิดสภา</h4>
<h1 class="wv-h4 wv-font-bold wv-font-kondolar pb-2">เปลี่ยนประเทศ</h1>
<h4 class="wv-b5 wv-font-kondolar px-4">พร้อมยื่นเข้าสภา</h4>
<div class="flex flex-col items-center py-4 w-full px-4">
<NuxtLink class="mt-3 mb-6 mx-auto" to="/laws">
<Button
theme="primary-white"
class="h-10 w-full sm:w-max wv-font-anuphan wv-u4 flex justify-center"
>
<span>ร่างกฎหมายทั้งหมด</span>
<span>ดูร่างกฎหมายทั้งหมด</span>
<svg
width="12"
height="12"
Expand All @@ -35,9 +35,9 @@
</svg>
</Button>
</NuxtLink>
<div class="p-2 wv-font-anuphan wv-u5 bg-gray bg-opacity-10 rounded-sm">
<!-- <div class="p-2 wv-font-anuphan wv-u5 bg-gray bg-opacity-10 rounded-sm">
อัปเดตล่าสุด {{ updatedDate }}
</div>
</div> -->
</div>
<!-- <div class="w-5xl w-full px-4">
<div class="block w-full border-b border-white border-dashed h-1">
Expand Down
5 changes: 3 additions & 2 deletions components/laws/promise-overview/active-filters.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
ref="countLabel"
class="wv-h10 wv-font-kondolar wv-font-black text-mfp-orange"
>
{{ promises.length }} ร่างกฎหมาย
<!-- {{ promises.length }} ร่างกฎหมาย -->
14 ชุดกฎหมาย
</p>
<div
v-if="filters.length > 0"
Expand All @@ -48,7 +49,7 @@
/>
</div>
<p v-else class="wv-u4 wv-font-semibold">
ที่ก้าวไกลพร้อมยื่นทันทีหลังเปิดสภา
ที่พร้อมยื่นเข้าสภา
</p>
</div>
<div v-else>
Expand Down
2 changes: 1 addition & 1 deletion components/laws/promise-overview/filter-chip.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export default Vue.extend({
case FilterType.Keyword:
return `คำค้นหา: ${value}`;
case FilterType.Category:
return `ประเด็น${
return `${
promiseLawsTopicTextMap.get(value as PromiseLawsTopic)?.short
}`;
default:
Expand Down
2 changes: 1 addition & 1 deletion components/laws/topic-group/topic-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const getGroupTitle = (
if (by === 'category') {
const title = getTopicTitle(where as PromiseLawsTopic);
if (title) {
return 'ประเด็น' + getTopicTitle(where as PromiseLawsTopic);
return 'ชุดกฎหมาย' + getTopicTitle(where as PromiseLawsTopic);
} else {
return '';
}
Expand Down
2 changes: 1 addition & 1 deletion data/laws.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"id": 1803879690,
"party": "ก้าวไกล",
"title": "พ.ร.บ. รับราชการทหาร (ยกเลิกบังคับเกณฑ์ทหาร)",
"category": "politics",
"category": "army",
"status": "nodata",
"description": "เพื่อยกเลิกการเกณฑ์ทหาร และเปลี่ยนให้เป็นระบบสมัครใจ ถ้าเราสามารถผ่านกฎหมายฉบับนี้ได้ภายใน 1 ปี ปี 2567 ประเทศไทยจะไม่มีการจับใบดำ-ใบแดง ให้ปี 2566 เป็นปีสุดท้ายที่จับใบดำ-ใบแดง",
"isNCPO": false,
Expand Down
69 changes: 36 additions & 33 deletions models/promise-laws.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
import { PromiseStatus } from './promise';

export enum PromiseLawsTopic {
Politics = 'politics',
Rights = 'rights',
Land = 'land',
Government = 'government',
Public = 'public',
Politics = 'politics',
Army = 'army',
Decentralize = 'decentralize',
Economy = 'economy',
Environment = 'environment',
Labor = 'labor',
Corruption = 'corruption',
Government = 'government',
Tax = 'tax',
Public = 'public',
Land = 'land',
Labor = 'labor',
Environment = 'environment',
Rights = 'rights',
Peace = 'peace',
Diversity = 'diversity',
}

export interface PromiseLawsLink {
Expand Down Expand Up @@ -39,38 +45,35 @@ export const promiseLawsTopicOrder: PromiseLawsTopic[] = [
PromiseLawsTopic.Politics,
PromiseLawsTopic.Rights,
PromiseLawsTopic.Land,
PromiseLawsTopic.Government,
PromiseLawsTopic.Public,
PromiseLawsTopic.Economy,
PromiseLawsTopic.Environment,
PromiseLawsTopic.Economy,
PromiseLawsTopic.Public,
PromiseLawsTopic.Labor,
PromiseLawsTopic.Government,
PromiseLawsTopic.Army,
PromiseLawsTopic.Decentralize,
PromiseLawsTopic.Corruption,
PromiseLawsTopic.Tax,
PromiseLawsTopic.Peace,
PromiseLawsTopic.Diversity,
];

export const promiseLawsTopicTextMap = new Map<
PromiseLawsTopic,
{ long: string; short: string }
>([
[PromiseLawsTopic.Politics, { long: 'กฎหมายการเมือง', short: 'การเมือง' }],
[
PromiseLawsTopic.Rights,
{ long: 'กฎหมายสิทธิเสรีภาพ', short: 'สิทธิเสรีภาพ' },
],
[
PromiseLawsTopic.Land,
{ long: 'กฎหมายปฎิรูปที่ดิน', short: 'ปฎิรูปที่ดิน' },
],
[
PromiseLawsTopic.Government,
{ long: 'กฎหมายปฏิรูประบบบริหารราชการ', short: 'ระบบบริหารราชการ' },
],
[
PromiseLawsTopic.Public,
{ long: 'กฎหมายบริการสาธารณะ', short: 'บริการสาธารณะ' },
],
[PromiseLawsTopic.Economy, { long: 'กฎหมายเศรษฐกิจ', short: 'เศรษฐกิจ' }],
[
PromiseLawsTopic.Environment,
{ long: 'กฎหมายสิ่งแวดล้อม', short: 'สิ่งแวดล้อม' },
],
[PromiseLawsTopic.Labor, { long: 'กฎหมายแรงงาน', short: 'แรงงาน' }],
[PromiseLawsTopic.Army, { long: 'กองทัพ', short: 'กองทัพ' }],
[PromiseLawsTopic.Decentralize, { long: 'กระจายอำนาจ', short: 'กระจายอำนาจ' }],
[PromiseLawsTopic.Economy, { long: 'การแข่งขันทางการค้า', short: 'การแข่งขันทางการค้า' }],
[PromiseLawsTopic.Corruption, { long: 'การทุจริต', short: 'การทุจริต' }],
[PromiseLawsTopic.Government, { long: 'ระบบราชการ', short: 'ระบบราชการ' }],
[PromiseLawsTopic.Tax, { long: 'ระบบภาษี', short: 'ระบบภาษี' }],
[PromiseLawsTopic.Public, { long: 'บริการสาธารณะ', short: 'บริการสาธารณะ' }],
[PromiseLawsTopic.Land, { long: 'ที่ดิน', short: 'ที่ดิน' }],
[PromiseLawsTopic.Labor, { long: 'แรงงาน', short: 'แรงงาน' }],
[PromiseLawsTopic.Environment, { long: 'สิ่งแวดล้อม', short: 'สิ่งแวดล้อม' }],
[PromiseLawsTopic.Rights, { long: 'สิทธิเสรีภาพ', short: 'สิทธิเสรีภาพ' }],
[PromiseLawsTopic.Peace, { long: 'สันติภาพ/ความขัดแย้ง', short: 'สันติภาพ/ความขัดแย้ง' }],
[PromiseLawsTopic.Diversity, { long: 'ความหลากหลาย', short: 'ความหลากหลาย' }],
[PromiseLawsTopic.Politics, { long: 'รัฐธรรมนูญ', short: 'รัฐธรรมนูญ' }],
]);
2 changes: 1 addition & 1 deletion nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default {
{
hid: 'description',
name: 'description',
content: 'ติดตาม 45 ร่างกฎหมาย จากพรรคก้าวไกลที่ยื่นสู่สภา',
content: 'ติดตาม 14 ชุดกฎหมาย เปลี่ยนประเทศ พร้อมยื่นเข้าสภา',
},
{ name: 'format-detection', content: 'telephone=no' },
...meta,
Expand Down

0 comments on commit f4f1af6

Please sign in to comment.