Compare commits
No commits in common. "7aa3f41e27dcd54300604f1634689eca3bef692e" and "7b448558c02ee9450b660c25a8339d7a0f051da9" have entirely different histories.
7aa3f41e27
...
7b448558c0
|
|
@ -48,7 +48,7 @@ const RecipientAddCard = ({ transactionTemplateToggle }) => {
|
||||||
// Validation Ends
|
// Validation Ends
|
||||||
|
|
||||||
dispatch(addRecipient(recipient));
|
dispatch(addRecipient(recipient));
|
||||||
setRecipients({ firstName: "", lastName: "", email: "", hostName: "", hostEmail: "", roleName: "", type: recipientType.SIGNER, allowSenderToEdit: false, allowSenderToRemove: false });
|
setRecipients({ firstName: "", lastName: "", email: "", hostName: "", hostEmail: "", roleName: "", type: recipientType.SIGNER, allowSenderToEdit: Boolean, allowSenderToRemove: Boolean });
|
||||||
formRef.current?.reset();
|
formRef.current?.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -12,8 +12,6 @@ interface CommonAttrDropDownInt {
|
||||||
|
|
||||||
const CommonAttrDropDown: React.FC<CommonAttrDropDownInt> = ({selectedType, subType, dropDownToggle, setDropDownToggle, handlePropertyChange}) => {
|
const CommonAttrDropDown: React.FC<CommonAttrDropDownInt> = ({selectedType, subType, dropDownToggle, setDropDownToggle, handlePropertyChange}) => {
|
||||||
|
|
||||||
console.log("selectedType, subType,",selectedType, subType)
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col">
|
<div className="flex flex-col">
|
||||||
<label htmlFor="" className="">Type</label>
|
<label htmlFor="" className="">Type</label>
|
||||||
|
|
|
||||||
|
|
@ -33,9 +33,9 @@ export interface DroppedItemProps {
|
||||||
selTagIndx: number,
|
selTagIndx: number,
|
||||||
DirectionalControlsProps: {
|
DirectionalControlsProps: {
|
||||||
onMove: (direction: 'up' | 'down' | 'left' | 'right', stepSize?: number) => void;
|
onMove: (direction: 'up' | 'down' | 'left' | 'right', stepSize?: number) => void;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
stepSize?: number;
|
stepSize?: number;
|
||||||
className?: string;
|
className?: string;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -107,7 +107,7 @@ const RightSideBar: React.FC<DroppedItemProps> = ({ selectedTag, setDroppedItems
|
||||||
|
|
||||||
const selectedType = selectedTag.type in enumMap && enumMap[selectedTag.type as keyof typeof enumMap];
|
const selectedType = selectedTag.type in enumMap && enumMap[selectedTag.type as keyof typeof enumMap];
|
||||||
|
|
||||||
console.log("selectedTag", selectedTag, selectedType)
|
// console.log("selectedTag", selectedTag, selectedType)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -118,33 +118,25 @@ const RightSideBar: React.FC<DroppedItemProps> = ({ selectedTag, setDroppedItems
|
||||||
const [styleOpen, setStyleOpen] = useState(false);
|
const [styleOpen, setStyleOpen] = useState(false);
|
||||||
|
|
||||||
const handlePropertyChange = (changeTo: string, changeWith: string | boolean | number, is24Hrs = null) => {
|
const handlePropertyChange = (changeTo: string, changeWith: string | boolean | number, is24Hrs = null) => {
|
||||||
|
console.log("Handle Property Change Called", "changeTo", changeTo, "changeWith", changeWith)
|
||||||
console.log("changeTo", changeTo, "changeWith", changeWith)
|
|
||||||
if (changeTo === '' || changeWith === '') return
|
if (changeTo === '' || changeWith === '') return
|
||||||
|
|
||||||
if (changeWith === "paragraph") {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if (changeTo === "subType" && (changeWith === TEMPORAL.DATE || changeWith === TEMPORAL.DATE_TIME || changeWith === TEMPORAL.TIME)) {
|
if (changeTo === "subType" && (changeWith === TEMPORAL.DATE || changeWith === TEMPORAL.DATE_TIME || changeWith === TEMPORAL.TIME)) {
|
||||||
// let change: string = changeWith;
|
// let change: string = changeWith;
|
||||||
// if (change === "DATE TIME") {
|
// if (change === "DATE TIME") {
|
||||||
// change = "DATE_TIME"
|
// change = "DATE_TIME"
|
||||||
// }
|
// }
|
||||||
setDroppedItems((prev) => {
|
setDroppedItems((prev) => (
|
||||||
console.log("Temporal30", prev);
|
{
|
||||||
return {
|
|
||||||
...prev,
|
...prev,
|
||||||
[selTagKey]: Array.isArray(prev[selTagKey]) // Ensure it's an array
|
[selTagKey]: Array.isArray(prev[selTagKey]) // Ensure it's an array
|
||||||
? prev[selTagKey].map((item, i) =>
|
? prev[selTagKey].map((item, i) =>
|
||||||
i === selTagIndx ? { ...item, [changeTo]: changeWith || "", format: "", update: true } : item
|
i === selTagIndx ? { ...item, [changeTo]: changeWith || "", format: "", update: true } : item
|
||||||
)
|
)
|
||||||
: [], // Fallback in case it's undefined or not an array
|
: [],
|
||||||
};
|
}// Provide a fallback in case it's undefined or not an array
|
||||||
});
|
));
|
||||||
|
|
||||||
} else if (changeTo === "subType" && typeof changeWith === "string" && changeWith.toLowerCase() === "password") {
|
} else if (changeTo === "subType" && typeof changeWith === "string" && changeWith.toLowerCase() === "password") {
|
||||||
console.log("Second check")
|
|
||||||
console.log("Line 161")
|
console.log("Line 161")
|
||||||
setDroppedItems((prev) => (
|
setDroppedItems((prev) => (
|
||||||
{
|
{
|
||||||
|
|
@ -158,7 +150,6 @@ const RightSideBar: React.FC<DroppedItemProps> = ({ selectedTag, setDroppedItems
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
else if (changeTo === "subType" && (changeWith === NUMBER.CURRENCY || changeWith === NUMBER.INTEGER || changeWith === NUMBER.DECIMAL)) {
|
else if (changeTo === "subType" && (changeWith === NUMBER.CURRENCY || changeWith === NUMBER.INTEGER || changeWith === NUMBER.DECIMAL)) {
|
||||||
console.log("Third check")
|
|
||||||
let decPlace = changeWith !== NUMBER.DECIMAL ? 0 : decimalPlace;
|
let decPlace = changeWith !== NUMBER.DECIMAL ? 0 : decimalPlace;
|
||||||
const isCurrency = changeWith === NUMBER.CURRENCY;
|
const isCurrency = changeWith === NUMBER.CURRENCY;
|
||||||
// const currencyType = null
|
// const currencyType = null
|
||||||
|
|
@ -175,7 +166,6 @@ const RightSideBar: React.FC<DroppedItemProps> = ({ selectedTag, setDroppedItems
|
||||||
));
|
));
|
||||||
|
|
||||||
} else if (changeTo === "format" && selectedTag.subType === TEMPORAL.DATE_TIME) {
|
} else if (changeTo === "format" && selectedTag.subType === TEMPORAL.DATE_TIME) {
|
||||||
console.log("Fourth Check")
|
|
||||||
let val = timeFormats[0].format;
|
let val = timeFormats[0].format;
|
||||||
if (!is24Hrs) {
|
if (!is24Hrs) {
|
||||||
val = timeFormats[1].format
|
val = timeFormats[1].format
|
||||||
|
|
@ -193,6 +183,7 @@ const RightSideBar: React.FC<DroppedItemProps> = ({ selectedTag, setDroppedItems
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
setDroppedItems((prev) => {
|
setDroppedItems((prev) => {
|
||||||
|
console.log('Previous state:', prev);
|
||||||
|
|
||||||
const updatedItems = Array.isArray(prev[selTagKey])
|
const updatedItems = Array.isArray(prev[selTagKey])
|
||||||
? prev[selTagKey].map((item, i) =>
|
? prev[selTagKey].map((item, i) =>
|
||||||
|
|
@ -311,7 +302,7 @@ const RightSideBar: React.FC<DroppedItemProps> = ({ selectedTag, setDroppedItems
|
||||||
<RecipientsAttrCon selectedRecipientId={selectedTag.recipientId} handlePropertyChange={handlePropertyChange} />
|
<RecipientsAttrCon selectedRecipientId={selectedTag.recipientId} handlePropertyChange={handlePropertyChange} />
|
||||||
}
|
}
|
||||||
|
|
||||||
<DirectionalControls {...DirectionalControlsProps} selectedType={selectedTag.dimensions} />
|
<DirectionalControls {...DirectionalControlsProps} selectedType={selectedTag.dimensions}/>
|
||||||
|
|
||||||
|
|
||||||
{selectedTag.label &&
|
{selectedTag.label &&
|
||||||
|
|
|
||||||
|
|
@ -22,8 +22,6 @@ interface TemporalDateAttrInt {
|
||||||
}
|
}
|
||||||
|
|
||||||
const TemporalDateAttr: React.FC<TemporalDateAttrInt> = ({ subType, format, dropDownToggle, setDropDownToggle, handlePropertyChange }) => {
|
const TemporalDateAttr: React.FC<TemporalDateAttrInt> = ({ subType, format, dropDownToggle, setDropDownToggle, handlePropertyChange }) => {
|
||||||
|
|
||||||
|
|
||||||
const [is24Hrs, setIs24Hrs] = useState<boolean>(true);
|
const [is24Hrs, setIs24Hrs] = useState<boolean>(true);
|
||||||
|
|
||||||
const handleIs24HrsClick = (checked: boolean) => {
|
const handleIs24HrsClick = (checked: boolean) => {
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ import DrawSignatureCanvas from './DrawSignatureCanvas';
|
||||||
import { FaSpinner } from "react-icons/fa";
|
import { FaSpinner } from "react-icons/fa";
|
||||||
import { GrCheckboxSelected } from "react-icons/gr";
|
import { GrCheckboxSelected } from "react-icons/gr";
|
||||||
import { Bounce, toast } from "react-toastify";
|
import { Bounce, toast } from "react-toastify";
|
||||||
import { FiCheck } from 'react-icons/fi';
|
|
||||||
|
|
||||||
interface Signature {
|
interface Signature {
|
||||||
id: string;
|
id: string;
|
||||||
|
|
@ -73,10 +72,6 @@ const AddSignatureModal: React.FC<AddSignatureModalProps> = ({
|
||||||
{ id: 6, name: 'classic', initials: 'LA', style: 'classic' },
|
{ id: 6, name: 'classic', initials: 'LA', style: 'classic' },
|
||||||
];
|
];
|
||||||
|
|
||||||
const [checked, setChecked] = useState(false);
|
|
||||||
|
|
||||||
const toggleCheckbox = () => setChecked(!checked);
|
|
||||||
|
|
||||||
const [selectedSignature, setSelectedSignature] = useState<SelectStyle>(
|
const [selectedSignature, setSelectedSignature] = useState<SelectStyle>(
|
||||||
signatureOptions.length > 0 ? { id: signatureOptions[0].id, style: signatureOptions[0].style } : { id: 0, style: "" }
|
signatureOptions.length > 0 ? { id: signatureOptions[0].id, style: signatureOptions[0].style } : { id: 0, style: "" }
|
||||||
);
|
);
|
||||||
|
|
@ -139,10 +134,6 @@ const AddSignatureModal: React.FC<AddSignatureModalProps> = ({
|
||||||
setPreview2(`data:image/png;base64,${editingSignature.initialsBlob}`);
|
setPreview2(`data:image/png;base64,${editingSignature.initialsBlob}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (editingSignature.default) {
|
|
||||||
setChecked(editingSignature.default)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}, [editingSignature]);
|
}, [editingSignature]);
|
||||||
|
|
||||||
|
|
@ -206,8 +197,7 @@ const AddSignatureModal: React.FC<AddSignatureModalProps> = ({
|
||||||
initialsBase64: signatures.initials,
|
initialsBase64: signatures.initials,
|
||||||
firstName: fullName.split(' ')[0] || user.firstName,
|
firstName: fullName.split(' ')[0] || user.firstName,
|
||||||
lastName: fullName.split(' ')[1] || user.lastName,
|
lastName: fullName.split(' ')[1] || user.lastName,
|
||||||
font: selectedSignature.style,
|
font: selectedSignature.style
|
||||||
default:checked
|
|
||||||
};
|
};
|
||||||
|
|
||||||
let res;
|
let res;
|
||||||
|
|
@ -394,6 +384,8 @@ const AddSignatureModal: React.FC<AddSignatureModalProps> = ({
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
case 'SELECT':
|
case 'SELECT':
|
||||||
return (
|
return (
|
||||||
<div className="h-full flex flex-col">
|
<div className="h-full flex flex-col">
|
||||||
|
|
@ -438,7 +430,7 @@ const AddSignatureModal: React.FC<AddSignatureModalProps> = ({
|
||||||
<div className="px-4 py-4 border-b border-gray-200">
|
<div className="px-4 py-4 border-b border-gray-200">
|
||||||
<div className="flex items-center space-x-3">
|
<div className="flex items-center space-x-3">
|
||||||
<div className='px-1 py-1'>
|
<div className='px-1 py-1'>
|
||||||
<h3 className="text-md font-semibold text-gray-900">Add Signature </h3>
|
<h3 className="text-md font-semibold text-gray-900">Add Signature</h3>
|
||||||
<p className="text-xs text-gray-500">Create your digital signature</p>
|
<p className="text-xs text-gray-500">Create your digital signature</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -513,35 +505,6 @@ const AddSignatureModal: React.FC<AddSignatureModalProps> = ({
|
||||||
</button> */}
|
</button> */}
|
||||||
{renderContent()}
|
{renderContent()}
|
||||||
</div>
|
</div>
|
||||||
<div className="text-right px-6 py-1 text-white">
|
|
||||||
<label className="inline-flex items-center cursor-pointer group">
|
|
||||||
<input
|
|
||||||
type="checkbox"
|
|
||||||
checked={checked}
|
|
||||||
onChange={toggleCheckbox}
|
|
||||||
className="sr-only"
|
|
||||||
/>
|
|
||||||
|
|
||||||
{/* Custom checkbox UI */}
|
|
||||||
<div
|
|
||||||
className={`w-4 h-4 border rounded transition-all duration-300 flex items-center justify-center
|
|
||||||
${checked ? 'bg-[var(--modalSubmitBG)] border-[var(--modalSubmitBG)] scale-110' : 'bg-white border-gray-400'}
|
|
||||||
`}
|
|
||||||
>
|
|
||||||
{checked && (
|
|
||||||
<FiCheck className="text-white text-sm transform scale-100 transition-transform duration-300" />
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p className="text-sm text-gray-700 opacity-80 ms-1">
|
|
||||||
{checked
|
|
||||||
? 'Signature will be used by default.'
|
|
||||||
: 'Signature will not be used by default.'}
|
|
||||||
</p>
|
|
||||||
</label>
|
|
||||||
|
|
||||||
{/* Caption text below */}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Footer Buttons in Main Area */}
|
{/* Footer Buttons in Main Area */}
|
||||||
<div className="p-4 border-t border-gray-200 flex justify-end gap-3">
|
<div className="p-4 border-t border-gray-200 flex justify-end gap-3">
|
||||||
|
|
|
||||||
|
|
@ -61,28 +61,9 @@ const Templates = () => {
|
||||||
return new Date(timestamp * 1000).toLocaleString();
|
return new Date(timestamp * 1000).toLocaleString();
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleUseClick = async (item: any) => {
|
const handleUseFun = (id) => {
|
||||||
try {
|
alert(id)
|
||||||
const payload = {
|
}
|
||||||
name: item?.name ?? "",
|
|
||||||
subject: item.subject,
|
|
||||||
message: item.message,
|
|
||||||
description: item.description,
|
|
||||||
expireAfter: item.expireAfter,
|
|
||||||
enableIdStamping: item.enableIdStamping,
|
|
||||||
allowViewAudit: item.allowViewAudit,
|
|
||||||
allowReassign: item.allowReassign,
|
|
||||||
enableSignatureIdStamping: item.enableSignatureIdStamping,
|
|
||||||
templateId: item.id,
|
|
||||||
};
|
|
||||||
let res = await api.post(`/api/accounts/${activeAccountId}/transactions`, payload)
|
|
||||||
console.log("handleUseClick", res.data)
|
|
||||||
// /process-step-one/:accountId/:transactionId
|
|
||||||
navigate(`/process-step-one/${activeAccountId}/${res?.data?.id}`);
|
|
||||||
} catch (error) {
|
|
||||||
console.log(error)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -149,7 +130,7 @@ const Templates = () => {
|
||||||
<td className="px-4 py-2 text-sm text-center">{item.name || 'Dummy'}</td>
|
<td className="px-4 py-2 text-sm text-center">{item.name || 'Dummy'}</td>
|
||||||
<td className="px-4 py-2 text-sm text-center">{formatDate(item.createdAt)}</td>
|
<td className="px-4 py-2 text-sm text-center">{formatDate(item.createdAt)}</td>
|
||||||
<td className="px-4 py-2 text-sm text-center">{formatDate(item.lastModifiedAt)}</td>
|
<td className="px-4 py-2 text-sm text-center">{formatDate(item.lastModifiedAt)}</td>
|
||||||
<td className="px-4 py-2 text-sm text-center" onClick={() => handleUseClick(item)}><span className="from-green-500 cursor-pointer to-blue-500 bg-gradient-to-br px-3 py-1 rounded-lg text-white font-semibold text-[12px]">Use</span></td>
|
<td className="px-4 py-2 text-sm text-center" onClick={() => handleUseFun(item.id)}><span className="from-green-500 cursor-pointer to-blue-500 bg-gradient-to-br px-3 py-1 rounded-lg text-white font-semibold text-[12px]">Use</span></td>
|
||||||
{/* Dropdown Trigger + Tooltip */}
|
{/* Dropdown Trigger + Tooltip */}
|
||||||
<td className="px-4 py-2 text-center relative">
|
<td className="px-4 py-2 text-center relative">
|
||||||
<button
|
<button
|
||||||
|
|
|
||||||
|
|
@ -351,8 +351,6 @@ export interface Recipient {
|
||||||
hostEmail: string;
|
hostEmail: string;
|
||||||
type: recipientType;
|
type: recipientType;
|
||||||
color?: string;
|
color?: string;
|
||||||
allowSenderToEdit: Boolean;
|
|
||||||
allowSenderToRemove: Boolean;
|
|
||||||
roleName:string
|
roleName:string
|
||||||
provideOwnTags?: boolean;
|
provideOwnTags?: boolean;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -40,8 +40,6 @@ const handleGroupBorderPosition = (groupElements: NodeListOf<HTMLElement>, conta
|
||||||
const borderBottom: HTMLElement | null = document.querySelector("[border-group='" + groupElements[0].getAttribute("group") + "'][border-pos='bottom']");
|
const borderBottom: HTMLElement | null = document.querySelector("[border-group='" + groupElements[0].getAttribute("group") + "'][border-pos='bottom']");
|
||||||
const borderLeft: HTMLElement | null = document.querySelector("[border-group='" + groupElements[0].getAttribute("group") + "'][border-pos='left']");
|
const borderLeft: HTMLElement | null = document.querySelector("[border-group='" + groupElements[0].getAttribute("group") + "'][border-pos='left']");
|
||||||
|
|
||||||
console.log("handleGroupBorderPosition")
|
|
||||||
|
|
||||||
if (borderTop !== null && dimension.maxLeft !== null && dimension.minLeft !== null) {
|
if (borderTop !== null && dimension.maxLeft !== null && dimension.minLeft !== null) {
|
||||||
borderTop.style.width = (dimension.maxLeft - dimension.minLeft) + "px";
|
borderTop.style.width = (dimension.maxLeft - dimension.minLeft) + "px";
|
||||||
borderTop.style.height = "1px";
|
borderTop.style.height = "1px";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue