Compare commits

...

6 Commits

Author SHA1 Message Date
priyanshuvish
653fecd961 final merge 5 sept 2024-09-05 19:58:52 +05:30
priyanshuvish
654b5fc66a Merge branch 'dev' of http://git.wdipl.com/Siddhesh.More/optifii-employee into dev 2024-09-05 19:56:31 +05:30
priyanshuvish
e0858e470d New report update 2024-09-05 19:55:55 +05:30
priyanshuvish
98f0d203d9 Merge branch 'main' of http://git.wdipl.com/Siddhesh.More/optifii-employee into dev 2024-09-05 17:03:34 +05:30
priyanshuvish
cc333cb1c6 update 2024-09-05 17:03:12 +05:30
d718ba329a Food logo update 2024-09-05 17:01:31 +05:30
6 changed files with 236 additions and 39 deletions

View File

@@ -5,7 +5,7 @@ import { useNavigate } from "react-router-dom";
const MiniHeader = ({ title, subTitle, backButton }) => {
const navigate = useNavigate();
const [firstPart, secondPart] = title.split(/ (.+)/);
const [firstPart, secondPart] = title && title?.split(/ (.+)/);
return (
<HStack gap={3} mb={4}>

View File

@@ -222,85 +222,93 @@ const GlobalStateProvider = ({ children }) => {
{
"id": 1,
"transactionType": "Dine In",
"date": "31- 02-2024 04.20 pm",
"date": "25-08-2024 01:15 pm",
"walletType": "Food",
"document": `${DummyPdf}`,
"amountSpent": "₹ 5000"
"amountSpent": "₹ 3200"
},
{
"id": 2,
"transactionType": "Dine In",
"date": "31- 02-2024 04.20 pm",
"walletType": "Food",
"transactionType": "Take Away",
"date": "22-07-2024 03:30 pm",
"walletType": "Travel",
"document": `${DummyPdf}`,
"amountSpent": "₹ 5000"
"amountSpent": "₹ 1500"
},
{
"id": 3,
"transactionType": "Dine In",
"date": "31- 02-2024 04.20 pm",
"walletType": "Food",
"transactionType": "Delivery",
"date": "15-06-2024 11:00 am",
"walletType": "Shopping",
"document": `${DummyPdf}`,
"amountSpent": "₹ 5000"
"amountSpent": "₹ 2450"
},
{
"id": 4,
"transactionType": "Dine In",
"date": "31- 02-2024 04.20 pm",
"walletType": "Food",
"date": "09-05-2024 08:45 pm",
"walletType": "Groceries",
"document": `${DummyPdf}`,
"amountSpent": "₹ 5000"
"amountSpent": "₹ 5400"
},
{
"id": 5,
"transactionType": "Dine In",
"date": "31- 02-2024 04.20 pm",
"walletType": "Food",
"transactionType": "Take Away",
"date": "02-07-2024 12:30 pm",
"walletType": "Entertainment",
"document": `${DummyPdf}`,
"amountSpent": "₹ 5000"
"amountSpent": "₹ 1300"
},
{
"id": 6,
"transactionType": "Dine In",
"date": "31- 02-2024 04.20 pm",
"walletType": "Food",
"transactionType": "Delivery",
"date": "10-03-2024 06:15 pm",
"walletType": "Electronics",
"document": `${DummyPdf}`,
"amountSpent": "₹ 5000"
"amountSpent": "₹ 6800"
},
{
"id": 7,
"transactionType": "Dine In",
"date": "31- 02-2024 04.20 pm",
"walletType": "Food",
"date": "18-09-2024 05:20 pm",
"walletType": "Utilities",
"document": `${DummyPdf}`,
"amountSpent": "₹ 5000"
"amountSpent": "₹ 4000"
},
{
"id": 8,
"transactionType": "Dine In",
"date": "31- 02-2024 04.20 pm",
"transactionType": "Delivery",
"date": "12-04-2024 02:50 pm",
"walletType": "Food",
"document": `${DummyPdf}`,
"amountSpent": "₹ 5000"
"amountSpent": "₹ 2700"
},
{
"id": 9,
"transactionType": "Dine In",
"date": "31- 02-2024 04.20 pm",
"walletType": "Food",
"date": "05-11-2024 07:10 pm",
"walletType": "Health",
"document": `${DummyPdf}`,
"amountSpent": "₹ 5000"
"amountSpent": "₹ 4900"
},
{
"id": 10,
"transactionType": "Dine In",
"date": "31- 02-2024 04.20 pm",
"transactionType": "Take Away",
"date": "19-08-2024 09:40 am",
"walletType": "Food",
"document": `${DummyPdf}`,
"amountSpent": "₹ 5000"
"amountSpent": "₹ 2200"
},
{
"id": 11,
"transactionType": "Dine In",
"date": "18-09-2024 05:20 pm",
"walletType": "Utilities",
"document": `${DummyPdf}`,
"amountSpent": "₹ 4000"
}
]
)
return (

View File

@@ -0,0 +1,150 @@
import { Box, Input, Text, HStack, Button, Icon, Tag, Divider, flexbox, } from '@chakra-ui/react'
import React, { useContext } from 'react'
import MiniHeader from '../../Components/MiniHeader'
import { OPACITY_ON_LOAD } from '../../Layout/animations'
import { MdOutlineRamenDining } from "react-icons/md";
import { RiDeleteBin5Line } from "react-icons/ri";
import { FaRegFilePdf } from "react-icons/fa";
import { AiOutlineEdit } from "react-icons/ai";
import GlobalStateContext from '../../Contexts/GlobalStateContext';
const AddNewReport = () => {
const { requestsTable } = useContext(GlobalStateContext);
return (
<Box {...OPACITY_ON_LOAD} p={4} overflowX={"scroll"}>
<MiniHeader
title={"Add New Report"}
backButton={true}
subTitle={"Lorem ipsum dolor sit amet, consectetur adipiscing elit."}
/>
<Box>
<HStack gap={"10"} align={"end"}>
<Box flex={"1"}>
<Text mb='6px' fontSize={"sm"} color={"#313039"} fontWeight={"600"}>Name of the Report</Text>
<Input border={"1px solid #6311CB"}
_hover={"inherit"} />
</Box>
<Button
bg={"linear-gradient(90deg, #3725EA 0%, #5E0FCD 100%)"}
color={"#fff"}
fontSize={"sm"}
fontWeight={"400"}
_hover={"inherit"}
px={"10"}
>
Send for Approval
</Button>
</HStack>
</Box>
<Box display={"flex"} gap={"4"} flexWrap={"wrap"} my={"8"}>
{requestsTable?.map((request, index) =>
<Box key={index} className='card' p={"4"} w={"32%"} rounded={"md"} border={"none"} boxShadow={"md"}
>
<HStack justifyContent={"space-between"}>
<HStack>
<Icon
as={MdOutlineRamenDining}
boxSize={8}
p={1.5}
bg={"#6311cb14"}
rounded={"full"}
color={"#111111"}
/>
<Text
fontSize={"sm"}
color={"#363636"}
fontWeight={"600"}
mb={"0"}
>
{request?.transactionType}
</Text>
</HStack>
<RiDeleteBin5Line fontSize={"18px"} />
</HStack>
<Text
fontSize={"md"}
color={"#363636"}
fontWeight={"600"}
mt={"4"}
mb={"1"}
>
{request?.amountSpent}
</Text>
<Text
fontSize={"xs"}
color={"#545454"}
fontWeight={"500"}
>
{request?.date}
</Text>
<HStack gap={"4"}>
<Tag
bg={"#F0E6FF"}
color={"#fff"}
size="sm"
py={"2"}
px={"4"}
>
<Text
bgGradient="linear(to-l, #3725EA, #5E0FCD)"
bgClip="text"
fontSize={"xs"}
as={"span"}
fontWeight={600}
>Food</Text>
</Tag>
<Button
as="a"
color="#363636"
fontWeight={"500"}
bg={"transparent"}
border={"1px solid #CCCCCC"}
borderRadius="full"
size="xs"
gap={"6px"}
alignItems={"center"}
_hover={{ bg: "inherit" }}
fontSize={'xs'}
py={"4"}
px={"3"}
>
<FaRegFilePdf color="#B43331" />
Receipt.pdf
</Button>
</HStack>
<Divider />
<HStack justify={'space-between'}>
<Text
color={"#159F2B"}
fontWeight={"600"}
fontSize={"md"}
mb={"0"}
>
Approved
</Text>
<HStack>
<AiOutlineEdit color={"#3725EA"}
fontSize={"19px"} />
<Text
bgGradient="linear(to-l, #3725EA, #5E0FCD)"
bgClip="text"
fontSize={"sm"}
mb={"0"}
fontWeight={"500"}
>
Edit
</Text>
</HStack>
</HStack>
</Box>
)}</Box >
</Box >
)
}
export default AddNewReport

View File

@@ -0,0 +1,24 @@
import { Box, Input, Text, HStack, Button, Icon, Tag, Divider, flexbox, } from '@chakra-ui/react'
import React, { useContext } from 'react'
import MiniHeader from '../../Components/MiniHeader'
import { OPACITY_ON_LOAD } from '../../Layout/animations'
import { MdOutlineRamenDining } from "react-icons/md";
import { RiDeleteBin5Line } from "react-icons/ri";
import { FaRegFilePdf } from "react-icons/fa";
import { AiOutlineEdit } from "react-icons/ai";
import GlobalStateContext from '../../Contexts/GlobalStateContext';
const ReportsHistory = () => {
return (
<Box {...OPACITY_ON_LOAD} p={4} overflowX={"scroll"}>
<MiniHeader
title={"Reports History"}
backButton={true}
subTitle={"Lorem ipsum dolor sit amet, consectetur adipiscing elit."}
/>
</Box>
)
}
export default ReportsHistory

View File

@@ -23,8 +23,10 @@ import MiniHeader from "../../Components/MiniHeader";
import NormalTable from "../../Components/DataTable/NormalTable";
import { FaRegFilePdf } from "react-icons/fa";
import { MdOutlineRamenDining } from "react-icons/md";
import { useNavigate } from "react-router-dom";
const Requests = () => {
const navigate = useNavigate()
const { requestsTable } = useContext(GlobalStateContext);
const [isLoading, setIsLoading] = useState(false);
@@ -76,8 +78,14 @@ const Requests = () => {
"Wallet Type": (
<Tag bg={index % 2 === 0 ? "#E8E6FF" : "#fff"}
size="sm">{item.walletType}</Tag>
<Tag bg={index % 2 === 0 ? "#F0E6FF" : "#fff"}
size="sm"><Text
bgGradient="linear(to-l, #3725EA, #5E0FCD)"
bgClip="text"
fontSize={"xs"}
as={"span"}
fontWeight={600}
>{item.walletType}</Text></Tag>
),
Document: (
@@ -236,6 +244,9 @@ const Requests = () => {
// bgGradient: "linear(to-r, #5E0FCD, #3725EA)",
opacity: 1,
}}
onClick={() => navigate('/reports/add-new-report')}
// onClick={() => navigate('/reports/reports-history')}
>
Add to Report
</Button>

View File

@@ -1,16 +1,20 @@
import Dashbaord from "../Pages/Dashbaord";
import Expenses from "../Pages/Expenses/Expenses";
import AddNewReport from "../Pages/Report/AddNewReport";
// import ReportsHistory from "../Pages/Report/ReportsHistory";
import Report from "../Pages/Report/Report";
import Requests from "../Pages/Requests/Requests";
import Expenses from "../Pages/Expenses/Expenses";
import Benefit from "../Pages/Benefit/Benefit";
import Gifts from "../Pages/Gifts/Gifts";
import HelpAndSupport from "../Pages/HelpAndSupport/HelpAndSupport";
export const RouteLink = [
{ path: "/", Component: Dashbaord },
{ path: "/expenses", Component: Expenses },
{ path: "/reports", Component: Report },
{ path: "/reports/add-new-report", Component: AddNewReport },
// { path: "/reports/reports-history", Component: ReportsHistory },
{ path: "/requests", Component: Requests },
{ path: "/benefit", Component: Benefit },
{ path: "/gifts", Component: Gifts },