smerp-quotation-engine 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '078b0b00dc1fa24d1c265ed3e8376f747db91b6664358915686ea7eaea2e4404'
4
- data.tar.gz: cdc5d36de1c87ce2a2a916b0573e4d34b1966110d224a6b40352a8906e54f351
3
+ metadata.gz: 2c5fb38d83a4caac8b3251dc2aebcecf5aea0d255dea1719df5ed2fccf0a846a
4
+ data.tar.gz: ebbf3ffbe92b9ef197ebf223c36e04a5c78d7132ae793c8b9884b837199f8b02
5
5
  SHA512:
6
- metadata.gz: 2e5d50a0b5d0b0c0d819cd86b6bc42077260394cb84e8dbb9a8c43cd0088f68a34b41d8c27611da9ef5dd9f699b54149a887b2b3131b7a6a314db19e1f0223cf
7
- data.tar.gz: 6b3f0dba38911e1d852e3dc40b388e92438c247931be0eeff4f532d6d8a4dc9c36f3cf899d33cde71190827e00ea8ec950f7a59b4ce6ca6150cdca39da5ce2fd
6
+ metadata.gz: 89ee2cd9161ff3123e06a71e16131cc05f6413e8491458557a7f2d3c6144159514b4228736dd2ffd0dd35fe61ae5909a0b94a18b330811bbb4928de99051d384
7
+ data.tar.gz: 2c93dbb0d79aeda5773c25847eb5637d93beb41b0642331fc4cd00d5cdefbe66ff3436f843666d48e95a7b8985cedd7bd40cc6aeb8d39b6fe31ba53b9b9ebce8
@@ -66,7 +66,7 @@ module Smerp::Quotation::Engine
66
66
 
67
67
  # DELETE /quotation_items/1
68
68
  def destroy
69
- q = @quotation_item.quotation.clone
69
+ q = @quotation_item.quotation
70
70
  @quotation_item.destroy
71
71
 
72
72
  redirect_to quotation_url(q), notice: "Quotation item was successfully destroyed."
@@ -25,7 +25,8 @@ module Smerp::Quotation::Engine
25
25
  @quotation_product = QuotationProduct.new(quotation_product_params)
26
26
 
27
27
  if @quotation_product.save
28
- redirect_to @quotation_product, notice: "Quotation product was successfully created."
28
+ #redirect_to @quotation_product, notice: "Quotation product was successfully created."
29
+ redirect_to quotation_products_path, notice: "Quotation product was successfully created."
29
30
  else
30
31
  render :new, status: :unprocessable_entity
31
32
  end
@@ -1,6 +1,7 @@
1
1
  <div id="<%= dom_id quotation_product %>">
2
2
 
3
3
  <tr>
4
+ <td><%= cnt %>.</td>
4
5
  <td><%= link_to quotation_product.name, quotation_product %></td>
5
6
  <td><%= quotation_product.quotation_product_category.name %></td>
6
7
  <td><%= quotation_product.state.titleize %></td>
@@ -5,13 +5,16 @@
5
5
  <div id="quotation_products">
6
6
  <table class="table">
7
7
  <tr>
8
+ <th width="18px"></th>
8
9
  <th>Name</th>
9
10
  <th>Category</th>
10
11
  <th>Status</th>
11
12
  </tr>
12
-
13
+
14
+ <% cnt = 1 %>
13
15
  <% @quotation_products.each do |quotation_product| %>
14
- <%= render quotation_product %>
16
+ <%= render quotation_product, cnt: cnt %>
17
+ <% cnt += 1 %>
15
18
  <% end %>
16
19
  </table>
17
20
  </div>
@@ -1,7 +1,7 @@
1
1
  module Smerp
2
2
  module Quotation
3
3
  module Engine
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.1"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smerp-quotation-engine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ian
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-10-03 00:00:00.000000000 Z
11
+ date: 2022-10-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails