feat(time-off): Reset approval when staff edits approved request
- Add pre_save signal to track changes to approved time blocks - Reset to PENDING status when staff modifies approved time-off - Send re-approval notifications to managers with changed fields - Update email templates for modified requests - Allow managers to have self-approval permission revoked (default: allowed) A changed request is treated as a new request requiring re-approval. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -57,7 +57,8 @@ const NotificationDropdown: React.FC<NotificationDropdownProps> = ({ variant = '
|
||||
}
|
||||
|
||||
// Handle time-off request notifications - navigate to time blocks page
|
||||
if (notification.data?.type === 'time_off_request') {
|
||||
// Includes both new requests and modified requests that need re-approval
|
||||
if (notification.data?.type === 'time_off_request' || notification.data?.type === 'time_off_request_modified') {
|
||||
navigate('/time-blocks');
|
||||
setIsOpen(false);
|
||||
return;
|
||||
@@ -79,8 +80,8 @@ const NotificationDropdown: React.FC<NotificationDropdownProps> = ({ variant = '
|
||||
};
|
||||
|
||||
const getNotificationIcon = (notification: Notification) => {
|
||||
// Check for time-off request type in data
|
||||
if (notification.data?.type === 'time_off_request') {
|
||||
// Check for time-off request type in data (new or modified)
|
||||
if (notification.data?.type === 'time_off_request' || notification.data?.type === 'time_off_request_modified') {
|
||||
return <Clock size={16} className="text-amber-500" />;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user