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
  • !12

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

Created ID5-6-7

×

Check out, review, and merge locally

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

git fetch origin
git checkout -b apply_job origin/apply_job

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 apply_job

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 26
  • Commits 16
  • Pipelines 17
  • Changes 36
{{ resolvedDiscussionCount }}/{{ discussionCount }} {{ resolvedCountText }} resolved
  • Huỳnh Thiên Phước @phuocht

    added 1 commit

    • d02b7680 - Create ID12 My Job

    Compare with previous version

    Aug 25, 2020

    added 1 commit

    • d02b7680 - Create ID12 My Job

    Compare with previous version

    added 1 commit * d02b7680 - Create ID12 My Job [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/12/diffs?diff_id=5150&start_sha=2e0f39f4d40d19981b27baaca1556d6fa93d4a32)
    Toggle commit list
  • Huỳnh Thiên Phước @phuocht

    added 1 commit

    • ca4676d4 - append conditions in apply_job

    Compare with previous version

    Aug 26, 2020

    added 1 commit

    • ca4676d4 - append conditions in apply_job

    Compare with previous version

    added 1 commit * ca4676d4 - append conditions in apply_job [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/12/diffs?diff_id=5151&start_sha=d02b7680d7e6de67a96fe5ff8bd5a06165e00a02)
    Toggle commit list
  • Huỳnh Thiên Phước @phuocht

    added 1 commit

    • eb38977a - create store_location

    Compare with previous version

    Aug 26, 2020

    added 1 commit

    • eb38977a - create store_location

    Compare with previous version

    added 1 commit * eb38977a - create store_location [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/12/diffs?diff_id=5152&start_sha=ca4676d41047e5e86dfa9d36fb729a58ea6512b0)
    Toggle commit list
  • Huỳnh Thiên Phước @phuocht

    added 1 commit

    • 8aee83ff - fix indent

    Compare with previous version

    Aug 26, 2020

    added 1 commit

    • 8aee83ff - fix indent

    Compare with previous version

    added 1 commit * 8aee83ff - fix indent [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/12/diffs?diff_id=5153&start_sha=eb38977a3faff9b24fe249f588b32031e0717be3)
    Toggle commit list
  • Hoang Phuc Do @phucdh commented Aug 26, 2020

    Thêm thư mục public/uploads vào trong .gitignore

    Vì thư mục này chứa những dữ liệu của user, không đưa lên source control.

    Thêm thư mục `public/uploads` vào trong `.gitignore` Vì thư mục này chứa những dữ liệu của user, không đưa lên source control.
  • Huỳnh Thiên Phước @phuocht commented Aug 26, 2020
    Master

    dạ ok a

    dạ ok a
  • Hoang Phuc Do
    @phucdh started a discussion on an old version of the diff Aug 26, 2020
    Last updated by Huỳnh Thiên Phước Aug 27, 2020
    app/controllers/job_applieds_controller.rb 0 → 100644
    3 before_action :find_job_id, only: [:new]
    4
    5 def new
    6 founded_application = JobApplied.where(user_id: current_user.id, job_id: params[:job_id])
    7 return redirect_to job_detail_path(params[:job_id]) if founded_application.present?
    8 end
    9
    10 def show
    11 @jobs = Job.applied_job(current_user.id).page(params[:page]).per(Job::LIMIT_PAGE)
    12 end
    13
    14 def confirmation
    15 @founded_job = JobApplied.where(user_id: current_user.id, job_id: apply_params[:job_id])
    16 return redirect_to apply_job_path(job_id: apply_params[:job_id]), flash: {danger: Settings.user.applied_job.applied} if @founded_job.present?
    17
    18 @user = current_user.job_applieds.new(apply_params)
    • Hoang Phuc Do @phucdh commented Aug 26, 2020

      Tên biến này không chính xác

      current_user.job_applieds.new(apply_params) trả về object là JobApplied

      => tên biến phù hợp hơn là @job_applied

      Tên biến này không chính xác `current_user.job_applieds.new(apply_params)` trả về object là `JobApplied` => tên biến phù hợp hơn là `@job_applied`
    • Huỳnh Thiên Phước @phuocht

      changed this line in version 6 of the diff

      Aug 27, 2020

      changed this line in version 6 of the diff

      changed this line in [version 6 of the diff](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/12/diffs?diff_id=5154&start_sha=8aee83ff99b5c7278cfe9651c7cd51084de9a3a9#b636ce10a4977e00bf1a67eb32cc155a2d03414c_18_32)
      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 26, 2020
    Last updated by Huỳnh Thiên Phước Aug 27, 2020
    app/controllers/job_applieds_controller.rb 0 → 100644
    1 class JobAppliedsController < ApplicationController
    2 before_action :sign_in_validation, only: [:new, :confirmation, :create, :show]
    3 before_action :find_job_id, only: [:new]
    4
    5 def new
    6 founded_application = JobApplied.where(user_id: current_user.id, job_id: params[:job_id])
    7 return redirect_to job_detail_path(params[:job_id]) if founded_application.present?
    8 end
    9
    10 def show
    11 @jobs = Job.applied_job(current_user.id).page(params[:page]).per(Job::LIMIT_PAGE)
    12 end
    13
    14 def confirmation
    15 @founded_job = JobApplied.where(user_id: current_user.id, job_id: apply_params[:job_id])
    • Hoang Phuc Do @phucdh commented Aug 26, 2020

      @founded_job => @founded_jobs

      Vì sử dụng #where nên trả về sẽ là một mảng các giá trị

      Mục đích là kiểm tra xem record có tồn tại không có thể dùng #exists?

      current_user.job_applieds.exists?(job_id: 1)
       SELECT  1 AS one FROM `job_applieds` WHERE `job_applieds`.`user_id` = 1 AND `job_applieds`.`job_id` = 1 LIMIT 1
      Edited Aug 31, 2020
      `@founded_job` => `@founded_jobs` Vì sử dụng `#where` nên trả về sẽ là một mảng các giá trị Mục đích là kiểm tra xem record có tồn tại không có thể dùng `#exists?` ```ruby current_user.job_applieds.exists?(job_id: 1) SELECT 1 AS one FROM `job_applieds` WHERE `job_applieds`.`user_id` = 1 AND `job_applieds`.`job_id` = 1 LIMIT 1 ```
    • Huỳnh Thiên Phước @phuocht commented Aug 26, 2020
      Master

      dạ a, e thử dùng

      dạ a, e thử dùng
    • Huỳnh Thiên Phước @phuocht

      changed this line in version 6 of the diff

      Aug 27, 2020

      changed this line in version 6 of the diff

      changed this line in [version 6 of the diff](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/12/diffs?diff_id=5154&start_sha=8aee83ff99b5c7278cfe9651c7cd51084de9a3a9#b636ce10a4977e00bf1a67eb32cc155a2d03414c_15_28)
      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 26, 2020
    Resolved by Hoang Phuc Do Aug 31, 2020
    app/controllers/job_applieds_controller.rb 0 → 100644
    1 class JobAppliedsController < ApplicationController
    2 before_action :sign_in_validation, only: [:new, :confirmation, :create, :show]
    3 before_action :find_job_id, only: [:new]
    4
    5 def new
    6 founded_application = JobApplied.where(user_id: current_user.id, job_id: params[:job_id])
    7 return redirect_to job_detail_path(params[:job_id]) if founded_application.present?
    8 end
    9
    10 def show
    11 @jobs = Job.applied_job(current_user.id).page(params[:page]).per(Job::LIMIT_PAGE)
    • Hoang Phuc Do @phucdh commented Aug 26, 2020

      Logic lấy các job đã apply nên thuộc về model User

      Có thể gọi trực tiếp thông qua association đã được định nghĩa trong Rails

      Job.applied_job(current_user.id) => current_user.job_applieds

      # rails console
      user = User.last
      user.job_applieds
        JobApplied Load (0.7ms)  SELECT  `job_applieds`.* FROM `job_applieds` WHERE `job_applieds`.`user_id` = 1 LIMIT 11
      => #<ActiveRecord::Associations::CollectionProxy []>
      Edited Aug 31, 2020
      Logic lấy các job đã apply nên thuộc về model `User` Có thể gọi trực tiếp thông qua association đã được định nghĩa trong Rails `Job.applied_job(current_user.id)` => `current_user.job_applieds` ```ruby # rails console user = User.last user.job_applieds JobApplied Load (0.7ms) SELECT `job_applieds`.* FROM `job_applieds` WHERE `job_applieds`.`user_id` = 1 LIMIT 11 => #<ActiveRecord::Associations::CollectionProxy []> ```
    • Huỳnh Thiên Phước @phuocht

      changed this line in version 8 of the diff

      Aug 27, 2020

      changed this line in version 8 of the diff

      changed this line in [version 8 of the diff](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/12/diffs?diff_id=5156&start_sha=2e647c60ed8f174d6713962a777c1c9127c1aa25#b636ce10a4977e00bf1a67eb32cc155a2d03414c_24_24)
      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 26, 2020
    Resolved by Hoang Phuc Do Aug 31, 2020
    app/controllers/job_applieds_controller.rb 0 → 100644
    1 class JobAppliedsController < ApplicationController
    2 before_action :sign_in_validation, only: [:new, :confirmation, :create, :show]
    • Hoang Phuc Do @phucdh commented Aug 26, 2020

      [:new, :confirmation, :create, :show] => %i[new confirmation create show]

      Edited Aug 31, 2020
      `[:new, :confirmation, :create, :show]` => `%i[new confirmation create show]`
    • Huỳnh Thiên Phước @phuocht

      changed this line in version 6 of the diff

      Aug 27, 2020

      changed this line in version 6 of the diff

      changed this line in [version 6 of the diff](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/12/diffs?diff_id=5154&start_sha=8aee83ff99b5c7278cfe9651c7cd51084de9a3a9#b636ce10a4977e00bf1a67eb32cc155a2d03414c_2_2)
      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 26, 2020
    Last updated by Huỳnh Thiên Phước Aug 28, 2020
    app/controllers/job_applieds_controller.rb 0 → 100644
    1 class JobAppliedsController < ApplicationController
    • Hoang Phuc Do @phucdh commented Aug 26, 2020

      JobAppliedsController => AppliedJobsController

      `JobAppliedsController` => `AppliedJobsController`
    • Huỳnh Thiên Phước @phuocht

      changed this line in version 13 of the diff

      Aug 28, 2020

      changed this line in version 13 of the diff

      changed this line in [version 13 of the diff](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/12/diffs?diff_id=5161&start_sha=5a86b9bffebf8604c24d0b07bf7b3de0f7fb4512#b636ce10a4977e00bf1a67eb32cc155a2d03414c_1_1)
      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 26, 2020
    Last updated by Huỳnh Thiên Phước Aug 27, 2020
    app/views/job_applieds/confirmation.html.erb 0 → 100644
    1 <div class="container">
    2 <div class="row ribbon-mark">
    3 <%= render partial: 'ribbon_step', locals: { step1: 'active', step2: 'active', step3: '' } %>
    4 </div>
    5 <h1 class="text-center my-page-label">Confirmation</h1>
    6 <div class="form-login">
    7 <div class="row form d-flex justify-content-center">
    8 <%= form_for(@user, url: finished_apply_path) do |f| %>
    9 <div class="email-field">
    10 <div class="col-4-sm">
    11 <%= f.label :email %>
    12 </div>
    13 <div class="col-8-sm">
    14 <strong><%= @user.email %></strong>
    15 <%= f.hidden_field :email, value: @user.email %>
    • Hoang Phuc Do @phucdh commented Aug 26, 2020

      Sử dụng hidden field để lưu trữ những giá trị đã nhập user có thể làm sai lệch dữ liệu

      User có thể thay đổi giá trị trong field này khi submit lên server

      Tham khảo: https://www.dummies.com/programming/networking/hidden-field-manipulation-hacks-in-web-applications/

      Sử dụng hidden field để lưu trữ những giá trị đã nhập user có thể làm sai lệch dữ liệu User có thể thay đổi giá trị trong field này khi submit lên server Tham khảo: https://www.dummies.com/programming/networking/hidden-field-manipulation-hacks-in-web-applications/
    • Huỳnh Thiên Phước @phuocht commented Aug 26, 2020
      Master

      dạ tks a

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

      changed this line in version 6 of the diff

      Aug 27, 2020

      changed this line in version 6 of the diff

      changed this line in [version 6 of the diff](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/12/diffs?diff_id=5154&start_sha=8aee83ff99b5c7278cfe9651c7cd51084de9a3a9#d7d6ef1e07b8a2bb0c99d9e451196d256d0a4601_15_14)
      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 26, 2020
    Last updated by Huỳnh Thiên Phước Aug 27, 2020
    app/controllers/job_applieds_controller.rb 0 → 100644
    17
    18 @user = current_user.job_applieds.new(apply_params)
    19 @user.cv_user = current_user.cv_user if apply_params[:cv_user].blank?
    20
    21 if @user.invalid?
    22 flash[:danger] = @user.errors.full_messages.join('<br>')
    23 redirect_to apply_job_path(job_id: apply_params[:job_id])
    24 end
    25 end
    26
    27 def create
    28 @job = Job.find_by(id: apply_params[:job_id])
    29 @user = current_user.job_applieds.new(apply_params)
    30 @user.cv_user.retrieve_from_cache!(apply_params[:cv_user])
    31 if @user.save
    32 JobAppliedMailer.apply_job(@user, @job).deliver_later
    • Hoang Phuc Do @phucdh commented Aug 26, 2020

      Sử dụng #deliver_later có tác dụng gì so với #deliver_now ?

      Sử dụng `#deliver_later` có tác dụng gì so với `#deliver_now` ?
    • Huỳnh Thiên Phước @phuocht commented Aug 26, 2020
      Master

      e thấy sự dụng deliver_now thì nó trả về lỗi ngắn hơn còn deliver_later dài hơn a. Hiện tại thì e biết như v.

      e thấy sự dụng deliver_now thì nó trả về lỗi ngắn hơn còn deliver_later dài hơn a. Hiện tại thì e biết như v.
    • Huỳnh Thiên Phước @phuocht

      changed this line in version 6 of the diff

      Aug 27, 2020

      changed this line in version 6 of the diff

      changed this line in [version 6 of the diff](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/12/diffs?diff_id=5154&start_sha=8aee83ff99b5c7278cfe9651c7cd51084de9a3a9#b636ce10a4977e00bf1a67eb32cc155a2d03414c_32_42)
      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 26, 2020
    Last updated by Huỳnh Thiên Phước Aug 27, 2020
    app/controllers/job_applieds_controller.rb 0 → 100644
    17
    18 @user = current_user.job_applieds.new(apply_params)
    19 @user.cv_user = current_user.cv_user if apply_params[:cv_user].blank?
    20
    21 if @user.invalid?
    22 flash[:danger] = @user.errors.full_messages.join('<br>')
    23 redirect_to apply_job_path(job_id: apply_params[:job_id])
    24 end
    25 end
    26
    27 def create
    28 @job = Job.find_by(id: apply_params[:job_id])
    29 @user = current_user.job_applieds.new(apply_params)
    30 @user.cv_user.retrieve_from_cache!(apply_params[:cv_user])
    31 if @user.save
    32 JobAppliedMailer.apply_job(@user, @job).deliver_later
    • Hoang Phuc Do @phucdh commented Aug 26, 2020

      Sử dụng #deliver_later có tác dụng gì so với #deliver_now ?

      Sử dụng `#deliver_later` có tác dụng gì so với `#deliver_now` ?
    • Huỳnh Thiên Phước @phuocht

      changed this line in version 6 of the diff

      Aug 27, 2020

      changed this line in version 6 of the diff

      changed this line in [version 6 of the diff](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/12/diffs?diff_id=5154&start_sha=8aee83ff99b5c7278cfe9651c7cd51084de9a3a9#b636ce10a4977e00bf1a67eb32cc155a2d03414c_32_42)
      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 26, 2020
    Last updated by Huỳnh Thiên Phước Aug 27, 2020
    app/controllers/job_applieds_controller.rb 0 → 100644
    18 @user = current_user.job_applieds.new(apply_params)
    19 @user.cv_user = current_user.cv_user if apply_params[:cv_user].blank?
    20
    21 if @user.invalid?
    22 flash[:danger] = @user.errors.full_messages.join('<br>')
    23 redirect_to apply_job_path(job_id: apply_params[:job_id])
    24 end
    25 end
    26
    27 def create
    28 @job = Job.find_by(id: apply_params[:job_id])
    29 @user = current_user.job_applieds.new(apply_params)
    30 @user.cv_user.retrieve_from_cache!(apply_params[:cv_user])
    31 if @user.save
    32 JobAppliedMailer.apply_job(@user, @job).deliver_later
    33 JobAppliedMailer.apply_job(ENV['GMAIL_USERNAME']).deliver_later
    • Hoang Phuc Do @phucdh commented Aug 26, 2020

      Dòng trên có hoạt động không ?

      ENV['GMAIL_USERNAME'] hình như trả về một string

      JobAppliedMailer.apply_job yêu cầu 2 tham số là user và job

      Dòng trên có hoạt động không ? `ENV['GMAIL_USERNAME']` hình như trả về một string `JobAppliedMailer.apply_job` yêu cầu 2 tham số là user và job
    • Huỳnh Thiên Phước @phuocht commented Aug 26, 2020
      Master

      chỗ đó bị lỗi a, e thiếu biến @job :d

      chỗ đó bị lỗi a, e thiếu biến @job :d
    • Huỳnh Thiên Phước @phuocht commented Aug 26, 2020
      Master

      dòng này hiện ko hoạt động a, e đang fix lại

      dòng này hiện ko hoạt động a, e đang fix lại
    • Huỳnh Thiên Phước @phuocht

      changed this line in version 6 of the diff

      Aug 27, 2020

      changed this line in version 6 of the diff

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

    added 1 commit

    • 3b4c1b60 - store value input, fix some mentor's comments

    Compare with previous version

    Aug 27, 2020

    added 1 commit

    • 3b4c1b60 - store value input, fix some mentor's comments

    Compare with previous version

    added 1 commit * 3b4c1b60 - store value input, fix some mentor&#x27;s comments [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/12/diffs?diff_id=5154&start_sha=8aee83ff99b5c7278cfe9651c7cd51084de9a3a9)
    Toggle commit list
  • Huỳnh Thiên Phước @phuocht

    added 1 commit

    • 2e647c60 - fix conflict

    Compare with previous version

    Aug 27, 2020

    added 1 commit

    • 2e647c60 - fix conflict

    Compare with previous version

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

    added 1 commit

    • ca218bf1 - fix mentor's comments

    Compare with previous version

    Aug 27, 2020

    added 1 commit

    • ca218bf1 - fix mentor's comments

    Compare with previous version

    added 1 commit * ca218bf1 - fix mentor&#x27;s comments [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/12/diffs?diff_id=5156&start_sha=2e647c60ed8f174d6713962a777c1c9127c1aa25)
    Toggle commit list
  • Huỳnh Thiên Phước @phuocht

    added 1 commit

    • 71b84103 - Append text in mailer job_apply

    Compare with previous version

    Aug 27, 2020

    added 1 commit

    • 71b84103 - Append text in mailer job_apply

    Compare with previous version

    added 1 commit * 71b84103 - Append text in mailer job_apply [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/12/diffs?diff_id=5157&start_sha=ca218bf1cd56af14da5f58de06c6e345dc859742)
    Toggle commit list
  • Hoang Phuc Do
    @phucdh started a discussion on an old version of the diff Aug 27, 2020
    Last updated by Huỳnh Thiên Phước Aug 27, 2020
    app/controllers/job_applieds_controller.rb 0 → 100644
    2 before_action :sign_in_validation, only: %i[new confirmation create show]
    3 before_action :find_job_id, only: [:new]
    4
    5 def new
    6 session[:job_id] = params[:job_id]
    7 if session[:job_applied].present?
    8 user_name = session[:job_applied]['name']
    9 user_email = session[:job_applied]['email']
    10 end
    11
    12 session[:job_id] ||= session[:get_job_id]
    13 user_name ||= current_user.name
    14 user_email ||= current_user.email
    15
    16 founded_application = JobApplied.exists?(user_id: current_user.id, job_id: session[:job_id])
    17 return redirect_to job_detail_path(session[:job_id]) if founded_application
    • Hoang Phuc Do @phucdh commented Aug 27, 2020

      Nên thêm thông báo lỗi cho user ở phần này

      Nên thêm thông báo lỗi cho user ở phần này
    • Huỳnh Thiên Phước @phuocht commented Aug 27, 2020
      Master

      dạ ok a v. để e thêm thông báo

      dạ ok a v. để e thêm thông báo
    • Huỳnh Thiên Phước @phuocht

      changed this line in version 10 of the diff

      Aug 27, 2020

      changed this line in version 10 of the diff

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

    added 1 commit

    • b83e6aa6 - add announce

    Compare with previous version

    Aug 27, 2020

    added 1 commit

    • b83e6aa6 - add announce

    Compare with previous version

    added 1 commit * b83e6aa6 - add announce [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/12/diffs?diff_id=5158&start_sha=71b84103311f2f3a2e565130d33e0d09d75ec20b)
    Toggle commit list
  • Hoang Phuc Do @phucdh commented Aug 27, 2020

    1. Ở Apply Form, chưa validate các loại file sẽ được tải lên

    Dữ liệu từ user nên được validate đầy đủ để tăng cường bảo mật trên website, trong trường hợp này, user có thể tải lên các đoạn script mã đọc lên server

    2. Ở Confirmation, khi nhấn Edit thì quay lại trang Apply Form, mất file đã upload

    File mà user đã upload lúc trước phải được hiển thị thay vì phải upload lại file mới

    3. Sau khi hoàn thành Apply, nhấn back của Browser lại Apply Form, vẫn có thể điền lại thông tin

    Việc này có thể tạo nhiều apply cho cùng job đối với 1 user

    Edited Aug 27, 2020 by Hoang Phuc Do
    **1. Ở Apply Form, chưa validate các loại file sẽ được tải lên** Dữ liệu từ user nên được validate đầy đủ để tăng cường bảo mật trên website, trong trường hợp này, user có thể tải lên các đoạn script mã đọc lên server **2. Ở Confirmation, khi nhấn Edit thì quay lại trang Apply Form, mất file đã upload** File mà user đã upload lúc trước phải được hiển thị thay vì phải upload lại file mới **3. Sau khi hoàn thành Apply, nhấn back của Browser lại Apply Form, vẫn có thể điền lại thông tin** Việc này có thể tạo nhiều apply cho cùng job đối với 1 user
  • Van Hau Le
    @haulv started a discussion on an old version of the diff Aug 27, 2020
    Last updated by Huỳnh Thiên Phước Aug 31, 2020
    app/controllers/job_applieds_controller.rb 0 → 100644
    31
    32 @job_applied.cv_user = current_user.cv_user if apply_params[:cv_user].blank?
    33 @job_applied.job_id = session[:get_job_id] if @job_applied.job_id.blank?
    34
    35 if @job_applied.invalid?
    36 flash.now[:danger] = @job_applied.errors.full_messages.join('<br>')
    37 render :new
    38 end
    39 end
    40
    41 def create
    42 @job = Job.find_by(id: session[:get_job_id])
    43 @job_applied = current_user.job_applieds.new(apply_params)
    44 @job_applied.job_id = session[:get_job_id] if @job_applied.job_id.blank?
    45 @job_applied.cv_user.retrieve_from_cache!(apply_params[:cv_user])
    46 if @job_applied.save
    • Van Hau Le @haulv commented Aug 27, 2020
      Master

      @phuocht nếu apply success thì send mail! còn failed thì làm gì em?

      @phuocht nếu apply success thì send mail! còn failed thì làm gì em?
    • Huỳnh Thiên Phước @phuocht commented Aug 27, 2020
      Master

      dạ để e thêm else redirect về trang apply

      dạ để e thêm else redirect về trang apply
    • Huỳnh Thiên Phước @phuocht

      changed this line in version 15 of the diff

      Aug 31, 2020

      changed this line in version 15 of the diff

      changed this line in [version 15 of the diff](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/12/diffs?diff_id=5166&start_sha=0a60272712f2fe6a302c563d5468061ee3ac1752#b636ce10a4977e00bf1a67eb32cc155a2d03414c_44_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 27, 2020
    Last updated by Huỳnh Thiên Phước Aug 28, 2020
    app/controllers/job_applieds_controller.rb 0 → 100644
    9 user_email = session[:job_applied]['email']
    10 end
    11
    12 session[:job_id] ||= session[:get_job_id]
    13 user_name ||= current_user.name
    14 user_email ||= current_user.email
    15
    16 founded_application = JobApplied.exists?(user_id: current_user.id, job_id: session[:job_id])
    17 return redirect_to job_detail_path(session[:job_id]), flash: {info: 'You applied for job'} if founded_application
    18
    19 @job_applied = current_user.job_applieds.new(name: user_name,
    20 email: user_email)
    21 end
    22
    23 def show
    24 @users = current_user.job_applieds.order("job_applieds.updated_at DESC").page(params[:page]).per(Job::LIMIT_PAGE)
    • Hoang Phuc Do @phucdh commented Aug 27, 2020

      @users => @applied_jobs

      tên biến không phù hợp giá trị trả về

      Edited Aug 27, 2020 by Hoang Phuc Do
      `@users` => `@applied_jobs` tên biến không phù hợp giá trị trả về
    • Huỳnh Thiên Phước @phuocht

      changed this line in version 11 of the diff

      Aug 28, 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/12/diffs?diff_id=5159&start_sha=b83e6aa6ab809d750aaedb1a0dffb20558385f4e#b636ce10a4977e00bf1a67eb32cc155a2d03414c_24_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 27, 2020
    Last updated by Huỳnh Thiên Phước Aug 28, 2020
    app/controllers/job_applieds_controller.rb 0 → 100644
    13 user_name ||= current_user.name
    14 user_email ||= current_user.email
    15
    16 founded_application = JobApplied.exists?(user_id: current_user.id, job_id: session[:job_id])
    17 return redirect_to job_detail_path(session[:job_id]), flash: {info: 'You applied for job'} if founded_application
    18
    19 @job_applied = current_user.job_applieds.new(name: user_name,
    20 email: user_email)
    21 end
    22
    23 def show
    24 @users = current_user.job_applieds.order("job_applieds.updated_at DESC").page(params[:page]).per(Job::LIMIT_PAGE)
    25 end
    26
    27 def confirmation
    28 session[:get_job_id] = session[:job_id]
    • Hoang Phuc Do @phucdh commented Aug 27, 2020

      Tại sao phải gán hai session cho job id ?

      Tại sao phải gán hai session cho job id ?
    • Huỳnh Thiên Phước @phuocht commented Aug 28, 2020
      Master

      phần này e đang sửa lại code gán 1 lần a ơi

      phần này e đang sửa lại code gán 1 lần a ơi
    • Huỳnh Thiên Phước @phuocht

      changed this line in version 11 of the diff

      Aug 28, 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/12/diffs?diff_id=5159&start_sha=b83e6aa6ab809d750aaedb1a0dffb20558385f4e#b636ce10a4977e00bf1a67eb32cc155a2d03414c_28_27)
      Toggle commit list
    Please register or sign in to reply
  • Huỳnh Thiên Phước @phuocht

    added 1 commit

    • a2c504f9 - fix mentors 'comments

    Compare with previous version

    Aug 28, 2020

    added 1 commit

    • a2c504f9 - fix mentors 'comments

    Compare with previous version

    added 1 commit * a2c504f9 - fix mentors &#x27;comments [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/12/diffs?diff_id=5159&start_sha=b83e6aa6ab809d750aaedb1a0dffb20558385f4e)
    Toggle commit list
  • Huỳnh Thiên Phước @phuocht

    added 1 commit

    • 5a86b9bf - add flash job not found

    Compare with previous version

    Aug 28, 2020

    added 1 commit

    • 5a86b9bf - add flash job not found

    Compare with previous version

    added 1 commit * 5a86b9bf - add flash job not found [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/12/diffs?diff_id=5160&start_sha=a2c504f90add054cb254b62bb0c8b5497eb24070)
    Toggle commit list
  • Huỳnh Thiên Phước @phuocht

    added 1 commit

    • 1615a264 - change name class

    Compare with previous version

    Aug 28, 2020

    added 1 commit

    • 1615a264 - change name class

    Compare with previous version

    added 1 commit * 1615a264 - change name class [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/12/diffs?diff_id=5161&start_sha=5a86b9bffebf8604c24d0b07bf7b3de0f7fb4512)
    Toggle commit list
  • Van Hau Le
    @haulv started a discussion on the diff Aug 28, 2020
    Last updated by Huỳnh Thiên Phước Aug 28, 2020
    app/controllers/jobs_controller.rb
    27 27 end
    28 28
    29 29 def show
    30 redirect_to jobs_path unless @job
    30 session.delete(:apply_job)
    31 session.delete(:cv)
    32 return redirect_to jobs_path unless @job
    33 @user = JobApplied.where(user_id: current_user.id, job_id: params[:id]) if signed_in?
    • Van Hau Le @haulv commented Aug 28, 2020
      Master

      @phuocht chỗ này lấy @user làm gì vậy e?

      @phuocht chỗ này lấy @user làm gì vậy e?
    • Huỳnh Thiên Phước @phuocht commented Aug 28, 2020
      Master

      à chỗ đó e dò với view, nếu đăng nhập rồi and applied job thì nút Apply Now => Applied a ơi

      à chỗ đó e dò với view, nếu đăng nhập rồi and applied job thì nút Apply Now => Applied a ơi
    Please register or sign in to reply
  • Huỳnh Thiên Phước @phuocht

    added 1 commit

    • 0a602727 - Delete document1.pdf

    Compare with previous version

    Aug 31, 2020

    added 1 commit

    • 0a602727 - Delete document1.pdf

    Compare with previous version

    added 1 commit * 0a602727 - Delete document1.pdf [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/12/diffs?diff_id=5165&start_sha=1615a264f0a2f53eec4433ade64f3a4c5a773ac9)
    Toggle commit list
  • Huỳnh Thiên Phước @phuocht

    added 1 commit

    • 45c6726e - fix mentor's comments

    Compare with previous version

    Aug 31, 2020

    added 1 commit

    • 45c6726e - fix mentor's comments

    Compare with previous version

    added 1 commit * 45c6726e - fix mentor&#x27;s comments [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/12/diffs?diff_id=5166&start_sha=0a60272712f2fe6a302c563d5468061ee3ac1752)
    Toggle commit list
  • Huỳnh Thiên Phước @phuocht

    added 1 commit

    • 6dbda430 - add file ignore

    Compare with previous version

    Aug 31, 2020

    added 1 commit

    • 6dbda430 - add file ignore

    Compare with previous version

    added 1 commit * 6dbda430 - add file ignore [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/12/diffs?diff_id=5167&start_sha=45c6726e1b158c116f8f0ae2df4d860c4f8e6ab7)
    Toggle commit list
  • Huỳnh Thiên Phước @phuocht

    added 1 commit

    • d2fa7457 - add conditions

    Compare with previous version

    Aug 31, 2020

    added 1 commit

    • d2fa7457 - add conditions

    Compare with previous version

    added 1 commit * d2fa7457 - add conditions [Compare with previous version](https://gitlab.zigexn.vn/phuocht/venjob/merge_requests/12/diffs?diff_id=5170&start_sha=6dbda4301a95957349b1e261f3c4338d51a6cfae)
    Toggle commit list
  • Van Hau Le @haulv

    mentioned in commit d1626af3

    Sep 01, 2020

    mentioned in commit d1626af3

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

    merged

    Sep 01, 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!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.