mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-09-22 09:34:54 +02:00
Merge pull request #1473 from OpenSignLabs/uncompatible_pdf
This commit is contained in:
@@ -134,7 +134,8 @@
|
|||||||
"option": "Option",
|
"option": "Option",
|
||||||
"Embed": "Embed",
|
"Embed": "Embed",
|
||||||
"Copy TemplateId":"Copy TemplateId",
|
"Copy TemplateId":"Copy TemplateId",
|
||||||
"Copy Public URL":"Copy Public URL"
|
"Copy Public URL":"Copy Public URL",
|
||||||
|
"extend-expiry-date": "Extend expiry date"
|
||||||
},
|
},
|
||||||
"report-heading": {
|
"report-heading": {
|
||||||
"Sr.No": "Sr.No",
|
"Sr.No": "Sr.No",
|
||||||
@@ -267,7 +268,8 @@
|
|||||||
"make-template-public-alert": "Are you sure you want to make this template public?",
|
"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.",
|
"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-role": "Public role",
|
||||||
"public-url": "Public profile needed",
|
"public-url": "Public profile",
|
||||||
|
"embed-template": "Embed Template",
|
||||||
"public-url-copy": "Here’s your public URL: ",
|
"public-url-copy": "Here’s your public URL: ",
|
||||||
"public-url-copy-mssg":"Copy it or share it with the signer, and you will be able to see all your publicly set templates.",
|
"public-url-copy-mssg":"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 complete your OpenSign public profile setup. Once done, you’ll be able to make templates public. This process only needs to be completed once.",
|
"add-public-url-alert": "Please complete your OpenSign public profile setup. Once done, you’ll be able to make templates public. This process only needs to be completed once.",
|
||||||
@@ -703,5 +705,7 @@
|
|||||||
"notify-on-signatures-help": {
|
"notify-on-signatures-help": {
|
||||||
"p1": "The document creator will receive an email notification whenever a signer signs the document.",
|
"p1": "The document creator will receive an email notification whenever a signer signs the document.",
|
||||||
"note": "Note: Notification email will not be sent for the last signer, as the document creator will receive a completion email instead."
|
"note": "Note: Notification email will not be sent for the last signer, as the document creator will receive a completion email instead."
|
||||||
}
|
},
|
||||||
|
"expiry-date-updated": "The expiry date has been successfully extended to {{newexpirydate}}",
|
||||||
|
"expiry-date-error": "Please provide a new expiry date that is later than the current one"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -134,7 +134,8 @@
|
|||||||
"option": "Opción",
|
"option": "Opción",
|
||||||
"Embed": "Incrustar",
|
"Embed": "Incrustar",
|
||||||
"Copy TemplateId": "Copiar ID de plantilla",
|
"Copy TemplateId": "Copiar ID de plantilla",
|
||||||
"Copy Public URL": "Copiar URL pública"
|
"Copy Public URL": "Copiar URL pública",
|
||||||
|
"extend-expiry-date": "Ampliar fecha de caducidad"
|
||||||
},
|
},
|
||||||
"report-heading": {
|
"report-heading": {
|
||||||
"Sr.No": "Nº",
|
"Sr.No": "Nº",
|
||||||
@@ -267,7 +268,8 @@
|
|||||||
"make-template-public-alert": "¿En definitiva quieres convertir esta plantilla en pública?",
|
"make-template-public-alert": "¿En definitiva quieres convertir esta plantilla en pública?",
|
||||||
"make-template-private-alert": "¿En definitiva quieres convertir esta plantilla en privada? Esto lo removerá de tu perfil público.",
|
"make-template-private-alert": "¿En definitiva quieres convertir esta plantilla en privada? Esto lo removerá de tu perfil público.",
|
||||||
"public-role": "Rol público",
|
"public-role": "Rol público",
|
||||||
"public-url": "Se requiere perfil público",
|
"public-url": "Perfil publico",
|
||||||
|
"embed-template": "Insertar plantilla",
|
||||||
"public-url-copy": "Aquí está tu URL pública: ",
|
"public-url-copy": "Aquí está tu URL pública: ",
|
||||||
"public-url-copy-mssg": "Cópiala o compártela con el firmante y podrás ver todas tus plantillas públicas.",
|
"public-url-copy-mssg": "Cópiala o compártela con el firmante y podrás ver todas tus plantillas públicas.",
|
||||||
"add-public-url-alert": "Por favor, completa la configuración de tu perfil público OpenSign. Una vez terminado, podrás crear plantillas públicas. Este proceso solo necesita ser completado una vez.",
|
"add-public-url-alert": "Por favor, completa la configuración de tu perfil público OpenSign. Una vez terminado, podrás crear plantillas públicas. Este proceso solo necesita ser completado una vez.",
|
||||||
@@ -703,5 +705,7 @@
|
|||||||
"notify-on-signatures-help": {
|
"notify-on-signatures-help": {
|
||||||
"p1": "El creador del documento recibirá una notificación por correo electrónico cada vez que un firmante firme el documento.",
|
"p1": "El creador del documento recibirá una notificación por correo electrónico cada vez que un firmante firme el documento.",
|
||||||
"note": "Nota: No se enviará un correo electrónico de notificación al último firmante, ya que el creador del documento recibirá un correo electrónico de finalización."
|
"note": "Nota: No se enviará un correo electrónico de notificación al último firmante, ya que el creador del documento recibirá un correo electrónico de finalización."
|
||||||
}
|
},
|
||||||
|
"expiry-date-updated": "La fecha de vencimiento se ha extendido con éxito hasta el {{newexpirydate}}",
|
||||||
|
"expiry-date-error": "Proporcione una nueva fecha de vencimiento que sea posterior a la actual"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -155,7 +155,8 @@
|
|||||||
"option": "Option",
|
"option": "Option",
|
||||||
"Embed": "Intégrer",
|
"Embed": "Intégrer",
|
||||||
"Copy TemplateId": "Copier l'ID du modèle",
|
"Copy TemplateId": "Copier l'ID du modèle",
|
||||||
"Copy Public URL":"Copier l'URL publique"
|
"Copy Public URL":"Copier l'URL publique",
|
||||||
|
"extend-expiry-date": "Prolonger la date d'expiration"
|
||||||
},
|
},
|
||||||
"report-help": {
|
"report-help": {
|
||||||
"Draft Documents": "Il s'agit de documents que vous avez commencés mais que vous n'avez pas finalisés pour envoi.",
|
"Draft Documents": "Il s'agit de documents que vous avez commencés mais que vous n'avez pas finalisés pour envoi.",
|
||||||
@@ -266,7 +267,8 @@
|
|||||||
"make-template-public-alert": "Êtes-vous sûr de vouloir rendre ce modèle public ?",
|
"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.",
|
"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-role": "Rôle public",
|
||||||
"public-url": "Profil public requis",
|
"public-url": "Profil public",
|
||||||
|
"embed-template": "Intégrer le modèle",
|
||||||
"public-url-copy": "Voici votre URL publique : ",
|
"public-url-copy": "Voici votre URL publique : ",
|
||||||
"public-url-copy-mssg": "copiez-la ou partagez-le avec le signataire et vous pouvoir voir tous vos paramètres publics modèles.",
|
"public-url-copy-mssg": "copiez-la ou partagez-le avec le signataire et vous pouvoir voir tous vos paramètres publics modèles.",
|
||||||
"add-public-url-alert": "Veuillez terminer la configuration de votre profil public OpenSign. Une fois cela fait, vous pourrez rendre les modèles publics. Ce processus ne doit être effectué qu’une seule fois.",
|
"add-public-url-alert": "Veuillez terminer la configuration de votre profil public OpenSign. Une fois cela fait, vous pourrez rendre les modèles publics. Ce processus ne doit être effectué qu’une seule fois.",
|
||||||
@@ -702,5 +704,7 @@
|
|||||||
"notify-on-signatures-help": {
|
"notify-on-signatures-help": {
|
||||||
"p1": "Le créateur du document recevra une notification par e-mail chaque fois qu'un signataire signera le document.",
|
"p1": "Le créateur du document recevra une notification par e-mail chaque fois qu'un signataire signera le document.",
|
||||||
"note": "Remarque : L'e-mail de notification ne sera pas envoyé pour le dernier signataire, car le créateur du document recevra à la place un e-mail de fin."
|
"note": "Remarque : L'e-mail de notification ne sera pas envoyé pour le dernier signataire, car le créateur du document recevra à la place un e-mail de fin."
|
||||||
}
|
},
|
||||||
|
"expiry-date-updated": "La fecha de vencimiento se ha extendido con éxito hasta el {{newexpirydate}}",
|
||||||
|
"expiry-date-error": "Veuillez fournir une nouvelle date d'expiration postérieure à la date actuelle"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,8 +18,7 @@ function EmbedTab(props) {
|
|||||||
{
|
{
|
||||||
id: 0,
|
id: 0,
|
||||||
title: "Installation",
|
title: "Installation",
|
||||||
codeString: `
|
codeString: `npm install @opensign/react`
|
||||||
npm install @opensign/react`
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 1,
|
id: 1,
|
||||||
@@ -28,7 +27,7 @@ npm install @opensign/react`
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import Opensign from "@opensign/react";
|
import Opensign from "@opensign/react";
|
||||||
|
|
||||||
export function App() {
|
export default function App() {
|
||||||
return (
|
return (
|
||||||
<div className="app">
|
<div className="app">
|
||||||
<Opensign
|
<Opensign
|
||||||
@@ -40,7 +39,6 @@ export function App() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
`
|
`
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
@@ -49,15 +47,14 @@ export function App() {
|
|||||||
{
|
{
|
||||||
id: 0,
|
id: 0,
|
||||||
title: "Installation",
|
title: "Installation",
|
||||||
codeString: `
|
codeString: `npm install @opensign/angular`
|
||||||
npm install @opensign/angular`
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 1,
|
id: 1,
|
||||||
title: "Usage",
|
title: "Usage",
|
||||||
codeString: `
|
codeString: `
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import {OpensignComponent} from "@opensign/angular"
|
import { OpensignComponent } from "@opensign/angular"
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector:'app-root',
|
selector:'app-root',
|
||||||
@@ -68,17 +65,15 @@ import {OpensignComponent} from "@opensign/angular"
|
|||||||
(onLoadError)="handleError($event)"
|
(onLoadError)="handleError($event)"
|
||||||
></opensign>\`,
|
></opensign>\`,
|
||||||
})
|
})
|
||||||
export class AppComponent{
|
export class AppComponent {
|
||||||
handleLoad() {
|
handleLoad() {
|
||||||
console.log("success");
|
console.log("success");
|
||||||
}
|
}
|
||||||
handleError(error: string) {
|
handleError(error: string) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
`
|
`
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
@@ -98,6 +93,9 @@ export class AppComponent{
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="mt-4 border-t-[1px]">
|
<div className="mt-4 border-t-[1px]">
|
||||||
|
<h3 className="text-base-content font-bold text-lg pt-[15px] pb-[5px]">
|
||||||
|
{t("embed-template")}
|
||||||
|
</h3>
|
||||||
<div className="flex justify-center items-center mt-2">
|
<div className="flex justify-center items-center mt-2">
|
||||||
<div role="tablist" className="op-tabs op-tabs-bordered">
|
<div role="tablist" className="op-tabs op-tabs-bordered">
|
||||||
{tabName.map((tabData, ind) => (
|
{tabName.map((tabData, ind) => (
|
||||||
@@ -107,7 +105,7 @@ export class AppComponent{
|
|||||||
role="tab"
|
role="tab"
|
||||||
className={`${
|
className={`${
|
||||||
activeTab === ind ? "op-tab-active" : ""
|
activeTab === ind ? "op-tab-active" : ""
|
||||||
} op-tab flex items-center`}
|
} op-tab flex items-center pb-10 md:pb-0`}
|
||||||
>
|
>
|
||||||
<i
|
<i
|
||||||
className={`${tabData.icon}`}
|
className={`${tabData.icon}`}
|
||||||
|
|||||||
@@ -229,6 +229,25 @@ export default function reportJson(id) {
|
|||||||
btnIcon: "fa-light fa-trash",
|
btnIcon: "fa-light fa-trash",
|
||||||
redirectUrl: "",
|
redirectUrl: "",
|
||||||
action: "delete"
|
action: "delete"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
btnId: "3234",
|
||||||
|
hoverLabel: "option",
|
||||||
|
btnColor: "",
|
||||||
|
textColor: "black",
|
||||||
|
btnIcon: "fa-light fa-ellipsis-vertical fa-lg",
|
||||||
|
action: "option",
|
||||||
|
subaction: [
|
||||||
|
{
|
||||||
|
btnId: "2199",
|
||||||
|
btnLabel: "extend-expiry-date",
|
||||||
|
hoverLabel: "Extend expiry date",
|
||||||
|
btnColor: "op-btn-primary",
|
||||||
|
btnIcon: "fa-light fa-hourglass-end",
|
||||||
|
redirectUrl: "",
|
||||||
|
action: "extendexpiry"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
helpMsg:
|
helpMsg:
|
||||||
|
|||||||
@@ -59,6 +59,7 @@ import LoaderWithMsg from "../primitives/LoaderWithMsg";
|
|||||||
import DownloadPdfZip from "../primitives/DownloadPdfZip";
|
import DownloadPdfZip from "../primitives/DownloadPdfZip";
|
||||||
import Loader from "../primitives/Loader";
|
import Loader from "../primitives/Loader";
|
||||||
import PdfDeclineModal from "../primitives/PdfDeclineModal";
|
import PdfDeclineModal from "../primitives/PdfDeclineModal";
|
||||||
|
import { serverUrl_fn } from "../constant/appinfo";
|
||||||
|
|
||||||
function PdfRequestFiles(props) {
|
function PdfRequestFiles(props) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
@@ -1752,6 +1753,42 @@ function PdfRequestFiles(props) {
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleExpiry = async (expiryDate) => {
|
||||||
|
setIsUiLoading(true);
|
||||||
|
const doc = pdfDetails?.[0];
|
||||||
|
const oldExpiryDate = new Date(doc?.ExpiryDate?.iso);
|
||||||
|
const newExpiryDate = new Date(expiryDate);
|
||||||
|
if (newExpiryDate > oldExpiryDate) {
|
||||||
|
const updateExpiryDate = new Date(expiryDate).toISOString();
|
||||||
|
const expiryIsoFormat = { iso: updateExpiryDate, __type: "Date" };
|
||||||
|
try {
|
||||||
|
const serverUrl = serverUrl_fn();
|
||||||
|
const url = serverUrl + `/classes/contracts_Document/`;
|
||||||
|
const body = { ExpiryDate: expiryIsoFormat };
|
||||||
|
const res = await axios.put(url + doc.objectId, body, {
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
"X-Parse-Application-Id": localStorage.getItem("parseAppId"),
|
||||||
|
"X-Parse-Session-Token": localStorage.getItem("accesstoken")
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (res.data && res.data.updatedAt) {
|
||||||
|
setIsExpired(false);
|
||||||
|
let doc = pdfDetails?.[0];
|
||||||
|
doc.ExpiryDate = expiryIsoFormat;
|
||||||
|
setPdfDetails([doc]);
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.log("err", err);
|
||||||
|
} finally {
|
||||||
|
setIsUiLoading(false);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
setIsUiLoading(false);
|
||||||
|
alert(t("expiry-date-error"));
|
||||||
|
}
|
||||||
|
};
|
||||||
return (
|
return (
|
||||||
<DndProvider backend={HTML5Backend}>
|
<DndProvider backend={HTML5Backend}>
|
||||||
<Title title={props.templateId ? "Public Sign" : "Request Sign"} />
|
<Title title={props.templateId ? "Public Sign" : "Request Sign"} />
|
||||||
@@ -1838,10 +1875,12 @@ function PdfRequestFiles(props) {
|
|||||||
{/* this modal is used for show expired alert */}
|
{/* this modal is used for show expired alert */}
|
||||||
<PdfDeclineModal
|
<PdfDeclineModal
|
||||||
show={isExpired}
|
show={isExpired}
|
||||||
|
doc={pdfDetails?.[0]}
|
||||||
headMsg={t("expired-doc-title")}
|
headMsg={t("expired-doc-title")}
|
||||||
bodyMssg={t("expired-on-mssg", { expiredDate })}
|
bodyMssg={t("expired-on-mssg", { expiredDate })}
|
||||||
isDownloadBtn={true}
|
isDownloadBtn={true}
|
||||||
handleDownloadBtn={handleDownloadBtn}
|
handleDownloadBtn={handleDownloadBtn}
|
||||||
|
handleExpiry={handleExpiry}
|
||||||
/>
|
/>
|
||||||
{!isEmailVerified && (
|
{!isEmailVerified && (
|
||||||
<VerifyEmail
|
<VerifyEmail
|
||||||
|
|||||||
@@ -81,6 +81,7 @@ const ReportTable = (props) => {
|
|||||||
const [isEmbed, setIsEmbed] = useState(false);
|
const [isEmbed, setIsEmbed] = useState(false);
|
||||||
const [isPublicTour, setIsPublicTour] = useState();
|
const [isPublicTour, setIsPublicTour] = useState();
|
||||||
const [signatureType, setSignatureType] = useState([]);
|
const [signatureType, setSignatureType] = useState([]);
|
||||||
|
const [expiryDate, setExpiryDate] = useState("");
|
||||||
const Extand_Class = localStorage.getItem("Extand_Class");
|
const Extand_Class = localStorage.getItem("Extand_Class");
|
||||||
const extClass = Extand_Class && JSON.parse(Extand_Class);
|
const extClass = Extand_Class && JSON.parse(Extand_Class);
|
||||||
const startIndex = (currentPage - 1) * props.docPerPage;
|
const startIndex = (currentPage - 1) * props.docPerPage;
|
||||||
@@ -433,6 +434,8 @@ const ReportTable = (props) => {
|
|||||||
} else {
|
} else {
|
||||||
setIsPublicTour({ [item.objectId]: true });
|
setIsPublicTour({ [item.objectId]: true });
|
||||||
}
|
}
|
||||||
|
} else if (act.action) {
|
||||||
|
setIsModal({ [`extendexpiry_${item.objectId}`]: true });
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
// Get current list
|
// Get current list
|
||||||
@@ -1210,6 +1213,67 @@ const ReportTable = (props) => {
|
|||||||
const closePublicTour = () => {
|
const closePublicTour = () => {
|
||||||
setIsPublicTour();
|
setIsPublicTour();
|
||||||
};
|
};
|
||||||
|
const handleUpdateExpiry = async (e, item) => {
|
||||||
|
e.preventDefault();
|
||||||
|
e.stopPropagation();
|
||||||
|
if (expiryDate) {
|
||||||
|
const oldExpiryDate = new Date(item?.ExpiryDate?.iso);
|
||||||
|
const newExpiryDate = new Date(expiryDate);
|
||||||
|
if (newExpiryDate > oldExpiryDate) {
|
||||||
|
setActLoader({ [`${item.objectId}`]: true });
|
||||||
|
const updateExpiryDate = new Date(expiryDate).toISOString();
|
||||||
|
const expiryIsoFormat = { iso: updateExpiryDate, __type: "Date" };
|
||||||
|
try {
|
||||||
|
const serverUrl = serverUrl_fn();
|
||||||
|
const cls = "contracts_Document";
|
||||||
|
const url = serverUrl + `/classes/${cls}/`;
|
||||||
|
const body = { ExpiryDate: expiryIsoFormat };
|
||||||
|
const res = await axios.put(url + item.objectId, body, {
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
"X-Parse-Application-Id": localStorage.getItem("parseAppId"),
|
||||||
|
"X-Parse-Session-Token": localStorage.getItem("accesstoken")
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (res.data && res.data.updatedAt) {
|
||||||
|
setIsAlert(true);
|
||||||
|
setAlertMsg({
|
||||||
|
type: "success",
|
||||||
|
message: t("expiry-date-updated", {
|
||||||
|
newexpirydate: new Date(expiryDate)?.toLocaleDateString()
|
||||||
|
})
|
||||||
|
});
|
||||||
|
if (props.ReportName === "Expired Documents") {
|
||||||
|
const upldatedList = props.List.filter(
|
||||||
|
(x) => x.objectId !== item.objectId
|
||||||
|
);
|
||||||
|
props.setList(upldatedList);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.log("err", err);
|
||||||
|
setIsAlert(true);
|
||||||
|
setAlertMsg({
|
||||||
|
type: "danger",
|
||||||
|
message: t("something-went-wrong-mssg")
|
||||||
|
});
|
||||||
|
} finally {
|
||||||
|
setActLoader({});
|
||||||
|
setExpiryDate();
|
||||||
|
setTimeout(() => setIsAlert(false), 2000);
|
||||||
|
setIsModal({});
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
setIsAlert(true);
|
||||||
|
setAlertMsg({ type: "danger", message: t("expiry-date-error") });
|
||||||
|
setTimeout(() => setIsAlert(false), 2000);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
setIsAlert(true);
|
||||||
|
setAlertMsg({ type: "danger", message: t("expiry-date-error") });
|
||||||
|
setTimeout(() => setIsAlert(false), 2000);
|
||||||
|
}
|
||||||
|
};
|
||||||
return (
|
return (
|
||||||
<div className="relative">
|
<div className="relative">
|
||||||
{Object.keys(actLoader)?.length > 0 && (
|
{Object.keys(actLoader)?.length > 0 && (
|
||||||
@@ -1490,7 +1554,7 @@ const ReportTable = (props) => {
|
|||||||
<td className=" pl-[20px] py-2">
|
<td className=" pl-[20px] py-2">
|
||||||
{props.ReportName === "Templates" && (
|
{props.ReportName === "Templates" && (
|
||||||
<div
|
<div
|
||||||
className="flex flex-row "
|
className="flex flex-row"
|
||||||
data-tut="IsPublic"
|
data-tut="IsPublic"
|
||||||
>
|
>
|
||||||
<label className="cursor-pointer relative inline-flex items-center mb-0">
|
<label className="cursor-pointer relative inline-flex items-center mb-0">
|
||||||
@@ -1773,6 +1837,39 @@ const ReportTable = (props) => {
|
|||||||
)
|
)
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
{isModal["extendexpiry_" + item.objectId] && (
|
||||||
|
<ModalUi
|
||||||
|
isOpen
|
||||||
|
title={t("btnLabel.extend-expiry-date")}
|
||||||
|
reduceWidth={"md:max-w-[450px]"}
|
||||||
|
handleClose={() => setIsModal({})}
|
||||||
|
>
|
||||||
|
<form
|
||||||
|
className="px-4 py-2 flex flex-col"
|
||||||
|
onSubmit={(e) => handleUpdateExpiry(e, item)}
|
||||||
|
>
|
||||||
|
<label className="mr-2">Expiry date</label>
|
||||||
|
<input
|
||||||
|
type="date"
|
||||||
|
className="rounded-full mb-2 bg-base-300 w-full px-4 py-2 text-black border-2 hover:border-spacing-2"
|
||||||
|
defaultValue={
|
||||||
|
item?.ExpiryDate?.iso?.split("T")?.[0]
|
||||||
|
}
|
||||||
|
onChange={(e) => {
|
||||||
|
setExpiryDate(e.target.value);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<div className="flex justify-start mb-1">
|
||||||
|
<button
|
||||||
|
type="submit"
|
||||||
|
className="op-btn op-btn-primary"
|
||||||
|
>
|
||||||
|
{t("update")}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</ModalUi>
|
||||||
|
)}
|
||||||
{isShareWith[item.objectId] && (
|
{isShareWith[item.objectId] && (
|
||||||
<div className="op-modal op-modal-open">
|
<div className="op-modal op-modal-open">
|
||||||
<div className="max-h-90 bg-base-100 w-[95%] md:max-w-[500px] rounded-box relative">
|
<div className="max-h-90 bg-base-100 w-[95%] md:max-w-[500px] rounded-box relative">
|
||||||
|
|||||||
@@ -5,6 +5,29 @@ import { useTranslation } from "react-i18next";
|
|||||||
function CustomModal(props) {
|
function CustomModal(props) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const [reason, setReason] = useState("");
|
const [reason, setReason] = useState("");
|
||||||
|
const [isExtendExpiry, setIsExtendExpiry] = useState(false);
|
||||||
|
const [expiryDate, setExpiryDate] = useState("");
|
||||||
|
const localuser = localStorage.getItem(
|
||||||
|
`Parse/${localStorage.getItem("parseAppId")}/currentUser`
|
||||||
|
);
|
||||||
|
|
||||||
|
const currentUser = JSON.parse(localuser);
|
||||||
|
const isCreator = props?.doc
|
||||||
|
? props?.doc?.CreatedBy?.objectId === currentUser?.objectId &&
|
||||||
|
localStorage.getItem("_user_role") !== "Guest"
|
||||||
|
: false;
|
||||||
|
const handleExtendBtn = () => setIsExtendExpiry(!isExtendExpiry);
|
||||||
|
|
||||||
|
const handleUpdateExpiry = async (e) => {
|
||||||
|
e.preventDefault();
|
||||||
|
e.stopPropagation();
|
||||||
|
if (expiryDate) {
|
||||||
|
props.handleExpiry && props.handleExpiry(expiryDate);
|
||||||
|
} else {
|
||||||
|
alert(t("expiry-date-error"));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
props.show && (
|
props.show && (
|
||||||
<dialog className="op-modal op-modal-open absolute z-[448]">
|
<dialog className="op-modal op-modal-open absolute z-[448]">
|
||||||
@@ -15,16 +38,24 @@ function CustomModal(props) {
|
|||||||
<div className="p-[10px] px-[20px]">
|
<div className="p-[10px] px-[20px]">
|
||||||
<p className="text-[15px]">{props.bodyMssg && props.bodyMssg}</p>
|
<p className="text-[15px]">{props.bodyMssg && props.bodyMssg}</p>
|
||||||
</div>
|
</div>
|
||||||
{props.isDownloadBtn && (
|
<div className="flex flex-row items-center">
|
||||||
<div className="flex justify-start w-full ml-[20px] mb-3 mt-1">
|
{isCreator && (
|
||||||
<button
|
<button
|
||||||
className="op-btn op-btn-primary "
|
className="op-btn op-btn-primary px-6 ml-[20px] mb-3 mt-1"
|
||||||
|
onClick={() => handleExtendBtn()}
|
||||||
|
>
|
||||||
|
Extend
|
||||||
|
</button>
|
||||||
|
)}
|
||||||
|
{props.isDownloadBtn && (
|
||||||
|
<button
|
||||||
|
className="op-btn op-btn-primary ml-[10px] mb-3 mt-1"
|
||||||
onClick={() => props.handleDownloadBtn()}
|
onClick={() => props.handleDownloadBtn()}
|
||||||
>
|
>
|
||||||
Download
|
Download
|
||||||
</button>
|
</button>
|
||||||
</div>
|
)}
|
||||||
)}
|
</div>
|
||||||
{props.footerMessage && (
|
{props.footerMessage && (
|
||||||
<>
|
<>
|
||||||
<div className="mx-3">
|
<div className="mx-3">
|
||||||
@@ -60,6 +91,31 @@ function CustomModal(props) {
|
|||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
{isExtendExpiry && (
|
||||||
|
<form className="mx-3 mb-3" onSubmit={handleUpdateExpiry}>
|
||||||
|
<input
|
||||||
|
type="date"
|
||||||
|
className="rounded-full bg-base-300 w-full px-4 py-2 text-black border-2 hover:border-spacing-2"
|
||||||
|
defaultValue={props?.doc?.ExpiryDate?.iso?.split("T")[0]}
|
||||||
|
onChange={(e) => setExpiryDate(e.target.value)}
|
||||||
|
/>
|
||||||
|
<div className="flex flex-row items-center mt-2">
|
||||||
|
<button type="submit" className="op-btn op-btn-primary mr-2">
|
||||||
|
{t("update")}
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
className="op-btn op-btn-secondary"
|
||||||
|
onClick={() => {
|
||||||
|
setExpiryDate("");
|
||||||
|
setIsExtendExpiry(false);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{t("close")}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</dialog>
|
</dialog>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -134,7 +134,8 @@
|
|||||||
"option": "Option",
|
"option": "Option",
|
||||||
"Embed": "Embed",
|
"Embed": "Embed",
|
||||||
"Copy TemplateId": "Copy TemplateId",
|
"Copy TemplateId": "Copy TemplateId",
|
||||||
"Copy Public URL": "Copy Public URL"
|
"Copy Public URL": "Copy Public URL",
|
||||||
|
"extend-expiry-date": "Extend expiry date"
|
||||||
},
|
},
|
||||||
"report-heading": {
|
"report-heading": {
|
||||||
"Sr.No": "Sr.No",
|
"Sr.No": "Sr.No",
|
||||||
@@ -267,7 +268,8 @@
|
|||||||
"make-template-public-alert": "Are you sure you want to make this template public?",
|
"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.",
|
"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-role": "Public role",
|
||||||
"public-url": "Public profile needed",
|
"public-url": "Public profile",
|
||||||
|
"embed-template": "Embed Template",
|
||||||
"public-url-copy": "Here’s your public URL: ",
|
"public-url-copy": "Here’s your public URL: ",
|
||||||
"public-url-copy-mssg": "Copy it or share it with the signer, and you will be able to see all your publicly set templates.",
|
"public-url-copy-mssg": "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 complete your OpenSign public profile setup. Once done, you’ll be able to make templates public. This process only needs to be completed once.",
|
"add-public-url-alert": "Please complete your OpenSign public profile setup. Once done, you’ll be able to make templates public. This process only needs to be completed once.",
|
||||||
@@ -703,5 +705,7 @@
|
|||||||
"notify-on-signatures-help": {
|
"notify-on-signatures-help": {
|
||||||
"p1": "The document creator will receive an email notification whenever a signer signs the document.",
|
"p1": "The document creator will receive an email notification whenever a signer signs the document.",
|
||||||
"note": "Note: Notification email will not be sent for the last signer, as the document creator will receive a completion email instead."
|
"note": "Note: Notification email will not be sent for the last signer, as the document creator will receive a completion email instead."
|
||||||
}
|
},
|
||||||
|
"expiry-date-updated": "The expiry date has been successfully extended to {{newexpirydate}}",
|
||||||
|
"expiry-date-error": "Please provide a new expiry date that is later than the current one"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -134,7 +134,8 @@
|
|||||||
"option": "Opción",
|
"option": "Opción",
|
||||||
"Embed": "Incrustar",
|
"Embed": "Incrustar",
|
||||||
"Copy TemplateId": "Copiar ID de plantilla",
|
"Copy TemplateId": "Copiar ID de plantilla",
|
||||||
"Copy Public URL": "Copiar URL pública"
|
"Copy Public URL": "Copiar URL pública",
|
||||||
|
"Expiry-date": "Date d'expiration"
|
||||||
},
|
},
|
||||||
"report-heading": {
|
"report-heading": {
|
||||||
"Sr.No": "Nº",
|
"Sr.No": "Nº",
|
||||||
@@ -267,7 +268,8 @@
|
|||||||
"make-template-public-alert": "¿En definitiva quieres convertir esta plantilla en pública?",
|
"make-template-public-alert": "¿En definitiva quieres convertir esta plantilla en pública?",
|
||||||
"make-template-private-alert": "¿En definitiva quieres convertir esta plantilla en privada? Esto lo removerá de tu perfil público.",
|
"make-template-private-alert": "¿En definitiva quieres convertir esta plantilla en privada? Esto lo removerá de tu perfil público.",
|
||||||
"public-role": "Rol público",
|
"public-role": "Rol público",
|
||||||
"public-url": "Se requiere perfil público",
|
"public-url": "Perfil publico",
|
||||||
|
"embed-template": "Insertar plantilla",
|
||||||
"public-url-copy": "Aquí está tu URL pública: ",
|
"public-url-copy": "Aquí está tu URL pública: ",
|
||||||
"public-url-copy-mssg": "Cópiala o compártela con el firmante y podrás ver todas tus plantillas públicas.",
|
"public-url-copy-mssg": "Cópiala o compártela con el firmante y podrás ver todas tus plantillas públicas.",
|
||||||
"add-public-url-alert": "Por favor, completa la configuración de tu perfil público OpenSign. Una vez terminado, podrás crear plantillas públicas. Este proceso solo necesita ser completado una vez.",
|
"add-public-url-alert": "Por favor, completa la configuración de tu perfil público OpenSign. Una vez terminado, podrás crear plantillas públicas. Este proceso solo necesita ser completado una vez.",
|
||||||
@@ -703,5 +705,7 @@
|
|||||||
"notify-on-signatures-help": {
|
"notify-on-signatures-help": {
|
||||||
"p1": "El creador del documento recibirá una notificación por correo electrónico cada vez que un firmante firme el documento.",
|
"p1": "El creador del documento recibirá una notificación por correo electrónico cada vez que un firmante firme el documento.",
|
||||||
"note": "Nota: No se enviará un correo electrónico de notificación al último firmante, ya que el creador del documento recibirá un correo electrónico de finalización."
|
"note": "Nota: No se enviará un correo electrónico de notificación al último firmante, ya que el creador del documento recibirá un correo electrónico de finalización."
|
||||||
}
|
},
|
||||||
|
"expiry-date-updated": "La fecha de vencimiento se ha extendido con éxito hasta el {{newexpirydate}}",
|
||||||
|
"expiry-date-error": "Proporcione una nueva fecha de vencimiento que sea posterior a la actual"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -155,7 +155,8 @@
|
|||||||
"option": "Option",
|
"option": "Option",
|
||||||
"Embed": "Intégrer",
|
"Embed": "Intégrer",
|
||||||
"Copy TemplateId": "Copier l'ID du modèle",
|
"Copy TemplateId": "Copier l'ID du modèle",
|
||||||
"Copy Public URL": "Copier l'URL publique"
|
"Copy Public URL": "Copier l'URL publique",
|
||||||
|
"extend-expiry-date": "Prolonger la date d'expiration"
|
||||||
},
|
},
|
||||||
"report-help": {
|
"report-help": {
|
||||||
"Draft Documents": "Il s'agit de documents que vous avez commencés mais que vous n'avez pas finalisés pour envoi.",
|
"Draft Documents": "Il s'agit de documents que vous avez commencés mais que vous n'avez pas finalisés pour envoi.",
|
||||||
@@ -266,7 +267,8 @@
|
|||||||
"make-template-public-alert": "Êtes-vous sûr de vouloir rendre ce modèle public ?",
|
"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.",
|
"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-role": "Rôle public",
|
||||||
"public-url": "Profil public requis",
|
"public-url": "Profil public",
|
||||||
|
"embed-template": "Intégrer le modèle",
|
||||||
"public-url-copy": "Voici votre URL publique : ",
|
"public-url-copy": "Voici votre URL publique : ",
|
||||||
"public-url-copy-mssg": "copiez-la ou partagez-le avec le signataire et vous pouvoir voir tous vos paramètres publics modèles.",
|
"public-url-copy-mssg": "copiez-la ou partagez-le avec le signataire et vous pouvoir voir tous vos paramètres publics modèles.",
|
||||||
"add-public-url-alert": "Veuillez terminer la configuration de votre profil public OpenSign. Une fois cela fait, vous pourrez rendre les modèles publics. Ce processus ne doit être effectué qu’une seule fois.",
|
"add-public-url-alert": "Veuillez terminer la configuration de votre profil public OpenSign. Une fois cela fait, vous pourrez rendre les modèles publics. Ce processus ne doit être effectué qu’une seule fois.",
|
||||||
@@ -702,5 +704,7 @@
|
|||||||
"notify-on-signatures-help": {
|
"notify-on-signatures-help": {
|
||||||
"p1": "Le créateur du document recevra une notification par e-mail chaque fois qu'un signataire signera le document.",
|
"p1": "Le créateur du document recevra une notification par e-mail chaque fois qu'un signataire signera le document.",
|
||||||
"note": "Remarque : L'e-mail de notification ne sera pas envoyé pour le dernier signataire, car le créateur du document recevra à la place un e-mail de fin."
|
"note": "Remarque : L'e-mail de notification ne sera pas envoyé pour le dernier signataire, car le créateur du document recevra à la place un e-mail de fin."
|
||||||
}
|
},
|
||||||
|
"expiry-date-updated": "La date d'expiration a été prolongée avec succès jusqu'au {{newexpirydate}}",
|
||||||
|
"expiry-date-error": "Veuillez fournir une nouvelle date d'expiration postérieure à la date actuelle"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user