HomeGuidesRecipesAPI ExplorerForumSupport
Partner Portal
Partner Portal

ApprovalPolicyDetails

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

`ApprovalPoliciesTable` component preview.

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:

import { ApprovalPolicyDetails, Dialog } from "@monite/sdk-react";

...

// TODO: This component must be rendered within the MoniteProvider wrapper
const ApprovalPolicyDetailsPage = () => {
  return (
    <Dialog open={true} alignDialog="right" onClose={action('onClose')}>
      <ApprovalPolicyDetails 
        id="APPROVALPOLICY_ID" 
      />
    </Dialog>
  );
};

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

import { ApprovalPolicyDetails, Dialog } from "@monite/sdk-react";

...

// TODO: This component must be rendered within the MoniteProvider wrapper
const ApprovalPolicyDetailsPage = () => {
  return (
    <Dialog open={true} alignDialog="right" onClose={action('onClose')}>
      <ApprovalPolicyDetails />
    </Dialog>
  );
};

Props

The following table shows all ApprovalPolicyDetails 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.