Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • This project
    • Loading...
  • Sign in / Register
V
VenJob
  • Overview
    • Overview
    • Details
    • Activity
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 0
    • Issues 0
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Mai Hoang Thai Ha
  • VenJob
  • Merge Requests
  • !11

Merged
Opened Aug 11, 2021 by Mai Hoang Thai Ha@hamht 
  • Report abuse
Report abuse

Feature apply job

From Task/12_apply_page_ID5/confirm_page_ID6/Done_page/ID7 into master

Edited Aug 16, 2021 by Mai Hoang Thai Ha
×

Check out, review, and merge locally

Step 1. Fetch and check out the branch for this merge request

git fetch origin
git checkout -b Task/12_apply_page_ID5/confirm_page_ID6/Done_page/ID7 origin/Task/12_apply_page_ID5/confirm_page_ID6/Done_page/ID7

Step 2. Review the changes locally

Step 3. Merge the branch and fix any conflicts that come up

git checkout master
git merge --no-ff Task/12_apply_page_ID5/confirm_page_ID6/Done_page/ID7

Step 4. Push the result of the merge to GitLab

git push origin master

Note that pushing to GitLab requires write access to this repository.

Tip: You can also checkout merge requests locally by following these guidelines.

  • Discussion 39
  • Commits 23
  • Changes 31
{{ resolvedDiscussionCount }}/{{ discussionCount }} {{ resolvedCountText }} resolved
  • Mai Hoang Thai Ha @hamht

    added 1 commit

    • 5e079295 - fixed controller, add ribbon

    Compare with previous version

    Aug 11, 2021

    added 1 commit

    • 5e079295 - fixed controller, add ribbon

    Compare with previous version

    added 1 commit * 5e079295 - fixed controller, add ribbon [Compare with previous version](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/11/diffs?diff_id=5404&start_sha=a92c2bab1b53ced46ddddeebd0cf32675691948e)
    Toggle commit list
  • Mai Hoang Thai Ha @hamht

    added 25 commits

    • 5e079295...c2fd5587 - 24 commits from branch master
    • 0c43ff2c - merge master to branch task 12

    Compare with previous version

    Aug 11, 2021

    added 25 commits

    • 5e079295...c2fd5587 - 24 commits from branch master
    • 0c43ff2c - merge master to branch task 12

    Compare with previous version

    added 25 commits * 5e079295...c2fd5587 - 24 commits from branch `master` * 0c43ff2c - merge master to branch task 12 [Compare with previous version](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/11/diffs?diff_id=5406&start_sha=5e0792952205cf2cc40133e9b13465b0b5ed89c3)
    Toggle commit list
  • Mai Hoang Thai Ha @hamht

    added 1 commit

    • c12a3114 - gem

    Compare with previous version

    Aug 11, 2021

    added 1 commit

    • c12a3114 - gem

    Compare with previous version

    added 1 commit * c12a3114 - gem [Compare with previous version](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/11/diffs?diff_id=5407&start_sha=0c43ff2c4d5aeb3a6a981a776d44ba9749bf366b)
    Toggle commit list
  • Mai Hoang Thai Ha @hamht

    added 1 commit

    • 312452e1 - fixed conflict

    Compare with previous version

    Aug 11, 2021

    added 1 commit

    • 312452e1 - fixed conflict

    Compare with previous version

    added 1 commit * 312452e1 - fixed conflict [Compare with previous version](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/11/diffs?diff_id=5408&start_sha=c12a31140429cd22e614eeea7321afc21b4da435)
    Toggle commit list
  • Mai Hoang Thai Ha @hamht

    added 1 commit

    • 3926645e - complete merge master to this branch

    Compare with previous version

    Aug 11, 2021

    added 1 commit

    • 3926645e - complete merge master to this branch

    Compare with previous version

    added 1 commit * 3926645e - complete merge master to this branch [Compare with previous version](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/11/diffs?diff_id=5409&start_sha=312452e188a4a9a17d9ff587557ed1a401a141e2)
    Toggle commit list
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 11, 2021
    Resolved by Mai Hoang Thai Ha Aug 11, 2021
    app/assets/stylesheets/applies.scss 0 → 100644
    1 // Place all the styles related to the Applies controller here.
    2 // They will automatically be included in application.css.
    3 // You can use Sass (SCSS) here: https://sass-lang.com/
    4 .label {
    5 font-size: 20px;
    6 color: black;
    7 }
    8
    9 .ribbon{
    10 font-weight: 400;
    11 line-height: 1.5;
    12 color: #212529;
    13 display: flex;
    14 .item {
    15 display: inline-flex;
    16 -ms-flex-wrap: wrap;
    • phuctmZigexn @phuctm commented Aug 11, 2021
      Master

      chỗ này bị sai indentation nè. sửa lại indentation của file này nha

      Edited Aug 11, 2021 by phuctmZigexn
      chỗ này bị sai indentation nè. sửa lại indentation của file này nha
    • Mai Hoang Thai Ha @hamht

      changed this line in version 7 of the diff

      Aug 11, 2021

      changed this line in version 7 of the diff

      changed this line in [version 7 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/11/diffs?diff_id=5410&start_sha=3926645edcf947a94afa876b776e4ebe891109ee#f006639c5db8545e11e8c4722025955c6141d1a7_16_16)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 11, 2021
    Resolved by Mai Hoang Thai Ha Aug 12, 2021
    app/controllers/applies_controller.rb 0 → 100644
    4 def create
    5 @user = User.find_by(id: 1)
    6 @apply = @job.apply_jobs.build(apply_params)
    7 @apply.user_id = @user.id
    8 @apply.cv.attach(params[:apply_job][:cv])
    9
    10 if @apply.save
    11 UserMailer.apply_job(@user, @job, @apply).deliver_now
    12 flash.now[:info] = 'Job application information has been sent to your email'
    13 else
    14 render 'new'
    15 end
    16 end
    17
    18 def new
    19 @job = Job.find_by(id: params[:job_id])
    • phuctmZigexn @phuctm commented Aug 11, 2021
      Master

      @job = Job.find_by(id: params[:job_id])

      Sao em ko dùng load_job cho action này?

      Edited Aug 11, 2021 by phuctmZigexn
      `@job = Job.find_by(id: params[:job_id])` Sao em ko dùng `load_job` cho action này?
    • Mai Hoang Thai Ha @hamht

      changed this line in version 10 of the diff

      Aug 12, 2021

      changed this line in version 10 of the diff

      changed this line in [version 10 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/11/diffs?diff_id=5415&start_sha=41dfcb2e87dab110b194765e9a9c753a87c78826#d9c45092651a193b7c63a6a3b87ae6db5b912ec9_5_5)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 11, 2021
    Resolved by Mai Hoang Thai Ha Aug 11, 2021
    app/controllers/applies_controller.rb 0 → 100644
    13 else
    14 render 'new'
    15 end
    16 end
    17
    18 def new
    19 @job = Job.find_by(id: params[:job_id])
    20 @apply = @job.apply_jobs.build
    21 end
    22
    23 def confirm
    24 @user = User.find_by(id: 1)
    25 @apply = @job.apply_jobs.build(apply_params)
    26 @apply.user_id = @user.id
    27
    28 if @apply.valid?
    • phuctmZigexn @phuctm commented Aug 11, 2021
      Master
      if @apply.valid?
        @name = @apply.user_name
        @email = @apply.email
        @cv = @apply.cv
        @job_id = @apply.job_id
      else
        render 'new'
      end

      đoạn này xử lý khá dư, em dùng hẳn luôn biến @apply để đưa ra view, đâu nhất thiết phải gán từng value vào từng biến như vậy. Và sửa chỗ này lại cho hợp lí nhé.

      ```ruby if @apply.valid? @name = @apply.user_name @email = @apply.email @cv = @apply.cv @job_id = @apply.job_id else render 'new' end ``` đoạn này xử lý khá dư, em dùng hẳn luôn biến `@apply` để đưa ra view, đâu nhất thiết phải gán từng value vào từng biến như vậy. Và sửa chỗ này lại cho hợp lí nhé.
    • Mai Hoang Thai Ha @hamht

      changed this line in version 7 of the diff

      Aug 11, 2021

      changed this line in version 7 of the diff

      changed this line in [version 7 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/11/diffs?diff_id=5410&start_sha=3926645edcf947a94afa876b776e4ebe891109ee#d9c45092651a193b7c63a6a3b87ae6db5b912ec9_28_14)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 11, 2021
    Resolved by Mai Hoang Thai Ha Aug 11, 2021
    app/models/apply_job.rb
    1 1 class ApplyJob < ApplicationRecord
    2 VALID_EMAIL_REGEX = /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i
    3
    2 4 belongs_to :job
    3 5 belongs_to :user
    4 6 has_one_attached :cv
    7
    8 validates :user_name, presence: true, length: { maximum: 50 }
    9 validates :email, presence: true, length: { maximum: 255 },
    10 format: { with: VALID_EMAIL_REGEX }
    11 validates :cv, presence: true,
    • phuctmZigexn @phuctm commented Aug 11, 2021
      Master
        validates :cv,        presence: true,
                              content_type:  {  in: %w[application/pdf application/msword application/zip application/xls application/xlsx],
                                                message: 'must be a valid cv format' },
                              size:          {  less_than: 5.megabytes,
                                                message: 'should be less than 5MB' }

      đoạn này bị dính code style nha.

      ```ruby validates :cv, presence: true, content_type: { in: %w[application/pdf application/msword application/zip application/xls application/xlsx], message: 'must be a valid cv format' }, size: { less_than: 5.megabytes, message: 'should be less than 5MB' } ``` đoạn này bị dính code style nha.
    • Mai Hoang Thai Ha @hamht

      changed this line in version 7 of the diff

      Aug 11, 2021

      changed this line in version 7 of the diff

      changed this line in [version 7 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/11/diffs?diff_id=5410&start_sha=3926645edcf947a94afa876b776e4ebe891109ee#062f142b54fd37c3e89f3ca1e264db59f9c0d9e3_11_11)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 11, 2021
    Resolved by Mai Hoang Thai Ha Aug 11, 2021
    app/assets/stylesheets/applies.scss 0 → 100644
    1 // Place all the styles related to the Applies controller here.
    2 // They will automatically be included in application.css.
    3 // You can use Sass (SCSS) here: https://sass-lang.com/
    4 .label {
    5 font-size: 20px;
    6 color: black;
    7 }
    8
    9 .ribbon{
    • phuctmZigexn @phuctm commented Aug 11, 2021
      Master

      code style

      code style
    • phuctmZigexn @phuctm commented Aug 11, 2021
      Master

      .ribbon{ thiếu space nè

      `.ribbon{` thiếu space nè
    • Mai Hoang Thai Ha @hamht

      changed this line in version 7 of the diff

      Aug 11, 2021

      changed this line in version 7 of the diff

      changed this line in [version 7 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/11/diffs?diff_id=5410&start_sha=3926645edcf947a94afa876b776e4ebe891109ee#f006639c5db8545e11e8c4722025955c6141d1a7_9_9)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 11, 2021
    Resolved by Mai Hoang Thai Ha Aug 11, 2021
    app/assets/stylesheets/applies.scss 0 → 100644
    53 }
    54 .current-page {
    55 color: #0d6efd;
    56 .circle {
    57 background: #0d6efd;
    58 }
    59
    60 }
    61 .line {
    62 flex: 1 0 32px;
    63 min-width: 1px;
    64 min-height: 1px;
    65 margin: auto;
    66 background-color: rgba(0,0,0,.12);
    67 }
    68 }
    • phuctmZigexn @phuctm commented Aug 11, 2021
      Master

      \ No newline at end of file

      `\ No newline at end of file`
    • Mai Hoang Thai Ha @hamht

      changed this line in version 7 of the diff

      Aug 11, 2021

      changed this line in version 7 of the diff

      changed this line in [version 7 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/11/diffs?diff_id=5410&start_sha=3926645edcf947a94afa876b776e4ebe891109ee#f006639c5db8545e11e8c4722025955c6141d1a7_68_67)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 11, 2021
    Resolved by Mai Hoang Thai Ha Aug 12, 2021
    app/controllers/applies_controller.rb 0 → 100644
    26 @apply.user_id = @user.id
    27
    28 if @apply.valid?
    29 @name = @apply.user_name
    30 @email = @apply.email
    31 @cv = @apply.cv
    32 @job_id = @apply.job_id
    33 else
    34 render 'new'
    35 end
    36 end
    37
    38 private
    39
    40 def load_job
    41 @job = Job.find_by(id: params[:apply_job][:job_id])
    • phuctmZigexn @phuctm commented Aug 11, 2021
      Master

      Nếu không tìm thấy job thì sao?

      Nếu không tìm thấy `job` thì sao?
    • Mai Hoang Thai Ha @hamht

      changed this line in version 10 of the diff

      Aug 12, 2021

      changed this line in version 10 of the diff

      changed this line in [version 10 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/11/diffs?diff_id=5415&start_sha=41dfcb2e87dab110b194765e9a9c753a87c78826#d9c45092651a193b7c63a6a3b87ae6db5b912ec9_34_31)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 11, 2021
    Resolved by Mai Hoang Thai Ha Aug 11, 2021
    app/views/applies/new.html.slim 0 → 100644
    1 - provide(:title, 'Apply job')
    2 .container
    3 =render 'ribbon'
    4 .container
    5 h1.my-5.text-center
    6 | Apply for
    • phuctmZigexn @phuctm commented Aug 11, 2021
      Master

      Chỗ này để là Apply form mà

      Requirement

      Chỗ này để là `Apply form` mà [Requirement](https://docs.google.com/spreadsheets/d/1n1OJiih1xkys1L2wZnV4bHZVxRr_80bEnsewm4EcZVI/edit#gid=1308152298&range=E37)
    • Mai Hoang Thai Ha @hamht

      changed this line in version 7 of the diff

      Aug 11, 2021

      changed this line in version 7 of the diff

      changed this line in [version 7 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/11/diffs?diff_id=5410&start_sha=3926645edcf947a94afa876b776e4ebe891109ee#d156f08f11b8a816273f399b33c4fdb59dddb2c3_6_6)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on the diff Aug 11, 2021
    Resolved by Mai Hoang Thai Ha Aug 11, 2021
    app/controllers/applies_controller.rb 0 → 100644
    1 class AppliesController < ApplicationController
    2 before_action :load_job, only: %i[confirm create]
    3
    • phuctmZigexn @phuctm commented Aug 11, 2021
      Master

      Em sắp xếp lại thứ tự của các actions lại nhé.

      The "official" order (as generated by the rails scaffold) is the following
      
      index, show, new, edit, create, update, destroy

      Trường hợp của controller này thì sẽ là

      new (apply) > confirm (confirm) > create (Done)

      Em sắp xếp lại **thứ tự của các actions** lại nhé. ``` The "official" order (as generated by the rails scaffold) is the following index, show, new, edit, create, update, destroy ``` Trường hợp của controller này thì sẽ là `new` (apply) > `confirm` (confirm) > `create` (Done)
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 11, 2021
    Resolved by Mai Hoang Thai Ha Aug 11, 2021
    app/views/jobs/_job_details.html.slim 0 → 100644
    1 .job-detail.my5
    • phuctmZigexn @phuctm commented Aug 11, 2021
      Master

      file này để làm gì vậy em?

      file này để làm gì vậy em?
    • Mai Hoang Thai Ha @hamht

      changed this line in version 7 of the diff

      Aug 11, 2021

      changed this line in version 7 of the diff

      changed this line in [version 7 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/11/diffs?diff_id=5410&start_sha=3926645edcf947a94afa876b776e4ebe891109ee#b813f3149d4b2376359e3c67a5c8eab3ee9e703a_1_0)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 11, 2021
    Resolved by Mai Hoang Thai Ha Aug 11, 2021
    app/views/applies/new.html.slim 0 → 100644
    6 | Apply for
    7 = @job.title
    8 .col
    9 = form_with(model: @apply, scope: :apply_job, url: confirm_path, local: true) do |f|
    10 = render 'shared/error_messages', object: f.object
    11 .mb-5
    12 = f.hidden_field :job_id, value: @job.id, class: 'form-control'
    13
    14 = f.label :user_name, 'Full name', class: 'form-label label'
    15 = f.text_field :user_name, class: 'form-control'
    16 .mb-5
    17 = f.label :email, class: 'form-label label'
    18 = f.text_field :email, class: 'form-control'
    19 .mb-5
    20 span.label
    21 = f.file_field :cv, accept: 'application/pdf, application/msword, application/zip, application/xls, application/xlsx'
    • phuctmZigexn @phuctm commented Aug 11, 2021
      Master

      accept: 'application/pdf, application/msword, application/zip, application/xls, application/xlsx'

      Có cần thiết không? Mình validate ở model rồi mà ta

      `accept: 'application/pdf, application/msword, application/zip, application/xls, application/xlsx'` Có cần thiết không? Mình validate ở model rồi mà ta
    • Mai Hoang Thai Ha @hamht

      changed this line in version 8 of the diff

      Aug 12, 2021

      changed this line in version 8 of the diff

      changed this line in [version 8 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/11/diffs?diff_id=5411&start_sha=4362da428481f2398063db79d7ef5c6fa7729c64#d156f08f11b8a816273f399b33c4fdb59dddb2c3_23_25)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 11, 2021
    Resolved by Mai Hoang Thai Ha Aug 11, 2021
    app/views/shared/_error_messages.html.slim 0 → 100644
    1 - if object.errors.any?
    2 #error_explanation.bg_danger
    3 .alert.alert-danger
    4 | The form contains
    5 = pluralize(object.errors.count, "error")
    6 ul.mb-3
    7 - object.errors.full_messages.each do |msg|
    8 li.text-danger
    9 = msg
    • phuctmZigexn @phuctm commented Aug 11, 2021
      Master

      No newline at end of file

      `No newline at end of file`
    • Mai Hoang Thai Ha @hamht

      changed this line in version 7 of the diff

      Aug 11, 2021

      changed this line in version 7 of the diff

      changed this line in [version 7 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/11/diffs?diff_id=5410&start_sha=3926645edcf947a94afa876b776e4ebe891109ee#0bd547941bbaf5fd8f210675662eefe2aa4d7fb6_9_9)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 11, 2021
    Resolved by Mai Hoang Thai Ha Aug 11, 2021
    app/views/user_mailer/apply_job.html.slim 0 → 100644
    1 h1 VenJob
    2 p
    3 | Dear #{@user.name},
    4 p Thank you for applied with VenJOB. Your applied job's information is as follow:
    5 p
    6 | Job title: #{@job.title}
    7 p
    8 | Location:
    9 - @job.cities.each do |city|
    10 span= city.name
    • phuctmZigexn @phuctm commented Aug 11, 2021
      Master

      Kiểm tra lại phần view chỗ Location này nha. Nó có cùng 1 hàng không hay là xuống hàng?

      Kiểm tra lại phần view chỗ Location này nha. Nó có cùng 1 hàng không hay là xuống hàng?
    • Mai Hoang Thai Ha @hamht

      changed this line in version 7 of the diff

      Aug 11, 2021

      changed this line in version 7 of the diff

      changed this line in [version 7 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/11/diffs?diff_id=5410&start_sha=3926645edcf947a94afa876b776e4ebe891109ee#3154879a31320bbb71f9821825a85bd4eefc46e5_10_9)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 11, 2021
    Resolved by Mai Hoang Thai Ha Aug 11, 2021
    yarn.lock
    1609 1609 escalade "^3.1.1"
    1610 1610 node-releases "^1.1.71"
    1611 1611
    1612 bs-stepper@^1.7.0:
    • phuctmZigexn @phuctm commented Aug 11, 2021
      Master

      Này là gì vậy Hà?

      Này là gì vậy Hà?
    • Mai Hoang Thai Ha @hamht

      changed this line in version 7 of the diff

      Aug 11, 2021

      changed this line in version 7 of the diff

      changed this line in [version 7 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/11/diffs?diff_id=5410&start_sha=3926645edcf947a94afa876b776e4ebe891109ee#53585a096fe3a3b96321113856ae62602995a33b_1612_1612)
      Toggle commit list
    Please register or sign in to reply
  • Mai Hoang Thai Ha @hamht

    added 1 commit

    • 4362da42 - fixed review part 1

    Compare with previous version

    Aug 11, 2021

    added 1 commit

    • 4362da42 - fixed review part 1

    Compare with previous version

    added 1 commit * 4362da42 - fixed review part 1 [Compare with previous version](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/11/diffs?diff_id=5410&start_sha=3926645edcf947a94afa876b776e4ebe891109ee)
    Toggle commit list
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 12, 2021
    Resolved by Mai Hoang Thai Ha Aug 12, 2021
    app/views/applies/new.html.slim 0 → 100644
    1 - provide(:title, 'Apply job')
    2 .container
    3 =render 'ribbon'
    • phuctmZigexn @phuctm commented Aug 12, 2021
      Master

      =render 'ribbon' thiếu space nè em

      `=render 'ribbon'` thiếu space nè em
    • Mai Hoang Thai Ha @hamht

      changed this line in version 9 of the diff

      Aug 12, 2021

      changed this line in version 9 of the diff

      changed this line in [version 9 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/11/diffs?diff_id=5413&start_sha=a31c35bede4dcadf4a1d637c7acb95c70de3899d#d156f08f11b8a816273f399b33c4fdb59dddb2c3_3_3)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 12, 2021
    Resolved by Mai Hoang Thai Ha Aug 12, 2021
    app/views/applies/confirm.html.slim 0 → 100644
    1 - provide(:title, 'Confirmation')
    2
    3 .container
    4 =render 'ribbon'
    • phuctmZigexn @phuctm commented Aug 12, 2021
      Master

      =render 'ribbon' thiếu space nè em

      `=render 'ribbon'` thiếu space nè em
    • Mai Hoang Thai Ha @hamht

      changed this line in version 9 of the diff

      Aug 12, 2021

      changed this line in version 9 of the diff

      changed this line in [version 9 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/11/diffs?diff_id=5413&start_sha=a31c35bede4dcadf4a1d637c7acb95c70de3899d#5f30fa1925e387a2a337bd2a836b6c170b4469d1_4_4)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 12, 2021
    Resolved by Mai Hoang Thai Ha Aug 12, 2021
    app/views/applies/confirm.html.slim 0 → 100644
    1 - provide(:title, 'Confirmation')
    2
    3 .container
    4 =render 'ribbon'
    5
    6 .container
    7 h1.my-5.text-center
    8 | Confirm
    • phuctmZigexn @phuctm commented Aug 12, 2021
      Master
      | Confirm 
      = @job.title

      Sai requirement nha https://docs.google.com/spreadsheets/d/1n1OJiih1xkys1L2wZnV4bHZVxRr_80bEnsewm4EcZVI/edit#gid=1496227982&range=E36

      ```slim | Confirm = @job.title ``` Sai requirement nha https://docs.google.com/spreadsheets/d/1n1OJiih1xkys1L2wZnV4bHZVxRr_80bEnsewm4EcZVI/edit#gid=1496227982&range=E36
    • Mai Hoang Thai Ha @hamht

      changed this line in version 9 of the diff

      Aug 12, 2021

      changed this line in version 9 of the diff

      changed this line in [version 9 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/11/diffs?diff_id=5413&start_sha=a31c35bede4dcadf4a1d637c7acb95c70de3899d#5f30fa1925e387a2a337bd2a836b6c170b4469d1_8_8)
      Toggle commit list
    Please register or sign in to reply
  • Mai Hoang Thai Ha @hamht

    added 1 commit

    • a31c35be - design ribbon, fix UI form

    Compare with previous version

    Aug 12, 2021

    added 1 commit

    • a31c35be - design ribbon, fix UI form

    Compare with previous version

    added 1 commit * a31c35be - design ribbon, fix UI form [Compare with previous version](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/11/diffs?diff_id=5411&start_sha=4362da428481f2398063db79d7ef5c6fa7729c64)
    Toggle commit list
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 12, 2021
    Resolved by Mai Hoang Thai Ha Aug 12, 2021
    app/models/apply_job.rb
    1 1 class ApplyJob < ApplicationRecord
    2 VALID_EMAIL_REGEX = /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i
    3
    2 4 belongs_to :job
    3 5 belongs_to :user
    4 6 has_one_attached :cv
    7
    8 validates :user_name, presence: true, length: { maximum: 50 }
    9 validates :email, presence: true, length: { maximum: 255 },
    10 format: { with: VALID_EMAIL_REGEX }
    11 validates :cv, presence: true, content_type:
    12 { in: %w[application/pdf application/msword application/zip application/xls application/xlsx],
    • phuctmZigexn @phuctm commented Aug 12, 2021
      Master

      %w[application/pdf application/msword application/zip application/xls application/xlsx]

      Em để cái này vào 1 biến constant đi cho dòng này ngắn lại.

      `%w[application/pdf application/msword application/zip application/xls application/xlsx]` Em để cái này vào 1 biến constant đi cho dòng này ngắn lại.
    • Mai Hoang Thai Ha @hamht

      changed this line in version 9 of the diff

      Aug 12, 2021

      changed this line in version 9 of the diff

      changed this line in [version 9 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/11/diffs?diff_id=5413&start_sha=a31c35bede4dcadf4a1d637c7acb95c70de3899d#062f142b54fd37c3e89f3ca1e264db59f9c0d9e3_12_13)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 12, 2021
    Resolved by Mai Hoang Thai Ha Aug 12, 2021
    app/controllers/applies_controller.rb 0 → 100644
    1 class AppliesController < ApplicationController
    2 before_action :load_job, only: %i[confirm create]
    3
    4 def new
    5 @job = Job.find_by(id: params[:job_id])
    6 @apply = @job.apply_jobs.build
    7 end
    8
    9 def confirm
    10 @user = User.find_by(id: 1)
    11 @apply = @job.apply_jobs.build(apply_params)
    12 @apply.user_id = @user.id
    13
    14 render 'new' unless @apply.valid?
    • phuctmZigexn @phuctm commented Aug 12, 2021
      Master

      unless @apply.valid? mình có thể viết cho suông là if @apply.invalid?

      https://api.rubyonrails.org/classes/ActiveModel/Validations.html#method-i-invalid-3F

      `unless @apply.valid?` mình có thể viết cho suông là `if @apply.invalid?` https://api.rubyonrails.org/classes/ActiveModel/Validations.html#method-i-invalid-3F
    • Mai Hoang Thai Ha @hamht

      changed this line in version 9 of the diff

      Aug 12, 2021

      changed this line in version 9 of the diff

      changed this line in [version 9 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/11/diffs?diff_id=5413&start_sha=a31c35bede4dcadf4a1d637c7acb95c70de3899d#d9c45092651a193b7c63a6a3b87ae6db5b912ec9_14_14)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 12, 2021
    Resolved by Mai Hoang Thai Ha Aug 12, 2021
    config/application.rb
    11 11 # Initialize configuration defaults for originally generated Rails version.
    12 12 config.load_defaults 6.1
    13 13
    14 config.to_prepare do
    • phuctmZigexn @phuctm commented Aug 12, 2021
      Master

      anh trên kìa em dùng helper được rồi mà vẫn giữ config này hả

      anh trên kìa em dùng helper được rồi mà vẫn giữ config này hả
    • Mai Hoang Thai Ha @hamht

      changed this line in version 9 of the diff

      Aug 12, 2021

      changed this line in version 9 of the diff

      changed this line in [version 9 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/11/diffs?diff_id=5413&start_sha=a31c35bede4dcadf4a1d637c7acb95c70de3899d#7ff7049c1c8745b54f0a9ef78996f60b38f36268_14_13)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 12, 2021
    Resolved by Mai Hoang Thai Ha Aug 12, 2021
    app/views/applies/new.html.slim 0 → 100644
    1 - provide(:title, 'Apply job')
    2 .container
    3 =render 'ribbon'
    4 .container
    5 h1.my-5.text-center
    6 | Apply form
    • phuctmZigexn @phuctm commented Aug 12, 2021
      Master

      Sai text nhá Apply form. Với lại để job title ở hàng dưới đi. Hiẹn tại em đang cho 2 thằng cùng 1 hàng đó.

      https://docs.google.com/spreadsheets/d/1n1OJiih1xkys1L2wZnV4bHZVxRr_80bEnsewm4EcZVI/edit#gid=1308152298&range=I13

      Sai text nhá `Apply form`. Với lại để job title ở hàng dưới đi. Hiẹn tại em đang cho 2 thằng cùng 1 hàng đó. https://docs.google.com/spreadsheets/d/1n1OJiih1xkys1L2wZnV4bHZVxRr_80bEnsewm4EcZVI/edit#gid=1308152298&range=I13
    • Mai Hoang Thai Ha @hamht

      changed this line in version 9 of the diff

      Aug 12, 2021

      changed this line in version 9 of the diff

      changed this line in [version 9 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/11/diffs?diff_id=5413&start_sha=a31c35bede4dcadf4a1d637c7acb95c70de3899d#d156f08f11b8a816273f399b33c4fdb59dddb2c3_6_6)
      Toggle commit list
    Please register or sign in to reply
  • Mai Hoang Thai Ha @hamht

    added 1 commit

    • 41dfcb2e - fixed review part 2

    Compare with previous version

    Aug 12, 2021

    added 1 commit

    • 41dfcb2e - fixed review part 2

    Compare with previous version

    added 1 commit * 41dfcb2e - fixed review part 2 [Compare with previous version](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/11/diffs?diff_id=5413&start_sha=a31c35bede4dcadf4a1d637c7acb95c70de3899d)
    Toggle commit list
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 12, 2021
    Resolved by Mai Hoang Thai Ha Aug 12, 2021
    app/views/applies/confirm.html.slim 0 → 100644
    19 = f.hidden_field :user_name, value: @apply.user_name, class: 'form-control'
    20
    21 .row.mb-5
    22 .col-2
    23 = f.label :email, 'Email:', class: 'form-label label'
    24 .col-10
    25 span.mx-2.label.form-control
    26 = @apply.email
    27 = f.hidden_field :email, value: @apply.email, class: 'form-control'
    28
    29 .row.mb-5
    30 .col-2
    31 / = f.hidden_field :cv, value: @apply.cv, class: 'form-control'
    32 = f.label :cv, 'Cv: ', class: 'form-label label'
    33 .col-10
    34 = f.file_field :cv, accept: 'application/pdf, application/msword, application/zip, application/xls, application/xlsx'
    • phuctmZigexn @phuctm commented Aug 12, 2021
      Master

      'application/pdf, application/msword, application/zip, application/xls, application/xlsx'

      chỗ này em thử dùng constant trong model xem.

      'application/pdf, application/msword, application/zip, application/xls, application/xlsx' chỗ này em thử dùng constant trong model xem.
    • Mai Hoang Thai Ha @hamht

      changed this line in version 12 of the diff

      Aug 16, 2021

      changed this line in version 12 of the diff

      changed this line in [version 12 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/11/diffs?diff_id=5417&start_sha=be7ba25039238289851a0603c71e1d50274a1c4f#5f30fa1925e387a2a337bd2a836b6c170b4469d1_33_33)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 12, 2021
    Resolved by Mai Hoang Thai Ha Aug 16, 2021
    app/views/applies/new.html.slim 0 → 100644
    1 - provide(:title, 'Apply job')
    2 .container
    3 = render 'ribbon'
    4 .container
    5 h1.my-5.text-center
    6 | Apply form
    • phuctmZigexn @phuctm commented Aug 12, 2021
      Master

      Apply form => Apply Form

      Edited Aug 16, 2021
      `Apply form` => `Apply Form`
    • Mai Hoang Thai Ha @hamht

      changed this line in version 17 of the diff

      Aug 16, 2021

      changed this line in version 17 of the diff

      changed this line in [version 17 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/11/diffs?diff_id=5425&start_sha=5ac7cef2ae9843069078b21800cf2f93c2986ce3#d156f08f11b8a816273f399b33c4fdb59dddb2c3_6_6)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 12, 2021
    Resolved by Mai Hoang Thai Ha Aug 12, 2021
    app/views/applies/new.html.slim 0 → 100644
    1 - provide(:title, 'Apply job')
    2 .container
    3 = render 'ribbon'
    4 .container
    5 h1.my-5.text-center
    6 | Apply form
    7 p.fs-5.fw-bold.mb-4.text-center
    8 | Apply for
    • phuctmZigexn @phuctm commented Aug 12, 2021
      Master

      | Apply for => bỏ dòng này luôn đi em

      `| Apply for` => bỏ dòng này luôn đi em
    • Mai Hoang Thai Ha @hamht

      changed this line in version 10 of the diff

      Aug 12, 2021

      changed this line in version 10 of the diff

      changed this line in [version 10 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/11/diffs?diff_id=5415&start_sha=41dfcb2e87dab110b194765e9a9c753a87c78826#d156f08f11b8a816273f399b33c4fdb59dddb2c3_8_8)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 12, 2021
    Resolved by Mai Hoang Thai Ha Aug 12, 2021
    app/views/applies/new.html.slim 0 → 100644
    1 - provide(:title, 'Apply job')
    2 .container
    3 = render 'ribbon'
    4 .container
    5 h1.my-5.text-center
    6 | Apply form
    7 p.fs-5.fw-bold.mb-4.text-center
    8 | Apply for
    9 = @job.title
    10 .col
    11 = form_with(model: @apply, url: confirm_path, local: true) do |f|
    12 = render 'shared/error_messages', object: f.object
    13 .row.mb-5
    14 = f.hidden_field :job_id, value: @job.id, class: 'form-control'
    • phuctmZigexn @phuctm commented Aug 12, 2021
      Master

      hidden_field rồi cần gì class: 'form-control' nữa em

      hidden_field rồi cần gì `class: 'form-control'` nữa em
    • Mai Hoang Thai Ha @hamht

      changed this line in version 10 of the diff

      Aug 12, 2021

      changed this line in version 10 of the diff

      changed this line in [version 10 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/11/diffs?diff_id=5415&start_sha=41dfcb2e87dab110b194765e9a9c753a87c78826#d156f08f11b8a816273f399b33c4fdb59dddb2c3_14_13)
      Toggle commit list
    Please register or sign in to reply
  • Mai Hoang Thai Ha @hamht

    resolved all discussions

    Aug 12, 2021

    resolved all discussions

    resolved all discussions
    Toggle commit list
  • Mai Hoang Thai Ha @hamht

    added 1 commit

    • 24d4089f - fixed review p3, add job not found

    Compare with previous version

    Aug 12, 2021

    added 1 commit

    • 24d4089f - fixed review p3, add job not found

    Compare with previous version

    added 1 commit * 24d4089f - fixed review p3, add job not found [Compare with previous version](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/11/diffs?diff_id=5415&start_sha=41dfcb2e87dab110b194765e9a9c753a87c78826)
    Toggle commit list
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 14, 2021
    Resolved by Mai Hoang Thai Ha Aug 16, 2021
    app/assets/stylesheets/applies.scss 0 → 100644
    1 $bg-primary: #0d6efd;
    • phuctmZigexn @phuctm commented Aug 14, 2021
      Master
      $bg-primary: #0d6efd;
      $text-color-white: #fff;

      trong bootstrap có 1 file là _variables.scss dùng để lưu các màu này nọ vào biến giống cách em làm. Em tham khảo trong này những biến nào đã có rồi thì dùng luôn. Không cần phải custom chi nữa. Còn nếu em muốn add thêm thì tạo ra 1 file tương tự như bootstrap _variables.scss

      https://github.com/twbs/bootstrap/blob/main/scss/_variables.scss

      ```scss $bg-primary: #0d6efd; $text-color-white: #fff; ``` trong bootstrap có 1 file là `_variables.scss` dùng để lưu các màu này nọ vào biến giống cách em làm. Em tham khảo trong này những biến nào đã có rồi thì dùng luôn. Không cần phải custom chi nữa. Còn nếu em muốn add thêm thì tạo ra 1 file tương tự như bootstrap `_variables.scss` https://github.com/twbs/bootstrap/blob/main/scss/_variables.scss
    • Mai Hoang Thai Ha @hamht

      changed this line in version 12 of the diff

      Aug 16, 2021

      changed this line in version 12 of the diff

      changed this line in [version 12 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/11/diffs?diff_id=5417&start_sha=be7ba25039238289851a0603c71e1d50274a1c4f#f006639c5db8545e11e8c4722025955c6141d1a7_1_1)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 14, 2021
    Resolved by Mai Hoang Thai Ha Aug 16, 2021
    app/views/applies/new.html.slim 0 → 100644
    14 .col-2
    15 = f.label :user_name, 'Full name', class: 'form-label label'
    16 .col-10
    17 = f.text_field :user_name, class: 'form-control'
    18 .row.mb-5
    19 .col-2
    20 = f.label :email, class: 'form-label label'
    21 .col-10
    22 = f.text_field :email, class: 'form-control'
    23 .row.mb-5
    24 / - if @user.cv.attached?
    25 / = url_for(@user.cv)
    26 .col-2
    27 = f.label :cv, class: 'form-label label'
    28 .col-10
    29 = f.file_field :cv, accept: 'application/pdf, application/msword, application/zip, application/xls, application/xlsx', class: 'form-control'
    • phuctmZigexn @phuctm commented Aug 14, 2021
      Master

      'application/pdf, application/msword, application/zip, application/xls, application/xlsx'

      Cái này giống với constant ACCEPT_CONTENT_TYPE trong model. Em dùng constant có sẵn nhé.

      `'application/pdf, application/msword, application/zip, application/xls, application/xlsx'` Cái này giống với constant `ACCEPT_CONTENT_TYPE` trong model. Em dùng constant có sẵn nhé.
    • Mai Hoang Thai Ha @hamht

      changed this line in version 12 of the diff

      Aug 16, 2021

      changed this line in version 12 of the diff

      changed this line in [version 12 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/11/diffs?diff_id=5417&start_sha=be7ba25039238289851a0603c71e1d50274a1c4f#d156f08f11b8a816273f399b33c4fdb59dddb2c3_31_31)
      Toggle commit list
    Please register or sign in to reply
  • Mai Hoang Thai Ha @hamht

    added 1 commit

    • be7ba250 - add script to validate form

    Compare with previous version

    Aug 16, 2021

    added 1 commit

    • be7ba250 - add script to validate form

    Compare with previous version

    added 1 commit * be7ba250 - add script to validate form [Compare with previous version](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/11/diffs?diff_id=5416&start_sha=24d4089fd29b6e64414a482af9bca42a3287e393)
    Toggle commit list
  • Mai Hoang Thai Ha @hamht

    resolved all discussions

    Aug 16, 2021

    resolved all discussions

    resolved all discussions
    Toggle commit list
  • Mai Hoang Thai Ha @hamht

    added 1 commit

    • 5e22e2cf - fixed review

    Compare with previous version

    Aug 16, 2021

    added 1 commit

    • 5e22e2cf - fixed review

    Compare with previous version

    added 1 commit * 5e22e2cf - fixed review [Compare with previous version](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/11/diffs?diff_id=5417&start_sha=be7ba25039238289851a0603c71e1d50274a1c4f)
    Toggle commit list
  • Mai Hoang Thai Ha @hamht

    changed title from Task/12 apply page id5/confirm page id6/done page/id7 to Feature apply job

    Aug 16, 2021

    changed title from Task/12 apply page id5/confirm page id6/done page/id7 to Feature apply job

    changed title from **{-Task/12 apply page id5/confirm page id6/done page/id7-}** to **{+Feature apply job+}**
    Toggle commit list
  • Mai Hoang Thai Ha @hamht

    added 1 commit

    • b51d4466 - fixed format accept

    Compare with previous version

    Aug 16, 2021

    added 1 commit

    • b51d4466 - fixed format accept

    Compare with previous version

    added 1 commit * b51d4466 - fixed format accept [Compare with previous version](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/11/diffs?diff_id=5418&start_sha=5e22e2cfdf597ad9afb8d55252c3211c2cb62b0f)
    Toggle commit list
  • phuctmZigexn
    @phuctm started a discussion on the diff Aug 16, 2021
    Resolved by Mai Hoang Thai Ha Aug 16, 2021
    app/mailers/application_mailer.rb
    1 1 class ApplicationMailer < ActionMailer::Base
    2 include ApplicationHelper
    • phuctmZigexn @phuctm commented Aug 16, 2021
      Master
      include ApplicationHelper
      helper :application

      thêm 2 dòng này vào chi Hà

      ```ruby include ApplicationHelper helper :application ``` thêm 2 dòng này vào chi Hà
    • Mai Hoang Thai Ha @hamht commented Aug 16, 2021
      Master

      include helper anh ơi

      include helper anh ơi
    Please register or sign in to reply
  • Mai Hoang Thai Ha @hamht

    added 1 commit

    • 6736961a - use session to keep value when back form

    Compare with previous version

    Aug 16, 2021

    added 1 commit

    • 6736961a - use session to keep value when back form

    Compare with previous version

    added 1 commit * 6736961a - use session to keep value when back form [Compare with previous version](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/11/diffs?diff_id=5422&start_sha=b51d446612a23ac7730e8b9dc9292e3fc873bced)
    Toggle commit list
  • Mai Hoang Thai Ha @hamht

    added 1 commit

    • fb028337 - fixed bug when use include? in nil class

    Compare with previous version

    Aug 16, 2021

    added 1 commit

    • fb028337 - fixed bug when use include? in nil class

    Compare with previous version

    added 1 commit * fb028337 - fixed bug when use include? in nil class [Compare with previous version](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/11/diffs?diff_id=5423&start_sha=6736961ab6c6a19ed180d79cf7fd4ad0543c0e4c)
    Toggle commit list
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 16, 2021
    Resolved by Mai Hoang Thai Ha Aug 17, 2021
    app/controllers/applies_controller.rb 0 → 100644
    1 class AppliesController < ApplicationController
    2 before_action :load_job, only: %i[new confirm create]
    3
    4 def new
    5 @apply = if request.referer&.include?('confirm') && session[:apply_job].present?
    • phuctmZigexn @phuctm commented Aug 16, 2021
      Master

      request.referer&.include?('confirm') && session[:apply_job].present?

      cái này mình tạo ra 1 method khác cho gọn lại đi em. Rồi sửa lại cho action này clean xíu.

      `request.referer&.include?('confirm') && session[:apply_job].present?` cái này mình tạo ra 1 method khác cho gọn lại đi em. Rồi sửa lại cho action này clean xíu.
    • Mai Hoang Thai Ha @hamht

      changed this line in version 17 of the diff

      Aug 16, 2021

      changed this line in version 17 of the diff

      changed this line in [version 17 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/11/diffs?diff_id=5425&start_sha=5ac7cef2ae9843069078b21800cf2f93c2986ce3#d9c45092651a193b7c63a6a3b87ae6db5b912ec9_5_5)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on the diff Aug 16, 2021
    Resolved by Mai Hoang Thai Ha Aug 17, 2021
    app/views/applies/new.html.slim 0 → 100644
    1 - provide(:title, 'Apply job')
    2 .container
    3 = render 'ribbon'
    4 .container
    5 h1.my-5.text-center
    6 | Apply form
    7 p.fs-5.fw-bold.mb-4.text-center
    8 = @job.title
    9 .col
    10 = form_with(model: @apply, url: confirm_path, local: true, id: 'apply-form') do |f|
    11 = render 'shared/error_messages', object: f.object
    12 .row.mb-5.form-group
    13 = f.hidden_field :job_id, value: @job.id
    • phuctmZigexn @phuctm commented Aug 16, 2021
      Master

      = f.hidden_field :job_id, value: @job.id move dòng này lên trên, ra khỏi .row.mb-5.form-group nha em.

      Edited Aug 17, 2021
      `= f.hidden_field :job_id, value: @job.id` move dòng này lên trên, ra khỏi `.row.mb-5.form-group` nha em.
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 16, 2021
    Resolved by Mai Hoang Thai Ha Aug 16, 2021
    app/views/applies/new.html.slim 0 → 100644
    2 .container
    3 = render 'ribbon'
    4 .container
    5 h1.my-5.text-center
    6 | Apply form
    7 p.fs-5.fw-bold.mb-4.text-center
    8 = @job.title
    9 .col
    10 = form_with(model: @apply, url: confirm_path, local: true, id: 'apply-form') do |f|
    11 = render 'shared/error_messages', object: f.object
    12 .row.mb-5.form-group
    13 = f.hidden_field :job_id, value: @job.id
    14 .col-2
    15 = f.label :user_name, 'Full name', class: 'form-label label'
    16 .col-10
    17 = f.text_field :user_name, value: @apply.user_name ||= @current_user.name, class: 'form-control'
    • phuctmZigexn @phuctm commented Aug 16, 2021
      Master

      @apply.user_name ||= @current_user.name

      Tại sao lại dùng ||=. Vô tình nó đúng nhưng mà dấu này là sai rồi nha.

      `@apply.user_name ||= @current_user.name` Tại sao lại dùng `||=`. Vô tình nó đúng nhưng mà dấu này là sai rồi nha.
    • Mai Hoang Thai Ha @hamht

      changed this line in version 17 of the diff

      Aug 16, 2021

      changed this line in version 17 of the diff

      changed this line in [version 17 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/11/diffs?diff_id=5425&start_sha=5ac7cef2ae9843069078b21800cf2f93c2986ce3#d156f08f11b8a816273f399b33c4fdb59dddb2c3_17_17)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 16, 2021
    Resolved by Mai Hoang Thai Ha Aug 16, 2021
    app/views/applies/new.html.slim 0 → 100644
    8 = @job.title
    9 .col
    10 = form_with(model: @apply, url: confirm_path, local: true, id: 'apply-form') do |f|
    11 = render 'shared/error_messages', object: f.object
    12 .row.mb-5.form-group
    13 = f.hidden_field :job_id, value: @job.id
    14 .col-2
    15 = f.label :user_name, 'Full name', class: 'form-label label'
    16 .col-10
    17 = f.text_field :user_name, value: @apply.user_name ||= @current_user.name, class: 'form-control'
    18 span.form-msg
    19 .row.mb-5.form-group
    20 .col-2
    21 = f.label :email, class: 'form-label label'
    22 .col-10
    23 = f.text_field :email, value: @apply.email ||= @current_user.email, class: 'form-control'
    • phuctmZigexn @phuctm commented Aug 16, 2021
      Master

      @apply.email ||= @current_user.email

      Tương tự với comment trên

      Edited Aug 16, 2021 by phuctmZigexn
      `@apply.email ||= @current_user.email` Tương tự với comment trên
    • Mai Hoang Thai Ha @hamht

      changed this line in version 17 of the diff

      Aug 16, 2021

      changed this line in version 17 of the diff

      changed this line in [version 17 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/11/diffs?diff_id=5425&start_sha=5ac7cef2ae9843069078b21800cf2f93c2986ce3#d156f08f11b8a816273f399b33c4fdb59dddb2c3_23_23)
      Toggle commit list
    Please register or sign in to reply
  • Mai Hoang Thai Ha @hamht

    added 1 commit

    • 5ac7cef2 - validate FE

    Compare with previous version

    Aug 16, 2021

    added 1 commit

    • 5ac7cef2 - validate FE

    Compare with previous version

    added 1 commit * 5ac7cef2 - validate FE [Compare with previous version](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/11/diffs?diff_id=5424&start_sha=fb028337f1e09c9fe3bb95873b66a63aee677bc8)
    Toggle commit list
  • Mai Hoang Thai Ha @hamht

    added 1 commit

    • 87d06493 - fixed review

    Compare with previous version

    Aug 16, 2021

    added 1 commit

    • 87d06493 - fixed review

    Compare with previous version

    added 1 commit * 87d06493 - fixed review [Compare with previous version](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/11/diffs?diff_id=5425&start_sha=5ac7cef2ae9843069078b21800cf2f93c2986ce3)
    Toggle commit list
  • Mai Hoang Thai Ha @hamht

    added 1 commit

    • 5c77f39a - fixed controller

    Compare with previous version

    Aug 16, 2021

    added 1 commit

    • 5c77f39a - fixed controller

    Compare with previous version

    added 1 commit * 5c77f39a - fixed controller [Compare with previous version](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/11/diffs?diff_id=5426&start_sha=87d06493372284795ebe8a3eb246e8e337ae44f5)
    Toggle commit list
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 16, 2021
    Resolved by Mai Hoang Thai Ha Aug 17, 2021
    app/controllers/applies_controller.rb 0 → 100644
    29 render 'new'
    30 end
    31 session[:apply_job] = nil
    32 end
    33
    34 private
    35
    36 def load_job
    37 job_id = params[:job_id] || params[:apply_job][:job_id]
    38 @job = Job.find_by(id: job_id)
    39
    40 render partial: 'shared/job_not_found' if @job.nil?
    41 end
    42
    43 def apply_params
    44 params.require(:apply_job).permit(:user_name, :email, :cv)
    • phuctmZigexn @phuctm commented Aug 16, 2021
      Master

      Em ko cần job_id trong strong params luôn hả?

      Em ko cần `job_id` trong strong params luôn hả?
    • Mai Hoang Thai Ha @hamht

      changed this line in version 19 of the diff

      Aug 17, 2021

      changed this line in version 19 of the diff

      changed this line in [version 19 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/11/diffs?diff_id=5427&start_sha=5c77f39a42c064d9f8e53602f116b27722a7b390#d9c45092651a193b7c63a6a3b87ae6db5b912ec9_44_54)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on the diff Aug 17, 2021
    Resolved by Mai Hoang Thai Ha Aug 17, 2021
    app/views/applies/new.html.slim 0 → 100644
    32 span.form-msg
    33 br
    34 = f.submit 'Confirm', class: 'btn btn-primary w-25 my-4 btn-height',data: { disable_with: false }
    35
    36 = render 'validate_form'
    37 javascript:
    38 Validator({
    39 form: '#apply-form',
    40 errorSelector: '.form-msg',
    41 rules: [
    42 Validator.isRequired('#apply_job_user_name'),
    43 Validator.isRequired('#apply_job_email'),
    44 Validator.isRequired('#apply_job_cv'),
    45 Validator.isEmail('#apply_job_email')
    46 ]
    47 })
    • phuctmZigexn @phuctm commented Aug 17, 2021
      Master
        Validator({
              form: '#apply-form',
              errorSelector: '.form-msg',
              rules: [
                Validator.isRequired('#apply_job_user_name'),
                Validator.isRequired('#apply_job_email'),
                Validator.isRequired('#apply_job_cv'),
                Validator.isEmail('#apply_job_email')
              ]
        })

      lỗi indentation nè

      ```slim Validator({ form: '#apply-form', errorSelector: '.form-msg', rules: [ Validator.isRequired('#apply_job_user_name'), Validator.isRequired('#apply_job_email'), Validator.isRequired('#apply_job_cv'), Validator.isEmail('#apply_job_email') ] }) ``` lỗi indentation nè
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 17, 2021
    Resolved by Mai Hoang Thai Ha Aug 17, 2021
    app/views/applies/new.html.slim 0 → 100644
    21 = f.label :email, class: 'form-label label'
    22 .col-10
    23 = f.text_field :email, value: @apply.email || @current_user.email, class: 'form-control'
    24 span.form-msg
    25 .row.mb-5.form-group
    26 / - if @user.cv.attached?
    27 / = url_for(@user.cv)
    28 .col-2
    29 = f.label :cv, class: 'form-label label'
    30 .col-10
    31 = f.file_field :cv, accept: ApplyJob::ACCEPT_CONTENT_TYPE, class: 'form-control'
    32 span.form-msg
    33 br
    34 = f.submit 'Confirm', class: 'btn btn-primary w-25 my-4 btn-height',data: { disable_with: false }
    35
    36 = render 'validate_form'
    • phuctmZigexn @phuctm commented Aug 17, 2021
      Master

      em move code JS trong partial này = render 'validate_form' vào file validation.js luôn được ko?

      em move code JS trong partial này `= render 'validate_form'` vào file validation.js luôn được ko?
    • Mai Hoang Thai Ha @hamht

      changed this line in version 19 of the diff

      Aug 17, 2021

      changed this line in version 19 of the diff

      changed this line in [version 19 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/11/diffs?diff_id=5427&start_sha=5c77f39a42c064d9f8e53602f116b27722a7b390#d156f08f11b8a816273f399b33c4fdb59dddb2c3_36_37)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on an old version of the diff Aug 17, 2021
    Resolved by Mai Hoang Thai Ha Aug 17, 2021
    config/routes.rb
    6 6 get '/jobs/:model/:slug', to: 'jobs#index', as: :job_list
    7 7
    8 8 resources :jobs, only: %i[index show]
    9
    10 get '/apply', to: 'applies#new'
    • phuctmZigexn @phuctm commented Aug 17, 2021
      Master
      get '/apply', to: 'applies#new'
      post '/confirm', to: 'applies#confirm'
      post '/done', to: 'applies#create'

      Hiện tại ko có task nào tương tự thì ko sao nhưng nếu có path tương tự thì lại conflict. 3 routes này tốt nhất thì mình đặt alias cho nó đi. ví dụ:

      apply_job, confirm_job, done_job
      ```ruby get '/apply', to: 'applies#new' post '/confirm', to: 'applies#confirm' post '/done', to: 'applies#create' ``` Hiện tại ko có task nào tương tự thì ko sao nhưng nếu có path tương tự thì lại conflict. 3 routes này tốt nhất thì mình đặt alias cho nó đi. ví dụ: ```ruby apply_job, confirm_job, done_job ```
    • Mai Hoang Thai Ha @hamht

      changed this line in version 19 of the diff

      Aug 17, 2021

      changed this line in version 19 of the diff

      changed this line in [version 19 of the diff](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/11/diffs?diff_id=5427&start_sha=5c77f39a42c064d9f8e53602f116b27722a7b390#e801163eb9182955dca3eb9817d59af634f6665d_10_10)
      Toggle commit list
    Please register or sign in to reply
  • phuctmZigexn
    @phuctm started a discussion on the diff Aug 17, 2021
    Resolved by Mai Hoang Thai Ha Aug 17, 2021
    app/views/user_mailer/apply_job.text.slim 0 → 100644
    1 ' VenJob
    • phuctmZigexn @phuctm commented Aug 17, 2021
      Master

      view này ko có Location hả em

      p
        | Location:
        = show_location(@job.cities)
      view này ko có Location hả em ```slim p | Location: = show_location(@job.cities) ```
    Please register or sign in to reply
  • Mai Hoang Thai Ha @hamht

    added 1 commit

    • 36ab9ceb - keep cv from apply to confirm

    Compare with previous version

    Aug 17, 2021

    added 1 commit

    • 36ab9ceb - keep cv from apply to confirm

    Compare with previous version

    added 1 commit * 36ab9ceb - keep cv from apply to confirm [Compare with previous version](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/11/diffs?diff_id=5427&start_sha=5c77f39a42c064d9f8e53602f116b27722a7b390)
    Toggle commit list
  • Mai Hoang Thai Ha @hamht

    added 1 commit

    • da93ae47 - fixed mailer plain text

    Compare with previous version

    Aug 17, 2021

    added 1 commit

    • da93ae47 - fixed mailer plain text

    Compare with previous version

    added 1 commit * da93ae47 - fixed mailer plain text [Compare with previous version](https://gitlab.zigexn.vn/hamht/VenJob/merge_requests/11/diffs?diff_id=5428&start_sha=36ab9cebb2a79850e8d273c0baa57a4aeda58726)
    Toggle commit list
  • Mai Hoang Thai Ha @hamht

    resolved all discussions

    Aug 17, 2021

    resolved all discussions

    resolved all discussions
    Toggle commit list
  • phuctmZigexn @phuctm

    mentioned in commit a2003231

    Aug 18, 2021

    mentioned in commit a2003231

    mentioned in commit a2003231b3a76b7c9c26c2e78e845e4ec25d657a
    Toggle commit list
  • phuctmZigexn @phuctm

    merged

    Aug 18, 2021

    merged

    merged
    Toggle commit list
  • Write
  • Preview
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment
Assignee
No assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
2
2 participants
Reference: hamht/VenJob!11
×

Revert this merge request

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.
×

Cherry-pick this merge request

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.