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

Disable/enable tray punch #117

Merged
merged 6 commits into from Oct 27, 2019
Merged

Disable/enable tray punch #117

merged 6 commits into from Oct 27, 2019

Conversation

s-arika
Copy link

@s-arika s-arika commented Oct 24, 2019

Related issue

#70

Context / Background

Tray punch button now follows the behaviour of the punch time button. It is disabled if the day is a non-working day or if all entries have already been punched.

What change is being introduced by this PR?

I added an observer on the punch button to see if the attribute changes to disabled. The result of this condition will send the value to main, setting the enabled key in the contextMenuTemplate. The tray menu will be rebuilt on dynamic values.

main.js Outdated Show resolved Hide resolved
js/calendar.js Outdated Show resolved Hide resolved
Copy link
Collaborator

@tupaschoal tupaschoal left a comment

Choose a reason for hiding this comment

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

I think it looks great now!

Copy link
Owner

@thamara thamara left a comment

Choose a reason for hiding this comment

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

Looks good! Thanks @s-arika for the work!

@thamara thamara merged commit 7a015e3 into thamara:master Oct 27, 2019
@thamara thamara added this to the Version 1.3.0 milestone Oct 27, 2019
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.

None yet

3 participants