diff --git a/apps/OpenSign/src/components/pdf/WidgetComponent.js b/apps/OpenSign/src/components/pdf/WidgetComponent.js index 89aab1e6b..e59220b68 100644 --- a/apps/OpenSign/src/components/pdf/WidgetComponent.js +++ b/apps/OpenSign/src/components/pdf/WidgetComponent.js @@ -4,6 +4,7 @@ import RecipientList from "./RecipientList"; import { useDrag } from "react-dnd"; import WidgetList from "./WidgetList"; import { + color, radioButtonWidget, textInputWidget, textWidget, @@ -43,163 +44,69 @@ function WidgetComponent({ const [isSignersModal, setIsSignersModal] = useState(false); const [, dropdown] = useDrag({ type: "BOX", - item: { - type: "BOX", - id: 5, - text: "dropdown" - }, - + item: { type: "BOX", id: 5, text: "dropdown" }, collect: (monitor) => ({ isDragDropdown: !!monitor.isDragging() }) }); const [, checkbox] = useDrag({ type: "BOX", - item: { - type: "BOX", - id: 6, - text: "checkbox" - }, - - collect: (monitor) => ({ - isDragCheck: !!monitor.isDragging() - }) + item: { type: "BOX", id: 6, text: "checkbox" }, + collect: (monitor) => ({ isDragCheck: !!monitor.isDragging() }) }); const [, textInput] = useDrag({ type: "BOX", - item: { - type: "BOX", - id: 7, - text: textInputWidget - }, - collect: (monitor) => ({ - isDragTextInput: !!monitor.isDragging() - }) + item: { type: "BOX", id: 7, text: textInputWidget }, + collect: (monitor) => ({ isDragTextInput: !!monitor.isDragging() }) }); const [, initials] = useDrag({ type: "BOX", - item: { - type: "BOX", - id: 8, - text: "initials" - }, - - collect: (monitor) => ({ - isDragInitial: !!monitor.isDragging() - }) + item: { type: "BOX", id: 8, text: "initials" }, + collect: (monitor) => ({ isDragInitial: !!monitor.isDragging() }) }); const [, name] = useDrag({ type: "BOX", - item: { - type: "BOX", - id: 9, - text: "name" - }, - - collect: (monitor) => ({ - isDragName: !!monitor.isDragging() - }) + item: { type: "BOX", id: 9, text: "name" }, + collect: (monitor) => ({ isDragName: !!monitor.isDragging() }) }); const [, company] = useDrag({ type: "BOX", - item: { - type: "BOX", - id: 10, - text: "company" - }, - - collect: (monitor) => ({ - isDragCompany: !!monitor.isDragging() - }) + item: { type: "BOX", id: 10, text: "company" }, + collect: (monitor) => ({ isDragCompany: !!monitor.isDragging() }) }); const [, jobTitle] = useDrag({ type: "BOX", - item: { - type: "BOX", - id: 11, - text: "job title" - }, - - collect: (monitor) => ({ - isDragJobtitle: !!monitor.isDragging() - }) + item: { type: "BOX", id: 11, text: "job title" }, + collect: (monitor) => ({ isDragJobtitle: !!monitor.isDragging() }) }); const [, date] = useDrag({ type: "BOX", - item: { - type: "BOX", - id: 12, - text: "date" - }, - - collect: (monitor) => ({ - isDragDate: !!monitor.isDragging() - }) + item: { type: "BOX", id: 12, text: "date" }, + collect: (monitor) => ({ isDragDate: !!monitor.isDragging() }) }); const [, image] = useDrag({ type: "BOX", - item: { - type: "BOX", - id: 13, - text: "image" - }, - - collect: (monitor) => ({ - isDragImage: !!monitor.isDragging() - }) + item: { type: "BOX", id: 13, text: "image" }, + collect: (monitor) => ({ isDragImage: !!monitor.isDragging() }) }); const [, email] = useDrag({ type: "BOX", - item: { - type: "BOX", - id: 14, - text: "email" - }, - collect: (monitor) => ({ - isDragEmail: !!monitor.isDragging() - }) + item: { type: "BOX", id: 14, text: "email" }, + collect: (monitor) => ({ isDragEmail: !!monitor.isDragging() }) }); const [, radioButton] = useDrag({ type: "BOX", - - item: { - type: "BOX", - id: 15, - text: radioButtonWidget - }, - collect: (monitor) => ({ - isDragRadiotton: !!monitor.isDragging() - }) + item: { type: "BOX", id: 15, text: radioButtonWidget }, + collect: (monitor) => ({ isDragRadiotton: !!monitor.isDragging() }) }); const [, text] = useDrag({ type: "BOX", - - item: { - type: "BOX", - id: 16, - text: textWidget - }, - collect: (monitor) => ({ - isDragText: !!monitor.isDragging() - }) + item: { type: "BOX", id: 16, text: textWidget }, + collect: (monitor) => ({ isDragText: !!monitor.isDragging() }) }); const isMobile = window.innerWidth < 767; const scrollContainerRef = useRef(null); const [widget, setWidget] = useState([]); - const color = [ - "#93a3db", - "#e6c3db", - "#c0e3bc", - "#bce3db", - "#b8ccdb", - "#ceb8db", - "#ffccff", - "#99ffcc", - "#cc99ff", - "#ffcc99", - "#66ccff", - "#ffffcc" - ]; const handleModal = () => { setIsSignersModal(!isSignersModal); }; diff --git a/apps/OpenSign/src/json/ReportJson.js b/apps/OpenSign/src/json/ReportJson.js index 859a2e4fd..c3c0a0cc7 100644 --- a/apps/OpenSign/src/json/ReportJson.js +++ b/apps/OpenSign/src/json/ReportJson.js @@ -27,21 +27,21 @@ export default function reportJson(id) { const templateSubAction = isEnableSubscription ? [ { - btnId: "2434", + btnId: "2435", btnLabel: "Embed", hoverLabel: "Embed", btnIcon: "fa-light fa-code", action: "Embed" }, { - btnId: "2434", + btnId: "2436", btnLabel: "Copy TemplateId", hoverLabel: "Copy TemplateId", btnIcon: "fa-light fa-copy", action: "CopyTemplateId" }, { - btnId: "2434", + btnId: "2437", btnLabel: "Copy Public URL", hoverLabel: "Copy Public URL", btnIcon: "fa-light fa-copy", diff --git a/apps/OpenSign/src/pages/TemplatePlaceholder.js b/apps/OpenSign/src/pages/TemplatePlaceholder.js index c1ed4333c..5a0b79085 100644 --- a/apps/OpenSign/src/pages/TemplatePlaceholder.js +++ b/apps/OpenSign/src/pages/TemplatePlaceholder.js @@ -29,7 +29,8 @@ import { onClickZoomOut, onClickZoomIn, handleRemoveWidgets, - handleRotateWarning + handleRotateWarning, + color } from "../constant/Utils"; import RenderPdf from "../components/pdf/RenderPdf"; import "../styles/AddUser.css"; @@ -102,20 +103,6 @@ const TemplatePlaceholder = () => { const [isTextSetting, setIsTextSetting] = useState(false); const [pdfLoad, setPdfLoad] = useState(false); const [pdfRotateBase64, setPdfRotatese64] = useState(""); - const color = [ - "#93a3db", - "#e6c3db", - "#c0e3bc", - "#bce3db", - "#b8ccdb", - "#ceb8db", - "#ffccff", - "#99ffcc", - "#cc99ff", - "#ffcc99", - "#66ccff", - "#ffffcc" - ]; const isMobile = window.innerWidth < 767; const [, drop] = useDrop({ accept: "BOX", diff --git a/apps/OpenSign/src/primitives/GetReportDisplay.js b/apps/OpenSign/src/primitives/GetReportDisplay.js index 136994fd4..c56828e94 100644 --- a/apps/OpenSign/src/primitives/GetReportDisplay.js +++ b/apps/OpenSign/src/primitives/GetReportDisplay.js @@ -1165,7 +1165,7 @@ const ReportTable = (props) => { )} -
+
{isCelebration && (
{
0 ? "min-h-[317px]" : "h-full" - } overflow-auto w-full`} + isDashboard && props.List?.length > 0 + ? "min-h-[317px]" + : currentList?.length === props.docPerPage + ? "h-fit" + : "h-screen" + } overflow-auto w-full border-b`} > - +
{props.heading?.map((item, index) => ( @@ -1311,7 +1315,14 @@ const ReportTable = (props) => { ) : ( - + {props.heading.includes("Sr.No") && (
{startIndex + index + 1} @@ -1590,9 +1601,7 @@ const ReportTable = (props) => { className={ act.action !== "option" ? `${ - act?.btnColor - ? act.btnColor - : "" + act?.btnColor || "" } op-btn op-btn-sm mr-1` : "text-base-content focus:outline-none text-lg mr-2 relative" } @@ -1609,9 +1618,10 @@ const ReportTable = (props) => { )}`} )} + {/* template report */} {isOption[item.objectId] && act.action === "option" && ( -
    +
      {act.subaction?.map((subact) => (
    • { {t(`btnLabel.${act.btnLabel}`)} )} + {/* doc report */} {isOption[item.objectId] && act.action === "option" && ( -
        +
          {act.subaction?.map((subact) => (
        • x.id === ActiveFileAdapter) || {}; + // `fileAdapterId` is used check document uploaded in custom file adapter and get customFileAdapter id + const fileAdapterId = _resDoc?.FileAdapterId || ''; let adapterConfig = {}; - if (FileAdapter && ActiveFileAdapter) { - adapterConfig = { ActiveFileAdapter: ActiveFileAdapter, ...FileAdapter }; + if (fileAdapterId) { + // `FileAdapter` is used to credintials of file adapter + const FileAdapter = + _resDoc?.ExtUserPtr?.TenantId?.FileAdapters?.find(x => x.id === fileAdapterId) || {}; + if (FileAdapter) { + adapterConfig = FileAdapter; + } } let signUser; let className;