dorsale 3.14.8 → 3.14.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/app/assets/javascripts/dorsale/common/tags.coffee +1 -1
- data/app/controllers/dorsale/customer_vault/people_controller.rb +11 -5
- data/app/models/dorsale/billing_machine/quotation.rb +1 -1
- data/app/uploaders/dorsale/image_uploader.rb +1 -1
- data/app/uploaders/dorsale/pdf_uploader.rb +1 -1
- data/app/views/dorsale/customer_vault/people/_form.html.slim +9 -1
- data/app/views/dorsale/customer_vault/people/create_corporation_js.html.slim +7 -0
- data/config/locales/billing_machine.en.yml +1 -0
- data/config/locales/billing_machine.fr.yml +1 -0
- data/features/customer_vault_individuals.feature +9 -1
- data/features/step_definitions/customer_vault_individuals_steps.rb +11 -0
- data/lib/dorsale/version.rb +1 -1
- data/spec/models/dorsale/billing_machine/quotation_spec.rb +1 -1
- data/spec/services/dorsale/billing_machine/quotation/copy_spec.rb +1 -1
- metadata +6 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c02356f6d8c0cf4484b3c5bbf8ae14b4afb5807b79a836c3ac3def7fe4f0d795
|
|
4
|
+
data.tar.gz: 10e1416b942207884fc2a84665285e6a5ebb9d73fe5d65a69057f89d05ac75fa
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ad1c5adb07688951372ec42e57c85f9487c06257827dcf0e712ab3a87794c9c9ac5e6fe6ba09115fe3813e55ceba36b56dc871729e5aead840b3815af4a8b3a8
|
|
7
|
+
data.tar.gz: 90da6df14ad83c78ea0abe031686ea1f9cbbdb3750005c669c19f89875b7ea77a9fce70c4bfbdc9dd7f28e28f95b954ef85395c8422b86148c9bbeefffeeed1d
|
data/CHANGELOG.md
CHANGED
|
@@ -45,13 +45,19 @@ class Dorsale::CustomerVault::PeopleController < ::Dorsale::CustomerVault::Appli
|
|
|
45
45
|
|
|
46
46
|
@person ||= scope.new(person_params_for_create)
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
generate_event!("create")
|
|
50
|
-
flash[:notice] = t("messages.#{person_type.to_s.pluralize}.create_ok")
|
|
51
|
-
redirect_to back_url
|
|
52
|
-
else
|
|
48
|
+
unless @person.save
|
|
53
49
|
render :new
|
|
50
|
+
return
|
|
54
51
|
end
|
|
52
|
+
|
|
53
|
+
if request.xhr? && @person.corporation?
|
|
54
|
+
render :create_corporation_js
|
|
55
|
+
return
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
generate_event!("create")
|
|
59
|
+
flash[:notice] = t("messages.#{person_type.to_s.pluralize}.create_ok")
|
|
60
|
+
redirect_to back_url
|
|
55
61
|
end
|
|
56
62
|
|
|
57
63
|
def show
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
class Dorsale::BillingMachine::Quotation < ::Dorsale::ApplicationRecord
|
|
2
2
|
self.table_name = "dorsale_billing_machine_quotations"
|
|
3
3
|
|
|
4
|
-
STATES = %w(pending accepted refused canceled)
|
|
4
|
+
STATES = %w(draft pending accepted refused canceled)
|
|
5
5
|
|
|
6
6
|
belongs_to :customer, polymorphic: true
|
|
7
7
|
belongs_to :payment_term
|
|
@@ -30,8 +30,16 @@
|
|
|
30
30
|
|
|
31
31
|
- if @person.individual?
|
|
32
32
|
= f.input :title
|
|
33
|
-
|
|
33
|
+
.row.form-group
|
|
34
|
+
= f.label :corporation, class: "control-label col-sm-3"
|
|
35
|
+
.col-sm-9
|
|
36
|
+
div style="display:flex"
|
|
37
|
+
= f.collection_select :corporation_id, policy_scope(Dorsale::CustomerVault::Corporation), :id, :to_s, {include_blank: true}, {class: "select2", style: "width:100%"}
|
|
38
|
+
a.btn.btn-success.btn-xs href=new_customer_vault_corporation_path data-modal="nested" style="margin-left:1em;padding-top:5px"
|
|
39
|
+
= icon(:plus)
|
|
40
|
+
|
|
34
41
|
= f.input :context, as: :text, input_html: {rows: 4}
|
|
42
|
+
|
|
35
43
|
.panel.panel-default
|
|
36
44
|
.panel-heading: .panel-title = t("customer_vault.contact_informations")
|
|
37
45
|
.panel-body
|
|
@@ -14,7 +14,7 @@ Feature: Manage individuals
|
|
|
14
14
|
And I validate the new individual
|
|
15
15
|
Then the individual is created
|
|
16
16
|
|
|
17
|
-
Scenario: New individual
|
|
17
|
+
Scenario: New individual errors
|
|
18
18
|
When I create an new individual
|
|
19
19
|
And I fill the address
|
|
20
20
|
And I validate the new individual
|
|
@@ -33,3 +33,11 @@ Feature: Manage individuals
|
|
|
33
33
|
And I remove tags to this individual
|
|
34
34
|
And I submit this individual
|
|
35
35
|
Then tags are removed
|
|
36
|
+
|
|
37
|
+
Scenario: Create corporation from individual
|
|
38
|
+
When I create an new individual
|
|
39
|
+
And I create corporation from individual
|
|
40
|
+
And I add his first_name, last_name and email
|
|
41
|
+
And I validate the new individual
|
|
42
|
+
Then the individual is created
|
|
43
|
+
And the new corporation is associated to individual
|
|
@@ -65,3 +65,14 @@ end
|
|
|
65
65
|
When(/^I go on this individual$/) do
|
|
66
66
|
visit dorsale.customer_vault_individual_path(@individual)
|
|
67
67
|
end
|
|
68
|
+
|
|
69
|
+
When("I create corporation from individual") do
|
|
70
|
+
find("a[href*=corporation][href$=new]").click
|
|
71
|
+
fill_in :person_corporation_name, with: "agilidée"
|
|
72
|
+
find("#modal [type=submit]").click
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
Then("the new corporation is associated to individual") do
|
|
76
|
+
expect(@individual.corporation).to be_present
|
|
77
|
+
expect(@individual.corporation.name).to eq "agilidée"
|
|
78
|
+
end
|
data/lib/dorsale/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: dorsale
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.14.
|
|
4
|
+
version: 3.14.9
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- agilidée
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-
|
|
11
|
+
date: 2020-08-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|
|
@@ -714,6 +714,7 @@ files:
|
|
|
714
714
|
- app/views/dorsale/customer_vault/people/_list_item.html.slim
|
|
715
715
|
- app/views/dorsale/customer_vault/people/_show_layout.html.slim
|
|
716
716
|
- app/views/dorsale/customer_vault/people/_show_tabs.html.slim
|
|
717
|
+
- app/views/dorsale/customer_vault/people/create_corporation_js.html.slim
|
|
717
718
|
- app/views/dorsale/customer_vault/people/edit.html.slim
|
|
718
719
|
- app/views/dorsale/customer_vault/people/index.html.slim
|
|
719
720
|
- app/views/dorsale/customer_vault/people/index.xlsx.ruby
|
|
@@ -973,7 +974,7 @@ homepage: https://github.com/agilidee/dorsale
|
|
|
973
974
|
licenses:
|
|
974
975
|
- Nonstandard
|
|
975
976
|
metadata: {}
|
|
976
|
-
post_install_message:
|
|
977
|
+
post_install_message:
|
|
977
978
|
rdoc_options: []
|
|
978
979
|
require_paths:
|
|
979
980
|
- lib
|
|
@@ -989,7 +990,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
989
990
|
version: '0'
|
|
990
991
|
requirements: []
|
|
991
992
|
rubygems_version: 3.0.3
|
|
992
|
-
signing_key:
|
|
993
|
+
signing_key:
|
|
993
994
|
specification_version: 4
|
|
994
995
|
summary: Modular ERP made with Ruby on Rails
|
|
995
996
|
test_files:
|