feat: Working purchase order table and form.

This commit is contained in:
2025-01-09 16:23:42 -05:00
parent da5fec4a94
commit bf71b725f6
23 changed files with 544 additions and 254 deletions

View File

@@ -19,39 +19,14 @@ header {
background-color: #14141f;
color: #ff66ff;
padding: 10px 0;
height: 60px;
border-bottom: 1px solid grey;
}
#logo {
float: left;
font-size: 1.5em;
}
nav {
float: right;
}
.nav-links {
list-style-type: none;
margin: 0;
padding: 0;
}
.nav-links li {
display: inline-block;
margin-left: 20px;
}
.nav-links li a {
color: #fff;
text-decoration: none;
padding: 10px 15px;
display: inline-block;
transition: background-color 0.3s;
}
.nav-links li a:hover {
background-color: #555;
margin-top: 10px;
}
.content {
@@ -116,7 +91,7 @@ input[type=submit] {
padding: 5px 20px;
}
input[type=text], input[type=password], input[type=email] {
input[type=text], input[type=password], input[type=email], input[type=number] {
background-color: inherit;
color: inherit;
border: none;
@@ -124,6 +99,21 @@ input[type=text], input[type=password], input[type=email] {
padding: 5px;
}
select {
background-color: #14141f;
border: none;
border-bottom: 2px solid #555;
border-radius: 5px;
color: inherit;
padding: 10px 20px;
width: 100%;
margin-bottom: 10px;
}
option {
padding-left: 10px;
}
input[type=text]:focus, input[type=password]:focus, input[type=email]:focus {
outline: none;
}
@@ -164,50 +154,146 @@ input[type=text]:focus, input[type=password]:focus, input[type=email]:focus {
background-color: #555;
}
.dropbtn {
background-color: #3498DB;
color: white;
padding: 16px;
font-size: 16px;
border: none;
cursor: pointer;
}
.dropbtn:hover, .dropbtn:focus {
background-color: #2980B9;
}
.dropdown {
position: relative;
display: inline-block;
}
.dropdown-content {
display: none;
position: absolute;
background-color: #f1f1f1;
min-width: 160px;
overflow: auto;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;
}
.dropdown-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.dropdown a:hover {
background-color: #ddd;
}
.show {
display: block;
}
tr.htmx-swapping td {
opacity: 0;
transition: opacity 0.5s ease-out;
}
.sidepanel {
height: 275px;
width: 0;
position: fixed;
z-index: 1;
top: 0;
right: 0;
background-color: #111;
overflow-x: hidden;
padding-top: 60px;
transition: 0.5s;
}
.sidepanel a {
margin-left: 15px;
margin-bottom: 15px;
padding 10px 10px 10px 32px;
text-decoration: none;
font-size: 25px;
display: block;
transition: 0.3s;
color: grey;
}
.sidepanel a:hover {
color: #f1f1f1;
}
.sidepanel .closebtn {
position: absolute;
top: 0;
right: 25px;
font-size: 36px;
margin-left: 50px;
color: grey;
}
.openbtn {
font-size: 30px;
cursor: pointer;
background-color: inherit;
color: white;
padding: 10px 15px;
border: none;
position: fixed;
top: 0;
right: 0;
}
.openbtn:hover {
background-color: #444;
}
.form-content {
transition: 0.5s;
overflow: auto;
z-index: 1;
position: fixed;
top: 100px;
left: 0;
background-color: #14141f;
width: 100%;
}
.closebtn {
color: grey;
margin-left: 50px;
text-decoration: none;
}
.form-content .closebtn {
position: absolute;
top: 0;
right: 25px;
font-size: 36px;
margin-left: 50px;
color: grey;
}
.btn-add {
color: grey;
font-size: 1.5em;
text-decoration: none;
}
.btn-add:hover {
background-color: #444;
}
.btn {
text-decoration: none;
}
.btn:hover {
background-color: #444;
}
.danger {
color: red;
}
.vendor-branches {
width: 350px;
}
.vendor-branches ul li a {
position: relative;
top: 2px;
right: 0;
margin-left: 10px;
font-size: 1.5em;
}
.vendor-branches ul li {
transition: 0.3s ease-out;
}
.branch-row {
display: inline-block;
width: 300px;
height: 40px;
background-color: #14141f;
border-radius: 25px;
padding-left: 15px;
margin: 5px;
}
.branch-row .branch-name {
display: inline-block;
margin-top: 10px;
}
.branch-row a {
float: right;
margin-top: 5px;
margin-right: 15px;
font-size: 1.5em;
}

View File

@@ -24,3 +24,21 @@ function updateDropDownSelection(id, contentId) {
let content = document.getElementById(contentId).innerHTML;
document.getElementById(id).innerHTML = content;
}
function openSidepanel() {
document.getElementById("sidepanel").style.width = "250px";
}
function closeSidepanel() {
document.getElementById("sidepanel").style.width = "0";
}
// Show or hide an element by id.
function toggleContent(id) {
var el = document.getElementById(id);
if (el.style.display === "none") {
el.style.display = "block";
} else {
el.style.display = "none";
}
}