Kind: Class
Source: Frontend/src/app/models/sales/inquiry.model.ts (line 36)
Part of: Frontend
Inquiry models a sales inquiry and groups operations for cloning, version changes, and order duplication. It is used where the application needs to create or select inquiry versions while keeping the active version in sync.
Methods
| Method | Signature | Returns |
|---|---|---|
clone | clone(Inq: Inquiry) | Inquiry |
duplicateVersion | duplicateVersion(versionIndex: number) | void |
DuplicateOrder | DuplicateOrder() | void |
switchVersion | switchVersion(versionIndex: number) | void |
createNewOrderVersion | createNewOrderVersion() | void |
setCurrentVersion | setCurrentVersion(statusId: number) | void |
Properties
| Property | Type |
|---|---|
InquiryContacts | InquiryContact[] |
tabStatus | number |
InquiryNumber | number |
JobNo | string |
CompanyBranchID | number |
ResponsibleID | number |
ClientID | number |
SupplierID | number |
CategoryTypeID | number |
CategoryID | number |
ProjectID | number |
CategoryDescription | string |
InquiryDate | Date |
ProductTypeID | number |
UserDisplayName | string |
isUpdaating | boolean |
reverted | boolean |
EndUserTypeID | number |
EndUserID | number |
newstory | JobVersionStatusLog |
ClientInquiryNumber | string |
BidDueDate | Date |
Selected | boolean |
IsInquiryEmailedToPrincipal | boolean |
InquiryEmailedToPrincipalDate | Date |
Comments | Comment[] |
InquiryTypeID | number |
CurrentJobStatusID | number |
Description | string |
FileNo | string |
CurrentJobProcess | JobProcess |
JobVersionsList | JobVersion[] |
CurrentJobVersion | JobVersion |
CurrentOfferJobVersion | JobVersion |
CurrentOrderJobVersion | JobVersion |
BidBondDetails | JobGuarantee |
Where it refuses work
Inquirystops the work with an early return whenthis.InquiryDate == null.Inquirystops the work with an early return whenthis.BidDueDate == null.Inquirystops the work with an early return whenthis.CurrentJobStatusID == JobStatusE.Bin.Inquirystops the work with an early return whenthis.CurrentJobStatusID == JobStatusE.Inquiry || this.CurrentJobStatusID == JobStatusE.Of….
Diagram
mermaidgraph LR Inquiry[Inquiry] Clone[clone()] Version[duplicateVersion()] Switch[switchVersion()] NewVersion[createNewOrderVersion()] Current[setCurrentVersion()] Order[DuplicateOrder()] Inquiry --> Clone Inquiry --> Version Inquiry --> Switch Inquiry --> NewVersion Inquiry --> Current Inquiry --> Order
Usage
tsimport { Inquiry } from './models/sales/inquiry.model';
function createInquiryVersion(inquiry: Inquiry): Inquiry {
const copiedInquiry = inquiry.clone();
copiedInquiry.duplicateVersion();
copiedInquiry.createNewOrderVersion();
copiedInquiry.setCurrentVersion();
return copiedInquiry;
}
function duplicateInquiryOrder(inquiry: Inquiry): void {
inquiry.DuplicateOrder();
}
AI Coding Instructions
- Use
clone()when a separateInquiryinstance is needed before changing version or order state. - Preserve the existing
DuplicateOrder()capitalization when calling the method. - Treat version-related methods as state-changing operations and confirm the active version with
setCurrentVersion(). - Check callers of
switchVersion()when changing version flow, since UI state may depend on the selected inquiry version.
Used by
4 references from 4 files. Each is a place in this repository where the symbol is actually used — go read one rather than trusting an example.
Imported by (4)
NewJobComponent—Frontend/src/app/components/sales/new-job/new-job.component.ts:1TagComponent—Frontend/src/app/components/shared/tag/tag.component.ts:1ValidationModel—Frontend/src/app/services/sales/date-validation-service.service.ts:1InquiryService—Frontend/src/app/services/sales/inquiry.service.ts:1
Was this page helpful?