Skip to content

Commit

Permalink
Implemented multiple email listing
Browse files Browse the repository at this point in the history
  • Loading branch information
andreysaf committed Jul 17, 2020
1 parent 3a1c3a6 commit 381550e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
4 changes: 3 additions & 1 deletion src/components/Lists/SignList.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ const SignList = () => {
{docs.map(doc => (
<Table.Row key={doc.docRef}>
<Table.Cell>
<Text>{doc.email}</Text>
{doc.emails.map(email => (
<Text key={email}>{email}</Text>
))}
</Table.Cell>
<Table.Cell>
<Button
Expand Down
4 changes: 3 additions & 1 deletion src/components/Lists/SignedList.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ const SignedList = () => {
{docs.map(doc => (
<Table.Row key={doc.docRef}>
<Table.Cell>
<Text>{doc.emails}</Text>
{doc.emails.map(email => (
<Text key={email}>{email}</Text>
))}
</Table.Cell>
<Table.Cell>
<Button
Expand Down
8 changes: 1 addition & 7 deletions src/components/MergeAnnotations/MergeAnnotations.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { storage } from '../../firebase/firebase';

export const mergeAnnotations = async (docRef, xfdf) => {
console.log(docRef);
console.log(xfdf);
const PDFNet = window.PDFNet;
const CoreControls = window.CoreControls;
CoreControls.setWorkerPath('webviewer/core');
Expand All @@ -16,16 +14,12 @@ export const mergeAnnotations = async (docRef, xfdf) => {

let i;
for (i=0; i < xfdf.length; i++) {
console.log(xfdf[i]);
let fdfDoc = await PDFNet.FDFDoc.createFromXFDF(xfdf[i]);
await doc.fdfMerge(fdfDoc);
await doc.flattenAnnotations();
}

xfdf.forEach(async xfdfString => {
console.log(xfdfString);

});

const docbuf = await doc.saveMemoryBuffer(
PDFNet.SDFDoc.SaveOptions.e_linearized,
);
Expand Down

0 comments on commit 381550e

Please sign in to comment.