bullet_train-themes-tailwind_css 1.6.34 → 1.6.36
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf787a151aa9487cb044f9a0454fafe0510cfd558e0c66986a87f73c34eafc0d
|
4
|
+
data.tar.gz: 932f2220977984cfea1adf28d31c2669cba22a8babe614419290d52ee21c8b46
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fac122d302fb75bb470148983358771afa3f196eb871a535520283ab65ff624d26ed4316a593431902400398fdc0df154cb78938bc88d20ce653f56032aa995d
|
7
|
+
data.tar.gz: cc8d66a8b2a193688a1f715c61875779d78b7a97303bdad2ff5397393c6e68c0c33449b2672ff3f783116f994d05c5c3783e853ee24f82e785be0a8ca0733a74
|
@@ -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
|
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
|
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
|
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
|
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
|
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>
|
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.
|
4
|
+
version: 1.6.36
|
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-
|
11
|
+
date: 2024-03-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: standard
|