bullet_train-themes-tailwind_css 1.6.34 → 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: eedbfb04963ec8c2ed2a8b64a36e1b566fa7fc7b2f24c6b286048f7addef3e09
4
- data.tar.gz: f6ce2ce799005c30b8e922ad354712b20ceb0e7e1759231e14b0cb1738c84392
3
+ metadata.gz: 95b9120f1621848d69ce98917e18a568aa448400e2205cc199d009bfe56448cf
4
+ data.tar.gz: 9c758ac9cd24c1d74207b3461413aeea74bf517b12768f593d2a75896b0e227b
5
5
  SHA512:
6
- metadata.gz: 2a89ecaf4cc50f55db7b05d9d542aa252d630c6d839b2d72c918054f302eaae1dd3584a873ccd670fa42699c5dfd087632525917d747f56da322782caf5e5968
7
- data.tar.gz: 6865a6b3a9d844b9ef14ab68444727d3d171843d0177098574b4f06e8fba3fbef0ab2de1ebd66933a077fe1a277fbcafa3bef3093f2b3c159d5ff1dca0a9d0a2
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.34"
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.34
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-27 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