fix: add report layout
This commit is contained in:
@@ -14,13 +14,8 @@ interface SendOtpPayload {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getStoredMobileNumber(): string {
|
function getStoredMobileNumber(): string {
|
||||||
<<<<<<< HEAD
|
|
||||||
// const mobileNumber = localStorage.getItem('remitter_mobile_no');
|
// const mobileNumber = localStorage.getItem('remitter_mobile_no');
|
||||||
const mobileNumber = "7890544527";
|
const mobileNumber = "7890544527";
|
||||||
=======
|
|
||||||
const mobileNumber = localStorage.getItem('remitter_mobile_no');
|
|
||||||
// const mobileNumber = "6297421727";
|
|
||||||
>>>>>>> 9850e742fc9e2db185e3a73807bc3c84570153e7
|
|
||||||
if (!mobileNumber) throw new Error('Mobile number not found.');
|
if (!mobileNumber) throw new Error('Mobile number not found.');
|
||||||
return mobileNumber;
|
return mobileNumber;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import {
|
|||||||
IconUsers,
|
IconUsers,
|
||||||
IconChevronDown,
|
IconChevronDown,
|
||||||
IconChevronUp,
|
IconChevronUp,
|
||||||
|
IconReportSearch,
|
||||||
IconSettings,
|
IconSettings,
|
||||||
} from "@tabler/icons-react";
|
} from "@tabler/icons-react";
|
||||||
import UserConfiguration from "./UserConfiguration";
|
import UserConfiguration from "./UserConfiguration";
|
||||||
@@ -36,6 +37,7 @@ export default function Login() {
|
|||||||
const [lastLoginDetails, setLastLoginDetails] = useState<string | null>(null);
|
const [lastLoginDetails, setLastLoginDetails] = useState<string | null>(null);
|
||||||
const [userMenuOpen, setUserMenuOpen] = useState(true);
|
const [userMenuOpen, setUserMenuOpen] = useState(true);
|
||||||
const [configMenuOpen, setConfigMenuOpen] = useState(false);
|
const [configMenuOpen, setConfigMenuOpen] = useState(false);
|
||||||
|
const [reportOpen, setReportMenuOpen] = useState(false);
|
||||||
|
|
||||||
async function handleLogout(e: React.FormEvent) {
|
async function handleLogout(e: React.FormEvent) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
@@ -226,6 +228,74 @@ export default function Login() {
|
|||||||
</Stack>
|
</Stack>
|
||||||
</Collapse>
|
</Collapse>
|
||||||
|
|
||||||
|
{/* Reports */}
|
||||||
|
<UnstyledButton
|
||||||
|
onClick={() => setReportMenuOpen(!reportOpen)}
|
||||||
|
style={{
|
||||||
|
display: "flex",
|
||||||
|
alignItems: "center",
|
||||||
|
justifyContent: "space-between",
|
||||||
|
width: "100%",
|
||||||
|
padding: "5px 6px",
|
||||||
|
borderRadius: "4px",
|
||||||
|
marginTop: "8px",
|
||||||
|
backgroundColor: "rgba(255,255,255,0.1)",
|
||||||
|
color: "white",
|
||||||
|
fontSize: "13px",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Group gap="xs">
|
||||||
|
<IconReportSearch size={15} />
|
||||||
|
<Text fw={600} size="sm">
|
||||||
|
Reports
|
||||||
|
</Text>
|
||||||
|
</Group>
|
||||||
|
{reportOpen ? <IconChevronUp size={15} /> : <IconChevronDown size={15} />}
|
||||||
|
</UnstyledButton>
|
||||||
|
<Collapse in={reportOpen}>
|
||||||
|
<Stack gap={2} pl="md" mt={4}>
|
||||||
|
<Box
|
||||||
|
onClick={() => setView("activeUsersReport")}
|
||||||
|
style={{
|
||||||
|
cursor: "pointer",
|
||||||
|
color: view === "activeUsersReport" ? "#02a355" : "white",
|
||||||
|
backgroundColor: view === "activeUsersReport" ? "white" : "transparent",
|
||||||
|
borderRadius: "3px",
|
||||||
|
padding: "3px 6px",
|
||||||
|
transition: "0.2s",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
• Active Users Report
|
||||||
|
</Box>
|
||||||
|
<Box
|
||||||
|
onClick={() => setView("noOfTrans")}
|
||||||
|
style={{
|
||||||
|
cursor: "pointer",
|
||||||
|
color: view === "noOfTrans" ? "#02a355" : "white",
|
||||||
|
backgroundColor: view === "noOfTrans" ? "white" : "transparent",
|
||||||
|
borderRadius: "3px",
|
||||||
|
padding: "3px 6px",
|
||||||
|
transition: "0.2s",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
• Transactions Report
|
||||||
|
</Box>
|
||||||
|
{/* <Box
|
||||||
|
onClick={() => setView("unlockUser")}
|
||||||
|
style={{
|
||||||
|
cursor: "pointer",
|
||||||
|
color: view === "unlockUser" ? "#02a355" : "white",
|
||||||
|
backgroundColor: view === "unlockUser" ? "white" : "transparent",
|
||||||
|
borderRadius: "3px",
|
||||||
|
padding: "3px 6px",
|
||||||
|
transition: "0.2s",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
• User Unlock
|
||||||
|
</Box> */}
|
||||||
|
</Stack>
|
||||||
|
</Collapse>
|
||||||
|
|
||||||
{/* Configuration */}
|
{/* Configuration */}
|
||||||
<UnstyledButton
|
<UnstyledButton
|
||||||
onClick={() => setConfigMenuOpen(!configMenuOpen)}
|
onClick={() => setConfigMenuOpen(!configMenuOpen)}
|
||||||
@@ -303,6 +373,16 @@ export default function Login() {
|
|||||||
{view === "userConf" && <UserConfiguration />}
|
{view === "userConf" && <UserConfiguration />}
|
||||||
{view === "viewUser" && <ViewUserConfiguration />}
|
{view === "viewUser" && <ViewUserConfiguration />}
|
||||||
{view === "unlockUser" && <UnlockedUsers />}
|
{view === "unlockUser" && <UnlockedUsers />}
|
||||||
|
{view === "noOfTrans" && (
|
||||||
|
<Text size="sm" c="gray">
|
||||||
|
Reports will be Coming Soon
|
||||||
|
</Text>
|
||||||
|
)}
|
||||||
|
{view === "activeUsersReport" && (
|
||||||
|
<Text size="sm" c="gray">
|
||||||
|
Active users Reports will be Coming Soon
|
||||||
|
</Text>
|
||||||
|
)}
|
||||||
{view === "ifscConfig" && (
|
{view === "ifscConfig" && (
|
||||||
<Text size="sm" c="gray">
|
<Text size="sm" c="gray">
|
||||||
IFSC Configuration Page Coming Soon
|
IFSC Configuration Page Coming Soon
|
||||||
|
|||||||
@@ -45,13 +45,8 @@ export default function Login() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
<<<<<<< HEAD
|
|
||||||
// await sendOtp({ type: 'LOGIN_OTP', username: CIF, mobileNumber: mobile });
|
// await sendOtp({ type: 'LOGIN_OTP', username: CIF, mobileNumber: mobile });
|
||||||
await sendOtp({ type: 'LOGIN_OTP', username: CIF, mobileNumber: "7890544527" });
|
await sendOtp({ type: 'LOGIN_OTP', username: CIF, mobileNumber: "7890544527" });
|
||||||
=======
|
|
||||||
await sendOtp({ type: 'LOGIN_OTP', username: CIF, mobileNumber: mobile });
|
|
||||||
// await sendOtp({ type: 'LOGIN_OTP', username: CIF, mobileNumber: "6297421727" });
|
|
||||||
>>>>>>> 9850e742fc9e2db185e3a73807bc3c84570153e7
|
|
||||||
notifications.show({
|
notifications.show({
|
||||||
color: 'orange',
|
color: 'orange',
|
||||||
title: 'OTP Required',
|
title: 'OTP Required',
|
||||||
@@ -72,13 +67,8 @@ export default function Login() {
|
|||||||
async function handleVerifyOtp(mobile?: string) {
|
async function handleVerifyOtp(mobile?: string) {
|
||||||
try {
|
try {
|
||||||
if (mobile) {
|
if (mobile) {
|
||||||
<<<<<<< HEAD
|
|
||||||
// await verifyLoginOtp(otp, mobile);
|
// await verifyLoginOtp(otp, mobile);
|
||||||
await verifyLoginOtp(otp, '7890544527');
|
await verifyLoginOtp(otp, '7890544527');
|
||||||
=======
|
|
||||||
await verifyLoginOtp(otp, mobile);
|
|
||||||
// await verifyLoginOtp(otp, '6297421727');
|
|
||||||
>>>>>>> 9850e742fc9e2db185e3a73807bc3c84570153e7
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user