c
This commit is contained in:
@@ -861,6 +861,10 @@ export function createAdminRoutes(context) {
|
||||
const candidates = db.candidateProfiles.filter(profile => profileInScope(user, profile)).map(profile => {
|
||||
const instance = pendingWorkflow(db, 'profile_change', profile.id) || db.workflowInstances.filter(item => item.businessType === 'profile_change' && item.businessId === profile.id)[0];
|
||||
const account = db.users.find(item => item.id === profile.userId);
|
||||
const registrations = db.registrations
|
||||
.filter(item => item.userId === profile.userId)
|
||||
.map(item => examRegistrationView(db, item))
|
||||
.sort((left, right) => new Date(right.createdAt || 0) - new Date(left.createdAt || 0));
|
||||
return {
|
||||
...profile,
|
||||
idNumberMasked: profile.idNumber.startsWith('PENDING-') ? '待考生补充' : maskId(profile.idNumber),
|
||||
@@ -870,6 +874,7 @@ export function createAdminRoutes(context) {
|
||||
accountArchived: Boolean(account?.archivedAt),
|
||||
archivedAt: account?.archivedAt || null,
|
||||
archivedByName: db.users.find(item => item.id === account?.archivedBy)?.displayName || '',
|
||||
registrations,
|
||||
workflow: workflowView(db, instance)
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user