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
  • Đường Sỹ Hoàng
  • VenJob
  • Merge Requests
  • !4

Merged
Opened Dec 13, 2019 by Đường Sỹ Hoàng@hoangds 
  • Report abuse
Report abuse

feature/top page/ top industries

_Create header with logo and url lists, create scope in Job model , add bootstrap files in stylesheet.Wirte custom css for index.html.erb.

_Add total jobs in header, show top cities, use custom.scss.

_Import from CSV for Industry & IndustryJob table.Add view for industry list, config Industry model, top_controller and settings.yml for limit industry, industry_list

Edited Dec 19, 2019 by Đường Sỹ Hoàng
×

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/top_page origin/feature/top_page

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/top_page

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 25
  • Commits 12
  • Changes 26
{{ resolvedDiscussionCount }}/{{ discussionCount }} {{ resolvedCountText }} resolved
  • Van Hau Le
    @haulv started a discussion on an old version of the diff Dec 13, 2019
    Resolved by Đường Sỹ Hoàng Dec 18, 2019
    app/models/job.rb
    1 1 class Job < ApplicationRecord
    2 2 has_many :user_jobs
    3 3 has_many :city_jobs
    4 scope :latest_job, -> {order(created_at: :desc).limit 5}
    • Van Hau Le @haulv commented Dec 13, 2019
      Master

      @hoangds không dùng scope cho trường hợp này nha e!

      @hoangds không dùng scope cho trường hợp này nha e!
    • Đường Sỹ Hoàng @hoangds

      changed this line in version 2 of the diff

      Dec 17, 2019

      changed this line in version 2 of the diff

      changed this line in [version 2 of the diff](https://gitlab.zigexn.vn/hoangds/VenJob/merge_requests/4/diffs?diff_id=4486&start_sha=c4212b67944474b4febcf99bee9e38da6db9cd29#742abd5cbc2b12d2da315862ace6297c7d6dcb87_4_4)
      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 13, 2019
    Resolved by Đường Sỹ Hoàng Dec 18, 2019
    app/views/jobs/index.html.erb 0 → 100644
    1 <div class="center jumbotron">
    2 <head>
    3 <title><%= yield(:title) %> Venjob</title>
    4 <meta name="viewport" content="width=device-width, initial-scale=1">
    5 </head>
    6 <!--List of latest jobs-->
    7 <div class="Job list">
    8 <div class="Job-title-wrapper">
    9 <h3>Latest</h3>
    10 </div>
    11 <div class="Job-content-wrapper">
    12 <% @jobs.latest_job.each do |job| %>
    • Van Hau Le @haulv commented Dec 13, 2019
      Master

      @hoangds Nếu muốn dùng scope. CHỗ này phải gọi Job.latest_job nhé! Scope của 1 class chỉ được gọi thông qua class hoặc associations của class đó, ko gọi kiểu này nhe em! Đọc lại về scope nhé em!

      https://guides.rubyonrails.org/active_record_querying.html

      @hoangds Nếu muốn dùng scope. CHỗ này phải gọi `Job.latest_job` nhé! Scope của 1 class chỉ được gọi thông qua class hoặc associations của class đó, ko gọi kiểu này nhe em! Đọc lại về scope nhé em! https://guides.rubyonrails.org/active_record_querying.html
    • Đường Sỹ Hoàng @hoangds

      changed this line in version 2 of the diff

      Dec 17, 2019

      changed this line in version 2 of the diff

      changed this line in [version 2 of the diff](https://gitlab.zigexn.vn/hoangds/VenJob/merge_requests/4/diffs?diff_id=4486&start_sha=c4212b67944474b4febcf99bee9e38da6db9cd29#fd4909543e4d41ae0af907baf233a50d8e08d125_12_13)
      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 13, 2019
    Resolved by Đường Sỹ Hoàng Dec 18, 2019
    lib/tasks/import_job_csv.rake
    12 address: row["company address"]
    13 }
    14 company = Company.find_or_initialize_by(code: row["company id"])
    15 company.update(company_params)
    16
    17 job_params = {
    18 description: row["description"],
    19 position: row["level"],
    20 salary: row["salary"],
    21 requirement: row["requirement"]
    22 }
    23 job = Job.find_or_initialize_by(title: row["name"], company_id: company.id)
    24 job.update(job_params)
    25
    26 city_params = {
    27 region: row["company province"]
    • Van Hau Le @haulv commented Dec 13, 2019
      Master

      @hoangds sửa lại indent nha em! Hoặc là inline:

      city_params = { region: row["company province"] }

      Hoặc chỉ indent dùng 2 spaces:

      city_params = {
        region: row["company province"]
      }
      Edited Dec 13, 2019 by Van Hau Le
      @hoangds sửa lại indent nha em! Hoặc là inline: `city_params = { region: row["company province"] }` Hoặc chỉ indent dùng 2 spaces: ``` city_params = { region: row["company province"] } ```
    • Đường Sỹ Hoàng @hoangds

      changed this line in version 2 of the diff

      Dec 17, 2019

      changed this line in version 2 of the diff

      changed this line in [version 2 of the diff](https://gitlab.zigexn.vn/hoangds/VenJob/merge_requests/4/diffs?diff_id=4486&start_sha=c4212b67944474b4febcf99bee9e38da6db9cd29#9b001ac4af0484ae9bfa4e24b31a882de5a68a53_27_25)
      Toggle commit list
    Please register or sign in to reply
  • Van Hau Le
    @haulv started a discussion on the diff Dec 13, 2019
    Resolved by Đường Sỹ Hoàng Dec 18, 2019
    lib/tasks/import_job_csv.rake
    20 position: row["level"],
    21 salary: row["salary"],
    22 requirement: row["requirement"]
    23 }
    24 job = Job.find_or_initialize_by(title: row["name"], company_id: company.id)
    25 job.update(job_params)
    26 rescue
    27 import_logger = ActiveSupport::Logger.new("log/import.log")
    28 import_logger.error "Skip #{row}"
    29 next
    4 namespace :job do
    5 desc "Import CSV file into database"
    6 task import_csv: :environment do
    7 csv_file = Settings.import_job.csv_file
    8 CSV.foreach(csv_file, headers: true) do |row|
    9 company_params = {
    • Van Hau Le @haulv commented Dec 13, 2019
      Master

      @hoangds sửa lại indent như comment bên dưới

      @hoangds sửa lại indent như comment bên dưới
    Please register or sign in to reply
  • Đường Sỹ Hoàng @hoangds

    changed title from First commit to Top page ( latest jobs)

    Dec 13, 2019

    changed title from First commit to Top page ( latest jobs)

    changed title from **{-First commit-}** to **{+Top page ( latest jobs)+}**
    Toggle commit list
  • Đường Sỹ Hoàng @hoangds

    changed title from Top page ( latest jobs) to feature/top page/ latest jobs

    Dec 13, 2019

    changed title from Top page ( latest jobs) to feature/top page/ latest jobs

    changed title from **{-Top page ( latest jobs)-}** to **{+feature/top page/ latest jobs+}**
    Toggle commit list
  • Đường Sỹ Hoàng @hoangds

    added 1 commit

    • a08e8005 - City list

    Compare with previous version

    Dec 17, 2019

    added 1 commit

    • a08e8005 - City list

    Compare with previous version

    added 1 commit * a08e8005 - City list [Compare with previous version](https://gitlab.zigexn.vn/hoangds/VenJob/merge_requests/4/diffs?diff_id=4486&start_sha=c4212b67944474b4febcf99bee9e38da6db9cd29)
    Toggle commit list
  • Đường Sỹ Hoàng @hoangds

    added 1 commit

    • c0d06082 - Changed h5

    Compare with previous version

    Dec 17, 2019

    added 1 commit

    • c0d06082 - Changed h5

    Compare with previous version

    added 1 commit * c0d06082 - Changed h5 [Compare with previous version](https://gitlab.zigexn.vn/hoangds/VenJob/merge_requests/4/diffs?diff_id=4487&start_sha=a08e8005e20c8bef1c73d01d3ada4df623f0121b)
    Toggle commit list
  • Son Do Hong
    @sondh started a discussion on an old version of the diff Dec 18, 2019
    Resolved by Đường Sỹ Hoàng Dec 18, 2019
    app/assets/stylesheets/custom.css 0 → 100644
    43 color: #fff;
    44 text-decoration: none;
    45 }
    46
    47 #banner {
    48 width: 100%;
    49 padding: 0px;
    50 }
    51
    52 .inverse {
    53 overflow: hidden;
    54 background-color: gray;
    55 }
    56
    57 ul {
    58 float: right;
    • Son Do Hong @sondh commented Dec 18, 2019
      Master

      tránh chỉnh sửa như này em ơi, customize css bằng class tránh ảnh hưởng đến những phần khác

      Edited Dec 18, 2019
      tránh chỉnh sửa như này em ơi, customize css bằng class tránh ảnh hưởng đến những phần khác
    • Đường Sỹ Hoàng @hoangds

      changed this line in version 4 of the diff

      Dec 18, 2019

      changed this line in version 4 of the diff

      changed this line in [version 4 of the diff](https://gitlab.zigexn.vn/hoangds/VenJob/merge_requests/4/diffs?diff_id=4498&start_sha=c0d0608254443ffeabb099ffc65b14be61731f1d#40b0938af142547662287a63ee05b7c782ec2de5_58_0)
      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 18, 2019
    Resolved by Đường Sỹ Hoàng Dec 18, 2019
    app/controllers/jobs_controller.rb 0 → 100644
    1 class JobsController < ApplicationController
    2 def index
    3 @latest_jobs = Job.latest_city.take(5)
    • Son Do Hong @sondh commented Dec 18, 2019
      Master

      cho số 5, 9 vào trong file setting

      Edited Dec 18, 2019
      cho số 5, 9 vào trong file setting
    • Đường Sỹ Hoàng @hoangds

      changed this line in version 4 of the diff

      Dec 18, 2019

      changed this line in version 4 of the diff

      changed this line in [version 4 of the diff](https://gitlab.zigexn.vn/hoangds/VenJob/merge_requests/4/diffs?diff_id=4498&start_sha=c0d0608254443ffeabb099ffc65b14be61731f1d#6fa69a07843a58f190bf4d7e0692b9cc5b0bf52b_3_2)
      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 18, 2019
    Resolved by Đường Sỹ Hoàng Dec 18, 2019
    app/models/city.rb
    1 1 class City < ApplicationRecord
    2 2 has_many :city_jobs
    3 has_many :jobs, through: :city_jobs
    4
    5 def self.sort_top_cities
    6 @cities||= all.sort_by(&:jobs_count).reverse
    • Son Do Hong @sondh commented Dec 18, 2019
      Master

      thiếu space

      Edited Dec 18, 2019
      thiếu space
    • Đường Sỹ Hoàng @hoangds

      changed this line in version 4 of the diff

      Dec 18, 2019

      changed this line in version 4 of the diff

      changed this line in [version 4 of the diff](https://gitlab.zigexn.vn/hoangds/VenJob/merge_requests/4/diffs?diff_id=4498&start_sha=c0d0608254443ffeabb099ffc65b14be61731f1d#28495972e963898abf2919ffeaeb92fbdf49fb8e_6_6)
      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 18, 2019
    Resolved by Đường Sỹ Hoàng Dec 18, 2019
    app/models/city.rb
    1 1 class City < ApplicationRecord
    2 2 has_many :city_jobs
    3 has_many :jobs, through: :city_jobs
    4
    5 def self.sort_top_cities
    6 @cities||= all.sort_by(&:jobs_count).reverse
    7 end
    8
    9 def jobs_count
    10 @jobs_count = jobs.count
    • Son Do Hong @sondh commented Dec 18, 2019
      Master

      ||=

      Edited Dec 18, 2019
      ||=
    • Đường Sỹ Hoàng @hoangds

      changed this line in version 4 of the diff

      Dec 18, 2019

      changed this line in version 4 of the diff

      changed this line in [version 4 of the diff](https://gitlab.zigexn.vn/hoangds/VenJob/merge_requests/4/diffs?diff_id=4498&start_sha=c0d0608254443ffeabb099ffc65b14be61731f1d#28495972e963898abf2919ffeaeb92fbdf49fb8e_10_10)
      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 18, 2019
    Resolved by Đường Sỹ Hoàng Dec 18, 2019
    config/environment.rb
    3 3
    4 4 # Initialize the Rails application.
    5 5 Rails.application.initialize!
    6 # # Rails.logger = Logger.new(STDOUT)
    7 # # config.logger = ActiveSupport::Logger.new("log/#{Rails.env}.log")
    6 # Rails.logger = Logger.new(STDOUT)
    • Son Do Hong @sondh commented Dec 18, 2019
      Master

      xóa hết comment

      Edited Dec 18, 2019
      xóa hết comment
    • Đường Sỹ Hoàng @hoangds

      changed this line in version 5 of the diff

      Dec 18, 2019

      changed this line in version 5 of the diff

      changed this line in [version 5 of the diff](https://gitlab.zigexn.vn/hoangds/VenJob/merge_requests/4/diffs?diff_id=4499&start_sha=a18a5d62ed2db159a1a24c95fc93b665f3410849#32cf963bc694248c5a463e17894503af06f93fdd_6_6)
      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 18, 2019
    Resolved by Đường Sỹ Hoàng Dec 18, 2019
    app/views/layouts/_header.html.erb 0 → 100644
    3 <%= link_to image_tag("zigexn_logo.png", id: "logo", alt: "Venjob logo") %>
    4 <nav>
    5 <ul>
    6 <li class="btn-navbar"><%=link_to "Login", '#' %></li>
    7 <li class="btn-navbar"><%=link_to "Register", '#' %></li>
    8 </ul>
    9 <ul>
    10 <ul>
    11 <li class="btn-navbar"><%=link_to "Favorite", '#' %></li>
    12 <li class="btn-navbar"><%=link_to "History", '#' %></li>
    13 </ul>
    14 </nav>
    15 <%= link_to image_tag("banner.jpg", id: "banner", alt: "Venjob banner") %>
    16 </div>
    17 <div class="container">
    18 <%= yield %>
    • Son Do Hong @sondh commented Dec 18, 2019
      Master

      đây là body mà, sao lại cho vào header đc

      Edited Dec 18, 2019
      đây là body mà, sao lại cho vào header đc
    • Đường Sỹ Hoàng @hoangds

      changed this line in version 4 of the diff

      Dec 18, 2019

      changed this line in version 4 of the diff

      changed this line in [version 4 of the diff](https://gitlab.zigexn.vn/hoangds/VenJob/merge_requests/4/diffs?diff_id=4498&start_sha=c0d0608254443ffeabb099ffc65b14be61731f1d#12e0ffa73350b6f8b572afab727eeab71ee1df63_18_15)
      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 18, 2019
    Resolved by Đường Sỹ Hoàng Dec 18, 2019
    app/views/layouts/application.html.erb
    5 5 <%= csrf_meta_tags %>
    6 6 <%= csp_meta_tag %>
    7
    8 7 <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
    9 8 <%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %>
    10 9 </head>
    11
    12 <body>
    13 <%= yield %>
    14 </body>
    10 <body>
    11 <header>
    12 <%= render partial: "layouts/header" %>
    13 </header>
    14 <footer>
    15 <%= render partial: "layouts/footer" %>
    • Son Do Hong @sondh commented Dec 18, 2019
      Master

      render "layouts/footer"

      Edited Dec 18, 2019
      `render "layouts/footer"`
    • Đường Sỹ Hoàng @hoangds

      changed this line in version 5 of the diff

      Dec 18, 2019

      changed this line in version 5 of the diff

      changed this line in [version 5 of the diff](https://gitlab.zigexn.vn/hoangds/VenJob/merge_requests/4/diffs?diff_id=4499&start_sha=a18a5d62ed2db159a1a24c95fc93b665f3410849#e82294e631b91cb53fe2e362dfd3b8e4a3924ae2_15_18)
      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 18, 2019
    Resolved by Đường Sỹ Hoàng Dec 18, 2019
    config/routes.rb
    1 1 Rails.application.routes.draw do
    2 root "jobs#index"
    3 resource :jobs
    • Son Do Hong @sondh commented Dec 18, 2019
      Master

      giới hạn các action sẽ được sử dụng

      Edited Dec 18, 2019
      giới hạn các action sẽ được sử dụng
    • Đường Sỹ Hoàng @hoangds

      changed this line in version 6 of the diff

      Dec 18, 2019

      changed this line in version 6 of the diff

      changed this line in [version 6 of the diff](https://gitlab.zigexn.vn/hoangds/VenJob/merge_requests/4/diffs?diff_id=4500&start_sha=130746997ff6a20d5ee606f003e077bc4fa7b420#e801163eb9182955dca3eb9817d59af634f6665d_3_2)
      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 18, 2019
    Resolved by Đường Sỹ Hoàng Dec 18, 2019
    app/models/job.rb
    1 1 class Job < ApplicationRecord
    2 2 has_many :user_jobs
    3 3 has_many :city_jobs
    4
    5 def self.latest_city
    6 @latest = Job.order(created_at: :desc)
    • Van Hau Le @haulv commented Dec 18, 2019
      Master

      @hoangds thiếu || kìa em!

      Edited Dec 18, 2019
      @hoangds thiếu || kìa em!
    • Đường Sỹ Hoàng @hoangds

      changed this line in version 5 of the diff

      Dec 18, 2019

      changed this line in version 5 of the diff

      changed this line in [version 5 of the diff](https://gitlab.zigexn.vn/hoangds/VenJob/merge_requests/4/diffs?diff_id=4499&start_sha=a18a5d62ed2db159a1a24c95fc93b665f3410849#742abd5cbc2b12d2da315862ace6297c7d6dcb87_6_6)
      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 18, 2019
    Resolved by Đường Sỹ Hoàng Dec 18, 2019
    lib/tasks/import_job_csv.rake
    16 job_params = {
    17 description: row["description"],
    18 position: row["level"],
    19 salary: row["salary"],
    20 requirement: row["requirement"]
    21 }
    22 job = Job.find_or_initialize_by(title: row["name"], company_id: company.id)
    23 job.update(job_params)
    24
    25 city_params = { region: row["company province"] }
    26 city = City.find_or_initialize_by(name: row["work place"])
    27 city.update(city_params)
    28 city_job_params = { city_id: city.id }
    29 city_job = CityJob.find_or_initialize_by(job_id: job.id)
    30 city_job.update(city_job_params)
    31 rescue
    • Son Do Hong @sondh commented Dec 18, 2019
      Master

      indent, sang trái 1 tab, để rescue thẳng với do

      Edited Dec 18, 2019
      indent, sang trái 1 tab, để rescue thẳng với `do`
    • Đường Sỹ Hoàng @hoangds

      changed this line in version 5 of the diff

      Dec 18, 2019

      changed this line in version 5 of the diff

      changed this line in [version 5 of the diff](https://gitlab.zigexn.vn/hoangds/VenJob/merge_requests/4/diffs?diff_id=4499&start_sha=a18a5d62ed2db159a1a24c95fc93b665f3410849#9b001ac4af0484ae9bfa4e24b31a882de5a68a53_31_31)
      Toggle commit list
    Please register or sign in to reply
  • Đường Sỹ Hoàng @hoangds

    added 1 commit

    • a18a5d62 - Fixed scss& import_csv

    Compare with previous version

    Dec 18, 2019

    added 1 commit

    • a18a5d62 - Fixed scss& import_csv

    Compare with previous version

    added 1 commit * a18a5d62 - Fixed scss&amp; import_csv [Compare with previous version](https://gitlab.zigexn.vn/hoangds/VenJob/merge_requests/4/diffs?diff_id=4498&start_sha=c0d0608254443ffeabb099ffc65b14be61731f1d)
    Toggle commit list
  • Đường Sỹ Hoàng @hoangds

    added 1 commit

    • 13074699 - Fixed indentation & header

    Compare with previous version

    Dec 18, 2019

    added 1 commit

    • 13074699 - Fixed indentation & header

    Compare with previous version

    added 1 commit * 13074699 - Fixed indentation &amp; header [Compare with previous version](https://gitlab.zigexn.vn/hoangds/VenJob/merge_requests/4/diffs?diff_id=4499&start_sha=a18a5d62ed2db159a1a24c95fc93b665f3410849)
    Toggle commit list
  • Đường Sỹ Hoàng @hoangds

    added 1 commit

    • dfd34b1a - Limit resource

    Compare with previous version

    Dec 18, 2019

    added 1 commit

    • dfd34b1a - Limit resource

    Compare with previous version

    added 1 commit * dfd34b1a - Limit resource [Compare with previous version](https://gitlab.zigexn.vn/hoangds/VenJob/merge_requests/4/diffs?diff_id=4500&start_sha=130746997ff6a20d5ee606f003e077bc4fa7b420)
    Toggle commit list
  • Đường Sỹ Hoàng @hoangds

    changed title from feature/top page/ latest jobs to feature/top page/ top cities

    Dec 18, 2019

    changed title from feature/top page/ latest jobs to feature/top page/ top cities

    changed title from **feature/top page/ {-latest job-}s** to **feature/top page/ {+top citie+}s**
    Toggle commit list
  • Đường Sỹ Hoàng @hoangds

    changed the description

    Dec 18, 2019

    changed the description

    changed the description
    Toggle commit list
  • Son Do Hong
    @sondh started a discussion on an old version of the diff Dec 18, 2019
    Resolved by Đường Sỹ Hoàng Dec 18, 2019
    app/views/layouts/application.html.erb
    2 2 <html>
    3 3 <head>
    4 <title>VenJob</title>
    4 <title><%= yield(:title) %>Venjob</title>
    5 5 <%= csrf_meta_tags %>
    6 6 <%= csp_meta_tag %>
    7
    8 7 <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
    9 8 <%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %>
    10 9 </head>
    11
    12 <body>
    13 <%= yield %>
    14 </body>
    10 <body>
    11 <header>
    • Son Do Hong @sondh commented Dec 18, 2019
      Master

      sao nhiều header vậy, trong layouts/header có thẻ header rồi mà

      Edited Dec 18, 2019
      sao nhiều header vậy, trong `layouts/header` có thẻ header rồi mà
    • Đường Sỹ Hoàng @hoangds

      changed this line in version 7 of the diff

      Dec 18, 2019

      changed this line in version 7 of the diff

      changed this line in [version 7 of the diff](https://gitlab.zigexn.vn/hoangds/VenJob/merge_requests/4/diffs?diff_id=4501&start_sha=dfd34b1a3b3e3a95daccdcaf60d1c789eb6d13da#e82294e631b91cb53fe2e362dfd3b8e4a3924ae2_11_11)
      Toggle commit list
    Please register or sign in to reply
  • Đường Sỹ Hoàng @hoangds

    resolved all discussions

    Dec 18, 2019

    resolved all discussions

    resolved all discussions
    Toggle commit list
  • Đường Sỹ Hoàng @hoangds

    added 2 commits

    • 64c4a66e - Changed settings
    • cfd5dba8 - Changed setting

    Compare with previous version

    Dec 18, 2019

    added 2 commits

    • 64c4a66e - Changed settings
    • cfd5dba8 - Changed setting

    Compare with previous version

    added 2 commits * 64c4a66e - Changed settings * cfd5dba8 - Changed setting [Compare with previous version](https://gitlab.zigexn.vn/hoangds/VenJob/merge_requests/4/diffs?diff_id=4501&start_sha=dfd34b1a3b3e3a95daccdcaf60d1c789eb6d13da)
    Toggle commit list
  • Đường Sỹ Hoàng @hoangds

    resolved all discussions

    Dec 18, 2019

    resolved all discussions

    resolved all discussions
    Toggle commit list
  • Đường Sỹ Hoàng @hoangds

    resolved all discussions

    Dec 18, 2019

    resolved all discussions

    resolved all discussions
    Toggle commit list
  • Đường Sỹ Hoàng @hoangds

    resolved all discussions

    Dec 18, 2019

    resolved all discussions

    resolved all discussions
    Toggle commit list
  • Đường Sỹ Hoàng @hoangds

    resolved all discussions

    Dec 18, 2019

    resolved all discussions

    resolved all discussions
    Toggle commit list
  • Đường Sỹ Hoàng @hoangds

    resolved all discussions

    Dec 18, 2019

    resolved all discussions

    resolved all discussions
    Toggle commit list
  • Hiếu Lê
    @hieulh started a discussion on an old version of the diff Dec 18, 2019
    Last updated by Đường Sỹ Hoàng Dec 18, 2019
    app/assets/stylesheets/custom.scss 0 → 100644
    58 }
    59
    60 .row {
    61 padding: 5px;
    62 margin: 5px;
    63 background-color: $sub-color;
    64 }
    65
    66 .col-sm {
    67 margin: 5px;
    68 padding: 5px;
    69 background-color: $primary-color;
    70 }
    71
    72 .form-inline-city {
    73 margin-left: 1000px;
    • Hiếu Lê @hieulh commented Dec 18, 2019
      Master

      Cẩn thận mấy chỗ này, giả sử màn hình của user nhỏ hơn 1000px thì cái city chạy đi đâu :) Tương tự: .count-total

      Cẩn thận mấy chỗ này, giả sử màn hình của user nhỏ hơn 1000px thì cái city chạy đi đâu :) Tương tự: `.count-total`
    • Đường Sỹ Hoàng @hoangds

      changed this line in version 8 of the diff

      Dec 18, 2019

      changed this line in version 8 of the diff

      changed this line in [version 8 of the diff](https://gitlab.zigexn.vn/hoangds/VenJob/merge_requests/4/diffs?diff_id=4510&start_sha=cfd5dba8ad8b7af147b6d69d7c1eed73d7abb2b8#79a66919b2dd7890dc5d183a3a7a2dd60f7447b3_73_68)
      Toggle commit list
    Please register or sign in to reply
  • Hiếu Lê
    @hieulh started a discussion on an old version of the diff Dec 18, 2019
    Gemfile.lock
    285 296 DEPENDENCIES
    286 297 activerecord-import
    287 298 bootsnap (>= 1.4.2)
    299 bootstrap-sass (= 3.3.7)
    288 300 byebug
    289 301 capybara (>= 2.15)
    290 302 config
    • Hiếu Lê @hieulh commented Dec 18, 2019
      Master

      Gemfile có bị thay đổi không sao Gemfile.lock lại bị thay đổi vậy?

      `Gemfile` có bị thay đổi không sao `Gemfile.lock` lại bị thay đổi vậy?
    Please register or sign in to reply
  • Hiếu Lê
    @hieulh started a discussion on an old version of the diff Dec 18, 2019
    Last updated by Đường Sỹ Hoàng Dec 18, 2019
    lib/tasks/import_job_csv.rake
    24 job = Job.find_or_initialize_by(title: row["name"], company_id: company.id)
    25 job.update(job_params)
    16 job_params = {
    17 description: row["description"],
    18 position: row["level"],
    19 salary: row["salary"],
    20 requirement: row["requirement"]
    21 }
    22 job = Job.find_or_initialize_by(title: row["name"], company_id: company.id)
    23 job.update(job_params)
    24
    25 city_params = { region: row["work place"] }
    26 city = City.find_or_initialize_by(name: row["company province"])
    27 city.update(city_params)
    28 city_job_params = { city_id: city.id }
    29 city_job = CityJob.find_or_initialize_by(job_id: job.id)
    • Hiếu Lê @hieulh commented Dec 18, 2019
      Master

      Dòng này có nghĩa bảng này đối với 1 job_id thì sẽ chỉ có 1 record thôi. Nhưng anh xem model thì nó được define là has_many như vậy logic chỗ này có đúng không? em check lại 1 lần.

      Dòng này có nghĩa bảng này đối với 1 `job_id` thì sẽ chỉ có 1 record thôi. Nhưng anh xem model thì nó được define là `has_many` như vậy logic chỗ này có đúng không? em check lại 1 lần.
    • Son Do Hong @sondh commented Dec 18, 2019
      Master

      CityJob.find_or_initialize_by(job_id: job.id, city_id: city.id)

      `CityJob.find_or_initialize_by(job_id: job.id, city_id: city.id)`
    • Đường Sỹ Hoàng @hoangds

      changed this line in version 8 of the diff

      Dec 18, 2019

      changed this line in version 8 of the diff

      changed this line in [version 8 of the diff](https://gitlab.zigexn.vn/hoangds/VenJob/merge_requests/4/diffs?diff_id=4510&start_sha=cfd5dba8ad8b7af147b6d69d7c1eed73d7abb2b8#9b001ac4af0484ae9bfa4e24b31a882de5a68a53_29_28)
      Toggle commit list
    Please register or sign in to reply
  • Đường Sỹ Hoàng @hoangds

    added 1 commit

    • 4864e811 - Fixed scss & cityjob model

    Compare with previous version

    Dec 18, 2019

    added 1 commit

    • 4864e811 - Fixed scss & cityjob model

    Compare with previous version

    added 1 commit * 4864e811 - Fixed scss &amp; cityjob model [Compare with previous version](https://gitlab.zigexn.vn/hoangds/VenJob/merge_requests/4/diffs?diff_id=4510&start_sha=cfd5dba8ad8b7af147b6d69d7c1eed73d7abb2b8)
    Toggle commit list
  • Đường Sỹ Hoàng @hoangds

    added 1 commit

    • 38dc6cb2 - Changed gem file

    Compare with previous version

    Dec 19, 2019

    added 1 commit

    • 38dc6cb2 - Changed gem file

    Compare with previous version

    added 1 commit * 38dc6cb2 - Changed gem file [Compare with previous version](https://gitlab.zigexn.vn/hoangds/VenJob/merge_requests/4/diffs?diff_id=4515&start_sha=4864e8113b8c55cb3b136ecd607d3cbee87c0d87)
    Toggle commit list
  • Đường Sỹ Hoàng @hoangds

    added 1 commit

    • 85e4f1fd - Top industries

    Compare with previous version

    Dec 19, 2019

    added 1 commit

    • 85e4f1fd - Top industries

    Compare with previous version

    added 1 commit * 85e4f1fd - Top industries [Compare with previous version](https://gitlab.zigexn.vn/hoangds/VenJob/merge_requests/4/diffs?diff_id=4520&start_sha=38dc6cb25f90de85d7122457889112f11a24994b)
    Toggle commit list
  • Đường Sỹ Hoàng @hoangds

    changed title from feature/top page/ top cities to feature/top page/ top industries

    Dec 19, 2019

    changed title from feature/top page/ top cities to feature/top page/ top industries

    changed title from **feature/top page/ top {-cit-}ies** to **feature/top page/ top {+industr+}ies**
    Toggle commit list
  • Đường Sỹ Hoàng @hoangds

    changed the description

    Dec 19, 2019

    changed the description

    changed the description
    Toggle commit list
  • Đường Sỹ Hoàng @hoangds

    changed the description

    Dec 19, 2019

    changed the description

    changed the description
    Toggle commit list
  • Son Do Hong
    @sondh started a discussion on an old version of the diff Dec 19, 2019
    Last updated by Đường Sỹ Hoàng Dec 19, 2019
    app/assets/javascripts/application.js 0 → 100644
    1 //= require bootstrap
    • Son Do Hong @sondh commented Dec 19, 2019
      Master

      a không thấy em có file bootstrap.js phải là file min chứ nhỉ?

      a không thấy em có file `bootstrap.js` phải là file min chứ nhỉ?
    • Đường Sỹ Hoàng @hoangds

      changed this line in version 12 of the diff

      Dec 19, 2019

      changed this line in version 12 of the diff

      changed this line in [version 12 of the diff](https://gitlab.zigexn.vn/hoangds/VenJob/merge_requests/4/diffs?diff_id=4522&start_sha=85e4f1fdd25aecef2c93f73e17a473c685bbb238#431311cbb9902e2a56811443372061424f388e2c_1_1)
      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 19, 2019
    Last updated by Đường Sỹ Hoàng Dec 19, 2019
    app/models/industry.rb
    1 1 class Industry < ApplicationRecord
    2 2 has_many :industry_jobs
    3 has_many :jobs, through: :industry_jobs
    4
    5 def self.sort_top_industries
    6 @cindustries ||= all.sort_by(&:jobs_count).reverse
    • Son Do Hong @sondh commented Dec 19, 2019
      Master

      bad naming

      bad naming
    • Đường Sỹ Hoàng @hoangds

      changed this line in version 12 of the diff

      Dec 19, 2019

      changed this line in version 12 of the diff

      changed this line in [version 12 of the diff](https://gitlab.zigexn.vn/hoangds/VenJob/merge_requests/4/diffs?diff_id=4522&start_sha=85e4f1fdd25aecef2c93f73e17a473c685bbb238#6fd7ec4bda80a3376d591b3e766bce8bf035c4c6_6_6)
      Toggle commit list
    Please register or sign in to reply
  • Đường Sỹ Hoàng @hoangds

    added 1 commit

    • bfdd8fe0 - Fixed naming

    Compare with previous version

    Dec 19, 2019

    added 1 commit

    • bfdd8fe0 - Fixed naming

    Compare with previous version

    added 1 commit * bfdd8fe0 - Fixed naming [Compare with previous version](https://gitlab.zigexn.vn/hoangds/VenJob/merge_requests/4/diffs?diff_id=4522&start_sha=85e4f1fdd25aecef2c93f73e17a473c685bbb238)
    Toggle commit list
  • Son Do Hong @sondh

    mentioned in commit b27de217

    Dec 19, 2019

    mentioned in commit b27de217

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

    merged

    Dec 19, 2019

    merged

    merged
    Toggle commit list
  • Van Hau Le
    @haulv started a discussion on the diff Dec 19, 2019
    app/models/job.rb
    1 1 class Job < ApplicationRecord
    2 2 has_many :user_jobs
    3 3 has_many :city_jobs
    4
    5 def self.latest_jobs
    6 @latest ||= Job.order(created_at: :desc)
    • Van Hau Le @haulv commented Dec 19, 2019
      Master

      @hoangds @latest ||= order(created_at: :desc). Không cần Job nhé em!

      @hoangds `@latest ||= order(created_at: :desc)`. Không cần Job nhé em!
    Please register or sign in to reply
  • Van Hau Le
    @haulv started a discussion on the diff Dec 19, 2019
    app/controllers/top_controller.rb 0 → 100644
    1 class TopController < ApplicationController
    2 def index
    3 @latest_jobs = Job.latest_jobs.take(Settings.top.job.limit)
    4 @top_cities = City.sort_top_cities.take(Settings.top.city.limit)
    5 @top_industries = Industry.sort_top_industries.take(Settings.top.industry.limit)
    • Van Hau Le @haulv commented Dec 19, 2019
      Master

      @hoangds latest_jobs, sort_top_cities, sort_top_industries nếu chỉ xài ở một chỗ này thì bên model em nên limit luôn bên đó nhé!

      @hoangds `latest_jobs`, `sort_top_cities`, `sort_top_industries` nếu chỉ xài ở một chỗ này thì bên model em nên limit luôn bên đó nhé!
    Please register or sign in to reply
  • Van Hau Le
    @haulv started a discussion on the diff Dec 19, 2019
    app/views/cities/_city.html.erb 0 → 100644
    1 <div class="container">
    2 <div class="row justify-content-md-center">
    3 <div class="col-sm">
    4 <%= city.name %>
    5 (<%= city.jobs.count %>)
    • Van Hau Le @haulv commented Dec 19, 2019
      Master

      @hoangds city.jobs_count

      @hoangds `city.jobs_count`
    Please register or sign in to reply
  • Van Hau Le
    @haulv started a discussion on the diff Dec 19, 2019
    app/views/industries/_industry.html.erb 0 → 100644
    1 <div class="container">
    2 <div class="row justify-content-md-center">
    3 <div class="col-sm">
    4 <%= industry.name %>
    5 (<%= industry.jobs.count %>)
    • Van Hau Le @haulv commented Dec 19, 2019
      Master

      @hoangds industry.jobs_count

      @hoangds `industry.jobs_count`
    Please register or sign in to reply
  • 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
Son Do Hong
Assignee
Son Do Hong @sondh
Assign to
None
Milestone
None
Assign milestone
Time tracking
4
4 participants
Reference: hoangds/VenJob!4
×

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.