From dc9c32c6ee912de55cc85b827f64cd9acf14300a Mon Sep 17 00:00:00 2001 From: RaktimaNXG Date: Tue, 24 Sep 2024 20:19:16 +0530 Subject: [PATCH 1/2] fix: update npm package name of public sign --- apps/OpenSign/public/locales/en/translation.json | 2 +- apps/OpenSign/public/locales/fr/translation.json | 2 +- apps/OpenSign/src/components/pdf/EmbedTab.js | 12 ++++++------ apps/OpenSign/src/script/locales/en/translation.json | 2 +- apps/OpenSign/src/script/locales/fr/translation.json | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/apps/OpenSign/public/locales/en/translation.json b/apps/OpenSign/public/locales/en/translation.json index 2498764b2..79b1b2b65 100644 --- a/apps/OpenSign/public/locales/en/translation.json +++ b/apps/OpenSign/public/locales/en/translation.json @@ -635,7 +635,7 @@ "decline-by":"Declined/revoked by", "document-declined": "Document declined", "public-template-mssg-1":"To integrate OpenSign into your React or Next.js project, simply run the following command:", - "public-template-mssg-2" :"Ensure you have npm or yarn set up in your project. If you’re using Yarn, you can replace npm install with yarn add opensign-react.", + "public-template-mssg-2" :"Ensure you have npm or yarn set up in your project. If you’re using Yarn, you can replace npm install with yarn add @opensign/react.", "public-template-mssg-3" :"Need more details or examples?", "public-template-mssg-4": "Visit the", "public-template-mssg-5": " npm for the latest updates, detailed documentation, and version history.", diff --git a/apps/OpenSign/public/locales/fr/translation.json b/apps/OpenSign/public/locales/fr/translation.json index 48e6c23bb..b98d45cb0 100644 --- a/apps/OpenSign/public/locales/fr/translation.json +++ b/apps/OpenSign/public/locales/fr/translation.json @@ -634,7 +634,7 @@ "decline-by" :"Refusé/révoqué par", "document-declined":"document refusé", "public-template-mssg-1" :"Pour intégrer OpenSign dans votre projet React ou Next.js, exécutez simplement la commande suivante :", - "public-template-mssg-2" :"Assurez-vous que npm ou Yarn est configuré dans votre projet. Si vous utilisez Yarn, vous pouvez remplacer npm install par Yarn Add opensign-react.", + "public-template-mssg-2" :"Assurez-vous que npm ou Yarn est configuré dans votre projet. Si vous utilisez Yarn, vous pouvez remplacer npm install par Yarn Add @opensign/react.", "public-template-mssg-3" :"Besoin de plus de détails ou d'exemples ?", "public-template-mssg-4": "Visitez le", "public-template-mssg-5": "npm pour les dernières mises à jour, une documentation détaillée et l'historique des versions.", diff --git a/apps/OpenSign/src/components/pdf/EmbedTab.js b/apps/OpenSign/src/components/pdf/EmbedTab.js index 13c4d7eac..f2381ebef 100644 --- a/apps/OpenSign/src/components/pdf/EmbedTab.js +++ b/apps/OpenSign/src/components/pdf/EmbedTab.js @@ -19,14 +19,14 @@ function EmbedTab(props) { id: 0, title: "Installation", codeString: ` -npm install opensign-react` +npm install @opensign/react` }, { id: 1, title: "Usage", codeString: ` import React from "react"; -import Opensign from "opensign-react"; +import Opensign from "@opensign/react"; export function App() { return ( @@ -50,14 +50,14 @@ export function App() { id: 0, title: "Installation", codeString: ` -npm install opensign-angular-lib` +npm install @opensign/angular` }, { id: 1, title: "Usage", codeString: ` import { Component } from '@angular/core'; -import {OpensignComponent} from "opensign-angular-lib" +import {OpensignComponent} from "@opensign/angular" @Component({ selector:'app-root', @@ -163,7 +163,7 @@ export class AppComponent{ {" "} {t("public-template-mssg-4")} Date: Wed, 25 Sep 2024 11:53:15 +0530 Subject: [PATCH 2/2] fix: handle condition of embed options --- apps/OpenSign/src/json/ReportJson.js | 35 +++++++++++++++++----------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/apps/OpenSign/src/json/ReportJson.js b/apps/OpenSign/src/json/ReportJson.js index ada3a0da7..c2da51950 100644 --- a/apps/OpenSign/src/json/ReportJson.js +++ b/apps/OpenSign/src/json/ReportJson.js @@ -1,3 +1,5 @@ +import { isEnableSubscription } from "../constant/const"; + export default function reportJson(id) { // console.log("json ", json); const head = ["Sr.No", "Title", "Note", "Folder", "File", "Owner", "Signers"]; @@ -22,6 +24,24 @@ export default function reportJson(id) { const contactbook = ["Sr.No", "Name", "Email", "Phone"]; const dashboardReportHead = ["Title", "File", "Owner", "Signers"]; const templateReport = ["Sr.No", "Title", "File", "Owner", "Signers"]; + const templateSubAction = isEnableSubscription + ? [ + { + btnId: "2434", + btnLabel: "Embed", + hoverLabel: "Embed", + btnIcon: "fa-light fa-code", + action: "Embed" + }, + { + btnId: "2434", + btnLabel: "Copy TemplateId", + hoverLabel: "Copy TemplateId", + btnIcon: "fa-light fa-copy", + action: "CopyTemplateId" + } + ] + : []; switch (id) { // draft documents report case "ByHuevtCFY": @@ -363,20 +383,7 @@ export default function reportJson(id) { redirectUrl: "template", action: "redirect" }, - { - btnId: "2434", - btnLabel: "Embed", - hoverLabel: "Embed", - btnIcon: "fa-light fa-code", - action: "Embed" - }, - { - btnId: "2434", - btnLabel: "Copy TemplateId", - hoverLabel: "Copy TemplateId", - btnIcon: "fa-light fa-copy", - action: "CopyTemplateId" - }, + ...templateSubAction, { btnId: "1834", btnLabel: "Delete",