ish_manager 0.1.8.372 → 0.1.8.374

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d4d5e787e74562c8e5aced449985e808514117d71edef066f66564cbf6b20e63
4
- data.tar.gz: a4feab7fd1f3a1142252c00533d5a2cd4c1072212b3657d9595f218de72a6c93
3
+ metadata.gz: 39b64d928f290a56cb8566d6e3e41883fbdffa45342900d55cc86d2ac650b01f
4
+ data.tar.gz: f6c64a2bf55a68bfe3ececa0d03ae3b89761db23b29fcb0ebcf1a5fc445b4eec
5
5
  SHA512:
6
- metadata.gz: eeaecbf344bd5501e3a1a07d1bcdcf20d3ffdda78eb1a20a2a1febd623dd588a6aead655c679b3fc5ee18e272bfcc27ed47ba31f1b03afa62ecfbb1eb678e16f
7
- data.tar.gz: 376ec631efc2707d860a09279803d601ca7401202ce18f903a866c76520eb4aa3ebc090af2c5db77435432fb18b2d097222e1b8bc2d89263533ce545708808b1
6
+ metadata.gz: 1b871f0b6e1c35d5dae63efbd7c92f940bfb4cca42e0d0fa132448276db4789594d8644d94ac92f09a4f9d75001c34eac080de100eebf0147a15880df9f29214
7
+ data.tar.gz: 726aded514ecd4998a7be06d37488afa6688020fe4f28d1b3feb5dfcaa3f31ae7e00f1580225ccbb404123f7e16d909dc422a6148b1e32fca6c0c69a6d3fe5cc
@@ -129,34 +129,6 @@ $(function () {
129
129
  $( $(".n-selected")[0] ).html( $("input[type='checkbox'].i-sel:checked").length )
130
130
  })
131
131
 
132
- $(".delete-btn").click(function(e) {
133
- const jwt_token = $("#Config").data('jwt-token')
134
- const action_path = $(this).data('url')
135
- const out = []
136
-
137
- $( $("input[type='checkbox'].i-sel:checked") ).each( idx => {
138
- let val = $($("input[type='checkbox'].i-sel:checked")[idx]).val()
139
- out.push(val)
140
- })
141
-
142
- $.ajax({
143
- url: action_path,
144
- type: 'DELETE',
145
- data: {
146
- ids: out,
147
- jwt_token: jwt_token,
148
- },
149
- success: e => {
150
- logg((e||{}).responseText, 'deleted Ok')
151
- location.reload()
152
- },
153
- error: e => {
154
- logg((e||{}).responseText, 'deleted Err')
155
- },
156
- })
157
-
158
- })
159
-
160
132
  $(".select-all input[type='checkbox']").change((e) => {
161
133
  const count = $("input[type='checkbox'].i-sel:checked").length
162
134
  const new_state = count ? false : true // all will be checked?
@@ -16,4 +16,33 @@ $(document).ready(() => {
16
16
 
17
17
  })
18
18
 
19
+
20
+ $(".delete-btn").click(function(e) {
21
+ const jwt_token = $("#Config").data('jwt-token')
22
+ const action_path = $(this).data('url')
23
+ const out = []
24
+
25
+ $( $("input[type='checkbox'].i-sel:checked") ).each( idx => {
26
+ let val = $($("input[type='checkbox'].i-sel:checked")[idx]).val()
27
+ out.push(val)
28
+ })
29
+
30
+ $.ajax({
31
+ url: action_path,
32
+ type: 'DELETE',
33
+ data: {
34
+ ids: out,
35
+ jwt_token: jwt_token,
36
+ },
37
+ success: e => {
38
+ logg((e||{}).responseText, 'deleted Ok')
39
+ location.reload()
40
+ },
41
+ error: e => {
42
+ logg((e||{}).responseText, 'deleted Err')
43
+ },
44
+ })
45
+
46
+ })
47
+
19
48
  })
@@ -138,6 +138,12 @@
138
138
  }
139
139
  }
140
140
 
141
+ .second-header {
142
+ a {
143
+ margin: 0 1em;
144
+ }
145
+ }
146
+
141
147
  .select-all.chip {
142
148
  display: flex;
143
149
  border: 1px solid cyan;
@@ -7,7 +7,13 @@ class ::IshManager::EmailConversationsController < IshManager::ApplicationContro
7
7
 
8
8
  def index
9
9
  authorize! :email_conversations_index, IshManager::Ability
10
- @email_conversations = ::Office::EmailConversation.in_inbox
10
+
11
+ if params[:slug]
12
+ @email_conversations = ::Office::EmailConversation.in_emailtag( params[:slug] )
13
+ else
14
+ @email_conversations = ::Office::EmailConversation.in_no_trash
15
+ end
16
+ @email_conversations = @email_conversations.order_by( latest_at: :desc )
11
17
  end
12
18
 
13
19
  def show
@@ -1,9 +1,16 @@
1
1
 
2
2
  .email-conversations-index
3
3
 
4
- .header
4
+ .second-header
5
5
  %i.material-icons mail
6
- Inbox (#{Office::EmailConversation.in_inbox.length})
6
+ = link_to email_conversations_in_emailtag_path(WpTag::EMAILTAG_INBOX) do
7
+ Inbox (#{Office::EmailConversation.in_inbox.length})
8
+ = link_to email_conversations_path do
9
+ Archived (#{Office::EmailConversation.in_no_trash.length})
10
+ = link_to email_conversations_in_emailtag_path(WpTag::EMAILTAG_TRASH) do
11
+ Trash (#{Office::EmailConversation.in_emailtag(WpTag::EMAILTAG_TRASH).length})
12
+
13
+ Selected: #{params[:slug] || 'archived' }
7
14
 
8
15
  .actions
9
16
 
@@ -10,6 +10,11 @@
10
10
  #{@email_conversation.subject}
11
11
  (#{@email_conversation.email_messages.all.count})
12
12
 
13
+ .tags.max-width
14
+ Tags:
15
+ = @email_conversation.wp_term_ids
16
+ = @email_conversation.tags.map(&:name).join(", ")
17
+
13
18
  .leads.max-width
14
19
  Leads (#{@email_conversation.leads.length}):
15
20
  %ul
@@ -30,7 +35,6 @@
30
35
  .gray= msg.id
31
36
 
32
37
  .chip.from
33
- -# = msg.from
34
38
  = lead.email
35
39
 
36
40
  .relative
data/config/routes.rb CHANGED
@@ -63,8 +63,9 @@ IshManager::Engine.routes.draw do
63
63
  get 'email_messages/stripped/:id', to: 'email_messages#show_stripped', as: :email_message_stripped
64
64
  resources :email_messages
65
65
 
66
- get 'email_conversations', to: 'email_conversations#index'
67
- get 'email_conversations/:id', to: 'email_conversations#show', as: :email_conversation
66
+ get 'email_conversations', to: 'email_conversations#index'
67
+ get 'email_conversations/in_emailtag/:slug', to: 'email_conversations#index', as: :email_conversations_in_emailtag
68
+ get 'email_conversations/show/:id', to: 'email_conversations#show', as: :email_conversation
68
69
 
69
70
  get 'email_contexts/for_lead/:lead_id', to: 'email_contexts#index', as: :email_contexts_for_lead
70
71
  get 'email_contexts/iframe_src/:id', to: 'email_contexts#iframe_src', as: :email_context_iframe
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ish_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8.372
4
+ version: 0.1.8.374
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox