Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Origin/master #9

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
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
2 changes: 1 addition & 1 deletion Client/config-overrides.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const {
process.env.BUNDLE_VISUALIZE == 1 && addBundleVisualizer(),
addWebpackAlias({
['@Components']: path.resolve(__dirname, './src/frontoffice/components'),
['@FrontOfficeComponents']: path.resolve(__dirname, './src/frontoffice/components/frontoffice'),
['@FrontOfficeComponents']: path.resolve(__dirname, './src/frontoffice/components'),
['@BackOfficeComponents']: path.resolve(__dirname, './src/backoffice/components'),
['@FrontOfficePages']: path.resolve(__dirname, './src/frontoffice/pages'),
['@BackOfficePages']: path.resolve(__dirname, './src/backoffice/pages'),
Expand Down
2 changes: 1 addition & 1 deletion Client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
"react-router-dom": "^5.2.0",
"react-script": "^2.0.5",
"react-scripts": "3.4.3",
"react-select": "^3.1.1",
"react-select": "^3.2.0",
"react-sparklines": "^1.7.0",
"react-star-ratings": "^2.3.0",
"react-stepzilla": "^6.0.2",
Expand Down
3 changes: 0 additions & 3 deletions Client/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root">
<div class="preloader">
<img src="%PUBLIC_URL%/puff.svg" alt="spinner">
</div>
</div>
<!--
This HTML file is a template.
Expand Down
4 changes: 2 additions & 2 deletions Client/src/actions/AdminAction.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,9 @@ export const categoryid = (id) => async (dispatch) => {
try {
dispatch({ type: categoryConstants.Category_START });

await axios.get(`/api/category/${id}`).then((resp) => {
await axios.get(`/api/Category/${id}`).then((resp) => {
const categoryi = resp.data.data;

dispatch({
type: categoryConstants.Category_SUCCESS,
payload: categoryi,
Expand Down
4 changes: 3 additions & 1 deletion Client/src/actions/cartAction.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import axios from "axios";
import * as cartConstants from "../constants/cartConstants";

export const addToCart = (id, qty) => async (dispatch, getState) => {
export const addToCart = (id, qty,colorSelect,sizeSelect) => async (dispatch, getState) => {
try {
await axios.get(`http://localhost:5000/api/product/${id}`).then((resp) => {
const data = resp.data.data;
Expand All @@ -14,6 +14,8 @@ export const addToCart = (id, qty) => async (dispatch, getState) => {
productImage: data.productImage,
price: data.price,
countInStock: data.countInStock,
selectedColor :colorSelect,
selectedSize : sizeSelect,
qty
},
});
Expand Down
7 changes: 5 additions & 2 deletions Client/src/actions/productAction.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ export const listProducts = (productInfo) => async (dispatch) =>{
sort,
category,
initialLoading,
ltORgt
ltORgt,
brand
} = productInfo;

try{
Expand All @@ -19,7 +20,9 @@ export const listProducts = (productInfo) => async (dispatch) =>{
const queryString = [
sort.length > 0 ? `sort=${sort.join(",")}` : "",
searchProductKey !== "" ?`&keyword=${searchProductKey}` : "",
category !== "" ? `&category=${category}` : "",
category !== [] ? `&Category=${category}` : "",
brand !== [] ? `&Brand=${brand}` : "",

`&priceMin=${ltORgt[0]}`,
`&priceMax=${ltORgt[1]}`,

Expand Down
26 changes: 17 additions & 9 deletions Client/src/backoffice/components/VerticalLayout/SidebarContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ class SidebarContent extends Component {
render() {
const userRole = JSON.parse(localStorage.getItem("userInfo")).role;
const redirectTo = userRole === "admin" ? "admin" : "seller";
console.log(userRole)
return (
<React.Fragment>
<SimpleBar style={{ maxHeight: "100%" }} ref={this.refDiv}>
Expand Down Expand Up @@ -118,6 +117,18 @@ class SidebarContent extends Component {
<span>Category</span>
</Link>
</li>
<li>
<Link to="/dashboard/admin/Products" className=" waves-effect">
<i className="bx bx-store" />
<span>Products</span>
</Link>
</li>
<li>
<Link to="/dashboard/admin/Order" className=" waves-effect">
<i className="bx bx-file" />
<span>Orders</span>
</Link>
</li>
<li>
<Link to="/dashboard/admin/userlist" className=" waves-effect">
<i className="bx bx-user-circle" />
Expand All @@ -130,15 +141,17 @@ class SidebarContent extends Component {
<span>Brands</span>
</Link>
</li>

</>
):(
<>
<li>
<Link to="/dashboard/admin/brands" className=" waves-effect">
<Link to="/dashboard/seller/brand" className=" waves-effect">
<i className="bx bxs-user-detail" />
<span>Brands</span>
<span>My brand</span>
</Link>
</li>

<li>
<Link to="/dashboard/admin/Products" className=" waves-effect">
<i className="bx bx-store" />
Expand All @@ -151,12 +164,7 @@ class SidebarContent extends Component {
<span>Orders</span>
</Link>
</li>
<li>
<Link to="/dashboard/admin/brands" className=" waves-effect">
<i className="bx bxs-user-detail" />
<span>Brands</span>
</Link>
</li>

</>
)}
</ul>
Expand Down
139 changes: 0 additions & 139 deletions Client/src/backoffice/pages/AllCharts/apex/ColumnWithDataLabels.js

This file was deleted.

115 changes: 0 additions & 115 deletions Client/src/backoffice/pages/AllCharts/apex/LineColumnArea.js

This file was deleted.

Loading