ish_manager 0.1.8.468 → 0.1.8.469

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/ish_manager/application.scss +9 -2
  3. data/app/controllers/ish_manager/application_controller.rb +1 -3
  4. data/app/controllers/ish_manager/email_conversations_controller.rb +9 -1
  5. data/app/controllers/ish_manager/email_templates_controller.rb +18 -2
  6. data/app/controllers/ish_manager/lead_action_templates_controller.rb +27 -0
  7. data/app/controllers/ish_manager/lead_actions_controller.rb +10 -0
  8. data/app/controllers/ish_manager/newsitems_controller.rb +18 -5
  9. data/app/controllers/ish_manager/user_profiles_controller.rb +4 -4
  10. data/app/helpers/ish_manager/application_helper.rb +14 -0
  11. data/app/views/ish_manager/application/_main_header_admin.haml +7 -4
  12. data/app/views/ish_manager/application/home.haml +85 -5
  13. data/app/views/ish_manager/email_layouts/can_unsubscribe.html.erb +0 -0
  14. data/app/views/ish_manager/email_layouts/piousbox_roundborders.html.erb +0 -0
  15. data/app/views/ish_manager/email_layouts/plain.html.erb +0 -0
  16. data/app/views/ish_manager/email_layouts/roundborders.html.erb +0 -0
  17. data/app/views/ish_manager/email_layouts/wco_roundborders.html.erb +0 -0
  18. data/app/views/ish_manager/email_templates/_footer_unsubscribe.html.erb +26 -0
  19. data/app/views/ish_manager/email_templates/_form.haml +6 -0
  20. data/app/views/ish_manager/email_templates/_m202309_feedback.html.erb +1153 -0
  21. data/app/views/ish_manager/email_templates/_m202309_holiday_black_friday.html.erb +0 -0
  22. data/app/views/ish_manager/email_templates/_m202309_holiday_christmas.html.erb +0 -0
  23. data/app/views/ish_manager/email_templates/_m202309_holiday_cinco_de_mayo.html.erb +0 -0
  24. data/app/views/ish_manager/email_templates/_m202309_holiday_columbus_day.html.erb +0 -0
  25. data/app/views/ish_manager/email_templates/_m202309_holiday_cyber_monday.html.erb +0 -0
  26. data/app/views/ish_manager/email_templates/_m202309_holiday_easter.html.erb +0 -0
  27. data/app/views/ish_manager/email_templates/_m202309_holiday_fathers_day.html.erb +0 -0
  28. data/app/views/ish_manager/email_templates/_m202309_holiday_flag_day.html.erb +0 -0
  29. data/app/views/ish_manager/email_templates/_m202309_holiday_groundhog_day.html.erb +0 -0
  30. data/app/views/ish_manager/email_templates/_m202309_holiday_halloween.html.erb +0 -0
  31. data/app/views/ish_manager/email_templates/_m202309_holiday_inauguration_day.html.erb +0 -0
  32. data/app/views/ish_manager/email_templates/_m202309_holiday_independence_day.html.erb +0 -0
  33. data/app/views/ish_manager/email_templates/_m202309_holiday_juneteenth.html.erb +0 -0
  34. data/app/views/ish_manager/email_templates/_m202309_holiday_labor_day.html.erb +0 -0
  35. data/app/views/ish_manager/email_templates/_m202309_holiday_may_forth.html.erb +3 -0
  36. data/app/views/ish_manager/email_templates/_m202309_holiday_memorial_day.html.erb +0 -0
  37. data/app/views/ish_manager/email_templates/_m202309_holiday_mlk.html.erb +0 -0
  38. data/app/views/ish_manager/email_templates/_m202309_holiday_mothers_day.html.erb +0 -0
  39. data/app/views/ish_manager/email_templates/_m202309_holiday_newyear.html.erb +0 -0
  40. data/app/views/ish_manager/email_templates/_m202309_holiday_presidents_day.html.erb +0 -0
  41. data/app/views/ish_manager/email_templates/_m202309_holiday_st_patricks.html.erb +0 -0
  42. data/app/views/ish_manager/email_templates/_m202309_holiday_thanksgiving.html.erb +0 -0
  43. data/app/views/ish_manager/email_templates/_m202309_holiday_valentines.html.erb +0 -0
  44. data/app/views/ish_manager/email_templates/_m202309_holiday_veterans_day.html.erb +0 -0
  45. data/app/views/ish_manager/email_templates/_marketing_node_1.html.erb +764 -456
  46. data/app/views/ish_manager/email_templates/edit.haml +3 -0
  47. data/app/views/ish_manager/lead_action_templates/_form.haml +12 -0
  48. data/app/views/ish_manager/lead_action_templates/edit.haml +5 -0
  49. data/app/views/ish_manager/lead_action_templates/index.haml +11 -0
  50. data/app/views/ish_manager/lead_actions/index.haml +12 -0
  51. data/config/routes.rb +12 -0
  52. data/lib/tasks/office_tasks.rake +18 -0
  53. metadata +39 -3
  54. data/app/controllers/ish_manager/email_unsubscribes_controller.rb +0 -17
@@ -1,3 +1,6 @@
1
1
 
2
2
  .email-templates-edit.max-width
3
+ %h5
4
+ Edit
5
+ = link_to @email_template.slug, email_template_path( @email_template )
3
6
  = render 'form', email_template: @email_template
@@ -0,0 +1,12 @@
1
+
2
+ - url = tmpl.new_record? ? lead_action_templates_path : lead_action_template_path( tmpl )
3
+ .lead-action-templates--form
4
+ = form_for tmpl, url: url, as: :tmpl do |f|
5
+ .field
6
+ %label slug
7
+ = f.text_field :slug
8
+ .field
9
+ %label Action exe
10
+ = f.text_area :action_exe
11
+ .actions
12
+ = f.submit 'Submit'
@@ -0,0 +1,5 @@
1
+
2
+ .lead-action-templates-edit.maxwidth
3
+ %h5 Edit Lead Action Template
4
+
5
+ = render 'form', tmpl: @tmpl
@@ -0,0 +1,11 @@
1
+
2
+ .lead-action-templates-index.maxwidth
3
+ %h5 Lead Action Templates
4
+
5
+ %ul
6
+ - @tmpls.each do |tmpl|
7
+ %li
8
+ = link_to "[~ #{tmpl.slug}]", edit_lead_action_template_path( tmpl )
9
+
10
+ %hr
11
+ = render 'form', tmpl: @new_lat
@@ -0,0 +1,12 @@
1
+
2
+ .lead-actions-index.maxwidth
3
+ %h5 Lead Actions
4
+
5
+ %ul
6
+ - @lead_actions.each do |la|
7
+ %li
8
+ %ul
9
+ - JSON.parse( la.params ).each do |k, v|
10
+ %li
11
+ = k
12
+ = v
data/config/routes.rb CHANGED
@@ -105,6 +105,8 @@ IshManager::Engine.routes.draw do
105
105
 
106
106
  resources :email_unsubscribes
107
107
 
108
+ ## L
109
+ resources :lead_actions
108
110
  resources :lead_leadsets
109
111
 
110
112
  get 'leads', :to => 'leads#index'
@@ -116,13 +118,23 @@ IshManager::Engine.routes.draw do
116
118
 
117
119
  resources :leadset_tags
118
120
 
121
+ resources :lead_actions
122
+ resources :lead_action_templates
123
+
124
+ ## M
119
125
 
120
126
  resources :meetings
121
127
 
128
+ ## N
129
+
122
130
  resources :newsitems
123
131
 
132
+ ## O
133
+
124
134
  resources :office_actions
125
135
 
136
+ ## P
137
+
126
138
  resources :photos
127
139
  resources :payments
128
140
  resources :prices
@@ -53,6 +53,24 @@ namespace :office do
53
53
 
54
54
  ctxs = ::Ish::EmailContext.scheduled.notsent
55
55
  ctxs.map do |ctx|
56
+
57
+
58
+ throw "@TODO: continue iterating here. _vp_ 2023-09-18"
59
+
60
+ unsub = Ish::EmailUnsubscribe.where({ lead_id: ctx.lead_id, template_id: ctx.template_id }).first
61
+ if unsub
62
+ template = Ish::EmailTemplate.find( ctx.template_id )
63
+ puts! "Lead `#{ctx.lead.full_name}` [mailto:#{ctx.lead.email}] has already unsubscribed from template `#{template.slug}` ."
64
+ email_action_ids = EAction.where({ email_template_id: ctx.template_id }).map(&:id)
65
+ scheduled_oacts = Sch.active.where({
66
+ lead_id: ctx.lead_id,
67
+ :email_action_id.in => email_action_ids,
68
+ })
69
+ scheduled_oacts.update_attributes({
70
+ state: Office::ScheduledEmailAction::STATE_UNSUBSCRIBED,
71
+ })
72
+ end
73
+
56
74
  out = IshManager::OfficeMailer.send_context_email( ctx[:id].to_s )
57
75
  Rails.env.production? ? out.deliver_later : out.deliver_now
58
76
  print '^'
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.468
4
+ version: 0.1.8.469
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-16 00:00:00.000000000 Z
11
+ date: 2023-09-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -492,7 +492,6 @@ files:
492
492
  - app/controllers/ish_manager/email_filters_controller.rb
493
493
  - app/controllers/ish_manager/email_messages_controller.rb
494
494
  - app/controllers/ish_manager/email_templates_controller.rb
495
- - app/controllers/ish_manager/email_unsubscribes_controller.rb
496
495
  - app/controllers/ish_manager/events_controller.rb
497
496
  - app/controllers/ish_manager/galleries_controller.rb
498
497
  - app/controllers/ish_manager/image_assets_controller.rb
@@ -502,6 +501,8 @@ files:
502
501
  - app/controllers/ish_manager/iro_purses_controller.rb
503
502
  - app/controllers/ish_manager/iro_strategies_controller.rb
504
503
  - app/controllers/ish_manager/iro_watches_controller.rb
504
+ - app/controllers/ish_manager/lead_action_templates_controller.rb
505
+ - app/controllers/ish_manager/lead_actions_controller.rb
505
506
  - app/controllers/ish_manager/leads_controller.rb
506
507
  - app/controllers/ish_manager/leadset_tags_controller.rb
507
508
  - app/controllers/ish_manager/leadsets_controller.rb
@@ -620,6 +621,11 @@ files:
620
621
  - app/views/ish_manager/email_filters/edit.haml
621
622
  - app/views/ish_manager/email_filters/index.haml
622
623
  - app/views/ish_manager/email_filters/new.haml
624
+ - app/views/ish_manager/email_layouts/can_unsubscribe.html.erb
625
+ - app/views/ish_manager/email_layouts/piousbox_roundborders.html.erb
626
+ - app/views/ish_manager/email_layouts/plain.html.erb
627
+ - app/views/ish_manager/email_layouts/roundborders.html.erb
628
+ - app/views/ish_manager/email_layouts/wco_roundborders.html.erb
623
629
  - app/views/ish_manager/email_messages/_show_iframe.haml
624
630
  - app/views/ish_manager/email_messages/index.haml
625
631
  - app/views/ish_manager/email_messages/show.haml
@@ -627,6 +633,7 @@ files:
627
633
  - app/views/ish_manager/email_messages/show_source.haml
628
634
  - app/views/ish_manager/email_messages/show_stripped.haml
629
635
  - app/views/ish_manager/email_templates/_acknowledgement_of_document_receipt.html.erb
636
+ - app/views/ish_manager/email_templates/_footer_unsubscribe.html.erb
630
637
  - app/views/ish_manager/email_templates/_form.haml
631
638
  - app/views/ish_manager/email_templates/_form_mini.haml
632
639
  - app/views/ish_manager/email_templates/_form_reply_mini.haml
@@ -634,6 +641,31 @@ files:
634
641
  - app/views/ish_manager/email_templates/_index.haml
635
642
  - app/views/ish_manager/email_templates/_m20221201react.html.erb
636
643
  - app/views/ish_manager/email_templates/_m20221222merryxmas.html.erb
644
+ - app/views/ish_manager/email_templates/_m202309_feedback.html.erb
645
+ - app/views/ish_manager/email_templates/_m202309_holiday_black_friday.html.erb
646
+ - app/views/ish_manager/email_templates/_m202309_holiday_christmas.html.erb
647
+ - app/views/ish_manager/email_templates/_m202309_holiday_cinco_de_mayo.html.erb
648
+ - app/views/ish_manager/email_templates/_m202309_holiday_columbus_day.html.erb
649
+ - app/views/ish_manager/email_templates/_m202309_holiday_cyber_monday.html.erb
650
+ - app/views/ish_manager/email_templates/_m202309_holiday_easter.html.erb
651
+ - app/views/ish_manager/email_templates/_m202309_holiday_fathers_day.html.erb
652
+ - app/views/ish_manager/email_templates/_m202309_holiday_flag_day.html.erb
653
+ - app/views/ish_manager/email_templates/_m202309_holiday_groundhog_day.html.erb
654
+ - app/views/ish_manager/email_templates/_m202309_holiday_halloween.html.erb
655
+ - app/views/ish_manager/email_templates/_m202309_holiday_inauguration_day.html.erb
656
+ - app/views/ish_manager/email_templates/_m202309_holiday_independence_day.html.erb
657
+ - app/views/ish_manager/email_templates/_m202309_holiday_juneteenth.html.erb
658
+ - app/views/ish_manager/email_templates/_m202309_holiday_labor_day.html.erb
659
+ - app/views/ish_manager/email_templates/_m202309_holiday_may_forth.html.erb
660
+ - app/views/ish_manager/email_templates/_m202309_holiday_memorial_day.html.erb
661
+ - app/views/ish_manager/email_templates/_m202309_holiday_mlk.html.erb
662
+ - app/views/ish_manager/email_templates/_m202309_holiday_mothers_day.html.erb
663
+ - app/views/ish_manager/email_templates/_m202309_holiday_newyear.html.erb
664
+ - app/views/ish_manager/email_templates/_m202309_holiday_presidents_day.html.erb
665
+ - app/views/ish_manager/email_templates/_m202309_holiday_st_patricks.html.erb
666
+ - app/views/ish_manager/email_templates/_m202309_holiday_thanksgiving.html.erb
667
+ - app/views/ish_manager/email_templates/_m202309_holiday_valentines.html.erb
668
+ - app/views/ish_manager/email_templates/_m202309_holiday_veterans_day.html.erb
637
669
  - app/views/ish_manager/email_templates/_marketing_node_1.html.erb
638
670
  - app/views/ish_manager/email_templates/_marketing_react_1.html
639
671
  - app/views/ish_manager/email_templates/_marketing_react_2.html.erb
@@ -721,6 +753,10 @@ files:
721
753
  - app/views/ish_manager/kaminari/_page.html.erb
722
754
  - app/views/ish_manager/kaminari/_paginator.html.erb
723
755
  - app/views/ish_manager/kaminari/_prev_page.html.erb
756
+ - app/views/ish_manager/lead_action_templates/_form.haml
757
+ - app/views/ish_manager/lead_action_templates/edit.haml
758
+ - app/views/ish_manager/lead_action_templates/index.haml
759
+ - app/views/ish_manager/lead_actions/index.haml
724
760
  - app/views/ish_manager/leads/_form.haml
725
761
  - app/views/ish_manager/leads/_form_import.haml
726
762
  - app/views/ish_manager/leads/_index.haml
@@ -1,17 +0,0 @@
1
-
2
- class ::IshManager::EmailUnsubscribesController < IshManager::ApplicationController
3
-
4
- layout false
5
-
6
- # alphabetized : )
7
-
8
- def new
9
- @unsubscribe = Ish::Unsubscribe.new
10
- authorize! :new, @unsubscribe
11
- end
12
-
13
- def create
14
- authorize! :open_permission, IshManager::Ability
15
- end
16
-
17
- end