76 lines
1.9 KiB
TypeScript
76 lines
1.9 KiB
TypeScript
import type { QTableColumn } from "quasar";
|
|
|
|
export class EmployeeProfile {
|
|
first_name: string;
|
|
last_name: string;
|
|
supervisor_full_name: string;
|
|
company_name: number;
|
|
job_title: string;
|
|
email: string;
|
|
phone_number: string;
|
|
first_work_day: string;
|
|
last_work_day: string;
|
|
residence: string;
|
|
birth_date: string;
|
|
|
|
constructor() {
|
|
this.first_name = '';
|
|
this.last_name = '';
|
|
this.supervisor_full_name = '';
|
|
this.company_name = 271583;
|
|
this.job_title = '';
|
|
this.email = '';
|
|
this.phone_number = '';
|
|
this.first_work_day = '';
|
|
this.last_work_day = '';
|
|
this.residence = '';
|
|
this.birth_date = '';
|
|
}
|
|
}
|
|
|
|
export const employee_list_columns: QTableColumn<EmployeeProfile>[] = [
|
|
{
|
|
name: 'first_name',
|
|
label: 'employee_list.table.first_name',
|
|
field: 'first_name',
|
|
align: 'left'
|
|
},
|
|
{
|
|
name: 'last_name',
|
|
label: 'employee_list.table.last_name',
|
|
field: 'last_name',
|
|
align: 'left'
|
|
},
|
|
{
|
|
name: 'email',
|
|
label: 'employee_list.table.email',
|
|
field: 'email',
|
|
align: 'left'
|
|
},
|
|
{
|
|
name: 'supervisor_full_name',
|
|
label: 'employee_list.table.supervisor',
|
|
field: 'supervisor_full_name',
|
|
align: 'left'
|
|
},
|
|
{
|
|
name: 'company_name',
|
|
label: 'employee_list.table.company',
|
|
field: 'company_name',
|
|
align: 'left'
|
|
},
|
|
{
|
|
name: 'job_title',
|
|
label: 'employee_list.table.role',
|
|
field: 'job_title',
|
|
align: 'left'
|
|
},
|
|
];
|
|
|
|
export const getCompanyName = (company_code: number) => {
|
|
switch (company_code) {
|
|
case 271583: return 'Targo';
|
|
case 271585: return 'Solucom';
|
|
default: return 'N / A';
|
|
}
|
|
} |