I have just started using jqgrid on a different project and am loving it.
But I am wondering if I am doing it the hard way with this project.
(I've redesigned the database twice already, but I have a hunch it's still wrong, and that may be my real problem.)
The user is supposed to be able to fill out a timesheet, something like the one pictured below, with dates along the top and project numbers along the side:

The 3 columns within each date column are for recording regular time worked or two kinds of overtime. When a new week starts they will see a blank grid and begin entering the project on which they are working, and what kind of hours on what days they worked. Throughout the week they will return to it and add or edit their work hours.
The database has fields: id, lineid, projectid, workdate, regulartime, overtime, bankedtime, employeeid (plus some others).
As you can see, a unique line of data in my database doesn't coincide with a line of data on the form. For example, the 3 green cells would be from one db entry, which holds the date, project id and times worked.
I can imagine writing the looping php/mysql code to extract the data manually into the xml necessary for jqgrid to build this form very nicely, but it seems like my php code is doing all the work, and when it comes to editing a cell or a line, I'll be writing all the code and loops and not really using the power and elegance of jqgrid.
Am I missing something obvious?
Am I barking up the wrong tree?
Is there an elegant way to do this?
(By the way, my bosses don't seem to think that the layout of the input form should be changed.)
Thanks for any help, criticism, suggestions or ideas you all have!
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top