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
  • Nguyen Ngoc Nghia
  • VeNJOB
  • Merge Requests
  • !18

Merged
Opened Dec 25, 2019 by Nguyen Ngoc Nghia@nghiann 
  • Report abuse
Report abuse

Feature/job apply

  • Job apply has 3 steps: Apply -> Confirmation -> Finish.
  • User must log in before applying for a job (otherwise redirect to login page).
  • If user had applied for that job, applied button will be disabled.
  • If user had applied for that job and still in apply page, job still applied success but not save in database.
  • Not send mail when applying success yet. job_apply job_apply_confirm job_apply_finish
×

Check out, review, and merge locally

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

git fetch origin
git checkout -b feature/job_apply origin/feature/job_apply

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 feature/job_apply

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 8
  • Commits 9
  • Changes 12
{{ resolvedDiscussionCount }}/{{ discussionCount }} {{ resolvedCountText }} resolved
  • Nguyen Ngoc Nghia @nghiann

    added 1 commit

    • c4bc73b9 - check if user has signed in

    Compare with previous version

    Dec 26, 2019

    added 1 commit

    • c4bc73b9 - check if user has signed in

    Compare with previous version

    added 1 commit * c4bc73b9 - check if user has signed in [Compare with previous version](https://gitlab.zigexn.vn/nghiann/VeNJOB/merge_requests/18/diffs?diff_id=4555&start_sha=b706c46a37101f438c8219ea6e821eff04080f52)
    Toggle commit list
  • Son Do Hong
    @sondh started a discussion on an old version of the diff Dec 26, 2019
    Automatically resolved by Nguyen Ngoc Nghia with a push Dec 31, 2019
    app/views/jobs/show.html.erb
    30 32
    31 33 <div class="job_detail_button">
    32 34 <%= link_to "Favorite", "#", class: "btn btn-primary float-right" %>
    33 <%= link_to "Apply", "#", class: "btn btn-primary float-right mx-3" %>
    35 <% if user_signed_in? && UserJob.find_by(user_id: current_user.id, job_id: @job.id) %>
    • Son Do Hong @sondh commented Dec 26, 2019
      Master

      e viết thành 1 hàm của job để check có thể apply hay không thể apply trong đó sẽ check user đã đăng nhập hay chưa và user đã apply hay chưa.

      e viết thành 1 hàm của job để check có thể apply hay không thể apply trong đó sẽ check user đã đăng nhập hay chưa và user đã apply hay chưa.
    • Nguyen Ngoc Nghia @nghiann commented Dec 26, 2019
      Master

      @sondh dạ oke a

      @sondh dạ oke a
    • Nguyen Ngoc Nghia @nghiann

      changed this line in version 4 of the diff

      Dec 31, 2019

      changed this line in version 4 of the diff

      changed this line in [version 4 of the diff](https://gitlab.zigexn.vn/nghiann/VeNJOB/merge_requests/18/diffs?diff_id=4566&start_sha=a3d65929966dc6dc142ff0e2a4783bc409d370d3#ca1dced2048c1aa2fb1f535b6ec69018f9a4ba2a_35_35)
      Toggle commit list
    Please register or sign in to reply
  • Son Do Hong
    @sondh started a discussion on an old version of the diff Dec 26, 2019
    Automatically resolved by Nguyen Ngoc Nghia with a push Dec 26, 2019
    app/controllers/jobs_controller.rb
    16 16 def show
    17 17 @job = Job.find(params[:id]).decorate
    18 18 end
    19
    20 def apply
    21 redirect_to new_user_session_path unless user_signed_in?
    22 redirect_to jobs_path if params[:job_id].blank?
    23 @job_id = params[:job_id]
    24 end
    25
    26 def confirm_apply
    27
    28 end
    29
    30 def finish_apply
    31 @apply_first_name = params["confirm_apply_info"]["first_name"]
    • Son Do Hong @sondh commented Dec 26, 2019
      Master

      mình sinh ra biến này để làm gì nhỉ

      mình sinh ra biến này để làm gì nhỉ
    • Nguyen Ngoc Nghia @nghiann commented Dec 26, 2019
      Master

      @sondh dạ để phục vụ cho phần gửi mail sau này và lưu thông tin từ input bên apply.html.erb ấy a

      @sondh dạ để phục vụ cho phần gửi mail sau này và lưu thông tin từ input bên `apply.html.erb` ấy a
    • Son Do Hong @sondh commented Dec 26, 2019
      Master

      nếu để dùng cho sau này sau mình k đặt 1 biến là apply_info bao gồm cả first, last name, email job_id mà phải đặt thành 4 biến.

      Còn bên trang view thì sao mình k sử dụng params mà lại phại tạo ra instance variable?

      nếu để dùng cho sau này sau mình k đặt 1 biến là `apply_info` bao gồm cả first, last name, email job_id mà phải đặt thành 4 biến. Còn bên trang view thì sao mình k sử dụng params mà lại phại tạo ra instance variable?
    • Nguyen Ngoc Nghia @nghiann

      changed this line in version 3 of the diff

      Dec 26, 2019

      changed this line in version 3 of the diff

      changed this line in [version 3 of the diff](https://gitlab.zigexn.vn/nghiann/VeNJOB/merge_requests/18/diffs?diff_id=4561&start_sha=c4bc73b960662a77c7543ce9f731464ec7095c6a#6fa69a07843a58f190bf4d7e0692b9cc5b0bf52b_31_31)
      Toggle commit list
    Please register or sign in to reply
  • Son Do Hong
    @sondh started a discussion on an old version of the diff Dec 26, 2019
    Automatically resolved by Nguyen Ngoc Nghia with a push Dec 26, 2019
    app/controllers/jobs_controller.rb
    24 end
    25
    26 def confirm_apply
    27
    28 end
    29
    30 def finish_apply
    31 @apply_first_name = params["confirm_apply_info"]["first_name"]
    32 @apply_last_name = params["confirm_apply_info"]["last_name"]
    33 @apply_email = params["confirm_apply_info"]["email"]
    34 @job_id = params["confirm_apply_info"]["job_id"]
    35
    36 if params[:commit] == "Edit"
    37 render "jobs/apply"
    38 else
    39 UserJob.find_by(user_id: current_user.id, job_id: @job_id) ||
    • Son Do Hong @sondh commented Dec 26, 2019
      Master

      current_user.user_jobs.find_by

      `current_user.user_jobs.find_by`
    • Nguyen Ngoc Nghia @nghiann

      changed this line in version 3 of the diff

      Dec 26, 2019

      changed this line in version 3 of the diff

      changed this line in [version 3 of the diff](https://gitlab.zigexn.vn/nghiann/VeNJOB/merge_requests/18/diffs?diff_id=4561&start_sha=c4bc73b960662a77c7543ce9f731464ec7095c6a#6fa69a07843a58f190bf4d7e0692b9cc5b0bf52b_39_37)
      Toggle commit list
    Please register or sign in to reply
  • Van Hau Le
    @haulv started a discussion on an old version of the diff Dec 26, 2019
    Automatically resolved by Nguyen Ngoc Nghia with a push Dec 26, 2019
    app/views/layouts/application.html.erb
    13 13 <div class="container">
    14 14 <%= yield %>
    15 15 <%= render "layouts/footer" %>
    16 <%= debug(params) if Rails.env.development? %>
    • Van Hau Le @haulv commented Dec 26, 2019
      Master

      @nghiann debug xong bỏ này đi nha em!

      @nghiann debug xong bỏ này đi nha em!
    • Nguyen Ngoc Nghia @nghiann commented Dec 26, 2019
      Master

      @haulv dạ

      @haulv dạ
    • Nguyen Ngoc Nghia @nghiann

      changed this line in version 3 of the diff

      Dec 26, 2019

      changed this line in version 3 of the diff

      changed this line in [version 3 of the diff](https://gitlab.zigexn.vn/nghiann/VeNJOB/merge_requests/18/diffs?diff_id=4561&start_sha=c4bc73b960662a77c7543ce9f731464ec7095c6a#e82294e631b91cb53fe2e362dfd3b8e4a3924ae2_16_16)
      Toggle commit list
    Please register or sign in to reply
  • Nguyen Ngoc Nghia @nghiann

    added 3 commits

    • c24a7643 - not debug at application view
    • 51d1709a - edit model users and jobs
    • a3d65929 - using params for back to edit

    Compare with previous version

    Dec 26, 2019

    added 3 commits

    • c24a7643 - not debug at application view
    • 51d1709a - edit model users and jobs
    • a3d65929 - using params for back to edit

    Compare with previous version

    added 3 commits * c24a7643 - not debug at application view * 51d1709a - edit model users and jobs * a3d65929 - using params for back to edit [Compare with previous version](https://gitlab.zigexn.vn/nghiann/VeNJOB/merge_requests/18/diffs?diff_id=4561&start_sha=c4bc73b960662a77c7543ce9f731464ec7095c6a)
    Toggle commit list
  • Nguyen Ngoc Nghia @nghiann

    resolved all discussions

    Dec 31, 2019

    resolved all discussions

    resolved all discussions
    Toggle commit list
  • Nguyen Ngoc Nghia @nghiann

    added 1 commit

    • 04a4e0b4 - fix draper

    Compare with previous version

    Dec 31, 2019

    added 1 commit

    • 04a4e0b4 - fix draper

    Compare with previous version

    added 1 commit * 04a4e0b4 - fix draper [Compare with previous version](https://gitlab.zigexn.vn/nghiann/VeNJOB/merge_requests/18/diffs?diff_id=4566&start_sha=a3d65929966dc6dc142ff0e2a4783bc409d370d3)
    Toggle commit list
  • Nguyen Ngoc Nghia @nghiann

    added 1 commit

    • 67578cc5 - delete unused file

    Compare with previous version

    Dec 31, 2019

    added 1 commit

    • 67578cc5 - delete unused file

    Compare with previous version

    added 1 commit * 67578cc5 - delete unused file [Compare with previous version](https://gitlab.zigexn.vn/nghiann/VeNJOB/merge_requests/18/diffs?diff_id=4567&start_sha=04a4e0b453ea9c2aa7d779fbe617dcab1495c62e)
    Toggle commit list
  • Son Do Hong @sondh

    mentioned in commit b3f131ec

    Jan 14, 2020

    mentioned in commit b3f131ec

    mentioned in commit b3f131ecbaf898ae7a9faa4caffe3f09b974551a
    Toggle commit list
  • Son Do Hong @sondh

    merged

    Jan 14, 2020

    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
Nguyen Ngoc Nghia
Assignee
Nguyen Ngoc Nghia @nghiann
Assign to
None
Milestone
None
Assign milestone
Time tracking
3
3 participants
Reference: nghiann/VeNJOB!18
×

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.