From a07793d652764d1ddc775adf71d25de34f95a850 Mon Sep 17 00:00:00 2001 From: usernaimandrey Date: Fri, 8 Dec 2023 13:08:53 +0300 Subject: [PATCH 01/15] update form --- app/forms/web/account/resume_form.rb | 1 - app/forms/web/admin/resume_form.rb | 1 - app/models/resume.rb | 2 + app/views/web/resumes/_information.html.slim | 6 +-- app/views/web/resumes/pdfs/base.slim | 7 --- app/views/web/shared/_resume_form.html.slim | 50 ++++++++++++-------- config/locales/en.activerecord.yml | 3 +- config/locales/en.views.yml | 3 ++ config/locales/ru.activerecord.yml | 3 +- config/locales/ru.views.yml | 3 ++ config/locales/simple_form.en.yml | 3 +- config/locales/simple_form.ru.yml | 3 +- test/factories/resumes.rb | 1 - test/factories/sequences.rb | 4 -- test/fixtures/resumes.yml | 1 - 15 files changed, 42 insertions(+), 49 deletions(-) diff --git a/app/forms/web/account/resume_form.rb b/app/forms/web/account/resume_form.rb index 28b88a7dc..5b207e9a8 100644 --- a/app/forms/web/account/resume_form.rb +++ b/app/forms/web/account/resume_form.rb @@ -7,7 +7,6 @@ class Web::Account::ResumeForm < Resume attrs = %i[ name - hexlet_url github_url contact contact_email diff --git a/app/forms/web/admin/resume_form.rb b/app/forms/web/admin/resume_form.rb index 6057f9606..3c3af53ae 100644 --- a/app/forms/web/admin/resume_form.rb +++ b/app/forms/web/admin/resume_form.rb @@ -6,7 +6,6 @@ class Web::Admin::ResumeForm < Resume attrs = %i[ state_event name - hexlet_url github_url contact contact_email diff --git a/app/models/resume.rb b/app/models/resume.rb index ec4d98e09..1551c78f9 100644 --- a/app/models/resume.rb +++ b/app/models/resume.rb @@ -5,6 +5,8 @@ class Resume < ApplicationRecord extend Enumerize extend TagResumePresenter + deprecate :hexlet_url + has_paper_trail is_impressionable counter_cache: true diff --git a/app/views/web/resumes/_information.html.slim b/app/views/web/resumes/_information.html.slim index 8dacf7bd0..555288179 100644 --- a/app/views/web/resumes/_information.html.slim +++ b/app/views/web/resumes/_information.html.slim @@ -42,11 +42,7 @@ b = han('resume', 'english_fluency') .col-sm-9 = @resume.english_fluency.text -.row.mt-3.mb-4 - .col-sm-3 - b = han('resume', 'hexlet') - .col-sm-9 - = link_to @resume.hexlet_url, @resume.hexlet_url, target: '_blank', rel: :noopener + .row.mt-3.mb-4 .col-sm-3 b = han('resume', 'github') diff --git a/app/views/web/resumes/pdfs/base.slim b/app/views/web/resumes/pdfs/base.slim index 7e6433c99..a9852f992 100644 --- a/app/views/web/resumes/pdfs/base.slim +++ b/app/views/web/resumes/pdfs/base.slim @@ -38,13 +38,6 @@ .col-12.lead = link_to resource_resume.github_url, resource_resume.github_url, target: '_blank', rel: 'noopener' - - if resource_resume.hexlet_url? - .col-12 - h2.my-4 = han('resume', 'hexlet') - hr.w-100 - .col-12.lead - = link_to resource_resume.hexlet_url, resource_resume.hexlet_url, target: '_blank', rel: 'noopener' - - @resume_contact_information.each do |field, content| - if content.present? .col-12 diff --git a/app/views/web/shared/_resume_form.html.slim b/app/views/web/shared/_resume_form.html.slim index 6198b8b51..550ae8e80 100644 --- a/app/views/web/shared/_resume_form.html.slim +++ b/app/views/web/shared/_resume_form.html.slim @@ -6,31 +6,39 @@ .mb-3 = f.submit class: 'btn btn-primary' .mb-3 = f.input :name - .mb-3 - = f.input :city .mb-3 = f.input :relocation, selected: resume.relocation - - if @resume.locale_ru? + - if resume.locale_ru? .mb-3 = f.input :english_fluency, required: true - .mb-3 - = f.input :hexlet_url - .mb-3 - = f.input :github_url - .mb-3 - = f.input :contact_phone - .mb-3 - = f.input :contact_email - .mb-3 - = f.input :contact_telegram - .mb-3 - = f.input :contact - .mb-3 - = f.input :summary, input_html: { rows: 10 } - .mb-3 - = f.input :skills_description, input_html: { rows: 5 } - .mb-3 - = f.input :awards_description, input_html: { rows: 5 } + h3 = t('.contacts') + a.btn.btn-primary.btn-sm[data-bs-toggle="collapse" href="#collapse-contacts" role="button" aria-expanded="false"] + span.bi.bi-patch-plus.me-1 + = t('.add') + .collapse[id="collapse-contacts"] + .mb-3 + = f.input :contact_phone + .mb-3 + = f.input :contact_email + .mb-3 + = f.input :github_url + .mb-3 + = f.input :contact_telegram + .mb-3 + = f.input :contact + .mb-3 + = f.input :city + h3 = t('.main') + a.btn.btn-primary.btn-sm[data-bs-toggle="collapse" href="#collapse-main" role="button" aria-expanded="false"] + span.bi.bi-patch-plus.me-1 + = t('.add') + .collapse[id="collapse-main"] + .mb-3 + = f.input :summary, input_html: { rows: 10 } + .mb-3 + = f.input :skills_description, input_html: { rows: 5 } + .mb-3 + = f.input :awards_description, input_html: { rows: 5 } .mb-3 = f.input :skill_list, input_html: { value: f.object.skill_list.to_s } .mb-3 diff --git a/config/locales/en.activerecord.yml b/config/locales/en.activerecord.yml index 8dc7adbad..77072751c 100644 --- a/config/locales/en.activerecord.yml +++ b/config/locales/en.activerecord.yml @@ -121,9 +121,8 @@ en: resume: city: City relocation: Willing to relocate - name: Desired Job Title + name: Position summary: Description - hexlet_url: Hexlet github_url: GitHub contact: Additional contacts contact_phone: Phone diff --git a/config/locales/en.views.yml b/config/locales/en.views.yml index 2b0ee6d10..84506ebc8 100644 --- a/config/locales/en.views.yml +++ b/config/locales/en.views.yml @@ -67,6 +67,9 @@ en: publish: Post hide: Draft cancel: Discard + contacts: Contacts + main: Main + add: Add work_fields: remove_work: Delete work experience education_fields: diff --git a/config/locales/ru.activerecord.yml b/config/locales/ru.activerecord.yml index 0e8478fa2..96a1e0783 100644 --- a/config/locales/ru.activerecord.yml +++ b/config/locales/ru.activerecord.yml @@ -111,11 +111,10 @@ ru: name: Имя company: компания resume: - name: Название + name: Позиция summary: Описание city: Город relocation: Готовность к релокации - hexlet_url: Hexlet github_url: GitHub contact: Дополнительные контакты contact_phone: Телефон diff --git a/config/locales/ru.views.yml b/config/locales/ru.views.yml index 574e9a56d..e942f0372 100644 --- a/config/locales/ru.views.yml +++ b/config/locales/ru.views.yml @@ -169,6 +169,9 @@ ru: publish: Опубликовать hide: В черновик cancel: Отмена + contacts: Контактная информация + main: Основное + add: Добавить work_fields: remove_work: Удалить опыт работы education_fields: diff --git a/config/locales/simple_form.en.yml b/config/locales/simple_form.en.yml index 42ae6cdb6..9c69ed2bc 100644 --- a/config/locales/simple_form.en.yml +++ b/config/locales/simple_form.en.yml @@ -82,13 +82,12 @@ en: skill_list: | Specify your skills. This tag field will help HR consultants and employers find your CV faster. Here you can specify your stack of technologies, for example: ajax, docker, Postgresql etc. relocation: Specify whether you're ready to relocate - hexlet_url: "link to your Hexlet account: https://ru.hexlet.io/u/mokevnin" github_url: "link to your GitHub account: https://github.com/mokevnin" contact: Here you can specify additional contacts - for example, links to social networks contact_phone: "Your phone: +1 935 555 55 55" contact_email: "Your email: example@test.com" contact_telegram: "Your Telegram: https://tlgg.ru/Kiril or @Kiril" - name: PHP programmer, Android developer, ... + name: The position you are applying for educations: description: Level of education, Field of study, College or University works: diff --git a/config/locales/simple_form.ru.yml b/config/locales/simple_form.ru.yml index 04155688e..b75c40566 100644 --- a/config/locales/simple_form.ru.yml +++ b/config/locales/simple_form.ru.yml @@ -83,13 +83,12 @@ ru: skill_list: | Укажите ваши навыки. Это поле тегов поможет быстрее находить ваше резюме HR-консультантам и работодателям. Здесь можно указать ваш полный стек, например: ajax, docker, Postgresql и тд. relocation: Укажите вашу готовность к релокации - hexlet_url: 'Ссылка на профиль: https://ru.hexlet.io/u/mokevnin' github_url: 'Ссылка на профиль: https://github.com/mokevnin' contact: Здесь можно указать дополнительные контакты - например ссылки на социальные сети contact_phone: "Ваш телефон: +7 906 777 77 77" contact_email: "Ваша почта email@example.ru" contact_telegram: 'Ваш телеграм: https://tlgg.ru/Kiril или @Kiril' - name: PHP-программист, Android-разработчик, ... + name: Должность, на которую вы претендуете experience_description: *markdown_tips about_company: *markdown_tips about_project: *markdown_tips diff --git a/test/factories/resumes.rb b/test/factories/resumes.rb index fcda2bb3f..3280977cf 100644 --- a/test/factories/resumes.rb +++ b/test/factories/resumes.rb @@ -5,7 +5,6 @@ name { Faker::Job.title } summary skills_description - hexlet_url github_url contact contact_email { 'test@emil.com' } diff --git a/test/factories/sequences.rb b/test/factories/sequences.rb index c9a0c5ab8..959667346 100644 --- a/test/factories/sequences.rb +++ b/test/factories/sequences.rb @@ -37,10 +37,6 @@ Faker::Lorem.paragraph_by_chars(number: 300) end - sequence :hexlet_url do |n| - "https://ru.hexlet.io/u/#{n}" - end - sequence :github_url do |n| "https://github.com/user#{n}" end diff --git a/test/fixtures/resumes.yml b/test/fixtures/resumes.yml index 5af20180a..8854c25cd 100644 --- a/test/fixtures/resumes.yml +++ b/test/fixtures/resumes.yml @@ -1,5 +1,4 @@ DEFAULTS: &DEFAULTS - hexlet_url: https://ru.hexlet.io/u/$LABEL github_url: https://github.com/$LABEL contact: $LABEL@email.com contact_phone: +7 999 999 99 99 From ffa1ebb45a7c0be95f592ecfa294efff0b7cafed Mon Sep 17 00:00:00 2001 From: usernaimandrey Date: Fri, 8 Dec 2023 13:37:01 +0300 Subject: [PATCH 02/15] awards_descriptions deprecated --- app/forms/web/account/resume_form.rb | 1 - app/forms/web/admin/resume_form.rb | 1 - app/models/resume.rb | 3 +-- app/services/resume_auto_answer_service.rb | 2 +- app/views/web/resumes/_information.html.slim | 6 ------ app/views/web/resumes/pdfs/base.slim | 8 -------- app/views/web/shared/_resume_form.html.slim | 4 +--- config/locales/en.activerecord.yml | 1 - config/locales/ru.activerecord.yml | 1 - config/locales/simple_form.en.yml | 1 - config/locales/simple_form.ru.yml | 1 - test/factories/resumes.rb | 1 - test/factories/sequences.rb | 2 +- test/fixtures/resumes.yml | 7 ------- 14 files changed, 4 insertions(+), 35 deletions(-) diff --git a/app/forms/web/account/resume_form.rb b/app/forms/web/account/resume_form.rb index 5b207e9a8..96d7fe212 100644 --- a/app/forms/web/account/resume_form.rb +++ b/app/forms/web/account/resume_form.rb @@ -14,7 +14,6 @@ class Web::Account::ResumeForm < Resume contact_telegram summary skills_description summary - awards_description english_fluency city relocation diff --git a/app/forms/web/admin/resume_form.rb b/app/forms/web/admin/resume_form.rb index 3c3af53ae..90b62315e 100644 --- a/app/forms/web/admin/resume_form.rb +++ b/app/forms/web/admin/resume_form.rb @@ -14,7 +14,6 @@ class Web::Admin::ResumeForm < Resume locale summary skills_description - awards_description english_fluency city relocation diff --git a/app/models/resume.rb b/app/models/resume.rb index 1551c78f9..a5428db41 100644 --- a/app/models/resume.rb +++ b/app/models/resume.rb @@ -5,7 +5,7 @@ class Resume < ApplicationRecord extend Enumerize extend TagResumePresenter - deprecate :hexlet_url + deprecate :hexlet_url, :awards_description has_paper_trail is_impressionable counter_cache: true @@ -17,7 +17,6 @@ class Resume < ApplicationRecord enumerize :relocation, in: %i[not_specified another_country another_city another_city_country not_ready], scope: true, predicates: { prefix: true } validates :name, presence: true - validates :english_fluency, presence: true, if: -> { locale_ru? } validates :github_url, presence: true validates :summary, presence: true, length: { minimum: 200 } validates :skills_description, presence: true diff --git a/app/services/resume_auto_answer_service.rb b/app/services/resume_auto_answer_service.rb index a1b50b860..d894f0ef1 100644 --- a/app/services/resume_auto_answer_service.rb +++ b/app/services/resume_auto_answer_service.rb @@ -32,7 +32,7 @@ def prepare_resume(resume) resume_content = resume .serializable_hash .deep_symbolize_keys - .slice(:name, :summary, :skills_description, :awards_description, :contact_phone, :contact_email) + .slice(:name, :summary, :skills_description, :contact_phone, :contact_email) .values .join('\n') work_content = resume.works.reduce('') do |acc, work| diff --git a/app/views/web/resumes/_information.html.slim b/app/views/web/resumes/_information.html.slim index 555288179..d2a2966ad 100644 --- a/app/views/web/resumes/_information.html.slim +++ b/app/views/web/resumes/_information.html.slim @@ -30,12 +30,6 @@ b = han('resume', 'skills_description') .col-sm-9.hexlet-cv-content == markdown2html @resume.skills_description -- if @resume.awards_description? - .row.mb-3 - .col-sm-3 - b = han('resume', 'awards_description') - .col-sm-9.hexlet-cv-content - == markdown2html @resume.awards_description - if @resume.locale == 'ru' .row .col-sm-3 diff --git a/app/views/web/resumes/pdfs/base.slim b/app/views/web/resumes/pdfs/base.slim index a9852f992..490fcab79 100644 --- a/app/views/web/resumes/pdfs/base.slim +++ b/app/views/web/resumes/pdfs/base.slim @@ -17,14 +17,6 @@ .col-12.hexlet-cv-content.lead == markdown2html resource_resume.skills_description - - if resource_resume.awards_description? - .col-12 - h2.my-4 = han('resume', 'awards_description') - hr.w-100 - - .col-12.hexlet-cv-content.lead - == markdown2html resource_resume.awards_description - - if resource_resume.english_fluency? .col-12 h2.my-4.me-3 = han('resume', 'english_fluency') diff --git a/app/views/web/shared/_resume_form.html.slim b/app/views/web/shared/_resume_form.html.slim index 550ae8e80..5da3aa529 100644 --- a/app/views/web/shared/_resume_form.html.slim +++ b/app/views/web/shared/_resume_form.html.slim @@ -10,7 +10,7 @@ = f.input :relocation, selected: resume.relocation - if resume.locale_ru? .mb-3 - = f.input :english_fluency, required: true + = f.input :english_fluency h3 = t('.contacts') a.btn.btn-primary.btn-sm[data-bs-toggle="collapse" href="#collapse-contacts" role="button" aria-expanded="false"] span.bi.bi-patch-plus.me-1 @@ -37,8 +37,6 @@ = f.input :summary, input_html: { rows: 10 } .mb-3 = f.input :skills_description, input_html: { rows: 5 } - .mb-3 - = f.input :awards_description, input_html: { rows: 5 } .mb-3 = f.input :skill_list, input_html: { value: f.object.skill_list.to_s } .mb-3 diff --git a/config/locales/en.activerecord.yml b/config/locales/en.activerecord.yml index 77072751c..a620d98c9 100644 --- a/config/locales/en.activerecord.yml +++ b/config/locales/en.activerecord.yml @@ -130,7 +130,6 @@ en: contact_telegram: Telegram english_fluency: English fluency skills_description: Skills - awards_description: Awards, Certificates locale: Language state_event: State state: Status diff --git a/config/locales/ru.activerecord.yml b/config/locales/ru.activerecord.yml index 96a1e0783..6f6b99400 100644 --- a/config/locales/ru.activerecord.yml +++ b/config/locales/ru.activerecord.yml @@ -122,7 +122,6 @@ ru: contact_telegram: Телеграм english_fluency: Владение английским skills_description: Навыки - awards_description: Награды, Сертификаты locale: Язык state_event: Состояние state: Статус diff --git a/config/locales/simple_form.en.yml b/config/locales/simple_form.en.yml index 9c69ed2bc..0d1ea7cb3 100644 --- a/config/locales/simple_form.en.yml +++ b/config/locales/simple_form.en.yml @@ -75,7 +75,6 @@ en: resume: summary: *markdown_tips skills_description: *markdown_tips - awards_description: *markdown_tips city: Specify the city of your residence direction_list: | Specify your direction. Here you need to specify only what you can say about the X-developer, for example: Java-developer. The maximum length is 40 characters. Separate tags with commas. diff --git a/config/locales/simple_form.ru.yml b/config/locales/simple_form.ru.yml index b75c40566..a35c03674 100644 --- a/config/locales/simple_form.ru.yml +++ b/config/locales/simple_form.ru.yml @@ -76,7 +76,6 @@ ru: resume: summary: *markdown_tips skills_description: *markdown_tips - awards_description: *markdown_tips city: Укажите город вашего проживания direction_list: | Укажите ваше направление. Здесь нужно указывать только то, про что можно сказать X-разработчик, например: Java-разработчик. Максимальная длина 40 символов. Тэги разделяйте запятыми. diff --git a/test/factories/resumes.rb b/test/factories/resumes.rb index 3280977cf..c06995b4d 100644 --- a/test/factories/resumes.rb +++ b/test/factories/resumes.rb @@ -8,7 +8,6 @@ github_url contact contact_email { 'test@emil.com' } - awards_description english_fluency { :fluent } works_attributes do diff --git a/test/factories/sequences.rb b/test/factories/sequences.rb index 959667346..78dce301c 100644 --- a/test/factories/sequences.rb +++ b/test/factories/sequences.rb @@ -29,7 +29,7 @@ Faker::Lorem.paragraph_by_chars(number: 200) end - sequence :description, aliases: %i[skills_description awards_description] do |_n| + sequence :description, aliases: %i[skills_description] do |_n| Faker::Lorem.paragraph_by_chars(number: 300) end diff --git a/test/fixtures/resumes.yml b/test/fixtures/resumes.yml index 8854c25cd..10de3c52c 100644 --- a/test/fixtures/resumes.yml +++ b/test/fixtures/resumes.yml @@ -8,7 +8,6 @@ DEFAULTS: &DEFAULTS contact_email: $LABEL@email.com english_fluency: fluent skills_description: <%= Faker::Lorem.paragraph %> - awards_description: <%= Faker::Lorem.paragraph %> summary: <%= Faker::Lorem.paragraph_by_chars(number: 400) %> state: published evaluated_ai_state: not_evaluated @@ -19,7 +18,6 @@ one: user: one english_fluency: read skills_description: <%= Faker::Lorem.paragraph %> - awards_description: <%= Faker::Lorem.paragraph %> summary: <%= Faker::Lorem.paragraph_by_chars(number: 400) %> answers_count: 2 @@ -27,7 +25,6 @@ two: <<: *DEFAULTS user: two skills_description: <%= Faker::Lorem.paragraph %> - awards_description: <%= Faker::Lorem.paragraph %> summary: <%= Faker::Lorem.paragraph_by_chars(number: 400) %> answers_count: 3 @@ -55,8 +52,6 @@ full: В основном работаю со стеком Ruby/Rails, но имел дело и с другими фреймворками (Phoenix, Django, Laravel), но уровень владения/экспертизы в них очень поверхностен. Редактор у меня Vim, 10 пальцевая слепая печать прилагается. Так имел опыт с такими [инструментами](/) как Ansible, Docker, Terraform, разворачивал инфраструктуры на AWS - awards_description: | - Курсы Backend/Frontend JS Software Engineer на Hexlet summary: | Программист-самоучка, избравший путь постоянного самосовершенствования. Ценю красивый и лаконичный код, люблю функциональное программирование (великая троица map, filter, reduce). Орудую такими языками как JS, Ruby, PHP, Python, Elixir, Clojure (в разной степени мастерства, конечно). Восхищаюсь семейством LISP языков, настолько, что пишу свой интерпретатор LISP на Elixir как пет проект. В настоящий момент углубляюсь в ОС Unix, чтобы в дальнейшем улучшить навыки DevOps. answers_count: 1 @@ -65,7 +60,6 @@ one_archived: <<: *DEFAULTS user: one skills_description: <%= Faker::Lorem.paragraph %> - awards_description: <%= Faker::Lorem.paragraph %> summary: <%= Faker::Lorem.paragraph_by_chars(number: 400) %> state: archived contact_email: one@email.com @@ -74,7 +68,6 @@ one_evaluated_failed: <<: *DEFAULTS user: one skills_description: <%= Faker::Lorem.paragraph %> - awards_description: <%= Faker::Lorem.paragraph %> summary: <%= Faker::Lorem.paragraph_by_chars(number: 400) %> evaluated_ai_state: failed contact_email: one@email.com From 90a9959888c7936dea98ddf945141de2a02d0d45 Mon Sep 17 00:00:00 2001 From: usernaimandrey Date: Fri, 8 Dec 2023 14:03:35 +0300 Subject: [PATCH 03/15] exept serialize --- app/controllers/web/resumes/pdfs_controller.rb | 2 +- app/models/resume.rb | 2 +- app/services/resume_auto_answer_service.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/web/resumes/pdfs_controller.rb b/app/controllers/web/resumes/pdfs_controller.rb index e15c8f7e4..df1f3f35f 100644 --- a/app/controllers/web/resumes/pdfs_controller.rb +++ b/app/controllers/web/resumes/pdfs_controller.rb @@ -12,7 +12,7 @@ def show @user = resource_resume.user @resume_contact_information = resource_resume - .serializable_hash + .serializable_hash(except: %i[hexlet_url awards_description]) .deep_symbolize_keys .slice(:city, :contact_telegram, :contact_phone, :contact_email, :contact) @resume_educations = resource_resume.educations.web diff --git a/app/models/resume.rb b/app/models/resume.rb index a5428db41..fc04413f3 100644 --- a/app/models/resume.rb +++ b/app/models/resume.rb @@ -5,7 +5,7 @@ class Resume < ApplicationRecord extend Enumerize extend TagResumePresenter - deprecate :hexlet_url, :awards_description + mark_as_outdated :hexlet_url, :awards_description has_paper_trail is_impressionable counter_cache: true diff --git a/app/services/resume_auto_answer_service.rb b/app/services/resume_auto_answer_service.rb index d894f0ef1..4cfe94497 100644 --- a/app/services/resume_auto_answer_service.rb +++ b/app/services/resume_auto_answer_service.rb @@ -30,7 +30,7 @@ def evaluate_resume(resume) def prepare_resume(resume) resume_content = resume - .serializable_hash + .serializable_hash(except: %i[hexlet_url awards_description]) .deep_symbolize_keys .slice(:name, :summary, :skills_description, :contact_phone, :contact_email) .values From fd7322fca2a22744a325dc9e7113d3a38fa03f61 Mon Sep 17 00:00:00 2001 From: usernaimandrey Date: Fri, 8 Dec 2023 17:43:57 +0300 Subject: [PATCH 04/15] add column to resume --- app/forms/web/account/resume_form.rb | 2 + app/forms/web/admin/resume_form.rb | 2 + app/views/web/shared/_resume_form.html.slim | 42 +++++++++++-------- config/locales/en.activerecord.yml | 2 + config/locales/en.views.yml | 3 +- config/locales/ru.activerecord.yml | 2 + config/locales/ru.views.yml | 5 ++- config/locales/simple_form.en.yml | 2 + config/locales/simple_form.ru.yml | 2 + .../20231208110758_add_columns_to_resume.rb | 7 ++++ test/factories/resumes.rb | 2 + test/fixtures/resumes.yml | 10 +++++ 12 files changed, 61 insertions(+), 20 deletions(-) create mode 100644 db/migrate/20231208110758_add_columns_to_resume.rb diff --git a/app/forms/web/account/resume_form.rb b/app/forms/web/account/resume_form.rb index 96d7fe212..a1510c247 100644 --- a/app/forms/web/account/resume_form.rb +++ b/app/forms/web/account/resume_form.rb @@ -19,6 +19,8 @@ class Web::Account::ResumeForm < Resume relocation skill_list direction_list + about_me + projects ] nested_attrs = { diff --git a/app/forms/web/admin/resume_form.rb b/app/forms/web/admin/resume_form.rb index 90b62315e..9f6a2e2e8 100644 --- a/app/forms/web/admin/resume_form.rb +++ b/app/forms/web/admin/resume_form.rb @@ -19,6 +19,8 @@ class Web::Admin::ResumeForm < Resume relocation skill_list direction_list + about_me + projects ] nested_attrs = { diff --git a/app/views/web/shared/_resume_form.html.slim b/app/views/web/shared/_resume_form.html.slim index 5da3aa529..640e18d4e 100644 --- a/app/views/web/shared/_resume_form.html.slim +++ b/app/views/web/shared/_resume_form.html.slim @@ -6,11 +6,6 @@ .mb-3 = f.submit class: 'btn btn-primary' .mb-3 = f.input :name - .mb-3 - = f.input :relocation, selected: resume.relocation - - if resume.locale_ru? - .mb-3 - = f.input :english_fluency h3 = t('.contacts') a.btn.btn-primary.btn-sm[data-bs-toggle="collapse" href="#collapse-contacts" role="button" aria-expanded="false"] span.bi.bi-patch-plus.me-1 @@ -37,18 +32,31 @@ = f.input :summary, input_html: { rows: 10 } .mb-3 = f.input :skills_description, input_html: { rows: 5 } - .mb-3 - = f.input :skill_list, input_html: { value: f.object.skill_list.to_s } - .mb-3 - = f.input :direction_list, input_html: { value: f.object.direction_list.to_s } - .mb-3 - h3 = t('.work') - #works - = link_to_add_association t('.add_work'), f, :works, id: 'addWork', partial: 'web/shared/work_fields', - 'data-association-insertion-node' => '#addWork', - 'data-association-insertion-method' => 'after' - = f.simple_fields_for :works, resume_works do |work| - = render 'web/shared/work_fields', f: work + .mb-3 + = f.input :projects, as: :text, input_html: { rows: 10 } + h3 = t('.additionally') + a.btn.btn-primary.btn-sm[data-bs-toggle="collapse" href="#collapse-additionally" role="button" aria-expanded="false"] + span.bi.bi-patch-plus.me-1 + = t('.add') + .collapse[id="collapse-additionally"] + .mb-3 + = f.input :relocation, selected: resume.relocation + - if resume.locale_ru? + .mb-3 + = f.input :english_fluency + .mb-3 + = f.input :about_me, input_html: { rows: 10 } + .mb-3 + = f.input :skill_list, input_html: { value: f.object.skill_list.to_s } + .mb-3 + = f.input :direction_list, input_html: { value: f.object.direction_list.to_s } + h3 = t('.work') + #works + = link_to_add_association t('.add_work'), f, :works, id: 'addWork', partial: 'web/shared/work_fields', + 'data-association-insertion-node' => '#addWork', + 'data-association-insertion-method' => 'after' + = f.simple_fields_for :works, resume_works do |work| + = render 'web/shared/work_fields', f: work .mb-3 h3 = t('.education') #educations diff --git a/config/locales/en.activerecord.yml b/config/locales/en.activerecord.yml index a620d98c9..ad48b27ba 100644 --- a/config/locales/en.activerecord.yml +++ b/config/locales/en.activerecord.yml @@ -138,6 +138,8 @@ en: state/archived: Archived skill_list: Skill tags direction_list: Direction + projects: Projects + about_me: About me errors: models: resume: diff --git a/config/locales/en.views.yml b/config/locales/en.views.yml index 84506ebc8..48ea4bdd1 100644 --- a/config/locales/en.views.yml +++ b/config/locales/en.views.yml @@ -60,7 +60,7 @@ en: name: CV title user: Name/Surname/Email resume_form: - work: Work Experience + work: Experience education: Education add_work: Add add_education: Add @@ -70,6 +70,7 @@ en: contacts: Contacts main: Main add: Add + additionally: Additionally work_fields: remove_work: Delete work experience education_fields: diff --git a/config/locales/ru.activerecord.yml b/config/locales/ru.activerecord.yml index 6f6b99400..2f6cbaaf0 100644 --- a/config/locales/ru.activerecord.yml +++ b/config/locales/ru.activerecord.yml @@ -130,6 +130,8 @@ ru: state/archived: В архиве skill_list: Тэги навыков direction_list: Направление + projects: Проекты + about_me: О себе resume/answer: content: Ответ applying_state/pending: Ожидает подтверждения diff --git a/config/locales/ru.views.yml b/config/locales/ru.views.yml index e942f0372..b951823f6 100644 --- a/config/locales/ru.views.yml +++ b/config/locales/ru.views.yml @@ -162,7 +162,7 @@ ru: name: Название резюме user: Имя/Фамилия/Почта resume_form: - work: Опыт работы + work: Опыт education: Образование add_work: Добавить опыт работы add_education: Добавить образование @@ -171,7 +171,8 @@ ru: cancel: Отмена contacts: Контактная информация main: Основное - add: Добавить + add: Заполнить + additionally: Дополнительно work_fields: remove_work: Удалить опыт работы education_fields: diff --git a/config/locales/simple_form.en.yml b/config/locales/simple_form.en.yml index 0d1ea7cb3..9104aa040 100644 --- a/config/locales/simple_form.en.yml +++ b/config/locales/simple_form.en.yml @@ -73,7 +73,9 @@ en: career: description: *markdown_tips resume: + projects: Indicate the projects in which you participated summary: *markdown_tips + about_me: *markdown_tips skills_description: *markdown_tips city: Specify the city of your residence direction_list: | diff --git a/config/locales/simple_form.ru.yml b/config/locales/simple_form.ru.yml index a35c03674..6bfa0df51 100644 --- a/config/locales/simple_form.ru.yml +++ b/config/locales/simple_form.ru.yml @@ -91,6 +91,8 @@ ru: experience_description: *markdown_tips about_company: *markdown_tips about_project: *markdown_tips + about_me: *markdown_tips + projects: Укажите проекты в которых вы участвовали(Учебные или opensource) educations: description: Специальность, учебное заведение, ... works: diff --git a/db/migrate/20231208110758_add_columns_to_resume.rb b/db/migrate/20231208110758_add_columns_to_resume.rb new file mode 100644 index 000000000..3767d9f47 --- /dev/null +++ b/db/migrate/20231208110758_add_columns_to_resume.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true +class AddColumnsToResume < ActiveRecord::Migration[7.0] + def change + add_column :resumes, :about_me, :text + add_column :resumes, :projects, :text + end +end diff --git a/test/factories/resumes.rb b/test/factories/resumes.rb index c06995b4d..084d36270 100644 --- a/test/factories/resumes.rb +++ b/test/factories/resumes.rb @@ -8,6 +8,8 @@ github_url contact contact_email { 'test@emil.com' } + about_me + projects english_fluency { :fluent } works_attributes do diff --git a/test/fixtures/resumes.yml b/test/fixtures/resumes.yml index 10de3c52c..1b757aa86 100644 --- a/test/fixtures/resumes.yml +++ b/test/fixtures/resumes.yml @@ -8,6 +8,8 @@ DEFAULTS: &DEFAULTS contact_email: $LABEL@email.com english_fluency: fluent skills_description: <%= Faker::Lorem.paragraph %> + projects: <%= Faker::Lorem.paragraph %> + about_me: <%= Faker::Lorem.paragraph %> summary: <%= Faker::Lorem.paragraph_by_chars(number: 400) %> state: published evaluated_ai_state: not_evaluated @@ -48,6 +50,14 @@ full: <<: *DEFAULTS user: full name: Инженер-Программист + about_me: Хороший программист + projects: | + ## Barin Games: + + ### Получил навыки работы: + + - npm пакетный менаджер + - babel skills_description: | В основном работаю со стеком Ruby/Rails, но имел дело и с другими фреймворками (Phoenix, Django, Laravel), но уровень владения/экспертизы в них очень поверхностен. Редактор у меня Vim, 10 пальцевая слепая печать прилагается. From 58607825d2a63adaa91ada95decbd69758eb3e82 Mon Sep 17 00:00:00 2001 From: usernaimandrey Date: Fri, 8 Dec 2023 17:48:47 +0300 Subject: [PATCH 05/15] fix test --- test/factories/resumes.rb | 2 +- test/factories/sequences.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/factories/resumes.rb b/test/factories/resumes.rb index 084d36270..eb8334b2a 100644 --- a/test/factories/resumes.rb +++ b/test/factories/resumes.rb @@ -8,8 +8,8 @@ github_url contact contact_email { 'test@emil.com' } - about_me projects + about_me english_fluency { :fluent } works_attributes do diff --git a/test/factories/sequences.rb b/test/factories/sequences.rb index 78dce301c..43164b1b3 100644 --- a/test/factories/sequences.rb +++ b/test/factories/sequences.rb @@ -29,7 +29,7 @@ Faker::Lorem.paragraph_by_chars(number: 200) end - sequence :description, aliases: %i[skills_description] do |_n| + sequence :description, aliases: %i[skills_description about_me projects] do |_n| Faker::Lorem.paragraph_by_chars(number: 300) end From 1a45144db41f5076bae3e2057ade9e3952c206b9 Mon Sep 17 00:00:00 2001 From: usernaimandrey Date: Fri, 8 Dec 2023 19:41:40 +0300 Subject: [PATCH 06/15] improve layout resume --- app/views/web/resumes/_information.html.slim | 53 +++++++++++--------- app/views/web/resumes/show.html.slim | 22 ++------ config/locales/en.views.yml | 3 +- config/locales/ru.enumerize.yml | 18 +++---- config/locales/ru.views.yml | 3 +- test/fixtures/resumes.yml | 14 ++++-- 6 files changed, 57 insertions(+), 56 deletions(-) diff --git a/app/views/web/resumes/_information.html.slim b/app/views/web/resumes/_information.html.slim index d2a2966ad..c125a4189 100644 --- a/app/views/web/resumes/_information.html.slim +++ b/app/views/web/resumes/_information.html.slim @@ -2,24 +2,6 @@ h2.my-4.me-3 = t('.basic') hr.my-auto.w-100 -- if @resume.user.first_name? - .row.mb-3 - .col-sm-3 - b = han('user', 'name') - .col-sm-9 - = link_to @resume.user, user_path(@resume.user) -- if @resume.city - .row.mb-3 - .col-sm-3 - b = han('resume', 'city') - .col-sm-9.hexlet-cv-content - == markdown2html @resume.city -- if @resume.relocation - .row.mb-3 - .col-sm-3 - b = han('resume', 'relocation') - .col-sm-9.hexlet-cv-content - == markdown2html @resume.relocation_text .row.mb-3 .col-sm-3 b = han('resume', 'summary') @@ -30,39 +12,64 @@ b = han('resume', 'skills_description') .col-sm-9.hexlet-cv-content == markdown2html @resume.skills_description -- if @resume.locale == 'ru' - .row +- if @resume.projects + .row.mb-3 .col-sm-3 - b = han('resume', 'english_fluency') - .col-sm-9 + b = han('resume', 'projects') + .col-sm-9.hexlet-cv-content + == markdown2html @resume.projects + +.row.mb-3 + .col-sm-3 + b = han('resume', 'about_me') + .col-sm-9.hexlet-cv-content + - if @resume.relocation && !@resume.relocation_not_specified? + = @resume.relocation_text + br + - if @resume.locale == 'ru' && @resume.english_fluency = @resume.english_fluency.text + br + == markdown2html @resume.about_me + +.d-flex + h2.my-4.me-3 = t('.contacts') + hr.my-auto.w-100 .row.mt-3.mb-4 .col-sm-3 b = han('resume', 'github') .col-sm-9 = link_to @resume.github_url, @resume.github_url, target: '_blank', rel: :noopener -- if @resume.contact +- if @resume.contact_phone .row.mt-3.mb-4 .col-sm-3 b = han('resume', 'contact_phone') .col-sm-9 = @resume.contact_phone +- if @resume.contact_email .row.mt-3.mb-4 .col-sm-3 b = han('resume', 'contact_email') .col-sm-9 = @resume.contact_email +- if @resume.contact_telegram .row.mt-3.mb-4 .col-sm-3 b = han('resume', 'contact_telegram') .col-sm-9 = @resume.contact_telegram +- if @resume.contact .row.mt-3.mb-4 .col-sm-3 b = han('resume', 'contact') .col-sm-9 = @resume.contact +- if @resume.city + .row.mb-3 + .col-sm-3 + b = han('resume', 'city') + .col-sm-9.hexlet-cv-content + = @resume.city - if @resume_works.any? .d-flex diff --git a/app/views/web/resumes/show.html.slim b/app/views/web/resumes/show.html.slim index 3722ff7bc..4707d99d2 100644 --- a/app/views/web/resumes/show.html.slim +++ b/app/views/web/resumes/show.html.slim @@ -3,28 +3,16 @@ resume: @resume, educations: @resume_educations, works: @resume_works = content_for :header do - .d-flex.justify-content-between + .d-flex.justify-content-center .m-1 - = @resume + = link_to @resume.user.full_name, user_path(@resume.user) - if current_or_guest_user.admin? .m-1 - = link_to edit_admin_resume_path(@resume), class: 'btn btn-primary' do + = link_to edit_admin_resume_path(@resume), class: 'btn btn-outline-primary' do span.bi.bi-gear -/ .d-flex.mb-3.text-muted -/ .d-flex.me-4 -/ .me-2= t('.published') -/ .fw-light -/ = distance_of_time_in_words_to_now @resume.created_at -/ .d-flex.me-4 -/ .me-2= t('.views') -/ .fw-light= 3 -/ .d-flex.me-4 -/ .me-2= t('.answers') -/ .fw-light= 3 -/ .d-flex.me-4 -/ .me-2= t('.likes') -/ .fw-light= 3 +h3.text-center = @resume + - if @resume.archived? .alert.alert-warning = t('.archived') diff --git a/config/locales/en.views.yml b/config/locales/en.views.yml index 48ea4bdd1..b8695a4ee 100644 --- a/config/locales/en.views.yml +++ b/config/locales/en.views.yml @@ -161,7 +161,8 @@ en: header: Edit the recommendation information: basic: Basic - work: Work + contacts: Contacts + work: Experience education: Education current: To present contact: Contact diff --git a/config/locales/ru.enumerize.yml b/config/locales/ru.enumerize.yml index 0306641d1..617d33434 100644 --- a/config/locales/ru.enumerize.yml +++ b/config/locales/ru.enumerize.yml @@ -4,10 +4,10 @@ ru: ru: Русский en: Английский relocation: - another_country: Готов только в другую страну - another_city: Готов только в рамках страны проживания - another_city_country: Готов - not_ready: Не готов + another_country: Готов к релокации в другую страну + another_city: Готов к релокации в рамках страны проживания + another_city_country: Готов к релокации + not_ready: Не готов релоцироваться not_specified: Не указано salary_amount_type: gross: До вычетов @@ -37,11 +37,11 @@ ru: middle: Мидл senior: Сеньор english_fluency: - dont_know: Не знаю - basic: Начальные знания - read: Читаю профессиональную литературу - pass_interview: Могу проходить интервью - fluent: Свободно владею + dont_know: Не знаю английский язык + basic: Начальные знания английского языка + read: Читаю профессиональную литературу на английском языке + pass_interview: Могу проходить интервью на английском языке + fluent: Свободно владею на английским языком notification_kind: next_step_open_source: Open source kind: diff --git a/config/locales/ru.views.yml b/config/locales/ru.views.yml index b951823f6..ceda4ba21 100644 --- a/config/locales/ru.views.yml +++ b/config/locales/ru.views.yml @@ -263,7 +263,8 @@ ru: header: Редактирование рекомендации information: basic: Основное - work: Работа + contacts: Контакты + work: Опыт education: Образование current: по настоящее время contact: Контакт diff --git a/test/fixtures/resumes.yml b/test/fixtures/resumes.yml index 1b757aa86..b67dca55e 100644 --- a/test/fixtures/resumes.yml +++ b/test/fixtures/resumes.yml @@ -52,12 +52,16 @@ full: name: Инженер-Программист about_me: Хороший программист projects: | - ## Barin Games: + Выполненные проекты: + 1. Игры разума - набор из пяти консольных игр, выполняющих математические операции. + Стек технологий: JavaScript, Node.js, ESLint, Git, Github + 2. Вычислитель отличий - программа, определяющая разницу между двумя структурами данных (файлами формата json или yaml) + Стек технологий: JavaScript, Node.js, ESLint, Jest, commander.js, Lodash + 3. RSS агрегатор - сервис, умеющий опрашивать RSS-ленты сайтов на наличие новых постов, отображать их в удобном виде, отмечать прочитанные и подгружать новые посты. + Стек технологий: Java Script, Bootstrap, Webpack, Axios, i18next, оn-change, Yup + 4. Чат (Slack) - аналог чат-мессенджера, работающего в реальном времени с функциями: регистрации и авторизации, создания, удаления и переименования каналов, возможностью создания и получения сообщений в каналах. + Стек технологий: Java Script, React / React Hooks, Redux / Redux Toolkit, React-Bootstrap, WebSocket(socket.io), Axios, Formik, i18next, Yup, React-toastify, Leo-profanity - ### Получил навыки работы: - - - npm пакетный менаджер - - babel skills_description: | В основном работаю со стеком Ruby/Rails, но имел дело и с другими фреймворками (Phoenix, Django, Laravel), но уровень владения/экспертизы в них очень поверхностен. Редактор у меня Vim, 10 пальцевая слепая печать прилагается. From 880a1b60ce0f89f66d916835c69a6d5c6dfe8f0a Mon Sep 17 00:00:00 2001 From: usernaimandrey Date: Fri, 8 Dec 2023 19:50:49 +0300 Subject: [PATCH 07/15] fix --- app/views/web/resumes/_information.html.slim | 1 - config/locales/en.views.yml | 1 - config/locales/ru.views.yml | 1 - 3 files changed, 3 deletions(-) diff --git a/app/views/web/resumes/_information.html.slim b/app/views/web/resumes/_information.html.slim index c125a4189..15b1466cd 100644 --- a/app/views/web/resumes/_information.html.slim +++ b/app/views/web/resumes/_information.html.slim @@ -1,5 +1,4 @@ .d-flex - h2.my-4.me-3 = t('.basic') hr.my-auto.w-100 .row.mb-3 diff --git a/config/locales/en.views.yml b/config/locales/en.views.yml index b8695a4ee..8c3a270f6 100644 --- a/config/locales/en.views.yml +++ b/config/locales/en.views.yml @@ -160,7 +160,6 @@ en: edit: header: Edit the recommendation information: - basic: Basic contacts: Contacts work: Experience education: Education diff --git a/config/locales/ru.views.yml b/config/locales/ru.views.yml index ceda4ba21..e27b92a11 100644 --- a/config/locales/ru.views.yml +++ b/config/locales/ru.views.yml @@ -262,7 +262,6 @@ ru: edit: header: Редактирование рекомендации information: - basic: Основное contacts: Контакты work: Опыт education: Образование From c867b70b62f633a397a3a5a021f640091b26bd6d Mon Sep 17 00:00:00 2001 From: usernaimandrey Date: Fri, 8 Dec 2023 20:05:16 +0300 Subject: [PATCH 08/15] add new fild to evaluated resume --- app/services/resume_auto_answer_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/resume_auto_answer_service.rb b/app/services/resume_auto_answer_service.rb index 4cfe94497..163d6dae0 100644 --- a/app/services/resume_auto_answer_service.rb +++ b/app/services/resume_auto_answer_service.rb @@ -32,7 +32,7 @@ def prepare_resume(resume) resume_content = resume .serializable_hash(except: %i[hexlet_url awards_description]) .deep_symbolize_keys - .slice(:name, :summary, :skills_description, :contact_phone, :contact_email) + .slice(:name, :summary, :projects, :about_me, :skills_description, :contact_phone, :contact_email) .values .join('\n') work_content = resume.works.reduce('') do |acc, work| From c68338c4581ce95e2f903b773bfc82b8948ec106 Mon Sep 17 00:00:00 2001 From: usernaimandrey Date: Sun, 10 Dec 2023 10:55:40 +0300 Subject: [PATCH 09/15] improve resume.pdf --- .../web/resumes/pdfs_controller.rb | 3 +- app/views/web/resumes/pdfs/base.slim | 50 +++++++++++-------- config/locales/en.views.yml | 4 +- config/locales/ru.enumerize.yml | 2 +- config/locales/ru.views.yml | 5 +- 5 files changed, 35 insertions(+), 29 deletions(-) diff --git a/app/controllers/web/resumes/pdfs_controller.rb b/app/controllers/web/resumes/pdfs_controller.rb index df1f3f35f..6340acb74 100644 --- a/app/controllers/web/resumes/pdfs_controller.rb +++ b/app/controllers/web/resumes/pdfs_controller.rb @@ -12,9 +12,8 @@ def show @user = resource_resume.user @resume_contact_information = resource_resume - .serializable_hash(except: %i[hexlet_url awards_description]) + .serializable_hash(only: %i[city contact_telegram contact_phone contact_email contact]) .deep_symbolize_keys - .slice(:city, :contact_telegram, :contact_phone, :contact_email, :contact) @resume_educations = resource_resume.educations.web @resume_works = resource_resume.works.web diff --git a/app/views/web/resumes/pdfs/base.slim b/app/views/web/resumes/pdfs/base.slim index 490fcab79..f5f1e84b2 100644 --- a/app/views/web/resumes/pdfs/base.slim +++ b/app/views/web/resumes/pdfs/base.slim @@ -5,7 +5,7 @@ h1.text-center.display-4.mb-2 = @user h2.text-center.lead = resource_resume .col-12 - h2.my-4 = t('.basic') + h2.my-4 = t('.summary') hr.w-100 .col-sm-9.hexlet-cv-content.lead @@ -17,33 +17,39 @@ .col-12.hexlet-cv-content.lead == markdown2html resource_resume.skills_description - - if resource_resume.english_fluency? + - if resource_resume.projects .col-12 - h2.my-4.me-3 = han('resume', 'english_fluency') + h2.my-4 = han('resume', 'projects') hr.w-100 - .col-12.lead - = resource_resume.english_fluency.text + .col-12.hexlet-cv-content.lead + == markdown2html resource_resume.projects .col-12 - h2.my-4 = han('resume', 'github') + h2.my-4 = han('resume', 'about_me') hr.w-100 - .col-12.lead - = link_to resource_resume.github_url, resource_resume.github_url, target: '_blank', rel: 'noopener' - - - @resume_contact_information.each do |field, content| - - if content.present? - .col-12 - h2.my-4 = han('resume', field) - hr.w-100 - .col-12.lead - = content + .col-12.hexlet-cv-content.lead + - if resource_resume.relocation && !resource_resume.relocation_not_specified? + = resource_resume.relocation_text + br + - if resource_resume.locale == 'ru' && resource_resume.english_fluency + = resource_resume.english_fluency.text + br + == markdown2html resource_resume.about_me - - if resource_resume.relocation? - .col-12 - h2.my-4 = han('resume', 'relocation') - hr.w-100 - .col-12.lead - = resource_resume.relocation.text + h2.my-4 = t('.contacts') + hr.w-100 + .row.mt-3.mb-4 + .col-sm-3 + b = han('resume', 'github') + .col-sm-9 + = link_to resource_resume.github_url, resource_resume.github_url, target: '_blank', rel: 'noopener' + - @resume_contact_information.each do |field, content| + - if content.present? + .row.mt-3.mb-4 + .col-sm-3 + b = han('resume', field) + .col-sm-9 + = content - if @resume_works.any? .col-12 diff --git a/config/locales/en.views.yml b/config/locales/en.views.yml index 8c3a270f6..f8862a67e 100644 --- a/config/locales/en.views.yml +++ b/config/locales/en.views.yml @@ -198,8 +198,8 @@ en: header: Edit comment pdfs: base: - basic: Basic - work: Work + summary: Summary + work: Expiriens education: Education current: Current account: diff --git a/config/locales/ru.enumerize.yml b/config/locales/ru.enumerize.yml index 617d33434..ffbc054a9 100644 --- a/config/locales/ru.enumerize.yml +++ b/config/locales/ru.enumerize.yml @@ -41,7 +41,7 @@ ru: basic: Начальные знания английского языка read: Читаю профессиональную литературу на английском языке pass_interview: Могу проходить интервью на английском языке - fluent: Свободно владею на английским языком + fluent: Свободно владею английским языком notification_kind: next_step_open_source: Open source kind: diff --git a/config/locales/ru.views.yml b/config/locales/ru.views.yml index e27b92a11..5cbca5f61 100644 --- a/config/locales/ru.views.yml +++ b/config/locales/ru.views.yml @@ -295,8 +295,9 @@ ru: header: Редактирование комментария pdfs: base: - basic: Основное - work: Работа + contacts: Контакты + summary: Описание + work: Опыт education: Образование current: по настоящее время account: From 22e8757cdd12d9caf1b26ae1849cacfccc58051b Mon Sep 17 00:00:00 2001 From: usernaimandrey Date: Sun, 10 Dec 2023 11:19:27 +0300 Subject: [PATCH 10/15] improve contact info --- .../web/resumes/pdfs_controller.rb | 4 +- app/controllers/web/resumes_controller.rb | 1 + app/models/resume.rb | 5 ++- app/views/web/resumes/_information.html.slim | 37 ++++--------------- app/views/web/shared/_resume_form.html.slim | 2 +- 5 files changed, 13 insertions(+), 36 deletions(-) diff --git a/app/controllers/web/resumes/pdfs_controller.rb b/app/controllers/web/resumes/pdfs_controller.rb index 6340acb74..bc659e9ee 100644 --- a/app/controllers/web/resumes/pdfs_controller.rb +++ b/app/controllers/web/resumes/pdfs_controller.rb @@ -11,9 +11,7 @@ def show end @user = resource_resume.user - @resume_contact_information = resource_resume - .serializable_hash(only: %i[city contact_telegram contact_phone contact_email contact]) - .deep_symbolize_keys + @resume_contact_information = resource_resume.contact_information @resume_educations = resource_resume.educations.web @resume_works = resource_resume.works.web diff --git a/app/controllers/web/resumes_controller.rb b/app/controllers/web/resumes_controller.rb index 1cf794926..5448d4690 100644 --- a/app/controllers/web/resumes_controller.rb +++ b/app/controllers/web/resumes_controller.rb @@ -21,6 +21,7 @@ def show # .merge(Resume::Answer::Comment.web) .order(likes_count: :desc) .uniq + @resume_contact_information = @resume.contact_information @answer = Resume::Answer.new resume: @resume @current_user_answer = @resume.answers.find_by(user: current_user) current_user_likes = @resume.answer_likes.where(user: current_user) diff --git a/app/models/resume.rb b/app/models/resume.rb index fc04413f3..43565c905 100644 --- a/app/models/resume.rb +++ b/app/models/resume.rb @@ -101,7 +101,8 @@ def self.ransackable_associations(_auth_object = nil) %w[directions user skills answers] end - def locale_ru? - locale == 'ru' + def contact_information + serializable_hash(only: %i[city contact_telegram contact_phone contact_email contact]) + .deep_symbolize_keys end end diff --git a/app/views/web/resumes/_information.html.slim b/app/views/web/resumes/_information.html.slim index 15b1466cd..0797c84a3 100644 --- a/app/views/web/resumes/_information.html.slim +++ b/app/views/web/resumes/_information.html.slim @@ -39,36 +39,13 @@ b = han('resume', 'github') .col-sm-9 = link_to @resume.github_url, @resume.github_url, target: '_blank', rel: :noopener -- if @resume.contact_phone - .row.mt-3.mb-4 - .col-sm-3 - b = han('resume', 'contact_phone') - .col-sm-9 - = @resume.contact_phone -- if @resume.contact_email - .row.mt-3.mb-4 - .col-sm-3 - b = han('resume', 'contact_email') - .col-sm-9 - = @resume.contact_email -- if @resume.contact_telegram - .row.mt-3.mb-4 - .col-sm-3 - b = han('resume', 'contact_telegram') - .col-sm-9 - = @resume.contact_telegram -- if @resume.contact - .row.mt-3.mb-4 - .col-sm-3 - b = han('resume', 'contact') - .col-sm-9 - = @resume.contact -- if @resume.city - .row.mb-3 - .col-sm-3 - b = han('resume', 'city') - .col-sm-9.hexlet-cv-content - = @resume.city + - @resume_contact_information.each do |field, content| + - if content.present? + .row.mt-3.mb-4 + .col-sm-3 + b = han('resume', field) + .col-sm-9 + = content - if @resume_works.any? .d-flex diff --git a/app/views/web/shared/_resume_form.html.slim b/app/views/web/shared/_resume_form.html.slim index 640e18d4e..789c8a088 100644 --- a/app/views/web/shared/_resume_form.html.slim +++ b/app/views/web/shared/_resume_form.html.slim @@ -41,7 +41,7 @@ .collapse[id="collapse-additionally"] .mb-3 = f.input :relocation, selected: resume.relocation - - if resume.locale_ru? + - if resume.locale == 'ru' .mb-3 = f.input :english_fluency .mb-3 From dabe9f8fe4978c6aa7dc5ed1d439f634e6b3c5c1 Mon Sep 17 00:00:00 2001 From: usernaimandrey Date: Mon, 11 Dec 2023 19:15:23 +0300 Subject: [PATCH 11/15] move contacts --- app/views/web/resumes/_information.html.slim | 34 ++++++++++---------- app/views/web/resumes/pdfs/base.slim | 30 ++++++++--------- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/app/views/web/resumes/_information.html.slim b/app/views/web/resumes/_information.html.slim index 0797c84a3..7ebc82db4 100644 --- a/app/views/web/resumes/_information.html.slim +++ b/app/views/web/resumes/_information.html.slim @@ -30,23 +30,6 @@ br == markdown2html @resume.about_me -.d-flex - h2.my-4.me-3 = t('.contacts') - hr.my-auto.w-100 - -.row.mt-3.mb-4 - .col-sm-3 - b = han('resume', 'github') - .col-sm-9 - = link_to @resume.github_url, @resume.github_url, target: '_blank', rel: :noopener - - @resume_contact_information.each do |field, content| - - if content.present? - .row.mt-3.mb-4 - .col-sm-3 - b = han('resume', field) - .col-sm-9 - = content - - if @resume_works.any? .d-flex h2.my-4.me-3 = t('.work') @@ -83,3 +66,20 @@ - elsif education.end_date |  -  = education.end_date.to_formatted_s(:month_and_year) + +.d-flex + h2.my-4.me-3 = t('.contacts') + hr.my-auto.w-100 + +.row.mt-3.mb-4 + .col-sm-3 + b = han('resume', 'github') + .col-sm-9 + = link_to @resume.github_url, @resume.github_url, target: '_blank', rel: :noopener + - @resume_contact_information.each do |field, content| + - if content.present? + .row.mt-3.mb-4 + .col-sm-3 + b = han('resume', field) + .col-sm-9 + = content diff --git a/app/views/web/resumes/pdfs/base.slim b/app/views/web/resumes/pdfs/base.slim index f5f1e84b2..8314bb4f6 100644 --- a/app/views/web/resumes/pdfs/base.slim +++ b/app/views/web/resumes/pdfs/base.slim @@ -36,21 +36,6 @@ br == markdown2html resource_resume.about_me - h2.my-4 = t('.contacts') - hr.w-100 - .row.mt-3.mb-4 - .col-sm-3 - b = han('resume', 'github') - .col-sm-9 - = link_to resource_resume.github_url, resource_resume.github_url, target: '_blank', rel: 'noopener' - - @resume_contact_information.each do |field, content| - - if content.present? - .row.mt-3.mb-4 - .col-sm-3 - b = han('resume', field) - .col-sm-9 - = content - - if @resume_works.any? .col-12 h2.my-4 = t('.work') @@ -88,3 +73,18 @@ - elsif education.end_date |  -  = education.end_date.to_formatted_s(:month_and_year) + + h2.my-4 = t('.contacts') + hr.w-100 + .row.mt-3.mb-4 + .col-sm-3 + b = han('resume', 'github') + .col-sm-9 + = link_to resource_resume.github_url, resource_resume.github_url, target: '_blank', rel: 'noopener' + - @resume_contact_information.each do |field, content| + - if content.present? + .row.mt-3.mb-4 + .col-sm-3 + b = han('resume', field) + .col-sm-9 + = content From 843ec5fc8aa5e0ca5e4da6b5a498114af7fdd0a5 Mon Sep 17 00:00:00 2001 From: usernaimandrey Date: Wed, 13 Dec 2023 18:16:07 +0300 Subject: [PATCH 12/15] fix resume --- app/views/web/resumes/_information.html.slim | 51 +++++++++++--------- 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/app/views/web/resumes/_information.html.slim b/app/views/web/resumes/_information.html.slim index 7ebc82db4..d4d193234 100644 --- a/app/views/web/resumes/_information.html.slim +++ b/app/views/web/resumes/_information.html.slim @@ -1,3 +1,20 @@ +.d-flex + h2.my-4.me-3 = t('.contacts') + hr.my-auto.w-100 + +.row.mt-3.mb-4 + .col-sm-3 + b = han('resume', 'github') + .col-sm-9 + = link_to @resume.github_url, @resume.github_url, target: '_blank', rel: :noopener + - @resume_contact_information.each do |field, content| + - if content.present? + .row.mt-3.mb-4 + .col-sm-3 + b = han('resume', field) + .col-sm-9 + = content + .d-flex hr.my-auto.w-100 @@ -18,18 +35,6 @@ .col-sm-9.hexlet-cv-content == markdown2html @resume.projects -.row.mb-3 - .col-sm-3 - b = han('resume', 'about_me') - .col-sm-9.hexlet-cv-content - - if @resume.relocation && !@resume.relocation_not_specified? - = @resume.relocation_text - br - - if @resume.locale == 'ru' && @resume.english_fluency - = @resume.english_fluency.text - br - == markdown2html @resume.about_me - - if @resume_works.any? .d-flex h2.my-4.me-3 = t('.work') @@ -68,18 +73,16 @@ = education.end_date.to_formatted_s(:month_and_year) .d-flex - h2.my-4.me-3 = t('.contacts') hr.my-auto.w-100 -.row.mt-3.mb-4 +.row.mb-3 .col-sm-3 - b = han('resume', 'github') - .col-sm-9 - = link_to @resume.github_url, @resume.github_url, target: '_blank', rel: :noopener - - @resume_contact_information.each do |field, content| - - if content.present? - .row.mt-3.mb-4 - .col-sm-3 - b = han('resume', field) - .col-sm-9 - = content + b = han('resume', 'about_me') + .col-sm-9.hexlet-cv-content + - if @resume.relocation && !@resume.relocation_not_specified? + = @resume.relocation_text + br + - if @resume.locale == 'ru' && @resume.english_fluency + = @resume.english_fluency.text + br + == markdown2html @resume.about_me From 0df12841e0740ec420568290e5da2b0c730a79ef Mon Sep 17 00:00:00 2001 From: usernaimandrey Date: Wed, 13 Dec 2023 18:22:02 +0300 Subject: [PATCH 13/15] fix base layout --- app/views/web/resumes/pdfs/base.slim | 53 ++++++++++++++-------------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/app/views/web/resumes/pdfs/base.slim b/app/views/web/resumes/pdfs/base.slim index 8314bb4f6..eea0dea78 100644 --- a/app/views/web/resumes/pdfs/base.slim +++ b/app/views/web/resumes/pdfs/base.slim @@ -4,6 +4,22 @@ .col-12 h1.text-center.display-4.mb-2 = @user h2.text-center.lead = resource_resume + + h2.my-4 = t('.contacts') + hr.w-100 + .row.mt-3.mb-4 + .col-sm-3 + b = han('resume', 'github') + .col-sm-9 + = link_to resource_resume.github_url, resource_resume.github_url, target: '_blank', rel: 'noopener' + - @resume_contact_information.each do |field, content| + - if content.present? + .row.mt-3.mb-4 + .col-sm-3 + b = han('resume', field) + .col-sm-9 + = content + .col-12 h2.my-4 = t('.summary') hr.w-100 @@ -24,18 +40,6 @@ .col-12.hexlet-cv-content.lead == markdown2html resource_resume.projects - .col-12 - h2.my-4 = han('resume', 'about_me') - hr.w-100 - .col-12.hexlet-cv-content.lead - - if resource_resume.relocation && !resource_resume.relocation_not_specified? - = resource_resume.relocation_text - br - - if resource_resume.locale == 'ru' && resource_resume.english_fluency - = resource_resume.english_fluency.text - br - == markdown2html resource_resume.about_me - - if @resume_works.any? .col-12 h2.my-4 = t('.work') @@ -74,17 +78,14 @@ |  -  = education.end_date.to_formatted_s(:month_and_year) - h2.my-4 = t('.contacts') - hr.w-100 - .row.mt-3.mb-4 - .col-sm-3 - b = han('resume', 'github') - .col-sm-9 - = link_to resource_resume.github_url, resource_resume.github_url, target: '_blank', rel: 'noopener' - - @resume_contact_information.each do |field, content| - - if content.present? - .row.mt-3.mb-4 - .col-sm-3 - b = han('resume', field) - .col-sm-9 - = content + .col-12 + h2.my-4 = han('resume', 'about_me') + hr.w-100 + .col-12.hexlet-cv-content.lead + - if resource_resume.relocation && !resource_resume.relocation_not_specified? + = resource_resume.relocation_text + br + - if resource_resume.locale == 'ru' && resource_resume.english_fluency + = resource_resume.english_fluency.text + br + == markdown2html resource_resume.about_me From e4028cde3426b8ad397bacc459b0ee5436a71a70 Mon Sep 17 00:00:00 2001 From: usernaimandrey Date: Thu, 14 Dec 2023 22:17:31 +0300 Subject: [PATCH 14/15] fix contact info --- .../web/resumes/pdfs_controller.rb | 1 - app/controllers/web/resumes_controller.rb | 1 - app/models/resume.rb | 5 --- app/views/web/resumes/_information.html.slim | 39 +++++++++++++++---- app/views/web/resumes/pdfs/base.slim | 39 +++++++++++++++---- config/locales/en.activerecord.yml | 2 +- config/locales/ru.activerecord.yml | 2 +- 7 files changed, 66 insertions(+), 23 deletions(-) diff --git a/app/controllers/web/resumes/pdfs_controller.rb b/app/controllers/web/resumes/pdfs_controller.rb index bc659e9ee..e6c2b36be 100644 --- a/app/controllers/web/resumes/pdfs_controller.rb +++ b/app/controllers/web/resumes/pdfs_controller.rb @@ -11,7 +11,6 @@ def show end @user = resource_resume.user - @resume_contact_information = resource_resume.contact_information @resume_educations = resource_resume.educations.web @resume_works = resource_resume.works.web diff --git a/app/controllers/web/resumes_controller.rb b/app/controllers/web/resumes_controller.rb index 5448d4690..1cf794926 100644 --- a/app/controllers/web/resumes_controller.rb +++ b/app/controllers/web/resumes_controller.rb @@ -21,7 +21,6 @@ def show # .merge(Resume::Answer::Comment.web) .order(likes_count: :desc) .uniq - @resume_contact_information = @resume.contact_information @answer = Resume::Answer.new resume: @resume @current_user_answer = @resume.answers.find_by(user: current_user) current_user_likes = @resume.answer_likes.where(user: current_user) diff --git a/app/models/resume.rb b/app/models/resume.rb index 43565c905..ee16474f7 100644 --- a/app/models/resume.rb +++ b/app/models/resume.rb @@ -100,9 +100,4 @@ def self.ransackable_attributes(_auth_object = nil) def self.ransackable_associations(_auth_object = nil) %w[directions user skills answers] end - - def contact_information - serializable_hash(only: %i[city contact_telegram contact_phone contact_email contact]) - .deep_symbolize_keys - end end diff --git a/app/views/web/resumes/_information.html.slim b/app/views/web/resumes/_information.html.slim index d4d193234..426516cc7 100644 --- a/app/views/web/resumes/_information.html.slim +++ b/app/views/web/resumes/_information.html.slim @@ -2,18 +2,39 @@ h2.my-4.me-3 = t('.contacts') hr.my-auto.w-100 +- if @resume.contact_email + .row.mt-3.mb-4 + .col-sm-3 + b = han('resume', 'contact_email') + .col-sm-9 + = @resume.contact_email + +- if @resume.contact_phone + .row.mt-3.mb-4 + .col-sm-3 + b = han('resume', 'contact_phone') + .col-sm-9 + = @resume.contact_phone + .row.mt-3.mb-4 .col-sm-3 b = han('resume', 'github') .col-sm-9 = link_to @resume.github_url, @resume.github_url, target: '_blank', rel: :noopener - - @resume_contact_information.each do |field, content| - - if content.present? - .row.mt-3.mb-4 - .col-sm-3 - b = han('resume', field) - .col-sm-9 - = content + +- if @resume.contact_telegram + .row.mt-3.mb-4 + .col-sm-3 + b = han('resume', 'contact_telegram') + .col-sm-9 + = @resume.contact_telegram + +- if @resume.contact + .row.mt-3.mb-4 + .col-sm-3 + b = han('resume', 'contact') + .col-sm-9 + = @resume.contact_telegram .d-flex hr.my-auto.w-100 @@ -85,4 +106,8 @@ - if @resume.locale == 'ru' && @resume.english_fluency = @resume.english_fluency.text br + - if @resume.city + = "#{han('resume', 'city')} #{@resume.city}" + br + == markdown2html @resume.about_me diff --git a/app/views/web/resumes/pdfs/base.slim b/app/views/web/resumes/pdfs/base.slim index eea0dea78..a4a288b58 100644 --- a/app/views/web/resumes/pdfs/base.slim +++ b/app/views/web/resumes/pdfs/base.slim @@ -7,18 +7,39 @@ h2.my-4 = t('.contacts') hr.w-100 + - if resource_resume.contact_email + .row.mt-3.mb-4 + .col-sm-3 + b = han('resume', 'contact_email') + .col-sm-9 + = resource_resume.contact_email + + - if resource_resume.contact_phone + .row.mt-3.mb-4 + .col-sm-3 + b = han('resume', 'contact_phone') + .col-sm-9 + = resource_resume.contact_phone + .row.mt-3.mb-4 .col-sm-3 b = han('resume', 'github') .col-sm-9 = link_to resource_resume.github_url, resource_resume.github_url, target: '_blank', rel: 'noopener' - - @resume_contact_information.each do |field, content| - - if content.present? - .row.mt-3.mb-4 - .col-sm-3 - b = han('resume', field) - .col-sm-9 - = content + + - if resource_resume.contact_telegram + .row.mt-3.mb-4 + .col-sm-3 + b = han('resume', 'contact_telegram') + .col-sm-9 + = resource_resume.contact_telegram + + - if resource_resume.contact + .row.mt-3.mb-4 + .col-sm-3 + b = han('resume', 'contact') + .col-sm-9 + = resource_resume.contact .col-12 h2.my-4 = t('.summary') @@ -88,4 +109,8 @@ - if resource_resume.locale == 'ru' && resource_resume.english_fluency = resource_resume.english_fluency.text br + - if resource_resume.city + = resource_resume.city + br + == markdown2html resource_resume.about_me diff --git a/config/locales/en.activerecord.yml b/config/locales/en.activerecord.yml index ad48b27ba..3d7567c0d 100644 --- a/config/locales/en.activerecord.yml +++ b/config/locales/en.activerecord.yml @@ -119,7 +119,7 @@ en: end_date: To current: To present resume: - city: City + city: live in the city relocation: Willing to relocate name: Position summary: Description diff --git a/config/locales/ru.activerecord.yml b/config/locales/ru.activerecord.yml index 2f6cbaaf0..5feb98d5b 100644 --- a/config/locales/ru.activerecord.yml +++ b/config/locales/ru.activerecord.yml @@ -113,7 +113,7 @@ ru: resume: name: Позиция summary: Описание - city: Город + city: Проживаю в городе relocation: Готовность к релокации github_url: GitHub contact: Дополнительные контакты From a23846a97ebac3280ea25d91fce6ee4fdeab4bda Mon Sep 17 00:00:00 2001 From: usernaimandrey Date: Wed, 20 Dec 2023 00:21:35 +0300 Subject: [PATCH 15/15] rename column --- app/forms/web/account/resume_form.rb | 4 ++-- app/forms/web/admin/resume_form.rb | 4 ++-- app/services/resume_auto_answer_service.rb | 2 +- app/views/web/resumes/_information.html.slim | 10 +++++----- app/views/web/resumes/pdfs/base.slim | 10 +++++----- app/views/web/shared/_resume_form.html.slim | 4 ++-- config/locales/en.activerecord.yml | 4 ++-- config/locales/ru.activerecord.yml | 4 ++-- config/locales/simple_form.en.yml | 4 ++-- config/locales/simple_form.ru.yml | 4 ++-- db/migrate/20231208110758_add_columns_to_resume.rb | 4 ++-- test/factories/resumes.rb | 4 ++-- test/factories/sequences.rb | 2 +- test/fixtures/resumes.yml | 8 ++++---- 14 files changed, 34 insertions(+), 34 deletions(-) diff --git a/app/forms/web/account/resume_form.rb b/app/forms/web/account/resume_form.rb index a1510c247..2ffef5912 100644 --- a/app/forms/web/account/resume_form.rb +++ b/app/forms/web/account/resume_form.rb @@ -19,8 +19,8 @@ class Web::Account::ResumeForm < Resume relocation skill_list direction_list - about_me - projects + about_my_self + project_descriptions ] nested_attrs = { diff --git a/app/forms/web/admin/resume_form.rb b/app/forms/web/admin/resume_form.rb index 9f6a2e2e8..805bcd618 100644 --- a/app/forms/web/admin/resume_form.rb +++ b/app/forms/web/admin/resume_form.rb @@ -19,8 +19,8 @@ class Web::Admin::ResumeForm < Resume relocation skill_list direction_list - about_me - projects + about_my_self + project_descriptions ] nested_attrs = { diff --git a/app/services/resume_auto_answer_service.rb b/app/services/resume_auto_answer_service.rb index 163d6dae0..a91bbc60e 100644 --- a/app/services/resume_auto_answer_service.rb +++ b/app/services/resume_auto_answer_service.rb @@ -32,7 +32,7 @@ def prepare_resume(resume) resume_content = resume .serializable_hash(except: %i[hexlet_url awards_description]) .deep_symbolize_keys - .slice(:name, :summary, :projects, :about_me, :skills_description, :contact_phone, :contact_email) + .slice(:name, :summary, :project_descriptions, :about_my_self, :skills_description, :contact_phone, :contact_email) .values .join('\n') work_content = resume.works.reduce('') do |acc, work| diff --git a/app/views/web/resumes/_information.html.slim b/app/views/web/resumes/_information.html.slim index 426516cc7..f25995d72 100644 --- a/app/views/web/resumes/_information.html.slim +++ b/app/views/web/resumes/_information.html.slim @@ -49,12 +49,12 @@ b = han('resume', 'skills_description') .col-sm-9.hexlet-cv-content == markdown2html @resume.skills_description -- if @resume.projects +- if @resume.project_descriptions .row.mb-3 .col-sm-3 - b = han('resume', 'projects') + b = han('resume', 'project_descriptions') .col-sm-9.hexlet-cv-content - == markdown2html @resume.projects + == markdown2html @resume.project_descriptions - if @resume_works.any? .d-flex @@ -98,7 +98,7 @@ .row.mb-3 .col-sm-3 - b = han('resume', 'about_me') + b = han('resume', 'about_my_self') .col-sm-9.hexlet-cv-content - if @resume.relocation && !@resume.relocation_not_specified? = @resume.relocation_text @@ -110,4 +110,4 @@ = "#{han('resume', 'city')} #{@resume.city}" br - == markdown2html @resume.about_me + == markdown2html @resume.about_my_self diff --git a/app/views/web/resumes/pdfs/base.slim b/app/views/web/resumes/pdfs/base.slim index a4a288b58..b63892ca3 100644 --- a/app/views/web/resumes/pdfs/base.slim +++ b/app/views/web/resumes/pdfs/base.slim @@ -54,12 +54,12 @@ .col-12.hexlet-cv-content.lead == markdown2html resource_resume.skills_description - - if resource_resume.projects + - if resource_resume.project_descriptions .col-12 - h2.my-4 = han('resume', 'projects') + h2.my-4 = han('resume', 'project_descriptions') hr.w-100 .col-12.hexlet-cv-content.lead - == markdown2html resource_resume.projects + == markdown2html resource_resume.project_descriptions - if @resume_works.any? .col-12 @@ -100,7 +100,7 @@ = education.end_date.to_formatted_s(:month_and_year) .col-12 - h2.my-4 = han('resume', 'about_me') + h2.my-4 = han('resume', 'about_my_self') hr.w-100 .col-12.hexlet-cv-content.lead - if resource_resume.relocation && !resource_resume.relocation_not_specified? @@ -113,4 +113,4 @@ = resource_resume.city br - == markdown2html resource_resume.about_me + == markdown2html resource_resume.about_my_self diff --git a/app/views/web/shared/_resume_form.html.slim b/app/views/web/shared/_resume_form.html.slim index 789c8a088..3d0eb51c9 100644 --- a/app/views/web/shared/_resume_form.html.slim +++ b/app/views/web/shared/_resume_form.html.slim @@ -33,7 +33,7 @@ .mb-3 = f.input :skills_description, input_html: { rows: 5 } .mb-3 - = f.input :projects, as: :text, input_html: { rows: 10 } + = f.input :project_descriptions, as: :text, input_html: { rows: 10 } h3 = t('.additionally') a.btn.btn-primary.btn-sm[data-bs-toggle="collapse" href="#collapse-additionally" role="button" aria-expanded="false"] span.bi.bi-patch-plus.me-1 @@ -45,7 +45,7 @@ .mb-3 = f.input :english_fluency .mb-3 - = f.input :about_me, input_html: { rows: 10 } + = f.input :about_my_self, input_html: { rows: 10 } .mb-3 = f.input :skill_list, input_html: { value: f.object.skill_list.to_s } .mb-3 diff --git a/config/locales/en.activerecord.yml b/config/locales/en.activerecord.yml index 3d7567c0d..0f2a24538 100644 --- a/config/locales/en.activerecord.yml +++ b/config/locales/en.activerecord.yml @@ -138,8 +138,8 @@ en: state/archived: Archived skill_list: Skill tags direction_list: Direction - projects: Projects - about_me: About me + project_descriptions: Project descriptions + about_my_self: About me errors: models: resume: diff --git a/config/locales/ru.activerecord.yml b/config/locales/ru.activerecord.yml index 5feb98d5b..f3f1efadb 100644 --- a/config/locales/ru.activerecord.yml +++ b/config/locales/ru.activerecord.yml @@ -130,8 +130,8 @@ ru: state/archived: В архиве skill_list: Тэги навыков direction_list: Направление - projects: Проекты - about_me: О себе + project_descriptions: Описания проектов + about_my_self: О себе resume/answer: content: Ответ applying_state/pending: Ожидает подтверждения diff --git a/config/locales/simple_form.en.yml b/config/locales/simple_form.en.yml index 9104aa040..35b8d273c 100644 --- a/config/locales/simple_form.en.yml +++ b/config/locales/simple_form.en.yml @@ -73,9 +73,9 @@ en: career: description: *markdown_tips resume: - projects: Indicate the projects in which you participated + project_descriptions: Indicate the projects in which you participated summary: *markdown_tips - about_me: *markdown_tips + about_my_self: *markdown_tips skills_description: *markdown_tips city: Specify the city of your residence direction_list: | diff --git a/config/locales/simple_form.ru.yml b/config/locales/simple_form.ru.yml index 6bfa0df51..e03155352 100644 --- a/config/locales/simple_form.ru.yml +++ b/config/locales/simple_form.ru.yml @@ -91,8 +91,8 @@ ru: experience_description: *markdown_tips about_company: *markdown_tips about_project: *markdown_tips - about_me: *markdown_tips - projects: Укажите проекты в которых вы участвовали(Учебные или opensource) + about_my_self: *markdown_tips + project_descriptions: Укажите проекты в которых вы участвовали(Учебные или opensource) educations: description: Специальность, учебное заведение, ... works: diff --git a/db/migrate/20231208110758_add_columns_to_resume.rb b/db/migrate/20231208110758_add_columns_to_resume.rb index 3767d9f47..18101a4c4 100644 --- a/db/migrate/20231208110758_add_columns_to_resume.rb +++ b/db/migrate/20231208110758_add_columns_to_resume.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true class AddColumnsToResume < ActiveRecord::Migration[7.0] def change - add_column :resumes, :about_me, :text - add_column :resumes, :projects, :text + add_column :resumes, :about_my_self, :text + add_column :resumes, :project_descriptions, :text end end diff --git a/test/factories/resumes.rb b/test/factories/resumes.rb index eb8334b2a..b560901bb 100644 --- a/test/factories/resumes.rb +++ b/test/factories/resumes.rb @@ -8,8 +8,8 @@ github_url contact contact_email { 'test@emil.com' } - projects - about_me + project_descriptions + about_my_self english_fluency { :fluent } works_attributes do diff --git a/test/factories/sequences.rb b/test/factories/sequences.rb index 43164b1b3..13078e06c 100644 --- a/test/factories/sequences.rb +++ b/test/factories/sequences.rb @@ -29,7 +29,7 @@ Faker::Lorem.paragraph_by_chars(number: 200) end - sequence :description, aliases: %i[skills_description about_me projects] do |_n| + sequence :description, aliases: %i[skills_description about_my_self project_descriptions] do |_n| Faker::Lorem.paragraph_by_chars(number: 300) end diff --git a/test/fixtures/resumes.yml b/test/fixtures/resumes.yml index b67dca55e..ce14f2e18 100644 --- a/test/fixtures/resumes.yml +++ b/test/fixtures/resumes.yml @@ -8,8 +8,8 @@ DEFAULTS: &DEFAULTS contact_email: $LABEL@email.com english_fluency: fluent skills_description: <%= Faker::Lorem.paragraph %> - projects: <%= Faker::Lorem.paragraph %> - about_me: <%= Faker::Lorem.paragraph %> + project_descriptions: <%= Faker::Lorem.paragraph %> + about_my_self: <%= Faker::Lorem.paragraph %> summary: <%= Faker::Lorem.paragraph_by_chars(number: 400) %> state: published evaluated_ai_state: not_evaluated @@ -50,8 +50,8 @@ full: <<: *DEFAULTS user: full name: Инженер-Программист - about_me: Хороший программист - projects: | + about_my_self: Хороший программист + project_descriptions: | Выполненные проекты: 1. Игры разума - набор из пяти консольных игр, выполняющих математические операции. Стек технологий: JavaScript, Node.js, ESLint, Git, Github