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
| Method | Signature | Returns |
|---|---|---|
cloneFile | cloneFile(file: File) | void |
clone | clone(e: AttachedfileView) | void |
Properties
| Property | Type |
|---|---|
FileName | string |
FileID | number |
refrenceToID | number |
refrenceToTypeID | number |
MarkDelete | boolean |
TagID | number |
downloading | boolean |
Diagram
mermaidgraph LR A[AttachedfileView] --> B[cloneFile()] A --> C[clone()] B --> D[Copied file state] C --> E[Copied AttachedfileView]
Usage
tsfunction 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 duplicatedAttachedfileViewinto 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()andclone()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)
FilesService—Pams/Web/Pams.WebApp/Client/app/services/common/files.service.ts:1ClientDelay—Pams/Web/Pams.WebApp/Client/app/models/sales/client-delay.model.ts:2
Was this page helpful?