Commit b98505d3 authored by Darrick Yong's avatar Darrick Yong

add styling

parent ee962df1
...@@ -49,11 +49,11 @@ ...@@ -49,11 +49,11 @@
} }
.filter-all:hover { .filter-all:hover {
background: #2b4162; background: #00567D;
color: white; color: white;
} }
.filter-all.selected { .filter-all.selected {
background: #2b4162; background: #00567D;
} }
.filter-rec:hover { .filter-rec:hover {
background: #2292A4; background: #2292A4;
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
.collapse-btn:hover, .collapse-btn:hover,
.expand-btn:hover { .expand-btn:hover {
color: white; color: white;
background: #2b4162; background: #00567D;
} }
.search-select-error, .search-select-error,
......
...@@ -2,14 +2,26 @@ ...@@ -2,14 +2,26 @@
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
position: relative;
padding: 10px 20px; padding: 10px 20px;
height: 50px; height: 50px;
background: #2b4162; background: #00567D;
color: #fff;; color: #EBEBEB;
font-size: 28px; font-size: 28px;
font-weight: 700; font-weight: 700;
} }
.header-module {
position: absolute;
top: 0;
right: 0;
left: 0;
bottom: 0;
display: flex;
justify-content: center;
align-items: center;
}
.header > div { .header > div {
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -19,4 +31,47 @@ ...@@ -19,4 +31,47 @@
margin-right: 10px; margin-right: 10px;
width: 32px; width: 32px;
height: 32px; height: 32px;
}
.user {
cursor: pointer;
position: relative;
display: flex;
align-items: center;
font-size: 20px;
padding: 10px;
}
.user:hover {
border-radius: 5px;
background: red;
}
.dropdown {
cursor: auto;
width: 100%;
position: absolute;
display: flex;
flex-direction: column;
background: white;
color: black;
padding: 10px;
border-radius: 4px;;
border: 1px solid black;
font-size: 16px;
font-weight: 400;
top: 40px;
right: 10px;
}
.dropdown > * ~ * {
margin-top: 5px;
}
.logout {
cursor: pointer;
}
.logout-btn {
border: none;
} }
\ No newline at end of file
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
@import './order.css'; @import './order.css';
@import './session.css'; @import './session.css';
/* background: #2b4162; */ /* background: #00567D; */
/* background: #4daa57 */ /* background: #4daa57 */
/* background: #c1292e */ /* background: #c1292e */
/* background: #2292A4; */ /* background: #2292A4; */
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
.order-index > h1 { .order-index > h1 {
padding: 10px 20px; padding: 10px 20px;
margin-bottom: 2px; margin-bottom: 2px;
background: #2b4162; background: #00567D;
color: white; color: white;
font-size: 24px; font-size: 24px;
font-weight: 700; font-weight: 700;
......
import Logout from "../session/Logout"
const Dropdown = ({ }) => {
return (
<div className="dropdown">
<div>Profile</div>
<Logout />
</div>
)
}
export default Dropdown;
\ No newline at end of file
import { connect } from "react-redux"; import { connect } from "react-redux";
import Image from "../atoms/Image"; import Image from "../atoms/Image";
import Logout from "../session/Logout"; import Logout from "../session/Logout";
import User from "./User";
const Header = ({ isLoggedIn, logout }) => { const Header = ({ isLoggedIn, user, logout }) => {
return ( return (
<div className="header"> <div className="header">
<div> <div>Ascend</div>
<Image src="./logo.svg" /> <div className="header-module">
{/* <Image src="./logo.svg" /> */}
<div>Warehouse Management</div> <div>Warehouse Management</div>
</div> </div>
{isLoggedIn ? <Logout onClick={logout} /> : null} <div>{isLoggedIn ? <User user={user.user} /> : null}</div>
</div> </div>
); );
}; };
const mapStateToProps = (state) => ({ const mapStateToProps = (state) => ({
isLoggedIn: state.session.isAuthenticated, isLoggedIn: state.session.isAuthenticated,
user: state.session.user,
}); });
const mapDispatchToProps = (dispatch) => ({}); const mapDispatchToProps = (dispatch) => ({});
......
import { useState } from "react";
import Image from "../atoms/Image";
import Dropdown from "./Dropdown";
const User = ({ user }) => {
const [showDropdown, setShowDropdown] = useState(false);
return (
<div className="user" onClick={() => setShowDropdown(!showDropdown)}>
<Image src={user.imageUrl} />
<div>{user.givenName}</div>
{showDropdown ? <Dropdown /> : null}
</div>
);
}
export default User;
\ No newline at end of file
...@@ -11,11 +11,14 @@ const Logout = ({ logout }) => { ...@@ -11,11 +11,14 @@ const Logout = ({ logout }) => {
}; };
return ( return (
<div> <div className="logout">
{/* Logout */}
<GoogleLogout <GoogleLogout
clientId={clientId} clientId={clientId}
buttonText="Logout" // buttonText="Logout"
className="logout-btn"
onLogoutSuccess={responseGoogle} onLogoutSuccess={responseGoogle}
render={props => (<div onClick={props.onClick}>Logout</div>)}
/> />
</div> </div>
); );
......
...@@ -9,15 +9,14 @@ import lombok.ToString; ...@@ -9,15 +9,14 @@ import lombok.ToString;
@ToString @ToString
public class Address { public class Address {
public Address() {
}
private String street; private String street;
private String city; private String city;
private String state; private String state;
private String zip; private String zip;
public Address() {
}
public Address(String street, String city, String state, String zip) { public Address(String street, String city, String state, String zip) {
this.street = street; this.street = street;
this.city = city; this.city = city;
......
...@@ -17,6 +17,9 @@ public class Item { ...@@ -17,6 +17,9 @@ public class Item {
private double itemPrice; private double itemPrice;
private int itemSku; private int itemSku;
public Item() {
}
public Item(String itemId, String itemName, int itemQuantity, double itemPrice, int itemSku) { public Item(String itemId, String itemName, int itemQuantity, double itemPrice, int itemSku) {
this.itemId = itemId; this.itemId = itemId;
this.itemName = itemName; this.itemName = itemName;
...@@ -25,7 +28,4 @@ public class Item { ...@@ -25,7 +28,4 @@ public class Item {
this.itemSku = itemSku; this.itemSku = itemSku;
} }
public Item() {
}
} }
...@@ -8,6 +8,7 @@ import org.springframework.data.annotation.Id; ...@@ -8,6 +8,7 @@ import org.springframework.data.annotation.Id;
@Setter @Setter
public class Session { public class Session {
@Id
private String token; private String token;
private User user;
} }
package com.ascendfinalproject.warehouse.models;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
public class User {
private String email;
private String familyName;
private String givenName;
private String googleId;
private String imageUrl;
private String name;
public User() {
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment