ish_manager 0.1.8.424 → 0.1.8.426

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: f719990ed551e21801a3925e5769adfa6f578a24424f51df63af32cc7d3cc770
4
- data.tar.gz: 2c1d7378d0af53ab187ea9218a4bc3730cec919396a8d00847c12a5080c37344
3
+ metadata.gz: 873763e62f82d25aebc1ecee3361aae94eeae90b70ba2147836be99083f3ca6f
4
+ data.tar.gz: 10356d458981cc8287da48bc6314453cd3d871afeb911ccd8ab19f15002dd754
5
5
  SHA512:
6
- metadata.gz: b96471ab9c81af410f44c43a873f7557028a6863f23fc0dbd509c323164c080a2052ff4196c041e2161f022ef3a147b1157ae04896d31d57af7fdf7d819738e0
7
- data.tar.gz: 204884de41f385bac01412e08436cae28b906236a3fb76dce566366785e20577388046075975f4ff7bc68754817f3eafeea34dfa52ed8d9982eb14aa80bced7b
6
+ metadata.gz: 1b4a34dd8c6db5649dddcc0138530842771aa1ec1cd147b70ab10f30d93c96797c76b90d694b81ac1feb2ce9784425313b5805bce95d88cec02335975518bc94
7
+ data.tar.gz: 82bface07eb16718c492f93267e00acbdaa6440a6498026abb3ec31cb8ebcf54d03ca6040b00187b122af1271f0dbe7dd49dacf159fc903cc0ce1b4d59b261c9
@@ -3,16 +3,6 @@ class ::IshManager::EmailCampaignsController < IshManager::ApplicationController
3
3
 
4
4
  before_action :set_lists
5
5
 
6
- def index
7
- authorize! :index, Ish::EmailCampaign
8
- @campaigns = Ish::EmailCampaign.all
9
- end
10
-
11
- def new
12
- @campaign = Ish::EmailCampaign.new
13
- authorize! :new, @campaign
14
- end
15
-
16
6
  def create
17
7
  @campaign = Ish::EmailCampaign.new params[:campaign].permit!
18
8
  authorize! :create, @campaign
@@ -30,14 +20,24 @@ class ::IshManager::EmailCampaignsController < IshManager::ApplicationController
30
20
  @campaign.do_send
31
21
  end
32
22
 
33
- def show
23
+ def edit
34
24
  @campaign = Ish::EmailCampaign.find params[:id]
35
- authorize! :show, @campaign
25
+ authorize! :edit, @campaign
36
26
  end
37
27
 
38
- def edit
28
+ def index
29
+ authorize! :index, Ish::EmailCampaign
30
+ @campaigns = Ish::EmailCampaign.all
31
+ end
32
+
33
+ def new
34
+ @campaign = Ish::EmailCampaign.new
35
+ authorize! :new, @campaign
36
+ end
37
+
38
+ def show
39
39
  @campaign = Ish::EmailCampaign.find params[:id]
40
- authorize! :edit, @campaign
40
+ authorize! :show, @campaign
41
41
  end
42
42
 
43
43
  def update
@@ -67,8 +67,7 @@ class ::IshManager::EmailContextsController < ::IshManager::ApplicationControlle
67
67
 
68
68
  def index
69
69
  authorize! :index, ::Ish::EmailContext
70
- @ctxs = ::Ish::EmailContext.all.page( params[:ctxs_page] ).per( 100 )
71
-
70
+ @ctxs = ::Ish::EmailContext.all.page( params[:ctxs_page] ).per( current_profile.per_page )
72
71
 
73
72
  if my_truthy? params[:sent]
74
73
  @ctxs = @ctxs.where( :sent_at.ne => nil )
@@ -109,7 +108,6 @@ class ::IshManager::EmailContextsController < ::IshManager::ApplicationControlle
109
108
  render layout: false
110
109
  end
111
110
  end
112
-
113
111
  end
114
112
 
115
113
  def update
@@ -49,7 +49,7 @@ class ::IshManager::EmailTemplatesController < ::IshManager::ApplicationControll
49
49
 
50
50
  def index
51
51
  authorize! :index, Ish::EmailTemplate
52
- @templates = Ish::EmailTemplate.all.order_by( slug: :asc ).page( params[:templates_page] )
52
+ @templates = Ish::EmailTemplate.all.order_by( slug: :asc ).page( params[:templates_page] ).per( current_profile.per_page )
53
53
  end
54
54
 
55
55
  def new
@@ -1,9 +1,12 @@
1
1
 
2
+ ##
3
+ ## trash?! _vp_ 2023-05-10
4
+ ##
2
5
  class IshManager::ImageAssetsController < IshManager::ApplicationController
3
6
 
4
7
  def index
5
8
  authorize! :index, Ish::ImageAsset
6
- @image_assets = Ish::ImageAsset.all.order_by( created_at: :desc ).limit(10)
9
+ @image_assets = Ish::ImageAsset.all.order_by( created_at: :desc )
7
10
  end
8
11
 
9
12
  end
@@ -64,7 +64,11 @@ class ::IshManager::LeadsController < IshManager::ApplicationController
64
64
 
65
65
  def index
66
66
  authorize! :index, ::Lead
67
- @leads = ::Lead.kept.includes( :company ).page( params[:leads_page ] ).per( current_profile.per_page )
67
+ @leads = ::Lead.kept.includes( :company )
68
+ if params[:q].present?
69
+ @leads = @leads.where(" email LIKE ? ", "%#{params[:q]}%" )
70
+ end
71
+ @leads = @leads.page( params[:leads_page ] ).per( current_profile.per_page )
68
72
 
69
73
  @email_contexts = {}
70
74
  # lead_emails = @leads.map( &:email ).compact.reject(&:empty?)
@@ -33,7 +33,7 @@ class ::IshManager::LeadsetsController < IshManager::ApplicationController
33
33
 
34
34
  def index
35
35
  authorize! :index, Leadset
36
- @leadsets = Leadset.all.kept # where( :profile => @current_profile, :is_trash => false )
36
+ @leadsets = Leadset.all.kept.page( params[:leadsets_page] ).per( current_profile.per_page )
37
37
  end
38
38
 
39
39
  def new
@@ -24,7 +24,7 @@ class IshManager::ScheduledEmailActionsController < IshManager::ApplicationContr
24
24
 
25
25
  def index
26
26
  authorize! :scheduled_emails_index, ::IshManager
27
- @scheduled_email_actions = ::Office::ScheduledEmailAction.all
27
+ @schs = @scheduled_email_actions = ::Office::ScheduledEmailAction.all
28
28
  end
29
29
 
30
30
  def new
@@ -3,6 +3,33 @@ class IshManager::UserProfilesController < IshManager::ApplicationController
3
3
 
4
4
  before_action :set_lists
5
5
 
6
+ def create
7
+ @user = User.find_or_create_by( :email => params[:profile][:email] )
8
+ @user.password ||= (0...12).map { rand(100) }.join
9
+ @user_profile = Ish::UserProfile.new params[:profile].permit!
10
+ authorize! :create, @user_profile
11
+
12
+ if params[:photo]
13
+ photo = Photo.new :photo => params[:photo]
14
+ @user_profile.profile_photo = photo
15
+ end
16
+
17
+ if !@user.save
18
+ raise "cannot save profile.user: #{@user.errors.full_messages} profile errors: #{@user_profile.errors.full_messages}"
19
+ end
20
+ if @user_profile.save
21
+ flash[:notice] = "Created profile"
22
+ else
23
+ flash[:alert] = "Cannot create profile: #{@user_profile.errors.messages}"
24
+ end
25
+ redirect_to :action => :index
26
+ end
27
+
28
+ def edit
29
+ @profile = Ish::UserProfile.find params[:id]
30
+ authorize! :edit, @profile
31
+ end
32
+
6
33
  def index
7
34
  @user_profiles = Ish::UserProfile.all
8
35
  authorize! :index, Ish::UserProfile
@@ -11,14 +38,14 @@ class IshManager::UserProfilesController < IshManager::ApplicationController
11
38
  end
12
39
  end
13
40
 
14
- def show
15
- @profile = Ish::UserProfile.find params[:id]
16
- authorize! :show, @profile
41
+ def new
42
+ @profile = Ish::UserProfile.new
43
+ authorize! :new, @profile
17
44
  end
18
45
 
19
- def edit
46
+ def show
20
47
  @profile = Ish::UserProfile.find params[:id]
21
- authorize! :edit, @profile
48
+ authorize! :show, @profile
22
49
  end
23
50
 
24
51
  def update
@@ -44,32 +71,5 @@ class IshManager::UserProfilesController < IshManager::ApplicationController
44
71
  end
45
72
  end
46
73
 
47
- def new
48
- @profile = Ish::UserProfile.new
49
- authorize! :new, @profile
50
- end
51
-
52
- def create
53
- @user = User.find_or_create_by( :email => params[:profile][:email] )
54
- @user.password ||= (0...12).map { rand(100) }.join
55
- @user_profile = Ish::UserProfile.new params[:profile].permit!
56
- authorize! :create, @user_profile
57
-
58
- if params[:photo]
59
- photo = Photo.new :photo => params[:photo]
60
- @user_profile.profile_photo = photo
61
- end
62
-
63
- if !@user.save
64
- raise "cannot save profile.user: #{@user.errors.full_messages} profile errors: #{@user_profile.errors.full_messages}"
65
- end
66
- if @user_profile.save
67
- flash[:notice] = "Created profile"
68
- else
69
- flash[:alert] = "Cannot create profile: #{@user_profile.errors.messages}"
70
- end
71
- redirect_to :action => :index
72
- end
73
-
74
74
  end
75
75
 
@@ -79,6 +79,9 @@
79
79
 
80
80
  %li
81
81
  = link_to "Leads (#{Lead.kept.length})", leads_path
82
+ .inline-search
83
+ = form_tag leads_path, method: :get do
84
+ = text_field_tag :q
82
85
  = link_to '[+]', new_lead_path
83
86
  %li
84
87
  = link_to "Schs (#{Sch.active.length})", scheduled_email_actions_path
@@ -1,4 +1,6 @@
1
1
 
2
+ -# - path ||= "#{resource.name.downcase.pluralize}"
3
+ - path ||= resource
2
4
  .application--search
3
5
  = form_tag path, :method => :get, :class => :search do
4
6
  .field.search_words
@@ -1,22 +1,25 @@
1
1
 
2
- %h3.center.collapse-expand#emailTemplatesIndex
3
- Email Templates (#{Ish::EmailTemplate.all.count})
2
+ .email-templates--index.max-width
4
3
 
5
- .email-templates-index.max-width
6
- %table.bordered
7
- %tr
8
- %th
9
- %th Slug
10
- %th Created
11
- %th Updated
4
+ %h3.center.collapse-expand#emailTemplatesIndex
5
+ Email Templates (#{Ish::EmailTemplate.all.count})
12
6
 
13
- - @templates.each do |tmpl|
7
+ = paginate @templates, :param_name => :templates_page, :views_prefix => 'ish_manager'
8
+ .email-templates-index.max-width
9
+ %table.bordered
14
10
  %tr
15
- %td
16
- = link_to '[use]', new_email_context_path({ email_template_id: tmpl.id })
17
- = link_to '[~]', edit_email_template_path({ id: tmpl })
18
- = button_to '[x]', email_template_path({ id: tmpl }), method: :delete, :data => { :confirm => 'Are you sure?' }, form_class: 'inline'
19
- %td= link_to tmpl.slug, email_template_path({ id: tmpl })
20
- %td= pp_date tmpl.created_at
21
- %td= pp_date tmpl.updated_at
11
+ %th
12
+ %th Slug
13
+ %th Created
14
+ %th Updated
22
15
 
16
+ - @templates.each do |tmpl|
17
+ %tr
18
+ %td
19
+ = link_to '[use]', new_email_context_path({ email_template_id: tmpl.id })
20
+ = link_to '[~]', edit_email_template_path({ id: tmpl })
21
+ = button_to '[x]', email_template_path({ id: tmpl }), method: :delete, :data => { :confirm => 'Are you sure?' }, form_class: 'inline'
22
+ %td= link_to tmpl.slug, email_template_path({ id: tmpl })
23
+ %td= pp_date tmpl.created_at
24
+ %td= pp_date tmpl.updated_at
25
+ = paginate @templates, :param_name => :templates_page, :views_prefix => 'ish_manager'
@@ -5,13 +5,14 @@
5
5
  #{link_to 'Kept Leads', leads_path} (#{::Lead.kept.count}, #{::Lead.all.count})
6
6
  = link_to raw("<i class='fa fa-plus-square'></i>"), new_lead_path
7
7
 
8
- = paginate @leads, param_name: :leads_page
8
+ = render 'search', resource: ::Lead
9
9
  = form_tag leads_bulkop_path do
10
10
  = label_tag 'Act on Selected:'
11
11
  = select_tag :op, options_for_select( [[nil,nil]] + Lead::OPS )
12
12
  = select_tag :email_campaign_id, options_for_select( @email_campaigns_list )
13
13
  = submit_tag 'Go'
14
14
 
15
+ = paginate @leads, param_name: :leads_page
15
16
  %table.bordered
16
17
  %thead
17
18
  %tr
@@ -48,8 +49,8 @@
48
49
  -# %li
49
50
  -# = link_to sch_a.email_action.slug, edit_scheduled_email_action_path( sch_a )
50
51
  -# [x]
51
- .c
52
- = paginate @leads, param_name: :leads_page
52
+
53
+ = paginate @leads, param_name: :leads_page
53
54
 
54
55
 
55
56
 
@@ -13,6 +13,7 @@
13
13
  .n-selected -
14
14
  = button_tag 'Delete', method: :delete, class: 'delete-btn'
15
15
 
16
+ = paginate @leadsets, :param_name => :leadsets_page, :views_prefix => 'ish_manager'
16
17
  %table
17
18
  %thead
18
19
  %tr
@@ -76,5 +77,5 @@
76
77
  .chip
77
78
  .interval= sch.interval
78
79
  .tmpl= sch.email_template.slug
79
-
80
+ = paginate @leadsets, :param_name => :leadsets_page, :views_prefix => 'ish_manager'
80
81
 
@@ -3,21 +3,29 @@
3
3
  .header
4
4
  %h2
5
5
  Scheduled Email Actions
6
- -# (#{Sch.kept.count})
7
6
  (#{Sch.all.count})
8
7
  = link_to '[+]', new_scheduled_email_action_path
9
8
 
10
- .items
11
- - @scheduled_email_actions.each do |sch|
12
- .item.Card
13
- .flex-row
14
- .gray= sch.id
15
- = link_to '[~]', edit_scheduled_email_action_path(sch)
9
+ %table.bordered.data-table
10
+ %thead
11
+ %tr
12
+ %td
13
+ %td Active?
14
+ %td From
15
+ %td To
16
+ %td Tmpl
17
+ %td Perform at
18
+ %tbody
19
+ - @schs.each do |sch|
20
+ %tr
21
+ %td= link_to '[~]', edit_scheduled_email_action_path(sch)
22
+ %td= sch.state == 'active' ? 'Y' : '-'
23
+ %td= sch.email_action.email_template.from_email
24
+ %td= link_to sch.lead.email, lead_path(sch.lead)
25
+ %td= sch.email_action.email_template.slug
26
+ %td= sch.perform_at.in_time_zone
27
+
28
+
29
+
30
+
16
31
 
17
- %ul
18
- %li <b>EAct:</b> #{link_to sch.email_action.slug, edit_email_action_path(sch.email_action)}
19
- %li <b>Tmpl:</b> #{sch.email_action.email_template.slug}
20
- - if sch.lead_id
21
- %li <b>Lead:</b> #{link_to sch.lead.email, lead_path(sch.lead) }
22
- %li <b>State:</b> #{sch.state}
23
- %li <b>Perform at:</b> #{sch.perform_at.in_time_zone}
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.424
4
+ version: 0.1.8.426
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-27 00:00:00.000000000 Z
11
+ date: 2023-05-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -618,7 +618,6 @@ files:
618
618
  - app/views/ish_manager/galleries/_thumbs.haml
619
619
  - app/views/ish_manager/galleries/_title.haml
620
620
  - app/views/ish_manager/galleries/edit.haml
621
- - app/views/ish_manager/galleries/index_ajax.haml-trash
622
621
  - app/views/ish_manager/galleries/index_thumbs.haml
623
622
  - app/views/ish_manager/galleries/index_titles.haml
624
623
  - app/views/ish_manager/galleries/new.haml
@@ -1,9 +0,0 @@
1
-
2
- - content_for :title do
3
- Manager Galleries Index
4
-
5
- - content_for :menu do
6
- = render 'search'
7
-
8
- = render 'manager/galleries/menu_secondary'
9
-