Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
eafb26d
feat: restrict route if user subscription is expired
prafull-opensignlabs Mar 20, 2024
8a01efe
Merge pull request #516 from OpenSignLabs/staging
prafull-opensignlabs Mar 20, 2024
fe2f3c5
Merge pull request #538 from OpenSignLabs/staging
prafull-opensignlabs Mar 27, 2024
adbf1fe
Merge pull request #539 from OpenSignLabs/staging
prafull-opensignlabs Mar 27, 2024
3115ff3
fix: restrict user from logging in when next renewal date is expired …
prafull-opensignlabs Mar 27, 2024
74bfd39
feat: restrict guest route
prafull-opensignlabs Mar 27, 2024
2762c3e
feat: add validation of free plan
prafull-opensignlabs Mar 28, 2024
724fa7c
Merge branch 'staging' of https://github.com/OpenSignLabs/OpenSign in…
prafull-opensignlabs Mar 28, 2024
c57c15a
feat: save tenant usage
prafull-opensignlabs Mar 28, 2024
46159b7
fix: freeplan navigation
prafull-opensignlabs Mar 29, 2024
1932dda
feat: disbale validation feature, documentId,webhook,API token for fr…
raktima-opensignlabs Mar 29, 2024
881ac12
feat: savefileusage in server side
prafull-opensignlabs Mar 29, 2024
de26c2d
fix: handle condition of free validation warning message
raktima-opensignlabs Mar 29, 2024
741f66b
feat: add documentCount and templateCount for user
prafull-opensignlabs Mar 31, 2024
5930fd9
refactor: add loader in for free subscription
prafull-opensignlabs Mar 31, 2024
d588caf
fix: not able to subscribed free plan & stop sending individual mail
prafull-opensignlabs Mar 31, 2024
5adaffc
feat: add emailcount of user
prafull-opensignlabs Mar 31, 2024
099a3cc
refactor: update Emailcount in OTP mail
prafull-opensignlabs Mar 31, 2024
6c21028
feat: add upgrade now button in header
prafull-opensignlabs Mar 31, 2024
7eec822
refactor: correct grammatical mistake in report help message
prafull-opensignlabs Mar 31, 2024
58199a9
fix: change upgrade button redirect ul, disable documentId issue
raktima-opensignlabs Apr 1, 2024
748e219
fix: typo in help text
nxglabs Apr 1, 2024
0ee85f5
refactor: handle updgrade now visibililty in header
prafull-opensignlabs Apr 1, 2024
e8aaab9
fix: change message of already subscribed
prafull-opensignlabs Apr 1, 2024
96a4a2e
feat: add help button for Role in template
prafull-opensignlabs Apr 1, 2024
d31910a
fix: visibility of upgrade now button in header
prafull-opensignlabs Apr 1, 2024
aa04a95
feat: change webhook & API token UI
raktima-opensignlabs Apr 1, 2024
79e3762
feat: change subscription plans
prafull-opensignlabs Apr 1, 2024
cea1653
feat: auto assign free plan to new signup
prafull-opensignlabs Apr 1, 2024
add01cb
feat: auto assign free plan in google signup flow
prafull-opensignlabs Apr 1, 2024
e2d450f
fix: correct grammatical mistake in report help button
prafull-opensignlabs Apr 1, 2024
97bd375
Merge pull request #550 from OpenSignLabs/patch-1
nxglabs Apr 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion apps/OpenSign/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import DraftDocument from "./components/pdf/DraftDocument";
import PlaceHolderSign from "./pages/PlaceHolderSign";
import PdfRequestFiles from "./pages/PdfRequestFiles";
import LazyPage from "./primitives/LazyPage";
import { isEnableSubscription } from "./constant/const";
const DebugPdf = lazy(() => import("./pages/DebugPdf"));
const ForgetPassword = lazy(() => import("./pages/ForgetPassword"));
const GuestLogin = lazy(() => import("./pages/GuestLogin"));
Expand Down Expand Up @@ -113,7 +114,7 @@ function App() {
path="/forgetpassword"
element={<LazyPage Page={ForgetPassword} />}
/>
{process.env.REACT_APP_ENABLE_SUBSCRIPTION && (
{isEnableSubscription && (
<>
<Route
path="/pgsignup"
Expand Down
4 changes: 2 additions & 2 deletions apps/OpenSign/src/components/AddSigner.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ const AddSigner = (props) => {
contactQuery.set("Email", email);
contactQuery.set("UserRole", "contracts_Guest");

if (localStorage.getItem("TenetId")) {
if (localStorage.getItem("TenantId")) {
contactQuery.set("TenantId", {
__type: "Pointer",
className: "partners_Tenant",
objectId: localStorage.getItem("TenetId")
objectId: localStorage.getItem("TenantId")
});
}

Expand Down
4 changes: 2 additions & 2 deletions apps/OpenSign/src/components/AddUser.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ const AddUser = (props) => {
contactQuery.set("Email", email);
contactQuery.set("UserRole", "contracts_User");

if (localStorage.getItem("TenetId")) {
if (localStorage.getItem("TenantId")) {
contactQuery.set("TenantId", {
__type: "Pointer",
className: "partners_Tenant",
objectId: localStorage.getItem("TenetId")
objectId: localStorage.getItem("TenantId")
});
}

Expand Down
34 changes: 28 additions & 6 deletions apps/OpenSign/src/components/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,32 @@ import FullScreenButton from "./FullScreenButton";
import { useNavigate } from "react-router-dom";
import Parse from "parse";
import { useWindowSize } from "../hook/useWindowSize";
import { openInNewTab } from "../constant/Utils";
import { checkIsSubscribed, openInNewTab } from "../constant/Utils";
import { isEnableSubscription } from "../constant/const";

const Header = ({ showSidebar }) => {
const navigation = useNavigate();
const navigate = useNavigate();
const { width } = useWindowSize();
let applogo = localStorage.getItem("appLogo") || "";
let username = localStorage.getItem("username");
const image = localStorage.getItem("profileImg") || dp;

const [isOpen, setIsOpen] = useState(false);
const [isSubscribe, setIsSubscribe] = useState(true);

const toggleDropdown = () => {
setIsOpen(!isOpen);
};

useEffect(() => {
checkSubscription();
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
async function checkSubscription() {
if (isEnableSubscription) {
const getIsSubscribe = await checkIsSubscribed();
setIsSubscribe(getIsSubscribe);
}
}
const closeDropdown = () => {
setIsOpen(false);
Parse.User.logOut();
Expand All @@ -43,7 +55,7 @@ const Header = ({ showSidebar }) => {
localStorage.setItem("baseUrl", baseUrl);
localStorage.setItem("parseAppId", appid);

navigation("/");
navigate("/");
};

//handle to close profile drop down menu onclick screen
Expand Down Expand Up @@ -83,6 +95,16 @@ const Header = ({ showSidebar }) => {
id="profile-menu"
className="flex justify-between items-center gap-x-3"
>
{!isSubscribe && (
<div>
<button
className="text-xs bg-[#002864] p-2 text-white rounded shadow"
onClick={() => navigate("/subscription")}
>
Upgrade Now
</button>
</div>
)}
<div>
<FullScreenButton />
</div>
Expand Down Expand Up @@ -123,7 +145,7 @@ const Header = ({ showSidebar }) => {
className="hover:bg-gray-100 py-1 px-2 cursor-pointer font-normal"
onClick={() => {
setIsOpen(false);
navigation("/profile");
navigate("/profile");
}}
>
<i className="fa-regular fa-user"></i> Profile
Expand All @@ -132,7 +154,7 @@ const Header = ({ showSidebar }) => {
className="hover:bg-gray-100 py-1 px-2 cursor-pointer font-normal"
onClick={() => {
setIsOpen(false);
navigation("/changepassword");
navigate("/changepassword");
}}
>
<i className="fa-solid fa-lock"></i> Change Password
Expand Down
2 changes: 1 addition & 1 deletion apps/OpenSign/src/components/pdf/AddRoleModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const AddRoleModal = (props) => {
margin: "10px 0 10px 5px"
}}
>
e.g: Hr, Director, Manager, New joinee, Accountant, etc...
e.g: Customer, Hr, Director, Manager, Student, etc...
</p>
<div>
<div
Expand Down
102 changes: 64 additions & 38 deletions apps/OpenSign/src/components/pdf/DropdownWidgetOption.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import React, { useEffect, useState } from "react";
import { themeColor } from "../../constant/const";
import { isEnableSubscription, themeColor } from "../../constant/const";
import ModalUi from "../../primitives/ModalUi";
import { radioButtonWidget } from "../../constant/Utils";
import PremiumAlertHeader from "../../primitives/PremiumAlertHeader";
import Upgrade from "../../primitives/Upgrade";
function DropdownWidgetOption(props) {
const [dropdownOptionList, setDropdownOptionList] = useState([
"option-1",
Expand Down Expand Up @@ -241,36 +242,59 @@ function DropdownWidgetOption(props) {
}}
className="fa-solid fa-square-plus"
></i>
{props.type === "checkbox" && !props.isSignYourself && (
<>
<label style={{ fontSize: "13px", fontWeight: "600" }}>
Minimun check
</label>
<input
required
defaultValue={0}
value={minCount}
onChange={(e) => {
const count = handleSetMinMax(e);
setMinCount(count);
}}
className="drodown-input"
/>
<label style={{ fontSize: "13px", fontWeight: "600" }}>
Maximum check
</label>
<input
required
defaultValue={0}
value={maxCount}
onChange={(e) => {
const count = handleSetMinMax(e);
setMaxCount(count);
}}
className="drodown-input"
/>
</>
)}
<div>
{props.type === "checkbox" && !props.isSignYourself && (
<>
<label
style={{
fontSize: "13px",
fontWeight: "600",
color: !props.isSubscribe && "gray"
}}
>
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
? "drodown-input"
: "disabled drodown-input"
}
/>
<label
style={{
fontSize: "13px",
fontWeight: "600",
color: !props.isSubscribe && "gray"
}}
>
Maximum check
</label>
<input
required
defaultValue={0}
value={maxCount}
onChange={(e) => {
const count = handleSetMinMax(e);
setMaxCount(count);
}}
className={
props.isSubscribe || !isEnableSubscription
? "drodown-input"
: "disabled drodown-input"
}
/>
</>
)}
</div>
</div>
{["dropdown", radioButtonWidget].includes(props.type) && (
<>
Expand Down Expand Up @@ -378,13 +402,15 @@ function DropdownWidgetOption(props) {
</div>
)}
</div>
{props.type === "checkbox" && !props.isSignYourself && (
<PremiumAlertHeader
message={
"Field validations are free in beta, this feature will incur a fee later."
}
/>
)}
{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
Expand Down
4 changes: 3 additions & 1 deletion apps/OpenSign/src/components/pdf/EmailComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ function EmailComponent({
setSuccessEmail,
pdfName,
sender,
setIsAlert
setIsAlert,
extUserId
}) {
const [emailList, setEmailList] = useState([]);
const [emailValue, setEmailValue] = useState();
Expand All @@ -38,6 +39,7 @@ function EmailComponent({
const openSignUrl = "https://www.opensignlabs.com/contact-us";
const themeBGcolor = themeColor;
let params = {
extUserId: extUserId,
pdfName: pdfName,
url: pdfUrl,
recipient: emailList[i],
Expand Down
53 changes: 53 additions & 0 deletions apps/OpenSign/src/components/pdf/SignerListPlace.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from "react";
import { themeColor } from "../../constant/const";
import RecipientList from "./RecipientList";
import { Tooltip } from "react-tooltip";

function SignerListPlace(props) {
return (
Expand All @@ -13,6 +14,58 @@ function SignerListPlace(props) {
>
<span className="signedStyle">
{props.title ? props.title : "Recipients"}
<span className="absolute text-xs z-[30] mt-1 ml-0.5">
{props?.title === "Roles" && (
<>
<a data-tooltip-id="my-tooltip">
<sup>
<i
className="fa-solid fa-question rounded-full"
style={{
borderColor: "white",
color: "white",
fontSize: 11,
borderWidth: 1.5,
padding: "1px 3px"
}}
></i>
</sup>
</a>
<Tooltip id="my-tooltip">
<div className="max-w-[450px]">
<p className="font-bold">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>
</div>
</Tooltip>
</>
)}
</span>
</span>
</div>
<div className="signerList">
Expand Down
Loading