Ver Fonte

Finish home strand

Lee Morgan há 6 anos atrás
pai
commit
51ac0c52ad

+ 14 - 7
views/dashboardPage/dashboard.css

@@ -25,7 +25,6 @@ body{
     box-shadow: 1px 2px gray;
     padding: 25px;
     flex-grow: 1;
-    height: 100%;
 }
 
 .card > *{
@@ -63,12 +62,18 @@ body{
     justify-content: space-between;
 }
 
-#revenue{
-    text-align: center;
-    font-size: 30px;
-    font-weight: bold;
+#revenueCard{
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
 }
 
+    #revenue{
+        text-align: center;
+        font-size: 30px;
+        font-weight: bold;
+    }
+
     #revenueChange{
         display: flex;
     }
@@ -86,6 +91,7 @@ body{
 #graphCard{
     flex-grow: 1;
     max-height: 40vh;
+    height: 100%;
 }
 
     #graphCard canvas{
@@ -95,7 +101,6 @@ body{
 
 #inventoryCheckCard{
     flex-grow: 0.1;
-    height: 100%;
 }
 
 #inventoryCheckCard ul{
@@ -117,8 +122,10 @@ body{
 }
 
 #inventoryCheckCard li input{
-    width: 50px;
+    width: 75px;
     margin-right: 25px;
+    font-size: 20px;
+    text-align: center;
 }
 
 #inventoryCheckCard li p:nth-of-type(2){

+ 0 - 5
views/dashboardPage/dashboard.ejs

@@ -30,11 +30,6 @@
                                 <p></p>
                             </div>
                         </div>
-
-                        <div class="card">
-                            <p>Waste Score</p>
-                            <p>Да хрен его знает</p>
-                        </div>
                     </div>
 
                     <div id="graphCard" class="card">

+ 9 - 3
views/dashboardPage/home.js

@@ -195,6 +195,14 @@ window.homeStrandObj = {
         }
     },
 
+    //Gets the quantity of each ingredient sold between two dates (dateRange)
+    //Inputs
+    //  dateRange: array containing a start date and an end date
+    //Output
+    //  List of objects
+    //      id: id of specific ingredient
+    //      quantity: quantity sold of that ingredient
+    //      name: name of the ingredient
     ingredientsSold: function(dateRange){
         let recipes = this.recipesSold(dateRange);
         let ingredientList = [];
@@ -223,14 +231,12 @@ window.homeStrandObj = {
             }
         }
 
-        console.log(ingredientList);
-
         return ingredientList;
     },
 
     //Gets the number of recipes sold between two dates (dateRange)
     //Inputs
-    //  dateRange: array containing a start date and an endDate
+    //  dateRange: array containing a start date and an end date
     //Output
     //  List of objects
     //      id: id of specific recipe