Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82294

Editor - Using 'Edit' to make new rows on separate table

$
0
0

I will freely admit, I expect this is a silly question. I don't have any expectation that DataTables would (or should) cater to the scenario it involves. Frankly, DT already goes above and beyond the call of duty in so many places, that expecting it to do this would simply be churlish. Having already worked out what I am going to do, I'm asking simply out of technical curiousity - is there actually any way of using DT to do this?

Disclaimers out of the way, question follows:

User A submits a request to use X number of item Y for a certain amount of time. That request goes on to the Requests table, where it is later approved by User B, who is the owner of item Y. Once approved, the request is turned into a Record on the Bookings table, where User B can edit it as they please, being the lord and master over all the items they survey.

User A, however, cannot directly edit their own booking. Should they want X number of item Y for longer, or X+3 of it, they must submit a request to User B to adjust the booking accordingly. This will go to the Requests table, linked to the original booking, so that when User B approves the change, the original booking can be updated.

In terms of interface design, it would be ideal if User A could able to click 'Edit' on their Booking record, have little form appear pre-filled with the existed values to be adjusted, without actually editing that table. Instead, they would be putting a record on the Requests table and returning little messages to say "Hey, you've put in a request for an edit, User B will look at it soon." or "Hey, you can't book that much of item Y!" etc without touching the data in Bookings.

Now, obviously, the whole point of DataTables is to edit the table you've populated it with. Clicking on a row, pressing edit and ending up not doing anything at all to said row is a bit outside the comfort zone. But, like I said, curious.


Viewing all articles
Browse latest Browse all 82294

Trending Articles