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
| Method | Signature | Returns |
|---|---|---|
clone | clone(proj: Project) | Project |
Properties
| Property | Type |
|---|---|
ProjectID | number |
ProjectCode | string |
ProjectName | string |
ProjectDescription | string |
IsImportant | boolean |
CompanyBranchID | number |
ProjectStatusID | number |
SalesRepId | number |
Selected | boolean |
StartDate | Date |
ExpectedCommissioningDate | Date |
CreatedAt | Date |
EstimatedCost | number |
MarketSegmentIDs | number[] |
CurrencySymbol | string |
CurrencyCode | string |
FinalProduct | string |
EngineeringBy | string |
ContractorBy | string |
ProcurementBy | string |
VendorListBy | string |
LicenseBy | string |
KMCBy | string |
PmcById | number |
LicenseById | number |
VendorListById | number |
EngineeringById | number |
ProcurmentById | number |
ConstructionById | number |
PmcByList | number[] |
LicenseByList | number[] |
VendorListByList | number[] |
EngineeringByList | number[] |
ProcurmentByList | number[] |
ConstructionByList | number[] |
ProjectLocation | string |
Shareholders | Shareholder[] |
Comments | Comment[] |
ContactPersonList | Array<ContactPersons> |
OwnerID | number |
UserID | number |
Importance | number |
Where it refuses work
Projectstops the work with an early return whenthis.StartDate == null.
Diagram
mermaidgraph LR A[Project instance] --> B[clone()] B --> C[New Project instance]
Usage
tsimport { 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 separateProjectinstance for editing or comparison. - Keep
Projectimports pointed atapp/models/sales/project.model. - Do not assume cloning updates shared references; assign and pass the returned
Projectinstance explicitly. - Preserve the
clone(): Projectreturn 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)
ProjectsComponent—Frontend/src/app/components/market/projects/projects.component.ts:1RegistrationsComponent—Frontend/src/app/components/market/registrations/registrations/registrations.component.ts:1NewJobComponent—Frontend/src/app/components/sales/new-job/new-job.component.ts:1TagComponent—Frontend/src/app/components/shared/tag/tag.component.ts:1ProjectService—Frontend/src/app/services/sales/project.service.ts:1NewProject—Frontend/src/app/components/market/projects/newProject.ts:52
Was this page helpful?