Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • This project
    • Loading...
  • Sign in / Register
V
venjob_nth
  • 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 3
    • Merge Requests 3
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Ngô Trung Hưng
  • venjob_nth
  • Merge Requests
  • !12

Merged
Opened Aug 24, 2020 by Ngô Trung Hưng@hungnt 
  • Report abuse
Report abuse

ID8_History

×

Check out, review, and merge locally

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

git fetch origin
git checkout -b ID8_History origin/ID8_History

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 ID8_History

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 10
  • Commits 5
  • Pipelines 5
  • Changes 28
{{ resolvedDiscussionCount }}/{{ discussionCount }} {{ resolvedCountText }} resolved
  • Hoang Phuc Do
    @phucdh started a discussion on an old version of the diff Aug 24, 2020
    Resolved by Ngô Trung Hưng Aug 24, 2020
    app/controllers/job_controller.rb
    3 3 # Job controller
    4 4 class JobController < ApplicationController
    5 5 before_action :load_data_dropdown, only: :index
    6 # after_action :add_job_to_history, only: :detail
    7
    6 after_action :add_job_to_history, only: :detail
    8 7 def add_job_to_history
    9 current_user.histories.create(session[:params_job_id]) if user_signed_in?
    8 current_user.histories.find_or_create_by(job_id: session[:params_job_id]) if user_signed_in?
    • Hoang Phuc Do @phucdh commented Aug 24, 2020
      Master

      Có nên giới hạn số lượng job được lưu hay không ?

      Edited Aug 24, 2020
      Có nên giới hạn số lượng job được lưu hay không ?
    • Ngô Trung Hưng @hungnt

      changed this line in version 2 of the diff

      Aug 24, 2020

      changed this line in version 2 of the diff

      changed this line in [version 2 of the diff](https://gitlab.zigexn.vn/hungnt/venjob_nth/merge_requests/12/diffs?diff_id=5132&start_sha=57a0d779b85d68f3ae760b4f0dcf44531ec0638d#190c719ee71b0ae6c668db31423f9092e2c936d7_8_6)
      Toggle commit list
    Please register or sign in to reply
  • Hoang Phuc Do
    @phucdh started a discussion on an old version of the diff Aug 24, 2020
    Resolved by Ngô Trung Hưng Aug 24, 2020
    app/views/histories/index.html.erb 0 → 100644
    12 <div class="transform_margin"></div>
    13 <% if @jobs.blank? %>
    14 <div class="col-lg-12">
    15 <div class="breadcrumb_total_search">
    16 <span class="breadcrumb-item active">
    17 <%= t('history.list_blank') %>
    18 </span>
    19 </div>
    20 </div>
    21 <div style="width: 100%; height: 55vh"></div>
    22 <% else %>
    23 <%= form_with url: apply_path, method: :get, local: true, skip_enforcing_utf8: true do |f| %>
    24 <div class="container">
    25 <div class="box_scroll">
    26 <% @jobs.each do |item| %>
    27 <%= render 'histories/block_job_mini', data: item, form: f %>
    • Hoang Phuc Do @phucdh commented Aug 24, 2020
      Master

      render collection có thể dùng ở đây không ?

      Edited Aug 24, 2020
      render collection có thể dùng ở đây không ?
    • Ngô Trung Hưng @hungnt

      changed this line in version 2 of the diff

      Aug 24, 2020

      changed this line in version 2 of the diff

      changed this line in [version 2 of the diff](https://gitlab.zigexn.vn/hungnt/venjob_nth/merge_requests/12/diffs?diff_id=5132&start_sha=57a0d779b85d68f3ae760b4f0dcf44531ec0638d#8b3b5a6e1a5a2808c50f8b3d1a5c85376c673bea_27_23)
      Toggle commit list
    Please register or sign in to reply
  • Hoang Phuc Do
    @phucdh started a discussion on an old version of the diff Aug 24, 2020
    Resolved by Ngô Trung Hưng Aug 24, 2020
    app/controllers/job_controller.rb
    3 3 # Job controller
    4 4 class JobController < ApplicationController
    5 5 before_action :load_data_dropdown, only: :index
    6 # after_action :add_job_to_history, only: :detail
    7
    6 after_action :add_job_to_history, only: :detail
    8 7 def add_job_to_history
    9 current_user.histories.create(session[:params_job_id]) if user_signed_in?
    8 current_user.histories.find_or_create_by(job_id: session[:params_job_id]) if user_signed_in?
    9 counter_history = current_user.histories.count
    • Hoang Phuc Do @phucdh commented Aug 24, 2020
      Master

      current_user.histories.count có thể hoạt động không chính xác với trường hợp chưa đăng nhâp

      Trong trường hợp user chưa đăng nhập thì current_user sẽ trả về nil

      Edited Aug 24, 2020
      `current_user.histories.count` có thể hoạt động không chính xác với trường hợp chưa đăng nhâp Trong trường hợp user chưa đăng nhập thì `current_user` sẽ trả về nil
    • Ngô Trung Hưng @hungnt

      changed this line in version 3 of the diff

      Aug 24, 2020

      changed this line in version 3 of the diff

      changed this line in [version 3 of the diff](https://gitlab.zigexn.vn/hungnt/venjob_nth/merge_requests/12/diffs?diff_id=5136&start_sha=e0740f3384346cba329e0bf3a17f822b919a3c60#190c719ee71b0ae6c668db31423f9092e2c936d7_10_6)
      Toggle commit list
    Please register or sign in to reply
  • Hoang Phuc Do
    @phucdh started a discussion on an old version of the diff Aug 24, 2020
    Resolved by Ngô Trung Hưng Aug 24, 2020
    config/locales/vn.yml
    137 137 liked: 'Bạn đã thêm công việc vào yêu thích.'
    138 138 list: 'Danh sách công việc bạn đã thích'
    139 139 list_blank: 'Bạn chưa có công việc yêu thích!'
    140 history:
    141 list: 'Lịch sử'
    142 list_blank: 'Bạn chưa có xem công việc nào luôn á!'
    • Hoang Phuc Do @phucdh commented Aug 24, 2020
      Master

      list_blank => empty

      Edited Aug 24, 2020
      `list_blank` => `empty`
    • Ngô Trung Hưng @hungnt

      changed this line in version 2 of the diff

      Aug 24, 2020

      changed this line in version 2 of the diff

      changed this line in [version 2 of the diff](https://gitlab.zigexn.vn/hungnt/venjob_nth/merge_requests/12/diffs?diff_id=5132&start_sha=57a0d779b85d68f3ae760b4f0dcf44531ec0638d#5b8417e44f05e2adc4b400c722c33e48fe7ef33b_142_142)
      Toggle commit list
    Please register or sign in to reply
  • Hoang Phuc Do
    @phucdh started a discussion on an old version of the diff Aug 24, 2020
    Resolved by Ngô Trung Hưng Aug 24, 2020
    config/locales/vn.yml
    137 137 liked: 'Bạn đã thêm công việc vào yêu thích.'
    138 138 list: 'Danh sách công việc bạn đã thích'
    139 139 list_blank: 'Bạn chưa có công việc yêu thích!'
    140 history:
    141 list: 'Lịch sử'
    142 list_blank: 'Bạn chưa có xem công việc nào luôn á!'
    143 see: 'Đã xem lúc: '
    • Hoang Phuc Do @phucdh commented Aug 24, 2020
      Master

      see => seen_at

      Edited Aug 24, 2020
      `see` => `seen_at`
    • Ngô Trung Hưng @hungnt

      changed this line in version 2 of the diff

      Aug 24, 2020

      changed this line in version 2 of the diff

      changed this line in [version 2 of the diff](https://gitlab.zigexn.vn/hungnt/venjob_nth/merge_requests/12/diffs?diff_id=5132&start_sha=57a0d779b85d68f3ae760b4f0dcf44531ec0638d#5b8417e44f05e2adc4b400c722c33e48fe7ef33b_143_142)
      Toggle commit list
    Please register or sign in to reply
  • Hoang Phuc Do
    @phucdh started a discussion on an old version of the diff Aug 24, 2020
    Last updated by Ngô Trung Hưng Aug 24, 2020
    app/controllers/job_controller.rb
    17 18 end
    18 19
    19 20 def detail
    20 session[:params_job_id] = params[:id]
    21 21 @job = Job.find(params[:id]).decorate
    22 session[:params_job_id] = @job.id
    • Hoang Phuc Do @phucdh commented Aug 24, 2020
      Master

      Có thể dùng cookie cho các job đã xem được không ?

      Có khác biệt gì so với dùng session

      Có thể dùng cookie cho các job đã xem được không ? Có khác biệt gì so với dùng session
    • Ngô Trung Hưng @hungnt

      changed this line in version 2 of the diff

      Aug 24, 2020

      changed this line in version 2 of the diff

      changed this line in [version 2 of the diff](https://gitlab.zigexn.vn/hungnt/venjob_nth/merge_requests/12/diffs?diff_id=5132&start_sha=57a0d779b85d68f3ae760b4f0dcf44531ec0638d#190c719ee71b0ae6c668db31423f9092e2c936d7_22_22)
      Toggle commit list
    Please register or sign in to reply
  • Hoang Phuc Do
    @phucdh started a discussion on an old version of the diff Aug 24, 2020
    Resolved by Ngô Trung Hưng Aug 24, 2020
    app/views/histories/index.html.erb 0 → 100644
    8 </div>
    9 </div>
    10 </div>
    11 </div>
    12 <div class="transform_margin"></div>
    13 <% if @jobs.blank? %>
    14 <div class="col-lg-12">
    15 <div class="breadcrumb_total_search">
    16 <span class="breadcrumb-item active">
    17 <%= t('history.list_blank') %>
    18 </span>
    19 </div>
    20 </div>
    21 <div style="width: 100%; height: 55vh"></div>
    22 <% else %>
    23 <%= form_with url: apply_path, method: :get, local: true, skip_enforcing_utf8: true do |f| %>
    • Hoang Phuc Do @phucdh commented Aug 24, 2020
      Master

      Sửa lại indent

      Edited Aug 24, 2020
      Sửa lại indent
    • Ngô Trung Hưng @hungnt

      changed this line in version 2 of the diff

      Aug 24, 2020

      changed this line in version 2 of the diff

      changed this line in [version 2 of the diff](https://gitlab.zigexn.vn/hungnt/venjob_nth/merge_requests/12/diffs?diff_id=5132&start_sha=57a0d779b85d68f3ae760b4f0dcf44531ec0638d#8b3b5a6e1a5a2808c50f8b3d1a5c85376c673bea_23_23)
      Toggle commit list
    Please register or sign in to reply
  • Ngô Trung Hưng @hungnt

    added 1 commit

    • e0740f33 - use render collection & fix method add_job_to_history

    Compare with previous version

    Aug 24, 2020

    added 1 commit

    • e0740f33 - use render collection & fix method add_job_to_history

    Compare with previous version

    added 1 commit * e0740f33 - use render collection &amp; fix method add_job_to_history [Compare with previous version](https://gitlab.zigexn.vn/hungnt/venjob_nth/merge_requests/12/diffs?diff_id=5132&start_sha=57a0d779b85d68f3ae760b4f0dcf44531ec0638d)
    Toggle commit list
  • Hoang Phuc Do
    @phucdh started a discussion on an old version of the diff Aug 24, 2020
    Last updated by Ngô Trung Hưng Aug 24, 2020
    app/controllers/job_controller.rb
    3 3 # Job controller
    4 4 class JobController < ApplicationController
    5 5 before_action :load_data_dropdown, only: :index
    6 # after_action :add_job_to_history, only: :detail
    6 def add_job_to_history(job_id)
    7 return unless user_signed_in?
    7 8
    8 def add_job_to_history
    9 current_user.histories.create(session[:params_job_id]) if user_signed_in?
    10 session.delete(:params_job_id)
    9 current_user.histories.find_or_create_by(job_id: job_id)
    10 counter_history = current_user.histories.count
    11 current_user.histories.destroy(current_user.histories.first) if counter_history > History::NUMBER_JOB_LIMIT
    • Hoang Phuc Do @phucdh commented Aug 24, 2020
      Master

      Đoạn xử lý trong action này nên đưa vào lib vì là business logic

      Đoạn xử lý trong action này nên đưa vào `lib` vì là business logic
    • Ngô Trung Hưng @hungnt

      changed this line in version 3 of the diff

      Aug 24, 2020

      changed this line in version 3 of the diff

      changed this line in [version 3 of the diff](https://gitlab.zigexn.vn/hungnt/venjob_nth/merge_requests/12/diffs?diff_id=5136&start_sha=e0740f3384346cba329e0bf3a17f822b919a3c60#190c719ee71b0ae6c668db31423f9092e2c936d7_11_6)
      Toggle commit list
    Please register or sign in to reply
  • Hoang Phuc Do
    @phucdh started a discussion on an old version of the diff Aug 24, 2020
    Last updated by Ngô Trung Hưng Aug 24, 2020
    app/controllers/job_controller.rb
    17 18 end
    18 19
    19 20 def detail
    20 session[:params_job_id] = params[:id]
    21 21 @job = Job.find(params[:id]).decorate
    22 return render 'error/fage_not_found' if @job.blank?
    23
    24 add_job_to_history(@job.id)
    • Hoang Phuc Do @phucdh commented Aug 24, 2020
      Master

      Action này có thể đưa vào lib

      Action này có thể đưa vào `lib`
    • Ngô Trung Hưng @hungnt

      changed this line in version 3 of the diff

      Aug 24, 2020

      changed this line in version 3 of the diff

      changed this line in [version 3 of the diff](https://gitlab.zigexn.vn/hungnt/venjob_nth/merge_requests/12/diffs?diff_id=5136&start_sha=e0740f3384346cba329e0bf3a17f822b919a3c60#190c719ee71b0ae6c668db31423f9092e2c936d7_24_16)
      Toggle commit list
    Please register or sign in to reply
  • Ngô Trung Hưng @hungnt

    added 1 commit

    • 4720630b - fix method add_job_to_history

    Compare with previous version

    Aug 24, 2020

    added 1 commit

    • 4720630b - fix method add_job_to_history

    Compare with previous version

    added 1 commit * 4720630b - fix method add_job_to_history [Compare with previous version](https://gitlab.zigexn.vn/hungnt/venjob_nth/merge_requests/12/diffs?diff_id=5136&start_sha=e0740f3384346cba329e0bf3a17f822b919a3c60)
    Toggle commit list
  • Hoang Phuc Do
    @phucdh started a discussion on an old version of the diff Aug 24, 2020
    Last updated by Ngô Trung Hưng Aug 24, 2020
    lib/business/job_business.rb 0 → 100644
    1 # frozen_string_literal: true
    2
    3 class JobBusiness
    • Hoang Phuc Do @phucdh commented Aug 24, 2020
      Master

      JobBusiness => JobHistory

      `JobBusiness` => `JobHistory`
    • Ngô Trung Hưng @hungnt

      changed this line in version 4 of the diff

      Aug 24, 2020

      changed this line in version 4 of the diff

      changed this line in [version 4 of the diff](https://gitlab.zigexn.vn/hungnt/venjob_nth/merge_requests/12/diffs?diff_id=5137&start_sha=4720630b82e56f369b0d0d6a81491ab87053c483#3080b5bbe05a617c8c13a66474696822fbf01212_3_0)
      Toggle commit list
    Please register or sign in to reply
  • Ngô Trung Hưng @hungnt

    added 1 commit

    • 01e1db43 - change file name job_business -> job_history

    Compare with previous version

    Aug 24, 2020

    added 1 commit

    • 01e1db43 - change file name job_business -> job_history

    Compare with previous version

    added 1 commit * 01e1db43 - change file name job_business -&gt; job_history [Compare with previous version](https://gitlab.zigexn.vn/hungnt/venjob_nth/merge_requests/12/diffs?diff_id=5137&start_sha=4720630b82e56f369b0d0d6a81491ab87053c483)
    Toggle commit list
  • Ngô Trung Hưng @hungnt

    added 1 commit

    • 47acfa03 - delete file coffee & scss

    Compare with previous version

    Aug 24, 2020

    added 1 commit

    • 47acfa03 - delete file coffee & scss

    Compare with previous version

    added 1 commit * 47acfa03 - delete file coffee &amp; scss [Compare with previous version](https://gitlab.zigexn.vn/hungnt/venjob_nth/merge_requests/12/diffs?diff_id=5138&start_sha=01e1db4340181d7d5f7bdb2288d3419a44c2121a)
    Toggle commit list
  • Hoang Phuc Do @phucdh

    mentioned in commit 6316e281

    Aug 24, 2020

    mentioned in commit 6316e281

    mentioned in commit 6316e281d3ad92ee44977e4c536594f131bb5ad5
    Toggle commit list
  • Hoang Phuc Do @phucdh

    merged

    Aug 24, 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
Assignee
No assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
2
2 participants
Reference: hungnt/venjob_nth!12
×

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.