Преглед изворни кода

Update spa code organization

Lee Morgan пре 5 година
родитељ
комит
e90d50e707
27 измењених фајлова са 1035 додато и 711 уклоњено
  1. 1011 680
      views/dashboardPage/bundle.js
  2. 1 1
      views/dashboardPage/dashboard.ejs
  3. 0 0
      views/dashboardPage/js/classes/Ingredient.js
  4. 0 0
      views/dashboardPage/js/classes/Merchant.js
  5. 0 0
      views/dashboardPage/js/classes/Order.js
  6. 0 0
      views/dashboardPage/js/classes/Recipe.js
  7. 0 0
      views/dashboardPage/js/classes/Transaction.js
  8. 23 23
      views/dashboardPage/js/dashboard.js
  9. 0 2
      views/dashboardPage/js/sidebars/editIngredient.js
  10. 0 0
      views/dashboardPage/js/sidebars/editRecipe.js
  11. 0 0
      views/dashboardPage/js/sidebars/ingredientDetails.js
  12. 0 2
      views/dashboardPage/js/sidebars/newIngredient.js
  13. 0 0
      views/dashboardPage/js/sidebars/newOrder.js
  14. 0 1
      views/dashboardPage/js/sidebars/newRecipe.js
  15. 0 0
      views/dashboardPage/js/sidebars/newTransaction.js
  16. 0 0
      views/dashboardPage/js/sidebars/orderDetails.js
  17. 0 0
      views/dashboardPage/js/sidebars/orderFilter.js
  18. 0 0
      views/dashboardPage/js/sidebars/recipeDetails.js
  19. 0 0
      views/dashboardPage/js/sidebars/transactionDetails.js
  20. 0 2
      views/dashboardPage/js/sidebars/transactionFilter.js
  21. 0 0
      views/dashboardPage/js/strands/analytics.js
  22. 0 0
      views/dashboardPage/js/strands/home.js
  23. 0 0
      views/dashboardPage/js/strands/ingredients.js
  24. 0 0
      views/dashboardPage/js/strands/orders.js
  25. 0 0
      views/dashboardPage/js/strands/recipeBook.js
  26. 0 0
      views/dashboardPage/js/strands/transactions.js
  27. 0 0
      views/dashboardPage/sidebars.css

Разлика између датотеке није приказан због своје велике величине
+ 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="stylesheet" href="/shared/shared.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"> 
         <script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
     </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, {
     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 = {
     display: function(ingredient){
         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 = {
     display: function(Ingredient){
         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 = {
-
     display: function(Recipe){
         document.getElementById("newRecipeName").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 = {
     display: function(){
         //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


Неке датотеке нису приказане због велике количине промена