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
| Method | Signature | Returns |
|---|---|---|
cloneFile | cloneFile(file: File) | void |
clone | clone(e: AttachedfileView) | void |
Properties
| Property | Type |
|---|---|
FileName | string |
FileID | number |
CompanyBranchID | number |
refrenceToID | number |
refrenceToTypeID | number |
FileTypeId | number |
VersionNo | number |
NameSuffix | string |
MarkDelete | boolean |
TagID | number |
FileType | string |
FilePath | string |
CloudTypeId | number |
CloudItemId | string |
SizeInBytes | string |
ModificationDate | Date |
downloading | boolean |
Diagram
mermaidgraph LR AttachedfileView[AttachedfileView] AttachedfileView --> CloneFile[cloneFile()] AttachedfileView --> Clone[clone()] CloneFile --> FileCopy[File copy] Clone --> ViewCopy[AttachedfileView copy]
Usage
tsfunction 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 theAttachedfileViewinstance 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)
DocsListComponent—Pams/Web/Pams.Web/Client/app/components/shared/attached-docs/shared-attached-docs/docs-list/docs-list.component.ts:1SharedAttachedDocsComponent—Pams/Web/Pams.Web/Client/app/components/shared/attached-docs/shared-attached-docs/shared-attached-docs.component.ts:1AttachmentDropdownComponent—Pams/Web/Pams.Web/Client/app/components/shared/dropdown/attachment-dropdown/attachment-dropdown.component.ts:1InspectionDetailsComponent—Pams/Web/Pams.Web/Client/app/components/warehouse/inspection-details/inspection-details.component.ts:1UploadFilePopup—Pams/Web/Pams.Web/Client/app/services/common/files.service.ts:1ClientDelay—Pams/Web/Pams.Web/Client/app/models/sales/client-delay.model.ts:2
Was this page helpful?