wco_email 0.1.1.73 → 0.1.1.75

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: 126de881448d4a9f4f776b68c39afa8676637b654752390b502f1bb89ed6a30b
4
- data.tar.gz: 7264f72eb0bde6a68faed340e3eeb1ac4179d27dbd2e2cfc03ebde2e9b10bb17
3
+ metadata.gz: 1e5810186275a7a37d06ac7b2c65d996f3b3414ba2077b4783e29920975aa0b0
4
+ data.tar.gz: 450fe77b6c9eb93c3d82ab53f2408c4e67c56912fb17bddd129afca79e2624c6
5
5
  SHA512:
6
- metadata.gz: 7a18ddfdd69412bac0a35cb7bfae4016d5ab955931329ecab4b22f0b7e1258d2c9119c755be6bf078fd775d2e6341c194767a6e2050eaf5e8939c4dee9006d92
7
- data.tar.gz: 2e389076abd1dd1c3f01d7afb13764740817e41495ec66f5d3de0dc7a005e44ce9475411b9b6890958a4ae16ad3e34d4b5e73183564e1ed9fa738c260248b057
6
+ metadata.gz: 635a3779ea7913a42509d88f16e7f37970ecc89dfee34c2856bbebc803cc4d83ab5f3178dca47488e048c10c5ef9731f527feccd171a4cb46ec422a662768cda
7
+ data.tar.gz: c9f9d98d9dcf9d109ed5b8d762691430740901a2fed62871452471d4c87874d66bfc87e7f4ea26275716db5c0d06ad447fc79b4ffca842e9263134fdf7a82a23
@@ -68,6 +68,42 @@ $(".add-tag-btn").click(function(e) {
68
68
 
69
69
  })
70
70
 
71
+
72
+ $(".office-action-templates-perform-btn").click(function(e) {
73
+ if ( !confirm('Are you sure?') ) { return; }
74
+
75
+ const jwt_token = $("#Config").data('jwt-token')
76
+ const action_path = $(this).data('url')
77
+ const oat_id = $("select[name='office_action_template']").val()
78
+ const out = []
79
+
80
+ $( $("input[type='checkbox'].i-sel:checked") ).each( idx => {
81
+ let val = $($("input[type='checkbox'].i-sel:checked")[idx]).val()
82
+ out.push(val)
83
+ })
84
+
85
+ let data = {
86
+ conversation_ids: out,
87
+ jwt_token: jwt_token,
88
+ id: oat_id,
89
+ }
90
+ $.ajax({
91
+ url: action_path,
92
+ type: 'POST',
93
+ data: data,
94
+ success: e => {
95
+ logg((e||{}).responseText, 'Ok')
96
+ location.reload()
97
+ },
98
+ error: e => {
99
+ logg((e||{}).responseText, 'Err')
100
+ location.reload()
101
+ },
102
+ })
103
+
104
+ })
105
+
106
+
71
107
  $(".remove-tag-btn").click(function(e) {
72
108
  if ( !confirm('Are you sure?') ) { return; }
73
109
 
@@ -4,8 +4,13 @@
4
4
  **/
5
5
 
6
6
  .application--sidebar {
7
+ // border-right: 1px solid red;
7
8
  min-width: 200px;
8
- border-right: 1px solid red;
9
+
10
+ }
11
+
12
+ .btn {
13
+ border: 2px solid gray;
9
14
  }
10
15
 
11
16
  iframe.email-template-iframe {
@@ -18,3 +18,13 @@ th.select-all {
18
18
  th.tags {
19
19
  width: 200px;
20
20
  }
21
+
22
+ .conversations--tags-actions {
23
+ display: flex;
24
+ align-items: baseline;
25
+
26
+ h5 {
27
+ font-size: 1em;
28
+ padding-right: 0.5em;
29
+ }
30
+ }
@@ -5,7 +5,7 @@ class WcoEmail::ApiController < ActionController::Base
5
5
  skip_before_action :verify_authenticity_token
6
6
 
7
7
  def create_email_message
8
- puts! params, 'params'
8
+ # puts! params, 'params'
9
9
 
10
10
  stub = WcoEmail::MessageStub.find_or_create_by({
11
11
  bucket: params[:bucket],
@@ -1,4 +1,6 @@
1
1
 
2
+ Wco::Obf ||= Wco::ObfuscatedRedirect
3
+
2
4
  class WcoEmail::ApplicationController < Wco::ApplicationController
3
5
 
4
6
  layout 'wco_email/application'
@@ -152,9 +152,10 @@ class WcoEmail::ConversationsController < WcoEmail::ApplicationController
152
152
  end
153
153
 
154
154
  def set_lists
155
- @tags = Wco::Tag.all
156
155
  @email_templates_list = [ [nil, nil] ] + WcoEmail::EmailTemplate.all.map { |tmpl| [ tmpl.slug, tmpl.id ] }
157
156
  @leads_list = Wco::Lead.list
157
+ @office_action_templates_list = Wco::OfficeActionTemplate.list
158
+ @tags = Wco::Tag.all
158
159
  @tags_list = Wco::Tag.list
159
160
  end
160
161
 
@@ -96,8 +96,10 @@ class WcoEmail::EmailTemplatesController < WcoEmail::ApplicationController
96
96
  lead: Wco::Lead.find_by({ email: 'poxlovi@gmail.com' }),
97
97
  })
98
98
 
99
+ eval( @tmpl.config_exe )
99
100
  @renderer = WcoEmail::ApplicationMailer.renderer ctx: @ctx
100
101
 
102
+
101
103
  render layout: false
102
104
  end
103
105
 
@@ -4,8 +4,20 @@ class WcoEmail::MessageStubsController < WcoEmail::ApplicationController
4
4
  def churn
5
5
  @stub = WcoEmail::MessageStub.find params[:id]
6
6
  authorize! :churn, @stub
7
- WcoEmail::MessageIntakeJob.perform_async( @stub.id.to_s )
8
- flash_notice "Schedueld to churn 1 stub."
7
+
8
+ # WcoEmail::MessageIntakeJob.perform_async( @stub.id.to_s )
9
+ begin
10
+ @stub.do_process
11
+ rescue => err
12
+ @stub.update({ status: WcoEmail::MessageStub::STATUS_FAILED })
13
+ puts! err, "WcoEmail::MessageIntakeJob error"
14
+ ::ExceptionNotifier.notify_exception(
15
+ err,
16
+ data: { stub: @stub }
17
+ )
18
+ end
19
+
20
+ flash_notice "Churned 1 stub."
9
21
  redirect_to request.referrer
10
22
  end
11
23
 
@@ -17,9 +17,11 @@
17
17
  %li= render '/wco/unsubscribes/header'
18
18
 
19
19
 
20
+
20
21
  %ul
21
22
  %li= render '/wco_email/email_action_templates/header'
22
23
  %li= render '/wco_email/email_actions/header'
24
+ %li= render '/wco/obfuscated_redirects/header'
23
25
 
24
26
  -# %li= render '/wco_email/lead_action_templates/header'
25
27
  -# %li= render '/wco_email/lead_actions/header'
@@ -1,6 +1,7 @@
1
1
 
2
2
 
3
- .bordered.inline-block.mb-2
3
+ .conversations--tags-actions.bordered.inline-block.mb-2
4
+ %h5 Add/Remove Tag
4
5
  .d-inline-block
5
6
  = select_tag :emailtag, options_for_select(@tags_list), class: 'select2'
6
7
  = check_box_tag :is_move
@@ -3,6 +3,8 @@
3
3
  = render 'wco_email/sidebar'
4
4
 
5
5
  .conversations-index
6
+ = render '/wco_email/conversations/search'
7
+
6
8
  .header
7
9
  %h5.title
8
10
  - if @tag
@@ -10,8 +12,9 @@
10
12
  - if @tag_not
11
13
  Tag-not `#{@tag_not}`
12
14
  (#{@conversations.length})
13
- = render '/wco_email/conversations/search'
14
- = render '/wco_email/conversations/actions'
15
+
16
+ = render '/wco_email/conversations/tags_actions'
17
+ = render '/wco/office_actions/actions'
15
18
 
16
19
  = render '/wco/paginate', resource: @conversations, param_name: :conv_page
17
20
  = render '/wco_email/conversations/table', convs: @conversations
@@ -12,15 +12,12 @@
12
12
  %span.gray.mini= @conversation.id
13
13
 
14
14
  = render '/wco/tags/index_chips', tags: @conversation.tags
15
-
16
- = render '/wco_email/conversations/actions'
17
-
18
- .Leads.mb-2
19
- .d-inline <b>Leads:</b>
20
- - @conversation.leads.each do |lead|
21
- .Chip= link_to lead.email, wco.lead_path( lead )
15
+ = render '/wco_email/conversations/tags_actions'
16
+ = render '/wco/leads/index_chips', leads: @conversation.leads
17
+ = render '/wco/leadsets/index_chips', leadsets: @conversation.leadsets
22
18
 
23
19
  - if @other_convs.present?
20
+ %h5 Other convs:
24
21
  - @other_convs.each do |conv|
25
22
  .d-flex
26
23
  = button_to "Merge", merge_conversations_path( @conversation, conv ), data: { confirm: 'Are you sure?' }
@@ -3,7 +3,7 @@
3
3
  .header
4
4
  %h2
5
5
  Email Actions
6
- (#{WcoEmail::EmailAction.all.length})
6
+ (#{@email_actions.length})
7
7
  = link_to '[+]', new_email_action_path
8
8
 
9
9
  %table.bordered.data-table
@@ -14,12 +14,12 @@
14
14
  .field.field-subject
15
15
  = f.label :subject
16
16
  = f.text_field :subject
17
+ %label mangle_subject
18
+ = f.check_box :mangle_subject
17
19
  .field
18
20
  = f.label :preview_str
19
21
  = f.text_field :preview_str
20
- .field
21
- %label mangle_subject
22
- = f.check_box :mangle_subject
22
+
23
23
 
24
24
  -# .field
25
25
  -# = f.label :can_unsubscribe
@@ -0,0 +1,184 @@
1
+
2
+ <table border="0" cellpadding="0" cellspacing="0" width="100%" class="mcnFollowBlock" style="min-width:100%;">
3
+ <tbody class="mcnFollowBlockOuter">
4
+ <tr>
5
+ <td align="center" valign="top" style="padding:9px" class="mcnFollowBlockInner">
6
+
7
+ <table border="0" cellpadding="0" cellspacing="0" width="100%" class="mcnFollowContentContainer" style="min-width:100%;">
8
+ <tbody>
9
+ <tr>
10
+ <td align="center" style="padding-left:9px;padding-right:9px;">
11
+
12
+ <table border="0" cellpadding="0" cellspacing="0" width="100%" style="min-width:100%;" class="mcnFollowContent">
13
+ <tbody>
14
+ <tr>
15
+ <td align="center" valign="top" style="padding-top:9px; padding-right:9px; padding-left:9px;">
16
+
17
+ <table align="center" border="0" cellpadding="0" cellspacing="0">
18
+ <tbody>
19
+ <tr>
20
+ <td align="center" valign="top">
21
+ <!--[if mso]>
22
+ <table align="center" border="0" cellspacing="0" cellpadding="0">
23
+ <tr>
24
+ <![endif]-->
25
+
26
+ <!--[if mso]>
27
+ <td align="center" valign="top">
28
+ <![endif]-->
29
+
30
+
31
+ <table align="left" border="0" cellpadding="0" cellspacing="0" style="display:inline;">
32
+ <tbody>
33
+ <tr>
34
+ <td valign="top" style="padding-right:10px; padding-bottom:9px;"
35
+ class="mcnFollowContentItemContainer">
36
+ <table border="0" cellpadding="0" cellspacing="0" width="100%"
37
+ class="mcnFollowContentItem">
38
+ <tbody>
39
+ <tr>
40
+ <td align="left" valign="middle"
41
+ style="padding-top:5px; padding-right:10px; padding-bottom:5px; padding-left:9px;">
42
+ <table align="left" border="0" cellpadding="0" cellspacing="0" width="">
43
+ <tbody>
44
+ <tr>
45
+
46
+ <td align="center" valign="middle" width="24"
47
+ class="mcnFollowIconContent">
48
+ <a href="mailto:victor@wasya.co" target="_blank"><img
49
+ src="https://cdn-images.mailchimp.com/icons/social-block-v2/color-forwardtofriend-48.png"
50
+ alt="Email" style="display:block;" height="24" width="24"
51
+ class=""></a>
52
+ </td>
53
+
54
+
55
+ </tr>
56
+ </tbody>
57
+ </table>
58
+ </td>
59
+ </tr>
60
+ </tbody>
61
+ </table>
62
+ </td>
63
+ </tr>
64
+ </tbody>
65
+ </table>
66
+
67
+ <!--[if mso]>
68
+ </td>
69
+ <![endif]-->
70
+
71
+ <!--[if mso]>
72
+ <td align="center" valign="top">
73
+ <![endif]-->
74
+
75
+
76
+ <table align="left" border="0" cellpadding="0" cellspacing="0" style="display:inline;">
77
+ <tbody>
78
+ <tr>
79
+ <td valign="top" style="padding-right:10px; padding-bottom:9px;"
80
+ class="mcnFollowContentItemContainer">
81
+ <table border="0" cellpadding="0" cellspacing="0" width="100%"
82
+ class="mcnFollowContentItem">
83
+ <tbody>
84
+ <tr>
85
+ <td align="left" valign="middle"
86
+ style="padding-top:5px; padding-right:10px; padding-bottom:5px; padding-left:9px;">
87
+ <table align="left" border="0" cellpadding="0" cellspacing="0" width="">
88
+ <tbody>
89
+ <tr>
90
+
91
+ <td align="center" valign="middle" width="24"
92
+ class="mcnFollowIconContent">
93
+ <a href="https://github.com/wasya-co" target="_blank"><img
94
+ src="https://cdn-images.mailchimp.com/icons/social-block-v2/color-github-48.png"
95
+ alt="Github" style="display:block;" height="24" width="24"
96
+ class=""></a>
97
+ </td>
98
+
99
+
100
+ </tr>
101
+ </tbody>
102
+ </table>
103
+ </td>
104
+ </tr>
105
+ </tbody>
106
+ </table>
107
+ </td>
108
+ </tr>
109
+ </tbody>
110
+ </table>
111
+
112
+ <!--[if mso]>
113
+ </td>
114
+ <![endif]-->
115
+
116
+ <!--[if mso]>
117
+ <td align="center" valign="top">
118
+ <![endif]-->
119
+
120
+
121
+ <table align="left" border="0" cellpadding="0" cellspacing="0" style="display:inline;">
122
+ <tbody>
123
+ <tr>
124
+ <td valign="top" style="padding-right:0; padding-bottom:9px;"
125
+ class="mcnFollowContentItemContainer">
126
+ <table border="0" cellpadding="0" cellspacing="0" width="100%"
127
+ class="mcnFollowContentItem">
128
+ <tbody>
129
+ <tr>
130
+ <td align="left" valign="middle"
131
+ style="padding-top:5px; padding-right:10px; padding-bottom:5px; padding-left:9px;">
132
+ <table align="left" border="0" cellpadding="0" cellspacing="0" width="">
133
+ <tbody>
134
+ <tr>
135
+
136
+ <td align="center" valign="middle" width="24"
137
+ class="mcnFollowIconContent">
138
+ <a href="https://www.instagram.com/wasya_co/"
139
+ target="_blank"><img
140
+ src="https://cdn-images.mailchimp.com/icons/social-block-v2/color-instagram-48.png"
141
+ alt="Instagram" style="display:block;" height="24"
142
+ width="24" class=""></a>
143
+ </td>
144
+
145
+
146
+ </tr>
147
+ </tbody>
148
+ </table>
149
+ </td>
150
+ </tr>
151
+ </tbody>
152
+ </table>
153
+ </td>
154
+ </tr>
155
+ </tbody>
156
+ </table>
157
+
158
+ <!--[if mso]>
159
+ </td>
160
+ <![endif]-->
161
+
162
+ <!--[if mso]>
163
+ </tr>
164
+ </table>
165
+ <![endif]-->
166
+ </td>
167
+ </tr>
168
+ </tbody>
169
+ </table>
170
+
171
+ </td>
172
+ </tr>
173
+ </tbody>
174
+ </table>
175
+
176
+ </td>
177
+ </tr>
178
+ </tbody>
179
+ </table>
180
+
181
+ </td>
182
+ </tr>
183
+ </tbody>
184
+ </table>
@@ -0,0 +1,91 @@
1
+
2
+ <% # @ctx.config.to_link %>
3
+ <% # @ctx.config.to_label %>
4
+
5
+ <table border="0" cellpadding="0" cellspacing="0" width="100%" class="mcnFollowBlock" style="min-width:100%;">
6
+ <tbody class="mcnFollowBlockOuter">
7
+ <tr>
8
+ <td align="center" valign="top" style="padding:9px" class="mcnFollowBlockInner">
9
+
10
+ <table border="0" cellpadding="0" cellspacing="0" width="100%" class="mcnFollowContentContainer" style="min-width:100%;">
11
+ <tbody>
12
+ <tr>
13
+ <td align="center" style="padding-left:9px;padding-right:9px;">
14
+
15
+ <table border="0" cellpadding="0" cellspacing="0" width="100%" style="min-width:100%;" class="mcnFollowContent">
16
+ <tbody>
17
+ <tr>
18
+ <td align="center" valign="top" style="padding-top:9px; padding-right:9px; padding-left:9px;">
19
+
20
+ <table align="center" border="0" cellpadding="0" cellspacing="0">
21
+ <tbody>
22
+ <tr>
23
+ <td align="center" valign="top">
24
+ <!--[if mso]>
25
+ <table align="center" border="0" cellspacing="0" cellpadding="0">
26
+ <tr>
27
+ <![endif]-->
28
+
29
+ <!--[if mso]>
30
+ <td align="center" valign="top">
31
+ <![endif]-->
32
+
33
+
34
+ <table align="left" border="0" cellpadding="0" cellspacing="0" style="display:inline;">
35
+ <tbody>
36
+ <tr>
37
+ <td valign="top" style="padding-right:10px; padding-bottom:9px;" class="mcnFollowContentItemContainer">
38
+
39
+ <table border="0" cellpadding="0" cellspacing="0" width="100%" class="mcnFollowContentItem" style=" border-radius: 0.5em; background: #669; ">
40
+ <tbody>
41
+ <tr>
42
+ <td align="left" valign="middle" style="padding-top:5px; padding-right:10px; padding-bottom:5px; padding-left:9px;">
43
+
44
+ <table align="left" border="0" cellpadding="0" cellspacing="0" width="" >
45
+ <tbody>
46
+ <tr>
47
+ <td align="center" valign="middle" width="24" class="mcnFollowIconContent">
48
+ <a href="<%= @ctx.config.to_link || 'https://wasya.co' %>" target="_blank" style="color: white; text-decoration: none;"
49
+ ><%= @ctx.config.to_label || 'Continue' %></a>
50
+ </td>
51
+ </tr>
52
+ </tbody>
53
+ </table>
54
+
55
+ </td>
56
+ </tr>
57
+ </tbody>
58
+ </table>
59
+
60
+ </td>
61
+ </tr>
62
+ </tbody>
63
+ </table>
64
+
65
+ <!--[if mso]>
66
+ </td>
67
+ <![endif]-->
68
+
69
+ <!--[if mso]>
70
+ </tr>
71
+ </table>
72
+ <![endif]-->
73
+ </td>
74
+ </tr>
75
+ </tbody>
76
+ </table>
77
+
78
+ </td>
79
+ </tr>
80
+ </tbody>
81
+ </table>
82
+
83
+ </td>
84
+ </tr>
85
+ </tbody>
86
+ </table>
87
+
88
+ </td>
89
+ </tr>
90
+ </tbody>
91
+ </table>
@@ -1,6 +1,5 @@
1
1
 
2
2
  .email-templates-edit.maxwidth
3
3
  %h5
4
- Edit
5
- = link_to @email_template.slug, email_template_path( @email_template )
4
+ Edit email_template `#{link_to @email_template.slug, email_template_path( @email_template )}`
6
5
  = render 'form', email_template: @email_template
@@ -1,5 +1,5 @@
1
1
 
2
- .email-templates-show
2
+ .email-templates-show.maxwidth
3
3
  .header
4
4
  %h2.title
5
5
  = @tmpl.slug
@@ -8,4 +8,4 @@
8
8
  -# = link_to '[preview ^]', '#'
9
9
  -# = link_to '[use]', '#'
10
10
 
11
- %iframe{ src: email_template_iframe_path(@tmpl.slug), width: '100%', height: '100%' }
11
+ %iframe{ src: email_template_iframe_path(@tmpl.slug), width: '750px', height: '450px' }
@@ -19,6 +19,10 @@
19
19
  <b>message_id:</b> #{message.message_id}
20
20
  %li
21
21
  <b>object_key:</b> #{message.object_key}
22
+ %li
23
+ <b>Stub:</b>
24
+ #{message.stub.id}
25
+ .d-inline-block= button_to 'reprocess', churn_message_stub_path(message.stub)
22
26
  %li <b>in_reply_to_id:</b> #{message.in_reply_to_id}
23
27
  %li
24
28
  <b>n_images:</b> #{message.photos.length}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wco_email
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1.73
4
+ version: 0.1.1.75
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Pudeyev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-15 00:00:00.000000000 Z
11
+ date: 2024-07-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-s3
@@ -376,9 +376,9 @@ files:
376
376
  - app/views/wco_email/contexts/show_iframe.haml
377
377
  - app/views/wco_email/contexts/summary.csv.erb
378
378
  - app/views/wco_email/contexts/summary.haml
379
- - app/views/wco_email/conversations/_actions.haml
380
379
  - app/views/wco_email/conversations/_form.haml
381
380
  - app/views/wco_email/conversations/_search.haml
381
+ - app/views/wco_email/conversations/_tags_actions.haml
382
382
  - app/views/wco_email/conversations/edit.haml
383
383
  - app/views/wco_email/conversations/index.haml
384
384
  - app/views/wco_email/conversations/show.haml
@@ -419,6 +419,8 @@ files:
419
419
  - app/views/wco_email/email_templates/_index_expanded.haml
420
420
  - app/views/wco_email/email_templates/_meta.haml
421
421
  - app/views/wco_email/email_templates/_piousbox_social.html.erb
422
+ - app/views/wco_email/email_templates/_row_col3.html.erb
423
+ - app/views/wco_email/email_templates/_row_w_btn.html.erb
422
424
  - app/views/wco_email/email_templates/_show_cell.haml
423
425
  - app/views/wco_email/email_templates/_tracking_footer.html.erb
424
426
  - app/views/wco_email/email_templates/_wasyaco_social.html.erb