Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some display stuff in clock-in graph and controls #1117

Merged
merged 3 commits into from
Jan 28, 2025

Conversation

sauldom102
Copy link
Contributor

Description

There are a couple of things that I needed to fix regarding the clock-in graph and controls:

  • When it's clocked-out, we still need to show the amount of time that the user has clocked-in previously.
  • We shouldn't show any "ending time" unless the user has no remaining time left.

What we're seeing while using this component that needs to be fixed:
Screenshot 2025-01-28 at 15 29 45

@sauldom102 sauldom102 requested a review from a team as a code owner January 28, 2025 14:31
Copy link

github-actions bot commented Jan 28, 2025

🔍 Visual review for your branch is published 🔍

Here are the links to:

Comment on lines +124 to +137
it("should show correct time when clocked out of past clock-ins", () => {
const mockData = [
createMockEntry("09:00", "12:00", "clocked-in"),
createMockEntry("12:00", "12:00", "clocked-out"),
]

const result = getLabels({ data: mockData, remainingMinutes: 0 })

expect(result).toEqual({
primaryLabel: "09:00",
secondaryLabel: "12:00",
time: "03:00",
})
})

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job! We need to evolve our tests at the same time!

@sauldom102 sauldom102 merged commit f3162eb into main Jan 28, 2025
9 checks passed
@sauldom102 sauldom102 deleted the fix-some-display-stuff-in-clockin-graph-and-controls branch January 28, 2025 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants