Skip to content

Commit

Permalink
Use created at when donwloading pdf
Browse files Browse the repository at this point in the history
  • Loading branch information
minottic committed May 27, 2024
1 parent 9668762 commit 56af432
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions sci-log-db/src/__tests__/unit/service.export-snippet.unit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,20 @@ describe('Export service unit', function (this: Suite) {
new Paragraph({
linkType: LinkType.COMMENT,
textcontent: '<p>a comment</p>',
updatedAt: date,
updatedBy: 'test',
createdAt: date,
createdBy: 'test',
}),
new Paragraph({
linkType: LinkType.QUOTE,
textcontent: '<p>a quote</p>',
updatedAt: date,
updatedBy: 'test',
createdAt: date,
createdBy: 'test',
}),
new Paragraph({
linkType: LinkType.PARAGRAPH,
textcontent: '<p>a paragraph sub</p>',
updatedAt: date,
updatedBy: 'test',
createdAt: date,
createdBy: 'test',
}),
];
const paragraph = new Paragraph({
Expand All @@ -46,8 +46,8 @@ describe('Export service unit', function (this: Suite) {
{fileHash: '789', accessHash: 'ghi'},
],
tags: ['tag1', 'tag2'],
updatedAt: date,
updatedBy: 'test',
createdAt: date,
createdBy: 'test',
linkType: LinkType.PARAGRAPH,
});

Expand Down
4 changes: 2 additions & 2 deletions sci-log-db/src/services/export-snippets.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,10 @@ export class ExportService {
private dateAndAuthor = (snippet: Paragraph, element: Element): Element => {
const tagElement = this.document.createElement('snippet-header');
const counter: number | string = this.countSnippets(snippet.linkType);
tagElement.innerHTML = `${counter} / ${snippet.updatedAt.toLocaleDateString(
tagElement.innerHTML = `${counter} / ${snippet.createdAt.toLocaleDateString(
this.dateOptions.locales,
this.dateOptions.options,
)} / ${snippet.updatedBy}`;
)} / ${snippet.createdBy}`;
element.insertAdjacentElement('afterbegin', tagElement);
return element;
};
Expand Down

0 comments on commit 56af432

Please sign in to comment.