# Project

**Kind:** Class

**Source:** `Pams/Web/Pams.Web/Client/app/models/sales/project.model.ts` (line 9)

**Part of:** [Pams](subsystem-pams)

`Project` is a sales-domain model in the PAMS web client. It represents project data used by client-side sales features and includes `clone()` to create a separate `Project` instance from an existing one.

## 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
  SalesFeature[Sales feature] --> Project[Project]
  Project --> Clone[clone(): Project]
  Clone --> ProjectCopy[Separate Project instance]
```

## Usage

```ts
import { Project } from "app/models/sales/project.model";

const project = new Project();

// Set project fields as needed by the sales workflow.
const copiedProject: Project = project.clone();

// Changes to the copied instance do not target the original instance.
```

## AI Coding Instructions

- Use `clone()` when a sales workflow needs a separate `Project` instance for editing or comparison.
- Keep `Project` imports aligned with the `app/models/sales/project.model` path.
- Preserve the `clone(): Project` return type when modifying the model.
- Review copied field behavior when adding properties to `Project`, so `clone()` includes required project state.

## Relationships

- IMPORTS → `AppSettings`
- IMPORTS → `Shareholder`
- IMPORTS → `ProjectRegistered`
- IMPORTS → `Comment`
- IMPORTS → `ProjectContactPersons`
- IMPORTS → `ContactPersons`
- IMPORTS → `ContactInfo`

## Used by

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

### Imported by (9)

- `PrincipalViewEditComponent` — `Pams/Web/Pams.Web/Client/app/components/market/principles/principles-view-edit/principles-view-edit.component.ts`:1
- `ProjectsComponent` — `Pams/Web/Pams.Web/Client/app/components/market/projects/projects.component.ts`:1
- `RegistrationsComponent` — `Pams/Web/Pams.Web/Client/app/components/market/registrations/registrations/registrations.component.ts`:1
- `NewJobComponent` — `Pams/Web/Pams.Web/Client/app/components/sales/new-job/new-job.component.ts`:1
- `TagComponent` — `Pams/Web/Pams.Web/Client/app/components/shared/tag/tag.component.ts`:1
- `ProjectService` — `Pams/Web/Pams.Web/Client/app/services/sales/project.service.ts`:1
- `LoadDataAction` — `Pams/Web/Pams.Web/Client/app/actions/job.ts`:20
- `NewProject` — `Pams/Web/Pams.Web/Client/app/components/market/projects/newProject.ts`:51

…and 1 more.
