Finish bill feature.

This commit is contained in:
BoHung Chiu 2020-09-08 14:12:14 +08:00
parent fe378ff474
commit f655b68697
19 changed files with 510 additions and 2 deletions

View File

@ -0,0 +1,69 @@
class Admin::VenueManagementBillsController < Admin::VenueAdminController
include Admin::VenueManagementsHelper
before_action ->(module_app = @app_title) { set_variables module_app }
before_action :set_venue_management_bill, only: [:edit, :update, :destroy]
def initialize
super
@app_title = 'venue_management'
end
def index
@table_fields = [
'venue_management.title',
"contractor",
"accounting_month",
"bill_type",
"caculation_basis",
"reason",
"amount",
"pay_date",
"pay_method",
"note"
]
@bills = VenueManagementBill.all.page(params[:page]).per(10)
@venue_management_page_url = Page.where(:module =>"venue_management").last.url rescue ""
end
def new
@venue_management = VenueManagementMain.find(params[:id])
@venue_management_bill = VenueManagementBill.new(venue_management_main_id: params[:id])
end
def create
@venue_management_bill = VenueManagementBill.new(venue_management_bill_params)
@venue_management_bill.save
redirect_to params['referer_url']
end
def edit
@venue_management = VenueManagementMain.find(@venue_management_bill.venue_management_main_id)
end
def update
@venue_management_bill.update_attributes(venue_management_bill_params)
redirect_to venue_management_bills_admin_venue_management_path(@venue_management_bill.venue_management_main_id)
end
def destroy
@venue_management_main_id = @venue_management_bill.venue_management_main_id
@venue_management_bill.destroy
redirect_to venue_management_bills_admin_venue_management_path(@venue_management_main_id)
end
private
def set_venue_management_bill
@venue_management_bill = VenueManagementBill.find(params[:id])
end
def venue_management_bill_params
params.require(:venue_management_bill).permit!
end
def venue_management_bill_params
params.require(:venue_management_bill).permit!
end
end

View File

@ -4,7 +4,7 @@ class Admin::VenueManagementsController < Admin::VenueAdminController
require 'axlsx'
helper Admin::VenueManagementsFieldHelper
before_action ->(module_app = @app_title) { set_variables module_app }
before_action :set_venue_management, only: [:edit, :set_write_off, :venue_management_signup, :destroy, :venue_management_invitings, :venue_management_memorabilias, :venue_management_contracts]
before_action :set_venue_management, only: [:edit, :set_write_off, :venue_management_signup, :destroy, :venue_management_invitings, :venue_management_memorabilias, :venue_management_bills, :venue_management_contracts]
def initialize
super
@ -29,6 +29,7 @@ class Admin::VenueManagementsController < Admin::VenueAdminController
'venue_management.contract_history',
'venue_management.inviting_history',
'venue_management.memorabilia',
'venue_management.bills',
'venue_management.export'
]
@filter_fields["vm_inviting.type"] = @module_app.tags.map{|t| {:title => t.name,:id => t.id} }
@ -329,7 +330,21 @@ class Admin::VenueManagementsController < Admin::VenueAdminController
@memorabilias = @venue_management.venue_management_memorabilias.page(params[:page]).per(10)
@venue_management_page_url = Page.where(:module =>"venue_management").last.url rescue ""
end
def venue_management_bills
@table_fields = [
"contractor",
"accounting_month",
"bill_type",
"caculation_basis",
"reason",
"amount",
"pay_date",
"pay_method",
"note"
]
@bills = @venue_management.venue_management_bills.page(params[:page]).per(10)
@venue_management_page_url = Page.where(:module =>"venue_management").last.url rescue ""
end
def venue_management_contracts
@table_fields = [
'vm_contract.case_no',

View File

@ -100,6 +100,14 @@ class VenueManagementsController < ApplicationController
'params' => params
}
end
def show_bill
params = OrbitHelper.params
venue_management_bill = VenueManagementBill.find(params[:uid]) rescue nil
{
'venue_management_bill' => venue_management_bill,
'params' => params
}
end
def show
params = OrbitHelper.params

View File

@ -0,0 +1,9 @@
module Admin::VenueManagementBillsHelper
def self.thead(field)
if field.include?(".")
return ("<th>"+I18n.t(field)+"</th>").html_safe
else
return ("<th>"+I18n.t("vm_bill.#{field}")+"</th>").html_safe
end
end
end

View File

@ -0,0 +1,27 @@
require 'orbit_form_helper'
class VenueManagementBill
include Mongoid::Document
include Mongoid::Timestamps
include Mongoid::Enum
BILLTYPE = {'venue_fee'=>["usage_fee", "royalties", "admin_fee", "land_rent"],'utility_bill'=>['electricity','water'],'tax'=>['house_tax','land_tax'],'other'=>['penalty','other']}
CACULATIONBASISTYPE = ['revenue','degree']
field :accounting_month, type: Date, default: Time.now
field :bill_typeA, type: String, default: ""
field :bill_typeB, type: String, default: ""
field :caculation_basis_type, type: String, default: ""
field :caculation_basis, type: Integer, default: ""
field :reason, type: String, default: "", localize: true
field :amount, type: Integer, default: 0
field :deadline, type: Date, default: Time.now
field :received_date, type: Date, default: Time.now
field :pay_method, type: String, default: "", localize: true
field :note, type: String, default: "", localize: true
belongs_to :venue_management_main
include VenueLinkFile
def contractor
return self.venue_management_main.venue_management_contracts.where(:contract_start_date.lte=>self.accounting_month,:contract_end_date.gte=>self.accounting_month).first
end
def pay_date
return "#{self.deadline}/#{self.received_date}"
end
end

View File

@ -36,6 +36,7 @@ class VenueManagementMain
has_many :venue_management_invitings, :autosave => true, :dependent => :destroy
has_many :venue_management_memorabilias, :autosave => true, :dependent => :destroy
has_many :venue_management_bills, :autosave => true, :dependent => :destroy
has_many :venue_management_contracts, :autosave => true, :dependent => :destroy
has_many :venue_management_item_contents, :autosave => true, :dependent => :destroy
has_many :venue_management_signups, :autosave => true, :dependent => :destroy

View File

@ -0,0 +1,105 @@
<% content_for :page_specific_css do %>
<%= stylesheet_link_tag "lib/main-forms" %>
<%= stylesheet_link_tag "lib/fileupload" %>
<%= stylesheet_link_tag "lib/main-list" %>
<% end %>
<% content_for :page_specific_javascript do %>
<%= javascript_include_tag "lib/bootstrap-fileupload" %>
<%= javascript_include_tag "lib/bootstrap-datetimepicker" %>
<%= javascript_include_tag "lib/datetimepicker/datetimepicker.js" %>
<%= javascript_include_tag "lib/file-type" %>
<%= javascript_include_tag "lib/module-area" %>
<% end %>
<!-- Input Area -->
<div class="input-area">
<!-- Module -->
<div class="tab-content module-area">
<!-- Basic Module -->
<div class="tab-pane fade in active" id="basic">
<%= f.hidden_field :venue_management_main_id %>
<div class="control-group">
<label class="control-label muted"><%= t('vm_bill.accounting_month') %></label>
<div class="controls">
<%= f.datetime_picker :accounting_month, :no_label => true, :format=>"yyyy/MM", :new_record => @venue_management_bill.new_record? %>
</div>
</div>
<div class="control-group">
<label class="control-label muted"><%= t('vm_bill.bill_type') %></label>
<div class="controls">
<%= f.select :bill_typeA, @venue_management_bill.class::BILLTYPE.keys.map { |k| [ I18n.t("vm_bill.#{k}"), k ] },{},{:onchange=>"var $this=this;console.log($this.value);(function(){var obj=#{@venue_management_bill.class::BILLTYPE.map{|k,v| [k,v.map{|vv| [vv,I18n.t("vm_bill.#{vv}")]}.to_h]}.to_h.to_s.gsub('=>',':')};$($this).siblings('select').html($.map(obj[$this.value],function(v,k){return \'<option value=\"\'+k+\'\">\'+v+\'</option>\'}).join(\' \'))})()"} %>
<% bill_typeB = @venue_management_bill.new_record? ? @venue_management_bill.class::BILLTYPE.values.first : @venue_management_bill.class::BILLTYPE[@venue_management_bill.bill_typeA] %>
<%= f.select :bill_typeB, bill_typeB.map { |v| [ I18n.t("vm_bill.#{v}"), v ] } %>
</div>
</div>
<div class="control-group">
<label class="control-label muted"><%= t('vm_bill.caculation_basis') %></label>
<div class="controls">
<%= f.select :caculation_basis_type, @venue_management_bill.class::CACULATIONBASISTYPE.map { |k| [ I18n.t("vm_bill.#{k}"), k ] } %>
<%= f.number_field :caculation_basis %>
</div>
</div>
<div class="control-group">
<label class="control-label muted"><%= t('vm_bill.amount') %></label>
<div class="controls">
<%= f.number_field :amount %>
</div>
</div>
<div class="control-group">
<label class="control-label muted"><%= t('vm_bill.deadline') %></label>
<div class="controls">
<%= f.datetime_picker :deadline, :no_label => true, :format=>"yyyy/MM/dd", :new_record => @venue_management_bill.new_record? %>
</div>
</div>
<div class="control-group">
<label class="control-label muted"><%= t('vm_bill.received_date') %></label>
<div class="controls">
<%= f.datetime_picker :received_date, :no_label => true, :format=>"yyyy/MM/dd", :new_record => @venue_management_bill.new_record? %>
</div>
</div>
</div>
</div>
<!-- Language Tabs -->
<div class="nav-name"><strong><%= t(:language) %></strong></div>
<ul class="nav nav-pills language-nav">
<% @site_in_use_locales.each_with_index do |locale, i| %>
<li class="<%= 'active' if i == 0 %>">
<a data-toggle="tab" href=".<%= locale %>"><%= t(locale) %></a>
</li>
<% end %>
</ul>
<!-- Language -->
<% translations_fields = {"reason"=>"text_field","pay_method"=>"text_field","note"=>"cktext_area"} %>
<div class="tab-content language-area">
<% @site_in_use_locales.each_with_index do |locale, i| %>
<div class="<%= locale %> tab-pane fade <%= ( i == 0 ) ? "in active" : '' %>">
<!-- Content -->
<% translations_fields.each do |field,type| %>
<div class="control-group input-content">
<label class="control-label muted"><%= t("vm_bill.#{field}") %></label>
<div class="controls">
<div class="textarea">
<%= f.fields_for "#{field}_translations" do |f1| %>
<%= f1.send(type, locale, rows: 5, class: "input-block-level", :value => (@venue_management_bill.send("#{field}_translations")[locale] rescue nil)) %>
<% end %>
</div>
</div>
</div>
<% end %>
</div>
<% end %>
</div>
</div>
<!-- Form Actions -->
<div class="form-actions">
<%= get_referer_url[:venue_managemention] rescue "" %>
<%= f.submit t('submit'), class: 'btn btn-primary' %>
<input type="hidden" name="referer_url" value="<%= get_referer_url %>">
<%= link_to t('cancel'), venue_management_memorabilias_admin_venue_management_path(id: @venue_management.id), :class=>"btn" %>
</div>

View File

@ -0,0 +1,60 @@
<script>
if(document.querySelectorAll("#orbit-bar").length==0) location.reload();
</script>
<% if 'venue_management_memorabilias' == params[:action] %>
<h4><%= @venue_management.title %></h4>
<% end %>
<table class="table main-list">
<thead>
<tr class="sort-header">
<% @table_fields.each do |f| %>
<%= Admin::VenueManagementBillsHelper.thead(f) %>
<% end %>
</tr>
</thead>
<tbody>
<% @bills.each do |bill| %>
<tr>
<% if 'venue_management_bills' != params[:action] %>
<td><%= bill.venue_management_main.title %></td>
<% end %>
<td>
<% contractors = bill.contractor.display_contractors rescue "" %>
<% contractors = t(:empty) if contractors.blank? %>
<%= link_to contractors, (@venue_management_page_url.blank? ? "#" : "/#{I18n.locale}"+@venue_management_page_url+"/#{contractors.to_s.strip}-#{bill.id}?method=show_bill"), :target => '_self' %>
<div class="quick-edit">
<ul class="nav nav-pills">
<% if can_edit_or_delete?(bill) %>
<li><%= link_to t(:edit), edit_admin_venue_management_bill_path(bill.id) %></li>
<li><a href="#" class="delete text-error" rel="/admin/venue_management_bills/<%=bill.id.to_s%>"><%= t(:delete_) %></a></li>
<% end %>
</ul>
</div>
</td>
<td><%= bill.accounting_month.strftime("%Y-%m") %></td>
<td><%= "#{t("vm_bill.#{bill.bill_typeA}")}/#{t("vm_bill.#{bill.bill_typeB}")}" %></td>
<td><%= "#{t("vm_bill.#{bill.caculation_basis_type}")}: #{bill.caculation_basis}" %></td>
<td><%= bill.reason %></td>
<td><%= bill.amount %></td>
<td><%= bill.pay_date %></td>
<td><%= bill.pay_method %></td>
<td><%= bill.note %></td>
</tr>
<% end %>
</tbody>
</table>
<%=
content_tag :div, class: "bottomnav clearfix" do
content_tag :div, paginate(@bills), class: "pagination pagination-centered"
end
%>
<% if @venue_management.present? %>
<!-- footer -->
<div class="bottomnav clearfix">
<div class="action pull-right">
<%= link_to content_tag(:i, nil, class: "icons-plus") + " " + t(:add), new_admin_venue_management_bill_path(id: @venue_management.id), class: "btn btn-primary" %>
</div>
</div>
<!-- footer:end -->
<% end %>

View File

@ -0,0 +1,5 @@
<%= form_for @venue_management_bill, url: admin_venue_management_bill_path(@venue_management_bill), html: {class: "form-horizontal main-forms"} do |f| %>
<fieldset>
<%= render :partial => 'form', locals: {f: f} %>
</fieldset>
<% end %>

View File

@ -0,0 +1,4 @@
<span id="index_table">
<%= render 'index' %>
</span>
<%= render 'layouts/delete_modal', delete_options: @delete_options %>

View File

@ -0,0 +1,5 @@
<%= form_for @venue_management_bill, url: admin_venue_management_bills_path, html: {class: "form-horizontal main-forms"} do |f| %>
<fieldset>
<%= render :partial => 'form', locals: {f: f} %>
</fieldset>
<% end %>

View File

@ -49,6 +49,9 @@
<td>
<%= link_to venue_management.venue_management_memorabilias.count, venue_management_memorabilias_admin_venue_management_path(venue_management.id) %>
</td>
<td>
<%= link_to venue_management.venue_management_bills.count, venue_management_bills_admin_venue_management_path(venue_management.id) %>
</td>
<td><a href="/admin/venue_managements/<%=venue_management.id.to_s%>/export?format=xlsx" target="_blank"><%= t('venue_management.export') %></a></td>
</tr>
<% end %>

View File

@ -0,0 +1,5 @@
<span id="index_table">
<%= render 'admin/venue_management_bills/index' %>
</span>
<%= render 'layouts/delete_modal', delete_options: @delete_options %>

View File

@ -0,0 +1,79 @@
<% # encoding: utf-8 %>
<% @@session = session %>
<%= yield %>
<%
data = action_data
@venue_management_bill = data["venue_management_bill"]
@params = data['params']
%>
<table class="table table-striped venue_managementive-show-table">
<tbody>
<tr>
<th class="venue_managementive-title-field"><%= t('venue_management.title') %></th>
<td class="venue_managementive-title-value"><%= @venue_management_bill.venue_management_main.title %></td>
</tr>
<tr>
<th class="venue_managementive-title-field"><%= t('vm_bill.contractor') %></th>
<td class="venue_managementive-title-value">
<% contractors = @venue_management_bill.contractor.display_contractors rescue "" %>
<% contractors = t(:empty) if contractors.blank? %>
<%= contractors %>
</td>
</tr>
<tr>
<th class="venue_managementive-title-field"><%= t('vm_bill.accounting_month') %></th>
<td class="venue_managementive-title-value"><%= @venue_management_bill.accounting_month.strftime("%Y-%m") %></td>
<tr>
<th class="venue_managementive-title-field"><%= t('vm_bill.bill_type') %></th>
<td class="venue_managementive-title-value"><%= "#{t("vm_bill.#{@venue_management_bill.bill_typeA}")}/#{t("vm_bill.#{@venue_management_bill.bill_typeB}")}" %></td>
</tr>
<tr>
<th class="venue_managementive-title-field"><%= t('vm_bill.caculation_basis') %></th>
<td class="venue_managementive-title-value"><%= "#{t("vm_bill.#{@venue_management_bill.caculation_basis_type}")}: #{@venue_management_bill.caculation_basis}" %></td>
</tr>
<tr>
<th class="venue_managementive-title-field"><%= t('vm_bill.reason') %></th>
<td class="venue_managementive-title-value"><%= @venue_management_bill.reason %></td>
</tr>
<tr>
<th class="venue_managementive-title-field"><%= t('vm_bill.amount') %></th>
<td class="venue_managementive-title-value"><%= @venue_management_bill.amount %></td>
</tr>
<tr>
<th class="venue_managementive-title-field"><%= t('vm_bill.pay_date') %></th>
<td class="venue_managementive-title-value"><%= @venue_management_bill.pay_date %></td>
</tr>
<tr>
<th class="venue_managementive-title-field"><%= t('vm_bill.pay_method') %></th>
<td class="venue_managementive-title-value"><%= @venue_management_bill.pay_method %></td>
</tr>
<tr>
<th class="venue_managementive-title-field"><%= t('vm_bill.note') %></th>
<td class="venue_managementive-title-value"><%= @venue_management_bill.note %></td>
</tr>
<% if !@venue_management_bill.venue_management_files.blank? %>
<tr>
<th class="venue_managementive-title-field"><i class="fa fa-fw fa-paperclip"></i><%= t(:file_) %></th>
<td class="venue_managementive-title-value">
<% @venue_management_bill.venue_management_files.map do |file| %>
<%= link_to (file.title.blank? ? File.basename(file.file.path) : file.title) , file.file.url, {:target => '_blank', :title => file.description} if file.file.file %>
<% end %>
</td>
</tr>
<% end %>
<% if !@venue_management_bill.venue_management_links.blank? %>
<tr>
<th class="venue_managementive-title-field"><i class="fa fa-fw fa-link"></i><%= t(:link) %></th>
<td class="venue_managementive-title-value">
<% @venue_management_bill.venue_management_links.map do |link| %>
<%= link_to (link.title.blank? ? link.url : link.title), link.url, :target => '_blank' %>
<% end %>
</td>
</tr>
<% end %>
</tbody>
</table>
<br />
<%= link_to t(:close), 'javascript:window.close();', :class => 'btn btn-primary' %>

View File

@ -202,6 +202,7 @@
<li class="active"><a href="#contract_history" role="tab" data-toggle="tab" title="<%=t('venue_management.contract_history')%>" aria-expanded="true"><%=t('venue_management.contract_history')%></a></li>
<li class=""><a href="#inviting_history" role="tab" data-toggle="tab" title="<%=t('venue_management.inviting_history')%>" aria-expanded="false"><%=t('venue_management.inviting_history')%></a></li>
<li class=""><a href="#memorabilia" role="tab" data-toggle="tab" title="<%=t('venue_management.memorabilia')%>" aria-expanded="false"><%=t('venue_management.memorabilia')%></a></li>
<li class=""><a href="#bills" role="tab" data-toggle="tab" title="<%=t('venue_management.bills')%>" aria-expanded="false"><%=t('venue_management.bills')%></a></li>
</ul>
<div class="tab-content" data-list="plugins" data-level="0">
<div class="tab-pane active" id="contract_history">
@ -319,5 +320,50 @@
</table>
</div>
<div class="tab-pane" id="bills">
<div class="info" data-list="plugin_data_intro" data-level="1">
</div>
<%
@table_fields = [
"contractor",
"accounting_month",
"bill_type",
"caculation_basis",
"reason",
"amount",
"pay_date",
"pay_method",
"note"
]
@bills = @venue_management.venue_management_bills.to_a
%>
<table class="table table-hover table-striped dt-responsive nowrap dataTable" id="table0">
<thead>
<tr data-list="pd_title" data-level="1">
<% @table_fields.each do |th| %>
<%=Admin::VenueManagementBillsHelper.thead(th)%>
<% end %>
</tr>
</thead>
<tbody data-level="1" data-list="plugin_datas">
<% @bills.each do |bill| %>
<tr>
<td><%= bill.contractor.display_contractors rescue "" %></td>
<td><%= bill.accounting_month.strftime("%Y-%m") %></td>
<td><%= "#{t("vm_bill.#{bill.bill_typeA}")}/#{t("vm_bill.#{bill.bill_typeB}")}" %></td>
<td><%= bill.caculation_basis %></td>
<td><%= bill.reason %></td>
<td><%= bill.amount %></td>
<td><%= bill.pay_date %></td>
<td><%= bill.pay_method %></td>
<td><%= bill.note %></td>
</tr>
<% end %>
</tbody>
</table>
</div>
</div>
<%= link_to t(:close), 'javascript:window.close();', :class => 'btn btn-primary' %>

View File

@ -11,6 +11,7 @@ en:
venue_management_signup_field: VenueManagement Signup Field
venue_management_signup: Signup Analyze
venue_management_memorabilias: Memorabilia
venue_management_bills: Bills
venue_management_invitings: Inviting History
venue_management_contracts: Contract History
module_name:
@ -91,6 +92,7 @@ en:
contract_history: Contract history
inviting_history: Inviting history
memorabilia: Memorabilia
bills: Bills
signup: Inviting Contractor
export: Export #匯出
set_venue_management_items: Items #項目
@ -100,6 +102,7 @@ en:
set_venue_management_contracts: Contract History
set_venue_management_invitings: Inviting History
set_venue_management_memorabilias: Memorabilia
set_venue_management_bills: Bills
set_venue_management_agreements: Personal Data Usage Agreements #個資宣告設定
venue_management_agreements_content: Content of Personal Data Usage Agreements #個資宣告內容
to_require: Should Be Filled? #是否必填
@ -181,6 +184,33 @@ en:
case_no: 'Case No.'
event_date: Event Date
details: Details
vm_bill:
contractor: Contractor
accounting_month: Accounting month
bill_type: Bill type
caculation_basis: Caculation basis
reason: Reason
amount: Amount
deadline: Deadline
received_date: Received date
pay_date: Deadline / Received date
pay_method: Method
note: Note
venue_fee: Venue fee
usage_fee: Usage fee
royalties: Royalties
admin_fee: Admin fee
land_rent: Land rent
utility_bill: Utility bill
electricity: Electricity
water: Water
tax: Tax
house_tax: House tax
land_tax: Land tax
other: Other
penalty: Penalty
revenue: Revenue
degree: Degree
vm_contract:
renewal_permission: Renewal permission
renewal_deadline: Renewal deadline

View File

@ -11,6 +11,7 @@ zh_tw:
venue_management_signup_field: 報名欄位
venue_management_signup: 報名統計
venue_management_memorabilias: 大事記
venue_management_bills: 費用管理
venue_management_invitings: 招商公告
venue_management_contracts: 履約記錄
module_name:
@ -91,6 +92,7 @@ zh_tw:
contract_history: 履約紀錄
inviting_history: 招商公告
memorabilia: 大事記
bills: 費用管理
signup: 招商
export: 匯出
set_venue_management_items: 項目
@ -100,6 +102,7 @@ zh_tw:
set_venue_management_contracts: 履約記錄
set_venue_management_invitings: 招商公告
set_venue_management_memorabilias: 大事記
set_venue_management_bills: 費用管理
set_venue_management_agreements: 個資宣告設定
venue_management_agreements_content: 個資宣告內容
to_require: 是否必填
@ -181,6 +184,33 @@ zh_tw:
case_no: 相關案號
event_date: 事件日期
details: 事件內容
vm_bill:
contractor: 廠商
accounting_month: 列帳年月
bill_type: 收入別
caculation_basis: 計算基礎
reason: 說明
amount: 金額
deadline: 繳交期限
received_date: 繳交日期
pay_date: 繳交期限 / 繳交日期
pay_method: 繳交方式
note: 備註
venue_fee: 場地收入
usage_fee: 使用費
royalties: 權利金
admin_fee: 管理費(清潔費)
land_rent: 土地租金
utility_bill: 水電費
electricity: 電費
water: 水費
tax:
house_tax: 房屋稅
land_tax: 地價稅
other: 其他
penalty: 罰款
revenue: 營業額
degree: 度數
vm_contract:
renewal_permission: 是否得續約
renewal_deadline: 續約申請期限

View File

@ -14,6 +14,7 @@ Rails.application.routes.draw do
get 'venue_management_submission_field'
get 'venue_management_invitings'
get 'venue_management_memorabilias'
get 'venue_management_bills'
get 'venue_management_contracts'
get 'print_pdf'
end
@ -28,6 +29,7 @@ Rails.application.routes.draw do
resources :venue_management_item_contents
resources :venue_management_invitings
resources :venue_management_memorabilias
resources :venue_management_bills
resources :venue_management_contracts do
collection do
post 'fetch_inviting'

View File

@ -60,6 +60,11 @@ module VenueManagement
:priority => 8,
:active_for_action => { 'admin/venue_managements' => 'venue_management_memorabilias' },
:available_for => 'managers'
context_link 'venue_management.set_venue_management_bills',
:link_path => 'admin_venue_management_bills_path',
:priority => 8,
:active_for_action => { 'admin/venue_managements' => 'venue_management_bills' },
:available_for => 'managers'
context_link 'venue_management.set_venue_management_contracts',
:link_path => 'admin_venue_management_contracts_path',
:priority => 9,