Kind: Class
Source: Frontend/src/app/models/person/employee.model.ts (line 5)
Part of: Frontend
Employee represents an employee model in the person domain. Its clone() method creates and returns another Employee instance for workflows that need a copied model.
Methods
| Method | Signature | Returns |
|---|---|---|
clone | clone() | Employee |
Properties
| Property | Type |
|---|---|
EmployeeID | number |
PersonID | number |
CompanyBranchID | number |
NationalityCode | string |
Gender | number |
BirthDate | Date |
MaritalStatus | number |
DisplayName | string |
HireDate | Date |
LeaveDate | Date |
CompanyBranchDepartmentID | number |
ManagerID | number |
EmployeeTypeID | number |
Postion | string |
ImgPath | string |
IsResponsible | boolean |
PersonData | Person |
Addresses | Address[] |
ContactInfoList | Array<ContactInfo> |
Diagram
mermaidgraph LR Employee[Employee] -->|clone()| EmployeeCopy[Employee copy]
Usage
tsfunction duplicateEmployee(employee: Employee): Employee {
const copy = employee.clone();
return copy;
}
AI Coding Instructions
- Call
clone()when a workflow needs a copiedEmployeeinstance rather than reusing the same object. - Keep the return type of
clone()asEmployeewhen extending or refactoring the model. - Inspect the clone implementation before assuming nested values are copied rather than shared.
- Import
Employeefrom the person model area using the project's configured import conventions.
Relationships
- IMPORTS →
Address - IMPORTS →
ContactInfo - IMPORTS →
Person
Used by
3 references from 3 files. Each is a place in this repository where the symbol is actually used — go read one rather than trusting an example.
Imported by (3)
InvoiceDetailsComponent—Frontend/src/app/components/invoices/invoice-details/invoice-details.component.ts:1NewJobComponent—Frontend/src/app/components/sales/new-job/new-job.component.ts:1EmployeeService—Frontend/src/app/services/person/employee.service.ts:1
Was this page helpful?