Skip to content

Inquiry

reference
2 min readUpdated

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

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()]
  Version[duplicateVersion()]
  Switch[switchVersion()]
  NewVersion[createNewOrderVersion()]
  Current[setCurrentVersion()]
  Order[DuplicateOrder()]

  Inquiry --> Clone
  Inquiry --> Version
  Inquiry --> Switch
  Inquiry --> NewVersion
  Inquiry --> Current
  Inquiry --> Order

Usage

ts
import { 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 separate Inquiry instance 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)

  • NewJobComponentFrontend/src/app/components/sales/new-job/new-job.component.ts:1
  • TagComponentFrontend/src/app/components/shared/tag/tag.component.ts:1
  • ValidationModelFrontend/src/app/services/sales/date-validation-service.service.ts:1
  • InquiryServiceFrontend/src/app/services/sales/inquiry.service.ts:1

Was this page helpful?

Download as PDF