Day 25 at Stafify: Validating User Actions and Enhancing Visual Feedback

Today I focused on implementing features that validate user actions and provide clearer visual feedback throughout the system. These changes make the platform more intuitive while maintaining data integrity.

One of my major achievements was implementing a trigger that automatically updates shift statuses upon completion. This trigger runs at scheduled intervals to check if the current time has passed a shift’s end time, and if so, changes the status from “Ongoing” to “Completed.” Previously, shift statuses would remain static unless manually updated, which led to inaccurate reporting and confusion about which shifts were actually active. This automation ensures that shift statuses always reflect reality without requiring constant manual updates.

I also enhanced our clock-in and clock-out validation to check against assigned shifts. The system now verifies whether an employee attempting to clock in actually has a shift scheduled for the current time. If they don’t, they receive a clear notification explaining why the action can’t be completed. For clock-out attempts, the system confirms that the employee has previously clocked in and that the shift hasn’t already been marked as completed. These validations prevent common errors like accidental double clock-ins or clock-outs for non-existent shifts that had been cluttering our attendance data.

The most visible improvement I made today was finalizing the shift status indicator in both weekly and monthly calendar views. Each shift now displays with a color-coded indicator that instantly communicates its status—green for ongoing, blue for upcoming, red for missed, and gray for completed. This visual enhancement makes it much easier for managers to assess the current state of operations at a glance without having to dig into individual shift details. I ensured the indicators are consistent across different views and devices, so users get the same visual experience regardless of how they access the calendar.

To implement these features, I had to coordinate changes across several interconnected components:

  • Writing Apps Script functions that listen for time-based triggers
  • Modifying the validation logic in the clock-in/out functions
  • Updating the CSS and HTML templates for the calendar views
  • Ensuring the status changes properly sync with Google Calendar events

While none of these tasks was particularly complex on its own, ensuring they all worked together seamlessly required careful integration testing. By the end of the day, I had a fully functioning system that provides both automated updates and clear visual feedback for all shift-related activities.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.
© 2025 Andrea Anne Orca. All Rights Reserved.