Просмотр исходного кода

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

Lee Morgan 5 лет назад
Родитель
Сommit
2209f1fb9e
2 измененных файлов с 3 добавлено и 0 удалено
  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{
     .choosable:hover{
         background: rgb(179, 191, 209);
         background: rgb(179, 191, 209);
+        color: black;
     }
     }
 
 
     .choosable.active{
     .choosable.active{
         background: rgb(240, 252, 255);
         background: rgb(240, 252, 255);
+        color: black;
     }
     }
 
 
 .searchBar{
 .searchBar{

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

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