Skip to content

AttachedfileView

reference
1 min readUpdated

Kind: Class

Source: Pams/Web/Pams.WebApp/Client/app/models/common/files.model.ts (line 96)

Part of: Pams

AttachedfileView represents a file view model in the client application. It supports creating copies through cloneFile() and clone() so callers can work with duplicated file state without changing the original instance.

Methods

MethodSignatureReturns
cloneFilecloneFile(file: File)void
cloneclone(e: AttachedfileView)void

Properties

PropertyType
FileNamestring
FileIDnumber
refrenceToIDnumber
refrenceToTypeIDnumber
MarkDeleteboolean
TagIDnumber
downloadingboolean

Diagram

mermaid
graph LR
  A[AttachedfileView] --> B[cloneFile()]
  A --> C[clone()]
  B --> D[Copied file state]
  C --> E[Copied AttachedfileView]

Usage

ts
function duplicateAttachment(file: AttachedfileView): AttachedfileView {
  const copiedFile = file.cloneFile();
  const copiedView = file.clone();

  // Use the copied view when editing attachment state.
  return copiedView;
}

AI Coding Instructions

  • Use cloneFile() when code needs a copied file object rather than the current file reference.
  • Use clone() when passing a duplicated AttachedfileView into UI state or edit flows.
  • Do not modify an instance that is shared by multiple components; clone it before applying local changes.
  • Keep cloning behavior aligned between cloneFile() and clone() when file-related fields change.

Used by

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

Imported by (2)

  • FilesServicePams/Web/Pams.WebApp/Client/app/services/common/files.service.ts:1
  • ClientDelayPams/Web/Pams.WebApp/Client/app/models/sales/client-delay.model.ts:2

Was this page helpful?

Download as PDF