Skip to content

AttachedfileView

reference
1 min readUpdated

Kind: Class

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

Part of: Pams

AttachedfileView represents an attached file in the client-side file model layer. Its cloneFile() and clone() methods create copies for workflows that need to preserve the original file view while working with a separate instance.

Methods

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

Properties

PropertyType
FileNamestring
FileIDnumber
CompanyBranchIDnumber
refrenceToIDnumber
refrenceToTypeIDnumber
FileTypeIdnumber
VersionNonumber
NameSuffixstring
MarkDeleteboolean
TagIDnumber
FileTypestring
FilePathstring
CloudTypeIdnumber
CloudItemIdstring
SizeInBytesstring
ModificationDateDate
downloadingboolean

Diagram

mermaid
graph LR
  AttachedfileView[AttachedfileView]
  AttachedfileView --> CloneFile[cloneFile()]
  AttachedfileView --> Clone[clone()]
  CloneFile --> FileCopy[File copy]
  Clone --> ViewCopy[AttachedfileView copy]

Usage

ts
function prepareAttachmentCopy(attachedFileView: AttachedfileView) {
  const fileCopy = attachedFileView.cloneFile();
  const viewCopy = attachedFileView.clone();

  return {
    fileCopy,
    viewCopy,
  };
}

AI Coding Instructions

  • Use cloneFile() when downstream code needs a separate copy of the attached file data.
  • Use clone() when copying the AttachedfileView instance for editing or state changes.
  • Keep cloning at state boundaries so changes to a copied attachment do not affect the original view.
  • Check callers for assumptions about whether cloned objects share nested references.

Used by

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

Imported by (6)

  • DocsListComponentPams/Web/Pams.Web/Client/app/components/shared/attached-docs/shared-attached-docs/docs-list/docs-list.component.ts:1
  • SharedAttachedDocsComponentPams/Web/Pams.Web/Client/app/components/shared/attached-docs/shared-attached-docs/shared-attached-docs.component.ts:1
  • AttachmentDropdownComponentPams/Web/Pams.Web/Client/app/components/shared/dropdown/attachment-dropdown/attachment-dropdown.component.ts:1
  • InspectionDetailsComponentPams/Web/Pams.Web/Client/app/components/warehouse/inspection-details/inspection-details.component.ts:1
  • UploadFilePopupPams/Web/Pams.Web/Client/app/services/common/files.service.ts:1
  • ClientDelayPams/Web/Pams.Web/Client/app/models/sales/client-delay.model.ts:2

Was this page helpful?

Download as PDF