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

Calendar improvements #784

Merged
merged 25 commits into from
May 19, 2019
Merged

Calendar improvements #784

merged 25 commits into from
May 19, 2019

Conversation

kevinpapst
Copy link
Member

@kevinpapst kevinpapst commented May 13, 2019

Description

  • Calendar is now using modals, so the user will not leave the current screen
  • Calendar events can be dragged & dropped (for time & date change)
  • Calendar events can be resized (for duration change)
  • Calendar reloads data on edit and create record
  • Calendar is now a first class citizen in the main navigation
    • and therefor removed from the timesheet action icons
  • Fixes bugs in combination with duration_only mode
  • New system setting to configure the visible timeframe in week and day view
  • New setting to remove weekends from the calendar
  • Now using the Kimai API instead of the custom JSON controller function
  • API changes:
    • datetime format corrected (see comment below)
    • exposing color on collections
    • option to receive the full serialized structure for subresources (currently only for timesheet collection using the URL parameter full=true)
  • Added system configurations for visibleHours, businessHours, weekends, week_numbers

Fixes #622
Fixes #530
Fixes #704

Can be tested at https://demo.kimai.org/

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist

  • I ran bin/console kimai:codestyle --fix to verify the correct code style
  • I have added tests to cover my changes
  • I agree that this code is used in Kimai and will be published under the MIT license

calendar first class citizen in menu
@kevinpapst kevinpapst added this to the 1.0 milestone May 13, 2019
@infeeeee
Copy link
Contributor

Works really nicely! Maybe some of these issues were present in the old calendar, as I don't use this regularly.

  • If I modify the end of a ongoing recording in the calendar view it stops the recording, however it not updates on the active recording panel, I get a server error when stopping it from the current panel(as it is already stopped)
  • I think the current recording's end should be at the red current time sign. I see the problem, the currently started record would have a 0 height this case. Now it 'overflows' it:
    image
  • If I drag a record to the all day in the weekly or daily view I get this error: Changes could not be saved: Validation Failed. What is the point of this all day section? If I make a multi-day record, it doesn't populate this section
  • There is no way to delete a record from the calendar view. Maybe a delete button on the edit dialog would be good.
  • The height of the calendar changes based on the width of the window. It's strange, that I have a huge monitor but the full month doesn't fit vertically. Is it a setting in the calendar widget? Can this behaviour changed some way?

@kevinpapst kevinpapst marked this pull request as ready for review May 18, 2019 17:05
@kevinpapst
Copy link
Member Author

kevinpapst commented May 18, 2019

@hmr-it-jr ATTENTION: I found a bug in the timesheet API requests. The format for queries was still wrong ... using the "old" format. I had to change that, as you can see in this diff.

Now it finally works as announced in the documentation. When using a begin or end filter you must use 2019-03-02T14:23:00 instead of previously 2019-03-02 14:23.

Probably you can add a switch to the App, using the old format for 0.9 and the new for 1.0?

@j0hannesr0th
Copy link
Contributor

@kevinpapst one question: is this really

2019-03-02T14:23:00

correct?

Because in my time framework (moment.js) provides only this:

2019-05-19T10:24:03+02:00

so I assume the correct version of the quoted one above should be:

2019-03-02T14:23:00+00:00

Of course I can make a check of the verison of the api before sending any tracked times and convert the tracked times into the correct format. I just hope we don't change it with every Kimai release 😄

@kevinpapst
Copy link
Member Author

kevinpapst commented May 19, 2019

LOL, no plans to change it again, unless someone finds another bug ^^

Don't use plain moment.format() but as shown here: moment.format(moment.HTML5_FMT.DATETIME_LOCAL_SECONDS)

API is updated at https://demo-branch.kimai.org/

@kevinpapst kevinpapst merged commit d2ad87d into master May 19, 2019
@kevinpapst kevinpapst deleted the calendar branch May 19, 2019 14:16
@j0hannesr0th
Copy link
Contributor

@kevinpapst I've tested the new format

moment().format(HTML5_FMT.DATETIME_LOCAL_SECONDS);

but the new format worked for me on my outdated 0.9, demo.kimai.org and demo-branch.kimai.org

My local kimai with request /api/verison returns

{
    "version": "0.9",
    "candidate": "stable",
    "semver": "0.9-stable",
    "name": "Ayumi",
    "copyright": "Kimai 2 - 0.9 stable (Ayumi) by Kevin Papst and contributors."
}

Is there something for me to do then which I don't see?

@kevinpapst
Copy link
Member Author

The demo sites are already updated, please try the -stable domain.
It didn't work for me with the T separator instead of but I was sure that I tested it before releasing 0.9.

@j0hannesr0th
Copy link
Contributor

Hm, it works for me.

Request:
grafik

Response:
grafik

@kevinpapst
Copy link
Member Author

Well, if the app still works with demo.kimai.org and demo-stable.kimai.org then there is no change necessary ... what would be even better!

@lock
Copy link

lock bot commented Jul 20, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. If you use Kimai on a daily basis, please consider donating to support further development of Kimai.

@lock lock bot locked and limited conversation to collaborators Jul 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants