BSIT-3-1-APPDEV / PUPSRC-AutomatedElectionSystem

iVOTE is a web-based voting application developed for the student academic organizations of PUP Sta. Rosa Campus.
https://ivote-pupsrc.com
4 stars 8 forks source link

Activity Log #268

Closed Carl-Tabuso closed 1 month ago

Carl-Tabuso commented 1 month ago

This should close #255

Features:

Fix

Chore

Style

How to use

Code block - sample implementation

/*
 * This is a utility class for logging the activity of your page user.
 * You can configure the constants.php file located in includes directory
 * for additional actions and such.
 * To log the activity of your user, you can instantiate a new instance of
 * this class and pass the $role and $action arguments and then call the 
 * logActivity() method on your endpoint.
 * 
 * Example Usage using a superglobal session variable:
*/
 $logger = new Logger($_SESSION['role'], LOGIN);
 $logger->logActivity();

/*
 * You can also explicitly pass the role of your user as the argument.
 * Example: 
*/
 $logger = new Logger(ROLE_ADMIN, LOGIN);
 $logger->logActivity();

You may also check how it was implemented in the logout.php file here,

Student/Admin Interface

https://github.com/user-attachments/assets/e3026f3f-70fe-45c5-8677-29ebf5a768ed

Head Admin Interface

https://github.com/user-attachments/assets/10a5adab-d007-4a98-b4f6-453059e3d866

Responsiveness

https://github.com/user-attachments/assets/4eb0d6fe-fb12-4dd8-b6e3-340bcc24cbc9

Firefox Browser

https://github.com/user-attachments/assets/c522afc3-d396-4f76-9715-ecac96d44cd1

[!NOTE] In case your page/module requires user action that was not included in the constants.php feel free to modify it accordingly.

Carl-Tabuso commented 1 month ago

I forgot the sql for this. Give me a second.

I forgot the sql for this. Give me a second.

Here ya go: create-activitylog.txt

C-Ivan-Bandilla commented 1 month ago

While waiting for sql here is some ui issues on empty state when on 1440 px wide

https://drive.google.com/file/d/1t2M4eEHUDS1zafiesE8MOaRLp15NOF05/view?usp=sharing

Carl-Tabuso commented 1 month ago

While waiting for sql here is some ui issues on empty state when on 1440 px wide

https://drive.google.com/file/d/1t2M4eEHUDS1zafiesE8MOaRLp15NOF05/view?usp=sharing

Yep, i've been wrapping my head around about what's causing this issue but no luck. Will try to look for solution elsewhere.

C-Ivan-Bandilla commented 1 month ago

Here ya go: create-activitylog.txt

Tried downloading 3 times I think it is blank txt file

image

Carl-Tabuso commented 1 month ago

Tried downloading 3 times I think it is blank txt file

Can you try again: create-activitylog.txt

github-actions[bot] commented 1 month ago

:tada: This PR is included in version 2.34.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

Carl-Tabuso commented 1 month ago

For improvement: Fetch data asynchronously to reduce page load.