5 Commits
0.2.1 ... 0.2.2

Author SHA1 Message Date
dc10fa6be4 chore: release v0.2.2
Some checks failed
Build and Push Docker Images / Build and Push Docker Images (push) Failing after 1m26s
2025-09-20 14:41:32 +05:00
39e84723b1 refactor: remove table captions from all tables 🔧 2025-09-20 14:40:55 +05:00
19043aa692 fix: set 100 MVR for default wallet topup amount 🔧 2025-09-20 14:25:48 +05:00
f2a17d522b fix: hide account information once the payment is verified/expired/cancelled 🔧 2025-09-20 14:17:48 +05:00
43b8e22196 fix: remove pagination if there is only 1 page 🔧 2025-09-20 14:09:12 +05:00
18 changed files with 1828 additions and 1846 deletions

View File

@@ -1,5 +1,12 @@
# Changelog
## <small>0.2.2 (2025-09-20)</small>
* refactor: remove table captions from all tables 🔧 ([39e8472](https://github.com/i701/sarlink-portal/commit/39e8472))
* fix: hide account information once the payment is verified/expired/cancelled 🔧 ([f2a17d5](https://github.com/i701/sarlink-portal/commit/f2a17d5))
* fix: remove pagination if there is only 1 page 🔧 ([43b8e22](https://github.com/i701/sarlink-portal/commit/43b8e22))
* fix: set 100 MVR for default wallet topup amount 🔧 ([19043aa](https://github.com/i701/sarlink-portal/commit/19043aa))
## <small>0.2.1 (2025-09-20)</small>
* fix: add release script 🔧 ([e5298aa](https://github.com/i701/sarlink-portal/commit/e5298aa))

View File

@@ -2,7 +2,6 @@ import { Skeleton } from "@/components/ui/skeleton";
import {
Table,
TableBody,
TableCaption,
TableCell,
TableFooter,
TableHead,
@@ -16,7 +15,6 @@ export default function DevicesTableSkeleton() {
<>
<div className="hidden sm:block">
<Table className="overflow-scroll">
<TableCaption>Table of all devices.</TableCaption>
<TableHeader>
<TableRow>
<TableHead>Device Name</TableHead>

View File

@@ -6,7 +6,6 @@ import { authOptions } from "@/app/auth";
import {
Table,
TableBody,
TableCaption,
TableCell,
TableFooter,
TableHead,
@@ -64,7 +63,6 @@ export async function AdminDevicesTable({
<>
<div>
<Table className="overflow-scroll">
<TableCaption>Table of all devices.</TableCaption>
<TableHeader>
<TableRow>
<TableHead>Device Name</TableHead>

View File

@@ -4,7 +4,6 @@ import { getTopups } from "@/actions/payment";
import {
Table,
TableBody,
TableCaption,
TableCell,
TableFooter,
TableHead,
@@ -56,7 +55,6 @@ export async function AdminTopupsTable({
<>
<div>
<Table className="overflow-scroll">
<TableCaption>Table of all topups.</TableCaption>
<TableHeader>
<TableRow>
<TableHead>User</TableHead>

View File

@@ -7,7 +7,6 @@ import { Button } from "@/components/ui/button";
import {
Table,
TableBody,
TableCaption,
TableCell,
TableFooter,
TableHead,
@@ -60,7 +59,6 @@ export async function UsersPaymentsTable({
) : (
<>
<Table className="overflow-scroll">
<TableCaption>Table of all users.</TableCaption>
<TableHeader>
<TableRow>
<TableHead>Devices paid</TableHead>

View File

@@ -4,7 +4,6 @@ import { authOptions } from "@/app/auth";
import {
Table,
TableBody,
TableCaption,
TableCell,
TableFooter,
TableHead,
@@ -71,7 +70,6 @@ export async function DevicesTable({
<>
<div className="hidden sm:block">
<Table className="overflow-scroll">
<TableCaption>Table of all devices.</TableCaption>
<TableHeader>
<TableRow>
<TableHead>Device Name</TableHead>

View File

@@ -1,4 +1,3 @@
import { cn } from "@/lib/utils";
import { Minus, Plus } from "lucide-react";
import { useEffect } from "react";
import {
@@ -8,18 +7,19 @@ import {
Label,
NumberField,
} from "react-aria-components";
import { cn } from "@/lib/utils";
export default function NumberInput({
maxAllowed,
label,
value,
value = 100,
onChange,
className,
isDisabled,
}: {
maxAllowed?: number;
label: string;
value: number;
value?: number;
onChange: (value: number) => void;
className?: string;
isDisabled?: boolean;
@@ -31,6 +31,7 @@ export default function NumberInput({
}
}
}, [maxAllowed, value, onChange]);
return (
<NumberField
isDisabled={isDisabled}

View File

@@ -1,9 +1,9 @@
"use client";
import { Button } from "@/components/ui/button";
import { ArrowLeftIcon, ArrowRightIcon } from "lucide-react";
import Link from "next/link";
import { useRouter, useSearchParams } from "next/navigation";
import React, { useEffect, useState } from "react";
import { Button } from "@/components/ui/button";
type PaginationProps = {
totalPages: number;
@@ -71,6 +71,10 @@ export default function Pagination({
const pageNumbers = generatePageNumbers();
if (totalPages <= 1) {
return null;
}
return (
<div className="flex items-center justify-center space-x-2 my-4">
{currentPage > 1 && (

View File

@@ -5,7 +5,6 @@ import { getPayments } from "@/actions/payment";
import {
Table,
TableBody,
TableCaption,
TableCell,
TableFooter,
TableHead,
@@ -59,7 +58,6 @@ export async function PaymentsTable({
<>
<div className="hidden sm:block">
<Table className="overflow-scroll">
<TableCaption>Table of all devices.</TableCaption>
<TableHeader>
<TableRow>
<TableHead>Details</TableHead>

View File

@@ -61,6 +61,9 @@ export default function TopupToPay({
<div className="m-2 flex items-end justify-end p-2 text-sm text-foreground border rounded">
<Table>
<TableCaption>
{!topup?.paid ||
topup?.is_expired ||
(topup?.status !== "CANCELLED" && (
<div className="max-w-sm mx-auto">
<p>Please send the following amount to the payment address</p>
<AccountInfomation
@@ -101,6 +104,7 @@ export default function TopupToPay({
</div>
)}
</div>
))}
</TableCaption>
<TableBody className="">
<TableRow>

View File

@@ -5,7 +5,6 @@ import { getTopups } from "@/actions/payment";
import {
Table,
TableBody,
TableCaption,
TableCell,
TableFooter,
TableHead,
@@ -59,7 +58,6 @@ export async function TopupsTable({
<>
<div className="hidden sm:block">
<Table className="overflow-scroll">
<TableCaption>Table of all topups.</TableCaption>
<TableHeader>
<TableRow>
<TableHead>Details</TableHead>

View File

@@ -1,18 +1,3 @@
// import {
// Table,
// TableBody,
// TableCaption,
// TableCell,
// TableFooter,
// TableHead,
// TableHeader,
// TableRow,
// } from "@/components/ui/table";
// import Link from "next/link";
// import Pagination from "./pagination";
// import { Badge } from "./ui/badge";
// import { Button } from "./ui/button";
import Link from "next/link";
import { redirect } from "next/navigation";
import { getUsers } from "@/queries/users";
@@ -24,7 +9,6 @@ import { Button } from "./ui/button";
import {
Table,
TableBody,
TableCaption,
TableCell,
TableFooter,
TableHead,
@@ -72,7 +56,6 @@ export async function UsersTable({
) : (
<>
<Table className="overflow-scroll">
<TableCaption>Table of all users.</TableCaption>
<TableHeader>
<TableRow>
<TableHead>Name</TableHead>

View File

@@ -4,7 +4,6 @@ import { redirect } from "next/navigation";
import {
Table,
TableBody,
TableCaption,
TableCell,
TableFooter,
TableHead,
@@ -79,7 +78,6 @@ export async function WalletTransactionsTable({
</div>
<div className="hidden sm:block">
<Table className="overflow-scroll">
<TableCaption>Table of all transactions.</TableCaption>
<TableHeader>
<TableRow>
<TableHead>Description</TableHead>

View File

@@ -39,8 +39,7 @@ export function Wallet({ walletBalance }: { walletBalance: number }) {
<Drawer open={isOpen} onOpenChange={setIsOpen}>
<DrawerTrigger asChild>
<Button onClick={() => setIsOpen(!isOpen)} variant="outline">
{walletBalance}{" "}
MVR
{walletBalance} MVR
<Wallet2 />
</Button>
</DrawerTrigger>

View File

@@ -10,7 +10,7 @@ export const discountPercentageAtom = atom(75);
export const numberOfDevicesAtom = atom(1);
export const numberOfDaysAtom = atom(30);
export const numberOfMonths = atom(1);
export const walletTopUpValue = atom(1);
export const walletTopUpValue = atom(100);
export const formulaResultAtom = atom("");
export const deviceCartAtom = atom<Device[]>([]);
export const cartDrawerOpenAtom = atom(false);

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "sarlink-portal",
"version": "0.2.1",
"version": "0.2.2",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "sarlink-portal",
"version": "0.2.1",
"version": "0.2.2",
"dependencies": {
"@commitlint/cli": "^19.8.1",
"@commitlint/config-conventional": "^19.8.1",

View File

@@ -1,6 +1,6 @@
{
"name": "sarlink-portal",
"version": "0.2.1",
"version": "0.2.2",
"type": "module",
"private": true,
"scripts": {