<div class="row">
  <div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
     <%= simple_form_for([:settings,@commission],html: { data_name: "assign_product" }) do |f| %>
      <%= f.error_notification %>
      <%= f.input :product_code, as: :hidden %>

      <div class="card">
          <div class="header">
             Select Menu Items
          </div>
          <div class="body">
              <div class="row">
              <% @menu_categories.each do |category|%>

                <div class="col-lg-3 col-md-3 col-sm-6">
                  <div class="card" style="padding-left:5px">
                    <div class="card-title">
                    <div> <h5><%= category.name %></h5></div>
                       

                       <div> <button type="button" data-id="menu_items_category_<%= category.id %>" class="btn btn-info waves-effect processingitems_all" aria-label="Left Align">
                         <!--  <i class="fa fa-list" aria-hidden="true"></i> -->
                         <i class="material-icons">list</i> 
                        </button>
                        <button type="button" data-id="menu_items_category_<%= category.id %>" class="processingitems_clr btn btn-info waves-effect" aria-label="Left Align">
                          <!-- <i class="fa fa-minus-circle" aria-hidden="true"></i> -->
                          <i class="material-icons">remove_circle</i> 
                        </button></div>
                        
                    </div>
                  <ul class="opi_ul" id="menu_items_category_<%= category.id %>">
                    <% category.menu_items.each do |item| %>
                      <% flag =  false %>
                      <% itemsary = JSON.parse(@commission.product_code) %>
                      <% itemsary.each do |item_code| %>
                        <% if item_code ==  item.item_code %>
                          <% flag = true %>
                        <% end %>
                      <% end %>
                      <% if flag == true %>
                        <li><div class="processitems opi_default opi_selected" data-id="<%= item.item_code %>"><%= item.name %></div></li>
                      <% else %>
                        <li><div class="processitems opi_default" data-id="<%= item.item_code %>"><%= item.name %></div></li>
                      <% end %>
                    <% end %>
                  </ul>
                  </div>
                </div>
              <% end %>
            </div>
          </div>
      </div>
      

      <div class="form-actions">
        <%= f.submit "Update",:class => 'btn ccc btn-primary btn-lg waves-effect' %>
      </div>
      <br>
    <% end %>
  </div>
 <div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
    <div class="card">
      <div class="body">
        <h5><i class="material-icons md-18">view_headline <%= t("views.right_panel.header.page_detail") %></i></h5>
        <p>
        1) <%= t("views.right_panel.detail.select_menu_items") %> - <%= t("views.right_panel.detail.select_txt") %> <%= t("views.right_panel.detail.menu_item_txt") %> <br>
        2) <button type="button" class="btn btn-info waves-effect processingitems_all"> <i class="material-icons md-18">list </i> </button> - <%= t("views.right_panel.detail.assign_txt") %> <%= t("views.right_panel.detail.menu_item_txt") %> <br>
        3) <button type="button" class="btn btn-info waves-effect processingitems_all"> <i class="material-icons md-18">remove_circle </i></button> - <%= t("views.right_panel.detail.remove_txt") %> <%= t("views.right_panel.detail.menu_item_txt") %> <br>
        </p>
        <h5><i class="material-icons md-18">list <%= t("views.right_panel.header.button_lists") %></i> </h5>
        <p>
        1) <%= t("views.right_panel.button.update") %> - <%= t("views.right_panel.detail.update_btn_txt") %> <%= t("views.right_panel.detail.processing_items_txt") %> <br>
        </p>
        <h5><i class="material-icons md-18">list <%= t("views.right_panel.header.link_lists") %></i> </h5>
        <p>
          1) <%= t("views.right_panel.button.home") %> - <%= t("views.right_panel.detail.home_txt") %> <br>
          2) <%= t("views.right_panel.button.back") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.order_queue_stations_txt") %> <br>
        </p>
      </div>
    </div>  
  </div>
</div>