-
Notifications
You must be signed in to change notification settings - Fork 49
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
replaced Minio with Document Record Service #760
base: feature-drs-integration
Are you sure you want to change the base?
replaced Minio with Document Record Service #760
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 good.
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 good Brandon!
I have a few questions around the state management of consumerDocumentId
.
Are we storing this in state because we are using it in subsequent document requests?
ie the first POST generates the docId and we use that affiliate all the following documents to that singular docId?
If so, it makes sense in state, that being said we may want to consider that this property will need to be cleared before the Cont-In flow is launched or exited etc.
Either way, we will want to make sure this ID doesn't persist between Cont In Filings.
Edge case for sure and maybe the state IS already reset between, just wanted to call it out!
src/interfaces/store-interfaces/state-interfaces/continuation-in-state-interface.ts
Show resolved
Hide resolved
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.
LGTM 👍
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.
There's one outstanding comment that I'd like to see resolved but other than that, LGTM.
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.
DRS integration looks good. FYI CNTA is a legacy/existing document type possibly also used in the past by the scanning application.
@@ -285,14 +285,28 @@ export default class AuthorizationInformation extends Mixins(DateMixin, Document | |||
if (!documentKey || !documentName) return // safety check | |||
|
|||
this.isDownloading = true | |||
await this.downloadDocument(documentKey, documentName).catch(error => { | |||
const documentClass = 'CORP' |
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.
Please create an enum for document classes.
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.
Thanks.
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.
What do you think about an enum for the document type as well? (I'd be OK with both enums in the same file, fwiw.)
@@ -4,4 +4,5 @@ export interface AuthorizationProofIF { | |||
fileKey: string | |||
fileName: string | |||
}> | |||
consumerDocumentId?: string |
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.
Can we make this name consistent with documentServiceId
(in filing-interfaces.ts and elsewhere)?
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.
We have both documentServiceId and consumerDocumentId as well.
Thanks
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.
I was thinking about this documentServiceId + documentConsumerId.
Is the first one "service id" and second one "document id"? If yes then what you have makes sense.
|
||
// use beforeCreate() instead of created() to avoid type conflict with components that use this mixin | ||
async beforeCreate (): Promise<void> { | ||
// NB: we load the lib and worker this way to avoid a memory leak (esp in unit tests) | ||
// NB: must use legacy build for unit tests not running in Node 18+ | ||
this.pdfjsLib = pdfjs | ||
this.pdfjsLib.GlobalWorkerOptions.workerSrc = await import('pdfjs-dist/legacy/build/pdf.worker.entry') | ||
this.documentTypes = DOCUMENT_TYPES |
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.
For cleaner code, I think you can actually do import { DOCUMENT_TYPES as documentTypes } from ....
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.
I used to use documentTypes
in the components that extend documentMixin
and that's why I redefined documentTypes.
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.
My point is, instead of using a local variable to rename DOCUMENT_TYPES, you can import it with the name you want, as per my example.
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.
LGTM
Issue #: /bcgov/entity#23446
Description of changes:
AuthorizationProof
componentUnlimitedLiabilityCorporationInformation
componentconsumerDocumentId
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the bcrs-entities-create-ui license (Apache 2.0).