fix conflit

This commit is contained in:
Zin Lin Phyo
2017-08-25 13:46:50 +06:30
116 changed files with 2373 additions and 111 deletions

View File

@@ -1,5 +1,5 @@
class Origami::InJutiesController < BaseOrigamiController
before_action :set_in_juty, only: [:show, :edit, :update, :destroy]
before_action :set_in_juty, only: [:show, :edit, :update, :edit_in_juty, :update_for_in_juty , :destroy ,:destroy_in_juty]
# GET /in_juties
# GET /in_juties.json
@@ -7,6 +7,11 @@ class Origami::InJutiesController < BaseOrigamiController
@in_juties = InJuty.all
end
def index_in_juty
@juties_in= InJuty.where("dinning_id=?",params[:table_id])
@table = params[:table_id]
end
# GET /in_juties/1
# GET /in_juties/1.json
def show
@@ -21,6 +26,14 @@ class Origami::InJutiesController < BaseOrigamiController
def edit
end
def edit_in_juty
@table = DiningFacility.find(params[:table_id])
end
def assign_in_juty
@in_juty = InJuty.new
@table = DiningFacility.find(params[:table_id])
end
# POST /in_juties
# POST /in_juties.json
def create
@@ -37,6 +50,15 @@ class Origami::InJutiesController < BaseOrigamiController
end
end
def create_for_in_juty
@in_juty = InJuty.new
@in_juty.dinning_id = params[:dining_id]
@in_juty.commissioner_ids = params[:commissioner_ids]
@in_juty.in_time = params[:in_time]
@in_juty.out_time = params[:out_time]
@in_juty.save
end
# PATCH/PUT /in_juties/1
# PATCH/PUT /in_juties/1.json
def update
@@ -51,6 +73,15 @@ class Origami::InJutiesController < BaseOrigamiController
end
end
def update_for_in_juty
@in_juty.dinning_id = params[:dining_id]
@in_juty.commissioner_ids = params[:commissioner_ids]
@in_juty.in_time = params[:in_time]
@in_juty.out_time = params[:out_time]
@in_juty.save
end
# DELETE /in_juties/1
# DELETE /in_juties/1.json
def destroy
@@ -61,6 +92,16 @@ class Origami::InJutiesController < BaseOrigamiController
end
end
def destroy_in_juty
@table_id = params[:table_id]
@in_juty.destroy
respond_to do |format|
format.html { redirect_to origami_index_in_juty_path(@table_id), notice: 'In juty was successfully destroyed.' }
format.json { head :no_content }
end
end
private
# Use callbacks to share common setup or constraints between actions.
def set_in_juty