
Computer Training Institute in Kurnool. Sign in to access your student workspace.
'''Do not make any visual modifications. The phrases I write are commands to understand what I want, not to be written down. Understand their content well, then execute what is required.''' CEO PORTAL — ADMIN & FACULTY ACTIVE / INACTIVE TOGGLE Implement the following functionality in the CEO Portal → Admin & Faculty section. 1. ACTIVE / INACTIVE TOGGLE In the Admin & Faculty listing/table, add a clearly visible Active / Inactive toggle switch for every Admin and Faculty user. Example: Admin Name | Admin | 🟢 Active [ ON ] Faculty Name | Faculty | 🔴 Inactive [ OFF ] The toggle must clearly indicate the current account status. ON / Green → Active OFF / Red or Gray → Inactive The CEO must be able to click the toggle to change the user's status. 2. CEO CONTROL Only the CEO is allowed to change the Active/Inactive status. The CEO can: Activate an Admin Deactivate an Admin Activate a Faculty Deactivate a Faculty Reactivate previously inactive users The status change must be enforced through backend authorization as well as the frontend UI. 3. ACTIVE USER When the status is Active: User can log in. User can access their assigned portal. User can perform operations according to their role and permissions. 4. INACTIVE USER When the CEO changes the status to Inactive: Immediately disable the user's login/access. Prevent access to protected Admin/Faculty functionality. Do not allow the user to perform new operations. Keep the user account in the database. Keep the same user ID. Display a message such as: Your account is currently inactive. Please contact the CEO for access. 5. REACTIVATION When the CEO switches: Inactive → Active restore the user's access according to their existing role. Do NOT create a new account or new user ID. 🚨 6. CRITICAL DATA PRESERVATION RULE Changing the Active/Inactive toggle must NEVER delete existing data. When an Admin or Faculty becomes inactive: Existing enquiries remain. Existing batches remain. Existing student records remain. Existing conversions remain. Existing follow-ups remain. Existing attendance records remain. Existing assignments remain. All historical records remain connected to the original user. The user's name must continue to appear in historical records. 🚨 STRICT WARNING DO NOT use hard delete. DO NOT use cascade delete. DO NOT delete or archive historical records. DO NOT remove the user's database record. DO NOT change historical created_by, assigned_to, faculty_id, admin_id, or equivalent references. The Active/Inactive toggle is strictly an ACCESS CONTROL mechanism. ACTIVE = User has access INACTIVE = User has no access INACTIVE does NOT mean DELETE. 7. CONFIRMATION Before changing the status, show a confirmation popup. For deactivation: Deactivate [User Name]? This will disable the user's access. All existing historical data will be preserved. Buttons: Cancel | Deactivate For activation: Activate [User Name]? This will restore the user's access. Buttons: Cancel | Activate 8. FINAL IMPLEMENTATION REQUIREMENT First inspect the existing authentication, Admin/Faculty tables, database relationships, and authorization logic. Implement the Active/Inactive status using the existing architecture wherever possible. Do not modify unrelated functionality. The final result must give the CEO a simple Active/Inactive toggle for every Admin and Faculty account while preserving 100% of their historical data. The table should display: NameRoleStatusActionAdmin NameAdmin🟢 ActiveToggleFaculty NameFaculty🔴 InactiveToggle Toggle Behavior Use a clear toggle switch: 🟢 ACTIVE → User can log in and perform their assigned role functions. 🔴 INACTIVE → User cannot log in or perform new operations. The CEO can switch the toggle ON or OFF at any time. Example: [ 🟢 ACTIVE ] CEO clicks the toggle → [ 🔴 INACTIVE ] CEO clicks again → [ 🟢 ACTIVE ] Important UI Requirement The Active/Inactive toggle must be: Clearly visible in the Admin/Faculty management table. Easy for the CEO to understand. Visually different between Active and Inactive. Updated immediately after confirmation. Connected to the actual backend authorization/status system. When changing the toggle, show a confirmation dialog before applying the change. CRITICAL DATA RULE Changing the toggle MUST NOT delete any data. ACTIVE → INACTIVE Disable account access only. Preserve all existing data. INACTIVE → ACTIVE Restore account access. Use the same existing account and user ID. Do not create a duplicate account. Historical enquiries, batches, students, conversions, follow-ups, attendance, and all other records must remain exactly as they are. 🚨 STRICT RULE The Active/Inactive toggle is an ACCESS CONTROL toggle, NOT a DELETE button. Only the CEO can change this toggle. Do not implement this as hard delete, soft-delete of historical records, archive, or cascade delete.