Feat: Add report table ,edit table and create report#5
Open
Feat: Add report table ,edit table and create report#5
Conversation
6f49456 to
702c7fb
Compare
barshathakuri
approved these changes
Jul 4, 2025
AdityaKhatri
requested 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); | ||
| }} | ||
| > |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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