# Project

**Kind:** Class

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

**Part of:** [Frontend](subsystem-frontend-src-app)

`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

- `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)

- `ProjectsComponent` — `Frontend/src/app/components/market/projects/projects.component.ts`:1
- `RegistrationsComponent` — `Frontend/src/app/components/market/registrations/registrations/registrations.component.ts`:1
- `NewJobComponent` — `Frontend/src/app/components/sales/new-job/new-job.component.ts`:1
- `TagComponent` — `Frontend/src/app/components/shared/tag/tag.component.ts`:1
- `ProjectService` — `Frontend/src/app/services/sales/project.service.ts`:1
- `NewProject` — `Frontend/src/app/components/market/projects/newProject.ts`:52
