ish_manager 0.1.8.362 → 0.1.8.364

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: 518ec08595116dd9e2af42564b776060b8caad35a8eb51d919df601a69fd961f
4
- data.tar.gz: 8c7c6e16de624d283c1ae883b1382c83b5bd33c2b8824ad98fce0ccbd2b59ad4
3
+ metadata.gz: 43b6fa2d41aaca42dc7181d68f72e49a5fc9a76d4327894d55d6d0156f141cff
4
+ data.tar.gz: ea82d9eaf2c0e36a905224f1ee9800b9cfedfc5d5d4e351e5a85390314b95d71
5
5
  SHA512:
6
- metadata.gz: 197844a71ef072f0b2fb1e36556f724418a10cd8c2e88acb6903deca03d0ad5f454b59e1221d1c1e6b75d961c00995facdfce712b65be0bf848f1030477bf45b
7
- data.tar.gz: f7fd2550302b9161d4dfd1d774aec1aba08f0d441e4f45ec726ce6ab22c819a01b001fd3c55777426da4ef350b588d3e6f9fa3760c46439c292e03c33e41b0cd
6
+ metadata.gz: c90b40886b5eb082a6f52f33a289f2f36d177a2a8c718b905dccb95d770fea1e4ace19266af55cb886bd9d6412f6a9850a85856ee1962e77d4a99f8b6507034e
7
+ data.tar.gz: cbafecbe93220b787d6d28156992273f417fac83d1007e45fb0636bce92784f72c5909ef817faa9508703323feeb41eab98f2ad896cc2f5e333ccd89e462d325
@@ -22,6 +22,7 @@
22
22
  //= require_self
23
23
  //= require ish_manager/maps
24
24
  //= require ish_manager/email_contexts
25
+ //= require ish_manager/email_conversations
25
26
  //= require ish_manager/email_templates
26
27
  //= require ish_manager/galleries
27
28
 
@@ -171,37 +172,6 @@ $(function () {
171
172
  $( $(".n-selected")[0] ).html( $("input[type='checkbox'].i-sel:checked").length )
172
173
  })
173
174
 
174
- //
175
- // email conversations
176
- //
177
- $("body.email_conversations-show a.preview").click(function(e) {
178
- // logg(e, 'clicked')
179
-
180
- if ($(this).data('expanded')) {
181
- $(this).parent().find(".expand").html('')
182
- $(this).parent().find(".my-actions").addClass('hide')
183
- $(this).data('expanded', false)
184
- return
185
- }
186
-
187
- const action_path = "/api/email_messages/" + $(this).data('id')
188
-
189
- $.ajax({
190
- url: action_path,
191
- type: 'GET',
192
- data: {
193
- jwt_token: localStorage.getItem('jwt_token'),
194
- },
195
- success: e => {
196
- $(this).parent().find(".expand").html(e.item.part_html)
197
- $(this).parent().find(".my-actions").removeClass('hide')
198
- $(this).data('expanded', true)
199
- },
200
- error: e => {
201
- logg((e||{}).responseText, 'cannot get email_message')
202
- },
203
- })
204
- })
205
175
 
206
176
  });
207
177
 
@@ -0,0 +1,19 @@
1
+
2
+ $(document).ready(() => {
3
+
4
+ $("body.email_conversations-show a.preview").click(function(e) {
5
+ // logg(e, 'clicked')
6
+
7
+ if ($(this).data('expanded')) {
8
+ $(this).data('expanded', false)
9
+ $(this).parent().find(".my-actions").addClass('hide')
10
+ $(this).parent().find("iframe").css('display', 'none')
11
+ } else {
12
+ $(this).data('expanded', true)
13
+ $(this).parent().find(".my-actions").removeClass('hide')
14
+ $(this).parent().find("iframe").css('display', 'block')
15
+ }
16
+
17
+ })
18
+
19
+ })
@@ -184,6 +184,7 @@ table.dataTable {
184
184
  padding: .8em;
185
185
  }
186
186
 
187
+
187
188
  /* F */
188
189
 
189
190
  .flex-row {
@@ -216,6 +217,10 @@ table.dataTable {
216
217
  .hide, .hidden {
217
218
  display: none !important;
218
219
  }
220
+ .hide-expand {
221
+ display: none;
222
+ position: absolute;
223
+ }
219
224
 
220
225
  /* I */
221
226
  img.img-400 {
@@ -103,6 +103,18 @@
103
103
  display: flex;
104
104
  justify-content: space-between;
105
105
  }
106
+
107
+ .row-2 {
108
+ iframe {
109
+ border: 2px solid yellow;
110
+
111
+ width: 100%;
112
+ min-height: 500px;
113
+ height: 80vh;
114
+ display: none;
115
+ }
116
+ }
117
+
106
118
  }
107
119
  }
108
120
 
@@ -1,4 +1,10 @@
1
1
 
2
+ .scheduled-email-actions--form {
3
+ display: none;
4
+ position: absolute;
5
+ min-width: 250px;
6
+ }
7
+
2
8
  .scheduled-emails-new {
3
9
 
4
10
 
@@ -79,8 +79,7 @@ class ::IshManager::EmailContextsController < ::IshManager::ApplicationControlle
79
79
 
80
80
  def new
81
81
  authorize! :new, ::Ish::EmailContext
82
- @template = Ish::EmailTemplate.where( slug: params[:template_slug] ).first
83
- @template ||= Ish::EmailTemplate.where( id: params[:template_slug] ).first
82
+ @tmpl = @email_template = Ish::EmailTemplate.where( slug: params[:template_slug] ).first || Ish::EmailTemplate.where( id: params[:template_slug] ).first
84
83
  attrs = {}
85
84
  if @template
86
85
  attrs = @template.attributes.slice( :subject, :body, :from_email )
@@ -7,7 +7,7 @@ class ::IshManager::EmailConversationsController < IshManager::ApplicationContro
7
7
 
8
8
  def index
9
9
  authorize! :email_conversations_index, IshManager::Ability
10
- @email_conversations = ::Office::EmailConversation.all.order_by( latest_date: :desc )
10
+ @email_conversations = ::Office::EmailConversation.all.order_by( latest_at: :desc )
11
11
  end
12
12
 
13
13
  def show
@@ -1,18 +1,17 @@
1
1
 
2
- - if notice || alert
3
- .row
4
- .col-sm-12
5
- - if notice
6
- - if notice.class == Array
7
- %ul.notice
8
- - notice.map do |n|
9
- %li= n
10
- - else
11
- %p.notice= notice
12
- - if alert
13
- - if alert.class == Array
14
- %ul.alert
15
- - alert.map do |n|
16
- %li= n
17
- - else
18
- %p.alert= alert
2
+ .row
3
+ .col-sm-12
4
+ - if notice
5
+ - if notice.class == Array
6
+ %ul.notice
7
+ - notice.map do |n|
8
+ %li= n
9
+ - else
10
+ %p.notice= notice
11
+ - if alert
12
+ - if alert.class == Array
13
+ %ul.alert
14
+ - alert.map do |n|
15
+ %li= n
16
+ - else
17
+ %p.alert= alert
@@ -5,6 +5,4 @@
5
5
  %ul.browser-default
6
6
  %li= params.inspect
7
7
  %li Cached? #{Rails.application.config.action_controller.perform_caching} :: Cache key: #{@cache_key.inspect}
8
- -# %li Layout: #{current_layout}
9
8
  %li= "Env: #{Rails.env}"
10
- %li JWT: #{@jwt_token}
@@ -1,4 +1,6 @@
1
1
 
2
+ #Config{ data: { jwt_token: @jwt_token } }
3
+
2
4
  .manager--main-footer
3
5
  .container
4
6
 
@@ -12,8 +12,9 @@
12
12
  .field.field-template
13
13
  = f.label "Template"
14
14
  = f.select :email_template_id, options_for_select(@email_templates_list, selected: params[:email_template_id] || ctx.email_template_id ), {}, { class: 'select2' }
15
- = link_to 'view', email_template_path( ctx.email_template_id ), target: :_blank, class: [ 'action-view' ]
16
- = link_to '~', edit_email_template_path( ctx.email_template_id ), target: :_blank, class: [ 'action-view' ]
15
+ - if ctx.email_template_id
16
+ = link_to 'view', email_template_path( ctx.email_template_id ), target: :_blank, class: [ 'action-view' ]
17
+ = link_to '~', edit_email_template_path( ctx.email_template_id ), target: :_blank, class: [ 'action-view' ]
17
18
  -# .field
18
19
  -# = f.label :slug
19
20
  -# = f.text_field :slug
@@ -1,3 +1,3 @@
1
1
 
2
2
  .email-contexts-new
3
- = render 'ish_manager/email_contexts/form', template: @template, email_ctx: @email_ctx
3
+ = render 'ish_manager/email_contexts/form', ctx: @ctx
@@ -22,15 +22,15 @@
22
22
 
23
23
 
24
24
  .messages.max-width
25
- - @email_messages.each do |m|
26
- - lead = m.lead || Lead.new(email: 'NO LEAD!', id: 'no lead')
25
+ - @email_messages.each do |msg|
26
+ - lead = msg.lead || Lead.new(email: 'NO LEAD!', id: 'no lead')
27
27
 
28
28
  .item
29
29
  .row-1
30
- .gray= m.id
30
+ .gray= msg.id
31
31
 
32
32
  .chip.from
33
- -# = m.from
33
+ -# = msg.from
34
34
  = lead.email
35
35
 
36
36
  .relative
@@ -45,13 +45,14 @@
45
45
  = render 'ish_manager/scheduled_email_actions/form', scheduled_email_action: Sch.new({ lead_id: lead.id })
46
46
 
47
47
  .datetime
48
- .date= m.date&.strftime('%Y-%m-%d')
49
- .time= m.date&.strftime('%l:%M%P')
48
+ .date= msg.date&.strftime('%Y-%m-%d')
49
+ .time= msg.date&.strftime('%l:%M%P')
50
50
 
51
51
  .row-2
52
- %a.preview{ href: "javascript: void(0)", data: { id: m.id.to_s } }
53
- = (ActionView::Base.full_sanitizer.sanitize( m.part_html )||'<no-info>')[0..300]
54
- .expand
52
+
53
+ - link_label = (ActionView::Base.full_sanitizer.sanitize( msg.part_html )||'<no-info>')[0..200]
54
+ = link_to link_label, ishapi.email_message_path(msg, jwt_token: @jwt_token ), target: msg.message_id, class: 'preview'
55
+ %iframe{ name: msg.message_id }
55
56
 
56
57
  .my-actions.hide
57
58
  = render 'ish_manager/email_templates/form_reply_2_mini'
@@ -6,21 +6,21 @@
6
6
  - sch_a = scheduled_email_action
7
7
  - url = sch_a.new_record? ? scheduled_email_actions_path : scheduled_email_action_path(sch_a.id)
8
8
 
9
+ .scheduled-email-actions--form
10
+ = form_for scheduled_email_action, url: url, html: { class: "form-mini" } do |f|
11
+ .header
12
+ %h5.title Schedule an email action
9
13
 
10
- = form_for scheduled_email_action, url: url, html: { class: "form-mini" } do |f|
11
- .header
12
- %h5.title Schedule an email action
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'
17
+ .field
18
+ %label State
19
+ = f.select :state, options_for_select(::Office::ScheduledEmailAction::STATES, selected: sch_a.state ), class: 'select2'
20
+ %br
21
+ .field
22
+ %label Email Action
23
+ = select_tag :email_action_id, options_for_select( @email_actions_list, selected: sch_a[:email_action_id] ), class: 'select2'
13
24
 
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'
17
- .field
18
- %label State
19
- = f.select :state, options_for_select(::Office::ScheduledEmailAction::STATES, selected: sch_a.state ), class: 'select2'
20
- %br
21
- .field
22
- %label Email Action
23
- = select_tag :email_action_id, options_for_select( @email_actions_list, selected: sch_a[:email_action_id] ), class: 'select2'
24
-
25
- .actions
26
- = submit_tag 'Schedule'
25
+ .actions
26
+ = submit_tag 'Schedule'
@@ -38,24 +38,9 @@
38
38
  .bg-white
39
39
  = render :partial => "ish_manager/application/main_header_#{@current_profile.role_name}"
40
40
  .container.W0
41
- - if notice || alert
42
- .row
43
- .col-sm-12
44
- - if notice
45
- - if notice.class == Array
46
- %ul.notice
47
- - notice.map do |n|
48
- %li= n
49
- - else
50
- %p.notice= notice
51
- - if alert
52
- - if alert.class == Array
53
- %ul.alert
54
- - alert.map do |n|
55
- %li= n
56
- - else
57
- %p.alert= alert
41
+ = render 'alerts_notices' if notice || alert
58
42
  = yield
43
+
59
44
  = render 'ish_manager/application/main_footer'
60
45
  = render 'analytics' if Rails.env.production?
61
46
 
@@ -37,7 +37,7 @@
37
37
  %body{ class: [ params[:controller].gsub("ish_manager/",""), "#{params[:controller].gsub("ish_manager/","")}-#{params[:action]}", params[:action], "application-fullwidth" ] }
38
38
 
39
39
  = render :partial => "ish_manager/application/main_header_#{@current_profile.role_name}"
40
- = render 'alerts_notices'
40
+ = render 'alerts_notices' if notice || alert
41
41
  = yield
42
42
  = render 'ish_manager/application/main_footer'
43
43
  = render 'analytics' if Rails.env.production?
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.362
4
+ version: 0.1.8.364
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-10 00:00:00.000000000 Z
11
+ date: 2023-03-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -234,6 +234,7 @@ files:
234
234
  - app/assets/images/wait.gif
235
235
  - app/assets/javascripts/ish_manager/application.js
236
236
  - app/assets/javascripts/ish_manager/email_contexts.js
237
+ - app/assets/javascripts/ish_manager/email_conversations.js
237
238
  - app/assets/javascripts/ish_manager/email_templates.js
238
239
  - app/assets/javascripts/ish_manager/galleries.js
239
240
  - app/assets/javascripts/ish_manager/maps.js