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,44 +0,0 @@
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
-
@@ -1,6 +0,0 @@
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 %>
@@ -1,9 +0,0 @@
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 %>
@@ -1,3 +0,0 @@
1
- <td><%= model.location %></td>
2
- <td><%= model.number %></td>
3
- <td><%= image_tag model.registration.url, class: 'image is-64x64' if model.registration.attached? %></td>
@@ -1,4 +0,0 @@
1
- <th><%= Ship::Car.human_attribute_name(:location) %></th>
2
- <th><%= Ship::Car.human_attribute_name(:number) %></th>
3
- <th><%= Ship::Car.human_attribute_name(:registration) %></th>
4
- <th></th>
@@ -1,4 +0,0 @@
1
- <%= form_with model: @car, url: { action: 'create' } do |f| %>
2
- <%= render partial: 'form', locals: { f: f } %>
3
- <%= f.submit %>
4
- <% end %>
@@ -1,16 +0,0 @@
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>
@@ -1 +0,0 @@
1
- <%= turbo_stream.update 'car_new', partial: 'edit_form' %>
@@ -1,19 +0,0 @@
1
- <div class="weui-panel">
2
- <div class="weui-panel__hd">
3
- <%= t('.title') %>
4
- </div>
5
- <div class="weui-panel__bd">
6
- <% @cars.each do |car| %>
7
- <%= link_to({ action: 'show', id: car.id }, class: 'weui-media-box weui-media-box_appmsg') do %>
8
- <div class="weui-media-box__hd">
9
- <%= image_tag car.registration, class: 'weui-media-box__thumb' if car.registration.attached? %>
10
- </div>
11
- <div class="weui-media-box__bd">
12
- <h4 class="weui-media-box__title"><%= car.number %></h4>
13
- </div>
14
- <% end %>
15
- <% end %>
16
- </div>
17
- <div class="weui-panel__ft"></div>
18
- </div>
19
- <%= render 'button' %>
@@ -1,5 +0,0 @@
1
- <%= render layout: 'index_table', locals: { cache_key: Ship::Car.column_names.hash } do %>
2
- <%= render partial: 'index_tbody', layout: 'index_tr', collection: @cars, as: :model %>
3
- <% end %>
4
-
5
- <%= paginate @cars %>
@@ -1,25 +0,0 @@
1
- <%= content_for(:wechat_js) do %>
2
- <%= wechat_config_js debug: false, apis: ['chooseImage', 'previewImage', 'uploadImage'] -%>
3
- <meta name="turbo-visit-control" content="reload">
4
- <% end %>
5
-
6
- <div class="weui-uploader p-4">
7
- <div class="weui-uploader__hd">
8
- <h1 class="weui-uploader__title">上传行驶证</h1>
9
- <div class="weui-uploader__info"></div>
10
- </div>
11
- <div class="weui-uploader__bd">
12
- <div class="weui-uploader__input-box" data-controller="wechat">
13
- <%= image_vite_tag 'registration.jpg', data: { wechat_target: 'preview' }, class: 'weui-uploader__preview' %>
14
- <div class="weui-uploader__input" data-action="click->wechat#chooseImage"></div>
15
- <%= form_with theme: nil, model: Wechat::Media.new, url: { controller: 'wechat/my/medias', action: 'create' } do |f| %>
16
- <%= f.hidden_field :source_type, value: @car.class_name %>
17
- <%= f.hidden_field :attachment_name, value: 'registration' %>
18
- <%= f.hidden_field :media_id, data: { wechat_target: 'media' } %>
19
- <% end %>
20
- </div>
21
- </div>
22
- </div>
23
-
24
- <%= turbo_stream_from 'car_new' %>
25
- <div id="car_update"></div>
@@ -1,6 +0,0 @@
1
- <%= form_with theme: 'weui', model: driver, url: { controller: 'ship/my/drivers', action: 'update', id: driver.id }, method: :patch, class: 'weui-form weui-form_normal pt-0' do |f| %>
2
- <%= render 'error_messages', target: f.object %>
3
- <%= f.text_field :name %>
4
- <%= f.text_field :number %>
5
- <%= f.submit nil, wrap: { all: nil } %>
6
- <% end %>
@@ -1,4 +0,0 @@
1
- <%= render 'error_messages', target: f.object %>
2
- <%= f.text_field :name %>
3
- <%= f.text_field :number %>
4
- <%= f.text_field :license %>
@@ -1,3 +0,0 @@
1
- <td><%= model.name %></td>
2
- <td><%= model.number %></td>
3
- <td><%= model.license %></td>
@@ -1,4 +0,0 @@
1
- <th><%= Ship::Driver.human_attribute_name(:name) %></th>
2
- <th><%= Ship::Driver.human_attribute_name(:number) %></th>
3
- <th><%= Ship::Driver.human_attribute_name(:license) %></th>
4
- <th></th>
@@ -1,4 +0,0 @@
1
- <%= form_with model: @driver, url: { action: 'create' } do |f| %>
2
- <%= render partial: 'form', locals: { f: f } %>
3
- <%= f.submit %>
4
- <% end %>
@@ -1,12 +0,0 @@
1
- <tr>
2
- <td class="has-text-right"><%= Ship::Driver.human_attribute_name(:name) %></td>
3
- <td><%= @driver.name %></td>
4
- </tr>
5
- <tr>
6
- <td class="has-text-right"><%= Ship::Driver.human_attribute_name(:number) %></td>
7
- <td><%= @driver.number %></td>
8
- </tr>
9
- <tr>
10
- <td class="has-text-right"><%= Ship::Driver.human_attribute_name(:license) %></td>
11
- <td><%= @driver.license %></td>
12
- </tr>
@@ -1,22 +0,0 @@
1
- <%= content_for(:wechat_js) do %>
2
- <%= wechat_config_js debug: false, apis: ['chooseImage', 'previewImage', 'uploadImage'] -%>
3
- <meta name="turbo-visit-control" content="reload">
4
- <% end %>
5
-
6
- <div class="weui-uploader p-4">
7
- <div class="weui-uploader__hd">
8
- <div class="weui-uploader__title">驾驶证</div>
9
- </div>
10
- <div class="weui-uploader__bd">
11
- <div class="weui-uploader__input-box" data-controller="wechat">
12
- <%= image_vite_tag 'license.jpg', data: { wechat_target: 'preview' }, class: 'weui-uploader__preview' %>
13
- <div class="weui-uploader__input" data-action="click->wechat#chooseImage"></div>
14
- <%= form_with theme: nil, model: Wechat::Media.new, url: { controller: 'wechat/my/medias', action: 'create' } do |f| %>
15
- <%= f.hidden_field :source_type, value: @driver.class_name %>
16
- <%= f.hidden_field :source_id, value: @driver.id %>
17
- <%= f.hidden_field :attachment_name, value: 'license' %>
18
- <%= f.hidden_field :media_id, data: { wechat_target: 'media' } %>
19
- <% end %>
20
- </div>
21
- </div>
22
- </div>
@@ -1,20 +0,0 @@
1
- <div class="weui-panel">
2
- <div class="weui-panel__hd level is-flex">
3
- <div class="level-left">
4
- <span class="level-item"><%= t('.title') %></span>
5
- </div>
6
- <div class="level-right mt-0">
7
- <%= link_to({ action: 'show' }, class: 'weui-btn weui-btn_mini weui-btn_default level-item') do %>
8
- <span><%= t('.show') %></span>
9
- <% end %>
10
- </div>
11
- </div>
12
- <div class="weui-panel__bd">
13
- <%= render 'uploader' %>
14
- </div>
15
- </div>
16
-
17
- <%= render partial: 'edit_form', locals: { driver: @driver } %>
18
-
19
- <%= turbo_stream_from 'driver_edit' %>
20
- <div id="driver_update"></div>
@@ -1,33 +0,0 @@
1
- <div class="weui-panel">
2
- <div class="weui-panel__hd level is-flex">
3
- <div class="level-left">
4
- <span class="level-item"><%= t('.title') %></span>
5
- </div>
6
- <div class="level-right mt-0">
7
- <%= link_to({ action: 'edit' }, class: 'weui-btn weui-btn_mini weui-btn_default level-item') do %>
8
- <span><%= t('.edit') %></span>
9
- <% end %>
10
- </div>
11
- </div>
12
- <div class="weui-panel__bd">
13
- <% if @driver.license.attached? %>
14
- <%= image_tag @driver.license.url, class: 'image' %>
15
- <% else %>
16
- <%= render 'uploader' %>
17
- <% end %>
18
- <div class="weui-form-preview">
19
- <div class="weui-form-preview__bd">
20
- <div class="weui-form-preview__item">
21
- <div class="weui-form-preview__label"><%= Ship::Driver.human_attribute_name(:name) %></div>
22
- <div class="weui-form-preview__value"><%= @driver.name %></div>
23
- </div>
24
- <div class="weui-form-preview__item">
25
- <div class="weui-form-preview__label"><%= Ship::Driver.human_attribute_name(:number) %></div>
26
- <div class="weui-form-preview__value"><%= @driver.number %></div>
27
- </div>
28
- </div>
29
- </div>
30
- </div>
31
- </div>
32
- <%= turbo_stream_from 'driver_edit' %>
33
- <div id="driver_update"></div>
@@ -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 :driver_avatar %>
3
- <%= f.text_field :driver_name %>
@@ -1,6 +0,0 @@
1
- <div class="weui-cell__hd">
2
- <%= image_tag model.driver.license, class: 'image is-64x64' if model.driver.license.attached? %>
3
- </div>
4
- <div class="weui-cell__bd weui-cell_primary">
5
- <span><%= model.driver.name %></span>
6
- </div>
@@ -1,3 +0,0 @@
1
- <th><%= Favorite.human_attribute_name(:driver_avatar) %></th>
2
- <th><%= Favorite.human_attribute_name(:driver_name) %></th>
3
- <th></th>
@@ -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(:driver_name) %></td>
3
- <td><%= @favorite.driver.name %></td>
4
- </tr>
5
- <tr>
6
- <td class="has-text-right"><%= Ship::Favorite.human_attribute_name(:driver_avatar) %></td>
7
- <td><%= image_tag @favorite.driver.license if @favorite.driver.license.attached? %></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,4 +0,0 @@
1
- <%= form_with model: @line, url: { action: 'update' } do |f| %>
2
- <%= render partial: 'form', locals: { f: f } %>
3
- <%= f.submit %>
4
- <% end %>
@@ -1,3 +0,0 @@
1
- <%= render 'error_messages', target: f.object %>
2
- <%= f.text_field :start_name %>
3
- <%= f.text_field :finish_name %>
@@ -1,6 +0,0 @@
1
- <div class="weui-cell__hd"></div>
2
- <div class="weui-cell__bd weui-cell_primary">
3
- <span class="has-dot-success"><%= model.start_name %></span>
4
- <i class="fas fa-arrow-right has-text-grey"></i>
5
- <span class="has-dot-danger"><%= model.finish_name %></span>
6
- </div>
@@ -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,8 +0,0 @@
1
- <%= f.fields :locations, model: @line.locations.sort_by(&:position) do |ef| %>
2
- <%= ef.hidden_field :poiname %>
3
- <%= ef.hidden_field :poiaddress %>
4
- <%= ef.hidden_field :cityname %>
5
- <%= ef.hidden_field :lat %>
6
- <%= ef.hidden_field :lng %>
7
- <%= ef.hidden_field :position %>
8
- <% end %>
@@ -1,13 +0,0 @@
1
- <tr id="tr_<%= location.position %>">
2
- <td class="has-text-right"><%= location.position_text %></td>
3
- <td>
4
- <%= button_to({ action: 'select', index: location.position - 1 }, form_class: 'button_box') do %>
5
- <span id="<%= location.position - 1 %>_name"><%= location.poiname %></span>
6
- <% end %>
7
- </td>
8
- <td style="width: 5em">
9
- <button class="button is-white" data-controller="former" data-former-id-value="new_line" data-former-url-value="<%= url_for({ action: 'add', position: location.position }) %>" data-action="former#submit">
10
- <i class="fas fa-plus fa-lg"></i>
11
- </button>
12
- </td>
13
- </tr>
@@ -1,15 +0,0 @@
1
- <table class="table is-fullwidth is-hoverable as-show" id="line-table" style="table-layout: fixed">
2
- <tbody>
3
- <%= render partial: 'item_location', collection: @line.locations.sort_by(&:position), as: :location %>
4
- </tbody>
5
- <tfoot>
6
- <tr>
7
- <td colspan="3">
8
- <%= form_with model: @line, url: { action: 'create' }, id: 'new_line' do |f| %>
9
- <%= render partial: 'item_field', locals: { f: f } %>
10
- <button type="submit" form="new_line" class="weui-btn weui-btn_primary">确认</button>
11
- <% end %>
12
- </td>
13
- </tr>
14
- </tfoot>
15
- </table>
@@ -1,10 +0,0 @@
1
- <div class="weui-tabbar weui-tabbar_fixed" data-controller="qq-map" data-qq-map-id-value="qq-map">
2
- <div class="weui-tabbar__item">
3
- <%= link_to :back, class: 'weui-btn weui-btn_default' do %>
4
- <span>取消</span>
5
- <% end %>
6
- </div>
7
- <div class="weui-tabbar__item">
8
- <button class="weui-btn weui-btn_primary">确认</button>
9
- </div>
10
- </div>
@@ -1,10 +0,0 @@
1
- <iframe
2
- class="as-top"
3
- id="qq-map"
4
- src="https://apis.map.qq.com/tools/locpicker?type=1&key=<%= SETTING.dig(:qq_map, :key) %>&referer=work_design"
5
- data-controller="qq-map"
6
- data-action="message@window->qq-map#selected"
7
- data-qq-map-name-value="line_locations_attributes"
8
- data-qq-map-index-value="<%= params[:index] %>"
9
- >
10
- </iframe>
@@ -1,6 +0,0 @@
1
- <div class="weui-cell__hd"></div>
2
- <div class="weui-cell__bd weui-cell_primary">
3
- <span class="has-dot-success"><%= model.start_name %></span>
4
- <i class="fas fa-arrow-right has-text-grey"></i>
5
- <span class="has-dot-danger"><%= model.finish_name %></span>
6
- </div>
@@ -1,6 +0,0 @@
1
- <div class="weui-cell">
2
- <%= yield %>
3
- <span class="weui-cell__ft">
4
- <a href="tel:18571856813"><i class="fas fa-phone"></i></a>
5
- </span>
6
- </div>
@@ -1,9 +0,0 @@
1
- <% @line.locations.each do |location| %>
2
- <tr>
3
- <td class="has-text-justified"><%= location.position_text %></td>
4
- <td>
5
- <span class="has-text-grey"><%= location.cityname %></span>
6
- <span><%= location.poiname %></span>
7
- </td>
8
- </tr>
9
- <% end %>
@@ -1 +0,0 @@
1
- <%= turbo_stream.replace 'line-table', partial: 'new_form' %>
@@ -1,5 +0,0 @@
1
- <%= render layout: 'index_table', locals: { cache_key: Ship::Line.column_names.hash } do %>
2
- <%= render partial: 'index_tbody', layout: 'index_tr', collection: @lines, as: :model %>
3
- <% end %>
4
-
5
- <%= paginate @lines %>
@@ -1 +0,0 @@
1
- <%= render 'new_form' %>
@@ -1,5 +0,0 @@
1
- <%= render layout: 'index_table', locals: { cache_key: Ship::Line.column_names.hash } do %>
2
- <%= render partial: 'index_tbody', layout: 'index_tr', collection: @lines, as: :model %>
3
- <% end %>
4
-
5
- <%= paginate @lines %>
@@ -1 +0,0 @@
1
- <%= turbo_stream.after 'line-table', partial: 'select' %>
@@ -1,30 +0,0 @@
1
- <table class="table is-fullwidth is-hoverable as-show">
2
- <thead>
3
- <tr>
4
- <th class="has-text-left">
5
- <%= link_to({ action: 'index' }, class: 'button is-borderless') do %>
6
- <i class="fas fa-angle-left fa-lg"></i>
7
- <% end %>
8
- </th>
9
- <th class="has-text-right">
10
- <button class="button is-borderless" data-controller="weui-actionsheet" data-weui-actionsheet-id-value="actionsheet" data-action="weui-actionsheet#toggle">
11
- <i class="fas fa-ellipsis-h fa-lg"></i>
12
- </button>
13
- </th>
14
- </tr>
15
- </thead>
16
- <tbody>
17
- <%= render 'show_table' %>
18
- </tbody>
19
- </table>
20
-
21
- <div class="weui-panel">
22
- <div class="weui-panel__hd"><%= t('.title') %></div>
23
- <div class="weui-panel__bd">
24
- <div class="weui-cells mt-0">
25
- <%= render partial: 'index_tbody', layout: 'index_tr', collection: @similars, as: :model %>
26
- </div>
27
- </div>
28
- </div>
29
-
30
- <%= render 'actionsheet' %>
@@ -1,4 +0,0 @@
1
- <%= form_with model: @location, url: { action: 'update' } do |f| %>
2
- <%= render partial: 'form', locals: { f: f } %>
3
- <%= f.submit %>
4
- <% end %>
@@ -1,9 +0,0 @@
1
- <%= form_with theme: 'search', model: Ship::Location.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,6 +0,0 @@
1
- <%= render 'error_messages', target: f.object %>
2
- <%= f.text_field :poiname %>
3
- <%= f.text_field :poiaddress %>
4
- <%= f.text_field :cityname %>
5
- <%= f.text_field :lat %>
6
- <%= f.text_field :lng %>
@@ -1,5 +0,0 @@
1
- <td><%= model.poiname %></td>
2
- <td><%= model.poiaddress %></td>
3
- <td><%= model.cityname %></td>
4
- <td><%= model.lat %></td>
5
- <td><%= model.lng %></td>
@@ -1,6 +0,0 @@
1
- <th><%= Ship::Location.human_attribute_name(:poiname) %></th>
2
- <th><%= Ship::Location.human_attribute_name(:poiaddress) %></th>
3
- <th><%= Ship::Location.human_attribute_name(:cityname) %></th>
4
- <th><%= Ship::Location.human_attribute_name(:lat) %></th>
5
- <th><%= Ship::Location.human_attribute_name(:lng) %></th>
6
- <th></th>
@@ -1,4 +0,0 @@
1
- <%= form_with model: @location, url: { action: 'create' } do |f| %>
2
- <%= render partial: 'form', locals: { f: f } %>
3
- <%= f.submit %>
4
- <% end %>
@@ -1,20 +0,0 @@
1
- <tr>
2
- <td class="has-text-right"><%= Ship::Location.human_attribute_name(:poiname) %></td>
3
- <td><%= @location.poiname %></td>
4
- </tr>
5
- <tr>
6
- <td class="has-text-right"><%= Ship::Location.human_attribute_name(:poiaddress) %></td>
7
- <td><%= @location.poiaddress %></td>
8
- </tr>
9
- <tr>
10
- <td class="has-text-right"><%= Ship::Location.human_attribute_name(:cityname) %></td>
11
- <td><%= @location.cityname %></td>
12
- </tr>
13
- <tr>
14
- <td class="has-text-right"><%= Ship::Location.human_attribute_name(:lat) %></td>
15
- <td><%= @location.lat %></td>
16
- </tr>
17
- <tr>
18
- <td class="has-text-right"><%= Ship::Location.human_attribute_name(:lng) %></td>
19
- <td><%= @location.lng %></td>
20
- </tr>
@@ -1,5 +0,0 @@
1
- <%= render layout: 'index_table', locals: { cache_key: Ship::Location.column_names.hash } do %>
2
- <%= render partial: 'index_tbody', layout: 'index_tr', collection: @locations, as: :model %>
3
- <% end %>
4
-
5
- <%= paginate @locations %>