rails_ship 0.0.1 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (189) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +165 -20
  3. data/README.md +4 -8
  4. data/app/{views/ship/admin/home/index.html.erb → assets/config/rails_ship_manifest.js} +0 -0
  5. data/app/models/rails_ship/address.rb +13 -0
  6. data/app/models/rails_ship/area.rb +65 -0
  7. data/app/models/rails_ship/shipment.rb +8 -0
  8. data/config/routes.rb +0 -64
  9. data/lib/rails_ship/engine.rb +0 -17
  10. data/lib/rails_ship/version.rb +3 -0
  11. data/lib/rails_ship.rb +5 -2
  12. data/lib/tasks/rails_ship_tasks.rake +4 -0
  13. metadata +29 -185
  14. data/app/controllers/ship/admin/addresses_controller.rb +0 -48
  15. data/app/controllers/ship/admin/base_controller.rb +0 -5
  16. data/app/controllers/ship/admin/home_controller.rb +0 -8
  17. data/app/controllers/ship/admin/packages_controller.rb +0 -43
  18. data/app/controllers/ship/admin/trade_items_controller.rb +0 -72
  19. data/app/controllers/ship/driver/base_controller.rb +0 -9
  20. data/app/controllers/ship/driver/favorites_controller.rb +0 -39
  21. data/app/controllers/ship/my/addresses_controller.rb +0 -58
  22. data/app/controllers/ship/my/base_controller.rb +0 -5
  23. data/app/controllers/ship/my/cars_controller.rb +0 -54
  24. data/app/controllers/ship/my/drivers_controller.rb +0 -38
  25. data/app/controllers/ship/my/favorites_controller.rb +0 -40
  26. data/app/controllers/ship/my/lines_controller.rb +0 -71
  27. data/app/controllers/ship/my/locations_controller.rb +0 -60
  28. data/app/controllers/ship/my/packages_controller.rb +0 -53
  29. data/app/controllers/ship/my/principal_addresses_controller.rb +0 -26
  30. data/app/controllers/ship/panel/base_controller.rb +0 -5
  31. data/app/controllers/ship/panel/lines_controller.rb +0 -53
  32. data/app/controllers/ship/panel/similars_controller.rb +0 -61
  33. data/app/jobs/ship/car_ocr_job.rb +0 -11
  34. data/app/jobs/ship/driver_ocr_job.rb +0 -11
  35. data/app/jobs/ship/location_geo_job.rb +0 -10
  36. data/app/models/ship/address.rb +0 -7
  37. data/app/models/ship/car.rb +0 -5
  38. data/app/models/ship/driver.rb +0 -5
  39. data/app/models/ship/ext/order.rb +0 -7
  40. data/app/models/ship/ext/trade_item.rb +0 -11
  41. data/app/models/ship/ext/user.rb +0 -15
  42. data/app/models/ship/favorite.rb +0 -5
  43. data/app/models/ship/line.rb +0 -5
  44. data/app/models/ship/line_similar.rb +0 -5
  45. data/app/models/ship/location.rb +0 -5
  46. data/app/models/ship/model/address.rb +0 -10
  47. data/app/models/ship/model/car.rb +0 -34
  48. data/app/models/ship/model/driver.rb +0 -45
  49. data/app/models/ship/model/favorite.rb +0 -14
  50. data/app/models/ship/model/line.rb +0 -28
  51. data/app/models/ship/model/line_similar.rb +0 -16
  52. data/app/models/ship/model/location.rb +0 -53
  53. data/app/models/ship/model/package.rb +0 -28
  54. data/app/models/ship/model/packaged.rb +0 -29
  55. data/app/models/ship/model/shipment.rb +0 -22
  56. data/app/models/ship/model/shipping.rb +0 -9
  57. data/app/models/ship/package.rb +0 -6
  58. data/app/models/ship/packaged.rb +0 -5
  59. data/app/models/ship/shipment.rb +0 -5
  60. data/app/models/ship.rb +0 -11
  61. data/app/views/admin/_ship_nav.html.erb +0 -11
  62. data/app/views/panel/_ship_nav.html.erb +0 -10
  63. data/app/views/ship/admin/addresses/_address.html.erb +0 -24
  64. data/app/views/ship/admin/addresses/_edit_form.html.erb +0 -3
  65. data/app/views/ship/admin/addresses/_form.html.erb +0 -9
  66. data/app/views/ship/admin/addresses/index.html.erb +0 -36
  67. data/app/views/ship/admin/base/_nav.html.erb +0 -3
  68. data/app/views/ship/admin/packages/_button.html.erb +0 -0
  69. data/app/views/ship/admin/packages/_edit_form.html.erb +0 -4
  70. data/app/views/ship/admin/packages/_filter_form.html.erb +0 -9
  71. data/app/views/ship/admin/packages/_form.html.erb +0 -5
  72. data/app/views/ship/admin/packages/_index_tbody.html.erb +0 -8
  73. data/app/views/ship/admin/packages/_index_thead.html.erb +0 -5
  74. data/app/views/ship/admin/packages/_new_form.html.erb +0 -4
  75. data/app/views/ship/admin/packages/_show_table.html.erb +0 -16
  76. data/app/views/ship/admin/packages/index.html.erb +0 -5
  77. data/app/views/ship/admin/rallies/_filter.html.erb +0 -7
  78. data/app/views/ship/admin/rallies/_form.html+phone.erb +0 -17
  79. data/app/views/ship/admin/rallies/_show_table.html+phone.erb +0 -24
  80. data/app/views/ship/admin/rallies/_show_table.html.erb +0 -12
  81. data/app/views/ship/admin/rallies/index.html+phone.erb +0 -26
  82. data/app/views/ship/admin/rallies/show.html.erb +0 -26
  83. data/app/views/ship/admin/trade_items/_filter.html.erb +0 -9
  84. data/app/views/ship/admin/trade_items/_form.html.erb +0 -7
  85. data/app/views/ship/admin/trade_items/_show_table.html.erb +0 -24
  86. data/app/views/ship/admin/trade_items/index.html.erb +0 -51
  87. data/app/views/ship/driver/favorites/_button.html+phone.erb +0 -4
  88. data/app/views/ship/driver/favorites/_edit_form.html.erb +0 -4
  89. data/app/views/ship/driver/favorites/_filter_form.html+phone.erb +0 -14
  90. data/app/views/ship/driver/favorites/_filter_form.html.erb +0 -9
  91. data/app/views/ship/driver/favorites/_form.html.erb +0 -3
  92. data/app/views/ship/driver/favorites/_index_tbody.html.erb +0 -6
  93. data/app/views/ship/driver/favorites/_index_thead.html.erb +0 -3
  94. data/app/views/ship/driver/favorites/_index_tr.html.erb +0 -4
  95. data/app/views/ship/driver/favorites/_new_form.html.erb +0 -4
  96. data/app/views/ship/driver/favorites/_show_table.html.erb +0 -8
  97. data/app/views/ship/driver/favorites/index.html.erb +0 -5
  98. data/app/views/ship/my/addresses/_edit_form.html.erb +0 -21
  99. data/app/views/ship/my/addresses/_form.html.erb +0 -23
  100. data/app/views/ship/my/addresses/index.html.erb +0 -44
  101. data/app/views/ship/my/cars/_edit_form.html.erb +0 -6
  102. data/app/views/ship/my/cars/_filter_form.html.erb +0 -9
  103. data/app/views/ship/my/cars/_index_tbody.html.erb +0 -3
  104. data/app/views/ship/my/cars/_index_thead.html.erb +0 -4
  105. data/app/views/ship/my/cars/_new_form.html.erb +0 -4
  106. data/app/views/ship/my/cars/_show_table.html.erb +0 -16
  107. data/app/views/ship/my/cars/create.turbo_stream.erb +0 -1
  108. data/app/views/ship/my/cars/index.html+phone.erb +0 -19
  109. data/app/views/ship/my/cars/index.html.erb +0 -5
  110. data/app/views/ship/my/cars/new.html.erb +0 -25
  111. data/app/views/ship/my/drivers/_edit_form.html.erb +0 -6
  112. data/app/views/ship/my/drivers/_form.html.erb +0 -4
  113. data/app/views/ship/my/drivers/_index_tbody.html.erb +0 -3
  114. data/app/views/ship/my/drivers/_index_thead.html.erb +0 -4
  115. data/app/views/ship/my/drivers/_new_form.html.erb +0 -4
  116. data/app/views/ship/my/drivers/_show_table.html.erb +0 -12
  117. data/app/views/ship/my/drivers/_uploader.html.erb +0 -22
  118. data/app/views/ship/my/drivers/edit.html.erb +0 -20
  119. data/app/views/ship/my/drivers/show.html.erb +0 -33
  120. data/app/views/ship/my/favorites/_button.html+phone.erb +0 -4
  121. data/app/views/ship/my/favorites/_edit_form.html.erb +0 -4
  122. data/app/views/ship/my/favorites/_filter_form.html+phone.erb +0 -14
  123. data/app/views/ship/my/favorites/_filter_form.html.erb +0 -9
  124. data/app/views/ship/my/favorites/_form.html.erb +0 -3
  125. data/app/views/ship/my/favorites/_index_tbody.html.erb +0 -6
  126. data/app/views/ship/my/favorites/_index_thead.html.erb +0 -3
  127. data/app/views/ship/my/favorites/_new_form.html.erb +0 -4
  128. data/app/views/ship/my/favorites/_show_table.html.erb +0 -8
  129. data/app/views/ship/my/favorites/index.html.erb +0 -5
  130. data/app/views/ship/my/lines/_edit_form.html.erb +0 -4
  131. data/app/views/ship/my/lines/_filter_form.html.erb +0 -1
  132. data/app/views/ship/my/lines/_form.html.erb +0 -3
  133. data/app/views/ship/my/lines/_index_tbody.html.erb +0 -6
  134. data/app/views/ship/my/lines/_index_tr.html.erb +0 -4
  135. data/app/views/ship/my/lines/_item_field.html.erb +0 -8
  136. data/app/views/ship/my/lines/_item_location.html.erb +0 -13
  137. data/app/views/ship/my/lines/_new_form.html.erb +0 -15
  138. data/app/views/ship/my/lines/_select/_tab_bar.html.erb +0 -10
  139. data/app/views/ship/my/lines/_select.html.erb +0 -10
  140. data/app/views/ship/my/lines/_show/_index_tbody.html.erb +0 -6
  141. data/app/views/ship/my/lines/_show/_index_tr.html+phone.erb +0 -6
  142. data/app/views/ship/my/lines/_show_table.html.erb +0 -9
  143. data/app/views/ship/my/lines/add.turbo_stream.erb +0 -1
  144. data/app/views/ship/my/lines/index.html.erb +0 -5
  145. data/app/views/ship/my/lines/new.html.erb +0 -1
  146. data/app/views/ship/my/lines/requirement.html.erb +0 -5
  147. data/app/views/ship/my/lines/select.turbo_stream.erb +0 -1
  148. data/app/views/ship/my/lines/show.html+phone.erb +0 -30
  149. data/app/views/ship/my/locations/_edit_form.html.erb +0 -4
  150. data/app/views/ship/my/locations/_filter_form.html.erb +0 -9
  151. data/app/views/ship/my/locations/_form.html.erb +0 -6
  152. data/app/views/ship/my/locations/_index_tbody.html.erb +0 -5
  153. data/app/views/ship/my/locations/_index_thead.html.erb +0 -6
  154. data/app/views/ship/my/locations/_new_form.html.erb +0 -4
  155. data/app/views/ship/my/locations/_show_table.html.erb +0 -20
  156. data/app/views/ship/my/locations/index.html.erb +0 -5
  157. data/app/views/ship/my/packages/index.html.erb +0 -31
  158. data/app/views/ship/my/principal_addresses/index.html+phone.erb +0 -32
  159. data/app/views/ship/my/principal_addresses/plans.html+phone.erb +0 -23
  160. data/app/views/ship/my/principal_addresses/show.html+phone.erb +0 -27
  161. data/app/views/ship/panel/base/_nav.html.erb +0 -3
  162. data/app/views/ship/panel/lines/_edit_form.html.erb +0 -4
  163. data/app/views/ship/panel/lines/_filter_form.html.erb +0 -9
  164. data/app/views/ship/panel/lines/_form.html.erb +0 -4
  165. data/app/views/ship/panel/lines/_index_tbody.html.erb +0 -4
  166. data/app/views/ship/panel/lines/_index_thead.html.erb +0 -5
  167. data/app/views/ship/panel/lines/_index_tr.html.erb +0 -19
  168. data/app/views/ship/panel/lines/_new_form.html.erb +0 -4
  169. data/app/views/ship/panel/lines/_show_table.html.erb +0 -12
  170. data/app/views/ship/panel/lines/index.html.erb +0 -5
  171. data/app/views/ship/panel/similars/_breadcrumb.html.erb +0 -7
  172. data/app/views/ship/panel/similars/_button.html.erb +0 -3
  173. data/app/views/ship/panel/similars/_edit_form.html.erb +0 -4
  174. data/app/views/ship/panel/similars/_filter_form.html.erb +0 -9
  175. data/app/views/ship/panel/similars/_form.html.erb +0 -4
  176. data/app/views/ship/panel/similars/_index_tbody.html.erb +0 -3
  177. data/app/views/ship/panel/similars/_index_thead.html.erb +0 -4
  178. data/app/views/ship/panel/similars/_new/_button.html.erb +0 -0
  179. data/app/views/ship/panel/similars/_new/_index_tr.html.erb +0 -10
  180. data/app/views/ship/panel/similars/_new/_index_tr_remove.html.erb +0 -10
  181. data/app/views/ship/panel/similars/_new_form.html.erb +0 -4
  182. data/app/views/ship/panel/similars/_show_table.html.erb +0 -12
  183. data/app/views/ship/panel/similars/create.turbo_stream.erb +0 -3
  184. data/app/views/ship/panel/similars/destroy.turbo_stream.erb +0 -3
  185. data/app/views/ship/panel/similars/index.html.erb +0 -5
  186. data/app/views/ship/panel/similars/new.html.erb +0 -16
  187. data/config/locales/zh.attributes.yml +0 -15
  188. data/config/locales/zh.yml +0 -51
  189. data/lib/rails_ship/config.rb +0 -11
@@ -1,29 +0,0 @@
1
- module Ship
2
- module Model::Packaged
3
- extend ActiveSupport::Concern
4
-
5
- included do
6
- attribute :trade_item_status, :string
7
-
8
- belongs_to :package, inverse_of: :packageds
9
- belongs_to :trade_item
10
-
11
- before_save :sync_trade_item_status
12
- after_create :update_status
13
- after_destroy :revert_status
14
- end
15
-
16
- def sync_trade_item_status
17
- self.trade_item_status = trade_item.status
18
- end
19
-
20
- def update_status
21
- self.trade_item.update status: 'packaged'
22
- end
23
-
24
- def revert_status
25
- self.trade_item.update status: self.trade_item_status
26
- end
27
-
28
- end
29
- end
@@ -1,22 +0,0 @@
1
- module Ship
2
- module Model::Shipment
3
- extend ActiveSupport::Concern
4
-
5
- included do
6
- attribute :state, :string
7
-
8
- belongs_to :package
9
- belongs_to :address
10
- belongs_to :shipping, polymorphic: true
11
-
12
- enum state: {
13
- prepare: 'prepare',
14
- packing: 'packing',
15
- transporting: 'transporting',
16
- dispatching: 'dispatching',
17
- received: 'received'
18
- }
19
- end
20
-
21
- end
22
- end
@@ -1,9 +0,0 @@
1
- module Ship
2
- module Model::Shipping
3
- extend ActiveSupport::Concern
4
-
5
- included do
6
- end
7
-
8
- end
9
- end
@@ -1,6 +0,0 @@
1
- module Ship
2
- class Package < ApplicationRecord
3
- include Model::Package
4
- include Wait::Ext::Waiting if defined? RailsWait
5
- end
6
- end
@@ -1,5 +0,0 @@
1
- module Ship
2
- class Packaged < ApplicationRecord
3
- include Model::Packaged
4
- end
5
- end
@@ -1,5 +0,0 @@
1
- module Ship
2
- class Shipment < ApplicationRecord
3
- include Model::Shipment
4
- end
5
- end
data/app/models/ship.rb DELETED
@@ -1,11 +0,0 @@
1
- module Ship
2
-
3
- def self.use_relative_model_naming?
4
- true
5
- end
6
-
7
- def self.table_name_prefix
8
- 'ship_'
9
- end
10
-
11
- end
@@ -1,11 +0,0 @@
1
- <div class="<%= active_helper(modules: 'ship/admin', 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.admin.addresses.index.title'), { controller: 'ship/admin/addresses' }, class: active_helper(controllers: 'addresses', active: 'is-active') %>
4
- <%= link_to t('ship.admin.packages.index.title'), { controller: 'ship/admin/packages' }, class: active_helper(controllers: 'packages', active: 'is-active') -%>
5
- <% end %>
6
- <a class="menu-label" data-action="menu#toggle">
7
- <i class="fas fa-truck fa-fw"></i>
8
- <span><%= t('ship.admin.title') %></span>
9
- <i class="fas dropdown"></i>
10
- </a>
11
- </div>
@@ -1,10 +0,0 @@
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>
@@ -1,24 +0,0 @@
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
-
@@ -1,3 +0,0 @@
1
- <%= form_with model: [:admin, @address] do |f| %>
2
- <%= render partial: 'form', locals: { f: f } %>
3
- <% end %>
@@ -1,9 +0,0 @@
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 %>
@@ -1,36 +0,0 @@
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
-
@@ -1,3 +0,0 @@
1
- <aside class="menu is-dark" style="height: 100%">
2
- <%= render 'ship_nav' %>
3
- </aside>
File without changes
@@ -1,4 +0,0 @@
1
- <%= form_with model: @package, url: { action: 'update' } do |f| %>
2
- <%= render 'form', locals: { f: f } %>
3
- <%= f.submit %>
4
- <% end %>
@@ -1,9 +0,0 @@
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 %>
@@ -1,5 +0,0 @@
1
- <%= render 'error_messages', target: f.object %>
2
- <%= f.text_field :address %>
3
- <%= f.text_field :state %>
4
- <%= f.text_field :expected_on %>
5
- <%= f.text_field :item %>
@@ -1,8 +0,0 @@
1
- <td><%= model.address.content %></td>
2
- <td><%= model.state %></td>
3
- <td><%= model.expected_on %></td>
4
- <td>
5
- <% model.packageds.each do |packaged| %>
6
- <%= packaged.trade_item.good_name %>
7
- <% end %>
8
- </td>
@@ -1,5 +0,0 @@
1
- <th><%= Ship::Package.human_attribute_name(:address) %></th>
2
- <th><%= Ship::Package.human_attribute_name(:state) %></th>
3
- <th><%= Ship::Package.human_attribute_name(:expected_on) %></th>
4
- <th><%= Ship::Package.human_attribute_name(:item) %></th>
5
- <th></th>
@@ -1,4 +0,0 @@
1
- <%= form_with model: @package, url: { action: 'create' } do |f| %>
2
- <%= render 'form', locals: { f: f } %>
3
- <%= f.submit %>
4
- <% end %>
@@ -1,16 +0,0 @@
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>
@@ -1,5 +0,0 @@
1
- <%= render layout: 'index_table', locals: { cache_key: Ship::Package.column_names.hash } do %>
2
- <%= render partial: 'index_tbody', layout: 'index_tr', collection: @packages, as: :model %>
3
- <% end %>
4
-
5
- <%= paginate @packages %>
@@ -1,7 +0,0 @@
1
- <%= form_with theme: 'search', model: Rally.new do |f| %>
2
- <div class="fields">
3
- <%= f.text_field :name %>
4
- <%= f.submit %>
5
- <%= link_to t('.clear'), filter_params(except: [:name]), class: 'ui button' %>
6
- </div>
7
- <% end %>
@@ -1,17 +0,0 @@
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 %>
@@ -1,24 +0,0 @@
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>
@@ -1,12 +0,0 @@
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>
@@ -1,26 +0,0 @@
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>
@@ -1,26 +0,0 @@
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>
@@ -1,9 +0,0 @@
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 %>
@@ -1,7 +0,0 @@
1
- <%= form_with model: @trade_item do |f| %>
2
- <%= render 'error_messages', target: @trade_item %>
3
- <%= f.text_field :good_id %>
4
- <%= f.text_field :number %>
5
- <%= f.text_field :status %>
6
- <%= f.submit %>
7
- <% end %>
@@ -1,24 +0,0 @@
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>
@@ -1,51 +0,0 @@
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 %>
@@ -1,4 +0,0 @@
1
- <%= link_to({ controller: 'wechat/my/users', action: 'invite_qrcode' }, class: 'weui-btn_cell weui-btn_cell-primary') do %>
2
- <i class="fas fa-qrcode fa-fw"></i>
3
- <span>邀请二维码</span>
4
- <% end %>
@@ -1,4 +0,0 @@
1
- <%= form_with model: @favorite, url: { action: 'update' } do |f| %>
2
- <%= render partial: 'form', locals: { f: f } %>
3
- <%= f.submit %>
4
- <% end %>
@@ -1,14 +0,0 @@
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>
@@ -1,9 +0,0 @@
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 %>
@@ -1,3 +0,0 @@
1
- <%= render 'error_messages', target: f.object %>
2
- <%= f.text_field :avatar %>
3
- <%= f.text_field :name %>
@@ -1,6 +0,0 @@
1
- <div class="weui-cell__hd">
2
- <%= image_tag model.user.avatar, class: 'image is-32x32' %>
3
- </div>
4
- <div class="weui-cell__bd weui-cell_primary">
5
- <span><%= model.user.name %></span>
6
- </div>
@@ -1,3 +0,0 @@
1
- <th><%= Ship::Favorite.human_attribute_name(:avatar) %></th>
2
- <th><%= Ship::Favorite.human_attribute_name(:name) %></th>
3
- <th></th>
@@ -1,4 +0,0 @@
1
- <%= link_to({ action: 'show', id: model.id }, class: 'weui-cell weui-cell_active weui-cell_access') do %>
2
- <%= yield %>
3
- <span class="weui-cell__ft"></span>
4
- <% end %>
@@ -1,4 +0,0 @@
1
- <%= form_with model: @favorite, url: { action: 'create' } do |f| %>
2
- <%= render partial: 'form', locals: { f: f } %>
3
- <%= f.submit %>
4
- <% end %>
@@ -1,8 +0,0 @@
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>
@@ -1,5 +0,0 @@
1
- <%= render layout: 'index_table', locals: { cache_key: Ship::Favorite.column_names.hash } do %>
2
- <%= render partial: 'index_tbody', layout: 'index_tr', collection: @favorites, as: :model %>
3
- <% end %>
4
-
5
- <%= paginate @favorites %>
@@ -1,21 +0,0 @@
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 %>
@@ -1,23 +0,0 @@
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
-