feat(election): audit log — add DIRECTOR_APPOINTMENT and COMMITTEE entity types with full action coverage
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
83e9fc9e68
commit
3e51eae4b5
@@ -80,7 +80,22 @@ const DETAIL_LABELS: Record<string, string> = {
|
|||||||
winner: 'Winner',
|
winner: 'Winner',
|
||||||
votes: 'Votes',
|
votes: 'Votes',
|
||||||
candidate: 'Candidate',
|
candidate: 'Candidate',
|
||||||
previousVotes: 'Previous Votes'
|
previousVotes: 'Previous Votes',
|
||||||
|
// Director appointment
|
||||||
|
designation: 'Designation',
|
||||||
|
tenureStart: 'Tenure Start',
|
||||||
|
tenureEnd: 'Tenure End',
|
||||||
|
resolutionNo: 'Resolution No',
|
||||||
|
appointmentDate: 'Appointment Date',
|
||||||
|
status: 'Status',
|
||||||
|
expiredCount: 'Expired Count',
|
||||||
|
date: 'Date',
|
||||||
|
// Committee
|
||||||
|
name: 'Name',
|
||||||
|
committeeId: 'Committee ID',
|
||||||
|
members: 'Members',
|
||||||
|
addedIds: 'Added IDs',
|
||||||
|
removedAppointmentId: 'Removed Appointment ID'
|
||||||
};
|
};
|
||||||
|
|
||||||
const ACTION_META: Record<string, { label: string; icon: string; color: string }> = {
|
const ACTION_META: Record<string, { label: string; icon: string; color: string }> = {
|
||||||
@@ -128,7 +143,20 @@ const ACTION_META: Record<string, { label: string; icon: string; color: string }
|
|||||||
MANUAL_VOTE_ENTRY_FAILED: { label: 'Vote Entry Failed', icon: 'error_outline', color: '#dc2626' },
|
MANUAL_VOTE_ENTRY_FAILED: { label: 'Vote Entry Failed', icon: 'error_outline', color: '#dc2626' },
|
||||||
// Results
|
// Results
|
||||||
DECLARE_RESULTS: { label: 'Results Declared', icon: 'gavel', color: '#7c3aed' },
|
DECLARE_RESULTS: { label: 'Results Declared', icon: 'gavel', color: '#7c3aed' },
|
||||||
DECLARE_RESULTS_FAILED: { label: 'Declare Results Failed', icon: 'error_outline', color: '#dc2626' }
|
DECLARE_RESULTS_FAILED: { label: 'Declare Results Failed', icon: 'error_outline', color: '#dc2626' },
|
||||||
|
// Director Appointment
|
||||||
|
APPOINT_DIRECTOR: { label: 'Director Appointed', icon: 'person_check', color: '#16a34a' },
|
||||||
|
UPDATE_DIRECTOR_APPOINTMENT: { label: 'Appointment Updated', icon: 'manage_accounts', color: '#2563eb' },
|
||||||
|
REMOVE_DIRECTOR_APPOINTMENT: { label: 'Director Removed', icon: 'person_remove', color: '#dc2626' },
|
||||||
|
APPOINT_DIRECTOR_FAILED: { label: 'Appoint Failed', icon: 'error_outline', color: '#dc2626' },
|
||||||
|
UPDATE_DIRECTOR_APPOINTMENT_FAILED: { label: 'Update Appointment Failed', icon: 'error_outline', color: '#dc2626' },
|
||||||
|
REMOVE_DIRECTOR_APPOINTMENT_FAILED: { label: 'Remove Appointment Failed', icon: 'error_outline', color: '#dc2626' },
|
||||||
|
// Committee
|
||||||
|
CREATE_COMMITTEE: { label: 'Committee Created', icon: 'groups', color: '#16a34a' },
|
||||||
|
UPDATE_COMMITTEE: { label: 'Committee Updated', icon: 'edit_note', color: '#2563eb' },
|
||||||
|
DISSOLVE_COMMITTEE: { label: 'Committee Dissolved', icon: 'group_off', color: '#dc2626' },
|
||||||
|
ADD_COMMITTEE_MEMBER: { label: 'Member Added', icon: 'group_add', color: '#0891b2' },
|
||||||
|
REMOVE_COMMITTEE_MEMBER: { label: 'Member Removed', icon: 'person_off', color: '#d97706' }
|
||||||
};
|
};
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -170,7 +198,9 @@ export class ElectionAuditLogComponent implements OnInit, OnDestroy {
|
|||||||
'NOMINATION',
|
'NOMINATION',
|
||||||
'CANDIDATE',
|
'CANDIDATE',
|
||||||
'VOTE',
|
'VOTE',
|
||||||
'RESULT'
|
'RESULT',
|
||||||
|
'DIRECTOR_APPOINTMENT',
|
||||||
|
'COMMITTEE'
|
||||||
];
|
];
|
||||||
readonly pageSizeOptions = [
|
readonly pageSizeOptions = [
|
||||||
10,
|
10,
|
||||||
@@ -225,6 +255,21 @@ export class ElectionAuditLogComponent implements OnInit, OnDestroy {
|
|||||||
RESULT: [
|
RESULT: [
|
||||||
'DECLARE_RESULTS',
|
'DECLARE_RESULTS',
|
||||||
'DECLARE_RESULTS_FAILED'
|
'DECLARE_RESULTS_FAILED'
|
||||||
|
],
|
||||||
|
DIRECTOR_APPOINTMENT: [
|
||||||
|
'APPOINT_DIRECTOR',
|
||||||
|
'UPDATE_DIRECTOR_APPOINTMENT',
|
||||||
|
'REMOVE_DIRECTOR_APPOINTMENT',
|
||||||
|
'APPOINT_DIRECTOR_FAILED',
|
||||||
|
'UPDATE_DIRECTOR_APPOINTMENT_FAILED',
|
||||||
|
'REMOVE_DIRECTOR_APPOINTMENT_FAILED'
|
||||||
|
],
|
||||||
|
COMMITTEE: [
|
||||||
|
'CREATE_COMMITTEE',
|
||||||
|
'UPDATE_COMMITTEE',
|
||||||
|
'DISSOLVE_COMMITTEE',
|
||||||
|
'ADD_COMMITTEE_MEMBER',
|
||||||
|
'REMOVE_COMMITTEE_MEMBER'
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -9,8 +9,8 @@
|
|||||||
/* tslint:disable */
|
/* tslint:disable */
|
||||||
export default {
|
export default {
|
||||||
'mifos_x': {
|
'mifos_x': {
|
||||||
'version': '260701',
|
'version': '260703',
|
||||||
'hash': 'f2f2338c'
|
'hash': 'a4423877'
|
||||||
},
|
},
|
||||||
'allow_switching_backend_instance': true
|
'allow_switching_backend_instance': true
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user