0

I'm new to Laravel and trying to solve an Edit/View table cell issue.

I'd like to create a table that shows live data and can be edited on a cell by cell basis.

Example: property_name comes from Availability belongsTo Property room_name populates from Availability Resource

The dates are start_date from each Availability returned within the Collection

the cells under the dates are a single Availability showing a status. on click I'd like a model to popup with a short form to edit certain fields of that Availability.

Table headings:

Property Name | Room Name | 10/10/2020 | 17/10/2020 | 26/10/2020
Property A      Room A      Available     Booked       Hold
Property A      Room B      Hold          Available    Booked 
Property A      Room C      Hold          Booked       Available

I've not seen any examples of this online - everything is normally laid out in a row per Availability, but for me, it will be a Cell per Availability.

Criteria:

  1. Has to live update and ideally show a locked status on a cell(if the cell is being edited.)
  2. Update each Availability per Cell not per row - on cell click shows a model with a few properties to edit
  3. Start date headings to pull in for those start_dates available within query

I've had a look at Bootstrap Vue and Laravel DataTables but not quite sure they can be used on a cell by cell basis rather than row?

Thanks for your thoughts!

Mujahid Bhoraniya
  • 1,518
  • 10
  • 22
awkwrd
  • 43
  • 9
  • there is a example of edit live table in php , you can follow that https://www.9lessons.info/2011/03/live-table-edit-with-jquery-and-ajax.html – Lalit Kumar Mar 13 '20 at 11:21
  • This doesn't have anything specifically related to Laravel. As long as you manage frontend part with JS or jQuery, you will get way around to communicate to the backend part. – S K R Mar 13 '20 at 12:31
  • 1
    You may use Yajra DataTables that is designed for Laravel – S K R Mar 13 '20 at 12:32
  • @SKR I had a look at the Laravel Datatables doc's I'm happy following them but it's the implementation of the column orders and cell per Resource item that I'm needing a bit of input on really.. however if you think that would be a solution I'll start down that journey and see where I get to with their demo – awkwrd Mar 13 '20 at 12:39
  • 1
    You can manage them by rendering the table contents at the backend(You can set headers, contents, action buttons, text fields, dropdowns etc rendered in the backend). Yajra DataTable has a beautiful concept and is so easy to make dynamic tables and contents. You only need the data updation part to be implemented at the frontend(just bind events to the elements and you are good to go). – S K R Mar 13 '20 at 12:47
  • Thank you @SKR - appreciated – awkwrd Mar 13 '20 at 12:57

0 Answers0