Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
2b345ff
add new template form
prafull-opensignlabs Dec 12, 2023
db9b8d2
Merge pull request #261 from OpenSignLabs/staging
prafull-opensignlabs Dec 12, 2023
f65b23c
Merge pull request #278 from OpenSignLabs/staging
prafull-opensignlabs Dec 15, 2023
c4507dd
fix: removed "/test" route from application
vikramnagwal Dec 15, 2023
3e741ac
add functionality of add placholder in template
prafull-opensignlabs Dec 15, 2023
61209f4
fix: Removed "/test" Route with comments
vikramnagwal Dec 16, 2023
cb4a94d
add createDocument from template functionality
prafull-opensignlabs Dec 16, 2023
ca6b4e7
add createDocument from template functionality
prafull-opensignlabs Dec 16, 2023
d8e73ee
Merge pull request #279 from VikramNagwal/staging
andrew-opensignlabs Dec 17, 2023
71fd7b2
docs: update README.md
allcontributors[bot] Dec 17, 2023
995a2a5
docs: update .all-contributorsrc
allcontributors[bot] Dec 17, 2023
8c209f5
Merge pull request #280 from OpenSignLabs/all-contributors/add-Vikram…
andrew-opensignlabs Dec 17, 2023
c267347
Merge pull request #282 from OpenSignLabs/staging
prafull-opensignlabs Dec 18, 2023
4e8988b
add template feature
prafull-opensignlabs Dec 19, 2023
8ebfd78
add template report and form , as well as migration code for it
prafull-opensignlabs Dec 20, 2023
5170e4e
migration script for template class
prafull-opensignlabs Dec 20, 2023
fefcdf6
feat: placeholder copy all pages feature at same location and change …
raktima-opensignlabs Dec 20, 2023
74c9e21
resolve minor ui issues
prafull-opensignlabs Dec 20, 2023
4e67ab5
resolve minor ui issues
prafull-opensignlabs Dec 20, 2023
d400c84
fix: modified variable name as required and added comment
raktima-opensignlabs Dec 21, 2023
c1c1716
chore: set SMTP_ENABLE to true
nxglabs Dec 21, 2023
d86b734
chore: set smtp dummy values
nxglabs Dec 21, 2023
56bb7d3
chore: remove mailgun api key value
nxglabs Dec 21, 2023
da42fe9
add/Choose form to link user and ui changes
prafull-opensignlabs Dec 21, 2023
3b5875e
fix: size of the placeholder changed after the signature was uploaded…
raktima-opensignlabs Dec 22, 2023
b32e6e7
Merge pull request #288 from OpenSignLabs/staging
prafull-opensignlabs Dec 25, 2023
c3bccb5
show role name in placeholder
prafull-opensignlabs Dec 26, 2023
01a130e
add username in placeholder and validtion for fetch template
prafull-opensignlabs Dec 26, 2023
66b65e6
add validtion for fetch template
prafull-opensignlabs Dec 26, 2023
642ef4f
Merge pull request #286 from OpenSignLabs/placeholder
prafull-opensignlabs Dec 26, 2023
f5f19c9
Merge branch 'staging' of https://github.com/OpenSignLabs/OpenSign in…
prafull-opensignlabs Dec 26, 2023
fd0ec5f
resolve resize issue for template placeholder
prafull-opensignlabs Dec 26, 2023
6c1d0c7
resolve delete user not working properly with placholder
prafull-opensignlabs Dec 26, 2023
527c5be
add attach user icon in mobile view
prafull-opensignlabs Dec 26, 2023
d3b5643
resolve color issue on drag placeholder
prafull-opensignlabs Dec 27, 2023
8562a4b
change fetch function
prafull-opensignlabs Dec 27, 2023
a4b4dc8
removed unnecessary assets
prafull-opensignlabs Dec 27, 2023
730a7a4
add reactour for template
prafull-opensignlabs Dec 27, 2023
056f4b3
remove random words from file upload input to show correct pdf name
prafull-opensignlabs Dec 27, 2023
7a12f54
add contactbook form in contactbook report
prafull-opensignlabs Dec 27, 2023
711ab6a
Merge pull request #290 from OpenSignLabs/feat_template
prafull-opensignlabs Dec 27, 2023
b8c7110
resolve issue of receipent in not selected by default and dropbox upload
prafull-opensignlabs Dec 28, 2023
4fe4ca6
add receipent required validation
prafull-opensignlabs Dec 28, 2023
1cca5a3
Merge pull request #292 from OpenSignLabs/feat_template
prafull-opensignlabs Dec 28, 2023
dc40b04
fix: minor bug fix in template compoent
prafull-opensignlabs Dec 28, 2023
c5762a0
Merge pull request #293 from OpenSignLabs/feat_template
prafull-opensignlabs Dec 28, 2023
92d3a85
fix: placeholder resize issue in mobile view
raktima-opensignlabs Dec 28, 2023
e82384d
fix: signyourself flow, add validtion in template flow, change UI rec…
prafull-opensignlabs Dec 28, 2023
751c7b5
Merge pull request #294 from OpenSignLabs/feat_template
prafull-opensignlabs Dec 28, 2023
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
9 changes: 9 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,15 @@
"contributions": [
"code"
]
},
{
"login": "VikramNagwal",
"name": "Vikram",
"avatar_url": "https://avatars.githubusercontent.com/u/123088024?v=4",
"profile": "https://github.com/VikramNagwal",
"contributions": [
"code"
]
}
]
}
10 changes: 5 additions & 5 deletions .env.local_dev
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ DO_REGION=us-west
USE_LOCAL=TRUE

# Email mailgun or set SMTP_ENABLE true to use SMTP config (The app will not initialize if any of these 3 variables are not set) *********************************************************************************************************************
MAILGUN_API_KEY=XXXXX
MAILGUN_API_KEY=
MAILGUN_DOMAIN=mail.yourdomain.com
MAILGUN_SENDER=postmaster@mail.yourdomain.com
SMTP_ENABLE=
SMTP_HOST=
SMTP_PORT=
SMTP_USER_EMAIL=
SMTP_PASS=
SMTP_HOST=smtp.yourhost.com
SMTP_PORT=443
SMTP_USER_EMAIL=mailer@yourdomain.com
SMTP_PASS=password


# Base64 encoded PFX or p12 document signing certificate file *********************************************************************************************************************
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ We would like to thank all our contributors and users for their support and feed
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Govinda04"><img src="https://avatars.githubusercontent.com/u/50038172?v=4?s=100" width="100px;" alt="Govinda Kocharekar"/><br /><sub><b>Govinda Kocharekar</b></sub></a><br /><a href="#code-Govinda04" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://bilal.cc"><img src="https://avatars.githubusercontent.com/u/55330484?v=4?s=100" width="100px;" alt="Bilal Ahmad Bhat"/><br /><sub><b>Bilal Ahmad Bhat</b></sub></a><br /><a href="#code-crediblebilal" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/VikramNagwal"><img src="https://avatars.githubusercontent.com/u/123088024?v=4?s=100" width="100px;" alt="Vikram"/><br /><sub><b>Vikram</b></sub></a><br /><a href="#code-VikramNagwal" title="Code">💻</a></td>
</tr>
</tbody>
</table>

Expand Down
1 change: 0 additions & 1 deletion apps/OpenSign/public/version.txt
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
v1.0.5-beta
27 changes: 19 additions & 8 deletions apps/OpenSign/src/components/AppendFormInForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ const AppendFormInForm = (props) => {
// Define a function to handle form submission
const handleSubmit = async (e) => {
e.preventDefault();
e.stopPropagation();
setIsLoader(true);
Parse.serverURL = parseBaseUrl;
Parse.initialize(parseAppId);
Expand Down Expand Up @@ -105,13 +106,18 @@ const AppendFormInForm = (props) => {
const res = await contactQuery.save();

const parseData = JSON.parse(JSON.stringify(res));
props.details({
value: parseData[props.valueKey],
label: parseData[props.displayKey]
});
if (props.details) {
props.details({
value: parseData[props.valueKey],
label: parseData[props.displayKey]
});
}
if (props.closePopup) {
props.closePopup();
}
if (props.handleUserData) {
props.handleUserData(parseData);
}

setIsLoader(false);
// Reset the form fields
Expand Down Expand Up @@ -158,13 +164,18 @@ const AppendFormInForm = (props) => {
const res = await contactQuery.save();

const parseData = JSON.parse(JSON.stringify(res));
props.details({
value: parseData[props.valueKey],
label: parseData[props.displayKey]
});
if (props.details) {
props.details({
value: parseData[props.valueKey],
label: parseData[props.displayKey]
});
}
if (props.closePopup) {
props.closePopup();
}
if (props.handleUserData) {
props.handleUserData(parseData);
}
setIsLoader(false);
// Reset the form fields
setAddYourself(false);
Expand Down
4 changes: 2 additions & 2 deletions apps/OpenSign/src/components/TreeWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Parse from "parse";
import axios from "axios";
import "../styles/spinner.css";
import TreeFormComponent from "./TreeFormComponent";
import TreeEditForm from "./TreeEditForm";
// import TreeEditForm from "./TreeEditForm";
import "../styles/modal.css";
import Modal from "react-modal";

Expand All @@ -22,7 +22,7 @@ const TreeWidget = (props) => {
const [schemaState, setSchemaState] = useState({});
const [TabURL, setTabURL] = useState("");
const [editable, setEditable] = useState(false);
const [editId, setEditId] = useState("");
// const [editId, setEditId] = useState("");
const [defaultState, setDefaultState] = useState(false);
const [isShowModal, setIsShowModal] = useState(false);
const selectFolderHandle = async () => {
Expand Down
147 changes: 147 additions & 0 deletions apps/OpenSign/src/components/fields/CreateFolder.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
import React, { useEffect, useState } from "react";
import Parse from "parse";
import Alert from "../../primitives/Alert";

const CreateFolder = ({ parentFolderId, onSuccess, folderCls }) => {
const folderPtr = {
__type: "Pointer",
className: folderCls,
objectId: parentFolderId
};
const [name, setName] = useState("");
const [folderList, setFolderList] = useState([]);
const [isAlert, setIsAlert] = useState(false);
const [selectedParent, setSelectedParent] = useState();
const [alert, setAlert] = useState({ type: "info", message: "" });
useEffect(() => {
fetchFolder();
// eslint-disable-next-line
}, []);

const fetchFolder = async () => {
try {
const FolderQuery = new Parse.Query(folderCls);
if (parentFolderId) {
FolderQuery.equalTo("Folder", folderPtr);
FolderQuery.equalTo("Type", "Folder");
} else {
FolderQuery.doesNotExist("Folder");
FolderQuery.equalTo("Type", "Folder");
}

const res = await FolderQuery.find();
if (res) {
const result = JSON.parse(JSON.stringify(res));
if (result) {
setFolderList(result);
}
}
} catch (error) {
console.log("Err ", error);
}
};
const handleCreateFolder = async (event) => {
event.preventDefault();
if (name) {
const currentUser = Parse.User.current();
const exsitQuery = new Parse.Query(folderCls);
exsitQuery.equalTo("Name", name);
exsitQuery.equalTo("Type", "Folder");
if (parentFolderId) {
exsitQuery.equalTo("Folder", folderPtr);
}
const templExist = await exsitQuery.first();
if (templExist) {
setAlert({ type: "dange", message: "Folder already exist!" });
setIsAlert(true);
setTimeout(() => {
setIsAlert(false);
}, 1000);
} else {
const template = new Parse.Object(folderCls);
template.set("Name", name);
template.set("Type", "Folder");

if (selectedParent) {
template.set("Folder", {
__type: "Pointer",
className: folderCls,
objectId: selectedParent
});
} else if (parentFolderId) {
template.set("Folder", folderPtr);
}
template.set("CreatedBy", Parse.User.createWithoutData(currentUser.id));
const res = await template.save();
if (res) {
if (onSuccess) {
setAlert({
type: "success",
message: "Folder created successfully!"
});
setIsAlert(true);
setTimeout(() => {
setIsAlert(false);
}, 1000);
onSuccess(res);
}
}
}
} else {
setAlert({ type: "info", message: "Please fill folder name" });
setIsAlert(true);
setTimeout(() => {
setIsAlert(false);
}, 1000);
}
};
const handleOptions = (e) => {
setSelectedParent(e.target.value);
};
return (
<div>
{isAlert && <Alert type={alert.type}>{alert.message}</Alert>}
<div id="createFolder">
<h1 className="text-base font-semibold">Create Folder</h1>
<div className="text-xs mt-2">
<label className="block">
Name<span className="text-red-500 text-[13px]">*</span>
</label>
<input
className="px-3 py-2 w-full border-[1px] border-gray-300 rounded focus:outline-none text-xs"
value={name}
onChange={(e) => setName(e.target.value)}
required
/>
</div>
<div className="text-xs mt-2">
<label className="block">Parent Folder</label>
<select
value={selectedParent}
onChange={handleOptions}
className="px-3 py-2 w-full border-[1px] border-gray-300 rounded focus:outline-none text-xs"
>
<option>select</option>
{folderList.length > 0 &&
folderList.map((x) => (
<option key={x.objectId} value={x.objectId}>
{x.Name}
</option>
))}
</select>
</div>
<div>
<button
onClick={handleCreateFolder}
className="flex items-center rounded p-2 bg-[#32a3ac] text-white mt-3"
>
<i className="fa-solid fa-plus mr-1"></i>
<span>Create</span>
</button>
</div>
</div>
</div>
);
};

export default CreateFolder;
3 changes: 2 additions & 1 deletion apps/OpenSign/src/components/fields/DropboxChoose.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ export default function DropboxChooser({ children, onSuccess, onCancel }) {
[onSuccess, onCancel]
);

const handleChoose = useCallback(() => {
const handleChoose = useCallback((e) => {
e.preventDefault()
if (window.Dropbox) {
window.Dropbox.choose(options);
}
Expand Down
22 changes: 13 additions & 9 deletions apps/OpenSign/src/components/fields/FileUpload.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ const FileUpload = (props) => {
<div className="flex gap-2 justify-center items-center">
<div className="flex justify-between items-center px-2 py-[3px] w-full font-bold rounded border-[1px] border-[#ccc] text-gray-500 bg-white text-[13px]">
<div className="break-all">
file selected : {props.formData.split("/")[3]}
file selected : {props.formData?.split("/")[3]?.split("_")[1]}
</div>
<div
onClick={() => {
Expand All @@ -271,10 +271,12 @@ const FileUpload = (props) => {
<i className="fa-solid fa-xmark"></i>
</div>
</div>
<DropboxChooser
onSuccess={dropboxSuccess}
onCancel={dropboxCancel}
/>
{process.env.REACT_APP_DROPBOX_API_KEY && (
<DropboxChooser
onSuccess={dropboxSuccess}
onCancel={dropboxCancel}
/>
)}
</div>
) : (
<div className="flex gap-2 justify-center items-center">
Expand All @@ -294,10 +296,12 @@ const FileUpload = (props) => {
accept="application/pdf,application/vnd.ms-excel"
onChange={onChange}
/>
<DropboxChooser
onSuccess={dropboxSuccess}
onCancel={dropboxCancel}
/>
{process.env.REACT_APP_DROPBOX_API_KEY && (
<DropboxChooser
onSuccess={dropboxSuccess}
onCancel={dropboxCancel}
/>
)}
</div>
)}
</>
Expand Down
Loading