Overview

The ApprovalPolicyDetails component renders the interface for creating a new approval policy and managing the details of an existing approval policy. This includes the ability to view and edit approval policy details.

Permissions

To view details of an existing component, the entity user must have read permissions for the approval_policy object. To create, edit, and delete approval policies, they must also have create, update, or delete permissions for the approval_policy object. For more information, see List of permissions.

Preview

ApprovalPolicyDetails component with the Approval Policy Creation modal
ApprovalPolicyDetails component with the Approval Policy Creation modal

Usage

Use the ApprovalPolicyDetails component to create a new approval policy and view and edit details of an existing approval policy. To view details of an existing approval policy, use the ApprovalPolicyDetails component with the id prop as shown:

React.js
1import { ApprovalPolicyDetails, Dialog } from "@monite/sdk-react";
2
3...
4
5// TODO: This component must be rendered within the MoniteProvider wrapper
6const ApprovalPolicyDetailsPage = () => {
7 return (
8 <Dialog open={true} alignDialog="right" onClose={action('onClose')}>
9 <ApprovalPolicyDetails
10 id="APPROVALPOLICY_ID"
11 />
12 </Dialog>
13 );
14};

To create a new approval policy, import the ApprovalPolicyDetails component without providing the id prop as shown:

React.js
1import { ApprovalPolicyDetails, Dialog } from "@monite/sdk-react";
2
3...
4
5// TODO: This component must be rendered within the MoniteProvider wrapper
6const ApprovalPolicyDetailsPage = () => {
7 return (
8 <Dialog open={true} alignDialog="right" onClose={action('onClose')}>
9 <ApprovalPolicyDetails />
10 </Dialog>
11 );
12};

Props

The following table shows all ApprovalPoliciesTable component properties, their types, and descriptions:

PropTypeDescription
idstringThis prop accepts the ID of the approval policy details to be displayed, edited, or removed.
onCreatedfunctionThis callback can be triggered when a new approval policy is created.
onUpdatedfunctionThis callback can be triggered when any existing approval policy details are updated.