-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add URL, image count, and data source fields to viewer #239 #754
base: development
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks mostly ok, found some issues that should be checked, especially if any of these new fields are needed for the local vihko document viewer
<laji-row title="URL" *ngIf="document.referenceURL" ngPreserveWhitespaces> | ||
<a [href]="document.referenceURL" target="_blank" rel="noopener">{{ document.referenceURL }}</a> | ||
</laji-row> | ||
<laji-row *ngIf="document?.gatherings?.[0]?.units?.[0]?.externalMediaCount" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Units
model file (projects/laji/src/app/shared/models/Units.ts
) is missing the externalMediaCount
. But looking at our schema at schema.laji.fi, I can't see the externalMediaCount
or the document's referenceURL
field either. If they are fields that exist only for warehouse documents, then they should be removed from this file and the Document
model file because these refer to the lajistore/vihko documents.
Also the other thing to keep in mind when making changes this document-local
viewer is that it fetches most of the fields automatically from it's vihko form. Only the "meta fields" (like creator, dateCreated) that are not included in the form fields need to be added here manually.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed referenceURL from Document.ts. It and externalMediaCount are only used in DW, not Lajistore.
Haven't touched Units.ts in this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok good but can you also remove all the changes in this file (document-local-viewer-view.component.html
) since it's only for local vihko documents (dataSource
is not needed either since it will show it automatically if the document's form has that field)
luomus/meta#239 Adds three fields to observation viewer. Can be tested with e.g. these documents:
Translations to be done.
My first pull request here, done with help from AI.