commit 11ebd9e1fb72090ef6fb336567ba3b16f9461570 Author: = <=> Date: Fri Jun 27 16:09:44 2025 +0530 SME Web - 27-06-2025 diff --git a/.env b/.env new file mode 100644 index 0000000..23bf83b --- /dev/null +++ b/.env @@ -0,0 +1,3 @@ +# VITE_BASE_URI="https://officially-powerful-goat.ngrok-free.app" +# VITE_BASE_URI="https://python-amused-adder.ngrok-free.app" +VITE_BASE_URI="https://concrete-gladly-mullet.ngrok-free.app" \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a547bf3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,24 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/README.md b/README.md new file mode 100644 index 0000000..74872fd --- /dev/null +++ b/README.md @@ -0,0 +1,50 @@ +# React + TypeScript + Vite + +This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. + +Currently, two official plugins are available: + +- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh +- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh + +## Expanding the ESLint configuration + +If you are developing a production application, we recommend updating the configuration to enable type aware lint rules: + +- Configure the top-level `parserOptions` property like this: + +```js +export default tseslint.config({ + languageOptions: { + // other options... + parserOptions: { + project: ['./tsconfig.node.json', './tsconfig.app.json'], + tsconfigRootDir: import.meta.dirname, + }, + }, +}) +``` + +- Replace `tseslint.configs.recommended` to `tseslint.configs.recommendedTypeChecked` or `tseslint.configs.strictTypeChecked` +- Optionally add `...tseslint.configs.stylisticTypeChecked` +- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and update the config: + +```js +// eslint.config.js +import react from 'eslint-plugin-react' + +export default tseslint.config({ + // Set the react version + settings: { react: { version: '18.3' } }, + plugins: { + // Add the react plugin + react, + }, + rules: { + // other rules... + // Enable its recommended rules + ...react.configs.recommended.rules, + ...react.configs['jsx-runtime'].rules, + }, +}) +``` diff --git a/constants_api.json b/constants_api.json new file mode 100644 index 0000000..cee7a5d --- /dev/null +++ b/constants_api.json @@ -0,0 +1,20 @@ +{ + "LOGIN": { + "path": "/api/auth/login", + "method": "POST", + "expecte_success_status_code": 200, + "expected_error_status_code": 401, + "default_error_message": "Internal server error" + }, + "AUTH": { + "path": "/api/auth", + "sub": { + "LOGIN":{ + "path": "/login" + } + } + }, + "CREATE_TRANSACTION": { + "path": "/api/account/${var1}/transactions/${var2}" + } +} \ No newline at end of file diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000..092408a --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,28 @@ +import js from '@eslint/js' +import globals from 'globals' +import reactHooks from 'eslint-plugin-react-hooks' +import reactRefresh from 'eslint-plugin-react-refresh' +import tseslint from 'typescript-eslint' + +export default tseslint.config( + { ignores: ['dist'] }, + { + extends: [js.configs.recommended, ...tseslint.configs.recommended], + files: ['**/*.{ts,tsx}'], + languageOptions: { + ecmaVersion: 2020, + globals: globals.browser, + }, + plugins: { + 'react-hooks': reactHooks, + 'react-refresh': reactRefresh, + }, + rules: { + ...reactHooks.configs.recommended.rules, + 'react-refresh/only-export-components': [ + 'warn', + { allowConstantExport: true }, + ], + }, + }, +) diff --git a/index.html b/index.html new file mode 100644 index 0000000..e4b78ea --- /dev/null +++ b/index.html @@ -0,0 +1,13 @@ + + +
+ + + +Transaction Sent
*/} +{signer.name.split(" ")[0]}
+| + | Name | +Status | +Active | +Last Change | +Expire After (days) | ++ |
|---|---|---|---|---|---|---|
|
+
+ {selectedTransactions.includes(tx.id) && (
+
+ |
+ + {tx.subject || "Untitled"} + | ++ + {tx.status} + + | ++ {tx.active ? "Yes" : "No"} + | + ++ {formatDate(tx.lastModifiedAt)} + | ++ {tx.expireAfter ?? "-"} + | +
+ |
+
| */} + | Account Name | +Account ID | +Role | +Status | ++ |
|---|---|---|---|---|---|
|
+
+ {selectedAccounts.includes(account.accountId) && (
+
+ | */}
+
+
+
+ |
+ {account.accountId} | ++ + {account.role} + + | ++ + {status.text} + + | +
+ |
+
or login with social platforms
+ +Create an Account. Register
+Already! have an Account. Login
+Don't have an account?
+ +Already have an account?
+ +Welcome to Sign Made Easy! These Terms & Conditions govern your use of our application.
+By accessing our services, you agree to comply with and be bound by the following terms.
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam varius placerat tellus, sed sodales odio cursus nec. Sed lacinia...
+Etiam in diam efficitur, congue lorem sed, malesuada orci. Aliquam bibendum purus nec velit fermentum laoreet. Integer finibus...
+We reserve the right to modify these terms at any time without prior notice. Continued use constitutes your acceptance of those changes.
+Thanks for choosing us to make signing easy, secure, and smooth. 🙌
+Your transaction has been created and saved successfully.
++ {loaderData.message != undefined ? `${loaderData.message}` : 'Loading ...'} +
+{label}
} + + + > + ); +}; + +export default NavLink; + + +// {label === "Transactions" ?{label}
} +// + +//All
} +// {transactionFilter === TransactionFilterEnum.ALL &&Draft
} +// {transactionFilter === TransactionFilterEnum.DRAFT &&Sent
} +// {transactionFilter === TransactionFilterEnum.SENT &&Completed
} +// {transactionFilter === TransactionFilterEnum.COMPLETE &&Declined
} +// {transactionFilter === TransactionFilterEnum.DECLINED &&Discarded
} +// {transactionFilter === TransactionFilterEnum.DISCARDED &&Canceled
} +// {transactionFilter === TransactionFilterEnum.CANCELED &&Expired
} +// {transactionFilter === TransactionFilterEnum.EXPIRED &&Send for signature
+ : +
+
Self Sign
+You're the only signer.
+Send for Sign
+You and other need to sign.
+Are you sure you want to log out?
+{card.title}
+{card.count}
+Filter
+Sort
+.{doc.extension}
++ {doc.original ? "Original" : "Signed"} +
+| + | Name | +Type | +Status | ++ |
|---|---|---|---|---|
|
+ {/* handleSelect(doc.id)}
+ className="form-checkbox text-blue-600"
+ /> */}
+
+
+ {selectedDocs.includes(doc.id) &&
+ |
+ + + | ++ {doc.extension} + | ++ + {doc.original ? "Original" : "Signed"} + + | + {/*
+ | */}
+
{card.description}
+Upload or drag & drop files
+PDF, DOCX, JPG, PNG, TXT (max 10MB)
+Discard Changes
+All changes you have made to this form will be discarded
+Document Uploaded {modalState.message && `( ${modalState.message} )`}
+Self Signature
+You're the only signer.
+Send for Signature
+You and other need to sign.
+Add Recipient Details
++ {recipient.firstName} +
++ {recipient.lastName} +
++ {recipient.email} +
++// {val.firstName} +//
+export default ContactModal \ No newline at end of file diff --git a/src/components/process/processStepOne/DocumentCard.tsx b/src/components/process/processStepOne/DocumentCard.tsx new file mode 100644 index 0000000..9ee982d --- /dev/null +++ b/src/components/process/processStepOne/DocumentCard.tsx @@ -0,0 +1,201 @@ +import React, { useEffect, useState } from 'react' +import { FaFileAlt, FaCheckCircle, FaUpload } from 'react-icons/fa' +import { MdFileUpload } from 'react-icons/md' +import { RiDraggable } from 'react-icons/ri' +import { deleteDocument, setDocProgComplete } from '../../../store/slices/documentSlice' +import { useDispatch } from 'react-redux' +import { AppDispatch } from '../../../store/store' +import { IoMdClose } from 'react-icons/io' +import api from '../../../config/api' +import { useParams } from 'react-router-dom' + +interface DocumentCardProps { + id: string; + name: string; + isCompleted: boolean; +} + +const DocumentCard: React.FCAre you sure you want to delete?
+Add Recipient and Message
++ {recipient.firstName} {recipient.lastName || ""} +
++ {recipient.email} | {recipient.type} +
+Signing Order
+Upload Document
+Drag & drop files here or
+ + +{activeTab} integration coming soon...
+{doc.name}
+{IconComponent} +
+{item.label}
++ {IconComponent} +
++ page {indx + 1} of {doc.images && doc.images.length} +
+ {/*+ Document {indxDoc + 1} {doc.name} +
*/} + {/* Side details of documents Pages and document Name - END */} + + ++ {field.type.toLowerCase()} +
+{selectedRecipient.firstName} {selectedRecipient.lastName}
+{recipient.firstName} {recipient.lastName}
+{document.name}
+{indx + 1}
+ + ))} +Fields
+Pages
+Reset
+Fit
+Fit
+{val.label}
+ {selFitIndx === indx &&{transactionSaving ? `Saving ${dots}` : "Save"}
+{selectedDocuments.length} Documents
+{document.name}
+{selectedRecipients.length} Recipients
+{recipient.firstName} {recipient.lastName} segfsdtzgszrdtgrs serdgvsrdgs dtrgv
+Send
+Setup your Document
+ +Prepare
+ +Hooray !
+ +Properties
+{selectedTag?.subType ? (selectedTag.subType === "date_time" ? "Date Time" : selectedTag.subType) : selectedType[Object.keys(selectedType)[0] as keyof typeof selectedType]}
+{(selectedTag.maskType && selectedTag.maskType.replace("_", " ")) ? selectedTag.maskType : MASKTYPE.ALL}
+
+ {selectedTag?.maskCharacter
+ ?
+ selectedTag.maskCharacter === MASKCHARACTER.ASTERISK &&
+ {selectedTag.format ? selectedTag.format : dateTimeFormatMap['date'][0].format} + {/* {(selectedTag.subType !== TEMPORAL.DATE && selectedTag.subType !== TEMPORAL.TIME) ? (is24Hrs ? " " + timeFormats[0].format : " " + timeFormats[1].format) : ""} */} +
++ Example +
*/} +{dayjs().format(selectedTag.format)}
+{val}
+{index === 0 ? "Signature" : "Initial"}
+Draw
+Type
+Upload
++ {signatureFile ? 'Signature Uploaded' : 'Drop Signature Here or Click to Upload'} +
+ {signatureFile && ( ++ {initialFile ? 'Initials Uploaded' : 'Drop Initials Here or Click to Upload'} +
+ {initialFile && ( ++ {typedSign ? typedSign : "Signature"} +
++ {typedInitial ? typedInitial : "Initial"} +
+Click or drag image here
+(Only image files)
+ +From Shanu.R
+Last Change on 12/02/25
+Sent on 11/02/25
+Draft
+ + {/* Buttons */} +
+
{recipient.id}
+{recipient.name}
+{recipient.email}
+ {recipient.hostEmail !== null &&Host: {recipient.hostEmail}
} +{recipient.status}
+on {recipient.completedAt}
} + {/* + View signed location + */} +No Message Found
+abc.pdf
+1 of 10
+| Name | +Created At | +Status | +Documents | +Recipients | +
|---|---|---|---|---|
| + {tx.name?.trim() || 'N/A'} + | ++ {new Date(tx.createAt).toLocaleString()} + | ++ + {tx.status} + + | +
+
|
+
+ {tx.recipients.map((rec) => (
+
+
+ ))}
+
+ {rec.firstName} {rec.lastName}
+
+ Status: {rec.status}
+ {rec.signedDateTime && (
+
+ Signed: {new Date(rec.signedDateTime).toLocaleString()}
+
+ )}
+ |
+
No Data Found
+Fields
+Pages
+Reset
+Fit
+{val.label}
+ {selFitIndx === indx &&