Browse Source

Update spa code organization

Lee Morgan 5 years ago
parent
commit
e90d50e707

File diff suppressed because it is too large
+ 1011 - 680
views/dashboardPage/bundle.js


+ 1 - 1
views/dashboardPage/dashboard.ejs

@@ -7,7 +7,7 @@
         <link rel="icon" type="img/png" href="/shared/images/logo.png">
         <link rel="icon" type="img/png" href="/shared/images/logo.png">
         <link rel="stylesheet" href="/shared/shared.css">
         <link rel="stylesheet" href="/shared/shared.css">
         <link rel="stylesheet" href="/dashboardPage/dashboard.css">
         <link rel="stylesheet" href="/dashboardPage/dashboard.css">
-        <link rel="stylesheet" href="/dashboardPage/sidebars/sidebars.css">
+        <link rel="stylesheet" href="/dashboardPage/sidebars.css">
         <link href="https://fonts.googleapis.com/css?family=Saira&display=swap" rel="stylesheet"> 
         <link href="https://fonts.googleapis.com/css?family=Saira&display=swap" rel="stylesheet"> 
         <script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
         <script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
     </head>
     </head>

+ 0 - 0
views/dashboardPage/js/Ingredient.js → views/dashboardPage/js/classes/Ingredient.js


+ 0 - 0
views/dashboardPage/js/Merchant.js → views/dashboardPage/js/classes/Merchant.js


+ 0 - 0
views/dashboardPage/js/Order.js → views/dashboardPage/js/classes/Order.js


+ 0 - 0
views/dashboardPage/js/Recipe.js → views/dashboardPage/js/classes/Recipe.js


+ 0 - 0
views/dashboardPage/js/Transaction.js → views/dashboardPage/js/classes/Transaction.js


+ 23 - 23
views/dashboardPage/js/dashboard.js

@@ -1,28 +1,28 @@
-const home = require("./home.js");
-const ingredients = require("./ingredients.js");
-const recipeBook = require("./recipeBook.js");
-const analytics = require("./analytics.js");
-const orders = require("./orders.js");
-const transactions = require("./transactions.js");
+const home = require("./strands/home.js");
+const ingredients = require("./strands/ingredients.js");
+const recipeBook = require("./strands/recipeBook.js");
+const analytics = require("./strands/analytics.js");
+const orders = require("./strands/orders.js");
+const transactions = require("./strands/transactions.js");
 
 
-const ingredientDetails = require("./ingredientDetails.js");
-const newIngredient = require("./newIngredient.js");
-const editIngredient = require("./editIngredient.js");
-const newOrder = require("./newOrder.js");
-const newRecipe = require("./newRecipe.js");
-const editRecipe = require("./editRecipe.js");
-const newTransaction = require("./newTransaction.js");
-const orderDetails = require("./orderDetails.js");
-const orderFilter = require("./orderFilter.js");
-const recipeDetails = require("./recipeDetails.js");
-const transactionDetails = require("./transactionDetails.js");
-const transactionFilter = require("./transactionFilter.js");
+const ingredientDetails = require("./sidebars/ingredientDetails.js");
+const newIngredient = require("./sidebars/newIngredient.js");
+const editIngredient = require("./sidebars/editIngredient.js");
+const newOrder = require("./sidebars/newOrder.js");
+const newRecipe = require("./sidebars/newRecipe.js");
+const editRecipe = require("./sidebars/editRecipe.js");
+const newTransaction = require("./sidebars/newTransaction.js");
+const orderDetails = require("./sidebars/orderDetails.js");
+const orderFilter = require("./sidebars/orderFilter.js");
+const recipeDetails = require("./sidebars/recipeDetails.js");
+const transactionDetails = require("./sidebars/transactionDetails.js");
+const transactionFilter = require("./sidebars/transactionFilter.js");
 
 
-const Merchant = require("./Merchant.js");
-const Ingredient = require("./Ingredient.js");
-const Recipe = require("./Recipe.js");
-const Order = require("./Order.js");
-const Transaction = require("./Transaction.js");
+const Merchant = require("./classes/Merchant.js");
+const Ingredient = require("./classes/Ingredient.js");
+const Recipe = require("./classes/Recipe.js");
+const Order = require("./classes/Order.js");
+const Transaction = require("./classes/Transaction.js");
 
 
 merchant = new Merchant(data.merchant, data.transactions, {
 merchant = new Merchant(data.merchant, data.transactions, {
     home: home,
     home: home,

+ 0 - 2
views/dashboardPage/js/editIngredient.js → views/dashboardPage/js/sidebars/editIngredient.js

@@ -1,5 +1,3 @@
-const Ingredient = require("./Ingredient");
-
 let editIngredient = {
 let editIngredient = {
     display: function(ingredient){
     display: function(ingredient){
         let buttonList = document.getElementById("unitButtons");
         let buttonList = document.getElementById("unitButtons");

+ 0 - 0
views/dashboardPage/js/editRecipe.js → views/dashboardPage/js/sidebars/editRecipe.js


+ 0 - 0
views/dashboardPage/js/ingredientDetails.js → views/dashboardPage/js/sidebars/ingredientDetails.js


+ 0 - 2
views/dashboardPage/js/newIngredient.js → views/dashboardPage/js/sidebars/newIngredient.js

@@ -1,5 +1,3 @@
-const ingredients = require("./ingredients");
-
 let newIngredient = {
 let newIngredient = {
     display: function(Ingredient){
     display: function(Ingredient){
         const selector = document.getElementById("unitSelector");
         const selector = document.getElementById("unitSelector");

+ 0 - 0
views/dashboardPage/js/newOrder.js → views/dashboardPage/js/sidebars/newOrder.js


+ 0 - 1
views/dashboardPage/js/newRecipe.js → views/dashboardPage/js/sidebars/newRecipe.js

@@ -1,5 +1,4 @@
 let newRecipe = {
 let newRecipe = {
-
     display: function(Recipe){
     display: function(Recipe){
         document.getElementById("newRecipeName").value = "";
         document.getElementById("newRecipeName").value = "";
         document.getElementById("newRecipePrice").value = "";
         document.getElementById("newRecipePrice").value = "";

+ 0 - 0
views/dashboardPage/js/newTransaction.js → views/dashboardPage/js/sidebars/newTransaction.js


+ 0 - 0
views/dashboardPage/js/orderDetails.js → views/dashboardPage/js/sidebars/orderDetails.js


+ 0 - 0
views/dashboardPage/js/orderFilter.js → views/dashboardPage/js/sidebars/orderFilter.js


+ 0 - 0
views/dashboardPage/js/recipeDetails.js → views/dashboardPage/js/sidebars/recipeDetails.js


+ 0 - 0
views/dashboardPage/js/transactionDetails.js → views/dashboardPage/js/sidebars/transactionDetails.js


+ 0 - 2
views/dashboardPage/js/transactionFilter.js → views/dashboardPage/js/sidebars/transactionFilter.js

@@ -1,5 +1,3 @@
-const Transaction = require("./Transaction");
-
 let transactionFilter = {
 let transactionFilter = {
     display: function(){
     display: function(){
         //Set default dates
         //Set default dates

+ 0 - 0
views/dashboardPage/js/analytics.js → views/dashboardPage/js/strands/analytics.js


+ 0 - 0
views/dashboardPage/js/home.js → views/dashboardPage/js/strands/home.js


+ 0 - 0
views/dashboardPage/js/ingredients.js → views/dashboardPage/js/strands/ingredients.js


+ 0 - 0
views/dashboardPage/js/orders.js → views/dashboardPage/js/strands/orders.js


+ 0 - 0
views/dashboardPage/js/recipeBook.js → views/dashboardPage/js/strands/recipeBook.js


+ 0 - 0
views/dashboardPage/js/transactions.js → views/dashboardPage/js/strands/transactions.js


+ 0 - 0
views/dashboardPage/sidebars/sidebars.css → views/dashboardPage/sidebars.css


Some files were not shown because too many files changed in this diff