Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • This project
    • Loading...
  • Sign in / Register
V
VietTH-VenShop
  • 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 4
    • Merge Requests 4
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Tran Hoang Viet
  • VietTH-VenShop
  • Merge Requests
  • !11

Open
Opened Jul 16, 2015 by Tran Hoang Viet@vietth 
  • Report abuse
Report abuse

VietTH: Feature order management

×

Check out, review, and merge locally

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

git fetch origin
git checkout -b vietth_feat_order_management origin/vietth_feat_order_management

Step 2. Review the changes locally

Step 3. Merge the branch and fix any conflicts that come up

git checkout develop
git merge --no-ff vietth_feat_order_management

Step 4. Push the result of the merge to GitLab

git push origin develop

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 5
  • Changes
{{ resolvedDiscussionCount }}/{{ discussionCount }} {{ resolvedCountText }} resolved
  • Tran Hoang Viet @vietth

    Added 6 commits:

    • 1236556d...1cca49df - 4 commits from branch develop
    • f308e16c - Merge remote-tracking branch 'origin/develop' into vietth_feat_order_management
    • 92e948d5 - VietTH: Apply permission to order resource. Use gem cancan
    Jul 17, 2015

    Added 6 commits:

    • 1236556d...1cca49df - 4 commits from branch develop
    • f308e16c - Merge remote-tracking branch 'origin/develop' into vietth_feat_order_management
    • 92e948d5 - VietTH: Apply permission to order resource. Use gem cancan
    Added 6 commits: * 1236556d...1cca49df - 4 commits from branch `develop` * f308e16c - Merge remote-tracking branch 'origin/develop' into vietth_feat_order_management * 92e948d5 - VietTH: Apply permission to order resource. Use gem cancan
    Toggle commit list
  • Nguyen Ngoc Lan
    @lannn started a discussion on an old version of the diff Jul 21, 2015
    Gemfile
    68 68 gem 'draper', '~> 2.1.0'
    69 69  
    70 70 gem 'devise', '~> 3.5.1'
    71 gem 'rolify', '~> 4.0.0'
    72 gem 'cancan', '~> 1.6.10'
    • Nguyen Ngoc Lan @lannn commented Jul 21, 2015
      Developer

      @vietth gem pundit is better OOP and scalable. Please take a look and make a decission https://github.com/elabs/pundit

      @vietth gem pundit is better OOP and scalable. Please take a look and make a decission https://github.com/elabs/pundit
    Please register or sign in to reply
  • Nguyen Ngoc Lan
    @lannn started a discussion on an old version of the diff Jul 21, 2015
    app/controllers/orders_controller.rb
    19 22 end
    20 23 end
    21 24  
    25 def management
    • Nguyen Ngoc Lan @lannn commented Jul 21, 2015
      Developer

      @vietth Để dễ kiểm soát và phân biệt actions thì nên move action management này vào namespace

      Với user là admin thì sẽ là admin thì admin/orders_controller.rb action là index, còn là user thông thường có thể là user/orders_controller

      http://stackoverflow.com/questions/16444489/create-administration-area-in-rails-app

      Edited Jul 21, 2015
      @vietth Để dễ kiểm soát và phân biệt actions thì nên move action management này vào namespace Với user là admin thì sẽ là admin thì admin/orders_controller.rb action là index, còn là user thông thường có thể là user/orders_controller http://stackoverflow.com/questions/16444489/create-administration-area-in-rails-app
    Please register or sign in to reply
  • Tran Hoang Viet
    @vietth started a discussion on an old version of the diff Jul 21, 2015
    app/controllers/orders_controller.rb
    19 22 end
    20 23 end
    21 24  
    25 def management
    • Tran Hoang Viet @vietth commented Jul 21, 2015
      Master

      Okie. Mà feature này viết nữa chừng thì bỏ rồi không viết nữa, thấy nó chỉ là CRUD nên đang tập trung những feature khác như search multi fields, S3 ...

      Okie. Mà feature này viết nữa chừng thì bỏ rồi không viết nữa, thấy nó chỉ là CRUD nên đang tập trung những feature khác như search multi fields, S3 ...
    Please register or sign in to reply
  • Tran Hoang Viet
    @vietth started a discussion on an old version of the diff Jul 21, 2015
    Gemfile
    68 68 gem 'draper', '~> 2.1.0'
    69 69  
    70 70 gem 'devise', '~> 3.5.1'
    71 gem 'rolify', '~> 4.0.0'
    72 gem 'cancan', '~> 1.6.10'
    • Tran Hoang Viet @vietth commented Jul 21, 2015
      Master

      Okie

      Okie
    Please register or sign in to reply
  • Tran Hoang Viet @vietth

    Added 2 commits:

    • e6026430 - VietTH: Use gem pundit instead cancan
    • bae6f988 - VietTH: Fix review code, saperate admin orders controler
    Jul 22, 2015

    Added 2 commits:

    • e6026430 - VietTH: Use gem pundit instead cancan
    • bae6f988 - VietTH: Fix review code, saperate admin orders controler
    Added 2 commits: * e6026430 - VietTH: Use gem pundit instead cancan * bae6f988 - VietTH: Fix review code, saperate admin orders controler
    Toggle commit list
  • Truong Ba Dieu
    @dieutb started a discussion on the diff Jul 28, 2015
    app/controllers/orders_controller.rb
    1 1 class OrdersController < ApplicationController
    2 2 before_action :authenticate_user!
    3 before_action :set_order, only: [:show, :update]
    4 before_action -> { authorize(@order) }, only: [:show, :update]
    • Truong Ba Dieu @dieutb commented Jul 28, 2015
      Developer

      Filter admin

      Filter admin
    Please register or sign in to reply
  • Truong Ba Dieu
    @dieutb started a discussion on the diff Jul 28, 2015
    app/views/layouts/application.html.haml
    9 9 %body
    10 10 %nav.navbar.navbar-inverse.navbar-fixed-top
    11 11 .container-fluid
    12 = render 'layouts/header'
    12 = render '/layouts/header'
    • Truong Ba Dieu @dieutb commented Jul 28, 2015
      Developer

      partial cung thu muc thi chi can ten: header

      partial cung thu muc thi chi can ten: header
    Please register or sign in to reply
  • Truong Ba Dieu
    @dieutb started a discussion on the diff Jul 28, 2015
    app/views/orders/index.html.haml
    4 .order-item.table-responsive
    6 5 %table.table
    7 6 %thead
    8 7 %tr
    9 8 %td.text-right #
    10 %td Title
    11 %td Price
    12 %td Stock
    13 %td Quantity
    9 %td Order number
    10 / %td Ordered by
    11 %td Created at
    12 %td Status
    14 13 %tbody
    15 - current_user.cart.items.each_with_index do |order_item, index|
    14 - @orders.each_with_index do |order_item, index|
    • Truong Ba Dieu @dieutb commented Jul 28, 2015
      Developer

      nen dung render partial order

      nen dung render partial order
    Please register or sign in to reply
  • Tran Hoang Viet
    @vietth started a discussion on the diff Jul 29, 2015
    app/controllers/orders_controller.rb
    1 1 class OrdersController < ApplicationController
    2 2 before_action :authenticate_user!
    3 before_action :set_order, only: [:show, :update]
    4 before_action -> { authorize(@order) }, only: [:show, :update]
    • Tran Hoang Viet @vietth commented Jul 29, 2015
      Master

      Fixed

      Fixed
    Please register or sign in to reply
  • Tran Hoang Viet
    @vietth started a discussion on the diff Jul 29, 2015
    app/views/layouts/application.html.haml
    9 9 %body
    10 10 %nav.navbar.navbar-inverse.navbar-fixed-top
    11 11 .container-fluid
    12 = render 'layouts/header'
    12 = render '/layouts/header'
    • Tran Hoang Viet @vietth commented Jul 29, 2015
      Master

      namespace admin dùng chung template nen phai dung duong dan tuyet doi

      namespace admin dùng chung template nen phai dung duong dan tuyet doi
    Please register or sign in to reply
  • Tran Hoang Viet
    @vietth started a discussion on the diff Jul 29, 2015
    app/views/orders/index.html.haml
    4 .order-item.table-responsive
    6 5 %table.table
    7 6 %thead
    8 7 %tr
    9 8 %td.text-right #
    10 %td Title
    11 %td Price
    12 %td Stock
    13 %td Quantity
    9 %td Order number
    10 / %td Ordered by
    11 %td Created at
    12 %td Status
    14 13 %tbody
    15 - current_user.cart.items.each_with_index do |order_item, index|
    14 - @orders.each_with_index do |order_item, index|
    • Tran Hoang Viet @vietth commented Jul 29, 2015
      Master

      Order duoc show duoi dang tag <tr><td> ma dua vao partial thi co ve k hop ly lam, partial thuong dung de render detail cua 1 object. Voi lai hien tai khong co nhieu cho show list order.

      Order duoc show duoi dang tag `<tr><td>` ma dua vao partial thi co ve k hop ly lam, partial thuong dung de render detail cua 1 object. Voi lai hien tai khong co nhieu cho show list order.
    Please register or sign in to reply
  • Truong Ba Dieu
    @dieutb started a discussion on the diff Jul 29, 2015
    app/views/orders/index.html.haml
    4 .order-item.table-responsive
    6 5 %table.table
    7 6 %thead
    8 7 %tr
    9 8 %td.text-right #
    10 %td Title
    11 %td Price
    12 %td Stock
    13 %td Quantity
    9 %td Order number
    10 / %td Ordered by
    11 %td Created at
    12 %td Status
    14 13 %tbody
    15 - current_user.cart.items.each_with_index do |order_item, index|
    14 - @orders.each_with_index do |order_item, index|
    • Truong Ba Dieu @dieutb commented Jul 29, 2015
      Developer

      OK

      OK
    Please register or sign in to reply
  • Truong Ba Dieu
    @dieutb started a discussion on the diff Jul 29, 2015
    app/views/layouts/application.html.haml
    9 9 %body
    10 10 %nav.navbar.navbar-inverse.navbar-fixed-top
    11 11 .container-fluid
    12 = render 'layouts/header'
    12 = render '/layouts/header'
    • Truong Ba Dieu @dieutb commented Jul 29, 2015
      Developer

      OK

      OK
    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
Assignee
No assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
3
3 participants
Reference: vietth/VietTH-VenShop!11