Kind: Class
Source: Pams/Web/Pams.WebApp/Client/app/models/sales/inquiry.model.ts (line 31)
Part of: Pams
Inquiry models a sales inquiry and manages order version actions within the client application. It can clone an inquiry, create or duplicate order versions, switch the active version, and set the current version.
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 |
|---|---|
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 |
InquiryTypeID | number |
CurrentJobStatusID | number |
Description | 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] DuplicateVersion[duplicateVersion] DuplicateOrder[DuplicateOrder] SwitchVersion[switchVersion] CreateVersion[createNewOrderVersion] SetCurrentVersion[setCurrentVersion] Inquiry --> Clone Inquiry --> DuplicateVersion Inquiry --> DuplicateOrder Inquiry --> SwitchVersion Inquiry --> CreateVersion Inquiry --> SetCurrentVersion
Usage
tsimport { Inquiry } from './models/sales/inquiry.model';
function createDraft(inquiry: Inquiry): Inquiry {
const draft = inquiry.clone();
draft.createNewOrderVersion();
draft.setCurrentVersion();
return draft;
}
function copyExistingVersion(inquiry: Inquiry): void {
inquiry.duplicateVersion();
inquiry.switchVersion();
}
AI Coding Instructions
- Treat
clone()as the operation for creating an independentInquiryinstance before changing draft state. - Use version methods together when changing the active order version: create or duplicate a version, then set or switch the current version.
- Preserve existing method naming, including
DuplicateOrder(), when calling or extending this class. - Check callers that depend on the current version after invoking
switchVersion()orsetCurrentVersion().
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)
ValidationModel—Pams/Web/Pams.WebApp/Client/app/services/sales/date-validation-service.service.ts:1InquiryService—Pams/Web/Pams.WebApp/Client/app/services/sales/inquiry.service.ts:1
Was this page helpful?