Skip to content

Commit

Permalink
Formatted prompts, overlays
Browse files Browse the repository at this point in the history
  • Loading branch information
beyatris committed Mar 17, 2022
1 parent e9fbb6c commit 9809472
Show file tree
Hide file tree
Showing 6 changed files with 100 additions and 74 deletions.
55 changes: 32 additions & 23 deletions ProfitMaximizationTool/profitmaximizer/static/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,10 @@
border: 0.1px solid;
border-radius: 4px;
border: 0.1px solid;
padding: 4px;
padding-left: 8px;
padding-right: 8px;
padding-top: 5px;
padding-bottom: 5px;
text-transform: uppercase;
}

Expand Down Expand Up @@ -188,21 +191,21 @@
}

.fill:hover {
border-color: #ff5c8d;
color: #ff5c8d;
border-color: var(--primary);
color: var(--primary);
background-color: var(--light);
}

.outline {
background-color: var(--light);
border-color: var(--dark);
color: var(--dark);
border-color: var(--primary);
color: var(--primary);
}

.outline:hover {
background-color: var(--dark);
background-color: var(--primary);
color: var(--light);
border-color: var(--dark);
border-color: var(--primary);
}


Expand Down Expand Up @@ -246,14 +249,14 @@
float: right;
border: none;
font-family: 'Inter', sans-serif;
width: 92%;
height: 90%;
width: 320px;
height: 25px;
color: #222629;
transition: ease-out 0.1s;
}

.string-input-size {
width: 100%;
width: 340px;
height: 30px;
margin-top: 5px;
margin-bottom: 5px;
Expand All @@ -263,14 +266,14 @@
float: right;
border: none;
font-family: 'Inter', sans-serif;
width: 92%;
height: 90%;
width: 150px;
height: 25px;
color: #222629;
transition: ease-out 0.1s;
}

.int-input-size {
width: 50%;
width: 170px;
height: 30px;
margin-top: 5px;
margin-bottom: 5px;
Expand Down Expand Up @@ -329,13 +332,13 @@
}

.add-record {
width: 25%;
height: 60%;
width: 400px;
height: 450px;
}

.edit-record {
width: 25%;
height: 60%;
width: 400px;
height: 450px;
}

.record-title {
Expand Down Expand Up @@ -372,7 +375,7 @@
background-color: white;
}

.close {
.x {
color: var(--dark);
font-family: 'Poppins', sans-serif;
font-weight: 800;
Expand All @@ -395,8 +398,6 @@
font-family: 'Inter', sans-serif;
display: block;
position: relative;
margin-left: 20px;
margin-right: 20px;
}

.centered-text {
Expand Down Expand Up @@ -636,6 +637,11 @@ a:hover {
right: 3%;
}

.rightmost {
position: absolute;
right: 0%;
}

/* Element sizes */
.full-width {
width: 100%;
Expand Down Expand Up @@ -670,18 +676,21 @@ a:hover {
.prompt {
display: none;
text-align: center;
border-radius: 5px;
border-radius: 4px;
color: var(--dark);
padding-top: 4px;
padding-bottom: 4px;
border-color: var(--primary);
font-size: var(--xsmall);
font-family: var(--default-font);
}

.success {
background-color: #DFF9FB;
background-color: var(--light);
}

.error {
background-color: var(--light);
background-color: var(--secondary);
}


Expand Down
4 changes: 2 additions & 2 deletions ProfitMaximizationTool/profitmaximizer/static/js/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ if(page == "inventory"){
event.preventDefault();
document.getElementById("delete-ingredient-overlay").style.display = "block";
var recordID = event.target.parentElement.parentElement.children[0].innerText;
document.getElementById("delete-ingredient-text").innerText = "Are you sure you want to delete IngredientRecord " + recordID + " ?";
document.getElementById("delete-ingredient-text").innerText = "Are you sure you want to delete IngredientRecord " + recordID + "?";
document.getElementById("delete-ingredient-record-id").value = recordID;
});
});
Expand Down Expand Up @@ -183,7 +183,7 @@ if(page == "products"){
event.preventDefault();
document.getElementById("delete-product-overlay").style.display = "block";
var recordID = event.target.parentElement.parentElement.children[0].innerText;
document.getElementById("delete-product-text").innerText = "Are you sure you want to delete ProductRecord " + recordID + " ?";
document.getElementById("delete-product-text").innerText = "Are you sure you want to delete ProductRecord " + recordID + "?";
document.getElementById("delete-product-record-id").value = recordID;
});
});
Expand Down
2 changes: 1 addition & 1 deletion ProfitMaximizationTool/profitmaximizer/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<body id="base">
<div class="import-size overlay" id="import-overlay">
<div class="import-inner full-width full-height centered-text">
<button class="close" id="close-import"><b>&#10005</b></button>
<button class="close x" id="close-import"><b>&#10005</b></button>
<div class="card-container">

<div class="card" id="products-file">
Expand Down
4 changes: 2 additions & 2 deletions ProfitMaximizationTool/profitmaximizer/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<!-- sign up form overlaid -->
<div id="signupoverlay" class="form-size overlay">
{% block sign-up %}
<button class="close" id="closesignup-btn"><b>&#10005</b></button>
<button class="close x" id="closesignup-btn"><b>&#10005</b></button>
<form autocomplete="off" method="POST" action="/signup/">
{% csrf_token %}
<div class="form-title"> Create account </div>
Expand Down Expand Up @@ -56,7 +56,7 @@
<!-- sign in form overlaid -->
<div id="signinoverlay" class="form-size overlay">
{% block sign-in %}
<button class="close" id="closesignin-btn"><b>&#10005</b></button>
<button class="close x" id="closesignin-btn"><b>&#10005</b></button>
<form autocomplete="off" method="POST" action="/signin/">
{% csrf_token %}
<div class="form-title"> Sign in </div>
Expand Down
82 changes: 45 additions & 37 deletions ProfitMaximizationTool/profitmaximizer/templates/inventory.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,93 +4,101 @@

{% block add-record %}
<div class="add-record overlay" id="add-ingredient-overlay">
<button class="close x" id="close-import"><b>&#10005</b></button>
<div class="import-inner">
<button class="close" id="close-import"><b>&#10005</b></button>
<form autocomplete="off" action="/add-ingredient/" method="POST">
{% csrf_token %}
<div class="centered-text dark-font xlarge-font bold text">
ADD NEW INVENTORY RECORD
<div class="record-title">
Add new inventory record
</div>
<div class="left-text dark-font large-font text">
<div class="record-field">
<br>
Ingredient Name
<div class="input-box">
<input type="text" class="user-info" name="new-ingredient-name">
<div class="string-input-size input-box">
<input type="text" class="string-input move" name="new-ingredient-name">
</div>
</div>
<div class="left-text dark-font large-font text">
<div class="record-field">
Unit Cost
<div class="input-box input-width">
<input type="number" step= "any" class="user-info" name="new-ingredient-cost">
<div class="int-input-size input-box">
<input type="number" step= "any" class="int-input move" name="new-ingredient-cost">
</div>
</div>
<div class="left-text dark-font large-font text">
<div class="record-field">
Total Units
<div class="input-box input-width">
<input type="number" class="user-info" name="new-total-units">
<div class="int-input-size input-box">
<input type="number" class="int-input move" name="new-total-units">
</div>
</div>
<div class="left-text dark-font large-font text">
<div class="record-field">
Daily Units
<div class="input-box input-width">
<input type="number" class="user-info" name="new-daily-units">
<div class="int-input-size input-box">
<input type="number" class="int-input move" name="new-daily-units">
</div>
</div>
<input type="submit" value="SUBMIT" class="fill dynamic-btn btn" name="add-ingredient-btn">
<br>
<div class="centered-text">
<input type="submit" value="Submit" class="fill small-btn btn" name="add-ingredient-btn">
</div>
</form>
</div>
</div>
{% endblock %}

{% block edit-record %}
<div class="edit-record overlay" id="edit-ingredient-overlay">
<button class="close x" id="close-import"><b>&#10005</b></button>
<div class="import-inner">
<button class="close" id="close-import"><b>&#10005</b></button>
<form autocomplete="off" action="/edit-ingredient/" method="POST">
{% csrf_token %}
<input type="text" class="hidden" name="edit-ingredient-record-id" id="edit-ingredient-record-id">
<div class="centered-text dark-font xlarge-font bold text" id="edit-ingredient-text">
<div class="record-title" id="edit-ingredient-text">
</div>
<div class="left-text dark-font large-font text">
<div class="record-field">
<br>
Ingredient Name
<div class="input-box">
<input type="text" class="user-info" name="edit-ingredient-name" id="edit-ingredient-name">
<div class="string-input-size input-box">
<input type="text" class="string-input move" name="edit-ingredient-name" id="edit-ingredient-name">
</div>
</div>
<div class="left-text dark-font large-font text">
<div class="record-field">
Unit Cost
<div class="input-box input-width">
<input type="number" step="any" class="user-info" name="edit-ingredient-cost" id="edit-ingredient-cost">
<div class="int-input-size input-box">
<input type="number" step="any" class="int-input move" name="edit-ingredient-cost" id="edit-ingredient-cost">
</div>
</div>
<div class="left-text dark-font large-font text">
<div class="record-field">
Total Units
<div class="input-box input-width">
<input type="number" class="user-info" name="edit-ingredient-total-units" id="edit-ingredient-total-units">
<div class="int-input-size input-box">
<input type="number" class="int-input move" name="edit-ingredient-total-units" id="edit-ingredient-total-units">
</div>
</div>
<div class="left-text dark-font large-font text">
<div class="record-field">
Daily Units
<div class="input-box input-width">
<input type="number" class="user-info" name="edit-ingredient-daily-units" id="edit-ingredient-daily-units">
<div class="int-input-size input-box">
<input type="number" class="int-input move" name="edit-ingredient-daily-units" id="edit-ingredient-daily-units">
</div>
</div>
<input type="submit" value="SUBMIT" class=" fill dynamic-btn btn" name="edit-ingredient-btn">
<br>
<div class="centered-text">
<input type="submit" value="Submit" class=" fill small-btn btn" name="edit-ingredient-btn">
</div>
</form>
</div>
</div>
{% endblock %}

{% block delete-record %}
<div class="delete-record overlay" id="delete-ingredient-overlay">
<div class="import-inner">
<button class="close" id="close-import"><b>&#10005</b></button>
<div class="centered-text dark-font xlarge-font bold text" id="delete-ingredient-text">
<div class="import-inner centered-text">
<div class="page-name" id="delete-ingredient-text">
</div>
<form autocomplete="off" action="/delete-ingredient/" method="POST">
<br>
{% csrf_token %}
<input type="text" class="hidden" name="delete-ingredient-record-id" id="delete-ingredient-record-id">
<input type="submit" value="YES" class="fill dynamic-btn btn half-width" name="delete-ingredient-btn">
<input type="submit" value="CANCEL" class="outline dynamic-btn btn half-width close">
<input type="submit" value="Yes" class="fill small-btn btn" name="delete-ingredient-btn">
<input type="submit" value="Cancel" class="outline small-btn btn close">
</form>
</div>
</div>
Expand All @@ -99,7 +107,7 @@
{% block page-content %}
<div class="page-title">
Inventory
<input type="button" class="fill small-btn right btn" value="+ Add new record" id="ingr-overlay-btn">
<input type="button" class="fill small-btn rightmost btn" value="+ Add new record" id="ingr-overlay-btn">
</div>
<div class="success prompt full-width center text" id="successful-ingredient-add-prompt">
Ingredient added!
Expand Down
Loading

0 comments on commit 9809472

Please sign in to comment.