Merge branch 'adminbsb_material_ui' of bitbucket.org:code2lab/sxrestaurant into adminbsb_ui_changes
This commit is contained in:
@@ -19,6 +19,7 @@
|
|||||||
//= require momentjs/moment
|
//= require momentjs/moment
|
||||||
//= require bootstrap-material-datetimepicker/js/bootstrap-material-datetimepicker
|
//= require bootstrap-material-datetimepicker/js/bootstrap-material-datetimepicker
|
||||||
//= require jquery-slimscroll/jquery.slimscroll.js
|
//= require jquery-slimscroll/jquery.slimscroll.js
|
||||||
|
//= require bootstrap-notify/bootstrap-notify.js
|
||||||
//= require node-waves/waves.js
|
//= require node-waves/waves.js
|
||||||
//= require sweetalert/sweetalert.min.js
|
//= require sweetalert/sweetalert.min.js
|
||||||
//= require BSBMaterial/admin.js
|
//= require BSBMaterial/admin.js
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
//= require bootstrap/js/bootstrap.js
|
//= require bootstrap/js/bootstrap.js
|
||||||
//= require multi-select/js/jquery.multi-select.js
|
//= require multi-select/js/jquery.multi-select.js
|
||||||
//= require jquery-slimscroll/jquery.slimscroll.js
|
//= require jquery-slimscroll/jquery.slimscroll.js
|
||||||
|
//= require bootstrap-notify/bootstrap-notify.js
|
||||||
//= require node-waves/waves.js
|
//= require node-waves/waves.js
|
||||||
//= require sweetalert/sweetalert.min.js
|
//= require sweetalert/sweetalert.min.js
|
||||||
//= require autosize/autosize.js
|
//= require autosize/autosize.js
|
||||||
@@ -37,8 +38,10 @@
|
|||||||
//= require select2
|
//= require select2
|
||||||
//= require custom.js
|
//= require custom.js
|
||||||
|
|
||||||
|
|
||||||
$(document).on('turbolinks:load', function() {
|
$(document).on('turbolinks:load', function() {
|
||||||
|
|
||||||
|
|
||||||
$('.datetimepicker').bootstrapMaterialDatePicker({
|
$('.datetimepicker').bootstrapMaterialDatePicker({
|
||||||
format: 'DD-MM-YYYY - HH:mm',
|
format: 'DD-MM-YYYY - HH:mm',
|
||||||
clearButton: true,
|
clearButton: true,
|
||||||
@@ -58,9 +61,6 @@ $(document).on('turbolinks:load', function() {
|
|||||||
date: false
|
date: false
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
|
||||||
$(document).on('turbolinks:load', function() {
|
|
||||||
|
|
||||||
// Image Upload
|
// Image Upload
|
||||||
$("#simple_menu_item_image_path").fileinput({
|
$("#simple_menu_item_image_path").fileinput({
|
||||||
previewFileType: "image",
|
previewFileType: "image",
|
||||||
@@ -102,12 +102,9 @@ $(document).on('turbolinks:load', function() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
// $(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)
|
function export_to(path)
|
||||||
{
|
{
|
||||||
@@ -116,3 +113,4 @@ function export_to(path)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -50,4 +50,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: '<div data-notify="container" class="bootstrap-notify-container alert alert-dismissible {0} ' + (allowDismiss ? "p-r-30" : "") + '" role="alert">' +
|
||||||
|
'<button type="button" aria-hidden="true" class="close float-right m-l-20 m-t--5" data-notify="dismiss">×</button>' +
|
||||||
|
'<span data-notify="icon"></span> ' +
|
||||||
|
'<span data-notify="title">{1}</span> ' +
|
||||||
|
'<span data-notify="message">{2}</span>' +
|
||||||
|
'<div class="progress" data-notify="progressbar">' +
|
||||||
|
'<div class="progress-bar progress-bar-{0}" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;"></div>' +
|
||||||
|
'</div>' +
|
||||||
|
'<a href="{3}" target="{4}" data-notify="url"></a>' +
|
||||||
|
'</div>'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//end Notificaiotn message
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
//= require turbolinks
|
//= require turbolinks
|
||||||
//= require cable
|
//= require cable
|
||||||
//= require jquery-slimscroll/jquery.slimscroll.js
|
//= require jquery-slimscroll/jquery.slimscroll.js
|
||||||
|
//= require bootstrap-notify/bootstrap-notify.js
|
||||||
//= require node-waves/waves.js
|
//= require node-waves/waves.js
|
||||||
//= require sweetalert/sweetalert.min.js
|
//= require sweetalert/sweetalert.min.js
|
||||||
//= require BSBMaterial/admin.js
|
//= require BSBMaterial/admin.js
|
||||||
|
|||||||
@@ -4,9 +4,10 @@ class BaseOrigamiController < ActionController::Base
|
|||||||
|
|
||||||
#before_action :check_installation
|
#before_action :check_installation
|
||||||
protect_from_forgery with: :exception
|
protect_from_forgery with: :exception
|
||||||
|
|
||||||
rescue_from CanCan::AccessDenied do |exception|
|
rescue_from CanCan::AccessDenied do |exception|
|
||||||
flash[:warning] = exception.message
|
flash[:warning] = exception.message
|
||||||
|
puts "ssssssssssss"
|
||||||
|
puts flash
|
||||||
redirect_to origami_root_path
|
redirect_to origami_root_path
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class Origami::CashOutsController < ApplicationController#BaseOrigamiController
|
class Origami::CashOutsController < BaseOrigamiController
|
||||||
def new
|
def new
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class Origami::PayparPaymentsController < ApplicationController#BaseOrigamiController
|
class Origami::PayparPaymentsController < BaseOrigamiController
|
||||||
def create
|
def create
|
||||||
sale_id = params[:sale_id]
|
sale_id = params[:sale_id]
|
||||||
redeem_amount = params[:redeem_amount]
|
redeem_amount = params[:redeem_amount]
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class Origami::VoidController < ApplicationController
|
class Origami::VoidController < BaseOrigamiController
|
||||||
authorize_resource :class => false
|
authorize_resource :class => false
|
||||||
def overall_void
|
def overall_void
|
||||||
|
|
||||||
|
|||||||
@@ -15,14 +15,14 @@
|
|||||||
<%= f.radio_button :salutation,"Mdm", :class => "salutation mdm with-gap radio-col-indigo", :value=>"Mdm", :style=>"width: 30px"%>
|
<%= f.radio_button :salutation,"Mdm", :class => "salutation mdm with-gap radio-col-indigo", :value=>"Mdm", :style=>"width: 30px"%>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group <%= (flash["errors"]) ? "has-error" : "" %>">
|
<div class="form-group <%= (flash["errors"]) ? "error" : "" %>">
|
||||||
<%= f.input :name, :class => "form-control col-md-6 name", :required => true %>
|
<%= f.input :name, :class => "form-control col-md-6 name", :required => true %>
|
||||||
<% flash.each do |test, msg| %>
|
<% flash.each do |test, msg| %>
|
||||||
<%
|
<%
|
||||||
str="[\"#{msg['name']}\"]"
|
str="[\"#{msg['name']}\"]"
|
||||||
str.gsub!('["', '')
|
str.gsub!('["', '')
|
||||||
str.gsub!('"]', '') %>
|
str.gsub!('"]', '') %>
|
||||||
<span class="help-block" style="margin-top:-6px"><%= str %></span>
|
<lable class="error" style="margin-top:-6px"><%= str %></lable>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -45,28 +45,28 @@
|
|||||||
<% str="[\"#{msg['company']}\"]"
|
<% str="[\"#{msg['company']}\"]"
|
||||||
str.gsub!('["', '')
|
str.gsub!('["', '')
|
||||||
str.gsub!('"]', '') %>
|
str.gsub!('"]', '') %>
|
||||||
<span class="help-block" style="margin-top:-6px"><%= str %></span>
|
<lable class="error" style="margin-top:-6px"><%= str %></lable>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group <%= (flash["errors"]) ? "has-error" : "" %>">
|
<div class="form-group <%= (flash["errors"]) ? "error" : "" %>">
|
||||||
<%= f.input :contact_no, :class => "form-control col-md-6 contact_no" ,:required => true%>
|
<%= f.input :contact_no, :class => "form-control col-md-6 contact_no" ,:required => true%>
|
||||||
|
|
||||||
<% flash.each do |name, msg| %>
|
<% flash.each do |name, msg| %>
|
||||||
<% str="[\"#{msg['contact_no']}\"]"
|
<% str="[\"#{msg['contact_no']}\"]"
|
||||||
str.gsub!('["', '')
|
str.gsub!('["', '')
|
||||||
str.gsub!('"]', '') %>
|
str.gsub!('"]', '') %>
|
||||||
<span class="help-block" style="margin-top:-6px"><%= str %></span>
|
<lable class="error" style="margin-top:-6px"><%= str %></lable>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group <%= (flash["errors"]) ? "has-error" : "" %>">
|
<div class="form-group <%= (flash["errors"]) ? "error" : "" %>">
|
||||||
<%= f.input :email, :class => "form-control col-md-6 email" ,:required => true%>
|
<%= f.input :email, :class => "form-control col-md-6 email" ,:required => true%>
|
||||||
|
|
||||||
<% flash.each do |name, msg| %>
|
<% flash.each do |name, msg| %>
|
||||||
<% str="[\"#{msg['email']}\"]"
|
<% str="[\"#{msg['email']}\"]"
|
||||||
str.gsub!('["', '')
|
str.gsub!('["', '')
|
||||||
str.gsub!('"]', '') %>
|
str.gsub!('"]', '') %>
|
||||||
<span class="help-block" style="margin-top:-6px"><%= str %></span>
|
<lable class="error" style="margin-top:-6px"><%= str %></lable>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -101,13 +101,13 @@
|
|||||||
<%= f.input :tax_profiles, :collection => @taxes, :input_html => { :multiple => true }, :class => "form-control col-md-6 tax_profiles" %>
|
<%= f.input :tax_profiles, :collection => @taxes, :input_html => { :multiple => true }, :class => "form-control col-md-6 tax_profiles" %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group <%= (flash["errors"]) ? "has-error" : "" %>">
|
<div class="form-group <%= (flash["errors"]) ? "error" : "" %>">
|
||||||
<%= f.input :card_no, :class => "form-control col-md-6 card_no"%>
|
<%= f.input :card_no, :class => "form-control col-md-6 card_no"%>
|
||||||
<% flash.each do |name, msg| %>
|
<% flash.each do |name, msg| %>
|
||||||
<% str="[\"#{msg['card_no']}\"]"
|
<% str="[\"#{msg['card_no']}\"]"
|
||||||
str.gsub!('["', '')
|
str.gsub!('["', '')
|
||||||
str.gsub!('"]', '') %>
|
str.gsub!('"]', '') %>
|
||||||
<span class="help-block" style="margin-top:-6px"><%= str %></span>
|
<lable class="error" style="margin-top:-6px"><%= str %></lable>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -47,14 +47,22 @@
|
|||||||
|
|
||||||
<!-- Main Content -->
|
<!-- Main Content -->
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<% flash.each do |type, message| %>
|
<% flash.each do |type, message| %>
|
||||||
<div class="alert-danger fade in">
|
<% if !flash["errors"]%>
|
||||||
<button class="close" aria-hidden="true" data-dismiss="alert" type="button">×</button>
|
<%
|
||||||
|
if type == "notice"
|
||||||
|
color = "alert-success"
|
||||||
|
elsif type == "error"
|
||||||
|
color = "alert-danger"
|
||||||
|
else
|
||||||
|
color = "bg-black"
|
||||||
|
end
|
||||||
|
%>
|
||||||
|
|
||||||
<% if !flash["errors"]%>
|
<p id="notify_message" class="hidden" data-placement-from="top" data-message="<%=message%>" data-placement-align="center"
|
||||||
<%=message%>
|
data-animate-enter="" data-animate-exit="" data-color-name="<%=color%>" >
|
||||||
<% end %>
|
</p>
|
||||||
</div>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%= yield %>
|
<%= yield %>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@@ -48,6 +48,19 @@
|
|||||||
|
|
||||||
<!-- Main Content -->
|
<!-- Main Content -->
|
||||||
<section class="content">
|
<section class="content">
|
||||||
|
<% flash.each do |type, message| %>
|
||||||
|
<% if type == "notice"
|
||||||
|
color = "alert-success"
|
||||||
|
elsif type == "error"
|
||||||
|
color = "alert-danger"
|
||||||
|
else
|
||||||
|
color = "bg-black"
|
||||||
|
end %>
|
||||||
|
|
||||||
|
<p id="notify_message" class="hidden" data-placement-from="top" data-message="<%=message%>" data-placement-align="center"
|
||||||
|
data-animate-enter="" data-animate-exit="" data-color-name="<%=color%>" >
|
||||||
|
</p>
|
||||||
|
<% end %>
|
||||||
<%= yield %>
|
<%= yield %>
|
||||||
</section>
|
</section>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -48,14 +48,18 @@
|
|||||||
<!-- Main Content -->
|
<!-- Main Content -->
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<% flash.each do |type, message| %>
|
<% flash.each do |type, message| %>
|
||||||
<% if !flash["errors"]%>
|
<% if type == "notice"
|
||||||
<div class="alert fade in">
|
color = "alert-success"
|
||||||
<button class="close" aria-hidden="true" data-dismiss="alert" type="button">×</button>
|
elsif type == "error"
|
||||||
<%=message%>
|
color = "alert-danger"
|
||||||
</div>
|
else
|
||||||
<% end %>
|
color = "bg-black"
|
||||||
|
end %>
|
||||||
|
|
||||||
<% end %>
|
<p id="notify_message" class="hidden" data-placement-from="top" data-message="<%=message%>" data-placement-align="center"
|
||||||
|
data-animate-enter="" data-animate-exit="" data-color-name="<%=color%>" >
|
||||||
|
</p>
|
||||||
|
<% end %>
|
||||||
<%= yield %>
|
<%= yield %>
|
||||||
</section>
|
</section>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -21,31 +21,26 @@
|
|||||||
<% @settings_room.dining_charges.each do |dc| %>
|
<% @settings_room.dining_charges.each do |dc| %>
|
||||||
|
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="col-md-7">
|
<div class="col-md-">
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<tr><td colspan="2">
|
<tr><td colspan="2">
|
||||||
<div class="col-md-10"><b><u>Dining Charge</u></b></div></td>
|
<div class="col-md-10"><b><u>Dining Charge</u></b></div></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Item code :</td>
|
<td class="align-right">Item code :</td>
|
||||||
<td><%= dc.item_code %></td>
|
<td class="align-left"><%= dc.item_code %></td>
|
||||||
</tr>
|
<td class="align-right">Unit price : </td>
|
||||||
<tr>
|
<td class="align-left"><%= dc.unit_price %></td>
|
||||||
<td>Unit price : </td>
|
<td class="align-right">Charge type : </td>
|
||||||
<td><%= dc.unit_price %></td>
|
<td class="align-left"><%= dc.charge_type %></td>
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Charge type : </td>
|
|
||||||
<td><%= dc.charge_type %></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
<td>
|
||||||
<%= link_to 'Edit Charges', edit_settings_zone_room_dining_charge_path(@zone,@settings_room,dc),:class => 'btn bg-deep-purple' %>
|
<%= link_to 'Edit Charges', edit_settings_zone_room_dining_charge_path(@zone,@settings_room,dc),:class => 'btn bg-deep-purple' %>
|
||||||
<!-- <button class="btn btn-primary" src="<%= edit_settings_zone_room_dining_charge_path(@zone,@settings_room,dc) %>">Edit Charge</button> -->
|
<!-- <button class="btn btn-primary" src="<%= edit_settings_zone_room_dining_charge_path(@zone,@settings_room,dc) %>">Edit Charge</button> -->
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
<td></td>
|
</tr>
|
||||||
</tr>
|
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -24,22 +24,16 @@
|
|||||||
<div class="col-md-10"><b><u>Dining Charge</u></b></div></td>
|
<div class="col-md-10"><b><u>Dining Charge</u></b></div></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Item code :</td>
|
<td class="align-right">Item code :</td>
|
||||||
<td><%= dc.item_code %></td>
|
<td class="align-left"><%= dc.item_code %></td>
|
||||||
</tr>
|
<td class="align-right">Unit price : </td>
|
||||||
<tr>
|
<td class="align-left"><%= dc.unit_price %></td>
|
||||||
<td>Unit price : </td>
|
<td class="align-right">Charge type : </td>
|
||||||
<td><%= dc.unit_price %></td>
|
<td class="align-left"><%= dc.charge_type %></td>
|
||||||
</tr>
|
<td><%= link_to 'Edit Charges', edit_settings_zone_table_dining_charge_path(@zone,@settings_table,dc),:class => 'btn bg-deep-purple' %>
|
||||||
<tr>
|
|
||||||
<td>Charge type : </td>
|
|
||||||
<td><%= dc.charge_type %></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><%= link_to 'Edit Charges', edit_settings_zone_table_dining_charge_path(@zone,@settings_table,dc),:class => 'btn bg-deep-purple' %>
|
|
||||||
<!-- <button class="btn btn-primary" src="<%= edit_settings_zone_table_dining_charge_path(@zone,@settings_table,dc) %>">Edit Charge</button> --></td>
|
<!-- <button class="btn btn-primary" src="<%= edit_settings_zone_table_dining_charge_path(@zone,@settings_table,dc) %>">Edit Charge</button> --></td>
|
||||||
<td></td>
|
</tr>
|
||||||
</tr>
|
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user