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 1
    • Merge Requests 1
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Tô Ngọc Ánh
  • VeNJob
  • Merge Requests
  • !8

Merged
Opened Aug 03, 2020 by Tô Ngọc Ánh@anhtn 
  • Report abuse
Report abuse

id2 - id3: cities list, industries list

×

Check out, review, and merge locally

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

git fetch origin
git checkout -b id2-id3 origin/id2-id3

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 id2-id3

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 12
  • Commits 7
  • Pipelines 6
  • Changes 13
{{ resolvedDiscussionCount }}/{{ discussionCount }} {{ resolvedCountText }} resolved
  • Tô Ngọc Ánh @anhtn

    added 3 commits

    • 7a3fadae...4e70cfdf - 2 commits from branch master
    • 5c31e055 - Merge branch 'master' into 'id2-id3'

    Compare with previous version

    Aug 03, 2020

    added 3 commits

    • 7a3fadae...4e70cfdf - 2 commits from branch master
    • 5c31e055 - Merge branch 'master' into 'id2-id3'

    Compare with previous version

    added 3 commits * 7a3fadae...4e70cfdf - 2 commits from branch `master` * 5c31e055 - Merge branch 'master' into 'id2-id3' [Compare with previous version](https://gitlab.zigexn.vn/anhtn/VeNJob/merge_requests/8/diffs?diff_id=4909&start_sha=7a3fadae80bd964eb746e7e775ca15ce6198c752)
    Toggle commit list
  • Hoang Phuc Do
    @phucdh started a discussion on an old version of the diff Aug 03, 2020
    Resolved by Tô Ngọc Ánh Aug 03, 2020
    app/views/shared/_header.html.erb
    1 1 <nav class='navbar navbar-expand-lg navbar-light sticky-top'>
    2 <a class='navbar-brand' href='#'>
    2 <a class='navbar-brand' href='<%= root_path %>'>
    • Hoang Phuc Do @phucdh commented Aug 03, 2020
      <%= link_to root_path, class: 'navbar-brand' do %>
        <%= image_tag 'venjob-logo.png', alt: 'VeNJob', size: '120x50' %>
      <% end %>
      Edited Aug 03, 2020
      ```ruby <%= link_to root_path, class: 'navbar-brand' do %> <%= image_tag 'venjob-logo.png', alt: 'VeNJob', size: '120x50' %> <% end %> ```
    • Tô Ngọc Ánh @anhtn commented Aug 03, 2020
      Master

      dạ, thanks a ^

      Edited Aug 03, 2020
      dạ, thanks a ^^
    • Tô Ngọc Ánh @anhtn

      changed this line in version 4 of the diff

      Aug 03, 2020

      changed this line in version 4 of the diff

      changed this line in [version 4 of the diff](https://gitlab.zigexn.vn/anhtn/VeNJob/merge_requests/8/diffs?diff_id=4913&start_sha=3a3b04a3d423865720e364f70e1ebd86158e4e59#76d1a11ee1e940c5ee3f38422c24188edb0fe433_2_2)
      Toggle commit list
    Please register or sign in to reply
  • Thanh Hung Pham
    @hungpt started a discussion on an old version of the diff Aug 03, 2020
    Resolved by Tô Ngọc Ánh Aug 03, 2020
    app/views/home/index.html.erb
    10 10 <h1>Latest Jobs</h1>
    11 <hr>
    11 12 <div class='row'>
    12 13 <%= render partial: 'home/job', collection: @jobs %>
    13 14 </div>
    14 <a href='#'>All Jobs</a>
    15 15 </div>
    16 16 <div id='top-cities' class='my-4 text-center'>
    17 17 <h1>Top Cities</h1>
    18 <hr>
    18 19 <div class='row'>
    19 <%= render partial: 'home/city', collection: @top_cities, as: :location %>
    20 <%= render partial: 'locations/city', collection: @top_cities, as: :location %>
    20 21 </div>
    21 <a href='#'>All Cities</a>
    22 <a href='<%= cities_path %>'>All Cities</a>
    • Thanh Hung Pham @hungpt commented Aug 03, 2020
      Master

      @anhtn Dùng link_to á em.

      Edited Aug 03, 2020
      @anhtn Dùng `link_to` á em.
    • Tô Ngọc Ánh @anhtn commented Aug 03, 2020
      Master

      ok a, quên mất có cái này :D

      Edited Aug 03, 2020
      ok a, quên mất có cái này :D
    • Tô Ngọc Ánh @anhtn

      changed this line in version 4 of the diff

      Aug 03, 2020

      changed this line in version 4 of the diff

      changed this line in [version 4 of the diff](https://gitlab.zigexn.vn/anhtn/VeNJob/merge_requests/8/diffs?diff_id=4913&start_sha=3a3b04a3d423865720e364f70e1ebd86158e4e59#3bf63da9a86734af839552d26556a28fb7456f0c_22_22)
      Toggle commit list
    Please register or sign in to reply
  • Tô Ngọc Ánh @anhtn

    added 2 commits

    • 1f4b8912 - id3 industries list
    • 3a3b04a3 - Merge branch 'id2-id3' of gitlab.zigexn.vn:anhtn/VeNJob into id2-id3

    Compare with previous version

    Aug 03, 2020

    added 2 commits

    • 1f4b8912 - id3 industries list
    • 3a3b04a3 - Merge branch 'id2-id3' of gitlab.zigexn.vn:anhtn/VeNJob into id2-id3

    Compare with previous version

    added 2 commits * 1f4b8912 - id3 industries list * 3a3b04a3 - Merge branch &#x27;id2-id3&#x27; of gitlab.zigexn.vn:anhtn&#x2F;VeNJob into id2-id3 [Compare with previous version](https://gitlab.zigexn.vn/anhtn/VeNJob/merge_requests/8/diffs?diff_id=4912&start_sha=5c31e055ffad6c99f02f7142874db991e633dc69)
    Toggle commit list
  • Tô Ngọc Ánh @anhtn

    resolved all discussions

    Aug 03, 2020

    resolved all discussions

    resolved all discussions
    Toggle commit list
  • Tô Ngọc Ánh @anhtn

    added 1 commit

    • 6292354d - change html a tag to link_to

    Compare with previous version

    Aug 03, 2020

    added 1 commit

    • 6292354d - change html a tag to link_to

    Compare with previous version

    added 1 commit * 6292354d - change html a tag to link_to [Compare with previous version](https://gitlab.zigexn.vn/anhtn/VeNJob/merge_requests/8/diffs?diff_id=4913&start_sha=3a3b04a3d423865720e364f70e1ebd86158e4e59)
    Toggle commit list
  • Tô Ngọc Ánh @anhtn

    added 1 commit

    • 148f59aa - Refactor code to improve performance

    Compare with previous version

    Aug 03, 2020

    added 1 commit

    • 148f59aa - Refactor code to improve performance

    Compare with previous version

    added 1 commit * 148f59aa - Refactor code to improve performance [Compare with previous version](https://gitlab.zigexn.vn/anhtn/VeNJob/merge_requests/8/diffs?diff_id=4920&start_sha=6292354db126fdb42dead0d0b2fc9730454187e1)
    Toggle commit list
  • Thanh Hung Pham
    @hungpt started a discussion on an old version of the diff Aug 03, 2020
    Resolved by Tô Ngọc Ánh Aug 04, 2020
    app/controllers/locations_controller.rb 0 → 100644
    1 class LocationsController < ApplicationController
    2 def index
    3 @vn_cities_lists = Location.vietnam.count_job
    • Thanh Hung Pham @hungpt commented Aug 03, 2020
      Master

      @anhtn Nên sử dung count_job trong scope giống như scope top_locations á em.

      Edited Aug 04, 2020
      @anhtn Nên sử dung `count_job` trong scope giống như scope `top_locations` á em.
    • Tô Ngọc Ánh @anhtn commented Aug 04, 2020
      Master

      em tách ra vì nghĩ sau này có thể có chỗ cần lấy ra những city thuộc/không thuộc Việt Nam mà k quan tâm tới số lượng job á a (dùng count_job sẽ bị mất các Location k có job nào)

      Edited Aug 04, 2020
      em tách ra vì nghĩ sau này có thể có chỗ cần lấy ra những city thuộc/không thuộc Việt Nam mà k quan tâm tới số lượng job á a (dùng `count_job` sẽ bị mất các Location k có job nào)
    • Thanh Hung Pham @hungpt commented Aug 04, 2020
      Master

      @anhtn Vậy em sửa lại tên method count_job nha. Đọc vào sẽ hiểu là em trả về số lượng job. sửa thành with_job_count chẳng hạn.

      Edited Aug 04, 2020
      @anhtn Vậy em sửa lại tên method `count_job` nha. Đọc vào sẽ hiểu là em trả về số lượng job. sửa thành `with_job_count` chẳng hạn.
    • Tô Ngọc Ánh @anhtn

      changed this line in version 6 of the diff

      Aug 04, 2020

      changed this line in version 6 of the diff

      changed this line in [version 6 of the diff](https://gitlab.zigexn.vn/anhtn/VeNJob/merge_requests/8/diffs?diff_id=4926&start_sha=148f59aa4fc543b65410b2a97eac265ea52a1216#a87af5d37eecb8c19aa743bac5a81ae1c9d2cf1b_3_3)
      Toggle commit list
    Please register or sign in to reply
  • Thanh Hung Pham
    @hungpt started a discussion on an old version of the diff Aug 03, 2020
    Resolved by Tô Ngọc Ánh Aug 04, 2020
    app/views/locations/index.html.erb 0 → 100644
    4 <ul class='list-group list-group-horizontal'>
    5 <li class='list-group-item'>
    6 <a href='#vietnam'>Việt Nam</a>
    7 <span class='badge badge-primary badge-pill'><%= @vn_cities_lists.length %></span>
    8 </li>
    9 <li class='list-group-item'>
    10 <a href='#international'>International</a>
    11 <span class='badge badge-primary badge-pill'><%= @internal_cities_lists.length %></span>
    12 </li>
    13 </ul>
    14 </div>
    15 <div id='vietnam' class='text-center'>
    16 <h2>Vietnam</h2>
    17 <hr>
    18 <div class='row'>
    19 <%= render partial: 'locations/city', collection: @vn_cities_lists, as: :location %>
    • Thanh Hung Pham @hungpt commented Aug 03, 2020
      Master

      @anhtn Sửa tên file locations/city ==> locations/location

      Edited Aug 04, 2020
      @anhtn Sửa tên file `locations/city` ==> `locations/location`
    • Tô Ngọc Ánh @anhtn

      changed this line in version 6 of the diff

      Aug 04, 2020

      changed this line in version 6 of the diff

      changed this line in [version 6 of the diff](https://gitlab.zigexn.vn/anhtn/VeNJob/merge_requests/8/diffs?diff_id=4926&start_sha=148f59aa4fc543b65410b2a97eac265ea52a1216#9ba75d5e1f9677114ad6ee44154ea86162d79911_19_17)
      Toggle commit list
    Please register or sign in to reply
  • Thanh Hung Pham
    @hungpt started a discussion on an old version of the diff Aug 03, 2020
    Resolved by Tô Ngọc Ánh Aug 04, 2020
    app/views/locations/index.html.erb 0 → 100644
    11 <span class='badge badge-primary badge-pill'><%= @internal_cities_lists.length %></span>
    12 </li>
    13 </ul>
    14 </div>
    15 <div id='vietnam' class='text-center'>
    16 <h2>Vietnam</h2>
    17 <hr>
    18 <div class='row'>
    19 <%= render partial: 'locations/city', collection: @vn_cities_lists, as: :location %>
    20 </div>
    21 </div>
    22 <div id='international' class='text-center'>
    23 <h2>International</h2>
    24 <hr>
    25 <div class="row">
    26 <%= render partial: 'locations/city', collection: @internal_cities_lists, as: :location %>
    • Thanh Hung Pham @hungpt commented Aug 03, 2020
      Master

      @anhtn Tương tự trên

      Edited Aug 04, 2020
      @anhtn Tương tự trên
    • Tô Ngọc Ánh @anhtn

      changed this line in version 6 of the diff

      Aug 04, 2020

      changed this line in version 6 of the diff

      changed this line in [version 6 of the diff](https://gitlab.zigexn.vn/anhtn/VeNJob/merge_requests/8/diffs?diff_id=4926&start_sha=148f59aa4fc543b65410b2a97eac265ea52a1216#9ba75d5e1f9677114ad6ee44154ea86162d79911_26_24)
      Toggle commit list
    Please register or sign in to reply
  • Thanh Hung Pham
    @hungpt started a discussion on an old version of the diff Aug 03, 2020
    Resolved by Tô Ngọc Ánh Aug 04, 2020
    app/views/home/_industry.html.erb → app/views/industries/_industry.html.erb
    2 2 <div class='card'>
    3 3 <%= link_to '#', class: 'card-body text-decoration-none' do %>
    4 4 <h5 class='card-title font-weight-bold'><%= industry.name %></h5>
    5 <p class='card-text'><%= industry.jobs.size %> Jobs</p>
    5 <p class='card-text'><%= industry.job_count %> Jobs</p>
    • Thanh Hung Pham @hungpt commented Aug 03, 2020
      Master

      @anhtn Đang bị bug chỗ này nha em!

      Edited Aug 04, 2020
      @anhtn Đang bị bug chỗ này nha em!
    • Tô Ngọc Ánh @anhtn

      changed this line in version 6 of the diff

      Aug 04, 2020

      changed this line in version 6 of the diff

      changed this line in [version 6 of the diff](https://gitlab.zigexn.vn/anhtn/VeNJob/merge_requests/8/diffs?diff_id=4926&start_sha=148f59aa4fc543b65410b2a97eac265ea52a1216#759f2125c06eb65fc6da7108a5ebda0a4631cbcc_5_5)
      Toggle commit list
    Please register or sign in to reply
  • Thanh Hung Pham
    @hungpt started a discussion on an old version of the diff Aug 04, 2020
    Resolved by Tô Ngọc Ánh Aug 04, 2020
    app/models/industry.rb
    1 1 class Industry < ApplicationRecord
    2 scope :top_industries, ->(number) { joins(:jobs)
    3 .group(:industry_id)
    4 .order(Arel.sql('count(jobs.id) DESC'))
    5 .take(number) }
    6
    2 scope :count_job, -> { joins(:jobs).group(:industry_id).select('industries.*, count(jobs.id) as job_count') }
    3 scope :top_industries, ->(number) { count_job.order(Arel.sql('count(jobs.id) DESC')).limit(number) }
    • Thanh Hung Pham @hungpt commented Aug 04, 2020
      Master

      @anhtn Chỗ này dùng count_job để order. vậy count(jobs.id) DESC sửa thành job_count DESC được không nhỉ ?

      Edited Aug 04, 2020
      @anhtn Chỗ này dùng `count_job` để order. vậy `count(jobs.id) DESC` sửa thành `job_count DESC` được không nhỉ ?
    • Tô Ngọc Ánh @anhtn

      changed this line in version 6 of the diff

      Aug 04, 2020

      changed this line in version 6 of the diff

      changed this line in [version 6 of the diff](https://gitlab.zigexn.vn/anhtn/VeNJob/merge_requests/8/diffs?diff_id=4926&start_sha=148f59aa4fc543b65410b2a97eac265ea52a1216#6fd7ec4bda80a3376d591b3e766bce8bf035c4c6_3_2)
      Toggle commit list
    Please register or sign in to reply
  • Thanh Hung Pham
    @hungpt started a discussion on an old version of the diff Aug 04, 2020
    Resolved by Tô Ngọc Ánh Aug 04, 2020
    app/models/location.rb
    1 1 class Location < ApplicationRecord
    2 scope :top_locations, ->(number) { joins(:jobs)
    3 .group(:location_id)
    4 .order(Arel.sql('count(jobs.id) DESC'))
    5 .take(number) }
    6
    2 scope :count_job, -> { joins(:jobs).group(:location_id).select('locations.*, count(jobs.id) as job_count') }
    3 scope :top_locations, ->(number) { count_job.order(Arel.sql('job_count DESC')).limit(number) }
    • Thanh Hung Pham @hungpt commented Aug 04, 2020
      Master

      @anhtn tương tự ở trên.

      Edited Aug 04, 2020
      @anhtn tương tự ở trên.
    • Tô Ngọc Ánh @anhtn

      changed this line in version 6 of the diff

      Aug 04, 2020

      changed this line in version 6 of the diff

      changed this line in [version 6 of the diff](https://gitlab.zigexn.vn/anhtn/VeNJob/merge_requests/8/diffs?diff_id=4926&start_sha=148f59aa4fc543b65410b2a97eac265ea52a1216#70c56d46aed1dd72ba96b4e9cf25483c48cad991_3_2)
      Toggle commit list
    Please register or sign in to reply
  • Tô Ngọc Ánh @anhtn

    added 1 commit

    • f57206c1 - Fix bug index industry page, refactor code

    Compare with previous version

    Aug 04, 2020

    added 1 commit

    • f57206c1 - Fix bug index industry page, refactor code

    Compare with previous version

    added 1 commit * f57206c1 - Fix bug index industry page, refactor code [Compare with previous version](https://gitlab.zigexn.vn/anhtn/VeNJob/merge_requests/8/diffs?diff_id=4926&start_sha=148f59aa4fc543b65410b2a97eac265ea52a1216)
    Toggle commit list
  • Tô Ngọc Ánh @anhtn

    resolved all discussions

    Aug 04, 2020

    resolved all discussions

    resolved all discussions
    Toggle commit list
  • Tô Ngọc Ánh @anhtn

    mentioned in commit e2407a16

    Aug 04, 2020

    mentioned in commit e2407a16

    mentioned in commit e2407a16d09d46d44d5c5686114a413a976d81e8
    Toggle commit list
  • Tô Ngọc Ánh @anhtn

    merged

    Aug 04, 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
3
3 participants
Reference: anhtn/VeNJob!8
×

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.