commit from production server

This commit is contained in:
git_code2lab
2019-11-15 14:17:50 +06:30
parent 1330422b60
commit 213644d8ef
18 changed files with 1154 additions and 69 deletions

View File

@@ -2,7 +2,8 @@ class Origami::DashboardController < BaseOrigamiController
def index
@shop = Shop.first
Rails.logger.info ENV["SERVER_MODE"]
Rails.logger.info "<><><><><><><><>>"
today = DateTime.now.strftime('%Y-%m-%d')
@display_type = Lookup.find_by_lookup_type("display_type")

View File

@@ -22,7 +22,7 @@ class Origami::PendingOrderController < BaseOrigamiController
else
redirect_to "/origami/#{params[:type]}" and return
end
elsif id.start_with?("BKI")
elsif (id.start_with?("BKI")|| id.start_with?("CBKI"))
@bookings = Booking.find(id)
@order = @bookings.orders.where(status: "new").first
@order_items = @bookings.order_items

View File

@@ -13,7 +13,8 @@ class License
def initialize(server = "", lookup = "")
#this code is hard-code to reflect server mode - Very important.
self.server_mode = ENV["SERVER_MODE"]
# self.server_mode = ENV["SERVER_MODE"]
self.server_mode = "cloud"
if (server != "")
self.class.base_uri server
@@ -41,11 +42,12 @@ class License
@params = { query: { lookup_type: self.server_mode, lookup: lookup, iv_key: aes_iv} }
response = self.class.get("/subdomain", @params)
@license = response.parsed_response
Rails.logger.info "License Response - " + response.parsed_response.to_s
if (@license["status"] == true)
assign(aes_key, aes_iv)
# Rails.logger.info "License - " + response.parsed_response.to_s
#Rails.logger.info "License - " + response.parsed_response.to_s
redis = Redis.new
redis.set(cache_key, Marshal.dump(@license))

View File

@@ -1,5 +1,5 @@
require 'net/http'
require 'cups'
#require 'cups'
class Printer::PrinterWorker
attr_accessor :print_settings

View File

@@ -7,8 +7,8 @@
<div class="form-inputs p-l-25">
<%= f.input :name,:input_html=>{:class=>"col-md-9"} %>
<%= f.input :is_active,:input_html=>{:class=>"col-md-9"} %>
<%= f.input :is_ordering,:input_html=>{:class=>"col-md-9"} %>
<%= f.input :is_active,:input_html=>{:class=>"col-md-9"}, as: :boolean %>
<%= f.input :is_ordering,:input_html=>{:class=>"col-md-9"}, as: :boolean %>
<div class="row checkboxes ">
<div class="col-md-2">
<label class="control-label"><abbr title="required">*</abbr> Valid Day</label>