sinatra-hexacta 1.7.7 → 1.7.11

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: aedcbf3c2bb769f1f78b351b42f5f65e0171624401e1fb136cc1d198635344e4
4
- data.tar.gz: 9fe730e6c6acd693bebab4559366dcf7992ff1f6cd3ec935632fdfee27b0a1fd
3
+ metadata.gz: 1d23ddb19a38d2cefa5216e105ed4f711d63d3bf2d8705bc08dcf63f8751cd9b
4
+ data.tar.gz: 01c3509f1a2a77db598809ac2cd3255b83127f22a14f2eaa1c4c29a6d4bc5eb7
5
5
  SHA512:
6
- metadata.gz: e5ad947c31a166651792b67ef220958d3c7384c576a8c010db018877102d14fd6dc5736788e0545cca6c6613c73730cd5c4691fc065421f7a77f2e514512ee01
7
- data.tar.gz: 0f785d4d9da08111214c39f34d066729aaf329815163a3b17e2d60bc1f73e7081dd0eefead30d786ded60caabd98271a04bbff8dcab3293ecf701ed20a44d3dd
6
+ metadata.gz: 565a078491d820acf854bbb6b691dbc11a760a029fd0d827a69556d617a5757cc05290f85d1e150b6fd63e7240b1713a486df5cd51c555a0ab563f659353f79f
7
+ data.tar.gz: aa35f18b6cf5cf4664f42653885b1fed01a79c3a8f2f2bbc0be327320f66f8d981ef42f65b33ed7bdc54d188c425e54c14092f4f95c9d9469e6a6f32912cb8be
@@ -26,13 +26,21 @@ class Date
26
26
  end
27
27
 
28
28
  def display
29
- "#{Configuration::DAYS[self.wday]} #{self.day} de #{Configuration::MONTHS[self.month-1]} #{self.year == Date.today.year ? '' : self.year}"
29
+ "#{Configuration::DAYS[self.wday]} #{self.day} de #{Configuration::MONTHS[self.month-1]}, #{self.year}"
30
30
  end
31
31
 
32
32
  def short_display
33
33
  self.strftime('%-d/%-m/%Y')
34
34
  end
35
35
 
36
+ def add_working_days(days=1)
37
+ new_date = self + days
38
+ while (new_date.wday % 7 == 0) or (new_date.wday % 7 == 6) do
39
+ new_date += 1
40
+ end
41
+ new_date
42
+ end
43
+
36
44
  def next_working_date
37
45
  add_working_days(1)
38
46
  end
@@ -337,7 +337,7 @@ function update_html_elements() {
337
337
 
338
338
  if ($('.date-range')[0]) {
339
339
  // to_data_source method is compliant with the calendar library used in holidays
340
- $('.date-range').daterangepicker({
340
+ $('.date-range').not('.initialized').daterangepicker({
341
341
  "parentEl" : $(this).id,
342
342
  "autoApply": true,
343
343
  "locale": {
@@ -355,6 +355,7 @@ function update_html_elements() {
355
355
  },
356
356
  opens: 'center'
357
357
  });
358
+ $('.date-range').addClass('initialized');
358
359
  }
359
360
 
360
361
  /*
@@ -658,7 +659,7 @@ function buildFilterMap(offset) {
658
659
  function advance_search(url,offset,format) {
659
660
  filter_map = buildFilterMap(offset);
660
661
  filter_map["format"] = format;
661
- if (format != 'xls') {
662
+ if (format != 'xls' && !format.includes('reports')) {
662
663
  window.location.href = url + "?" + encodeQueryData(filter_map);
663
664
  } else {
664
665
  window.open(
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sinatra-hexacta
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.7
4
+ version: 1.7.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marco Zanger
@@ -80,6 +80,20 @@ dependencies:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: 0.3.1
83
+ - !ruby/object:Gem::Dependency
84
+ name: caxlsx
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - '='
88
+ - !ruby/object:Gem::Version
89
+ version: 3.1.1
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - '='
95
+ - !ruby/object:Gem::Version
96
+ version: 3.1.1
83
97
  description: A gem to support general functionality accross all apps
84
98
  email: mzanger@hexacta.com
85
99
  executables: []