diff --git a/assets/css/custom.css b/assets/css/custom.css index b9b0cca..e4322e1 100644 --- a/assets/css/custom.css +++ b/assets/css/custom.css @@ -520,4 +520,5 @@ body { .sidebar .collapse .nav-link:hover, .sidebar .collapse .nav-link.active { color: #fff; -} \ No newline at end of file +} +.group-meetings { color: #20c997 !important; } /* Teal */ diff --git a/db/migrations/016_split_mailbox_tables.sql b/db/migrations/015_split_mailbox_tables.sql similarity index 100% rename from db/migrations/016_split_mailbox_tables.sql rename to db/migrations/015_split_mailbox_tables.sql diff --git a/db/migrations/027_add_meeting_module.sql b/db/migrations/027_add_meeting_module.sql new file mode 100644 index 0000000..12c2535 --- /dev/null +++ b/db/migrations/027_add_meeting_module.sql @@ -0,0 +1,16 @@ +CREATE TABLE IF NOT EXISTS `meetings` ( + `id` INT AUTO_INCREMENT PRIMARY KEY, + `title` VARCHAR(255) NOT NULL, + `description` TEXT, + `start_time` DATETIME NOT NULL, + `end_time` DATETIME NOT NULL, + `location` VARCHAR(255), + `status` ENUM('scheduled', 'completed', 'cancelled') DEFAULT 'scheduled', + `created_by` INT, + `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + FOREIGN KEY (`created_by`) REFERENCES `users`(`id`) ON DELETE SET NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- Add permissions for existing admins +INSERT IGNORE INTO `user_permissions` (`user_id`, `page`, `can_view`, `can_add`, `can_edit`, `can_delete`) +SELECT `id`, 'meetings', 1, 1, 1, 1 FROM `users` WHERE `role` = 'admin' OR `is_super_admin` = 1; diff --git a/db/migrations/028_expand_meetings_table.sql b/db/migrations/028_expand_meetings_table.sql new file mode 100644 index 0000000..4c8da91 --- /dev/null +++ b/db/migrations/028_expand_meetings_table.sql @@ -0,0 +1,5 @@ +ALTER TABLE `meetings` +ADD COLUMN `agenda` TEXT AFTER `description`, +ADD COLUMN `attendees` TEXT AFTER `location`, +ADD COLUMN `absentees` TEXT AFTER `attendees`, +ADD COLUMN `meeting_details` TEXT AFTER `absentees`; diff --git a/includes/header.php b/includes/header.php index 7adaa3e..7eb39e6 100644 --- a/includes/header.php +++ b/includes/header.php @@ -133,6 +133,9 @@ $is_stock_open = in_array($cp, $stock_pages); $expenses_pages = ['expenses.php', 'expense_categories.php', 'expense_reports.php']; $is_expenses_open = in_array($cp, $expenses_pages); +$meetings_pages = ['meetings.php']; +$is_meetings_open = in_array($cp, $meetings_pages); + $admin_pages = ['index.php', 'users.php', 'charity-settings.php']; $is_admin_open = in_array($cp, $admin_pages); ?> @@ -527,6 +530,27 @@ $is_admin_open = in_array($cp, $admin_pages); + + + + +