Files
threshold-ui/addons/core/addon
Devon Anderson f282dbb5b1 feat: 🎸 Create time-remaining helper (#2012)
* feat: 🎸 create helper

Create `time-remaining` helper to track remaining session time.

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-10519

* refactor: 💡 Clean up code for time-remaining helper

Moved time remaining helper into `core` addons folder. Cleaned up the
`time-remaining` helper to use the `DurationUnitFormat` service.

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-10519

* Update session.hbs

removed test implementation

* refactor: 💡 files added for helper

files added for helper

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-10519

* Update session.hbs

fix linting

* refactor: 💡 fix uneeded spacing

Fix spacing on hbs file used for testing time-remaining helper

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-10519

* refactor: 💡 refactor time-remaining helper

Cleaned up code that was returning a string if `differenceInSeconds` was
less than or equal to zero. Code is now conditionally checking in the
`differenceInSeconds` variable if the `difference` is greater than zero.
If it is not then it will return zero and let the `DurationUnitFormat`
handle the rest.

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-10519

* refactor: 💡 fix failing test

Fix failing `time-remaining` test

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-10519
2023-11-28 17:42:22 -05:00
..