diff --git a/resources/views/pages/activities-attended/index.blade.php b/resources/views/pages/activities-attended/index.blade.php
index 59f251c..5e95a3f 100644
--- a/resources/views/pages/activities-attended/index.blade.php
+++ b/resources/views/pages/activities-attended/index.blade.php
@@ -7,10 +7,10 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -87,7 +178,7 @@
@@ -159,7 +250,7 @@
-
@@ -448,6 +539,144 @@
// Initialize the data table
initAjaxRoute(dataRoute);
+
+ // Function to toggle column visibility
+ function toggleColumnVisibility() {
+ $('.column-checkbox').each(function() {
+ const columnIndex = $(this).val();
+ const isChecked = $(this).is(':checked');
+
+ // Show or hide the column based on checkbox state
+ table.column(columnIndex).visible(isChecked);
+ });
+
+ // Adjust table layout to prevent horizontal scrolling
+ table.columns.adjust().responsive.recalc();
+ }
+
+ // Attach change event listener to checkboxes
+ $('.column-checkbox').off('change').on('change', function() {
+ toggleColumnVisibility();
+ });
+
+ // Ensure "Actions" column is always visible
+ $('#column-actions').prop('disabled', true);
+
+ // Initial call to set column visibility
+ toggleColumnVisibility();
});
+
+
+
+
+
@endsection
\ No newline at end of file