diff --git a/app/assets/javascripts/CRM.js b/app/assets/javascripts/CRM.js index a57de941..da856a16 100755 --- a/app/assets/javascripts/CRM.js +++ b/app/assets/javascripts/CRM.js @@ -19,6 +19,7 @@ //= require momentjs/moment //= require bootstrap-material-datetimepicker/js/bootstrap-material-datetimepicker //= require jquery-slimscroll/jquery.slimscroll.js +//= require bootstrap-notify/bootstrap-notify.js //= require node-waves/waves.js //= require sweetalert/sweetalert.min.js //= require BSBMaterial/admin.js diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index f92e51e9..4a61c6e7 100755 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -23,6 +23,7 @@ //= require bootstrap-material-datetimepicker/js/bootstrap-material-datetimepicker //= require multi-select/js/jquery.multi-select.js //= require jquery-slimscroll/jquery.slimscroll.js +//= require bootstrap-notify/bootstrap-notify.js //= require node-waves/waves.js //= require sweetalert/sweetalert.min.js //= require autosize/autosize.js @@ -35,6 +36,7 @@ //= require BSBMaterial/demo.js //= require custom.js + $(document).on('turbolinks:load', function() { $('.datetimepicker').bootstrapMaterialDatePicker({ format: 'DD-MM-YYYY - HH:mm', @@ -73,7 +75,7 @@ $(document).on('turbolinks:load', function() { image: '
\n' + ' {caption}\n' + '
\n', - } + } }); $("#product_image_path").fileinput({ @@ -96,16 +98,11 @@ $(document).on('turbolinks:load', function() { } }); -}); - -$(document).ready(function() { - $('body').bootstrapMaterialDesign(); -}); - // $(document).on("focus", "[data-behaviour~='datepicker']", function(e){ // $(this).datepicker({"format": "yyyy-M-dd", "weekStart": 1, "autoclose": true}); // $('.dropdown-toggle').dropdown(); // }); +}); function export_to(path) { @@ -114,3 +111,4 @@ function export_to(path) } + diff --git a/app/assets/javascripts/custom.js b/app/assets/javascripts/custom.js index 3e737351..dc4368d0 100644 --- a/app/assets/javascripts/custom.js +++ b/app/assets/javascripts/custom.js @@ -25,10 +25,7 @@ $(document).on('turbolinks:load', function() { $('.delete').click(function(){ var method = $(this).attr('data-method'); var url = $(this).attr('data-ref'); - var html_text = $( this ).siblings( "#delete_text" ).html(); - console.log(method); - console.log(url); - console.log(html_text); + var html_text = $(this).siblings( "#delete_text" ).html(); swal({ title: "Confirmation", text: html_text, @@ -50,4 +47,50 @@ $(document).on('turbolinks:load', function() { }); }); + // for Notificaiotn message + var placementFrom = $("#notify_message").attr('data-placement-from'); + var placementAlign = $("#notify_message").attr('data-placement-align'); + var animateEnter = $("#notify_message").attr('data-animate-enter'); + var animateExit = $("#notify_message").attr('data-animate-exit'); + var colorName = $("#notify_message").attr('data-color-name'); + var text = $("#notify_message").attr('data-message'); + console.log(text); + if (text != null || colorName != null){ + showNotification(colorName, text, placementFrom, placementAlign, animateEnter, animateExit); + } + + function showNotification(colorName, text, placementFrom, placementAlign, animateEnter, animateExit) { + if (colorName === null || colorName === '') { colorName = 'bg-black'; } + if (animateEnter === null || animateEnter === '') { animateEnter = 'animated fadeInDown'; } + if (animateExit === null || animateExit === '') { animateExit = 'animated fadeOutUp'; } + var allowDismiss = true; + $.notify({ + message: text + }, + { + type: colorName, + allow_dismiss: allowDismiss, + newest_on_top: true, + timer: 1000, + placement: { + from: placementFrom, + align: placementAlign + }, + animate: { + enter: animateEnter, + exit: animateExit + }, + template: '' + }); + } + //end Notificaiotn message }); diff --git a/app/assets/javascripts/origami.js b/app/assets/javascripts/origami.js index c799c0be..c7212c81 100755 --- a/app/assets/javascripts/origami.js +++ b/app/assets/javascripts/origami.js @@ -6,6 +6,7 @@ //= require turbolinks //= require cable //= require jquery-slimscroll/jquery.slimscroll.js +//= require bootstrap-notify/bootstrap-notify.js //= require node-waves/waves.js //= require sweetalert/sweetalert.min.js //= require BSBMaterial/admin.js diff --git a/app/assets/stylesheets/reset.css b/app/assets/stylesheets/reset.css index eb466045..03d5ac0b 100644 --- a/app/assets/stylesheets/reset.css +++ b/app/assets/stylesheets/reset.css @@ -251,5 +251,13 @@ section.content { } /* END FORM */ +.form-group span.help-block { + font-size: 12px; + display: block; + margin-top: 5px; + font-weight: normal; + color: #F44336; +} + /* End Reset Theme */ /* *************************************************** */ \ No newline at end of file diff --git a/app/controllers/base_origami_controller.rb b/app/controllers/base_origami_controller.rb index 126b20b0..a3142197 100755 --- a/app/controllers/base_origami_controller.rb +++ b/app/controllers/base_origami_controller.rb @@ -4,9 +4,10 @@ class BaseOrigamiController < ActionController::Base #before_action :check_installation protect_from_forgery with: :exception - rescue_from CanCan::AccessDenied do |exception| flash[:warning] = exception.message + puts "ssssssssssss" + puts flash redirect_to origami_root_path end diff --git a/app/controllers/origami/cash_outs_controller.rb b/app/controllers/origami/cash_outs_controller.rb index 7f88f7e8..048e78b4 100755 --- a/app/controllers/origami/cash_outs_controller.rb +++ b/app/controllers/origami/cash_outs_controller.rb @@ -1,4 +1,4 @@ -class Origami::CashOutsController < ApplicationController#BaseOrigamiController +class Origami::CashOutsController < BaseOrigamiController def new end diff --git a/app/controllers/origami/paypar_payments_controller.rb b/app/controllers/origami/paypar_payments_controller.rb index 8f9cb59d..0c3ea11f 100755 --- a/app/controllers/origami/paypar_payments_controller.rb +++ b/app/controllers/origami/paypar_payments_controller.rb @@ -1,4 +1,4 @@ -class Origami::PayparPaymentsController < ApplicationController#BaseOrigamiController +class Origami::PayparPaymentsController < BaseOrigamiController def create sale_id = params[:sale_id] redeem_amount = params[:redeem_amount] diff --git a/app/controllers/origami/void_controller.rb b/app/controllers/origami/void_controller.rb index 15215279..1cf1ec65 100755 --- a/app/controllers/origami/void_controller.rb +++ b/app/controllers/origami/void_controller.rb @@ -1,4 +1,4 @@ -class Origami::VoidController < ApplicationController +class Origami::VoidController < BaseOrigamiController authorize_resource :class => false def overall_void diff --git a/app/controllers/settings/accounts_controller.rb b/app/controllers/settings/accounts_controller.rb index 54f27480..549d5887 100755 --- a/app/controllers/settings/accounts_controller.rb +++ b/app/controllers/settings/accounts_controller.rb @@ -27,7 +27,7 @@ class Settings::AccountsController < ApplicationController def create @settings_account = Account.new(account_params) respond_to do |format| - if @settings_account.save! + if @settings_account.save format.html { redirect_to settings_accounts_url, notice: 'Account was successfully created.' } format.json { render :index, status: :created, location: @settings_account } else diff --git a/app/views/crm/customers/_new_form.html.erb b/app/views/crm/customers/_new_form.html.erb index bba21b02..0d6fe012 100755 --- a/app/views/crm/customers/_new_form.html.erb +++ b/app/views/crm/customers/_new_form.html.erb @@ -15,14 +15,14 @@ <%= f.radio_button :salutation,"Mdm", :class => "salutation mdm with-gap radio-col-indigo", :value=>"Mdm", :style=>"width: 30px"%> -
"> +
"> <%= f.input :name, :class => "form-control col-md-6 name", :required => true %> <% flash.each do |test, msg| %> <% str="[\"#{msg['name']}\"]" str.gsub!('["', '') str.gsub!('"]', '') %> - <%= str %> + <%= str %> <% end -%>
@@ -45,28 +45,28 @@ <% str="[\"#{msg['company']}\"]" str.gsub!('["', '') str.gsub!('"]', '') %> - <%= str %> + <%= str %> <% end -%>
-
"> +
"> <%= f.input :contact_no, :class => "form-control col-md-6 contact_no" ,:required => true%> <% flash.each do |name, msg| %> <% str="[\"#{msg['contact_no']}\"]" str.gsub!('["', '') str.gsub!('"]', '') %> - <%= str %> + <%= str %> <% end %>
-
"> +
"> <%= f.input :email, :class => "form-control col-md-6 email" ,:required => true%> <% flash.each do |name, msg| %> <% str="[\"#{msg['email']}\"]" str.gsub!('["', '') str.gsub!('"]', '') %> - <%= str %> + <%= str %> <% end %>
@@ -101,13 +101,13 @@ <%= f.input :tax_profiles, :collection => @taxes, :input_html => { :multiple => true }, :class => "form-control col-md-6 tax_profiles" %>
-
"> +
"> <%= f.input :card_no, :class => "form-control col-md-6 card_no"%> <% flash.each do |name, msg| %> <% str="[\"#{msg['card_no']}\"]" str.gsub!('["', '') str.gsub!('"]', '') %> - <%= str %> + <%= str %> <% end %>
diff --git a/app/views/crm/dining_queues/_form.html.erb b/app/views/crm/dining_queues/_form.html.erb index 3e05428a..2fb01b44 100755 --- a/app/views/crm/dining_queues/_form.html.erb +++ b/app/views/crm/dining_queues/_form.html.erb @@ -1,23 +1,51 @@ +
+
+ <%= simple_form_for([:crm,@dining_queue]) do |f| %> + <%= f.error_notification %> + +
+
+ <%= f.input :queue_no , :class => "dining",:id => "dining", :readonly => true%> + <%= f.input :name %> + <%= f.input :contact_no %> + <%= f.input :seater %> + <%= f.input :remark %> + -<%= simple_form_for([:crm,@dining_queue]) do |f| %> - <%= f.error_notification %> - -
-
- <%= f.input :queue_no , :class => "dining",:id => "dining", :readonly => true%> - <%= f.input :name %> - <%= f.input :contact_no %> - <%= f.input :seater %> - <%= f.input :remark %> - - -
-
-
- <%= f.submit "Create Queue",:class=>"btn btn-primary btn-lg waves-effect"%> +
+
+
+ <%= f.button :submit,"Create Queue" ,:class=>"btn btn-primary bg-blue btn-lg waves-effect"%> +
+ <% end %>
-<% end %> + +
+
+
+
view_headline <%= t("views.right_panel.header.page_detail") %>
+

+ 1) <%= t("views.right_panel.detail.queue_no") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.queue_no_txt") %>
+ 2) <%= t("views.right_panel.detail.name") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.name_txt2") %>
+ 3) <%= t("views.right_panel.detail.contact_no") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.contact_no_txt") %>
+ 4) <%= t("views.right_panel.detail.seater") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.seat_txt") %>
+ 5) <%= t("views.right_panel.detail.remark") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.remark_txt") %>
+

+
list <%= t("views.right_panel.header.button_lists") %>
+

+ 1) <%= t("views.right_panel.button.create") %> <%= t("views.right_panel.button.queue") %> - <%= t("views.right_panel.detail.create_btn_txt") %> <%= t("views.right_panel.detail.queue_txt") %>
+

+
list <%= t("views.right_panel.header.link_lists") %>
+

+ 1) <%= t("views.right_panel.button.home") %> - <%= t("views.right_panel.detail.home_txt") %>
+ 2) <%= t("views.right_panel.button.back") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.home_txt") %>
+

+
+
+
+
+