Skip to content

Employee

reference
1 min readUpdated

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

MethodSignatureReturns
cloneclone()Employee

Properties

PropertyType
EmployeeIDnumber
PersonIDnumber
CompanyBranchIDnumber
NationalityCodestring
Gendernumber
BirthDateDate
MaritalStatusnumber
DisplayNamestring
HireDateDate
LeaveDateDate
CompanyBranchDepartmentIDnumber
ManagerIDnumber
EmployeeTypeIDnumber
Postionstring
ImgPathstring
IsResponsibleboolean
PersonDataPerson
AddressesAddress[]
ContactInfoListArray<ContactInfo>

Diagram

mermaid
graph LR
  Employee[Employee] -->|clone()| EmployeeCopy[Employee copy]

Usage

ts
function duplicateEmployee(employee: Employee): Employee {
  const copy = employee.clone();

  return copy;
}

AI Coding Instructions

  • Call clone() when a workflow needs a copied Employee instance rather than reusing the same object.
  • Keep the return type of clone() as Employee when extending or refactoring the model.
  • Inspect the clone implementation before assuming nested values are copied rather than shared.
  • Import Employee from 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)

  • InvoiceDetailsComponentFrontend/src/app/components/invoices/invoice-details/invoice-details.component.ts:1
  • NewJobComponentFrontend/src/app/components/sales/new-job/new-job.component.ts:1
  • EmployeeServiceFrontend/src/app/services/person/employee.service.ts:1

Was this page helpful?

Download as PDF