Skip to content

Commit 26f1869

Browse files
author
WebDeveloperGuide
committed
Add Product, list Product added, Some bug fixing and structure changes applied.
1 parent 0abc99a commit 26f1869

File tree

106 files changed

+972
-240
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+972
-240
lines changed

web_admin/public/assets/js/dashboard.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@
8181
var text = [];
8282
text.push('<div class="chartjs-legend"><ul>');
8383
for (var i = 0; i < chart.data.datasets.length; i++) {
84-
console.log(chart.data.datasets[i]); // see what's inside the obj.
8584
text.push('<li>');
8685
text.push('<span style="background-color:' + chart.data.datasets[i].borderColor + '">' + '</span>');
8786
text.push(chart.data.datasets[i].label);

web_admin/src/App.css

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,22 @@
3333
color:#dc3545;
3434
font-size: 14px;
3535
padding-top:2px;
36-
}
36+
}
37+
38+
textarea.form-control, select.form-control{
39+
height: auto;
40+
}
41+
42+
.fa {
43+
font-size: 20px;
44+
padding: 5px;
45+
cursor: pointer;
46+
}
47+
48+
.fa-edit{
49+
color: #0088cc;
50+
}
51+
52+
.fa-trash{
53+
color: #d2322d;
54+
}

web_admin/src/components/Header.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
import {Link,useHistory} from 'react-router-dom';
22
import { logout } from "../redux/actions/userActions";
33
import { useDispatch } from "react-redux";
4+
import logo from "../images/logo.svg";
5+
import minilogo from "../images/logo-mini.svg";
6+
import profilePic from "../images/faces/face8.jpg";
47

58

69
const Header = () => {
7-
const dispatch = useDispatch();
8-
const history = useHistory();
10+
const dispatch = useDispatch();
911

1012
const logoutHandler = () => {
11-
dispatch(logout());
12-
history.push("/login");
13+
dispatch(logout());
1314
};
1415

1516
return(
@@ -22,10 +23,10 @@ const Header = () => {
2223
</div>
2324
<div>
2425
<Link className="navbar-brand brand-logo" to="/dashboard">
25-
<img src="assets/images/logo.svg" alt="logo" />
26+
<img src={logo} alt="logo" />
2627
</Link>
2728
<Link className="navbar-brand brand-logo-mini" to="/dashboard">
28-
<img src="assets/images/logo-mini.svg" alt="logo" />
29+
<img src={minilogo} alt="logo" />
2930
</Link>
3031
</div>
3132
</div>
@@ -164,10 +165,10 @@ const Header = () => {
164165
</li>
165166
<li className="nav-item dropdown d-none d-lg-block user-dropdown">
166167
<a className="nav-link" id="UserDropdown" href="#" data-bs-toggle="dropdown" aria-expanded="false">
167-
<img className="img-xs rounded-circle" src="assets/images/faces/face8.jpg" alt="Profile image" /> </a>
168+
<img className="img-xs rounded-circle" src={profilePic} alt="Profile image" /> </a>
168169
<div className="dropdown-menu dropdown-menu-right navbar-dropdown" aria-labelledby="UserDropdown">
169170
<div className="dropdown-header text-center">
170-
<img className="img-md rounded-circle" src="assets/images/faces/face8.jpg" alt="Profile image" />
171+
<img className="img-md rounded-circle" src={profilePic} alt="Profile image" />
171172
<p className="mb-1 mt-3 font-weight-semibold">Allen Moreno</p>
172173
<p className="fw-light text-muted mb-0">[email protected]</p>
173174
</div>

web_admin/src/components/pages/Login.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
import { Link } from "react-router-dom";
22
import {useState, useEffect} from 'react';
33
import { useDispatch, useSelector } from "react-redux";
4-
import Loading from "../LoadingError/Loading";
54
import { Login } from "../../redux/actions/userActions";
6-
import Message from "./../LoadingError/Error";
75

86
const LoginPage = ({history}) =>{
97

108
const [submitted, setSubmitted] = useState(false);
119
const dispatch = useDispatch();
1210

1311
const userLogin = useSelector((state) => state.userLogin);
14-
const { error, loading, userInfo } = userLogin;
12+
const { userInfo } = userLogin;
1513

1614
const [formState,setFormState] = useState({
1715
values:{}

web_admin/src/components/pages/Register.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
import { Link } from "react-router-dom";
22
import {useState, useEffect} from 'react';
33
import { useDispatch, useSelector } from "react-redux";
4-
import Loading from "../LoadingError/Loading";
5-
import Toast from "../LoadingError/Toast";
64
import { Register, RegisterReset } from "../../redux/actions/userActions";
7-
import Message from "./../LoadingError/Error";
85

96

107
const RegisterPage = ({history}) =>{
@@ -13,7 +10,7 @@ const RegisterPage = ({history}) =>{
1310
const dispatch = useDispatch();
1411

1512
const userRegister = useSelector((state) => state.userRegister);
16-
const { error, loading, register_status } = userRegister;
13+
const { register_status } = userRegister;
1714

1815

1916
const [formState,setFormState] = useState({
@@ -54,10 +51,7 @@ const RegisterPage = ({history}) =>{
5451

5552
return(
5653
<>
57-
<Toast />
58-
{error && <Message variant="alert-danger">{error}</Message>}
59-
{loading && <Loading />}
60-
<div className="container-scroller">
54+
<div className="container-scroller">
6155
<div className="container-fluid page-body-wrapper full-page-wrapper">
6256
<div className="content-wrapper d-flex align-items-center auth px-0">
6357
<div className="row w-100 mx-0">

0 commit comments

Comments
 (0)