bullet_train-themes-tailwind_css 1.6.33 → 1.6.35

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: 0bf30753e44a1d6a100a8706290356285e4a07f571573b5717337214bdcd84a7
4
- data.tar.gz: 2cb7b00952a5656e6a9bd66e1a3766c23d06de473f701495b3a9a5e14012acba
3
+ metadata.gz: 95b9120f1621848d69ce98917e18a568aa448400e2205cc199d009bfe56448cf
4
+ data.tar.gz: 9c758ac9cd24c1d74207b3461413aeea74bf517b12768f593d2a75896b0e227b
5
5
  SHA512:
6
- metadata.gz: 677f2479664e7df4bf9cd037512da8e40383de92ac25ac18f5f14949548f0c3aee091dbe4b2c117f57ef3dfe6393e197e241b5e2572cbd695ac7601624ff8697
7
- data.tar.gz: 633db4312fb6ba8ffe31c8aa9b2712c03d7f32c1a13802c6a216f821f48f63e13db527315c82c1a297658157265c876da4fd123817a4ddf38b1cb50404f26ac3
6
+ metadata.gz: e841ae96a037cbef546d89cad2ac7505c0ff5ad355082e64d8b841f78ebba2cb9a2134ba50fa3c40520584d75a12c3b1c5ed1ae1808abab380098d493ed43327
7
+ data.tar.gz: dd22af363d586fb761368d78f0c093c74c044db5a4cddcd8acd654f0235d7a6b96fe628f33da88bf73f098fa48070862194c5c9e414fed2aa42d4eaa6cf18b73
@@ -3,7 +3,7 @@ stimulus_controller = 'fields--date'
3
3
 
4
4
  form ||= current_fields_form
5
5
  options ||= {}
6
- user_tz = ActiveSupport::TimeZone.find_tzinfo(current_user.time_zone).name
6
+ user_tz = defined?(current_user.time_zone) ? ActiveSupport::TimeZone.find_tzinfo(current_user.time_zone).name : nil
7
7
 
8
8
  current_team_time_zone = if current_user&.respond_to?(:current_team)
9
9
  current_team.time_zone
@@ -22,7 +22,7 @@ data_options = data_options.merge({ data: {"#{stimulus_controller}-target": 'fie
22
22
  # localized display options
23
23
  options[:id] ||= "#{form.field_id(method)}_display"
24
24
  options[:class] = "form-control single-daterange w-full border-slate-300 dark:bg-slate-800 dark:border-slate-900 #{options[:class]}".strip
25
- raw_value = form.object.send(method)&.in_time_zone(current_user.time_zone || current_team_time_zone || "UTC")
25
+ raw_value = form.object.send(method)&.in_time_zone(current_user&.time_zone || current_team_time_zone || "UTC")
26
26
  options[:value] = raw_value && I18n.l(raw_value, format: :date_and_time_field)
27
27
  options = options.merge({ data: {"#{stimulus_controller}-target": 'displayField' }})
28
28
 
@@ -39,7 +39,7 @@ other_options ||= {}
39
39
  data-<%= stimulus_controller %>-time-format-value="<%= I18n.t('time.formats.date_controller') %>"
40
40
  data-<%= stimulus_controller %>-is-am-pm-value="<%= am_pm? %>"
41
41
  data-<%= stimulus_controller %>-picker-locale-value="<%= I18n.t("daterangepicker").deep_transform_keys { |k| k.to_s.camelize(:lower) }.to_json %>"
42
- data-<%= stimulus_controller %>-default-time-zones-value="<%= "[\"#{current_user.time_zone}\",\"#{current_team_time_zone}\"]" %>"
42
+ data-<%= stimulus_controller %>-default-time-zones-value="<%= "[\"#{current_user&.time_zone}\",\"#{current_team_time_zone}\"]" %>"
43
43
  data-<%= stimulus_controller %>-current-time-zone-value="<%= current_time_zone %>"
44
44
  >
45
45
  <%= form.text_field method, options %>
@@ -52,16 +52,16 @@ other_options ||= {}
52
52
  <i class="leading-4 text-lg ti ti-trash dark:text-blue-500"></i>
53
53
  </button>
54
54
  <% end %>
55
- <% if current_user.time_zone != current_team_time_zone %>
55
+ <% if current_user&.time_zone != current_team_time_zone %>
56
56
  <div class="mt-1.5 text-xs text-slate-500">
57
57
  <input class="hidden" data-<%=stimulus_controller%>-target="timeZoneField" value="<%= current_time_zone %>">
58
58
  <div data-<%= stimulus_controller %>-target="currentTimeZoneWrapper">
59
- <%= link_to (current_user.time_zone || current_team_time_zone || "UTC"), '#', class: 'button-secondary p-0', data: {action: "#{stimulus_controller}#showTimeZoneButtons"} %>
59
+ <%= link_to (current_user&.time_zone || current_team_time_zone || "UTC"), '#', class: 'button-secondary p-0', data: {action: "#{stimulus_controller}#showTimeZoneButtons"} %>
60
60
  </div>
61
61
  <div class="space-x-1 hidden" data-<%= stimulus_controller %>-target="timeZoneButtons">
62
62
  <%= link_to '', '#', hidden: true, class: 'time-zone-button button-alternative button-smaller selected-option-time-zone-button hidden', data: {action: "#{stimulus_controller}#setTimeZone", value: ''} %>
63
63
  <%= link_to current_team_time_zone, '#', class: 'time-zone-button button-alternative button-smaller', data: {action: "#{stimulus_controller}#setTimeZone", value: team_tz, label: current_team_time_zone } if current_team_time_zone%>
64
- <%= link_to current_user.time_zone, '#', class: 'time-zone-button button button-smaller', data: {action: "#{stimulus_controller}#setTimeZone", value: user_tz, label: current_user.time_zone } %>
64
+ <%= link_to current_user&.time_zone, '#', class: 'time-zone-button button button-smaller', data: {action: "#{stimulus_controller}#setTimeZone", value: user_tz, label: current_user&.time_zone } if current_user %>
65
65
  <%= link_to t('global.buttons.other'), '#', class: 'button-alternative button-smaller', data: {action: "#{stimulus_controller}#showTimeZoneSelectWrapper"} %>
66
66
  <%= link_to t('global.buttons.cancel'), '#', class: 'button-secondary button-smaller', data: {action: "#{stimulus_controller}#resetTimeZoneUI"} %>
67
67
  </div>
@@ -1,7 +1,7 @@
1
1
  module BulletTrain
2
2
  module Themes
3
3
  module TailwindCss
4
- VERSION = "1.6.33"
4
+ VERSION = "1.6.35"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bullet_train-themes-tailwind_css
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.33
4
+ version: 1.6.35
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Culver
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-02-26 00:00:00.000000000 Z
11
+ date: 2024-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: standard