Include personal/address/emergency columns in financial export employees.csv
Validate / validate (push) Successful in 25s
Validate / validate (push) Successful in 25s
Extends the employees.csv builder to include all 14 new fields (DOB, gender, nationality, marital status, full Thai address, emergency contact). Order matches the on-screen detail page so auditors and accountants get the complete record. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -171,7 +171,14 @@ export async function buildFinancialExport(
|
||||
[
|
||||
'id', 'employeeCode', 'firstName', 'lastName', 'displayName', 'email', 'phone',
|
||||
'position', 'department', 'hireDate', 'terminationDate', 'nationalId', 'taxId',
|
||||
'bankName', 'bankAccount', 'isActive', 'deletedAt', 'createdAt', 'updatedAt'
|
||||
'bankName', 'bankAccount',
|
||||
// Personal
|
||||
'dateOfBirth', 'gender', 'nationality', 'maritalStatus',
|
||||
// Address
|
||||
'addressLine1', 'addressLine2', 'subdistrict', 'district', 'province', 'postalCode', 'country',
|
||||
// Emergency contact
|
||||
'emergencyContactName', 'emergencyContactPhone', 'emergencyContactRelationship',
|
||||
'isActive', 'deletedAt', 'createdAt', 'updatedAt'
|
||||
]
|
||||
];
|
||||
for (const e of employeeRows) {
|
||||
@@ -180,6 +187,10 @@ export async function buildFinancialExport(
|
||||
e.email ?? '', e.phone ?? '', e.position ?? '', e.department ?? '',
|
||||
e.hireDate, e.terminationDate ?? '', e.nationalId ?? '', e.taxId ?? '',
|
||||
e.bankName ?? '', e.bankAccount ?? '',
|
||||
e.dateOfBirth ?? '', e.gender ?? '', e.nationality ?? '', e.maritalStatus ?? '',
|
||||
e.addressLine1 ?? '', e.addressLine2 ?? '', e.subdistrict ?? '', e.district ?? '',
|
||||
e.province ?? '', e.postalCode ?? '', e.country ?? '',
|
||||
e.emergencyContactName ?? '', e.emergencyContactPhone ?? '', e.emergencyContactRelationship ?? '',
|
||||
e.isActive, e.deletedAt ? e.deletedAt.toISOString() : '',
|
||||
e.createdAt.toISOString(), e.updatedAt.toISOString()
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user