diff --git a/src/api/employees.js b/src/api/employees.js index e6e38ce..d7c99cd 100644 --- a/src/api/employees.js +++ b/src/api/employees.js @@ -357,10 +357,10 @@ export const EMPLOYEE_RICH_COLUMNS = [ { key: 'contact', label: 'Contact', title: ['email'], subtitle: ['phone'] }, { key: 'role', label: 'Role', title: ['designation'], subtitle: ['department'] }, { - key: 'type', - label: 'Type', - title: ['Employee type'], - subtitle: [{ label: 'joining_date', prefix: 'Joined' }], + key: 'date', + label: 'Date', + title: [{ 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' })) .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)) return { config: { ...config, fields: [...fields, EMPLOYMENT_COLUMN] }, diff --git a/src/api/recordView.js b/src/api/recordView.js index e712471..83a06ba 100644 --- a/src/api/recordView.js +++ b/src/api/recordView.js @@ -143,7 +143,6 @@ export const EMPLOYEE_EXPORT_COLUMNS = [ 'department', 'designation', 'joining_date', - 'status', 'created_at', 'updated_at', ]