Test layout

This commit is contained in:
ARLakhin
2026-03-10 23:44:59 +03:00
parent ade07e6d84
commit 0dc0f10da7
14 changed files with 165 additions and 4 deletions
+3 -1
View File
@@ -18,4 +18,6 @@
@use "jquery-ui/core"; @use "jquery-ui/core";
@use "toastr"; @use "toastr";
@use "base"; @use "base";
@use "application_settings";
@use "main";
@@ -0,0 +1,39 @@
:root{
--bg-color: #F3F3F5;
--navbar-border: #d3d3d3;
--blue-color: #0078F6;
--blue-light-color: #e5f1fe;
--text-callout-color: #B6B6B6;
--yellow-color: #F9D256;
--white-color: #fff;
--red-color: #EF3E3B;
--footer-text-color: #757575;
--purple-color: #4C13A2;
--green-color: #4CBFC0;
--orange-color: #FE9F40;
--grey-color: #C9CBCE;
--grey-light-color:#F6F6F6;
--grey-dark-color:#a9a9a9;
--border-dropdown-color: #e8e8e8;
--text-dropdown-color: #0F0F11;
--main-header-text: #7C7C7C;
//TEXT weight
--bold: 700;
--semi-bold: 600;
--medium: 500;
--regular: 400;
}
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;
}}
+29
View File
@@ -0,0 +1,29 @@
.header{
width: 100vw;
text-align: center;
}
.header-title {
font-size: 2.5rem;
font-weight: var(--bold);
}
.organisations-data {
display: flex;
flex-direction: column;
justify-content: space-between;
border: 8px solid black;
height: 100vh;
}
.organisation-data {
border: 2px solid grey;
white-space: pre-line;
display: flex;
flex-direction: column;
}
.organisation-elem {
font-weight: var(--semi-bold);
font-size: 1.5rem;
}
+18
View File
@@ -0,0 +1,18 @@
class AuditorsController < ApplicationController
def index
@auditors = ["A", "B", "C"]
@info_about_auditors = {"A" => {"ИНН" => 1000,
"Наименование" =>"ООО-БАШИР",
"ОГРН" => "123145"
},
"B" => {"ИНН" => 1000,
"Наименование" =>"ООО-БАШИР",
"ОГРН" => "123145"
},
"C" => {"ИНН" => 1000,
"Наименование" =>"ООО-БАШИР",
"ОГРН" => "123145"
}
}
end
end
+19 -1
View File
@@ -1,4 +1,22 @@
class WelcomeController < ApplicationController class WelcomeController < ApplicationController
def home; end def index
@organisations = ["A", "B", "C"]
@info_about_organisation = {"A" => {"ИНН" => 1000,
"Наименование" =>"ООО-БАШИР",
"КПП" => "123145",
"Код по ОКПО" => "123123",
},
"B" => {"ИНН" => 1000,
"Наименование" =>"ООО-БАШИР",
"КПП" => "123145",
"Код по ОКПО" => "123123",
},
"C" => {"ИНН" => 1000,
"Наименование" =>"ООО-БАШИР",
"КПП" => "123145",
"Код по ОКПО" => "123123",
}
}
end
end end
+2
View File
@@ -0,0 +1,2 @@
module AuditorsHelper
end
+10
View File
@@ -0,0 +1,10 @@
.header
.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]}"
+1
View File
@@ -0,0 +1 @@
=render 'error', error: @error
+1 -1
View File
@@ -2,7 +2,7 @@ doctype html
html html
head head
title title
=t('app_name') = "Отчетность 2026"
meta[name="viewport" content="width=device-width,initial-scale=1"] meta[name="viewport" content="width=device-width,initial-scale=1"]
meta name="turbo-refresh-method" content="morph" meta name="turbo-refresh-method" content="morph"
= csrf_meta_tags = csrf_meta_tags
+10
View File
@@ -0,0 +1,10 @@
.header
.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]}"
+2 -1
View File
@@ -1,6 +1,7 @@
# require 'sidekiq/web' # require 'sidekiq/web'
Rails.application.routes.draw do Rails.application.routes.draw do
get 'auditors/index'
get 'reports/create' get 'reports/create'
get '/reports', to: 'reports#index' get '/reports', to: 'reports#index'
post '/reports', to: 'reports#create' post '/reports', to: 'reports#create'
@@ -9,5 +10,5 @@ Rails.application.routes.draw do
# Defines the root path route ("/") # Defines the root path route ("/")
root "welcome#home" root "welcome#index"
end end
+15
View File
@@ -0,0 +1,15 @@
require 'rails_helper'
# Specs in this file have access to a helper object that includes
# the AuditorsHelper. For example:
#
# describe AuditorsHelper do
# describe "string concat" do
# it "concats two strings with spaces" do
# expect(helper.concat_strings("this","that")).to eq("this that")
# end
# end
# end
RSpec.describe AuditorsHelper, type: :helper do
pending "add some examples to (or delete) #{__FILE__}"
end
+11
View File
@@ -0,0 +1,11 @@
require 'rails_helper'
RSpec.describe "Auditors", type: :request do
describe "GET /index" do
it "returns http success" do
get "/auditors/index"
expect(response).to have_http_status(:success)
end
end
end
@@ -0,0 +1,5 @@
require 'rails_helper'
RSpec.describe "auditors/index.html.tailwindcss", type: :view do
pending "add some examples to (or delete) #{__FILE__}"
end