ish_manager 0.1.8.384 → 0.1.8.386

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/ish_manager/application.js +1 -1
  3. data/app/assets/javascripts/ish_manager/email_contexts.js +1 -15
  4. data/app/assets/javascripts/ish_manager/email_templates.js +1 -1
  5. data/app/assets/stylesheets/ish_manager/application.scss +7 -0
  6. data/app/assets/stylesheets/ish_manager/email.scss +5 -0
  7. data/app/assets/stylesheets/ish_manager/email_contexts.scss +0 -4
  8. data/app/assets/stylesheets/ish_manager/email_templates.scss +1 -1
  9. data/app/controllers/ish_manager/application_controller.rb +1 -1
  10. data/app/controllers/ish_manager/email_actions_controller.rb +12 -7
  11. data/app/controllers/ish_manager/email_contexts_controller.rb +10 -9
  12. data/app/controllers/ish_manager/scheduled_email_actions_controller.rb +1 -6
  13. data/app/views/ish_manager/email_actions/_form.haml +12 -24
  14. data/app/views/ish_manager/email_actions/edit.haml +1 -1
  15. data/app/views/ish_manager/email_actions/index.haml +10 -4
  16. data/app/views/ish_manager/email_actions/new.haml +1 -1
  17. data/app/views/ish_manager/email_actions/show.haml +3 -0
  18. data/app/views/ish_manager/email_contexts/_form.haml +17 -23
  19. data/app/views/ish_manager/email_contexts/edit.haml +3 -1
  20. data/app/views/ish_manager/email_contexts/iframe_src.haml +4 -0
  21. data/app/views/ish_manager/email_contexts/index.haml +0 -4
  22. data/app/views/ish_manager/email_contexts/new.haml +3 -1
  23. data/app/views/ish_manager/email_contexts/show.haml +7 -6
  24. data/app/views/ish_manager/email_conversations/show.haml +2 -1
  25. data/app/views/ish_manager/email_templates/_form.haml +3 -0
  26. data/app/views/ish_manager/email_templates/_plain.haml +3 -0
  27. data/app/views/ish_manager/email_templates/_wasyaco_roundborders.html.erb +3 -319
  28. data/app/views/ish_manager/email_templates/iframe_src.haml +1 -2
  29. data/app/views/ish_manager/leads/show.haml +5 -8
  30. data/app/views/ish_manager/scheduled_email_actions/_form.haml +7 -3
  31. data/lib/tasks/office_tasks.rake +9 -8
  32. metadata +5 -3
  33. data/app/views/ish_manager/email_templates/_plain.html.erb +0 -4
@@ -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 '[new]', '#'
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 '[new]', '#'
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
- %label Lead
16
- = select_tag :lead_id, options_for_select( @leads_list, selected: sch_a[:lead_id]||params[:lead_id] ), class: 'select2'
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
- = select_tag :email_action_id, options_for_select( @email_actions_list, selected: sch_a[:email_action_id] ), class: 'select2'
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'
@@ -7,7 +7,7 @@ end
7
7
  namespace :office do
8
8
 
9
9
  desc 'schheduled email actions, rolling perform'
10
- task :schs => :environment do
10
+ task schs: :environment do
11
11
  while true do
12
12
 
13
13
  Sch.active.where({ :perform_at.lte => Time.now }).each do |sch|
@@ -21,10 +21,11 @@ namespace :office do
21
21
  })
22
22
  ctx.save!
23
23
 
24
- # schedule the next action & update the action
25
- next_at = eval(sch.act.next_at_exe)
26
- sch.act.next_email_actions.each do |nxt|
27
- sch_nxt = Sch.find_or_initialize_by({
24
+ # schedule next actions & update the action
25
+ sch.act.ties.each do |tie|
26
+ next_act = tie.next_email_action
27
+ next_at = eval(tie.next_at_exe)
28
+ next_sch = Sch.find_or_initialize_by({
28
29
  lead_id: sch.lead_id,
29
30
  email_action_id: nxt.id,
30
31
  })
@@ -33,18 +34,18 @@ namespace :office do
33
34
  sch_nxt.save!
34
35
  end
35
36
 
36
- print '.'
37
+ print '+'
37
38
 
38
39
  end
39
40
 
40
41
  # sleep 1.minute
41
42
  sleep 10.seconds
42
- print '|'
43
+ print '.'
43
44
  end
44
45
  end
45
46
 
46
47
  desc "send emails"
47
- task :email_worker => :environment do
48
+ task email_worker: :environment do
48
49
  while true do
49
50
 
50
51
  ctxs = ::Ish::EmailContext.scheduled.unsent
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ish_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8.384
4
+ version: 0.1.8.386
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-24 00:00:00.000000000 Z
11
+ date: 2023-03-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -400,10 +400,12 @@ 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
406
407
  - app/views/ish_manager/email_contexts/edit.haml
408
+ - app/views/ish_manager/email_contexts/iframe_src.haml
407
409
  - app/views/ish_manager/email_contexts/index.haml
408
410
  - app/views/ish_manager/email_contexts/new.haml
409
411
  - app/views/ish_manager/email_contexts/show.haml
@@ -433,7 +435,7 @@ files:
433
435
  - app/views/ish_manager/email_templates/_marketing_wordpress_2.html
434
436
  - app/views/ish_manager/email_templates/_piousbox_roundborders.html.erb
435
437
  - app/views/ish_manager/email_templates/_piousbox_social.html.erb
436
- - app/views/ish_manager/email_templates/_plain.html.erb
438
+ - app/views/ish_manager/email_templates/_plain.haml
437
439
  - app/views/ish_manager/email_templates/_slug-1.html.erb
438
440
  - app/views/ish_manager/email_templates/_slug-2.html.erb
439
441
  - app/views/ish_manager/email_templates/_slug-3.html.erb
@@ -1,4 +0,0 @@
1
-
2
-
3
- <%= raw @tmpl.body %>
4
-