Quellcode durchsuchen

Change inventory page to dashboard page

Lee Morgan vor 6 Jahren
Ursprung
Commit
43271e43fe

+ 4 - 4
controllers/renderer.js

@@ -97,7 +97,7 @@ module.exports = {
                                 .then((updatedMerchant)=>{
                                     updatedMerchant.password = undefined;
                                     updatedMerchant.accessToken = undefined;
-                                    res.render("inventoryPage/inventory", {merchant: updatedMerchant, error: undefined});
+                                    res.render("dashboardPage/dashboard", {merchant: updatedMerchant, error: undefined});
                                     Transaction.create(transactions);
                                     return;
                                 })
@@ -105,18 +105,18 @@ module.exports = {
                                     let errorMessage = "Error: unable to save user data";
                                     
                                     merchant.password = undefined;
-                                    return res.render("inventoryPage/inventory", {merchant: updatedMerchant, error: errorMessage});
+                                    return res.render("dashboardPage/dashboard", {merchant: updatedMerchant, error: errorMessage});
                                 });
                         })
                         .catch((err)=>{
                             let errorMessage = "There was an error and we could not retrieve your transactions from Clover";
 
                             merchant.password = undefined;
-                            return res.render("inventoryPage/inventory", {merchant: merchant, error: errorMessage});
+                            return res.render("dashboardPage/dashboard", {merchant: merchant, error: errorMessage});
                         });
                 }else if(merchant.pos === "none"){
                     merchant.password = undefined;
-                    return res.render("inventoryPage/inventory", {merchant: merchant, error: undefined});
+                    return res.render("dashboardPage/dashboard", {merchant: merchant, error: undefined});
                 }else{
                     req.session.error = "Error: WEBSITE PANIC";
                     

+ 0 - 0
views/inventoryPage/account.js → views/dashboardPage/account.js


+ 0 - 0
views/inventoryPage/addIngredient.js → views/dashboardPage/addIngredient.js


+ 0 - 0
views/inventoryPage/inventory.css → views/dashboardPage/dashboard.css


+ 8 - 8
views/inventoryPage/inventory.ejs → views/dashboardPage/dashboard.ejs

@@ -4,7 +4,7 @@
         <meta charset="UTF-8">
         <title>The Subline</title>
         <link rel="icon" type="img/png" href="/shared/images/logo.png">
-        <link rel="stylesheet" href="/inventoryPage/inventory.css">
+        <link rel="stylesheet" href="/dashboardPage/dashboard.css">
         <link rel="stylesheet" href="/shared/shared.css">
     </head>
     <body>
@@ -241,13 +241,13 @@
         <script>let merchant = <%- JSON.stringify(merchant) %>;</script>
         <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
         <script src="../shared/validation.js"></script>
-        <script src="/inventoryPage/inventory.js"></script>
-        <script src="/inventoryPage/recipes.js"></script>
-        <script src="/inventoryPage/account.js"></script>
-        <script src="/inventoryPage/addIngredient.js"></script>
-        <script src="/inventoryPage/enterTransactions.js"></script>
-        <script src="/inventoryPage/enterPurchase.js"></script>
-        <script src="/inventoryPage/singleRecipe.js"></script>
+        <script src="/dashboardPage//inventory.js"></script>
+        <script src="/dashboardPage//recipes.js"></script>
+        <script src="/dashboardPage//account.js"></script>
+        <script src="/dashboardPage//addIngredient.js"></script>
+        <script src="/dashboardPage//enterTransactions.js"></script>
+        <script src="/dashboardPage//enterPurchase.js"></script>
+        <script src="/dashboardPage//singleRecipe.js"></script>
         <script src="/shared/controller.js"></script>
     </body>
 </html>

+ 0 - 0
views/inventoryPage/enterPurchase.js → views/dashboardPage/enterPurchase.js


+ 0 - 0
views/inventoryPage/enterTransactions.js → views/dashboardPage/enterTransactions.js


+ 0 - 0
views/inventoryPage/inventory.js → views/dashboardPage/inventory.js


+ 0 - 0
views/inventoryPage/recipes.js → views/dashboardPage/recipes.js


+ 0 - 0
views/inventoryPage/singleRecipe.js → views/dashboardPage/singleRecipe.js