- <% if @pagy.pages > 1 %>
-
diff --git a/app/views/admin/users/new.html.erb b/app/views/admin/users/new.html.erb
index 0724d7051..6e799d8ba 100644
--- a/app/views/admin/users/new.html.erb
+++ b/app/views/admin/users/new.html.erb
@@ -1,25 +1,17 @@
-<% content_for :hero do %>
-
-
<%= t('.title') %>
-
-<% end %>
+<% content_for :title, t('.title') %>
-
-
-
-
<%= t('.title')%>
- <% if @user.errors.any? %>
-
- <%= t(:errors_name) %>
-
-
- <% @user.errors.full_messages.each do |message| %>
- - <%= message %>
- <% end %>
-
- <% end %>
-
-
- <%= render 'form', user: @user, url: admin_users_path %>
-
-
\ No newline at end of file
+
+
+ <% if @user.errors.any? %>
+
+ <%= t(:errors_name) %>
+
+
+ <% @user.errors.full_messages.each do |message| %>
+ - <%= message %>
+ <% end %>
+
+ <% end %>
+ <%= render 'form', user: @user, url: admin_users_path %>
+
+
diff --git a/app/views/admin/users/show.html.erb b/app/views/admin/users/show.html.erb
index dc09d9c8b..28edb501b 100644
--- a/app/views/admin/users/show.html.erb
+++ b/app/views/admin/users/show.html.erb
@@ -1,117 +1,104 @@
-<% content_for :hero do %>
-
-
<%= @user.display_name %>
- <%= t('.title') %>
-
-<% end %>
-
-
-
-
-
<%= @user.display_name %>
-
-
-
-
- <%= t('users.email') %> |
- <%= (@user.email) %> |
-
-
-
- <%= t('users.mobile_phone') %> |
-
- <% if @user.phone_number_confirmed? && @phone_confirmation_toggle %>
-
- <% end %>
- <%= (@user.mobile_phone) %>
- |
-
-
-
- <%= t('users.roles') %> |
- <%= @user.roles.join(', ') %> |
-
+<% content_for :title, "#{t('.title')}: #{@user.display_name}" %>
-
- <%= t('users.country_code') %> |
-
-
- <%= (@user.country_code) %>
- |
-
+
+
-
- <%= t('users.identity_code') %> |
- <%= (@user.identity_code) %> |
-
+ <%= t('.information') %>
+ <%= component 'common/table', header_collection: [], options: { class: 'js-table-dt dataTable no-footer' } do %>
+ <%= tag.tbody class: 'contents' do %>
+
+ <%= t('users.email') %> |
+ <%= (@user.email) %> |
+
+
+ <%= t('users.mobile_phone') %> |
+
+ <% if @user.phone_number_confirmed? && @phone_confirmation_toggle %>
+
+ <% end %>
+ <%= (@user.mobile_phone) %>
+ |
+
+
+ <%= t('users.roles') %> |
+ <%= @user.roles.join(', ') %> |
+
+
+ <%= t('users.country_code') %> |
+
+
+ <%= (@user.country_code) %>
+ |
+
+
+ <%= t('users.identity_code') %> |
+ <%= (@user.identity_code) %> |
+
+
+ <%= t('users.terms_and_conditions_accepted_at') %> |
+
+ <%- if @user.terms_and_conditions_accepted_at %>
+ <%= I18n.l(@user.terms_and_conditions_accepted_at) %>
+ <% else %>
+ <%= t(:not_accepted) %>
+ <% end %>
+ |
+
+
+ <%= t('created_at') %> |
+ <%= I18n.l(@user.created_at) %> |
+
+
+ <%= t('.daily_summary') %> |
+ <%= @user.daily_summary? ? t('yes') : t('no')%> |
+
+ <% end %>
+ <% end %>
-
- <%= t('users.terms_and_conditions_accepted_at') %> |
-
- <%- if @user.terms_and_conditions_accepted_at %>
- <%= I18n.l(@user.terms_and_conditions_accepted_at) %>
- <% else %>
- <%= t(:not_accepted) %>
- <% end %>
- |
-
+ <% header_collection = [{column: nil, caption: t('billing_profiles.name'), options: {}},
+ { column: 'domain_name', caption: t('billing_profiles.vat_code'), options: { class: "sorting" } },
+ { column: 'ends_at', caption: t('billing_profiles.address'), options: { class: "sorting" } }] %>
-
- <%= t('created_at') %> |
- <%= I18n.l(@user.created_at) %> |
-
-
- <%= t('.daily_summary') %> |
- <%= @user.daily_summary? ? t('yes') : t('no')%> |
-
-
-
-
+
<%= t(:billing_profiles_name) %>
-
-
<%= t(:billing_profiles_name) %>
-
-
-
- <%= t('billing_profiles.name') %> |
- <%= t('billing_profiles.vat_code') %> |
- <%= t('billing_profiles.address') %> |
-
-
+ <%= component 'common/table', header_collection: header_collection, options: { class: 'js-table-dt dataTable no-footer' } do %>
+ <%= tag.tbody class: 'contents' do %>
+ <%- if @user.present? %>
+ <% @user.billing_profiles.each do |billing_profile| %>
+
+ <%= link_to billing_profile.name, admin_billing_profile_path(billing_profile) %> |
+ <%= billing_profile.vat_code %> |
+ <%= billing_profile.address %> |
+
+ <% end %>
+ <%- else %>
+
+ <%= t(:no_billing_profiles) %> |
+
+ <%- end %>
+ <% end %>
+ <% end %>
-
- <% @user.billing_profiles.each do |billing_profile| %>
-
-
- <%= link_to billing_profile.name, admin_billing_profile_path(billing_profile) %>
- |
- <%= billing_profile.vat_code %> |
- <%= billing_profile.address %> |
-
- <% end %>
-
-
-
-
-
<%= t('.ban_this_user') %>
- <%= form_with(model: @ban, local: true, url: admin_bans_path, class: "ui form big") do |f| %>
-
- <%= f.hidden_field :user_id, value: @ban.user_id %>
- <%= f.label :valid_until, t('bans.valid_until') %>
- <%= f.date_field :valid_until %>
-
-
- <%= f.submit t(:submit), class: "ui button primary", data: { turbo: false } %>
- <% end %>
+ <%= t('.ban_this_user') %>
+ <%= form_with(model: @ban, local: true, url: admin_bans_path, class: "ui form big") do |f| %>
+
+
+ <%= f.hidden_field :user_id, value: @ban.user_id %>
+
+ <%= f.label :valid_until, t('bans.valid_until'), style: 'width: 100px;' %>
+ <%= f.date_field :valid_until %>
+
+
+ <%= f.submit t(:submit), class: "c-btn c-btn--blue", data: { turbo: false } %>
+
+
-
- <%= link_to t(:edit), edit_admin_user_path(@user), class: "ui button primary" %>
- <%= link_to t(:delete), admin_user_path(@user),
- method: :delete, data: { confirm: t(:are_you_sure) } ,
- class: "ui button secondary", target: '_top' %>
+ <% end %>
- <%= link_to t(:versions_name), admin_user_versions_path(@user), class: "ui button primary" %>
-
-
+
+ <%= link_to t(:edit), edit_admin_user_path(@user), class: "c-btn c-btn--orange" %>
+ <%= button_to t(:delete), admin_user_path(@user), method: :delete, class: "c-btn c-btn--red", form: { data: { turbo_confirm: t(".confirm_delete") } } %>
+ <%= link_to t(:versions_name), admin_user_versions_path(@user), class: "c-btn c-btn--blue" %>
+
diff --git a/app/views/application/_google_analytics.html.erb b/app/views/application/_google_analytics.html.erb
index 6a99d1c35..e768f4f6c 100644
--- a/app/views/application/_google_analytics.html.erb
+++ b/app/views/application/_google_analytics.html.erb
@@ -1,3 +1,6 @@
+
+
-
-<%= javascript_pack_tag 'google_analytics' %>
+
+
+
diff --git a/app/views/auctions/_auction.html.erb b/app/views/auctions/_auction.html.erb
index bcf636aaa..84e8106b2 100644
--- a/app/views/auctions/_auction.html.erb
+++ b/app/views/auctions/_auction.html.erb
@@ -1,32 +1,35 @@
-
- <% english_auction_presenter = EnglishBidsPresenter.new(auction) %>
-
- <%= link_to auction_path(auction.uuid), target: '_top' do %>
- <%= domain_name_with_embedded_colors(auction.domain_name) %>
- <% end %>
- |
-
- <%= t('auctions.ends_at') %>
- <%= auction.ends_at %>
- |
-
- <%= t('auctions.auction_type') %>
- <%= t("auctions.#{auction.platform&.downcase.presence || 'blind'}") %>
- |
-
- <% if auction.platform == 'blind' || auction.platform.nil? %>
- <%= t('auctions.current_price') %>: <%= number_with_precision(auction.users_price, precision: 2, separator: ",") %>
- <% else %>
- <%= t('auctions.current_price') %>:
- <%= number_with_precision(english_auction_presenter.maximum_bids, precision: 2, separator: ",") %>
- <% end %>
- |
+
+
+ <% english_auction_presenter = EnglishBidsPresenter.new(auction) %>
+
+ <%= auction.domain_name %> |
+
+ <%= component 'common/auction_type_icon', auction: auction %> |
+
+ <%= auction.ends_at %> |
+
+
+ <% if auction.english? %>
+ <%= english_auction_presenter.maximum_bids %> €
+ <% else %>
+ <%= auction.users_price %> €
+ <% end %>
+ |
+
+ <% if auction.english? %>
- <% if auction.platform != 'blind' && !auction.platform.nil? %>
- <%= english_auction_presenter.bidder_name(auction.currently_winning_offer, user) %>
- <% end %>
- |
-
- <%= auction.decorate.auction_offer_button(user) %>
+ <%= english_auction_presenter.bidder_name(auction.currently_winning_offer, user) %>
|
+ <% else %>
+ <%= tag.strong t('auctions.you') if auction.users_offer_uuid %> |
+ <% end %>
+
+
+ <% if user %>
+ <%= component 'pages/auction/auction_action_button', user: user, auction: auction, updated: updated %>
+ <% else %>
+ <%= component 'common/links/link_button', link_title: t('auctions.bid'), href: new_user_session_path, color: 'green', options: { target: '_top' } %>
+ <% end %>
+ |
diff --git a/app/views/auctions/deprecated/_auction.html.erb b/app/views/auctions/deprecated/_auction.html.erb
new file mode 100644
index 000000000..769c53b62
--- /dev/null
+++ b/app/views/auctions/deprecated/_auction.html.erb
@@ -0,0 +1,34 @@
+
+ <% english_auction_presenter = EnglishBidsPresenter.new(auction) %>
+
+ <%= link_to auction_path(auction.uuid), target: '_top' do %>
+ <%= domain_name_with_embedded_colors(auction.domain_name) %>
+ <% end %>
+ |
+
+ <%= t('auctions.ends_at') %>
+ <%= I18n.l(auction.ends_at) %>
+ |
+
+ <%= t('auctions.auction_type') %>
+ <%= t("auctions.#{auction.platform&.downcase.presence || 'blind'}") %>
+ |
+
+
+ <% if auction.platform == 'blind' || auction.platform.nil? %>
+ <%= t('auctions.your_current_price') %>: <%= auction.users_price %>
+ <% else %>
+ <%= t('auctions.your_current_price') %>:
+ <%= english_auction_presenter.maximum_bids %>
+ <% end %>
+ |
+
+
+ <% if auction.platform != 'blind' && !auction.platform.nil? %>
+ <%= english_auction_presenter.bidder_name(auction.currently_winning_offer, user) %>
+ <% end %>
+ |
+
+ <%= auction.decorate.auction_offer_button(user) %>
+ |
+
diff --git a/app/views/auctions/_bottom_grid.html.erb b/app/views/auctions/deprecated/_bottom_grid.html.erb
similarity index 100%
rename from app/views/auctions/_bottom_grid.html.erb
rename to app/views/auctions/deprecated/_bottom_grid.html.erb
diff --git a/app/views/auctions/_english_bottom_grid.html.erb b/app/views/auctions/deprecated/_english_bottom_grid.html.erb
similarity index 100%
rename from app/views/auctions/_english_bottom_grid.html.erb
rename to app/views/auctions/deprecated/_english_bottom_grid.html.erb
diff --git a/app/views/auctions/_top_grid.html.erb b/app/views/auctions/deprecated/_top_grid.html.erb
similarity index 100%
rename from app/views/auctions/_top_grid.html.erb
rename to app/views/auctions/deprecated/_top_grid.html.erb
diff --git a/app/views/auctions/deprecated/index.html.erb b/app/views/auctions/deprecated/index.html.erb
new file mode 100644
index 000000000..00f0c1a3f
--- /dev/null
+++ b/app/views/auctions/deprecated/index.html.erb
@@ -0,0 +1,147 @@
+
+<%= turbo_stream_from 'auctions' %>
+
+<% content_for :hero do %>
+
+
<%= t('.title') %>
+
+<% end %>
+
+<%= render 'top_grid' %>
+
+
+
+
+ <%= form_with url: auctions_path,
+ method: :get,
+ data: { controller: 'debounce',
+ debounce_target: 'form',
+ turbo_action: "advance",
+ turbo_frame: "auction_list",
+ action: 'input->debounce#search'
+ }, class: 'ui form field' do |f| %>
+
+
+
+ <%= f.search_field :domain_name, value: params[:domain_name], placeholder: t('search_by_domain_name'), class: 'prompt' %>
+ <%= f.button(class: "ui icon primary button") do %>
+
+ <% end %>
+
+
+ <%= daily_summary_link %>
+
+
+
+
+
+ <%= f.label :type, t('auctions.index.select_type') %>
+ <%= f.select :type, options_for_select(Auction.platforms.map {|k, v| [t("auctions.#{k}"), v]}, selected: params[:type]), { include_blank: t(:all) }, { class: '', data: { action: 'change->auction_type_handler#add_dropdown'} } %>
+
+
+ <%= f.label :auction_offer_type, t('auctions.index.select_offer_type') %>
+ <%= f.select :auction_offer_type, [[t('auctions.index.with_offers'), 'with_offers'], [t('auctions.index.without_offers'), 'without_offers']], { include_blank: t(:all) }, { class: '' } %>
+
+
+
+ <% end %>
+
+
+
+ <%= link_to t(:clear), request.path, class: 'ui primary button' %>
+
+
+
+
+
+
+
+
+ <% if params[:show_all] == 'true' %>
+ <%= link_to t('auctions.pagination_list'), auctions_path(show_all: 'false'), style: 'margin-bottom: 20px; display: block; font-size: 18px; color: #03456f;' %>
+ <% else %>
+ <%= link_to t('auctions.all_list'), auctions_path(show_all: 'true'), style: 'margin-bottom: 20px; display: block; font-size: 18px; color: #03456f;' %>
+ <% end %>
+
+
+
+
+ <%= link_to t('auctions.finished_auctions'), histories_path, style: 'margin-bottom: 20px; display: block; font-size: 18px; color: #03456f;' %>
+
+
+
+
+ <%= turbo_frame_tag "auction_list" do %>
+
+
+
+
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+ <%= t('auctions.offer_actions') %> |
+
+
+
+ <%= tag.tbody id: "bids", class: 'contents' do %>
+ <% @auctions.uniq.each do |auction| %>
+ <%= render partial: 'auction', locals: { auction: auction, user: current_user } %>
+ <% end %>
+ <% end %>
+
+
+
+
+ <% if @pagy.pages > 1 %>
+
+ <% end %>
+
+ <% end %>
+
+
+
diff --git a/app/views/auctions/show.html.erb b/app/views/auctions/deprecated/show.html.erb
similarity index 98%
rename from app/views/auctions/show.html.erb
rename to app/views/auctions/deprecated/show.html.erb
index 7dd5d1fc9..fd5bc0a8d 100644
--- a/app/views/auctions/show.html.erb
+++ b/app/views/auctions/deprecated/show.html.erb
@@ -27,7 +27,7 @@
<%= t('auctions.auction_type') %> |
<%= t("auctions.#{@auction.platform&.downcase.presence || 'blind'}") %> |
-
+
<%= t('auctions.ends_at') %> |
<%= @auction.ends_at %> |
diff --git a/app/views/auctions/index.html.erb b/app/views/auctions/index.html.erb
index 30c77968f..c50b0605c 100644
--- a/app/views/auctions/index.html.erb
+++ b/app/views/auctions/index.html.erb
@@ -1,139 +1,70 @@
-
-<%= turbo_stream_from 'auctions' %>
-<% content_for :hero do %>
-
-
<%= t('.title') %>
-
+<% content_for :title, t(".title") %>
+
+<% if user_signed_in? %>
+ <%= turbo_stream_from "auctions_#{current_user&.id}" %>
+<% else %>
+ <%= turbo_stream_from "auctions" %>
<% end %>
-<%= render 'top_grid' %>
-
-
-
- <%= form_with url: auctions_path,
- method: :get,
- data: { controller: 'debounce',
- debounce_target: 'form',
- turbo_action: "advance",
- turbo_frame: "auction_list",
- action: 'input->debounce#search'
- }, class: 'ui form field' do |f| %>
-
-
- <%= f.search_field :domain_name, value: params[:domain_name], placeholder: t('search_by_domain_name'), class: 'prompt' %>
- <%= f.button(class: "ui icon primary button") do %>
-
- <% end %>
-
-
- <%= daily_summary_link %>
-
-
-
-
- <%= f.label :type, t('auctions.index.select_type') %>
- <%= f.select :type, options_for_select(Auction.platforms.map {|k, v| [t("auctions.#{k}"), v]}, selected: params[:type]), { include_blank: t(:all) }, { class: '', data: { action: 'change->auction_type_handler#add_dropdown'} } %>
-
-
- <%= f.label :auction_offer_type, t('auctions.index.select_offer_type') %>
- <%= f.select :auction_offer_type, [[t('auctions.index.with_offers'), 'with_offers'], [t('auctions.index.without_offers'), 'without_offers']], { include_blank: t(:all) }, { class: '' } %>
-
+
+<%= component 'pages/auction/cards' %>
+
+
+
+
+ <%= component 'pages/auction/filter', current_user: current_user %>
+
+
+ <% if current_page?(auctions_path) || current_page?(root_path) %>
+ <%= component 'common/links/link_button', link_title: t(:finished_auctions), href: histories_path, color: 'ghost' %>
+ <% else %>
+ <%= component 'common/links/link_button', link_title: t(:auctions_name), href: auctions_path, color: 'ghost' %>
+ <% end %>
+
+ <% if @current_user %>
+
+ <%= component 'pages/auction/notification_subscribe', current_user: @current_user %>
<% end %>
-
-
- <%= link_to t(:clear), request.path, class: 'ui primary button' %>
-
-
-
-
-
-
- <% if params[:show_all] == 'true' %>
- <%= link_to t('auctions.pagination_list'), auctions_path(show_all: 'false'), style: 'margin-bottom: 20px; display: block; font-size: 18px; color: #03456f;' %>
- <% else %>
- <%= link_to t('auctions.all_list'), auctions_path(show_all: 'true'), style: 'margin-bottom: 20px; display: block; font-size: 18px; color: #03456f;' %>
- <% end %>
-
-
-
-
- <%= link_to t('auctions.finished_auctions'), "#{histories_path}?direction=desc&sort=domain_name", style: 'margin-bottom: 20px; display: block; font-size: 18px; color: #03456f;' %>
-
-
-
- <%= turbo_frame_tag "auction_list" do %>
-
-
-
-
-
-
- |
-
-
- |
-
-
- |
-
-
- |
-
-
- |
- <%= t('auctions.offer_actions') %> |
-
-
-
- <%= tag.tbody id: "bids", class: 'contents' do %>
- <% @auctions.uniq.each do |auction| %>
- <%= render partial: 'auction', locals: { auction: auction, user: current_user } %>
- <% end %>
- <% end %>
+
+ <% header_collection = [{ column: 'domain_name', caption: t('auctions.domain_name'), options: { class: "sorting" } },
+ { column: 'platform', caption: t('auctions.auction_type'), options: { class: "sorting" } },
+ { column: 'ends_at', caption: t('auctions.ends_at'), options: { class: "sorting" } },
+ { column: 'users_price', caption: t('auctions.current_price'), options: { class: "sorting" } },
+ { column: 'username', caption: t('auctions.offer_owner'), options: { class: "sorting" } },
+ { column: nil, caption: t('auctions.offer_actions'), options: { class: 'u-text-left u-text-center-l' } }] %>
-
-
-
- <% if @pagy.pages > 1 %>
-
+
+ <%= turbo_frame_tag "results" do %>
+
+
+ <%= component 'common/table', header_collection:, options: { class: 'js-table-dt dataTable no-footer' } do %>
+
+
+
+ <%= tag.tbody id: "bids", class: 'contents' do %>
+ <% @auctions.uniq.each do |auction| %>
+ <%= render partial: 'auction', locals: { auction: auction, user: current_user, updated: false } %>
<% end %>
-
+ <% end %>
<% end %>
-
+
+ <%= component 'common/pagy', pagy: @pagy %>
+ <% end %>
+
+
+
+
+ <%= component 'common/links/link_button', link_title: t('auctions.all_list'), href: auctions_path(show_all: 'true'), color: 'ghost' %>
+
diff --git a/app/views/auctions/streams/updated_list.turbo_stream.erb b/app/views/auctions/streams/updated_list.turbo_stream.erb
index 79155cf00..43930525d 100644
--- a/app/views/auctions/streams/updated_list.turbo_stream.erb
+++ b/app/views/auctions/streams/updated_list.turbo_stream.erb
@@ -1,19 +1,4 @@
<%= turbo_stream.prepend 'bids',
partial: 'auctions/auction',
- locals: { auction: Auction.with_user_offers(nil).find_by(uuid: auction.uuid),
- user: nil } %>
-
-<%= turbo_stream.replace 'auction_count',
- html: "
#{Auction.with_user_offers(nil).active.size}".html_safe %>
-
-
-
- <%# # broadcast_prepend_to('auctions',
- # target: 'bids',
- # partial: 'auctions/auction',
- # locals: { auction: Auction.with_user_offers(nil).find_by(uuid: uuid),
- # current_user: nil })
-
- # broadcast_replace_to('auctions',
- # target: 'auction_count',
- # html: "
#{Auction.with_user_offers(nil).active.size}".html_safe) %>
\ No newline at end of file
+ locals: { auction: Auction.with_user_offers(user).find_by(uuid: auction.uuid),
+ user: user, updated: updated } %>
diff --git a/app/views/autobider/edit.html.erb b/app/views/autobider_deprecated/edit.html.erb
similarity index 100%
rename from app/views/autobider/edit.html.erb
rename to app/views/autobider_deprecated/edit.html.erb
diff --git a/app/views/autobider/new.html.erb b/app/views/autobider_deprecated/new.html.erb
similarity index 100%
rename from app/views/autobider/new.html.erb
rename to app/views/autobider_deprecated/new.html.erb
diff --git a/app/views/billing_profiles/_billing_info.html.erb b/app/views/billing_profiles/_billing_info.html.erb
new file mode 100644
index 000000000..85000c09b
--- /dev/null
+++ b/app/views/billing_profiles/_billing_info.html.erb
@@ -0,0 +1,41 @@
+<%= turbo_frame_tag dom_id(billing_profile) do %>
+
+<% end %>
diff --git a/app/views/billing_profiles/_form.html.erb b/app/views/billing_profiles/_form.html.erb
index 8e9abd9b4..af825f1d1 100644
--- a/app/views/billing_profiles/_form.html.erb
+++ b/app/views/billing_profiles/_form.html.erb
@@ -1,51 +1,51 @@
-<%= form_with(model: billing_profile, url: url, local: true, class: "ui form big") do |f| %>
-
-
-
- <%= f.label :name, t('billing_profiles.name') %>
- <%= f.text_field :name, class: "form-control" %>
-
+<%= turbo_frame_tag dom_id(billing_profile) do %>
+
+ <%= form_with model: billing_profile, url: billing_profile_path(billing_profile.uuid), class: "c-account__form" do |f| %>
+
+
+
+
+ <%# TODO: Resolve the problem of nested elements in button component %>
+ <%= f.button style: 'background: transparent; border: none;' do %>
+
+ <% end %>
-
- <%= f.hidden_field :user_id, value: billing_profile.user_id %>
-
-
-
- <%= f.label :vat_code, t('billing_profiles.vat_code') %>
- <%= f.text_field :vat_code, class: "form-control" %>
-
+ <%= link_to '#', data: { turbo_frame: dom_id(billing_profile) } do %>
+
+ <% end %>
-
-
- <%= f.label :country %>
- <%= f.select :country_code,
- options_for_select(
- Countries.for_selection,
- billing_profile.country_code || Setting.find_by(code: 'default_country').retrieve
- ),
- {} %>
-
-
-
- <%= f.label :street, t('billing_profiles.street') %>
- <%= f.text_field :street, class: "form-control" %>
-
-
-
- <%= f.label :city, t('billing_profiles.city') %>
- <%= f.text_field :city, class: "form-control" %>
-
+
+
+ <%#= component 'common/form/label', form: f, attribute: :vat_code, title: t('illing_profiles.vat_code') %>
+
+ <%= component 'common/form/text_field', form: f, attribute: :vat_code, options: { autofocus: true } %>
+
-
- <%= f.label :postal_code, t('billing_profiles.postal_code') %>
- <%= f.text_field :postal_code, class: "form-control" %>
-
+
+
+ <%#= component 'common/form/label', form: f, attribute: :street, title: t('illing_profiles.street') %>
+
+ <%= component 'common/form/text_field', form: f, attribute: :street, options: { autofocus: true } %>
+
+
+ <%#= component 'common/form/label', form: f, attribute: :city, title: t('illing_profiles.city') %>
+
+ <%= component 'common/form/text_field', form: f, attribute: :city, options: { autofocus: true } %>
+
+
+ <%#= component 'common/form/label', form: f, attribute: :postal_code, title: t('illing_profiles.postal_code') %>
+
+ <%= component 'common/form/text_field', form: f, attribute: :postal_code, options: { autofocus: true } %>
+
+
+ <% end %>
+
<% end %>
diff --git a/app/views/billing_profiles/_new_form.html.erb b/app/views/billing_profiles/_new_form.html.erb
new file mode 100644
index 000000000..504fe09ad
--- /dev/null
+++ b/app/views/billing_profiles/_new_form.html.erb
@@ -0,0 +1,55 @@
+<%= turbo_frame_tag 'new_billing_profile' do %>
+
+<% end %>
\ No newline at end of file
diff --git a/app/views/billing_profiles/depracated/_form.html.erb b/app/views/billing_profiles/depracated/_form.html.erb
new file mode 100644
index 000000000..388769277
--- /dev/null
+++ b/app/views/billing_profiles/depracated/_form.html.erb
@@ -0,0 +1,52 @@
+<%= form_with(model: billing_profile, url: url, local: true, class: "ui form big") do |f| %>
+
+
+
+ <%= f.label :name, t('billing_profiles.name') %>
+ <%= f.text_field :name, class: "form-control" %>
+
+
+
+ <%= f.hidden_field :user_id, value: billing_profile.user_id %>
+
+
+
+ <%= f.label :vat_code, t('billing_profiles.vat_code') %>
+ <%= f.text_field :vat_code, class: "form-control" %>
+
+
+
+
+
+ <%= f.label :country %>
+ <%= f.select :country_code,
+ options_for_select(
+ Countries.for_selection,
+ billing_profile.country_code || Setting.find_by(code: 'default_country').retrieve
+ ),
+ {},
+ class: "ui selectable searchable dropdown" %>
+
+
+
+ <%= f.label :street, t('billing_profiles.street') %>
+ <%= f.text_field :street, class: "form-control" %>
+
+
+
+ <%= f.label :city, t('billing_profiles.city') %>
+ <%= f.text_field :city, class: "form-control" %>
+
+
+
+ <%= f.label :postal_code, t('billing_profiles.postal_code') %>
+ <%= f.text_field :postal_code, class: "form-control" %>
+
+
+
+
+ <%= f.submit t(:submit), class: "ui button primary", data: { turbo: false } %>
+ <%= link_to t(:back), :back, class: "ui button secondary" %>
+
+
+<% end %>
diff --git a/app/views/billing_profiles/edit.html.erb b/app/views/billing_profiles/depracated/edit.html.erb
similarity index 100%
rename from app/views/billing_profiles/edit.html.erb
rename to app/views/billing_profiles/depracated/edit.html.erb
diff --git a/app/views/billing_profiles/depracated/index.html.erb b/app/views/billing_profiles/depracated/index.html.erb
new file mode 100644
index 000000000..50293994a
--- /dev/null
+++ b/app/views/billing_profiles/depracated/index.html.erb
@@ -0,0 +1,67 @@
+<% content_for :hero do %>
+
+
<%= t('.title') %>
+
+<% end %>
+
+
+
+
+ <%= link_to t(:new), new_billing_profile_path, class: "ui button primary" %>
+
+
+
+ <% @billing_profiles.each do |billing_profile| %>
+
+
+
+ <%= link_to billing_profile.name,
+ billing_profile_path(billing_profile.uuid) %>
+
+
+
+
+
+ <%= t('billing_profiles.vat_code') %> |
+ <%= billing_profile.vat_code %> |
+
+
+
+ <%= t('billing_profiles.street') %> |
+ <%= billing_profile.street %> |
+
+
+
+ <%= t('billing_profiles.city') %> |
+ <%= billing_profile.city %> |
+
+
+
+ <%= t('billing_profiles.postal_code') %> |
+ <%= billing_profile.postal_code %> |
+
+
+
+ <%= t('billing_profiles.country') %> |
+ <%= billing_profile.country_code %> |
+
+
+
+
+
+
+ <%= link_to t(:edit), edit_billing_profile_path(billing_profile.uuid), class: "ui button primary" %>
+ <% if billing_profile.deletable? %>
+ <%= link_to t(:delete), billing_profile_path(billing_profile.uuid),
+ method: :delete, data: { confirm: t(:are_you_sure) },
+ class: "ui button red", target: '_top' %>
+ <% else %>
+ <%= content_tag :div, link_to(t(:delete), '#', class: "ui button secondary disabled"),
+ data: {tooltip: t('billing_profiles.in_use_by_offer_short'), inverted: ''}, target: '_top' %>
+ <% end %>
+
+
+ <% end %>
+
+
+
\ No newline at end of file
diff --git a/app/views/billing_profiles/new.html.erb b/app/views/billing_profiles/depracated/new.html.erb
similarity index 100%
rename from app/views/billing_profiles/new.html.erb
rename to app/views/billing_profiles/depracated/new.html.erb
diff --git a/app/views/billing_profiles/show.html.erb b/app/views/billing_profiles/depracated/show.html.erb
similarity index 100%
rename from app/views/billing_profiles/show.html.erb
rename to app/views/billing_profiles/depracated/show.html.erb
diff --git a/app/views/billing_profiles/index.html.erb b/app/views/billing_profiles/index.html.erb
index 50293994a..7d387fb33 100644
--- a/app/views/billing_profiles/index.html.erb
+++ b/app/views/billing_profiles/index.html.erb
@@ -1,67 +1,24 @@
-<% content_for :hero do %>
-
-
<%= t('.title') %>
-
-<% end %>
-
-
-
-
- <%= link_to t(:new), new_billing_profile_path, class: "ui button primary" %>
-
-
-
- <% @billing_profiles.each do |billing_profile| %>
-
-
-
- <%= link_to billing_profile.name,
- billing_profile_path(billing_profile.uuid) %>
-
-
-
-
-
- <%= t('billing_profiles.vat_code') %> |
- <%= billing_profile.vat_code %> |
-
+<% content_for :title, t('.title') %>
-
- <%= t('billing_profiles.street') %> |
- <%= billing_profile.street %> |
-
+
+
+
+
-
- <%= t('billing_profiles.city') %> |
- <%= billing_profile.city %> |
-
+ <% @billing_profiles.each do |billing_profile| %>
+ <%= turbo_frame_tag dom_id(billing_profile) do %>
+ <%= render partial: 'billing_info', locals: { billing_profile: billing_profile } %>
+ <% end %>
+ <% end %>
-
- <%= t('billing_profiles.postal_code') %> |
- <%= billing_profile.postal_code %> |
-
+ <%= turbo_frame_tag 'new_billing_profile' %>
-
- <%= t('billing_profiles.country') %> |
- <%= billing_profile.country_code %> |
-
-
-
-
-
- <%= link_to t(:edit), edit_billing_profile_path(billing_profile.uuid), class: "ui button primary" %>
- <% if billing_profile.deletable? %>
- <%= link_to t(:delete), billing_profile_path(billing_profile.uuid),
- method: :delete, data: { confirm: t(:are_you_sure) },
- class: "ui button red", target: '_top' %>
- <% else %>
- <%= content_tag :div, link_to(t(:delete), '#', class: "ui button secondary disabled"),
- data: {tooltip: t('billing_profiles.in_use_by_offer_short'), inverted: ''}, target: '_top' %>
- <% end %>
-
-
- <% end %>
+
+
+ <%= component 'common/links/link_button', link_title: t('billing_profiles.new.title'), href: new_billing_profile_path,
+ color: 'green', options: { data: { turbo_frame: 'new_billing_profile' } } %>
-
\ No newline at end of file
+
+
diff --git a/app/views/common/_cookies.html.erb b/app/views/common/_cookies.html.erb
deleted file mode 100644
index ec06a78eb..000000000
--- a/app/views/common/_cookies.html.erb
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
<%= t('cookies.dialog.title') %>
-
<%= t('cookies.dialog.information') %>
- <%= link_to t('cookies.dialog.information_link'), 'https://www.internet.ee/eis/kupsised-internet-ee-lehel', target: '_blank' %>
-
-
- <%= button_to t('cookies.dialog.accept_all_cookies'), cookies_path(cookies: 'accepted'), method: :patch, class: 'ui primary button', id: 'accept-all'%>
-
-
-
-
-
- <%= form_with url: cookies_path, method: :patch do |form| %>
-
- <%= form.check_box :analytics_selected, { id: 'google-analytics', checked: true }, 1, nil %>
- <%= form.label :analytics_selected, t('cookies.dialog.allow_google_analytics') %>
-
-
-
<%= t('cookies.dialog.analytics_description') %>
-
- <%= form.submit t('cookies.dialog.accept_selectively'), class: 'ui primary button', id: 'accept-optionally' %>
- <%= link_to t('cookies.dialog.decline'), cookies_path(cookies: 'declined'), method: :patch, class: 'ui red button', id: 'reject-all' %>
- <% end %>
-
-
diff --git a/app/views/common/_flash.html.erb b/app/views/common/_flash.html.erb
index bed7c445a..9ef70ee38 100644
--- a/app/views/common/_flash.html.erb
+++ b/app/views/common/_flash.html.erb
@@ -1,9 +1,13 @@
<% unless flash.empty? %>
-
+
<% flash.each do |key, value| -%>
- <% if ['notice', 'alert'].include?(key) %>
-
- <% end %>
+ <% next if value.blank? || value == true %>
+
+ <% if key == 'alert' || key == 'recaptcha_error' %>
+
+ <% else %>
+
+ <% end %>
<% end %>
<% end %>
diff --git a/app/views/common/_header.html.erb b/app/views/common/_header.html.erb
index 954e4f318..eaf1d8184 100644
--- a/app/views/common/_header.html.erb
+++ b/app/views/common/_header.html.erb
@@ -1,5 +1,3 @@
-
-
diff --git a/app/views/devise/confirmations/deprecated/new.html.erb b/app/views/devise/confirmations/deprecated/new.html.erb
new file mode 100644
index 000000000..538dcdda3
--- /dev/null
+++ b/app/views/devise/confirmations/deprecated/new.html.erb
@@ -0,0 +1,25 @@
+<% content_for :hero do %>
+
+
<%= t('.title') %>
+
+<% end %>
+
+
+
+ <%= form_for(resource, as: resource_name, url: confirmation_path(resource_name),
+ html: { method: :post, class: "ui form big"}) do |f| %>
+ <%= render "devise/shared/error_messages", resource: resource %>
+
+
+ <%= f.label :email, t("users.email") %>
+ <%= f.email_field :email, autofocus: true, autocomplete: "email", value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %>
+
+
+
+ <%= f.submit t(:submit), class: "ui button primary", data: { turbo: false } %>
+
+ <% end %>
+
+ <%= render "devise/shared/links" %>
+
+
diff --git a/app/views/devise/confirmations/new.html.erb b/app/views/devise/confirmations/new.html.erb
index 538dcdda3..ff3a6573e 100644
--- a/app/views/devise/confirmations/new.html.erb
+++ b/app/views/devise/confirmations/new.html.erb
@@ -1,25 +1,5 @@
-<% content_for :hero do %>
-
-
<%= t('.title') %>
-
-<% end %>
-
-
-
- <%= form_for(resource, as: resource_name, url: confirmation_path(resource_name),
- html: { method: :post, class: "ui form big"}) do |f| %>
- <%= render "devise/shared/error_messages", resource: resource %>
-
-
- <%= f.label :email, t("users.email") %>
- <%= f.email_field :email, autofocus: true, autocomplete: "email", value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %>
-
-
-
- <%= f.submit t(:submit), class: "ui button primary", data: { turbo: false } %>
-
- <% end %>
-
- <%= render "devise/shared/links" %>
-
-
+<%= turbo_frame_tag "modal" do %>
+
+ <%= component 'modals/no_reset_password_link', resource: resource, resource_name: resource_name %>
+
+<% end %>
\ No newline at end of file
diff --git a/app/views/devise/passwords/deprecated/edit.html.erb b/app/views/devise/passwords/deprecated/edit.html.erb
new file mode 100644
index 000000000..5fd01c30a
--- /dev/null
+++ b/app/views/devise/passwords/deprecated/edit.html.erb
@@ -0,0 +1,31 @@
+<% content_for :hero do %>
+
+
<%= t(:change_your_password) %>
+
+<% end %>
+
+
+
+ <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put, class: "ui form big" }) do |f| %>
+ <%= render "devise/shared/error_messages", resource: resource %>
+ <%= f.hidden_field :reset_password_token %>
+
+
+ <%= f.label :password, t('.new_password') %>
+ <% if @minimum_password_length %>
+ (<%= t('.min_characters', min_chars: @minimum_password_length ) %>)
+ <% end %>
+ <%= f.password_field :password, autofocus: true, autocomplete: "new-password" %>
+
+
+
+ <%= f.label :password_confirmation, t('.confirm_new_password') %>
+ <%= f.password_field :password_confirmation, autocomplete: "off" %>
+
+
+ <%= f.submit nil, class: 'ui button primary', data: { turbo: false } %>
+ <% end %>
+
+ <%= render "devise/shared/links" %>
+
+
diff --git a/app/views/devise/passwords/deprecated/new.html.erb b/app/views/devise/passwords/deprecated/new.html.erb
new file mode 100644
index 000000000..eb9a503df
--- /dev/null
+++ b/app/views/devise/passwords/deprecated/new.html.erb
@@ -0,0 +1,23 @@
+<% content_for :hero do %>
+
+
<%= t(:forgot_your_password) %>
+
+<% end %>
+
+
+
+ <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post, class: 'ui form big' }) do |f| %>
+ <%= render "devise/shared/error_messages", resource: resource %>
+
+
+ <%= f.label :email %>
+ <%= f.email_field :email, autofocus: true, autocomplete: "email" %>
+
+ <%= f.submit t('.reset_button'), class: "ui button primary", data: { turbo: false } %>
+ <% end %>
+
+
+
+ <%= render "devise/shared/links" %>
+
+
diff --git a/app/views/devise/passwords/edit.html.erb b/app/views/devise/passwords/edit.html.erb
index 5fd01c30a..28bb22f5d 100644
--- a/app/views/devise/passwords/edit.html.erb
+++ b/app/views/devise/passwords/edit.html.erb
@@ -1,31 +1,39 @@
-<% content_for :hero do %>
-
-
<%= t(:change_your_password) %>
-
-<% end %>
-
-
-
- <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put, class: "ui form big" }) do |f| %>
- <%= render "devise/shared/error_messages", resource: resource %>
- <%= f.hidden_field :reset_password_token %>
-
-
- <%= f.label :password, t('.new_password') %>
- <% if @minimum_password_length %>
- (<%= t('.min_characters', min_chars: @minimum_password_length ) %>)
- <% end %>
- <%= f.password_field :password, autofocus: true, autocomplete: "new-password" %>
-
+<% content_for :title, t(:change_your_password) %>
-
- <%= f.label :password_confirmation, t('.confirm_new_password') %>
- <%= f.password_field :password_confirmation, autocomplete: "off" %>
-
+
+
+
+ <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put, class: "o-card" }) do |f| %>
+ <%= f.hidden_field :reset_password_token %>
+
<%= t(:change_your_password) %>
+
+
+ <%# TODO: Resolve the problem of nested label components %>
+ <%= f.label :password do %>
+ <%= t('.new_password') %>
+ <% if @minimum_password_length %>
+ (<%= t('.min_characters', min_chars: @minimum_password_length ) %>)
+ <% end %>
+ <% end %>
- <%= f.submit nil, class: 'ui button primary', data: { turbo: false } %>
- <% end %>
+ <%= component 'common/form/password_field', form: f, attribute: :password, options: { autofocus: true, autocomplete: "new-password" } %>
+
+
+ <%= component 'common/form/label', form: f, attribute: :password_confirmation, title: t('.confirm_new_password') %>
+ <%= component 'common/form/password_field', form: f, attribute: :password_confirmation, options: { autocomplete: "off" } %>
+
- <%= render "devise/shared/links" %>
+ <%= component 'common/form/form_button', form: f, color: 'green', btn_title: t(:submit), options: { data: { turbo: false } } %>
+
+
+ <%= link_to t(:sign_in), new_user_session_path, class: "o-link u-mb-8" %>
+
+ <%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
+ <%= link_to t('devise.shared.links.didnt_receive_confirmation_instructions'), new_confirmation_path(resource_name), class: 'o-link u-mb-8 js-modal-toggl', data: { turbo_frame: 'modal' } %>
+ <% end -%>
+
+
+ <% end %>
+
diff --git a/app/views/devise/passwords/new.html.erb b/app/views/devise/passwords/new.html.erb
index eb9a503df..9659b9efd 100644
--- a/app/views/devise/passwords/new.html.erb
+++ b/app/views/devise/passwords/new.html.erb
@@ -1,23 +1,6 @@
-<% content_for :hero do %>
-
-
<%= t(:forgot_your_password) %>
-
-<% end %>
-
-
-
- <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post, class: 'ui form big' }) do |f| %>
- <%= render "devise/shared/error_messages", resource: resource %>
-
-
- <%= f.label :email %>
- <%= f.email_field :email, autofocus: true, autocomplete: "email" %>
-
- <%= f.submit t('.reset_button'), class: "ui button primary", data: { turbo: false } %>
- <% end %>
-
-
-
- <%= render "devise/shared/links" %>
-
-
+<%= turbo_frame_tag "modal" do %>
+
+ <%= render "devise/shared/error_messages", resource: resource %>
+ <%= component 'modals/forgot_password', resource: resource, resource_name: resource_name %>
+
+<% end %>
\ No newline at end of file
diff --git a/app/views/devise/sessions/deprecated/new.html.erb b/app/views/devise/sessions/deprecated/new.html.erb
new file mode 100644
index 000000000..02b21c6c2
--- /dev/null
+++ b/app/views/devise/sessions/deprecated/new.html.erb
@@ -0,0 +1,56 @@
+<% content_for :hero do %>
+
+
<%= t(:sign_in) %>
+
+<% end %>
+
+
+
+
+
+
+
+
+
<%= t('.sign_in_with_identity_document') %>
+
<%= t('.identity_document_text')%>
+ <%= button_to t(:sign_in), "/auth/tara", data: { turbo: false }, class: "ui button big primary", target: '_top' %>
+
+
+
+
+
+
<%= t('.sign_in_with_password') %>
+ <%= form_for(resource, as: resource_name, url: session_path(resource_name), html: { class: 'ui form big' }) do |f| %>
+
+ <%= f.label :email, t('users.email') %>
+ <%= f.email_field :email, autofocus: true, autocomplete: "email" %>
+
+
+
+ <%= f.label :password, t('users.password') %>
+ <%= f.password_field :password, autocomplete: "current-password" %>
+
+
+
+ <% if devise_mapping.rememberable? -%>
+
+ <%= f.check_box :remember_me %>
+ <%= f.label :remember_me, t('users.remember_me') %>
+
+ <% end -%>
+
+
+ <%= f.submit t(:sign_in), class: "ui button big primary", data: { turbo: false } %>
+ <%= link_to t('users.index.create_an_account'), new_user_path, class: "ui button big green" %>
+ <% end %>
+
+
+ <%= render "devise/shared/links" %>
+
+
+
+
+
diff --git a/app/views/devise/sessions/new.html.erb b/app/views/devise/sessions/new.html.erb
index 02b21c6c2..a9c7e5202 100644
--- a/app/views/devise/sessions/new.html.erb
+++ b/app/views/devise/sessions/new.html.erb
@@ -1,56 +1,54 @@
-<% content_for :hero do %>
-
-
<%= t(:sign_in) %>
-
-<% end %>
+<% content_for :title, t(:sign_in) %>
-
+
+
+
+
+
<%= t('.sign_in_with_identity_document') %>
+
+ <%= t('.identity_document_text')%>
+
-
-
-
-
-
-
<%= t('.sign_in_with_identity_document') %>
-
<%= t('.identity_document_text')%>
- <%= button_to t(:sign_in), "/auth/tara", data: { turbo: false }, class: "ui button big primary", target: '_top' %>
-
+
+ <%= component 'common/buttons/button_to', title_caption: t(:sign_in), href: "/auth/tara", color: 'blue-secondary', options: { data: { turbo: false } } %>
+
+ <%= render partial: 'svg/id_auth' %>
+
+
+
+
+
<%= t('.sign_in_with_password') %>
+ <%= form_for resource, as: resource_name, url: session_path(resource_name), html: { class: 'c-login__form' } do |f| %>
+
+ <%= component 'common/form/label', form: f, attribute: :email, title: t('users.email') %>
+ <%= component 'common/form/email_field', form: f, attribute: :email, options: { autocomplete: 'email', autofocus: true } %>
+
+
+ <%= component 'common/form/label', form: f, attribute: :password, title: t('users.password') %>
+ <%= component 'common/form/password_field', form: f, attribute: :password, options: { autocomplete: 'password', autofocus: true } %>
+
+
+
+ <%= component 'common/form/form_button', form: f, btn_title: t(:sign_in), options: { data: { turbo: false } } %>
+ <%= component 'common/links/link_button', link_title: t('users.index.create_an_account'), href: new_user_path, color: 'ghost' %>
-
-
-
<%= t('.sign_in_with_password') %>
- <%= form_for(resource, as: resource_name, url: session_path(resource_name), html: { class: 'ui form big' }) do |f| %>
-
- <%= f.label :email, t('users.email') %>
- <%= f.email_field :email, autofocus: true, autocomplete: "email" %>
-
-
-
- <%= f.label :password, t('users.password') %>
- <%= f.password_field :password, autocomplete: "current-password" %>
-
+ <%= component 'common/form/checkboxes/checkbox_with_label', label_title: t('users.remember_me'), form: f, attribute: :remember_me if devise_mapping.rememberable? %>
+
+
+ <%= link_to t('devise.shared.links.forgot_your_password'),
+ new_password_path(resource_name),
+ class: 'c-btn c-login__remind-link js-modal-toggle-fp',
+ data: { turbo_frame: 'modal' } if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %>
-
- <% if devise_mapping.rememberable? -%>
-
- <%= f.check_box :remember_me %>
- <%= f.label :remember_me, t('users.remember_me') %>
-
- <% end -%>
-
-
- <%= f.submit t(:sign_in), class: "ui button big primary", data: { turbo: false } %>
- <%= link_to t('users.index.create_an_account'), new_user_path, class: "ui button big green" %>
- <% end %>
-
-
- <%= render "devise/shared/links" %>
-
-
-
+ <%= link_to t('devise.shared.links.didnt_receive_confirmation_instructions'),
+ new_confirmation_path(resource_name),
+ class: 'c-login__remind-link js-modal-toggle',
+ data: { turbo_frame: 'modal' } if devise_mapping.confirmable? && controller_name != 'confirmations' %>
+
+ <% end %>
+
+
+
diff --git a/app/views/english_offers/_autobider.html.erb b/app/views/english_offers/deprecated/_autobider.html.erb
similarity index 84%
rename from app/views/english_offers/_autobider.html.erb
rename to app/views/english_offers/deprecated/_autobider.html.erb
index 7babcc308..27212aa3b 100644
--- a/app/views/english_offers/_autobider.html.erb
+++ b/app/views/english_offers/deprecated/_autobider.html.erb
@@ -12,14 +12,13 @@
<%= f.submit t(:submit), class: "ui button primary", data: { turbo: false }, id: 'autobidder_action', style: 'margin-left: 10px;' %>
-
- <% if @captcha_required %>
-
-
- <%= recaptcha_tags %>
-
- <% end %>
-
+
+ <% if @captcha_required %>
+
+
+ <%= recaptcha_tags %>
+
+ <% end %>
<% end %>
diff --git a/app/views/english_offers/_autobider_value.html.erb b/app/views/english_offers/deprecated/_autobider_value.html.erb
similarity index 100%
rename from app/views/english_offers/_autobider_value.html.erb
rename to app/views/english_offers/deprecated/_autobider_value.html.erb
diff --git a/app/views/english_offers/deprecated/_current_price.html.erb b/app/views/english_offers/deprecated/_current_price.html.erb
new file mode 100644
index 000000000..bd8402adf
--- /dev/null
+++ b/app/views/english_offers/deprecated/_current_price.html.erb
@@ -0,0 +1,2 @@
+<% english_auction_presenter = EnglishBidsPresenter.new(auction) %>
+<%= english_auction_presenter.current_price(auction.currently_winning_offer, user) %>
diff --git a/app/views/english_offers/deprecated/_current_price_new.html.erb b/app/views/english_offers/deprecated/_current_price_new.html.erb
new file mode 100644
index 000000000..f48eeceaf
--- /dev/null
+++ b/app/views/english_offers/deprecated/_current_price_new.html.erb
@@ -0,0 +1,3 @@
+<% english_auction_presenter = EnglishBidsPresenter.new(offer.auction) %>
+<%= number_with_precision(english_auction_presenter.maximum_bids, precision: 2) %>
+
diff --git a/app/views/english_offers/_form.html.erb b/app/views/english_offers/deprecated/_form.html.erb
similarity index 100%
rename from app/views/english_offers/_form.html.erb
rename to app/views/english_offers/deprecated/_form.html.erb
diff --git a/app/views/english_offers/_number_form_field.html.erb b/app/views/english_offers/deprecated/_number_form_field.html.erb
similarity index 100%
rename from app/views/english_offers/_number_form_field.html.erb
rename to app/views/english_offers/deprecated/_number_form_field.html.erb
diff --git a/app/views/english_offers/deprecated/_timer.html.erb b/app/views/english_offers/deprecated/_timer.html.erb
new file mode 100644
index 000000000..5a38d2d9c
--- /dev/null
+++ b/app/views/english_offers/deprecated/_timer.html.erb
@@ -0,0 +1,4 @@
+
+
diff --git a/app/views/english_offers/deprecated/edit.html.erb b/app/views/english_offers/deprecated/edit.html.erb
new file mode 100644
index 000000000..0b667706c
--- /dev/null
+++ b/app/views/english_offers/deprecated/edit.html.erb
@@ -0,0 +1,64 @@
+<%= turbo_stream_from "auctions_offer_#{@auction.id}" %>
+
+<% content_for :hero do %>
+
+
<%= @auction.domain_name %>
+
+
+ <%= t('english_offers.timer') %>
+
+
+ <%= render partial: 'english_offers/timer', locals: { auction: @auction } %>
+
+
+
+<% end %>
+
+
+
+ <% if @offer.errors.any? %>
+
+
+
+ <% @offer.errors.full_messages.each do |message| %>
+ - <%= message %>
+ <% end %>
+
+
+ <% end %>
+
+
+
+ <%= tag.h5 do %>
+ <%= t('english_offers.show.min_bid') %>
+ <%= Money.from_amount(@auction.min_bids_step.to_f, Setting.find_by(code: 'auction_currency').retrieve) %>
+ <% end %>
+
+
+
+ <%= tag.h5 id: 'current_price_wrapper', class: "initial-color current_#{@auction.currently_winning_offer&.user_id}_user" do %>
+ <%= t('english_offers.show.current_price') %>
+
+ <%= render partial: 'current_price', locals: { auction: @auction, user: current_user } %>
+
+ <% end %>
+
+
+
+
+
+
+ <%= turbo_frame_tag 'autobider_scope' do %>
+ <%= render partial: 'autobider_value', locals: { autobider: @autobider } %>
+ <% end %>
+
+
+
+ <%= render partial: 'form', locals: { offer: @offer, url: english_offer_path(@offer.uuid) } %>
+
+
+
diff --git a/app/views/english_offers/deprecated/new.html.erb b/app/views/english_offers/deprecated/new.html.erb
new file mode 100644
index 000000000..083e0404c
--- /dev/null
+++ b/app/views/english_offers/deprecated/new.html.erb
@@ -0,0 +1,76 @@
+<%= turbo_stream_from "auctions_offer_#{@offer.auction.id}" %>
+<% content_for :hero do %>
+
+
<%= @offer.auction.domain_name %>
+
+
+ <%= t('english_offers.timer') %>
+
+
+ <%= render partial: 'english_offers/timer', locals: { auction: @offer.auction } %>
+
+
+
+<% end %>
+
+
+ <% if @offer.errors.any? %>
+
+
+
+ <% @offer.errors.full_messages.each do |message| %>
+ - <%= message %>
+ <% end %>
+
+
+ <% end %>
+
+
+ <%= tag.h5 do %>
+ <%= t('english_offers.show.min_bid') %>
+ <%= number_with_precision(Money.from_amount(@auction.min_bids_step.to_f, Setting.find_by(code: 'auction_currency').retrieve, precision: 2)) %>
+ <% end %>
+
+
+ <%= tag.h5 class: 'initial-color' do %>
+ <%= t('english_offers.show.current_price') %>
+
+ <%= render partial: 'current_price_new', locals: { offer: @offer } %>
+
+ <% end %>
+
+
+
+ <% if @offer.auction.allow_to_set_bid?(current_user) %>
+
+ <%= turbo_frame_tag 'autobider_scope' do %>
+ <%= render partial: 'autobider_value', locals: { autobider: @autobider, auction: @auction } %>
+ <% end %>
+
+ <%= tag.div id: 'offer_form' do %>
+ <%= render 'form', offer: @offer, url: auction_english_offers_path(auction_uuid: params[:auction_uuid]), data: { turbo: false } %>
+ <% end %>
+ <% else %>
+
+
+
+
+ <%= t('offers.new.deposit_enable') %>
+
+
+
+ <%= t('offers.new.deposit_description_html', deposit: number_with_precision(@auction.deposit, precision: 2)) %>
+
+
+ <%= button_to t('offers.new.make_deposit'),
+ english_offer_deposit_auction_path(uuid: @offer.auction.uuid, current_user: current_user),
+ method: :post,
+ class: 'ui button primary' %>
+
+
+
+ <% end %>
+
+
diff --git a/app/views/english_offers/deprecated/show.html.erb b/app/views/english_offers/deprecated/show.html.erb
new file mode 100644
index 000000000..738b09ce7
--- /dev/null
+++ b/app/views/english_offers/deprecated/show.html.erb
@@ -0,0 +1,44 @@
+<% content_for :hero do %>
+
+
<%= t('.title') %>
+
<%= @offer.auction.domain_name %>
+
+<% end %>
+
+
+
+
+
+
+
+ <%= t('auctions.domain_name') %> |
+ <%= @offer.auction.domain_name %> |
+
+
+ <%= t('auctions.ends_at') %> |
+ <%= I18n.l(@offer.auction.ends_at) %> |
+
+
+ <%= t('offers.price') %> |
+ <%= t('offers.price_in_currency', price: @offer.price) %> |
+
+
+ <%= t('offers.total') %> |
+ <%= t('offers.price_in_currency', price: @offer.total) %> |
+
+
+
+
+ <%- unless @auction.finished? %>
+ <%- if @auction.offer_from_user(current_user).present? %>
+ <%= link_to t('auctions.bid'), edit_english_offer_path(@auction.users_offer_uuid), class: "ui button blue" %>
+ <% elsif @auction.in_progress? %>
+ <%= link_to t('auctions.bid'), new_auction_english_offer_path(auction_uuid: @auction.uuid), class: "ui button blue" %>
+ <% end %>
+ <% end %>
+
+
+
+
+
+<%= render 'auctions/english_bottom_grid' %>
diff --git a/app/views/english_offers/deprecated/streams copy/replaced.turbo_stream.erb b/app/views/english_offers/deprecated/streams copy/replaced.turbo_stream.erb
new file mode 100644
index 000000000..5859011a6
--- /dev/null
+++ b/app/views/english_offers/deprecated/streams copy/replaced.turbo_stream.erb
@@ -0,0 +1,11 @@
+<%= turbo_stream.replace dom_id(offer.auction),
+ partial: 'auctions/auction',
+ locals: { auction: Auction.with_user_offers(offer.user.id).find_by(uuid: offer.auction.uuid),
+ user: nil } %>
+
+
+ <%# # broadcast_replace_to('auctions',
+ # target: dom_id(self.auction).to_s,
+ # partial: 'auctions/auction',
+ # locals: { auction: Auction.with_user_offers(user.id).find_by(uuid: auction.uuid),
+ # current_user: self.user }) %>
\ No newline at end of file
diff --git a/app/views/english_offers/deprecated/streams copy/updated.turbo_stream.erb b/app/views/english_offers/deprecated/streams copy/updated.turbo_stream.erb
new file mode 100644
index 000000000..a5e3c3b5f
--- /dev/null
+++ b/app/views/english_offers/deprecated/streams copy/updated.turbo_stream.erb
@@ -0,0 +1,8 @@
+<%= turbo_stream.update "offer_#{auction.id}_form",
+html: ApplicationController.render(
+ Modals::ChangeOffer::NumberFormField::Component.new(
+ offer_value: auction.min_bids_step, offer_disabled: auction.finished? ? true : false)
+ )
+ # partial: 'english_offers/number_form_field',
+ # locals: { offer_value: auction.min_bids_step,
+ # offer_disabled: auction.finished? ? true : false } %>
diff --git a/app/views/english_offers/edit.html.erb b/app/views/english_offers/edit.html.erb
index 0b667706c..9a91b97e5 100644
--- a/app/views/english_offers/edit.html.erb
+++ b/app/views/english_offers/edit.html.erb
@@ -1,64 +1,6 @@
<%= turbo_stream_from "auctions_offer_#{@auction.id}" %>
-
-<% content_for :hero do %>
-
-
<%= @auction.domain_name %>
-
-
- <%= t('english_offers.timer') %>
-
-
- <%= render partial: 'english_offers/timer', locals: { auction: @auction } %>
-
-
-
+<%= turbo_frame_tag "modal" do %>
+
+ <%= component 'modals/change_offer', offer: @offer, auction: @auction, autobider: @autobider, update: true, current_user: current_user, captcha_required: true, show_checkbox_recaptcha: @show_checkbox_recaptcha %>
+
<% end %>
-
-
-
- <% if @offer.errors.any? %>
-
-
-
- <% @offer.errors.full_messages.each do |message| %>
- - <%= message %>
- <% end %>
-
-
- <% end %>
-
-
-
- <%= tag.h5 do %>
- <%= t('english_offers.show.min_bid') %>
- <%= Money.from_amount(@auction.min_bids_step.to_f, Setting.find_by(code: 'auction_currency').retrieve) %>
- <% end %>
-
-
-
- <%= tag.h5 id: 'current_price_wrapper', class: "initial-color current_#{@auction.currently_winning_offer&.user_id}_user" do %>
- <%= t('english_offers.show.current_price') %>
-
- <%= render partial: 'current_price', locals: { auction: @auction, user: current_user } %>
-
- <% end %>
-
-
-
-
-
-
- <%= turbo_frame_tag 'autobider_scope' do %>
- <%= render partial: 'autobider_value', locals: { autobider: @autobider } %>
- <% end %>
-
-
-
- <%= render partial: 'form', locals: { offer: @offer, url: english_offer_path(@offer.uuid) } %>
-
-
-
diff --git a/app/views/english_offers/new.html.erb b/app/views/english_offers/new.html.erb
index 083e0404c..f8d29d19a 100644
--- a/app/views/english_offers/new.html.erb
+++ b/app/views/english_offers/new.html.erb
@@ -1,76 +1,10 @@
<%= turbo_stream_from "auctions_offer_#{@offer.auction.id}" %>
-<% content_for :hero do %>
-
-
<%= @offer.auction.domain_name %>
-
-
- <%= t('english_offers.timer') %>
-
-
- <%= render partial: 'english_offers/timer', locals: { auction: @offer.auction } %>
-
-
-
-<% end %>
-
-
- <% if @offer.errors.any? %>
-
-
-
- <% @offer.errors.full_messages.each do |message| %>
- - <%= message %>
- <% end %>
-
-
- <% end %>
-
-
- <%= tag.h5 do %>
- <%= t('english_offers.show.min_bid') %>
- <%= number_with_precision(Money.from_amount(@auction.min_bids_step.to_f, Setting.find_by(code: 'auction_currency').retrieve, precision: 2)) %>
- <% end %>
-
-
- <%= tag.h5 class: 'initial-color' do %>
- <%= t('english_offers.show.current_price') %>
-
- <%= render partial: 'current_price_new', locals: { offer: @offer } %>
-
- <% end %>
-
-
-
- <% if @offer.auction.allow_to_set_bid?(current_user) %>
-
- <%= turbo_frame_tag 'autobider_scope' do %>
- <%= render partial: 'autobider_value', locals: { autobider: @autobider, auction: @auction } %>
- <% end %>
-
- <%= tag.div id: 'offer_form' do %>
- <%= render 'form', offer: @offer, url: auction_english_offers_path(auction_uuid: params[:auction_uuid]), data: { turbo: false } %>
- <% end %>
+<%= turbo_frame_tag "modal" do %>
+
+ <% if @auction.allow_to_set_bid?(current_user) %>
+ <%= component 'modals/change_offer', offer: @offer, auction: @auction, autobider: @autobider, update: false, current_user: current_user, captcha_required: true, show_checkbox_recaptcha: @show_checkbox_recaptcha %>
<% else %>
-
-
-
-
- <%= t('offers.new.deposit_enable') %>
-
-
-
- <%= t('offers.new.deposit_description_html', deposit: number_with_precision(@auction.deposit, precision: 2)) %>
-
-
- <%= button_to t('offers.new.make_deposit'),
- english_offer_deposit_auction_path(uuid: @offer.auction.uuid, current_user: current_user),
- method: :post,
- class: 'ui button primary' %>
-
-
-
+ <%= component 'modals/deposit', auction: @auction, current_user: current_user, captcha_required: true, show_checkbox_recaptcha: @show_checkbox_recaptcha %>
<% end %>
-
+<% end %>
diff --git a/app/views/english_offers/show.html.erb b/app/views/english_offers/show.html.erb
index 4d4987237..7b479e863 100644
--- a/app/views/english_offers/show.html.erb
+++ b/app/views/english_offers/show.html.erb
@@ -1,44 +1,3 @@
-<% content_for :hero do %>
-
-
<%= t('.title') %>
-
<%= @offer.auction.domain_name %>
-
-<% end %>
+<% content_for :title, @offer.auction.domain_name %>
+<%= component 'pages/offers/english_auction_offer_table', offer: @offer %>
-
-
-
-
-
-
- <%= t('auctions.domain_name') %> |
- <%= @offer.auction.domain_name %> |
-
- >
- <%= t('auctions.ends_at') %> |
- <%= @offer.auction.ends_at %> |
-
-
- <%= t('offers.price') %> |
- <%= t('offers.price_in_currency', price: @offer.price) %> |
-
-
- <%= t('offers.total') %> |
- <%= t('offers.price_in_currency', price: @offer.total) %> |
-
-
-
-
- <%- unless @auction.finished? %>
- <%- if @auction.offer_from_user(current_user).present? %>
- <%= link_to t('auctions.bid'), edit_english_offer_path(@auction.users_offer_uuid), class: "ui button blue" %>
- <% elsif @auction.in_progress? %>
- <%= link_to t('auctions.bid'), new_auction_english_offer_path(auction_uuid: @auction.uuid), class: "ui button blue" %>
- <% end %>
- <% end %>
-
-
-
-
-
-<%= render 'auctions/english_bottom_grid' %>
diff --git a/app/views/english_offers/streams/updated.turbo_stream.erb b/app/views/english_offers/streams/updated.turbo_stream.erb
index a96418f9d..19421ed8a 100644
--- a/app/views/english_offers/streams/updated.turbo_stream.erb
+++ b/app/views/english_offers/streams/updated.turbo_stream.erb
@@ -1,4 +1,10 @@
-<%= turbo_stream.update "offer_#{auction.id}_form",
+<%#= turbo_stream.update "offer_#{auction.id}_form",
partial: 'english_offers/number_form_field',
locals: { offer_value: auction.min_bids_step,
offer_disabled: auction.finished? ? true : false } %>
+
+
+
+<%= turbo_stream.update "offer_#{auction.id}_form", html: render(
+ Modals::ChangeOffer::NumberFormField::Component.new(
+ offer_value: auction.min_bids_step, offer_disabled: auction.finished? ? true : false)) %>
diff --git a/app/views/histories/index.html.erb b/app/views/histories/index.html.erb
index 287add555..33840584f 100644
--- a/app/views/histories/index.html.erb
+++ b/app/views/histories/index.html.erb
@@ -1,102 +1,59 @@
-<% content_for :hero do %>
-
-
<%= t(:finished) %>
-
+<% content_for :title, t('histories.title') %>
+
+<% if user_signed_in? %>
+ <%= turbo_stream_from "auctions_#{current_user&.id}" %>
+<% else %>
+ <%= turbo_stream_from "auctions" %>
<% end %>
-
+<%= component 'pages/auction/cards' %>
+
+
+
-
-
-
- <%= turbo_frame_tag "results" do %>
-
-
-
<%= t('auctions.finished_auctions') %>
+ <%= component 'pages/auction/filter', current_user: current_user %>
-
-
+
+ <% header_collection = [{ column: 'domain_name', caption: t('auctions.domain_name'), options: { class: "sorting" } },
+ { column: 'platform', caption: t('auctions.auction_type'), options: { class: "sorting" } },
+ { column: 'ends_at', caption: t('auctions.ends_at'), options: { class: "sorting" } },
+ { column: 'users_price', caption: t('auctions.current_price'), options: { class: "sorting" } },
+ { column: 'username', caption: t('auctions.offer_owner'), options: { class: "sorting" } }] %>
-
- <%= link_to t('histories.current_auctions'), auctions_path, style: 'margin-bottom: 20px; display: block; font-size: 18px; color: #03456f;', target: '_top' %>
-
-
+
+ <%= turbo_frame_tag "results" do %>
-
-
-
-
- <%= t('auctions.domain_name') %>
- <%= sort_link_to "", "domain_name" %>
- |
-
- <%= t('auctions.starts_at') %>
- <%= sort_link_to "", "starts_at" %>
- |
-
- <%= t('auctions.finished_at') %>
- <%= sort_link_to "", "ends_at" %>
- |
-
- <%= t('auctions.winning_bid') %>
- <%= sort_link_to "", "users_price" %>
- |
-
- <%= t('auctions.auction_type') %>
- <%= sort_link_to "", "platform" %>
- |
-
-
+
+ <%= component 'common/table', header_collection:, options: { class: 'js-table-dt dataTable no-footer' } do %>
-
- <% @auctions.each do |auction| %>
-
- <%= auction.domain_name %> |
- <%= auction.starts_at.to_formatted_s(:long) %> |
- <%= auction.ends_at %> |
- <%= auction.currently_winning_offer&.price if auction.platform == 'english' %> |
-
- <%= t("auctions.#{auction.platform&.downcase.presence || 'blind (lagacy)'}") %>
- |
-
- <% end %>
-
-
-
-
-
- <% if @pagy.pages > 1 %>
-
- <% end %>
-
-
+
+
+ <%= tag.tbody id: "bids", class: 'contents' do %>
+ <% @auctions.each do |auction| %>
+
+ <%= auction.domain_name %> |
+ <%= auction.starts_at %> |
+ <%= auction.ends_at %> |
+ <%= auction.currently_winning_offer&.price if auction.platform == 'english' %> |
+
+ <%= t("auctions.#{auction.platform&.downcase.presence || 'blind (lagacy)'}") %>
+ |
+
<% end %>
-
-
+ <% end %>
+ <% end %>
+
+ <%= component 'common/pagy', pagy: @pagy %>
+ <% end %>
+
+
diff --git a/app/views/invoices/_form.html.erb b/app/views/invoices/deprecated/_form.html.erb
similarity index 100%
rename from app/views/invoices/_form.html.erb
rename to app/views/invoices/deprecated/_form.html.erb
diff --git a/app/views/invoices/edit.html.erb b/app/views/invoices/deprecated/edit.html.erb
similarity index 100%
rename from app/views/invoices/edit.html.erb
rename to app/views/invoices/deprecated/edit.html.erb
diff --git a/app/views/invoices/deprecated/index.html.erb b/app/views/invoices/deprecated/index.html.erb
new file mode 100644
index 000000000..ccbd7ba55
--- /dev/null
+++ b/app/views/invoices/deprecated/index.html.erb
@@ -0,0 +1,140 @@
+<% content_for :hero do %>
+
+
<%= t('.title') %>
+
+<% end %>
+
+
+
+
<%= t('invoices.outstanding') %>
+
+
+
+ |
+ |
+ |
+
+
+
+ <% @issued_invoices.each do |invoice| %>
+
+ <%= link_to invoice&.items&.first&.name, invoice_path(invoice.uuid) %> |
+ <%= I18n.l(invoice.due_date) %> |
+ <%= t('offers.price_in_currency', price: invoice.total) %> |
+
+ <% end %>
+
+
+
+ <% if @issued_invoices.any? %>
+
+
<%= t('.pay') %>
+ <%= button_to t('invoices.index.pay'),
+ pay_all_bills_invoices_path,
+ method: :post,
+ class: 'ui button primary' %>
+
+ <% end %>
+
+ <% if @paid_invoices.any? %>
+
+ <%= t('invoices.paid') %>
+
+
+
+
+ |
+ |
+ |
+
+
+
+ <% @paid_invoices.each do |invoice| %>
+
+ <%= link_to invoice&.items&.first&.name, invoice_path(invoice.uuid) %> |
+ <%= I18n.l(invoice.due_date) %> |
+ <%= invoice.total %> |
+
+ <% end %>
+
+
+ <% end %>
+
+ <% if @cancelled_payable_invoices.any? %>
+
+ <%= t('invoices.cancelled') %>
+
+
+
+
+ |
+ |
+ |
+
+
+
+ <% @cancelled_payable_invoices.each do |invoice| %>
+
+ <%= link_to invoice&.items&.first&.name, invoice_path(invoice.uuid) %> |
+ <%= I18n.l(invoice.due_date) %> |
+ <%= invoice.total %> |
+
+ <% end %>
+
+
+ <% end %>
+
+ <% if @cancelled_expired_invoices.any? %>
+
+ <%= t('invoices.cancelled_expired') %>
+
+
+
+
+ |
+ |
+ |
+
+
+
+ <% @cancelled_expired_invoices.each do |invoice| %>
+
+ <%= link_to invoice&.items&.first&.name, invoice_path(invoice.uuid) %> |
+ <%= I18n.l(invoice.due_date) %> |
+ <%= invoice.total %> |
+
+ <% end %>
+
+
+ <% end %>
+
+ <% if @deposit_paid.any? %>
+
+ <%= t('invoices.paid_deposit_title') %>
+
+
+
+
+ |
+ |
+ |
+ |
+ |
+
+
+
+
+ <% @deposit_paid.each do |deposit| %>
+
+ <%= deposit.created_at.strftime("%Y-%m-%d") %> |
+ <%= deposit.auction.deposit %> |
+ <%= link_to deposit.auction.domain_name, auction_path(uuid: deposit.auction.uuid) %> |
+ <%= t("invoices.paid_deposit.#{deposit.status}") %> |
+ <%= deposit.refund_time %> |
+
+ <% end %>
+
+
+ <% end %>
+
+
diff --git a/app/views/invoices/deprecated/show.html.erb b/app/views/invoices/deprecated/show.html.erb
new file mode 100644
index 000000000..db582b674
--- /dev/null
+++ b/app/views/invoices/deprecated/show.html.erb
@@ -0,0 +1,129 @@
+<% content_for :hero do %>
+
+
<%= @invoice.title %>
+
+<% end %>
+
+
+
+
+ <%= link_to t(:result_name), result_path(@invoice.result.uuid), class: 'ui button primary' %>
+ <% if @invoice.issued? %>
+ <%= link_to t('.change_billing_profile'),
+ edit_invoice_path(@invoice.uuid), class: 'ui button primary' %>
+ <% end %>
+ <%= link_to t('invoices.download'), download_invoice_path(@invoice.uuid),
+ class: 'ui button secondary', download: true, data: { turbo: false } %>
+
+
+
+
+
+ <%= @invoice.address %>
+
+ <% if @invoice.vat_code.present? %>
+
+
+ <%= @invoice.vat_code %>
+
+ <% end %>
+
+
+
+
+
+
+ <%= @invoice.issuer %>
+
+
+
+ <%= @invoice.issue_date %>
+
+
+
+ <%= @invoice.due_date %>
+
+ <% if @invoice.paid? %>
+
+
+ <%= I18n.l(@invoice.paid_at) %>
+
+ <% end %>
+
+
+ <%= @invoice.user.reference_no %>
+
+
+
+
+
<%= t('invoices.items') %>
+
+
+
+ # |
+ <%= t('invoices.item') %> |
+ |
+ <%= t('invoices.price') %> |
+
+
+
+ <% @invoice.items.each_with_index do |item, index| %>
+
+ <%= index + 1 %> |
+
+ <%= I18n.t('invoice_items.name',
+ domain_name: @invoice.result.auction.domain_name,
+ auction_end: @invoice.result.auction.ends_at.to_date) %>
+ |
+ |
+ <%= item.price %> |
+
+ <% end %>
+
+
+
+
+ |
+ <%= t('invoices.vat_amount') %> |
+ <%= number_to_percentage(@invoice.vat_rate * 100, precision: 0) %> |
+ <%= t('offers.price_in_currency', price: @invoice.vat) %> |
+
+
+
+ |
+ <%= t('invoices.total') %> |
+ |
+ <%= t('offers.price_in_currency', price: @invoice.total + (@invoice.enable_deposit? ? @invoice.deposit : 0.0)) %>
+ |
+
+ <% if @invoice.enable_deposit? %>
+
+ |
+ <%= t('invoices.deposit') %> |
+ |
+ <%= t('offers.price_in_currency', price: @invoice.deposit) %> |
+
+
+ |
+ <%= t('invoices.amount_due') %> |
+ |
+ <%= t('offers.price_in_currency', price: @invoice.total) %> |
+
+ <% end %>
+
+
+
+
+ <% if @invoice.payable? %>
+ <%= button_to t('invoices.show.pay'), oneoff_invoice_path(uuid: @invoice.uuid), class: 'ui button primary' %>
+ <% end %>
+
+
+ <% unless @invoice.cancelled? %>
+ <%= button_to t('invoices.show.send_e_invoice'), send_e_invoice_path(uuid: @invoice.uuid), class: 'ui button default', data: { turbo: false } %>
+ <% end %>
+
+
+
+
+
diff --git a/app/views/invoices/index.html.erb b/app/views/invoices/index.html.erb
index ccbd7ba55..f92848b88 100644
--- a/app/views/invoices/index.html.erb
+++ b/app/views/invoices/index.html.erb
@@ -1,140 +1,8 @@
-<% content_for :hero do %>
-
-
<%= t('.title') %>
-
-<% end %>
+<% content_for :title, t('histories.title') %>
-
-
-
<%= t('invoices.outstanding') %>
-
-
-
- |
- |
- |
-
-
-
- <% @issued_invoices.each do |invoice| %>
-
- <%= link_to invoice&.items&.first&.name, invoice_path(invoice.uuid) %> |
- <%= I18n.l(invoice.due_date) %> |
- <%= t('offers.price_in_currency', price: invoice.total) %> |
-
- <% end %>
-
-
-
- <% if @issued_invoices.any? %>
-
-
<%= t('.pay') %>
- <%= button_to t('invoices.index.pay'),
- pay_all_bills_invoices_path,
- method: :post,
- class: 'ui button primary' %>
-
- <% end %>
-
- <% if @paid_invoices.any? %>
-
- <%= t('invoices.paid') %>
-
-
-
-
- |
- |
- |
-
-
-
- <% @paid_invoices.each do |invoice| %>
-
- <%= link_to invoice&.items&.first&.name, invoice_path(invoice.uuid) %> |
- <%= I18n.l(invoice.due_date) %> |
- <%= invoice.total %> |
-
- <% end %>
-
-
- <% end %>
-
- <% if @cancelled_payable_invoices.any? %>
-
- <%= t('invoices.cancelled') %>
-
-
-
-
- |
- |
- |
-
-
-
- <% @cancelled_payable_invoices.each do |invoice| %>
-
- <%= link_to invoice&.items&.first&.name, invoice_path(invoice.uuid) %> |
- <%= I18n.l(invoice.due_date) %> |
- <%= invoice.total %> |
-
- <% end %>
-
-
- <% end %>
-
- <% if @cancelled_expired_invoices.any? %>
-
- <%= t('invoices.cancelled_expired') %>
-
-
-
-
- |
- |
- |
-
-
-
- <% @cancelled_expired_invoices.each do |invoice| %>
-
- <%= link_to invoice&.items&.first&.name, invoice_path(invoice.uuid) %> |
- <%= I18n.l(invoice.due_date) %> |
- <%= invoice.total %> |
-
- <% end %>
-
-
- <% end %>
-
- <% if @deposit_paid.any? %>
-
- <%= t('invoices.paid_deposit_title') %>
-
-
-
-
- |
- |
- |
- |
- |
-
-
-
-
- <% @deposit_paid.each do |deposit| %>
-
- <%= deposit.created_at.strftime("%Y-%m-%d") %> |
- <%= deposit.auction.deposit %> |
- <%= link_to deposit.auction.domain_name, auction_path(uuid: deposit.auction.uuid) %> |
- <%= t("invoices.paid_deposit.#{deposit.status}") %> |
- <%= deposit.refund_time %> |
-
- <% end %>
-
-
- <% end %>
-
+
+
+ <%= component 'pages/invoices/outstanding_invoices', issued_invoices: @issued_invoices, cancelled_payable_invoices: @cancelled_payable_invoices,
+ cancelled_expired_invoices: @cancelled_expired_invoices, unpaid_invoices_count: @unpaid_invoices_count %>
+ <%= component 'pages/invoices/paid_invoices', paid_invoices: @paid_invoices, deposit_paid: @deposit_paid %>
diff --git a/app/views/invoices/show.html.erb b/app/views/invoices/show.html.erb
index db582b674..b6a9d3dfe 100644
--- a/app/views/invoices/show.html.erb
+++ b/app/views/invoices/show.html.erb
@@ -1,129 +1,5 @@
-<% content_for :hero do %>
-
-
<%= @invoice.title %>
+<%= turbo_frame_tag "modal" do %>
+
+ <%= component 'modals/pay_invoice', invoice: @invoice %>
-<% end %>
-
-
-
-
- <%= link_to t(:result_name), result_path(@invoice.result.uuid), class: 'ui button primary' %>
- <% if @invoice.issued? %>
- <%= link_to t('.change_billing_profile'),
- edit_invoice_path(@invoice.uuid), class: 'ui button primary' %>
- <% end %>
- <%= link_to t('invoices.download'), download_invoice_path(@invoice.uuid),
- class: 'ui button secondary', download: true, data: { turbo: false } %>
-
-
-
-
-
- <%= @invoice.address %>
-
- <% if @invoice.vat_code.present? %>
-
-
- <%= @invoice.vat_code %>
-
- <% end %>
-
-
-
-
-
-
- <%= @invoice.issuer %>
-
-
-
- <%= @invoice.issue_date %>
-
-
-
- <%= @invoice.due_date %>
-
- <% if @invoice.paid? %>
-
-
- <%= I18n.l(@invoice.paid_at) %>
-
- <% end %>
-
-
- <%= @invoice.user.reference_no %>
-
-
-
-
-
<%= t('invoices.items') %>
-
-
-
- # |
- <%= t('invoices.item') %> |
- |
- <%= t('invoices.price') %> |
-
-
-
- <% @invoice.items.each_with_index do |item, index| %>
-
- <%= index + 1 %> |
-
- <%= I18n.t('invoice_items.name',
- domain_name: @invoice.result.auction.domain_name,
- auction_end: @invoice.result.auction.ends_at.to_date) %>
- |
- |
- <%= item.price %> |
-
- <% end %>
-
-
-
-
- |
- <%= t('invoices.vat_amount') %> |
- <%= number_to_percentage(@invoice.vat_rate * 100, precision: 0) %> |
- <%= t('offers.price_in_currency', price: @invoice.vat) %> |
-
-
-
- |
- <%= t('invoices.total') %> |
- |
- <%= t('offers.price_in_currency', price: @invoice.total + (@invoice.enable_deposit? ? @invoice.deposit : 0.0)) %>
- |
-
- <% if @invoice.enable_deposit? %>
-
- |
- <%= t('invoices.deposit') %> |
- |
- <%= t('offers.price_in_currency', price: @invoice.deposit) %> |
-
-
- |
- <%= t('invoices.amount_due') %> |
- |
- <%= t('offers.price_in_currency', price: @invoice.total) %> |
-
- <% end %>
-
-
-
-
- <% if @invoice.payable? %>
- <%= button_to t('invoices.show.pay'), oneoff_invoice_path(uuid: @invoice.uuid), class: 'ui button primary' %>
- <% end %>
-
-
- <% unless @invoice.cancelled? %>
- <%= button_to t('invoices.show.send_e_invoice'), send_e_invoice_path(uuid: @invoice.uuid), class: 'ui button default', data: { turbo: false } %>
- <% end %>
-
-
-
-
-
+<% end %>
\ No newline at end of file
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
index 2c79300c1..0152770b1 100644
--- a/app/views/layouts/application.html.erb
+++ b/app/views/layouts/application.html.erb
@@ -5,17 +5,18 @@
<%= csrf_meta_tags %>
<%= csp_meta_tag %>
- <%= javascript_pack_tag 'application', 'data-turbo-track': 'reload' %>
- <%= stylesheet_pack_tag 'application', "data-turbo-track": 'reload' %>
+ <%= javascript_include_tag 'application', 'data-turbo-track': 'reload' %>
+ <%= stylesheet_link_tag 'application', "data-turbo-track": 'reload' %>
+
-
- <%= render 'common/webpush_modal' if user_signed_in? %>
-
-
- <%= render 'common/header' %>
-
+ <%= render 'common/webpush_modal' if user_signed_in? %>
+ <%= turbo_frame_tag :flash do %>
+ <%= turbo_stream_from current_user, :flash %>
+
+ <%= render partial: 'common/flash', locals: { flash: flash } %>
+
+ <% end %>
+ <%= component 'common/header', notifications: @notifications_for_header %>
-
- <%= yield :hero %>
-
- <%= turbo_frame_tag :flash do %>
- <%= turbo_stream_from current_user, :flash %>
-
- <%= render partial: 'common/flash', locals: { flash: flash } %>
-
- <% end %>
+
+ <%= turbo_frame_tag "modal", data: { turbo_temporary: true } %>
+ <%= component 'common/hero', title: yield(:title) %>
+ <%= render "common/static_notices" %>
+ <%= yield %>
+
- <% if Time.zone.now.between?(Time.zone.parse(start_of_procedure), Time.zone.parse(end_of_procdure))%>
-
-
-
- <% end %>
+ <%= component 'common/footer' %>
- <%= banned_banner %>
- <%= invalid_data_banner %>
- <%= yield %>
-
+ <%= render 'application/google_analytics', tracking_id: google_analytics.tracking_id if google_analytics.enabled? %>
- <%= render 'common/cookies' if show_cookie_dialog? %>
- <%= render 'common/footer' %>
- <%= render 'google_analytics', tracking_id: google_analytics.tracking_id if google_analytics.enabled? && show_google_analytics? %>
-