wco_models 3.1.0.79 → 3.1.0.80

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: 47c1bfd514e6256509d803414d83c9788a784d763ef4f2d0498f2838b593c097
4
- data.tar.gz: 525c22eab612f690439d427d0f714f937b6f77853ecad2fd6006b8f3fd4787e8
3
+ metadata.gz: b0eecbb5973b0c4919927fc8f56bb0474439d5388a3986a6d934da2c8ddc1194
4
+ data.tar.gz: 12fa2c8f97319ce80350257da78d9f9139e03dda26489adc5611945dbfd897c1
5
5
  SHA512:
6
- metadata.gz: e4d06549e214c3e666b692fb01abeff916827efa2bc77e38468e624eec463b24a67290d8327c6b7667220a44c6c4c0595ede9d7abcf78f5b845fcc3b08b84d17
7
- data.tar.gz: b7cdd068d8a5f9607fee162d093ae0e8671e34ee94641daab7274ed23f3dbcbe849852e9664b9668e729c545b46624e32ca19c7571b38fb2d8bf6f2971a60cc8
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
@@ -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
@@ -105,7 +105,6 @@ class WcoEmail::Message
105
105
  })
106
106
 
107
107
  when WcoEmail::EmailFilter::KIND_AUTORESPOND_EACT
108
- # byebug
109
108
  out = Sch.create!({
110
109
  email_action_template: filter.email_action_template,
111
110
  status: Sch::STATUS_ACTIVE,
@@ -117,7 +116,7 @@ class WcoEmail::Message
117
116
  raise "unknown filter kind: #{filter.kind}"
118
117
  end
119
118
 
120
- conv.save
119
+ conv.save!
121
120
  end
122
121
 
123
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.79
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