wco_models 3.1.0.49 → 3.1.0.51
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/wco/lead.rb +2 -0
- data/app/models/wco/leadset.rb +5 -1
- data/app/models/wco_email/context.rb +3 -1
- data/app/models/wco_email/email_template.rb +4 -4
- data/app/models/wco_email/message.rb +3 -0
- data/app/views/wco/galleries/edit.haml +5 -5
- data/app/views/wco/invoices/index.haml +1 -1
- data/app/views/wco/invoices/new_pdf.haml +1 -1
- data/app/views/wco/invoices/new_stripe.haml +1 -1
- data/app/views/wco/invoices/show.haml +1 -1
- data/app/views/wco/leads/edit.haml +2 -2
- data/app/views/wco/leads/new.haml +1 -1
- data/app/views/wco/leadsets/_form.haml +0 -4
- data/app/views/wco/leadsets/edit.haml +3 -3
- data/app/views/wco/leadsets/new.haml +1 -1
- data/app/views/wco/products/edit.haml +1 -1
- data/app/views/wco/products/show.haml +1 -1
- data/app/views/wco/videos/edit.haml +2 -2
- data/app/views/wco/videos/new.haml +1 -1
- data/app/views/wco/videos/show.haml +1 -1
- data/config/initializers/assets.rb +1 -1
- data/lib/wco_models.rb +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d2aedb50a30f432370f7a3d8dce814677b95ec4373a64594aae4b142fa7d31fa
|
4
|
+
data.tar.gz: 6b56ff81d8003170a2d7f2035de0b5708ece56d3bf2576c5f4f2575b8d4e5a84
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1887e0d49d5d016b0e672118428bc71809375a1989ee89fa1976eafb8edf4976c27f5733550fd8b82921b49e819c14d3f158a7c56d469660de33fe6c36c3b01
|
7
|
+
data.tar.gz: d2330182a059ad9699441c11e40fd81b7867ec7650cad664a4f8848b56f7f8c2bbf8f712a4104f72b9950ed1c7f0483524921de999def7410a3935a319e0a727
|
data/app/models/wco/lead.rb
CHANGED
@@ -16,6 +16,8 @@ class Wco::Lead
|
|
16
16
|
belongs_to :leadset, class_name: 'Wco::Leadset'
|
17
17
|
has_one :photo, class_name: 'Wco::Photo'
|
18
18
|
|
19
|
+
has_many :email_messages, class_name: '::WcoEmail::Message', inverse_of: :lead
|
20
|
+
|
19
21
|
has_and_belongs_to_many :conversations, class_name: '::WcoEmail::Conversation'
|
20
22
|
def convs; conversations; end
|
21
23
|
has_many :email_contexts, class_name: '::WcoEmail::Context'
|
data/app/models/wco/leadset.rb
CHANGED
@@ -33,7 +33,7 @@ class Wco::Leadset
|
|
33
33
|
field :customer_id
|
34
34
|
def customer_id
|
35
35
|
if self[:customer_id].blank?
|
36
|
-
return nil if !email
|
36
|
+
return nil if !email.present?
|
37
37
|
existing = Stripe::Customer.search({ query: "email: '#{email}'" })
|
38
38
|
# puts! existing, 'existing'
|
39
39
|
if existing.data.present?
|
@@ -47,4 +47,8 @@ class Wco::Leadset
|
|
47
47
|
self[:customer_id]
|
48
48
|
end
|
49
49
|
|
50
|
+
def to_s
|
51
|
+
company_url
|
52
|
+
end
|
53
|
+
|
50
54
|
end
|
@@ -1,7 +1,7 @@
|
|
1
|
+
|
1
2
|
##
|
2
3
|
## Send a single email
|
3
4
|
##
|
4
|
-
|
5
5
|
class WcoEmail::Context
|
6
6
|
include Mongoid::Document
|
7
7
|
include Mongoid::Timestamps
|
@@ -45,6 +45,8 @@ class WcoEmail::Context
|
|
45
45
|
self[:subject].presence || tmpl.subject
|
46
46
|
end
|
47
47
|
|
48
|
+
belongs_to :reply_to_message, class_name: 'WcoEmail::Message', inverse_of: :replies, optional: true
|
49
|
+
|
48
50
|
belongs_to :email_template, class_name: 'WcoEmail::EmailTemplate'
|
49
51
|
def tmpl; email_template; end
|
50
52
|
|
@@ -106,10 +106,10 @@ class WcoEmail::EmailTemplate
|
|
106
106
|
binding()
|
107
107
|
end
|
108
108
|
|
109
|
-
has_many :email_actions, class_name: 'WcoEmail::EmailAction'
|
110
|
-
has_many :email_contexts, class_name: 'WcoEmail::
|
111
|
-
has_many :email_filters, class_name: 'WcoEmail::EmailFilter'
|
112
|
-
has_many :unsubscribes, class_name: 'WcoEmail::Unsubscribe'
|
109
|
+
has_many :email_actions, class_name: '::WcoEmail::EmailAction'
|
110
|
+
has_many :email_contexts, class_name: '::WcoEmail::Context'
|
111
|
+
has_many :email_filters, class_name: '::WcoEmail::EmailFilter'
|
112
|
+
has_many :unsubscribes, class_name: '::WcoEmail::Unsubscribe'
|
113
113
|
|
114
114
|
SLUG_BLANK = 'blank'
|
115
115
|
def self.blank_template
|
@@ -49,6 +49,8 @@ class WcoEmail::Message
|
|
49
49
|
|
50
50
|
field :from, type: :string
|
51
51
|
field :froms, type: Array, default: []
|
52
|
+
belongs_to :lead, class_name: 'Wco::Lead', inverse_of: :email_messages
|
53
|
+
|
52
54
|
field :to, type: :string
|
53
55
|
field :tos, type: Array, default: []
|
54
56
|
field :cc, type: :string
|
@@ -69,6 +71,7 @@ class WcoEmail::Message
|
|
69
71
|
|
70
72
|
has_many :assets, class_name: '::Wco::Asset'
|
71
73
|
has_many :photos, class_name: '::Wco::Photo'
|
74
|
+
has_many :replies, class_name: '::WcoEmail::Context', inverse_of: :reply_to_message
|
72
75
|
|
73
76
|
def apply_filter filter
|
74
77
|
case filter.kind
|
@@ -1,6 +1,6 @@
|
|
1
1
|
|
2
|
-
.galleries-edit.
|
3
|
-
= render 'title', :
|
4
|
-
= render 'form', :
|
5
|
-
= render 'thumbs', :
|
6
|
-
= render 'wco/photos/multinew', :
|
2
|
+
.galleries-edit.maxwidth
|
3
|
+
= render 'title', gallery: @gallery
|
4
|
+
= render 'form', gallery: @gallery, :url => gallery_path( @gallery )
|
5
|
+
= render 'thumbs', gallery: @gallery
|
6
|
+
= render 'wco/photos/multinew', gallery: @gallery
|
@@ -1,4 +1,4 @@
|
|
1
1
|
|
2
|
-
.leadsets-edit.
|
3
|
-
%h1 Edit leadset `#{link_to @leadset.
|
4
|
-
= render 'form', :
|
2
|
+
.leadsets-edit.maxwidth
|
3
|
+
%h1 Edit leadset `#{link_to @leadset.company_url, leadset_path(@leadset)}`
|
4
|
+
= render 'form', leadset: @leadset
|
data/lib/wco_models.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wco_models
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.0.
|
4
|
+
version: 3.1.0.51
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Victor Pudeyev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-01-
|
11
|
+
date: 2024-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-s3
|