# Project

**Kind:** Class

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

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

`Project` represents a sales project model in the client application. Its `clone()` method creates and returns a separate `Project` instance for workflows that need a copy of the current model.

## Methods

| Method | Signature | Returns |
|---|---|---|
| `clone` | `clone(proj: Project)` | `Project` |

## Properties

| Property | Type |
|---|---|
| `ProjectID` | `number` |
| `ProjectCode` | `string` |
| `ProjectName` | `string` |
| `ProjectDescription` | `string` |
| `IsImportant` | `boolean` |
| `ProjectStatusID` | `number` |
| `StartDate` | `Date` |
| `ExpectedCommissioningDate` | `Date` |
| `EstimatedCost` | `number` |
| `CurrencySymbol` | `string` |
| `CurrencyCode` | `string` |
| `FinalProduct` | `string` |
| `EngineeringBy` | `string` |
| `ContractorBy` | `string` |
| `ProcurementBy` | `string` |
| `VendorListBy` | `string` |
| `LicenseBy` | `string` |
| `KMCBy` | `string` |
| `ProjectLocation` | `string` |
| `Shareholders` | `Shareholder[]` |
| `ProjectComments` | `ProjectComment[]` |
| `ContactPersonList` | `Array<ContactPersons>` |
| `OwnerID` | `number` |
| `UserID` | `number` |

## Where it refuses work

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

## Diagram

```mermaid
graph LR
    Project[Project instance] --> Clone[clone()]
    Clone --> Copy[New Project instance]
```

## Usage

```ts
import { Project } from './project.model';

const project = new Project();

const projectCopy = project.clone();

// Update the copy without replacing the original reference.
console.log(projectCopy);
```

## AI Coding Instructions

- Use `clone()` when a workflow needs a separate `Project` instance rather than sharing the same object reference.
- Keep cloning behavior aligned with the properties defined on `Project` as the model changes.
- Avoid mutating a cloned instance when the intended change belongs on the original project.
- Import the model from the sales project model module when adding project-related client logic.

## Relationships

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

## Used by

1 reference from 1 file. Each is a place in this repository where the symbol is actually used — go read one rather than trusting an example.

### Imported by (1)

- `ProjectService` — `Pams/Web/Pams.WebApp/Client/app/services/sales/project.service.ts`:1
