YaleSTC / shifts

Application to easily track shifts, reports, and payforms for employees.
MIT License
23 stars 18 forks source link

Sign-up for a time-slot only available through "sign up" text #335

Closed shippy closed 9 years ago

shippy commented 10 years ago

Expected behavior: as a non-superuser who is being offered a timeslot, I should be able to click anywhere in the sign-up area to trigger a sign-up dialogue. (IIRC the initial time also reflected where in the field I clicked, but I might be misremembering.)

Current behavior: only clicking the "sign up" text gets me to a new shift form with the first available time. Clicking anywhere else doesn't do anything.

This should be a simple UX fix.

jiggoha commented 10 years ago

image

thomasweng15 commented 10 years ago

Jay, how did you create that time slot? I am getting an error when trying to create a new time slot using /timeslots/new on a calendar: 2 error(s) on assignment of multiparameter attributes. Can anyone repro? I briefly checked issues and didn't find a reference to this issue.

thomasweng15 commented 10 years ago

^ I was on the wrong branch (rails-3.2) and now that I have switched to master time slot creation is working for me.

thomasweng15 commented 10 years ago

image

Got the basic functionality for the tooltip on the Shifts schedule working! @njlxyaoxinwei and I worked on it tonight. I branched off of 371_timeslots so I won't make a pull request until PR380 is merged, but you can review the changes on 335_shift_schedule_tooltips.

thomasweng15 commented 10 years ago

Also fixed the edit existing shift tooltip (when you click on an existing shift) so that it both appears and saves properly. The commit has been pushed up to the same branch.

There are still some problems that need to be fixed. In order of priority:

  1. If you make a validation error while making or editing, errors do not appear properly and throw an error.
  2. For a new shift, the time displayed in the tooltip does not match the area in the schedule on which you clicked.
  3. Alerts for successful shift updating / creating appear as default alerts instead of the styled alerts that appear in the test site.
  4. I'm sure there are more problems. But we are making progress!
njlxyaoxinwei commented 9 years ago

As of now on branch 335, tooltip.js for shifts schedule box is restored to the following status:

(Updated by @shippy to include checkboxes)

shippy commented 9 years ago

If I understand this correctly, the work that @njlxyaoxinwei and @thomasweng15 did here fixes (a) this issue, (b) issue #253.

shippy commented 9 years ago

The issue @jiggoha and I are running into is a MySQL "Incorrect datetime value" error in recurring shift creation: the date that seems to be entered by ActiveRecord (?) is 'YYYY-MM-DD HH-mm-ss UTC', where the UTC should not be there.

shippy commented 9 years ago

Creating a new non-recurring shift from tooltip fails to save the shift. No errors appear in the JS developer console; no action appears in the Rails console. Selecting "power signup" does result in creating a shift, but that's not a tenable solution.

shippy commented 9 years ago

Never mind: resetting my environment gets rid of the error on my machine, so maybe @jiggoha's is just messed up. Creating a PR for the 335 branch so that we can comment on the code directly.

thomasweng15 commented 9 years ago

Regarding @njlxyaoxinwei 's last comment, I manually tested signing in and it seems to work fine.

shippy commented 9 years ago

Managed to destroy recurring shift, so checking that off as well.

shippy commented 9 years ago

Sign-in button and shift report display via tooltip work as well.

shippy commented 9 years ago

I think that we'll leave the error messages to be solved at a later date, and will solve it explicitly under #383.