mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Added registration-ticket
Added registration type tickets that will used in the check-in process
This commit is contained in:
parent
9b7562fe2e
commit
f31651ad9c
5 changed files with 12 additions and 2 deletions
|
|
@ -50,7 +50,7 @@ module Admin
|
||||||
private
|
private
|
||||||
|
|
||||||
def ticket_params
|
def ticket_params
|
||||||
params.require(:ticket).permit(:conference, :title, :url, :description, :conference_id, :price_cents, :price_currency, :price)
|
params.require(:ticket).permit(:conference, :title, :url, :description, :conference_id, :price_cents, :price_currency, :price, :registration_ticket)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -13,5 +13,6 @@
|
||||||
= f.input :description, input_html: { rows: 5, data: { provide: "markdown-editable" } }
|
= f.input :description, input_html: { rows: 5, data: { provide: "markdown-editable" } }
|
||||||
= f.input :price
|
= f.input :price
|
||||||
= f.input :price_currency, as: :select, class: 'form-control', collection: ['USD', 'EUR', 'GBP', 'INR', 'CNY'], include_blank: false
|
= f.input :price_currency, as: :select, class: 'form-control', collection: ['USD', 'EUR', 'GBP', 'INR', 'CNY'], include_blank: false
|
||||||
|
= f.input :registration_ticket, hint: 'A registration ticket is with which user register for the conference.'
|
||||||
%p.text-right
|
%p.text-right
|
||||||
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }
|
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@
|
||||||
%th Price
|
%th Price
|
||||||
%th Sold
|
%th Sold
|
||||||
%th Turnover
|
%th Turnover
|
||||||
|
%th Registration Ticket
|
||||||
%th Actions
|
%th Actions
|
||||||
%tbody
|
%tbody
|
||||||
- @conference.tickets.each do |ticket|
|
- @conference.tickets.each do |ticket|
|
||||||
|
|
@ -27,6 +28,8 @@
|
||||||
= ticket.tickets_sold
|
= ticket.tickets_sold
|
||||||
%td
|
%td
|
||||||
= humanized_money_with_symbol ticket.tickets_turnover
|
= humanized_money_with_symbol ticket.tickets_turnover
|
||||||
|
%td
|
||||||
|
= ticket.registration_ticket? ? 'Yes' : 'No'
|
||||||
%td
|
%td
|
||||||
.btn-group
|
.btn-group
|
||||||
= link_to 'Edit', edit_admin_conference_ticket_path(@conference.short_title, ticket.id),
|
= link_to 'Edit', edit_admin_conference_ticket_path(@conference.short_title, ticket.id),
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
class AddRegistrationTicketToTickets < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :tickets, :registration_ticket, :boolean, default: false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(version: 20170721001700) do
|
ActiveRecord::Schema.define(version: 20170807092805) do
|
||||||
|
|
||||||
create_table "ahoy_events", force: :cascade do |t|
|
create_table "ahoy_events", force: :cascade do |t|
|
||||||
t.integer "visit_id"
|
t.integer "visit_id"
|
||||||
|
|
@ -507,6 +507,7 @@ ActiveRecord::Schema.define(version: 20170721001700) do
|
||||||
t.text "description"
|
t.text "description"
|
||||||
t.integer "price_cents", default: 0, null: false
|
t.integer "price_cents", default: 0, null: false
|
||||||
t.string "price_currency", default: "USD", null: false
|
t.string "price_currency", default: "USD", null: false
|
||||||
|
t.boolean "registration_ticket", default: false
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "tracks", force: :cascade do |t|
|
create_table "tracks", force: :cascade do |t|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue