diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 96ca1bb..c0af0aa 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -211,3 +211,18 @@ def setup_scheduled_tasks(sender, **kwargs): ``` Now, the message will be printed every 15 minutes. + +### Common Debugging Techniques + +To see how the DataTables framework parses your data, you can use the following snippet (adapted from DataTables [docs](https://datatables.net/reference/api/row().data()#Examples)): + +```{javascript} +$(document).ready(function () { +... + $('#data tbody').on('click', 'tr', function () { + console.log(table.row(this).data()); + }); +... +``` + +This can be useful when setting up and modifying your table's configuration, especially with regards to searching and ordering. \ No newline at end of file diff --git a/dashboard/src/t5gweb/static/js/table.js b/dashboard/src/t5gweb/static/js/table.js index f863939..d84549a 100644 --- a/dashboard/src/t5gweb/static/js/table.js +++ b/dashboard/src/t5gweb/static/js/table.js @@ -151,7 +151,7 @@ $(document).ready(function () { label: "Cases on Prio-list or Watchlist or Crit Sit", value: function (rowData, rowIdx) { return ( - rowData[3] === "Yes" || + rowData[3].includes("Yes") || rowData[4] === "Yes" || rowData[5] === "Yes" );