-
Notifications
You must be signed in to change notification settings - Fork 2
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
Tag where permit is used #2618
base: main
Are you sure you want to change the base?
Tag where permit is used #2618
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,6 +33,7 @@ const handler = async () => { | |
// Find out which licences need to be processed | ||
// Call the permit repo, and fetch any licence refs plus licence_data_value | ||
// where permit.licence.date_licence_version_purpose_conditions_last_copied is either null or before today | ||
// TODO: permit used here | ||
const licences = await permitConnector.licences.getWaterLicencesThatHaveConditionsThatNeedToBeCopiedFromDigitise() | ||
|
||
logger.info(`Found ${licences.length} candidate licences that have licence version purpose conditions that may be copied from digitise...`) | ||
|
@@ -44,6 +45,7 @@ const handler = async () => { | |
if (edits.status === 'Approved') { | ||
logger.info(`Processing ${eachLicence.licence_ref}: Status is approved...`) | ||
// Take the permit data, and put it through the Digitise reducer | ||
// TODO: permit used here | ||
const originalLicence = await permitConnector.licences.getWaterLicence(eachLicence.licence_ref) | ||
const initialState = originalLicence && digitise.getInitialState(originalLicence) | ||
const hasData = initialState.licence.data.current_version !== undefined | ||
|
@@ -71,7 +73,7 @@ const handler = async () => { | |
// For the successful records, | ||
// mark them as processed by updating the datestamp | ||
// in permit.licence.date_licence_version_purpose_conditions_last_copied | ||
|
||
// TODO: permit used here | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This work has been tagged to show it is used as part of the Digitize journey (Also known as AR and abstraction reform) |
||
await permitConnector.licences.updateOne(eachLicence.licence_id, { | ||
date_licence_version_purpose_conditions_last_copied: new Date() | ||
}) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,7 +66,7 @@ const getLicence = async (document, includeExpired, companyId) => { | |
} | ||
|
||
throwIfUnauthorised(documentHeader, companyId) | ||
|
||
// TODO: permit used here | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can not establish where this is called (if it even is). It is not in the Licence Summary pages as they use the licence module. As we have migrated all the licence summary pages (tabs), if this call was used on the summary page it will no longer be needed when we remove the summary code, however nothing leads to believe they call this controller. |
||
const licenceResponse = await permitClient.licences.findMany({ | ||
licence_id: documentHeader.system_internal_id, | ||
licence_type_id: typeId, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ const postPreviewReturnNotification = async (request, h) => { | |
|
||
// Create a new set to remove any duplicate values | ||
const licenceRefs = [...new Set(data.map(item => item.licence_ref))] | ||
|
||
// TODO: permit used here | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is located in the Returns notification paper forms functionality. I have created a paper for notification but i can not see this being called. I could not trigger This call can be replaced by extracting the
|
||
const licencesEndDates = await permitConnector.getLicenceEndDates(licenceRefs) | ||
|
||
return { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -263,6 +263,7 @@ const mapXml = async (xmlStr, user, today) => { | |
// Stage 1 - get licence numbers and region codes | ||
const permits = getPermitsFromXml(xmlDoc) | ||
const licenceNumbers = getLicenceNumbersFromPermits(permits) | ||
// TODO: permit used here | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can get this direct using the As discussed. If the XML mapper is used (which we currently believe no customers are) then this code could be removed or updated. This data can be retrieved from |
||
const licenceRegionCodes = await permitConnector.getLicenceRegionCodes(licenceNumbers) | ||
|
||
// Stage 2 - do basic mapping of XML data to returns | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -131,6 +131,7 @@ const getPermitCount = async () => { | |
licence_regime_id: 1, | ||
licence_type_id: 8 | ||
} | ||
// TODO: permit used here | ||
return getCount(permitConnector.licences, filter) | ||
} | ||
|
||
|
@@ -139,6 +140,7 @@ const getVersions = async () => { | |
waterService: pkg.version, | ||
idm: await idmConnector.getServiceVersion(), | ||
crm: await crmServiceVersionConnector.getServiceVersion(), | ||
// TODO: permit used here | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. potential dead - mark as dead There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The system repo has it's own implementation for checkign service statues. This is now obsolete. |
||
permit: await permitConnector.getServiceVersion(), | ||
returns: await returnsConnector.getServiceVersion(), | ||
import: await importConnector.getServiceVersion() | ||
|
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.
This data is pulled from CSV in aws.
We have added seeders to what we have called reference data. This can be reference data.
A discussion need to had if we can store this data in git or needs to handle more securely.