template
This commit is contained in:
parent
8ec313e6d8
commit
5b1d804ec3
|
|
@ -26,6 +26,7 @@ import Account from "./components/accounts/Account";
|
|||
import TransactionView from "./components/transactions/TransactionView";
|
||||
import AccountTransactionWrapper from "./components/AccountTransactionWrapper";
|
||||
import SigningOrderDiagram from "./SigningOrderDiagram ";
|
||||
import Templates from "./components/templates/Templates";
|
||||
|
||||
const App = () => {
|
||||
return (
|
||||
|
|
@ -41,7 +42,7 @@ const App = () => {
|
|||
</ProtectedRoute>
|
||||
}>
|
||||
<Route path="/" element={<Home />} />
|
||||
<Route path="/templates" element={<Home />} />
|
||||
<Route path="/templates" element={<Templates />} />
|
||||
{/* <Route path="/s/settings" element={<Setting />} /> */}
|
||||
|
||||
<Route element={<AccountTransactionWrapper />}>
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ const RecipientAddCard = () => {
|
|||
const handleRecipientAdd = (e: React.FormEvent<HTMLFormElement>) => {
|
||||
e.preventDefault();
|
||||
|
||||
if (recipient.firstName === "" || recipient.lastName === "" || recipient.email === "" || !recipient.type) return;
|
||||
if (recipient.lastName === "" || recipient.email === "" || !recipient.type) return;
|
||||
|
||||
// Validate Email Format
|
||||
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
||||
|
|
@ -106,7 +106,7 @@ const RecipientAddCard = () => {
|
|||
{/* Name Inputs */}
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 gap-4">
|
||||
<input
|
||||
required
|
||||
// required
|
||||
type="text"
|
||||
onFocus={() => setOpenContactModal(true)}
|
||||
onBlur={handleContactModalBlur}
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ import { fetchRecipients } from '../../../store/slices/selectedRecipientsSlice';
|
|||
import { fetchDocuments } from '../../../store/slices/documentSlice';
|
||||
import { FaQuestionCircle } from 'react-icons/fa';
|
||||
import typeToIconMap from '../../../helper/iconMap';
|
||||
import { IoAdd } from 'react-icons/io5';
|
||||
|
||||
export interface DroppedItemsObj {
|
||||
[key: string]: DroppedItem[]
|
||||
|
|
@ -210,12 +211,12 @@ const DocumentContainer: React.FC<DocumentContainerProps> = ({ isSend }) => {
|
|||
"dimensions": dropTag.dimensions,
|
||||
"type": dropTag.type.toUpperCase(),
|
||||
// "subType": (dropTag.subType ? dropTag.subType.toUpperCase() : null),
|
||||
validation: {
|
||||
"minLength": 0,
|
||||
"maxLength": 0,
|
||||
"error": ("error" in dropTag && dropTag.error) ? `${dropTag.error}`.toUpperCase() : "error",
|
||||
"regex": "regex" in dropTag ? dropTag.regex : []
|
||||
},
|
||||
// validation: {
|
||||
"minLength": 0,
|
||||
"maxLength": 0,
|
||||
"error": ("error" in dropTag && dropTag.error) ? `${dropTag.error}`.toUpperCase() : "error",
|
||||
"regex": "regex" in dropTag ? dropTag.regex : [],
|
||||
// },
|
||||
"documentId": dropTag.documentId,
|
||||
"options": ("options" in dropTag) ? dropTag.options : [],
|
||||
"pageIndex": dropTag.pageIndex,
|
||||
|
|
@ -275,10 +276,10 @@ const DocumentContainer: React.FC<DocumentContainerProps> = ({ isSend }) => {
|
|||
tagsData = groupByRecipientId(tagsData);
|
||||
sendTagsToRecipients(tagsData, accountId, transactionId);
|
||||
|
||||
// (async () => {
|
||||
// const res = await api.put(`/api/accounts/${accountId}/transactions/${transactionId}`, {status: "SENT"})
|
||||
// console.log(res, "Check123")
|
||||
// })()
|
||||
(async () => {
|
||||
const res = await api.put(`/api/accounts/${accountId}/transactions/${transactionId}`, {status: "SENT"})
|
||||
console.log(res, "Check123")
|
||||
})()
|
||||
}, [isSend])
|
||||
// Save Tags - END
|
||||
|
||||
|
|
@ -519,6 +520,11 @@ const DocumentContainer: React.FC<DocumentContainerProps> = ({ isSend }) => {
|
|||
})()
|
||||
}
|
||||
|
||||
const handleAddRadioClick = (key:string) => {
|
||||
console.log("Handle Radio Clicled", key)
|
||||
console.log(droppedItems, "line 525")
|
||||
}
|
||||
|
||||
// const handleAddRadio = (e: React.MouseEvent<HTMLElement>, key: string, index: number) => {
|
||||
// // const dataToSet: DroppedItemsObj = {
|
||||
// // ...droppedItems,
|
||||
|
|
@ -698,21 +704,53 @@ const DocumentContainer: React.FC<DocumentContainerProps> = ({ isSend }) => {
|
|||
{/* Expand Circle - ENDS */}
|
||||
|
||||
|
||||
{
|
||||
item.type !== "radio" ?
|
||||
<div
|
||||
onPointerDown={(e) => handleTagMouseDown(e, key, index)}
|
||||
// style={{ width: `${item.width}px !important` }}
|
||||
className='p-2 rounded-sm h-full shadow opacity-40 cursor-grab w-full'
|
||||
style={{ background: selectedRecipient[0]?.color }}
|
||||
>
|
||||
<p
|
||||
className={`flex justify-center items-center w-full text-xl text-white h-full`}
|
||||
// style={{ color: selectedRecipients[item.recipientIndx]?.color }}
|
||||
>
|
||||
{IconComponent}
|
||||
</p>
|
||||
</div>
|
||||
:
|
||||
<>
|
||||
<div>
|
||||
{/* Radio - Container - START */}
|
||||
<div>
|
||||
|
||||
<div
|
||||
onPointerDown={(e) => handleTagMouseDown(e, key, index)}
|
||||
// style={{ width: `${item.width}px !important` }}
|
||||
className='p-2 rounded-sm h-full shadow opacity-40 cursor-grab w-full'
|
||||
style={{ background: selectedRecipient[0]?.color }}
|
||||
>
|
||||
<p
|
||||
className={`flex justify-center items-center w-full text-xl text-white h-full`}
|
||||
// style={{ color: selectedRecipients[item.recipientIndx]?.color }}
|
||||
>
|
||||
{IconComponent}
|
||||
</p>
|
||||
</div>
|
||||
{/* Radio- Item - START */}
|
||||
<div
|
||||
onPointerDown={(e) => handleTagMouseDown(e, key, index)}
|
||||
// style={{ width: `${item.width}px !important` }}
|
||||
className='p-2 rounded-sm h-full shadow opacity-40 cursor-grab w-full'
|
||||
style={{ background: selectedRecipient[0]?.color }}
|
||||
>
|
||||
<p
|
||||
className={`flex justify-center items-center w-full text-xl text-white h-full`}
|
||||
// style={{ color: selectedRecipients[item.recipientIndx]?.color }}
|
||||
>
|
||||
{IconComponent}
|
||||
</p>
|
||||
</div>
|
||||
{/* Radio- Item - END */}
|
||||
|
||||
</div>
|
||||
{/* Radio - Container - END */}
|
||||
|
||||
|
||||
<IoAdd onClick={() => handleAddRadioClick(key)} className='ml-[50%] translate-x-[-50%] cursor-pointer' />
|
||||
</div>
|
||||
|
||||
</>
|
||||
|
||||
}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
import React from 'react'
|
||||
|
||||
const Templates = () => {
|
||||
return (
|
||||
<div>Templates</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default Templates
|
||||
|
|
@ -29,7 +29,7 @@ api.interceptors.response.use(
|
|||
const originalRequest = error.config;
|
||||
// Prevent multiple refresh attempts
|
||||
// if (error.response?.status === 401 || error.response?.status === 500) {
|
||||
if (error.response?.status === 401) {
|
||||
if (error.response?.status === 401 || error.response?.status === 500) {
|
||||
originalRequest._retry = true;
|
||||
try {
|
||||
if (!isRefreshing) {
|
||||
|
|
|
|||
|
|
@ -11,7 +11,8 @@ export default defineConfig({
|
|||
'quality-friendly-goldfish.ngrok-free.app',
|
||||
'officially-powerful-goat.ngrok-free.app',
|
||||
'89f0-49-36-189-120.ngrok-free.app',
|
||||
'c8ee-49-36-191-130.ngrok-free.app'
|
||||
'c8ee-49-36-191-130.ngrok-free.app',
|
||||
'c76f1251c173.ngrok-free.app'
|
||||
],
|
||||
},
|
||||
build: {
|
||||
|
|
|
|||
Loading…
Reference in New Issue