Merge branch 'master' of bitbucket.org:code2lab/sxrestaurant

This commit is contained in:
Aung Myo
2017-12-29 14:44:27 +06:30
7 changed files with 59 additions and 5 deletions

31
Capfile Normal file
View File

@@ -0,0 +1,31 @@
# Load DSL and set up stages
require "capistrano/setup"
# Include default deployment tasks
require "capistrano/deploy"
# Include tasks from other gems included in your Gemfile
#
# For documentation on these, see for example:
#
# https://github.com/capistrano/rvm
# https://github.com/capistrano/rbenv
# https://github.com/capistrano/chruby
# https://github.com/capistrano/bundler
# https://github.com/capistrano/rails
# https://github.com/capistrano/passenger
#
# require "capistrano/rvm"
require "capistrano/rbenv"
# require "capistrano/chruby"
require "capistrano/bundler"
require "capistrano/rails"
require "capistrano/rails/assets"
require "capistrano/rails/migrations"
# require "capistrano/passenger"
# Load custom tasks from `lib/capistrano/tasks` if you have any defined
Dir.glob("lib/capistrano/tasks/*.rake").each { |r| import r }
Dir.glob('lib/capistrano/tasks/*.cap').each { |r| import r }
Dir.glob('lib/capistrano/**/*.rb').each { |r| import r }

View File

@@ -37,6 +37,8 @@ class Crm::CustomersController < BaseCrmController
@crm_customer = Customer.new @crm_customer = Customer.new
@count_customer = Customer.count_customer @count_customer = Customer.count_customer
@membership_types = Lookup.collection_of("member_group_type")
@taxes = TaxProfile.all.order("order_by asc") @taxes = TaxProfile.all.order("order_by asc")
@filter = filter @filter = filter

View File

@@ -75,7 +75,8 @@ class Origami::CustomersController < BaseOrigamiController
# if flash["errors"] # if flash["errors"]
# @crm_customer.valid? # @crm_customer.valid?
# end # end
@membership_types = Lookup.collection_of("member_group_type")
respond_to do |format| respond_to do |format|
# format.html { render :template => "crm/customers/index" } # format.html { render :template => "crm/customers/index" }
format.html { render action: "index"} format.html { render action: "index"}

View File

@@ -52,6 +52,7 @@
<th><%= t("views.right_panel.detail.sr_no") %></th> <th><%= t("views.right_panel.detail.sr_no") %></th>
<th><%= t("views.right_panel.detail.name") %></th> <th><%= t("views.right_panel.detail.name") %></th>
<th><%= t("views.right_panel.detail.card_no") %></th> <th><%= t("views.right_panel.detail.card_no") %></th>
<th><%= t("views.right_panel.detail.membership_type") %></th>
<th style="width:20%"><%= t("views.right_panel.detail.contact_no") %></th> <th style="width:20%"><%= t("views.right_panel.detail.contact_no") %></th>
<th style="width:20%"><%= t("views.right_panel.detail.email") %></th> <th style="width:20%"><%= t("views.right_panel.detail.email") %></th>
<th><%= t("views.right_panel.detail.action") %></th> <th><%= t("views.right_panel.detail.action") %></th>
@@ -75,6 +76,15 @@
</td> </td>
<td><%= crm_customer.name %></td> <td><%= crm_customer.name %></td>
<td><%= crm_customer.card_no rescue '-' %></td> <td><%= crm_customer.card_no rescue '-' %></td>
<td>
<% if !@membership_types.nil? %>
<% @membership_types.each do |member_type| %>
<% if member_type[1] == crm_customer.membership_type %>
<%= member_type[0] %>
<% end %>
<% end %>
<% end %>
</td>
<td style="width:20px%;word-break: break-all;"><%= crm_customer.contact_no %></td> <td style="width:20px%;word-break: break-all;"><%= crm_customer.contact_no %></td>
<td style="width:20px%;word-break: break-all;"><%= crm_customer.email %></td> <td style="width:20px%;word-break: break-all;"><%= crm_customer.email %></td>
<td><%= link_to t("views.btn.show"), crm_customer_path(crm_customer) %></td> <td><%= link_to t("views.btn.show"), crm_customer_path(crm_customer) %></td>

View File

@@ -54,6 +54,7 @@
<th><%= t("views.right_panel.detail.sr_no") %></th> <th><%= t("views.right_panel.detail.sr_no") %></th>
<th><%= t("views.right_panel.detail.name") %></th> <th><%= t("views.right_panel.detail.name") %></th>
<th><%= t("views.right_panel.detail.card_no") %></th> <th><%= t("views.right_panel.detail.card_no") %></th>
<th><%= t("views.right_panel.detail.membership_type") %></th>
<th style="width:20%"><%= t("views.right_panel.detail.contact_no") %></th> <th style="width:20%"><%= t("views.right_panel.detail.contact_no") %></th>
<th style="width:20%"><%= t("views.right_panel.detail.email") %></th> <th style="width:20%"><%= t("views.right_panel.detail.email") %></th>
<!-- <th>Paypar No</th> --> <!-- <th>Paypar No</th> -->
@@ -76,7 +77,16 @@
<% end %> <% end %>
</td> </td>
<td><%= crm_customer.name %></td> <td><%= crm_customer.name %></td>
<td><%= crm_customer.company rescue '-' %></td> <td><%= crm_customer.card_no rescue '-' %></td>
<td>
<% if !@membership_types.nil? %>
<% @membership_types.each do |member_type| %>
<% if member_type[1] == crm_customer.membership_type %>
<%= member_type[0] %>
<% end %>
<% end %>
<% end %>
</td>
<td style="width:20%;word-break: break-all;"><%= crm_customer.contact_no %></td> <td style="width:20%;word-break: break-all;"><%= crm_customer.contact_no %></td>
<td style="width:20%;word-break: break-all;"><%= crm_customer.email %></td> <td style="width:20%;word-break: break-all;"><%= crm_customer.email %></td>
<!-- <td><%= crm_customer.paypar_account_no %></td> --> <!-- <td><%= crm_customer.paypar_account_no %></td> -->

View File

@@ -1,6 +1,6 @@
lock "3.10.1" lock "3.10.1"
set :application, "sxrestaurant" set :application, "zsai"
set :repo_url, 'git@bitbucket.org:code2lab/sxrestaurant.git' set :repo_url, 'git@bitbucket.org:code2lab/sxrestaurant.git'
set :deploy_user, 'deploy' set :deploy_user, 'deploy'
@@ -12,7 +12,7 @@ set :rbenv_map_bins, %w{rake gem bundle ruby rails}
set :keep_releases, 5 set :keep_releases, 5
set :linked_files, %w{config/database.yml config/secrets.yml config/puma.rb config/sidekiq.yml} set :linked_files, %w{config/database.yml config/secrets.yml config/puma.rb config/sidekiq.yml config/shops.json}
set :linked_dirs, %w{bin log tmp/puma tmp/pids tmp/cache tmp/sockets vendor/bundle public/system pids sockets} set :linked_dirs, %w{bin log tmp/puma tmp/pids tmp/cache tmp/sockets vendor/bundle public/system pids sockets}

View File

@@ -5,5 +5,5 @@ set :full_app_name, "#{fetch(:application)}_#{fetch(:stage)}"
server '192.168.1.27', user: 'deploy', roles: %w{web app db}, primary: true server '192.168.1.27', user: 'deploy', roles: %w{web app db}, primary: true
set :deploy_to, "/home/#{fetch(:deploy_user)}/apps/#{fetch(:full_app_name)}" set :deploy_to, "/home/#{fetch(:deploy_user)}/apps/#{fetch(:full_app_name)}"
set :rbenv_ruby, '2.4.0' set :rbenv_ruby, '2.4.1'
set :rails_env, :production set :rails_env, :production