Skip to content
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

CSV Changes with Redux Toolkit and Formatting Updates #1284

Open
wants to merge 49 commits into
base: development
Choose a base branch
from

Conversation

mikedivine
Copy link
Contributor

@mikedivine mikedivine commented Jun 25, 2024

Description

Removed CSV container and split into separate CSV pages. Uses Create Meter Modal in Readings and seems to be working with Redux.

@rfrost30 has helped contribute on this PR.

Fixes #1198

Type of change

  • Note merging this changes the database configuration.
  • This change requires a documentation update

Checklist

  • I have followed the OED pull request ideas
  • I have removed text in ( ) from the issue request
  • You acknowledge that every person contributing to this work has signed the [OED Contributing License Agreement]

Limitations

None

Copy link
Member

@huss huss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks to @mikedivine and anyone else involved in this PR. Overall, it works as desired. I am releasing this as comments to get my thoughts to the team. I suspect we will want to discuss at an upcoming meeting. I still need to do some more careful reading/testing but maybe that can wait until these comments are decided. As always, I appreciate your thoughts and I'm here to clarify, esp. given my thoughts were released quickly.

src/client/app/components/csv/MetersCSVUploadComponent.tsx Outdated Show resolved Hide resolved
src/client/app/components/TooltipHelpComponent.tsx Outdated Show resolved Hide resolved
src/client/app/components/HeaderButtonsComponent.tsx Outdated Show resolved Hide resolved
src/client/app/translations/data.ts Show resolved Hide resolved
@mikedivine mikedivine changed the title 1198 csv 1198 - CSV Redux Toolkit and Formatting Updates Jun 27, 2024
src/client/app/translations/data.ts Outdated Show resolved Hide resolved
src/client/app/utils/range.ts Outdated Show resolved Hide resolved
src/client/app/components/csv/MetersCSVUploadComponent.tsx Outdated Show resolved Hide resolved
src/client/app/components/csv/MetersCSVUploadComponent.tsx Outdated Show resolved Hide resolved
src/client/app/components/TooltipHelpComponent.tsx Outdated Show resolved Hide resolved
Copy link
Member

@huss huss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for all the updates. I have made some comments to address. I'm also delaying final testing until this is done and development is merged. This is looking good and I think it should all be done soon.

- The pipeline tests were modified to use identifier and also for removal of the
createMeter option.
- uploadMeters still used name in some places even though identifier supplied so fixed.
@huss
Copy link
Member

huss commented Jul 12, 2024

I just pushed a commit to fix the pipeline test for identifier use and no create meter. It also fixes meter upload to consistently use identifier.

…s added to the DB and update redux accordingly
… having a chosen meter update the readingsData state.

Removed null options called 'meter' from certain Types such as TimeSortTypes and  BooleanMeterTypes which signaled to use the meter value or the default value. This is now the current way it is done even without these types.

Also updated some minor changes from review comment.s
@mikedivine mikedivine changed the title 1198 - CSV Redux Toolkit and Formatting Updates CSV Changes with Redux Toolkit and Formatting Updates Jul 19, 2024
@mikedivine mikedivine requested a review from huss August 2, 2024 07:12
Copy link
Member

@huss huss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for another update. Testing did not find issues. I have a few more comments that I hope are easy to address. Other than that it seems ready.

src/client/app/utils/api/UploadCSVApi.ts Outdated Show resolved Hide resolved
src/client/app/utils/api/UploadCSVApi.ts Outdated Show resolved Hide resolved
… to meterData to allow them to see meter defaults when uploading meter readings manually via CSV files
…ad of the exact same BooleanTypes mirroed in a different location.

Also fixed duplicated translations by removing them and altering CSV components to use the ones other components are using.
@mikedivine mikedivine requested a review from huss August 3, 2024 07:52
Copy link
Member

@huss huss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was not sure if this was ready for review but I wanted to move it forward. I've made one comment to address and there are a couple of old ones to finalize. If you want to discuss the new one then let me know as it may not be trivial. Thanks for all your efforts.

src/client/app/utils/api/UploadCSVApi.ts Outdated Show resolved Hide resolved
…ge becayse the frontend CSV API is expecting a string back for the message.
…eturn the error.message becayse the frontend CSV API is expecting a string back for the message.

This reverts commit a9b8a2b.
Copy link
Contributor Author

@mikedivine mikedivine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I see I have to submit review for you to see comments

src/client/app/components/HeaderButtonsComponent.tsx Outdated Show resolved Hide resolved
src/client/app/components/TooltipHelpComponent.tsx Outdated Show resolved Hide resolved
src/client/app/utils/api/UploadCSVApi.ts Outdated Show resolved Hide resolved
src/client/app/utils/api/UploadCSVApi.ts Outdated Show resolved Hide resolved
Copy link
Contributor Author

@mikedivine mikedivine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I see I have to submit review for you to see comments

@huss
Copy link
Member

huss commented Aug 4, 2024

I just merged in development since recent PRs caused a merge conflict and I had meant to do this PR earlier. I'll get it to work. After that there is one item unresolved that remains.

@mikedivine Can you look over the last comment and also verify my large merge did not cause an issue. My basic testing did not find any issues outside the last comment.

- Incorrectly merged in some code.
- username vs email for user
@huss
Copy link
Member

huss commented Aug 4, 2024

I'm going to work with @mikedivine on the failed test to resolve meter name vs identifier.

huss and others added 3 commits August 4, 2024 16:59
…'true', 'false' so Curl command users can user either. Front End will now use strictly boolean values when sending to the CSV API. Also Fixed State issue on Readings CSV component.
…ed fields when cumulative is set to 'no'. This mirrors CreateMeter component
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

convert CSV upload page to React Toolkit
3 participants