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
  • Huỳnh Thiên Phước
  • venjob
  • Merge Requests
  • !2

Merged
Opened Aug 04, 2020 by Huỳnh Thiên Phước@phuocht 
  • Report abuse
Report abuse

Create Industry 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 industry_list origin/industry_list

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 industry_list

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 19
  • Pipelines 14
  • Changes 27
{{ resolvedDiscussionCount }}/{{ discussionCount }} {{ resolvedCountText }} resolved
  • Huỳnh Thiên Phước @phuocht

    added 1 commit

    • dc54f45e - Create industries and cities list

    Compare with previous version

    Aug 04, 2020

    added 1 commit

    • dc54f45e - Create industries and cities list

    Compare with previous version

    added 1 commit * dc54f45e - Create industries and cities list [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/2/diffs?diff_id=4935&start_sha=6c0bf9ac1563a3096d7f0285a9a650879bd84999)
    Toggle commit list
  • Van Hau Le
    @haulv started a discussion on an old version of the diff Aug 04, 2020
    Last updated by Huỳnh Thiên Phước Aug 04, 2020
    app/controllers/cities_controller.rb
    1 1 class CitiesController < ApplicationController
    2 2 def index
    3 @cities_vietnam = City.all_city.where('location = 1')
    4 @cities_international = City.all_city.where('location = 0')
    3 @cities_vietnam = City.all_city.vietnam
    • Van Hau Le @haulv commented Aug 04, 2020
      Master

      @phuocht à nãy a bị miss chỗ này

      @cities_vietnam = City.vietnam
      @cities_international = City.international
      @phuocht à nãy a bị miss chỗ này ```ruby @cities_vietnam = City.vietnam @cities_international = City.international ```
    • Huỳnh Thiên Phước @phuocht commented Aug 04, 2020
      Master

      dạ ok a, để e fix

      dạ ok a, để e fix
    • Huỳnh Thiên Phước @phuocht

      changed this line in version 3 of the diff

      Aug 04, 2020

      changed this line in version 3 of the diff

      changed this line in [version 3 of the diff](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/2/diffs?diff_id=4937&start_sha=dc54f45ef859fb91fef2345df185ac3b4eb2643a#9331f3d6803b80e59ba5cd648677b3c6869d2ac8_3_3)
      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 04, 2020
    Last updated by Huỳnh Thiên Phước Aug 04, 2020
    app/views/cities/_cities_international.html.erb
    1 <% @cities_international.each do |city| %>
    2 <div class="col-3 remove-decoration">
    3 <%= link_to '#' do %>
    4 <div class="border border-dark rounded city-name">
    5 <div>
    6 <strong><%= city.name %></strong>
    7 </div>
    8 <div>
    9 <%= city.jobs.count %>
    10 </div>
    1 <div class="col-3 remove-decoration">
    • Hoang Phuc Do @phucdh commented Aug 04, 2020

      Đặt tên partial là _international.html.erb là được vì đang nằm trong thư mục cities

      Đặt tên partial là `_international.html.erb` là được vì đang nằm trong thư mục `cities`
    • Huỳnh Thiên Phước @phuocht commented Aug 04, 2020
      Master

      dạ a

      dạ a
    • Huỳnh Thiên Phước @phuocht

      changed this line in version 3 of the diff

      Aug 04, 2020

      changed this line in version 3 of the diff

      changed this line in [version 3 of the diff](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/2/diffs?diff_id=4937&start_sha=dc54f45ef859fb91fef2345df185ac3b4eb2643a#0221b204d1e67a63de5754db1fcd8c8a51b66bc5_1_0)
      Toggle commit list
    Please register or sign in to reply
  • Huỳnh Thiên Phước @phuocht

    added 1 commit

    • a08b33ca - Fix code in Controller

    Compare with previous version

    Aug 04, 2020

    added 1 commit

    • a08b33ca - Fix code in Controller

    Compare with previous version

    added 1 commit * a08b33ca - Fix code in Controller [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/2/diffs?diff_id=4937&start_sha=dc54f45ef859fb91fef2345df185ac3b4eb2643a)
    Toggle commit list
  • Huỳnh Thiên Phước @phuocht

    added 2 commits

    • 17665622 - fix csv importer at create job
    • 52e242c9 - fix csv importer at create job

    Compare with previous version

    Aug 05, 2020

    added 2 commits

    • 17665622 - fix csv importer at create job
    • 52e242c9 - fix csv importer at create job

    Compare with previous version

    added 2 commits * 17665622 - fix csv importer at create job * 52e242c9 - fix csv importer at create job [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/2/diffs?diff_id=4941&start_sha=a08b33cad7805d2a967335c9b0f93d4b6b7b82c9)
    Toggle commit list
  • Van Hau Le
    @haulv started a discussion on an old version of the diff Aug 05, 2020
    Last updated by Huỳnh Thiên Phước Aug 05, 2020
    app/models/city.rb
    2 2 has_many :city_jobs
    3 3 has_many :jobs, through: :city_jobs
    4 4
    5 def self.top_city
    6 joins(:jobs).group(:city_id).order('count(job_id) DESC').limit(9)
    7 end
    8 def self.all_city
    9 joins(:jobs).group(:city_id).order('count(job_id) DESC')
    10 end
    5 scope :top_city, -> { joins(:jobs).group(:city_id).order('count(job_id) DESC').limit(9) }
    6 scope :vietnam, -> { joins(:jobs).group(:city_id).order('count(job_id) DESC').where('location = 1') }
    7 scope :international, -> { joins(:jobs).group(:city_id).order('count(job_id) DESC').where('location = 0') }
    • Van Hau Le @haulv commented Aug 05, 2020
      Master

      @phuocht

      scope :international, -> { joins(:jobs).group(:city_id).order('count(job_id) DESC').where(location: 0) }
      @phuocht ```ruby scope :international, -> { joins(:jobs).group(:city_id).order('count(job_id) DESC').where(location: 0) } ```
    • Huỳnh Thiên Phước @phuocht commented Aug 05, 2020
      Master

      dạ a, v. để e fix cái scope VN lun

      dạ a, v. để e fix cái scope VN lun
    • Huỳnh Thiên Phước @phuocht

      changed this line in version 5 of the diff

      Aug 05, 2020

      changed this line in version 5 of the diff

      changed this line in [version 5 of the diff](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/2/diffs?diff_id=4948&start_sha=52e242c93bc0991fea994b8865e08f1122e7c3b9#28495972e963898abf2919ffeaeb92fbdf49fb8e_7_6)
      Toggle commit list
    Please register or sign in to reply
  • Huỳnh Thiên Phước @phuocht

    added 1 commit

    • 4c82e248 - fix csv relationship

    Compare with previous version

    Aug 05, 2020

    added 1 commit

    • 4c82e248 - fix csv relationship

    Compare with previous version

    added 1 commit * 4c82e248 - fix csv relationship [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/2/diffs?diff_id=4948&start_sha=52e242c93bc0991fea994b8865e08f1122e7c3b9)
    Toggle commit list
  • Huỳnh Thiên Phước @phuocht

    added 1 commit

    • ee5eb9e1 - rename variable

    Compare with previous version

    Aug 05, 2020

    added 1 commit

    • ee5eb9e1 - rename variable

    Compare with previous version

    added 1 commit * ee5eb9e1 - rename variable [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/2/diffs?diff_id=4949&start_sha=4c82e248002ee65ef5f07ea91122f6b8f8d1306f)
    Toggle commit list
  • Hoang Phuc Do
    @phucdh started a discussion on an old version of the diff Aug 07, 2020
    Last updated by Huỳnh Thiên Phước Aug 07, 2020
    app/views/layouts/_show_industries.html.erb
    2 <div class="col-4">
    3 <div class="row-table border border-dark rounded industry-list">
    4 <%= link_to '#' do %>
    5 <div class="industry-name"><strong><%= industry.name %></strong></div>
    6 <div class="count-job"><%= industry.jobs.count %></div>
    7 <% end %>
    8 </div>
    1 <div class="col-4">
    2 <div class="row-table border border-dark rounded industry-list">
    3 <%= link_to '#' do %>
    4 <div class="industry-name"><strong><%= industry.name %></strong></div>
    5 <div class="count-job"><%= industry.jobs.count %></div>
    6 <% end %>
    9 7 </div>
    10 <% end %>
    8 </div>
    • Hoang Phuc Do @phucdh commented Aug 07, 2020

      Partial này chỉ hiển thị thông tin chi tiết cho 1 industry nên đặt tên file là số ít:

      Ví dụ: _show_industry.html.erb

      Kiểm tra lại tên cho các mục tương tự như city, job

      Edited Aug 07, 2020 by Hoang Phuc Do
      Partial này chỉ hiển thị thông tin chi tiết cho 1 industry nên đặt tên file là số ít: Ví dụ: `_show_industry.html.erb` Kiểm tra lại tên cho các mục tương tự như city, job
    • Huỳnh Thiên Phước @phuocht

      changed this line in version 7 of the diff

      Aug 07, 2020

      changed this line in version 7 of the diff

      changed this line in [version 7 of the diff](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/2/diffs?diff_id=4969&start_sha=ee5eb9e1ee618fc319fb0dc1dfe097f7b6690188#610ca69bbd79ba9c04563e2330e53f1d6b0ee0ba_8_0)
      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 07, 2020
    Last updated by Huỳnh Thiên Phước Aug 07, 2020
    lib/src/crawler.rb
    78 78 info = Nokogiri::HTML(URI.open("https://careerbuilder.vn/viec-lam/tat-ca-viec-lam-trang-#{n}-vi.html"))
    79 79 links = info.css('div.caption a.company-name').map { |link| link['href'] }
    80 80 links.each do |link|
    81 next if link == 'javascript:void(0);'
    82 page = Nokogiri::HTML(URI.open(URI.escape(link)))
    83 name = page.search('p.name')&.text
    84 next if name.blank?
    85
    86 address = page.css('div.content p').children[1]&.text
    87 introduction = page.css('div.main-about-us').text
    88 81 begin
    82 next if link == 'javascript:void(0);'
    83 page = Nokogiri::HTML(URI.open(URI.escape(link)))
    • Hoang Phuc Do @phucdh commented Aug 07, 2020

      Sửa lại indent

      Sửa lại indent
    • Huỳnh Thiên Phước @phuocht

      changed this line in version 7 of the diff

      Aug 07, 2020

      changed this line in version 7 of the diff

      changed this line in [version 7 of the diff](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/2/diffs?diff_id=4969&start_sha=ee5eb9e1ee618fc319fb0dc1dfe097f7b6690188#8b9d28e5e4927c2446025b2b64159cc601866739_83_89)
      Toggle commit list
    Please register or sign in to reply
  • Huỳnh Thiên Phước @phuocht

    added 1 commit

    • 3e39495d - rename some files

    Compare with previous version

    Aug 07, 2020

    added 1 commit

    • 3e39495d - rename some files

    Compare with previous version

    added 1 commit * 3e39495d - rename some files [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/2/diffs?diff_id=4969&start_sha=ee5eb9e1ee618fc319fb0dc1dfe097f7b6690188)
    Toggle commit list
  • Huỳnh Thiên Phước @phuocht

    added 1 commit

    • 1f7dab8f - change logic city

    Compare with previous version

    Aug 07, 2020

    added 1 commit

    • 1f7dab8f - change logic city

    Compare with previous version

    added 1 commit * 1f7dab8f - change logic city [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/2/diffs?diff_id=4971&start_sha=3e39495d0487c11526517e4a12077d4a1165b63c)
    Toggle commit list
  • Huỳnh Thiên Phước @phuocht

    added 1 commit

    • a8e034a4 - add constant variable

    Compare with previous version

    Aug 07, 2020

    added 1 commit

    • a8e034a4 - add constant variable

    Compare with previous version

    added 1 commit * a8e034a4 - add constant variable [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/2/diffs?diff_id=4973&start_sha=1f7dab8f2d2f0492dc13f3bf5e45ac509497ea87)
    Toggle commit list
  • Huỳnh Thiên Phước @phuocht

    added 5 commits

    • a8e034a4...784ae619 - 4 commits from branch master
    • 5ca97b87 - Merge branch 'master' into 'industry_list'

    Compare with previous version

    Aug 07, 2020

    added 5 commits

    • a8e034a4...784ae619 - 4 commits from branch master
    • 5ca97b87 - Merge branch 'master' into 'industry_list'

    Compare with previous version

    added 5 commits * a8e034a4...784ae619 - 4 commits from branch `master` * 5ca97b87 - Merge branch &#x27;master&#x27; into &#x27;industry_list&#x27; [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/2/diffs?diff_id=4974&start_sha=a8e034a4ccce6d1d5d2e09cf4510a4a364a3ce51)
    Toggle commit list
  • Van Hau Le
    @haulv started a discussion on an old version of the diff Aug 10, 2020
    Last updated by Huỳnh Thiên Phước Aug 10, 2020
    lib/src/crawler.rb
    43 43 def city_relationship(row, job)
    44 44 location_relationship = row.css('div.map p a').children.map { |name_city| name_city.text.strip }
    45 45 cities_relationship = City.where(name: location_relationship)
    46 city_job_relationship = CityJob.where(job_id: job.id ,city_id: cities_relationship.ids)
    46 47
    47 job.cities << cities_relationship
    48 if city_job_relationship.blank?
    49 job.cities << cities_relationship
    • Van Hau Le @haulv commented Aug 10, 2020
      Master

      job.cities << cities_relationship if city_job_relationship.blank?

      `job.cities << cities_relationship if city_job_relationship.blank?`
    • Huỳnh Thiên Phước @phuocht

      changed this line in version 11 of the diff

      Aug 10, 2020

      changed this line in version 11 of the diff

      changed this line in [version 11 of the diff](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/2/diffs?diff_id=4976&start_sha=5ca97b8794ca1162eae0c492ad37c32c186c27ee#8b9d28e5e4927c2446025b2b64159cc601866739_49_48)
      Toggle commit list
    Please register or sign in to reply
  • Van Hau Le
    @haulv started a discussion on an old version of the diff Aug 10, 2020
    Last updated by Huỳnh Thiên Phước Aug 10, 2020
    lib/src/crawler.rb
    46 city_job_relationship = CityJob.where(job_id: job.id ,city_id: cities_relationship.ids)
    46 47
    47 job.cities << cities_relationship
    48 if city_job_relationship.blank?
    49 job.cities << cities_relationship
    50 end
    48 51 end
    49 52
    50 53 def industry_relationship(row, job)
    51 54 industry_relationship = row.css('li a').children.map { |name_industry| name_industry.text.strip }
    52 55 industries_relationship = Industry.where(name: industry_relationship)
    56 industry_job_relationship = IndustryJob.where(job_id: job.id, industry_id: industries_relationship.ids)
    53 57
    54 job.industries << industries_relationship
    58 if industry_job_relationship.blank?
    59 job.industries << industries_relationship
    • Van Hau Le @haulv commented Aug 10, 2020
      Master

      @phuocht tương tự như city

      @phuocht tương tự như city
    • Huỳnh Thiên Phước @phuocht commented Aug 10, 2020
      Master

      dạ ok để e sửa lại

      dạ ok để e sửa lại
    • Huỳnh Thiên Phước @phuocht

      changed this line in version 11 of the diff

      Aug 10, 2020

      changed this line in version 11 of the diff

      changed this line in [version 11 of the diff](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/2/diffs?diff_id=4976&start_sha=5ca97b8794ca1162eae0c492ad37c32c186c27ee#8b9d28e5e4927c2446025b2b64159cc601866739_59_56)
      Toggle commit list
    Please register or sign in to reply
  • Huỳnh Thiên Phước
    @phuocht started a discussion on an old version of the diff Aug 10, 2020
    Last updated by Huỳnh Thiên Phước Aug 10, 2020
    app/controllers/cities_controller.rb
    1 1 class CitiesController < ApplicationController
    2 VIETNAM = 1
    3 FOREIGN = 0
    2 4 def index
    3 @cities_vietnam = City.all_city.vietnam
    4 @cities_international = City.all_city.international
    5 @cities_vietnam = City.location(VIETNAM)
    6 @cities_international = City.location(FOREIGN)
    • Huỳnh Thiên Phước @phuocht commented Aug 10, 2020
      Master

      dạ a

      dạ a
    • Huỳnh Thiên Phước @phuocht

      changed this line in version 11 of the diff

      Aug 10, 2020

      changed this line in version 11 of the diff

      changed this line in [version 11 of the diff](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/2/diffs?diff_id=4976&start_sha=5ca97b8794ca1162eae0c492ad37c32c186c27ee#9331f3d6803b80e59ba5cd648677b3c6869d2ac8_6_3)
      Toggle commit list
    Please register or sign in to reply
  • Huỳnh Thiên Phước @phuocht

    added 5 commits

    • 8aac2ef3 - move Constant Variable to model, append relationship
    • d4fbe2af - change logic job_parser
    • 77497c1e - add file
    • 58853b7c - refresh
    • 484d787f - Merge branch 'industry_list' of gitlab.zigexn.vn:phuocht/venjob into industry_list

    Compare with previous version

    Aug 10, 2020

    added 5 commits

    • 8aac2ef3 - move Constant Variable to model, append relationship
    • d4fbe2af - change logic job_parser
    • 77497c1e - add file
    • 58853b7c - refresh
    • 484d787f - Merge branch 'industry_list' of gitlab.zigexn.vn:phuocht/venjob into industry_list

    Compare with previous version

    added 5 commits * 8aac2ef3 - move Constant Variable to model, append relationship * d4fbe2af - change logic job_parser * 77497c1e - add file * 58853b7c - refresh * 484d787f - Merge branch &#x27;industry_list&#x27; of gitlab.zigexn.vn:phuocht&#x2F;venjob into industry_list [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/2/diffs?diff_id=4976&start_sha=5ca97b8794ca1162eae0c492ad37c32c186c27ee)
    Toggle commit list
  • Huỳnh Thiên Phước @phuocht

    added 1 commit

    • e50619f2 - fix indent

    Compare with previous version

    Aug 10, 2020

    added 1 commit

    • e50619f2 - fix indent

    Compare with previous version

    added 1 commit * e50619f2 - fix indent [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/2/diffs?diff_id=4977&start_sha=484d787f83cc34c7396953286151c489b90165a9)
    Toggle commit list
  • Huỳnh Thiên Phước @phuocht

    added 1 commit

    • c113d3e9 - Append condition in crawl City

    Compare with previous version

    Aug 10, 2020

    added 1 commit

    • c113d3e9 - Append condition in crawl City

    Compare with previous version

    added 1 commit * c113d3e9 - Append condition in crawl City [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/2/diffs?diff_id=4979&start_sha=e50619f2e6d1e80bdbf7958915f38728dae41cb2)
    Toggle commit list
  • Van Hau Le @haulv

    mentioned in commit df25189d

    Aug 11, 2020

    mentioned in commit df25189d

    mentioned in commit df25189d6c09c4f6230d18ebd7669ea7099f829e
    Toggle commit list
  • Van Hau Le @haulv

    merged

    Aug 11, 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: phuocht/venjob!2
×

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.