ish_manager 0.1.8.383 → 0.1.8.385
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/ish_manager/application.js +1 -1
- data/app/assets/stylesheets/ish_manager/application.scss +6 -0
- data/app/assets/stylesheets/ish_manager/email.scss +5 -0
- data/app/controllers/ish_manager/application_controller.rb +1 -1
- data/app/controllers/ish_manager/email_actions_controller.rb +12 -7
- data/app/controllers/ish_manager/scheduled_email_actions_controller.rb +1 -6
- data/app/views/ish_manager/email_actions/_form.haml +12 -24
- data/app/views/ish_manager/email_actions/edit.haml +1 -1
- data/app/views/ish_manager/email_actions/index.haml +10 -4
- data/app/views/ish_manager/email_actions/new.haml +1 -1
- data/app/views/ish_manager/email_actions/show.haml +3 -0
- data/app/views/ish_manager/leads/show.haml +5 -8
- data/app/views/ish_manager/scheduled_email_actions/_form.haml +7 -3
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b543b5f1c79e4a3938be93fc4701c085393798b4bb8809bb9eca0c7d825937ac
|
4
|
+
data.tar.gz: 335bb44f73016350aa4c8d44e800425376bfdd7659d621819002a18a97b05504
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c289826afe4fc20ccd178005e48c2a4ed28fdadefb148edc134b73fd7b560ef63c8685ebd267a226e04bf95b06fd29da3d021191f5da68c47681c825cad34061
|
7
|
+
data.tar.gz: 107bca0378ff2406e639735fc132f4c7512dc8cd8f1fbb7b1d892a5e8682e6115a8e972b5a5843ce2de3ef7e8086c9d4d2ef9e50e502b81126e8cbf43fa49a52
|
@@ -208,6 +208,10 @@ table.dataTable {
|
|
208
208
|
|
209
209
|
/* F */
|
210
210
|
|
211
|
+
.flex-grow {
|
212
|
+
flex-grow: 1;
|
213
|
+
}
|
214
|
+
|
211
215
|
.flex-row {
|
212
216
|
display: flex;
|
213
217
|
flex-wrap: wrap;
|
@@ -327,6 +331,8 @@ textarea.large {
|
|
327
331
|
margin-top: 1em;
|
328
332
|
|
329
333
|
flex-grow: 1;
|
334
|
+
|
335
|
+
z-index: -1;
|
330
336
|
}
|
331
337
|
|
332
338
|
.max-width {
|
@@ -66,7 +66,7 @@ module IshManager
|
|
66
66
|
|
67
67
|
@leads_list = Lead.list
|
68
68
|
@leadsets_list = Leadset.list
|
69
|
-
@email_actions_list = ::Office::EmailAction.all.map { |a| [ a.slug, a.id ] }
|
69
|
+
@email_actions_list = [[nil,nil]] + ::Office::EmailAction.all.map { |a| [ a.slug, a.id ] }
|
70
70
|
@email_templates_list = Ish::EmailTemplate.all.map { |t| [ t.slug, t.id ] }
|
71
71
|
end
|
72
72
|
|
@@ -29,6 +29,7 @@ class ::IshManager::EmailActionsController < IshManager::ApplicationController
|
|
29
29
|
|
30
30
|
def edit
|
31
31
|
@act = @email_action = Office::EmailAction.find( params[:id] )
|
32
|
+
@act.ties.push Office::EmailActionTie.new( next_email_action_id: nil )
|
32
33
|
authorize! :edit, @act
|
33
34
|
end
|
34
35
|
|
@@ -43,25 +44,29 @@ class ::IshManager::EmailActionsController < IshManager::ApplicationController
|
|
43
44
|
end
|
44
45
|
|
45
46
|
def show
|
47
|
+
@act = @email_action = Office::EmailAction.find( params[:id] )
|
48
|
+
authorize! :show, @act
|
46
49
|
end
|
47
50
|
|
48
51
|
def update
|
49
52
|
@act = @email_action = Office::EmailAction.find( params[:id] )
|
50
53
|
authorize! :update, @act
|
51
54
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
55
|
+
params[:email_action][:ties_attributes].each do |k, v|
|
56
|
+
if !v[:next_email_action_id].present?
|
57
|
+
params[:email_action][:ties_attributes].delete( k )
|
58
|
+
end
|
59
|
+
if v[:to_delete] == "1"
|
60
|
+
Actie.find( v[:id] ).delete
|
61
|
+
params[:email_action][:ties_attributes].delete( k )
|
62
|
+
end
|
58
63
|
end
|
59
64
|
|
60
65
|
flag = @act.update_attributes( params[:email_action].permit! )
|
61
66
|
if flag
|
62
67
|
flash[:notice] = 'Success'
|
63
68
|
else
|
64
|
-
flash[:alert] = "No luck: #{@act.errors.full_messages.join(', ')}"
|
69
|
+
flash[:alert] = "No luck: #{@act.errors.full_messages.join(', ')}. #{@act.ties.map { |t| t.errors.full_messages.join(', ') }.join(' | ') }"
|
65
70
|
end
|
66
71
|
|
67
72
|
redirect_to action: 'index'
|
@@ -4,14 +4,9 @@ class IshManager::ScheduledEmailActionsController < IshManager::ApplicationContr
|
|
4
4
|
before_action :set_lists
|
5
5
|
|
6
6
|
def create
|
7
|
-
puts! params, 'params'
|
8
|
-
|
9
7
|
authorize! :scheduled_emails_create, ::IshManager
|
10
8
|
|
11
|
-
@scheduled = Office::ScheduledEmailAction
|
12
|
-
lead_id: params[:lead_id],
|
13
|
-
email_action_id: params[:email_action_id],
|
14
|
-
})
|
9
|
+
@scheduled = Office::ScheduledEmailAction.new( params[:sch].permit! )
|
15
10
|
|
16
11
|
flag = @scheduled.save
|
17
12
|
if flag
|
@@ -22,35 +22,23 @@
|
|
22
22
|
= f.select :email_template_id, options_for_select( @email_templates_list, selected: act.email_template_id ), {}, class: 'select2'
|
23
23
|
|
24
24
|
.col-md-6
|
25
|
-
.field
|
26
|
-
%label Next At Exe
|
27
|
-
.eg rand(1..5).business_days.from_now.to_date + rand(8..16).hours + rand(1..59).minutes
|
28
|
-
= f.text_field :next_at_exe
|
29
|
-
-# .field
|
30
|
-
-# %label Next in Days
|
31
|
-
-# .eg eg: rand(1..5)
|
32
|
-
-# = f.text_field :next_in_days
|
33
|
-
-# .field
|
34
|
-
-# %label Next at Time
|
35
|
-
-# .eg eg: rand(8..16).hours + rand(1..59).minutes
|
36
|
-
-# = f.text_field :next_at_time
|
37
25
|
.field
|
38
26
|
%label Next Email Actions
|
39
|
-
|
27
|
+
.eg rand(1..5).business_days.from_now.to_date + rand(8..16).hours + rand(1..59).minutes
|
28
|
+
%br
|
29
|
+
|
30
|
+
= f.fields_for :ties do |next_f|
|
31
|
+
.flex-row.field
|
32
|
+
= next_f.label :next_at_exe
|
33
|
+
= next_f.text_field :next_at_exe, class: 'flex-grow'
|
34
|
+
.flex-row.field
|
35
|
+
= next_f.label :to_delete
|
36
|
+
= next_f.check_box :to_delete
|
37
|
+
= next_f.select :next_email_action_id, options_for_select( @email_actions_list, selected: next_f.object.next_email_action_id ), { }, { class: 'select2' }
|
38
|
+
%br
|
40
39
|
|
41
40
|
.row
|
42
41
|
.col-sm-6
|
43
42
|
= f.submit :submit
|
44
43
|
|
45
44
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
-# .field
|
52
|
-
-# %label State
|
53
|
-
-# = f.select :state, options_for_select( ::Office::EmailAction::STATES, selected: act.state )
|
54
|
-
-# .field
|
55
|
-
-# %label Lead
|
56
|
-
-# = f.select :lead_id, options_for_select( @leads_list, selected: act.lead_id ), {}, class: 'select2'
|
@@ -1,5 +1,5 @@
|
|
1
1
|
|
2
|
-
.email-actions-index.
|
2
|
+
.email-actions-index.padded
|
3
3
|
|
4
4
|
.header
|
5
5
|
%h2.title
|
@@ -17,10 +17,16 @@
|
|
17
17
|
%tr
|
18
18
|
%td= check_box_tag 'abba'
|
19
19
|
%td= link_to '[~]', edit_email_action_path( act )
|
20
|
-
%td= act.slug
|
20
|
+
%td= link_to act.slug, email_action_path( act )
|
21
21
|
%td= act.descr
|
22
22
|
-# %td= act.lead&.email
|
23
23
|
%td
|
24
24
|
%ul
|
25
|
-
- act.
|
26
|
-
%li
|
25
|
+
- act.ties.map do |next_a|
|
26
|
+
%li
|
27
|
+
.a= next_a.next_at_exe
|
28
|
+
.a
|
29
|
+
- if next_a.next_email_action.slug == act.slug
|
30
|
+
(same)
|
31
|
+
= next_a.next_email_action.slug
|
32
|
+
-# %li= link_to next_a.next_email_action.slug, edit_email_action_path( next_a.next_email_action )
|
@@ -1,5 +1,5 @@
|
|
1
1
|
|
2
|
-
.leads-show
|
2
|
+
.leads-show.padded
|
3
3
|
|
4
4
|
.header
|
5
5
|
%h2.title
|
@@ -14,7 +14,7 @@
|
|
14
14
|
.col-md-6.ctxs
|
15
15
|
%h5
|
16
16
|
Email Contexts (#{@ctxs.length})
|
17
|
-
= link_to '[
|
17
|
+
= link_to '[+]', '#'
|
18
18
|
%ul
|
19
19
|
- @ctxs.each do |ctx|
|
20
20
|
%li
|
@@ -23,17 +23,14 @@
|
|
23
23
|
.col-md-6.schs
|
24
24
|
%h5
|
25
25
|
Scheduled actions (#{@schs.length})
|
26
|
-
= link_to '[
|
26
|
+
= link_to '[+]', '#'
|
27
27
|
%ul
|
28
28
|
- @schs.each do |sch|
|
29
29
|
%li
|
30
30
|
= link_to sch.email_action.slug, edit_scheduled_email_action_path(sch)
|
31
31
|
= sch.state
|
32
|
-
|
33
|
-
|
34
|
-
(#{link_to 'prototype', edit_email_action_path(sch.email_action)})
|
35
|
-
|
36
|
-
In #{sch.email_action.next_in_days} days at #{sch.email_action.next_at_time}
|
32
|
+
(#{link_to 'proto-action', edit_email_action_path(sch.email_action)})
|
33
|
+
= sch.perform_at
|
37
34
|
|
38
35
|
|
39
36
|
.row
|
@@ -12,15 +12,19 @@
|
|
12
12
|
%h5.title Schedule an email action
|
13
13
|
|
14
14
|
.field
|
15
|
-
|
16
|
-
=
|
15
|
+
= f.label :lead
|
16
|
+
= f.select :lead_id, options_for_select(@leads_list, selected: sch_a[:lead_id]||params[:lead_id] ), class: 'select2'
|
17
17
|
.field
|
18
18
|
%label State
|
19
19
|
= f.select :state, options_for_select(::Office::ScheduledEmailAction::STATES, selected: sch_a.state ), class: 'select2'
|
20
20
|
%br
|
21
21
|
.field
|
22
22
|
%label Email Action
|
23
|
-
=
|
23
|
+
= f.select :email_action, options_for_select( @email_actions_list, selected: sch_a[:email_action_id] ), class: 'select2'
|
24
|
+
%br
|
25
|
+
.field
|
26
|
+
= f.label :perform_at
|
27
|
+
= f.text_field :perform_at
|
24
28
|
|
25
29
|
.actions
|
26
30
|
= submit_tag 'Schedule'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ish_manager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.8.
|
4
|
+
version: 0.1.8.385
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- piousbox
|
@@ -400,6 +400,7 @@ files:
|
|
400
400
|
- app/views/ish_manager/email_actions/edit.haml
|
401
401
|
- app/views/ish_manager/email_actions/index.haml
|
402
402
|
- app/views/ish_manager/email_actions/new.haml
|
403
|
+
- app/views/ish_manager/email_actions/show.haml
|
403
404
|
- app/views/ish_manager/email_campaign_leads/show.haml
|
404
405
|
- app/views/ish_manager/email_contexts/_form.haml
|
405
406
|
- app/views/ish_manager/email_contexts/_form_reply.haml
|