This repository was archived by the owner on Jul 20, 2026. It is now read-only.
Conversation
roshni73
marked this pull request as draft
June 9, 2025 10:05
roshni73
force-pushed
the
feature/Add-Reports
branch
from
June 11, 2025 09:13
6f49456 to
702c7fb
Compare
barshathakuri
approved these changes
Jul 4, 2025
AdityaKhatri
suggested changes
Jul 15, 2025
| import { CodegenConfig } from '@graphql-codegen/cli'; | ||
|
|
||
| const config: CodegenConfig = { | ||
| schema: process.env.APP_GRAPHQL_CODEGEN_ENDPOINT, |
Contributor
There was a problem hiding this comment.
This should not be changed.
| onClose: () => void; | ||
| title: string; | ||
| initialValues?: Partial<UpdateReportInput & { id: string }>; | ||
| reportsRefetch: () => void; |
Contributor
There was a problem hiding this comment.
This naming convention is opposite of what we want. So, basically, this is called when the report is created or updated right? If that is the case then, the function should be called, onReportUpdate. ani outside you do the fetching separately. Please update it in other parts as well.
| UPDATE_REPORT, | ||
| { | ||
| onCompleted: (response) => { | ||
| const updateReport = response.updateReport as ReportTypeMutationResponseType; |
Contributor
There was a problem hiding this comment.
We don't need to cast here. Fix it properly.
| CREATE_REPORT, | ||
| { | ||
| onCompleted: (response) => { | ||
| const createReport = response.createReport as ReportTypeMutationResponseType; |
Comment on lines
+309
to
+314
| value={imageFile} | ||
| accept="image/*" | ||
| onChange={(file, name) => { | ||
| setFieldValue(file, name); | ||
| setImageFile(file || null); | ||
| }} |
Contributor
There was a problem hiding this comment.
Can't we use the value directly as opposed to saving it in the state as well?
Comment on lines
+341
to
+347
| value={reportFile} | ||
| accept=".pdf, .doc, .docx, .txt, .xlsx" | ||
| onChange={(file, name) => { | ||
| setFieldValue(file, name); | ||
| setReportFilePreview(file || null); | ||
| }} | ||
| > |
roshni73
force-pushed
the
feature/Add-Reports
branch
from
July 15, 2025 08:37
42f9c02 to
8083d3d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses:
Changes
This PR doesn't introduce:
console.logmeant for debugging