Skip to content

Commit 387154c

Browse files
authored
Merge pull request #536 from OpenSignLabs/staging
v1.4.0-beta
2 parents f7606bc + 12a6a84 commit 387154c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+6359
-3210
lines changed

.env.local_dev

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ appName=open_sign_server
2020
# 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.
2121
MASTER_KEY=XnAadwKxxByMr
2222
# Mongodb URI to connect to
23-
MONGODB_URI=mongodb://localhost:27017/OpenSignDB
23+
MONGODB_URI=mongodb://mongo:27017/OpenSignDB
2424
# 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.
2525
PARSE_MOUNT=/app
2626
# 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)

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
build:
22
cp .env.local_dev .env
3-
cd apps/OpenSign && npm install && npm run build
3+
cd apps/OpenSign && cp ../../.env.local_dev .env && npm install && npm run build
44
docker compose up --build --force-recreate
55

66
run:

apps/OpenSign/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ EXPOSE 3000
2121
# ENV NODE_ENV production
2222

2323
# Run the application
24-
ENTRYPOINT npm run start-dev
24+
ENTRYPOINT npm run start
2525

apps/OpenSign/package-lock.json

Lines changed: 640 additions & 718 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/OpenSign/package.json

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,35 +3,32 @@
33
"version": "0.1.0",
44
"private": true,
55
"dependencies": {
6+
"@formkit/auto-animate": "^0.8.1",
67
"@radix-ui/themes": "^2.0.3",
7-
"@react-pdf/renderer": "^3.3.8",
8+
"@react-pdf/renderer": "^3.4.0",
89
"@reduxjs/toolkit": "^2.2.1",
9-
"axios": "^1.6.0",
10-
"daisyui": "^3.9.2",
10+
"axios": "^1.6.8",
1111
"file-saver": "^2.0.5",
12-
"html-react-parser": "^4.2.2",
1312
"jwt-decode": "^4.0.0",
14-
"moment": "^2.29.4",
13+
"moment": "^2.30.1",
1514
"parse": "^4.3.1",
1615
"pdf-lib": "^1.17.1",
1716
"print-js": "^1.6.0",
1817
"radix-ui": "^1.0.1",
1918
"react": "^18.2.0",
20-
"react-bootstrap": "^2.10.1",
21-
"react-datepicker": "^6.2.0",
19+
"react-bootstrap": "^2.10.2",
20+
"react-datepicker": "^6.4.0",
2221
"react-dnd": "^16.0.1",
2322
"react-dnd-html5-backend": "^16.0.1",
2423
"react-dnd-multi-backend": "^8.0.3",
2524
"react-dnd-touch-backend": "^16.0.1",
2625
"react-dom": "^18.2.0",
27-
"react-drag-listview": "^2.0.0",
28-
"react-draggable": "^4.4.6",
2926
"react-gtm-module": "^2.0.11",
3027
"react-helmet": "^6.1.0",
3128
"react-konva": "^18.2.10",
3229
"react-modal": "^3.16.1",
3330
"react-pdf": "^7.7.1",
34-
"react-redux": "^8.1.3",
31+
"react-redux": "^9.1.0",
3532
"react-rnd": "^10.4.1",
3633
"react-router-dom": "^6.22.3",
3734
"react-scripts": "5.0.1",
@@ -40,8 +37,8 @@
4037
"react-signature-canvas": "^1.0.6",
4138
"react-tooltip": "^5.26.3",
4239
"reactour": "^1.19.2",
43-
"redux": "^4.2.1",
44-
"redux-thunk": "^2.4.2",
40+
"redux": "^5.0.1",
41+
"redux-thunk": "^3.1.0",
4542
"regex-parser": "^2.3.0",
4643
"serve": "^14.2.1",
4744
"styled-components": "^4.4.1",
@@ -83,16 +80,16 @@
8380
}
8481
},
8582
"devDependencies": {
86-
"@babel/runtime-corejs2": "^7.23.9",
83+
"@babel/runtime-corejs2": "^7.24.1",
8784
"autoprefixer": "^10.4.18",
8885
"commitizen": "^4.3.0",
89-
"eslint": "^8.51.0",
86+
"eslint": "^8.57.0",
9087
"eslint-plugin-prettier": "^4.2.1",
91-
"eslint-plugin-react": "^7.33.2",
88+
"eslint-plugin-react": "^7.34.1",
9289
"lint-staged": "^15.2.2",
93-
"postcss": "^8.4.35",
94-
"prettier": "^2.8.0",
95-
"pretty-quick": "^3.1.3",
96-
"tailwindcss": "^3.3.3"
90+
"postcss": "^8.4.37",
91+
"prettier": "^2.8.8",
92+
"pretty-quick": "^3.3.1",
93+
"tailwindcss": "^3.4.1"
9794
}
9895
}

apps/OpenSign/src/App.js

Lines changed: 95 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useState, useEffect, Suspense, lazy } from "react";
1+
import React, { useState, useEffect, lazy } from "react";
22
import { Routes, Route, BrowserRouter } from "react-router-dom";
33
import { pdfjs } from "react-pdf";
44
import Login from "./pages/Login";
@@ -9,12 +9,12 @@ import HomeLayout from "./layout/HomeLayout";
99
import PageNotFound from "./pages/PageNotFound";
1010
import ValidateRoute from "./primitives/ValidateRoute";
1111
import Validate from "./primitives/Validate";
12-
import ManageSign from "./pages/Managesign";
1312
import TemplatePlaceholder from "./pages/TemplatePlaceholder";
1413
import SignYourSelf from "./pages/SignyourselfPdf";
1514
import DraftDocument from "./components/pdf/DraftDocument";
1615
import PlaceHolderSign from "./pages/PlaceHolderSign";
1716
import PdfRequestFiles from "./pages/PdfRequestFiles";
17+
import LazyPage from "./primitives/LazyPage";
1818
const DebugPdf = lazy(() => import("./pages/DebugPdf"));
1919
const ForgetPassword = lazy(() => import("./pages/ForgetPassword"));
2020
const GuestLogin = lazy(() => import("./pages/GuestLogin"));
@@ -23,9 +23,10 @@ const Subscriptions = lazy(() => import("./pages/PlanSubscriptions"));
2323
const ChangePassword = lazy(() => import("./pages/ChangePassword"));
2424
const UserProfile = lazy(() => import("./pages/UserProfile"));
2525
const Signup = lazy(() => import("./pages/Signup"));
26+
const Opensigndrive = lazy(() => import("./pages/Opensigndrive"));
27+
const ManageSign = lazy(() => import("./pages/Managesign"));
2628
const GenerateToken = lazy(() => import("./pages/GenerateToken"));
2729
const Webhook = lazy(() => import("./pages/Webhook"));
28-
const Opensigndrive = lazy(() => import("./pages/Opensigndrive"));
2930
pdfjs.GlobalWorkerOptions.workerSrc = `//cdnjs.cloudflare.com/ajax/libs/pdf.js/${pdfjs.version}/pdf.worker.js`;
3031

3132
const Loader = () => {
@@ -78,83 +79,105 @@ function App() {
7879
<Loader />
7980
) : (
8081
<BrowserRouter>
81-
<Suspense fallback={<Loader />}>
82-
<Routes>
83-
<Route element={<ValidateRoute />}>
84-
<Route exact path="/" element={<Login />} />
85-
<Route exact path="/signup" element={<Signup />} />
86-
</Route>
87-
<Route element={<Validate />}>
88-
<Route
89-
path="/load/template/:templateId"
90-
element={<TemplatePlaceholder />}
91-
/>
92-
<Route
93-
exact
94-
path="/load/placeholdersign/:docId"
95-
element={<PlaceHolderSign />}
96-
/>
97-
<Route
98-
exact
99-
path="/load/recipientSignPdf/:docId/:contactBookId"
100-
element={<PdfRequestFiles />}
101-
/>
102-
</Route>
82+
<Routes>
83+
<Route element={<ValidateRoute />}>
84+
<Route exact path="/" element={<Login />} />
85+
<Route path="/signup" element={<LazyPage Page={Signup} />} />
86+
</Route>
87+
<Route element={<Validate />}>
10388
<Route
104-
path="/loadmf/signmicroapp/login/:id/:userMail/:contactBookId/:serverUrl"
105-
element={<GuestLogin />}
89+
path="/load/template/:templateId"
90+
element={<TemplatePlaceholder />}
10691
/>
10792
<Route
108-
path="/login/:id/:userMail/:contactBookId/:serverUrl"
109-
element={<GuestLogin />}
93+
exact
94+
path="/load/placeholdersign/:docId"
95+
element={<PlaceHolderSign />}
11096
/>
111-
<Route path="/debugpdf" element={<DebugPdf />} />
112-
<Route path="/forgetpassword" element={<ForgetPassword />} />
113-
{process.env.REACT_APP_ENABLE_SUBSCRIPTION && (
114-
<>
115-
<Route exact path="/pgsignup" element={<Pgsignup />} />
116-
<Route path="/subscription" element={<Subscriptions />} />
117-
</>
118-
)}
119-
<Route element={<HomeLayout />}>
120-
<Route path="/changepassword" element={<ChangePassword />} />
121-
<Route path="/form/:id" element={<Form />} />
122-
<Route path="/report/:id" element={<Report />} />
123-
<Route path="/dashboard/:id" element={<Dashboard />} />
124-
<Route path="/profile" element={<UserProfile />} />
125-
<Route path="/generatetoken" element={<GenerateToken />} />
126-
<Route path="/webhook" element={<Webhook />} />
127-
<Route path="/managesign" element={<ManageSign />} />
128-
<Route path="/opensigndrive" element={<Opensigndrive />} />
129-
<Route
130-
path="/template/:templateId"
131-
element={<TemplatePlaceholder />}
132-
/>
133-
{/* signyouself route with no rowlevel data using docId from url */}
134-
<Route path="/signaturePdf/:docId" element={<SignYourSelf />} />
135-
{/* draft document route to handle and navigate route page accordiing to document status */}
136-
<Route path="/draftDocument" element={<DraftDocument />} />
137-
{/* recipient placeholder set route with no rowlevel data using docId from url*/}
138-
<Route
139-
path="/placeHolderSign/:docId"
140-
element={<PlaceHolderSign />}
141-
/>
142-
{/* for user signature (need your sign route) with row level data */}
143-
<Route path="/pdfRequestFiles" element={<PdfRequestFiles />} />
144-
{/* for user signature (need your sign route) with no row level data */}
97+
<Route
98+
exact
99+
path="/load/recipientSignPdf/:docId/:contactBookId"
100+
element={<PdfRequestFiles />}
101+
/>
102+
</Route>
103+
<Route
104+
path="/loadmf/signmicroapp/login/:id/:userMail/:contactBookId/:serverUrl"
105+
element={<LazyPage Page={GuestLogin} />}
106+
/>
107+
<Route
108+
path="/login/:id/:userMail/:contactBookId/:serverUrl"
109+
element={<LazyPage Page={GuestLogin} />}
110+
/>
111+
<Route path="/debugpdf" element={<LazyPage Page={DebugPdf} />} />
112+
<Route
113+
path="/forgetpassword"
114+
element={<LazyPage Page={ForgetPassword} />}
115+
/>
116+
{process.env.REACT_APP_ENABLE_SUBSCRIPTION && (
117+
<>
145118
<Route
146-
path="/pdfRequestFiles/:docId"
147-
element={<PdfRequestFiles />}
119+
path="/pgsignup"
120+
element={<LazyPage Page={Pgsignup} />}
148121
/>
149-
{/* recipient signature route with no rowlevel data using docId from url */}
150122
<Route
151-
path="/recipientSignPdf/:docId/:contactBookId"
152-
element={<PdfRequestFiles />}
123+
path="/subscription"
124+
element={<LazyPage Page={Subscriptions} />}
153125
/>
154-
</Route>
155-
<Route path="*" element={<PageNotFound />} />
156-
</Routes>
157-
</Suspense>
126+
</>
127+
)}
128+
<Route element={<HomeLayout />}>
129+
<Route
130+
path="/changepassword"
131+
element={<LazyPage Page={ChangePassword} />}
132+
/>
133+
<Route path="/form/:id" element={<Form />} />
134+
<Route path="/report/:id" element={<Report />} />
135+
<Route path="/dashboard/:id" element={<Dashboard />} />
136+
<Route
137+
path="/profile"
138+
element={<LazyPage Page={UserProfile} />}
139+
/>
140+
<Route
141+
path="/opensigndrive"
142+
element={<LazyPage Page={Opensigndrive} />}
143+
/>
144+
<Route
145+
path="/managesign"
146+
element={<LazyPage Page={ManageSign} />}
147+
/>
148+
<Route
149+
path="/generatetoken"
150+
element={<LazyPage Page={GenerateToken} />}
151+
/>
152+
<Route path="/webhook" element={<LazyPage Page={Webhook} />} />
153+
<Route
154+
path="/template/:templateId"
155+
element={<TemplatePlaceholder />}
156+
/>
157+
{/* signyouself route with no rowlevel data using docId from url */}
158+
<Route path="/signaturePdf/:docId" element={<SignYourSelf />} />
159+
{/* draft document route to handle and navigate route page accordiing to document status */}
160+
<Route path="/draftDocument" element={<DraftDocument />} />
161+
{/* recipient placeholder set route with no rowlevel data using docId from url*/}
162+
<Route
163+
path="/placeHolderSign/:docId"
164+
element={<PlaceHolderSign />}
165+
/>
166+
{/* for user signature (need your sign route) with row level data */}
167+
<Route path="/pdfRequestFiles" element={<PdfRequestFiles />} />
168+
{/* for user signature (need your sign route) with no row level data */}
169+
<Route
170+
path="/pdfRequestFiles/:docId"
171+
element={<PdfRequestFiles />}
172+
/>
173+
{/* recipient signature route with no rowlevel data using docId from url */}
174+
<Route
175+
path="/recipientSignPdf/:docId/:contactBookId"
176+
element={<PdfRequestFiles />}
177+
/>
178+
</Route>
179+
<Route path="*" element={<PageNotFound />} />
180+
</Routes>
158181
</BrowserRouter>
159182
)}
160183
</div>

apps/OpenSign/src/components/dashboard/DashboardCard.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import Parse from "parse";
44
import getReplacedHashQuery from "../../constant/getReplacedHashQuery";
55
import "../../styles/loader.css";
66
import { useNavigate } from "react-router-dom";
7+
import Tooltip from "../../primitives/Tooltip";
78

89
const DashboardCard = (props) => {
910
const navigate = useNavigate();
@@ -335,7 +336,7 @@ const DashboardCard = (props) => {
335336
props.Data && props.Data.Redirect_type
336337
? "cursor-pointer"
337338
: "cursor-default"
338-
} w-full h-[140px] px-3 pt-4 pb-10 text-white rounded-md shadow overflow-hidden`}
339+
} w-full h-[140px] px-3 pt-4 pb-10 text-white rounded-md shadow overflow-hidden relative`}
339340
>
340341
<div className="flex items-center justify-start gap-5">
341342
<span className="rounded-full bg-black bg-opacity-20 w-[60px] h-[60px] self-start flex justify-center items-center">
@@ -352,6 +353,9 @@ const DashboardCard = (props) => {
352353
</div>
353354
</div>
354355
</div>
356+
<div className="text-xs absolute top-1 right-1">
357+
<Tooltip id={props.Label} iconColor={"white"} message={props?.Data?.tourMessage} />
358+
</div>
355359
</div>
356360
);
357361
};

apps/OpenSign/src/components/dashboard/GetDashboard.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,18 @@ const buttonList = [
66
{
77
label: "Sign yourself",
88
redirectId: "sHAnZphf69",
9-
redirectType: "Form"
9+
redirectType: "Form",
10+
icon: "fas fa-pen-nib"
1011
},
1112
{
1213
label: "Request signature",
1314
redirectId: "8mZzFxbG1z",
14-
redirectType: "Form"
15+
redirectType: "Form",
16+
icon: "fa-solid fa-paper-plane"
1517
}
1618
];
1719
const GetDashboard = (props) => {
18-
const Button = ({ label, redirectId, redirectType }) => (
20+
const Button = ({ label, redirectId, redirectType, icon }) => (
1921
<div className={"bg-white rounded-md shadow w-full"}>
2022
<Suspense
2123
fallback={
@@ -33,7 +35,7 @@ const GetDashboard = (props) => {
3335
}
3436
>
3537
<DashboardButton
36-
Icon={"fa-solid fa-plus"}
38+
Icon={icon}
3739
Label={label}
3840
Data={{ Redirect_type: redirectType, Redirect_id: redirectId }}
3941
/>
@@ -136,6 +138,7 @@ const GetDashboard = (props) => {
136138
label={btn.label}
137139
redirectType={btn.redirectType}
138140
redirectId={btn.redirectId}
141+
icon={btn.icon}
139142
/>
140143
))}
141144
</div>

0 commit comments

Comments
 (0)