-
Notifications
You must be signed in to change notification settings - Fork 37
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
New inspections view #1880
New inspections view #1880
Conversation
25b9326
to
a63fa6f
Compare
a63fa6f
to
e106fe2
Compare
try | ||
{ | ||
inspection = await inspectionService.ReadByIsarTaskId(taskId, readOnly: true); | ||
if (inspection == null) return NotFound($"Could not find inspection for task with Id {taskId}."); | ||
|
||
} |
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.
Consider querying the inspection by the inspectionID instead of the taskID
|
||
if (!inspectionData.BlobContainer.ToLower(CultureInfo.CurrentCulture).Equals(installationCode.ToLower(CultureInfo.CurrentCulture), StringComparison.Ordinal)) | ||
{ | ||
return NotFound($"Could not find inspection data for inspection with Id {inspection.Id} because blob name {inspectionData.BlobName} does not match installation {installationCode}."); |
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.
Consider moving the checks into the InspectionService
@@ -430,4 +430,12 @@ export class BackendAPICaller { | |||
}) | |||
return result.content | |||
} | |||
|
|||
static async getInspection(installationCode: string, taskId: string): Promise<Blob> { | |||
const path: string = 'inspection/' + installationCode + '/' + taskId + '/taskId' |
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.
Consider querying by inspectionId instead of taskId
.catch(() => { | ||
setStartTimer((oldValue) => !oldValue) | ||
}) |
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.
Consider stop trying if we get a failed workflow from the backend
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.
Added issue: #1881
<Typography key={task.id + task.inspection.id + 'insp'} link href={task.inspection.inspectionUrl}> | ||
{TranslateText(task.inspection.inspectionType as string)} | ||
</Typography> | ||
(task.inspection.inspectionType === InspectionType.Image ? ( |
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.
In the future we can also do this for ThermalImage
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.
Good job! Looking forward to see it in the frontend. Some comments, but we can solve these in future PRs
e106fe2
to
be43143
Compare
Ready for review checklist: