Class: Logistics::Core::AdditionalDocumentsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Logistics::Core::AdditionalDocumentsController
- Defined in:
- app/controllers/logistics/core/additional_documents_controller.rb
Instance Method Summary collapse
- #bulk_delete ⇒ Object
- #bulk_save ⇒ Object
- #bulk_update ⇒ Object
- #get_document_types ⇒ Object
- #get_lookup_values ⇒ Object
Instance Method Details
#bulk_delete ⇒ Object
31 32 33 34 35 |
# File 'app/controllers/logistics/core/additional_documents_controller.rb', line 31 def bulk_delete success, error = @service.bulk_delete(params[:ids]) response = Mks::Common::MethodResponse.new(success, nil, nil, [error], nil) render json: response end |
#bulk_save ⇒ Object
19 20 21 22 23 |
# File 'app/controllers/logistics/core/additional_documents_controller.rb', line 19 def bulk_save success, error = @service.bulk_save(additional_document_params[:payload]) response = Mks::Common::MethodResponse.new(success, nil, nil, [error], nil) render json: response end |
#bulk_update ⇒ Object
25 26 27 28 29 |
# File 'app/controllers/logistics/core/additional_documents_controller.rb', line 25 def bulk_update success, error = @service.bulk_update(additional_document_params[:payload]) response = Mks::Common::MethodResponse.new(success, nil, nil, [error], nil) render json: response end |
#get_document_types ⇒ Object
12 13 14 15 16 17 |
# File 'app/controllers/logistics/core/additional_documents_controller.rb', line 12 def get_document_types documents = @service.get_additional_documents(params[:entity], params[:rec_id]) data = ActiveModelSerializers::SerializableResource.new(documents).as_json response = Mks::Common::MethodResponse.new(true, nil, data, nil, nil) render json: response end |
#get_lookup_values ⇒ Object
6 7 8 9 10 |
# File 'app/controllers/logistics/core/additional_documents_controller.rb', line 6 def get_lookup_values values = @service.get_lookup_values(params[:entity]) response = Mks::Common::MethodResponse.new(true, nil, values, nil, nil) render json: response end |