wco_email 0.1.1.16 → 0.1.1.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/wco_email/api_controller.rb +1 -1
- data/app/helpers/wco_email/application_helper.rb +0 -16
- data/app/views/wco_email/_main_header.haml +24 -25
- data/app/views/wco_email/email_templates/_plain.haml +0 -4
- data/lib/tasks/db_tasks.rake +23 -20
- data/lib/tasks/wco_email_tasks.rake +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9ee31f07f0214ecc2c291ebd5ad7b72178fa589f14ab0851d14cb95973a83a04
|
4
|
+
data.tar.gz: d9b626b34660c3ac056bb7cffb6a80a2baf756d2d26d87c5f8e523690f020fce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3052c43baec0b9f77a4435d78d97803a3652ed3856a613691b427ae819bad13907787889f291a09a800159a7c5c0a2aec1f556418fb90cb838cb7c05e65d1822
|
7
|
+
data.tar.gz: ee8fd66a96b4ae2d3e5db106e13604fc5e931e5d5adde8d6cfdaf47597b0d1338b61c1dbfd84a1fb98115bb1c708b2087eadbf3521893a51ed51ae098fe50685
|
@@ -7,7 +7,7 @@ class WcoEmail::ApiController < ActionController::Base
|
|
7
7
|
def create_email_message
|
8
8
|
puts! params, 'params'
|
9
9
|
|
10
|
-
stub = WcoEmail::MessageStub.
|
10
|
+
stub = WcoEmail::MessageStub.find_or_create_by({
|
11
11
|
bucket: params[:bucket],
|
12
12
|
object_key: params[:object_key],
|
13
13
|
})
|
@@ -1,20 +1,4 @@
|
|
1
1
|
|
2
2
|
module WcoEmail::ApplicationHelper
|
3
3
|
|
4
|
-
def pretty_date date
|
5
|
-
# date.to_s[0, 10]
|
6
|
-
date&.strftime('%Y-%m-%d')
|
7
|
-
end
|
8
|
-
def pp_date a; pretty_date a; end
|
9
|
-
|
10
|
-
def pp_datetime date
|
11
|
-
date&.strftime('%Y-%m-%d %l:%M%P %z')
|
12
|
-
end
|
13
|
-
|
14
|
-
def pp_time date
|
15
|
-
return nil if !date
|
16
|
-
# return date.strftime('%l:%M%P %z')
|
17
|
-
return date.in_time_zone( Rails.application.config.time_zone ).strftime('%l:%M%P')
|
18
|
-
end
|
19
|
-
|
20
4
|
end
|
@@ -1,31 +1,30 @@
|
|
1
1
|
|
2
|
-
.application--main-header.main-header
|
2
|
+
.application--main-header.main-header{ class: "#{ENV['RAILS_ENV']} #{ENV['RAILS_ENV'][0...3]=="dev" ? "development" : ''}" }
|
3
|
+
.maxwidth
|
4
|
+
%i.fa.fa-compress.collapse-expand#collapseHeaderEmail
|
5
|
+
Wco Email & CRM
|
6
|
+
.flex-row
|
7
|
+
%ul
|
8
|
+
%li= link_to 'Email Messages', conversations_path
|
9
|
+
%li
|
10
|
+
Stubs
|
11
|
+
(#{WcoEmail::MessageStub.pending.length})
|
12
|
+
(#{WcoEmail::MessageStub.all.length})
|
13
|
+
%li= render '/wco_email/email_templates/header'
|
14
|
+
%li= render '/wco_email/email_campaigns/header'
|
15
|
+
%li= render '/wco_email/email_filters/header'
|
16
|
+
%li= render '/wco_email/contexts/header'
|
17
|
+
%li= render '/wco_email/unsubscribes/header'
|
3
18
|
|
4
|
-
%i.fa.fa-compress.collapse-expand#collapseHeaderEmail
|
5
|
-
Wco Email & CRM
|
6
|
-
.flex-row
|
7
|
-
%ul
|
8
|
-
%li= link_to 'Email Messages', conversations_path
|
9
|
-
%li
|
10
|
-
Stubs
|
11
|
-
(#{WcoEmail::MessageStub.pending.length})
|
12
|
-
(#{WcoEmail::MessageStub.all.length})
|
13
|
-
%li= render '/wco_email/email_templates/header'
|
14
|
-
%li= render '/wco_email/email_campaigns/header'
|
15
|
-
%li= render '/wco_email/email_filters/header'
|
16
|
-
%li= render '/wco_email/contexts/header'
|
17
|
-
%li= render '/wco_email/unsubscribes/header'
|
18
19
|
|
20
|
+
%ul
|
21
|
+
%li= render '/wco_email/email_action_templates/header'
|
22
|
+
%li= render '/wco_email/email_actions/header'
|
19
23
|
|
20
|
-
|
21
|
-
|
22
|
-
%li= render '/wco_email/email_actions/header'
|
24
|
+
-# %li= render '/wco_email/lead_action_templates/header'
|
25
|
+
-# %li= render '/wco_email/lead_actions/header'
|
23
26
|
|
24
|
-
|
25
|
-
|
27
|
+
-# %li
|
28
|
+
-# = link_to "OActions (#{Wco::OfficeAction.all.length})", office_actions_path
|
29
|
+
-# = link_to '[+]', new_office_action_path
|
26
30
|
|
27
|
-
-# %li
|
28
|
-
-# = link_to "OActions (#{Wco::OfficeAction.all.length})", office_actions_path
|
29
|
-
-# = link_to '[+]', new_office_action_path
|
30
|
-
|
31
|
-
.c
|
data/lib/tasks/db_tasks.rake
CHANGED
@@ -1,34 +1,37 @@
|
|
1
1
|
|
2
|
-
|
3
|
-
|
2
|
+
namespace :db do
|
4
3
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
4
|
+
desc "clean contexts"
|
5
|
+
task clean_contexts: :environment do
|
6
|
+
WcoEmail::Context.each do |ttt|
|
7
|
+
if !ttt.lead
|
8
|
+
ttt.delete
|
9
|
+
end
|
10
|
+
end
|
9
11
|
end
|
10
|
-
end
|
11
|
-
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
WcoEmail::
|
16
|
-
|
17
|
-
|
13
|
+
desk 'clean email actions'
|
14
|
+
task clean_email_actions: :environment do
|
15
|
+
WcoEmail::EmailAction.each do |act|
|
16
|
+
if !act.lead
|
17
|
+
act.delete
|
18
|
+
end
|
19
|
+
end
|
18
20
|
end
|
19
|
-
end
|
20
|
-
|
21
|
-
|
22
|
-
=end
|
23
|
-
|
24
|
-
namespace :db do
|
25
21
|
|
26
22
|
desc "seed"
|
27
23
|
task seed: :environment do
|
24
|
+
|
28
25
|
inbox = Wco::Tag.find_or_create_by({ slug: 'inbox' })
|
29
26
|
trash = Wco::Tag.find_or_create_by({ slug: 'trash' })
|
27
|
+
spam = Wco::Tag.find_or_create_by({ slug: 'spam' })
|
28
|
+
|
29
|
+
wasyaco = Wco::Leadset.find_or_create_by!({ company_url: 'wasya.co' })
|
30
|
+
|
31
|
+
poxlovi = Wco::Lead.find_or_create_by!({ email: 'poxlovi@gmail.com' })
|
32
|
+
piousbox = Wco::Lead.find_or_create_by!({ email: 'piousbox@gmail.com' })
|
33
|
+
victor = Wco::Lead.find_or_create_by!({ email: 'victor@wasya.co' })
|
30
34
|
|
31
|
-
poxlovi = Wco::Lead.find_or_create_by!({ email: 'poxlovi@gmail.com' })
|
32
35
|
end
|
33
36
|
|
34
37
|
end
|
@@ -147,7 +147,7 @@ namespace :wco_email do
|
|
147
147
|
print '^'
|
148
148
|
end
|
149
149
|
|
150
|
-
duration = Rails.env.production? ?
|
150
|
+
duration = Rails.env.production? ? 15 : 15 # 2 minutes or 15 seconds
|
151
151
|
sleep duration
|
152
152
|
print '.'
|
153
153
|
|
@@ -182,7 +182,7 @@ namespace :wco_email do
|
|
182
182
|
print '^'
|
183
183
|
end
|
184
184
|
|
185
|
-
duration = Rails.env.production? ?
|
185
|
+
duration = Rails.env.production? ? 15 : 15 # 2 minutes or 15 seconds
|
186
186
|
sleep duration
|
187
187
|
print '.'
|
188
188
|
|