Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • This project
    • Loading...
  • Sign in / Register
V
venjob_nth
  • Overview
    • Overview
    • Details
    • Activity
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 0
    • Issues 0
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 3
    • Merge Requests 3
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Ngô Trung Hưng
  • venjob_nth
  • Merge Requests
  • !9

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

create func login logout mypage

×

Check out, review, and merge locally

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

git fetch origin
git checkout -b authen origin/authen

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 authen

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 7
  • Commits 6
  • Pipelines 6
  • Changes 74
{{ resolvedDiscussionCount }}/{{ discussionCount }} {{ resolvedCountText }} resolved
  • Ngô Trung Hưng @hungnt

    added 1 commit

    • 3ed7b149 - ..

    Compare with previous version

    Aug 11, 2020

    added 1 commit

    • 3ed7b149 - ..

    Compare with previous version

    added 1 commit * 3ed7b149 - .. [Compare with previous version](https://gitlab.zigexn.vn/hungnt/venjob_nth/merge_requests/9/diffs?diff_id=5047&start_sha=0d885e6023a40c46f772786118df0f1520a89a3d)
    Toggle commit list
  • Hoang Phuc Do
    @phucdh started a discussion on an old version of the diff Aug 12, 2020
    Resolved by Ngô Trung Hưng Aug 12, 2020
    app/views/users/my_page.html.erb 0 → 100644
    1 <div class="container">
    2 <div class="box_my_page">
    3 <div class="row">
    4 <div class="col-lg-12">
    5 <div class="box_my_page_header">
    6 <h4>My page</h4>
    7 </div>
    8 </div>
    9 <div class="box_my_page_content">
    10 <hr>
    11 <div class="row">
    12 <div class="col-lg-12">
    13 <span>Email: <%= user_signed_in? ? current_user.name : 'N/A'%> </span>
    • Hoang Phuc Do @phucdh commented Aug 12, 2020
      Master
      Email: <%= user_signed_in? ? current_user.name : 'N/A'

      Giá trị và label không trùng khớp

      Edited Aug 12, 2020
      ```ruby Email: <%= user_signed_in? ? current_user.name : 'N/A' ``` Giá trị và label không trùng khớp
    • Ngô Trung Hưng @hungnt

      changed this line in version 3 of the diff

      Aug 12, 2020

      changed this line in version 3 of the diff

      changed this line in [version 3 of the diff](https://gitlab.zigexn.vn/hungnt/venjob_nth/merge_requests/9/diffs?diff_id=5051&start_sha=3ed7b1493d50583cf0967597c6df11afd1caf061#cc864691e615af6dae3fa494632fb845d0a84d6b_13_13)
      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 12, 2020
    Last updated by Ngô Trung Hưng Aug 12, 2020
    app/views/devise/shared/_error_messages.html.erb 0 → 100644
    1 <% if resource.errors.any? %>
    2 <div id="error_explanation">
    3 <ul>
    4 <% resource.errors.full_messages.each do |message| %>
    5 <li><%= message %></li>
    6 <% flash[:error] = 'Vui lòng kiểm tra lại thông tin' %>
    • Hoang Phuc Do @phucdh commented Aug 12, 2020
      Master

      Dòng này để làm gì, có cần thiết không ?

      Edited Aug 12, 2020
      Dòng này để làm gì, có cần thiết không ?
    • Ngô Trung Hưng @hungnt commented Aug 12, 2020
      Master

      Chỗ này em định hiển thị thêm thông báo dạng toast

      Chỗ này em định hiển thị thêm thông báo dạng toast
    • Ngô Trung Hưng @hungnt

      changed this line in version 3 of the diff

      Aug 12, 2020

      changed this line in version 3 of the diff

      changed this line in [version 3 of the diff](https://gitlab.zigexn.vn/hungnt/venjob_nth/merge_requests/9/diffs?diff_id=5051&start_sha=3ed7b1493d50583cf0967597c6df11afd1caf061#dcfb0a0fa321ac39c5bb1dcec97ec1473f2570a5_6_6)
      Toggle commit list
    Please register or sign in to reply
  • Hoang Phuc Do
    @phucdh started a discussion on the diff Aug 12, 2020
    app/helpers/application_helper.rb
    6 6 base_title = 'VenJob'
    7 7 page_title.empty? ? base_title : "#{base_title} | #{page_title}"
    8 8 end
    9
    10 def custom_bootstrap_flash
    11 flash_messages = []
    12 flash.each do |type, message|
    13 type = 'success' if type == 'notice'
    14 type = 'error' if type == 'alert'
    15 text = "<script>toastr.#{type}('#{message}');</script>"
    16 flash_messages << text.html_safe if message
    • Hoang Phuc Do @phucdh commented Aug 12, 2020
      Master

      Khi message có tồn tại giá trị thì mới thêm vào flash_messages.

      Vậy thì nên kiểm tra điều kiện này ban đầu trước khi thực hiện các xử lý khác

      flash.each do |type, message|
        next if message.blank?
        # Other logic
      end
      Khi `message` có tồn tại giá trị thì mới thêm vào `flash_messages`. Vậy thì nên kiểm tra điều kiện này ban đầu trước khi thực hiện các xử lý khác ```ruby flash.each do |type, message| next if message.blank? # Other logic end ```
    Please register or sign in to reply
  • Hoang Phuc Do
    @phucdh started a discussion on an old version of the diff Aug 12, 2020
    Last updated by Ngô Trung Hưng Aug 12, 2020
    app/controllers/users_controller.rb 0 → 100644
    1 # frozen_string_literal: true
    2
    3 # User controller
    4 class UsersController < ApplicationController
    5 def confirm_sign_up
    6 render :confirm
    7 end
    8
    9 def my_page
    10 if user_signed_in?
    • Hoang Phuc Do @phucdh commented Aug 12, 2020
      Master

      Dùng ternary operator hoặc guard clause

      Guard clause:

      return redirect_to root_path unless user_signed_in?
      render :my_page
      Dùng ternary operator hoặc guard clause Guard clause: ```ruby return redirect_to root_path unless user_signed_in? render :my_page ```
    • Ngô Trung Hưng @hungnt

      changed this line in version 3 of the diff

      Aug 12, 2020

      changed this line in version 3 of the diff

      changed this line in [version 3 of the diff](https://gitlab.zigexn.vn/hungnt/venjob_nth/merge_requests/9/diffs?diff_id=5051&start_sha=3ed7b1493d50583cf0967597c6df11afd1caf061#28f48e0bc2718ddf87752d15b58a0016c13baf1c_10_11)
      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 12, 2020
    Last updated by Ngô Trung Hưng Aug 12, 2020
    app/views/layouts/_header.html.erb
    13 <%= link_to 'Yêu thích', '#', class: 'link_item_menu_header_right' %>
    13 <%= link_to 'Favorite', '#', class: 'link_item_menu_header_right' %>
    14 14 </li>
    15 15 <li class="list_item_menu_header_right">
    16 <%= link_to 'Lịch sử', '#', class: 'link_item_menu_header_right' %>
    17 </li>
    18 <li class="list_item_menu_header_right">
    19 <%= link_to 'Đăng nhập', '#', class: 'link_item_menu_header_right' %>
    20 </li>
    21 <li class="list_item_menu_header_right">
    22 <%= link_to 'Đăng ký', '#', class: 'link_item_menu_header_right' %>
    16 <%= link_to 'History', '#', class: 'link_item_menu_header_right' %>
    23 17 </li>
    18 <% if user_signed_in? %>
    19 <li class="list_item_menu_header_right">
    20 <%= link_to 'My page', my_page_path, class: 'link_item_menu_header_right' %>
    • Hoang Phuc Do @phucdh commented Aug 12, 2020
      Master

      Thử sử dụng link_to_if

      Thử sử dụng `link_to_if`
    • Ngô Trung Hưng @hungnt commented Aug 12, 2020
      Master

      dạ anh

      dạ anh
    • Ngô Trung Hưng @hungnt

      changed this line in version 3 of the diff

      Aug 12, 2020

      changed this line in version 3 of the diff

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

    added 1 commit

    • 34942df5 - use link_to_if

    Compare with previous version

    Aug 12, 2020

    added 1 commit

    • 34942df5 - use link_to_if

    Compare with previous version

    added 1 commit * 34942df5 - use link_to_if [Compare with previous version](https://gitlab.zigexn.vn/hungnt/venjob_nth/merge_requests/9/diffs?diff_id=5051&start_sha=3ed7b1493d50583cf0967597c6df11afd1caf061)
    Toggle commit list
  • Ngô Trung Hưng @hungnt

    added 1 commit

    • 8a407556 - delete test

    Compare with previous version

    Aug 12, 2020

    added 1 commit

    • 8a407556 - delete test

    Compare with previous version

    added 1 commit * 8a407556 - delete test [Compare with previous version](https://gitlab.zigexn.vn/hungnt/venjob_nth/merge_requests/9/diffs?diff_id=5052&start_sha=34942df5d5523e838fafbdd55b6e1975722d6901)
    Toggle commit list
  • Ngô Trung Hưng @hungnt

    added 1 commit

    • ea684fb4 - create func forget password

    Compare with previous version

    Aug 12, 2020

    added 1 commit

    • ea684fb4 - create func forget password

    Compare with previous version

    added 1 commit * ea684fb4 - create func forget password [Compare with previous version](https://gitlab.zigexn.vn/hungnt/venjob_nth/merge_requests/9/diffs?diff_id=5053&start_sha=8a4075568e36e143aed17e315ab232636ab5e75b)
    Toggle commit list
  • Ngô Trung Hưng @hungnt

    added 1 commit

    • eeaec5db - use i18n for vietnamese & english

    Compare with previous version

    Aug 13, 2020

    added 1 commit

    • eeaec5db - use i18n for vietnamese & english

    Compare with previous version

    added 1 commit * eeaec5db - use i18n for vietnamese &amp; english [Compare with previous version](https://gitlab.zigexn.vn/hungnt/venjob_nth/merge_requests/9/diffs?diff_id=5056&start_sha=ea684fb4a213a04029571198c1996e000e9c5da4)
    Toggle commit list
  • Hoang Phuc Do @phucdh

    mentioned in commit e31804c7

    Aug 13, 2020

    mentioned in commit e31804c7

    mentioned in commit e31804c7981fa7ad1e118045b2bb62dcd00fe3d5
    Toggle commit list
  • Hoang Phuc Do @phucdh

    merged

    Aug 13, 2020

    merged

    merged
    Toggle commit list
  • Write
  • Preview
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment
Assignee
No assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
2
2 participants
Reference: hungnt/venjob_nth!9
×

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.