Merge branch 'adminbsb_material_ui' of bitbucket.org:code2lab/sxrestaurant

This commit is contained in:
Yan
2017-11-07 15:29:28 +06:30
3 changed files with 4 additions and 6 deletions

View File

@@ -19,12 +19,12 @@ class Origami::SurveysController < BaseOrigamiController
end
def create
@dining_facility = DiningFacility.find(params[:table_id])
@url = "/origami/"+@dining_facility.type.downcase+"/"+params[:table_id]
@survey = Survey.new(survey_params)
@survey.foreigner = params["survey"]["foreigner"].to_json
# respond_to do |format|
if @survey.save
redirect_to @url

View File

@@ -46,8 +46,6 @@ class Settings::CommissionsController < ApplicationController
# PATCH/PUT /commissions/1.json
def update
respond_to do |format|
puts commission_params.to_json
puts "updddddddddddddddddddddd"
if @commission.update(commission_params)
format.html {redirect_to settings_commission_path(@commission), notice: 'Commission was successfully updated.'}
format.json {render :show, status: :ok, location: @commission}

View File

@@ -15,7 +15,7 @@
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
<div class="form-group">
<label>Foreigner</label>
<select class="form-control col-md-12 selectpicker show-tick" name="survey[foreigner]" style="height: " >
<select class="form-control col-md-12 selectpicker show-tick" name="survey[foreigner][][]" style="height: " >
<% Lookup.where("lookup_type = ?", "country" ).each do |ct| %>
<option value="<%= ct.value %>">
<%= ct.name %></option>
@@ -27,7 +27,7 @@
<div class="form-group">
<label>Number</label>
<input type="number" name="survey[foreigner]" class="form-control">
<input type="number" name="survey[foreigner][][]" class="form-control">
</div>
</div>
</div>