rails_ship 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +20 -0
- data/README.md +32 -0
- data/Rakefile +32 -0
- data/app/controllers/ship/admin/addresses_controller.rb +48 -0
- data/app/controllers/ship/admin/base_controller.rb +5 -0
- data/app/controllers/ship/admin/home_controller.rb +8 -0
- data/app/controllers/ship/admin/packages_controller.rb +43 -0
- data/app/controllers/ship/admin/trade_items_controller.rb +72 -0
- data/app/controllers/ship/driver/base_controller.rb +9 -0
- data/app/controllers/ship/driver/favorites_controller.rb +39 -0
- data/app/controllers/ship/my/addresses_controller.rb +58 -0
- data/app/controllers/ship/my/base_controller.rb +5 -0
- data/app/controllers/ship/my/cars_controller.rb +54 -0
- data/app/controllers/ship/my/drivers_controller.rb +38 -0
- data/app/controllers/ship/my/favorites_controller.rb +40 -0
- data/app/controllers/ship/my/lines_controller.rb +71 -0
- data/app/controllers/ship/my/locations_controller.rb +60 -0
- data/app/controllers/ship/my/packages_controller.rb +53 -0
- data/app/controllers/ship/my/principal_addresses_controller.rb +26 -0
- data/app/controllers/ship/panel/base_controller.rb +5 -0
- data/app/controllers/ship/panel/lines_controller.rb +53 -0
- data/app/controllers/ship/panel/similars_controller.rb +61 -0
- data/app/jobs/ship/car_ocr_job.rb +11 -0
- data/app/jobs/ship/driver_ocr_job.rb +11 -0
- data/app/jobs/ship/location_geo_job.rb +10 -0
- data/app/models/ship/address.rb +7 -0
- data/app/models/ship/car.rb +5 -0
- data/app/models/ship/driver.rb +5 -0
- data/app/models/ship/ext/order.rb +7 -0
- data/app/models/ship/ext/trade_item.rb +11 -0
- data/app/models/ship/ext/user.rb +15 -0
- data/app/models/ship/favorite.rb +5 -0
- data/app/models/ship/line.rb +5 -0
- data/app/models/ship/line_similar.rb +5 -0
- data/app/models/ship/location.rb +5 -0
- data/app/models/ship/model/address.rb +10 -0
- data/app/models/ship/model/car.rb +34 -0
- data/app/models/ship/model/driver.rb +45 -0
- data/app/models/ship/model/favorite.rb +14 -0
- data/app/models/ship/model/line.rb +28 -0
- data/app/models/ship/model/line_similar.rb +16 -0
- data/app/models/ship/model/location.rb +53 -0
- data/app/models/ship/model/package.rb +28 -0
- data/app/models/ship/model/packaged.rb +29 -0
- data/app/models/ship/model/shipment.rb +22 -0
- data/app/models/ship/model/shipping.rb +9 -0
- data/app/models/ship/package.rb +6 -0
- data/app/models/ship/packaged.rb +5 -0
- data/app/models/ship/shipment.rb +5 -0
- data/app/models/ship.rb +11 -0
- data/app/views/admin/_ship_nav.html.erb +11 -0
- data/app/views/panel/_ship_nav.html.erb +10 -0
- data/app/views/ship/admin/addresses/_address.html.erb +24 -0
- data/app/views/ship/admin/addresses/_edit_form.html.erb +3 -0
- data/app/views/ship/admin/addresses/_form.html.erb +9 -0
- data/app/views/ship/admin/addresses/index.html.erb +36 -0
- data/app/views/ship/admin/base/_nav.html.erb +3 -0
- data/app/views/ship/admin/home/index.html.erb +0 -0
- data/app/views/ship/admin/packages/_button.html.erb +0 -0
- data/app/views/ship/admin/packages/_edit_form.html.erb +4 -0
- data/app/views/ship/admin/packages/_filter_form.html.erb +9 -0
- data/app/views/ship/admin/packages/_form.html.erb +5 -0
- data/app/views/ship/admin/packages/_index_tbody.html.erb +8 -0
- data/app/views/ship/admin/packages/_index_thead.html.erb +5 -0
- data/app/views/ship/admin/packages/_new_form.html.erb +4 -0
- data/app/views/ship/admin/packages/_show_table.html.erb +16 -0
- data/app/views/ship/admin/packages/index.html.erb +5 -0
- data/app/views/ship/admin/rallies/_filter.html.erb +7 -0
- data/app/views/ship/admin/rallies/_form.html+phone.erb +17 -0
- data/app/views/ship/admin/rallies/_show_table.html+phone.erb +24 -0
- data/app/views/ship/admin/rallies/_show_table.html.erb +12 -0
- data/app/views/ship/admin/rallies/index.html+phone.erb +26 -0
- data/app/views/ship/admin/rallies/show.html.erb +26 -0
- data/app/views/ship/admin/trade_items/_filter.html.erb +9 -0
- data/app/views/ship/admin/trade_items/_form.html.erb +7 -0
- data/app/views/ship/admin/trade_items/_show_table.html.erb +24 -0
- data/app/views/ship/admin/trade_items/index.html.erb +51 -0
- data/app/views/ship/driver/favorites/_button.html+phone.erb +4 -0
- data/app/views/ship/driver/favorites/_edit_form.html.erb +4 -0
- data/app/views/ship/driver/favorites/_filter_form.html+phone.erb +14 -0
- data/app/views/ship/driver/favorites/_filter_form.html.erb +9 -0
- data/app/views/ship/driver/favorites/_form.html.erb +3 -0
- data/app/views/ship/driver/favorites/_index_tbody.html.erb +6 -0
- data/app/views/ship/driver/favorites/_index_thead.html.erb +3 -0
- data/app/views/ship/driver/favorites/_index_tr.html.erb +4 -0
- data/app/views/ship/driver/favorites/_new_form.html.erb +4 -0
- data/app/views/ship/driver/favorites/_show_table.html.erb +8 -0
- data/app/views/ship/driver/favorites/index.html.erb +5 -0
- data/app/views/ship/my/addresses/_edit_form.html.erb +21 -0
- data/app/views/ship/my/addresses/_form.html.erb +23 -0
- data/app/views/ship/my/addresses/index.html.erb +44 -0
- data/app/views/ship/my/cars/_edit_form.html.erb +6 -0
- data/app/views/ship/my/cars/_filter_form.html.erb +9 -0
- data/app/views/ship/my/cars/_index_tbody.html.erb +3 -0
- data/app/views/ship/my/cars/_index_thead.html.erb +4 -0
- data/app/views/ship/my/cars/_new_form.html.erb +4 -0
- data/app/views/ship/my/cars/_show_table.html.erb +16 -0
- data/app/views/ship/my/cars/create.turbo_stream.erb +1 -0
- data/app/views/ship/my/cars/index.html+phone.erb +19 -0
- data/app/views/ship/my/cars/index.html.erb +5 -0
- data/app/views/ship/my/cars/new.html.erb +25 -0
- data/app/views/ship/my/drivers/_edit_form.html.erb +6 -0
- data/app/views/ship/my/drivers/_form.html.erb +4 -0
- data/app/views/ship/my/drivers/_index_tbody.html.erb +3 -0
- data/app/views/ship/my/drivers/_index_thead.html.erb +4 -0
- data/app/views/ship/my/drivers/_new_form.html.erb +4 -0
- data/app/views/ship/my/drivers/_show_table.html.erb +12 -0
- data/app/views/ship/my/drivers/_uploader.html.erb +22 -0
- data/app/views/ship/my/drivers/edit.html.erb +20 -0
- data/app/views/ship/my/drivers/show.html.erb +33 -0
- data/app/views/ship/my/favorites/_button.html+phone.erb +4 -0
- data/app/views/ship/my/favorites/_edit_form.html.erb +4 -0
- data/app/views/ship/my/favorites/_filter_form.html+phone.erb +14 -0
- data/app/views/ship/my/favorites/_filter_form.html.erb +9 -0
- data/app/views/ship/my/favorites/_form.html.erb +3 -0
- data/app/views/ship/my/favorites/_index_tbody.html.erb +6 -0
- data/app/views/ship/my/favorites/_index_thead.html.erb +3 -0
- data/app/views/ship/my/favorites/_new_form.html.erb +4 -0
- data/app/views/ship/my/favorites/_show_table.html.erb +8 -0
- data/app/views/ship/my/favorites/index.html.erb +5 -0
- data/app/views/ship/my/lines/_edit_form.html.erb +4 -0
- data/app/views/ship/my/lines/_filter_form.html.erb +1 -0
- data/app/views/ship/my/lines/_form.html.erb +3 -0
- data/app/views/ship/my/lines/_index_tbody.html.erb +6 -0
- data/app/views/ship/my/lines/_index_tr.html.erb +4 -0
- data/app/views/ship/my/lines/_item_field.html.erb +8 -0
- data/app/views/ship/my/lines/_item_location.html.erb +13 -0
- data/app/views/ship/my/lines/_new_form.html.erb +15 -0
- data/app/views/ship/my/lines/_select/_tab_bar.html.erb +10 -0
- data/app/views/ship/my/lines/_select.html.erb +10 -0
- data/app/views/ship/my/lines/_show/_index_tbody.html.erb +6 -0
- data/app/views/ship/my/lines/_show/_index_tr.html+phone.erb +6 -0
- data/app/views/ship/my/lines/_show_table.html.erb +9 -0
- data/app/views/ship/my/lines/add.turbo_stream.erb +1 -0
- data/app/views/ship/my/lines/index.html.erb +5 -0
- data/app/views/ship/my/lines/new.html.erb +1 -0
- data/app/views/ship/my/lines/requirement.html.erb +5 -0
- data/app/views/ship/my/lines/select.turbo_stream.erb +1 -0
- data/app/views/ship/my/lines/show.html+phone.erb +30 -0
- data/app/views/ship/my/locations/_edit_form.html.erb +4 -0
- data/app/views/ship/my/locations/_filter_form.html.erb +9 -0
- data/app/views/ship/my/locations/_form.html.erb +6 -0
- data/app/views/ship/my/locations/_index_tbody.html.erb +5 -0
- data/app/views/ship/my/locations/_index_thead.html.erb +6 -0
- data/app/views/ship/my/locations/_new_form.html.erb +4 -0
- data/app/views/ship/my/locations/_show_table.html.erb +20 -0
- data/app/views/ship/my/locations/index.html.erb +5 -0
- data/app/views/ship/my/packages/index.html.erb +31 -0
- data/app/views/ship/my/principal_addresses/index.html+phone.erb +32 -0
- data/app/views/ship/my/principal_addresses/plans.html+phone.erb +23 -0
- data/app/views/ship/my/principal_addresses/show.html+phone.erb +27 -0
- data/app/views/ship/panel/base/_nav.html.erb +3 -0
- data/app/views/ship/panel/lines/_edit_form.html.erb +4 -0
- data/app/views/ship/panel/lines/_filter_form.html.erb +9 -0
- data/app/views/ship/panel/lines/_form.html.erb +4 -0
- data/app/views/ship/panel/lines/_index_tbody.html.erb +4 -0
- data/app/views/ship/panel/lines/_index_thead.html.erb +5 -0
- data/app/views/ship/panel/lines/_index_tr.html.erb +19 -0
- data/app/views/ship/panel/lines/_new_form.html.erb +4 -0
- data/app/views/ship/panel/lines/_show_table.html.erb +12 -0
- data/app/views/ship/panel/lines/index.html.erb +5 -0
- data/app/views/ship/panel/similars/_breadcrumb.html.erb +7 -0
- data/app/views/ship/panel/similars/_button.html.erb +3 -0
- data/app/views/ship/panel/similars/_edit_form.html.erb +4 -0
- data/app/views/ship/panel/similars/_filter_form.html.erb +9 -0
- data/app/views/ship/panel/similars/_form.html.erb +4 -0
- data/app/views/ship/panel/similars/_index_tbody.html.erb +3 -0
- data/app/views/ship/panel/similars/_index_thead.html.erb +4 -0
- data/app/views/ship/panel/similars/_new/_button.html.erb +0 -0
- data/app/views/ship/panel/similars/_new/_index_tr.html.erb +10 -0
- data/app/views/ship/panel/similars/_new/_index_tr_remove.html.erb +10 -0
- data/app/views/ship/panel/similars/_new_form.html.erb +4 -0
- data/app/views/ship/panel/similars/_show_table.html.erb +12 -0
- data/app/views/ship/panel/similars/create.turbo_stream.erb +3 -0
- data/app/views/ship/panel/similars/destroy.turbo_stream.erb +3 -0
- data/app/views/ship/panel/similars/index.html.erb +5 -0
- data/app/views/ship/panel/similars/new.html.erb +16 -0
- data/config/locales/zh.attributes.yml +15 -0
- data/config/locales/zh.yml +51 -0
- data/config/routes.rb +66 -0
- data/lib/rails_ship/config.rb +11 -0
- data/lib/rails_ship/engine.rb +21 -0
- data/lib/rails_ship.rb +2 -0
- metadata +240 -0
@@ -0,0 +1,10 @@
|
|
1
|
+
<div class="<%= active_helper(modules: 'ship/panel', active: 'menu ex-accordion is-active', item: 'menu ex-accordion') %>" data-controller="menu">
|
2
|
+
<%= content_tag :div, class: 'menu-list' do %>
|
3
|
+
<%= link_to t('ship.panel.lines.index.title'), { controller: 'ship/panel/lines' }, class: active_helper(controllers: 'lines', active: 'is-active') -%>
|
4
|
+
<% end %>
|
5
|
+
<a class="menu-label" data-action="menu#toggle">
|
6
|
+
<i class="fas fa-truck fa-fw"></i>
|
7
|
+
<span><%= t('ship.panel.title') %></span>
|
8
|
+
<i class="fas dropdown"></i>
|
9
|
+
</a>
|
10
|
+
</div>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<tr id="address_<%= address.id %>">
|
2
|
+
<td>
|
3
|
+
<div class="ui radio checkbox">
|
4
|
+
<% if address.kind == 'invoice' %>
|
5
|
+
<%= radio_button_tag :'order[invoice_address_id]', address.id, true, form: 'new_order' %><label></label>
|
6
|
+
<% else %>
|
7
|
+
<%= radio_button_tag :'order[address_id]', address.id, true, form: 'new_order' %><label></label>
|
8
|
+
<% end %>
|
9
|
+
</div>
|
10
|
+
</td>
|
11
|
+
<td><%= address.contact_person %></td>
|
12
|
+
<td><%= address.tel %></td>
|
13
|
+
<td>
|
14
|
+
<%= address.area.nation %>
|
15
|
+
<%= address.area.province %>
|
16
|
+
<%= address.area.city %>
|
17
|
+
</td>
|
18
|
+
<td><%= address.address %></td>
|
19
|
+
<td>
|
20
|
+
<%= link_to 'Edit', edit_admin_address_path(address) %>
|
21
|
+
<%= link_to 'Destroy', admin_address_path(address), method: :delete, data: { confirm: t('.confirm') } %>
|
22
|
+
</td>
|
23
|
+
</tr>
|
24
|
+
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<%= f.hidden_field :area_id %>
|
2
|
+
<%= f.hidden_field :user_id %>
|
3
|
+
<%= f.select :kind, options_for_select(Address.options_i18n(:kind)) %>
|
4
|
+
<%= f.select :proxy_shipment, options_for_select(Address.options_i18n(:proxy_shipment)) %>
|
5
|
+
<%= f.text_field :contact_person %>
|
6
|
+
<%= f.text_field :tel %>
|
7
|
+
<%= f.text_field :address %>
|
8
|
+
<%= f.text_field :postcode %>
|
9
|
+
<%= f.submit %>
|
@@ -0,0 +1,36 @@
|
|
1
|
+
|
2
|
+
<table class="table is-hoverable is-fullwidth">
|
3
|
+
<thead>
|
4
|
+
<tr>
|
5
|
+
<th><%= Ship::Address.human_attribute_name(:contact) %></th>
|
6
|
+
<th><%= Ship::Address.human_attribute_name(:tel) %></th>
|
7
|
+
<th><%= Ship::Address.human_attribute_name(:detail) %></th>
|
8
|
+
<th></th>
|
9
|
+
</tr>
|
10
|
+
</thead>
|
11
|
+
|
12
|
+
<tbody>
|
13
|
+
<% @addresses.each do |address| %>
|
14
|
+
<tr id="address_<%= address.id %>">
|
15
|
+
<td><%= address.contact %></td>
|
16
|
+
<td><%= address.tel %></td>
|
17
|
+
<td><%= address.detail %></td>
|
18
|
+
<td>
|
19
|
+
<%= link_to({ action: 'show', id: address.id }, aria: { label: t('.show') }, class: 'button is-small is-rounded is-light') do %>
|
20
|
+
<i class="fas fa-info"></i>
|
21
|
+
<% end %>
|
22
|
+
<%= link_to({ controller: 'trade_items', address_id: address.id }, aria: { label: t('.show') }, class: 'button is-small is-rounded is-light') do %>
|
23
|
+
<i class="fas fa-dolly"></i>
|
24
|
+
<% end %>
|
25
|
+
<%= link_to({ controller: 'packages', address_id: address.id }, aria: { label: t('ship.admin.packages.index.title') }, class: 'button is-small is-rounded is-light') do %>
|
26
|
+
<i class="fas fa-box"></i>
|
27
|
+
<% end %>
|
28
|
+
<%= link_to({ action: 'show', id: address.id }, class: 'button is-small is-rounded is-light') do %>
|
29
|
+
<i class="fas fa-pencil-alt"></i>
|
30
|
+
<% end %>
|
31
|
+
</td>
|
32
|
+
</tr>
|
33
|
+
<% end %>
|
34
|
+
</tbody>
|
35
|
+
</table>
|
36
|
+
|
File without changes
|
File without changes
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<%= form_with theme: 'search', model: Ship::Package.new do |f| %>
|
2
|
+
<div class="field-body">
|
3
|
+
<%= f.text_field :name %>
|
4
|
+
<div class="field is-narrow">
|
5
|
+
<%= f.submit %>
|
6
|
+
<%= link_to t('.clear'), filter_params(except: [:name]), class: 'button is-light' %>
|
7
|
+
</div>
|
8
|
+
</div>
|
9
|
+
<% end %>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<tr>
|
2
|
+
<td class="has-text-right"><%= Ship::Package.human_attribute_name(:address) %></td>
|
3
|
+
<td><%= @package.address %></td>
|
4
|
+
</tr>
|
5
|
+
<tr>
|
6
|
+
<td class="has-text-right"><%= Ship::Package.human_attribute_name(:state) %></td>
|
7
|
+
<td><%= @package.state %></td>
|
8
|
+
</tr>
|
9
|
+
<tr>
|
10
|
+
<td class="has-text-right"><%= Ship::Package.human_attribute_name(:expected_on) %></td>
|
11
|
+
<td><%= @package.expected_on %></td>
|
12
|
+
</tr>
|
13
|
+
<tr>
|
14
|
+
<td class="has-text-right"><%= Ship::Package.human_attribute_name(:item) %></td>
|
15
|
+
<td><%= @package.item %></td>
|
16
|
+
</tr>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<%= form_with theme: 'weui', model: [:my, @rally] do |f| %>
|
2
|
+
<%= render 'error_messages', target: @rally %>
|
3
|
+
<%= f.text_field :name %>
|
4
|
+
<div class="weui-cell weui-cell_active weui-cell_vcode">
|
5
|
+
<div class="weui-cell__hd">
|
6
|
+
<label class="weui-label"><%= Rally.human_attribute_name(:area_id) %></label>
|
7
|
+
</div>
|
8
|
+
<div class="weui-cell__bd">
|
9
|
+
<%= f.hidden_field :area_id %>
|
10
|
+
</div>
|
11
|
+
<div class="weui-cell__ft">
|
12
|
+
<%= link_to t('.token'), areas_path, class: 'weui-btn weui-btn_default weui-vcode-btn', data: { params: 'node_type=rally' } %>
|
13
|
+
</div>
|
14
|
+
</div>
|
15
|
+
<%= f.text_field :detail %>
|
16
|
+
<%= f.submit %>
|
17
|
+
<% end %>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<table class="table is-hoverable is-fullwidth">
|
2
|
+
<thead>
|
3
|
+
<tr>
|
4
|
+
<th class="six wide">
|
5
|
+
<%= link_to t('.edit'), edit_my_rally_path(@rally), class: 'ui mini blue right floated button' %>
|
6
|
+
</th>
|
7
|
+
<th class="ten wide"></th>
|
8
|
+
</tr>
|
9
|
+
</thead>
|
10
|
+
<tbody>
|
11
|
+
<tr>
|
12
|
+
<td class="has-text-right"><%= Rally.human_attribute_name(:name) %></td>
|
13
|
+
<td><%= @rally.name %></td>
|
14
|
+
</tr>
|
15
|
+
<tr>
|
16
|
+
<td class="has-text-right"><%= Rally.human_attribute_name(:detail) %></td>
|
17
|
+
<td><%= @rally.detail %></td>
|
18
|
+
</tr>
|
19
|
+
<tr>
|
20
|
+
<td class="has-text-right"><%= Rally.human_attribute_name(:area_id) %></td>
|
21
|
+
<td><%= @rally.area_id %></td>
|
22
|
+
</tr>
|
23
|
+
</tbody>
|
24
|
+
</table>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<tr>
|
2
|
+
<td class="has-text-right"><%= Rally.human_attribute_name(:name) %></td>
|
3
|
+
<td><%= @rally.name %></td>
|
4
|
+
</tr>
|
5
|
+
<tr>
|
6
|
+
<td class="has-text-right"><%= Rally.human_attribute_name(:detail) %></td>
|
7
|
+
<td><%= @rally.detail %></td>
|
8
|
+
</tr>
|
9
|
+
<tr>
|
10
|
+
<td class="has-text-right"><%= Rally.human_attribute_name(:area_id) %></td>
|
11
|
+
<td><%= @rally.area_id %></td>
|
12
|
+
</tr>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<div class="weui-panel">
|
2
|
+
<div class="weui-panel__hd">收货点</div>
|
3
|
+
<div class="weui-panel__bd">
|
4
|
+
<% @rallies.each do |rally| %>
|
5
|
+
<div class="weui-media-box weui-media-box_appmsg">
|
6
|
+
<div class="weui-media-box__bd">
|
7
|
+
<h6 class="weui-media-box__title">
|
8
|
+
<%= link_to rally.name, my_rally_path(rally) %>
|
9
|
+
</h6>
|
10
|
+
<div class="weui-media-box__desc"><%= rally.area.full_name %><%= rally.detail %></div>
|
11
|
+
</div>
|
12
|
+
<div class="weui-media-box__ft">
|
13
|
+
<div class="weui-btn weui-btn_default">
|
14
|
+
<%= link_to '召集', my_rally_url(rally.id) %>
|
15
|
+
</div>
|
16
|
+
</div>
|
17
|
+
</div>
|
18
|
+
<% end %>
|
19
|
+
</div>
|
20
|
+
<div class="weui-panel__ft">
|
21
|
+
<%= link_to new_my_rally_path, class: 'weui-cell weui-cell_access weui-cell_link' do %>
|
22
|
+
<div class="weui-cell__bd"><%= t('.new') %></div>
|
23
|
+
<span class="weui-cell__ft"></span>
|
24
|
+
<% end %>
|
25
|
+
</div>
|
26
|
+
</div>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<%= content_for(:wechat_js) do %>
|
2
|
+
<%= wechat_config_js debug: false, apis: ['updateAppMessageShareData', 'updateTimelineShareData'] -%>
|
3
|
+
<% end %>
|
4
|
+
|
5
|
+
<%= render 'show_table' %>
|
6
|
+
|
7
|
+
<script>
|
8
|
+
wx.ready(function() {
|
9
|
+
wx.updateAppMessageShareData({
|
10
|
+
title: 'dddd',
|
11
|
+
desc: 'ssss',
|
12
|
+
link: '<%= join_my_rally_url(@rally.id, invited_code: current_user.id) %>',
|
13
|
+
imgUrl: '',
|
14
|
+
success: function() {
|
15
|
+
}
|
16
|
+
})
|
17
|
+
wx.updateTimelineShareData({
|
18
|
+
title: '',
|
19
|
+
link: '<%= join_my_rally_url(@rally.id, invited_code: current_user.id) %>',
|
20
|
+
imgUrl: '',
|
21
|
+
success: function() {
|
22
|
+
|
23
|
+
}
|
24
|
+
})
|
25
|
+
})
|
26
|
+
</script>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<%= form_with theme: 'search', model: TradeItem.new do |f| %>
|
2
|
+
<div class="field-body">
|
3
|
+
<%= f.text_field :name %>
|
4
|
+
<div class="field is-narrow">
|
5
|
+
<%= f.submit %>
|
6
|
+
<%= link_to t('.clear'), filter_params(except: [:name]), class: 'button is-light' %>
|
7
|
+
</div>
|
8
|
+
</div>
|
9
|
+
<% end %>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<table class="table is-hoverable is-fullwidth">
|
2
|
+
<thead>
|
3
|
+
<tr>
|
4
|
+
<th class="six wide">
|
5
|
+
<%= link_to t('.edit'), edit_admin_trade_item_path(@trade_item), class: 'ui mini blue right floated button' %>
|
6
|
+
</th>
|
7
|
+
<th class="ten wide"></th>
|
8
|
+
</tr>
|
9
|
+
</thead>
|
10
|
+
<tbody>
|
11
|
+
<tr>
|
12
|
+
<td class="has-text-right"><%= TradeItem.human_attribute_name(:good_id) %></td>
|
13
|
+
<td><%= @trade_item.good_id %></td>
|
14
|
+
</tr>
|
15
|
+
<tr>
|
16
|
+
<td class="has-text-right"><%= TradeItem.human_attribute_name(:number) %></td>
|
17
|
+
<td><%= @trade_item.number %></td>
|
18
|
+
</tr>
|
19
|
+
<tr>
|
20
|
+
<td class="has-text-right"><%= TradeItem.human_attribute_name(:status) %></td>
|
21
|
+
<td><%= @trade_item.status %></td>
|
22
|
+
</tr>
|
23
|
+
</tbody>
|
24
|
+
</table>
|
@@ -0,0 +1,51 @@
|
|
1
|
+
<%= render 'filter' %>
|
2
|
+
|
3
|
+
<table class="table is-hoverable is-fullwidth" data-controller="check">
|
4
|
+
<thead>
|
5
|
+
<tr>
|
6
|
+
<th>
|
7
|
+
<%= check_box_tag 'xxd', 'xx', false, data: { action: 'check#toggleAll' } %>
|
8
|
+
<%= link_to package_admin_address_trade_items_path(@address), aria: { label: t('.package'), action: 'check#applyFor' }, method: :post, class: 'ui mini button' do %>
|
9
|
+
<i class="fas fa-hand-holding-usd"></i>
|
10
|
+
<% end %>
|
11
|
+
</th>
|
12
|
+
<th><%= TradeItem.human_attribute_name(:good_id) %></th>
|
13
|
+
<th><%= TradeItem.human_attribute_name(:number) %></th>
|
14
|
+
<th><%= TradeItem.human_attribute_name('trade/user_id') %></th>
|
15
|
+
<th><%= TradeItem.human_attribute_name(:produce_plan_id) %></th>
|
16
|
+
<th><%= TradeItem.human_attribute_name(:status) %></th>
|
17
|
+
<th>
|
18
|
+
<%= link_to new_admin_trade_item_path, class: 'button is-link is-small' do %>
|
19
|
+
<i class="fas fa-plus"></i><%= t('.new') %>
|
20
|
+
<% end %>
|
21
|
+
</th>
|
22
|
+
</tr>
|
23
|
+
</thead>
|
24
|
+
<tbody>
|
25
|
+
<% @trade_items.each do |trade_item| %>
|
26
|
+
<tr>
|
27
|
+
<td>
|
28
|
+
<%= check_box_tag 'xx', trade_item.id, false, data: { action: 'check#toggle' } %>
|
29
|
+
</td>
|
30
|
+
<td><%= trade_item.good_id %></td>
|
31
|
+
<td><%= trade_item.number %></td>
|
32
|
+
<td><%= trade_item.trade.user_id %></td>
|
33
|
+
<td><%= trade_item.produce_plan&.title %></td>
|
34
|
+
<td><%= trade_item.status %></td>
|
35
|
+
<td>
|
36
|
+
<%= link_to admin_trade_item_path(trade_item), aria: { label: t('.show') }, class: 'button is-small is-rounded is-light' do %>
|
37
|
+
<i class="fas fa-eye"></i>
|
38
|
+
<% end %>
|
39
|
+
<%= link_to edit_admin_trade_item_path(trade_item), aria: { label: t('.edit') }, class: 'button is-small is-rounded is-light' do %>
|
40
|
+
<i class="fas fa-pencil-alt"></i>
|
41
|
+
<% end %>
|
42
|
+
<%= link_to admin_trade_item_path(trade_item), method: :delete, aria: { label: t('.destroy') }, data: { confirm: t('.confirm') }, class: 'button is-small is-rounded is-light' do %>
|
43
|
+
<i class="fas fa-trash-alt"></i>
|
44
|
+
<% end %>
|
45
|
+
</td>
|
46
|
+
</tr>
|
47
|
+
<% end %>
|
48
|
+
</tbody>
|
49
|
+
</table>
|
50
|
+
|
51
|
+
<%= paginate @trade_items %>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<div class="weui-search-bar" data-controller="search">
|
2
|
+
<%= form_with theme: nil, class: 'weui-search-bar__form', method: :get, local: true do |f| %>
|
3
|
+
<div class="weui-search-bar__box">
|
4
|
+
<i class="weui-icon-search"></i>
|
5
|
+
<%= f.search_field 'name-like', value: params['name-like'], class: 'weui-search-bar__input', placeholder: '搜索', data: { search_target: 'input' } %>
|
6
|
+
<a class="weui-icon-clear" data-action="search#clear"></a>
|
7
|
+
</div>
|
8
|
+
<label class="weui-search-bar__label" data-search-target="label" data-action="click->search#focus">
|
9
|
+
<i class="weui-icon-search"></i>
|
10
|
+
<span>搜索</span>
|
11
|
+
</label>
|
12
|
+
<% end %>
|
13
|
+
<a class="weui-search-bar__cancel-btn" data-action="search#cancel">取消</a>
|
14
|
+
</div>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<%= form_with theme: 'search', model: Ship::Favorite.new do |f| %>
|
2
|
+
<div class="field-body">
|
3
|
+
<%= f.text_field :name %>
|
4
|
+
<div class="field is-narrow">
|
5
|
+
<%= f.submit %>
|
6
|
+
<%= link_to t('.clear'), filter_params(except: [:name]), class: 'button is-light' %>
|
7
|
+
</div>
|
8
|
+
</div>
|
9
|
+
<% end %>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<tr>
|
2
|
+
<td class="has-text-right"><%= Ship::Favorite.human_attribute_name(:avatar) %></td>
|
3
|
+
<td><%= image_tag @favorite.user.avatar %></td>
|
4
|
+
</tr>
|
5
|
+
<tr>
|
6
|
+
<td class="has-text-right"><%= Ship::Favorite.human_attribute_name(:name) %></td>
|
7
|
+
<td><%= @favorite.user.name %></td>
|
8
|
+
</tr>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<%= form_with model: [:my, @address] do |f| %>
|
2
|
+
<div class="fields">
|
3
|
+
<div class="field">
|
4
|
+
<%= label :nation, 'Nation' %>
|
5
|
+
<%= select_tag :nation, options_for_select(Area.all_nations, @address.area.nation), class: 'ui search selection dropdown' %>
|
6
|
+
</div>
|
7
|
+
<div class="field">
|
8
|
+
<%= label :province, 'Province' %>
|
9
|
+
<%= select_tag :province, options_for_select([@address.area.province], @address.area.province), class: 'ui search selection dropdown' %>
|
10
|
+
</div>
|
11
|
+
<div class="field">
|
12
|
+
<%= label :city, 'City' %>
|
13
|
+
<%= select_tag :city, options_for_select([@address.area.city], @address.area.city), class: 'ui search selection dropdown' %>
|
14
|
+
</div>
|
15
|
+
</div>
|
16
|
+
<%= f.hidden_field :area_id %>
|
17
|
+
<%= f.text_field :contact_person %>
|
18
|
+
<%= f.text_field :tel %>
|
19
|
+
<%= f.text_field :address %>
|
20
|
+
<%= f.submit %>
|
21
|
+
<% end %>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<%= form_with model: [:my, @address], local: true do |f| %>
|
2
|
+
<div class="fields">
|
3
|
+
<div class="field">
|
4
|
+
<%= label :nation, 'Nation' %>
|
5
|
+
<%= select_tag :nation, options_for_select(Area.all_nations), class: 'ui search selection dropdown' %>
|
6
|
+
</div>
|
7
|
+
<div class="field">
|
8
|
+
<%= label :province, 'Province' %>
|
9
|
+
<%= select_tag :province, options_for_select([]), class: 'ui search selection dropdown' %>
|
10
|
+
</div>
|
11
|
+
<div class="field">
|
12
|
+
<%= label :city, 'City' %>
|
13
|
+
<%= select_tag :city, options_for_select([]), class: 'ui search selection dropdown' %>
|
14
|
+
</div>
|
15
|
+
</div>
|
16
|
+
<%= f.hidden_field :area_id %>
|
17
|
+
<%= f.text_field :contact_person %>
|
18
|
+
<%= f.text_field :tel %>
|
19
|
+
<%= f.text_field :address %>
|
20
|
+
<%= f.submit %>
|
21
|
+
<% end %>
|
22
|
+
|
23
|
+
|
@@ -0,0 +1,44 @@
|
|
1
|
+
<div class="ui grid">
|
2
|
+
<div class="three wide column">
|
3
|
+
<%= render 'my/base/nav' %>
|
4
|
+
</div>
|
5
|
+
|
6
|
+
<div class="thirteen wide column">
|
7
|
+
<div class="ui segment">
|
8
|
+
<h1>Addresses</h1>
|
9
|
+
<%= link_to 'New Address', new_my_address_path, class: 'ui mini button' %>
|
10
|
+
</div>
|
11
|
+
|
12
|
+
<table class="ui table">
|
13
|
+
<thead>
|
14
|
+
<tr>
|
15
|
+
<th>联系人</th>
|
16
|
+
<th>联系方式</th>
|
17
|
+
<th></th>
|
18
|
+
<th colspan="3"></th>
|
19
|
+
</tr>
|
20
|
+
</thead>
|
21
|
+
|
22
|
+
<tbody>
|
23
|
+
<% @addresses.each do |address| %>
|
24
|
+
<tr>
|
25
|
+
<td><%= address.contact_person %></td>
|
26
|
+
<td><%= address.tel %></td>
|
27
|
+
<td>
|
28
|
+
<%= address.area.nation %>
|
29
|
+
<%= address.area.province %>
|
30
|
+
<%= address.area.city %>
|
31
|
+
</td>
|
32
|
+
<td><%= address.address %></td>
|
33
|
+
<td><%= link_to 'Show', address_path(address) %></td>
|
34
|
+
<td><%= link_to 'Edit', edit_my_address_path(address) %></td>
|
35
|
+
<td><%= link_to 'Destroy', my_address_path(address), method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
36
|
+
</tr>
|
37
|
+
<% end %>
|
38
|
+
</tbody>
|
39
|
+
</table>
|
40
|
+
|
41
|
+
</div>
|
42
|
+
|
43
|
+
</div>
|
44
|
+
|
@@ -0,0 +1,6 @@
|
|
1
|
+
<%= form_with theme: 'weui', model: car, url: { controller: 'ship/my/cars', action: 'update', id: car.id } do |f| %>
|
2
|
+
<%= render 'error_messages', target: f.object %>
|
3
|
+
<%= f.text_field :location %>
|
4
|
+
<%= f.text_field :number %>
|
5
|
+
<%= f.submit nil, wrap: { all: nil } %>
|
6
|
+
<% end %>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<%= form_with theme: 'search', model: Ship::Car.new do |f| %>
|
2
|
+
<div class="field-body">
|
3
|
+
<%= f.text_field :name %>
|
4
|
+
<div class="field is-narrow">
|
5
|
+
<%= f.submit %>
|
6
|
+
<%= link_to t('.clear'), filter_params(except: [:name]), class: 'button is-light' %>
|
7
|
+
</div>
|
8
|
+
</div>
|
9
|
+
<% end %>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<tr>
|
2
|
+
<td class="has-text-right"><%= Ship::Car.human_attribute_name(:location) %></td>
|
3
|
+
<td><%= @car.location %></td>
|
4
|
+
</tr>
|
5
|
+
<tr>
|
6
|
+
<td class="has-text-right"><%= Ship::Car.human_attribute_name(:number) %></td>
|
7
|
+
<td><%= @car.number %></td>
|
8
|
+
</tr>
|
9
|
+
<tr>
|
10
|
+
<td class="has-text-right"><%= Ship::Car.human_attribute_name(:detail) %></td>
|
11
|
+
<td><%= simple_format @car.detail %></td>
|
12
|
+
</tr>
|
13
|
+
<tr>
|
14
|
+
<td class="has-text-right"><%= Ship::Car.human_attribute_name(:registration) %></td>
|
15
|
+
<td><%= image_tag @car.registration if @car.registration.attached? %></td>
|
16
|
+
</tr>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= turbo_stream.update 'car_new', partial: 'edit_form' %>
|