-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
25dc378
commit 42f6eb7
Showing
28 changed files
with
54 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
module Trade::Admin | ||
class Desk::ItemsController < ItemsController | ||
before_action :set_desk | ||
|
||
def index | ||
q_params = { | ||
status: ['init', 'checked', 'ordered'] | ||
} | ||
q_params.merge! default_params | ||
q_params.merge! params.permit(:cart_id, :order_id, :good_type, :good_id, :desk_id, :aim, :address_id, :status) | ||
|
||
@items = Item.includes(:user, :item_promotes, :order).default_where(q_params).order(order_id: :desc).page(params[:page]).per(params[:per]) | ||
end | ||
|
||
def history | ||
q_params = { | ||
status: ['deliverable', 'done'] | ||
} | ||
q_params.merge! default_params | ||
q_params.merge! params.permit(:cart_id, :order_id, :good_type, :good_id, :desk_id, :aim, :address_id, :status) | ||
|
||
@items = Item.includes(:user, :item_promotes, :order).default_where(q_params).order(order_id: :desc).page(params[:page]).per(params[:per]) | ||
end | ||
|
||
private | ||
def set_desk | ||
@desk = Space::Desk.default_where(default_params).find params[:desk_id] | ||
end | ||
|
||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<div class="tabs is-centered mb-3"> | ||
<ul> | ||
<li class="<%= active_helper(action: 'index', active: 'is-active') %>"> | ||
<%= link_to t('.index.title'), { action: 'index' } %> | ||
</li> | ||
<li class="<%= active_helper(action: 'history', active: 'is-active') %>"> | ||
<%= link_to t('.history.title'), { action: 'history' } %> | ||
</li> | ||
</ul> | ||
</div> |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters