add fields for Menu Sync

This commit is contained in:
Yan
2017-08-18 11:24:38 +06:30
parent 3160aab399
commit 48461da9ea
11 changed files with 21 additions and 20 deletions

View File

@@ -1,4 +1,5 @@
json.array! @item_sets do |set|
json.id set.id
json.name set.name
json.alt_name set.alt_name
json.min_selectable_qty set.min_selectable_qty

View File

@@ -1,4 +1,5 @@
json.array! @menu_attributes do |attribute|
json.id attribute.id
json.type attribute.attribute_type
json.name attribute.name
json.value attribute.value

View File

@@ -1,4 +1,6 @@
json.array! @menu_options do |option|
json.id option.id
json.type option.option_type
json.name option.name
json.value option.value
end

View File

@@ -3,6 +3,7 @@
<%= f.error_notification %>
<div class="form-inputs">
<%= f.input :option_type %>
<%= f.input :name %>
<%= f.input :value %>

View File

@@ -13,6 +13,7 @@
<table class="table table-striped">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Value</th>
</tr>
@@ -21,6 +22,7 @@
<tbody>
<% @settings_menu_item_options.each do |settings_menu_item_option| %>
<tr>
<td><%= settings_menu_item_option.option_type %></td>
<td><%= link_to settings_menu_item_option.name, settings_menu_item_option_path(settings_menu_item_option) %></td>
<td><%= settings_menu_item_option.value %></td>
<td><%= link_to 'Edit', edit_settings_menu_item_option_path(settings_menu_item_option) %>

View File

@@ -13,6 +13,7 @@
<table class="table">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Value</th>
<th>Created At</th>
@@ -22,6 +23,7 @@
<tbody>
<tr>
<td><%= @settings_menu_item_option.option_type %></td>
<td><%= @settings_menu_item_option.name %></td>
<td><%= @settings_menu_item_option.value rescue "-" %></td>
<td><%=l @settings_menu_item_option.created_at, format: :short %></td>