changed
This commit is contained in:
parent
6b4e09abe1
commit
6717b98222
@ -2,4 +2,5 @@
|
||||
$a-tags: 'a, a:active, a:hover, a:visited';
|
||||
#{$a-tags} {
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
.overflow-table { display: block; max-width: -moz-fit-content; max-width: fit-content; overflow-x: auto; white-space: nowrap; }
|
@ -14,7 +14,7 @@ import {
|
||||
CRow,
|
||||
} from '@coreui/react'
|
||||
import CIcon from '@coreui/icons-react'
|
||||
import { cil3d, cilAirplaneMode, cilGlobeAlt, cilLocationPin, cilLockLocked, cilPeople, cilUser } from '@coreui/icons'
|
||||
import { cil3d, cilAirplaneMode, cilBadge, cilBalanceScale, cilBoatAlt, cilBriefcase, cilBuilding, cilCalendar, cilGlobeAlt, cilListNumbered, cilLocationPin, cilLockLocked, cilMoney, cilNoteAdd, cilNotes, cilPeople, cilPhone, cilShareBoxed, cilUser, cilUserPlus } from '@coreui/icons'
|
||||
import { useState } from 'react';
|
||||
import axios from 'axios';
|
||||
import { isAutheticated } from 'src/auth';
|
||||
@ -120,17 +120,17 @@ const AddAirwaysBill = () => {
|
||||
<CForm>
|
||||
<h1>Add New Bill</h1>
|
||||
<p className="text-medium-emphasis">Fill the fields and submit to add a new bill</p>
|
||||
<CRow className='flex-row align-items-center'>
|
||||
<CCol md={2} ><h4>ID:</h4></CCol>
|
||||
<CCol><h6>{code}</h6></CCol>
|
||||
{/* <p className="text-medium-emphasis">(auto-generated)</p> */}
|
||||
</CRow>
|
||||
<CRow className='flex-row align-items-center'>
|
||||
<CCol md={2} ><h4>Date:</h4></CCol>
|
||||
<CCol><h6>{formatDate()}</h6></CCol>
|
||||
{/* <p className="text-medium-emphasis">(auto-generated)</p> */}
|
||||
</CRow>
|
||||
<CInputGroup className="mb-3">
|
||||
{/* <CRow className='flex-row align-items-center'> */}
|
||||
{/* <CCol md={2} ><h4>ID:</h4></CCol> */}
|
||||
{/* <CCol><h6>{code}</h6></CCol> */}
|
||||
{/* <p className="text-medium-emphasis">(auto-generated)</p> */}
|
||||
{/* </CRow> */}
|
||||
{/* <CRow className='flex-row align-items-center'> */}
|
||||
{/* <CCol md={2} ><h4>Date:</h4></CCol> */}
|
||||
{/* <CCol><h6>{formatDate()}</h6></CCol> */}
|
||||
{/* <p className="text-medium-emphasis">(auto-generated)</p> */}
|
||||
{/* </CRow> */}
|
||||
{/* <CInputGroup className="mb-3">
|
||||
<CInputGroupText>
|
||||
<CIcon icon={cilUser} />
|
||||
</CInputGroupText>
|
||||
@ -205,7 +205,7 @@ const AddAirwaysBill = () => {
|
||||
)
|
||||
}
|
||||
</CFormSelect>
|
||||
</CInputGroup>
|
||||
</CInputGroup> */}
|
||||
<CInputGroup className="mb-3">
|
||||
<CInputGroupText>
|
||||
<CIcon icon={cilAirplaneMode} />
|
||||
@ -217,6 +217,273 @@ const AddAirwaysBill = () => {
|
||||
onChange={handleChange('AWB')}
|
||||
/>
|
||||
</CInputGroup>
|
||||
<CInputGroup className="mb-3">
|
||||
<CInputGroupText>
|
||||
<CIcon icon={cilListNumbered} />
|
||||
</CInputGroupText>
|
||||
<CFormInput
|
||||
type="text"
|
||||
placeholder="Order No
|
||||
"
|
||||
autoComplete="AWB"
|
||||
// onChange={handleChange('Order_No')}
|
||||
/>
|
||||
</CInputGroup>
|
||||
<CInputGroup className="mb-3">
|
||||
<CInputGroupText>
|
||||
<CIcon icon={cilUser} />
|
||||
</CInputGroupText>
|
||||
<CFormInput
|
||||
type="text"
|
||||
placeholder="Client Name"
|
||||
autoComplete="AWB"
|
||||
// onChange={handleChange('AWB')}
|
||||
/>
|
||||
</CInputGroup>
|
||||
<CInputGroup className="mb-3">
|
||||
<CInputGroupText>
|
||||
<CIcon icon={cilBadge} />
|
||||
</CInputGroupText>
|
||||
<CFormInput
|
||||
type="text"
|
||||
placeholder="Item Name"
|
||||
autoComplete="AWB"
|
||||
// onChange={handleChange('AWB')}
|
||||
/>
|
||||
</CInputGroup>
|
||||
<CInputGroup className="mb-3">
|
||||
<CInputGroupText>
|
||||
<CIcon icon={cilUser} />
|
||||
</CInputGroupText>
|
||||
<CFormInput
|
||||
type="text"
|
||||
placeholder="Customer Name"
|
||||
autoComplete="AWB"
|
||||
// onChange={handleChange('AWB')}
|
||||
/>
|
||||
</CInputGroup>
|
||||
<CInputGroup className="mb-3">
|
||||
<CInputGroupText>
|
||||
<CIcon icon={cilPhone} />
|
||||
</CInputGroupText>
|
||||
<CFormInput
|
||||
type="text"
|
||||
placeholder="Customer Phone"
|
||||
autoComplete="AWB"
|
||||
// onChange={handleChange('AWB')}
|
||||
/>
|
||||
</CInputGroup>
|
||||
<CInputGroup className="mb-3">
|
||||
<CInputGroupText>
|
||||
<CIcon icon={cilLocationPin} />
|
||||
</CInputGroupText>
|
||||
<CFormInput
|
||||
type="text"
|
||||
placeholder="Customer Address"
|
||||
autoComplete="AWB"
|
||||
// onChange={handleChange('AWB')}
|
||||
/>
|
||||
</CInputGroup>
|
||||
<CInputGroup className="mb-3">
|
||||
<CInputGroupText>
|
||||
<CIcon icon={cilGlobeAlt} />
|
||||
</CInputGroupText>
|
||||
<CFormInput
|
||||
type="text"
|
||||
placeholder="Country"
|
||||
autoComplete="AWB"
|
||||
// onChange={handleChange('AWB')}
|
||||
/>
|
||||
</CInputGroup>
|
||||
<CInputGroup className="mb-3">
|
||||
<CInputGroupText>
|
||||
<CIcon icon={cilAirplaneMode} />
|
||||
</CInputGroupText>
|
||||
<CFormInput
|
||||
type="text"
|
||||
placeholder="Shipped From"
|
||||
autoComplete="AWB"
|
||||
// onChange={handleChange('AWB')}
|
||||
/>
|
||||
</CInputGroup>
|
||||
<CInputGroup className="mb-3">
|
||||
<CInputGroupText>
|
||||
<CIcon icon={cilBuilding} />
|
||||
</CInputGroupText>
|
||||
<CFormInput
|
||||
type="text"
|
||||
placeholder="Logistic Name
|
||||
"
|
||||
autoComplete="AWB"
|
||||
// onChange={handleChange('AWB')}
|
||||
/>
|
||||
</CInputGroup>
|
||||
<CInputGroup className="mb-3">
|
||||
<CInputGroupText>
|
||||
<CIcon icon={cilCalendar} />
|
||||
</CInputGroupText>
|
||||
<CFormInput
|
||||
type="text"
|
||||
placeholder="Date of Dispatch
|
||||
"
|
||||
autoComplete="AWB"
|
||||
// onChange={handleChange('AWB')}
|
||||
/>
|
||||
</CInputGroup>
|
||||
<CInputGroup className="mb-3">
|
||||
<CInputGroupText>
|
||||
<CIcon icon={cilBoatAlt} />
|
||||
</CInputGroupText>
|
||||
<CFormInput
|
||||
type="text"
|
||||
placeholder="Shipments
|
||||
"
|
||||
autoComplete="AWB"
|
||||
// onChange={handleChange('AWB')}
|
||||
/>
|
||||
</CInputGroup>
|
||||
<CInputGroup className="mb-3">
|
||||
<CInputGroupText>
|
||||
<CIcon icon={cil3d} />
|
||||
</CInputGroupText>
|
||||
<CFormInput
|
||||
type="text"
|
||||
placeholder="Dimensions
|
||||
"
|
||||
autoComplete="AWB"
|
||||
// onChange={handleChange('AWB')}
|
||||
/>
|
||||
</CInputGroup>
|
||||
<CInputGroup className="mb-3">
|
||||
<CInputGroupText>
|
||||
<CIcon icon={cilBalanceScale} />
|
||||
</CInputGroupText>
|
||||
<CFormInput
|
||||
type="text"
|
||||
placeholder="Dimenssion Weight
|
||||
"
|
||||
autoComplete="AWB"
|
||||
// onChange={handleChange('AWB')}
|
||||
/>
|
||||
</CInputGroup>
|
||||
<CInputGroup className="mb-3">
|
||||
<CInputGroupText>
|
||||
<CIcon icon={cilBalanceScale} />
|
||||
</CInputGroupText>
|
||||
<CFormInput
|
||||
type="text"
|
||||
placeholder="Actual Weight
|
||||
"
|
||||
autoComplete="AWB"
|
||||
// onChange={handleChange('AWB')}
|
||||
/>
|
||||
</CInputGroup>
|
||||
<CInputGroup className="mb-3">
|
||||
<CInputGroupText>
|
||||
<CIcon icon={cilBalanceScale} />
|
||||
</CInputGroupText>
|
||||
<CFormInput
|
||||
type="text"
|
||||
placeholder="Total Weight
|
||||
"
|
||||
autoComplete="AWB"
|
||||
// onChange={handleChange('AWB')}
|
||||
/>
|
||||
</CInputGroup>
|
||||
<CInputGroup className="mb-3">
|
||||
<CInputGroupText>
|
||||
<CIcon icon={cilMoney} />
|
||||
</CInputGroupText>
|
||||
<CFormInput
|
||||
type="text"
|
||||
placeholder="Shipment Charges
|
||||
"
|
||||
autoComplete="AWB"
|
||||
// onChange={handleChange('AWB')}
|
||||
/>
|
||||
</CInputGroup>
|
||||
<CInputGroup className="mb-3">
|
||||
<CInputGroupText>
|
||||
<CIcon icon={cilNotes} />
|
||||
</CInputGroupText>
|
||||
<CFormInput
|
||||
type="text"
|
||||
placeholder="Actual Billing
|
||||
"
|
||||
autoComplete="AWB"
|
||||
// onChange={handleChange('AWB')}
|
||||
/>
|
||||
</CInputGroup>
|
||||
<CInputGroup className="mb-3">
|
||||
<CInputGroupText>
|
||||
<CIcon icon={cilNotes} />
|
||||
</CInputGroupText>
|
||||
<CFormInput
|
||||
type="text"
|
||||
placeholder="Customer Billing
|
||||
"
|
||||
autoComplete="AWB"
|
||||
// onChange={handleChange('AWB')}
|
||||
/>
|
||||
</CInputGroup>
|
||||
<CInputGroup className="mb-3">
|
||||
<CInputGroupText>
|
||||
<CIcon icon={cilMoney} />
|
||||
</CInputGroupText>
|
||||
<CFormInput
|
||||
type="text"
|
||||
placeholder="Projceted Margin
|
||||
"
|
||||
autoComplete="AWB"
|
||||
// onChange={handleChange('AWB')}
|
||||
/>
|
||||
</CInputGroup>
|
||||
<CInputGroup className="mb-3">
|
||||
<CInputGroupText>
|
||||
<CIcon icon={cilMoney} />
|
||||
</CInputGroupText>
|
||||
<CFormInput
|
||||
type="text"
|
||||
placeholder="Actual Margin"
|
||||
autoComplete="AWB"
|
||||
// onChange={handleChange('AWB')}
|
||||
/>
|
||||
</CInputGroup>
|
||||
<CInputGroup className="mb-3">
|
||||
<CInputGroupText>
|
||||
<CIcon icon={cilListNumbered} />
|
||||
</CInputGroupText>
|
||||
<CFormInput
|
||||
type="text"
|
||||
placeholder="Invoice No"
|
||||
autoComplete="AWB"
|
||||
// onChange={handleChange('AWB')}
|
||||
/>
|
||||
</CInputGroup>
|
||||
<CInputGroup className="mb-3">
|
||||
<CInputGroupText>
|
||||
<CIcon icon={cilMoney} />
|
||||
</CInputGroupText>
|
||||
<CFormInput
|
||||
type="text"
|
||||
placeholder="Received Amount"
|
||||
autoComplete="AWB"
|
||||
// onChange={handleChange('AWB')}
|
||||
/>
|
||||
</CInputGroup>
|
||||
<CInputGroup className="mb-3">
|
||||
<CInputGroupText>
|
||||
<CIcon icon={cilAirplaneMode} />
|
||||
|
||||
</CInputGroupText>
|
||||
<CFormInput
|
||||
type="text"
|
||||
placeholder="Received Date"
|
||||
autoComplete="AWB"
|
||||
// onChange={handleChange('AWB')}
|
||||
/>
|
||||
</CInputGroup>
|
||||
|
||||
<CButton color="dark" className="px-4" onClick={() => handleClick()}>
|
||||
Submit
|
||||
</CButton>
|
||||
|
@ -9,6 +9,9 @@ import {
|
||||
CCardHeader,
|
||||
CCol,
|
||||
CContainer,
|
||||
CFormInput,
|
||||
CInputGroup,
|
||||
CInputGroupText,
|
||||
CProgress,
|
||||
CRow,
|
||||
CTable,
|
||||
@ -25,6 +28,8 @@ import axios from 'axios';
|
||||
const AirwaysBill = () => {
|
||||
const { token } = isAutheticated();
|
||||
const [data, setData] = useState([])
|
||||
const [file, setFile] = useState(null)
|
||||
let formData = new FormData();
|
||||
|
||||
useEffect(() => {
|
||||
const getData = async () => {
|
||||
@ -50,29 +55,89 @@ const AirwaysBill = () => {
|
||||
today = dd + '/' + mm + '/' + yyyy;
|
||||
return today
|
||||
}
|
||||
const handleChange = (e) => {
|
||||
setFile(e.target.files[0])
|
||||
|
||||
}
|
||||
const handleClick = () => {
|
||||
|
||||
formData.append('file', file)
|
||||
|
||||
console.log(...formData)
|
||||
|
||||
|
||||
}
|
||||
console.log(file);
|
||||
return <div>
|
||||
<CRow><CCol sm='auto'>
|
||||
<CInputGroup className="mb-3" >
|
||||
<CFormInput type="file" id="inputGroupFile02" onChange={e => handleChange(e)} />
|
||||
<CButton component="label" color='dark' onClick={() => handleClick()}>Upload Spreadsheet</CButton>
|
||||
</CInputGroup>
|
||||
</CCol>
|
||||
|
||||
<CButton color="dark">+ Upload Spreadsheet</CButton>
|
||||
<Link to='/addairwaysbill'>
|
||||
<CButton className='ms-3' color="dark">+Add New Entry</CButton>
|
||||
</Link>
|
||||
<CCol sm='auto'> <Link to='/addairwaysbill'>
|
||||
<CButton className='ms-3' color="dark">+Add New Entry</CButton>
|
||||
</Link></CCol>
|
||||
|
||||
</CRow>
|
||||
<hr />
|
||||
<CTable striped hover>
|
||||
<CTableHead>
|
||||
<CTable striped hover className='overflow-table '>
|
||||
<CTableHead >
|
||||
<CTableRow>
|
||||
<CTableHeaderCell scope="col">ID</CTableHeaderCell>
|
||||
<CTableHeaderCell scope="col">Vendor</CTableHeaderCell>
|
||||
<CTableHeaderCell scope="col">Date</CTableHeaderCell>
|
||||
<CTableHeaderCell scope="col">To (Name)</CTableHeaderCell>
|
||||
<CTableHeaderCell scope="col">AWB</CTableHeaderCell>
|
||||
<CTableHeaderCell scope="col">S.No</CTableHeaderCell>
|
||||
<CTableHeaderCell scope="col">Order No</CTableHeaderCell>
|
||||
<CTableHeaderCell scope="col">Client Name</CTableHeaderCell>
|
||||
<CTableHeaderCell scope="col">Item Name</CTableHeaderCell>
|
||||
<CTableHeaderCell scope="col">Customer Name
|
||||
</CTableHeaderCell>
|
||||
<CTableHeaderCell scope="col">Customer Phone
|
||||
</CTableHeaderCell>
|
||||
<CTableHeaderCell scope="col">Customer Address
|
||||
</CTableHeaderCell>
|
||||
<CTableHeaderCell scope="col">Country
|
||||
</CTableHeaderCell>
|
||||
<CTableHeaderCell scope="col">Shipped From
|
||||
</CTableHeaderCell>
|
||||
<CTableHeaderCell scope="col">Logistic Name
|
||||
</CTableHeaderCell>
|
||||
<CTableHeaderCell scope="col">Date of Dispatch
|
||||
</CTableHeaderCell>
|
||||
<CTableHeaderCell scope="col">Shipments
|
||||
</CTableHeaderCell>
|
||||
<CTableHeaderCell scope="col">AWB No
|
||||
</CTableHeaderCell>
|
||||
<CTableHeaderCell scope="col">Dimensions
|
||||
</CTableHeaderCell>
|
||||
<CTableHeaderCell scope="col">Dimenssion Weight
|
||||
</CTableHeaderCell>
|
||||
<CTableHeaderCell scope="col">Actual Weight
|
||||
</CTableHeaderCell>
|
||||
<CTableHeaderCell scope="col">Total Weight
|
||||
</CTableHeaderCell>
|
||||
<CTableHeaderCell scope="col">Shipment Charges
|
||||
</CTableHeaderCell>
|
||||
<CTableHeaderCell scope="col">Actual Billing
|
||||
</CTableHeaderCell>
|
||||
<CTableHeaderCell scope="col">Customer Billing
|
||||
</CTableHeaderCell>
|
||||
<CTableHeaderCell scope="col">Projected Margin
|
||||
</CTableHeaderCell>
|
||||
<CTableHeaderCell scope="col">Actual Margin
|
||||
</CTableHeaderCell>
|
||||
<CTableHeaderCell scope="col">Invoice No
|
||||
</CTableHeaderCell>
|
||||
<CTableHeaderCell scope="col">Received Amount
|
||||
</CTableHeaderCell>
|
||||
<CTableHeaderCell scope="col">Received Date
|
||||
</CTableHeaderCell>
|
||||
<CTableHeaderCell scope="col">Action</CTableHeaderCell>
|
||||
</CTableRow>
|
||||
</CTableHead>
|
||||
<tbody>
|
||||
{data.map(item =>
|
||||
<tr>
|
||||
<td scope="row">{item.code}</td>
|
||||
{/* <td scope="row">{item.code}</td>
|
||||
<td>{item.vendor_name}</td>
|
||||
<td>{formatDate(item.createdAt)}</td>
|
||||
<td>{item.to_name}</td>
|
||||
@ -82,7 +147,7 @@ const AirwaysBill = () => {
|
||||
<Link to={`/viewbill/${item._id}`}><CButton color="success">View</CButton></Link>
|
||||
|
||||
</CButtonGroup>
|
||||
</td>
|
||||
</td> */}
|
||||
</tr>
|
||||
|
||||
)}
|
||||
|
Loading…
Reference in New Issue
Block a user