ish_manager 0.1.8.439 → 0.1.8.441

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9ab6080d06ed44c29d7f0e1e6abe18506f8fca69ec32241ccf30f76a9d66d66b
4
- data.tar.gz: 71ec0d289090ef315715edb360ec53e446e8a72496f6dcee767e09f01c7231e8
3
+ metadata.gz: 6ce64aaafb4bd3dbd060130af2561c9fa55c05e2bb40421ec488ed7cadd49949
4
+ data.tar.gz: 24bf8ebaa112f151a9fe0f5a95629a879aa102061dd6b3b9385501eec0e453a4
5
5
  SHA512:
6
- metadata.gz: b6c2e8d712417a16aa1ac599c7519f946d97d8587a37710464f066df0506f8b688755e3323ee0a97a6992799b8a3d6dd3fbdb9733755aa56ba1d3846911bca33
7
- data.tar.gz: 99168ca8e5e930d0567a707973ea3a1446df384f2655ca278298f02125a6a49891be9267eb5e58ca94747b92a367ed476cfcc6a1a6afe292f55977c87dd7de91
6
+ metadata.gz: 0f6c63048a0449bf28aabdf076364e421c4c515ecc0ec2061c399bbfd680bfd483c9b0baa1d7e1422443576db7bd741077532cf9bdb115fe78edc1d56a1d8305
7
+ data.tar.gz: 902decd1516986d31701c458f7236e3dc137f1cda1e067abe2b4f728e7f20e69b95b4a684ffbf6475cbf7e2464058a9b46405832a867a84e53102075ba8f0162
@@ -254,6 +254,17 @@ table.dataTable {
254
254
  display: none;
255
255
  position: absolute;
256
256
  min-width: 250px;
257
+ z-index: 1;
258
+
259
+ form {
260
+ min-width: 300px;
261
+ border: 1px solid blue;
262
+ border-radius: 0.5em;
263
+ padding: 0.5em;
264
+
265
+ background: #ccc;
266
+ display: inline-block;
267
+ }
257
268
  }
258
269
 
259
270
  /* E */
@@ -67,6 +67,7 @@
67
67
 
68
68
  .leads {
69
69
  .item {
70
+ display: inline;
70
71
  border: 1px solid green;
71
72
  // background: cyan;
72
73
  }
@@ -1,8 +1,4 @@
1
1
 
2
- .scheduled-email-actions--form {
3
- min-width: 300px;
4
- }
5
-
6
2
  .scheduled-emails-new {
7
3
  border: 1px solid red;
8
4
  border-radius: .5em;
@@ -24,16 +20,6 @@
24
20
  }
25
21
 
26
22
  .scheduled-email-actions--form {
27
-
28
- form {
29
- border: 1px solid blue;
30
- border-radius: 0.5em;
31
- padding: 0.5em;
32
-
33
- background: #ccc;
34
- display: inline-block;
35
- }
36
-
37
23
  .actions {
38
24
  display: flex;
39
25
  justify-content: flex-end;
@@ -43,5 +29,4 @@
43
29
  .flex-row {
44
30
  justify-content: space-between;
45
31
  }
46
-
47
32
  }
@@ -85,6 +85,7 @@ class IshManager::ApplicationController < ActionController::Base
85
85
  @email_campaigns_list = [[nil,nil]] + Ish::EmailCampaign.all.map { |c| [ c.slug, c.id ] }
86
86
  @email_actions_list = [[nil,nil]] + Office::EmailAction.all.map { |a| [ a.slug, a.id ] }
87
87
  @email_templates_list = [[nil,nil]] + Ish::EmailTemplate.all.map { |t| [ t.slug, t.id ] }
88
+ @email_tags_list = [[nil,nil]] + WpTag.email_tags.map { |t| [ t.name, t.id ] }
88
89
  @galleries_list = Gallery.all.list
89
90
  @leads_list = Lead.list
90
91
  @leadsets_list = Leadset.list
@@ -101,19 +102,27 @@ class IshManager::ApplicationController < ActionController::Base
101
102
  @page_title = "#{ params[:controller].gsub('ish_manager/', '') } #{params[:action]} #{params[:slug]||params[:id]} ".gsub(" ", " ")
102
103
  end
103
104
 
104
- # @TODO: obsolete, remove _vp_ 2022-10-15
105
- def update_profile_pic
106
- return unless params[:photo]
107
- @photo = Photo.new :photo => params[:photo]
108
- @photo.user_profile = @current_profile
109
- flag = @photo.save
110
- @resource.profile_photo = @photo
111
- flagg = @resource.save
112
- if flag && flagg
113
- flash[:notice] = 'Success'
114
- else
115
- flash[:alert] = "No Luck. #{@photo.errors.messages} #{@resource.errors.messages}"
116
- end
117
- end
118
105
 
119
106
  end
107
+
108
+
109
+
110
+
111
+
112
+
113
+
114
+ # ## @TODO: obsolete, remove _vp_ 2022-10-15
115
+ # def update_profile_pic
116
+ # return unless params[:photo]
117
+ # @photo = Photo.new :photo => params[:photo]
118
+ # @photo.user_profile = @current_profile
119
+ # flag = @photo.save
120
+ # @resource.profile_photo = @photo
121
+ # flagg = @resource.save
122
+ # if flag && flagg
123
+ # flash[:notice] = 'Success'
124
+ # else
125
+ # flash[:alert] = "No Luck. #{@photo.errors.messages} #{@resource.errors.messages}"
126
+ # end
127
+ # end
128
+
@@ -69,15 +69,15 @@ class ::IshManager::EmailContextsController < ::IshManager::ApplicationControlle
69
69
  authorize! :index, ::Ish::EmailContext
70
70
  @ctxs = ::Ish::EmailContext.all.page( params[:ctxs_page] ).per( current_profile.per_page )
71
71
 
72
- if my_truthy? params[:sent]
73
- @ctxs = @ctxs.where( :sent_at.ne => nil )
74
- else
75
- @ctxs = @ctxs.where( sent_at: nil )
76
- end
77
-
78
72
  if params[:lead_id]
79
73
  @lead = Lead.find params[:lead_id]
80
- @ctxs = @ctxs.where( to_email: @lead.email )
74
+ @ctxs = @ctxs.where( lead_id: @lead.id )
75
+ else
76
+ if my_truthy? params[:sent]
77
+ @ctxs = @ctxs.where( :sent_at.ne => nil )
78
+ else
79
+ @ctxs = @ctxs.where( sent_at: nil )
80
+ end
81
81
  end
82
82
  end
83
83
 
@@ -1,7 +1,7 @@
1
1
 
2
2
  class ::IshManager::EmailFiltersController < ::IshManager::ApplicationController
3
3
 
4
- # before_action :set_lists
4
+ before_action :set_lists
5
5
 
6
6
  # alphabetized : )
7
7
 
@@ -16,6 +16,18 @@ class ::IshManager::EmailFiltersController < ::IshManager::ApplicationController
16
16
  redirect_to action: 'index'
17
17
  end
18
18
 
19
+ def destroy
20
+ @email_filter = Office::EmailFilter.find params[:id]
21
+ authorize! :destroy, @email_filter
22
+ flag = @email_filter.destroy
23
+ if flag
24
+ flash[:notice] = 'Success'
25
+ else
26
+ flash[:alert] = 'Error'
27
+ end
28
+ redirect_to action: 'index'
29
+ end
30
+
19
31
  def edit
20
32
  @email_filter = Office::EmailFilter.find params[:id]
21
33
  authorize! :edit, @email_filter
@@ -34,8 +46,8 @@ class ::IshManager::EmailFiltersController < ::IshManager::ApplicationController
34
46
  def update
35
47
  @email_filter = Office::EmailFilter.find params[:id]
36
48
  authorize! :update, @email_filter
37
- @email_filter.update_attributes( params[:email_filter].permit! )
38
- if @email_filter.persisted?
49
+ flag = @email_filter.update_attributes( params[:email_filter].permit! )
50
+ if flag
39
51
  flash[:notice] = 'Success'
40
52
  else
41
53
  flash[:alert] = "No luck: #{@email_filter.errors.full_messages.join(', ')}."
@@ -3,15 +3,17 @@
3
3
 
4
4
  .header.collapse-expand-trash#emailContextsIndex
5
5
  %h2.title
6
- - if my_truthy? params[:sent]
7
- = link_to '[notsent]', email_contexts_path({ sent: false })
8
- <u>sent</u>
9
- - else
10
- <u>notsent</u>
11
- = link_to '[sent]', email_contexts_path({ sent: true })
6
+
12
7
  Email Contexts (#{@ctxs.length})
13
8
  - if @lead
14
- For lead `#{@lead.name}`
9
+ For lead #{@lead.email}
10
+ - else
11
+ - if my_truthy? params[:sent]
12
+ = link_to '[notsent]', email_contexts_path({ sent: false })
13
+ <u>sent</u>
14
+ - else
15
+ <u>notsent</u>
16
+ = link_to '[sent]', email_contexts_path({ sent: true })
15
17
  = link_to '[+]', new_email_context_path
16
18
 
17
19
 
@@ -16,8 +16,20 @@
16
16
 
17
17
  .leads.max-width
18
18
  Leads (#{@email_conversation.leads.length}):
19
- = @email_conversation.leads.map(&:id)
20
- -# .leadsC= render 'ish_manager/leads/index_rows', leads: @email_conversation.leads
19
+ - @email_conversation.leads.each do |lead|
20
+ .item
21
+ = link_to "#{lead.id} #{lead.email}", lead_path(lead)
22
+ \(ctxs:
23
+ = link_to email_contexts_for_lead_path( lead ) do
24
+ = lead.email_contexts.count
25
+ %i.fa.fa-envelope
26
+ .relative.inline-block
27
+ %i.fa.fa-plus.expand-next
28
+ .expand-hide= render 'ish_manager/email_contexts/form', ctx: Ctx.new({ lead_id: lead.id, email_template: Tmpl.blank })
29
+ \)
30
+ .relative.inline-block
31
+ %i.fa.fa-clock-o.expand-next{ style: "color: red;" }
32
+ .expand-hide= render 'ish_manager/scheduled_email_actions/form', scheduled_email_action: Sch.new({ lead_id: lead.id })
21
33
 
22
34
  .messages.max-width
23
35
  - @email_messages.each do |msg|
@@ -31,14 +43,7 @@
31
43
  = msg.id
32
44
  <b>To:</b> #{msg.to}
33
45
  <b>From:</b> #{lead.email}
34
- = link_to email_contexts_for_lead_path( lead ) do
35
- \(
36
- = lead.email_contexts.count
37
- %i.fa.fa-envelope
38
- \)
39
- .relative.inline-block
40
- %i.fa.fa-clock-o.expand-next{ style: "color: red;" }
41
- .expand-hide= render 'ish_manager/scheduled_email_actions/form', scheduled_email_action: Sch.new({ lead_id: lead.id })
46
+
42
47
 
43
48
  .datetime
44
49
  .date= msg.date&.strftime('%Y-%m-%d')
@@ -5,14 +5,33 @@
5
5
  .field
6
6
  %label From Regex
7
7
  = f.text_field :from_regex
8
+ .field
9
+ %label From Exact
10
+ = f.text_field :from_exact
8
11
  .field
9
12
  %label Subject Regex
10
13
  = f.text_field :subject_regex
11
14
  .field
12
- %label Body Regex
13
- = f.text_field :body_regex
15
+ %label Subject Exact
16
+ = f.text_field :subject_exact
17
+ -# .field
18
+ -# %label Body Regex
19
+ -# = f.text_field :body_regex
20
+ .field
21
+ %label Body Exact
22
+ = f.text_field :body_exact
23
+ %hr
14
24
  .field
15
25
  %label Kind
16
26
  = f.select :kind, options_for_select( ::Office::EmailFilter::KINDS, selected: email_filter.kind )
27
+ .field
28
+ %label Template
29
+ = f.select :email_template_id, options_for_select(@email_templates_list, selected: params[:email_template_id] || email_filter.email_template_id ), {}, { class: 'select2' }
30
+ .field
31
+ = f.label :email_action
32
+ = f.select :email_action, options_for_select( @email_actions_list, selected: email_filter.email_action_id ), {}, class: 'select2'
33
+ .field
34
+ = f.label :wp_term_id
35
+ = f.select :wp_term_id, options_for_select( @email_tags_list, selected: email_filter.wp_term_id ), {}, class: 'select2'
17
36
  .actions
18
37
  = f.submit
@@ -1,5 +1,5 @@
1
1
 
2
- .email-filters-index.max-width
2
+ .email-filters-index.padded
3
3
  .header
4
4
  %h2.title
5
5
  Email Filters (#{@email_filters.length})
@@ -10,17 +10,29 @@
10
10
  %th &nbsp;
11
11
  %th &nbsp;
12
12
  %th From Regex
13
+ %th From Exact
13
14
  %th Subject Regex
14
- %th Body Regex
15
+ %th Subject Exact
16
+ %th Body Exact
15
17
  %th Kind
18
+ %th Email Action
19
+ %th Email Template
20
+ %th Email Tag
16
21
  - @email_filters.each do |ef|
17
22
 
18
23
  %tr
19
24
  %td= check_box_tag 'checked'
20
- %td= link_to '[~]', edit_email_filter_path(ef)
25
+ %td
26
+ = link_to '[~]', edit_email_filter_path(ef)
27
+ .inline-block= button_to '[x]', email_filter_path(ef), method: :delete, data: { confirm: 'Are you sure?' }
21
28
  %td= ef.from_regex
29
+ %td= ef.from_exact
22
30
  %td= ef.subject_regex
23
- %td= ef.body_regex
31
+ %td= ef.subject_exact
32
+ %td= ef.body_exact
24
33
  %td= ef.kind
34
+ %td= ef.email_action&.slug
35
+ %td= ef.email_template&.slug
36
+ %td= ef.category&.name
25
37
 
26
38
 
@@ -22,8 +22,8 @@
22
22
  %ul
23
23
  - @ctxs.each do |ctx|
24
24
  %li
25
- = link_to ctx.subject, email_context_path(ctx)
26
- = pp_date ctx.sent_at
25
+ = pp_date( ctx.sent_at ) || 'not sent'
26
+ = link_to ctx.subject.presence||"No Subj?!", email_context_path(ctx)
27
27
  .col-md-6.schs
28
28
  %h5
29
29
  Scheduled actions (#{@schs.length})
@@ -18,7 +18,7 @@
18
18
  = f.select :email_action, options_for_select( @email_actions_list, selected: sch_a[:email_action_id] ), {}, class: 'select2'
19
19
  .flex-row
20
20
  = f.label :perform_at
21
- = f.text_field :perform_at
21
+ = f.text_field :perform_at, value: sch_a.new_record? ? Time.now : sch_a.perform_at
22
22
 
23
23
  .actions
24
24
  = submit_tag 'Schedule'
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.439
4
+ version: 0.1.8.441
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-18 00:00:00.000000000 Z
11
+ date: 2023-05-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails