mirror of
https://github.com/internetee/registry.git
synced 2025-07-29 05:56:20 +02:00
Remove registrar routes
This commit is contained in:
parent
70d8c5bad3
commit
56f41b00bf
2 changed files with 153 additions and 96 deletions
|
@ -19,11 +19,159 @@
|
|||
= render 'shared/full_errors', object: @invoice
|
||||
|
||||
.row
|
||||
.col-md-6= render 'registrar/invoices/partials/details'
|
||||
.col-md-6
|
||||
%h4= t(:details)
|
||||
%hr
|
||||
%dl.dl-horizontal
|
||||
%dt= t(:issue_date)
|
||||
%dd= l @invoice.issue_date
|
||||
|
||||
- if @invoice.cancelled?
|
||||
%dt= Invoice.human_attribute_name :cancelled_at
|
||||
%dd= l @invoice.cancelled_at
|
||||
|
||||
%dt= t(:due_date)
|
||||
- if @invoice.cancelled?
|
||||
%dd.text-grey= t(:cancelled)
|
||||
- else
|
||||
%dd= l @invoice.due_date
|
||||
|
||||
%dt= Invoice.human_attribute_name :receipt_date
|
||||
- if @invoice.paid?
|
||||
%dd= l @invoice.receipt_date
|
||||
- elsif @invoice.cancelled?
|
||||
%dd.text-grey= t(:cancelled)
|
||||
- else
|
||||
%dd{class: 'text-danger'}= t(:unpaid)
|
||||
|
||||
%dt= t(:payment_term)
|
||||
%dd Prepayment
|
||||
|
||||
%dt= t(:invoice_number)
|
||||
%dd= @invoice.number
|
||||
|
||||
- if @invoice.description.present?
|
||||
%dt= t(:description)
|
||||
%dd=@invoice.description
|
||||
|
||||
%dt= Invoice.human_attribute_name :reference_no
|
||||
%dd= @invoice.reference_no
|
||||
.row
|
||||
.col-md-6= render 'registrar/invoices/partials/seller'
|
||||
.col-md-6= render 'registrar/invoices/partials/buyer'
|
||||
.col-md-6
|
||||
%h4= t(:seller)
|
||||
%hr
|
||||
%dl.dl-horizontal
|
||||
%dt= t(:name)
|
||||
%dd= @invoice.seller_name
|
||||
|
||||
%dt= Registrar.human_attribute_name :reg_no
|
||||
%dd= @invoice.seller_reg_no
|
||||
|
||||
%dt= t(:iban)
|
||||
%dd= @invoice.seller_iban
|
||||
|
||||
%dt= t(:bank)
|
||||
%dd= @invoice.seller_bank
|
||||
|
||||
%dt= t(:swift)
|
||||
%dd= @invoice.seller_swift
|
||||
|
||||
%dt= Registrar.human_attribute_name :vat_no
|
||||
%dd= @invoice.seller_vat_no
|
||||
|
||||
%dt= t(:address)
|
||||
%dd= @invoice.seller_address
|
||||
|
||||
%dt= t(:country)
|
||||
%dd= @invoice.seller_country
|
||||
|
||||
%dt= t(:phone)
|
||||
%dd= @invoice.seller_phone
|
||||
|
||||
%dt= t(:url)
|
||||
%dd= @invoice.seller_url
|
||||
|
||||
%dt= t(:email)
|
||||
%dd= @invoice.seller_email
|
||||
|
||||
%dt= t(:issuer)
|
||||
%dd= @invoice.seller_contact_name
|
||||
.col-md-6
|
||||
%h4= t(:buyer)
|
||||
%hr
|
||||
%dl.dl-horizontal
|
||||
%dt= t(:name)
|
||||
%dd= @invoice.buyer_name
|
||||
|
||||
%dt= t(:reg_no)
|
||||
%dd= @invoice.buyer_reg_no
|
||||
|
||||
%dt= t(:address)
|
||||
%dd= @invoice.buyer_address
|
||||
|
||||
%dt= t(:country)
|
||||
%dd= @invoice.buyer_country
|
||||
|
||||
%dt= t(:phone)
|
||||
%dd= @invoice.buyer_phone
|
||||
|
||||
%dt= t(:url)
|
||||
%dd= @invoice.buyer_url
|
||||
|
||||
%dt= t(:email)
|
||||
%dd= @invoice.buyer_email
|
||||
.row
|
||||
.col-md-12= render 'registrar/invoices/partials/items'
|
||||
.col-md-12
|
||||
%h4= t(:items)
|
||||
%hr
|
||||
.table-responsive
|
||||
%table.table.table-hover.table-condensed
|
||||
%thead
|
||||
%tr
|
||||
%th{class: 'col-xs-4'}= t(:description)
|
||||
%th{class: 'col-xs-2'}= t(:unit)
|
||||
%th{class: 'col-xs-2'}= InvoiceItem.human_attribute_name :quantity
|
||||
%th{class: 'col-xs-2'}= t(:price)
|
||||
%th{class: 'col-xs-2'}= t(:total)
|
||||
%tbody
|
||||
- @invoice.each do |invoice_item|
|
||||
%tr
|
||||
%td= invoice_item.description
|
||||
%td= invoice_item.unit
|
||||
%td= invoice_item.quantity
|
||||
%td= currency(invoice_item.price)
|
||||
%td= currency(invoice_item.item_sum_without_vat)
|
||||
%tfoot
|
||||
%tr
|
||||
%th{colspan: 3}
|
||||
%th= Invoice.human_attribute_name :subtotal
|
||||
%td= number_to_currency @invoice.subtotal
|
||||
%tr
|
||||
%th.no-border{colspan: 3}
|
||||
%th= "VAT #{number_to_percentage(@invoice.vat_rate, precision: 1)}"
|
||||
%td= number_to_currency @invoice.vat_amount
|
||||
%tr
|
||||
%th.no-border{colspan: 3}
|
||||
%th= t(:total)
|
||||
%td= number_to_currency @invoice.total
|
||||
.row
|
||||
.col-md-12= render 'registrar/invoices/partials/payment_orders'
|
||||
.col-md-12
|
||||
%h4= "Payment Orders"
|
||||
%hr
|
||||
.table-responsive
|
||||
%table.table.table-hover.table-condensed
|
||||
%thead
|
||||
%tr
|
||||
%th{class: 'col-xs-1'}= "#"
|
||||
%th{class: 'col-xs-1'}= "Channel"
|
||||
%th{class: 'col-xs-2'}= "Status"
|
||||
%th{class: 'col-xs-3'}= "Initiated"
|
||||
%th{class: 'col-xs-4'}= "Notes"
|
||||
%tbody
|
||||
- @invoice.payment_orders.each do |payment_order|
|
||||
%tr
|
||||
%td= payment_order.id
|
||||
%td= payment_order.channel
|
||||
%td= payment_order.status
|
||||
%td= payment_order.created_at
|
||||
%td= payment_order.notes
|
||||
|
|
|
@ -186,97 +186,6 @@ Rails.application.routes.draw do
|
|||
as: 'cors_preflight_check'
|
||||
end
|
||||
|
||||
# REGISTRAR ROUTES
|
||||
namespace :registrar do
|
||||
root 'polls#show'
|
||||
|
||||
devise_for :users, path: '', class_name: 'ApiUser', skip: %i[sessions]
|
||||
|
||||
resources :invoices, except: %i[new create edit update destroy] do
|
||||
resource :delivery, controller: 'invoices/delivery', only: %i[new create]
|
||||
|
||||
member do
|
||||
get 'download'
|
||||
patch 'cancel'
|
||||
end
|
||||
end
|
||||
|
||||
resources :deposits
|
||||
resources :account_activities
|
||||
|
||||
put 'current_user/switch/:new_user_id', to: 'current_user#switch', as: :switch_current_user
|
||||
resource :account, controller: :account, only: %i[show edit update]
|
||||
|
||||
resources :domains do
|
||||
collection do
|
||||
post 'update', as: 'update'
|
||||
post 'destroy', as: 'destroy'
|
||||
get 'renew'
|
||||
get 'edit'
|
||||
get 'info'
|
||||
get 'check'
|
||||
get 'delete'
|
||||
get 'search_contacts'
|
||||
get 'remove_hold'
|
||||
end
|
||||
end
|
||||
resources :domain_transfers, only: %i[new create]
|
||||
resource :bulk_change, controller: :bulk_change, only: :new
|
||||
post '/bulk_renew/new', to: 'bulk_change#bulk_renew', as: :bulk_renew
|
||||
resource :tech_contacts, only: :update
|
||||
resource :admin_contacts, only: :update
|
||||
resource :nameservers, only: :update
|
||||
resources :contacts, constraints: {:id => /[^\/]+(?=#{ ActionController::Renderers::RENDERERS.map{|e| "\\.#{e}\\z"}.join("|") })|[^\/]+/} do
|
||||
member do
|
||||
get 'delete'
|
||||
end
|
||||
|
||||
collection do
|
||||
get 'check'
|
||||
end
|
||||
end
|
||||
|
||||
resource :poll, only: %i[show destroy] do
|
||||
collection do
|
||||
post 'confirm_transfer'
|
||||
end
|
||||
end
|
||||
|
||||
resource :xml_console do
|
||||
collection do
|
||||
get 'load_xml'
|
||||
end
|
||||
end
|
||||
|
||||
get 'pay/return/:payment_order' => 'payments#back', as: 'return_payment_with'
|
||||
post 'pay/return/:payment_order' => 'payments#back'
|
||||
put 'pay/return/:payment_order' => 'payments#back'
|
||||
post 'pay/callback/:payment_order' => 'payments#callback', as: 'response_payment_with'
|
||||
get 'pay/go/:bank' => 'payments#pay', as: 'payment_with'
|
||||
|
||||
namespace :settings do
|
||||
resource :balance_auto_reload, controller: :balance_auto_reload, only: %i[edit update destroy]
|
||||
end
|
||||
end
|
||||
|
||||
scope :registrar do
|
||||
devise_scope :registrar_user do
|
||||
get 'sign_in', to: 'registrar/sessions#new', as: :new_registrar_user_session
|
||||
|
||||
# /registrar/sessions path is hardcoded in Apache config for certificate-based authentication
|
||||
# See https://github.com/internetee/registry/blob/master/README.md#installation
|
||||
# Client certificate is asked only on login form submission, therefore the path must be
|
||||
# different from the one in `new_registrar_user_session` route
|
||||
post 'sessions', to: 'registrar/sessions#create', as: :registrar_user_session
|
||||
|
||||
delete 'sign_out', to: 'registrar/sessions#destroy', as: :destroy_registrar_user_session
|
||||
|
||||
# TARA
|
||||
match '/open_id/callback', via: %i[get post], to: 'sso/tara#registrar_callback'
|
||||
match '/open_id/cancel', via: %i[get post delete], to: 'sso/tara#cancel'
|
||||
end
|
||||
end
|
||||
|
||||
namespace :registrant do
|
||||
devise_for :users, path: '', class_name: 'RegistrantUser'
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue