Explorar o código

When editing sub-ingredients, the current ingredient is no longer an option.

Lee Morgan %!s(int64=5) %!d(string=hai) anos
pai
achega
2209f1fb9e
Modificáronse 2 ficheiros con 3 adicións e 0 borrados
  1. 2 0
      views/dashboardPage/css/dashboard.css
  2. 1 0
      views/dashboardPage/js/modal.js

+ 2 - 0
views/dashboardPage/css/dashboard.css

@@ -197,10 +197,12 @@ Multi-strand use classes
 
     .choosable:hover{
         background: rgb(179, 191, 209);
+        color: black;
     }
 
     .choosable.active{
         background: rgb(240, 252, 255);
+        color: black;
     }
 
 .searchBar{

+ 1 - 0
views/dashboardPage/js/modal.js

@@ -192,6 +192,7 @@ let modal = {
         }
 
         for(let i = 0; i < merchant.inventory.length; i++){
+            if(ingredient.id === merchant.inventory[i].ingredient.id) continue;
             let skip = false;
             for(let j = 0; j < ingredient.subIngredients.length; j++){
                 if(merchant.inventory[i].ingredient === ingredient.subIngredients[j].ingredient){