From e55ecb7d293acdfe05202ae215c545009fb04e61 Mon Sep 17 00:00:00 2001 From: ARLakhin Date: Thu, 12 Mar 2026 10:14:15 +0300 Subject: [PATCH] Auditor/Organisation layouts --- .../stylesheets/application_settings.scss | 8 --- app/assets/stylesheets/main.scss | 66 +++++++++++++++++-- app/controllers/auditors_controller.rb | 19 +++--- app/controllers/welcome_controller.rb | 37 +++++++---- app/views/application/_header.html.slim | 2 + app/views/application/_navbar.html.slim | 5 ++ app/views/auditors/index.html.slim | 15 +++-- app/views/layouts/_navbar.html.slim | 1 - app/views/layouts/application.html.slim | 2 + app/views/welcome/index.html.slim | 18 +++-- 10 files changed, 122 insertions(+), 51 deletions(-) create mode 100644 app/views/application/_header.html.slim create mode 100644 app/views/application/_navbar.html.slim delete mode 100644 app/views/layouts/_navbar.html.slim diff --git a/app/assets/stylesheets/application_settings.scss b/app/assets/stylesheets/application_settings.scss index fd65cd1..a8e43dc 100644 --- a/app/assets/stylesheets/application_settings.scss +++ b/app/assets/stylesheets/application_settings.scss @@ -29,11 +29,3 @@ body { font-family: 'Inter', sans-serif; background-color: var(--bg-color); } - -@media screen and (min-width: 1024px) { -.main-container.top-main{ - margin-left: 144px; - width: calc(100% - 144px); - // margin: 0 auto;] - // max-width: 1260px; -}} diff --git a/app/assets/stylesheets/main.scss b/app/assets/stylesheets/main.scss index 262e5e4..89c714b 100644 --- a/app/assets/stylesheets/main.scss +++ b/app/assets/stylesheets/main.scss @@ -1,3 +1,38 @@ +.main-header { + width: 100vw; + text-align: center; + font-size: 2.5rem; + font-weight: var(--bold); +} + +.nav-container { + width: 20%; + margin: 0 auto; + display: flex; + justify-content: space-around; + +} + +.add-new { + text-align: center; + width: 100vw; + margin-block: 15px; +} + +a.link { + border: 1px solid black; + border-radius: 20px 20px; + padding: 10px; + font-size: 1.5rem; + +} + +a.link:hover { + background-color: black; + color: var(--white-color) + +} + .header{ width: 100vw; text-align: center; @@ -7,23 +42,40 @@ font-size: 2.5rem; font-weight: var(--bold); } -.organisations-data { + +.informations-data { display: flex; flex-direction: column; justify-content: space-between; - border: 8px solid black; height: 100vh; - + min-width: 300px; + max-width: 1200px; + margin: 0 auto; } +.vh-50-height { + height: 50vh; +} -.organisation-data { - border: 2px solid grey; - white-space: pre-line; +.information-data { + border: 2px solid black; display: flex; flex-direction: column; + padding: 5px; } -.organisation-elem { + +.information-elem { font-weight: var(--semi-bold); font-size: 1.5rem; + padding: 2.5px; +} + +.green { + color: green; +} + +.add-new-organisation { + border: 1px solid #ccc; + padding: 10px; + margin: 10px 0; } \ No newline at end of file diff --git a/app/controllers/auditors_controller.rb b/app/controllers/auditors_controller.rb index bebf711..1c963ee 100644 --- a/app/controllers/auditors_controller.rb +++ b/app/controllers/auditors_controller.rb @@ -1,17 +1,16 @@ class AuditorsController < ApplicationController def index - @auditors = ["A", "B", "C"] - @info_about_auditors = {"A" => {"ИНН" => 1000, - "Наименование" =>"ООО-БАШИР", - "ОГРН" => "123145" + @info_about_auditors = {"A" => {"Наименование аудиторской организации/ФИО индивидуального аудитора" => "ООО \"Инвест-Аудит\"", + "ИНН" => 7606073440, + "ОГРН/ОРГНИП" => 1097606001250 }, - "B" => {"ИНН" => 1000, - "Наименование" =>"ООО-БАШИР", - "ОГРН" => "123145" + "B" => {"Наименование аудиторской организации/ФИО индивидуального аудитора" => "ООО \"Инвест-Аудит\"", + "ИНН" => 7606073440, + "ОГРН/ОРГНИП" => 1097606001250 }, - "C" => {"ИНН" => 1000, - "Наименование" =>"ООО-БАШИР", - "ОГРН" => "123145" + "C" => {"Наименование аудиторской организации/ФИО индивидуального аудитора" => "ООО \"Инвест-Аудит\"", + "ИНН" => 7606073440, + "ОГРН/ОРГНИП" => 1097606001250 } } end diff --git a/app/controllers/welcome_controller.rb b/app/controllers/welcome_controller.rb index 676ea47..2eb0396 100644 --- a/app/controllers/welcome_controller.rb +++ b/app/controllers/welcome_controller.rb @@ -1,21 +1,32 @@ class WelcomeController < ApplicationController def index - @organisations = ["A", "B", "C"] - @info_about_organisation = {"A" => {"ИНН" => 1000, - "Наименование" =>"ООО-БАШИР", - "КПП" => "123145", - "Код по ОКПО" => "123123", + @info_about_organisations = {"A" => {"ИНН" => 7707602010, + "Полное наименование юридического лица" =>"Публичное акционерное общество \"М.видео\"", + "КПП" => 770101001, + "Код по ОКПО" => 71630621, + "Форма собственности (по ОКФС)" => "34 Совместная частная и иностранная собственность", + "Организационно-правовая форма (по ОКОПФ)" => "12247 Публичные акционерные общества", + "Вид экономической деятельности по ОКВЭД 2" => "70.10.1", + "Местонахождение (адрес)" => "105066, г. Москва, ул. Красносельская Нижн., д. 40/12, к. 20, пом. II" }, - "B" => {"ИНН" => 1000, - "Наименование" =>"ООО-БАШИР", - "КПП" => "123145", - "Код по ОКПО" => "123123", + "B" => {"ИНН" => 7707602010, + "Полное наименование юридического лица" =>"Публичное акционерное общество \"М.видео\"", + "КПП" => 770101001, + "Код по ОКПО" => 71630621, + "Форма собственности (по ОКФС)" => "34 Совместная частная и иностранная собственность", + "Организационно-правовая форма (по ОКОПФ)" => "12247 Публичные акционерные общества", + "Вид экономической деятельности по ОКВЭД 2" => "70.10.1", + "Местонахождение (адрес)" => "105066, г. Москва, ул. Красносельская Нижн., д. 40/12, к. 20, пом. II" }, - "C" => {"ИНН" => 1000, - "Наименование" =>"ООО-БАШИР", - "КПП" => "123145", - "Код по ОКПО" => "123123", + "C" => {"ИНН" => 7707602010, + "Полное наименование юридического лица" =>"Публичное акционерное общество \"М.видео\"", + "КПП" => 770101001, + "Код по ОКПО" => 71630621, + "Форма собственности (по ОКФС)" => "34 Совместная частная и иностранная собственность", + "Организационно-правовая форма (по ОКОПФ)" => "12247 Публичные акционерные общества", + "Вид экономической деятельности по ОКВЭД 2" => "70.10.1", + "Местонахождение (адрес)" => "105066, г. Москва, ул. Красносельская Нижн., д. 40/12, к. 20, пом. II" } } end diff --git a/app/views/application/_header.html.slim b/app/views/application/_header.html.slim new file mode 100644 index 0000000..acd29d3 --- /dev/null +++ b/app/views/application/_header.html.slim @@ -0,0 +1,2 @@ +.main-header + = 'Отчетность за 2026 год' \ No newline at end of file diff --git a/app/views/application/_navbar.html.slim b/app/views/application/_navbar.html.slim new file mode 100644 index 0000000..5f085fb --- /dev/null +++ b/app/views/application/_navbar.html.slim @@ -0,0 +1,5 @@ +.nav-container + a.link[href="/"] + = 'Организации' + a.link[href="/auditors/index"] + = 'Аудиторы' \ No newline at end of file diff --git a/app/views/auditors/index.html.slim b/app/views/auditors/index.html.slim index 44f92b8..9bd30af 100644 --- a/app/views/auditors/index.html.slim +++ b/app/views/auditors/index.html.slim @@ -2,9 +2,12 @@ .header-title = "Аудиторы" .main-container - .organisations-data - - @auditors.each do |auditor| - .organisation-data - - @info_about_auditors[auditor].keys.each do |key| - .organisation-elem - = "#{key}: #{@info_about_auditors[auditor][key]}" \ No newline at end of file + - unless @info_about_auditors.any? + = "Аудиторы не найдены" + - else + .informations-data.vh-50-height + - @info_about_auditors.each do |auditor, params| + .information-data + - params.keys.each do |key| + .information-elem + = "#{key}: #{params[key]}" \ No newline at end of file diff --git a/app/views/layouts/_navbar.html.slim b/app/views/layouts/_navbar.html.slim deleted file mode 100644 index eb924fd..0000000 --- a/app/views/layouts/_navbar.html.slim +++ /dev/null @@ -1 +0,0 @@ -=render 'error', error: @error diff --git a/app/views/layouts/application.html.slim b/app/views/layouts/application.html.slim index 788579e..03be6ca 100644 --- a/app/views/layouts/application.html.slim +++ b/app/views/layouts/application.html.slim @@ -16,4 +16,6 @@ html = javascript_importmap_tags = hotwire_livereload_tags if Rails.env.development? body + = render 'header' + = render 'navbar' = yield \ No newline at end of file diff --git a/app/views/welcome/index.html.slim b/app/views/welcome/index.html.slim index 363b508..f6c4b94 100644 --- a/app/views/welcome/index.html.slim +++ b/app/views/welcome/index.html.slim @@ -2,9 +2,15 @@ .header-title = "Организации" .main-container - .organisations-data - - @organisations.each do |organisation| - .organisation-data - - @info_about_organisation[organisation].keys.each do |key| - .organisation-elem - = "#{key}: #{@info_about_organisation[organisation][key]}" \ No newline at end of file + .add-new + a.link[href="/reports"] + = "Добавить новую организацию" + - unless @info_about_organisations.any? + = 'Организации не найдены' + - else + .informations-data + - @info_about_organisations.each do |organisation, params| + .information-data + - params.keys.each do |key| + .information-elem + = "#{key}: #{params[key]}" \ No newline at end of file