wco_models 3.1.0.78 → 3.1.0.80

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: e0f8f4f03a6fe53303a403050d9ca34e5b81caefda6dbeef36ea5b994643ebe9
4
- data.tar.gz: b8b19c8349d9783a54ee8da11db8a414506164216a4e87f9b6cd3f4768eb8f9f
3
+ metadata.gz: b0eecbb5973b0c4919927fc8f56bb0474439d5388a3986a6d934da2c8ddc1194
4
+ data.tar.gz: 12fa2c8f97319ce80350257da78d9f9139e03dda26489adc5611945dbfd897c1
5
5
  SHA512:
6
- metadata.gz: 98de670421120a2e745a6af46cecd4238a9528bc0c001a12135469c54e3de70e69222910f8a63a5de3c051953f272685786f5953dd87cb1d03ca490dcb0581fb
7
- data.tar.gz: f775ed1e9c82d7464d837c6325fb1b2308436352743bff39617165ebeea1617424929ef69366249fc83376c0eee287aec69b9268e1ba78c2fe649c14a08a6d6e
6
+ metadata.gz: 0a8b7dbca35c054a90a3a1888c3d72e4acbb329f50927a3807d3279c4dc19972005d24edddf908dcf30efe1a3b86687211aa01fffd04f64c6609791e76fa3eb3
7
+ data.tar.gz: aa0b3e2a64a43aebcb9480c3dae5712029fcb8aa32df7b424c4e0c03d3f6164f5d3ec6555e02b52ac7b80c6d8d20c35f3db55e93d4bdad62c20b5b8a0f0267a6
@@ -17,12 +17,13 @@
17
17
  //= require ./alerts-notices
18
18
  //= require ./collapse-expand
19
19
  //= require ./file_upload
20
+ //= require ./office_action_templates
20
21
  //= require ./shared
21
22
  //
22
23
 
23
24
  $(function() {
24
25
 
25
-
26
+ /* DataTable */
26
27
  if ('function' === typeof $('body').DataTable) {
27
28
  const _props = {
28
29
  dom: 'lpftrip',
@@ -33,16 +34,17 @@ if ('function' === typeof $('body').DataTable) {
33
34
  bSortable: false,
34
35
  aTargets: [ "nosort" ],
35
36
  } ],
36
- order: [ 4, 'desc' ],
37
+ order: [], // [ 3, 'desc' ],
37
38
  }
38
39
  $('.data-table').DataTable(_props)
39
40
  }
40
41
 
42
+ /* datepicker */
41
43
  if ('function' === typeof $('body').datepicker) {
42
44
  $(".datepicker").datepicker({ dateFormat: 'yy-mm-dd' })
43
45
  }
44
46
 
45
-
47
+ /* select2 */
46
48
  if (!!$('body').select2) {
47
49
  $('.select2').each(function() {
48
50
  $( this ).select2({
@@ -51,21 +53,13 @@ if (!!$('body').select2) {
51
53
  })
52
54
  }
53
55
 
54
- $('select[name="office_action_template[from_type]"]').on('change', (ev) => {
55
- logg(ev.target.value, 'changed')
56
+ /* tinymce */
57
+ if ($(".tinymce").length > 0) {
58
+ $(".tinymce").summernote()
59
+ }
60
+
56
61
 
57
- // let url = window.location.href;
58
- // if (url.indexOf('?') > -1){
59
- // url += `&from_type=${ev.target.value}`
60
- // } else {
61
- // url += `?from_type=${ev.target.value}`
62
- // }
63
- // window.location.href = url;
64
62
 
65
- const parser = new URL(window.location);
66
- parser.searchParams.set('from_type', ev.target.value);
67
- window.location = parser.href;
68
- })
69
63
 
70
64
  console.log('Loaded wco/application.js')
71
65
  }); // END
@@ -0,0 +1,20 @@
1
+
2
+ $(function() {
3
+
4
+ $('select[name="office_action_template[from_type]"]').on('change', (ev) => {
5
+ // logg(ev.target.value, 'changed')
6
+
7
+ // let url = window.location.href;
8
+ // if (url.indexOf('?') > -1){
9
+ // url += `&from_type=${ev.target.value}`
10
+ // } else {
11
+ // url += `?from_type=${ev.target.value}`
12
+ // }
13
+ // window.location.href = url;
14
+
15
+ const parser = new URL(window.location);
16
+ parser.searchParams.set('from_type', ev.target.value);
17
+ window.location = parser.href;
18
+ })
19
+
20
+ }); // END
@@ -64,3 +64,5 @@ class WcoEmail::EmailAction
64
64
  end
65
65
  end
66
66
 
67
+ Sch = WcoEmail::EmailAction
68
+
@@ -136,3 +136,4 @@ class WcoEmail::EmailTemplate
136
136
  end
137
137
 
138
138
  end
139
+ ET = WcoEmail::EmailTemplate
@@ -85,7 +85,7 @@ class WcoEmail::Message
85
85
  conv.tags.push Wco::Tag.trash
86
86
  conv.tags -= [ Wco::Tag.inbox ]
87
87
  lead.schs.each do |sch|
88
- sch.update_attributes({ state: ::Sch::STATE_TRASH })
88
+ sch.update_attributes!({ state: ::Sch::STATE_TRASH })
89
89
  end
90
90
 
91
91
  when WcoEmail::EmailFilter::KIND_ADD_TAG
@@ -98,25 +98,25 @@ class WcoEmail::Message
98
98
  conv.tags -= [ filter.tag ]
99
99
 
100
100
  when WcoEmail::EmailFilter::KIND_AUTORESPOND_TMPL
101
- WcoEmail::Context.create({
101
+ WcoEmail::Context.create!({
102
102
  email_template: filter.email_template,
103
103
  lead_id: lead.id,
104
104
  send_at: Time.now,
105
105
  })
106
106
 
107
107
  when WcoEmail::EmailFilter::KIND_AUTORESPOND_EACT
108
- ::Sch.create({
109
- email_action: filter.email_action,
110
- state: ::Sch::STATE_ACTIVE,
111
- lead_id: lead.id,
112
- perform_at: Time.now,
108
+ out = Sch.create!({
109
+ email_action_template: filter.email_action_template,
110
+ status: Sch::STATUS_ACTIVE,
111
+ lead_id: lead.id,
112
+ perform_at: Time.now,
113
113
  })
114
114
 
115
115
  else
116
116
  raise "unknown filter kind: #{filter.kind}"
117
117
  end
118
118
 
119
- conv.save
119
+ conv.save!
120
120
  end
121
121
 
122
122
  ## From: https://stackoverflow.com/questions/24672834/how-do-i-remove-emoji-from-string/24673322
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wco_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0.78
4
+ version: 3.1.0.80
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-01-15 00:00:00.000000000 Z
11
+ date: 2024-01-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-s3
@@ -359,6 +359,7 @@ files:
359
359
  - app/assets/javascripts/wco/application.js
360
360
  - app/assets/javascripts/wco/collapse-expand.js
361
361
  - app/assets/javascripts/wco/file_upload.js
362
+ - app/assets/javascripts/wco/office_action_templates.js
362
363
  - app/assets/javascripts/wco/shared.js
363
364
  - app/assets/stylesheets/vendor/bootstrap-4.6.2.min.css
364
365
  - app/assets/stylesheets/wco/alerts_notices.scss