Skip to content

Address

reference
1 min readUpdated

Kind: Class

Source: Pams/Web/Pams.Web/Client/app/models/common/address.model.ts (line 6)

Part of: Pams

Address represents address data in the client-side model layer. Its clone() method creates a separate Address instance for workflows that need to copy address data before editing or passing it to another part of the application.

Methods

MethodSignatureReturns
cloneclone(ad: Address)void

Properties

PropertyType
AddressIDnumber
AddressLinestring
CountryCodestring
CountryNamestring
Destinationstring
Citystring
Statestring
PostalCodestring
ZipCodestring
RowGuidstring
AddressTypeIDnumber
GovernateIDnumber
HasMarkerboolean
latitudenumber
longitudenumber
RelatedToIDnumber
RelatedTypeIDnumber
_RelatedToNamestring

Diagram

mermaid
graph LR
    Source[Address instance] --> Clone[clone()]
    Clone --> Copy[New Address instance]

Usage

ts
import { Address } from "../models/common/address.model";

function createEditableAddress(address: Address): Address {
  const editableAddress = address.clone();

  // Update the copied address without changing the source instance.
  return editableAddress;
}

AI Coding Instructions

  • Use clone() before editing address data that may also be referenced by existing UI state or API models.
  • Treat the cloned result as a separate Address instance from the source object.
  • Keep address-specific transformations close to the caller that owns the edit workflow.
  • Avoid mutating a shared Address instance when a copy is required for comparison, cancellation, or form editing.

Used by

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

Imported by (13)

  • BranchDetailsComponentPams/Web/Pams.Web/Client/app/components/configuration/company/main-branch/branch-details.component.ts:1
  • NewBranchComponentPams/Web/Pams.Web/Client/app/components/configuration/company/main-branch/new.branch.component.ts:1
  • InvoiceDetailsComponentPams/Web/Pams.Web/Client/app/components/invoices/invoice-details/invoice-details.component.ts:1
  • AccountDetailsComponentPams/Web/Pams.Web/Client/app/components/market/account-details/account-details.component.ts:1
  • ClientViewEditComponentPams/Web/Pams.Web/Client/app/components/market/client/client-view-edit/client-view-edit.component.ts:1
  • PrincipalViewEditComponentPams/Web/Pams.Web/Client/app/components/market/principles/principles-view-edit/principles-view-edit.component.ts:1
  • AddressComponentPams/Web/Pams.Web/Client/app/components/shared/address/address.component.ts:1
  • LocationDropdownComponentPams/Web/Pams.Web/Client/app/components/shared/dropdown/location-dropdown/location-dropdown.component.ts:1

…and 5 more.

Was this page helpful?

Download as PDF