Compare commits

..
293 Commits
Author SHA1 Message Date
prafull-opensignlabsandGitHub 0444e17848 Merge pull request #1047 from OpenSignLabs/raktima-opensignlabs-patch-11
fix: something went wrong issue while signing document in public profile
2024-08-13 16:36:01 +05:30
RaktimaNXG c3d039fe45 fix: style of copy alert 2024-08-13 16:24:20 +05:30
RaktimaNXG 1d5d713854 refactor code 2024-08-13 16:07:37 +05:30
RaktimaNXG 4336c15ca4 resolve conflict 2024-08-13 15:58:17 +05:30
RaktimaNXG aac644d15c Merge branch 'staging' of https://github.com/OpenSignLabs/OpenSign into raktima-opensignlabs-patch-11 2024-08-13 15:55:52 +05:30
RaktimaNXG ab3dde17c7 remove times.ttf file to cdn file 2024-08-13 15:48:54 +05:30
AmolandGitHub 924ec33d73 docs: Update README.md with docker installation instructions 2024-08-13 15:37:31 +05:30
RaktimaNXG d798e02126 Merge branch 'staging' of https://github.com/OpenSignLabs/OpenSign into raktima-opensignlabs-patch-11 2024-08-13 15:27:34 +05:30
prafull-opensignlabsandGitHub bc08aeb5b7 Merge pull request #1046 from OpenSignLabs/fix_widgets
Fix: issue of unnecessary alert is occurred in request sign flow
2024-08-13 15:05:36 +05:30
AmolandGitHub c32067890c Merge pull request #1043 from OpenSignLabs/docker_beta
Feat: official docker images
2024-08-13 15:03:45 +05:30
prafull-opensignlabs 83a180e3b8 Fix: issue of unccesary alert is occured in request sign flow 2024-08-13 15:03:04 +05:30
prafull-opensignlabsandGitHub 7500797dd0 Merge pull request #1045 from OpenSignLabs/fix_widgets
Fix: special characters are not allowed in dropdown widget
2024-08-13 13:09:44 +05:30
prafull-opensignlabs 9427f4141f Fix: special characters are not allowed in dropdown 2024-08-13 13:07:33 +05:30
prafull-opensignlabsandGitHub 1440244c4d Merge pull request #1044 from OpenSignLabs/fix_reactquill
Fix: security issue of react-quill dependencies
2024-08-13 12:07:47 +05:30
prafull-opensignlabs 47c8b82cfa fix: remove warning of react-quill 2024-08-13 11:56:02 +05:30
prafull-opensignlabs 540f23fb41 fix: security issue of react-quill dependencies 2024-08-13 11:40:54 +05:30
RaktimaNXG 323c9f2d4f fix: add copy & share button for user's public profile url in profile page 2024-08-13 11:00:55 +05:30
prafull-opensignlabsandGitHub 1d648b525f Merge pull request #1035 from OpenSignLabs/dependabot/npm_and_yarn/apps/OpenSign/react-i18next-15.0.1
build(deps): bump react-i18next from 15.0.0 to 15.0.1 in /apps/OpenSign
2024-08-13 10:16:11 +05:30
prafull-opensignlabsandGitHub 11c2771451 Merge pull request #1036 from OpenSignLabs/dependabot/npm_and_yarn/apps/OpenSign/lottiefiles/dotlottie-react-0.8.7
build(deps): bump @lottiefiles/dotlottie-react from 0.8.6 to 0.8.7 in /apps/OpenSign
2024-08-13 10:15:22 +05:30
prafull-opensignlabsandGitHub 1733756b4a Merge pull request #1037 from OpenSignLabs/dependabot/npm_and_yarn/apps/OpenSign/axios-1.7.3
build(deps): bump axios from 1.7.2 to 1.7.3 in /apps/OpenSign
2024-08-13 10:14:51 +05:30
prafull-opensignlabsandGitHub edf1933800 Merge pull request #1038 from OpenSignLabs/dependabot/npm_and_yarn/apps/OpenSign/tailwindcss-3.4.9
build(deps-dev): bump tailwindcss from 3.4.7 to 3.4.9 in /apps/OpenSign
2024-08-13 10:14:28 +05:30
prafull-opensignlabs 38d3165d14 refactor: update branch name 2024-08-12 19:35:12 +05:30
AmolandGitHub 5766b307c1 Merge pull request #1042 from OpenSignLabs/fix_widgets 2024-08-12 19:12:23 +05:30
prafull-opensignlabs 6497703d3b fix: signature is blurly in certificate 2024-08-12 19:10:17 +05:30
AmolandGitHub 60e48580ae Merge pull request #1041 from OpenSignLabs/raktima-opensignlabs-patch-11 2024-08-12 18:05:37 +05:30
RaktimaNXG 08b52f3618 fix: multi-language support issue in public profile 2024-08-12 18:02:32 +05:30
dependabot[bot]andGitHub 55001cc434 build(deps): bump @lottiefiles/dotlottie-react in /apps/OpenSign
Bumps [@lottiefiles/dotlottie-react](https://github.com/LottieFiles/dotlottie-web/tree/HEAD/packages/react) from 0.8.6 to 0.8.7.
- [Release notes](https://github.com/LottieFiles/dotlottie-web/releases)
- [Changelog](https://github.com/LottieFiles/dotlottie-web/blob/main/packages/react/CHANGELOG.md)
- [Commits](https://github.com/LottieFiles/dotlottie-web/commits/@lottiefiles/dotlottie-react@0.8.7/packages/react)

---
updated-dependencies:
- dependency-name: "@lottiefiles/dotlottie-react"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-12 12:30:33 +00:00
RaktimaandGitHub b84b864396 Merge pull request #1040 from OpenSignLabs/fix_widgets
fix: Hiding the text fields widget if entering the Special Characters
2024-08-12 17:59:09 +05:30
prafull-opensignlabsandGitHub 34835b8cdf Merge pull request #1039 from OpenSignLabs/file_upload
Fix: file upload is not working
2024-08-12 14:14:24 +05:30
prafull-opensignlabs df8bdbf5b3 fix: Hiding the text fields widget if entering the Special Characters 2024-08-12 14:10:41 +05:30
prafull-opensignlabs e775a832cb fix: file upload is not working 2024-08-12 13:08:41 +05:30
dependabot[bot]andGitHub b9c4bada23 build(deps-dev): bump tailwindcss from 3.4.7 to 3.4.9 in /apps/OpenSign
Bumps [tailwindcss](https://github.com/tailwindlabs/tailwindcss) from 3.4.7 to 3.4.9.
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/v3.4.9/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/compare/v3.4.7...v3.4.9)

---
updated-dependencies:
- dependency-name: tailwindcss
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-12 00:32:13 +00:00
dependabot[bot]andGitHub 97f35f7ee6 build(deps): bump axios from 1.7.2 to 1.7.3 in /apps/OpenSign
Bumps [axios](https://github.com/axios/axios) from 1.7.2 to 1.7.3.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.7.2...v1.7.3)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-12 00:31:59 +00:00
dependabot[bot]andGitHub 0f90a06028 build(deps): bump react-i18next from 15.0.0 to 15.0.1 in /apps/OpenSign
Bumps [react-i18next](https://github.com/i18next/react-i18next) from 15.0.0 to 15.0.1.
- [Changelog](https://github.com/i18next/react-i18next/blob/master/CHANGELOG.md)
- [Commits](https://github.com/i18next/react-i18next/compare/v15.0.0...v15.0.1)

---
updated-dependencies:
- dependency-name: react-i18next
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-12 00:31:28 +00:00
AndrewandGitHub db4f2e7696 Merge pull request #1032 from OpenSignLabs/raktima-opensignlabs-patch-11 2024-08-10 16:45:50 +05:30
RaktimaNXG 69837b0515 fix: language support issue in public-profile 2024-08-10 16:23:10 +05:30
AndrewandGitHub 9811c49288 Merge pull request #1031 from OpenSignLabs/gmail_login 2024-08-09 20:25:35 +05:30
prafull-opensignlabs d709c99641 Fix: update translation message 2024-08-09 20:16:51 +05:30
prafull-opensignlabs a92666082f Fix: showing the wrong alert when updating the team. 2024-08-09 20:14:11 +05:30
AndrewandGitHub cc05b28a42 Merge pull request #1029 from OpenSignLabs/gmail_login 2024-08-09 20:00:59 +05:30
prafull-opensignlabsandGitHub a2c9953096 Merge pull request #1028 from OpenSignLabs/raktima-opensignlabs-patch-11
fix: issue with empty emails when using customized mail in send-request flow
2024-08-09 19:59:49 +05:30
prafull-opensignlabs 75ef6934b4 fix: gmail login not working 2024-08-09 19:58:29 +05:30
RaktimaNXG aa4d3c039b fix: issue with empty emails when using customized mail in send-request flow 2024-08-09 18:41:28 +05:30
prafull-opensignlabsandGitHub 290ff54638 Merge pull request #1027 from OpenSignLabs/raktima-opensignlabs-patch-11
fix: unable to enter email issue in add signers form
2024-08-09 18:01:19 +05:30
RaktimaNXG dc4decffe4 fix: unable to enter email issue in add signer form 2024-08-09 17:57:53 +05:30
prafull-opensignlabsandGitHub e2eca66db0 Merge pull request #1024 from OpenSignLabs/raktima-opensignlabs-patch-11
fix: error in auto-sign feature unexpected issue encountered - something went wrong
2024-08-09 16:29:24 +05:30
RaktimaNXG d20913023e fix: email condition issue in adduser file 2024-08-09 16:25:22 +05:30
RaktimaNXG f4466dc325 fix: resolve public url 2024-08-09 15:41:35 +05:30
RaktimaNXG 00e6ea5b3b fix: resolve warning 2024-08-09 15:31:57 +05:30
RaktimaNXG 50b0a3ea17 fix: resolve issue of support multi-language in public script file 2024-08-09 15:03:56 +05:30
RaktimaNXG 0072e3e5ba refactor code 2024-08-09 13:43:39 +05:30
RaktimaNXG 2238f1fafc Merge branch 'staging' of https://github.com/OpenSignLabs/OpenSign into raktima-opensignlabs-patch-11 2024-08-09 10:30:41 +05:30
prafull-opensignlabs 00bc5a00c1 Merge branch 'staging' of https://github.com/OpenSignLabs/OpenSign into docker_beta 2024-08-09 10:17:56 +05:30
prafull-opensignlabsandGitHub 6bc0470c69 Merge pull request #1026 from OpenSignLabs/prafull-opensignlabs-patch-26
fix: not able to update company
2024-08-08 20:01:06 +05:30
prafull-opensignlabsandGitHub a9ab25e9c2 fix: not able to update company 2024-08-08 19:57:01 +05:30
prafull-opensignlabsandGitHub fd5bc22a70 Merge pull request #1025 from OpenSignLabs/prafull-opensignlabs-patch-26
fix: not able update user profile
2024-08-08 19:29:36 +05:30
prafull-opensignlabsandGitHub 28fe1fafd6 fix: not able update user profile 2024-08-08 19:14:56 +05:30
RaktimaNXG 6695138244 fix: tour message translation issue of templates report 2024-08-08 17:58:20 +05:30
RaktimaNXG 3fb19cbe96 fix: failed to load message issue while sign document in signyour-self flow 2024-08-08 17:36:08 +05:30
RaktimaNXG 3f8a17c3ea fix: contactbook report title to name in heading 2024-08-08 16:31:26 +05:30
RaktimaNXG 9fa97f27f0 fix: error in auto-sign feature unexpected issue encountered - something went wrong 2024-08-08 15:55:11 +05:30
RaktimaNXG 0e98312d55 Merge branch 'staging' of https://github.com/OpenSignLabs/OpenSign into raktima-opensignlabs-patch-11 2024-08-08 15:25:56 +05:30
AmolandGitHub 06057a1d35 Merge pull request #1023 from OpenSignLabs/prafull-opensignlabs-patch-25
fix: error while calling webhook
2024-08-08 15:01:04 +05:30
prafull-opensignlabsandGitHub 4373fddaa8 fix: Error while calling webhook 2024-08-08 14:58:38 +05:30
AmolandGitHub c45511d9a5 Merge pull request #1019 from OpenSignLabs/raktima-opensignlabs-patch-11
feat: Integrate language support for multiple languages in the application
2024-08-08 14:36:20 +05:30
RaktimaNXG 7d2b2494e5 Merge branch 'staging' of https://github.com/OpenSignLabs/OpenSign into raktima-opensignlabs-patch-11 2024-08-08 13:23:18 +05:30
RaktimaNXG d74dc2f4ca fix:improve readability by updating some French words 2024-08-08 12:54:05 +05:30
prafull-opensignlabsandGitHub f8c9c535a0 Merge pull request #1021 from OpenSignLabs/prafull-opensignlabs-patch-23
fix: not able to create user using add user form
2024-08-08 12:30:18 +05:30
prafull-opensignlabsandGitHub d22322be86 fix: not able to create user using add user form 2024-08-08 12:28:31 +05:30
RaktimaNXG 74792a9c21 refactor code 2024-08-07 16:08:02 +05:30
RaktimaNXG eb345b5ca2 fix: after filled any input value still show warning of empty field 2024-08-07 15:50:54 +05:30
RaktimaNXG 23c2b4b204 fix: remove console 2024-08-07 14:51:43 +05:30
RaktimaNXG 095e616e4c fix: refactor code 2024-08-07 14:47:37 +05:30
RaktimaNXG 89f4626fce checking error 2024-08-07 14:43:15 +05:30
RaktimaNXG c759d673f0 refactor code 2024-08-07 14:03:45 +05:30
RaktimaNXG 8d1be554d4 fix: input validation warning translation issue 2024-08-07 14:00:52 +05:30
prafull-opensignlabsandGitHub e931d06ed4 Merge pull request #1018 from OpenSignLabs/validation
fix: something went wrong error in signpdf
2024-08-07 13:56:40 +05:30
prafull-opensignlabs 76b90f9bc0 fix: something went wrong error in signpdf 2024-08-07 13:45:49 +05:30
prafull-opensignlabsandGitHub b4e5fedb51 Merge pull request #1016 from OpenSignLabs/dependabot/npm_and_yarn/apps/OpenSign/npm_and_yarn-5105dbd604
build(deps-dev): bump postcss from 8.4.40 to 8.4.41 in /apps/OpenSign in the npm_and_yarn group
2024-08-07 10:09:41 +05:30
dependabot[bot]andGitHub 6a229aabaf build(deps-dev): bump postcss
Bumps the npm_and_yarn group in /apps/OpenSign with 1 update: [postcss](https://github.com/postcss/postcss).


Updates `postcss` from 8.4.40 to 8.4.41
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.40...8.4.41)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: direct:development
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-06 16:32:51 +00:00
RaktimaNXG 841c7df2f3 Merge branch 'staging' of https://github.com/OpenSignLabs/OpenSign into raktima-opensignlabs-patch-11 2024-08-06 20:25:56 +05:30
RaktimaNXG dd85ce7cfe fix: after create new user selected language change in en-USA 2024-08-06 20:25:26 +05:30
RaktimaNXG 4c7d771bb3 fix: apply language support in profile also and save in database, issue of text translate in guest login flow and other place 2024-08-06 17:02:16 +05:30
ZathielandGitHub c55bdba948 Merge pull request #1010 from OpenSignLabs/dependabot/npm_and_yarn/apps/OpenSign/lottiefiles/dotlottie-react-0.8.6 2024-08-06 11:10:15 +02:00
ZathielandGitHub 4f2dce0a03 Merge pull request #1014 from OpenSignLabs/dependabot/npm_and_yarn/apps/OpenSignServer/axios-1.7.3 2024-08-06 11:09:51 +02:00
ZathielandGitHub 450a992b26 Merge pull request #1011 from OpenSignLabs/dependabot/npm_and_yarn/apps/OpenSign/lint-staged-15.2.8 2024-08-06 11:07:53 +02:00
dependabot[bot]andGitHub 4284b2402b build(deps): bump axios from 1.7.2 to 1.7.3 in /apps/OpenSignServer
Bumps [axios](https://github.com/axios/axios) from 1.7.2 to 1.7.3.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.7.2...v1.7.3)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-06 09:06:27 +00:00
ZathielandGitHub 50c88f82f4 Merge pull request #1012 from OpenSignLabs/dependabot/npm_and_yarn/apps/OpenSign/react-tooltip-5.28.0 2024-08-06 11:06:04 +02:00
ZathielandGitHub 7dff3dc658 Merge pull request #1013 from OpenSignLabs/dependabot/npm_and_yarn/apps/OpenSign/react-router-dom-6.26.0 2024-08-06 11:04:59 +02:00
ZathielandGitHub adb3864ea9 Merge pull request #1015 from OpenSignLabs/dependabot/npm_and_yarn/apps/OpenSignServer/aws-sdk-2.1667.0 2024-08-06 11:04:20 +02:00
prafull-opensignlabs d6330060dc refactor: moved from yml to env 2024-08-05 21:16:13 +05:30
prafull-opensignlabs 2dcb35a34c fix: docker compose file depends on env file 2024-08-05 17:09:44 +05:30
prafull-opensignlabs 624ba95792 fix: connection refused while sending mail 2024-08-05 14:31:55 +05:30
prafull-opensignlabs ae24a80b95 fix: url variable in sendmail gmail 2024-08-05 13:12:52 +05:30
prafull-opensignlabs e7f1b1cc32 fix: vairable intiailzation error 2024-08-05 12:55:33 +05:30
prafull-opensignlabs e71940ecdc fix:add env in docker compose, save tenantcredit and datafiles is not working 2024-08-05 12:43:44 +05:30
dependabot[bot]andGitHub 65a800701c build(deps): bump aws-sdk in /apps/OpenSignServer
Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.1665.0 to 2.1667.0.
- [Release notes](https://github.com/aws/aws-sdk-js/releases)
- [Commits](https://github.com/aws/aws-sdk-js/compare/v2.1665.0...v2.1667.0)

---
updated-dependencies:
- dependency-name: aws-sdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-05 00:57:47 +00:00
dependabot[bot]andGitHub 36dc1fb3e9 build(deps): bump react-router-dom in /apps/OpenSign
Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.25.1 to 6.26.0.
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.26.0/packages/react-router-dom)

---
updated-dependencies:
- dependency-name: react-router-dom
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-05 00:28:51 +00:00
dependabot[bot]andGitHub 99305b4185 build(deps): bump react-tooltip from 5.27.1 to 5.28.0 in /apps/OpenSign
Bumps [react-tooltip](https://github.com/ReactTooltip/react-tooltip) from 5.27.1 to 5.28.0.
- [Release notes](https://github.com/ReactTooltip/react-tooltip/releases)
- [Changelog](https://github.com/ReactTooltip/react-tooltip/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ReactTooltip/react-tooltip/compare/v5.27.1...v5.28.0)

---
updated-dependencies:
- dependency-name: react-tooltip
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-05 00:28:35 +00:00
dependabot[bot]andGitHub bd2e8be186 build(deps-dev): bump lint-staged in /apps/OpenSign
Bumps [lint-staged](https://github.com/lint-staged/lint-staged) from 15.2.7 to 15.2.8.
- [Release notes](https://github.com/lint-staged/lint-staged/releases)
- [Changelog](https://github.com/lint-staged/lint-staged/blob/master/CHANGELOG.md)
- [Commits](https://github.com/lint-staged/lint-staged/compare/v15.2.7...v15.2.8)

---
updated-dependencies:
- dependency-name: lint-staged
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-05 00:28:23 +00:00
dependabot[bot]andGitHub dc4c6ceff5 build(deps): bump @lottiefiles/dotlottie-react in /apps/OpenSign
Bumps [@lottiefiles/dotlottie-react](https://github.com/LottieFiles/dotlottie-web/tree/HEAD/packages/react) from 0.8.5 to 0.8.6.
- [Release notes](https://github.com/LottieFiles/dotlottie-web/releases)
- [Changelog](https://github.com/LottieFiles/dotlottie-web/blob/main/packages/react/CHANGELOG.md)
- [Commits](https://github.com/LottieFiles/dotlottie-web/commits/@lottiefiles/dotlottie-react@0.8.6/packages/react)

---
updated-dependencies:
- dependency-name: "@lottiefiles/dotlottie-react"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-05 00:28:12 +00:00
RaktimaNXG 10083ac807 fix: detect from browser's language and set it in dropdown by default 2024-08-02 17:50:06 +05:30
prafull-opensignlabs 11023c6400 Merge branch 'staging' of https://github.com/OpenSignLabs/OpenSign into docker_beta 2024-08-02 17:24:00 +05:30
RaktimaNXG 6d31314df6 fix: implement feature to detect lagunage from browser, resolve conflict 2024-08-02 17:22:25 +05:30
prafull-opensignlabs d5367194ab Merge branch 'docker_beta' of https://github.com/OpenSignLabs/OpenSign into docker_beta 2024-08-02 17:21:09 +05:30
prafull-opensignlabs cf179b2f9c fix: change docker images in docker compose file 2024-08-02 17:20:46 +05:30
AndrewandGitHub de82188663 Merge pull request #1007 from OpenSignLabs/fix_self_host 2024-08-02 17:19:58 +05:30
prafull-opensignlabs 4aefe775f9 fix: initial routing error in self-hosting 2024-08-02 17:11:02 +05:30
AmolandGitHub 8c06c98917 build: Update Makefile 2024-08-02 17:00:52 +05:30
prafull-opensignlabsandGitHub ee9f778725 Merge pull request #1003 from OpenSignLabs/fix_err_signpdf
fix: error handling of signing pdf digitally
2024-08-02 16:39:11 +05:30
prafull-opensignlabs ff0883c8e6 fix: error handling of signpdf function 2024-08-02 16:22:44 +05:30
prafull-opensignlabs d4e0f05cef feat: update official docker images 2024-08-02 12:46:01 +05:30
RaktimaNXG dfcb4fe286 refactor-code 2024-08-01 21:05:00 +05:30
RaktimaNXG d546d5d0a7 feat: apply multisupport language for all type alert, buttons and tour-messages 2024-08-01 20:57:22 +05:30
prafull-opensignlabsandGitHub 375dc86f0a Merge pull request #998 from OpenSignLabs/input_text_darkmode
fix: type initials and signature looks blurry on download pdf
2024-08-01 18:47:01 +05:30
AndrewandGitHub d2f187f6c0 Merge pull request #1001 from OpenSignLabs/multiuser_issue 2024-08-01 18:42:51 +05:30
prafull-opensignlabs 5393ee9ba9 style: remove unncessary themes and change dropbox btn as per theme 2024-08-01 18:40:04 +05:30
AndrewandGitHub d4d2948455 Merge pull request #1000 from OpenSignLabs/multiuser_issue 2024-08-01 18:09:43 +05:30
prafull-opensignlabs 37617c04ad fix: x is not function and security issue 2024-08-01 18:08:34 +05:30
RaktimaNXG 10e0153018 fix: initial type signature bulry issue 2024-08-01 17:56:44 +05:30
RaktimaNXG 42cbe94af8 fix: initial type signature issue 2024-08-01 16:50:48 +05:30
AndrewandGitHub 8f95e53d9d Merge pull request #999 from OpenSignLabs/multiuser_issue 2024-08-01 16:49:44 +05:30
prafull-opensignlabs 0dae21dcf1 build(Deps): update depencencies and overide ws packge to resolve security issue 2024-08-01 16:39:37 +05:30
RaktimaNXG 912efeb5fd refactor-code 2024-08-01 15:50:48 +05:30
AmolandGitHub 3d9307f96d Merge pull request #997 from OpenSignLabs/multiuser_issue 2024-08-01 13:55:24 +05:30
prafull-opensignlabs 873f4b080a build(deps): update depencies 2024-08-01 13:52:07 +05:30
RaktimaNXG e337a79e2e fix: type initials and signature looks blurry on download pdf 2024-08-01 13:32:18 +05:30
AndrewandGitHub 980ce62bf6 Merge pull request #995 from OpenSignLabs/multiuser_issue 2024-07-31 22:10:21 +05:30
prafull-opensignlabs dccf757f56 fix: gmail adapter is not working 2024-07-31 21:26:14 +05:30
RaktimaNXG c6e93cd3c8 feat: apply multisupport language for signing flow in signyour-self, template , placeholder 2024-07-31 21:26:08 +05:30
prafull-opensignlabsandGitHub 4a6b88328e Merge pull request #993 from OpenSignLabs/input_text_darkmode
fix: display wrong owner's ip address on certificate in bulk-send flow
2024-07-31 20:16:32 +05:30
RaktimaNXG 779a84cf0b fix: display wrong owner's ip addressin certificate in bulk-send flow 2024-07-31 20:15:07 +05:30
prafull-opensignlabsandGitHub aff409ba63 Merge pull request #992 from OpenSignLabs/input_text_darkmode
fix: all types of text widget background color issues in mobile dark mode.
2024-07-31 19:47:13 +05:30
RaktimaNXG 275167c0c4 fix: all types of text widget background color issues in mobile dark mode. 2024-07-31 16:56:11 +05:30
AndrewandGitHub 19b2af7f57 Merge pull request #990 from KrisIsNewxyz/staging 2024-07-31 03:02:57 +05:30
RaktimaNXG 779d5df264 feat: appply multi-support language functionality on report, managesign, webhook,api token 2024-07-30 20:02:32 +05:30
AndrewandGitHub 5050b9ee97 Merge pull request #991 from OpenSignLabs/multiuser_issue 2024-07-30 19:36:40 +05:30
prafull-opensignlabs 23da4be6b1 fix: err invalid protcol while sending file in mail 2024-07-30 18:15:16 +05:30
prafull-opensignlabs 299648b8e0 fix: getaddrinfo ENOTFOUND while creating admin 2024-07-30 16:53:36 +05:30
KrisIsNewxyz 86fa0c87ae repair broken conection to mongodb - Update .env.local_dev 2024-07-30 13:01:55 +02:00
RaktimaNXG 77cd52ca04 feat: appply multi-support language functionality on login,signup-page,sidebar menu 2024-07-30 14:09:10 +05:30
RaktimaNXG bed2a77232 feat: implement feature of multisupport language 2024-07-29 20:32:59 +05:30
prafull-opensignlabsandGitHub 9619eec40f Merge pull request #980 from OpenSignLabs/raktima-opensignlabs-patch-11
fix: issue with files opening in a new tab on download instead of direct download
2024-07-26 19:24:46 +05:30
RaktimaNXG 886161d65f refactor code 2024-07-26 18:47:57 +05:30
RaktimaNXG d5d646e6e0 fix: issue with files opening in a new tab on download instead of direct download 2024-07-26 18:37:48 +05:30
prafull-opensignlabsandGitHub 494103163c Merge pull request #978 from OpenSignLabs/raktima-opensignlabs-patch-11
fix: ip address missing issue in the completion certificate of document originator using public-sign flow
2024-07-26 15:28:21 +05:30
RaktimaNXG 72e9e4848b refactor code 2024-07-26 14:43:16 +05:30
RaktimaNXG 1181ba6f90 refactor code 2024-07-26 14:40:22 +05:30
RaktimaNXG b8d6ec5fe0 fix: ip address missing of document originator using public-sign 2024-07-26 14:06:47 +05:30
AndrewandGitHub 7335d7df0a Merge pull request #976 from OpenSignLabs/multiuser_issue 2024-07-25 21:01:24 +05:30
prafull-opensignlabs 44754095fb refactor: changes in cloud function 2024-07-25 20:34:44 +05:30
prafull-opensignlabsandGitHub 0f515bae01 Merge pull request #963 from OpenSignLabs/raktima-opensignlabs-patch-11
fix: text widget font size issue in large PDF documents
2024-07-25 16:23:38 +05:30
RaktimaNXG 76a11f6ee6 fix: something went wrong issue in public profile 2024-07-25 14:30:02 +05:30
prafull-opensignlabsandGitHub 5fb28feb65 Merge pull request #974 from OpenSignLabs/multiuser_issue
fix: not able to deactivate teams
2024-07-25 11:03:05 +05:30
prafull-opensignlabs e5f1524b10 fix: not able to deactivate teams 2024-07-25 11:00:55 +05:30
AmolandGitHub 8a875691fb Merge pull request #971 from OpenSignLabs/fix_selfhost 2024-07-25 01:22:00 +05:30
prafull-opensignlabs 0b2710b97d fix: docker config files 2024-07-25 01:20:42 +05:30
AmolandGitHub 57552a32b0 Merge pull request #969 from OpenSignLabs/multiuser_issue 2024-07-24 22:50:21 +05:30
prafull-opensignlabs 572ec3658e fix: teams are not available in dropdown when creating user 2024-07-24 22:49:26 +05:30
AmolandGitHub 6d5c791f61 Merge pull request #968 from OpenSignLabs/multiuser_issue 2024-07-24 17:53:01 +05:30
prafull-opensignlabs 168e479c0c refactor: plan changes 2024-07-24 17:51:32 +05:30
AmolandGitHub 927e1b7ef9 Merge pull request #966 from OpenSignLabs/multiuser_issue
refactor: plan changes
2024-07-24 17:45:56 +05:30
prafull-opensignlabs 76dccf804e refactor: plan changes 2024-07-24 17:42:20 +05:30
RaktimaNXG 4262e0e6eb fix: text input font size isssue in mobile view 2024-07-24 13:42:41 +05:30
RaktimaNXG 7d487420aa Merge branch 'staging' of https://github.com/OpenSignLabs/OpenSign into raktima-opensignlabs-patch-11 2024-07-24 12:25:28 +05:30
prafull-opensignlabsandGitHub c20611b50b Merge pull request #965 from OpenSignLabs/multiuser_issue
fix: change send email hint, email validation, remove underline from stamp and image modal
2024-07-24 12:00:06 +05:30
prafull-opensignlabs 15d73ee62d fix: change send email hint, email validation, remove underline for stamp modal 2024-07-24 11:58:55 +05:30
AmolandGitHub a334cda9aa Merge pull request #964 from OpenSignLabs/multiuser_issue 2024-07-23 19:44:46 +05:30
prafull-opensignlabs 69d4254b44 feat: add validation for teams and organization 2024-07-23 19:43:36 +05:30
RaktimaNXG c422b11e3a fix: text widget font size issue in large pdf 2024-07-23 15:50:38 +05:30
prafull-opensignlabsandGitHub 95d2794754 Merge pull request #962 from OpenSignLabs/multiuser_issue
fix: updated pdf should be downloadable from reports
2024-07-23 11:28:59 +05:30
prafull-opensignlabs 65ce0d430c fix: updated pdf should be downloadable from reports 2024-07-23 11:27:37 +05:30
prafull-opensignlabsandGitHub e7a98d55f0 Merge pull request #961 from OpenSignLabs/raktima-opensignlabs-patch-11
fix: signer selection removed after clicking widget settings and some widget's issue
2024-07-22 19:17:07 +05:30
RaktimaNXG d247c6d0e7 fix: signer selection removed after clicking widget settings, widget placeholder's name field text getting change issue 2024-07-22 16:18:10 +05:30
prafull-opensignlabsandGitHub 20e0277113 Merge pull request #957 from OpenSignLabs/raktima-opensignlabs-patch-11
fix: switch staging base URL and app ID to production for public-sign.
2024-07-22 09:57:16 +05:30
RaktimaNXG 2ed3609c46 fix: change staging url to production for public-sign 2024-07-20 18:03:01 +05:30
AmolandGitHub 2e41dc20c1 Merge pull request #956 from OpenSignLabs/raktima-opensignlabs-patch-11 2024-07-20 13:02:25 +05:30
RaktimaNXG 50a8f93014 fix: unable to finish document issue in public-sign 2024-07-20 12:54:49 +05:30
RaktimaandGitHub 3803b29835 Merge pull request #955 from OpenSignLabs/multiuser_issue
build(deps): update depenceies
2024-07-19 19:37:20 +05:30
prafull-opensignlabs e18586887e build(deps): update depenceies 2024-07-19 19:35:25 +05:30
prafull-opensignlabsandGitHub d137c081ee Merge pull request #954 from OpenSignLabs/raktima-opensignlabs-patch-11
fix: error of something went wrong on finish button in guest login flow
2024-07-19 18:53:26 +05:30
prafull-opensignlabsandGitHub 62dfe32d32 Merge pull request #953 from OpenSignLabs/multiuser_issue
fix: some tab not available in menu
2024-07-19 18:52:59 +05:30
RaktimaNXG f801192a8c fix: error of something went wrong on finish button in guest login flow 2024-07-19 18:01:47 +05:30
prafull-opensignlabs 13d161e3c8 fix: some tab not available in menu 2024-07-19 18:00:53 +05:30
prafull-opensignlabsandGitHub a249baea66 Merge pull request #952 from OpenSignLabs/raktima-opensignlabs-patch-11
fix: the quick-send flow in-progress report shows the finish button even though the current user isn't a signer
2024-07-19 16:46:22 +05:30
RaktimaNXG f6f5b08d43 fix: the quick-send flow in-progress report shows the finish button even though the current user isn't a signer 2024-07-19 16:31:43 +05:30
prafull-opensignlabsandGitHub a1f4e9ea74 Merge pull request #949 from OpenSignLabs/raktima-opensignlabs-patch-11
fix: add CDN for icons, issue in public-template flow
2024-07-19 11:48:30 +05:30
RaktimaNXG 5eed145f4b fix: refactor code 2024-07-19 11:27:52 +05:30
AmolandGitHub 546a0f8e87 Merge pull request #950 from OpenSignLabs/multiuser_issue 2024-07-19 11:15:53 +05:30
prafull-opensignlabs 975c4b079a fix: alerts are not visible is login screen 2024-07-19 11:13:53 +05:30
RaktimaNXG 09e0ac2415 fix: handle condition when sendInOrder enabled to make public template 2024-07-19 09:52:01 +05:30
RaktimaNXG 6140aea31a fix: refactor code 2024-07-18 21:06:51 +05:30
RaktimaNXG c59c921a8b fix: shift the fonts.css file to CDN, ensure emails are sent to all signers when sendInOrder is set to false in public-sign, and add validation for the sequence of public roles when sendInOrder is enabled 2024-07-18 18:56:42 +05:30
AmolandGitHub 4b1e13d39a Merge pull request #948 from OpenSignLabs/multiuser_issue
fix: subscribe to newsletter is not working
2024-07-18 18:44:04 +05:30
prafull-opensignlabs e33e0be735 fix: subscribe to newsletter is not working 2024-07-18 18:42:39 +05:30
AmolandGitHub 2ff4e372d6 Merge pull request #946 from OpenSignLabs/multiuser_issue
fix: when set USE_LOCAL=true get undefined endpoint error in server
2024-07-18 18:37:20 +05:30
prafull-opensignlabs 9cfffe3fbd fix: when set USE_LOCAL=true get undefined endpoint error in server 2024-07-18 17:20:59 +05:30
AmolandGitHub 82ef278a0e Merge pull request #945 from OpenSignLabs/prafull-opensignlabs-patch-22
Update Docker.yml
2024-07-18 16:30:31 +05:30
prafull-opensignlabsandGitHub 574d2d05a4 Update Docker.yml 2024-07-18 16:29:11 +05:30
AmolandGitHub 38f72c7415 Merge pull request #944 from OpenSignLabs/prafull-opensignlabs-patch-21
build (deps): update node package in docker
2024-07-18 16:19:02 +05:30
prafull-opensignlabsandGitHub e00704a43c build (deps): update node package in docker 2024-07-18 15:59:12 +05:30
prafull-opensignlabsandGitHub 778e28fae0 Merge pull request #942 from OpenSignLabs/raktima-opensignlabs-patch-11
fix: unexpected modal issue when the settings icon is clicked on text input type widgets.
2024-07-17 17:59:04 +05:30
RaktimaNXG 1574f86654 fix: add comment to using base url from local storage 2024-07-17 17:57:06 +05:30
RaktimaNXG df17bdcd68 fix: download and print issue during public sign 2024-07-17 16:38:31 +05:30
RaktimaandGitHub f290fd875f Merge branch 'staging' into raktima-opensignlabs-patch-11 2024-07-17 15:19:03 +05:30
AndrewandGitHub caeb055fc2 Merge pull request #941 from OpenSignLabs/multiuser_issue 2024-07-17 15:14:59 +05:30
prafull-opensignlabs 1eafc113e6 fix: migration function 2024-07-17 15:13:14 +05:30
RaktimaNXG 4e46795e0f fix: unexpected modal issue when the settings icon is clicked on text input widgets. 2024-07-17 15:11:06 +05:30
prafull-opensignlabs f7087dfb29 Merge branch 'staging' of https://github.com/OpenSignLabs/OpenSign into multiuser_issue 2024-07-17 12:25:12 +05:30
prafull-opensignlabsandGitHub e6a7cda3b6 Merge pull request #939 from OpenSignLabs/raktima-opensignlabs-patch-11
fix: wrong docs appears need-your-sign report, tour still appears even click on don't show again in recipientSignPdf flow
2024-07-17 11:35:14 +05:30
RaktimaNXG db120ecda7 fix: remove console 2024-07-17 11:23:16 +05:30
prafull-opensignlabs 9bfe8b0e26 refactor: remove premium alert 2024-07-17 11:19:32 +05:30
RaktimaNXG c1438be9e0 fix: mismatch report in need-your-sign report, unnecessary tour appears after click on don't show again in recipients signature flow 2024-07-17 09:47:30 +05:30
AndrewandGitHub f4d7e33f97 Merge pull request #937 from OpenSignLabs/migrate_db 2024-07-16 17:40:23 +05:30
prafull-opensignlabs 4ec7fdb078 fix: update migration script to setup db 2024-07-16 17:34:14 +05:30
prafull-opensignlabsandGitHub 3413d0914d Merge pull request #934 from OpenSignLabs/raktima-opensignlabs-patch-11
fix: tailwind css not applied on production mode after load public-sign script in public profile
2024-07-16 16:58:17 +05:30
RaktimaNXG 793b6a5550 add comment 2024-07-16 16:19:58 +05:30
RaktimaNXG 77894f6754 fix: handle css file for public-sign script 2024-07-16 16:13:43 +05:30
RaktimaNXG 812928a6a3 fix: tailwind css not applied on production mode after load public-sign script in public profile 2024-07-16 13:31:52 +05:30
prafull-opensignlabsandGitHub bb398d13a2 Merge pull request #933 from OpenSignLabs/multiuser_issue
fix: provide route to upgrade from v1 to v2 for self hosting
2024-07-16 13:15:04 +05:30
prafull-opensignlabs 2d7a893424 fix: provide route to upgrade from v1 to v2 for self hosting 2024-07-16 13:13:08 +05:30
RaktimaandGitHub 62e943161a Merge pull request #922 from OpenSignLabs/multiuser_issue
feat: change manager role with editor, add admin panel for self-hosting
2024-07-12 19:22:47 +05:30
prafull-opensignlabs 2604156c7f feat: change manager role with editot, add admin panel for self-hosting 2024-07-12 19:07:27 +05:30
prafull-opensignlabsandGitHub 1e04bb4dbe Merge pull request #921 from OpenSignLabs/raktima-opensignlabs-patch-11
fix: webpack build error, restrict space in public username
2024-07-12 14:41:24 +05:30
RaktimaNXG 0ac3a70a83 fix: webpack build error, restrict space in public username 2024-07-12 13:00:36 +05:30
prafull-opensignlabsandGitHub 2f1ad45f92 Merge pull request #920 from OpenSignLabs/raktima-opensignlabs-patch-11
fix: public profile user name already exist issue
2024-07-12 11:30:47 +05:30
RaktimaNXG 8263e3247e fix: handle condition to enter username 2024-07-12 11:28:36 +05:30
RaktimaNXG 9666e41880 fix: public profile user name already exist issue 2024-07-12 11:24:49 +05:30
prafull-opensignlabsandGitHub e50f062a91 Merge pull request #915 from OpenSignLabs/raktima-opensignlabs-patch-11
feat : implement public profile functionality and develop script for public sign-in
2024-07-11 10:10:45 +05:30
RaktimaNXG 1c8f401060 fix: change public profile url and console staging url 2024-07-11 09:59:06 +05:30
RaktimaNXG a8e764a62c Merge branch 'staging' of https://github.com/OpenSignLabs/OpenSign into raktima-opensignlabs-patch-11 2024-07-11 09:55:31 +05:30
AmolandGitHub 43bc1f3e17 Update README.md 2024-07-11 01:22:47 +05:30
RaktimaNXG eebed949cd fix: handle getTemplate cloud function condition 2024-07-10 18:28:45 +05:30
AmolandGitHub c7cd9e56f8 Merge pull request #916 from OpenSignLabs/multiuser_issue 2024-07-10 16:46:08 +05:30
prafull-opensignlabs 1c9fb5ebcb feat: ask reason for decline/revoke document 2024-07-10 16:44:20 +05:30
RaktimaNXG 1339259c3b feat : add cloud function for public sign 2024-07-10 12:36:22 +05:30
RaktimaNXG 27a069e1a2 feat :implement public profile functionality and develop script for public sign-in 2024-07-10 12:35:10 +05:30
AmolandGitHub 7a69537255 Merge pull request #913 from OpenSignLabs/multi_user 2024-07-09 20:13:31 +05:30
prafull-opensignlabs 9569b78e66 refactor: commented unncessary btn in report 2024-07-09 19:37:03 +05:30
AmolandGitHub 266b0f27f5 Merge pull request #911 from OpenSignLabs/multi_user 2024-07-09 18:11:34 +05:30
prafull-opensignlabs 00e5c48828 feat: make profile portion from sidebar redirectable, restrict menu 2024-07-09 18:10:14 +05:30
AmolandGitHub c9e010e993 Update USAGE.md 2024-07-09 12:23:06 +05:30
prafull-opensignlabsandGitHub 5b52825ea6 Merge pull request #910 from OpenSignLabs/multi_user
feat: migration script for multi-user classes
2024-07-09 10:05:22 +05:30
prafull-opensignlabs 100b97cf1a refactor: restricted staging plan 2024-07-08 22:16:28 +05:30
prafull-opensignlabs 7a3216a81c feat: migration script for multi-user classes 2024-07-08 20:39:00 +05:30
AndrewandGitHub c6412be70d Merge pull request #909 from OpenSignLabs/multi_user 2024-07-08 19:08:02 +05:30
prafull-opensignlabs 954dbb3375 fix: teams are not visible in add user form, after upgrade subscription some menu are not visible 2024-07-08 19:06:37 +05:30
AndrewandGitHub c996825665 Merge pull request #908 from OpenSignLabs/multi_user 2024-07-08 17:05:53 +05:30
prafull-opensignlabs 5fc1a58bdb feat: add login validation for user and fix warning message in teams and users report 2024-07-08 17:04:12 +05:30
prafull-opensignlabsandGitHub 5c947181a2 Merge pull request #907 from OpenSignLabs/multi_user
build(deps): update parse package
2024-07-08 11:42:59 +05:30
prafull-opensignlabs 2e8b2fa525 build(deps): update parse package 2024-07-08 11:38:15 +05:30
AndrewandGitHub 1e6e5f9dba Merge pull request #903 from OpenSignLabs/multi_user 2024-07-06 18:28:59 +05:30
prafull-opensignlabs fa2e169df4 build(deps): update dependencies 2024-07-06 18:27:48 +05:30
AndrewandGitHub 174023c62f Merge pull request #902 from OpenSignLabs/multi_user 2024-07-06 17:38:45 +05:30
prafull-opensignlabs 1198460c97 fix: remove unncessary localstorage variables 2024-07-06 17:32:40 +05:30
prafull-opensignlabs 07954c8bb6 fix: remove unnecessary button from shared template 2024-07-06 16:59:14 +05:30
AndrewandGitHub d4d9521c31 Merge pull request #901 from OpenSignLabs/multi_user 2024-07-05 00:18:11 +05:30
prafull-opensignlabs d77477f3d1 fix: team list is not visible and change teams class 2024-07-04 20:56:57 +05:30
AndrewandGitHub ff36faa96c Merge pull request #898 from OpenSignLabs/multi_user 2024-07-03 23:32:38 +05:30
prafull-opensignlabs 450de195a7 refactor: change name from department to team 2024-07-03 20:47:19 +05:30
prafull-opensignlabs 57b23d7f97 feat: add share-with opt in templates as well as restrict non-team user 2024-07-03 18:01:51 +05:30
prafull-opensignlabs a246f74e11 Merge branch 'staging' of https://github.com/OpenSignLabs/OpenSign into multi_user 2024-07-03 15:58:30 +05:30
prafull-opensignlabsandGitHub 89c687ed06 Merge pull request #897 from OpenSignLabs/raktima-opensignlabs-patch-10
fix: incorrect signer is being assigned to widgets
2024-07-03 15:19:18 +05:30
RaktimaNXG f7e2fa8aec fix: incorrect signer is being assigned to widgets 2024-07-03 11:25:52 +05:30
prafull-opensignlabs 8a2960511c feat: add share with functionality of template 2024-07-02 20:54:30 +05:30
prafull-opensignlabs 832e5c2181 fix: multiple user get added with same email 2024-07-02 13:25:28 +05:30
prafull-opensignlabs 00d900c2b2 fix: department not visible realtime in users reports, remove inactive department from dropdown 2024-07-02 12:30:50 +05:30
prafull-opensignlabs 47ef685bcc Merge branch 'staging' of https://github.com/OpenSignLabs/OpenSign into multi_user 2024-07-02 10:44:35 +05:30
prafull-opensignlabsandGitHub 9f4aff65f2 Merge pull request #896 from OpenSignLabs/dependabot/npm_and_yarn/apps/OpenSignServer/npm_and_yarn-1167fe84be
build(deps): bump the npm_and_yarn group in /apps/OpenSignServer with 2 updates
2024-07-02 10:43:33 +05:30
prafull-opensignlabs 2eddb49b8e Merge branch 'staging' of https://github.com/OpenSignLabs/OpenSign into multi_user 2024-07-02 10:19:18 +05:30
prafull-opensignlabsandGitHub 63f1bb9fc7 Merge pull request #895 from OpenSignLabs/dependabot/npm_and_yarn/apps/OpenSign/npm_and_yarn-4d67123cbe
build(deps-dev): bump postcss from 8.4.38 to 8.4.39 in /apps/OpenSign in the npm_and_yarn group
2024-07-02 10:19:05 +05:30
prafull-opensignlabs e73b055cc2 Merge branch 'staging' of https://github.com/OpenSignLabs/OpenSign into multi_user 2024-07-02 10:16:26 +05:30
prafull-opensignlabs abd7cf9b71 fix: duplicate entries in ancestors array and login issue 2024-07-02 00:27:29 +05:30
dependabot[bot]andGitHub 2dbd41ce65 build(deps): bump the npm_and_yarn group
Bumps the npm_and_yarn group in /apps/OpenSignServer with 2 updates: [parse-server](https://github.com/parse-community/parse-server) and [ws](https://github.com/websockets/ws).


Updates `parse-server` from 7.0.0 to 7.1.0
- [Release notes](https://github.com/parse-community/parse-server/releases)
- [Changelog](https://github.com/parse-community/parse-server/blob/alpha/CHANGELOG.md)
- [Commits](https://github.com/parse-community/parse-server/compare/7.0.0...7.1.0)

Updates `ws` from 7.5.9 to 7.5.10
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/7.5.9...7.5.10)

---
updated-dependencies:
- dependency-name: parse-server
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: ws
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-01 18:36:29 +00:00
dependabot[bot]andGitHub 25ef7c9f39 build(deps-dev): bump postcss
Bumps the npm_and_yarn group in /apps/OpenSign with 1 update: [postcss](https://github.com/postcss/postcss).


Updates `postcss` from 8.4.38 to 8.4.39
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.38...8.4.39)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: direct:development
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-01 18:35:49 +00:00
AmolandGitHub 81a4daa5e8 Merge pull request #894 from pravinOpenSign/patch-2
Update README.md
2024-07-01 20:26:20 +05:30
pravinandGitHub 3f9e6d1f81 Update README.md
OpenSign Images update
2024-07-01 20:10:39 +05:30
AmolandGitHub 1507f113f4 Merge pull request #893 from OpenSignLabs/raktima-opensignlabs-patch-10
fix: font size and font color issue of text box after take another text box
2024-07-01 19:31:19 +05:30
prafull-opensignlabs d46ba8f307 feat: add create department, user form as well as reports for them 2024-07-01 16:47:01 +05:30
RaktimaNXG 2426e7484c fix: font size and font color issue of text box after take another text box 2024-07-01 13:56:29 +05:30
prafull-opensignlabs 17b9fc772e feat: add department and add user form in reports 2024-06-28 21:12:58 +05:30
prafull-opensignlabs 7b2b71fea5 feat: add user from, show deparments, users in pages 2024-06-28 12:48:50 +05:30
prafull-opensignlabs 70a3adebd7 Merge branch 'staging' of https://github.com/OpenSignLabs/OpenSign into multi_user 2024-06-28 12:47:02 +05:30
AndrewandGitHub 9e012ef6c7 Merge pull request #885 from OpenSignLabs/raktima-opensignlabs-patch-10 2024-06-28 12:33:13 +05:30
RaktimaNXG 948e0d3270 remove console 2024-06-28 11:40:07 +05:30
RaktimaNXG 6e4f9ba0e9 remove console 2024-06-28 11:34:05 +05:30
RaktimaNXG a816ceb04b fix: issue displaying expired subscription after password change 2024-06-28 10:59:23 +05:30
RaktimaNXG f864f74f14 fix: not displaying already save font color and font size of text boxes in edit template flow 2024-06-27 19:30:45 +05:30
prafull-opensignlabs 2c715a77a2 feat: add departmentlist and userlist page 2024-06-27 19:00:55 +05:30
RaktimaNXG 9b4cdde80a fix: remove Add text from add recipient in mobile view 2024-06-27 18:45:10 +05:30
RaktimaNXG de2154e6fe fix: change add recipient and role ui design in mobile view and inconsistent font size and color combination in text widgets 2024-06-27 17:30:21 +05:30
RaktimaNXG 76f4ccfcf3 fix: inconsistent font size and color for all type text widgets in the template flow 2024-06-27 13:20:17 +05:30
RaktimaNXG af52bb30f5 fix: signer's list order issue after change order of signers in tamplate and placeholder flow 2024-06-27 12:23:39 +05:30
225 changed files with 274137 additions and 45463 deletions
+3 -3
View File
@@ -7,7 +7,7 @@ PUBLIC_URL=http://localhost:3000
# Set it to true if you want to generate the Sourcemap for debugging
GENERATE_SOURCEMAP=false
# Set it to the URL from where APIs will be accessible, for local development it should be localhost:3000/api/app (use your local port number instead)
REACT_APP_SERVERURL=http://localhost:8080/app
# REACT_APP_SERVERURL=http://localhost:8080/app
# A 12 character long random app identifier. The value of this should be same as APP_ID which is a variable used by backend API.
REACT_APP_APPID=opensign
@@ -20,7 +20,7 @@ appName=open_sign_server
# A 12 character long random secret key that allows access to all the data. It is used in Parse dashboard config to view all the data in the database.
MASTER_KEY=XnAadwKxxByMr
# Mongodb URI to connect to
MONGODB_URI=mongodb://mongo:27017/OpenSignDB
MONGODB_URI=mongodb://mongo-container:27017/OpenSignDB
# Path on which APIs should be mounted. Do not change this. This variable shall be removed & value hardcoded in the source code in coming versions.
PARSE_MOUNT=/app
# Set it to the URL from where APIs will be accessible to the NodeJS functions, for local development it should be localhost:3000/api/app (use your local port number instead)
@@ -46,7 +46,7 @@ USE_LOCAL=true
MAILGUN_API_KEY=
MAILGUN_DOMAIN=mail.yourdomain.com
MAILGUN_SENDER=postmaster@mail.yourdomain.com
SMTP_ENABLE=
SMTP_ENABLE=true
SMTP_HOST=smtp.yourhost.com
SMTP_PORT=443
SMTP_USER_EMAIL=mailer@yourdomain.com
+2 -2
View File
@@ -10,9 +10,9 @@ jobs:
strategy:
matrix:
include:
- image: amolshejole/OpenSign
- image: opensign/opensign
dockerfile: apps/OpenSign/Dockerhubfile
- image: amolshejole/OpenSignServer
- image: opensign/opensignserver
dockerfile: apps/OpenSignServer/Dockerhubfile
steps:
-
+7
View File
@@ -0,0 +1,7 @@
{$HOST_URL} {
reverse_proxy client:3000
handle_path /app/* {
reverse_proxy server:8080
rewrite * /app{uri}
}
}
+4 -2
View File
@@ -1,8 +1,10 @@
build:
@echo "Building with HOST_URL=${HOST_URL}"
cp .env.local_dev .env
cd apps/OpenSign && cp ../../.env.local_dev .env && npm install && npm run build
docker compose up --build --force-recreate
HOST_URL=${HOST_URL} docker compose up --build --force-recreate
run:
@echo "Building with HOST_URL=${HOST_URL}"
cp .env.local_dev .env
docker compose up -d
docker compose up -d
+31 -20
View File
@@ -11,7 +11,9 @@
<a href="https://www.opensignlabs.com/">Website</a>
<span>&nbsp;&nbsp;•&nbsp;&nbsp;</span>
<a href="https://www.opensignlabs.com">Docs</a>
<a href="https://docs.opensignlabs.com">Help Docs</a>
<span>&nbsp;&nbsp;•&nbsp;&nbsp;</span>
<a href="https://docs.opensignlabs.com/docs/API-docs/opensign-api-v-1">API Docs</a>
<span>&nbsp;&nbsp;•&nbsp;&nbsp;</span>
<a href="https://www.opensignlabs.com/blog">Blog</a>
<span>&nbsp;&nbsp;•&nbsp;&nbsp;</span>
@@ -22,7 +24,7 @@
<a href="https://www.linkedin.com/company/opensign%E2%84%A2/about/">LinkedIn</a>
## The open-source document e-signing solution
## The premier open source document signing solution(DocuSign alternative)
---
</div>
@@ -42,35 +44,44 @@ Please star ⭐ the repo to support us! 😀
### Introduction
Welcome to OpenSign, the premier open source docusign alternative - document e-signing solution designed to provide a secure, reliable and free alternative to commercial esign platforms like DocuSign, PandaDoc, SignNow, Adobe Sign, Smartwaiver, SignRequest, HelloSign & Zoho sign. Our mission is to democratize the e-signing process, making it accessible and straightforward for everyone.
Welcome to OpenSign, the premier open source docusign alternative - document e-signing solution designed to provide a secure, reliable and free alternative to commercial esign platforms like DocuSign, PandaDoc, SignNow, Adobe Sign, Smartwaiver, SignRequest, HelloSign & Zoho sign. Our mission is to democratize the document signing process, making it accessible and straightforward for everyone.
---
### Features
- **Secure PDF E-Signing:** With the help of robust encryption algorithms, OpenSign™ ensures maximum security, privacy & compatibility.
- **Annotate Documents:** OpenSign™ allows you to annotate PDF documents with an advanced signing pad that allows hand drawn signatures, uploaded images, typed signatures & saved signatures for the simplest signing experience ever.
- **User-Friendly Interface:** OpenSign™ was built while keeping Intuitive design in mind for ease of use. Features like "Sign yourself", "Templates", "One click signatures" and "OpenSign™ Drive" makes it stand out of the crowd and even makes it better than a lot of so-called industry leaders.
- **Multi-signer Support:** OpenSign's ability to invite multiple signers for signing along with the ability to invite witnesses & being able to enforce signing in a sequence makes it the only open source solution that is fully loaded and allows it to compete head-to-head with established players in e-signature space.
- **Secure PDF E-Signing:** With the help of robust encryption algorithms, OpenSign™ ensures maximum security, privacy & compatibility. Now sign unlimited documents even on the [cloud hosted free version of OpenSign](https://www.opensignlabs.com/).
- **Annotate Documents:** OpenSign™ allows you to annotate PDF documents with an advanced signing pad that allows hand drawn signatures, uploaded images, typed signatures & saved signatures for the simplest open source document signing experience ever.
- **User-Friendly Interface:** OpenSign™ was built while keeping Intuitive design in mind for ease of use. Features like "Sign yourself", "Templates", "One click signatures" and "OpenSign™ Drive" makes it stand out of the crowd and even makes it better than a lot of so-called industry leaders. OpenSign intends to provide the best document signing experience in the open source ecosystem.
- **Multi-signer Support:** OpenSign's ability to invite multiple signers for signing along with the ability to invite by sharing signing links & being able to enforce signing in a sequence makes it the only open source solution that is fully loaded and allows it to compete head-to-head with established players in e-signature space.
- **Email Unique Code(OTP) verification support for guest signers:** With OpenSign™, your documents are fully secure even when being signed by guest users. Guest signers can only sign the document after entering a unique code sent to their email address. 
- **"Expiring Docs" & "Rejection":** You can set documents to expire after certain number of days after which nobody will be able to sign. Not just this, OpenSign™ also allows signers to reject signing a document.
- **Beautiful email templates:** All document signing invitations, completion notifications & reminders are formatted using great looking email templates.
- **"Expiring Docs" & "Rejection":** You can set documents to expire after certain number of days after which nobody will be able to sign. Not just this, OpenSign™ also allows signers to reject signing a document with a reason that will be promptly shared with the sender.
- **Beautiful email templates:** All document signing invitations, completion notifications & reminders are formatted using great looking email templates. Not just this, you are even allowed to customise the email templates making your free document signing invitations look the way you always wanted them to be.
- **PDF Template Creation:** OpenSign™ allows you to create and store PDF document templates for repeated use thereby saving you a lot of time & collect e-signatures seamlessly.
- **OpenSign™ Drive:** It is a centralised secure vault for your digital documents that makes storing, signing, organizing, sharing & achieving your docs a breeze.
- **OpenSign™ Drive:** It is a centralised secure vault for your digital documents that makes storing, signing, organizing, sharing & archieving your docs a breeze.
- **Audit Trails & completion certificate:** Being a security focused solution, OpenSign™ makes it a top priority to save detailed logs for tracking document activities along with time-stamps, IP addresses, email IDs & phone numbers. A completion certificate is generated as soon as document is completed which contains all the document related logs for added safety.
- **API Support:** OpenSign™ API allows seamless integration into existing systems and software. You can generate an API key from the app and refer the [docs](https://docs.opensignlabs.com) to start integrating it in your existing applications.
- **Integrations:** Seamless integrations with various Cloud storage systems, CRMs & enterprise platforms is available. We also have a Zapier integration that allows you to integrate it with virtually any application.
<img src=https://github.com/OpenSignLabs/OpenSign/assets/5486116/b37ff443-7099-4273-9aeb-21c46d7154cf height='200'>
<img src=https://github.com/OpenSignLabs/OpenSign/assets/5486116/86db91b7-6c2f-4885-a33c-58f4fd35ec89 height='200'>
<img src=https://github.com/OpenSignLabs/OpenSign/assets/5486116/56835efd-c40e-42de-a206-20202c293876 height='200'>
- **API Support:** OpenSign™ API allows seamless integration into existing systems and software. You can generate an API key from the app and refer the [official API docs](https://docs.opensignlabs.com/docs/API-docs/opensign-api-v-1) to start integrating it in your existing applications.
- **Integrations:** The open source document signing experience becomes even more seamless because of integrations with various Cloud storage systems, CRMs & enterprise platforms. We also have a Zapier integration that allows you to integrate it with virtually any application.
<img alt="Login page" src="https://github.com/OpenSignLabs/OpenSign/assets/171803164/8016edb6-7d6e-4185-ab72-82d2c4a16032" height='200' >
<img alt="Dash_board" src="https://github.com/OpenSignLabs/OpenSign/assets/171803164/6e7b96f7-3154-4c25-bc1e-caf33925cc47" height='200'>
<img alt="Widgets" src="https://github.com/OpenSignLabs/OpenSign/assets/171803164/7edb65bd-c265-4b3d-9758-38e79766c5c2" height='200'>
<img alt="Request Signature" src="https://github.com/OpenSignLabs/OpenSign/assets/171803164/1697ae46-dcac-41c9-a081-aded25693846" height='200'>
<img alt="Create template" src="https://github.com/OpenSignLabs/OpenSign/assets/171803164/c2060fda-50f1-4116-a532-51b94b48463a" height='200'>
<img alt="Manage_Template" src="https://github.com/OpenSignLabs/OpenSign/assets/171803164/90310c74-8271-49bd-8c5f-89daa5a623c4" height='200'>
<img alt="Folders" src="https://github.com/OpenSignLabs/OpenSign/assets/171803164/a52207e7-3b0e-497c-b5f6-747bc4e67918" height='200'>
<img alt="OpenSign_Confetti" src="https://github.com/OpenSignLabs/OpenSign/assets/171803164/8f4c6a6e-4a73-439c-9f34-f426044d0a7f" height='200'>
---
### Installation
Please refer to the [Installation Guide](INSTALLATION.md) for detailed instructions on how to install OpenSign on your system.
The simplest way to install OpenSign on your own server is using official docker images by running the following command -
```
export HOST_URL=https://opensign.yourdomain.com && curl --remote-name-all https://raw.githubusercontent.com/OpenSignLabs/OpenSign/docker_beta/docker-compose.yml https://raw.githubusercontent.com/OpenSignLabs/OpenSign/docker_beta/Caddyfile https://raw.githubusercontent.com/OpenSignLabs/OpenSign/docker_beta/.env.local_dev && mv .env.local_dev .env.prod && docker compose up --force-recreate
```
Make sure that you have `Docker` and `git` installed before you run this command -
Please refer to the [Installation Guide](https://docs.opensignlabs.com/docs/self-host/docker/run-locally/) for detailed instructions on how to install OpenSign on your system.
---
@@ -88,13 +99,13 @@ We welcome contributions from the open-source community. For more information on
### License
OpenSign is licensed under the AGPL License. For more details, see the [LICENSE](LICENSE) file.
OpenSign is licensed under the AGPL-3 License. For more details, see the [LICENSE](LICENSE) file.
---
### Acknowledgments
We would like to thank all our contributors and users for their support and feedback. Special thanks to [OpenSignLabs](https://github.com/OpenSignLabs) for spearheading this initiative.
We would like to thank all our contributors and users for their support and feedback. Special thanks to [OpenSignLabs](https://www.opensignlabs.com) for spearheading this initiative.
---
+1 -6
View File
@@ -1,6 +1 @@
The community is working hard to put together a great usage guide.
You will soon see one of the best usage guides here.
Till then you can view the quick promo video by clicking the link below -
[<img src="https://i.ytimg.com/vi/szYaBZhXZNo/maxresdefault.jpg" width="50%">](https://www.youtube.com/watch?v=szYaBZhXZNo "OpenSign promo")
Please visit the official documentation [here](https://docs.opensignlabs.com).
+3
View File
@@ -0,0 +1,3 @@
{
"presets": ["@babel/preset-env", "@babel/preset-react"]
}
+3
View File
@@ -0,0 +1,3 @@
module.exports = {
presets: ["@babel/preset-env", "@babel/preset-react"]
};
+3371 -2220
View File
File diff suppressed because it is too large Load Diff
+45 -26
View File
@@ -4,24 +4,28 @@
"private": true,
"dependencies": {
"@formkit/auto-animate": "^0.8.2",
"@lottiefiles/dotlottie-react": "^0.6.4",
"@radix-ui/themes": "^3.0.5",
"@lottiefiles/dotlottie-react": "^0.8.7",
"@pdf-lib/fontkit": "^1.1.1",
"@radix-ui/themes": "^3.1.1",
"@react-pdf/renderer": "^3.4.4",
"@reduxjs/toolkit": "^2.2.5",
"axios": "^1.7.2",
"@reduxjs/toolkit": "^2.2.7",
"axios": "^1.7.3",
"file-saver": "^2.0.5",
"i18next": "^23.12.2",
"i18next-browser-languagedetector": "^8.0.0",
"i18next-http-backend": "^2.5.2",
"jwt-decode": "^4.0.0",
"moment": "^2.30.1",
"nth-check": "^2.1.1",
"parse": "^5.1.0",
"parse": "^5.3.0",
"pdf-lib": "^1.17.1",
"print-js": "^1.6.0",
"radix-ui": "^1.0.1",
"react": "^18.2.0",
"react-bootstrap": "^2.10.2",
"react-bootstrap": "^2.10.4",
"react-confetti": "^6.1.0",
"react-cookie": "^7.1.4",
"react-datepicker": "^6.9.0",
"react-cookie": "^7.2.0",
"react-datepicker": "^7.3.0",
"react-dnd": "^16.0.1",
"react-dnd-html5-backend": "^16.0.1",
"react-dnd-multi-backend": "^8.0.3",
@@ -29,34 +33,37 @@
"react-dom": "^18.2.0",
"react-gtm-module": "^2.0.11",
"react-helmet": "^6.1.0",
"react-i18next": "^15.0.1",
"react-konva": "^18.2.10",
"react-pdf": "^9.0.0",
"react-quill": "^2.0.0",
"react-pdf": "^9.1.0",
"react-quill-new": "^3.2.2",
"react-redux": "^9.1.2",
"react-rnd": "^10.4.11",
"react-router-dom": "^6.22.3",
"react-router-dom": "^6.26.0",
"react-scripts": "5.0.1",
"react-scrollbars-custom": "^4.1.1",
"react-select": "^5.8.0",
"react-signature-canvas": "^1.0.6",
"react-tooltip": "^5.26.4",
"react-tooltip": "^5.28.0",
"react-web-share": "^2.0.2",
"reactour": "^1.19.4",
"redux": "^5.0.1",
"redux-thunk": "^3.1.0",
"regex-parser": "^2.3.0",
"serve": "^14.2.3",
"styled-components": "^4.4.1",
"web-vitals": "^4.0.1",
"ws": "^8.17.1"
"styled-components": "^5.3.0",
"web-vitals": "^4.2.2",
"ws": "^8.18.0"
},
"scripts": {
"build-webpack": "webpack --config webpack.config.js",
"build": "npm run version && npm run build-webpack && react-scripts build",
"build-watch": "webpack --config webpack.config.js --watch",
"start-dev": "concurrently \"npm run build-watch\" \"react-scripts start\"",
"start": "serve -s build",
"start-dev": "react-scripts start",
"version": "curl -s https://api.github.com/repos/opensignlabs/opensign/releases/latest | grep '\"tag_name\":' | awk -F '\"' '{print $4}' > ./public/version.txt",
"version-win": "powershell -Command \"Invoke-RestMethod -Uri 'https://api.github.com/repos/opensignlabs/opensign/releases/latest' | Select-Object -ExpandProperty tag_name | Out-File -FilePath ./public/version.txt\"",
"build": "npm run version && react-scripts build",
"build-win": "npm run version-win && react-scripts build",
"build-win": "npm run version-win && npm run build-webpack && react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"release": "standard-version",
@@ -86,21 +93,33 @@
}
},
"devDependencies": {
"@babel/runtime-corejs2": "^7.24.7",
"@babel/core": "^7.25.2",
"@babel/preset-env": "^7.25.3",
"@babel/preset-react": "^7.24.7",
"@babel/runtime-corejs2": "^7.25.0",
"autoprefixer": "^10.4.19",
"babel-loader": "^9.1.3",
"clean-webpack-plugin": "^4.0.0",
"commitizen": "^4.3.0",
"daisyui": "^4.12.2",
"concurrently": "^8.2.2",
"css-loader": "^7.1.2",
"daisyui": "^4.12.10",
"dotenv": "^16.4.5",
"dotenv-webpack": "^8.1.0",
"eslint": "^8.57.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.34.3",
"lint-staged": "^15.2.7",
"postcss": "^8.4.38",
"prettier": "^3.3.2",
"lint-staged": "^15.2.8",
"mini-css-extract-plugin": "^2.9.0",
"postcss": "^8.4.41",
"prettier": "^3.3.3",
"pretty-quick": "^4.0.0",
"tailwindcss": "^3.4.4"
"tailwindcss": "^3.4.9",
"terser-webpack-plugin": "^5.3.10",
"webpack-cli": "^5.1.4"
},
"overrides": {
"nth-check": "$nth-check",
"ws":"$ws"
"ws": "$ws"
}
}
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -11,7 +11,7 @@
<link rel="manifest" href="/manifest.json" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/css/bootstrap.min.css"
integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous" />
<link rel="stylesheet" href="/css/fonts.css" />
<link rel="stylesheet" href="https://cdn.opensignlabs.com/fonts.css" />
<title>OpenSign™</title>
</head>
<body>
@@ -0,0 +1,608 @@
{
"create-account": "Create Account",
"login": "Login",
"language":"Language",
"name":"Name",
"phone":"Phone",
"email":"Email",
"company":"Company",
"job-title":"Job title",
"profile":"Profile",
"log-out":"Log Out",
"is-email-verified":"Is Email verified",
"public-profile":"Public profile",
"tagline":"Tagline ",
"has-requested-you-to-sign":"has requested you to sign",
"has-requested-you-to-review-and-sign":" has requested you to review and sign",
"input-required":"Please fill out this field.",
"sort-order" :{
"Ascending":"Ascending",
"Descending":"Descending",
"Name":"Name",
"Date":"Date"
},
"context-menu": {
"Download": "Download",
"Rename": "Rename",
"Move": "Move",
"Delete": "Delete"
},
"action":"Action",
"add":"Add",
"add-new-folder":"Add a new folder",
"disable-documentId":"Disable DocumentId",
"edit":"Edit",
"change-password":"Change Password",
"save":"Save",
"cancel":"Cancel",
"upgrade-now":"Upgrade now",
"upgrade-to":"Upgrade to",
"plan":"Plan",
"subscribe-card-plan":"Sign 100 docs using API. Only $0.15/doc after that.",
"user-name-limit-char":"To have a username less than 8 character please subscribe",
"tour-content":"Don't show this again",
"pro":"PRO",
"team":"TEAM",
"user":"User",
"docs":"Docs",
"session-expired":"Your session has expired.",
"public-profile-help":"This is your public URL. Copy or share it with the signer, and you will be able to see all your publicly set templates.",
"tagline-help":"This Tagline will appear on your OpenSign public profile for ex. https://opensign.me/alex",
"welcome":"Welcome Back!",
"Login-to-your-account":"Login to your account",
"password":"Password",
"forgot-password":"Forgot Password?",
"loading":"Loading...",
"of":"of",
"sign-SSO":"Sign in with SSO",
"login-page":"Login Page",
"or":"OR",
"signup-page":"Signup page",
"password-length":"Password should be 8 characters long",
"password-case":"Password should contain uppercase letter, lowercase letter, digit",
"password-special-char":" Password should contain special character",
"agreee":"I agree to the",
"term":"Terms of Service",
"subscribe-to-opensign":"Subscribe to OpenSign newsletter",
"register":"Register",
"sidebar": {
"Dashboard": "Dashboard",
"Sign yourself": "Sign yourself",
"Request signatures":"Request signatures",
"Templates":"Templates",
"Templates-Children":{
"Create template":"Create template",
"Manage templates": "Manage templates"
},
"OpenSign™ Drive":"OpenSign™ Drive",
"Reports":"Reports",
"Reports-Children" :{
"Need your sign": "Need your sign",
"In Progress": "In Progress",
"Completed":"Completed",
"Drafts": "Drafts",
"Declined": "Declined",
"Expired":"Expired",
"Contactbook":"Contactbook"
},
"Settings": "Settings",
"Settings-Children":{
"My Signature": "My Signature",
"API Token":"API Token",
"Webhook":"Webhook",
"Teams":"Teams",
"Team-update-successfully":"Team Updated successfully.",
"Users":"Users"
}
},
"dashboard-card":{
"Need your Signature":"Need your Signature",
"Out for signatures":"Out for Signatures"
},
"report-name":{
"Draft Documents":"Draft Documents",
"Need your sign":"Need your sign",
"In-progress documents":"In-progress documents",
"Completed Documents":"Completed Documents",
"Declined Documents":"Declined Documents",
"Expired Documents":"Expired Documents",
"Recently sent for signatures":"Recently sent for signatures",
"Recent signature requests":"Recent signature requests",
"Drafts":"Drafts",
"Contactbook":"Contactbook",
"Templates":"Templates",
"Teams":"Teams",
"Users":"Users"
},
"btnLabel":{
"sign":"sign",
"Sign":"SIGN",
"Resend":"Resend",
"Revoke":"Revoke",
"Delete":"Delete",
"Use":"Use",
"Quick send":"Quick send",
"Edit":"Edit",
"Share with team":"Share with team",
"Share":"Share",
"View":"View",
"option":"Option"
},
"report-heading":{
"Sr.No":"Sr.No",
"Title":"Title",
"Email":"Email",
"Phone":"Phone",
"File":"File",
"Owner": "Owner",
"Signers":"Signers",
"Note": "Note",
"Folder": "Folder",
"Reason": "Reason",
"Parent Team":"Parent Team",
"Active":"Active",
"Role":"Role",
"Team":"Team",
"Name":"Name",
"Status":"Status",
"created-date":"Created Date",
"Type":"Type"
},
"report-help":{
"Draft Documents": "These are documents you have started but have not finalized for sending.",
"Need your sign":"This is a list of documents that are waiting for your signature",
"In-progress documents": "This is a list of documents you've sent to other parties for signature.",
"Completed Documents":"This is a list of documents that have been signed by all parties.",
"Declined Documents": "This is a list of documents that have been declined by one of the signers.",
"Expired Documents":"This is a list of documents that have reached their expiration date.",
"Contactbook":"This is a list of contacts/signers added by you. These will appear as suggestions when you try to add signers to a new document.",
"Templates" :"This is a list of templates that are available to you for creating documents. You can click the 'use' button to create a new document using a template, modify the document & add signers in the next step."
},
"form-name":{
"Sign Yourself":"Sign Yourself",
"Request Signatures":"Request Signatures",
"New Template":"New Template"
},
"file-type":"pdf, png, jpg, jpeg",
"docx":"docx",
"file-selected":"file selected",
"template-title":"Template Title",
"document-title":"Document Title",
"description":"Description",
"time-to-complete":"Time To Complete (Days)",
"send-in-order":"Send In Order",
"send-in-order-help":{
"p1":"Choose how you want the signing requests to be sent to the document signers:",
"p2":"Selecting this option will send the signing request to the first signer initially. Once the first signer completes their part, the next signer in the sequence will receive the request. This process continues until all signers have signed the document. This method ensures that the document is signed in a specific order.",
"p3":"Selecting this option will send the signing links to all signers simultaneously. Every signer can sign the document at their convenience, regardless of whether other signers have completed their signatures. This method is faster but does not enforce any signing order among the participants.",
"p4":"Select the option that best suits the needs of your document processing."
},
"no":"No",
"auto-reminder":"Auto reminder",
"remind-once":" Remind once in every (Days)",
"next":"Next",
"select-folder":"Select Folder",
"OpenSign-drive":"OpenSign™ Drive",
"drive-document-status":{
"Completed":"Completed",
"Declined":"Declined",
"Draft":"Draft",
"Expired":"Expired",
"In Progress":"In Progress"
},
"select-folder-help" :"If you do not select a folder, your signed document will be saved in the Main OpenSign drive folder.",
"no-data":"No data found",
"save-here":"Save Here",
"back":"Back",
"add-folder":"Add folder",
"create-folder":"Create Folder",
"parent-folder":"Parent Folder",
"create":"Create",
"signers":"Signers",
"signers-help":"Begin typing a contact's name to see suggested signers from your saved contacts or add new ones. Arrange the signing order by adding signers in the desired sequence. Use the '+' button to include signers and the 'x' to remove them. Each signer will receive an email prompt to sign the document in the order listed.",
"add-signer":"Add Signer",
"contact-not-found":"Contact not found",
"add-yourself":"Add Yourself",
"submit":"Submit",
"reset":"Reset",
"my-signature":"My Signature",
"signature":"Signature",
"upload-image":" Upload image",
"clear":"Clear",
"upload-signature/Image":"Please upload signature/Image",
"initials":"Initials",
"API" :"API",
"api-token":"API Token",
"regenerate-token":"Regenerate Token",
"generate-token":"Generate Token",
"view-docs":"View Docs",
"generate-token-alert" :"Are you sure you want to regenerate token it will expire old token?",
"yes":"Yes",
"copied":"Copied",
"something-went-wrong-mssg":"Something went wrong, please try again later.",
"token-generated":"Token generated successfully.",
"webhook":"Webhook",
"update-webhook":"Update Webhook",
"add-webhook":"Add Webhook",
"webhook-added" :"Webhook added successfully.",
"team-disabled":"Team disabled",
"Team enabled":"Team enabled",
"are-you-sure": "Are you sure you want to",
"disable":"disable",
"enable":"enable",
"this-team":" this team?",
"edit-team":"Edit Team",
"name-of-team":"Name of Team",
"prev":"Prev",
"no-data-avaliable":"No Data Available",
"add-team":"Add Team",
"page-not-found":"Page Not Found",
"users-from-teams":"users from Teams",
"user-status":"User status",
"activate" :"activate",
"deactivate":"deactivate",
"this-user":" this user",
"delete-user":"Delete User",
"delete":"delete",
"add-user":"Add User",
"password-generateed" :"Password will only be generated once; make sure to copy it.",
"Team status":"Team status",
"user-deactivated":"User deactivated.",
"user-activated":"User activated.",
"public":"Public",
"download":"Download",
"view":"View",
"make-template-public":"Make template public",
"make-template-private":"Make template private",
"make-template-public-alert" :"Are you sure you want to make this template public?",
"make-template-private-alert" :"Are you sure you want to make this template private? This will remove it from your public profile.",
"public-role":"Public role",
"public-url":"Public URL",
"public-url-copy-mssg" :" Heres your public URL: Copy it or share it with the signer, and you will be able to see all your publicly set templates.",
"add-public-url-alert" :"Please add your public URL, and you will be able to make a public template.",
"share-with-alert":"You cannot share a template if any roles already have contacts assigned. Please remove all contact assignments from the roles before sharing the template.",
"share-with":"Share with",
"team-not-found":"Team not found",
"roles":"Roles",
"delete-document":"Delete Document",
"delete-document-alert" :"Are you sure you want to delete this document?",
"quick-send":"Quick send",
"add-new":"Add new",
"send":"Send" ,
"quick-send-alert-1":"All roles in this document are currently linked to contacts. To quick send copies of this template to multiple signers, please ensure that at least one role is not linked to any contact." ,
"quick-send-alert-2" :"Please ensure there's at least one signature widget added for all recipients.",
"quick-send-alert-3":"Please add at least one role to this template in order to 'quick send' copies of it to multiple signers.",
"quick-send-alert-4":"Quick send reached limit.",
"copy-link":"Copy link",
"copy":"Copy",
"revoke-document":"Revoke document",
"revoke-document-alert":"Are you sure you want to revoke this document?",
"resend-mail":"Resend Mail",
"resend-mail-help":"You can use following variables which will get replaced with their actual values:- {{document_title}}, {{sender_name}}, {{sender_mail}}, {{sender_phone}}, {{receiver_name}}, {{receiver_email}}, {{receiver_phone}}, {{expiry_date}}, {{company_name}}, {{signing_url}}.",
"subject":"Subject",
"body":"Body",
"add-contact":"Add Contact",
"add-signer-alert":"Contact already exist!",
"record-delete-alert": "Record deleted successfully!",
"record-revoke-alert" : "Record revoked successfully!",
"mail-sent-alert": "Mail sent successfully.",
"document-sent-alert" : "Document sent successfully!",
"template-share-alert" :"Template Shared successfully.",
"template-public-alert-1" :"You have successfully made the template public.",
"template-public-alert-2" :"You have successfully made the template private.",
"template-public-alert-3" :"You need to select a role for the public signers.",
"template-public-alert-4": "Please ensure there's at least one signature widget added for all signers.",
"template-public-alert-5" : "Since this template has send-in-order enabled, the public role must be positioned at the top.",
"template-public-alert-6" :"Please attach signers to all roles except for the public role user.",
"template-public-alert-7" : "Please assign at least one public role to make this template public.",
"loader":" This might take some time",
"pages":"Pages",
"document-signed":"Document signed",
"close":"Close",
"validation-alert":"Validation alert",
"validate-alert-mssg" :" The input does not meet the criteria set by the regular expression.",
"otp-verification":"OTP verification",
"enter-otp":"Enter OTP",
"verify":"Verify",
"verify-email-1":"Verify email",
"resend":"Resend",
"contact-details":"Contact Details",
"verify-email":"Please verify your email !",
"send-otp":" Send OTP",
"otp-placeholder":"Enter OTP received over email",
"loading-doc":"Loading Document..",
"widgets-name":{
"signature":"signature",
"stamp":"stamp",
"initials":"initials",
"name":"name",
"job title":"job title",
"company":"company",
"date":"date",
"text":"text",
"text input":"text input",
"checkbox":"checkbox",
"dropdown":"dropdown",
"radio button":"radio button",
"image": "image",
"email":"email"
},
"fields":"Fields",
"recipients":"Recipients",
"please-add":"Please add a",
"signed-by":"Signed By",
"more":"more",
"sent":"sent",
"print":"Print",
"certificate":"Certificate",
"decline":"Decline",
"finish":"Finish",
"mail":"Mail",
"sign-now":"Sign Now",
"successfully-signed":"Successfully signed!",
"email-mssg":" Recipients added here will get a copy of the signed document.",
"email-error-1":" please provide correct email address",
"email-error-2" :"You can only send to ten recipients at a time.",
"Email-verified-alert-1":"Email is verified.",
"Email-verified-alert-2" :"Email is already verified.",
"upload-stamp-image":"Upload stamp image",
"draw":"Draw",
"type":"Type",
"color-type":{
"red":"red",
"blue":"blue",
"black":"black",
"yellow":"yellow"
},
"my-initials":"My Initials",
"upload":"Upload",
"initial-teb":"Initials",
"signature-tab":"Signature",
"your-signature":"Your signature",
"copy-to-all-pages":"Copy to all pages",
"contact-delete-alert":"Are you sure you want to delete this contact?",
"reset-password-alert-1":"Reset password link has been sent to your email id",
"reset-password-alert-2":"Please setup email adapter ",
"reset-password-alert-3":"Reset Your Password",
"faild-animation" :"Failed to load animation",
"apply":"Apply",
"copy-type":{
"All pages":"All pages",
"All pages but last":"All pages but last",
"All pages but first":"All pages but first"
},
"options":"Options",
"minimun-check":"Minimun check",
"maximum-check":"Maximum check",
"default-value":"Default value",
"select":"Select",
"read-only":"Is read only",
"hide-labels":"Hide labels",
"checkbox":"Checkbox",
"alert":"Alert",
"zoom-in":"Zoom in",
"zoom-out":"Zoom out",
"document-signed-alert":"Congratulations! 🎉 This document has been successfully signed by you!",
"otp-sent-alert":"OTP sent on your email",
"fields-required":"Fields required",
"signature-widget-alert-1" :"Please ensure there's at least one signature widget added",
"signature-widget-alert-2" : "Please ensure all field is accurately filled and meets all requirements.",
"encrypted-pdf-alert" :"Currently encrypted pdf files are not supported.",
"encrypted-pdf-alert-1" :"PFX file password is invalid.",
"user-not-exist":"User does not exist",
"template-signature-field":"Please add at least one signature field for all roles.",
"template-role-alert":"Please add roles first",
"create-document":"Create Document",
"template-created-alert":"Do you want to create a document using the template you just created ?",
"signers-alert":"signers alert",
"template-creation-alert-1":"Please select signer for add placeholder!",
"ok":"Ok",
"radio-group":"Radio group",
"dropdown-options":"Dropdown options",
"add-role":"Add Role",
"role-ex":" e.g: Customer, Hr, Director, Manager, Student, etc",
"add/choose-signer":"Add/Choose Signer",
"choose-from-contacts":"Choose from contacts",
"select-signer" :" Please select signer",
"edit-template":"Edit Template",
"widget-info":"Widget info",
"validation":"Validation",
"invalid-default-value":"invalid default value",
"hint":"Hint",
"color":"color",
"role-help":{
"p1":"What are template roles?",
"p2":"Begin by specifying each role needed for the completion of the document. Think about the parties involved in the signing process and what their responsibilities are. Common roles include HR for internal documents, Customer for agreements or Vendor for business agreements.",
"p3":"Why pre-attach users to some roles?",
"p4":"For roles that consistently involve the same individual (e.g., the CEO's signature on employee offer letters), you can pre-attach a user to a role within the template. This step is optional but recommended for efficiency and consistency across documents.",
"p5":"When do i specify the user attached to each role?",
"p6":"When you create a document from your template, you'll be prompted to attach users to each defined role. If a role already has a user attached, this will be pre-filled, but you can modify it as needed before sending out the document."
},
"add-recipients":"Add recipients",
"loading-mssg": "This might take some time",
"send-mail": "Send Mail",
"placeholder-alert-1":"Please ensure there's at least one signature widget added for all recipients.",
"placeholder-alert-2":"Please confirm that you have filled the text field.",
"placeholder-alert-3":" Are you sure you want to send out this document for signatures?",
"placeholder-alert-4":"You have successfully sent mails to all recipients!",
"placeholder-alert-5":"Do you want to sign documents right now ?",
"placeholder-alert-6" :"Please setup mail adapter to send mail!",
"placeholder-alert-7" :"Please select signer for add placeholder!",
"email-subject":"email subject",
"email-body":"email body",
"email-placeholder":"add body of email",
"reset-to-default" :"Reset to default",
"cutomize-email":"Cutomize Email",
"upgrade-to-customize-email":"Upgrade to customize Email",
"sign-url":"Sign url",
"Mails Sent":"Mails Sent",
"document-alert":"Document Alert",
"owner-subscription-expired":"Owner's subscription has expired.",
"subscription-expired":"Subscription Expired",
"alert-message":"Alert message",
"document-decline":"Document decline",
"decline-alert-1":"Are you sure want to decline this document ?",
"decline-alert-2":"You have declined this document!",
"decline-alert-3":"You can not sign this document as it has been declined/revoked.",
"sign here":"Sign here",
"guest-email-alert" :"verification code is sent to your email",
"get-otp-alert" :"you will get a OTP via Email",
"user-already-exist":"User already exist.",
"server-error":"Internal server error !",
"fill-required-details!":"Please fill required details!",
"sign-up-form":"Sign up form",
"sign-up":"Sign up",
"folder-already-exist!":"folder already exist!",
"please-select-position!":"please select position!",
"default-sign-alert":"Are you sure you want to auto sign at requested all locations?",
"Your-Signature":"Your Signature",
"auto-sign-all" :"Auto Sign All",
"generating-certificate":"Generating certificate",
"pdf-download":"PDF Download",
"generate-certificate-alert" :" Your completion certificate is being generated. Please wait momentarily. If the download doesn't start shortly, click the button again.",
"folder-already-exist" :"Folder already exist!" ,
"folder-created-successfully":"Folder created successfully!",
"fill-folder-name" :"Please fill folder name" ,
"already-exists-this-username" :"User already exists with this username!",
"verification-code-sent":"Verification mail has been sent to your E-mail!",
"registered-user-successfully":"Registered user successfully.",
"role-not-found":"Role not found.",
"do-not-access" :"You don't have access, please contact the admin.",
"add-admin":"Add admin",
"opensign-setup" :"Opensign Setup",
"join-discord" :"Join our discord server",
"admin-already-exist":"Admin already exist.",
"password-update-alert-1":"Password updated successfully.",
"password-update-alert-2":"Your current password is missing or incorrect.",
"password-update-alert-3" :"Your current password is missing or incorrect.",
"password-update-alert-4" :"Your password and confirmation password do not match.",
"current-password":"Current Password" ,
"new-password":"New Password",
"confirm-password":"Confirm Password",
"file-alert-1":"The selected file size is too large. Please select a file less than",
"file-alert-2" :"Please select file.",
"file-alert-3":"Please wait while the document is being uploaded.",
"enter-pdf-password" :"Enter Pdf Password",
"correct-password" :"Please provide correct password",
"decrypting-pdf":" Decrypting pdf please wait...",
"invalid-otp":"Invalid Otp",
"user-not-found":"User not found!",
"enter-otp-alert" :"Please Enter OTP!",
"get-verification-code":"Get verification code",
"get-verification-code-2" :"You will get a verification code via Email",
"enter-verification-code":"Enter Verification Code",
"provide-your-details":"Provide your details",
"provide-email":"Please provide email.",
"additional-info" :"Additional Info",
"signature-saved-alert":"Signature saved successfully.",
"fill-field":"Please fill out this field",
"error-template" :"Error: Template not found!",
"error":"Error",
"invalid-document":"Error: invalid document!",
"document-not-found" :"Document not Found!",
"document-signed-alert-1" :"You have successfully signed the document. You can download or print a copy of the partially signed document. A copy of the digitally signed document will be sent to the owner over email once it is signed by all signers.",
"encrypted-pdf-not-support":"Currently encrypted pdf files are not supported.",
"document-signed-alert-4":" Congratulations! 🎉 This document has been successfully signed by all participants!",
"document-signed-alert-5":"This document has been signed by all Signers.",
"document-signed-alert-6": "This document has been declined by one or more recipient(s).",
"document-signed-alert-7" :"This Document is no longer available.",
"document-signed-alert-8":"The document has already been dispatched for signing.",
"yet-to-sign":"Yet to sign",
"validation-alert-1":"The input does not meet the criteria set by the regular expression.",
"account-already-exists":"Account already exists!",
"choose-password":"Choose Password",
"enter-password":"Enter Password",
"sure":"sure",
"subscribed-alert":"You have already subscribed to plan!",
"monthly" :"Monthly",
"yearly-upto":"Yearly (upto 66% off)",
"billed-yearly":"Billed Yearly",
"billed-monthly": "Billed Monthly",
"plansubscription-1":"Host it yourself for free",
"visit-github":"Visit Github",
"user-already-exist-name" :"User already exists with this username!",
"do-not-access-contact-admin": "You don't have access, please contact the admin.",
"filed-required-correctly":"Please fill required details correctly.",
"admin-created":"Admin created",
"invalid-masterkey":"Invalid masterkey",
"opensign-Setup" :"Opensign Setup",
"master-key":" Master key",
"profile-update-alert" :"Profile updated successfully.",
"date":"Date",
"report-not-found":"Report Not Found",
"please-wait":"please wait",
"select-foler":"Select Folder",
"generated-on":"Generated On",
"text-field":"Text field",
"font-size":"Font size",
"widget-status":{
"Required":"Required",
"Optional":"Optional"
},
"all-right":"All Rights Reserved",
"version":"version",
"social-media":{
"github":"Github",
"linked-in":"LinkedIn",
"twitter":"Twitter",
"discord":"Discord"
},
"tour-mssg":{
"home-layout-1":"You have logged in successfully! Let's take a look.",
"home-layout-2":"To upload documents for self-signing or to request others signatures, simply select the respective buttons.",
"home-layout-3":"You are ready to start using OpenSign! If you need support feel free to contact us.",
"generate-token":"Upgrade now to generate API token",
"opensign-drive-1":"Click on the breadcrumb links to easily navigate through the folder hierarchy and view the documents within each folder.",
"opensign-drive-2":"Click the add button to create a new folder or document.",
"opensign-drive-3":"Sort your documents by Date or Name using this menu.",
"opensign-drive-4":"Click on this menu to display the documents in list view.",
"opensign-drive-5":"The document list is displayed according to the selected sorting option. Icons next to each document indicate its current status.",
"opensign-drive-6":"Right-click on a document to see options such as Download, Rename, Move, and Delete. Click on the document to open it.",
"opensign-drive-7":"Right-click on any folder to see options. Choose Rename to change the folders name or click on the folder to navigate through its contents.",
"pdf-request-file-1":"List of signers who still need to sign the document .",
"pdf-request-file-2":"Click any of the placeholders appearing on the document to sign. You will then see options to draw your signature, type it, or upload an image .",
"pdf-request-file-3":"Click the Back, Decline, or Finish buttons to navigate your document. Use the ellipsis menu for additional options, including the Download button .",
"pdf-request-file-4":"List of signers who have already signed the document .",
"pdf-request-file-5":"You can click 'Auto Sign All' to automatically sign at all the locations meant to be signed by you. Make sure that you review the document properly before you click this button .",
"placeholder-sign-1":"Select a recipient from this list to add a place-holder where he is supposed to sign.The placeholder will appear in the same colour as the recipient name once you drop it on the document.",
"placeholder-sign-2":"Clicking 'Add recipients' button will allow you to add more signers.",
"placeholder-sign-3":"Drag or click on a field to add it to the document.",
"placeholder-sign-4":"The PDF content area already displays the template's existing placeholders. For your convenience, these placeholders will match the color of the recipient's name, making them easily identifiable.",
"placeholder-sign-5":"Clicking 'Send' will save the document. In the next step you can customize the emails to be sent out to the recipients or copy the signing links and share those with the recipients yourself.",
"report-1":"Click the 'Add' button to create a new template. Templates are reusable documents designed to quickly generate new documents with the same structure and varying signers. For example, an HR template for onboarding could have predefined roles like HR Manager and New Employee. Each time you use the template, you can assign the New Employee role to different incoming staff members, while the HR Manager role remains constant, facilitating a seamless onboarding process for each recruit. ",
"redirect":"Click the 'Use' button to create a new document from an existing template.",
"bulksend":"To quickly create and send multiple documents using an existing template, click the 'Quick Send' button.",
"option": "This menu reveals more options such as Edit & Delete. Use the 'Edit' button to add signer roles, modify fields, and update your template. Changes will apply to all future documents created from this template but wont affect existing documents.Use the Delete button you can delete template. ",
"signyour-self-1":"Select and drag your preferred widgets onto the PDF to customize your document before signing. Choose the perfect spots for each modification to tailor the document to your needs.",
"signyour-self-2":"Drag and drop anywhere in this area. You can resize and move it later.",
"template-placeholder-1":"Clicking 'Add role' button will allow you to add various signer roles. You can attach users to each role in subsequent steps.",
"template-placeholder-2":"Once roles are added, select a role from list to add a place-holder where he is supposed to sign. The placeholder will appear in the same colour as the role name once you drop it on the document.",
"template-placeholder-3":"Drag or click on a field to add it to the document.",
"template-placeholder-4":"Drag the placeholder for a role anywhere on the document.Remember, it will appear in the same colour as the name of the recipient for easy reference.",
"template-placeholder-5":"Clicking 'Next' will store the current template. After saving, youll be prompted to create a new document from this template if you wish.",
"webhook-1":"Upgrade now to set webhook",
"Need your Signature":"Clicking on this card will take you to the list of documents awaiting your review.",
"Out for signatures":"Clicking on this card will take you to a list of documents awaiting signature.",
"Recent signature requests": "This is a list of documents that are waiting for your signature.",
"Recently sent for signatures":"This is a list of documents you've sent to other parties for signature.",
"Drafts":"This are documents you have started but have not finalized for sending."
},
"enter-email-plaholder":"Add an email address and hit enter",
"success-email-alert":"Email sent successfully!",
"expired-doc-title":"Expired Document",
"expired-on-mssg" :"This document expired on {{expiredDate}} and is no longer available to sign.",
"signature-validate-alert":"Please confirm that you have selected at least {{minRequiredCount}} checkboxes.",
"signature-validate-alert-2" :"Ensure this field is accurately filled and meets all requirements.",
"user-name-exist":"user name already exist"
}
@@ -0,0 +1,603 @@
{
"create-account": "Créer un compte",
"login": "Se Connecter",
"language":"Langue",
"name":"Nom et Prénom",
"phone":"Téléphone",
"email":"E-mail",
"company":"Organisation",
"job-title":"Votre Fonction",
"profile":"Profil",
"is-email-verified":"L'e-mail est-il vérifié",
"log-out" :"Déconnexion",
"public-profile":"Profil public",
"tagline":"Slogan",
"has-requested-you-to-sign":" vous a demandé de signer",
"has-requested-you-to-review-and-sign":"vous a demandé de consulter et de signer",
"input-required":"Veuillez remplir ce champ.",
"sort-order" :{
"Ascending":"Ascendant",
"Descending":"Descendant",
"Name":"Nom et Prénom",
"Date":"Date"
},
"context-menu": {
"Download": "Télécharger",
"Rename": "Renommer",
"Move": "Se déplacer",
"Delete": "Supprimer"
},
"action":"Action",
"add":"Ajouter",
"add-new-folder":"Ajouter un nouveau dossier",
"disable-documentId":"Désactiver l'ID du document",
"edit":"Modifier",
"change-password":"Changer votre mot de passe",
"save":"Sauvegarder",
"cancel":"Annuler",
"upgrade-now":"Mettre à jour maintenant",
"upgrade-to" :"Mettre à niveau vers",
"pro":"PRO",
"plan":"Offre",
"subscribe-card-plan":"Signez 100 documents à l'aide de l'API. Seulement 0,15 $/doc par la suite.",
"user-name-limit-char" :"Pour avoir un nom d'utilisateur de moins de 8 caractères s'il vous plaît s'abonner",
"tour-content":"Ne plus afficher",
"team":"ÉQUIPE",
"docs":"Documents",
"session-expired" :"Votre session a expiré.",
"user":"Utilisateur",
"public-profile-help":"Il s'agit de votre URL publique. Copiez-le ou partagez-le avec le signataire et vous pourrez voir tous vos modèles définis publiquement.",
"tagline-help":"Ce surnom apparaîtra sur votre profil public OpenSign par exemple. https://opensign.me/alex",
"welcome":"Content de te revoir!",
"Login-to-your-account" :"Se connecter à son compte",
"password" :"Mot de passe",
"forgot-password":"Mot de passe oublié?",
"loading":"Chargement...",
"of":"de",
"sign-SSO":"Connectez-vous avec SSO",
"login-page":"Page de connexion",
"or":"OU",
"signup-page":"Page d'inscription",
"password-length":"Le mot de passe doit être de plus de 8 caractères",
"password-case":"Le mot de passe doit contenir une lettre majuscule, minuscule et un chiffre ",
"password-special-char":"Le mot de passe doit contenir un caractère spécial",
"agreee":"Je suis d'accord avec le",
"term":"Conditions d'utilisation",
"subscribe-to-opensign":"Abonnez-vous à la newsletter OpenSign",
"register" :"S'enregistrer ",
"sidebar": {
"Dashboard": "Tableau de bord",
"Sign yourself": "signez vous-même",
"Request signatures":"Demander des signatures",
"Templates":"Modèles",
"Templates-Children":{
"Create template":"Créer un modèle",
"Manage templates": "Gérer les modèles"
},
"OpenSign™ Drive":"Lecteur OpenSign™",
"Reports":"Rapports",
"Reports-Children" :{
"Need your sign": "Besoin de votre signature",
"In Progress": "En cours",
"Completed":"Complété",
"Drafts": "Brouillons",
"Declined":"Signature refusé",
"Expired":"Expiré",
"Contactbook":"Carnet de contacts"
},
"Settings": "Paramètres",
"Settings-Children":{
"My Signature": "Ma signature",
"API Token":"Jeton API",
"Webhook":"Webhook",
"Teams":"Équipe",
"Team-update-successfully":"Équipe mise à jour avec succès.",
"Users":"Utilisateurs"
}
},
"dashboard-card":{
"Need your Signature":"Besoin de votre signature",
"Out for signatures":"En attente de Signature"
},
"report-name":{
"Draft Documents":"Brouillons",
"Need your sign": "Besoin de votre signature",
"In-progress documents":"Documents en cours",
"Completed Documents":"Documents complétés",
"Declined Documents":"Documents refusés",
"Expired Documents":"Documents expirés",
"Recently sent for signatures":"Récemment envoyé pour signature",
"Recent signature requests":"Demandes de signature récentes",
"Drafts":"Brouillons",
"Contactbook":"Carnet de contacts",
"Templates":"Modèles",
"Teams":"Équipe",
"Users":"Utilisateurs"
},
"report-heading":{
"Sr.No":"Numéro",
"Title":"Titre",
"Email":"E-mail",
"Phone":"Téléphone",
"File":"Fichier",
"Owner":"Propriétaire",
"Signers":"Signataires",
"Note": "Note",
"Folder":"Dossier",
"Reason": "Raison",
"Parent Team":"Équipe de parents",
"Active":"Actif",
"Role":"Rôle",
"Team":"Équipe",
"Name":"Nom",
"Status":"Statut",
"created-date":"Date de création",
"Type":"Saisir"
},
"btnLabel":{
"sign":"Signer",
"Resend":"Relancer",
"Revoke":"Révoquer",
"Delete":"Supprimer",
"Use":"Utiliser",
"Quick send":"Envoi rapide",
"Edit":"Modifier",
"Share with team":"Partager avec l'équipe",
"Share":"Partager",
"View":"Voir",
"option":"Option"
},
"report-help":{
"Draft Documents": "Il s'agit de documents que vous avez commencés mais que vous n'avez pas finalisés pour envoi.",
"Need your sign": "Voici une liste de documents ou votre signature est requise",
"In-progress documents": "Il s'agit d'une liste de documents que vous avez envoyés à d'autres parties pour signature.",
"Completed Documents": "Il s'agit d'une liste de documents signés par toutes les parties.",
"Declined Documents": "Il s'agit d'une liste de documents qui ont été refusés par l'un des signataires.",
"Expired Documents": "Il s'agit d'une liste de documents qui ont atteint leur date d'expiration.",
"Contactbook": "Il s'agit d'une liste de contacts/signataires que vous avez ajoutés. Ceux-ci apparaîtront sous forme de suggestions lorsque vous tenterez d'ajouter des signataires à un nouveau document.",
"Templates" : "Il s'agit d'une liste de modèles à votre disposition pour créer des documents. Vous pouvez cliquer sur le bouton 'Utiliser' pour créer un nouveau document à l'aide d'un modèle, modifier le document et ajouter des signataires à l'étape suivante."
},
"form-name":{
"Sign Yourself":"signez vous-même",
"Request Signatures":"Demander des signatures",
"New Template":"Nouveau modèle"
},
"file-type":"pdf, png, jpg, jpeg",
"docx":"docx",
"file-selected":"fichier sélectionné",
"template-title":"Titre du modèle",
"document-title":"Titre du document",
"description":"Description",
"time-to-complete":"Temps de réalisation (jours)",
"send-in-order":"Envoyer dans l'ordre ?",
"send-in-order-help":{
"p1":"Choisissez la manière dont vous souhaitez que les demandes de signature soient envoyées aux signataires du document :",
"p2":"La sélection de cette option enverra initialement la demande de signature au premier signataire. Une fois que le premier signataire a terminé sa partie, le prochain signataire de la séquence recevra la demande. Ce processus se poursuit jusqu'à ce que tous les signataires aient signé le document. Cette méthode garantit que le document est signé dans un ordre spécifique.",
"p3":"La sélection de cette option enverra les liens de signature à tous les signataires simultanément. Chaque signataire peut signer le document à sa convenance, que d'autres signataires aient ou non complété leur signature. Cette méthode est plus rapide mais nimpose aucun ordre de signature entre les participants.",
"p4":"Sélectionnez l'option qui correspond le mieux aux besoins de votre traitement de documents."
},
"no":"Non",
"auto-reminder":"Rappel automatique",
"remind-once":"Rappeler une fois tous les (jours)",
"next":"Suivant",
"select-folder" :"Sélectionner le dossier",
"OpenSign-drive":"Lecteur OpenSign™",
"drive-document-status":{
"Completed":"Complété",
"Declined": "Refuser",
"Draft":"Brouillon",
"Expired":"Expiré",
"In Progress":"En cours"
},
"select-folder-help" :"Si vous ne sélectionnez pas de dossier, votre document signé sera enregistré dans le dossier du lecteur principal OpenSign.",
"no-data" :"Aucune données disponible",
"save-here":"Enregistrer ici",
"back" :"Retour",
"add-folder" :"Ajouter le dossier",
"create-folder":"Créer le dossier",
"parent-folder" :"Dossier Parent",
"create":"Créer",
"signers" :"Signataires",
"signers-help" :"Commencez à saisir le nom d'un contact pour voir les signataires suggérés par vos contacts enregistrés ou en ajouter de nouveaux. Organisez l'ordre de signature en ajoutant des signataires dans l'ordre souhaité. Utilisez le bouton « + » pour inclure les signataires et le « x » pour les supprimer. Chaque signataire recevra un e-mail invité à signer le document dans l'ordre indiqué.",
"add-signer":"Ajouter un signataire",
"contact-not-found" :"Contact introuvable",
"add-yourself":"Ajoutez-vous",
"submit" :"Soumettre",
"reset" :"Réinitialiser",
"my-signature":"Ma signature",
"signature":"Signature",
"upload-image" :"Télécharger une image",
"clear" :"Vider",
"upload-signature/Image" :"télécharger-signature/Image",
"initials" :"Initiales",
"API" :"API",
"api-token":"Jeton API",
"regenerate-token":"Régénérer le jeton",
"generate-token" :"Générer un jeton",
"view-docs" :"Afficher les documents" ,
"generate-token-alert":"Êtes-vous sûr de vouloir régénérer le jeton, votre ancien jeton sera supprimer?",
"yes" :"Oui",
"copied" :"Copié",
"wrong-mssg":"Quelque chose c'est mal passé. Merci d'essayer plus tard.",
"token-generated":"Jeton généré avec succès.",
"webhook":"Webhook",
"update-webhook" :"Mettre à jour le webhook",
"add-webhook" :"Ajouter un webhook",
"webhook-added" :"Webhook ajouté avec succès.",
"team-disabled":"Équipe: Désactivée",
"team-enabled":"Équipe activée",
"are-you-sure":"Êtes-vous sûr de vouloir",
"disable":"désactiver",
"enable":"activer",
"this-team":"cette équipe?",
"edit-team" :"Modifier l'équipe",
"name-of-team":"Nom de l'équipe",
"prev" :"précédent",
"no-data-avaliable" :"pas de données disponibles",
"add-team":"Ajouter une équipe",
"page-not-found" :"Page non trouvée",
"users-from-teams" :"utilisateurs de votre Équipe",
"user-status":"Statut de l'utilisateur",
"activate" :"Activer",
"deactivate":"désactiver",
"this-user":"cet utilisateur ",
"delete-user":"Supprimer l'utilisateur",
"delete" :"supprimer",
"add-user":"Ajouter un utilisateur",
"password-generateed" :"Le mot de passe ne sera généré qu'une seule fois ; assurez-vous de le copier.",
"Team status" :"Statut de l'équipe",
"user-deactivated":"Utilisateur désactivé.",
"user-activated":"Activé par l'utilisateur.",
"public" :"Public",
"download" :"Téléchargement",
"view":"voir",
"make-template-public" :"Rendre le modèle public",
"make-template-private" :"Rendre le modèle privé",
"make-template-public-alert" :"Êtes-vous sûr de vouloir rendre ce modèle public ?",
"make-template-private-alert":"Êtes-vous sûr de vouloir rendre ce modèle privé ? Cela le supprimera de votre profil public.",
"public-role" :"Rôle public",
"public-url" :"URL publique",
"public-url-copy-mssg":"Voici votre URL publique : copiez-la ou partagez-le avec le signataire et vous pouvoir voir tous vos paramètres publics modèles.",
"add-public-url-alert":"Veuillez ajouter votre URL publique et vous pourra rendre public modèle.",
"share-with-alert":"Vous ne pouvez pas partager un modèle si des contacts sont déjà attribués à des rôles. Veuillez supprimer toutes les attributions de contacts des rôles avant de partager le modèle.",
"share-with":"Partager avec",
"team-not-found" :"Équipe introuvable",
"roles":"Les rôles",
"delete-document" :"Supprimer un document",
"delete-document-alert" :"Êtes-vous sûr de vouloir supprimer ce document ?",
"quick-send" :"Envoi rapide",
"add-new" :"Ajouter un nouveau",
"send" :"envoyer",
"quick-send-alert-1":"Tous les rôles dans ce document sont actuellement liés à des contacts. Pour envoyer rapidement des copies de ce modèle à plusieurs signataires, veuillez vous assurer qu'au moins un rôle n'est lié à aucun contact.",
"quick-send-alert-2":"Veuillez vous assurer qu'au moins un widget de signature est ajouté pour tous les destinataires.",
"quick-send-alert-3":"Veuillez ajouter au moins un rôle à ce modèle afin d'en « envoyer rapidement » des copies à plusieurs signataires.",
"quick-send-alert-4":"L'envoi rapide a atteint la limite.",
"copy-link" :"Copier le lien",
"copy":"Copier",
"revoke-document":"Révoquer le document",
"revoke-document-alert" :"Êtes-vous sûr de vouloir révoquer ce document ?",
"resend-mail":"Renvoyer le courrier",
"resend-mail-help" :"Vous pouvez utiliser les variables suivantes qui seront remplacées par leurs valeurs réelles : - {{document_title}}, {{sender_name}}, {{sender_mail}}, {{sender_phone}}, {{receiver_name}}, {{receiver_email} }, {{receiver_phone}}, {{expiry_date}}, {{company_name}}, {{signing_url}}.",
"subject":"Sujet",
"body":"Corps",
"add-contact":"Ajouter le contact",
"add-signer-alert":"Le contact existe déjà !",
"record-delete-alert":"Enregistrement supprimé avec succès !",
"record-revoke-alert":" Enregistrement révoqué avec succès ! ",
"mail-sent-alert":"Courriel envoyé avec succès.",
"document-sent-alert":"Document envoyé avec succès !",
"template-share-alert":"Modèle partagé avec succès.",
"template-public-alert-1":"Vous avez rendu le modèle public avec succès.",
"template-public-alert-2":"Vous avez réussi à rendre le modèle privé.",
"template-public-alert-3":"Vous devez sélectionner un rôle pour les signataires publics.",
"template-public-alert-4" :"Veuillez vous assurer qu'au moins un widget de signature est ajouté pour tous les signataires.",
"template-public-alert-5" :"Étant donné que l'envoi dans l'ordre est activé sur ce modèle, le rôle public doit être positionné en haut.",
"template-public-alert-6" :"Veuillez associer des signataires à tous les rôles, à l'exception du rôle d'utilisateur public.",
"template-public-alert-7" :"Veuillez attribuer au moins un rôle public pour rendre ce modèle public.",
"loader":"Cela pourrait prendre un certain temps",
"pages":"Pages",
"document-signed":"Document signé",
"close":"Fermer",
"validation-alert":"Alerte de validation",
"validate-alert-mssg" :"L'entrée ne répond pas aux critères définis par l'expression régulière.",
"otp-verification":"Vérification OTP",
"enter-otp":"Entrez OTP",
"verify":"Vérifier",
"verify-email-1":"Vérifier l'e-mail",
"resend":"Renvoyer",
"contact-details" :"Coordonnées",
"verify-email":"Veuillez vérifier votre email!",
"send-otp":"envoyer un code à usage unique",
"otp-placeholder":"Saisissez l'OTP reçu par e-mail",
"loading-doc":"Chargement du document..",
"widgets-name":{
"signature":"signature",
"stamp":"tampon",
"initials":"initiales",
"name":"nom et Prénom",
"job title":"votre fonction",
"company":"organisation",
"date":"date",
"text":"texte",
"text input":"saisie de texte",
"checkbox":"case à cocher",
"dropdown":"dérouler",
"radio button":"bouton radio",
"image": "image",
"email":"e-mail"
},
"fields" : "Des champs",
"recipients":"Destinataires",
"please-add" :"Veuillez ajouter un",
"signed-by" :"Signé par",
"more":"plus",
"sent":"Envoyé",
"print":"imprimer",
"certificate":"Certificat",
"decline":"refusé",
"finish":"terminé",
"mail":"Mail",
"sign-now":"Signez maintenant",
"successfully-signed" :"Signé avec succès !",
"email-mssg" :"Les destinataires ajoutés ici recevront une copie du document signé.",
"email-error-1" :"veuillez fournir une adresse e-mail correcte",
"email-error-2" :"Vous ne pouvez envoyer qu'à dix destinataires à la fois.",
"Email-verified-alert-1" :"L'e-mail est vérifié.",
"Email-verified-alert-2" :"L'e-mail est déjà vérifié.",
"upload-stamp-image":"Télécharger l'image du tampon",
"draw":"Dessiner",
"type":"Taper",
"color-type":{
"red":"rouge",
"blue":"bleu",
"black":"noir",
"yellow":"jaune"
},
"my-initials" :"Mes initiales",
"upload" :"Télécharger",
"initial-teb":"Initiales",
"signature-tab":"Signature",
"your-signature" :"Votre signature",
"copy-to-all-pages" :"Copier sur toutes les pages",
"contact-delete-alert" :"Êtes-vous sûr de vouloir supprimer ce contact ?",
"reset-password" :"Le lien de réinitialisation du mot de passe a été envoyé à votre identifiant de messagerie",
"reset-password-alert-2" :"Veuillez configurer l'adaptateur de messagerie",
"reset-password-alert-3" :"Réinitialisez votre mot de passe",
"faild-animation" :"Échec du chargement de l'animation",
"apply" :"Appliquer",
"copy-type":{
"All pages":"Toutes les pages",
"All pages but last":"Toutes les pages sauf la dernière",
"All pages but first":"Toutes les pages sauf la première"
},
"options": "Possibilités",
"minimun-check" :"Vérification minimale",
"maximum-check" :"Contrôle maximum",
"default-value" :"Valeur par défaut",
"select":"Sélectionner",
"read-only" :"Est en lecture seule",
"hide-labels":"Masquer les étiquettes",
"checkbox":"Case à cocher",
"alert":"Alerte",
"zoom-in":"Agrandir",
"zoom-out" :"Dézoomer",
"document-signed-alert" :"Félicitations ! 🎉 Votre document à bien été signer!",
"otp-sent-alert" :"Le code OTP a bien été envoyer sur votre adresse Email",
"fields-required" :"Champs obligatoires",
"signature-widget-alert-1" :"Veuillez vous assurer qu'au moins un widget de signature a été ajouté",
"signature-widget-alert-2" :"Veuillez vous assurer que tous les champs sont remplis avec précision et répondent à toutes les exigences.",
"encrypted-pdf-alert" :"Les fichiers PDF actuellement cryptés ne sont pas pris en charge.",
"encrypted-pdf-alert-1" :"Le mot de passe du fichier PFX n'est pas valide.",
"user-not-exist" :"L'utilisateur n'existe pas",
"template-signature-field":"Veuillez ajouter au moins un champ de signature pour tous les rôles.",
"template-role-alert":"Veuillez d'abord ajouter des rôles",
"create-document" :"Créer un document",
"template-created-alert":"Voulez-vous créer un document en utilisant le modèle que vous vient de créer ?",
"signers-alert" :"alerte des signataires",
"template-creation-alert-1" :"Veuillez sélectionner le signataire pour ajouter un espace réservé !",
"ok":"D'accord",
"radio-group" :"Groupe de radio",
"dropdown-options":"Options déroulantes",
"add-role" :"Ajouter un rôle",
"role-ex" :"Ex : Client, RH, Directeur, Manager, Étudiant, etc.",
"add/choose-signer":"Ajouter/Choisir un signataire",
"choose-from-contacts":"Choisissez parmis les contacts",
"select-signer":"Veuillez sélectionner le signataire",
"edit-template" :"Modifier le modèle",
"widget-info" :"Informations sur les widgets",
"validation" : "Validation",
"invalid-default-value" :"valeur par défaut invalide",
"hint":"Indice",
"color":"couleur",
"role-help":{
"p1":"Que sont les rôles modèles ?",
"p2":"Commencez par spécifier chaque rôle nécessaire à la finalisation du document. Pensez aux parties impliquées dans le processus de signature et à leurs responsabilités. Les rôles courants incluent les RH pour les documents internes, le Client pour les accords ou le Fournisseur pour les accords commerciaux.",
"p3":"Pourquoi pré-attacher les utilisateurs à certains rôles ?",
"p4":"Pour les rôles qui impliquent systématiquement la même personne (par exemple, la signature du PDG sur les lettres d'offre des employés), vous pouvez pré-attacher un utilisateur à un rôle dans le modèle. Cette étape est facultative mais recommandée pour des raisons d'efficacité et de cohérence entre les documents.",
"p5":"Quand dois-je spécifier l'utilisateur attaché à chaque rôle ?",
"p6":"Lorsque vous créez un document à partir de votre modèle, vous serez invité à attacher des utilisateurs à chaque rôle défini. Si un rôle est déjà associé à un utilisateur, celui-ci sera pré-rempli, mais vous pourrez le modifier si nécessaire avant d'envoyer le document."
},
"add-recipients":"Ajouter des destinataires",
"loading-mssg" :"Cela pourrait prendre du temps",
"send-mail" :"Envoyer un mail",
"placeholder-alert-1" :"Veuillez vous assurer qu'au moins un widget de signature est ajouté pour tous les destinataires.",
"placeholder-alert-2" :"Veuillez confirmer que vous avez rempli le champ de texte.",
"placeholder-alert-3" :"Etes-vous sûr de vouloir envoyer ce document pour signature ? ",
"placeholder-alert-4" :"Vous avez envoyé avec succès des mails à tous les",
"placeholder-alert-5" :"Voulez-vous signer des documents maintenant ?",
"placeholder-alert-6" :"Veuillez configurer l'adaptateur de messagerie pour envoyer du courrier !",
"placeholder-alert-7" :"Veuillez sélectionner le signataire pour ajouter un espace réservé !",
"email-subject":"Sujet du courriel",
"email-body":"corps de l'e-mail",
"email-placeholder" :"Ajouter le corps de l'e-mail",
"reset-to-default" :"Réinitialiser aux valeurs par défaut",
"cutomize-email":"Personnaliser l'e-mail",
"upgrade-to-customize-email":"Mise à niveau pour personnaliser l'e-mail",
"sign-url" :"Signer l'URL",
"Mails Sent" :"Mails envoyés avec succès !",
"document-alert" :"Alerte document",
"owner-subscription-expired":"L'abonnement du propriétaire a expiré.",
"subscription-expired" :"Abonnement expiré",
"alert-message" :"Message d'alerte",
"document-decline" :"Document-refusé",
"decline-alert-1":"Etes-vous sûr de vouloir refuser ce document ?",
"decline-alert-2": "Vous avez refusé ce document !",
"decline-alert-3": "Vous ne pouvez pas signer ce document car il a été refusé/révoqué.",
"sign here":"Signer ici",
"guest-email-alert" :"le code de vérification a été envoyé sur votre e-mail",
"get-otp-alert":"vous recevrez un mot de passe à usage unique par e-mail",
"user-already-exist" :"L'utilisateur existe déjà.",
"server-error":"Erreur interne du serveur !",
"fill-required-details!" :"Veuillez remplir les informations requises !",
"sign-up-form" :"Formulaire d'inscription",
"sign-up":"S'inscrire",
"folder-already-exist!" :"le dossier existe déjà !",
"please-select-position!" :"Veuillez sélectionner un poste !",
"default-sign-alert" :"Êtes-vous sûr de vouloir vous connecter automatiquement à tous les emplacements demandés ? ",
"Your-Signature":"Votre signature",
"auto-sign-all" :"Tout signer automatiquement",
"generating-certificate":"Génération du certificat",
"pdf-download" :"Téléchargement PDF",
"generate-certificate-alert" :" Votre certificat d'achèvement est en cours de génération. Veuillez patienter quelques instants. Si le téléchargement ne démarre pas sous peu, cliquez à nouveau sur le bouton. ",
"folder-already-exist":"Le dossier existe déjà !",
"folder-created-successfully":"Dossier créé avec succès !",
"fill-folder-name":"Veuillez indiquer le nom du dossier",
"already-exists-this-username":"Un utilisateur existe déjà avec ce nom d'utilisateur !",
"verification-code-sent" :"Un e-mail de vérification a été envoyé à votre adresse e-mail !",
"registered-user-successfully" :"Utilisateur enregistré avec succès.",
"role-not-found" :"Rôle introuvable.",
"do-not-access" :"Vous n'y avez pas accès, veuillez contacter l'administrateur.",
"add-admin" :"Ajouter un administrateur",
"opensign-setup" :"Configuration d'Opensign",
"join-discord" :"Rejoignez notre serveur Discord",
"admin-already-exist":"L'administrateur existe déjà.",
"password-update-alert-1" :"Mot de passe mis à jour avec succès.",
"password-update-alert-2" :"Votre mot de passe actuel est manquant ou incorrect.",
"password-update-alert-3" :"Votre mot de passe actuel est manquant ou incorrect.",
"password-update-alert-4" :"Votre mot de passe et votre mot de passe de confirmation ne correspondent pas.",
"current-password":"mot de passe actuel",
"new-password" :"nouveau mot de passe",
"confirm-password":"Confirmez le mot de passe",
"file-alert-1":"La taille du fichier sélectionné est trop grande. Veuillez sélectionner un fichier inférieur à",
"file-alert-2" :"Veuillez sélectionner un fichier.",
"file-alert-3" :"Veuillez patienter pendant le téléchargement du document.",
"enter-pdf-password" :"Entrez le mot de passe PDF" ,
"correct-password" :"Veuillez fournir un mot de passe correct",
"decrypting-pdf" :"Décryptage du pdf, veuillez patienter...",
"invalid-otp" :"OTP invalide",
"user-not-found" :"Utilisateur non trouvé!",
"enter-otp-alert" :"Veuillez saisir OTP !",
"get-verification-code" :"Obtenir le code de vérification",
"get-verification-code-2" :"Vous recevrez un code de vérification par e-mail",
"enter-verification-code" :"Entrez le code de vérification",
"provide-your-details" :"Fournissez vos coordonnées",
"provide-email" :"Veuillez fournir un e-mail.",
"additional-info" :"Information additionnelle",
"signature-saved-alert" :"Signature enregistrée avec succès.",
"fill-field":"Veuillez remplir ce champ",
"error-template":"Erreur : modèle introuvable ! ",
"error":"Erreur",
"invalid-document" :"Erreur : document invalide !",
"document-not-found" :"Document introuvable !",
"document-signed-alert-1" :"Vous avez signé le document avec succès. Vous pouvez télécharger ou imprimer une copie du document partiellement signé. Une copie du document signé numériquement sera envoyée au propriétaire par e-mail une fois qu'il sera signé par tous les signataires.",
"encrypted-pdf-not-support" :"Les fichiers PDF actuellement cryptés ne sont pas pris en charge. ",
"document-signed-alert-4" :"Toutes nos félicitations! 🎉 Ce document a été signé avec succès par tous les participants !",
"document-signed-alert-5" :"Ce document a été signé par tous les signataires.",
"document-signed-alert-6" :"Ce document a été refusé par un ou plusieurs destinataire(s).",
"document-signed-alert-7" : "Ce document n'est plus disponible.",
"document-signed-alert-8":"Le document a déjà été envoyé pour signature.",
"yet-to-sign" :"Reste à signer",
"validation-alert-1" :"L'entrée ne répond pas aux critères définis par l'expression régulière.",
"account-already-exists" :"Le compte existe déjà!",
"choose-password" :"Choisissez un mot de passe",
"enter-password" :"Entrer le mot de passe",
"sure" :"bien sûr",
"subscribed-alert":"Vous êtes déjà abonné au forfait !",
"monthly" :"Mensuel",
"yearly-upto" :"Annuel (jusqu'à 66 % de réduction)",
"billed-yearly" :"Facturé annuellement",
"billed-monthly" :"Facturé mensuellement",
"plansubscription-1" :"Hébergez-le vous-même gratuitement",
"visit-github" :"Visitez Github",
"user-already-exist-name" :"Un utilisateur existe déjà avec ce nom d'utilisateur !",
"do-not-access-contact-admin" :"Vous n'y avez pas accès, veuillez contacter l'administrateur.",
"filed-required-correctly" :"Veuillez remplir correctement les informations requises.",
"admin-created" :"Administrateur créé",
"invalid-masterkey":"Clé principale invalide",
"opensign-Setup" :"Configuration d'Opensign",
"master-key" :"La clef maitresse",
"profile-update-alert" :"Mise à jour du profil réussie.",
"date":"Date",
"report-not-found" :"Rapport introuvable",
"please-wait" :"S'il vous plaît, attendez",
"select-foler":"Sélectionner le dossier",
"generated-on" :"Généré le",
"text-field" :"Champ de texte",
"font-size" :"Taille de police",
"widget-status":{
"Required":"Requis",
"Optional":"Facultative"
},
"all-right" :"Tous droits réservés",
"version" :"version",
"social-media":{
"github":"Github",
"linked-in":"LinkedIn",
"twitter":"Twitter",
"discord":"Discorde"
},
"tour-mssg":{
"home-layout-1":"Vous vous êtes connecté avec succès ! Jetons un coup d'oeil.",
"home-layout-2": "Pour télécharger des documents à auto-signature ou pour demander la signature d'autres personnes, sélectionnez simplement les boutons correspondants.",
"home-layout-3": "Vous êtes prêt à commencer à utiliser OpenSign ! Si vous avez besoin d'aide, n'hésitez pas à nous contacter.",
"generate-token": "Mettez à niveau maintenant pour générer un jeton API",
"opensign-drive-1": "Cliquez sur les liens du fil d'Ariane pour naviguer facilement dans la hiérarchie des dossiers et afficher les documents dans chaque dossier.",
"opensign-drive-2": "Cliquez sur le bouton Ajouter pour créer un nouveau dossier ou document.",
"opensign-drive-3": "Triez vos documents par date ou par nom à l'aide de ce menu.",
"opensign-drive-4": "Cliquez sur ce menu pour afficher les documents sous forme de liste.",
"opensign-drive-5": "La liste des documents s'affiche selon l'option de tri sélectionnée. Les icônes à côté de chaque document indiquent son état actuel.",
"opensign-drive-6": "Faites un clic droit sur un document pour voir les options telles que Télécharger, Renommer, Déplacer et Supprimer. Cliquez sur le document pour l'ouvrir.",
"opensign-drive-7": "Faites un clic droit sur n'importe quel dossier pour voir les options. Choisissez 'Renommer' pour changer le nom du dossier ou cliquez sur le dossier pour naviguer dans son contenu.",
"pdf-request-file-1":"Liste des signataires qui doivent encore signer le document.",
"pdf-request-file-2": "Cliquez sur l'un des espaces réservés apparaissant sur le document pour signer. Vous verrez alors des options pour dessiner votre signature, la saisir ou télécharger une image.",
"pdf-request-file-3": "Cliquez sur les boutons Précédent, Refuser ou Terminer pour parcourir votre document. Utilisez le menu points de suspension pour des options supplémentaires, notamment le bouton Télécharger.",
"pdf-request-file-4":"Liste des signataires ayant déjà signé le document.",
"pdf-request-file-5":"Vous pouvez cliquer sur 'Signer automatiquement tout' pour signer automatiquement à tous les emplacements que vous êtes censé signer. Assurez-vous de lire correctement le document avant de cliquer sur ce bouton.",
"placeholder-sign-1": "Sélectionnez un destinataire dans cette liste pour ajouter un espace réservé à l'endroit où il est censé signer. L'espace réservé apparaîtra de la même couleur que le nom du destinataire une fois que vous le déposerez sur le document.",
"placeholder-sign-2":"Cliquer sur le bouton 'Ajouter des destinataires' vous permettra d'ajouter plus de signataires.",
"placeholder-sign-3":"Faites glisser ou cliquez sur un champ pour l'ajouter au document.",
"placeholder-sign-4":"La zone de contenu PDF affiche déjà les espaces réservés existants du modèle. Pour votre commodité, ces espaces réservés correspondront à la couleur du nom du destinataire, ce qui les rendra facilement identifiables.",
"placeholder-sign-5":"Cliquer sur 'Envoyer' enregistrera le document. À l'étape suivante, vous pourrez personnaliser les e-mails à envoyer aux destinataires ou copier les liens de signature et les partager vous-même avec les destinataires.",
"report-1":"Cliquez sur le bouton 'Ajouter' pour créer un nouveau modèle. Les modèles sont des documents réutilisables conçus pour générer rapidement de nouveaux documents avec la même structure et différents signataires. Par exemple, un modèle RH pour l'intégration peut avoir des rôles prédéfinis tels que 'Responsable RH' et ' Nouvel employé'. Chaque fois que vous utilisez le modèle, vous pouvez attribuer le rôle 'Nouvel employé' à différents membres du personnel entrants, tandis que le rôle 'Responsable RH' reste constant, facilitant ainsi un processus d'intégration fluide pour chaque recrue",
"redirect":"Cliquez sur le bouton 'Utiliser' pour créer un nouveau document à partir d'un modèle existant.",
"bulksend":"Pour créer et envoyer rapidement plusieurs documents à l'aide d'un modèle existant, cliquez sur le bouton 'Envoi rapide'.",
"option": "Ce menu révèle plus d'options telles que Modifier et Supprimer. Utilisez le bouton « Modifier » pour ajouter des rôles de signataire, modifier les champs et mettre à jour votre modèle. Les modifications s'appliqueront à tous les futurs documents créés à partir de ce modèle mais n'affecteront pas les documents existants. Utilisez le bouton Supprimer, vous pouvez supprimer le modèle ",
"signyour-self-1": "Sélectionnez et faites glisser vos widgets préférés sur le PDF pour personnaliser votre document avant de le signer. Choisissez les endroits parfaits pour chaque modification afin d'adapter le document à vos besoins.",
"signyour-self-2":"Faites glisser et déposer n'importe où dans cette zone. Vous pourrez la redimensionner et la déplacer plus tard.",
"template-placeholder-1":"Cliquer sur le bouton 'Ajouter un rôle' vous permettra d'ajouter différents rôles de signataire. Vous pourrez attacher des utilisateurs à chaque rôle dans les étapes suivantes.",
"template-placeholder-2": "Une fois les rôles ajoutés, sélectionnez un rôle dans la liste pour ajouter un espace réservé à l'endroit où il est censé signer. L'espace réservé apparaîtra dans la même couleur que le nom du rôle une fois que vous l'aurez déposé sur le document.",
"template-placeholder-3":"Faites glisser ou cliquez sur un champ pour l'ajouter au document.",
"template-placeholder-4":"Faites glisser l'espace réservé pour un rôle n'importe où sur le document. N'oubliez pas qu'il apparaîtra dans la même couleur que le nom du destinataire pour une référence facile.",
"template-placeholder-5":"Cliquer sur 'Suivant' stockera le modèle actuel. Après l'enregistrement, vous serez invité à créer un nouveau document à partir de ce modèle si vous le souhaitez.",
"webhook-1":"Mettez à niveau maintenant pour définir le webhook",
"Need your Signature":"En cliquant sur cette carte, vous accéderez à la liste des documents en attente de révision.",
"Out for signatures":"En cliquant sur cette carte, vous accéderez à une liste de documents en attente de signature.",
"Recent signature requests": "Voici une liste de documents qui attendent votre signature.",
"Recently sent for signatures":"Il s'agit d'une liste de documents que vous avez envoyés à d'autres parties pour signature.",
"Drafts":"Il s'agit de documents que vous avez commencés mais que vous n'avez pas finalisés pour envoi."
},
"enter-email-plaholder":"Ajoutez une adresse email et appuyez sur Entrée",
"success-email-alert" :"E-mail envoyé avec succès!",
"expired-doc-title" :"Document expiré",
"expired-on-mssg" :"Ce document a expiré le {{expiredDate}} et n'est plus disponible pour signature.",
"signature-validate-alert":"Veuillez confirmer que vous avez coché au moins {{minRequiredCount}} cases.",
"signature-validate-alert-2" :"Assurez-vous que ce champ est rempli avec précision et répond à toutes les exigences.",
"user-name-exist" :"le nom d'utilisateur existe déjà"
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+40 -11
View File
@@ -18,6 +18,9 @@ import LazyPage from "./primitives/LazyPage";
import { isEnableSubscription } from "./constant/const";
import SSOVerify from "./pages/SSOVerify";
import Loader from "./primitives/Loader";
import TeamList from "./pages/TeamList";
import UserList from "./pages/UserList";
import { serverUrl_fn } from "./constant/appinfo";
const DebugPdf = lazy(() => import("./pages/DebugPdf"));
const ForgetPassword = lazy(() => import("./pages/ForgetPassword"));
const GuestLogin = lazy(() => import("./pages/GuestLogin"));
@@ -30,6 +33,8 @@ const Opensigndrive = lazy(() => import("./pages/Opensigndrive"));
const ManageSign = lazy(() => import("./pages/Managesign"));
const GenerateToken = lazy(() => import("./pages/GenerateToken"));
const Webhook = lazy(() => import("./pages/Webhook"));
const AddAdmin = lazy(() => import("./pages/AddAdmin"));
const UpdateExistUserAdmin = lazy(() => import("./pages/UpdateExistUserAdmin"));
pdfjs.GlobalWorkerOptions.workerSrc = `//unpkg.com/pdfjs-dist@${pdfjs.version}/legacy/build/pdf.worker.min.mjs`;
const AppLoader = () => {
@@ -49,14 +54,10 @@ function App() {
const appId = process.env.REACT_APP_APPID
? process.env.REACT_APP_APPID
: "opensign";
const baseurl = process.env.REACT_APP_SERVERURL
? process.env.REACT_APP_SERVERURL
: window.location.origin + "/api/app";
const appName = "contracts";
const baseurl = serverUrl_fn();
try {
localStorage.setItem("baseUrl", `${baseurl}/`);
localStorage.setItem("parseAppId", appId);
localStorage.setItem("domain", appName);
setIsLoading(false);
} catch (error) {
console.log("err ", error);
@@ -72,7 +73,21 @@ function App() {
<Routes>
<Route element={<ValidateRoute />}>
<Route exact path="/" element={<Login />} />
<Route path="/signup" element={<LazyPage Page={Signup} />} />
{isEnableSubscription && (
<Route path="/signup" element={<LazyPage Page={Signup} />} />
)}
{!isEnableSubscription && (
<>
<Route
path="/addadmin"
element={<LazyPage Page={AddAdmin} />}
/>
<Route
path="/upgrade-2.1"
element={<LazyPage Page={UpdateExistUserAdmin} />}
/>
</>
)}
</Route>
<Route element={<Validate />}>
<Route
@@ -139,11 +154,6 @@ function App() {
path="/managesign"
element={<LazyPage Page={ManageSign} />}
/>
<Route
path="/generatetoken"
element={<LazyPage Page={GenerateToken} />}
/>
<Route path="/webhook" element={<LazyPage Page={Webhook} />} />
<Route
path="/template/:templateId"
element={<TemplatePlaceholder />}
@@ -164,11 +174,30 @@ function App() {
path="/pdfRequestFiles/:docId"
element={<PdfRequestFiles />}
/>
{/* recipient signature route with no rowlevel data using docId from url */}
<Route
path="/recipientSignPdf/:docId/:contactBookId"
element={<PdfRequestFiles />}
/>
<Route
path="/recipientSignPdf/:docId"
element={<PdfRequestFiles />}
/>
{isEnableSubscription && (
<>
<Route path="/teams" element={<TeamList />} />
<Route
path="/generatetoken"
element={<LazyPage Page={GenerateToken} />}
/>
<Route
path="/webhook"
element={<LazyPage Page={Webhook} />}
/>
</>
)}
<Route path="/users" element={<UserList />} />
</Route>
<Route path="/sso" element={<SSOVerify />} />
<Route path="*" element={<PageNotFound />} />
Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

+18 -37
View File
@@ -1,17 +1,16 @@
import React, { useState, useEffect } from "react";
import Parse from "parse";
import axios from "axios";
import Loader from "../primitives/Loader";
import { useTranslation } from "react-i18next";
const AddSigner = (props) => {
const { t } = useTranslation();
const [name, setName] = useState("");
const [phone, setPhone] = useState("");
const [email, setEmail] = useState("");
const [addYourself, setAddYourself] = useState(false);
const [isLoader, setIsLoader] = useState(false);
const [isUserExist, setIsUserExist] = useState(false);
const parseBaseUrl = localStorage.getItem("baseUrl");
const parseAppId = localStorage.getItem("parseAppId");
useEffect(() => {
checkUserExist();
@@ -85,18 +84,6 @@ const AddSigner = (props) => {
}
const user = await _user.save();
if (user) {
const roleurl = `${parseBaseUrl}functions/AddUserToRole`;
const headers = {
"Content-Type": "application/json",
"X-Parse-Application-Id": parseAppId,
sessionToken: localStorage.getItem("accesstoken")
};
const body = {
appName: localStorage.getItem("_appName"),
roleName: "contracts_Guest",
userId: user.id
};
await axios.post(roleurl, body, { headers: headers });
const currentUser = Parse.User.current();
contactQuery.set(
"CreatedBy",
@@ -140,18 +127,6 @@ const AddSigner = (props) => {
if (err.code === 202) {
const params = { email: email };
const userRes = await Parse.Cloud.run("getUserId", params);
const roleurl = `${parseBaseUrl}functions/AddUserToRole`;
const headers = {
"Content-Type": "application/json",
"X-Parse-Application-Id": parseAppId,
sessionToken: localStorage.getItem("accesstoken")
};
const body = {
appName: localStorage.getItem("_appName"),
roleName: "contracts_Guest",
userId: userRes.id
};
await axios.post(roleurl, body, { headers: headers });
const currentUser = Parse.User.current();
contactQuery.set(
"CreatedBy",
@@ -194,17 +169,17 @@ const AddSigner = (props) => {
}
}
} else {
alert("Contact already exist!");
alert(t("add-signer-alert"));
setIsLoader(false);
}
} catch (err) {
console.log("err in fetch contact", err);
setIsLoader(false);
alert("something went wrong, please try again later");
alert(t("something-went-wrong-mssg"));
}
} else {
setIsLoader(false);
alert("something went wrong, please try again later");
alert(t("something-went-wrong-mssg"));
}
};
@@ -241,14 +216,14 @@ const AddSigner = (props) => {
className="op-checkbox op-checkbox-sm"
/>
<label htmlFor="addYourself" className="ml-2 mb-0">
Add Yourself
{t("add-yourself")}
</label>
</div>
)}
<form onSubmit={handleSubmit}>
<div className="mb-3">
<label htmlFor="name" className="block text-xs font-semibold">
Name
{t("name")}
<span className="text-[red] text-[13px]"> *</span>
</label>
<input
@@ -258,27 +233,33 @@ const AddSigner = (props) => {
onChange={(e) => setName(e.target.value)}
required
disabled={addYourself}
onInvalid={(e) => e.target.setCustomValidity(t("input-required"))}
onInput={(e) => e.target.setCustomValidity("")}
className="op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs"
/>
</div>
<div className="mb-3">
<label htmlFor="email" className="block text-xs font-semibold">
Email
{t("email")}
<span className="text-[red] text-[13px]"> *</span>
</label>
<input
type="email"
id="email"
value={email}
onChange={(e) => setEmail(e.target.value?.toLowerCase())}
onChange={(e) =>
setEmail(e.target.value?.toLowerCase()?.replace(/\s/g, ""))
}
required
onInvalid={(e) => e.target.setCustomValidity(t("input-required"))}
onInput={(e) => e.target.setCustomValidity("")}
disabled={addYourself}
className="op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs"
/>
</div>
<div className="mb-3">
<label htmlFor="phone" className="block text-xs font-semibold">
Phone
{t("phone")}
</label>
<input
type="text"
@@ -291,14 +272,14 @@ const AddSigner = (props) => {
</div>
<div className="mt-4 flex gap-x-2 justify-start">
<button type="submit" className="op-btn op-btn-primary">
Submit
{t("submit")}
</button>
<button
type="button"
onClick={() => handleReset()}
className="op-btn op-btn-secondary"
>
Reset
{t("reset")}
</button>
</div>
</form>
+198
View File
@@ -0,0 +1,198 @@
import React, { useEffect, useState } from "react";
import Parse from "parse";
import Title from "./Title";
import Loader from "../primitives/Loader";
import { useTranslation } from "react-i18next";
const AddTeam = (props) => {
const { t } = useTranslation();
const [formdata, setFormdata] = useState({
name: "",
team: ""
});
const [isLoader, setIsLoader] = useState(false);
const [teamList, setTeamList] = useState([]);
useEffect(() => {
getTeamList();
}, []);
const getTeamList = async () => {
setIsLoader(true);
try {
const teams = await Parse.Cloud.run("getteams", { active: true });
const teamRes = JSON.parse(JSON.stringify(teams));
if (teamRes.length > 0) {
const _teamRes = JSON.parse(JSON.stringify(teamRes));
const allUsersteam = _teamRes.find((x) => x.Name === "All Users");
if (allUsersteam) {
setFormdata({ team: allUsersteam.objectId });
}
setTeamList(_teamRes);
}
} catch (err) {
console.log("Err in fetch top level teamList", err);
} finally {
setIsLoader(false);
}
};
const handleDropdown = (e) => {
setFormdata((prev) => ({ ...prev, [e.target.name]: e.target.value }));
};
// Define a function to handle form submission
const handleSubmit = async (e) => {
e.preventDefault();
e.stopPropagation();
// Extracting values except for the 'name' key
let updatedAncestors = [];
if (formdata.team) {
const Ancestors = teamList.find(
(x) => x.objectId === formdata.team
)?.Ancestors;
if (Ancestors && Ancestors.length > 0) {
updatedAncestors = Ancestors.map((x) => ({
__type: "Pointer",
className: "contracts_Teams",
objectId: x.objectId
}));
} else {
const AllUser = teamList.find((x) => x.objectId === "All Users");
updatedAncestors = [
AllUser,
{
__type: "Pointer",
className: "contracts_Teams",
objectId: formdata.team
}
];
}
}
try {
setIsLoader(true);
let data = { Name: formdata.name };
if (updatedAncestors.length > 0) {
const ParentId = updatedAncestors[updatedAncestors.length - 1];
data["ParentId"] = ParentId?.objectId;
data["Ancestors"] = updatedAncestors;
}
const newTeamRes = await Parse.Cloud.run("addteam", data);
// console.log("teamRes ", newTeamRes);
if (updatedAncestors.length > 0) {
const ParentId = teamList.find((x) => x.objectId === formdata.team);
props.handleTeamInfo({
objectId: newTeamRes.id,
Name: formdata.name,
ParentId: ParentId,
Ancestors: updatedAncestors,
IsActive: true
});
} else {
props.handleTeamInfo({
objectId: newTeamRes.id,
Name: formdata.name,
ParentId: "",
Ancestors: "",
IsActive: true
});
}
if (props.closePopup) {
props.closePopup();
}
setFormdata({ name: "", team: { name: "", objectId: "" } });
props.setIsAlert({ type: "success", msg: "Team created successfully." });
} catch (err) {
console.log("err in save team", err);
if (err.code === 137) {
props.setIsAlert({ type: "danger", msg: "Teams already exists." });
} else if (err.code === 102) {
props.setIsAlert({ type: "warning", msg: "Provide team name." });
} else {
props.setIsAlert({ type: "danger", msg: "Something went wrong." });
}
} finally {
setTimeout(() => props.setIsAlert({ type: "success", msg: "" }), 1500);
setIsLoader(false);
}
};
// Define a function to handle the "add yourself" checkbox
const handleReset = () => {
setFormdata({
name: "",
team: { name: "", objectId: "" }
});
};
const handleChange = (e) => {
setFormdata((prev) => ({ ...prev, [e.target.name]: e.target.value }));
};
return (
<div className="shadow-md rounded-box my-[1px] p-3 bg-base-100 relative">
<Title title="Add Team" />
{isLoader && (
<div className="absolute w-full h-full inset-0 flex justify-center items-center bg-base-content/30 z-50">
<Loader />
</div>
)}
<div className="w-full mx-auto">
<form onSubmit={handleSubmit}>
{/* <h1 className="text-[20px] font-semibold mb-4">Add User</h1> */}
<div className="mb-3">
<label
htmlFor="name"
className="block text-xs text-gray-700 font-semibold"
>
{t("name")}
<span className="text-[red] text-[13px]"> *</span>
</label>
<input
type="text"
name="name"
value={formdata.name}
onChange={(e) => handleChange(e)}
onInvalid={(e) => e.target.setCustomValidity(t("input-required"))}
onInput={(e) => e.target.setCustomValidity("")}
required
className="op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs"
/>
</div>
<div className="mb-3">
<label
htmlFor="phone"
className="block text-xs text-gray-700 font-semibold"
>
{t("report-heading.Parent Team")}
</label>
<select
value={formdata.team}
onChange={(e) => handleDropdown(e)}
name="team"
className="op-select op-select-bordered op-select-sm focus:outline-none hover:border-base-content w-full text-xs"
>
{teamList.length > 0 &&
teamList.map((x) => (
<option key={x.objectId} value={x.objectId}>
{x.Name}
</option>
))}
</select>
</div>
<div className="flex items-center mt-3 gap-2 text-white">
<button type="submit" className="op-btn op-btn-primary">
{t("submit")}
</button>
<div
type="button"
onClick={() => handleReset()}
className="op-btn op-btn-secondary"
>
{t("reset")}
</div>
</div>
</form>
</div>
</div>
);
};
export default AddTeam;
+249 -107
View File
@@ -1,24 +1,57 @@
import React, { useState } from "react";
import React, { useEffect, useState } from "react";
import Parse from "parse";
import axios from "axios";
import Title from "./Title";
import Alert from "../primitives/Alert";
import Loader from "../primitives/Loader";
import { copytoData } from "../constant/Utils";
import { isEnableSubscription } from "../constant/const";
import { useTranslation } from "react-i18next";
function generatePassword(length) {
const characters =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
let result = "";
const charactersLength = characters.length;
for (let i = 0; i < length; i++) {
result += characters.charAt(Math.floor(Math.random() * charactersLength));
}
return result;
}
const AddUser = (props) => {
const [name, setName] = useState("");
const [phone, setPhone] = useState("");
const [email, setEmail] = useState("");
const { t } = useTranslation();
const [formdata, setFormdata] = useState({
name: "",
phone: "",
email: "",
team: "",
password: "",
role: ""
});
const [isLoader, setIsLoader] = useState(false);
const [isUserExist, setIsUserExist] = useState(false);
const parseBaseUrl = localStorage.getItem("baseUrl");
const parseAppId = localStorage.getItem("parseAppId");
const [teamList, setTeamList] = useState([]);
const role = ["OrgAdmin", "Editor", "User"];
useEffect(() => {
getTeamList();
}, []);
const getTeamList = async () => {
setFormdata((prev) => ({ ...prev, password: generatePassword(12) }));
const teamRes = await Parse.Cloud.run("getteams", { active: true });
if (teamRes.length > 0) {
const _teamRes = JSON.parse(JSON.stringify(teamRes));
setTeamList(_teamRes);
if (!isEnableSubscription) {
const allUserId =
_teamRes.find((x) => x.Name === "All Users")?.objectId || "";
setFormdata((prev) => ({ ...prev, team: allUserId }));
}
}
};
const checkUserExist = async () => {
try {
const res = await Parse.Cloud.run("getUserDetails", {
email: email,
userId: Parse.User.current().id
email: formdata.email
});
if (res) {
return true;
@@ -33,24 +66,46 @@ const AddUser = (props) => {
const handleSubmit = async (e) => {
e.preventDefault();
e.stopPropagation();
const localUser = JSON.parse(localStorage.getItem("Extand_Class"))?.[0];
setIsLoader(true);
const res = await checkUserExist();
if (res) {
setIsUserExist(true);
props.setIsAlert({ type: "danger", msg: t("user-already-exist") });
setIsLoader(false);
setTimeout(() => {
setIsUserExist(false);
props.setIsAlert({ type: "success", msg: "" });
}, 1000);
} else {
try {
const contactQuery = new Parse.Object("contracts_Users");
contactQuery.set("Name", name);
contactQuery.set("Phone", phone);
contactQuery.set("Email", email);
contactQuery.set("UserRole", "contracts_User");
const extUser = new Parse.Object("contracts_Users");
extUser.set("Name", formdata.name);
if (formdata.phone) {
extUser.set("Phone", formdata.phone);
}
extUser.set("Email", formdata.email);
extUser.set("UserRole", `contracts_${formdata.role}`);
if (formdata?.team) {
extUser.set("TeamIds", [
{
__type: "Pointer",
className: "contracts_Teams",
objectId: formdata.team
}
]);
}
if (localUser && localUser.OrganizationId) {
extUser.set("OrganizationId", {
__type: "Pointer",
className: "contracts_Organizations",
objectId: localUser.OrganizationId.objectId
});
}
if (localUser && localUser.Company) {
extUser.set("Company", localUser.Company);
}
if (localStorage.getItem("TenantId")) {
contactQuery.set("TenantId", {
extUser.set("TenantId", {
__type: "Pointer",
className: "partners_Tenant",
objectId: localStorage.getItem("TenantId")
@@ -60,89 +115,69 @@ const AddUser = (props) => {
try {
const _users = Parse.Object.extend("User");
const _user = new _users();
_user.set("name", name);
_user.set("username", email);
_user.set("email", email);
_user.set("password", email);
if (phone) {
_user.set("phone", phone);
_user.set("name", formdata.name);
_user.set("username", formdata.email);
_user.set("email", formdata.email);
_user.set("password", formdata.password);
if (formdata.phone) {
_user.set("phone", formdata.phone);
}
const user = await _user.save();
if (user) {
const roleurl = `${parseBaseUrl}functions/AddUserToRole`;
const headers = {
"Content-Type": "application/json",
"X-Parse-Application-Id": parseAppId,
sessionToken: localStorage.getItem("accesstoken")
};
const body = {
appName: localStorage.getItem("_appName"),
roleName: "contracts_User",
userId: user.id
};
await axios.post(roleurl, body, { headers: headers });
const currentUser = Parse.User.current();
contactQuery.set(
extUser.set(
"CreatedBy",
Parse.User.createWithoutData(currentUser.id)
);
contactQuery.set("UserId", user);
extUser.set("UserId", user);
const acl = new Parse.ACL();
acl.setPublicReadAccess(true);
acl.setPublicWriteAccess(true);
acl.setReadAccess(currentUser.id, true);
acl.setWriteAccess(currentUser.id, true);
contactQuery.setACL(acl);
extUser.setACL(acl);
const res = await contactQuery.save();
const res = await extUser.save();
const parseData = JSON.parse(JSON.stringify(res));
if (props.details) {
props.details({
value: parseData[props.valueKey],
label: parseData[props.displayKey]
});
}
if (props.closePopup) {
props.closePopup();
}
if (props.handleUserData) {
if (formdata?.team) {
const team = teamList.find((x) => x.objectId === formdata.team);
parseData.TeamIds = parseData.TeamIds.map((y) =>
y.objectId === team.objectId ? team : y
);
}
props.handleUserData(parseData);
}
setIsLoader(false);
setName("");
setPhone("");
setEmail("");
setFormdata({
name: "",
email: "",
phone: "",
team: "",
role: ""
});
}
} catch (err) {
console.log("err ", err);
if (err.code === 202) {
const params = { email: email };
const params = { email: formdata.email };
const userRes = await Parse.Cloud.run("getUserId", params);
const roleurl = `${parseBaseUrl}functions/AddUserToRole`;
const headers = {
"Content-Type": "application/json",
"X-Parse-Application-Id": parseAppId,
sessionToken: localStorage.getItem("accesstoken")
};
const body = {
appName: localStorage.getItem("_appName"),
roleName: "contracts_User",
userId: userRes.id
};
await axios.post(roleurl, body, { headers: headers });
const currentUser = Parse.User.current();
contactQuery.set(
extUser.set(
"CreatedBy",
Parse.User.createWithoutData(currentUser.id)
);
contactQuery.set("UserId", {
extUser.set("UserId", {
__type: "Pointer",
className: "_User",
objectId: userRes.id
@@ -153,68 +188,100 @@ const AddUser = (props) => {
acl.setReadAccess(currentUser.id, true);
acl.setWriteAccess(currentUser.id, true);
contactQuery.setACL(acl);
const res = await contactQuery.save();
extUser.setACL(acl);
const res = await extUser.save();
const parseData = JSON.parse(JSON.stringify(res));
if (props.details) {
props.details({
value: parseData[props.valueKey],
label: parseData[props.displayKey]
});
}
if (props.closePopup) {
props.closePopup();
}
if (props.handleUserData) {
if (formdata?.team) {
const team = teamList.find((x) => x.objectId === formdata.team);
parseData.TeamIds = parseData.TeamIds.map((y) =>
y.objectId === team.objectId ? team : y
);
}
props.handleUserData(parseData);
}
setIsLoader(false);
setName("");
setPhone("");
setEmail("");
setFormdata({
name: "",
email: "",
phone: "",
team: "",
role: ""
});
}
}
} catch (err) {
// console.log("err", err);
console.log("err", err);
setIsLoader(false);
alert("something went wrong!");
props.setIsAlert({
type: "danger",
msg: t("something-went-wrong-mssg")
});
} finally {
setTimeout(() => props.setIsAlert({ type: "success", msg: "" }), 1500);
}
}
};
// Define a function to handle the "add yourself" checkbox
const handleReset = () => {
setName("");
setPhone("");
setEmail("");
setFormdata({
name: "",
email: "",
phone: "",
team: "",
role: ""
});
if (props.closePopup) {
props.closePopup();
}
};
const handleChange = (event) => {
let { name, value } = event.target;
if (name === "email") {
value = value?.toLowerCase()?.replace(/\s/g, "");
}
setFormdata((prev) => ({
...prev,
[name]: value
}));
};
const copytoclipboard = (text) => {
copytoData(text);
props.setIsAlert({ type: "success", msg: t("copied") });
setTimeout(() => props.setIsAlert({ type: "success", msg: "" }), 1500); // Reset copied state after 1.5 seconds
};
return (
<div className="shadow-md rounded my-2 p-3 bg-[#ffffff] md:border-[1px] md:border-gray-600/50">
<div className="shadow-md rounded-box my-[1px] p-3 bg-[#ffffff]">
<Title title={"Add User"} />
{isUserExist && <Alert type="danger">User already exists!</Alert>}
{isLoader && (
<div className="fixed inset-0 flex justify-center items-center bg-black bg-opacity-30 z-50">
<div className="fixed inset-0 flex justify-center items-center bg-black bg-opacity-30 z-50 rounded-box">
<Loader />
</div>
)}
<div className="w-full mx-auto">
<form onSubmit={handleSubmit}>
<h1 className="text-[20px] font-semibold mb-4">Add User</h1>
{/* <h1 className="text-[20px] font-semibold mb-4">Add User</h1> */}
<div className="mb-3">
<label
htmlFor="name"
className="block text-xs text-gray-700 font-semibold"
>
Name
{t("name")}
<span className="text-[red] text-[13px]"> *</span>
</label>
<input
type="text"
id="name"
value={name}
onChange={(e) => setName(e.target.value)}
name="name"
value={formdata.name}
onChange={(e) => handleChange(e)}
onInvalid={(e) => e.target.setCustomValidity(t("input-required"))}
onInput={(e) => e.target.setCustomValidity("")}
required
className="op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs"
/>
@@ -224,49 +291,124 @@ const AddUser = (props) => {
htmlFor="email"
className="block text-xs text-gray-700 font-semibold"
>
Email
{t("email")}
<span className="text-[red] text-[13px]"> *</span>
</label>
<input
type="email"
id="email"
value={email}
onChange={(e) => setEmail(e.target.value)}
name="email"
value={formdata.email}
onChange={(e) => handleChange(e)}
onInvalid={(e) => e.target.setCustomValidity(t("input-required"))}
onInput={(e) => e.target.setCustomValidity("")}
required
className="op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs"
/>
</div>
<div className="mb-3">
<label
htmlFor="email"
className="block text-xs text-gray-700 font-semibold"
>
{t("password")}
</label>
<div className="flex justify-between items-center op-input op-input-bordered op-input-sm text-base-content w-full h-full text-[13px]">
<div className="break-all">{formdata?.password}</div>
<i
onClick={() => copytoclipboard(formdata?.password)}
className="fa-light fa-copy rounded-full hover:bg-base-300 p-[8px] cursor-pointer "
></i>
</div>
<div className="text-[12px] ml-2 mb-0 text-[red] select-none">
{t("password-generateed")}
</div>
</div>
<div className="mb-3">
<label
htmlFor="phone"
className="block text-xs text-gray-700 font-semibold"
>
Phone
<span className="text-[red] text-[13px]"> *</span>
{t("phone")}
{/* <span className="text-[red] text-[13px]"> *</span> */}
</label>
<input
type="text"
id="phone"
value={phone}
onChange={(e) => setPhone(e.target.value)}
required
name="phone"
placeholder="optional"
value={formdata.phone}
onChange={(e) => handleChange(e)}
// required
className="op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs"
/>
</div>
<div className="flex items-center mt-3 gap-2 text-white">
<button
type="submit"
className="bg-[#1ab6ce] rounded-sm shadow-md text-[13px] font-semibold uppercase text-white py-1.5 px-2.5 focus:outline-none"
{isEnableSubscription && (
<div className="mb-3">
<label
htmlFor="phone"
className="block text-xs text-gray-700 font-semibold"
>
Team<span className="text-[red] text-[13px]"> *</span>
</label>
<select
value={formdata.team}
onChange={(e) => handleChange(e)}
name="team"
className="op-select op-select-bordered op-select-sm focus:outline-none hover:border-base-content w-full text-xs"
onInvalid={(e) =>
e.target.setCustomValidity(t("input-required"))
}
onInput={(e) => e.target.setCustomValidity("")}
required
>
<option defaultValue={""} value={""}>
select
</option>
{teamList.length > 0 &&
teamList.map((x) => (
<option key={x.objectId} value={x.objectId}>
{x.Name}
</option>
))}
</select>
</div>
)}
<div className="mb-3">
<label
htmlFor="phone"
className="block text-xs text-gray-700 font-semibold"
>
Role<span className="text-[red] text-[13px]"> *</span>
</label>
<select
value={formdata.role}
onChange={(e) => handleChange(e)}
name="role"
className="op-select op-select-bordered op-select-sm focus:outline-none hover:border-base-content w-full text-xs"
onInvalid={(e) => e.target.setCustomValidity(t("input-required"))}
onInput={(e) => e.target.setCustomValidity("")}
required
>
<option defaultValue={""} value={""}>
select
</option>
{role.length > 0 &&
role.map((x) => (
<option key={x} value={x}>
{x}
</option>
))}
</select>
</div>
<div className="flex items-center mt-3 gap-2 text-white">
<button type="submit" className="op-btn op-btn-primary">
Submit
</button>
<div
type="button"
onClick={() => handleReset()}
className="bg-[#188ae2] rounded-sm shadow-md text-[13px] font-semibold uppercase text-white py-1.5 px-2.5 text-center ml-[2px] focus:outline-none"
className="op-btn op-btn-secondary"
>
Reset
Cancel
</div>
</div>
</form>
+9 -11
View File
@@ -2,8 +2,10 @@ import React, { useState, useEffect, useRef } from "react";
import axios from "axios";
import SuggestionInput from "./shared/fields/SuggestionInput";
import Loader from "../primitives/Loader";
import { useTranslation } from "react-i18next";
const BulkSendUi = (props) => {
const { t } = useTranslation();
const [forms, setForms] = useState([]);
const [formId, setFormId] = useState(2);
const formRef = useRef(null);
@@ -96,7 +98,7 @@ const BulkSendUi = (props) => {
setScrollOnNextUpdate(true);
} else {
// If the limit has been reached, throw an error with the appropriate message
alert("Quick send reached limit.");
alert(t("quick-send-alert-4"));
}
};
@@ -244,36 +246,32 @@ const BulkSendUi = (props) => {
onClick={handleAddForm}
className="op-btn op-btn-primary focus:outline-none"
>
<i className="fa-light fa-plus"></i> <span>Add new</span>
<i className="fa-light fa-plus"></i>{" "}
<span>{t("add-new")}</span>
</button>
<button
type="submit"
className="op-btn op-btn-secondary focus:outline-none"
>
<i className="fa-light fa-paper-plane"></i>{" "}
<span>Send</span>
<span>{t("send")}</span>
</button>
</div>
</form>
) : (
<div className="text-black p-3 bg-white w-full text-sm md:text-base flex justify-center items-center">
All roles in this document are currently linked to contacts. To
&apos;quick send&apos; copies of this template to multiple
signers, please ensure that at least one role is not linked to
any contact.
{t("quick-send-alert-1")}
</div>
)}
</>
) : (
<div className="text-black p-3 bg-white w-full text-sm md:text-base flex justify-center items-center">
Please ensure there&#39;s at least one signature widget added for
all recipients.
{t("quick-send-alert-2")}
</div>
)
) : (
<div className="text-black p-3 bg-white w-full text-sm md:text-base flex justify-center items-center">
Please add at least one role to this template in order to &apos;quick
send&apos; copies of it to multiple signers.
{t("quick-send-alert-3")}
</div>
)}
</>
+5 -2
View File
@@ -2,7 +2,9 @@ import React, { useEffect, useState } from "react";
import Package from "../../package.json";
import axios from "axios";
import { openInNewTab } from "../constant/Utils";
import { useTranslation } from "react-i18next";
const Footer = () => {
const { t } = useTranslation();
const [showButton, setShowButton] = useState(false);
const [version, setVersion] = useState("");
useEffect(() => {
@@ -48,9 +50,10 @@ const Footer = () => {
<footer className="op-footer op-footer-center py-3 bg-base-300 text-base-content text-center text-[13px]">
<aside>
<p>
All Rights Reserved &copy; {new Date().getFullYear()} &nbsp;
{t("all-right")} &copy; {new Date().getFullYear()} &nbsp;
<span onClick={openUrl} className="hover:underline cursor-pointer">
{appName} ( version: {version ? version : `${Package.version} `})
{appName} ( {t("version")}:{" "}
{version ? version : `${Package.version} `})
</span>
</p>
</aside>
+37 -20
View File
@@ -4,10 +4,18 @@ import FullScreenButton from "./FullScreenButton";
import { useNavigate } from "react-router-dom";
import Parse from "parse";
import { useWindowSize } from "../hook/useWindowSize";
import { checkIsSubscribed, getAppLogo, openInNewTab } from "../constant/Utils";
import { isEnableSubscription } from "../constant/const";
import {
checkIsSubscribed,
checkIsSubscribedTeam,
getAppLogo,
openInNewTab,
saveLanguageInLocal
} from "../constant/Utils";
import { isEnableSubscription, isStaging } from "../constant/const";
import { useTranslation } from "react-i18next";
const Header = ({ showSidebar }) => {
const { t, i18n } = useTranslation();
const navigate = useNavigate();
const { width } = useWindowSize();
let username = localStorage.getItem("username");
@@ -15,6 +23,7 @@ const Header = ({ showSidebar }) => {
const [isOpen, setIsOpen] = useState(false);
const [isSubscribe, setIsSubscribe] = useState(true);
const [isPro, setIsPro] = useState(false);
const [isTeam, setIsTeam] = useState(false);
const [applogo, setAppLogo] = useState(
localStorage.getItem("appLogo") || " "
);
@@ -29,15 +38,17 @@ const Header = ({ showSidebar }) => {
async function checkSubscription() {
if (isEnableSubscription) {
const getIsSubscribe = await checkIsSubscribed();
const getIsTeam = await checkIsSubscribedTeam();
if (getIsSubscribe) {
const applogo = await getAppLogo();
if (applogo) {
setAppLogo(applogo);
if (applogo?.logo) {
setAppLogo(applogo?.logo);
} else {
setAppLogo(localStorage.getItem("appLogo") || "");
}
}
setIsPro(getIsSubscribe);
setIsTeam(getIsTeam);
setIsSubscribe(getIsSubscribe);
}
}
@@ -53,22 +64,16 @@ const Header = ({ showSidebar }) => {
}
let appdata = localStorage.getItem("userSettings");
let applogo = localStorage.getItem("appLogo");
let appName = localStorage.getItem("appName");
let defaultmenuid = localStorage.getItem("defaultmenuid");
let PageLanding = localStorage.getItem("PageLanding");
let domain = localStorage.getItem("domain");
let _appName = localStorage.getItem("_appName");
let baseUrl = localStorage.getItem("baseUrl");
let appid = localStorage.getItem("parseAppId");
localStorage.clear();
saveLanguageInLocal(i18n);
localStorage.setItem("appLogo", applogo);
localStorage.setItem("appName", appName);
localStorage.setItem("_appName", _appName);
localStorage.setItem("defaultmenuid", defaultmenuid);
localStorage.setItem("PageLanding", PageLanding);
localStorage.setItem("domain", domain);
localStorage.setItem("userSettings", appdata);
localStorage.setItem("baseUrl", baseUrl);
localStorage.setItem("parseAppId", appid);
@@ -91,7 +96,13 @@ const Header = ({ showSidebar }) => {
document.removeEventListener("click", closeMenuOnOutsideClick);
};
}, [isOpen]);
const handleConsoleRedirect = () => {
if (isStaging) {
window.open(" https://staging-console.opensignlabs.com/");
} else {
window.open("https://console.opensignlabs.com/");
}
};
return (
<div className="op-navbar bg-base-100 shadow">
<div className="flex-none">
@@ -118,13 +129,18 @@ const Header = ({ showSidebar }) => {
className="text-xs md:text-sm shadow op-btn op-btn-outline op-btn-sm md:op-btn-md op-btn-accent"
onClick={() => navigate("/subscription")}
>
Upgrade Now
{t("upgrade-now")}
</button>
</div>
)}
{isPro && (
{!isTeam && isPro && (
<div className="w-[35px] h-[35px] bg-white rounded-full ring-[1px] ring-offset-2 ring-[#002862] text-[#002862] overflow-hidden font-semibold flex items-center justify-center">
PRO
{t("pro")}
</div>
)}
{isTeam && (
<div className="w-[35px] h-[35px] bg-white rounded-full ring-[1px] text-[13px] ring-offset-2 ring-[#002862] text-[#002862] overflow-hidden font-semibold flex items-center justify-center">
{t("team")}
</div>
)}
<div>
@@ -169,7 +185,7 @@ const Header = ({ showSidebar }) => {
>
<li onClick={() => openInNewTab("https://docs.opensignlabs.com")}>
<span>
<i className="fa-light fa-book"></i> Docs
<i className="fa-light fa-book"></i> {t("docs")}
</span>
</li>
<li
@@ -179,7 +195,7 @@ const Header = ({ showSidebar }) => {
}}
>
<span>
<i className="fa-light fa-user"></i> Profile
<i className="fa-light fa-user"></i> {t("profile")}
</span>
</li>
<li
@@ -189,12 +205,12 @@ const Header = ({ showSidebar }) => {
}}
>
<span>
<i className="fa-light fa-lock"></i> Change Password
<i className="fa-light fa-lock"></i> {t("change-password")}
</span>
</li>
<li
onClick={() => {
window.open("https://console.opensignlabs.com/");
handleConsoleRedirect();
}}
>
<span>
@@ -203,7 +219,8 @@ const Header = ({ showSidebar }) => {
</li>
<li onClick={closeDropdown}>
<span>
<i className="fa-light fa-arrow-right-from-bracket"></i> Log Out
<i className="fa-light fa-arrow-right-from-bracket"></i>{" "}
{t("log-out")}
</span>
</li>
</ul>
+19 -7
View File
@@ -1,6 +1,7 @@
import React, { useState } from "react";
import Parse from "parse";
import Loader from "../primitives/Loader";
import { useTranslation } from "react-i18next";
// import FacebookLogin from "react-facebook-login";
const LoginFacebook = ({
@@ -9,6 +10,7 @@ const LoginFacebook = ({
thirdpartyLoader,
setThirdpartyLoader
}) => {
const { t } = useTranslation();
const [isModal, setIsModal] = useState(false);
const [userDetails, setUserDetails] = useState({
Phone: "",
@@ -106,10 +108,10 @@ const LoginFacebook = ({
alert(userSignUp.message);
}
} else {
alert("Internal server error !");
alert(t("server-error"));
}
} else {
alert("Please fill required details!");
alert(t("fill-required-details!"));
}
};
return (
@@ -136,7 +138,7 @@ const LoginFacebook = ({
<div className="modal-dialog" role="document">
<div className="modal-content">
<div className="modal-header">
<h5 className="modal-title">Sign up form</h5>
<h5 className="modal-title">{t("sign-up-form")}</h5>
<span>
<span></span>
</span>
@@ -145,7 +147,8 @@ const LoginFacebook = ({
<form>
<div className="form-group">
<label htmlFor="Phone" className="col-form-label">
Phone <span className="text-[red] text-[13px]">*</span>
{t("phone")}{" "}
<span className="text-[red] text-[13px]">*</span>
</label>
<input
type="tel"
@@ -158,12 +161,17 @@ const LoginFacebook = ({
Phone: e.target.value
})
}
onInvalid={(e) =>
e.target.setCustomValidity(t("input-required"))
}
onInput={(e) => e.target.setCustomValidity("")}
required
/>
</div>
<div className="form-group">
<label htmlFor="Company" className="col-form-label">
Company <span className="text-[red] text-[13px]">*</span>
{t("company")}{" "}
<span className="text-[red] text-[13px]">*</span>
</label>
<input
type="text"
@@ -176,6 +184,10 @@ const LoginFacebook = ({
Company: e.target.value
})
}
onInvalid={(e) =>
e.target.setCustomValidity(t("input-required"))
}
onInput={(e) => e.target.setCustomValidity("")}
required
/>
</div>
@@ -185,14 +197,14 @@ const LoginFacebook = ({
onClick={() => handleSubmitbtn()}
className="btn btn-info mr-[10px]"
>
Sign up
{t("sign-up")}
</button>
<button
type="button"
className="btn btn-secondary w-[90px]"
onClick={() => setIsModal(false)}
>
Cancel
{t("cancel")}
</button>
</div>
</form>
+24 -44
View File
@@ -4,7 +4,8 @@ import { jwtDecode } from "jwt-decode";
import { useScript } from "../hook/useScript";
import ModalUi from "../primitives/ModalUi";
import Loader from "../primitives/Loader";
import { useTranslation } from "react-i18next";
import { saveLanguageInLocal } from "../constant/Utils";
/*
* `GoogleSignInBtn`as it's name indicates it render google sign in button
* and in this `useScript` in which we have created for generate google sign button
@@ -17,6 +18,7 @@ const GoogleSignInBtn = ({
thirdpartyLoader,
setThirdpartyLoader
}) => {
const { t, i18n } = useTranslation();
const [isModal, setIsModal] = useState(false);
const googleBtn = useRef();
const [userDetails, setUserDetails] = useState({
@@ -51,29 +53,18 @@ const GoogleSignInBtn = ({
let baseUrl = localStorage.getItem("baseUrl");
let appid = localStorage.getItem("parseAppId");
let applogo = localStorage.getItem("appLogo");
let domain = localStorage.getItem("domain");
let appversion = localStorage.getItem("appVersion");
let appTitle = localStorage.getItem("appTitle");
let defaultmenuid = localStorage.getItem("defaultmenuid");
let PageLanding = localStorage.getItem("PageLanding");
let _appName = localStorage.getItem("_appName");
let _app_objectId = localStorage.getItem("_app_objectId");
let appName = localStorage.getItem("appName");
let userSettings = localStorage.getItem("userSettings");
localStorage.clear();
saveLanguageInLocal(i18n);
localStorage.setItem("baseUrl", baseUrl);
localStorage.setItem("parseAppId", appid);
localStorage.setItem("appLogo", applogo);
localStorage.setItem("domain", domain);
localStorage.setItem("appversion", appversion);
localStorage.setItem("appTitle", appTitle);
localStorage.setItem("defaultmenuid", defaultmenuid);
localStorage.setItem("PageLanding", PageLanding);
localStorage.setItem("_appName", _appName);
localStorage.setItem("_app_objectId", _app_objectId);
localStorage.setItem("appName", appName);
localStorage.setItem("userSettings", userSettings);
localStorage.setItem("baseUrl", baseUrl);
localStorage.setItem("parseAppId", appid);
@@ -86,10 +77,7 @@ const GoogleSignInBtn = ({
const data = jwtDecode(response.credential);
// console.log("data ", data);
if (data.sub && data.email) {
const details = {
Email: data.email,
Name: data.name
};
const details = { Email: data.email, Name: data.name };
setUserDetails({ ...userDetails, ...details });
const Gdetails = {
Id: data.sub,
@@ -103,26 +91,18 @@ const GoogleSignInBtn = ({
}
};
const checkExtUser = async (details) => {
// const extUser = new Parse.Query("contracts_Users");
// extUser.equalTo("Email", details.Gmail);
// const extRes = await extUser.first();
const params = { email: details.Gmail };
const extRes = await Parse.Cloud.run("getUserDetails", params);
// console.log("extRes ", extRes);
if (extRes) {
const params = { ...details, Phone: extRes?.get("Phone") || "" };
// const params = { ...details, Phone: extRes?.get("Phone") || "" };
const params = { ...details, extUserId: extRes.objectId };
const payload = await Parse.Cloud.run("googlesign", params);
// console.log("payload ", payload);
if (payload && payload.sessiontoken) {
// setThirdpartyLoader(true);
// const billingDate =
// extRes.get("Next_billing_date") && extRes.get("Next_billing_date");
// console.log("billingDate expired", billingDate > new Date());
const LocalUserDetails = {
name: details.Name,
email: details.Gmail,
phone: extRes?.get("Phone") || "",
company: extRes.get("Company")
phone: payload?.phone || "",
company: payload.company
};
localStorage.setItem("userDetails", JSON.stringify(LocalUserDetails));
thirdpartyLoginfn(payload.sessiontoken);
@@ -174,10 +154,10 @@ const GoogleSignInBtn = ({
payload &&
payload.message.replace(/ /g, "_") === "Internal_server_err"
) {
alert("Internal server error !");
alert(t("server-error"));
}
} else {
alert("Please fill required details!");
alert(t("fill-required-details!"));
}
};
const handleCloseModal = () => {
@@ -186,22 +166,16 @@ const GoogleSignInBtn = ({
let appdata = localStorage.getItem("userSettings");
let applogo = localStorage.getItem("appLogo");
let appName = localStorage.getItem("appName");
let defaultmenuid = localStorage.getItem("defaultmenuid");
let PageLanding = localStorage.getItem("PageLanding");
let domain = localStorage.getItem("domain");
let _appName = localStorage.getItem("_appName");
let baseUrl = localStorage.getItem("baseUrl");
let appid = localStorage.getItem("parseAppId");
localStorage.clear();
saveLanguageInLocal(i18n);
localStorage.setItem("appLogo", applogo);
localStorage.setItem("appName", appName);
localStorage.setItem("_appName", _appName);
localStorage.setItem("defaultmenuid", defaultmenuid);
localStorage.setItem("PageLanding", PageLanding);
localStorage.setItem("domain", domain);
localStorage.setItem("userSettings", appdata);
localStorage.setItem("baseUrl", baseUrl);
localStorage.setItem("parseAppId", appid);
@@ -214,11 +188,11 @@ const GoogleSignInBtn = ({
</div>
)}
<div ref={googleBtn} className="text-sm"></div>
<ModalUi showClose={false} isOpen={isModal} title="Sign up form">
<ModalUi showClose={false} isOpen={isModal} title={t("sign-up-form")}>
<form className="px-4 py-3 text-base-content">
<div className="mb-3">
<label htmlFor="Phone" className="block text-xs font-semibold">
Phone <span className="text-[13px] text-[red]">*</span>
{t("phone")} <span className="text-[13px] text-[red]">*</span>
</label>
<input
type="tel"
@@ -231,12 +205,14 @@ const GoogleSignInBtn = ({
Phone: e.target.value
})
}
onInvalid={(e) => e.target.setCustomValidity(t("input-required"))}
onInput={(e) => e.target.setCustomValidity("")}
required
/>
</div>
<div className="mb-3">
<label htmlFor="Company" className="block text-xs font-semibold">
Company <span className="text-[13px] text-[red]">*</span>
{t("company")} <span className="text-[13px] text-[red]">*</span>
</label>
<input
type="text"
@@ -249,12 +225,14 @@ const GoogleSignInBtn = ({
Company: e.target.value
})
}
onInvalid={(e) => e.target.setCustomValidity(t("input-required"))}
onInput={(e) => e.target.setCustomValidity("")}
required
/>
</div>
<div className="mb-3">
<label htmlFor="JobTitle" className="block text-xs font-semibold">
Job Title <span className="text-[13px] text-[red]">*</span>
{t("job-title")} <span className="text-[13px] text-[red]">*</span>
</label>
<input
type="text"
@@ -267,6 +245,8 @@ const GoogleSignInBtn = ({
Destination: e.target.value
})
}
onInvalid={(e) => e.target.setCustomValidity(t("input-required"))}
onInput={(e) => e.target.setCustomValidity("")}
required
/>
</div>
@@ -276,14 +256,14 @@ const GoogleSignInBtn = ({
className="op-btn op-btn-primary"
onClick={() => handleSubmitbtn()}
>
Sign up
{t("sign-up")}
</button>
<button
type="button"
className="op-btn op-btn-ghost"
onClick={handleCloseModal}
>
Cancel
{t("cancel")}
</button>
</div>
</form>
@@ -1,9 +1,11 @@
import React from "react";
import { useNavigate } from "react-router-dom";
import { openInNewTab } from "../../constant/Utils";
import { useTranslation } from "react-i18next";
const DashboardButton = (props) => {
const navigate = useNavigate();
const { t } = useTranslation();
function openReport() {
if (props.Data && props.Data.Redirect_type) {
@@ -35,7 +37,9 @@ const DashboardButton = (props) => {
} text-[25px] lg:text-[30px]`}
></i>
</span>
<div className=" text-lg ml-3 text-base-content">{props.Label}</div>
<div className=" text-lg ml-3 text-base-content">
{t(`sidebar.${props.Label}`)}
</div>
</div>
</div>
);
@@ -4,9 +4,11 @@ import Parse from "parse";
import getReplacedHashQuery from "../../constant/getReplacedHashQuery";
import { useNavigate } from "react-router-dom";
import Tooltip from "../../primitives/Tooltip";
import { useTranslation } from "react-i18next";
const DashboardCard = (props) => {
const navigate = useNavigate();
const { t } = useTranslation();
const [parseBaseUrl] = useState(localStorage.getItem("baseUrl"));
const [parseAppId] = useState(localStorage.getItem("parseAppId"));
const [response, setresponse] = useState("");
@@ -23,17 +25,12 @@ const DashboardCard = (props) => {
sessionToken: localStorage.getItem("accesstoken")
};
let body = {};
let currentUser;
let currentUser1 = Parse.User.current();
currentUser = currentUser1.id;
let res;
if (localStorage.getItem("Extand_Class")) {
let data = JSON.parse(localStorage.getItem("Extand_Class"));
res = data[0];
} else {
res = await Parse.Cloud.run("getUserDetails", {
email: currentUser.get("email")
});
res = await Parse.Cloud.run("getUserDetails");
if (res) res = res.toJSON();
}
if (res) {
@@ -94,9 +91,7 @@ const DashboardCard = (props) => {
let data = JSON.parse(localStorage.getItem("Extand_Class"));
resr = data[0];
} else {
resr = await Parse.Cloud.run("getUserDetails", {
email: currentUser.get("email")
});
resr = await Parse.Cloud.run("getUserDetails");
if (resr) resr = resr.toJSON();
}
@@ -218,15 +213,12 @@ const DashboardCard = (props) => {
if (restr.includes("#")) {
try {
const currentUser = Parse.User.current();
let res;
if (localStorage.getItem("Extand_Class")) {
let data = JSON.parse(localStorage.getItem("Extand_Class"));
res = data[0];
} else {
let resr = await Parse.Cloud.run("getUserDetails", {
email: currentUser.get("email")
});
let resr = await Parse.Cloud.run("getUserDetails");
if (res) res = resr.toJSON();
}
@@ -321,6 +313,7 @@ const DashboardCard = (props) => {
}
}
}
return (
<div
onClick={() => openReport()}
@@ -338,8 +331,11 @@ const DashboardCard = (props) => {
} text-[25px] lg:text-[30px]`}
></i>
</span>
<div className="font-medium">
<div className="text-base lg:text-lg"> {props.Label}</div>
<div className="text-base lg:text-lg">
{t(`dashboard-card.${props.Label}`)}
</div>
<div className="text-2xl font-light">
{loading ? <div className="loader-01"></div> : setFormat(response)}
</div>
@@ -349,7 +345,8 @@ const DashboardCard = (props) => {
<Tooltip
id={props.Label}
iconColor={"white"}
message={props?.Data?.tourMessage}
message={t(`tour-mssg.${props.Label}`)}
// {props?.Data?.tourMessage}
/>
</div>
</div>
@@ -4,7 +4,9 @@ import ReportTable from "../../primitives/GetReportDisplay";
import reportJson from "../../json/ReportJson";
import axios from "axios";
import Loader from "../../primitives/Loader";
import { useTranslation } from "react-i18next";
function DashboardReport(props) {
const { t } = useTranslation();
// console.log("props ", props)
const [List, setList] = useState([]);
const [isLoader, setIsLoader] = useState(true);
@@ -141,7 +143,7 @@ function DashboardReport(props) {
) : (
<div className="flex items-center justify-center h-[100px] w-full bg-white rounded">
<div className="text-center">
<p className="text-xl text-black">Report Not Found</p>
<p className="text-xl text-black">{t("report-not-found")}</p>
</div>
</div>
)}
@@ -1,4 +1,5 @@
import React, { Suspense, lazy } from "react";
import { useTranslation } from "react-i18next";
const DashboardButton = lazy(() => import("./DashboardButton"));
const DashboardCard = lazy(() => import("./DashboardCard"));
const DashboardReport = lazy(() => import("./DashboardReport"));
@@ -10,13 +11,14 @@ const buttonList = [
icon: "fa-light fa-pen-nib"
},
{
label: "Request signature",
label: "Request signatures",
redirectId: "8mZzFxbG1z",
redirectType: "Form",
icon: "fa-light fa-paper-plane"
}
];
const GetDashboard = (props) => {
const { t } = useTranslation();
const Button = ({ label, redirectId, redirectType, icon }) => (
<DashboardButton
Icon={icon}
@@ -31,13 +33,13 @@ const GetDashboard = (props) => {
<div
className={`${
col?.widget?.bgColor ? col.widget.bgColor : "bg-[#2ed8b6]"
} op-card w-full h-[140px] px-3 pt-4 mb-3 shadow-md"`}
} op-card w-full h-[140px] px-3 pt-4 mb-3 shadow-md`}
data-tut={col.widget.data.tourSection}
>
<Suspense
fallback={
<div className="h-[150px] w-full flex justify-center items-center">
loading...
{t("loading")}
</div>
}
>
@@ -8,8 +8,10 @@ import Table from "react-bootstrap/Table";
import * as HoverCard from "@radix-ui/react-hover-card";
import ModalUi from "../../primitives/ModalUi";
import FolderModal from "../shared/fields/FolderModal";
import { useTranslation } from "react-i18next";
function DriveBody(props) {
const { t } = useTranslation();
const [rename, setRename] = useState("");
const [renameValue, setRenameValue] = useState("");
const inputRef = useRef(null);
@@ -42,7 +44,7 @@ function DriveBody(props) {
props.setFolderName((prev) => [...prev, folderData]);
props.setIsLoading({
isLoad: true,
message: "This might take some time"
message: t("loading-mssg")
});
props.setDocId(data.objectId);
props.setPdfData([]);
@@ -70,9 +72,9 @@ function DriveBody(props) {
props.sortingData(null, null, updatedData);
await axios
.put(
`${localStorage.getItem("baseUrl")}classes/${localStorage.getItem(
"_appName"
)}_Document/${docId}`,
`${localStorage.getItem(
"baseUrl"
)}classes/contracts_Document/${docId}`,
updateName,
{
headers: {
@@ -90,7 +92,7 @@ function DriveBody(props) {
console.log("Err ", err);
props.setIsAlert({
isShow: true,
alertMessage: "something went wrong"
alertMessage: t("something-went-wrong-mssg")
});
});
}
@@ -104,7 +106,7 @@ function DriveBody(props) {
const signedUrl = data.SignedUrl;
//checking if document has completed and request signature flow
if (data?.IsCompleted && signerExist?.length > 0) {
navigate(`/pdfRequestFiles/${data.objectId}`);
navigate(`/recipientSignPdf/${data.objectId}`);
}
//checking if document has completed and signyour-self flow
else if (!signerExist && !isPlaceholder) {
@@ -112,7 +114,7 @@ function DriveBody(props) {
}
//checking if document has declined by someone
else if (isDecline) {
navigate(`/pdfRequestFiles/${data.objectId}`);
navigate(`/recipientSignPdf/${data.objectId}`);
//checking draft type document
} else if (
signerExist?.length > 0 &&
@@ -122,8 +124,8 @@ function DriveBody(props) {
navigate(`/placeHolderSign/${data.objectId}`);
}
//Inprogress document
else if (isPlaceholder?.length > 0 && signerExist?.length > 0) {
navigate(`/pdfRequestFiles/${data.objectId}`);
else if (isPlaceholder?.length > 0 && signedUrl) {
navigate(`/recipientSignPdf/${data.objectId}`);
} //placeholder draft document
else if (
(signerExist?.length > 0 &&
@@ -170,9 +172,7 @@ function DriveBody(props) {
await axios
.put(
`${localStorage.getItem("baseUrl")}classes/${localStorage.getItem(
"_appName"
)}_Document/${docId}`,
`${localStorage.getItem("baseUrl")}classes/contracts_Document/${docId}`,
data,
{
headers: {
@@ -193,7 +193,7 @@ function DriveBody(props) {
console.log("Err ", err);
props.setIsAlert({
isShow: true,
alertMessage: "something went wrong"
alertMessage: t("something-went-wrong-mssg")
});
});
};
@@ -219,7 +219,7 @@ function DriveBody(props) {
updateData = {
Folder: {
__type: "Pointer",
className: `${localStorage.getItem("_appName")}_Document`,
className: "contracts_Document",
objectId: moveFolderId
}
};
@@ -231,9 +231,9 @@ function DriveBody(props) {
await axios
.put(
`${localStorage.getItem("baseUrl")}classes/${localStorage.getItem(
"_appName"
)}_Document/${updateDocId}`,
`${localStorage.getItem(
"baseUrl"
)}classes/contracts_Document/${updateDocId}`,
updateData,
{
headers: {
@@ -260,7 +260,7 @@ function DriveBody(props) {
setIsOpenMoveModal(false);
} else {
alert("folder already exist!");
alert(t("folder-already-exist!"));
setIsOpenMoveModal(false);
}
};
@@ -350,7 +350,7 @@ function DriveBody(props) {
</td>
<td>{createddate}</td>
<td>Pdf</td>
<td>{status}</td>
<td>{t(`drive-document-status.${status}`)}</td>
<td>
<i
onClick={(e) => {
@@ -505,7 +505,9 @@ function DriveBody(props) {
className="ContextMenuItem"
>
<i className={menu.icon}></i>
<span className="ml-[8px]">{menu.type}</span>
<span className="ml-[8px]">
{t(`context-menu.${menu.type}`)}
</span>
</ContextMenu.Item>
);
})}
@@ -516,18 +518,28 @@ function DriveBody(props) {
</HoverCard.Trigger>
<HoverCard.Portal>
<HoverCard.Content className="HoverCardContent" sideOffset={5}>
<strong className="text-[13px]">Title: </strong>
<strong className="text-[13px]">
{t("report-heading.Title")}:{" "}
</strong>
<span className="text-[12px] font-medium mb-0"> {data.Name}</span>
<br />
<strong className="text-[13px]">Status: </strong>
<span className="text-[12px] font-medium"> {status}</span>
<strong className="text-[13px]">
{t("report-heading.Status")}:{" "}
</strong>
<span className="text-[12px] font-medium">
{t(`drive-document-status.${status}`)}
</span>
<br />
<strong className="text-[13px]">Created Date: </strong>
<strong className="text-[13px]">
{t("report-heading.created-date")}:{" "}
</strong>
<span className="text-[12px] font-medium">{createddate}</span>
<br />
{signerExist && (
<>
<strong className="text-[13px]">Signers: </strong>
<strong className="text-[13px]">
{t("report-heading.Signers")}:{" "}
</strong>
{signersName()}
</>
)}
@@ -547,11 +559,11 @@ function DriveBody(props) {
<Table striped bordered hover>
<thead>
<tr>
<th>Name</th>
<th>Created Date</th>
<th>Type</th>
<th>Status</th>
<th>Action</th>
<th>{t("report-heading.Name")}</th>
<th>{t("report-heading.created-date")}</th>
<th>{t("report-heading.Type")}</th>
<th>{t("report-heading.Status")}</th>
<th>{t("action")}</th>
</tr>
</thead>
<tbody>
@@ -584,25 +596,25 @@ function DriveBody(props) {
)}
<ModalUi
isOpen={isDeleteDoc}
title={"Delete Document"}
title={t("delete-document")}
handleClose={() => setIsDeleteDoc(false)}
>
<div className="h-full p-[20px] text-base-content">
<p>Are you sure you want to delete this document?</p>
<p>{t("delete-document-alert")}</p>
<div className="h-[1px] w-full bg-[#9f9f9f] my-[15px]"></div>
<button
onClick={() => handleDeleteDocument(selectDoc)}
type="button"
className="op-btn op-btn-primary mr-2"
>
Yes
{t("yes")}
</button>
<button
onClick={() => setIsDeleteDoc(false)}
type="button"
className="op-btn op-btn-neutral"
>
No
{t("no")}
</button>
</div>
</ModalUi>
@@ -1,10 +1,12 @@
import React from "react";
import ModalUi from "../../primitives/ModalUi";
import { useTranslation } from "react-i18next";
const AddRoleModal = (props) => {
const { t } = useTranslation();
return (
<ModalUi
title={"Add Role"}
title={t("add-role")}
isOpen={props.isModalRole}
handleClose={props.handleCloseRoleModal}
>
@@ -21,19 +23,19 @@ const AddRoleModal = (props) => {
className="op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs mt-1"
/>
<p className="text-[gray] text-[11px] mt-[5px] mb-[10px] ml-[10px]">
e.g: Customer, Hr, Director, Manager, Student, etc...
{t("role-ex")}..
</p>
<div>
<div className="h-[1px] w-full bg-[#9f9f9f] mb-[10px]"></div>
<button type="submit" className="op-btn op-btn-primary">
Add
{t("add")}
</button>
<button
onClick={props.handleCloseRoleModal}
type="button"
className="op-btn op-btn-ghost ml-2"
>
Close
{t("close")}
</button>
</div>
</form>
@@ -1,16 +1,18 @@
import React from "react";
import { useTranslation } from "react-i18next";
function DefaultSignature({ defaultSignImg, xyPostion, setDefaultSignAlert }) {
const { t } = useTranslation();
const confirmToaddDefaultSign = () => {
if (xyPostion.length > 0) {
setDefaultSignAlert({
isShow: true,
alertMessage:
"Are you sure you want to auto sign at requested all locations?"
alertMessage: t("default-sign-alert")
});
} else {
setDefaultSignAlert({
isShow: true,
alertMessage: "please select position!"
alertMessage: t("please-select-position!")
});
}
};
@@ -18,10 +20,10 @@ function DefaultSignature({ defaultSignImg, xyPostion, setDefaultSignAlert }) {
return (
<div data-tut="reactourThird">
<div className="mx-2 pr-2 pt-2 pb-1 text-[15px] text-base-content font-semibold border-b-[1px] border-base-300">
Signature
{t("signature")}
</div>
<div className="flex flex-col items-center mt-[10px] font-semibold">
<p className="text-base-content">Your Signature</p>
<p className="text-base-content">{t("Your-Signature")}</p>
<div className="op-card shadow-md h-[111px] w-[90%] p-2">
<img
alt="signature"
@@ -34,7 +36,7 @@ function DefaultSignature({ defaultSignImg, xyPostion, setDefaultSignAlert }) {
className="op-btn op-btn-primary op-btn-sm mt-[10px]"
onClick={() => confirmToaddDefaultSign()}
>
Auto Sign All
{t("auto-sign-all")}
</button>
</div>
</div>
@@ -1,23 +1,21 @@
import React, { useEffect, useState } from "react";
import { useNavigate } from "react-router-dom";
import LoaderWithMsg from "../../primitives/LoaderWithMsg";
import { contractDocument } from "../../constant/Utils";
import HandleError from "../../primitives/HandleError";
import { useLocation, useNavigate } from "react-router-dom";
import { useTranslation } from "react-i18next";
function useQuery() {
return new URLSearchParams(useLocation().search);
}
function DraftDocument() {
const { t } = useTranslation();
const navigate = useNavigate();
const query = useQuery();
const docId = query.get("docId");
const [isLoading, setIsLoading] = useState({
isLoader: true,
message: "This might take some time"
message: t("loading-mssg")
});
const rowLevel =
localStorage.getItem("rowlevel") &&
JSON.parse(localStorage.getItem("rowlevel"));
const docId =
rowLevel && rowLevel?.id
? rowLevel.id
: rowLevel?.objectId && rowLevel.objectId;
useEffect(() => {
getDocumentDetails();
// eslint-disable-next-line react-hooks/exhaustive-deps
@@ -53,7 +51,7 @@ function DraftDocument() {
const signedUrl = data.SignedUrl;
//checking if document has completed and request signature flow
if (data?.IsCompleted && signerExist?.length > 0) {
navigate(`/pdfRequestFiles/${data.objectId}`);
navigate(`/recipientSignPdf/${data.objectId}`);
}
//checking if document has completed and signyour-self flow
else if (!signerExist && !isPlaceholder) {
@@ -61,7 +59,7 @@ function DraftDocument() {
}
//checking if document has declined by someone
else if (isDecline) {
navigate(`/pdfRequestFiles/${data.objectId}`);
navigate(`/recipientSignPdf/${data.objectId}`);
//checking draft type document
} else if (
signerExist?.length > 0 &&
@@ -71,8 +69,8 @@ function DraftDocument() {
navigate(`/placeHolderSign/${data.objectId}`);
}
//Inprogress document
else if (isPlaceholder?.length > 0 && signerExist?.length > 0) {
navigate(`/pdfRequestFiles/${data.objectId}`);
else if (isPlaceholder?.length > 0 && signedUrl) {
navigate(`/recipientSignPdf/${data.objectId}`);
} //placeholder draft document
else if (
(signerExist?.length > 0 &&
@@ -2,9 +2,10 @@ import React, { useEffect, useState } from "react";
import { isEnableSubscription } from "../../constant/const";
import ModalUi from "../../primitives/ModalUi";
import { radioButtonWidget } from "../../constant/Utils";
import PremiumAlertHeader from "../../primitives/PremiumAlertHeader";
import Upgrade from "../../primitives/Upgrade";
import { useTranslation } from "react-i18next";
function DropdownWidgetOption(props) {
const { t } = useTranslation();
const [dropdownOptionList, setDropdownOptionList] = useState([
"option-1",
"option-2"
@@ -156,9 +157,12 @@ function DropdownWidgetOption(props) {
>
<div>
<label className="text-[13px] font-semibold">
Name<span className="text-[red] text-[13px]"> *</span>
{t("name")}
<span className="text-[red] text-[13px]"> *</span>
</label>
<input
onInvalid={(e) => e.target.setCustomValidity(t("input-required"))}
onInput={(e) => e.target.setCustomValidity("")}
required
defaultValue={dropdownName}
value={dropdownName}
@@ -167,7 +171,7 @@ function DropdownWidgetOption(props) {
/>
<label className="text-[13px] font-semibold mt-[5px]">
Options
{t("options")}
</label>
<div className="flex flex-col">
{dropdownOptionList.map((option, index) => (
@@ -197,6 +201,10 @@ function DropdownWidgetOption(props) {
/>
)}
<input
onInvalid={(e) =>
e.target.setCustomValidity(t("input-required"))
}
onInput={(e) => e.target.setCustomValidity("")}
required
className="op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs"
type="text"
@@ -214,60 +222,70 @@ function DropdownWidgetOption(props) {
onClick={handleAddInput}
className="fa-light fa-square-plus text-[25px] ml-[10px] op-text-primary cursor-pointer"
></i>
<div>
{props.type === "checkbox" && !props.isSignYourself && (
<>
<label
className={`${
!props.isSubscribe ? "text-[gray]" : ""
} text-[13px] font-semibold`}
>
Minimun check
</label>
{!props.isSubscribe && isEnableSubscription && <Upgrade />}
<input
required
defaultValue={0}
value={minCount}
onChange={(e) => {
const count = handleSetMinMax(e);
setMinCount(count);
}}
className={`${
props.isSubscribe || !isEnableSubscription
? ""
: "pointer-events-none bg-opacity-50"
} op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs`}
/>
<label
className={`${
!props.isSubscribe ? "text-[gray]" : ""
} text-[13px] font-semibold`}
>
Maximum check
</label>
<input
required
defaultValue={0}
value={maxCount}
onChange={(e) => {
const count = handleSetMinMax(e);
setMaxCount(count);
}}
className={`${
props.isSubscribe || !isEnableSubscription
? ""
: "pointer-events-none bg-opacity-50"
} op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs`}
/>
</>
)}
</div>
{isEnableSubscription && (
<div>
{props.type === "checkbox" && !props.isSignYourself && (
<>
<label
className={`${
!props.isSubscribe ? "text-[gray]" : ""
} text-[13px] font-semibold`}
>
{t("minimun-check")}
</label>
{!props.isSubscribe && isEnableSubscription && (
<Upgrade />
)}
<input
onInvalid={(e) =>
e.target.setCustomValidity(t("input-required"))
}
onInput={(e) => e.target.setCustomValidity("")}
required
defaultValue={0}
value={minCount}
disabled={props.isSubscribe ? false : true}
onChange={(e) => {
const count = handleSetMinMax(e);
setMinCount(count);
}}
className={`${
props.isSubscribe ? "" : "pointer-events-none"
} op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs`}
/>
<label
className={`${
!props.isSubscribe ? "text-[gray]" : ""
} text-[13px] font-semibold`}
>
{t("maximum-check")}
</label>
<input
onInvalid={(e) =>
e.target.setCustomValidity(t("input-required"))
}
onInput={(e) => e.target.setCustomValidity("")}
required
defaultValue={0}
value={maxCount}
disabled={props.isSubscribe ? false : true}
onChange={(e) => {
const count = handleSetMinMax(e);
setMaxCount(count);
}}
className={`${
props.isSubscribe ? "" : "pointer-events-none"
} op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs`}
/>
</>
)}
</div>
)}
</div>
{["dropdown", radioButtonWidget].includes(props.type) && (
<>
<label className="text-[13px] font-semibold mt-[5px]">
Default value
{t("default-value")}
</label>
<select
onChange={(e) => setDefaultValue(e.target.value)}
@@ -277,7 +295,7 @@ function DropdownWidgetOption(props) {
placeholder="select default value"
>
<option value="" disabled hidden className="text-[13px]">
Select...
{t("select")}...
</option>
{dropdownOptionList.map((data, ind) => {
return (
@@ -324,7 +342,7 @@ function DropdownWidgetOption(props) {
onChange={(e) => setIsReadOnly(e.target.checked)}
/>
<label className="ml-1 mb-0" htmlFor="isreadonly">
Is read only
{t("read-only")}
</label>
</div>
)}
@@ -338,21 +356,12 @@ function DropdownWidgetOption(props) {
/>
<label className="ml-1 mb-0" htmlFor="ishidelabel">
Hide labels
{t("hide-labels")}
</label>
</div>
</div>
)}
</div>
{props.type === "checkbox" &&
!props.isSignYourself &&
!isEnableSubscription && (
<PremiumAlertHeader
message={
"Field validations are free in beta, this feature will incur a fee later."
}
/>
)}
<div
className={`${
props.type === "checkbox" && !props.isSignYourself
@@ -366,7 +375,7 @@ function DropdownWidgetOption(props) {
type="submit"
className="op-btn op-btn-primary"
>
Save
{t("save")}
</button>
{props.currWidgetsDetails?.options?.values?.length > 0 && (
<button
@@ -377,7 +386,7 @@ function DropdownWidgetOption(props) {
resetState();
}}
>
Cancel
{t("cancel")}
</button>
)}
</form>
@@ -1,11 +1,12 @@
import React, { useState, useEffect } from "react";
import { checkIsSubscribed, getFileName } from "../../constant/Utils";
import PremiumAlertHeader from "../../primitives/PremiumAlertHeader";
import Upgrade from "../../primitives/Upgrade";
import { isEnableSubscription } from "../../constant/const";
import { useTranslation } from "react-i18next";
// import SelectFolder from "../../premitives/SelectFolder";
const EditTemplate = ({ template, onSuccess }) => {
const { t } = useTranslation();
// const [folder, setFolder] = useState({ ObjectId: "", Name: "" });
const [formData, setFormData] = useState({
Name: template?.Name || "",
@@ -63,7 +64,7 @@ const EditTemplate = ({ template, onSuccess }) => {
<form onSubmit={handleSubmit}>
<div className="mb-[0.35rem]">
<label htmlFor="name" className="text-[13px]">
File
{t("report-heading.File")}
</label>
<div className="op-input op-input-bordered op-input-sm focus:outline-none py-2 font-semibold w-full text-xs">
{getFileName(template.URL)}
@@ -71,7 +72,7 @@ const EditTemplate = ({ template, onSuccess }) => {
</div>
<div className="mb-[0.35rem]">
<label htmlFor="name" className="text-[13px]">
Name
{t("name")}
<span className="text-[13px] text-[red]"> *</span>
</label>
<input
@@ -79,13 +80,15 @@ const EditTemplate = ({ template, onSuccess }) => {
name="Name"
value={formData.Name}
onChange={(e) => handleStrInput(e)}
onInvalid={(e) => e.target.setCustomValidity(t("input-required"))}
onInput={(e) => e.target.setCustomValidity("")}
required
className="op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs"
/>
</div>
<div className="mb-[0.35rem]">
<label htmlFor="Note" className="text-[13px]">
Note
{t("report-heading.Note")}
</label>
<input
type="text"
@@ -98,7 +101,7 @@ const EditTemplate = ({ template, onSuccess }) => {
</div>
<div className="mb-[0.35rem]">
<label htmlFor="Description" className="text-[13px]">
Description
{t("description")}
</label>
<input
type="text"
@@ -110,7 +113,7 @@ const EditTemplate = ({ template, onSuccess }) => {
/>
</div>
<div className="mb-[0.35rem]">
<label className="text-[13px]">Send In Order</label>
<label className="text-[13px]">{t("send-in-order")}</label>
<div className="flex items-center gap-[8px] ml-[8px] mb-[5px]">
<input
type="radio"
@@ -120,7 +123,7 @@ const EditTemplate = ({ template, onSuccess }) => {
checked={formData.SendinOrder === "true"}
onChange={handleStrInput}
/>
<div className="text-[12px]">Yes</div>
<div className="text-[12px]">{t("yes")}</div>
</div>
<div className="flex items-center gap-[8px] ml-[8px] mb-[5px]">
<input
@@ -131,46 +134,40 @@ const EditTemplate = ({ template, onSuccess }) => {
checked={formData.SendinOrder === "false"}
onChange={handleStrInput}
/>
<div className="text-[12px]">No</div>
<div className="text-[12px]">{t("no")}</div>
</div>
</div>
<div className="text-xs mt-2">
{!isEnableSubscription && (
<PremiumAlertHeader
message={
"Auto reminder is free in beta, this feature will incur a fee later."
{isEnableSubscription && (
<div className="text-xs mt-2">
<span
className={
isSubscribe ? "font-semibold" : "font-semibold text-gray-300"
}
/>
)}
<span
className={
isSubscribe || !isEnableSubscription
? "font-semibold"
: "font-semibold text-gray-300"
}
>
Auto reminder{" "}
{!isSubscribe && isEnableSubscription && <Upgrade />}
</span>
<label
className={`${
isSubscribe || !isEnableSubscription
? "cursor-pointer "
: "pointer-events-none opacity-50"
} relative block items-center mb-0`}
>
<input
checked={formData.AutomaticReminders}
onChange={handleAutoReminder}
type="checkbox"
className="op-toggle transition-all checked:[--tglbg:#3368ff] checked:bg-white mt-2"
/>
</label>
</div>
>
{t("auto-reminder")}
{" "}
{!isSubscribe && isEnableSubscription && <Upgrade />}
</span>
<label
className={`${
isSubscribe
? "cursor-pointer "
: "pointer-events-none opacity-50"
} relative block items-center mb-0`}
>
<input
checked={formData.AutomaticReminders}
onChange={handleAutoReminder}
type="checkbox"
className="op-toggle transition-all checked:[--tglbg:#3368ff] checked:bg-white mt-2"
/>
</label>
</div>
)}
{isSubscribe && formData?.AutomaticReminders === true && (
<div className="text-xs mt-2">
<label className="block">
Remind once in every (Days)
{t("remind-once")}
<span className="text-red-500 text-[13px]">*</span>
</label>
<input
@@ -179,13 +176,17 @@ const EditTemplate = ({ template, onSuccess }) => {
name="RemindOnceInEvery"
className="op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs"
onChange={handleStrInput}
onInvalid={(e) =>
e.target.setCustomValidity(t("input-required"))
}
onInput={(e) => e.target.setCustomValidity("")}
required
/>
</div>
)}
<div className="mt-[1rem] flex justify-start">
<button type="submit" className="op-btn op-btn-primary">
Submit
{t("submit")}
</button>
</div>
</form>
@@ -1,5 +1,5 @@
import React from "react";
import { Quill } from "react-quill";
import { Quill } from "react-quill-new";
// Custom Undo button icon component for Quill editor. You can import it directly
// from 'quill/assets/icons/undo.svg' but I found that a number of loaders do not
@@ -79,7 +79,6 @@ export const formats = [
"blockquote",
"background",
"list",
"bullet",
"indent",
"link",
"image",
+10 -9
View File
@@ -1,35 +1,36 @@
import React from "react";
import Tooltip from "../../primitives/Tooltip";
import ReactQuill from "react-quill";
import "react-quill/dist/quill.snow.css";
import ReactQuill from "react-quill-new";
import "../../styles/quill.css";
import EditorToolbar, { module1, formats } from "./EditorToolbar";
import { useTranslation } from "react-i18next";
export function EmailBody(props) {
const { t } = useTranslation();
return (
<form className="flex flex-col text-base-content text-lg font-normal">
<div className="m-2 md:m-10 p-3 md:p-10 shadow-md hover:shadow-lg border-[1px] border-indigo-800 rounded-md">
<label className="text-sm ml-2">
Subject <Tooltip message={"email subject"} />
{t("subject")} <Tooltip message={t("email-subject")} />
</label>
<input
required
onInvalid={(e) => e.target.setCustomValidity(t("input-required"))}
onInput={(e) => e.target.setCustomValidity("")}
value={props.requestSubject}
onChange={(e) => props.setRequestSubject(e.target.value)}
placeholder='${senderName} has requested you to sign "${documentName}"'
className="op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs"
/>
<label className="text-sm ml-2 mt-3">
Body <Tooltip message={"email body"} />
{t("body")} <Tooltip message={t("email-body")} />
</label>
<div className="px-3 py-2 w-full focus:outline-none text-xs">
<div className="px-1 py-2 w-full focus:outline-none text-xs">
<EditorToolbar containerId="toolbar1" />
<ReactQuill
theme="snow"
value={props.requestBody}
// value={typedText}
placeholder="add body of email "
// readOnly={loading}
// onChangeSelection={handleTextSelection} // Listen for text selection
placeholder={t("email-placeholder")}
ref={props.editorRef}
modules={module1}
formats={formats}
@@ -1,30 +1,33 @@
import React, { useState } from "react";
import { saveAs } from "file-saver";
import axios from "axios";
import { getBase64FromUrl } from "../../constant/Utils";
import { themeColor } from "../../constant/const";
import printModule from "print-js";
import { handleDownloadPdf, handleToPrint } from "../../constant/Utils";
import { themeColor, emailRegex } from "../../constant/const";
import Loader from "../../primitives/Loader";
import ModalUi from "../../primitives/ModalUi";
import { useTranslation } from "react-i18next";
function EmailComponent({
isEmail,
pdfUrl,
setIsEmail,
setSuccessEmail,
pdfName,
pdfDetails,
sender,
setIsAlert,
extUserId,
activeMailAdapter
}) {
const { t } = useTranslation();
const [emailList, setEmailList] = useState([]);
const [emailValue, setEmailValue] = useState();
const [emailValue, setEmailValue] = useState("");
const [isLoading, setIsLoading] = useState(false);
const [emailErr, setEmailErr] = useState(false);
const [isDownloading, setIsDownloading] = useState("");
const isAndroid = /Android/i.test(navigator.userAgent);
//function for send email
const sendEmail = async () => {
const pdfName = pdfDetails[0]?.Name;
setIsLoading(true);
let sendMail;
for (let i = 0; i < emailList.length; i++) {
try {
@@ -67,7 +70,7 @@ function EmailComponent({
setIsEmail(false);
setIsAlert({
isShow: true,
alertMessage: "something went wrong"
alertMessage: t("something-went-wrong-mssg")
});
}
}
@@ -87,7 +90,7 @@ function EmailComponent({
setIsEmail(false);
setIsAlert({
isShow: true,
alertMessage: "something went wrong"
alertMessage: t("something-went-wrong-mssg")
});
setEmailValue("");
setEmailList([]);
@@ -96,7 +99,7 @@ function EmailComponent({
setIsEmail(false);
setIsAlert({
isShow: true,
alertMessage: "something went wrong"
alertMessage: t("something-went-wrong-mssg")
});
setEmailValue("");
setEmailList([]);
@@ -110,57 +113,33 @@ function EmailComponent({
};
//function for get email value
const handleEmailValue = (e) => {
const value = e.target.value;
const value = e.target.value?.toLowerCase()?.replace(/\s/g, "");
setEmailErr(false);
setEmailValue(value);
};
//function for save email in array after press enter
const handleEnterPress = (e) => {
const pattern = emailRegex;
const validate = emailValue?.match(pattern);
if (e.key === "Enter" && emailValue) {
setEmailList((prev) => [...prev, emailValue]);
setEmailValue("");
if (validate) {
const emailLowerCase = emailValue?.toLowerCase();
setEmailList((prev) => [...prev, emailLowerCase]);
setEmailValue("");
} else {
setEmailErr(true);
}
} else if (e === "add" && emailValue) {
setEmailList((prev) => [...prev, emailValue]);
setEmailValue("");
if (validate) {
const emailLowerCase = emailValue?.toLowerCase();
setEmailList((prev) => [...prev, emailLowerCase]);
setEmailValue("");
} else {
setEmailErr(true);
}
}
};
// function for print signed pdf
const handleToPrint = async (event) => {
event.preventDefault();
const pdf = await getBase64FromUrl(pdfUrl);
const isAndroidDevice = navigator.userAgent.match(/Android/i);
const isAppleDevice =
(/iPad|iPhone|iPod/.test(navigator.platform) ||
(navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1)) &&
!window.MSStream;
if (isAndroidDevice || isAppleDevice) {
const byteArray = Uint8Array.from(
atob(pdf)
.split("")
.map((char) => char.charCodeAt(0))
);
const blob = new Blob([byteArray], { type: "application/pdf" });
const blobUrl = URL.createObjectURL(blob);
window.open(blobUrl, "_blank");
} else {
printModule({ printable: pdf, type: "pdf", base64: true });
}
};
//handle download signed pdf
const handleDownloadPdf = () => {
saveAs(pdfUrl, `${sanitizeFileName(pdfName)}_signed_by_OpenSign™.pdf`);
};
const sanitizeFileName = (pdfName) => {
// Replace spaces with underscore
return pdfName.replace(/ /g, "_");
};
const isAndroid = /Android/i.test(navigator.userAgent);
return (
<div>
{/* isEmail */}
@@ -170,114 +149,117 @@ function EmailComponent({
<div className="absolute w-full h-full flex flex-col justify-center items-center z-[20] bg-[#e6f2f2]/70">
<Loader />
<span className="text-[12px] text-base-content">
This might take some time
{t("loader")}
</span>
</div>
)}
{isDownloading === "pdf" && (
<div className="fixed z-[200] inset-0 flex justify-center items-center bg-black bg-opacity-30">
<Loader />
</div>
)}
<div className="flex justify-between items-center py-[10px] px-[20px] border-b-[1px] border-base-content">
<span className="text-base-content font-semibold">
Successfully signed!
{t("successfully-signed")}
</span>
<div className="flex flex-row">
<div></div>
{!isAndroid && (
<button
onClick={handleToPrint}
onClick={(e) => handleToPrint(e, pdfUrl, setIsDownloading)}
className="op-btn op-btn-neutral op-btn-sm text-[15px]"
>
<i className="fa-light fa-print" aria-hidden="true"></i>
Print
{t("print")}
</button>
)}
<button
className="op-btn op-btn-primary op-btn-sm text-[15px] ml-2"
onClick={() => handleDownloadPdf()}
onClick={() =>
handleDownloadPdf(pdfDetails, pdfUrl, setIsDownloading)
}
>
<i className="fa-light fa-download" aria-hidden="true"></i>
Download
{t("download")}
</button>
</div>
</div>
<div className="h-full p-[20px]">
<p className="font-medium text-[15px] mb-[5px] text-base-content align-baseline">
Recipients added here will get a copy of the signed document.
{t("email-mssg")}
</p>
{emailList.length > 0 ? (
<>
<div className="p-0 border-[1.5px] op-border-primary rounded w-full text-[15px]">
<div className="flex flex-row flex-wrap">
{emailList.map((data, ind) => {
return (
<div
className="flex flex-row items-center op-bg-primary m-[4px] rounded-md py-[5px] px-[10px]"
key={ind}
<div className="p-0 border-[1.5px] op-border-primary rounded w-full text-[15px]">
<div className="flex flex-row flex-wrap">
{emailList.map((data, ind) => {
return (
<div
className="flex flex-row items-center op-bg-primary m-[4px] rounded-md py-[5px] px-[10px]"
key={ind}
>
<span className="text-base-100 text-[13px]">
{data}
</span>
<span
className="text-base-100 text-[13px] font-semibold ml-[7px] cursor-pointer"
onClick={() => removeChip(ind)}
>
<span className="text-base-100 text-[13px]">
{data}
</span>
<span
className="text-base-100 text-[13px] font-semibold ml-[7px] cursor-pointer"
onClick={() => removeChip(ind)}
>
<i className="fa-light fa-xmark"></i>
</span>
</div>
);
})}
</div>
{emailList.length <= 9 && (
<input
type="text"
value={emailValue}
className="p-[10px] pb-[20px] rounded w-full text-[15px] bg-transparent outline-none"
onChange={handleEmailValue}
onKeyDown={handleEnterPress}
onBlur={() => {
if (emailValue) {
handleEnterPress("add");
}
}}
required
/>
)}
<i className="fa-light fa-xmark"></i>
</span>
</div>
);
})}
</div>
</>
{emailList.length <= 9 && (
<input
type="email"
value={emailValue}
className="p-[10px] pb-[20px] rounded w-full text-[15px] bg-transparent outline-none"
onChange={handleEmailValue}
onKeyDown={handleEnterPress}
onBlur={() => emailValue && handleEnterPress("add")}
onInvalid={(e) =>
e.target.setCustomValidity(t("input-required"))
}
onInput={(e) => e.target.setCustomValidity("")}
required
/>
)}
</div>
) : (
<div>
<input
type="text"
type="email"
value={emailValue}
className="p-[10px] pb-[20px] rounded w-full text-[15px] outline-none bg-transparent border-[1.5px] op-border-primary"
onChange={handleEmailValue}
onKeyDown={handleEnterPress}
placeholder="Add the email addresses"
onBlur={() => {
if (emailValue) {
handleEnterPress("add");
}
}}
placeholder={t("enter-email-plaholder")}
onBlur={() => emailValue && handleEnterPress("add")}
onInvalid={(e) =>
e.target.setCustomValidity(t("input-required"))
}
onInput={(e) => e.target.setCustomValidity("")}
required
/>
</div>
)}
{emailErr && (
<p className="text-xs text-[red] ml-1.5 mt-0.5">
{t("email-error-1")}
</p>
)}
<button
className={`${
emailValue ? "cursor-pointer" : "cursor-default"
} op-btn op-btn-primary op-btn-sm m-2 shadow-md`}
onClick={() => {
if (emailValue) {
handleEnterPress("add");
}
}}
onClick={() => emailValue && handleEnterPress("add")}
>
<i className="fa-light fa-plus" aria-hidden="true"></i>
</button>
<div className="bg-[#e3e2e1] mt-[10px] p-[5px] rounded">
<span className="font-bold">Note: </span>
<span className="text-[15px]">
You can only send to ten recipients at a time.
</span>
<span className="font-bold">{t("report-heading.Note")}: </span>
<span className="text-[15px]">{t("email-error-2")}</span>
</div>
<hr className="w-full my-[15px] bg-base-content" />
<button
@@ -285,7 +267,7 @@ function EmailComponent({
className="op-btn op-btn-secondary"
onClick={() => emailList.length > 0 && sendEmail()}
>
Send
{t("send")}
</button>
<button
type="button"
@@ -296,7 +278,7 @@ function EmailComponent({
setEmailList([]);
}}
>
Close
{t("close")}
</button>
</div>
</ModalUi>
+75 -92
View File
@@ -7,9 +7,9 @@ import {
} from "../../constant/Utils";
import "../../styles/signature.css";
import * as DropdownMenu from "@radix-ui/react-dropdown-menu";
import { useNavigate } from "react-router-dom";
import ModalUi from "../../primitives/ModalUi";
import Loader from "../../primitives/Loader";
import { useTranslation } from "react-i18next";
function Header({
isPdfRequestFiles,
@@ -33,21 +33,19 @@ function Header({
isSignYourself,
setIsEmail,
completeBtnTitle,
setIsEditTemplate
setIsEditTemplate,
isPublicTemplate
}) {
const { t } = useTranslation();
const filterPrefill =
signerPos && signerPos?.filter((data) => data.Role !== "prefill");
const isMobile = window.innerWidth < 767;
const navigate = useNavigate();
const [isDownloading, setIsDownloading] = useState("");
const isGuestSigner = localStorage.getItem("isGuestSigner");
//function for show decline alert
const handleDeclinePdfAlert = async () => {
const currentDecline = {
currnt: "Sure",
isDeclined: true
};
const currentDecline = { currnt: "Sure", isDeclined: true };
setIsDecline(currentDecline);
};
@@ -64,7 +62,7 @@ function Header({
}}
>
<div className="flex justify-between items-center py-[5px] px-[10px] ">
<div onClick={() => navigate(-1)}>
<div onClick={() => window.history.go(-2)}>
<i
className="fa-light fa-arrow-left text-base-content"
aria-hidden="true"
@@ -101,7 +99,7 @@ function Header({
className="fa-light fa-arrow-down mr-[3px]"
aria-hidden="true"
></i>
Download
{t("download")}
</div>
</DropdownMenu.Item>
{isCompleted && (
@@ -119,7 +117,7 @@ function Header({
className="fa-light fa-award mr-[3px]"
aria-hidden="true"
></i>
Certificate
{t("certificate")}
</div>
</DropdownMenu.Item>
)}
@@ -133,7 +131,7 @@ function Header({
className="fa-light fa-envelope mr-[3px]"
aria-hidden="true"
></i>
Mail
{t("mail")}
</div>
</DropdownMenu.Item>
)}
@@ -148,7 +146,7 @@ function Header({
className="fa-light fa-print mr-[3px]"
aria-hidden="true"
></i>
Print
{t("print")}
</div>
</DropdownMenu.Item>
</DropdownMenu.Content>
@@ -166,7 +164,7 @@ function Header({
onClick={() => handleDeclinePdfAlert()}
className="text-[red] border-none font-[650] text-[14px] mr-2"
>
Decline
{t("decline")}
</div>
)}
{isPlaceholder ? (
@@ -181,7 +179,7 @@ function Header({
} op-link no-underline font-[650] text-[14px]`}
data-tut="headerArea"
>
{completeBtnTitle ? completeBtnTitle : "Send"}
{completeBtnTitle ? completeBtnTitle : t("send")}
</div>
) : (
<div
@@ -195,7 +193,7 @@ function Header({
}}
className="border-none font-[650] text-[14px] op-link op-link-primary no-underline"
>
Finish
{t("finish")}
</div>
)}
<DropdownMenu.Root>
@@ -209,7 +207,7 @@ function Header({
</DropdownMenu.Trigger>
<DropdownMenu.Portal>
<DropdownMenu.Content
className="bg-white shadow-md rounded px-2 py-1"
className="bg-white shadow-md rounded-full px-3 py-2"
sideOffset={5}
>
<DropdownMenu.Item
@@ -226,7 +224,7 @@ function Header({
className="fa-light fa-arrow-down mr-[3px]"
aria-hidden="true"
></i>
<span className="font-[500]">Download</span>
<span className="font-[500]">{t("download")}</span>
</DropdownMenu.Item>
</DropdownMenu.Content>
</DropdownMenu.Portal>
@@ -253,13 +251,14 @@ function Header({
<div>
{filterPrefill.length === 0 ? (
<span className="text-[13px] text-[#f5405e]">
Add {signersdata.length - filterPrefill.length}{" "}
recipients signature
{t("add")} {signersdata.length - filterPrefill.length}{" "}
{t("recipients")} {t("widgets-name.signature")}
</span>
) : (
<span className="text-[13px] text-[#f5405e]">
Add {signersdata.length - filterPrefill.length} more
recipients signature
{t("add")} {signersdata.length - filterPrefill.length}{" "}
{t("more")}
{t("recipients")} {t("widgets-name.signature")}
</span>
)}
</div>
@@ -275,11 +274,11 @@ function Header({
</button>
)}
<button
onClick={() => navigate(-1)}
onClick={() => window.history.go(-2)}
type="button"
className="op-btn op-btn-ghost op-btn-sm mr-[3px]"
>
Back
{t("back")}
</button>
<button
disabled={isMailSend && true}
@@ -290,14 +289,25 @@ function Header({
{completeBtnTitle
? completeBtnTitle
: isMailSend
? "Sent"
: "Send"}
? t("sent")
: t("send")}
</button>
</div>
</>
) : isPdfRequestFiles ? (
alreadySign ? (
<div className="flex flex-row">
<button
onClick={(e) => handleToPrint(e, pdfUrl, setIsDownloading)}
type="button"
className="op-btn op-btn-neutral op-btn-sm mr-[3px] shadow"
>
<i
className="fa-light fa-print py-[3px]"
aria-hidden="true"
></i>
<span className="hidden lg:block">{t("print")}</span>
</button>
{isCompleted && (
<button
type="button"
@@ -310,22 +320,9 @@ function Header({
className="fa-light fa-award py-[3px]"
aria-hidden="true"
></i>
<span className="hidden lg:block">Certificate</span>
<span className="hidden lg:block">{t("certificate")}</span>
</button>
)}
<button
onClick={(e) => handleToPrint(e, pdfUrl, setIsDownloading)}
type="button"
className="op-btn op-btn-neutral op-btn-sm mr-[3px] shadow"
>
<i
className="fa-light fa-print py-[3px]"
aria-hidden="true"
></i>
<span className="hidden lg:block">Print</span>
</button>
<button
type="button"
className="op-btn op-btn-primary op-btn-sm mr-[3px] shadow"
@@ -337,17 +334,17 @@ function Header({
className="fa-light fa-download py-[3px]"
aria-hidden="true"
></i>
<span className="hidden lg:block">Download</span>
<span className="hidden lg:block">{t("download")}</span>
</button>
</div>
) : (
<div className="flex" data-tut="reactourFifth">
<button
onClick={() => navigate(-1)}
onClick={() => window.history.go(-2)}
type="button"
className="op-btn op-btn-ghost op-btn-sm mr-[3px]"
>
Back
{t("back")}
</button>
{currentSigner && (
<>
@@ -355,49 +352,25 @@ function Header({
className="op-btn op-btn-secondary op-btn-sm mr-[3px] shadow"
onClick={() => handleDeclinePdfAlert()}
>
Decline
{t("decline")}
</button>
<button
type="button"
className="op-btn op-btn-primary op-btn-sm mr-[3px] shadow"
onClick={() => embedWidgetsData()}
>
Finish
{t("finish")}
</button>
<button
type="button"
className="op-btn op-btn-neutral op-btn-sm mr-[3px] shadow"
onClick={() =>
handleDownloadPdf(pdfDetails, pdfUrl, setIsDownloading)
}
>
<i className="fa-light fa-arrow-down font-semibold lg:hidden"></i>
<span className="hidden lg:block">{t("download")}</span>
</button>
<div className="op-dropdown op-dropdown-end">
<div
tabIndex={0}
role="button"
className="op-btn op-btn-info op-btn-sm shadow"
>
<i
className="fa-light fa-ellipsis-v"
aria-hidden="true"
></i>
</div>
<ul
tabIndex={0}
className="op-dropdown-content z-[1] op-menu op-menu-sm p-1 shadow bg-base-100 rounded-box mt-1"
>
<li
onClick={() =>
handleDownloadPdf(
pdfDetails,
pdfUrl,
setIsDownloading
)
}
>
<span className="font-semibold text-[12px]">
<i
className="fa-light fa-arrow-down"
aria-hidden="true"
></i>{" "}
Download
</span>
</li>
</ul>
</div>
</>
)}
</div>
@@ -413,7 +386,9 @@ function Header({
className="op-btn op-btn-secondary op-btn-sm gap-0 font-medium text-[12px] mr-[3px] shadow"
>
<i className="fa-light fa-award" aria-hidden="true"></i>
<span className="hidden lg:block ml-1">Certificate</span>
<span className="hidden lg:block ml-1">
{t("certificate")}
</span>
</button>
)}
<button
@@ -422,7 +397,7 @@ function Header({
className="op-btn op-btn-neutral op-btn-sm gap-0 font-medium text-[12px] mr-[3px] shadow"
>
<i className="fa-light fa-print" aria-hidden="true"></i>
<span className="hidden lg:block ml-1">Print</span>
<span className="hidden lg:block ml-1">{t("print")}</span>
</button>
<button
type="button"
@@ -432,7 +407,7 @@ function Header({
}
>
<i className="fa-light fa-download" aria-hidden="true"></i>
<span className="hidden lg:block ml-1">Download</span>
<span className="hidden lg:block ml-1">{t("download")}</span>
</button>
<button
type="button"
@@ -440,17 +415,29 @@ function Header({
onClick={() => setIsEmail(true)}
>
<i className="fa-light fa-envelope" aria-hidden="true"></i>
<span className="hidden lg:block ml-1">Mail</span>
<span className="hidden lg:block ml-1">{t("mail")}</span>
</button>
</div>
) : isPublicTemplate ? (
<div className="flex">
<button
type="button"
className="op-btn op-btn-primary op-btn-sm shadow"
onClick={() => {
embedWidgetsData();
}}
>
{t("sign-now")}
</button>
</div>
) : (
<div className="flex">
<button
onClick={() => navigate(-1)}
onClick={() => window.history.go(-2)}
type="button"
className="op-btn op-btn-ghost op-btn-sm mr-[3px]"
>
Back
{t("back")}
</button>
<button
type="button"
@@ -461,7 +448,7 @@ function Header({
}
}}
>
Finish
{t("finish")}
</button>
</div>
)}
@@ -476,18 +463,14 @@ function Header({
isOpen={isDownloading === "certificate"}
title={
isDownloading === "certificate"
? "Generating certificate"
: "PDF Download"
? t("generating-certificate")
: t("pdf-download")
}
handleClose={() => setIsDownloading("")}
>
<div className="p-3 md:p-5 text-[13px] md:text-base text-center text-base-content">
{isDownloading === "certificate"}{" "}
<p>
Your completion certificate is being generated. Please wait
momentarily. If the download doesn&apos;t start shortly, click the
button again.
</p>
<p>{t("generate-certificate-alert")}</p>
</div>
</ModalUi>
</div>
+5 -3
View File
@@ -1,6 +1,8 @@
import React from "react";
import { useTranslation } from "react-i18next";
function PdfZoom(props) {
const { t } = useTranslation();
const onClickZoomIn = () => {
props.setScale(props.scale + 0.1 * props.scale);
props.setZoomPercent(props.zoomPercent + 10);
@@ -25,14 +27,14 @@ function PdfZoom(props) {
<span
className="bg-gray-50 px-[4px] 2xl:px-[15px] 2xl:py-[10px] cursor-pointer"
onClick={onClickZoomIn}
title="Zoom in"
title={t("zoom-in")}
>
<i className="fa-light fa-magnifying-glass-plus text-gray-500 2xl:text-[30px]"></i>
</span>
<span
className="bg-gray-50 px-[4px] 2xl:px-[15px] 2xl:py-[10px] cursor-pointer"
onClick={handleReset}
title="Reset"
title={t("reset")}
>
<i className="fa-light fa-magnifying-glass-arrows-rotate text-gray-500 2xl:text-[30px]"></i>
</span>
@@ -42,7 +44,7 @@ function PdfZoom(props) {
style={{
cursor: props.zoomPercent > 0 ? "pointer" : "default"
}}
title="Zoom out"
title={t("zoom-out")}
>
<i className="fa-light fa-magnifying-glass-minus text-gray-500 2xl:text-[30px]"></i>
</span>
+116 -39
View File
@@ -4,6 +4,7 @@ import PlaceholderBorder from "./PlaceholderBorder";
import { Rnd } from "react-rnd";
import {
defaultWidthHeight,
getContainerScale,
handleCopyNextToWidget,
isTabAndMobile,
onChangeInput,
@@ -234,25 +235,29 @@ function Placeholder(props) {
setDraggingEnabled(false);
}
if ((props.isNeedSign || props.isSignYourself) && !props.isDragging) {
if (props.pos.type) {
if (
props.pos.type === "signature" ||
props.pos.type === "stamp" ||
props.pos.type === "image"
) {
props.setIsSignPad(true);
props.setSignKey(props.pos.key);
props.setIsStamp(props.pos.isStamp);
} else if (props.pos.type === "initials") {
props.setIsSignPad(true);
props.setSignKey(props.pos.key);
props.setIsStamp(props.pos.isStamp);
props.setIsInitial(true);
}
if (props?.ispublicTemplate) {
props.handleUserDetails();
} else {
props.setIsSignPad(true);
props.setSignKey(props.pos.key);
props.setIsStamp(props.pos?.isStamp ? props.pos.isStamp : false);
if (props.pos.type) {
if (
props.pos.type === "signature" ||
props.pos.type === "stamp" ||
props.pos.type === "image"
) {
props.setIsSignPad(true);
props.setSignKey(props.pos.key);
props.setIsStamp(props.pos.isStamp);
} else if (props.pos.type === "initials") {
props.setIsSignPad(true);
props.setSignKey(props.pos.key);
props.setIsStamp(props.pos.isStamp);
props.setIsInitial(true);
}
} else {
props.setIsSignPad(true);
props.setSignKey(props.pos.key);
props.setIsStamp(props.pos?.isStamp ? props.pos.isStamp : false);
}
}
} else if (
props.isPlaceholder &&
@@ -262,6 +267,10 @@ function Placeholder(props) {
if (props.pos.key === props.selectWidgetId) {
props.handleLinkUser(props.data.Id);
props.setUniqueId(props.data.Id);
const checkIndex = props.xyPostion.findIndex(
(data) => data.Id === props.data.Id
);
props.setIsSelectId(checkIndex || 0);
}
} else if (!props.pos.type) {
if (
@@ -291,6 +300,12 @@ function Placeholder(props) {
}
if (props.isNeedSign && props.data?.signerObjId === props.signerObjId) {
handleWidgetIdandPopup();
} else if (
props?.isNeedSign &&
props?.uniqueId &&
props.data?.Id === props?.uniqueId
) {
handleWidgetIdandPopup();
} else if (props.isPlaceholder || props.isSignYourself) {
handleWidgetIdandPopup();
}
@@ -303,7 +318,9 @@ function Placeholder(props) {
props?.setShowDropdown(true);
} else if (props.pos.type === "checkbox") {
props?.setIsCheckbox(true);
} else if (
}
//condition to handle setting icon for signyour-self flow for all type text widgets
else if (
[
textInputWidget,
textWidget,
@@ -311,19 +328,33 @@ function Placeholder(props) {
"company",
"job title",
"email"
].includes(props.pos.type)
].includes(props.pos.type) &&
props.isSignYourself
) {
props.handleTextSettingModal(true);
} else {
props?.handleNameModal && props?.handleNameModal(true);
}
//condition for only placeholder and template flow
if (props.data && props?.pos?.type !== textWidget) {
props.setSignerObjId(props?.data?.signerObjId);
props.setUniqueId(props?.data?.Id);
} else if (props.data && props.pos.type === textWidget) {
const checkIndex = props.xyPostion.findIndex(
(data) => data.Id === props.data.Id
);
props.setIsSelectId(checkIndex || 0);
}
//condition to handle in placeholder and template flow for text widget signerId for text widgets i have to set uniqueId in tempSignerId because
//it does not have any signer user and any signerobjId
else if (props.data && props.pos.type === textWidget) {
props.setTempSignerId(props.uniqueId);
props.setUniqueId(props?.data?.Id);
const checkIndex = props.xyPostion.findIndex(
(data) => data.Id === props.data.Id
);
props.setIsSelectId(checkIndex || 0);
}
props.setSignKey(props.pos.key);
props.setWidgetType(props.pos.type);
@@ -340,10 +371,19 @@ function Placeholder(props) {
if (props.data && props?.pos?.type !== textWidget) {
props.setSignerObjId(props?.data?.signerObjId);
props.setUniqueId(props?.data?.Id);
const checkIndex = props.xyPostion.findIndex(
(data) => data.Id === props.data.Id
);
props.setIsSelectId(checkIndex || 0);
} else if (props.data && props.pos.type === textWidget) {
props.setTempSignerId(props.uniqueId);
props.setSignerObjId(props?.data?.signerObjId);
props.setUniqueId(props?.data?.Id);
const checkIndex = props.xyPostion.findIndex(
(data) => data.Id === props.data.Id
);
props.setIsSelectId(checkIndex || 0);
}
//checking widget's type and open widget copy modal for required widgets
@@ -400,6 +440,9 @@ function Placeholder(props) {
<>
{(props.isPlaceholder || props.isSignYourself) && (
<>
{/* condition to add setting icon for signyour-self flow for particular text widgets
and also it have diffrent position
*/}
{[
"checkbox",
textInputWidget,
@@ -426,6 +469,7 @@ function Placeholder(props) {
}}
></i>
) : (
/* condition to add setting icon for placeholder & template flow for all widgets except signature and date */
((!props?.pos?.type && props.pos.isStamp) ||
(props?.pos?.type &&
!["date", "signature"].includes(props.pos.type) &&
@@ -448,7 +492,7 @@ function Placeholder(props) {
></i>
)
)}
{/* condition for usericon for all widgets except text widgets and signyour-self flow */}
{props.pos.type !== textWidget && !props.isSignYourself && (
<i
data-tut="assignSigner"
@@ -457,17 +501,26 @@ function Placeholder(props) {
e.stopPropagation();
props.handleLinkUser(props.data.Id);
props.setUniqueId(props.data.Id);
const checkIndex = props.xyPostion.findIndex(
(data) => data.Id === props.data.Id
);
props.setIsSelectId(checkIndex || 0);
}}
onTouchEnd={(e) => {
e.stopPropagation();
props.handleLinkUser(props.data.Id);
props.setUniqueId(props.data.Id);
const checkIndex = props.xyPostion.findIndex(
(data) => data.Id === props.data.Id
);
props.setIsSelectId(checkIndex || 0);
}}
style={{ color: "#188ae2", right: "32px", top: "-18px" }}
></i>
)}
</>
)}
{/* setting icon only for date widgets */}
{props.pos.type === "date" && selectDate && (
<div
id="menu-container"
@@ -483,6 +536,10 @@ function Placeholder(props) {
if (props.data) {
props.setSignKey(props.pos.key);
props.setUniqueId(props.data.Id);
const checkIndex = props.xyPostion.findIndex(
(data) => data.Id === props.data.Id
);
props.setIsSelectId(checkIndex || 0);
}
}}
onTouchEnd={(e) => {
@@ -491,6 +548,10 @@ function Placeholder(props) {
if (props.data) {
props.setSignKey(props.pos.key);
props.setUniqueId(props.data.Id);
const checkIndex = props.xyPostion.findIndex(
(data) => data.Id === props.data.Id
);
props.setIsSelectId(checkIndex || 0);
}
}}
>
@@ -532,29 +593,37 @@ function Placeholder(props) {
</div>
</div>
)}
{/* copy icon for all widgets */}
<i
className="fa-light fa-copy icon"
onClick={(e) => handleCopyPlaceholder(e)}
onTouchEnd={(e) => handleCopyPlaceholder(e)}
style={{ color: "#188ae2", right: "12px", top: "-18px" }}
></i>
{/* delete icon for all widgets */}
<i
className="fa-light fa-circle-xmark icon"
onClick={(e) => {
e.stopPropagation();
//condition for template and placeholder flow
if (props.data) {
props.handleDeleteSign(props.pos.key, props.data.Id);
} else {
}
//condition for signyour-self flow
else {
props.handleDeleteSign(props.pos.key);
props.setIsStamp(false);
}
}}
//for mobile and tablet touch event
onTouchEnd={(e) => {
e.stopPropagation();
//condition for template and placeholder flow
if (props.data) {
props.handleDeleteSign(props.pos.key, props.data?.Id);
} else {
}
//condition for signyour-self flow
else {
props.handleDeleteSign(props.pos.key);
props.setIsStamp(false);
}
@@ -566,10 +635,11 @@ function Placeholder(props) {
);
};
const xPos = (pos, signYourself) => {
const getPdfPageWidth = props.pdfOriginalWH.find(
(data) => data.pageNumber === props.pageNumber
const containerScale = getContainerScale(
props.pdfOriginalWH,
props.pageNumber,
props.containerWH
);
const containerScale = props.containerWH.width / getPdfPageWidth?.width;
const resizePos = pos.xPosition;
if (signYourself) {
return resizePos * containerScale * props.scale;
@@ -591,10 +661,11 @@ function Placeholder(props) {
}
};
const yPos = (pos, signYourself) => {
const getPdfPageWidth = props.pdfOriginalWH.find(
(data) => data.pageNumber === props.pageNumber
const containerScale = getContainerScale(
props.pdfOriginalWH,
props.pageNumber,
props.containerWH
);
const containerScale = props.containerWH.width / getPdfPageWidth.width;
const resizePos = pos.yPosition;
if (signYourself) {
@@ -621,13 +692,25 @@ function Placeholder(props) {
}
};
const getCursor = () => {
if (props.data && props.isNeedSign) {
if (props?.signerObjId && props.data?.signerObjId === props.signerObjId) {
return "pointer";
} else if (props?.uniqueId && props.data?.Id === props.uniqueId) {
return "pointer";
} else {
return "not-allowed";
}
} else {
return "all-scroll";
}
};
return (
<Rnd
id={props.pos.key}
data-tut={props.pos.key === props.unSignedWidgetId ? "IsSigned" : ""}
key={props.pos.key}
lockAspectRatio={
// props.pos.type !== textWidget
![
textWidget,
"email",
@@ -671,12 +754,7 @@ function Placeholder(props) {
props.pos.type !== "company" &&
props.pos.type !== "job title" &&
"center",
cursor:
props.data && props.isNeedSign
? props.data?.signerObjId === props.signerObjId
? "pointer"
: "not-allowed"
: "all-scroll",
cursor: getCursor(),
zIndex:
props.pos.type === "date"
? props.pos.key === props.selectWidgetId
@@ -775,7 +853,6 @@ function Placeholder(props) {
)}
{isTabAndMobile ? (
<div
// className="sm:inline-block md:inline-block lg:hidden "
className="flex items-stretch"
style={{
left: xPos(props.pos, props.isSignYourself),
@@ -47,14 +47,11 @@ function PlaceholderBorder(props) {
onTouchEnd={() =>
props.pos.type === textWidget && props?.setDraggingEnabled(true)
}
className="absolute inline-block w-[14px] h-[14px] hover:cursor-sw-resize"
className="absolute inline-block w-[14px] h-[14px] border-[0.2px] overflow-hidden border-dashed"
style={{
borderColor: themeColor,
borderStyle: "dashed",
minWidth: handleMinWidth(),
minHeight: handleMinHeight(),
borderWidth: "0.2px",
overflow: "hidden"
minWidth: handleMinWidth() || 0,
minHeight: handleMinHeight() || 0
}}
></div>
);
@@ -1,8 +1,10 @@
import React, { useState } from "react";
import ModalUi from "../../primitives/ModalUi";
import { randomId, textWidget } from "../../constant/Utils";
import { useTranslation } from "react-i18next";
function PlaceholderCopy(props) {
const { t } = useTranslation();
const copyType = ["All pages", "All pages but last", "All pages but first"];
const [selectCopyType, setSelectCopyType] = useState("");
//function for get copy placeholder position
@@ -188,10 +190,8 @@ function PlaceholderCopy(props) {
return (
<ModalUi
isOpen={props.isPageCopy}
title={"Copy to all pages"}
handleClose={() => {
props.setIsPageCopy(false);
}}
title={t("copy-to-all-pages")}
handleClose={() => handleUniqueId()}
>
<div className="h-full p-[20px] text-base-content">
{copyType.map((data, key) => {
@@ -205,8 +205,7 @@ function PlaceholderCopy(props) {
onChange={() => setSelectCopyType(data)}
checked={selectCopyType === data}
/>
{data}
{t(`copy-type.${data}`)}
</label>
</div>
);
@@ -222,14 +221,14 @@ function PlaceholderCopy(props) {
disabled={!selectCopyType}
className="op-btn op-btn-primary"
>
Apply
{t("apply")}
</button>
<button
type="button"
className="op-btn op-btn-ghost"
onClick={() => handleUniqueId()}
>
Cancel
{t("cancel")}
</button>
</div>
</ModalUi>
@@ -13,12 +13,16 @@ import DatePicker from "react-datepicker";
import "react-datepicker/dist/react-datepicker.css";
import "../../styles/signature.css";
import RegexParser from "regex-parser";
import { emailRegex } from "../../constant/const";
import { useTranslation } from "react-i18next";
const textWidgetCls =
"w-full h-full md:min-w-full md:min-h-full z-[999] text-[12px] rounded-[2px] border-[1px] border-[#007bff] overflow-hidden resize-none outline-none text-base-content item-center bg-base-100 whitespace-pre-wrap";
"w-full h-full md:min-w-full md:min-h-full z-[999] text-[12px] rounded-[2px] border-[1px] border-[#007bff] overflow-hidden resize-none outline-none text-base-content item-center whitespace-pre-wrap bg-white";
const selectWidgetCls =
"w-full h-full absolute left-0 top-0 border-[1px] border-[#007bff] rounded-[2px] focus:outline-none bg-base-100 text-base-content";
"w-full h-full absolute left-0 top-0 border-[1px] border-[#007bff] rounded-[2px] focus:outline-none text-base-content";
function PlaceholderType(props) {
const { t } = useTranslation();
const type = props?.pos?.type;
const widgetTypeTraslation = t(`widgets-name.${props?.pos?.type}`);
const [selectOption, setSelectOption] = useState("");
const [validatePlaceholder, setValidatePlaceholder] = useState("");
const inputRef = useRef(null);
@@ -61,7 +65,7 @@ function PlaceholderType(props) {
if (validateType && validateType !== "text") {
switch (validateType) {
case "email":
regexValidation = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
regexValidation = emailRegex;
validateExpression(regexValidation);
break;
case "number":
@@ -139,8 +143,7 @@ function PlaceholderType(props) {
const ExampleCustomInput = forwardRef(({ value, onClick }, ref) => (
<div
className={`${selectWidgetCls} overflow-hidden`}
style={{ fontSize: calculateFontSize() }}
className={`${selectWidgetCls} text-[12px] overflow-hidden`}
onClick={onClick}
ref={ref}
>
@@ -171,12 +174,6 @@ function PlaceholderType(props) {
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [type]);
const calculateFontSize = () => {
const fontSize = 10 + Math.min(props.pos.Width, props.pos.Height) * 0.1;
const size = fontSize ? fontSize : 12;
return size + "px";
};
//function for show checked checkbox
const selectCheckbox = (ind) => {
const res = props.pos.options?.response;
@@ -317,7 +314,7 @@ function PlaceholderType(props) {
props?.handleUserName(
props?.data?.Id,
props?.data?.Role,
props?.pos?.type
widgetTypeTraslation
)}
</div>
);
@@ -335,7 +332,7 @@ function PlaceholderType(props) {
props?.handleUserName(
props?.data?.Id,
props?.data?.Role,
props?.pos?.type
widgetTypeTraslation
)}
</div>
);
@@ -423,17 +420,20 @@ function PlaceholderType(props) {
) : (
<div
style={{
color: "black",
fontSize: "12px"
fontSize: props.pos.options?.fontSize
? props.pos.options?.fontSize + "px"
: "12px",
color: props.pos.options?.fontColor || "black",
overflow: "hidden"
}}
>
<span>{type}</span>
<span>{widgetTypeTraslation}</span>
</div>
);
case "dropdown":
return props.data?.signerObjId === props.signerObjId ? (
<select
className={`${selectWidgetCls} text-[12px]`}
className={`${selectWidgetCls} text-[12px] bg-inherit`}
id="myDropdown"
value={selectOption}
onChange={(e) => {
@@ -463,11 +463,10 @@ function PlaceholderType(props) {
})}
</select>
) : (
<div
className={selectWidgetCls}
style={{ fontSize: calculateFontSize() }}
>
{props.pos?.options?.name ? props.pos.options.name : type}
<div className="text-[12px] overflow-hidden">
{props.pos?.options?.name
? props.pos.options.name
: widgetTypeTraslation}
</div>
);
case "initials":
@@ -484,7 +483,7 @@ function PlaceholderType(props) {
props?.handleUserName(
props?.data?.Id,
props?.data?.Role,
props?.pos?.type
widgetTypeTraslation
)}
</div>
);
@@ -522,11 +521,15 @@ function PlaceholderType(props) {
) : (
<div
style={{
color: "black",
fontSize: "12px"
fontSize: props.pos.options?.fontSize
? props.pos.options?.fontSize + "px"
: "12px",
color: props.pos.options?.fontColor || "black",
fontFamily: "Arial, sans-serif",
overflow: "hidden"
}}
>
<span>{type}</span>
<span>{widgetTypeTraslation}</span>
</div>
);
case "company":
@@ -562,11 +565,15 @@ function PlaceholderType(props) {
) : (
<div
style={{
color: "black",
fontSize: "12px"
fontSize: props.pos.options?.fontSize
? props.pos.options?.fontSize + "px"
: "12px",
color: props.pos.options?.fontColor || "black",
overflow: "hidden",
fontFamily: "Arial, sans-serif"
}}
>
<span>{type}</span>
<span>{widgetTypeTraslation}</span>
</div>
);
case "job title":
@@ -602,15 +609,20 @@ function PlaceholderType(props) {
) : (
<div
style={{
color: "black",
fontSize: "12px"
fontSize: props.pos.options?.fontSize
? props.pos.options?.fontSize + "px"
: "12px",
color: props.pos.options?.fontColor || "black",
fontFamily: "Arial, sans-serif",
overflow: "hidden"
}}
>
<span>{type}</span>
<span>{widgetTypeTraslation}</span>
</div>
);
case "date":
return (
return props.isSignYourself ||
(props.isNeedSign && props.data?.signerObjId === props.signerObjId) ? (
<div>
<DatePicker
renderCustomHeader={({ date, changeYear, changeMonth }) => (
@@ -667,6 +679,16 @@ function PlaceholderType(props) {
}
/>
</div>
) : (
<div className="text-[12px] text-black items-center overflow-hidden">
<span>
{props.selectDate
? props.selectDate?.format
: props.pos?.options?.validation?.format
? props.pos?.options?.validation?.format
: "MM/dd/yyyy"}
</span>
</div>
);
case "image":
return props.pos.SignUrl ? (
@@ -682,7 +704,7 @@ function PlaceholderType(props) {
props?.handleUserName(
props?.data?.Id,
props?.data?.Role,
props?.pos?.type
widgetTypeTraslation
)}
</div>
);
@@ -713,18 +735,23 @@ function PlaceholderType(props) {
fontSize: props.pos.options?.fontSize
? props.pos.options?.fontSize + "px"
: "12px",
color: props.pos.options?.fontColor || "black"
color: props.pos.options?.fontColor || "black",
fontFamily: "Arial, sans-serif"
}}
cols="50"
/>
) : (
<div
style={{
color: "black",
fontSize: "12px"
fontSize: props.pos.options?.fontSize
? props.pos.options?.fontSize + "px"
: "12px",
color: props.pos.options?.fontColor || "black",
fontFamily: "Arial, sans-serif",
overflow: "hidden"
}}
>
<span>{type}</span>
<span>{widgetTypeTraslation}</span>
</div>
);
case radioButtonWidget:
@@ -780,6 +807,7 @@ function PlaceholderType(props) {
}}
className={textWidgetCls}
style={{
fontFamily: "Arial, sans-serif",
fontSize: props.pos.options?.fontSize
? props.pos.options?.fontSize + "px"
: "12px",
+5 -5
View File
@@ -1,6 +1,8 @@
import React from "react";
import { useTranslation } from "react-i18next";
function PrevNext({ pageNumber, allPages, changePage }) {
const { t } = useTranslation();
//for go to previous page
function previousPage() {
changePage(-1);
@@ -17,23 +19,21 @@ function PrevNext({ pageNumber, allPages, changePage }) {
disabled={pageNumber <= 1}
onClick={previousPage}
>
<span className="block lg:hidden">
<span className="block">
<i className="fa-light fa-backward" aria-hidden="true"></i>
</span>
<span className="lg:block hidden 2xl:text-[30px]">Prev</span>
</button>
<span className="text-xs text-base-content font-medium mx-2 2xl:text-[30px]">
{pageNumber || (allPages ? 1 : "--")} of {allPages || "--"}
{pageNumber || (allPages ? 1 : "--")} {t("of")} {allPages || "--"}
</span>
<button
className="op-btn op-btn-neutral op-btn-xs md:op-btn-sm font-semibold text-xs"
disabled={pageNumber >= allPages}
onClick={nextPage}
>
<span className="block lg:hidden">
<span className="block">
<i className="fa-light fa-forward" aria-hidden="true"></i>
</span>
<span className="lg:block hidden 2xl:text-[30px]">Next</span>
</button>
</div>
);
@@ -61,15 +61,27 @@ const RecipientList = (props) => {
);
//splice method is used to replace or add new value in array at specific index
remainingItems.splice(index, 0, ...draggedItem);
//set current draggable recipient details,objectId,index,contract_className ... after replace recipient list
props.setSignersData(remainingItems);
props.setSignerObjId(remainingItems[index]?.objectId || "");
props.setIsSelectId(index);
props.setContractName(remainingItems[index]?.className || "");
props.setUniqueId(remainingItems[index]?.Id);
props.setRoleName(remainingItems[index]?.Role);
props.setBlockColor(remainingItems[index]?.blockColor);
props?.setSignersData(remainingItems);
props?.setSignerObjId(remainingItems[index]?.objectId || "");
props?.setIsSelectId(index);
props?.setContractName(remainingItems[index]?.className || "");
props?.setUniqueId(remainingItems[index]?.Id);
props?.setRoleName(remainingItems[index]?.Role);
props?.setBlockColor(remainingItems[index]?.blockColor);
//change order of placeholder's list using sorting method
//`remainingItems` is correct order of signers after change order
const changeOrderSignerList = props?.signerPos.sort((a, b) => {
//`indexA` and `indexB` is to get element position using index in correct order array
const indexA = remainingItems.findIndex((item) => item.Id === a.Id);
const indexB = remainingItems.findIndex((item) => item.Id === b.Id);
//and then compare `indexA - indexB` value
//if positive it means indexB element comes before indexA then need to sorting
//if negative it means indexA element is on correct position do not need to sorting
return indexA - indexB;
});
props?.setSignerPos(changeOrderSignerList);
};
return (
<>
@@ -101,7 +113,7 @@ const RecipientList = (props) => {
} flex flex-row rounded-xl px-2 py-[10px] mt-1 mx-1 items-center last:mb-0.5`}
style={{
background:
(!isMobile && isHover === ind) || props.isSelectListId === ind
(!isMobile && isHover === ind) || props.uniqueId === obj.Id
? obj?.blockColor
? obj?.blockColor
: color[ind % color.length]
@@ -1,4 +1,5 @@
import React, { useEffect, useRef, useState } from "react";
import { useTranslation } from "react-i18next";
import { Document, Page } from "react-pdf";
import { useSelector } from "react-redux";
@@ -10,8 +11,10 @@ function RenderAllPdfPage({
setSignBtnPosition,
pageNumber,
signerPos,
signerObjectId
signerObjectId,
containerWH
}) {
const { t } = useTranslation();
const [signPageNumber, setSignPageNumber] = useState([]);
const [bookmarkColor, setBookmarkColor] = useState("");
//set all number of pages after load pdf
@@ -48,7 +51,7 @@ function RenderAllPdfPage({
const timer = setTimeout(updateSize, 100); // match the transition duration
return () => clearTimeout(timer);
}, [isHeader, pageContainer]);
}, [isHeader, pageContainer, containerWH]);
//'function `addSignatureBookmark` is used to display the page where the user's signature is located.
const addSignatureBookmark = (index) => {
const ispageNumber = signPageNumber.includes(index + 1);
@@ -57,24 +60,23 @@ function RenderAllPdfPage({
<div className="absolute z-20 top-[1px] -right-[13px] -translate-x-1/2 -translate-y-1/2">
<i
style={{ color: bookmarkColor || "red" }}
className="fa-light fa-bookmark"
className="fa-solid fa-bookmark"
></i>
</div>
)
);
};
return (
<div ref={pageContainer} className="hidden w-[20%] bg-base-100 md:block">
<div className="mx-2 pr-2 pt-2 pb-1 text-[15px] text-base-content font-semibold border-b-[1px] border-base-300">
Pages
{t("pages")}
</div>
<div
className={`flex h-[90%] flex-col items-center m-2
autoSignScroll hide-scrollbar max-h-[100vh] `}
>
<Document
loading={"Loading Document.."}
loading={t("loading-doc")}
onLoadSuccess={onDocumentLoad}
file={signPdfUrl}
>
+28 -28
View File
@@ -3,11 +3,13 @@ import RSC from "react-scrollbars-custom";
import { Document, Page } from "react-pdf";
import {
defaultWidthHeight,
getContainerScale,
handleImageResize,
handleSignYourselfImageResize
} from "../../constant/Utils";
import Placeholder from "./Placeholder";
import Alert from "../../primitives/Alert";
import { useTranslation } from "react-i18next";
function RenderPdf({
pageNumber,
@@ -23,7 +25,6 @@ function RenderPdf({
setSignKey,
pdfDetails,
xyPostion,
pdfUrl,
pageDetails,
pdfRequest,
signerObjectId,
@@ -57,18 +58,23 @@ function RenderPdf({
setTempSignerId,
uniqueId,
pdfOriginalWH,
scale
scale,
setIsSelectId,
ispublicTemplate,
handleUserDetails
}) {
const { t } = useTranslation();
const isMobile = window.innerWidth < 767;
//check isGuestSigner is present in local if yes than handle login flow header in mobile view
const isGuestSigner = localStorage.getItem("isGuestSigner");
// handle signature block width and height according to screen
const posWidth = (pos, signYourself) => {
const getPdfPageWidth = pdfOriginalWH.find(
(data) => data.pageNumber === pageNumber
const containerScale = getContainerScale(
pdfOriginalWH,
pageNumber,
containerWH
);
const containerScale = containerWH.width / getPdfPageWidth.width || 1;
const defaultWidth = defaultWidthHeight(pos.type).width;
const posWidth = pos.Width ? pos.Width : defaultWidth;
if (signYourself) {
@@ -94,11 +100,11 @@ function RenderPdf({
}
};
const posHeight = (pos, signYourself) => {
const getPdfPageWidth = pdfOriginalWH.find(
(data) => data.pageNumber === pageNumber
const containerScale = getContainerScale(
pdfOriginalWH,
pageNumber,
containerWH
);
const containerScale = containerWH.width / getPdfPageWidth?.width || 1;
const posHeight = pos.Height || defaultWidthHeight(pos.type).height;
if (signYourself) {
return posHeight * scale * containerScale;
@@ -194,6 +200,8 @@ function RenderPdf({
containerWH={containerWH}
pdfOriginalWH={pdfOriginalWH}
pageNumber={pageNumber}
ispublicTemplate={ispublicTemplate}
handleUserDetails={handleUserDetails}
/>
</React.Fragment>
)
@@ -242,7 +250,9 @@ function RenderPdf({
};
return (
<>
{successEmail && <Alert type={"success"}>Email sent successfully!</Alert>}
{successEmail && (
<Alert type={"success"}>{t("success-email-alert")}</Alert>
)}
{isMobile ? (
<div
data-tut="reactourForth"
@@ -319,6 +329,7 @@ function RenderPdf({
containerWH={containerWH}
pdfOriginalWH={pdfOriginalWH}
pageNumber={pageNumber}
setIsSelectId={setIsSelectId}
/>
</React.Fragment>
);
@@ -386,7 +397,7 @@ function RenderPdf({
onLoadError={() => {
setPdfLoad(false);
}}
loading={"Loading Document.."}
loading={t("loading-doc")}
onLoadSuccess={pageDetails}
// ref={pdfRef}'
onClick={() => {
@@ -394,13 +405,7 @@ function RenderPdf({
setSelectWidgetId("");
}
}}
file={
pdfUrl
? pdfUrl
: pdfDetails[0] && pdfDetails[0].SignedUrl
? pdfDetails[0].SignedUrl
: pdfDetails[0].URL
}
file={pdfDetails[0]?.SignedUrl || pdfDetails[0]?.URL}
>
<Page
key={index}
@@ -428,7 +433,7 @@ function RenderPdf({
>
<div
style={{
width: containerWH.width * scale
width: containerWH?.width && containerWH?.width * scale
}}
ref={drop}
id="container"
@@ -501,6 +506,7 @@ function RenderPdf({
containerWH={containerWH}
pdfOriginalWH={pdfOriginalWH}
pageNumber={pageNumber}
setIsSelectId={setIsSelectId}
/>
</React.Fragment>
);
@@ -570,9 +576,9 @@ function RenderPdf({
{/* this component for render pdf document is in middle of the component */}
<Document
onLoadError={() => {
pdfLoad(false);
setPdfLoad(false);
}}
loading={"Loading Document.."}
loading={t("loading-doc")}
onLoadSuccess={pageDetails}
onClick={() => {
if (setSelectWidgetId) {
@@ -580,13 +586,7 @@ function RenderPdf({
}
}}
// ref={pdfRef}
file={
pdfUrl
? pdfUrl
: pdfDetails[0] && pdfDetails[0].SignedUrl
? pdfDetails[0].SignedUrl
: pdfDetails[0].URL
}
file={pdfDetails[0]?.SignedUrl || pdfDetails[0].URL}
>
<Page
key={index}
@@ -0,0 +1,49 @@
import i18next from "i18next";
import React, { useState } from "react";
import { useTranslation } from "react-i18next";
function SelectLanguage(props) {
const { i18n } = useTranslation();
const languages = [
{ value: "en", text: "English" },
{ value: "fr", text: "Français" }
];
const [lang, setLang] = useState(i18next.language || "en");
// This function put query that helps to change the language
const handleChangeLang = (e) => {
setLang(e.target.value);
i18n.changeLanguage(e.target.value);
props?.updateExtUser &&
props.updateExtUser({
language: e.target.value
});
};
return (
<div
className={`${
!props.isProfile && " mt-3 pb-2 md:pb-0 "
} flex justify-center items-center `}
>
<select
value={lang}
onChange={handleChangeLang}
className={`${
!props.isProfile && " md:w-[15%] w-[50%]"
} op-select op-select-bordered bg-white op-select-sm`}
>
<option disabled selected>
select
</option>
{languages.map((item) => {
return (
<option key={item.value} value={item.value}>
{item.text}
</option>
);
})}
</select>
</div>
);
}
export default SelectLanguage;
+28 -21
View File
@@ -1,6 +1,6 @@
import React, { useRef, useState, useEffect } from "react";
import { useTranslation } from "react-i18next";
import SignatureCanvas from "react-signature-canvas";
function SignPad({
isSignPad,
isStamp,
@@ -23,6 +23,7 @@ function SignPad({
currWidgetsDetails,
setCurrWidgetsDetails
}) {
const { t } = useTranslation();
const [penColor, setPenColor] = useState("blue");
const allColor = ["blue", "red", "black"];
const canvasRef = useRef(null);
@@ -82,7 +83,7 @@ function SignPad({
className="op-btn op-btn-ghost mr-1 mt-[2px]"
onClick={() => handleClear()}
>
Clear
{t("clear")}
</button>
)}
<button
@@ -99,7 +100,12 @@ function SignPad({
} else {
if (isTab === "type") {
setIsSignImg("");
onSaveSign(null, false, textWidth, textHeight);
onSaveSign(
null,
false,
!isInitial && textWidth > 150 ? 150 : textWidth,
!isInitial && textHeight > 35 ? 35 : textHeight
);
} else {
setIsSignImg("");
canvasRef.current.clear();
@@ -138,7 +144,7 @@ function SignPad({
: true
}
>
Save
{t("save")}
</button>
</div>
);
@@ -149,7 +155,6 @@ function SignPad({
const isWidgetType = currWidgetsDetails?.type;
const signatureType = currWidgetsDetails?.signatureType;
const url = currWidgetsDetails?.SignUrl;
//checking widget type and draw type signature url
if (isInitial) {
if (isWidgetType === "initials" && signatureType === "draw" && url) {
@@ -164,8 +169,8 @@ function SignPad({
}
}
const trimmedName = currentUserName.trim();
const firstCharacter = trimmedName.charAt(0);
const trimmedName = currentUserName && currentUserName.trim();
const firstCharacter = trimmedName?.charAt(0);
const userName = isInitial ? firstCharacter : currentUserName;
setSignValue(userName);
setFontSelect("Fasthand");
@@ -212,11 +217,11 @@ function SignPad({
: fontSelect
? fontSelect
: "Fasthand";
const fontSizeValue = "40px";
//creating span for getting text content width
const span = document.createElement("span");
span.textContent = textContent;
span.style.font = `20px ${fontfamily}`; // here put your text size and font family
span.style.font = `${fontSizeValue} ${fontfamily}`; // here put your text size and font family
span.style.color = color ? color : penColor;
span.style.display = "hidden";
document.body.appendChild(span); // Replace 'container' with the ID of the container element
@@ -226,7 +231,8 @@ function SignPad({
// Draw the text content on the canvas
const ctx = canvasElement.getContext("2d");
const pixelRatio = window.devicePixelRatio || 1;
const width = span.offsetWidth;
const addExtraWidth = isInitial ? 10 : 50;
const width = span.offsetWidth + addExtraWidth;
const height = span.offsetHeight;
setTextWidth(width);
setTextHeight(height);
@@ -299,10 +305,11 @@ function SignPad({
<div className="flex flex-row justify-between mt-[3px]">
<div className="flex flex-row justify-between gap-[5px] md:gap-[8px] text-[11px] md:text-base">
{isStamp ? (
<span className="op-link-primary op-link">
{widgetType === "image"
? "Upload image"
: "Upload stamp image"}
<span className="text-base-content font-bold text-lg">
{widgetType === "image" ||
currWidgetsDetails?.type === "image"
? t("upload-image")
: t("upload-stamp-image")}
</span>
) : (
<>
@@ -323,7 +330,7 @@ function SignPad({
: "no-underline"
} op-link underline-offset-8 ml-[2px]`}
>
Draw
{t("draw")}
</span>
</div>
<div>
@@ -340,7 +347,7 @@ function SignPad({
: "no-underline"
} op-link underline-offset-8 ml-[2px]`}
>
Upload Image
{t("upload-image")}
</span>
</div>
<div>
@@ -358,7 +365,7 @@ function SignPad({
: "no-underline"
} op-link underline-offset-8 ml-[2px]`}
>
Type
{t("type")}
</span>
</div>
{!isInitial && defaultSign ? (
@@ -377,7 +384,7 @@ function SignPad({
: "no-underline"
} op-link underline-offset-8 ml-[2px]`}
>
My Signature
{t("my-signature")}
</span>
</div>
) : (
@@ -398,7 +405,7 @@ function SignPad({
: "no-underline"
} op-link underline-offset-8 ml-[2px]`}
>
My Initials
{t("my-initials")}
</span>
</div>
)
@@ -485,7 +492,7 @@ function SignPad({
hidden
/>
<i className="fa-light fa-cloud-upload-alt uploadImgLogo"></i>
<div className="text-[10px]">Upload</div>
<div className="text-[10px]">{t("upload")}</div>
</div>
</div>
) : (
@@ -522,7 +529,7 @@ function SignPad({
<div>
<div className="flex justify-between items-center">
<span className="mr-[5px] text-[12px]">
{isInitial ? "Initials" : "Signature"}:
{isInitial ? t("initial-teb") : t("signature-tab")}:
</span>
<input
maxLength={isInitial ? 3 : 30}
+3 -1
View File
@@ -1,6 +1,8 @@
import React from "react";
import "../../styles/signature.css";
import { useTranslation } from "react-i18next";
function Signedby({ pdfDetails }) {
const { t } = useTranslation();
const getFirstLetter = (name) => {
const firstLetter = name.charAt(0);
return firstLetter;
@@ -9,7 +11,7 @@ function Signedby({ pdfDetails }) {
return (
<div className="hidden md:block w-full h-full bg-base-100">
<div className="mx-2 pr-2 pt-2 pb-1 text-[15px] text-base-content font-semibold border-b-[1px] border-base-300">
Signed By
{t("signed-by")}
</div>
<div className="mt-[2px] bg-base-100">
<div className="bg-[#93a3db] rounded-xl mx-1 flex flex-row items-center py-[10px]">
@@ -35,7 +35,9 @@ function SignerListComponent(props) {
className="flex w-[30px] h-[30px] rounded-full justify-center items-center mx-1"
>
<span className="text-[12px] text-center font-bold text-black uppercase">
{getFirstLetter(props?.obj?.Name || props?.obj?.Role)}
{getFirstLetter(
props.obj?.Name || props.obj?.email || props.obj?.Role
)}
</span>
</div>
<div className="flex flex-col">
@@ -1,8 +1,10 @@
import React from "react";
import RecipientList from "./RecipientList";
import { Tooltip } from "react-tooltip";
import { useTranslation } from "react-i18next";
function SignerListPlace(props) {
const { t } = useTranslation();
return (
<div>
<div className="mx-2 pr-2 pt-2 pb-1 text-[15px] text-base-content font-semibold border-b-[1px] border-base-300">
@@ -18,36 +20,12 @@ function SignerListPlace(props) {
</a>
<Tooltip id="my-tooltip" className="z-[100]">
<div className="max-w-[450px] 2xl:max-w-[500px] 2xl:text-[20px] p-[1px]">
<p className="font-bold pb-[1px]">
What are template roles?
</p>
<p>
Begin by specifying each role needed for the completion of
the document. Think about the parties involved in the
signing process and what their responsibilities are.
Common roles include HR for internal documents, Customer
for agreements or Vendor for business agreements.{" "}
</p>
<p className="font-bold">
Why pre-attach users to some roles?
</p>
<p>
For roles that consistently involve the same individual
(e.g., the CEO&apos;s signature on employee offer
letters), you can pre-attach a user to a role within the
template. This step is optional but recommended for
efficiency and consistency across documents.
</p>
<p className="font-bold">
When do i specify the user attached to each role?
</p>
<p>
When you create a document from your template, you&apos;ll
be prompted to attach users to each defined role. If a
role already has a user attached, this will be pre-filled,
but you can modify it as needed before sending out the
document.
</p>
<p className="font-bold pb-[1px]">{t("role-help.p1")}</p>
<p>{t("role-help.p2")} </p>
<p className="font-bold">{t("role-help.p3")}</p>
<p>{t("role-help.p4")}</p>
<p className="font-bold">{t("role-help.p5")}</p>
<p>{t("role-help.p6")}</p>
</div>
</Tooltip>
</>
@@ -67,7 +45,7 @@ function SignerListPlace(props) {
className="op-btn op-btn-accent op-btn-outline w-full mt-[14px]"
onClick={() => props.handleAddSigner()}
>
<i className="fa-light fa-plus"></i> Add role
<i className="fa-light fa-plus"></i> {t("add-role")}
</div>
) : (
<div
@@ -77,7 +55,7 @@ function SignerListPlace(props) {
disabled={props?.isMailSend ? true : false}
onClick={() => props.setIsAddSigner(true)}
>
<i className="fa-light fa-plus"></i> Add recipients
<i className="fa-light fa-plus"></i> {t("add-recipients")}
</div>
)}
</div>
@@ -1,25 +1,27 @@
import React from "react";
import ModalUi from "../../primitives/ModalUi";
import { fontColorArr, fontsizeArr } from "../../constant/Utils";
import { useTranslation } from "react-i18next";
function TextFontSetting(props) {
const { t } = useTranslation();
return (
<ModalUi
headerColor={"#dc3545"}
isOpen={props.isTextSetting}
reduceWidth={"max-w-[350px]"}
title={"Text field"}
handleClose={() => {
props.setIsTextSetting(false);
}}
title={t("text-field")}
handleClose={() => props.setIsTextSetting(false)}
>
<div className="h-full p-[20px]">
<div className="flex items-center">
<span>Font size:</span>
<span>{t("font-size")} :</span>
<select
className="ml-[7px] op-select op-select-bordered op-select-sm focus:outline-none hover:border-base-content text-xs"
value={
props.fontSize || props.currWidgetsDetails?.options?.fontSize
props.fontSize ||
props.currWidgetsDetails?.options?.fontSize ||
"12"
}
onChange={(e) => props.setFontSize(e.target.value)}
>
@@ -32,10 +34,12 @@ function TextFontSetting(props) {
})}
</select>
<div className="flex flex-row gap-1 items-center ml-4">
<span>color: </span>
<span>{t("color")}: </span>
<select
value={
props.fontColor || props.currWidgetsDetails?.options?.fontColor
props.fontColor ||
props.currWidgetsDetails?.options?.fontColor ||
"black"
}
onChange={(e) => props.setFontColor(e.target.value)}
className="ml-[7px] op-select op-select-bordered op-select-sm focus:outline-none hover:border-base-content text-xs"
@@ -43,7 +47,7 @@ function TextFontSetting(props) {
{fontColorArr.map((color, ind) => {
return (
<option value={color} key={ind}>
{color}
{t(`color-type.${color}`)}
</option>
);
})}
@@ -65,7 +69,7 @@ function TextFontSetting(props) {
type="button"
className="op-btn op-btn-primary mt-2"
>
save
{t("save")}
</button>
</div>
</ModalUi>
@@ -1,12 +1,14 @@
import React from "react";
import Loader from "../../primitives/Loader";
import { useTranslation } from "react-i18next";
function VerifyEmail(props) {
const { t } = useTranslation();
return (
<dialog className="op-modal op-modal-open absolute z-[1999]">
<div className="md:w-[40%] w-[80%] op-modal-box p-0 overflow-y-auto hide-scrollbar text-sm">
<h3 className="font-bold text-lg pt-[15px] px-[20px] text-base-content">
OTP verification
{t("otp-verification")}
</h3>
{props.isVerifyModal ? (
<form
@@ -16,26 +18,30 @@ function VerifyEmail(props) {
}}
>
<div className="px-6 py-3 text-base-content">
<label className="mb-2">Enter OTP</label>
<label className="mb-2">{t("enter-otp")}</label>
<input
onInvalid={(e) =>
e.target.setCustomValidity(t("input-required"))
}
onInput={(e) => e.target.setCustomValidity("")}
required
type="tel"
pattern="[0-9]{4}"
className="w-full op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content text-xs"
placeholder="Enter OTP received over email"
placeholder={t("otp-placeholder")}
value={props.otp}
onChange={(e) => props.setOtp(e.target.value)}
/>
</div>
<div className="px-6 my-3">
<button type="submit" className="op-btn op-btn-primary">
Verify
{t("verify")}
</button>
<button
className="op-btn op-btn-secondary ml-2"
onClick={(e) => props.handleResend(e)}
>
Resend
{t("resend")}
</button>
</div>
</form>
@@ -45,7 +51,7 @@ function VerifyEmail(props) {
</div>
) : (
<div className="px-6 py-3 text-base-content">
<p className="mb-2 text-sm">Please verify your email !</p>
<p className="mb-2 text-sm">{t("verify-email")}</p>
<div className="px-0 mt-3">
<button
className="op-btn op-btn-primary"
@@ -54,7 +60,7 @@ function VerifyEmail(props) {
props.handleVerifyBtn();
}}
>
Send OTP
{t("send-otp")}
</button>
</div>
</div>
@@ -9,6 +9,7 @@ import {
textWidget,
widgets
} from "../../constant/Utils";
import { useTranslation } from "react-i18next";
function WidgetComponent({
dragSignature,
signRef,
@@ -37,11 +38,11 @@ function WidgetComponent({
sendInOrder,
isTemplateFlow,
setBlockColor,
blockColor,
setIsAddSigner
setIsAddSigner,
uniqueId
}) {
const { t } = useTranslation();
const [isSignersModal, setIsSignersModal] = useState(false);
const [, dropdown] = useDrag({
type: "BOX",
item: {
@@ -187,7 +188,6 @@ function WidgetComponent({
const isMobile = window.innerWidth < 767;
const scrollContainerRef = useRef(null);
const [widget, setWidget] = useState([]);
const color = [
"#93a3db",
"#e6c3db",
@@ -245,86 +245,66 @@ function WidgetComponent({
? textWidgetData
: widget;
const handleSelectRecipient = () => {
if (
signersdata[isSelectListId]?.Email ||
signersdata[isSelectListId]?.Role
) {
const userData =
signersdata[isSelectListId]?.Name || signersdata[isSelectListId]?.Role;
const name =
userData?.length > 20 ? `${userData.slice(0, 20)}...` : userData;
return name;
}
};
return (
<>
{isMobile ? (
!isMailSend && (
<div
id="navbar"
className="fixed z-[99] bottom-0 right-0"
style={{ width: window.innerWidth + "px" }}
>
<div className="mx-1">
{isSigners && (
<div
data-tut="recipientArea"
className="py-[10px] flex justify-center items-center op-card"
style={{
background: blockColor
? blockColor
: isSelectListId
<div id="navbar" className="fixed z-[99] bottom-0 right-0 w-full">
{isSigners && (
<div className="w-full mb-[5px] flex justify-center items-center gap-1">
<div className="w-full ml-[5px]" onClick={() => handleModal()}>
<select
data-tut="recipientArea"
className="w-full op-select op-select-bordered pointer-events-none"
value={handleSelectRecipient()}
style={{
backgroundColor: isSelectListId
? color[isSelectListId % color.length]
: color[0]
}}
onClick={() => handleModal()}
>
<span className="text-[13px] font-bold flex items-center">
{title ? title : "Recipient"}
{signersdata[isSelectListId]?.Role && (
<div>
{signersdata[isSelectListId]?.Name ? (
<>
:{" "}
{signersdata[isSelectListId]?.Name?.length > 12
? `${signersdata[isSelectListId].Name.slice(
0,
12
)}...`
: signersdata[isSelectListId]?.Name}
</>
) : (
<>
:{" "}
{signersdata[isSelectListId]?.Role?.length > 12
? `${signersdata[isSelectListId].Role.slice(
0,
12
)}...`
: signersdata[isSelectListId]?.Role}
</>
)}
</div>
)}
<div className="ml-[6px] text-[16px]">
<i className="fa-light fa-angle-down"></i>
</div>
</span>
</div>
)}
</div>
<div className="mx-1">
{handleAddSigner ? (
<div
data-tut="reactourAddbtn"
className="op-btn op-btn-accent w-full my-[2px]"
onClick={() => handleAddSigner()}
>
<i className="fa-light fa-plus"></i>
<span>Add role</span>
</div>
) : (
setIsAddSigner && (
<div
data-tut="addRecipient"
className="op-btn op-btn-accent w-full my-[2px]"
onClick={() => setIsAddSigner(true)}
}}
>
<i className="fa-light fa-plus"></i>
<span>Add recipients</span>
</div>
)
)}
</div>
<option value={handleSelectRecipient()}>
{handleSelectRecipient()}
</option>
</select>
</div>
<div className="w-[18%]">
{handleAddSigner ? (
<button
data-tut="reactourAddbtn"
onClick={() => handleAddSigner()}
className="op-btn op-btn-accent"
>
<i className="fa-light fa-plus "></i>
</button>
) : (
setIsAddSigner && (
<button
data-tut="addRecipient"
onClick={() => setIsAddSigner(true)}
className="op-btn op-btn-accent"
>
<i className="fa-light fa-plus"></i>
</button>
)
)}
</div>
</div>
)}
<div
data-tut="addWidgets"
ref={scrollContainerRef}
@@ -352,7 +332,7 @@ function WidgetComponent({
} hidden md:block h-full bg-base-100`}
>
<div className="mx-2 pr-2 pt-2 pb-1 text-[15px] text-base-content font-semibold border-b-[1px] border-base-300">
<span>Fields</span>
<span>{t("fields")}</span>
</div>
<div
@@ -370,7 +350,7 @@ function WidgetComponent({
)}
{isSignersModal && (
<ModalUi
title={title ? title : "Recipients"}
title={title ? title : t("recipients")}
isOpen={isSignersModal}
handleClose={handleModal}
>
@@ -392,11 +372,12 @@ function WidgetComponent({
sendInOrder={sendInOrder}
setSignersData={setSignersData}
setBlockColor={setBlockColor}
uniqueId={uniqueId}
/>
</div>
) : (
<div className=" p-[20px] text-[15px] font-medium text-center">
Please add a {title ? title : "recipients"}
{t("please-add")} {title ? title : t("recipients")}
</div>
)}
</ModalUi>
@@ -1,7 +1,10 @@
import React from "react";
import { getWidgetType } from "../../constant/Utils";
import { useTranslation } from "react-i18next";
function WidgetList(props) {
const { t } = useTranslation();
return props.updateWidgets.map((item, ind) => {
return (
<div className="2xl:p-3 mb-[5px]" key={ind}>
@@ -25,7 +28,7 @@ function WidgetList(props) {
onMouseDown={() => props?.handleMouseLeave()}
onTouchStart={props?.handleDivClick}
>
{item.ref && getWidgetType(item)}
{item.ref && getWidgetType(item, t(`widgets-name.${item.type}`))}
</div>
</div>
);
@@ -2,13 +2,15 @@ import React, { useEffect, useState } from "react";
import ModalUi from "../../primitives/ModalUi";
import "../../styles/AddUser.css";
import RegexParser from "regex-parser";
import { textInputWidget } from "../../constant/Utils";
import PremiumAlertHeader from "../../primitives/PremiumAlertHeader";
import { textInputWidget, textWidget } from "../../constant/Utils";
import Upgrade from "../../primitives/Upgrade";
import { isEnableSubscription } from "../../constant/const";
import Tooltip from "../../primitives/Tooltip";
import { fontColorArr, fontsizeArr } from "../../constant/Utils";
import { useTranslation } from "react-i18next";
const WidgetNameModal = (props) => {
const { t } = useTranslation();
const [formdata, setFormdata] = useState({
name: "",
defaultValue: "",
@@ -23,7 +25,7 @@ const WidgetNameModal = (props) => {
useEffect(() => {
if (props.defaultdata) {
setFormdata({
name: props.defaultdata?.options?.name || props?.widgetName || "",
name: props.defaultdata?.options?.name || "",
defaultValue: props.defaultdata?.options?.defaultValue || "",
status: props.defaultdata?.options?.status || "required",
hint: props.defaultdata?.options?.hint || "",
@@ -35,11 +37,11 @@ const WidgetNameModal = (props) => {
} else {
setFormdata({
...formdata,
name: props.defaultdata?.options?.name || props?.widgetName || ""
name: props.defaultdata?.options?.name || ""
});
}
// eslint-disable-next-line
}, [props.defaultdata, props.widgetName]);
}, [props.defaultdata]);
const handleSubmit = (e) => {
e.preventDefault();
if (props.handleData) {
@@ -104,29 +106,17 @@ const WidgetNameModal = (props) => {
<ModalUi
isOpen={props.isOpen}
handleClose={props.handleClose && props.handleClose}
title={"Widget info"}
title={t("widget-info")}
>
{(props.defaultdata?.type === textInputWidget ||
props.widgetName === textInputWidget) &&
!isEnableSubscription && (
<PremiumAlertHeader
message={
"Field validations are free in beta, this feature will incur a fee later."
}
/>
)}
<form
onSubmit={handleSubmit}
className={`${
props.defaultdata?.type === textInputWidget ||
props.widgetName === textInputWidget
? "pt-0"
: ""
props.defaultdata?.type === textInputWidget ? "pt-0" : ""
} p-[20px] text-base-content`}
>
<div className="mb-[0.75rem] text-[13px]">
<label htmlFor="name">
Name
{t("name")}
<span className="text-[red]"> *</span>
</label>
<input
@@ -134,73 +124,79 @@ const WidgetNameModal = (props) => {
name="name"
value={formdata.name}
onChange={(e) => handleChange(e)}
onInvalid={(e) => e.target.setCustomValidity(t("input-required"))}
onInput={(e) => e.target.setCustomValidity("")}
required
/>
</div>
{(props.defaultdata?.type === textInputWidget ||
props.widgetName === textInputWidget) && (
{props.defaultdata?.type === textInputWidget && (
<>
<div className="mb-[0.75rem]">
<div className="flex items-center gap-1">
<label
htmlFor="textvalidate"
{isEnableSubscription && (
<div className="mb-[0.75rem]">
<div className="flex items-center gap-1">
<label
htmlFor="textvalidate"
className={`${
!props.isSubscribe && isEnableSubscription
? "bg-opacity-50 pointer-events-none"
: ""
} text-[13px]`}
>
{t("validation")}
</label>
<Tooltip
url={"https://www.w3schools.com/jsref/jsref_obj_regexp.asp"}
/>
{!props.isSubscribe && isEnableSubscription && <Upgrade />}
</div>
<div
className={`${
!props.isSubscribe && isEnableSubscription
? "bg-opacity-50 pointer-events-none"
: ""
} text-[13px]`}
} flex flex-row gap-[10px] mb-[0.5rem]`}
>
Validation
</label>
<Tooltip
url={"https://www.w3schools.com/jsref/jsref_obj_regexp.asp"}
/>
{!props.isSubscribe && isEnableSubscription && <Upgrade />}
</div>
<div
className={`${
!props.isSubscribe && isEnableSubscription
? "bg-opacity-50 pointer-events-none"
: ""
} flex flex-row gap-[10px] mb-[0.5rem]`}
>
<div className="w-full relative group">
<input
className="z-20 relative op-input op-input-bordered rounded-r-none op-input-sm focus:outline-none group-hover:border-base-content w-[87%] md:w-[92%] text-xs"
name="textvalidate"
placeholder="Enter custom regular expression"
value={formdata.textvalidate}
onChange={(e) => handleChange(e)}
// onBlur={() => handleBlurRegex()}
/>
<select
className="validationlist op-input op-input-bordered op-input-sm focus:outline-none group-hover:border-base-content w-full text-xs"
name="textvalidate"
value={formdata.textvalidate}
onChange={(e) => handleChange(e)}
onBlur={() => handleBlurRegex()}
>
<option
disabled={formdata?.textvalidate}
className="text-[13px]"
<div className="w-full relative group">
<input
className="z-20 relative op-input op-input-bordered rounded-r-none op-input-sm focus:outline-none group-hover:border-base-content w-[87%] md:w-[92%] text-xs"
name="textvalidate"
placeholder="Enter custom regular expression"
value={formdata.textvalidate}
onChange={(e) => handleChange(e)}
// onBlur={() => handleBlurRegex()}
/>
<select
className="validationlist op-input op-input-bordered op-input-sm focus:outline-none group-hover:border-base-content w-full text-xs"
name="textvalidate"
value={formdata.textvalidate}
onChange={(e) => handleChange(e)}
onBlur={() => handleBlurRegex()}
>
Select...
</option>
{inputOpt.map((data, ind) => {
return (
<option className="text-[13px]" key={ind} value={data}>
{data}
</option>
);
})}
</select>
<option
disabled={formdata?.textvalidate}
className="text-[13px]"
>
Select...
</option>
{inputOpt.map((data, ind) => {
return (
<option
className="text-[13px]"
key={ind}
value={data}
>
{data}
</option>
);
})}
</select>
</div>
</div>
</div>
</div>
)}
<div className="mb-[0.75rem]">
<label htmlFor="name" className="text-[13px]">
Default value
{t("default-value")}
</label>
<input
className="op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs"
@@ -224,7 +220,7 @@ const WidgetNameModal = (props) => {
className="fa-light fa-exclamation-circle text-[15px]"
style={{ color: "#fab005" }}
></i>
invalid default value
{t("invalid-default-value")}
</div>
)}
</div>
@@ -246,17 +242,18 @@ const WidgetNameModal = (props) => {
formdata.status.toLowerCase() === data.toLowerCase()
}
/>
<div className="text-[13px] font-medium">{data}</div>
<div className="text-[13px] font-medium">
{t(`widget-status.${data}`)}
</div>
</div>
);
})}
</div>
</div>
{(props.defaultdata?.type === textInputWidget ||
props?.widgetName === textInputWidget) && (
{props.defaultdata?.type === textInputWidget && (
<div className="mb-[0.75rem]">
<label htmlFor="hint" className="text-[13px]">
Hint
{t("hint")}
</label>
<input
className="op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs"
@@ -266,9 +263,66 @@ const WidgetNameModal = (props) => {
/>
</div>
)}
{[
textInputWidget,
textWidget,
"name",
"company",
"job title",
"email"
].includes(props.defaultdata?.type) && (
<div className="flex items-center mb-[0.75rem]">
<span>{t("font-size")}:</span>
<select
className="ml-[7px] op-select op-select-bordered op-select-sm focus:outline-none hover:border-base-content text-xs"
value={
props.fontSize || props.defaultdata?.options?.fontSize || "12"
}
onChange={(e) => props.setFontSize(e.target.value)}
>
{fontsizeArr.map((size, ind) => {
return (
<option className="text-[13px]" value={size} key={ind}>
{size}
</option>
);
})}
</select>
<div className="flex flex-row gap-1 items-center ml-4">
<span>{t("color")}: </span>
<select
value={
props.fontColor ||
props.defaultdata?.options?.fontColor ||
"black"
}
onChange={(e) => props.setFontColor(e.target.value)}
className="ml-[7px] op-select op-select-bordered op-select-sm focus:outline-none hover:border-base-content text-xs"
>
{fontColorArr.map((color, ind) => {
return (
<option value={color} key={ind}>
{t(`color-type.${color}`)}
</option>
);
})}
</select>
<span
style={{
background:
props.fontColor ||
props.defaultdata?.options?.fontColor ||
"black"
}}
className="w-5 h-[19px] ml-1"
></span>
</div>
</div>
)}
<div className="h-[1px] w-full mb-[16px] bg-[#b7b3b3]"></div>
<button type="submit" className="op-btn op-btn-primary">
Save
{t("save")}
</button>
</form>
</ModalUi>
@@ -2,6 +2,7 @@ import React, { useEffect, useState } from "react";
import Parse from "parse";
import Alert from "../../../primitives/Alert";
import Loader from "../../../primitives/Loader";
import { useTranslation } from "react-i18next";
const CreateFolder = ({ parentFolderId, onSuccess, folderCls }) => {
const folderPtr = {
@@ -9,6 +10,7 @@ const CreateFolder = ({ parentFolderId, onSuccess, folderCls }) => {
className: folderCls,
objectId: parentFolderId
};
const { t } = useTranslation();
const [name, setName] = useState("");
const [folderList, setFolderList] = useState([]);
const [isAlert, setIsAlert] = useState(false);
@@ -60,7 +62,7 @@ const CreateFolder = ({ parentFolderId, onSuccess, folderCls }) => {
}
const templExist = await exsitQuery.first();
if (templExist) {
setAlert({ type: "danger", message: "Folder already exist!" });
setAlert({ type: "danger", message: t("folder-already-exist") });
setIsAlert(true);
setTimeout(() => {
setIsAlert(false);
@@ -85,7 +87,7 @@ const CreateFolder = ({ parentFolderId, onSuccess, folderCls }) => {
handleLoader(false);
setAlert({
type: "success",
message: "Folder created successfully!"
message: t("folder-created-successfully")
});
setIsAlert(true);
setTimeout(() => {
@@ -98,7 +100,7 @@ const CreateFolder = ({ parentFolderId, onSuccess, folderCls }) => {
}
} else {
handleLoader(false);
setAlert({ type: "info", message: "Please fill folder name" });
setAlert({ type: "info", message: t("fill-folder-name") });
setIsAlert(true);
setTimeout(() => {
setIsAlert(false);
@@ -120,20 +122,25 @@ const CreateFolder = ({ parentFolderId, onSuccess, folderCls }) => {
<Loader />
</div>
)}
<h1 className="text-base font-semibold mt-[0.4rem]">Create Folder</h1>
<h1 className="text-base font-semibold mt-[0.4rem]">
{t("create-folder")}
</h1>
<div className="text-xs mt-2">
<label className="block">
Name<span className="text-red-500 text-[13px]">*</span>
{t("name")}
<span className="text-red-500 text-[13px]">*</span>
</label>
<input
className="op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs"
value={name}
onChange={(e) => setName(e.target.value)}
onInvalid={(e) => e.target.setCustomValidity(t("input-required"))}
onInput={(e) => e.target.setCustomValidity("")}
required
/>
</div>
<div className="text-xs mt-2">
<label className="block">Parent Folder</label>
<label className="block">{t("parent-folder")}</label>
<select
value={selectedParent}
onChange={handleOptions}
@@ -155,7 +162,7 @@ const CreateFolder = ({ parentFolderId, onSuccess, folderCls }) => {
className="op-btn op-btn-primary op-btn-sm mt-3"
>
<i className="fa-light fa-plus"></i>
<span>Create</span>
<span>{t("create")}</span>
</button>
</div>
</div>
@@ -54,7 +54,7 @@ export default function DropboxChooser({ children, onSuccess, onCancel }) {
return (
<div onClick={handleChoose}>
{children || (
<button className="px-2 py-[2px] text-2xl rounded border-[1px] text-blue-400 border-gray-300 w-full">
<button className="cursor-pointer op-input op-input-bordered focus:outline-none hover:border-base-content max-h-[35px] max-w-[45px] flex justify-center items-center">
<i className="fa-brands fa-dropbox"></i>
</button>
)}
@@ -2,8 +2,10 @@ import React, { useEffect, useState } from "react";
import Parse from "parse";
import CreateFolder from "./CreateFolder";
import ModalUi from "../../../primitives/ModalUi";
import { useTranslation } from "react-i18next";
const FolderModal = (props) => {
const { t } = useTranslation();
const [clickFolder, setClickFolder] = useState("");
const [folderList, setFolderList] = useState([]);
const [tabList, setTabList] = useState([]);
@@ -147,7 +149,7 @@ const FolderModal = (props) => {
return (
<div className="text-xs mt-2">
<ModalUi
title={"Select Folder"}
title={t("select-foler")}
isOpen={props.isOpenModal}
handleClose={handleCancel}
>
@@ -158,7 +160,7 @@ const FolderModal = (props) => {
title="OpenSign™ Drive"
onClick={(e) => removeTabListItem(e)}
>
OpenSign Drive /{" "}
{t("OpenSign-drive")} /{" "}
</span>
{tabList &&
tabList.map((tab, i) => (
@@ -214,7 +216,7 @@ const FolderModal = (props) => {
))
: !isLoader && (
<div className="text-base-content text-center my-2">
No data found
{t("no-data")}
</div>
)}
</div>
@@ -236,27 +238,28 @@ const FolderModal = (props) => {
<div className="flex justify-between items-center py-[.75rem] px-[1.25rem]">
<div
className="op-btn op-btn-seconday op-btn-sm"
title="Save Here"
title={t("save-here")}
onClick={handleCreate}
>
{isAdd ? (
<>
<i className="fa-light fa-arrow-left" aria-hidden="true"></i>
<span className="text-xs">Back</span>
<span className="text-xs">{t("back")}</span>
</>
) : (
<>
<i className="fa-light fa-square-plus" aria-hidden="true"></i>
<span className="">Add folder</span>
<span className="">{t("add-folder")}</span>
</>
)}
</div>
<div
className="op-btn op-btn-primary op-btn-sm"
title="Save Here"
title={t("save-here")}
onClick={handleSubmit}
>
<i className="fa-light fa-save" aria-hidden="true"></i>Save here
<i className="fa-light fa-save" aria-hidden="true"></i>
{t("save-here")}
</div>
</div>
</ModalUi>
@@ -3,8 +3,10 @@ import Parse from "parse";
import CreateFolder from "./CreateFolder";
import ModalUi from "../../../primitives/ModalUi";
import Tooltip from "../../../primitives/Tooltip";
import { useTranslation } from "react-i18next";
const SelectFolder = ({ required, onSuccess, folderCls, isReset }) => {
const { t } = useTranslation();
const [isOpen, SetIsOpen] = useState(false);
const [clickFolder, setClickFolder] = useState("");
const [selectFolder, setSelectedFolder] = useState({});
@@ -169,7 +171,7 @@ const SelectFolder = ({ required, onSuccess, folderCls, isReset }) => {
<div className="text-xs mt-2 ">
<div>
<label className="block">
Select Folder
{t("select-folder")}
{required && <span className="text-red-500 text-[13px]">*</span>}
</label>
</div>
@@ -192,12 +194,12 @@ const SelectFolder = ({ required, onSuccess, folderCls, isReset }) => {
<p>
{selectFolder && selectFolder.Name
? selectFolder.Name
: "OpenSign™ Drive"}
: t("OpenSign-drive")}
</p>
<div className="text-black text-sm">
<i
className="fa-light fa-pencil cursor-pointer"
title="Select Folder"
title={t("select-folder")}
aria-hidden="true"
></i>
</div>
@@ -208,15 +210,11 @@ const SelectFolder = ({ required, onSuccess, folderCls, isReset }) => {
</div>
</div>
<div className="absolute top-2 right-1 cursor-pointer">
<Tooltip
message={
"If you do not select a folder, your signed document will be saved in the Main OpenSign drive folder."
}
/>
<Tooltip message={t("select-folder-help")} />
</div>
</div>
<ModalUi
title={"Select Folder"}
title={t("select-folder")}
isOpen={isOpen}
handleClose={handleCancel}
>
@@ -227,7 +225,7 @@ const SelectFolder = ({ required, onSuccess, folderCls, isReset }) => {
title="OpenSign™ Drive"
onClick={(e) => removeTabListItem(e)}
>
OpenSign Drive /{" "}
{t("OpenSign-drive")} /{" "}
</span>
{tabList &&
tabList.map((tab, i) => (
@@ -283,7 +281,7 @@ const SelectFolder = ({ required, onSuccess, folderCls, isReset }) => {
))
: !isLoader && (
<div className="text-base-content text-center my-2">
No data found
{t("no-data")}
</div>
)}
</div>
@@ -305,27 +303,28 @@ const SelectFolder = ({ required, onSuccess, folderCls, isReset }) => {
<div className="flex justify-between items-center py-[.75rem] px-[1.25rem]">
<div
className="op-btn op-btn-seconday op-btn-sm"
title="Save Here"
title={t("save-here")}
onClick={handleCreate}
>
{isAdd ? (
<>
<i className="fa-light fa-arrow-left" aria-hidden="true"></i>
<span className="text-xs">Back</span>
<span className="text-xs">{t("back")}</span>
</>
) : (
<>
<i className="fa-light fa-square-plus" aria-hidden="true"></i>
<span className="">Add folder</span>
<span className="">{t("add-folder")}</span>
</>
)}
</div>
<div
className="op-btn op-btn-primary op-btn-sm"
title="Save Here"
title={t("save-here")}
onClick={handleSubmit}
>
<i className="fa-light fa-save" aria-hidden="true"></i>Save here
<i className="fa-light fa-save" aria-hidden="true"></i>
{t("save-here")}
</div>
</div>
</ModalUi>
@@ -1,8 +1,10 @@
import React, { useState } from "react";
import Parse from "parse";
import AsyncSelect from "react-select/async";
import { useTranslation } from "react-i18next";
const SelectSigners = (props) => {
const { t } = useTranslation();
const [userList, setUserList] = useState([]);
const [selected, setSelected] = useState();
const [userData, setUserData] = useState({});
@@ -71,13 +73,15 @@ const SelectSigners = (props) => {
<div className="h-full px-[20px] py-[10px] text-base-content">
<div className="w-full mx-auto p-[8px]">
<div className="mb-0">
<label className="text-[14px] font-bold">Choose from contacts</label>
<label className="text-[14px] font-bold">
{t("choose-from-contacts")}
</label>
<AsyncSelect
cacheOptions
defaultOptions
value={selected}
loadingMessage={() => "Loading..."}
noOptionsMessage={() => "Contact not found"}
loadingMessage={() => t("loading")}
noOptionsMessage={() => t("contact-not-found")}
loadOptions={loadOptions}
onChange={handleOptions}
unstyled
@@ -102,11 +106,11 @@ const SelectSigners = (props) => {
isError ? "text-[red]" : "text-transparent"
} text-[11px] ml-[6px] my-[2px]`}
>
Please select signer
{t("select-signer")}
</p>
<div>
<button className="op-btn op-btn-primary" onClick={() => handleAdd()}>
Submit
{t("submit")}
</button>
</div>
</div>
@@ -4,6 +4,7 @@ import AddSigner from "../../AddSigner";
import Parse from "parse";
import Tooltip from "../../../primitives/Tooltip";
import { createPortal } from "react-dom";
import { useTranslation } from "react-i18next";
function arrayMove(array, from, to) {
array = array.slice();
array.splice(to < 0 ? array.length + to : to, 0, array.splice(from, 1)[0]);
@@ -32,6 +33,7 @@ const AddSignerModal = ({ isOpen, children }) => {
*/
const SignersInput = (props) => {
const { t } = useTranslation();
const [state, setState] = useState(undefined);
// const [editFormData, setEditFormData] = useState([]);
const [selected, setSelected] = useState([]);
@@ -120,15 +122,10 @@ const SignersInput = (props) => {
return (
<div className="text-xs mt-2 ">
<label className="block relative">
Signers
{t("signers")}
{props.required && <span className="text-red-500 text-[13px]">*</span>}
<span className="absolute ml-1 text-xs z-30">
<Tooltip
id={"signer-tooltip"}
message={
"Begin typing a contact's name to see suggested signers from your saved contacts or add new ones. Arrange the signing order by adding signers in the desired sequence. Use the '+' button to include signers and the 'x' to remove them. Each signer will receive an email prompt to sign the document in the order listed."
}
/>
<Tooltip id={"signer-tooltip"} message={t("signers-help")} />
</span>
</label>
<div className="flex gap-x-[5px]">
@@ -142,7 +139,7 @@ const SignersInput = (props) => {
onChange={onChange}
closeMenuOnSelect={false}
required={props.required}
noOptionsMessage={() => "Contact not found"}
noOptionsMessage={() => t("contact-not-found")}
unstyled
classNames={{
control: () =>
@@ -171,7 +168,7 @@ const SignersInput = (props) => {
</div>
<AddSignerModal isOpen={modalIsOpen}>
<h3 className="text-base-content font-bold text-lg pt-[15px] px-[20px]">
Add Signer
{t("add-signer")}
</h3>
<button
onClick={handleModalCloseClick}
+3 -1
View File
@@ -1,7 +1,9 @@
import React from "react";
import { useTranslation } from "react-i18next";
import { NavLink } from "react-router-dom";
const Menu = ({ item, isOpen, closeSidebar }) => {
const { t } = useTranslation();
return (
<li key={item.title} role="none" className="my-0.5">
<NavLink
@@ -20,7 +22,7 @@ const Menu = ({ item, isOpen, closeSidebar }) => {
role="menuitem"
>
<i className={`${item.icon} text-[18px]`} aria-hidden="true"></i>
<span className="ml-3 lg:ml-4">{item.title}</span>
<span className="ml-3 lg:ml-4">{t(`sidebar.${item.title}`)}</span>
</NavLink>
</li>
);
+81 -19
View File
@@ -4,11 +4,14 @@ import Submenu from "./SubMenu";
import SocialMedia from "./SocialMedia";
import dp from "../../assets/images/dp.png";
import sidebarList from "../../json/menuJson";
import { useNavigate } from "react-router-dom";
import { isEnableSubscription } from "../../constant/const";
const Sidebar = ({ isOpen, closeSidebar }) => {
const navigate = useNavigate();
const [menuList, setmenuList] = useState([]);
const [submenuOpen, setSubmenuOpen] = useState(false);
let username = localStorage.getItem("username");
const username = localStorage.getItem("username");
const image = localStorage.getItem("profileImg") || dp;
const tenantname = localStorage.getItem("Extand_Class")
? JSON.parse(localStorage.getItem("Extand_Class"))?.[0]?.Company
@@ -23,29 +26,76 @@ const Sidebar = ({ isOpen, closeSidebar }) => {
const menuItem = async () => {
try {
if (localStorage.getItem("defaultmenuid")) {
const menuId = localStorage.getItem("defaultmenuid") !== "VPh91h0ZHk";
if (menuId) {
setmenuList(sidebarList);
} else {
const addUserForm = {
icon: "fa-light fa-user",
title: "Add User",
target: "_self",
pageType: "form",
description: "",
objectId: "lM0xRnM3iE"
};
const Extand_Class = localStorage.getItem("Extand_Class");
const extClass = Extand_Class && JSON.parse(Extand_Class);
// console.log("extClass ", extClass);
let userRole = "contracts_User";
if (extClass && extClass.length > 0) {
userRole = extClass[0].UserRole;
}
if (
userRole === "contracts_Admin" ||
userRole === "contracts_OrgAdmin"
) {
const newSidebarList = sidebarList.map((item) => {
if (item.title === "Settings") {
// Make a shallow copy of the item
const newItem = { ...item };
// Insert addUserForm at the second position
newItem.children.splice(1, 0, addUserForm);
if (isEnableSubscription) {
newItem.children = [
...newItem.children,
{
icon: "fa-light fa-building-memo",
title: "Teams",
target: "_self",
pageType: "",
description: "",
objectId: "teams"
},
{
icon: "fa-light fa-users fa-fw",
title: "Users",
target: "_self",
pageType: "",
description: "",
objectId: "users"
}
];
} else {
const arr = newItem.children.slice(0, 1);
newItem.children = [
...arr,
{
icon: "fa-light fa-users fa-fw",
title: "Users",
target: "_self",
pageType: "",
description: "",
objectId: "users"
}
];
}
return newItem;
}
return item;
});
setmenuList(newSidebarList);
} else {
if (!isEnableSubscription) {
const newSidebarList = sidebarList.map((item) => {
if (item.title === "Settings") {
// Make a shallow copy of the item
const newItem = { ...item };
const arr = newItem.children.slice(0, 1);
newItem.children = arr;
return newItem;
}
return item;
});
setmenuList(newSidebarList);
} else {
setmenuList(sidebarList);
}
}
}
} catch (e) {
@@ -61,13 +111,19 @@ const Sidebar = ({ isOpen, closeSidebar }) => {
closeSidebar();
setSubmenuOpen({});
};
const handleProfile = () => {
navigate("/profile");
};
return (
<aside
className={`absolute lg:relative bg-base-100 h-screen overflow-y-auto transition-all z-[999] shadow-lg hide-scrollbar
className={`absolute lg:relative bg-base-100 h-screen overflow-y-auto transition-all z-[500] shadow-lg hide-scrollbar
${isOpen ? "w-full md:w-[300px]" : "w-0"}`}
>
<div className="flex px-2 py-3 gap-2 items-center shadow-md">
<div className="w-[75px] h-[75px] rounded-full ring-[2px] ring-offset-2 ring-gray-400 overflow-hidden">
<div
onClick={() => handleProfile()}
className="w-[75px] h-[75px] rounded-full ring-[2px] ring-offset-2 ring-gray-400 overflow-hidden cursor-pointer"
>
<img
className="w-full h-full object-contain"
src={image}
@@ -75,9 +131,15 @@ const Sidebar = ({ isOpen, closeSidebar }) => {
/>
</div>
<div>
<p className="text-[14px] font-bold text-base-content">{username}</p>
<p
className={`text-[12px] text-base-content ${
onClick={handleProfile}
className="text-[14px] font-bold text-base-content cursor-pointer"
>
{username}
</p>
<p
onClick={handleProfile}
className={`cursor-pointer text-[12px] text-base-content ${
tenantname ? "mt-2" : ""
}`}
>
@@ -1,27 +1,54 @@
import React from "react";
import { useTranslation } from "react-i18next";
import { NavLink } from "react-router-dom";
const SocialMedia = () => {
return (
<React.Fragment>
<NavLink to="https://github.com/opensignlabs/opensign" target="_blank" rel="noopener noreferrer">
<i aria-hidden="true" className="fa-brands fa-github"></i>
<span className="fa-sr-only">OpenSign&apos;s Github</span>
</NavLink>
<NavLink to="https://www.linkedin.com/company/opensign%E2%84%A2/" target="_blank" rel="noopener noreferrer">
<i aria-hidden="true" className="fa-brands fa-linkedin"></i>
<span className="fa-sr-only">OpenSign&apos;s LinkedIn</span>
</NavLink>
<NavLink to="https://www.twitter.com/opensignlabs" target="_blank" rel="noopener noreferrer">
<i aria-hidden="true" className="fa-brands fa-square-x-twitter"></i>
<span className="fa-sr-only">OpenSign&apos;s Twitter</span>
</NavLink>
<NavLink to="https://discord.com/invite/xe9TDuyAyj" target="_blank" rel="noopener noreferrer">
<i aria-hidden="true" className="fa-brands fa-discord"></i>
<span className="fa-sr-only">OpenSign&apos;s Discord</span>
</NavLink>
</React.Fragment>
)
}
const { t } = useTranslation();
export default SocialMedia;
return (
<React.Fragment>
<NavLink
to="https://github.com/opensignlabs/opensign"
target="_blank"
rel="noopener noreferrer"
>
<i aria-hidden="true" className="fa-brands fa-github"></i>
<span className="fa-sr-only">
OpenSign&apos;s {t("social-media.github")}
</span>
</NavLink>
<NavLink
to="https://www.linkedin.com/company/opensign%E2%84%A2/"
target="_blank"
rel="noopener noreferrer"
>
<i aria-hidden="true" className="fa-brands fa-linkedin"></i>
<span className="fa-sr-only">
OpenSign&apos;s {t("social-media.linked-in")}
</span>
</NavLink>
<NavLink
to="https://www.twitter.com/opensignlabs"
target="_blank"
rel="noopener noreferrer"
>
<i aria-hidden="true" className="fa-brands fa-square-x-twitter"></i>
<span className="fa-sr-only">
OpenSign&apos;s {t("social-media.twitter")}
</span>
</NavLink>
<NavLink
to="https://discord.com/invite/xe9TDuyAyj"
target="_blank"
rel="noopener noreferrer"
>
<i aria-hidden="true" className="fa-brands fa-discord"></i>
<span className="fa-sr-only">
OpenSign&apos;s {t("social-media.discord")}
</span>
</NavLink>
</React.Fragment>
);
};
export default SocialMedia;
@@ -1,7 +1,9 @@
import React from "react";
import { useTranslation } from "react-i18next";
import { NavLink } from "react-router-dom";
const Submenu = ({ item, closeSidebar, toggleSubmenu, submenuOpen }) => {
const { t } = useTranslation();
const { title, icon, children } = item;
return (
<li role="none" className="my-0.5">
@@ -14,7 +16,7 @@ const Submenu = ({ item, closeSidebar, toggleSubmenu, submenuOpen }) => {
>
<i className={`${icon} text-[18px]`}></i>
<div className="flex justify-between items-center w-full">
<span className="ml-3 lg:ml-4">{title}</span>
<span className="ml-3 lg:ml-4">{t(`sidebar.${item.title}`)}</span>
<i
className={`${
submenuOpen[item.title]
@@ -48,7 +50,9 @@ const Submenu = ({ item, closeSidebar, toggleSubmenu, submenuOpen }) => {
className={`${childItem.icon} text-[18px]`}
aria-hidden="true"
></i>
<span className="ml-3 lg:ml-4">{childItem.title}</span>
<span className="ml-3 lg:ml-4">
{t(`sidebar.${item.title}-Children.${childItem.title}`)}
</span>
</NavLink>
</li>
))}
+226 -123
View File
@@ -1,20 +1,27 @@
import axios from "axios";
import moment from "moment";
import { isEnableSubscription } from "./const";
import React from "react";
import { rgb } from "pdf-lib";
import Parse from "parse";
import { appInfo } from "./appinfo";
import { saveAs } from "file-saver";
import printModule from "print-js";
import { validplan } from "../json/plansArr";
import fontkit from "@pdf-lib/fontkit";
export const fontsizeArr = [7, 8, 9, 10, 11, 12, 13, 14, 15, 18];
export const fontsizeArr = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28];
export const fontColorArr = ["red", "black", "blue", "yellow"];
export const isMobile = window.innerWidth < 767;
export const isTabAndMobile = window.innerWidth < 1023;
export const textInputWidget = "text input";
export const textWidget = "text";
export const radioButtonWidget = "radio button";
export const fileasbytes = async (filepath) => {
const response = await fetch(filepath); // Adjust the path accordingly
const arrayBuffer = await response.arrayBuffer();
return new Uint8Array(arrayBuffer);
};
export const openInNewTab = (url, target) => {
if (target) {
window.open(url, target, "noopener,noreferrer");
@@ -63,7 +70,7 @@ export async function fetchSubscription(
return { plan: "", billingDate: "" };
}
}
//function to get subcripition details from Extand user class
//function to get subcripition details from subscription class
export async function checkIsSubscribed() {
try {
const res = await fetchSubscription();
@@ -84,6 +91,28 @@ export async function checkIsSubscribed() {
}
}
//function to get subcripition details from subscription class
export async function checkIsSubscribedTeam() {
try {
const res = await fetchSubscription();
if (res.plan === "freeplan") {
return false;
} else if (res.billingDate) {
const plan = validplan[res.plan] || false;
if (plan && new Date(res.billingDate) > new Date()) {
return true;
} else {
return false;
}
} else {
return false;
}
} catch (err) {
console.log("Err in fetch subscription", err);
return false;
}
}
export const color = [
"#93a3db",
"#e6c3db",
@@ -151,7 +180,7 @@ export const getDrive = async (documentId, skip = 0, limit = 100) => {
}
})
.catch((err) => {
console.log("Err ", err);
console.log("Err in getDrive cloud function", err);
return "Error: Something went wrong!";
});
@@ -165,32 +194,19 @@ export const pdfNewWidthFun = (divRef) => {
};
//`contractUsers` function is used to get contract_User details
export const contractUsers = async (email) => {
const data = {
email: email
};
const userDetails = await axios
.post(`${localStorage.getItem("baseUrl")}functions/getUserDetails`, data, {
headers: {
"Content-Type": "application/json",
"X-Parse-Application-Id": localStorage.getItem("parseAppId"),
sessionToken: localStorage.getItem("accesstoken")
}
})
.then((Listdata) => {
const json = Listdata.data;
let data = [];
if (json && json.result) {
data.push(json.result);
}
return data;
})
.catch((err) => {
console.log("Err ", err);
return "Error: Something went wrong!";
});
return userDetails;
export const contractUsers = async () => {
try {
const userDetails = await Parse.Cloud.run("getUserDetails");
let data = [];
if (userDetails) {
const json = JSON.parse(JSON.stringify(userDetails));
data.push(json);
}
return data;
} catch (err) {
console.log("Err in getUserDetails cloud function", err);
return "Error: Something went wrong!";
}
};
//function for resize image and update width and height for mulitisigners
@@ -244,7 +260,6 @@ export const handleImageResize = (
}
}
};
export const widgets = [
{
type: "signature",
@@ -326,7 +341,7 @@ export const getDate = () => {
};
export const addWidgetOptions = (type) => {
const defaultOpt = {
name: "",
name: type,
status: "required"
};
switch (type) {
@@ -374,14 +389,14 @@ export const addWidgetOptions = (type) => {
return {};
}
};
export const getWidgetType = (item) => {
export const getWidgetType = (item, widgetName) => {
return (
<div className="op-btn w-fit md:w-[100%] op-btn-primary op-btn-outline op-btn-sm focus:outline-none outline outline-[1.5px] ml-[6px] md:ml-0 p-0 overflow-hidden">
<div className="w-full h-full flex md:justify-between items-center">
<div className="flex justify-start items-center text-[13px] ml-1">
{!isMobile && <i className="fa-light fa-grip-vertical ml-[3px]"></i>}
<span className="md:inline-block text-center text-[15px] ml-[5px] font-semibold pr-1 md:pr-0">
{item.type}
{widgetName}
</span>
</div>
<div className="text-[20px] op-btn op-btn-primary rounded-none w-[40px] h-full flex justify-center items-center">
@@ -431,7 +446,7 @@ export const resizeBorderExtraWidth = () => {
return 20;
};
export async function getBase64FromUrl(url) {
export async function getBase64FromUrl(url, autosign) {
const data = await fetch(url);
const blob = await data.blob();
return new Promise((resolve) => {
@@ -439,8 +454,12 @@ export async function getBase64FromUrl(url) {
reader.readAsDataURL(blob);
reader.onloadend = function () {
const pdfBase = this.result;
const suffixbase64 = pdfBase.split(",").pop();
resolve(suffixbase64);
if (autosign) {
resolve(pdfBase);
} else {
const suffixbase64 = pdfBase.split(",").pop();
resolve(suffixbase64);
}
};
});
}
@@ -523,25 +542,22 @@ export const signPdfFun = async (
base64Url,
documentId,
signerObjectId,
setIsAlert,
objectId,
isSubscribed,
activeMailAdapter,
xyPosition
widgets
) => {
let singleSign,
isCustomCompletionMail = false;
let isCustomCompletionMail = false;
try {
//get tenant details
const tenantDetails = await getTenantDetails(objectId);
if (tenantDetails && tenantDetails === "user does not exist!") {
alert("User does not exist");
return { status: "error", message: "User does not exist." };
} else {
if (
tenantDetails?.CompletionBody &&
tenantDetails?.CompletionSubject &&
(!isEnableSubscription || isSubscribed)
isSubscribed
) {
isCustomCompletionMail = true;
}
@@ -550,7 +566,7 @@ export const signPdfFun = async (
// below for loop is used to get first signature of user to send if to signpdf
// for adding it in completion certificate
let getSignature;
for (let item of xyPosition) {
for (let item of widgets) {
if (!getSignature) {
const typeExist = item.pos.some((data) => data?.type);
if (typeExist) {
@@ -569,14 +585,15 @@ export const signPdfFun = async (
base64Sign = await fetchImageBase64(base64Sign);
} catch (e) {
console.log("error", e);
return { status: "error", message: "something went wrong." };
}
}
//change image width and height to 104/44 in png base64
//change image width and height to 100/40 in png base64
const getNewse64 = await changeImageWH(base64Sign);
//remove suffiix of base64
const suffixbase64 = getNewse64 && getNewse64.split(",").pop();
singleSign = {
const params = {
mailProvider: activeMailAdapter,
pdfFile: base64Url,
docId: documentId,
@@ -584,34 +601,25 @@ export const signPdfFun = async (
isCustomCompletionMail: isCustomCompletionMail,
signature: suffixbase64
};
const response = await axios
.post(`${localStorage.getItem("baseUrl")}functions/signPdf`, singleSign, {
headers: {
"Content-Type": "application/json",
"X-Parse-Application-Id": localStorage.getItem("parseAppId"),
// sessionToken: localStorage.getItem("accesstoken")
"X-Parse-Session-Token": localStorage.getItem("accesstoken")
}
})
.then((Listdata) => {
const json = Listdata.data;
const res = json.result;
return res;
})
.catch((err) => {
console.log("Err ", err);
setIsAlert({
isShow: true,
alertMessage: "something went wrong"
});
});
return response;
const resSignPdf = await Parse.Cloud.run("signPdf", params);
if (resSignPdf) {
const signedPdf = JSON.parse(JSON.stringify(resSignPdf));
return signedPdf;
}
} catch (e) {
setIsAlert({
isShow: true,
alertMessage: "something went wrong"
});
console.log("Err in signPdf cloud function ", e.message);
if (e && e?.message?.includes("is encrypted.")) {
return {
status: "error",
message: "Currently encrypted pdf files are not supported."
};
} else if (
e.message === "PKCS#12 MAC could not be verified. Invalid password?"
) {
return { status: "error", message: "PFX file password is invalid." };
} else {
return { status: "error", message: "something went wrong." };
}
}
};
@@ -669,9 +677,7 @@ export const createDocument = async (template, placeholders, signerData) => {
try {
const res = await axios.post(
`${localStorage.getItem("baseUrl")}classes/${localStorage.getItem(
"_appName"
)}_Document`,
`${localStorage.getItem("baseUrl")}classes/contracts_Document`,
data,
{
headers: {
@@ -1026,8 +1032,13 @@ export const addInitialData = (signerPos, setXyPostion, value, userId) => {
//function for embed document id
export const embedDocId = async (pdfDoc, documentId, allPages) => {
// `fontBytes` is used to embed custom font in pdf
const fontBytes = await fileasbytes(
"https://cdn.opensignlabs.com/webfonts/times.ttf"
);
pdfDoc.registerFontkit(fontkit);
const font = await pdfDoc.embedFont(fontBytes, { subset: true });
for (let i = 0; i < allPages; i++) {
const font = await pdfDoc.embedFont("Helvetica");
const fontSize = 10;
const textContent = documentId && `OpenSign™ DocumentId: ${documentId} `;
const pages = pdfDoc.getPages();
@@ -1203,8 +1214,8 @@ export const fetchImageBase64 = async (imageUrl) => {
};
//function for select image and upload image
export const changeImageWH = async (base64Image) => {
const newWidth = 100;
const newHeight = 40;
const newWidth = 300;
const newHeight = 120;
return new Promise((resolve, reject) => {
const img = new Image();
img.src = base64Image;
@@ -1213,9 +1224,8 @@ export const changeImageWH = async (base64Image) => {
const ctx = canvas.getContext("2d");
canvas.width = newWidth;
canvas.height = newHeight;
ctx.imageSmoothingEnabled = false;
ctx.drawImage(img, 0, 0, newWidth, newHeight);
const resizedBase64 = canvas.toDataURL("image/png", 1);
const resizedBase64 = canvas.toDataURL("image/png", 1.0);
resolve(resizedBase64);
};
img.onerror = (error) => {
@@ -1224,14 +1234,36 @@ export const changeImageWH = async (base64Image) => {
});
};
//function to calculate font size of text area widgets
const calculateFontSize = (position, containerScale, signyourself) => {
const font = position?.options?.fontSize || 12;
if (!signyourself && position?.isMobile && position?.scale) {
return font / position?.scale / containerScale;
} else {
return font / containerScale;
}
};
//function for embed multiple signature using pdf-lib
export const multiSignEmbed = async (
xyPositionArray,
widgets,
pdfDoc,
signyourself,
scale
scale,
pdfOriginalWH,
containerWH
) => {
for (let item of xyPositionArray) {
// `fontBytes` is used to embed custom font in pdf
const fontBytes = await fileasbytes(
"https://cdn.opensignlabs.com/webfonts/times.ttf"
);
pdfDoc.registerFontkit(fontkit);
const font = await pdfDoc.embedFont(fontBytes, { subset: true });
for (let item of widgets) {
const containerScale = getContainerScale(
pdfOriginalWH,
item?.pageNumber,
containerWH
);
const typeExist = item.pos.some((data) => data?.type);
let updateItem;
@@ -1329,7 +1361,6 @@ export const multiSignEmbed = async (
"email"
].includes(position.type);
if (position.type === "checkbox") {
const font = await pdfDoc.embedFont("Helvetica");
let checkboxOptionGapFromTop, isCheck;
let y = yPos(position);
const optionsFontSize = 13;
@@ -1377,7 +1408,7 @@ export const multiSignEmbed = async (
width: checkboxSize,
height: checkboxSize
};
checkboxObj = getImagePosition(page, checkboxObj, 1);
checkboxObj = getWidgetPosition(page, checkboxObj, 1);
checkbox.addToPage(page, checkboxObj);
//applied which checkbox should be checked
@@ -1390,8 +1421,13 @@ export const multiSignEmbed = async (
});
}
} else if (widgetTypeExist) {
const font = await pdfDoc.embedFont("Helvetica");
const fontSize = parseInt(position?.options?.fontSize) || 12;
const fontSize = calculateFontSize(
position,
containerScale,
signyourself
);
parseInt(fontSize);
const color = position?.options?.fontColor;
let updateColorInRgb;
if (color === "red") {
@@ -1497,13 +1533,12 @@ export const multiSignEmbed = async (
width: widgetWidth,
height: widgetHeight
};
const dropdownOption = getImagePosition(page, dropdownObj, 1);
// page.drawImage(img, imageOptions);
dropdown.addToPage(page, dropdownOption);
dropdown.defaultUpdateAppearances(font);
const dropdownOption = getWidgetPosition(page, dropdownObj, 1);
const dropdownSelected = { ...dropdownOption, font: font };
dropdown.addToPage(page, dropdownSelected);
dropdown.enableReadOnly();
} else if (position.type === radioButtonWidget) {
const font = await pdfDoc.embedFont("Helvetica");
const radioRandomId = "radio" + randomId();
const radioGroup = form.createRadioGroup(radioRandomId);
let radioOptionGapFromTop;
@@ -1542,7 +1577,7 @@ export const multiSignEmbed = async (
height: radioSize
};
radioObj = getImagePosition(page, radioObj, 1);
radioObj = getWidgetPosition(page, radioObj, 1);
radioGroup.addOptionToPage(item, page, radioObj);
});
}
@@ -1560,13 +1595,13 @@ export const multiSignEmbed = async (
height: widgetHeight
};
const imageOptions = getImagePosition(page, signature, 1);
const imageOptions = getWidgetPosition(page, signature, 1);
page.drawImage(img, imageOptions);
}
});
}
const pdfBytes = await pdfDoc.saveAsBase64({ useObjectStreams: false });
// console.log("pdf", pdfBytes);
//console.log("pdf", pdfBytes);
return pdfBytes;
};
@@ -1618,9 +1653,9 @@ export const placeholderHeight = (pos) => {
export const contactBook = async (objectId) => {
const result = await axios
.get(
`${localStorage.getItem("baseUrl")}classes/${localStorage.getItem(
"_appName"
)}_Contactbook?where={"objectId":"${objectId}"}`,
`${localStorage.getItem(
"baseUrl"
)}classes/contracts_Contactbook?where={"objectId":"${objectId}"}`,
{
headers: {
"Content-Type": "application/json",
@@ -1636,7 +1671,7 @@ export const contactBook = async (objectId) => {
})
.catch((err) => {
console.log("Err ", err);
console.log("Err in contracts_Contactbook class ", err);
return "Error: Something went wrong!";
});
return result;
@@ -1668,7 +1703,7 @@ export const contractDocument = async (documentId) => {
}
})
.catch((err) => {
console.log("Err ", err);
console.log("Err in getDocument cloud function ", err);
return "Error: Something went wrong!";
});
@@ -1830,18 +1865,21 @@ export const getFileName = (fileUrl) => {
//fetch tenant app logo from `partners_Tenant` class by domain name
export const getAppLogo = async () => {
const domainName = window.location.host;
try {
const tenantCreditsQuery = new Parse.Query("partners_Tenant");
tenantCreditsQuery.equalTo("Domain", domainName);
const res = await tenantCreditsQuery.first();
if (res) {
const updateRes = JSON.parse(JSON.stringify(res));
return updateRes?.Logo;
if (window.location.host === "app.opensignlabs.com") {
return { logo: appInfo.applogo, user: "exist" };
} else {
const domain = window.location.host;
try {
const tenant = await Parse.Cloud.run("getlogobydomain", {
domain: domain
});
if (tenant) {
return { logo: tenant?.logo, user: tenant?.user };
}
} catch (err) {
console.log("err in getlogo ", err);
return { logo: appInfo.applogo, user: "exist" };
}
} catch (e) {
return null;
}
};
@@ -1885,14 +1923,14 @@ export function replaceMailVaribles(subject, body, variables) {
return result;
}
export const copytoData = (text) => {
export const copytoData = (url) => {
// navigator.clipboard.writeText(text);
if (navigator.clipboard) {
navigator.clipboard.writeText(text);
navigator.clipboard.writeText(url);
} else {
// Fallback for browsers that don't support navigator.clipboard
const textArea = document.createElement("textarea");
textArea.value = text;
textArea.value = url;
document.body.appendChild(textArea);
textArea.select();
document.execCommand("copy");
@@ -1929,6 +1967,20 @@ export const handleSendOTP = async (email) => {
alert(error.message);
}
};
export const fetchUrl = async (url, pdfName) => {
try {
const response = await fetch(url);
if (!response.ok) {
alert("something went wrong, please try again later.");
throw new Error("Network response was not ok");
}
const blob = await response.blob();
saveAs(blob, `${sanitizeFileName(pdfName)}_signed_by_OpenSign™.pdf`);
} catch (error) {
alert("something went wrong, please try again later.");
console.error("Error downloading the file:", error);
}
};
//handle download signed pdf
export const handleDownloadPdf = async (
pdfDetails,
@@ -1940,18 +1992,18 @@ export const handleDownloadPdf = async (
try {
// const url = await Parse.Cloud.run("getsignedurl", { url: pdfUrl });
const axiosRes = await axios.post(
`${appInfo.baseUrl}/functions/getsignedurl`,
`${localStorage.getItem("baseUrl")}/functions/getsignedurl`,
{ url: pdfUrl },
{
headers: {
"content-type": "Application/json",
"X-Parse-Application-Id": appInfo.appId,
"X-Parse-Application-Id": localStorage.getItem("parseAppId"),
"X-Parse-Session-Token": localStorage.getItem("accesstoken")
}
}
);
const url = axiosRes.data.result;
saveAs(url, `${sanitizeFileName(pdfName)}_signed_by_OpenSign™.pdf`);
await fetchUrl(url, pdfName);
setIsDownloading("");
} catch (err) {
console.log("err in getsignedurl", err);
@@ -1970,13 +2022,15 @@ export const handleToPrint = async (event, pdfUrl, setIsDownloading) => {
setIsDownloading("pdf");
try {
// const url = await Parse.Cloud.run("getsignedurl", { url: pdfUrl });
//`localStorage.getItem("baseUrl")` is also use in public-profile flow for public-sign
//if we give this `appInfo.baseUrl` as a base url then in public-profile it will create base url of it's window.location.origin ex- opensign.me which is not base url
const axiosRes = await axios.post(
`${appInfo.baseUrl}/functions/getsignedurl`,
`${localStorage.getItem("baseUrl")}/functions/getsignedurl`,
{ url: pdfUrl },
{
headers: {
"content-type": "Application/json",
"X-Parse-Application-Id": appInfo.appId,
"X-Parse-Application-Id": localStorage.getItem("parseAppId"),
"X-Parse-Session-Token": localStorage.getItem("accesstoken")
}
}
@@ -2144,8 +2198,8 @@ function compensateRotation(
}
}
// `getImagePosition` is used to calulcate position of image type widget like x, y, width, height for pdf-lib
function getImagePosition(page, image, sizeRatio) {
// `getWidgetPosition` is used to calulcate position of image type widget like x, y, width, height for pdf-lib
function getWidgetPosition(page, image, sizeRatio) {
let pageWidth;
// pageHeight;
if ([90, 270].includes(page.getRotation().angle)) {
@@ -2181,3 +2235,52 @@ function getImagePosition(page, image, sizeRatio) {
rotate: page.getRotation()
};
}
//function to use calculate pdf rendering scale in the container
export const getContainerScale = (pdfOriginalWH, pageNumber, containerWH) => {
const getPdfPageWidth = pdfOriginalWH.find(
(data) => data.pageNumber === pageNumber
);
const containerScale = containerWH?.width / getPdfPageWidth?.width || 1;
return containerScale;
};
//function to get current laguage and set it in local
export const saveLanguageInLocal = (i18n) => {
const detectedLanguage = i18n.language || "en";
localStorage.setItem("i18nextLng", detectedLanguage);
};
//function to get default signatur eof current user from `contracts_Signature` class
export const getDefaultSignature = async (objectId) => {
try {
const query = new Parse.Query("contracts_Signature");
query.equalTo("UserId", {
__type: "Pointer",
className: "_User",
objectId: objectId
});
const result = await query.first();
if (result) {
const res = JSON.parse(JSON.stringify(result));
const defaultSignature = res?.ImageURL
? await getBase64FromUrl(res?.ImageURL, true)
: "";
const defaultInitial = res?.Initials
? await getBase64FromUrl(res?.Initials, true)
: "";
return {
status: "success",
res: {
defaultSignature: defaultSignature,
defaultInitial: defaultInitial
}
};
}
} catch (err) {
console.log("Error: error in fetch data in contracts_Signature", err);
return {
status: "error"
};
}
};
+38 -15
View File
@@ -1,12 +1,23 @@
import logo from "../assets/images/logo.png";
import { isEnableSubscription } from "./const";
export function serverUrl_fn() {
let baseUrl;
if (isEnableSubscription) {
baseUrl = process.env.REACT_APP_SERVERURL
? process.env.REACT_APP_SERVERURL
: window.location.origin + "/api/app";
} else {
baseUrl = process.env.REACT_APP_SERVERURL
? process.env.REACT_APP_SERVERURL
: window.location.origin + "/app";
}
return baseUrl;
}
export const appInfo = {
appTitle: "contracts",
applogo: logo,
appname: "contracts",
appId: process.env.REACT_APP_APPID ? process.env.REACT_APP_APPID : "opensign",
baseUrl: process.env.REACT_APP_SERVERURL
? process.env.REACT_APP_SERVERURL
: window.location.origin + "/api/app",
baseUrl: serverUrl_fn(),
defaultRole: "contracts_User",
fbAppId: process.env.REACT_APP_FBAPPID
? `${process.env.REACT_APP_FBAPPID}`
@@ -18,22 +29,34 @@ export const appInfo = {
: "",
metaDescription:
"The fastest way to sign PDFs & request signatures from others.",
objectId: "aIPmIvMzGM",
settings: [
{
role: "contracts_User",
menuId: "H9vRfEYKhT",
pageType: "dashboard",
pageId: "35KBoSgoAK",
extended_class: "contracts_Users"
},
{
role: "contracts_Admin",
menuId: "VPh91h0ZHk",
pageType: "dashboard",
pageId: "35KBoSgoAK",
extended_class: "contracts_Users"
},
{
role: "contracts_OrgAdmin",
menuId: "VPh91h0ZHk",
pageType: "dashboard",
pageId: "35KBoSgoAK",
extended_class: "contracts_Users"
},
{
role: "contracts_Editor",
menuId: "H9vRfEYKhT",
pageType: "dashboard",
pageId: "35KBoSgoAK",
extended_class: "contracts_Users"
},
{
role: "contracts_User",
menuId: "H9vRfEYKhT",
pageType: "dashboard",
pageId: "35KBoSgoAK",
extended_class: "contracts_Users"
}
],
version: "0.1"
]
};
+10 -1
View File
@@ -3,4 +3,13 @@ export const templateCls = "contracts_Template";
export const documentCls = "contracts_Document";
export const themeColor = "#47a3ad";
export const iconColor = "#686968";
export const isEnableSubscription = process.env.REACT_APP_ENABLE_SUBSCRIPTION;
export const emailRegex = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
export const isEnableSubscription =
process.env.REACT_APP_ENABLE_SUBSCRIPTION &&
process.env.REACT_APP_ENABLE_SUBSCRIPTION?.toLowerCase() === "true"
? true
: false;
export const isStaging =
window.location.origin === "https://staging-app.opensignlabs.com";
export const isPublicStaging =
window.location.origin === "https://staging.opensign.me";
+2 -4
View File
@@ -1,11 +1,9 @@
import axios from "axios";
import { serverUrl_fn } from "./appinfo";
const parseAppId = process.env.REACT_APP_APPID
? process.env.REACT_APP_APPID
: "opensign";
const serverUrl = process.env.REACT_APP_SERVERURL
? process.env.REACT_APP_SERVERURL
: window.location.origin + "/api/app";
const serverUrl = serverUrl_fn()
export const SaveFileSize = async (size, imageUrl, tenantId) => {
//checking server url and save file's size
const tenantPtr = {
+31
View File
@@ -0,0 +1,31 @@
import i18n from "i18next";
import { initReactI18next } from "react-i18next";
import Backend from "i18next-http-backend";
import LanguageDetector from "i18next-browser-languagedetector";
i18n
.use(Backend)
.use(LanguageDetector) // Use LanguageDetector directly without creating an instance
.use(initReactI18next)
.init({
backend: {
loadPath: "/locales/{{lng}}/{{ns}}.json"
},
fallbackLng: "en", // Fallback to English if no other language is detected
detection: {
// Specifies the default language to fall back to if the detected language is not available.
order: ["localStorage", "navigator"],
// Defines where the detected language should be cached.
caches: ["localStorage"]
},
ns: ["translation"], // default namespace
defaultNS: "translation", // default namespace
//Enables debug mode, which outputs detailed logs to the console about the translation process.
debug: false,
interpolation: {
escapeValue: false // Not needed for react as it escapes by default
},
whitelist: ["en", "fr"] // List of allowed languages
});
export default i18n;
+5 -4
View File
@@ -16,13 +16,14 @@ import {
import DragElement from "./components/pdf/DragElement";
import TagManager from "react-gtm-module";
import Parse from "parse";
import './polyfills'
import "./polyfills";
import { serverUrl_fn } from "./constant/appinfo";
import "./i18n";
const appId = process.env.REACT_APP_APPID
? process.env.REACT_APP_APPID
: "opensign";
const serverUrl = process.env.REACT_APP_SERVERURL
? process.env.REACT_APP_SERVERURL
: window.location.origin + "/api/app";
const serverUrl = serverUrl_fn();
Parse.initialize(appId);
Parse.serverURL = serverUrl;
+96 -62
View File
@@ -1,7 +1,16 @@
export default function reportJson(id) {
// console.log("json ", json);
const head = ["Sr.No", "Title", "Note", "Folder", "File", "Owner", "Signers"];
const contactbook = ["Sr.No", "Title", "Email", "Phone"];
const declineHead = [
"Sr.No",
"Title",
"Reason",
"Folder",
"File",
"Owner",
"Signers"
];
const contactbook = ["Sr.No", "Name", "Email", "Phone"];
const dashboardReportHead = ["Title", "File", "Owner", "Signers"];
const templateReport = ["Sr.No", "Title", "File", "Owner", "Signers"];
switch (id) {
@@ -43,7 +52,7 @@ export default function reportJson(id) {
hoverLabel: "Sign",
btnColor: "op-btn-primary",
btnIcon: "fa-light fa-signature",
redirectUrl: "pdfRequestFiles",
redirectUrl: "draftDocument",
action: "redirect"
}
],
@@ -69,7 +78,7 @@ export default function reportJson(id) {
hoverLabel: "View",
btnColor: "op-btn-secondary",
btnIcon: "fa-light fa-eye",
redirectUrl: "pdfRequestFiles",
redirectUrl: "draftDocument",
action: "redirect"
},
{
@@ -140,7 +149,7 @@ export default function reportJson(id) {
case "UPr2Fm5WY3":
return {
reportName: "Declined Documents",
heading: head,
heading: declineHead,
actions: [
{
btnId: "1458",
@@ -207,7 +216,7 @@ export default function reportJson(id) {
hoverLabel: "View",
btnColor: "op-btn-secondary",
btnIcon: "fa-light fa-eye",
redirectUrl: "pdfRequestFiles",
redirectUrl: "draftDocument",
action: "redirect"
},
{
@@ -258,7 +267,7 @@ export default function reportJson(id) {
hoverLabel: "Sign",
btnColor: "op-btn-primary",
btnIcon: "fa-light fa-signature",
redirectUrl: "pdfRequestFiles",
redirectUrl: "draftDocument",
action: "redirect"
}
]
@@ -306,68 +315,93 @@ export default function reportJson(id) {
"This is a list of contacts/signers added by you. These will appear as suggestions when you try to add signers to a new document."
};
// template report
case "6TeaPr321t":
case "6TeaPr321t": {
const templateAct = [
{
btnId: "2234",
btnLabel: "Use",
hoverLabel: "Use",
btnColor: "op-btn-primary",
btnIcon: "fa-light fa-plus",
redirectUrl: "placeHolderSign",
action: "redirect",
selector: "reactourSecond"
},
{
btnId: "1631",
btnLabel: "Quick send",
hoverLabel: "Quick send",
btnColor: "op-btn-secondary",
btnIcon: "fa-light fa-envelope",
redirectUrl: "",
action: "bulksend",
selector: "tourbulksend"
},
{
btnId: "2234",
hoverLabel: "option",
btnColor: "",
textColor: "black",
btnIcon: "fa-light fa-ellipsis-vertical fa-lg",
action: "option",
selector: "reactourThird",
subaction: [
{
btnId: "2434",
btnLabel: "Edit",
hoverLabel: "Edit",
btnIcon: "fa-light fa-pen",
redirectUrl: "template",
action: "redirect"
},
{
btnId: "1834",
btnLabel: "Delete",
hoverLabel: "Delete",
btnIcon: "fa-light fa-trash",
redirectUrl: "",
action: "delete"
}
]
}
];
const Extand_Class = localStorage.getItem("Extand_Class");
const extClass = Extand_Class && JSON.parse(Extand_Class);
// console.log("extClass ", extClass);
let templateActions = templateAct;
if (extClass && extClass.length > 0) {
if (extClass?.[0]?.UserRole !== "contracts_User") {
templateActions = templateAct.map((item) => {
if (item.action === "option") {
// Make a shallow copy of the item
const newItem = { ...item };
newItem.subaction = [
{
btnId: "1873",
btnLabel: "Share with team",
hoverLabel: "Share with team",
btnIcon: "fa-light fa-share-nodes",
redirectUrl: "",
action: "sharewith"
},
...newItem.subaction
];
return newItem;
}
return item;
});
}
}
return {
reportName: "Templates",
heading: templateReport,
actions: [
{
btnId: "2234",
btnLabel: "Use",
hoverLabel: "Use",
btnColor: "op-btn-primary",
btnIcon: "fa-light fa-plus",
redirectUrl: "placeHolderSign",
action: "redirect",
selector: "reactourSecond",
message:
"Click the 'Use' button to create a new document from an existing template. "
},
{
btnId: "1631",
btnLabel: "Quick send",
hoverLabel: "Quick send",
btnColor: "op-btn-secondary",
btnIcon: "fa-light fa-envelope",
redirectUrl: "",
action: "bulksend",
selector: "tourbulksend",
message:
"To quickly create and send multiple documents using an existing template, click the 'Quick Send' button."
},
{
btnId: "2234",
hoverLabel: "option",
btnColor: "",
textColor: "black",
btnIcon: "fa-light fa-ellipsis-vertical fa-lg",
action: "option",
selector: "reactourThird",
message:
"This menu reveals more options such as Edit & Delete. Use the 'Edit' button to add signer roles, modify fields, and update your template. Changes will apply to all future documents created from this template but wont affect existing documents.Use the Delete button you can delete template. ",
subaction: [
{
btnId: "2434",
btnLabel: "Edit",
hoverLabel: "Edit",
btnIcon: "fa-light fa-pen",
redirectUrl: "template",
action: "redirect"
},
{
btnId: "1834",
btnLabel: "Delete",
hoverLabel: "Delete",
btnIcon: "fa-light fa-trash",
redirectUrl: "",
action: "delete"
}
]
}
],
actions: templateActions,
helpMsg:
"This is a list of templates that are available to you for creating documents. You can click the 'use' button to create a new document using a template, modify the document & add signers in the next step."
};
}
default:
return null;
}
+8 -15
View File
@@ -19,9 +19,7 @@ const dashboardJson = [
key: "count",
Redirect_type: "Report",
Redirect_id: "4Hhwbp482K",
tourSection: "tourcard1",
tourMessage:
"Clicking on this card will take you to the list of documents awaiting your review."
tourSection: "tourcard1"
}
}
},
@@ -42,9 +40,7 @@ const dashboardJson = [
key: "count",
Redirect_type: "Report",
Redirect_id: "1MwEuxLEkF",
tourSection: "tourcard2",
tourMessage:
"Clicking on this card will take you to a list of documents awaiting signature."
tourSection: "tourcard2"
}
}
},
@@ -53,10 +49,9 @@ const dashboardJson = [
widget: {
type: "report",
reportId: "5Go51Q7T8r",
label: "Recent signature requests",
data: {
tourSection: "tourreport1",
tourMessage:
"This is a list of documents that are waiting for your signature."
tourSection: "tourreport1"
}
}
},
@@ -65,10 +60,9 @@ const dashboardJson = [
widget: {
type: "report",
reportId: "d9k3UfYHBc",
label: "Recently sent for signatures",
data: {
tourSection: "tourreport2",
tourMessage:
"This is a list of documents you've sent to other parties for signature."
tourSection: "tourreport2"
}
}
},
@@ -77,10 +71,9 @@ const dashboardJson = [
widget: {
type: "report",
reportId: "kC5mfynCi4",
label: "Drafts",
data: {
tourSection: "tourreport3",
tourMessage:
"This are documents you have started but have not finalized for sending."
tourSection: "tourreport3"
}
}
}
+4 -4
View File
@@ -143,17 +143,17 @@ const sidebarList = [
icon: "fa-light fa-key",
title: "API Token",
target: "_self",
pageType: "generatetoken",
pageType: "",
description: "",
objectId: ""
objectId: "generatetoken"
},
{
icon: "fa-light fa-globe",
title: "Webhook",
target: "_self",
pageType: "webhook",
pageType: "",
description: "",
objectId: ""
objectId: "webhook"
}
]
}
+111 -16
View File
@@ -1,11 +1,14 @@
import { isStaging } from "../constant/const";
const plans = [
{
planName: "OPENSIGN™ FREE",
img: "free.png",
currency: "",
monthlyPrice: "Free",
yearlyPrice: "Free",
subtitle: "Free Unlimited E-signatures, Forever.",
btnText: "Subscribe",
btn: { text: "Subscribe", color: "op-btn-primary" },
url: "",
target: "_blank",
benefits: [
@@ -23,24 +26,44 @@ const plans = [
"Decline document support",
"Email notifications",
"Recipient authentication using OTP",
"Bulk send (upto 5 docs)",
"Public profiles",
"And much more"
],
yearlyBenefits: [
"Unlimited envelopes",
"Sign documents yourself",
"Request signatures from others",
"14 field types",
"Automatic e-signatures",
"Completion certificates",
"Send in order",
"Document templates",
"Import from Dropbox",
"Contact book",
"Document expiry support",
"Decline document support",
"Email notifications",
"Recipient authentication using OTP",
"Bulk send (upto 5 docs)",
"Public profiles",
"And much more"
]
},
{
planName: "OPENSIGN™ PROFESSIONAL",
img: "professional.png",
currency: "$",
monthlyPrice: "29.99",
yearlyPrice: "329.99",
yearlyPrice: `9.99<sup style="font-size: 17px;">/month</sup>`,
subtitle: "Exclusive Access to advanced features.",
btnText: "Subscribe",
url:
window.location.origin === "https://staging-app.opensignlabs.com"
? "https://billing.zoho.in/subscribe/9627f62a09df1c8ce500f2f4dc8328dd84ecda20eeae13878ce581d60240f206/pro-weekly"
: "https://billing.opensignlabs.com/subscribe/ef798486e6a0a11ea65f2bae8f2af901d1a09dfa8085585cdd4ec4d7f32137f3/professional-monthly",
yearlyUrl:
window.location.origin === "https://staging-app.opensignlabs.com"
? "https://billing.zoho.in/subscribe/9627f62a09df1c8ce500f2f4dc8328ddc184411129224f1f29ed84f6cef3b862/pro-yearly"
: "https://billing.opensignlabs.com/subscribe/ef798486e6a0a11ea65f2bae8f2af901d8ad1135190dff951330360e47585a71/professional-yearly",
btn: { text: "Subscribe", color: "op-btn-primary" },
url: isStaging
? "https://billing.zoho.in/subscribe/9627f62a09df1c8ce500f2f4dc8328dd84ecda20eeae13878ce581d60240f206/pro-weekly"
: "https://billing.opensignlabs.com/subscribe/ef798486e6a0a11ea65f2bae8f2af901d1a09dfa8085585cdd4ec4d7f32137f3/professional-monthly",
yearlyUrl: isStaging
? "https://billing.zoho.in/subscribe/9627f62a09df1c8ce500f2f4dc8328ddc184411129224f1f29ed84f6cef3b862/pro-yearly"
: "https://billing.opensignlabs.com/subscribe/ef798486e6a0a11ea65f2bae8f2af901d8ad1135190dff951330360e47585a71/professional-yearly",
target: "_self",
benefits: [
"Everything in OpenSign™ free",
@@ -51,18 +74,74 @@ const plans = [
"Zapier integration",
"API Access",
"100 API signatures included",
"DocumentId removal from signed docs",
"Custom email templates",
"Auto reminders"
"Auto reminders",
"Bulk send (upto 20 docs)",
"Premium Public profile usernames",
"Embedding (coming soon)"
],
yearlyBenefits: [
"Everything in OpenSign™ free",
"Field validations",
"Regular expression validations",
"Organize docs in OpenSign™ Drive",
"Webhooks",
"Zapier integration",
"API Access",
"240 API signatures included",
"Custom email templates",
"Auto reminders",
"Bulk send (upto 20 docs)",
"Premium Public profile usernames",
"Embedding (coming soon)"
]
},
{
planName: "OPENSIGN™ TEAMS",
img: "teams.png",
currency: "$",
monthlyPrice: `39.99<sup style="font-size: 17px;">/user</sup>`,
yearlyPrice: `19.99<sup style="font-size: 17px;">/user/month</sup>`,
subtitle: "Exclusive Access to advanced features.",
btn: { text: "Subscribe", color: "op-btn-accent" },
url: isStaging
? "https://billing.zoho.in/subscribe/ed8097273a82b6bf39892c11a3bb3c381eb2705736014cfbdbde1ccf1c7a189d/team-weekly"
: "https://billing.opensignlabs.com/subscribe/ef798486e6a0a11ea65f2bae8f2af901237d0702bfaa959406306635d80f138c/teams-monthly",
yearlyUrl: isStaging
? "https://billing.zoho.in/subscribe/ed8097273a82b6bf39892c11a3bb3c381eb2705736014cfbdbde1ccf1c7a189d/team-weekly"
: "https://billing.opensignlabs.com/subscribe/ef798486e6a0a11ea65f2bae8f2af9011a864994bbeeec71fcf106188630199d/teams-yearly",
target: "_self",
benefits: [
"Everything in OpenSign™ professional",
"100 API signatures included",
"Teams and Organizations",
"Share Templates with teams",
"Share Templates with individuals",
"DocumentId removal from signed docs",
"Bulk send (upto 50 docs)",
"Request Payments (coming soon)",
"Mobile app (coming soon)"
],
yearlyBenefits: [
"Everything in OpenSign™ professional",
"500 API signatures included",
"Teams and Organizations",
"Share Templates with teams",
"Share Templates with individuals",
"DocumentId removal from signed docs",
"Bulk send (upto 50 docs)",
"Request Payments (coming soon)",
"Mobile app (coming soon)"
]
},
{
planName: "OPENSIGN™ ENTERPRISE",
img: "enterprise.png",
currency: "",
monthlyPrice: "Request Price",
yearlyPrice: "Request Price",
monthlyPrice: `<p style="font-size: 22px;">Request Price</p>`,
yearlyPrice: `<p style="font-size: 22px;">Request Price</p>`,
subtitle: "Scalable Features with priority support.",
btnText: "Contact us",
btn: { text: "Contact us", color: "op-btn-primary" },
url: "https://www.opensignlabs.com/contact-us",
target: "_blank",
benefits: [
@@ -72,8 +151,24 @@ const plans = [
"Uptime SLA",
"SSO support",
"Priority support"
],
yearlyBenefits: [
"All features",
"Custom domain",
"Custom branding",
"Uptime SLA",
"SSO support",
"Priority support"
]
}
];
export const validplan = {
"team-weekly": true,
"team-yearly": true,
"teams-monthly": true,
"teams-yearly": true,
"enterprise-monthly": true,
"enterprise-yearly": true
};
export default plans;
+29 -18
View File
@@ -14,8 +14,10 @@ import { useCookies } from "react-cookie";
import { fetchSubscription } from "../constant/Utils";
import Loader from "../primitives/Loader";
import { showHeader } from "../redux/reducers/showHeader";
import { useTranslation } from "react-i18next";
const HomeLayout = () => {
const { t, i18n } = useTranslation();
const navigate = useNavigate();
const location = useLocation();
const dispatch = useDispatch();
@@ -32,6 +34,13 @@ const HomeLayout = () => {
const [, setCookie] = useCookies(["accesstoken", "main_Domain"]);
const tenantId = localStorage.getItem("TenantId");
useEffect(() => {
const language = localStorage.getItem("i18nextLng");
i18n.changeLanguage(language);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
useEffect(() => {
if (!tenantId) {
setIsUserValid(false);
@@ -40,7 +49,7 @@ const HomeLayout = () => {
try {
// Use the session token to validate the user
const userQuery = new Parse.Query(Parse.User);
const user = await userQuery.get(Parse.User.current().id, {
const user = await userQuery.get(Parse?.User?.current()?.id, {
sessionToken: localStorage.getItem("accesstoken")
});
if (user) {
@@ -67,6 +76,8 @@ const HomeLayout = () => {
const indexOfFirstDot = domainName.indexOf(".");
// Remove the first dot and get the substring starting from the next character
const updateDomain = domainName.substring(indexOfFirstDot); //.opensignlabs.com
const serverUrl = localStorage.getItem("baseUrl");
const parseAppId = localStorage.getItem("parseAppId");
setCookie("accesstoken", localStorage.getItem("accesstoken"), {
secure: true,
domain: updateDomain
@@ -75,6 +86,14 @@ const HomeLayout = () => {
secure: true,
domain: updateDomain
});
setCookie("server_url", serverUrl, {
secure: true,
domain: updateDomain
});
setCookie("parse_app_id", parseAppId, {
secure: true,
domain: updateDomain
});
};
async function checkIsSubscribed() {
@@ -109,11 +128,7 @@ const HomeLayout = () => {
}, [width]);
useEffect(() => {
if (
localStorage.getItem("domain") === "contracts" &&
arr &&
arr.length > 0
) {
if (arr && arr.length > 0) {
handleDynamicSteps();
} else {
setIsTour(false);
@@ -144,20 +159,20 @@ const HomeLayout = () => {
setTourConfigs([
{
selector: '[data-tut="reactourFirst"]',
content: `You have logged in successfully! Let's take a look.`,
content: t("tour-mssg.home-layout-1"),
position: "top"
// style: { backgroundColor: "#abd4d2" },
},
{
selector: '[data-tut="tourbutton"]',
content: `To upload documents for self-signing or to request others signatures, simply select the respective buttons.`,
content: t("tour-mssg.home-layout-2"),
position: "top"
// style: { backgroundColor: "#abd4d2" },
},
...resArr,
{
selector: '[data-tut="reactourLast"]',
content: `You are ready to start using OpenSign! If you need support feel free to contact us.`,
content: t("tour-mssg.home-layout-3"),
position: "top"
// style: { backgroundColor: "#abd4d2" },
}
@@ -171,7 +186,6 @@ const HomeLayout = () => {
setIsTour(false);
const serverUrl = localStorage.getItem("baseUrl");
const appId = localStorage.getItem("parseAppId");
const extUserClass = localStorage.getItem("extended_class");
const json = JSON.parse(localStorage.getItem("Extand_Class"));
const extUserId = json && json.length > 0 && json[0].objectId;
// console.log("extUserId ", extUserId)
@@ -193,7 +207,7 @@ const HomeLayout = () => {
// console.log("updatedTourStatus ", updatedTourStatus);
await axios.put(
serverUrl + "classes/" + extUserClass + "/" + extUserId,
serverUrl + "classes/contracts_Users/" + extUserId,
{
TourStatus: updatedTourStatus
},
@@ -207,10 +221,7 @@ const HomeLayout = () => {
};
async function checkTourStatus() {
const currentUser = Parse.User.current();
const cloudRes = await Parse.Cloud.run("getUserDetails", {
email: currentUser.get("email")
});
const cloudRes = await Parse.Cloud.run("getUserDetails");
const res = { data: cloudRes.toJSON() };
if (res.data && res.data.TourStatus && res.data.TourStatus.length > 0) {
const tourStatus = res.data.TourStatus;
@@ -241,7 +252,7 @@ const HomeLayout = () => {
const handleLoginBtn = () => {
try {
Parse.User.logOut();
Parse?.User?.logOut();
} catch (err) {
console.log("err ", err);
} finally {
@@ -251,7 +262,7 @@ const HomeLayout = () => {
};
return (
<div>
<div className="sticky top-0 z-[101]">
<div className="sticky top-0 z-[501]">
{!isLoader && <Header showSidebar={showSidebar} />}
</div>
{isUserValid ? (
@@ -293,7 +304,7 @@ const HomeLayout = () => {
<div className="flex flex-col justify-center items-center py-4 md:py-5 gap-5">
<p className="text-xl font-medium">Your session has expired.</p>
<button onClick={handleLoginBtn} className="op-btn op-btn-neutral">
Login
{t("login")}
</button>
</div>
</ModalUi>
+493
View File
@@ -0,0 +1,493 @@
import React, { useEffect, useState } from "react";
import Parse from "parse";
import { appInfo } from "../constant/appinfo";
import { NavLink, useNavigate } from "react-router-dom";
import {
getAppLogo,
openInNewTab,
saveLanguageInLocal
} from "../constant/Utils";
import { useDispatch } from "react-redux";
import { showTenant } from "../redux/reducers/ShowTenant";
import Loader from "../primitives/Loader";
import Title from "../components/Title";
import { useTranslation } from "react-i18next";
const AddAdmin = () => {
const { t, i18n } = useTranslation();
const navigate = useNavigate();
const dispatch = useDispatch();
const [showPassword, setShowPassword] = useState(false);
const [name, setName] = useState("");
const [phone, setPhone] = useState("");
const [password, setPassword] = useState("");
const [email, setEmail] = useState("");
const [company, setCompany] = useState("");
const [jobTitle, setJobTitle] = useState("");
const [lengthValid, setLengthValid] = useState(false);
const [caseDigitValid, setCaseDigitValid] = useState(false);
const [specialCharValid, setSpecialCharValid] = useState(false);
const [isAuthorize, setIsAuthorize] = useState(false);
const [isSubscribeNews, setIsSubscribeNews] = useState(false);
const [errMsg, setErrMsg] = useState("");
const [state, setState] = useState({
loading: false,
alertType: "success",
alertMsg: ""
});
const togglePasswordVisibility = () => setShowPassword(!showPassword);
useEffect(() => {
checkUserExist();
// eslint-disable-next-line
}, []);
const checkUserExist = async () => {
setState((prev) => ({ ...prev, loading: true }));
try {
const app = await getAppLogo();
if (app?.user === "exist") {
setErrMsg(t("admin-already-exist"));
}
} catch (err) {
setErrMsg(t("something-went-wrong-mssg"));
console.log("err in check user exist", err);
} finally {
setState((prev) => ({ ...prev, loading: false }));
}
};
const clearStorage = async () => {
if (Parse.User.current()) {
await Parse.User.logOut();
}
const baseUrl = localStorage.getItem("baseUrl");
const appid = localStorage.getItem("parseAppId");
const applogo = localStorage.getItem("appLogo");
const defaultmenuid = localStorage.getItem("defaultmenuid");
const PageLanding = localStorage.getItem("PageLanding");
const userSettings = localStorage.getItem("userSettings");
localStorage.clear();
saveLanguageInLocal(i18n);
localStorage.setItem("baseUrl", baseUrl);
localStorage.setItem("parseAppId", appid);
localStorage.setItem("appLogo", applogo);
localStorage.setItem("defaultmenuid", defaultmenuid);
localStorage.setItem("PageLanding", PageLanding);
localStorage.setItem("userSettings", userSettings);
localStorage.setItem("baseUrl", baseUrl);
localStorage.setItem("parseAppId", appid);
};
const handleSubmit = async (event) => {
event.preventDefault();
if (lengthValid && caseDigitValid && specialCharValid) {
clearStorage();
setState({ loading: true });
const userDetails = {
name: name,
email: email,
phone: phone,
company: company,
jobTitle: jobTitle
};
localStorage.setItem("userDetails", JSON.stringify(userDetails));
try {
event.preventDefault();
const user = new Parse.User();
user.set("name", name);
user.set("email", email);
user.set("password", password);
user.set("phone", phone);
user.set("username", email);
const userRes = await user.save();
if (userRes) {
const params = {
userDetails: {
jobTitle: jobTitle,
company: company,
name: name,
email: email,
phone: phone,
role: "contracts_Admin"
}
};
try {
const usersignup = await Parse.Cloud.run("addadmin", params);
if (usersignup) {
if (isSubscribeNews) {
subscribeNewsletter();
}
handleNavigation(userRes.getSessionToken());
}
} catch (err) {
alert(err.message);
setState({ loading: false });
}
}
} catch (error) {
console.log("err ", error);
if (error.code === 202) {
const params = { email: email };
const res = await Parse.Cloud.run("getUserDetails", params);
// console.log("Res ", res);
if (res) {
alert(t("already-exists-this-username"));
setState({ loading: false });
} else {
// console.log("state.email ", email);
try {
await Parse.User.requestPasswordReset(email).then(
async function (res) {
if (res.data === undefined) {
alert(t("verification-code-sent"));
}
}
);
} catch (err) {
console.log(err);
}
setState({ loading: false });
}
} else {
alert(error.message);
setState({ loading: false });
}
}
}
};
const handleNavigation = async (sessionToken) => {
const res = await Parse.User.become(sessionToken);
if (res) {
const _user = JSON.parse(JSON.stringify(res));
// console.log("_user ", _user);
localStorage.setItem("accesstoken", sessionToken);
localStorage.setItem("UserInformation", JSON.stringify(_user));
localStorage.setItem("accesstoken", _user.sessionToken);
localStorage.setItem("scriptId", true);
if (_user.ProfilePic) {
localStorage.setItem("profileImg", _user.ProfilePic);
} else {
localStorage.setItem("profileImg", "");
}
// Check extended class user role and tenentId
try {
const userSettings = appInfo.settings;
const extUser = await Parse.Cloud.run("getUserDetails");
if (extUser) {
const IsDisabled = extUser?.get("IsDisabled") || false;
if (!IsDisabled) {
const userRole = extUser?.get("UserRole");
const menu =
userRole && userSettings.find((menu) => menu.role === userRole);
if (menu) {
const _currentRole = userRole;
const _role = _currentRole.replace("contracts_", "");
localStorage.setItem("_user_role", _role);
const extInfo_stringify = JSON.stringify([extUser]);
localStorage.setItem("Extand_Class", extInfo_stringify);
const extInfo = JSON.parse(JSON.stringify(extUser));
localStorage.setItem("userEmail", extInfo?.Email);
localStorage.setItem("username", extInfo?.Name);
if (extInfo?.TenantId) {
const tenant = {
Id: extInfo?.TenantId?.objectId || "",
Name: extInfo?.TenantId?.TenantName || ""
};
localStorage.setItem("TenantId", tenant?.Id);
dispatch(showTenant(tenant?.Name));
localStorage.setItem("TenantName", tenant?.Name);
}
localStorage.setItem("PageLanding", menu.pageId);
localStorage.setItem("defaultmenuid", menu.menuId);
localStorage.setItem("pageType", menu.pageType);
setState({
loading: false,
alertType: "success",
alertMsg: t("registered-user-successfully")
});
navigate(`/${menu.pageType}/${menu.pageId}`);
} else {
setState({
loading: false,
alertType: "danger",
alertMsg: t("role-not-found")
});
}
} else {
setState({
loading: false,
alertType: "danger",
alertMsg: t("do-not-access")
});
}
}
} catch (error) {
console.log("error in fetch extuser", error);
const msg = error.message || t("something-went-wrong-mssg");
setState({ loading: false, alertType: "danger", alertMsg: msg });
} finally {
setTimeout(() => setState({ loading: false, alertMsg: "" }), 2000);
}
}
};
const handlePasswordChange = (e) => {
const newPassword = e.target.value;
setPassword(newPassword);
// Check conditions separately
setLengthValid(newPassword.length >= 8);
setCaseDigitValid(
/[a-z]/.test(newPassword) &&
/[A-Z]/.test(newPassword) &&
/\d/.test(newPassword)
);
setSpecialCharValid(/[!@#$%^&*()\-_=+{};:,<.>]/.test(newPassword));
};
const subscribeNewsletter = async () => {
try {
const params = { name: name, email: email, domain: window.location.host };
await Parse.Cloud.run("newsletter", params);
// console.log("newsletter ", newsletter);
} catch (err) {
console.log("err in subscribeNewsletter", err);
}
};
return (
<div className="h-screen flex justify-center">
<Title title="Add admin" />
{state.loading ? (
<div className="text-[grey] flex justify-center items-center text-lg md:text-2xl">
<Loader />
</div>
) : (
<>
{errMsg ? (
<div className="text-[grey] flex justify-center items-center text-lg md:text-2xl">
{errMsg}
</div>
) : (
<div className="w-[95%] md:w-[500px]">
<form onSubmit={handleSubmit}>
<div className="w-full my-4 op-card bg-base-100 shadow-md outline outline-1 outline-slate-300/50">
<h2 className="text-[30px] text-center mt-3 font-medium">
{t("opensign-setup")}
</h2>
<NavLink
to="https://discord.com/invite/xe9TDuyAyj"
target="_blank"
rel="noopener noreferrer"
className="text-center text-sm mt-1 text-[blue] cursor-pointer"
>
{t("join-discord")}
<i
aria-hidden="true"
className="fa-brands fa-discord ml-1"
></i>
{/* <span className="fa-sr-only">OpenSign&apos;s Discord</span> */}
</NavLink>
<div className="px-6 py-3 text-xs">
<label className="block ">
{t("name")}{" "}
<span className="text-[red] text-[13px]">*</span>
</label>
<input
type="text"
className="op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs"
value={name}
onChange={(e) => setName(e.target.value)}
onInvalid={(e) =>
e.target.setCustomValidity(t("input-required"))
}
onInput={(e) => e.target.setCustomValidity("")}
required
/>
<hr className="my-2 border-none" />
<label>
{"email"}{" "}
<span className="text-[red] text-[13px]">*</span>
</label>
<input
id="email"
type="email"
className="op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs"
value={email}
onChange={(e) =>
setEmail(
e.target.value?.toLowerCase()?.replace(/\s/g, "")
)
}
onInvalid={(e) =>
e.target.setCustomValidity(t("input-required"))
}
onInput={(e) => e.target.setCustomValidity("")}
required
/>
<hr className="my-2 border-none" />
<label>
{t("phone")}{" "}
<span className="text-[red] text-[13px]">*</span>
</label>
<input
type="tel"
className="op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs"
value={phone}
onChange={(e) => setPhone(e.target.value)}
onInvalid={(e) =>
e.target.setCustomValidity(t("input-required"))
}
onInput={(e) => e.target.setCustomValidity("")}
required
/>
<hr className="my-2 border-none" />
<label>
{t("company")}{" "}
<span className="text-[red] text-[13px]">*</span>
</label>
<input
type="text"
className="op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs"
value={company}
onChange={(e) => setCompany(e.target.value)}
onInvalid={(e) =>
e.target.setCustomValidity(t("input-required"))
}
onInput={(e) => e.target.setCustomValidity("")}
required
/>
<hr className="my-2 border-none" />
<label>
{t("job-title")}{" "}
<span className="text-[red] text-[13px]">*</span>
</label>
<input
type="text"
className="op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs"
value={jobTitle}
onChange={(e) => setJobTitle(e.target.value)}
onInvalid={(e) =>
e.target.setCustomValidity(t("input-required"))
}
onInput={(e) => e.target.setCustomValidity("")}
required
/>
<hr className="my-2 border-none" />
<label>
{t("password")}
<span className="text-[red] text-[13px]">*</span>
</label>
<div className="relative">
<input
type={showPassword ? "text" : "password"}
className="op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs"
name="password"
value={password}
onChange={(e) => handlePasswordChange(e)}
onInvalid={(e) =>
e.target.setCustomValidity(t("input-required"))
}
onInput={(e) => e.target.setCustomValidity("")}
required
/>
<span
className={`absolute top-[50%] right-[10px] -translate-y-[50%] cursor-pointer text-base-content`}
onClick={togglePasswordVisibility}
>
{showPassword ? (
<i className="fa fa-eye-slash" /> // Close eye icon
) : (
<i className="fa fa-eye" /> // Open eye icon
)}
</span>
</div>
{password.length > 0 && (
<div className="mt-1 text-[11px]">
<p
className={`${
lengthValid ? "text-green-600" : "text-red-600"
}`}
>
{lengthValid ? "✓" : "✗"} {t("password-length")}
</p>
<p
className={`${
caseDigitValid ? "text-green-600" : "text-red-600"
}`}
>
{caseDigitValid ? "✓" : "✗"} {t("password-case")}
</p>
<p
className={`${
specialCharValid ? "text-green-600" : "text-red-600"
}`}
>
{specialCharValid ? "✓" : "✗"}{" "}
{t("password-special-char")}
</p>
</div>
)}
<div className="mt-2.5 ml-1 flex flex-row items-center">
<input
type="checkbox"
className="op-checkbox op-checkbox-sm"
id="termsandcondition"
checked={isAuthorize}
onChange={(e) => setIsAuthorize(e.target.checked)}
onInvalid={(e) =>
e.target.setCustomValidity(t("input-required"))
}
onInput={(e) => e.target.setCustomValidity("")}
required
/>
<label
className="text-xs cursor-pointer ml-1 mb-0"
htmlFor="termsandcondition"
>
{t("agreee")}
</label>
<span
className="underline cursor-pointer ml-1"
onClick={() =>
openInNewTab(
"https://www.opensignlabs.com/terms-and-conditions"
)
}
>
{t("term")}
</span>
<span>.</span>
</div>
<div className="mt-2.5 ml-1 flex flex-row items-center">
<input
type="checkbox"
className="op-checkbox op-checkbox-sm"
id="termsandcondition"
checked={isSubscribeNews}
onChange={(e) => setIsSubscribeNews(e.target.checked)}
/>
<label
className="text-xs cursor-pointer ml-1 mb-0"
htmlFor="termsandcondition"
>
{t("subscribe-to-opensign")}
</label>
</div>
</div>
<div className="mx-4 text-center text-xs font-bold mb-3">
<button
type="submit"
className="op-btn op-btn-primary w-full"
disabled={state.loading}
>
{state.loading ? t("loading") : t("next")}
</button>
</div>
</div>
</form>
</div>
)}
</>
)}
</div>
);
};
export default AddAdmin;
+27 -15
View File
@@ -2,8 +2,10 @@ import React, { useState } from "react";
import Parse from "parse";
import { Navigate } from "react-router-dom";
import Title from "../components/Title";
import { useTranslation } from "react-i18next";
function ChangePassword() {
const { t } = useTranslation();
const [currentpassword, setCurrentPassword] = useState("");
const [newpassword, setnewpassword] = useState("");
const [confirmpassword, setconfirmpassword] = useState("");
@@ -21,25 +23,29 @@ function ChangePassword() {
user.set("password", newpassword);
user
.save()
.then(() => {
alert("Password updated successfully.");
.then(async () => {
let _user = user.toJSON();
if (_user) {
await Parse.User.become(_user.sessionToken);
localStorage.setItem("accesstoken", _user.sessionToken);
}
alert(t("password-update-alert-1"));
})
.catch((error) => {
console.log("err", error);
alert("Something went wrong.");
alert(t("something-went-wrong-mssg"));
});
});
} else {
alert("Your current password is missing or incorrect.");
alert(t("password-update-alert-2"));
}
console.log("Logged in user", user);
})
.catch((error) => {
alert("Your current password is missing or incorrect.");
alert(t("password-update-alert-3"));
console.error("Error while logging in user", error);
});
} else {
alert("Your password and confirmation password do not match.");
alert(t("password-update-alert-4"));
}
} catch (error) {
console.log("err", error);
@@ -52,13 +58,13 @@ function ChangePassword() {
<div className="w-full bg-base-100 text-base-content shadow rounded-box p-2">
<Title title="Change Password" />
<div className="text-xl font-bold border-b-[1px] border-gray-300">
Change Password
{t("change-password")}
</div>
<div className="m-2">
<form onSubmit={handleSubmit} className=" flex flex-col gap-y-2">
<div>
<label htmlFor="currentpassword" className="block text-xs ml-1">
Current Password
{t("current-password")}
</label>
<input
type="password"
@@ -66,13 +72,15 @@ function ChangePassword() {
value={currentpassword}
onChange={(e) => setCurrentPassword(e.target.value)}
className="op-input op-input-bordered op-input-sm text-xs w-full"
placeholder="Current Password"
placeholder={t("current-password")}
onInvalid={(e) => e.target.setCustomValidity(t("input-required"))}
onInput={(e) => e.target.setCustomValidity("")}
required
/>
</div>
<div>
<label htmlFor="newpassword" className="text-xs block ml-1">
New Password
{t("new-password")}
</label>
<input
type="password"
@@ -80,13 +88,15 @@ function ChangePassword() {
value={newpassword}
onChange={(e) => setnewpassword(e.target.value)}
className="op-input op-input-bordered op-input-sm text-xs w-full"
placeholder="New Password"
placeholder={t("new-password")}
onInvalid={(e) => e.target.setCustomValidity(t("input-required"))}
onInput={(e) => e.target.setCustomValidity("")}
required
/>
</div>
<div>
<label htmlFor="newpassword" className="text-xs block ml-1">
Confirm Password
{t("confirm-password")}
</label>
<input
type="password"
@@ -94,7 +104,9 @@ function ChangePassword() {
className="op-input op-input-bordered op-input-sm text-xs w-full"
value={confirmpassword}
onChange={(e) => setconfirmpassword(e.target.value)}
placeholder="Confirm Password"
placeholder={t("confirm-password")}
onInvalid={(e) => e.target.setCustomValidity(t("input-required"))}
onInput={(e) => e.target.setCustomValidity("")}
required
/>
</div>
@@ -102,7 +114,7 @@ function ChangePassword() {
type="submit"
className="op-btn op-btn-primary shadow-md mt-2"
>
Change Password
{t("change-password")}
</button>
</form>
</div>
+3 -1
View File
@@ -6,8 +6,10 @@ import { useDispatch } from "react-redux";
import { saveTourSteps } from "../redux/reducers/TourStepsReducer";
import dashboardJson from "../json/dashboardJson";
import Loader from "../primitives/Loader";
import { useTranslation } from "react-i18next";
const Dashboard = () => {
const { t } = useTranslation();
const navigate = useNavigate();
const dispatch = useDispatch();
const { id } = useParams();
@@ -40,7 +42,7 @@ const Dashboard = () => {
.map((col) => {
return {
selector: `[data-tut=${col.widget.data.tourSection}]`,
content: col.widget.data.tourMessage,
content: t(`tour-mssg.${col.widget.label}`),
position: "top"
// style: { backgroundColor: "#abd4d2" },
};
+20 -16
View File
@@ -9,8 +9,10 @@ import { useDispatch } from "react-redux";
import { fetchAppInfo } from "../redux/reducers/infoReducer";
import { isEnableSubscription } from "../constant/const";
import { getAppLogo } from "../constant/Utils";
import { useTranslation } from "react-i18next";
function ForgotPassword() {
const { t } = useTranslation();
const dispatch = useDispatch();
const navigate = useNavigate();
const [state, setState] = useState({
@@ -22,7 +24,10 @@ function ForgotPassword() {
const [image, setImage] = useState();
const handleChange = (event) => {
const { name, value } = event.target;
let { name, value } = event.target;
if (name === "email") {
value = value?.toLowerCase()?.replace(/\s/g, "");
}
setState({ ...state, [name]: value });
};
@@ -36,9 +41,6 @@ function ForgotPassword() {
const handleSubmit = async (event) => {
event.preventDefault();
localStorage.setItem("appLogo", appInfo.applogo);
localStorage.setItem("appName", appInfo.appname);
// localStorage.setItem("defaultmenuid", props.appInfo.defaultmenuid);
// localStorage.setItem("PageLanding", props.appInfo.LandingPageId);
localStorage.setItem("userSettings", JSON.stringify(appInfo.settings));
if (state.email) {
const username = state.email;
@@ -64,9 +66,9 @@ function ForgotPassword() {
}, []);
const saveLogo = async () => {
if (isEnableSubscription) {
const logo = await getAppLogo();
if (logo) {
setImage(logo);
const app = await getAppLogo();
if (app?.logo) {
setImage(app?.logo);
} else {
setImage(appInfo?.applogo || undefined);
}
@@ -78,12 +80,10 @@ function ForgotPassword() {
<div>
<Title title="Forgot password page" />
{sentStatus === "success" && (
<Alert type="success">
Reset password link has been sent to your email id
</Alert>
<Alert type="success">{t("reset-password-alert-1")}</Alert>
)}
{sentStatus === "failed" && (
<Alert type={"danger"}>Please setup email adapter </Alert>
<Alert type={"danger"}>{t("reset-password-alert-2")}</Alert>
)}
<div className="md:p-10 lg:p-16">
<div className="md:p-4 lg:p-10 p-4 bg-base-100 text-base-content op-card">
@@ -99,19 +99,23 @@ function ForgotPassword() {
<div className="grid grid-cols-1 md:grid-cols-2 gap-x-2">
<div>
<form onSubmit={handleSubmit}>
<h2 className="text-[30px] mt-6">Welcome Back !</h2>
<h2 className="text-[30px] mt-6">{t("welcome")}</h2>
<span className="text-[12px] text-[#878787]">
Reset Your Password
{t("reset-password-alert-3")}
</span>
<div className="w-full my-4 op-card bg-base-100 shadow-md outline outline-1 outline-slate-300/50">
<div className="px-6 py-4">
<label className="block text-xs">Email</label>
<label className="block text-xs">{t("email")}</label>
<input
type="email"
name="email"
className="op-input op-input-bordered op-input-sm w-full"
value={state.email}
onChange={handleChange}
onInvalid={(e) =>
e.target.setCustomValidity(t("input-required"))
}
onInput={(e) => e.target.setCustomValidity("")}
required
/>
<hr className="my-2 border-none" />
@@ -119,13 +123,13 @@ function ForgotPassword() {
</div>
<div className="grid grid-cols-1 md:grid-cols-2 gap-2 text-center text-xs font-bold">
<button type="submit" className="op-btn op-btn-primary">
Submit
{t("submit")}
</button>
<button
onClick={() => navigate("/", { replace: true })}
className="op-btn op-btn-secondary"
>
Login
{t("login")}
</button>
</div>
</form>
+111 -109
View File
@@ -2,7 +2,6 @@ import React, { useEffect, useRef, useState } from "react";
import { useNavigate, useParams } from "react-router-dom";
import { formJson } from "../json/FormJson";
import AddUser from "../components/AddUser";
import sanitizeFileName from "../primitives/sanitizeFileName";
import Parse from "parse";
import DropboxChooser from "../components/shared/fields/DropboxChoose";
import Alert from "../primitives/Alert";
@@ -18,8 +17,21 @@ import { isEnableSubscription } from "../constant/const";
import ModalUi from "../primitives/ModalUi";
import { Tooltip } from "react-tooltip";
import Upgrade from "../primitives/Upgrade";
import PremiumAlertHeader from "../primitives/PremiumAlertHeader";
import Loader from "../primitives/Loader";
import { useTranslation } from "react-i18next";
// `generatePdfName` is used to generate file name
function generatePdfName(length) {
const characters =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
let result = "";
const charactersLength = characters.length;
for (let i = 0; i < length; i++) {
result += characters.charAt(Math.floor(Math.random() * charactersLength));
}
return result;
}
// `Form` render all type of Form on this basis of their provided in path
function Form() {
@@ -38,6 +50,7 @@ function Form() {
}
const Forms = (props) => {
const { t } = useTranslation();
const maxFileSize = 20;
const abortController = new AbortController();
const inputFileRef = useRef(null);
@@ -110,9 +123,7 @@ const Forms = (props) => {
if (typeof files[0] !== "undefined") {
const mb = Math.round(files[0].size / Math.pow(1024, 2));
if (mb > maxFileSize) {
alert(
`The selected file size is too large. Please select a file less than ${maxFileSize} MB`
);
alert(`${t("file-alert-1")} ${maxFileSize} MB`);
setFileUpload("");
e.target.value = "";
return;
@@ -134,9 +145,8 @@ const Forms = (props) => {
// console.log("err ", err);
try {
setIsDecrypting(true);
const fileName = files?.[0].name;
const size = files?.[0].size;
const name = sanitizeFileName(fileName);
const name = generatePdfName(16);
const url = "https://ai.nxglabs.in/decryptpdf"; //"https://ai.nxglabs.in/decryptpdf"; //
let formData = new FormData();
formData.append("file", files[0]);
@@ -227,9 +237,8 @@ const Forms = (props) => {
useObjectStreams: false
});
setfileload(true);
const fileName = files[0].name;
const size = files[0].size;
const name = sanitizeFileName(fileName);
const name = generatePdfName(16);
const pdfName = `${name?.split(".")[0]}.pdf`;
const parseFile = new Parse.File(
pdfName,
@@ -293,7 +302,7 @@ const Forms = (props) => {
}
}
} else {
alert("Please select file.");
alert(t("file-alert-2"));
return false;
}
} catch (error) {
@@ -304,9 +313,8 @@ const Forms = (props) => {
const handleFileUpload = async (file) => {
setfileload(true);
const fileName = file.name;
const size = file.size;
const name = sanitizeFileName(fileName);
const name = generatePdfName(16);
const pdfFile = file;
const parseFile = new Parse.File(name, pdfFile);
@@ -345,14 +353,11 @@ const Forms = (props) => {
if (mb > maxFileSize) {
setTimeout(() => {
alert(
`The selected file size is too large. Please select a file less than ${maxFileSize} MB`
);
alert(`${t("file-alert-1")}${maxFileSize} MB`);
}, 500);
return;
} else {
const name = sanitizeFileName(file.name);
const name = generatePdfName(16);
const parseFile = new Parse.File(name, { uri: url });
try {
@@ -439,13 +444,11 @@ const Forms = (props) => {
setIsErr(true);
} finally {
setIsAlert(true);
setTimeout(() => {
setIsAlert(false);
}, 1000);
setTimeout(() => setIsAlert(false), 1000);
setIsSubmit(false);
}
} else {
alert("Please wait while the document is being uploaded.");
alert(t("file-alert-3"));
}
};
@@ -493,9 +496,8 @@ const Forms = (props) => {
setIsPassword(false);
setfileload(true);
try {
const fileName = formData?.file?.name;
const size = formData?.file?.size;
const name = sanitizeFileName(fileName);
const name = generatePdfName(16);
const url = "https://ai.nxglabs.in/decryptpdf"; //
let Data = new FormData();
Data.append("file", formData?.file);
@@ -570,7 +572,7 @@ const Forms = (props) => {
{isAlert && (
<Alert type={isErr ? "danger" : "success"}>
{isErr
? "Something went wrong please try again!"
? t("something-went-wrong-mssg")
: `${props.msgVar} created successfully!`}
</Alert>
)}
@@ -583,12 +585,12 @@ const Forms = (props) => {
<ModalUi
isOpen={isPassword}
handleClose={() => handeCloseModal()}
title={"Enter Pdf Password"}
title={t("enter-pdf-password")}
>
<form onSubmit={handlePasswordSubmit}>
<div className="px-6 pt-3 pb-2">
<label className="mb-2 text-xs text-base-content">
Password
{t("password")}
</label>
<input
type="text"
@@ -597,6 +599,10 @@ const Forms = (props) => {
onChange={(e) => handleStrInput(e)}
className="w-full op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content text-xs"
placeholder="Enter pdf password"
onInvalid={(e) =>
e.target.setCustomValidity(t("input-required"))
}
onInput={(e) => e.target.setCustomValidity("")}
required
/>
<p
@@ -606,18 +612,20 @@ const Forms = (props) => {
: "text-transparent pointer-events-none"
} ml-2 text-[11px] `}
>
Please provide correct password
{t("correct-password")}
</p>
</div>
<div className="px-6 mb-3">
<button type="submit" className="op-btn op-btn-primary">
Submit
{t("submit")}
</button>
</div>
</form>
</ModalUi>
<form onSubmit={handleSubmit}>
<h1 className="text-[20px] font-semibold mb-4">{props?.title}</h1>
<h1 className="text-[20px] font-semibold mb-4">
{t(`form-name.${props?.title}`)}
</h1>
{fileload && (
<div className="flex items-center gap-x-2">
<div className="h-2 rounded-full w-[200px] md:w-[400px] bg-gray-200">
@@ -632,22 +640,22 @@ const Forms = (props) => {
{isDecrypting && (
<div className="flex items-center gap-x-2">
<span className="text-base-content text-sm">
Decrypting pdf please wait...
{t("decrypting-pdf")}
</span>
</div>
)}
<div className="text-xs">
<label className="block">
{`File (pdf, png, jpg, jpeg${
{`${t("report-heading.File")} (${t("file-type")} ${
isEnableSubscription ? ", docx)" : ")"
}`}
<span className="text-red-500 text-[13px]">*</span>
</label>
{fileupload.length > 0 ? (
<div className="flex gap-2 justify-center items-center">
<div className="flex justify-between items-center op-input op-input-bordered op-input-sm w-full h-full text-x text-[13px]">
<div className="break-all ">
file selected: {getFileName(fileupload)}
<div className="flex gap-1 justify-center items-center">
<div className="flex justify-between items-center op-input op-input-bordered op-input-sm w-full h-full text-[13px]">
<div className="break-all cursor-default">
{t("file-selected")}: {getFileName(fileupload)}
</div>
<div
onClick={() => setFileUpload("")}
@@ -664,7 +672,7 @@ const Forms = (props) => {
)}
</div>
) : (
<div className="flex gap-2 justify-center items-center ">
<div className="flex gap-1 justify-center items-center">
<input
type="file"
className="op-file-input op-file-input-bordered op-file-input-sm focus:outline-none hover:border-base-content w-full text-xs"
@@ -675,6 +683,10 @@ const Forms = (props) => {
? "application/pdf,application/vnd.openxmlformats-officedocument.wordprocessingml.document,image/png,image/jpeg"
: "application/pdf,image/png,image/jpeg"
}
onInvalid={(e) =>
e.target.setCustomValidity(t("input-required"))
}
onInput={(e) => e.target.setCustomValidity("")}
required
/>
{process.env.REACT_APP_DROPBOX_API_KEY && (
@@ -689,8 +701,8 @@ const Forms = (props) => {
<div className="text-xs mt-2">
<label className="block">
{props.title === "New Template"
? "Template Title"
: "Document Title"}
? t("template-title")
: t("document-title")}
<span className="text-red-500 text-[13px]">*</span>
</label>
<input
@@ -698,12 +710,16 @@ const Forms = (props) => {
className="op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs"
value={formData.Name}
onChange={(e) => handleStrInput(e)}
onInvalid={(e) =>
e.target.setCustomValidity(t("input-required"))
}
onInput={(e) => e.target.setCustomValidity("")}
required
/>
</div>
{props.title === "New Template" && (
<div className="text-xs mt-2">
<label className="block">Description</label>
<label className="block">{t("description")}</label>
<input
name="Description"
className="op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs"
@@ -721,13 +737,18 @@ const Forms = (props) => {
)}
<div className="text-xs mt-2">
<label className="block">
Note<span className="text-red-500 text-[13px]">*</span>
{t("report-heading.Note")}
<span className="text-red-500 text-[13px]">*</span>
</label>
<input
name="Note"
className="op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs"
value={formData.Note}
onChange={(e) => handleStrInput(e)}
onInvalid={(e) =>
e.target.setCustomValidity(t("input-required"))
}
onInput={(e) => e.target.setCustomValidity("")}
required
/>
</div>
@@ -741,7 +762,7 @@ const Forms = (props) => {
{props.title === "Request Signatures" && (
<div className="text-xs mt-2">
<label className="block">
Time To Complete (Days)
{t("time-to-complete")}
<span className="text-red-500 text-[13px]">*</span>
</label>
<input
@@ -750,6 +771,10 @@ const Forms = (props) => {
className="op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs"
value={formData.TimeToCompleteDays}
onChange={(e) => handleStrInput(e)}
onInvalid={(e) =>
e.target.setCustomValidity(t("input-required"))
}
onInput={(e) => e.target.setCustomValidity("")}
required
/>
</div>
@@ -758,7 +783,7 @@ const Forms = (props) => {
<>
<div className="text-xs mt-2">
<label className="block">
Send In Order
{t("send-in-order")}
<a data-tooltip-id="sendInOrder-tooltip" className="ml-1">
<sup>
<i className="fa-light fa-question rounded-full border-[#33bbff] text-[#33bbff] text-[13px] border-[1px] py-[1.5px] px-[4px]"></i>
@@ -766,44 +791,21 @@ const Forms = (props) => {
</a>
<Tooltip id="sendInOrder-tooltip" className="z-50">
<div className="max-w-[200px] md:max-w-[450px]">
<p className="font-bold">Send in Order</p>
<p>
Choose how you want the signing requests to be sent to
the document signers:
</p>
<p className="font-bold">{t("send-in-order")}</p>
<p>{t("send-in-order-help.p1")}</p>
<p className="p-[5px]">
<ol className="list-disc">
<li>
<span className="font-bold">Yes:</span>
<span>
Selecting this option will send the signing
request to the first signer initially. Once the
first signer completes their part, the next
signer in the sequence will receive the request.
This process continues until all signers have
signed the document. This method ensures that
the document is signed in a specific order.
</span>
<span className="font-bold">{t("yes")}:</span>
<span>{t("send-in-order-help.p2")}</span>
</li>
<li>
<span className="font-bold">No: </span>
<span>
Selecting this option will send the signing
links to all signers simultaneously. Every
signer can sign the document at their
convenience, regardless of whether other signers
have completed their signatures. This method is
faster but does not enforce any signing order
among the participants.
</span>
<span className="font-bold">{t("no")}: </span>
<span>{t("send-in-order-help.p3")}</span>
</li>
</ol>
</p>
<p>
Select the option that best suits the needs of your
document processing.
</p>
<p>{t("send-in-order-help.p4")}</p>
</div>
</Tooltip>
</label>
@@ -816,7 +818,7 @@ const Forms = (props) => {
checked={formData.SendinOrder === "true"}
onChange={handleStrInput}
/>
<div className="text-center">Yes</div>
<div className="text-center">{t("yes")}</div>
</div>
<div className="flex items-center gap-2 ml-2 mb-1">
<input
@@ -827,46 +829,42 @@ const Forms = (props) => {
checked={formData.SendinOrder === "false"}
onChange={handleStrInput}
/>
<div className="text-center">No</div>
<div className="text-center">{t("no")}</div>
</div>
</div>
<div className="text-xs mt-2">
{!isEnableSubscription && (
<PremiumAlertHeader
message={
"Auto reminder is free in beta, this feature will incur a fee later."
{isEnableSubscription && (
<div className="text-xs mt-2">
<span
className={
isSubscribe
? "font-semibold"
: "font-semibold text-gray-300"
}
/>
)}
<span
className={
isSubscribe || !isEnableSubscription
? "font-semibold"
: "font-semibold text-gray-300"
}
>
Auto reminder{" "}
{!isSubscribe && isEnableSubscription && <Upgrade />}
</span>
<label
className={`${
isSubscribe || !isEnableSubscription
? "cursor-pointer "
: "pointer-events-none opacity-50"
} relative block items-center mb-0`}
>
<input
type="checkbox"
className="op-toggle transition-all checked:[--tglbg:#3368ff] checked:bg-white"
checked={formData.autoreminder}
onChange={handleAutoReminder}
/>
</label>
</div>
>
{t("auto-reminder")}
{" "}
{!isSubscribe && isEnableSubscription && <Upgrade />}
</span>
<label
className={`${
isSubscribe
? "cursor-pointer "
: "pointer-events-none opacity-50"
} relative block items-center mb-0`}
>
<input
type="checkbox"
className="op-toggle transition-all checked:[--tglbg:#3368ff] checked:bg-white"
checked={formData.autoreminder}
onChange={handleAutoReminder}
/>
</label>
</div>
)}
{formData?.autoreminder === true && (
<div className="text-xs mt-2">
<label className="block">
Remind once in every (Days)
{t("remind-once")}
<span className="text-red-500 text-[13px]">*</span>
</label>
<input
@@ -875,6 +873,10 @@ const Forms = (props) => {
name="remindOnceInEvery"
className="op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs"
onChange={handleStrInput}
onInvalid={(e) =>
e.target.setCustomValidity(t("input-required"))
}
onInput={(e) => e.target.setCustomValidity("")}
required
/>
</div>
@@ -889,13 +891,13 @@ const Forms = (props) => {
type="submit"
disabled={isSubmit}
>
Next
{t("next")}
</button>
<div
className="op-btn op-btn-ghost"
onClick={() => handleCancel()}
>
Cancel
{t("cancel")}
</div>
</div>
</form>
+23 -30
View File
@@ -5,19 +5,14 @@ import Alert from "../primitives/Alert";
import ModalUi from "../primitives/ModalUi";
import { isEnableSubscription } from "../constant/const";
import { checkIsSubscribed, copytoData, openInNewTab } from "../constant/Utils";
import PremiumAlertHeader from "../primitives/PremiumAlertHeader";
import Tooltip from "../primitives/Tooltip";
import Loader from "../primitives/Loader";
import SubscribeCard from "../primitives/SubscribeCard";
import Tour from "reactour";
const tourSteps = [
{
selector: '[data-tut="apisubscribe"]',
content: "Upgrade now to generate API token"
}
];
import { useTranslation } from "react-i18next";
function GenerateToken() {
const { t } = useTranslation();
const [parseBaseUrl] = useState(localStorage.getItem("baseUrl"));
const [parseAppId] = useState(localStorage.getItem("parseAppId"));
const [apiToken, SetApiToken] = useState("");
@@ -30,7 +25,12 @@ function GenerateToken() {
fetchToken();
// eslint-disable-next-line
}, []);
const tourSteps = [
{
selector: '[data-tut="apisubscribe"]',
content: t("tour-mssg.generate-token")
}
];
const fetchToken = async () => {
try {
if (isEnableSubscription) {
@@ -45,7 +45,7 @@ function GenerateToken() {
};
const res = await axios.post(url, {}, { headers: headers });
if (res) {
SetApiToken(res.data.result.result);
SetApiToken(res.data?.result?.result);
}
setIsLoader(false);
} catch (err) {
@@ -71,13 +71,13 @@ function GenerateToken() {
const res = await axios.post(url, {}, { headers: headers });
if (res) {
SetApiToken(res.data.result.token);
setIsAlert({ type: "success", msg: "Token generated successfully." });
setIsAlert({ type: "success", msg: t("token-generated") });
} else {
console.error("Error while generating Token");
setIsAlert({ type: "danger", msg: "Something went wrong." });
setIsAlert({ type: "danger", msg: t("something-went-wrong-mssg") });
}
} catch (error) {
setIsAlert({ type: "danger", msg: "Something went wrong." });
setIsAlert({ type: "danger", msg: t("something-went-wrong-mssg") });
console.log("while generating Token", error);
} finally {
setIsLoader(false);
@@ -90,7 +90,7 @@ function GenerateToken() {
const copytoclipboard = (text) => {
copytoData(text);
setIsAlert({ type: "success", msg: "Copied" });
setIsAlert({ type: "success", msg: t("copied") });
setTimeout(() => {
setIsAlert({ type: "success", msg: "" });
}, 1500); // Reset copied state after 1.5 seconds
@@ -112,9 +112,8 @@ function GenerateToken() {
) : (
<>
<div className="bg-base-100 text-base-content flex flex-col justify-center shadow-md rounded-box mb-3">
{!isEnableSubscription && <PremiumAlertHeader />}
<h1 className={"ml-4 mt-3 mb-2 font-semibold"}>
OpenSign API{" "}
OpenSign {t("API")}{" "}
<Tooltip
url={
"https://docs.opensignlabs.com/docs/API-docs/opensign-api-v-1"
@@ -122,19 +121,14 @@ function GenerateToken() {
isSubscribe={true}
/>
</h1>
<ul
className={"w-full flex flex-col p-2 text-sm"}
// isSubscribe || !isEnableSubscription
// ? "w-full flex flex-col p-2 text-sm "
// : "w-full flex flex-col p-2 text-sm opacity-20 pointer-events-none select-none"
>
<ul className="w-full flex flex-col p-2 text-sm">
<li className="flex flex-col md:flex-row justify-between items-center border-y-[1px] border-gray-300 break-all py-2">
<div className="w-full md:w-[70%] flex-col md:flex-row text-xs md:text-[15px] flex items-center gap-x-5">
<span className="ml-1">API Token:</span>{" "}
<span className="ml-1">{t("api-token")}:</span>{" "}
<span
id="token"
className={`${
isSubscribe || !isEnableSubscription
isSubscribe
? ""
: "bg-white/20 pointer-events-none select-none"
} md:text-end py-2 md:py-0`}
@@ -157,7 +151,7 @@ function GenerateToken() {
onClick={apiToken ? handleModal : handleSubmit}
className="op-btn op-btn-primary"
>
{apiToken ? "Regenerate Token" : "Generate Token"}
{apiToken ? t("regenerate-token") : t("generate-token")}
</button>
</li>
</ul>
@@ -171,18 +165,17 @@ function GenerateToken() {
}
className="op-btn op-btn-secondary mt-2 mb-3 px-8"
>
View Docs
{t("view-docs")}
</button>
</div>
<ModalUi
isOpen={isModal}
title={apiToken ? "Regenerate Token" : "Generate Token"}
title={apiToken ? t("regenerate-token") : t("generate-token")}
handleClose={handleModal}
>
<div className="m-[20px]">
<div className="text-lg font-normal text-base-content">
Are you sure you want to regenerate token it will expire old
token?
{t("generate-token-alert")}
</div>
<hr className="bg-[#ccc] mt-4" />
<div className="flex items-center mt-3 gap-2 text-white">
@@ -190,13 +183,13 @@ function GenerateToken() {
onClick={handleSubmit}
className="op-btn op-btn-primary ml-[2px]"
>
Yes
{t("yes")}
</button>
<button
onClick={handleModal}
className="op-btn op-btn-secondary"
>
No
{t("no")}
</button>
</div>
</div>
+156 -142
View File
@@ -2,13 +2,20 @@ import React, { useState, useEffect } from "react";
import { useNavigate, useParams } from "react-router-dom";
import axios from "axios";
import { isEnableSubscription } from "../constant/const";
import { contractUsers, getAppLogo } from "../constant/Utils";
import {
contractUsers,
getAppLogo,
saveLanguageInLocal
} from "../constant/Utils";
import logo from "../assets/images/logo.png";
import { appInfo } from "../constant/appinfo";
import Parse from "parse";
import Loader from "../primitives/Loader";
import { useTranslation } from "react-i18next";
import SelectLanguage from "../components/pdf/SelectLanguage";
function GuestLogin() {
const { t, i18n } = useTranslation();
const { id, userMail, contactBookId, base64url } = useParams();
const navigate = useNavigate();
const [email, setEmail] = useState(userMail);
@@ -29,9 +36,9 @@ function GuestLogin() {
//function generate serverUrl and parseAppId from url and save it in local storage
const handleServerUrl = async () => {
if (isEnableSubscription) {
const applogo = await getAppLogo();
if (applogo) {
setAppLogo(applogo);
const app = await getAppLogo();
if (app?.logo) {
setAppLogo(app?.logo);
} else {
setAppLogo(logo);
}
@@ -40,12 +47,11 @@ function GuestLogin() {
}
localStorage.clear();
saveLanguageInLocal(i18n);
const parseId = appInfo.appId;
const newServer = `${appInfo.baseUrl}/`;
const appName = appInfo.appname;
localStorage.setItem("baseUrl", newServer);
localStorage.setItem("parseAppId", parseId);
localStorage.setItem("_appName", appName);
//this condition is used decode base64 to string and get userEmail,documentId, contactBoookId data.
if (!id) {
//`atob` function is used to decode base64
@@ -89,7 +95,7 @@ function GuestLogin() {
setEnterOtp(true);
}
} catch (error) {
alert("something went wrong!");
alert(t("something-went-wrong-mssg"));
}
};
@@ -119,15 +125,16 @@ function GuestLogin() {
};
let user = await axios.post(url, body, { headers: headers });
if (user.data.result === "Invalid Otp") {
alert("Invalid Otp");
alert(t("invalid-otp"));
setLoading(false);
} else if (user.data.result === "user not found!") {
alert("User not found!");
alert(t("user-not-found"));
setLoading(false);
} else {
let _user = user.data.result;
await Parse.User.become(_user.sessionToken);
const parseId = localStorage.getItem("parseAppId");
const contractUserDetails = await contractUsers(_user.email);
const contractUserDetails = await contractUsers();
localStorage.setItem("UserInformation", JSON.stringify(_user));
localStorage.setItem(
`Parse/${parseId}/currentUser`,
@@ -158,7 +165,7 @@ function GuestLogin() {
console.log("err ", error);
}
} else {
alert("Please Enter OTP!");
alert(t("enter-otp-alert"));
}
};
const handleUserData = async (e) => {
@@ -173,7 +180,7 @@ function GuestLogin() {
await SendOtp();
} catch (err) {
setLoading(false);
alert("something went wron, please try agian later.");
alert(t("something-went-wrong-mssg"));
console.log("Err in link ext contact", err);
}
};
@@ -181,153 +188,160 @@ function GuestLogin() {
setContact((prev) => ({ ...prev, [e.target.name]: e.target.value }));
};
return (
<div className="p-[2rem]">
{isLoading ? (
<div className="flex flex-col justify-center items-center h-[100vh]">
<Loader />
<span className="text-[13px] text-[gray]">{isLoading.message}</span>
</div>
) : (
<div className="m-1 md:m-2 p-[30px] text-base-content bg-base-100 op-card shadow-md">
<div className="md:w-[250px] md:h-[66px] inline-block overflow-hidden mt-2 mb-11">
{appLogo && (
<img src={appLogo} className="object-contain" alt="logo" />
)}
<div className="p-14">
<div>
{isLoading ? (
<div className="flex flex-col justify-center items-center h-[100vh]">
<Loader />
<span className="text-[13px] text-[gray]">{isLoading.message}</span>
</div>
{contactId ? (
<>
{!EnterOTP ? (
<div className="w-full md:w-[50%] text-base-content">
<h1 className="text-2xl md:text-[30px]">Welcome Back!</h1>
<legend className="text-[12px] text-[#878787] mt-2 mb-1">
Verification code is sent to your email
</legend>
<div className="p-[20px] outline outline-1 outline-slate-300/50 my-2 op-card shadow-md">
) : (
<div className="m-1 md:m-2 p-[30px] text-base-content bg-base-100 op-card shadow-md">
<div className="md:w-[250px] md:h-[66px] inline-block overflow-hidden mt-2 mb-11">
{appLogo && (
<img src={appLogo} className="object-contain" alt="logo" />
)}
</div>
{contactId ? (
<>
{!EnterOTP ? (
<div className="w-full md:w-[50%] text-base-content">
<h1 className="text-2xl md:text-[30px]">{t("welcome")}</h1>
<legend className="text-[12px] text-[#878787] mt-2 mb-1">
{t("guest-email-alert")}
</legend>
<div className="p-[20px] outline outline-1 outline-slate-300/50 my-2 op-card shadow-md">
<input
type="email"
name="email"
value={email}
className="op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full disabled:text-[#5c5c5c] text-xs"
disabled
/>
</div>
<div className="mt-3">
<button
className="op-btn op-btn-primary"
onClick={(e) => handleSendOTPBtn(e)}
disabled={loading}
>
{loading ? t("loading") : t("get-verification-code")}
</button>
</div>
</div>
) : (
<form
className="w-full md:w-[50%] text-base-content"
onSubmit={VerifyOTP}
>
<h1 className="text-2xl md:text-[30px]">{t("welcome")}</h1>
<legend className="text-[12px] text-[#878787] mt-2">
{t("get-verification-code-2")}
</legend>
<div className="p-[20px] pt-[15px] outline outline-1 outline-slate-300/50 op-card my-2 shadow-md">
<p className="text-sm">{t("enter-verification-code")}</p>
<input
type="number"
className="mt-2 op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs"
name="OTP"
value={OTP}
onChange={(e) => setOTP(e.target.value)}
/>
</div>
<div className="mt-2.5">
<button
className="op-btn op-btn-primary"
type="submit"
disabled={loading}
>
{loading ? t("loading") : t("verify")}
</button>
</div>
</form>
)}
</>
) : (
<div className="w-full md:w-[50%] text-base-content">
<h1 className="text-2xl md:text-[30px]">{t("welcome")}</h1>
<legend className="text-[12px] text-[#878787] mt-2">
{t("provide-your-details")}
</legend>
<form
className="p-[20px] pt-[15px] outline outline-1 outline-slate-300/50 my-2 op-card shadow-md"
onSubmit={handleUserData}
>
<div className="mb-2">
<label
htmlFor="name"
className="block text-xs text-gray-700 font-semibold"
>
{t("name")}
<span className="text-[red] text-[13px]"> *</span>
</label>
<input
type="text"
name="name"
value={contact.name}
onChange={handleInputChange}
className="op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs"
disabled={loading}
onInvalid={(e) =>
e.target.setCustomValidity(t("input-required"))
}
onInput={(e) => e.target.setCustomValidity("")}
required
/>
</div>
<div className="mb-2">
<label
htmlFor="email"
className="block text-xs text-gray-700 font-semibold"
>
{t("email")}
<span className="text-[red] text-[13px]"> *</span>
</label>
<input
type="email"
name="mobile"
value={email}
className="op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full disabled:text-[#5c5c5c] text-xs"
name="email"
value={contact.email}
onChange={handleInputChange}
className="op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs"
required
disabled
/>
</div>
<div className="mt-3">
<button
className="op-btn op-btn-primary"
onClick={(e) => handleSendOTPBtn(e)}
disabled={loading}
<div className="mt-2.5">
<label
htmlFor="phone"
className="block text-xs text-gray-700 font-semibold"
>
{loading ? "Loading..." : "Get verification code"}
</button>
</div>
</div>
) : (
<form
className="w-full md:w-[50%] text-base-content"
onSubmit={VerifyOTP}
>
<h1 className="text-2xl md:text-[30px]">Welcome Back!</h1>
<legend className="text-[12px] text-[#878787] mt-2">
You will get a verification code via Email
</legend>
<div className="p-[20px] pt-[15px] outline outline-1 outline-slate-300/50 op-card my-2 shadow-md">
<p className="text-sm">Enter Verification Code</p>
{t("phone")}
</label>
<input
type="number"
className="mt-2 op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs"
name="OTP"
value={OTP}
onChange={(e) => setOTP(e.target.value)}
type="text"
name="phone"
value={contact.phone}
onChange={handleInputChange}
className="op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs"
disabled={loading}
/>
</div>
<div className="mt-2.5">
<div className="mt-2 flex justify-start">
<button
className="op-btn op-btn-primary"
type="submit"
className="op-btn op-btn-primary"
disabled={loading}
>
{loading ? "Loading..." : "Verify"}
{loading ? t("loading") : t("next")}
</button>
</div>
</form>
)}
</>
) : (
<div className="w-full md:w-[50%] text-base-content">
<h1 className="text-2xl md:text-[30px]">Welcome</h1>
<legend className="text-[12px] text-[#878787] mt-2">
Provide your details
</legend>
<form
className="p-[20px] pt-[15px] outline outline-1 outline-slate-300/50 my-2 op-card shadow-md"
onSubmit={handleUserData}
>
<div className="mb-2">
<label
htmlFor="name"
className="block text-xs text-gray-700 font-semibold"
>
Name
<span className="text-[red] text-[13px]"> *</span>
</label>
<input
type="text"
name="name"
value={contact.name}
onChange={handleInputChange}
className="op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs"
disabled={loading}
required
/>
</div>
<div className="mb-2">
<label
htmlFor="email"
className="block text-xs text-gray-700 font-semibold"
>
Email
<span className="text-[red] text-[13px]"> *</span>
</label>
<input
type="email"
name="email"
value={contact.email}
onChange={handleInputChange}
className="op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs"
required
disabled
/>
</div>
<div className="mt-2.5">
<label
htmlFor="phone"
className="block text-xs text-gray-700 font-semibold"
>
Phone
</label>
<input
type="text"
name="phone"
value={contact.phone}
onChange={handleInputChange}
className="op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs"
disabled={loading}
/>
</div>
<div className="mt-2 flex justify-start">
<button
type="submit"
className="op-btn op-btn-primary"
disabled={loading}
>
{loading ? "Loading..." : "Next"}
</button>
</div>
</form>
</div>
)}
</div>
)}
</div>
)}
</div>
)}
</div>
<SelectLanguage />
</div>
);
}
File diff suppressed because it is too large Load Diff
+15 -15
View File
@@ -4,12 +4,12 @@ import "../styles/managesign.css";
import "../styles/signature.css";
import { toDataUrl } from "../constant/Utils";
import Parse from "parse";
import { appInfo } from "../constant/appinfo";
import { SaveFileSize } from "../constant/saveFileSize";
import Alert from "../primitives/Alert";
import Loader from "../primitives/Loader";
import { useTranslation } from "react-i18next";
const ManageSign = () => {
const appName = appInfo.appname;
const { t } = useTranslation();
const [penColor, setPenColor] = useState("blue");
const [initialPen, setInitialPen] = useState("blue");
const [image, setImage] = useState();
@@ -39,7 +39,7 @@ const ManageSign = () => {
objectId: User.id
};
try {
const signCls = `${appName}_Signature`;
const signCls = "contracts_Signature";
const signQuery = new Parse.Query(signCls);
signQuery.equalTo("UserId", userId);
const signRes = await signQuery.first();
@@ -174,7 +174,7 @@ const ManageSign = () => {
};
const saveEntry = async (obj) => {
const signCls = `${appName}_Signature`;
const signCls = "contracts_Signature";
const User = Parse.User.current().id;
const userId = { __type: "Pointer", className: "_User", objectId: User };
if (id) {
@@ -189,7 +189,7 @@ const ManageSign = () => {
setIsLoader(false);
setIsAlert({
type: "success",
message: "Signature saved successfully."
message: t("signature-saved-alert")
});
setTimeout(() => setIsAlert({}), 2000);
return res;
@@ -213,7 +213,7 @@ const ManageSign = () => {
setIsLoader(false);
setIsAlert({
type: "success",
message: "Signature saved successfully."
message: t("signature-saved-alert")
});
setTimeout(() => setIsAlert({}), 2000);
return res;
@@ -247,12 +247,12 @@ const ManageSign = () => {
<div className="relative w-full">
<div className="ml-[5px] my-[20px] md:m-[20px]">
<div className="text-[20px] font-semibold m-[10px] md:m-0 mb-2">
My Signature
{t("my-signature")}
</div>
<div className="flex flex-col md:flex-row gap-0 md:gap-[12px]">
<div className="relative">
<span className="font-medium select-none flex mb-[10px] pl-[10px]">
Signature
{t("signature")}
</span>
<input
type="file"
@@ -265,7 +265,7 @@ const ManageSign = () => {
<div className="relative">
<div>
{image ? (
<div className="signatureCanvas relative border-[2px] border-[#888] rounded-box">
<div className="signatureCanvas relative border-[2px] border-[#888] rounded-box overflow-hidden">
<img
alt="signature"
src={image}
@@ -332,14 +332,14 @@ const ManageSign = () => {
className="op-link"
onClick={() => handleUploadBtn()}
>
Upload image
{t("upload-image")}
</div>
<div
type="button"
className="op-link"
onClick={() => handleClear()}
>
Clear
{t("clear")}
</div>
</div>
</div>
@@ -347,14 +347,14 @@ const ManageSign = () => {
{warning && (
<span className="customwarning signWarning text-[12px] w-[220px] md:w-[300px]">
<i className="fa-light fa-exclamation-circle text-[#fab005] text-[15px] mr-[4px]"></i>
Please upload signature/Image
{t("upload-signature/Image")}
</span>
)}
</div>
</div>
<div className="relative">
<span className="font-medium select-none flex mb-[10px] pl-[10px]">
Initials
{t("initials")}
</span>
<div>
{isInitials ? (
@@ -427,7 +427,7 @@ const ManageSign = () => {
className="op-link text-sm md:text-base mr-1"
onClick={() => handleClearInitials()}
>
Clear
{t("clear")}
</div>
</div>
</div>
@@ -439,7 +439,7 @@ const ManageSign = () => {
className="op-btn op-btn-primary"
onClick={(e) => handleSubmit(e)}
>
save
{t("save")}
</button>
</div>
</div>
+39 -33
View File
@@ -10,6 +10,7 @@ import TourContentWithBtn from "../primitives/TourContentWithBtn";
import Tour from "reactour";
import axios from "axios";
import Loader from "../primitives/Loader";
import { useTranslation } from "react-i18next";
const DriveBody = React.lazy(
() => import("../components/opensigndrive/DriveBody")
@@ -22,6 +23,7 @@ const AppLoader = () => {
);
};
function Opensigndrive() {
const { t } = useTranslation();
const navigate = useNavigate();
const scrollRef = useRef(null);
const [isList, setIsList] = useState(false);
@@ -37,7 +39,7 @@ function Opensigndrive() {
const [tourStatusArr, setTourStatusArr] = useState([]);
const [isLoading, setIsLoading] = useState({
isLoad: true,
message: "This might take some time"
message: t("loading-mssg")
});
const [docId, setDocId] = useState();
const [handleError, setHandleError] = useState("");
@@ -78,7 +80,7 @@ function Opensigndrive() {
selector: '[data-tut="reactourFirst"]',
content: () => (
<TourContentWithBtn
message={`Click on the breadcrumb links to easily navigate through the folder hierarchy and view the documents within each folder.`}
message={t("tour-mssg.opensign-drive-1")}
isChecked={handleDontShow}
/>
),
@@ -89,7 +91,7 @@ function Opensigndrive() {
selector: '[data-tut="reactourSecond"]',
content: () => (
<TourContentWithBtn
message={`Click the add button to create a new folder or document.`}
message={t("tour-mssg.opensign-drive-2")}
isChecked={handleDontShow}
/>
),
@@ -100,7 +102,7 @@ function Opensigndrive() {
selector: '[data-tut="reactourThird"]',
content: () => (
<TourContentWithBtn
message={`Sort your documents by Date or Name using this menu.`}
message={t("tour-mssg.opensign-drive-3")}
isChecked={handleDontShow}
/>
),
@@ -111,7 +113,7 @@ function Opensigndrive() {
selector: '[data-tut="reactourForth"]',
content: () => (
<TourContentWithBtn
message={`Click on this menu to display the documents in list view.`}
message={t("tour-mssg.opensign-drive-4")}
isChecked={handleDontShow}
/>
),
@@ -126,7 +128,7 @@ function Opensigndrive() {
checkTourStatus();
}
if (!disbaleLoading) {
setIsLoading({ isLoad: true, message: "This might take some time" });
setIsLoading({ isLoad: true, message: t("loading-mssg") });
}
try {
const driveDetails = await getDrive(docId, skip, limit);
@@ -138,7 +140,7 @@ function Opensigndrive() {
selector: '[data-tut="reactourFifth"]',
content: () => (
<TourContentWithBtn
message={`The document list is displayed according to the selected sorting option. Icons next to each document indicate its current status.`}
message={t("tour-mssg.opensign-drive-5")}
isChecked={handleDontShow}
/>
),
@@ -149,7 +151,7 @@ function Opensigndrive() {
selector: '[data-tut="reactourSixth"]',
content: () => (
<TourContentWithBtn
message={`Right-click on a document to see options such as Download, Rename, Move, and Delete. Click on the document to open it.`}
message={t("tour-mssg.opensign-drive-6")}
isChecked={handleDontShow}
/>
),
@@ -160,7 +162,7 @@ function Opensigndrive() {
selector: '[data-tut="reactourSeventh"]',
content: () => (
<TourContentWithBtn
message={`Right-click on any folder to see options. Choose Rename to change the folders name or click on the folder to navigate through its contents.`}
message={t("tour-mssg.opensign-drive-7")}
isChecked={handleDontShow}
/>
),
@@ -190,12 +192,12 @@ function Opensigndrive() {
setTourData(tourConfigs);
}
if (!docId) {
setFolderName([{ name: "OpenSign™ Drive", objectId: "" }]);
setFolderName([{ name: t("OpenSign-drive"), objectId: "" }]);
}
} catch (e) {
setIsAlert({
isShow: true,
alertMessage: "something went wrong"
alertMessage: t("something-went-wrong-mssg")
});
} finally {
setLoading(false);
@@ -272,7 +274,7 @@ function Opensigndrive() {
setIsFolderLoader(true);
const getParentObjId = folderName[folderName.length - 1];
const parentId = getParentObjId && getParentObjId.objectId;
const foldercls = `${localStorage.getItem("_appName")}_Document`;
const foldercls = "contracts_Document";
const folderPtr = {
__type: "Pointer",
className: foldercls,
@@ -319,11 +321,11 @@ function Opensigndrive() {
} catch (e) {
setIsAlert({
isShow: true,
alertMessage: "something went wrong!"
alertMessage: t("something-went-wrong-mssg")
});
}
} else {
setError("Please fill out this field");
setError(t("fill-field"));
}
};
@@ -465,7 +467,6 @@ function Opensigndrive() {
if (isDontShow) {
const serverUrl = localStorage.getItem("baseUrl");
const appId = localStorage.getItem("parseAppId");
const extUserClass = localStorage.getItem("extended_class");
const json = JSON.parse(localStorage.getItem("Extand_Class"));
const extUserId = json && json.length > 0 && json[0].objectId;
let updatedTourStatus = [];
@@ -483,7 +484,7 @@ function Opensigndrive() {
updatedTourStatus = [{ driveTour: true }];
}
await axios.put(
serverUrl + "classes/" + extUserClass + "/" + extUserId,
serverUrl + "classes/contracts_Users/" + extUserId,
{
TourStatus: updatedTourStatus
},
@@ -497,10 +498,7 @@ function Opensigndrive() {
};
//function to use check tour status of open sign drive
async function checkTourStatus() {
const currentUser = Parse.User.current();
const cloudRes = await Parse.Cloud.run("getUserDetails", {
email: currentUser.get("email")
});
const cloudRes = await Parse.Cloud.run("getUserDetails");
const res = { data: cloudRes.toJSON() };
if (res.data && res.data.TourStatus && res.data.TourStatus.length > 0) {
const tourStatus = res.data.TourStatus;
@@ -526,7 +524,7 @@ function Opensigndrive() {
<Title title={"OpenSign™ Drive"} drive={true} />
<ModalUi
isOpen={isAlert.isShow}
title={"Alert"}
title={t("alert")}
handleClose={() => {
setIsAlert({
isShow: false,
@@ -547,13 +545,13 @@ function Opensigndrive() {
type="button"
className="op-btn op-btn-neutral op-btn-sm"
>
Close
{t("close")}
</button>
</div>
</ModalUi>
<ModalUi
isOpen={isFolder}
title={"Add New Folder"}
title={t("add-new-folder")}
handleClose={oncloseFolder}
>
<div className="h-full p-[20px] pt-[10px] pb-[15px]">
@@ -567,10 +565,14 @@ function Opensigndrive() {
className="flex flex-col text-base-content"
>
<label className="py-[8px] text-[15px] font-[400] mb-0">
Name
{t("name")}
<span className="text-[red]">*</span>
</label>
<input
onInvalid={(e) =>
e.target.setCustomValidity(t("input-required"))
}
onInput={(e) => e.target.setCustomValidity("")}
required
className="op-input op-input-bordered op-input-sm"
type="text"
@@ -581,14 +583,14 @@ function Opensigndrive() {
<div className="w-full h-[1px] bg-[#9f9f9f] my-[15px]"></div>
<div className="flex flex-row">
<button type="submit" className="op-btn op-btn-primary">
Add
{t("add")}
</button>
<button
type="button"
className="op-btn op-btn-ghost ml-1"
onClick={oncloseFolder}
>
Close
{t("close")}
</button>
</div>
</form>
@@ -656,21 +658,21 @@ function Opensigndrive() {
className="fa-light fa-plus mr-[5px]"
aria-hidden="true"
></i>
Create folder
{t("create-folder")}
</span>
<span
className="dropdown-item text-[10px] md:text-[13px]"
onClick={() => navigate("/form/sHAnZphf69")}
>
<i className="fa-light fa-pen-nib mr-[5px]"></i>
Sign Yourself
{t("form-name.Sign Yourself")}
</span>
<span
className="dropdown-item text-[10px] md:text-[13px]"
onClick={() => navigate("/form/8mZzFxbG1z")}
>
<i className="fa-light fa-file-signature mr-[5px]"></i>
Request Signatures
{t("form-name.Request Signatures")}
</span>
</div>
</div>
@@ -720,7 +722,9 @@ function Opensigndrive() {
aria-hidden="true"
></i>
)}
<span className="ml-[5px]">{value}</span>
<span className="ml-[5px]">
{t(`sort-order.${value}`)}
</span>
</span>
);
})}
@@ -745,7 +749,9 @@ function Opensigndrive() {
aria-hidden="true"
></i>
)}
<span className="ml-[5px]">{order}</span>
<span className="ml-[5px]">
{t(`sort-order.${order}`)}
</span>
</span>
);
})}
@@ -782,7 +788,7 @@ function Opensigndrive() {
{pdfData && pdfData.length === 0 ? (
<div className="flex justify-center items-center w-full h-[50vh]">
<span className="text-base-content font-bold">
No Data Found!
{t("no-data")}
</span>
</div>
) : (
@@ -804,7 +810,7 @@ function Opensigndrive() {
sortingData={sortingData}
/>
{loading && (
<div className="text-center pb-[20px]">Loading...</div>
<div className="text-center pb-[20px]">{t("loading")}</div>
)}
</React.Suspense>
</div>
File diff suppressed because it is too large Load Diff
+70 -197
View File
@@ -8,8 +8,10 @@ import { appInfo } from "../constant/appinfo";
import { showTenant } from "../redux/reducers/ShowTenant";
import { fetchAppInfo } from "../redux/reducers/infoReducer";
import Loader from "../primitives/Loader";
import { useTranslation } from "react-i18next";
const PgSignUp = () => {
const { t } = useTranslation();
const navigate = useNavigate();
const location = useLocation();
const dispatch = useDispatch();
@@ -70,6 +72,17 @@ const PgSignUp = () => {
});
if (res) {
localStorage.removeItem("userDetails");
try {
const extUser = await Parse.Cloud.run("getUserDetails");
const userRole = extUser?.get("UserRole");
const _currentRole = userRole;
const _role = _currentRole.replace("contracts_", "");
localStorage.setItem("_user_role", _role);
const extInfo_stringify = JSON.stringify([extUser]);
localStorage.setItem("Extand_Class", extInfo_stringify);
} catch (err) {
console.log("Err in fetching extuser", err);
}
navigate(
"/" + userSettings[0].pageType + "/" + userSettings[0].pageId
);
@@ -107,8 +120,6 @@ const PgSignUp = () => {
}
};
const saveUser = async (obj) => {
// const domain = localStorage.getItem("domain");
// console.log("domain", domain)
try {
const zohoRes = await axios.post(
parseBaseUrl + "functions/zohodetails",
@@ -157,11 +168,11 @@ const PgSignUp = () => {
} catch (error) {
console.log("err ", error);
if (error.message === "Account already exists for this username.") {
alert("Account already exists!");
alert(t("account-already-exists"));
navigate("/", { replace: true });
} else {
setIsLoader(false);
alert("Something went wrong, please try again later!");
alert(t("something-went-wrong-mssg"));
}
}
};
@@ -209,8 +220,6 @@ const PgSignUp = () => {
if (res.data) {
let _user = res.data;
localStorage.setItem("UserInformation", JSON.stringify(_user));
localStorage.setItem("userEmail", _user.email);
localStorage.setItem("username", _user.name);
localStorage.setItem("accesstoken", _user.sessionToken);
localStorage.setItem("scriptId", true);
if (_user.ProfilePic) {
@@ -220,190 +229,49 @@ const PgSignUp = () => {
}
// Check extended class user role and tenentId
try {
let userRoles = [];
if (appInfo.settings) {
let userSettings = appInfo.settings;
//Get Current user roles
let url = `${baseUrl}functions/UserGroups`;
const headers = {
"Content-Type": "application/json",
"X-Parse-Application-Id": parseAppId,
sessionToken: _user.sessionToken
};
let body = {
appname: localStorage.getItem("_appName")
};
await axios
.post(url, JSON.stringify(body), { headers: headers })
.then((roles) => {
if (roles) {
userRoles = roles.data.result;
let _currentRole = "";
if (userRoles.length > 1) {
if (
userRoles[0] ===
`${localStorage.getItem("_appName")}_appeditor`
) {
_currentRole = userRoles[1];
} else {
_currentRole = userRoles[0];
}
} else {
_currentRole = userRoles[0];
}
if (
_currentRole !==
`${localStorage.getItem("_appName")}_appeditor`
) {
userSettings.forEach(async (element) => {
if (element.role === _currentRole) {
let _role = _currentRole.replace(
`${localStorage.getItem("_appName")}_`,
""
);
localStorage.setItem("_user_role", _role);
// Get TenentID from Extendend Class
localStorage.setItem(
"extended_class",
element.extended_class
);
const currentUser = Parse.User.current();
await Parse.Cloud.run("getUserDetails", {
email: currentUser.get("email")
}).then(
(result) => {
const results = [result];
let tenentInfo = [];
if (results) {
let extendedInfo_stringify =
JSON.stringify(results);
localStorage.setItem(
"Extand_Class",
extendedInfo_stringify
);
let extendedInfo = JSON.parse(
extendedInfo_stringify
);
if (extendedInfo.length > 1) {
extendedInfo.forEach((x) => {
if (x.TenantId) {
let obj = {
tenentId: x.TenantId.objectId,
tenentName: x.TenantId.TenantName || ""
};
tenentInfo.push(obj);
}
});
if (tenentInfo.length) {
dispatch(
showTenant(tenentInfo[0].tenentName || "")
);
localStorage.setItem(
"TenantName",
tenentInfo[0].tenentName || ""
);
}
localStorage.setItem("showpopup", true);
localStorage.setItem(
"PageLanding",
element.pageId
);
localStorage.setItem(
"defaultmenuid",
element.menuId
);
localStorage.setItem(
"pageType",
element.pageType
);
setIsLoader(false);
navigate("/", { replace: true });
} else {
extendedInfo.forEach((x) => {
if (x.TenantId) {
let obj = {
tenentId: x.TenantId.objectId,
tenentName: x.TenantId.TenantName || ""
};
localStorage.setItem(
"TenantId",
x.TenantId.objectId
);
tenentInfo.push(obj);
}
});
if (tenentInfo.length) {
dispatch(
showTenant(tenentInfo[0].tenentName || "")
);
localStorage.setItem(
"TenantName",
tenentInfo[0].tenentName || ""
);
}
localStorage.setItem(
"PageLanding",
element.pageId
);
localStorage.setItem(
"defaultmenuid",
element.menuId
);
localStorage.setItem(
"pageType",
element.pageType
);
setIsLoader(false);
alert("Registered user successfully");
const redirectUrl =
location?.state?.from ||
`/${element.pageType}/${element.pageId}`;
// Redirect to the appropriate URL after successful login
navigate(redirectUrl);
}
} else {
alert("Registered user successfully");
localStorage.setItem("PageLanding", element.pageId);
localStorage.setItem(
"defaultmenuid",
element.menuId
);
localStorage.setItem("pageType", element.pageType);
setIsLoader(false);
const redirectUrl =
location?.state?.from ||
`/${element.pageType}/${element.pageId}`;
// Redirect to the appropriate URL after successful login
navigate(redirectUrl);
}
},
(error) => {
setIsLoader(false);
console.error("Error while fetching Follow", error);
}
);
}
});
} else {
setIsLoader(false);
}
} else {
setIsLoader(false);
const userSettings = appInfo.settings;
const extUser = await Parse.Cloud.run("getUserDetails");
if (extUser) {
const IsDisabled = extUser?.get("IsDisabled") || false;
if (!IsDisabled) {
const userRole = extUser?.get("UserRole");
const menu =
userRole && userSettings.find((menu) => menu.role === userRole);
if (menu) {
const _currentRole = userRole;
const _role = _currentRole.replace("contracts_", "");
localStorage.setItem("_user_role", _role);
const extInfo_stringify = JSON.stringify([extUser]);
localStorage.setItem("Extand_Class", extInfo_stringify);
const extInfo = JSON.parse(JSON.stringify(extUser));
localStorage.setItem("userEmail", extInfo?.Email);
localStorage.setItem("username", extInfo?.Name);
if (extInfo?.TenantId) {
const tenant = {
Id: extInfo?.TenantId?.objectId || "",
Name: extInfo?.TenantId?.TenantName || ""
};
localStorage.setItem("TenantId", tenant?.Id);
dispatch(showTenant(tenant?.Name));
localStorage.setItem("TenantName", tenant?.Name);
}
})
.catch((err) => {
console.log("err", err);
localStorage.setItem("PageLanding", menu.pageId);
localStorage.setItem("defaultmenuid", menu.menuId);
localStorage.setItem("pageType", menu.pageType);
setIsLoader(false);
});
alert(t("registered-user-successfully"));
const redirectUrl =
location?.state?.from || `/${menu.pageType}/${menu.pageId}`;
// Redirect to the appropriate URL after successful login
navigate(redirectUrl);
}
} else {
setIsLoader(false);
}
}
} catch (error) {
setIsLoader(false);
console.log(error);
console.log("Err in fetch extuser", error);
}
}
};
@@ -423,27 +291,31 @@ const PgSignUp = () => {
>
<div className="p-[16px]">
<h1 className="text-2xl md:text-3xl font-bold">
Choose Password
{t("choose-password")}
</h1>
<hr className="border-[1px] border-[#cecece] mb-[5px]" />
<label htmlFor="password">
<b className="text-[13px]">Password</b>
<b className="text-[13px]">{t("password")}</b>
</label>
<input
type="password"
placeholder="Enter Password"
placeholder={t("enter-password")}
name="password"
className="op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs"
value={formData.password}
onChange={handlePassowordChange}
onInvalid={(e) =>
e.target.setCustomValidity(t("input-required"))
}
onInput={(e) => e.target.setCustomValidity("")}
required
/>
<label htmlFor="confirmPassword">
<b className="text-[13px]">Confirm Password</b>
<b className="text-[13px]">{t("confirm-password")}</b>
</label>
<input
type="password"
placeholder="Confirm Password"
placeholder={t("confirm-password")}
name="confirmPassword"
className="op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs"
style={{
@@ -455,6 +327,10 @@ const PgSignUp = () => {
}}
value={formData.confirmPassword}
onChange={handleConFirmPassowordChange}
onInvalid={(e) =>
e.target.setCustomValidity(t("input-required"))
}
onInput={(e) => e.target.setCustomValidity("")}
required
/>
<div
@@ -473,24 +349,21 @@ const PgSignUp = () => {
lengthValid ? "text-green-600" : "text-red-600"
}`}
>
{lengthValid ? "✓" : "✗"} Password should be 8 characters
long
{lengthValid ? "✓" : "✗"} {t("password-length")}
</p>
<p
className={`${
caseDigitValid ? "text-green-600" : "text-red-600"
}`}
>
{caseDigitValid ? "✓" : "✗"} Password should contain
uppercase letter, lowercase letter, digit
{caseDigitValid ? "✓" : "✗"} {t("password-case")}
</p>
<p
className={`${
specialCharValid ? "text-green-600" : "text-red-600"
}`}
>
{specialCharValid ? "✓" : "✗"} Password should contain
special character
{specialCharValid ? "✓" : "✗"} {t("password-special-char")}
</p>
</div>
)}
@@ -498,7 +371,7 @@ const PgSignUp = () => {
type="submit"
className="op-btn op-btn-primary w-full mt-[8px]"
>
Submit
{t("submit")}
</button>
</div>
</form>

Some files were not shown because too many files have changed in this diff Show More