SET @admin_role_id := (SELECT `id` FROM ohrm_user_role WHERE `name` = 'Admin');
SET @supervisor_role_id := (SELECT `id` FROM ohrm_user_role WHERE `name` = 'Supervisor');

SET @module_id := (SELECT id from ohrm_module where name = 'report');

INSERT INTO ohrm_screen (`name`, `module_id`, `action_url`) VALUES
('Employee Turnover Termination Report', @module_id, 'displayEmployeeTurnoverTerminationReportCriteria');

SET @employee_termination_report_screen_id := (SELECT LAST_INSERT_ID());

INSERT INTO ohrm_screen (`name`, `module_id`, `action_url`) VALUES
('Employee Turnover Hiring Report', @module_id, 'displayEmployeeTurnoverHiringReportCriteria');

SET @employee_hiring_report_screen_id := (SELECT LAST_INSERT_ID());

INSERT INTO ohrm_screen (`name`, `module_id`, `action_url`) VALUES
('Head Count Report', @module_id, 'displayHeadCountReportCriteria');

SET @employee_head_count_report_screen_id := (SELECT LAST_INSERT_ID());

INSERT INTO ohrm_screen (`name`, `module_id`, `action_url`) VALUES
('License Expiry Report', @module_id, 'displayLicenseExpiryReportCriteria');

SET @employee_license_expiry_report_screen_id := (SELECT LAST_INSERT_ID());

INSERT INTO ohrm_user_role_screen (user_role_id, screen_id, can_read, can_create, can_update, can_delete) VALUES
(@admin_role_id, @employee_termination_report_screen_id, 1, 0, 0, 0),
(@admin_role_id, @employee_hiring_report_screen_id, 1, 0, 0, 0),
(@admin_role_id, @employee_head_count_report_screen_id, 1, 0, 0, 0),
(@admin_role_id, @employee_license_expiry_report_screen_id, 1, 0, 0, 0);

