Skip to content

Commit

Permalink
Added Minor Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mrkc2303 committed Dec 10, 2023
1 parent 9f12c47 commit 15b3aff
Show file tree
Hide file tree
Showing 12 changed files with 510 additions and 183 deletions.
1 change: 1 addition & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"eslint": "8.44.0",
"eslint-config-next": "13.4.9",
"ethers": "^5.7.2",
"flowbite": "^2.2.0",
"flowbite-react": "^0.7.0",
"fs": "^0.0.1-security",
"immer": "^10.0.2",
Expand Down
78 changes: 30 additions & 48 deletions src/components/FreelanceDashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,26 +67,26 @@ type Kpi = {

const kpiData: Kpi[] = [
{
title: "Sales",
metric: "$ 12,699",
progress: 15.9,
target: "$ 80,000",
delta: "13.2%",
title: "Earnings",
metric: "ETH 1.3",
progress: 32.5,
target: "ETH 4",
delta: "32.5%",
deltaType: "moderateIncrease",
},
{
title: "Profit",
metric: "$ 45,564",
progress: 36.5,
target: "$ 125,000",
delta: "23.9%",
title: "Gigs",
metric: "17",
progress: 57,
target: "30",
delta: "57%",
deltaType: "increase",
},
{
title: "Customers",
metric: "1,072",
progress: 53.6,
target: "2,000",
title: "No of Hours",
metric: "175",
progress: 21.8,
target: "800",
delta: "10.1%",
deltaType: "moderateDecrease",
},
Expand Down Expand Up @@ -408,17 +408,9 @@ export default function FreelanceDashboard() {
<Flex className="truncate" justifyContent="between">
<Flex className="truncate" justifyContent="start">
<Text>
<Bold>Zurich</Bold>
</Text>
<Icon
variant="simple"
icon={ChevronDoubleRightIcon}
size="xs"
color="slate"
/>
<Text className="truncate">
<Bold>Vienna</Bold>
<Bold>Project 4</Bold>
</Text>

</Flex>
<Text color="indigo">
<Bold>On time</Bold>
Expand All @@ -427,33 +419,25 @@ export default function FreelanceDashboard() {
<ProgressBar color="indigo" value={61} className="mt-3" />
<Flex justifyContent="between" className="mt-3">
<div>
<Title>10:40</Title>
<Text>Platform 2</Text>
<Title>4 Dec</Title>
<Text>Milestone 2</Text>
</div>
<div>
<Text className="text-center">7H 50M</Text>
<Text className="text-center">14 Days</Text>
</div>
<div className="text-right">
<Title>18:30</Title>
<Text className="text-right">No Reservation</Text>
<Title>18 Dec</Title>
<Text className="text-right">Milestone 3</Text>
</div>
</Flex>
</Card>
<Card className="max-w-md mx-auto">
<Flex className="truncate" justifyContent="between">
<Flex className="truncate" justifyContent="start">
<Text>
<Bold>Vienna</Bold>
</Text>
<Icon
variant="simple"
icon={ChevronDoubleRightIcon}
size="xs"
color="slate"
/>
<Text className="truncate">
<Bold>St. Anton am Arlberg </Bold>
<Bold>Project 2</Bold>
</Text>

</Flex>
<Text color="rose">
<Bold>Delayed</Bold>
Expand All @@ -467,29 +451,27 @@ export default function FreelanceDashboard() {
/>
<Flex justifyContent="between" className="mt-3">
<div>
<Title>13:30</Title>
<Text>Sched. 13:30</Text>
<Title>6 Dec</Title>
<Text>Milestone 1</Text>
</div>
<div className="text-right">
<Title>19:40</Title>
<Text className="text-right">Sched. 18:55</Text>
<Title>9 Dec</Title>
<Text className="text-right">Milestone 2</Text>
</div>
</Flex>
<Callout
title="+45 minutes behind plan"
title="+1 day behind plan"
icon={ExclamationIcon}
color="rose"
className="mt-6"
>
Due to maintenance work, we have a minor delay. If you need
assistance with your travels today please contact the info
hotline.
Due to issue in SDK, we have a minor delay.
</Callout>
</Card>
<Card className="max-w-md mx-auto">
<Flex justifyContent="start">
<Text>
<Bold>Nightjet Direction Bregenz</Bold>
<Bold>Project 5</Bold>
</Text>
<Icon
variant="simple"
Expand Down
153 changes: 149 additions & 4 deletions src/components/UserCard.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { ProgressCircle } from '@tremor/react'
import React from 'react'
import React, { useState } from 'react'
import { Button, Checkbox, Label, Modal, TextInput } from 'flowbite-react';
import Link from 'next/link';

type props = {
walletAddr: string;
Expand All @@ -8,6 +10,42 @@ type props = {
};

export default function UserCard({walletAddr, desc, github }: props) {
const [openModal, setOpenModal] = useState(false);

const [clientWallet, setClientWallet] = useState("");
const [freelancerWallet, setFreelancerWallet] = useState("");
const [totalAmt, setTotalAmt] = useState("");
const [mil1Amt, setMil1Amt] = useState("");
const [mil2Amt, setMil2Amt] = useState("");
const [mil3Amt, setMil3Amt] = useState("");
const [mil1Desc, setMil1Desc] = useState("");
const [mil2Desc, setMil2Desc] = useState("");
const [mil3Desc, setMil3Desc] = useState("");

function onCloseModal() {
setOpenModal(false);
}

function handleClick(): void {
const arr = [{
mil1Amt,
mil1Desc
}, {
mil2Amt,
mil2Desc
},{
mil3Amt,
mil3Desc
}]
const obj = {
clientWallet,
freelancerWallet,
totalAmt,
arr
}
console.log(obj);
}

// const userA = await PushAPI.initialize(signer);
return (
<div className="max-w-sm bg-white border border-gray-200 rounded-lg shadow dark:bg-[#4b0082] dark:border-gray-700">
Expand All @@ -24,16 +62,123 @@ export default function UserCard({walletAddr, desc, github }: props) {
value={github}
radius={40}
strokeWidth={10}
>{github}</ProgressCircle>
<button data-modal-target="crud-modal" data-modal-toggle="crud-modal" className="block text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800" type="button" >
>
{github}
</ProgressCircle>
<Button onClick={() => setOpenModal(true)} className="block text-white bg-blue-700 hover:bg-blue-800 my-5 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800">
Want to Work?
<svg className="rtl:rotate-180 w-3.5 h-3.5 ms-2" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 10">
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M1 5h12m0 0L9 1m4 4L9 9"/>
</svg>
</button>
</Button>

<Link href="/dashboard/clientCall">Talk on Video Call</Link>

</div>
<Modal show={openModal} size="md" onClose={onCloseModal} popup>
<Modal.Header />
<Modal.Body>
<div className="space-y-6 text-black">
<h3 className="text-xl font-medium text-gray-900 dark:text-white">Work through our platform</h3>
<div>
<div className="mb-2 block">
<Label htmlFor="email" value="Your email" />
</div>
<TextInput
id="wallet"
placeholder="Your Wallet Address"
className='mt-2'
value={clientWallet}
onChange={(event) => setClientWallet(event.target.value)}
required
/>

<TextInput
id="freelancerWallet"
placeholder="Freelancers Wallet Address"
className='mt-2'
value={freelancerWallet}
onChange={(event) => setFreelancerWallet(event.target.value)}
required
/>

<TextInput
id="totalAmt"
placeholder="Total Amount"
className='mt-2'
value={totalAmt}
onChange={(event) => setTotalAmt(event.target.value)}
required
/>

<label className='mt-3'>Milestone - 1</label>
<div className='mt-2'>
<TextInput
id="amtMil1"
placeholder="Milestone 1 Amount"
className=''
value={mil1Amt}
onChange={(event) => setMil1Amt(event.target.value)}
required
/>
<TextInput
id="milDesc1"
placeholder="Milestone 1 Description"
className=''
value={mil1Desc}
onChange={(event) => setMil1Desc(event.target.value)}
required
/>
</div>
<label className='mt-3'>Milestone - 2</label>
<div className='mt-2'>
<TextInput
id="amtMil2"
placeholder="Milestone 2 Amount"
className=''
value={mil2Amt}
onChange={(event) => setMil2Amt(event.target.value)}
required
/>
<TextInput
id="milDesc2"
placeholder="Milestone 2 Description"
className=''
value={mil2Desc}
onChange={(event) => setMil2Desc(event.target.value)}
required
/>
</div>

<label className='mt-3'>Milestone - 3</label>
<div className='mt-2'>
<TextInput
id="amtMil3"
placeholder="Milestone 3 Amount"
className=''
value={mil3Amt}
onChange={(event) => setMil3Amt(event.target.value)}
required
/>
<TextInput
id="milDesc3"
placeholder="Milestone 3 Description"
className=''
value={mil3Desc}
onChange={(event) => setMil3Desc(event.target.value)}
required
/>
</div>

</div>

<div className="w-full">
<Button onClick={()=> handleClick()}>Quote!</Button>
</div>

</div>
</Modal.Body>
</Modal>
</div>
)
}
Loading

0 comments on commit 15b3aff

Please sign in to comment.