Skip to content

Commit 4f1509c

Browse files
fix: handle condition of embed options
1 parent dc9c32c commit 4f1509c

File tree

1 file changed

+21
-14
lines changed

1 file changed

+21
-14
lines changed

apps/OpenSign/src/json/ReportJson.js

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { isEnableSubscription } from "../constant/const";
2+
13
export default function reportJson(id) {
24
// console.log("json ", json);
35
const head = ["Sr.No", "Title", "Note", "Folder", "File", "Owner", "Signers"];
@@ -22,6 +24,24 @@ export default function reportJson(id) {
2224
const contactbook = ["Sr.No", "Name", "Email", "Phone"];
2325
const dashboardReportHead = ["Title", "File", "Owner", "Signers"];
2426
const templateReport = ["Sr.No", "Title", "File", "Owner", "Signers"];
27+
const templateSubAction = isEnableSubscription
28+
? [
29+
{
30+
btnId: "2434",
31+
btnLabel: "Embed",
32+
hoverLabel: "Embed",
33+
btnIcon: "fa-light fa-code",
34+
action: "Embed"
35+
},
36+
{
37+
btnId: "2434",
38+
btnLabel: "Copy TemplateId",
39+
hoverLabel: "Copy TemplateId",
40+
btnIcon: "fa-light fa-copy",
41+
action: "CopyTemplateId"
42+
}
43+
]
44+
: [];
2545
switch (id) {
2646
// draft documents report
2747
case "ByHuevtCFY":
@@ -363,20 +383,7 @@ export default function reportJson(id) {
363383
redirectUrl: "template",
364384
action: "redirect"
365385
},
366-
{
367-
btnId: "2434",
368-
btnLabel: "Embed",
369-
hoverLabel: "Embed",
370-
btnIcon: "fa-light fa-code",
371-
action: "Embed"
372-
},
373-
{
374-
btnId: "2434",
375-
btnLabel: "Copy TemplateId",
376-
hoverLabel: "Copy TemplateId",
377-
btnIcon: "fa-light fa-copy",
378-
action: "CopyTemplateId"
379-
},
386+
...templateSubAction,
380387
{
381388
btnId: "1834",
382389
btnLabel: "Delete",

0 commit comments

Comments
 (0)