changed
This commit is contained in:
parent
6b4e09abe1
commit
6717b98222
@ -3,3 +3,4 @@ $a-tags: 'a, a:active, a:hover, a:visited';
|
|||||||
#{$a-tags} {
|
#{$a-tags} {
|
||||||
text-decoration: none;
|
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,
|
CRow,
|
||||||
} from '@coreui/react'
|
} from '@coreui/react'
|
||||||
import CIcon from '@coreui/icons-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 { useState } from 'react';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { isAutheticated } from 'src/auth';
|
import { isAutheticated } from 'src/auth';
|
||||||
@ -120,17 +120,17 @@ const AddAirwaysBill = () => {
|
|||||||
<CForm>
|
<CForm>
|
||||||
<h1>Add New Bill</h1>
|
<h1>Add New Bill</h1>
|
||||||
<p className="text-medium-emphasis">Fill the fields and submit to add a new bill</p>
|
<p className="text-medium-emphasis">Fill the fields and submit to add a new bill</p>
|
||||||
<CRow className='flex-row align-items-center'>
|
{/* <CRow className='flex-row align-items-center'> */}
|
||||||
<CCol md={2} ><h4>ID:</h4></CCol>
|
{/* <CCol md={2} ><h4>ID:</h4></CCol> */}
|
||||||
<CCol><h6>{code}</h6></CCol>
|
{/* <CCol><h6>{code}</h6></CCol> */}
|
||||||
{/* <p className="text-medium-emphasis">(auto-generated)</p> */}
|
{/* <p className="text-medium-emphasis">(auto-generated)</p> */}
|
||||||
</CRow>
|
{/* </CRow> */}
|
||||||
<CRow className='flex-row align-items-center'>
|
{/* <CRow className='flex-row align-items-center'> */}
|
||||||
<CCol md={2} ><h4>Date:</h4></CCol>
|
{/* <CCol md={2} ><h4>Date:</h4></CCol> */}
|
||||||
<CCol><h6>{formatDate()}</h6></CCol>
|
{/* <CCol><h6>{formatDate()}</h6></CCol> */}
|
||||||
{/* <p className="text-medium-emphasis">(auto-generated)</p> */}
|
{/* <p className="text-medium-emphasis">(auto-generated)</p> */}
|
||||||
</CRow>
|
{/* </CRow> */}
|
||||||
<CInputGroup className="mb-3">
|
{/* <CInputGroup className="mb-3">
|
||||||
<CInputGroupText>
|
<CInputGroupText>
|
||||||
<CIcon icon={cilUser} />
|
<CIcon icon={cilUser} />
|
||||||
</CInputGroupText>
|
</CInputGroupText>
|
||||||
@ -205,7 +205,7 @@ const AddAirwaysBill = () => {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
</CFormSelect>
|
</CFormSelect>
|
||||||
</CInputGroup>
|
</CInputGroup> */}
|
||||||
<CInputGroup className="mb-3">
|
<CInputGroup className="mb-3">
|
||||||
<CInputGroupText>
|
<CInputGroupText>
|
||||||
<CIcon icon={cilAirplaneMode} />
|
<CIcon icon={cilAirplaneMode} />
|
||||||
@ -217,6 +217,273 @@ const AddAirwaysBill = () => {
|
|||||||
onChange={handleChange('AWB')}
|
onChange={handleChange('AWB')}
|
||||||
/>
|
/>
|
||||||
</CInputGroup>
|
</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()}>
|
<CButton color="dark" className="px-4" onClick={() => handleClick()}>
|
||||||
Submit
|
Submit
|
||||||
</CButton>
|
</CButton>
|
||||||
|
@ -9,6 +9,9 @@ import {
|
|||||||
CCardHeader,
|
CCardHeader,
|
||||||
CCol,
|
CCol,
|
||||||
CContainer,
|
CContainer,
|
||||||
|
CFormInput,
|
||||||
|
CInputGroup,
|
||||||
|
CInputGroupText,
|
||||||
CProgress,
|
CProgress,
|
||||||
CRow,
|
CRow,
|
||||||
CTable,
|
CTable,
|
||||||
@ -25,6 +28,8 @@ import axios from 'axios';
|
|||||||
const AirwaysBill = () => {
|
const AirwaysBill = () => {
|
||||||
const { token } = isAutheticated();
|
const { token } = isAutheticated();
|
||||||
const [data, setData] = useState([])
|
const [data, setData] = useState([])
|
||||||
|
const [file, setFile] = useState(null)
|
||||||
|
let formData = new FormData();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const getData = async () => {
|
const getData = async () => {
|
||||||
@ -50,29 +55,89 @@ const AirwaysBill = () => {
|
|||||||
today = dd + '/' + mm + '/' + yyyy;
|
today = dd + '/' + mm + '/' + yyyy;
|
||||||
return today
|
return today
|
||||||
}
|
}
|
||||||
|
const handleChange = (e) => {
|
||||||
|
setFile(e.target.files[0])
|
||||||
|
|
||||||
|
}
|
||||||
|
const handleClick = () => {
|
||||||
|
|
||||||
|
formData.append('file', file)
|
||||||
|
|
||||||
|
console.log(...formData)
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
console.log(file);
|
||||||
return <div>
|
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>
|
<CCol sm='auto'> <Link to='/addairwaysbill'>
|
||||||
<Link to='/addairwaysbill'>
|
<CButton className='ms-3' color="dark">+Add New Entry</CButton>
|
||||||
<CButton className='ms-3' color="dark">+Add New Entry</CButton>
|
</Link></CCol>
|
||||||
</Link>
|
|
||||||
|
</CRow>
|
||||||
<hr />
|
<hr />
|
||||||
<CTable striped hover>
|
<CTable striped hover className='overflow-table '>
|
||||||
<CTableHead>
|
<CTableHead >
|
||||||
<CTableRow>
|
<CTableRow>
|
||||||
<CTableHeaderCell scope="col">ID</CTableHeaderCell>
|
<CTableHeaderCell scope="col">S.No</CTableHeaderCell>
|
||||||
<CTableHeaderCell scope="col">Vendor</CTableHeaderCell>
|
<CTableHeaderCell scope="col">Order No</CTableHeaderCell>
|
||||||
<CTableHeaderCell scope="col">Date</CTableHeaderCell>
|
<CTableHeaderCell scope="col">Client Name</CTableHeaderCell>
|
||||||
<CTableHeaderCell scope="col">To (Name)</CTableHeaderCell>
|
<CTableHeaderCell scope="col">Item Name</CTableHeaderCell>
|
||||||
<CTableHeaderCell scope="col">AWB</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>
|
<CTableHeaderCell scope="col">Action</CTableHeaderCell>
|
||||||
</CTableRow>
|
</CTableRow>
|
||||||
</CTableHead>
|
</CTableHead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{data.map(item =>
|
{data.map(item =>
|
||||||
<tr>
|
<tr>
|
||||||
<td scope="row">{item.code}</td>
|
{/* <td scope="row">{item.code}</td>
|
||||||
<td>{item.vendor_name}</td>
|
<td>{item.vendor_name}</td>
|
||||||
<td>{formatDate(item.createdAt)}</td>
|
<td>{formatDate(item.createdAt)}</td>
|
||||||
<td>{item.to_name}</td>
|
<td>{item.to_name}</td>
|
||||||
@ -82,7 +147,7 @@ const AirwaysBill = () => {
|
|||||||
<Link to={`/viewbill/${item._id}`}><CButton color="success">View</CButton></Link>
|
<Link to={`/viewbill/${item._id}`}><CButton color="success">View</CButton></Link>
|
||||||
|
|
||||||
</CButtonGroup>
|
</CButtonGroup>
|
||||||
</td>
|
</td> */}
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
)}
|
)}
|
||||||
|
Loading…
Reference in New Issue
Block a user