<div class="row">
  <div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
    <div class="card">
      <div class="body">
        <%= simple_form_for([:settings,@zone,@settings_table]) do |f| %>
        <%= f.error_notification %>

        <div class="form-inputs p-l-15">
          <%= f.input :name %>
          <%= f.input :status, collection: [ ["Available","available"], ["Occupied","occupied"] ], :selected => @settings_table.status %>
          <%= f.input :seater %>
          <%= f.input :order_by %>
          <%= f.input :is_active %>
          <% if @settings_table.dining_charges.length == 0 %>
            <% if @settings_table.id != nil %>
                    <div class="col-md-">
                        <%= link_to 'Add For Extra Charges', new_settings_zone_table_dining_charge_path(@zone,@settings_table),:class => 'btn bg-deep-purple' %>
                    </div>
            <% end %>
          <% else %>
            <%  @settings_table.dining_charges.each do |dc| %>
            <div class="card">
              <div class="body">
                <span class="card-title"><b><u>Dining Charge</u></b></span>
                <table class="table">
                  <thead>
                    <th>Item Code</th>
                    <th>Unit Price</th>
                    <th>Charge Type</th>
                    <th>Free Time</th>
                    <th>Charges Block</th>
                    <th>Time Rounding</th>
                    <th>Actions</th>
                  </thead>
                  <tbody>
                    <tr>
                      <td><%= dc.item_code %></td>
                      <td><%= dc.unit_price %></td>
                      <td><%= dc.charge_type %></td>
                      <td><%= (dc.minimum_free_time).utc.strftime("%H:%M") %></td>
                      <td><%= (dc.charge_block).utc.strftime("%H:%M") %></td>
                      <td><%= dc.time_rounding %></td>
                      <td><%= link_to 'Edit Charges', edit_settings_zone_table_dining_charge_path(@zone,@settings_table,dc),:class => 'btn bg-deep-purple' %>
                        <!-- <button class="btn btn-primary" src="<%= edit_settings_zone_table_dining_charge_path(@zone,@settings_table,dc) %>">Edit Charge</button> -->
                      </td>
                    </tr>
                  </tbody>
                </table>
              </div>
            </div>
            <% end %>
          <% end %>
        </div>

        <div class="form-actions p-l-15">
           <%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
        </div>
      <% end %>
      </div>
    </div>
  </div>
 <div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
    <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.name") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.table_txt") %> <%= t("views.right_panel.detail.name_txt2") %> <br> 
        2) <%= t("views.right_panel.detail.status") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.status_txt") %> <br>
        3) <%= t("views.right_panel.detail.seater") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.seat_txt") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.table_txt") %> <br>
        4) <%= t("views.right_panel.detail.order_by") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.order_txt") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.table_txt") %> <br>
        5) <%= t("views.right_panel.detail.is_active") %> - <%= t("views.right_panel.detail.checkbox") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.is_active_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.add_extra_charges") %> - <%= t("views.right_panel.detail.new_btn_txt") %> <%= t("views.right_panel.detail.extra_charges_txt") %> <br>
        2) <%= t("views.right_panel.button.create") %> - <%= t("views.right_panel.detail.create_btn_txt") %> <%= t("views.right_panel.detail.table_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.zone_txt") %> <br>
        </p>
      </div>
    </div>  
  </div>
</div>

 
