{"action":"created","issue":{"url":"https://api.github.com/repos/alextselegidis/easyappointments/issues/511","repository_url":"https://api.github.com/repos/alextselegidis/easyappointments","labels_url":"https://api.github.com/repos/alextselegidis/easyappointments/issues/511/labels{/name}","comments_url":"https://api.github.com/repos/alextselegidis/easyappointments/issues/511/comments","events_url":"https://api.github.com/repos/alextselegidis/easyappointments/issues/511/events","html_url":"https://github.com/alextselegidis/easyappointments/pull/511","id":335591620,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk3MjU0MDMw","number":511,"title":"Fix display of breaks for working plans starting by Monday (Proposal for #506)","user":{"login":"oxteam","id":38721222,"node_id":"MDQ6VXNlcjM4NzIxMjIy","avatar_url":"https://avatars2.githubusercontent.com/u/38721222?v=4","gravatar_id":"","url":"https://api.github.com/users/oxteam","html_url":"https://github.com/oxteam","followers_url":"https://api.github.com/users/oxteam/followers","following_url":"https://api.github.com/users/oxteam/following{/other_user}","gists_url":"https://api.github.com/users/oxteam/gists{/gist_id}","starred_url":"https://api.github.com/users/oxteam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oxteam/subscriptions","organizations_url":"https://api.github.com/users/oxteam/orgs","repos_url":"https://api.github.com/users/oxteam/repos","events_url":"https://api.github.com/users/oxteam/events{/privacy}","received_events_url":"https://api.github.com/users/oxteam/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-25T22:32:57Z","updated_at":"2018-06-28T15:53:57Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/alextselegidis/easyappointments/pulls/511","html_url":"https://github.com/alextselegidis/easyappointments/pull/511","diff_url":"https://github.com/alextselegidis/easyappointments/pull/511.diff","patch_url":"https://github.com/alextselegidis/easyappointments/pull/511.patch"},"body":"Hi Alex,\r\n\r\nPrior commit 00372f2f1af96df0d4545053ae6f27834e109ea6, the first weekday was Monday.\r\nAfter this commit, it is set to Sunday and the display of breaks in the backend calendar is broken for former working plans as I recorded in Issue #506.\r\n\r\nFor a database created before this commit, working plans are stored with Monday as the first weekday.\r\nThus, when displaying the backend calendar, the system displays Monday breaks in the column of Sunday, Tuesday breaks in the column of Monday, and so on...\r\n\r\nThe fix consists in:\r\n- Reordering the working plan elements with Sunday as the first day prior displaying the backend calendar.\r\n- Also reordering the working plan elements when displaying 'Settings/Business Logic' and 'Users/Providers' tabs. This is to ensure that breaks are always displayed with Sunday first, like done for the Working Plan in those tabs, for consistency purpose.\r\n\r\nInstead of dynamically reordering the working plans at run time, a different fix would be to reorder all the working plans (company + service provider) in database once for all, through a migration class.\r\n\r\nBut I noticed that you created Issue #471 to allow users to change the first weekday through a system wide setting. Changing the first weekday dynamically would then require to reorder all the working plans in database. This could be time consuming due to database writes in case of numerous service providers.\r\n\r\nWhat do you think about my proposal?"},"comment":{"url":"https://api.github.com/repos/alextselegidis/easyappointments/issues/comments/401083455","html_url":"https://github.com/alextselegidis/easyappointments/pull/511#issuecomment-401083455","issue_url":"https://api.github.com/repos/alextselegidis/easyappointments/issues/511","id":401083455,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMTA4MzQ1NQ==","user":{"login":"oxteam","id":38721222,"node_id":"MDQ6VXNlcjM4NzIxMjIy","avatar_url":"https://avatars2.githubusercontent.com/u/38721222?v=4","gravatar_id":"","url":"https://api.github.com/users/oxteam","html_url":"https://github.com/oxteam","followers_url":"https://api.github.com/users/oxteam/followers","following_url":"https://api.github.com/users/oxteam/following{/other_user}","gists_url":"https://api.github.com/users/oxteam/gists{/gist_id}","starred_url":"https://api.github.com/users/oxteam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oxteam/subscriptions","organizations_url":"https://api.github.com/users/oxteam/orgs","repos_url":"https://api.github.com/users/oxteam/repos","events_url":"https://api.github.com/users/oxteam/events{/privacy}","received_events_url":"https://api.github.com/users/oxteam/received_events","type":"User","site_admin":false},"created_at":"2018-06-28T15:53:57Z","updated_at":"2018-06-28T15:53:57Z","author_association":"CONTRIBUTOR","body":"Sorry I made a mistake in the branch to be deleted."}}
{"actor":{"display_login":"oxteam"}}