Skip to content

Inquiry

reference
2 min readUpdated

Kind: Class

Source: Pams/Web/Pams.Web/Client/app/models/sales/inquiry.model.ts (line 36)

Part of: Pams

Inquiry represents a sales inquiry and manages inquiry cloning, order duplication, and version-related actions. It fits into the sales client model layer, where callers can create copies, create order versions, switch versions, and set the active version.

Methods

MethodSignatureReturns
cloneclone(Inq: Inquiry)Inquiry
duplicateVersionduplicateVersion(versionIndex: number)void
DuplicateOrderDuplicateOrder()void
switchVersionswitchVersion(versionIndex: number)void
createNewOrderVersioncreateNewOrderVersion()void
setCurrentVersionsetCurrentVersion(statusId: number)void

Properties

PropertyType
InquiryContactsInquiryContact[]
tabStatusnumber
InquiryNumbernumber
JobNostring
CompanyBranchIDnumber
ResponsibleIDnumber
ClientIDnumber
SupplierIDnumber
CategoryTypeIDnumber
CategoryIDnumber
ProjectIDnumber
CategoryDescriptionstring
InquiryDateDate
ProductTypeIDnumber
UserDisplayNamestring
isUpdaatingboolean
revertedboolean
EndUserTypeIDnumber
EndUserIDnumber
newstoryJobVersionStatusLog
ClientInquiryNumberstring
BidDueDateDate
Selectedboolean
IsInquiryEmailedToPrincipalboolean
InquiryEmailedToPrincipalDateDate
CommentsComment[]
InquiryTypeIDnumber
CurrentJobStatusIDnumber
Descriptionstring
FileNostring
CurrentJobProcessJobProcess
JobVersionsListJobVersion[]
CurrentJobVersionJobVersion
CurrentOfferJobVersionJobVersion
CurrentOrderJobVersionJobVersion
BidBondDetailsJobGuarantee

Where it refuses work

  • Inquiry stops the work with an early return when this.InquiryDate == null.
  • Inquiry stops the work with an early return when this.BidDueDate == null.
  • Inquiry stops the work with an early return when this.CurrentJobStatusID == JobStatusE.Bin.
  • Inquiry stops the work with an early return when this.CurrentJobStatusID == JobStatusE.Inquiry || this.CurrentJobStatusID == JobStatusE.Of….

Diagram

mermaid
graph LR
    Inquiry[Inquiry]
    Clone[clone]
    DuplicateVersion[duplicateVersion]
    DuplicateOrder[DuplicateOrder]
    SwitchVersion[switchVersion]
    CreateOrderVersion[createNewOrderVersion]
    SetCurrentVersion[setCurrentVersion]

    Inquiry --> Clone
    Inquiry --> DuplicateVersion
    Inquiry --> DuplicateOrder
    Inquiry --> SwitchVersion
    Inquiry --> CreateOrderVersion
    Inquiry --> SetCurrentVersion

Usage

ts
declare const inquiry: Inquiry;

// Create a separate inquiry instance.
const copiedInquiry: Inquiry = inquiry.clone();

// Perform version and order actions on the current inquiry.
inquiry.duplicateVersion();
inquiry.createNewOrderVersion();
inquiry.setCurrentVersion();

// Use the method name with its declared capitalization.
inquiry.DuplicateOrder();
inquiry.switchVersion();

AI Coding Instructions

  • Treat clone() as the method for obtaining a separate Inquiry instance.
  • Do not rely on return values from mutation methods; only clone() declares an Inquiry return type.
  • Preserve the declared capitalization of DuplicateOrder() when calling or refactoring it.
  • Connect version actions to the sales UI or state flow that selects and displays the current inquiry version.

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)

  • NewJobComponentPams/Web/Pams.Web/Client/app/components/sales/new-job/new-job.component.ts:1
  • TagComponentPams/Web/Pams.Web/Client/app/components/shared/tag/tag.component.ts:1
  • ValidationModelPams/Web/Pams.Web/Client/app/services/sales/date-validation-service.service.ts:1
  • InquiryServicePams/Web/Pams.Web/Client/app/services/sales/inquiry.service.ts:1
  • LoadDataActionPams/Web/Pams.Web/Client/app/actions/job.ts:20
  • JobStatePams/Web/Pams.Web/Client/app/reducers/job.ts:22

Was this page helpful?

Download as PDF