-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a0c0bed
commit bdadd4f
Showing
7 changed files
with
333 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
export const columns = [ | ||
{ | ||
accessorKey: "month", | ||
header: "Month", | ||
}, | ||
{ accessorKey: "Category A", header: "Category A" }, | ||
{ accessorKey: "Category B", header: "Category B" }, | ||
{ accessorKey: "Category C", header: "Category C" }, | ||
{ accessorKey: "Category D", header: "Category D" }, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import { Alert } from "@mantine/core"; | ||
import { IconInfoCircle } from "@tabler/icons-react"; | ||
import Typography from "@/components/Typography"; | ||
import { DataTable } from "@/components/ui/data-table"; | ||
import { API_URL } from "@/config"; | ||
import { fetchApi } from "@/utils/fetchApi"; | ||
import { columns } from "./columns"; | ||
|
||
const PQPRatesPage = async () => { | ||
const pqpRates = await fetchApi< | ||
Array<Record<string, Record<string, number>>> | ||
>(`${API_URL}/coe/pqp`); | ||
|
||
const data = Object.entries(pqpRates).map(([month, pqpRates]) => ({ | ||
month, | ||
...pqpRates, | ||
})); | ||
|
||
return ( | ||
<div className="flex flex-col gap-y-4"> | ||
<Typography.H1>PQP Rates</Typography.H1> | ||
<Alert | ||
variant="light" | ||
title="Understanding PQP Rates" | ||
icon={<IconInfoCircle />} | ||
> | ||
<Typography.P> | ||
Certificate of Entitlement (COE) Prevailing Quota Premium (PQP) rates | ||
are specific to Singapore's vehicle ownership system. They | ||
represent the average COE prices over the last 3 months, which car | ||
owners must pay to renew their existing vehicle's COE. | ||
</Typography.P> | ||
<Typography.P> | ||
The PQP system allows car owners to extend their COE for another 5 or | ||
10 years by paying the prevailing market rate rather than bidding in | ||
the open market. This is particularly relevant for owners who wish to | ||
keep their vehicles beyond the initial 10-year COE period. | ||
</Typography.P> | ||
<Typography.P> | ||
The Land Transport Authority (LTA) calculates and updates these rates | ||
monthly based on the moving average of COE prices in the preceding | ||
three months. | ||
</Typography.P> | ||
</Alert> | ||
<DataTable columns={columns} data={data} /> | ||
</div> | ||
); | ||
}; | ||
|
||
export default PQPRatesPage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.