search added

This commit is contained in:
scarlett kadan 2024-05-12 19:16:57 -04:00
parent 107858c363
commit c3c5348370
14 changed files with 71 additions and 56 deletions

View File

@ -32,9 +32,11 @@ $white: #fff;
}
.browse-image img {
margin-top: 50px;
width: auto;
height: 200px;
background-color: transparent;
margin-top: 50px;
}
.browse-fieldContainer {
@ -150,4 +152,42 @@ $white: #fff;
width: auto;
height: auto;
font-family: "Gotham Medium";
}
.browse-search {
width: 80%;
height: 50px;
background: linear-gradient(
-30deg,
rgb(187, 208, 236) 0%,
rgba(255, 255, 255, 1) 100%
);
display: flex;
align-items: center;
justify-content: flex-start;
flex-direction: row;
border-radius: 20px;
border: 1px solid $gray;
margin-bottom: 5px;
margin-top: 5px;
transition: all 0.3s ease-in-out;
text-decoration: none;
background-color: transparent;
filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.25));
}
.browse-search input {
width: 100%;
height: 50px;
border-radius: 20px 0 0 20px;
background-color: transparent;
outline: none;
box-shadow: none;
font-size: 18px;
font-family: "Gotham Medium";
color: $dark-blue;
border: none;
border-right: none;
padding-left: 20px;
padding-top: 2px;
}

View File

@ -35,6 +35,7 @@ $white: #fff;
width: auto;
height: 200px;
background-color: transparent;
margin-top: 50px;
}
.cable-fieldContainer {

View File

@ -35,6 +35,7 @@ $white: #fff;
width: auto;
height: 200px;
background-color: transparent;
margin-top: 50px;
}
.map-fieldContainer {
@ -271,6 +272,7 @@ $white: #fff;
width: auto;
height: auto;
font-size: 20px;
margin-top: 2px;
color: $medium-blue;
font-family: "Gotham Bold";
background-color: transparent;

View File

@ -57,45 +57,8 @@ $white: #fff;
color: $light-blue;
}
.navbar-search {
width: 100%;
height: auto;
display: flex;
border-radius: 15px;
padding: 0;
margin: 0;
}
.navbar-search input {
width: 80%;
height: auto;
padding: 10px;
border-radius: 15px 0 0 15px;
background-color: $white;
outline: none;
box-shadow: none;
font-size: 16px;
font-family: "Gotham Medium";
color: $dark-blue;
border: solid $light-blue 2px;
border-right: none;
}
.navbar-search button {
width: 20%;
height: auto;
border-radius: 0 15px 15px 0;
background-color: $white;
outline: none;
box-shadow: none;
font-size: 16px;
font-family: "Gotham Medium";
border: solid $light-blue 2px;
cursor: pointer;
}
.navbar-list {
margin-top: 20px;
margin-top: 10px;
width: 100%;
height: auto;
display: flex;

View File

@ -35,6 +35,7 @@ $white: #fff;
width: auto;
height: 200px;
background-color: transparent;
margin-top: 50px;
}
.settings-fieldContainer {

View File

@ -35,6 +35,7 @@ $white: #fff;
width: auto;
height: 200px;
background-color: transparent;
margin-top: 50px;
}
.statistics-fieldContainer {

View File

@ -35,6 +35,7 @@ $white: #fff;
width: auto;
height: 200px;
background-color: transparent;
margin-top: 50px;
}
.summary-fieldContainer {

View File

@ -61,6 +61,11 @@ export default class BrowseComponent extends Component {
this.props.socket.removeEventListener("message", this.handleMessage);
}
searchUpdate = () => {
let value = document.querySelector(".browse-search input").value;
this.props.socket.send(`{"type":"cable_search","call":"request","data":{"string":"${value}"}}`);
};
render() {
return (
<div className="browse">
@ -68,7 +73,14 @@ export default class BrowseComponent extends Component {
<img src={BeldenLogo} alt="Belden" />
</div>
<div className="browse-fieldContainer">
<h1 className="browse-title">Browse</h1>
<h1 className="browse-title">🛍 Browse</h1>
<div className="browse-search">
<input
type="text"
onChange={() => this.searchUpdate()}
placeholder="🔎 Start typing to search..."
/>
</div>
{this.state.cableList.map((cableObj, index) => (
<React.Fragment key={index}>{cableObj.returnDiv()}</React.Fragment>
))}

View File

@ -387,7 +387,7 @@ export default class CableDetailComponent extends Component {
onClick={() => this.openModal("modalOpen_dispense")}
>
<span> Dispense</span>
<span>🤖</span>
<span>🫴</span>
</div>
<Modal
isOpen={modalOpen_dispense}
@ -397,7 +397,7 @@ export default class CableDetailComponent extends Component {
>
<div className="modal-container">
<div className="modal-title">
<span>🤖</span>
<span>🫴</span>
<span>Dispensing Item</span>
</div>
<div className="modal-body">

View File

@ -134,7 +134,7 @@ export default class MapComponent extends Component {
<img src={BeldenLogo} alt="Belden" />
</div>
<div className="map-fieldContainer">
<h1 className="map-title">Map</h1>
<h1 className="map-title">🗺 Map</h1>
<div className="map-boxContainer">
<div className="map-box">
<div className="map-box-row" id="row-1">

View File

@ -8,9 +8,6 @@ export default class NavBar extends Component {
if (path.includes("browse")) {
document.getElementById("browse").style.backgroundColor = "#007CBE";
document.getElementById("browse-s").style.color = "white";
} else if (path.includes("settings")) {
document.getElementById("settings").style.backgroundColor = "#007CBE";
document.getElementById("settings-s").style.color = "white";
} else if (path.includes("map")) {
document.getElementById("map").style.backgroundColor = "#007CBE";
document.getElementById("map-s").style.color = "white";
@ -32,10 +29,6 @@ export default class NavBar extends Component {
<div className="navbar-top">
<div className="navbar-top-hamburger"></div>
<h1>Jukebox</h1>
<div className="navbar-search">
<input type="text" placeholder="Search" />
<button>🔍</button>
</div>
<ol className="navbar-list">
<NavLink
style={this.upper}
@ -53,12 +46,13 @@ export default class NavBar extends Component {
<NavLink className="navbar-list-item" id="map" to="/map">
<span id="map-s">🗺 Map</span>
</NavLink>
<NavLink className="navbar-list-item" id="statistics" to="/statistics">
<NavLink
className="navbar-list-item"
id="statistics"
to="/statistics"
>
<span id="statistics-s">📊 Statistics</span>
</NavLink>
<NavLink className="navbar-list-item" id="settings" to="/settings">
<span id="settings-s"> Settings</span>
</NavLink>
</ol>
</div>
</div>

View File

@ -10,7 +10,7 @@ export default class StatisticsComponent extends Component {
<img src={BeldenLogo} alt="Belden" />
</div>
<div className="statistics-fieldContainer">
<h1 className="statistics-title">Statistics</h1>
<h1 className="statistics-title">📊 Statistics</h1>
<div className="statistics-grid">
<div className="statistics-grid-container">
<iframe src="http://192.168.1.12:3000/d-solo/cdiqwmlr8c9ogf/sensors?orgId=1&refresh=1s&theme=light&panelId=8" title="Belden" className="statistics-iframe" />

View File

@ -10,7 +10,7 @@ export default class SummaryComponent extends Component {
<img src={BeldenLogo} alt="Belden" />
</div>
<div className="summary-fieldContainer">
<h1 className="summary-title">Summary</h1>
<h1 className="summary-title"> Summary</h1>
<div className="summary-grid">
<div className="summary-grid-container">
<iframe src="http://192.168.1.12:3000/d-solo/cdiqwmlr8c9ogf/sensors?orgId=1&refresh=1s&theme=light&panelId=8" title="Belden" className="summary-iframe" />

View File

@ -1,4 +1,4 @@
import React, { Component } from "react";
import React from "react";
import DefaultPartImg from "../assets/images/part.png";
import { NavLink } from "react-router-dom";
import "../assets/stylesheets/browse.scss";