Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt

Use this file to discover all available pages before exploring further.

The New Contract page (/gr/contracts/new) renders ContractCreationWizardPage, a full-page wizard powered by ModuleWizardRenderer (PF-41) that creates a new gr_contracts record.

Overview

ContractCreationWizardPage uses ModuleWizardRenderer with wizardType = 'contract_creation'. Initial values may be pre-populated from URL parameters (contractTypeId, executionId). The wizard:
  1. Loads available contract types via useContractTypes.
  2. Maps wizard form data to a contract payload via mapWizardDataToPayload.
  3. Creates the contract via useContractMutation.createContract.
The submit button label is dynamic (defaults to “Save as Draft”; determined by getSubmitButtonLabel). On completion, navigation returns to /gr/contracts. Telemetry uses template ID 'gr-contract-creation-wizard'.

Who it’s for

Requires permission: gr.contracts.create (GR_PERMISSIONS.CONTRACTS_CREATE). Users without this permission cannot access this route.

Before you start

  • You must hold gr.contracts.create.
  • Have the contract type, counterparty details, key dates (start, expiration), and obligation schedule ready before starting.
  • For contracts above the approval threshold (contract_approval_threshold_amount in settings), an approval workflow may be triggered after creation.

Steps

1

Open the New Contract wizard

Navigate to /gr/contracts/new or use the create contract action from /gr/contracts. The wizard loads from the contract_creation template.
2

Select a contract type

Choose from the available contract types loaded by useContractTypes. This may pre-fill defaults.
3

Complete each wizard step

Follow the steps in the ModuleWizardRenderer — typically covering contract details, parties, terms, and obligations.
4

Review and submit

On the final review step, click the submit button (labeled “Save as Draft” or another label per getSubmitButtonLabel). The wizard validates via validateFinalSubmit before submitting.
5

Return to Contracts

After completion you are navigated to /gr/contracts where the new contract appears.

Key concepts

  • ModuleWizardRenderer (PF-41) — platform component rendering wizard steps from pf_wizard_templates.
  • contract_creation — wizard type identifier for contract creation.
  • mapWizardDataToPayload — local mapper that converts GrContractWizardFormData to the gr_contracts insert payload.
  • getSubmitButtonLabel / validateFinalSubmit — utilities from useContractWizardValidation that control the final submit state.
  • executionId — optional query param linking this wizard run to a workflow execution.

Governance & Compliance

Governance & Compliance core overview.

Governance & parity

This page documents shipped product behavior. It is not medical, legal, or billing advice. Verify against your organization’s policies and applicable regulations before using it for clinical, compliance, or billing decisions. Protected health information (PHI) shown in the product is governed by your tenant’s access controls and is never exposed in this documentation.
  • src/routes/gr.tsx
  • src/cores/gr/wizards/contract-creation/ContractCreationWizardPage.tsx
  • src/cores/gr/hooks/useContractMutation.ts
  • src/platform/permissions/constants.ts