Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions client/src/components/dashboard/DonorDashboard.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,22 @@
import React from 'react'
import SideNav from './StoreDashboard/SideNav'
import IntroCard from './StoreDashboard/IntroCard'

function DonorDashboard() {
const user = {name:'Anuj',email:'anujpillai1201@gmail.com'}
return (
<div>
DonorDashboard
<div className="Container">
<div class="row">
<div class="col-sm-2">
<div className="Content-left">
<SideNav />
</div>
</div>
<div class="col-sm-10">
<IntroCard user={user}/>
<h1>Hello from donor dashboard</h1>
</div>
</div>
</div>
)
}
Expand Down
4 changes: 1 addition & 3 deletions client/src/components/dashboard/StoreDashboard.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@

.Container{
height: 100%;
}
.Content-right{
height: 100%;
height: auto;
}
.Content-left{
height: 100%;
Expand Down
1 change: 0 additions & 1 deletion client/src/components/dashboard/StoreDashboard/styler.css
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@
{
height: 100%;
width: 15%;
background-color: #4CCCC0;
}

.medicine-card{
Expand Down
1 change: 1 addition & 0 deletions client/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ body {
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
background: #DDF0EE;
}

code {
Expand Down
10 changes: 5 additions & 5 deletions client/src/views/Billing/Billing.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
height: 160px;
background: #E8E7FE;
display: flex;
border: 1px solid #4F46E5;
border: 1px solid #40ccc4;
}

.billingtoph1{
Expand All @@ -29,7 +29,7 @@
}

.formhead{
background: #4F46E5;
background: #40ccc4;
padding: 19px;
font-weight: normal;
font-size: 18px;
Expand Down Expand Up @@ -75,7 +75,7 @@
.formsubmit{
width: 223px;
height: 37px;
background: #4F46E5;
background: #40ccc4;
color: white;
margin-left: auto;
margin-right: auto;
Expand Down Expand Up @@ -117,7 +117,7 @@

.removebutton{
width: fit-content;
background: #4F46E5;
background: #40ccc4;
color: white;
margin-right: 14px;
padding: 7px;
Expand All @@ -126,7 +126,7 @@

.addbutton{
width: fit-content;
background: #4F46E5;
background: #40ccc4;
color: white;
margin-right: 14px;
padding: 7px;
Expand Down
121 changes: 66 additions & 55 deletions client/src/views/Billing/Billing.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ import React, { useState } from 'react'
import './Billing.css'
import { v4 as uuidv4 } from 'uuid';
import axios from 'axios';
import InvoiceForm from '../../components/dashboard/StoreDashboard/InvoiceForm';
import TitleInvoice from '../../components/dashboard/StoreDashboard/TitleInvoice';
import SideNav from '../../components/dashboard/StoreDashboard/SideNav';

const Billing = () => {
const [formkey, setFormkey] = useState(2);
const [amount, setAmount] = useState();
Expand Down Expand Up @@ -67,63 +71,70 @@ const Billing = () => {
}
return (
<div className='billing'>
<div className="billingtop">
<h1 className='billingtoph1'>Billing</h1>
</div>
<div className='billingbottom'>
<form className='billingform' onSubmit={handleSubmit}>
<h1 className='formhead'>Bill 12abc435</h1>
<input className ="forminput" type='text' placeholder="Customer Name" value={customerName} onChange={handleCustomerName}/>
<input className ="forminput" type='text' placeholder="Customer Contact" value={customerContact} onChange={handleCustomerContact}/>
<input className ="forminput" type='text' placeholder="Reffered By" value={referredBy} onChange={handleReferredBy}/>
<div className='formlabel'>
<label className='label'>Bill Date</label>
<div class="row">
<div class="col-sm-2">
<div className="Content-left">
<SideNav></SideNav>
</div>
<input className ="forminput" type='date' placeholder="" value={billDate} onChange={handleBillDate}/>
<div className='formlabeldropdown'>
<label className='label'>Choose Medicine</label>
<label className='label'>Quantity</label>
</div>
<div class="col-sm-10">
<TitleInvoice></TitleInvoice>
<div className='billingbottom'>
<form className='billingform' onSubmit={handleSubmit}>
<h1 className='formhead'>Bill 12abc435</h1>
<input className ="forminput" type='text' placeholder="Customer Name" value={customerName} onChange={handleCustomerName}/>
<input className ="forminput" type='text' placeholder="Customer Contact" value={customerContact} onChange={handleCustomerContact}/>
<input className ="forminput" type='text' placeholder="Reffered By" value={referredBy} onChange={handleReferredBy}/>
<div className='formlabel'>
<label className='label'>Bill Date</label>
</div>
<input className ="forminput" type='date' placeholder="" value={billDate} onChange={handleBillDate}/>
<div className='formlabeldropdown'>
<label className='label'>Choose Medicine</label>
<label className='label'>Quantity</label>
</div>
{inputFields.map((inputField , index)=> (
<div className="formfields">
<select
name="medicinename"
label="Medicine Name"
value={inputFields.medicineName}
onChange={event => handleChangeInput(inputField.id, event)}
className='medicinename'
>
<option value="none" selected disabled hidden>Select an Option</option>
<option value="String">String</option>
<option value="Alphanumeric">Alphanumeric</option>
<option value="Number">Number</option>
<option value="Date">Date</option>
</select>
<input
name="medicinequantity"
label="Medicine Quantity"
onChange={event => handleChangeInput(inputField.id, event)}
className = "medicinequantity"
/>
<button disabled={inputFields.length === 1} onClick={() => handleRemoveFields(index)} className='removebutton'>
Remove
</button>
{index === inputFields.length - 1?
<button onClick={handleAddFields} className='addbutton'>
Add
</button>
:null}
</div>
))}
<h1 className='totalmoney'>Total Amount - 200</h1>
<button
type="submit"
className='formsubmit'
onClick = {(e) => handleSubmit(e, customerName, customerContact, referredBy, billDate, inputFields)}
>
Submit
</button>
</form>
</div>
{inputFields.map((inputField , index)=> (
<div className="formfields">
<select
name="medicinename"
label="Medicine Name"
value={inputFields.medicineName}
onChange={event => handleChangeInput(inputField.id, event)}
className='medicinename'
>
<option value="none" selected disabled hidden>Select an Option</option>
<option value="String">String</option>
<option value="Alphanumeric">Alphanumeric</option>
<option value="Number">Number</option>
<option value="Date">Date</option>
</select>
<input
name="medicinequantity"
label="Medicine Quantity"
onChange={event => handleChangeInput(inputField.id, event)}
className = "medicinequantity"
/>
<button disabled={inputFields.length === 1} onClick={() => handleRemoveFields(index)} className='removebutton'>
Remove
</button>
{index === inputFields.length - 1?
<button onClick={handleAddFields} className='addbutton'>
Add
</button>
:null}
</div>
))}
<h1 className='totalmoney'>Total Amount - 200</h1>
<button
type="submit"
className='formsubmit'
onClick = {(e) => handleSubmit(e, customerName, customerContact, referredBy, billDate, inputFields)}
>
Submit
</button>
</form>
</div>
</div>
</div>
)
Expand Down
3 changes: 2 additions & 1 deletion client/src/views/Invoice/Invoice.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.Container{
height: 800px;
width: 100%;
padding-bottom: 30px;
background: #DDF0EE;
}
.invoice-card{
margin-top: 20px;
Expand Down