fix: tidy the Employees list columns and export

- Show "Joined <date>" as the main text in the Date column, with the
  employee type below it (was the other way around)
- Hide the raw status column from the list; the Employment badge
  already shows Active / Inactive
- Drop the duplicate status column from the employee Excel export

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
vamsi.balaga 2026-11-02 16:34:11 +05:30
parent 5dead10c22
commit b8f50efaf0
2 changed files with 9 additions and 6 deletions

View File

@ -357,10 +357,10 @@ export const EMPLOYEE_RICH_COLUMNS = [
{ key: 'contact', label: 'Contact', title: ['email'], subtitle: ['phone'] }, { key: 'contact', label: 'Contact', title: ['email'], subtitle: ['phone'] },
{ key: 'role', label: 'Role', title: ['designation'], subtitle: ['department'] }, { key: 'role', label: 'Role', title: ['designation'], subtitle: ['department'] },
{ {
key: 'type', key: 'date',
label: 'Type', label: 'Date',
title: ['Employee type'], title: [{ label: 'joining_date', prefix: 'Joined' }],
subtitle: [{ label: 'joining_date', prefix: 'Joined' }], subtitle: ['Employee type'],
}, },
] ]
@ -390,7 +390,11 @@ export async function fetchEmployeeListPage(templateUid, query = {}) {
.map((row) => ({ ...row, employment: isEndState(row) ? 'Inactive' : 'Active' })) .map((row) => ({ ...row, employment: isEndState(row) ? 'Inactive' : 'Active' }))
.filter((row) => filter === 'all' || row.employment.toLowerCase() === filter) .filter((row) => filter === 'all' || row.employment.toLowerCase() === filter)
const fields = config?.fields ?? [] // The view's own "status" column isn't wanted in the list — the derived
// Employment badge below already shows each row's Active / Inactive state.
const fields = (config?.fields ?? []).filter(
(c) => ![c.field_key, c.output_label].some((l) => normLabel(l) === 'status'),
)
const totalPages = Math.max(1, Math.ceil(data.length / limit)) const totalPages = Math.max(1, Math.ceil(data.length / limit))
return { return {
config: { ...config, fields: [...fields, EMPLOYMENT_COLUMN] }, config: { ...config, fields: [...fields, EMPLOYMENT_COLUMN] },

View File

@ -143,7 +143,6 @@ export const EMPLOYEE_EXPORT_COLUMNS = [
'department', 'department',
'designation', 'designation',
'joining_date', 'joining_date',
'status',
'created_at', 'created_at',
'updated_at', 'updated_at',
] ]