-
Notifications
You must be signed in to change notification settings - Fork 8
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
#2104 delete manufac #2143
#2104 delete manufac #2143
Conversation
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.
Should not have yarn lock changes
src/frontend/src/components/ManufacturerDeleteButtonBlocker.tsx
Outdated
Show resolved
Hide resolved
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.
Something got extremely messed up all of your checks are failing right now. Think it had to do with your yarn lock stuff
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.
Looks pretty good, just small changes
src/frontend/src/pages/AdminToolsPage/BOMConfig/ManufacturerDeleteModal.tsx
Outdated
Show resolved
Hide resolved
src/frontend/src/pages/AdminToolsPage/BOMConfig/ManufacturerTable.tsx
Outdated
Show resolved
Hide resolved
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.
LGTM
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.
Nice job so far!
src/frontend/src/pages/AdminToolsPage/BOMConfig/ManufacturerDeleteModal.tsx
Outdated
Show resolved
Hide resolved
src/frontend/src/pages/AdminToolsPage/BOMConfig/ManufacturerTable.tsx
Outdated
Show resolved
Hide resolved
src/frontend/src/pages/AdminToolsPage/BOMConfig/ManufacturerTable.tsx
Outdated
Show resolved
Hide resolved
src/frontend/src/pages/AdminToolsPage/BOMConfig/ManufacturerTable.tsx
Outdated
Show resolved
Hide resolved
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.
right now the endpoint is erroring but not actually showing the error in the frontend, I think removing the two asyncs should fix it, but lmk if it doesn't
src/frontend/src/pages/AdminToolsPage/BOMConfig/ManufacturerDeleteModal.tsx
Outdated
Show resolved
Hide resolved
src/frontend/src/pages/AdminToolsPage/BOMConfig/ManufacturerTable.tsx
Outdated
Show resolved
Hide resolved
src/frontend/src/pages/AdminToolsPage/BOMConfig/ManufacturerTable.tsx
Outdated
Show resolved
Hide resolved
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 one's weirder than I initially thought, get me at the meeting tmrw and I can explain how to do it more, but basically, we're going to have to go back to soft deleting manufacturers in the database (gonna require a schema change and changing the backend endpoints a bit)
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.
-
Change the schema to have a dateDeleted field for a manufacturer, kinda opposite of what this PR did, this will be a custom migration so we dont wanna do a prisma migrate but we will need to manually edit the sql files ourselves, #1989 hard deleted delete manufacturer endpoint #2044
-
edit the endpoints that this effects
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.
Then we are going to wanna display the manufacturers where the query args say it is true, remember what reid was showing in the meeting, will probably need to add it in, take a look at some of the other stuff we have dateDeleted for and see how they do it
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.
LGTM 🔥
Changes
I made the delete button next to the manufacturers so you can delete them and there is a warning that pops up to check if you want to confirm.
Notes
The actual deletion of the manufacturers works but only visually, it does not delete out of the database so when you go to create a new manufacturer it loads everything that should have been deleted plus the manufacturer you just made. I tried to make an endpoint to delete the manufacturer but I am not sure where I went wrong.
Screenshots
To Do
Any remaining things that need to get done
Checklist
It can be helpful to check the
Checks
andFiles changed
tabs.Please review the contributor guide and reach out to your Tech Lead if anything is unclear.
Please request reviewers and ping on slack only after you've gone through this whole checklist.
yarn.lock
changes (unless dependencies have changed)Closes #2104