Skip to content

Commit 0742291

Browse files
feat: add delete button in reports
1 parent 970fbec commit 0742291

File tree

2 files changed

+487
-389
lines changed

2 files changed

+487
-389
lines changed

apps/OpenSign/src/json/ReportJson.js

Lines changed: 125 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,22 @@ export default function reportJson(id) {
1212
heading: head,
1313
actions: [
1414
{
15-
btnLabel: "sign",
15+
btnId: "1231",
16+
btnLabel: "Edit",
1617
btnColor: "#4bd396",
1718
textColor: "white",
18-
btnIcon: "fa fa-plus",
19-
redirectUrl: "draftDocument"
19+
btnIcon: "fa-solid fa-pen",
20+
redirectUrl: "draftDocument",
21+
action: "redirect"
22+
},
23+
{
24+
btnId: "2142",
25+
btnLabel: "Delete",
26+
btnColor: "#ff4848",
27+
textColor: "white",
28+
btnIcon: "fa fa-trash",
29+
redirectUrl: "",
30+
action: "delete"
2031
}
2132
],
2233
helpMsg:
@@ -29,11 +40,13 @@ export default function reportJson(id) {
2940
heading: head,
3041
actions: [
3142
{
32-
btnLabel: "sign",
43+
btnId: "4536",
44+
btnLabel: "Sign",
3345
btnColor: "#3ac9d6",
3446
textColor: "white",
3547
btnIcon: "fa fa-eye",
36-
redirectUrl: "pdfRequestFiles"
48+
redirectUrl: "pdfRequestFiles",
49+
action: "redirect"
3750
}
3851
],
3952
helpMsg:
@@ -46,11 +59,31 @@ export default function reportJson(id) {
4659
heading: head,
4760
actions: [
4861
{
62+
btnId: "8901",
63+
btnLabel: "Share",
64+
btnColor: "#3ac9d6",
65+
textColor: "white",
66+
btnIcon: "fa-solid fa-share",
67+
redirectUrl: "",
68+
action: "share"
69+
},
70+
{
71+
btnId: "1588",
4972
btnLabel: "View",
5073
btnColor: "#3ac9d6",
5174
textColor: "white",
5275
btnIcon: "fa fa-eye",
53-
redirectUrl: "pdfRequestFiles"
76+
redirectUrl: "pdfRequestFiles",
77+
action: "redirect"
78+
},
79+
{
80+
btnId: "1488",
81+
btnLabel: "Delete",
82+
btnColor: "#ff4848",
83+
textColor: "white",
84+
btnIcon: "fa fa-trash",
85+
redirectUrl: "",
86+
action: "delete"
5487
}
5588
],
5689
helpMsg:
@@ -63,11 +96,22 @@ export default function reportJson(id) {
6396
heading: head,
6497
actions: [
6598
{
66-
btnLabel: "View",
99+
btnId: "1378",
100+
btnLabel: "Edit",
67101
btnColor: "#4bd396",
68102
textColor: "white",
69103
btnIcon: "fa fa-eye",
70-
redirectUrl: "draftDocument"
104+
redirectUrl: "draftDocument",
105+
action: "redirect"
106+
},
107+
{
108+
btnId: "1278",
109+
btnLabel: "Delete",
110+
btnColor: "#ff4848",
111+
textColor: "white",
112+
btnIcon: "fa fa-trash",
113+
redirectUrl: "",
114+
action: "delete"
71115
}
72116
],
73117
helpMsg:
@@ -80,11 +124,22 @@ export default function reportJson(id) {
80124
heading: head,
81125
actions: [
82126
{
127+
btnId: "1458",
83128
btnLabel: "View",
84129
btnColor: "#4bd396",
85130
textColor: "white",
86131
btnIcon: "fa fa-eye",
87-
redirectUrl: "draftDocument"
132+
redirectUrl: "draftDocument",
133+
action: "redirect"
134+
},
135+
{
136+
btnId: "1358",
137+
btnLabel: "Delete",
138+
btnColor: "#ff4848",
139+
textColor: "white",
140+
btnIcon: "fa fa-trash",
141+
redirectUrl: "",
142+
action: "delete"
88143
}
89144
],
90145
helpMsg:
@@ -97,11 +152,22 @@ export default function reportJson(id) {
97152
heading: head,
98153
actions: [
99154
{
155+
btnId: "1898",
100156
btnLabel: "View",
101157
btnColor: "#4bd396",
102158
textColor: "white",
103159
btnIcon: "fa fa-eye",
104-
redirectUrl: "draftDocument"
160+
redirectUrl: "draftDocument",
161+
action: "redirect"
162+
},
163+
{
164+
btnId: "1998",
165+
btnLabel: "Delete",
166+
btnColor: "#ff4848",
167+
textColor: "white",
168+
btnIcon: "fa fa-trash",
169+
redirectUrl: "",
170+
action: "delete"
105171
}
106172
],
107173
helpMsg:
@@ -114,11 +180,22 @@ export default function reportJson(id) {
114180
heading: dashboardReportHead,
115181
actions: [
116182
{
183+
btnId: "1999",
117184
btnLabel: "View",
118185
btnColor: "#4bd396",
119186
textColor: "white",
120187
btnIcon: "fa fa-eye",
121-
redirectUrl: "pdfRequestFiles"
188+
redirectUrl: "pdfRequestFiles",
189+
action: "redirect"
190+
},
191+
{
192+
btnId: "2000",
193+
btnLabel: "Delete",
194+
btnColor: "#ff4848",
195+
textColor: "white",
196+
btnIcon: "fa fa-trash",
197+
redirectUrl: "",
198+
action: "delete"
122199
}
123200
]
124201
};
@@ -129,11 +206,13 @@ export default function reportJson(id) {
129206
heading: dashboardReportHead,
130207
actions: [
131208
{
209+
btnId: "2001",
132210
btnLabel: "Sign",
133211
btnColor: "#4bd396",
134212
textColor: "white",
135-
btnIcon: "fa fa-eye",
136-
redirectUrl: "pdfRequestFiles"
213+
btnIcon: "fa-solid fa-signature",
214+
redirectUrl: "pdfRequestFiles",
215+
action: "redirect"
137216
}
138217
]
139218
};
@@ -144,11 +223,22 @@ export default function reportJson(id) {
144223
heading: ["Title", "Note", "Folder", "File", "Owner", "Signers"],
145224
actions: [
146225
{
147-
btnLabel: "sign",
226+
btnId: "2003",
227+
btnLabel: "Edit",
148228
btnColor: "#4bd396",
149229
textColor: "white",
150-
btnIcon: "fa fa-plus",
151-
redirectUrl: "draftDocument"
230+
btnIcon: "fa-solid fa-pen",
231+
redirectUrl: "draftDocument",
232+
action: "redirect"
233+
},
234+
{
235+
btnId: "2004",
236+
btnLabel: "Delete",
237+
btnColor: "#ff4848",
238+
textColor: "white",
239+
btnIcon: "fa fa-trash",
240+
redirectUrl: "",
241+
action: "delete"
152242
}
153243
]
154244
};
@@ -159,10 +249,12 @@ export default function reportJson(id) {
159249
heading: contactbook,
160250
actions: [
161251
{
162-
btnLabel: "",
252+
btnId: "2204",
253+
btnLabel: "Delete",
163254
btnColor: "#f55a42",
164255
textColor: "white",
165-
btnIcon: "fa-solid fa-trash"
256+
btnIcon: "fa-solid fa-trash",
257+
action: "delete"
166258
}
167259
],
168260
form: "ContactBook",
@@ -176,27 +268,33 @@ export default function reportJson(id) {
176268
heading: head,
177269
actions: [
178270
{
179-
btnLabel: "Use",
271+
btnId: "2234",
272+
btnLabel: "Create document",
180273
btnColor: "#4bd396",
181274
textColor: "white",
182275
btnIcon: "fa fa-plus",
183276
redirectUrl: "placeHolderSign",
184-
selector: "reactourSecond",
185-
message:
186-
"Click the ‘Use’ button to create a new document from an existing template."
277+
action: "redirect"
187278
},
188279
{
189280
btnLabel: "Edit",
281+
btnId: "2434",
190282
btnColor: "#00c9d5",
191283
textColor: "white",
192-
btnIcon: "fa fa-plus",
284+
btnIcon: "fa-solid fa-pen",
193285
redirectUrl: "template",
194-
selector: "reactourThird",
195-
message:
196-
"Use the ‘Edit’ button to add signer roles, modify fields, and update your template. Changes will apply to all future documents created from this template but won’t affect existing documents."
286+
action: "redirect"
287+
},
288+
{
289+
btnId: "1834",
290+
btnLabel: "Delete",
291+
btnColor: "#ff4848",
292+
textColor: "white",
293+
btnIcon: "fa fa-trash",
294+
redirectUrl: "",
295+
action: "delete"
197296
}
198297
],
199-
200298
helpMsg:
201299
"This is a list of templates that are available to you for creating documents. You can click the 'use' button to create a new document using a template, modify the document & add signers in the next step."
202300
};

0 commit comments

Comments
 (0)