alextselegidis / easyappointments

:date: Easy!Appointments - Self Hosted Appointment Scheduler
https://easyappointments.org
GNU General Public License v3.0
3.35k stars 1.28k forks source link

Last booking of the day displayed as duplicate of the previous in table view when logged in as non-admin #998

Closed szekrenyigabor closed 3 years ago

szekrenyigabor commented 3 years ago

Hi, In EasyAppointments 1.4.1, if you book two or more appointments for a provider for different times on the same day, the last two bookings of the day are merged side-by-side into a single line on backend / calendar / table view. Also, all the details of the very last booking of the day are replaced with the parameters of the last-but one, making it look like a duplicate. This issue is present in both Calendar and List view, but only when logged in as non-admin. When logged in as admin, all bookings are displayed correctly. Also, Default calendar view displays bookings correctly regardless of user role.

1 2 3

alextselegidis commented 3 years ago

Hello!

I'm attaching a screenshot of the demo.easyappointments.org state at the time of writing.

Screenshot 2021-02-09 at 15 45 28

I cannot reproduce this issue, so it must be something else.

Can you provide the steps you've taken for the calendar to display duplicates?

  Alex Tselegidis, Easy!Appointments Creator
  Need a customization? Contact me in person!

szekrenyigabor commented 3 years ago

Dear Alex,

thank you for your reply. I was able to reproduce the issue at demo.easyappointments.org too. Below I describe the minimum steps needed to see the issue. Please remember that the issue only happens when logged in as secretary or provider. If you log in as admin, all is OK.

1.) Login at demo.easyappointments.org as an administrator 2.) Create a provider and assign services to him 3.) Add a new secretary and assign all providers to him 4.) Logout from the admin backend 5.) In the front-end, book two appointments for the SAME DAY, to the SAME PROVIDER: for example, one for 15/feb/2021 10:00 a.m, another for 15/feb/2021 16:00 p.m. 6.) Log in as the SECRETARY you created in step 3 (not as admin!), notice that the two appointments are displayed correctly in default calendar view. 7.) Now click the top right icon to switch the calendar to table view and select the day you booked to (15/feb/2021 in the example). Notice that the there is no booking at 16:00, but the two bookings are diplayed in one line, with the same details. Normally they should be on separate lines with their own parameters. This means that the booking that should be at 16:00 is instead shown at 10:00. 8.) Click on List view button and see that instead of showing two different bookings, you see the first booking twice.

Thank you for your help.

1 3 4

alextselegidis commented 3 years ago

Hello!

Thanks for the detailed steps.

So I tried doing the same thing on demo.easyappointments.org and I still do not get the same behavior.

Screenshot 2021-02-15 at 15 17 48

Are your screenshots coming from the demo installation or your own personal one?

  Alex Tselegidis, Easy!Appointments Creator
  Need a customization? Contact me in person!

szekrenyigabor commented 3 years ago

Hi Alex, following the steps from my previous post, I made a screencast of the issue for you to see. Yes, it was recorded at demo.easyappointments.org, but the same happens in my own installation too.

Please have a look at the non-pubilc YouTube video at https://youtu.be/Fg2uoLDjzb0

Thank you, best regards: Gábor

JDeepix commented 3 years ago

Same problem here. Secretary AND Provider shows wrong last entry in List-View but not in Calender-View. Sysadmin shows all correct.

I'll look into the code. Hopefully I'll find something.

regards, Jens

  1. Try: Changing the fields "is_admin", "services", "users", "system_settings" of "Provider" in the table ea_roles to the same values as "Administrator" doesn't change anything. Also changing slug to "admin" produces errors. Changing the values all back to standard while the provider is still logged on, repairs the session AND doesn't show a wrong last day entry. Logout and Login with the provider and the error is there again. I guess it's something with slag in the backend_calendar_table_view.js. Can't find the error today though....
JDeepix commented 3 years ago

Problem already solved:

1023

One line helps. Would have never find that one :-) Thanks @winniae

alextselegidis commented 3 years ago

Thanks @JDeepix

@szekrenyigabor Can you please confirm this solves your problem?

  Alex Tselegidis, Easy!Appointments Creator
  Need a customization? Contact me in person!

szekrenyigabor commented 3 years ago

Yes, @winniae 's solution linked by @JDeepix solved the problem, thank you very much!

alextselegidis commented 3 years ago

Great, I'll merge this and release with 1.4.2

  Alex Tselegidis, Easy!Appointments Creator
  Need a customization? Contact me in person!