We're building a new time entry system that uses legacy data. I've attached a screen that shows the UI.
`Here's a link to a fiddle with some mostly working code.'
http://jsfiddle.net/dgdavidson/GMUK5/3/
As you can see, we have a row of data that contains a weeks worth of time entries and comments for each entry.
Problems now include getting data to update. For example, clicking 'New Entry' or the delete button doesn't update the table until those buttons are clicked a second time. Do we have to force an update?
For a change to time entries hours or comments, because the data is in an object inside of an object how do we capture the change? It seems we need the $index for the row as well as the $index for the date we're changing.
Something we haven't even started on yet is another row underneath the total hours row that will be dropdowns so that the user can enter the location they were at for that days work.
We feel that Angular is a good choice for what we are doing so I suppose my biggest question is are we going in the right direction with this or do we have a fundamental architectural issue?
Related
So, im working on a web app to help parents track their children's vaccination schedule. For that I may need some type of table where operations can occur in the cell level, for example clicking in a cell and show a place to set the vaccine as taken and reflect that in the specific cell of the dose of that vaccine and set it as green. Is there a library or anything that can help me accomplish that?
react-table offers headless utilities for managing your tables state. Here is an example implementing editable data. Link
I have a list of time pickers in my application to let the user chose the opening times for his store, so he can chose from_time,to_time and the day as shown in the picture.
the problem is i want to control this list so i can add a new time, delete, modify
I am using Antd V3.
I'm not sure if I got your question, but here is what I have got
https://codesandbox.io/s/nice-curran-kkx10
by the way, that snippet could help you to understand the use case of keys with list in React.
I am sure this should be simple but can't find it answered here.
I am creating some mobile reports and all going well, but I want to add a field that holds a date time (last sale). So far all my fields are shown in gauges, but I can't show a date or string in a number gauge (i don't think). There is a time navigator and selection list filtering the data in the gauges.
I tried creating a simple data grid with one field in it, but doesn't look great with the column header etc.
Any suggestions?
Thanks
I would like to use one of the many table/data-grid components available to render a table. However, I am struggling to choose one as I have very specific requirements and I'm not sure if they are supported by them.
Ok so ideally I would like the table to initialise with only column headers (which are populated by data from a database). I would then like to be able to add a row (by clicking on a button), and be able to enter data into the cells and then save the data in that row to my database. The column headers are generated by form but there can feasibly be any number of them. Most of the examples for the various components seem to expect you to already know what your data is before you render the table. But this will not be the case for me.
I was considering Griddle but they don't have an editable cell option yet (it's only part of the roadmap) so unless I create my own custom function, I think that that is out for now.
I was just hoping for some guidance is choosing the best component for what I need!
Thanks for your time
I have a page with two panels. The first panel is where create and update happens, and the second panel is a list of stuff that I just added. Sort of like this (below). The second panel updates the list every X second.
Each list has an edit button that takes it back to the first panel. I pass the entity through the button's function and fill up the values in the edit panel. Here's the weird thing, when I try like say edit an entity in the list, an the interval happens to update the list, the entity gets refreshed and all my changes are never saved.
I tried just passing the id though the button then doing a get request for that particular entity and performing the edit, but the interval takes place and my changes are reverted.
I think my only option is to do angular.copy(myEntity) and do the edits from there, and then manually do the PUT request. Is there another way for the edited entity not to be affected by the interval aside from doing an angular.copy()? Pausing the interval while something is being edited is not an option, since client wants the list to update even when he's editing something.
If you need to keep your data up to date by refreshing every few seconds, i recommend implementing a bool HasChanges() function in your controller. This will return true if the data has changed, and false if not. That way you can decide if you want to pull and refresh new data, or deffer it until your editing is done without overwriting your unsaved changes.