Skip to content

Supplier

reference
1 min readUpdated

Kind: Class

Source: Frontend/src/app/models/person/supplier.model.ts (line 9)

Part of: Frontend

Supplier is a person model for supplier-related data in the frontend application. It supports creating copied instances through clone() and cloneSupplier().

Methods

MethodSignatureReturns
cloneclone()Supplier
cloneSuppliercloneSupplier(spi: Supplier)Supplier

Properties

PropertyType
SupplierIDnumber
SupplierCurrencyCodestring
PersonIDnumber
UserIDnumber
ModificationDateDate
CompanyBranchIDnumber
IsActiveboolean
SupplierNamestring
FullNamestring
SupplierTypeIDnumber
IsPrincipalboolean
ContractualInfoSupplierContractualInfo
Vatstring
Selectedboolean
ImgPathstring
MarketSegmentIDnumber
MarketSegmentIDsnumber[]
AddressesAddress[]
ContactInfoListArray<ContactInfo>
ContactPersonListArray<ContactPersons>

Diagram

mermaid
graph LR
  Supplier[Supplier]
  Supplier --> Clone[clone(): Supplier]
  Supplier --> CloneSupplier[cloneSupplier(): Supplier]
  Clone --> SupplierCopy[Supplier copy]
  CloneSupplier --> SupplierCopy

Usage

ts
import { Supplier } from 'src/app/models/person/supplier.model';

function duplicateSupplier(supplier: Supplier): Supplier {
  const copy = supplier.clone();

  return copy;
}

function duplicateForSupplierFlow(supplier: Supplier): Supplier {
  return supplier.cloneSupplier();
}

AI Coding Instructions

  • Use clone() when code needs a copied Supplier instance without changing the source instance.
  • Use cloneSupplier() in supplier-specific flows where the method name clarifies intent.
  • Keep both cloning methods returning Supplier so callers retain the expected model type.
  • Check related person-model classes before adding supplier fields or changing copy behavior.

Relationships

  • IMPORTS → Address
  • IMPORTS → SupplierContractualInfo
  • IMPORTS → ContactInfo
  • IMPORTS → ContactPersons
  • IMPORTS → SupplierContractCountry
  • IMPORTS → SupplierContractClient
  • IMPORTS → SupplierMarketSegment
  • IMPORTS → SupplierContractMarketSegment
  • IMPORTS → DecreasedTable

Used by

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

Imported by (11)

  • ProductCategoriesComponentFrontend/src/app/components/configuration/products/product-categories/product-categories.component.ts:1
  • ContactViewEditComponentFrontend/src/app/components/market/contacts/contact-view-edit/contact-view-edit.component.ts:1
  • ContactsComponentFrontend/src/app/components/market/contacts/contacts.component.ts:1
  • RegistrationsComponentFrontend/src/app/components/market/registrations/registrations/registrations.component.ts:1
  • CurrencyRateFrontend/src/app/components/payments/payment-details/payment-details.component.ts:1
  • PaymentsListComponentFrontend/src/app/components/payments/payments-list/payments-list.component.ts:1
  • TagComponentFrontend/src/app/components/shared/tag/tag.component.ts:1
  • ProductCategoryServiceFrontend/src/app/services/common/product-category.service.ts:1

…and 3 more.

Was this page helpful?

Download as PDF