# Client

**Kind:** Class

**Source:** `Frontend/src/app/models/person/client.model.ts` (line 5)

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

`Client` represents a client person model in the frontend application. It supports creating copied `Client` instances through `clone()` and `cloneClient()`.

## Methods

| Method | Signature | Returns |
|---|---|---|
| `clone` | `clone()` | `Client` |
| `cloneClient` | `cloneClient(cli: Client)` | `Client` |

## Properties

| Property | Type |
|---|---|
| `ClientID` | `number` |
| `UserID` | `number` |
| `ModificationDate` | `Date` |
| `CompanyBranchID` | `number` |
| `ClientCode` | `string` |
| `FullName` | `string` |
| `ClientName` | `string` |
| `Vat` | `string` |
| `Selected` | `boolean` |
| `ClientTypeID` | `number` |
| `MarketSegmentID` | `number` |
| `MarketSegmentIDs` | `number[]` |
| `Addresses` | `Address[]` |
| `ContactInfoList` | `Array<ContactInfo>` |
| `ContactPersonList` | `Array<ContactPersons>` |
| `registrationData` | `Array<ClientSupplierRegistration>` |
| `ImgPath` | `string` |

## Diagram

```mermaid
graph LR
  Client[Client]
  Client --> Clone[clone(): Client]
  Client --> CloneClient[cloneClient(): Client]
  Clone --> ClientCopy[Client copy]
  CloneClient --> ClientCopy
```

## Usage

```ts
const copiedClient: Client = client.clone();

const copiedClientFromHelper: Client = client.cloneClient();
```

## AI Coding Instructions

- Keep `clone()` and `cloneClient()` return values typed as `Client`.
- Use cloning methods when code needs a separate `Client` instance.
- Check both cloning methods before changing copy behavior, since callers may depend on either method.
- Avoid mutating a cloned instance when the original instance must remain unchanged.

## Relationships

- IMPORTS → `Address`
- IMPORTS → `ContactInfo`
- IMPORTS → `ContactPersons`
- IMPORTS → `ClientSupplierRegistration`

## Used by

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

### Imported by (7)

- `ContactViewEditComponent` — `Frontend/src/app/components/market/contacts/contact-view-edit/contact-view-edit.component.ts`:1
- `ContactsComponent` — `Frontend/src/app/components/market/contacts/contacts.component.ts`:1
- `RegistrationsComponent` — `Frontend/src/app/components/market/registrations/registrations/registrations.component.ts`:1
- `CurrencyRate` — `Frontend/src/app/components/payments/payment-details/payment-details.component.ts`:1
- `PaymentsListComponent` — `Frontend/src/app/components/payments/payments-list/payments-list.component.ts`:1
- `TagComponent` — `Frontend/src/app/components/shared/tag/tag.component.ts`:1
- `ClientService` — `Frontend/src/app/services/person/client.service.ts`:1
