diff options
author | Robert Speicher <rspeicher@gmail.com> | 2021-01-20 13:34:23 -0600 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2021-01-20 13:34:23 -0600 |
commit | 6438df3a1e0fb944485cebf07976160184697d72 (patch) | |
tree | 00b09bfd170e77ae9391b1a2f5a93ef6839f2597 /app/assets/javascripts/pages/projects/pipeline_schedules/shared/components/timezone_dropdown.js | |
parent | 42bcd54d971da7ef2854b896a7b34f4ef8601067 (diff) | |
download | gitlab-ce-6438df3a1e0fb944485cebf07976160184697d72.tar.gz |
Add latest changes from gitlab-org/gitlab@13-8-stable-eev13.8.0-rc42
Diffstat (limited to 'app/assets/javascripts/pages/projects/pipeline_schedules/shared/components/timezone_dropdown.js')
-rw-r--r-- | app/assets/javascripts/pages/projects/pipeline_schedules/shared/components/timezone_dropdown.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/app/assets/javascripts/pages/projects/pipeline_schedules/shared/components/timezone_dropdown.js b/app/assets/javascripts/pages/projects/pipeline_schedules/shared/components/timezone_dropdown.js index 2a58e015ff1..16c4a6191b2 100644 --- a/app/assets/javascripts/pages/projects/pipeline_schedules/shared/components/timezone_dropdown.js +++ b/app/assets/javascripts/pages/projects/pipeline_schedules/shared/components/timezone_dropdown.js @@ -5,10 +5,10 @@ const defaults = { $inputEl: null, $dropdownEl: null, onSelectTimezone: null, - displayFormat: item => item.name, + displayFormat: (item) => item.name, }; -export const formatUtcOffset = offset => { +export const formatUtcOffset = (offset) => { const parsed = parseInt(offset, 10); if (Number.isNaN(parsed) || parsed === 0) { return `0`; @@ -17,11 +17,11 @@ export const formatUtcOffset = offset => { return `${prefix} ${Math.abs(offset / 3600)}`; }; -export const formatTimezone = item => `[UTC ${formatUtcOffset(item.offset)}] ${item.name}`; +export const formatTimezone = (item) => `[UTC ${formatUtcOffset(item.offset)}] ${item.name}`; export const findTimezoneByIdentifier = (tzList = [], identifier = null) => { if (tzList && tzList.length && identifier && identifier.length) { - return tzList.find(tz => tz.identifier === identifier) || null; + return tzList.find((tz) => tz.identifier === identifier) || null; } return null; }; @@ -52,8 +52,8 @@ export default class TimezoneDropdown { search: { fields: ['name'], }, - clicked: cfg => this.updateInputValue(cfg), - text: item => formatTimezone(item), + clicked: (cfg) => this.updateInputValue(cfg), + text: (item) => formatTimezone(item), }); this.setDropdownToggle(this.displayFormat(this.initialTimezone)); |