Skip to content

Project

reference
1 min readUpdated

Kind: Class

Source: Frontend/src/app/models/sales/project.model.ts (line 9)

Part of: Frontend

Project is a sales-domain model representing a project in the frontend application. Its clone() method creates a separate Project instance based on the current model state.

Methods

MethodSignatureReturns
cloneclone(proj: Project)Project

Properties

PropertyType
ProjectIDnumber
ProjectCodestring
ProjectNamestring
ProjectDescriptionstring
IsImportantboolean
CompanyBranchIDnumber
ProjectStatusIDnumber
SalesRepIdnumber
Selectedboolean
StartDateDate
ExpectedCommissioningDateDate
CreatedAtDate
EstimatedCostnumber
MarketSegmentIDsnumber[]
CurrencySymbolstring
CurrencyCodestring
FinalProductstring
EngineeringBystring
ContractorBystring
ProcurementBystring
VendorListBystring
LicenseBystring
KMCBystring
PmcByIdnumber
LicenseByIdnumber
VendorListByIdnumber
EngineeringByIdnumber
ProcurmentByIdnumber
ConstructionByIdnumber
PmcByListnumber[]
LicenseByListnumber[]
VendorListByListnumber[]
EngineeringByListnumber[]
ProcurmentByListnumber[]
ConstructionByListnumber[]
ProjectLocationstring
ShareholdersShareholder[]
CommentsComment[]
ContactPersonListArray<ContactPersons>
OwnerIDnumber
UserIDnumber
Importancenumber

Where it refuses work

  • Project stops the work with an early return when this.StartDate == null.

Diagram

mermaid
graph LR
  A[Project instance] --> B[clone()]
  B --> C[New Project instance]

Usage

ts
import { Project } from '@/app/models/sales/project.model';

declare const project: Project;

const projectCopy = project.clone();

// Change the copy without replacing the original reference.
const selectedProject = projectCopy;

AI Coding Instructions

  • Use clone() when a workflow needs a separate Project instance for editing or comparison.
  • Keep Project imports pointed at app/models/sales/project.model.
  • Do not assume cloning updates shared references; assign and pass the returned Project instance explicitly.
  • Preserve the clone(): Project return type when extending model behavior.

Relationships

  • IMPORTS → AppSettings
  • IMPORTS → Shareholder
  • IMPORTS → ProjectRegistered
  • IMPORTS → Comment
  • IMPORTS → ProjectContactPersons
  • IMPORTS → ContactPersons
  • IMPORTS → ContactInfo

Used by

6 references from 6 files. Each is a place in this repository where the symbol is actually used — go read one rather than trusting an example.

Imported by (6)

  • ProjectsComponentFrontend/src/app/components/market/projects/projects.component.ts:1
  • RegistrationsComponentFrontend/src/app/components/market/registrations/registrations/registrations.component.ts:1
  • NewJobComponentFrontend/src/app/components/sales/new-job/new-job.component.ts:1
  • TagComponentFrontend/src/app/components/shared/tag/tag.component.ts:1
  • ProjectServiceFrontend/src/app/services/sales/project.service.ts:1
  • NewProjectFrontend/src/app/components/market/projects/newProject.ts:52

Was this page helpful?

Download as PDF