changes are done
Some checks failed
NPM Installation / build (16.x, ubuntu-latest) (push) Has been cancelled
NPM Installation / build (16.x, windows-latest) (push) Has been cancelled
NPM Installation / build (17.x, ubuntu-latest) (push) Has been cancelled
NPM Installation / build (17.x, windows-latest) (push) Has been cancelled
NPM Installation / build (18.x, ubuntu-latest) (push) Has been cancelled
NPM Installation / build (18.x, windows-latest) (push) Has been cancelled
Some checks failed
NPM Installation / build (16.x, ubuntu-latest) (push) Has been cancelled
NPM Installation / build (16.x, windows-latest) (push) Has been cancelled
NPM Installation / build (17.x, ubuntu-latest) (push) Has been cancelled
NPM Installation / build (17.x, windows-latest) (push) Has been cancelled
NPM Installation / build (18.x, ubuntu-latest) (push) Has been cancelled
NPM Installation / build (18.x, windows-latest) (push) Has been cancelled
This commit is contained in:
parent
279e8842e9
commit
93b05ef68d
@ -3,7 +3,7 @@ import { CFooter } from '@coreui/react'
|
|||||||
|
|
||||||
const AppFooter = () => {
|
const AppFooter = () => {
|
||||||
return (
|
return (
|
||||||
<CFooter className="px-4">
|
<CFooter style={{ background: '#179FAF' }} className="px-4">
|
||||||
{/* <div>
|
{/* <div>
|
||||||
<a href="https://coreui.io" target="_blank" rel="noopener noreferrer">
|
<a href="https://coreui.io" target="_blank" rel="noopener noreferrer">
|
||||||
CoreUI
|
CoreUI
|
||||||
|
@ -45,7 +45,18 @@ const AppHeader = () => {
|
|||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<CHeader position="sticky" className="mb-4 p-0" ref={headerRef}>
|
<CHeader
|
||||||
|
position="sticky"
|
||||||
|
style={{
|
||||||
|
background: '#B4D1E5',
|
||||||
|
border: 'none',
|
||||||
|
marginLeft: '2rem',
|
||||||
|
marginRight: '2rem',
|
||||||
|
borderRadius: '20px',
|
||||||
|
marginTop: '1rem',
|
||||||
|
marginBottom: '2rem',
|
||||||
|
}}
|
||||||
|
>
|
||||||
<CContainer className="border-bottom px-4" fluid>
|
<CContainer className="border-bottom px-4" fluid>
|
||||||
<CHeaderToggler
|
<CHeaderToggler
|
||||||
onClick={() => dispatch({ type: 'set', sidebarShow: !sidebarShow })}
|
onClick={() => dispatch({ type: 'set', sidebarShow: !sidebarShow })}
|
||||||
|
@ -31,11 +31,12 @@ const AppSidebar = () => {
|
|||||||
position="fixed"
|
position="fixed"
|
||||||
unfoldable={unfoldable}
|
unfoldable={unfoldable}
|
||||||
visible={sidebarShow}
|
visible={sidebarShow}
|
||||||
|
style={{ background: '#179FAF' }}
|
||||||
onVisibleChange={(visible) => {
|
onVisibleChange={(visible) => {
|
||||||
dispatch({ type: 'set', sidebarShow: visible })
|
dispatch({ type: 'set', sidebarShow: visible })
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<CSidebarHeader className="border-bottom">
|
<CSidebarHeader>
|
||||||
<CSidebarBrand to="/">
|
<CSidebarBrand to="/">
|
||||||
{/* <CIcon customClassName="sidebar-brand-full" icon={logo} height={32} /> */}
|
{/* <CIcon customClassName="sidebar-brand-full" icon={logo} height={32} /> */}
|
||||||
<img
|
<img
|
||||||
@ -52,7 +53,18 @@ const AppSidebar = () => {
|
|||||||
onClick={() => dispatch({ type: 'set', sidebarShow: false })}
|
onClick={() => dispatch({ type: 'set', sidebarShow: false })}
|
||||||
/>
|
/>
|
||||||
</CSidebarHeader>
|
</CSidebarHeader>
|
||||||
<AppSidebarNav items={navigation} />
|
<div
|
||||||
|
style={{
|
||||||
|
background: '#B4D1E5',
|
||||||
|
margin: '0.5rem',
|
||||||
|
border: 'none',
|
||||||
|
borderRadius: '20px',
|
||||||
|
height: '100%',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<AppSidebarNav items={navigation} />
|
||||||
|
</div>
|
||||||
|
|
||||||
<CSidebarFooter className="border-top d-none d-lg-flex">
|
<CSidebarFooter className="border-top d-none d-lg-flex">
|
||||||
<CSidebarToggler
|
<CSidebarToggler
|
||||||
onClick={() => dispatch({ type: 'set', sidebarUnfoldable: !unfoldable })}
|
onClick={() => dispatch({ type: 'set', sidebarUnfoldable: !unfoldable })}
|
||||||
|
@ -1,3 +1,79 @@
|
|||||||
|
// import React from 'react'
|
||||||
|
// import { NavLink } from 'react-router-dom'
|
||||||
|
// import PropTypes from 'prop-types'
|
||||||
|
|
||||||
|
// import SimpleBar from 'simplebar-react'
|
||||||
|
// import 'simplebar-react/dist/simplebar.min.css'
|
||||||
|
|
||||||
|
// import { CBadge, CNavLink, CSidebarNav } from '@coreui/react'
|
||||||
|
|
||||||
|
// export const AppSidebarNav = ({ items }) => {
|
||||||
|
// const navLink = (name, icon, badge, indent = false) => {
|
||||||
|
// return (
|
||||||
|
// <>
|
||||||
|
// {icon
|
||||||
|
// ? icon
|
||||||
|
// : indent && (
|
||||||
|
// <span className="nav-icon" >
|
||||||
|
// <span className="nav-icon-bullet"></span>
|
||||||
|
// </span>
|
||||||
|
// )}
|
||||||
|
// {name && name}
|
||||||
|
// {badge && (
|
||||||
|
// <CBadge color={badge.color} style={{ color: 'red' }} className="ms-auto">
|
||||||
|
// {badge.text}
|
||||||
|
// </CBadge>
|
||||||
|
// )}
|
||||||
|
// </>
|
||||||
|
// )
|
||||||
|
// }
|
||||||
|
|
||||||
|
// const navItem = (item, index, indent = false) => {
|
||||||
|
// const { component, name, badge, icon, ...rest } = item
|
||||||
|
// const Component = component
|
||||||
|
// return (
|
||||||
|
// <Component as="div" key={index}>
|
||||||
|
// {rest.to || rest.href ? (
|
||||||
|
// <CNavLink style={{ background: 'blue' }} {...(rest.to && { as: NavLink })} {...rest}>
|
||||||
|
// {navLink(name, icon, badge, indent)}
|
||||||
|
// </CNavLink>
|
||||||
|
// ) : (
|
||||||
|
// navLink(name, icon, badge, indent)
|
||||||
|
// )}
|
||||||
|
// </Component>
|
||||||
|
// )
|
||||||
|
// }
|
||||||
|
|
||||||
|
// const navGroup = (item, index) => {
|
||||||
|
// const { component, name, icon, items, to, ...rest } = item
|
||||||
|
// const Component = component
|
||||||
|
// return (
|
||||||
|
// <Component
|
||||||
|
// style={{ background: 'blue' }}
|
||||||
|
// compact
|
||||||
|
// as="div"
|
||||||
|
// key={index}
|
||||||
|
// toggler={navLink(name, icon)}
|
||||||
|
// {...rest}
|
||||||
|
// >
|
||||||
|
// {item.items?.map((item, index) =>
|
||||||
|
// item.items ? navGroup(item, index) : navItem(item, index, true),
|
||||||
|
// )}
|
||||||
|
// </Component>
|
||||||
|
// )
|
||||||
|
// }
|
||||||
|
|
||||||
|
// return (
|
||||||
|
// <CSidebarNav as={SimpleBar}>
|
||||||
|
// {items &&
|
||||||
|
// items.map((item, index) => (item.items ? navGroup(item, index) : navItem(item, index)))}
|
||||||
|
// </CSidebarNav>
|
||||||
|
// )
|
||||||
|
// }
|
||||||
|
|
||||||
|
// AppSidebarNav.propTypes = {
|
||||||
|
// items: PropTypes.arrayOf(PropTypes.any).isRequired,
|
||||||
|
// }
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import { NavLink } from 'react-router-dom'
|
import { NavLink } from 'react-router-dom'
|
||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
@ -34,7 +110,19 @@ export const AppSidebarNav = ({ items }) => {
|
|||||||
return (
|
return (
|
||||||
<Component as="div" key={index}>
|
<Component as="div" key={index}>
|
||||||
{rest.to || rest.href ? (
|
{rest.to || rest.href ? (
|
||||||
<CNavLink {...(rest.to && { as: NavLink })} {...rest}>
|
<CNavLink
|
||||||
|
as={NavLink}
|
||||||
|
{...rest}
|
||||||
|
style={({ isActive }) => ({
|
||||||
|
backgroundColor: isActive ? '#0B0689' : 'white',
|
||||||
|
color: isActive ? 'white' : 'black',
|
||||||
|
display: 'flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
padding: '10px 15px',
|
||||||
|
textDecoration: 'none',
|
||||||
|
marginBottom: '0.3rem',
|
||||||
|
})}
|
||||||
|
>
|
||||||
{navLink(name, icon, badge, indent)}
|
{navLink(name, icon, badge, indent)}
|
||||||
</CNavLink>
|
</CNavLink>
|
||||||
) : (
|
) : (
|
||||||
@ -45,12 +133,12 @@ export const AppSidebarNav = ({ items }) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const navGroup = (item, index) => {
|
const navGroup = (item, index) => {
|
||||||
const { component, name, icon, items, to, ...rest } = item
|
const { component, name, icon, items, ...rest } = item
|
||||||
const Component = component
|
const Component = component
|
||||||
return (
|
return (
|
||||||
<Component compact as="div" key={index} toggler={navLink(name, icon)} {...rest}>
|
<Component compact as="div" key={index} toggler={navLink(name, icon)} {...rest}>
|
||||||
{item.items?.map((item, index) =>
|
{items?.map((subItem, subIndex) =>
|
||||||
item.items ? navGroup(item, index) : navItem(item, index, true),
|
subItem.items ? navGroup(subItem, subIndex) : navItem(subItem, subIndex, true),
|
||||||
)}
|
)}
|
||||||
</Component>
|
</Component>
|
||||||
)
|
)
|
||||||
|
@ -10,7 +10,7 @@ const DocsCallout = (props) => {
|
|||||||
const _href = `https://coreui.io/react/docs/${href}`
|
const _href = `https://coreui.io/react/docs/${href}`
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<CCallout color="info" className="bg-white">
|
<CCallout>
|
||||||
{content
|
{content
|
||||||
? content
|
? content
|
||||||
: `A React ${name} component ${
|
: `A React ${name} component ${
|
||||||
|
@ -3,7 +3,7 @@ import { AppContent, AppSidebar, AppFooter, AppHeader } from '../components/inde
|
|||||||
|
|
||||||
const DefaultLayout = () => {
|
const DefaultLayout = () => {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div style={{ background: '#179FAF' }}>
|
||||||
<AppSidebar />
|
<AppSidebar />
|
||||||
<div className="wrapper d-flex flex-column min-vh-100">
|
<div className="wrapper d-flex flex-column min-vh-100">
|
||||||
<AppHeader />
|
<AppHeader />
|
||||||
|
@ -4,10 +4,10 @@ body {
|
|||||||
|
|
||||||
.wrapper {
|
.wrapper {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@include ltr-rtl("padding-left", var(--cui-sidebar-occupy-start, 0));
|
@include ltr-rtl('padding-left', var(--cui-sidebar-occupy-start, 0));
|
||||||
@include ltr-rtl("padding-right", var(--cui-sidebar-occupy-end, 0));
|
@include ltr-rtl('padding-right', var(--cui-sidebar-occupy-end, 0));
|
||||||
will-change: auto;
|
will-change: auto;
|
||||||
@include transition(padding .15s);
|
@include transition(padding 0.15s);
|
||||||
}
|
}
|
||||||
|
|
||||||
.header > .container-fluid,
|
.header > .container-fluid,
|
||||||
@ -33,13 +33,13 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.sidebar-toggler {
|
.sidebar-toggler {
|
||||||
@include ltr-rtl("margin-left", auto);
|
@include ltr-rtl('margin-left', auto);
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar-narrow,
|
.sidebar-narrow,
|
||||||
.sidebar-narrow-unfoldable:not(:hover) {
|
.sidebar-narrow-unfoldable:not(:hover) {
|
||||||
.sidebar-toggler {
|
.sidebar-toggler {
|
||||||
@include ltr-rtl("margin-right", auto);
|
@include ltr-rtl('margin-right', auto);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -125,7 +125,7 @@ const Order = () => {
|
|||||||
<TableCell>
|
<TableCell>
|
||||||
<Button
|
<Button
|
||||||
variant="contained"
|
variant="contained"
|
||||||
color="primary"
|
color="success"
|
||||||
onClick={() => navigate(`/orders-placed/${order._id}`)}
|
onClick={() => navigate(`/orders-placed/${order._id}`)}
|
||||||
>
|
>
|
||||||
View
|
View
|
||||||
|
@ -89,7 +89,7 @@ const OrderDetails = () => {
|
|||||||
<Typography variant="h4" sx={{ flexGrow: 1, textAlign: 'center' }}>
|
<Typography variant="h4" sx={{ flexGrow: 1, textAlign: 'center' }}>
|
||||||
Order ID: {uniqueId}
|
Order ID: {uniqueId}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Button color="primary" onClick={() => navigate('/orders-placed')} variant="contained">
|
<Button color="success" onClick={() => navigate('/orders-placed')} variant="contained">
|
||||||
Back
|
Back
|
||||||
</Button>
|
</Button>
|
||||||
</Box>
|
</Box>
|
||||||
|
@ -221,7 +221,7 @@ const Kyc = () => {
|
|||||||
<Tooltip title="View">
|
<Tooltip title="View">
|
||||||
<Button
|
<Button
|
||||||
sx={{ mr: '1rem', textTransform: 'unset' }}
|
sx={{ mr: '1rem', textTransform: 'unset' }}
|
||||||
color="primary"
|
color="warning"
|
||||||
variant="contained"
|
variant="contained"
|
||||||
onClick={() => handleViewClick(row._id)}
|
onClick={() => handleViewClick(row._id)}
|
||||||
>
|
>
|
||||||
|
@ -183,7 +183,7 @@ const KycDetails = () => {
|
|||||||
</Typography>
|
</Typography>
|
||||||
<Button
|
<Button
|
||||||
onClick={() => navigate('/kyc')}
|
onClick={() => navigate('/kyc')}
|
||||||
color="primary"
|
color="warning"
|
||||||
sx={{ padding: '0.5rem 1rem' }}
|
sx={{ padding: '0.5rem 1rem' }}
|
||||||
variant="contained"
|
variant="contained"
|
||||||
>
|
>
|
||||||
|
@ -155,7 +155,7 @@ const AddressAndPayment = ({
|
|||||||
<Button
|
<Button
|
||||||
variant="contained"
|
variant="contained"
|
||||||
size="large"
|
size="large"
|
||||||
color="primary"
|
color="warning"
|
||||||
onClick={handleReviewOrderClick}
|
onClick={handleReviewOrderClick}
|
||||||
sx={{ width: '200px' }}
|
sx={{ width: '200px' }}
|
||||||
>
|
>
|
||||||
|
@ -180,7 +180,7 @@ const ReviewOrder = ({
|
|||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Box display={'flex'} justifyContent={'center'} mt={4} gap={10}>
|
<Box display={'flex'} justifyContent={'center'} mt={4} gap={10}>
|
||||||
<Button variant="contained" color="primary" onClick={(e) => handleTabChange(e, 0)}>
|
<Button variant="contained" color="warning" onClick={(e) => handleTabChange(e, 0)}>
|
||||||
Update Order
|
Update Order
|
||||||
</Button>
|
</Button>
|
||||||
<Button variant="contained" color="success" onClick={handleConfirmOrder}>
|
<Button variant="contained" color="success" onClick={handleConfirmOrder}>
|
||||||
|
@ -175,7 +175,7 @@ const ShoppingCart = ({ handleTabChange }) => {
|
|||||||
<Button
|
<Button
|
||||||
variant="contained"
|
variant="contained"
|
||||||
size="large"
|
size="large"
|
||||||
color="primary"
|
color="warning"
|
||||||
onClick={(e) => handleTabChange(e, 1)}
|
onClick={(e) => handleTabChange(e, 1)}
|
||||||
sx={{
|
sx={{
|
||||||
width: '200px',
|
width: '200px',
|
||||||
|
@ -156,7 +156,7 @@ const ViewInvoices = () => {
|
|||||||
<Typography variant="h4" sx={{ flexGrow: 1, textAlign: 'center' }}>
|
<Typography variant="h4" sx={{ flexGrow: 1, textAlign: 'center' }}>
|
||||||
Invoice Id : {invoice?.invoiceId}
|
Invoice Id : {invoice?.invoiceId}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Button color="primary" onClick={() => navigate(-1)} variant="contained">
|
<Button color="warning" onClick={() => navigate(-1)} variant="contained">
|
||||||
Back
|
Back
|
||||||
</Button>
|
</Button>
|
||||||
</Box>
|
</Box>
|
||||||
@ -370,7 +370,21 @@ const ViewInvoices = () => {
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
{invoiceStatus && (
|
{invoiceStatus && (
|
||||||
<Button variant="contained" color="primary" onClick={handleUpdateClick} sx={{ mt: 2 }}>
|
<Button
|
||||||
|
sx={{
|
||||||
|
backgroundColor: 'white',
|
||||||
|
color: 'black',
|
||||||
|
textTransform: 'unset',
|
||||||
|
mt: 2,
|
||||||
|
'&:hover': {
|
||||||
|
backgroundColor: '#0B0689',
|
||||||
|
color: 'white',
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
variant="contained"
|
||||||
|
color="primary"
|
||||||
|
onClick={handleUpdateClick}
|
||||||
|
>
|
||||||
Update Status
|
Update Status
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
|
@ -497,7 +497,21 @@ const ViewOrders = () => {
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
{orderStatus && (
|
{orderStatus && (
|
||||||
<Button variant="contained" color="primary" onClick={handleUpdateClick} sx={{ mt: 2 }}>
|
<Button
|
||||||
|
sx={{
|
||||||
|
backgroundColor: 'white',
|
||||||
|
color: 'black',
|
||||||
|
textTransform: 'unset',
|
||||||
|
mt: 2,
|
||||||
|
'&:hover': {
|
||||||
|
backgroundColor: '#0B0689',
|
||||||
|
color: 'white',
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
variant="contained"
|
||||||
|
color="primary"
|
||||||
|
onClick={handleUpdateClick}
|
||||||
|
>
|
||||||
Update Status
|
Update Status
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
|
@ -138,7 +138,19 @@ function StockTable() {
|
|||||||
/>
|
/>
|
||||||
</TableContainer>
|
</TableContainer>
|
||||||
<Box mt={2} display="flex" justifyContent="flex-end">
|
<Box mt={2} display="flex" justifyContent="flex-end">
|
||||||
<Button variant="contained" color="primary" onClick={handleSubmit}>
|
<Button
|
||||||
|
sx={{
|
||||||
|
backgroundColor: 'white',
|
||||||
|
color: 'black',
|
||||||
|
textTransform: 'unset',
|
||||||
|
'&:hover': {
|
||||||
|
backgroundColor: '#0B0689',
|
||||||
|
color: 'white',
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
variant="contained"
|
||||||
|
onClick={handleSubmit}
|
||||||
|
>
|
||||||
Update Stock
|
Update Stock
|
||||||
</Button>
|
</Button>
|
||||||
</Box>
|
</Box>
|
||||||
|
@ -159,16 +159,15 @@ const Shop = () => {
|
|||||||
))}
|
))}
|
||||||
</TableBody>
|
</TableBody>
|
||||||
</Table>
|
</Table>
|
||||||
|
<Box my={3} display="flex" justifyContent="center">
|
||||||
|
<Pagination
|
||||||
|
count={Math.ceil(totalData / itemsPerPage)}
|
||||||
|
page={currentPage}
|
||||||
|
onChange={handlePageChange}
|
||||||
|
color="primary"
|
||||||
|
/>
|
||||||
|
</Box>
|
||||||
</TableContainer>
|
</TableContainer>
|
||||||
|
|
||||||
<Box mt={3} display="flex" justifyContent="center">
|
|
||||||
<Pagination
|
|
||||||
count={Math.ceil(totalData / itemsPerPage)}
|
|
||||||
page={currentPage}
|
|
||||||
onChange={handlePageChange}
|
|
||||||
color="primary"
|
|
||||||
/>
|
|
||||||
</Box>
|
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</Box>
|
</Box>
|
||||||
|
@ -20,7 +20,7 @@ const ShopCard = ({ item }) => {
|
|||||||
<div>
|
<div>
|
||||||
<Button
|
<Button
|
||||||
variant="contained"
|
variant="contained"
|
||||||
color="primary"
|
color="warning"
|
||||||
// fullWidth
|
// fullWidth
|
||||||
disabled={isProductInCart}
|
disabled={isProductInCart}
|
||||||
onClick={handleAddToCart}
|
onClick={handleAddToCart}
|
||||||
|
Loading…
Reference in New Issue
Block a user