<% if !@survey_data.nil? %>
- <%= f.input :child, input_html: { value: @survey_data.child, class: 'col-md-10' }%>
- <%= f.input :adult, input_html: { value: @survey_data.adult, class: 'col-md-10' }%>
- <%= f.input :male , input_html: { value: @survey_data.male, class: 'col-md-10' }%>
- <%= f.input :female , input_html: { value: @survey_data.female, class: 'col-md-10' }%>
- <%= f.input :total_customer, input_html: { value: @survey_data.total_customer, class: 'col-md-10'} %>
- <%= f.input :local , input_html: { value: @survey_data.local, class: 'col-md-10' }%>
-
-
+
-
-
-
+ <%= f.input :child, input_html: { value: @survey_data.child, class: 'col-md-10' }%>
-
+
+
+
+
+ <%= f.input :male , input_html: { value: @survey_data.male, class: 'col-md-10' }%>
+
+
+
+
+ <%= f.input :female , input_html: { value: @survey_data.female, class: 'col-md-10' }%>
+
+
+
+ <%= f.input :total_customer, input_html: { value: @survey_data.total_customer, class: 'col-md-11'} %>
+ <%= f.input :local , input_html: { value: @survey_data.local, class: 'col-md-11' }%>
+
<% else %>
- <%= f.input :child , input_html: { class: 'col-md-10' }%>
- <%= f.input :adult , input_html: { class: 'col-md-10' }%>
- <%= f.input :male , input_html: { class: 'col-md-10' }%>
- <%= f.input :female , input_html: { class: 'col-md-10' }%>
- <%= f.input :total_customer, input_html: { class: 'col-md-10'} %>
- <%= f.input :local , input_html: { class: 'col-md-10' }%>
-
-
+
-
-
-
+ <%= f.input :child , input_html: { class: 'col-md-10' }%>
-
- <% end %>
-
+
+
+
+
+ <%= f.input :male , input_html: { class: 'col-md-10' }%>
+
+
+
+
+ <%= f.input :female , input_html: { class: 'col-md-10' }%>
+
+
+
+ <%= f.input :total_customer, input_html: { class: 'col-md-11'} %>
+ <%= f.input :local , input_html: { class: 'col-md-11' }%>
-
+
+ <% end %>
+
<%if !@dining_facility.nil? %>
@@ -95,8 +142,8 @@
<%= f.input :created_by, :as => :hidden, :input_html => { :value => current_login_employee.name } %>
<%= f.input :receipt_no, :as => :hidden, :input_html => { :value => @receipt_no} %>
<%= f.input :total_amount, :as => :hidden, :input_html => { :value => @grand_total } %>
-
-
+
+
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
<% end %>
@@ -202,7 +249,7 @@ var cashier_type = "<%= @cashier_type %>";
$('#newTemplate').removeClass('hidden');
var text_box = '
'
- +'
'
+ +'
'
+'
'
+' '
+'
'
+'
'
- +'
'
+ +'
'
+'
'
+''
+'
'
diff --git a/app/views/settings/employees/index.html.erb b/app/views/settings/employees/index.html.erb
index 7aeee2ec..f47cc8e5 100755
--- a/app/views/settings/employees/index.html.erb
+++ b/app/views/settings/employees/index.html.erb
@@ -27,15 +27,29 @@
<% @employees.each do |employee| %>
-
- | <%= link_to employee.name,settings_employee_path(employee) %> |
- <%= employee.role %> |
- <%= employee.created_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") %> |
- <%= employee.updated_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") %> |
-
- <%= link_to t("views.btn.edit"), edit_settings_employee_path(employee),:class => 'btn btn-info btn-sm waves-effect' %>
- |
-
+ <% if current_login_employee.role == "administrator" %>
+
+ | <%= link_to employee.name,settings_employee_path(employee) %> |
+ <%= employee.role %> |
+ <%= employee.created_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") %> |
+ <%= employee.updated_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") %> |
+
+ <%= link_to t("views.btn.edit"), edit_settings_employee_path(employee),:class => 'btn btn-info btn-sm waves-effect' %>
+ |
+
+ <% else %>
+ <% if employee.role != "administrator" %>
+
+ | <%= link_to employee.name,settings_employee_path(employee) %> |
+ <%= employee.role %> |
+ <%= employee.created_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") %> |
+ <%= employee.updated_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") %> |
+
+ <%= link_to t("views.btn.edit"), edit_settings_employee_path(employee),:class => 'btn btn-info btn-sm waves-effect' %>
+ |
+
+ <% end %>
+ <% end %>
<% end %>
diff --git a/config/initializers/action_controller.rb b/config/initializers/action_controller.rb
index dcfcfed5..b063f28e 100644
--- a/config/initializers/action_controller.rb
+++ b/config/initializers/action_controller.rb
@@ -12,7 +12,7 @@ class ActionController::Base
ActiveRecord::Base.establish_connection(website_connection(@license))
# authenticate_session_token
# logger.info "Connecting to - " + @license.subdomain + " - "+ @license.dbhost + "@" + @license.dbschema
- else
+ else8
# reconnect_default_db
logger.info 'License is nil'
# redirect_to root_url(:host => request.domain) + "store_error"