From b2908734248acd42457ede33ecf7e50d0ae77bd8 Mon Sep 17 00:00:00 2001
From: ap-justin <89639563+ap-justin@users.noreply.github.com>
Date: Tue, 24 Sep 2024 11:11:47 +0800
Subject: [PATCH] add lock tooltip
---
src/pages/Admin/Charity/Dashboard/Dashboard.tsx | 15 ++++++++++++++-
src/pages/Admin/Charity/Dashboard/LiqActions.tsx | 7 +++++--
src/pages/Admin/Charity/Dashboard/Loaded.tsx | 4 ++++
src/pages/Admin/Charity/Dashboard/LockActions.tsx | 7 +++++--
src/pages/Admin/Charity/Dashboard/Movements.tsx | 4 +++-
.../Admin/Charity/Dashboard/Schedule/Schedule.tsx | 2 ++
src/pages/Admin/Charity/Dashboard/monthPeriod.ts | 8 ++++++++
7 files changed, 41 insertions(+), 6 deletions(-)
diff --git a/src/pages/Admin/Charity/Dashboard/Dashboard.tsx b/src/pages/Admin/Charity/Dashboard/Dashboard.tsx
index 68e456415a..07cddc2624 100644
--- a/src/pages/Admin/Charity/Dashboard/Dashboard.tsx
+++ b/src/pages/Admin/Charity/Dashboard/Dashboard.tsx
@@ -4,9 +4,11 @@ import { useEndowBalanceQuery } from "services/apes";
import { useAdminContext } from "../../Context";
import Seo from "../Seo";
+import Icon from "components/Icon";
import { ErrorStatus } from "components/Status";
import { useEndowmentQuery } from "services/aws/aws";
import { Loaded } from "./Loaded";
+import { monthPeriod } from "./monthPeriod";
export default function Dashboard() {
const { id } = useAdminContext();
@@ -29,11 +31,22 @@ export default function Dashboard() {
return Failed to get nonprofit organisation info;
}
+ const period = monthPeriod();
+
return (
Dashboard
-
+ {period.isPre && (
+
+
+ Pending transactions are now locked for processing
+
+ )}
diff --git a/src/pages/Admin/Charity/Dashboard/Loaded.tsx b/src/pages/Admin/Charity/Dashboard/Loaded.tsx
index c344cb49ab..08c7c87709 100644
--- a/src/pages/Admin/Charity/Dashboard/Loaded.tsx
+++ b/src/pages/Admin/Charity/Dashboard/Loaded.tsx
@@ -45,6 +45,7 @@ export function Loaded({ classes = "", ...props }: Props) {
amount={`$ ${humanize(props.balances.liq ?? 0, 2)}`}
actions={
diff --git a/src/pages/Admin/Charity/Dashboard/Movements.tsx b/src/pages/Admin/Charity/Dashboard/Movements.tsx
index 3d85f867e4..b72b8fff34 100644
--- a/src/pages/Admin/Charity/Dashboard/Movements.tsx
+++ b/src/pages/Admin/Charity/Dashboard/Movements.tsx
@@ -41,6 +41,7 @@ interface Props {
mov: BalanceMovement;
balance: (flow: Flow) => number;
classes?: string;
+ disabled?: boolean;
}
export function Movements({ classes = "", ...props }: Props) {
@@ -69,6 +70,7 @@ export function Movements({ classes = "", ...props }: Props) {
from
{a.source}
diff --git a/src/pages/Admin/Charity/Dashboard/Schedule/Schedule.tsx b/src/pages/Admin/Charity/Dashboard/Schedule/Schedule.tsx
index 47831000fd..ea3d287111 100644
--- a/src/pages/Admin/Charity/Dashboard/Schedule/Schedule.tsx
+++ b/src/pages/Admin/Charity/Dashboard/Schedule/Schedule.tsx
@@ -19,6 +19,7 @@ interface Props {
periodNext: string;
periodRemaining: string;
grantFromBal: number;
+ disabled?: boolean;
}
export function Schedule(props: Props) {
const { id } = useAdminContext();
@@ -44,6 +45,7 @@ export function Schedule(props: Props) {
) : null}