feat: add initial support for points page

This commit is contained in:
Arvid Norlin
2024-05-13 15:24:15 +02:00
parent e853f3980a
commit 7ad8726633
10 changed files with 185 additions and 1 deletions
@@ -0,0 +1,14 @@
.card {
background-color: var(--Base-Fill-Normal);
border-radius: 16px;
color: var(Theme/Primary/Light/On Surface/Text);
display: flex;
flex-direction: column;
align-items: center;
gap: 16px;
}
.points {
font-size: var(--typography-Title2-Desktop-fontSize);
margin: 0;
}
@@ -0,0 +1,19 @@
import { _ } from "@/lib/translation"
import styles from "./currentPointsBalance.module.css"
const CurrentPointsBalance = () => {
const points = 30000
return (
<div className={styles.card}>
<h2>{_("Total points*")}</h2>
<p className={styles.points}>{`${_("Points")}: ${points}`}</p>
<p className={styles.disclaimer}>
{_("*Points may take up to 10 days to be displayed.")}
</p>
</div>
)
}
export default CurrentPointsBalance
@@ -0,0 +1,32 @@
.container {
display: flex;
flex-direction: column;
align-items: center;
gap: 16px;
}
.table {
border-spacing: 0;
border-collapse: collapse;
width: 100%;
}
.thead {
background-color: var(--Base-Fill-Normal);
border-left: 1px solid var(--Base-Fill-Normal);
border-right: 1px solid var(--Base-Fill-Normal);
}
.tr {
border: 1px solid #e6e9ec;
}
.th {
text-align: left;
padding: 20px 32px;
}
.td {
text-align: left;
padding: 16px 32px;
}
@@ -0,0 +1,44 @@
import { _ } from "@/lib/translation"
import Button from "@/components/TempDesignSystem/Button"
import styles from "./earnAndBurn.module.css"
const EarnAndBurn = () => {
return (
<div className={styles.container}>
<table className={styles.table}>
<thead className={styles.thead}>
<tr>
<th className={styles.th}>{_("Arrival date")}</th>
<th className={styles.th}>{_("Description")}</th>
<th className={styles.th}>{_("Booking number")}</th>
<th className={styles.th}>{_("Transaction date")}</th>
<th className={styles.th}>{_("Points")}</th>
</tr>
</thead>
<tbody>
<tr className={styles.tr}>
<td className={styles.td}>23 May 2023</td>
<td className={styles.td}>Scandic Mölndal, Mölndal 2 nights</td>
<td className={styles.td}>5123456576</td>
<td className={styles.td}>26 May 2023</td>
<td className={styles.td}>30000</td>
</tr>
<tr className={styles.tr}>
<td className={styles.td}>23 May 2023</td>
<td className={styles.td}>Scandic Mölndal, Mölndal 2 nights</td>
<td className={styles.td}>5123456576</td>
<td className={styles.td}>26 May 2023</td>
<td className={styles.td}>-30000</td>
</tr>
</tbody>
</table>
<Button intent="primary" bgcolor="white" type="button">
{_("See more transactions")}
</Button>
</div>
)
}
export default EarnAndBurn
@@ -0,0 +1,25 @@
.table {
border-spacing: 0;
border-collapse: collapse;
width: 100%;
}
.thead {
background-color: var(--Base-Fill-Normal);
border-left: 1px solid var(--Base-Fill-Normal);
border-right: 1px solid var(--Base-Fill-Normal);
}
.tr {
border: 1px solid #e6e9ec;
}
.th {
text-align: left;
padding: 20px 32px;
}
.td {
text-align: left;
padding: 16px 32px;
}
@@ -0,0 +1,26 @@
import { _ } from "@/lib/translation"
import styles from "./expiringPoints.module.css"
export const ExpiringPoints = () => {
return (
<table className={styles.table}>
<thead className={styles.thead}>
<tr>
<th className={styles.th}>{_("Arrival date")}</th>
<th className={styles.th}>{_("Points")}</th>
</tr>
</thead>
<tbody>
<tr className={styles.tr}>
<td className={styles.td}>23 May 2023</td>
<td className={styles.td}>30000</td>
</tr>
<tr className={styles.tr}>
<td className={styles.td}>23 May 2023</td>
<td className={styles.td}>-15000</td>
</tr>
</tbody>
</table>
)
}