Skip to content

Inquiry

reference
2 min readUpdated

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

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

Properties

PropertyType
tabStatusnumber
InquiryNumbernumber
JobNostring
CompanyBranchIDnumber
ResponsibleIDnumber
ClientIDnumber
SupplierIDnumber
CategoryTypeIDnumber
CategoryIDnumber
ProjectIDnumber
CategoryDescriptionstring
InquiryDateDate
ProductTypeIDnumber
UserDisplayNamestring
isUpdaatingboolean
revertedboolean
EndUserTypeIDnumber
EndUserIDnumber
newstoryJobVersionStatusLog
ClientInquiryNumberstring
BidDueDateDate
InquiryTypeIDnumber
CurrentJobStatusIDnumber
Descriptionstring
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]
  CreateVersion[createNewOrderVersion]
  SetCurrentVersion[setCurrentVersion]

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

Usage

ts
import { 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 independent Inquiry instance 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() or setCurrentVersion().

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)

  • ValidationModelPams/Web/Pams.WebApp/Client/app/services/sales/date-validation-service.service.ts:1
  • InquiryServicePams/Web/Pams.WebApp/Client/app/services/sales/inquiry.service.ts:1

Was this page helpful?

Download as PDF