Code Monkey home page Code Monkey logo

scheduler's People

Contributors

batailleye avatar christinelu avatar helenaut avatar sheelc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

scheduler's Issues

Rules preventing update of event

Rules logic prevents adding a day to the segment for nurse 1 (the nurse 1 after one runs: rake db:reset_and_seed). The error I get is: "Max day You have selected a day that has no more availability"

Flash: iterate over set flash values

For ordering purposes. rx recommended it?? idk if it's actually necessary at this stage.

sheel: It's a pretty easy fix with the code we have, just throw in a .sort before the .each and the ordering will always be the same.

AdminController#upload crashes with invalid unit

The page crashes when params[:admin][:unit] is either nil or contains an id that does not correspond to an actual unit. Similarly, a check for the shift validity is also probably necessary to make sure that params[:admin][:shift] is one of Unit.shifts.

Flash[:error] isn't displaying for AdminController#upload

I think it's because at the beginning of upload, you initialize flash[:error] to an empty array. Basically, you are:

  1. setting flash[:error] to an empty array
  2. adding error messages to flash[:error]
  3. redirecting
  4. setting flash[:error] to an empty array upon redirect

so the flash[:error] is always an empty array.

a fix I did was getting rid of flash[:error] = [] and instead checking to see if flash[:error] existed every time you added an error message. I think this method isn't very DRY so you're probably better off thinking of another solution.

NurseController possible security risks.

Risk 1

line 50 event = Event.new(params[:event]) because of mass assignment w/out attr accessible.

Risk 2

potentially malicious - not sure:
line 10 @event_strips = Event.event_strips_for_month(@shown_month, :include => :nurse, :conditions => "nurses.unit_id = #{@unit_id} and nurses.shift = '#{@shift}'")
UPDATE: rx says potentially malicious; change it to the '?' notation

Admin upload page needs instructions

Admin upload page needs instructions that include:

  • Files can be xls or xlsx
  • There must be a header row
  • Which columns are required (found through Nurse.required_columns)
  • Which columns can be optionally included (found through Nurse.optional_columns)
  • Columns can be in any order
  • Additional columns that are included will be ignored

Perhaps this could be a popup with a link for instructions as to not clutter the page? Or a link to another page? Or maybe just on the same page?

Calendar Controller should redirect to the month/year previously on

After deleting a vacation segment, the calendar controller will default back to the current month/year instead of the month/year that was being viewed. There are other examples of the same behavior such as when clicking edit vacation segment and then clicking back to calendar.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.