Conversation
kainacrow
force-pushed
the
integration-branch-cards
branch
from
July 23, 2023 18:22
4c68e9d to
b7975a1
Compare
kainacrow
force-pushed
the
integration-branch-cards
branch
from
July 23, 2023 18:28
b7975a1 to
48997ab
Compare
creating view for suppliers
adding in average contract value
not creating similar suppliers
* changing redirect page to modal * fixing modal
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.
This PR handles various additions:
A supplier is always required for a contract.
Creating a contract via a CSV import. If a supplier is not present, then a contract will not be created when importing via a CSV. If a contract already exists it won't be created again. If a supplier already exists it won't be created again. This pops up via a modal - but the page does require a refresh to be loaded. I'm also not sure why the content missing part shows up but I looked over a tutorial for building modals using turbo as I was unfamiliar and that's as far as I was able to get.
The ability to click on a supplier name on the contracts table and be taken to a dashboard where it will show all the contracts associated with that specific supplier.
On the supplier view, an average contract value will be displayed in the right corner.
I added functionality for suppliers to not be created if one already exists. I did this by scrubbing the empty space before/after the string then removing blank spaces within, then removing "LLC" as that is how some duplicates were showing up
I removed N+1 queries by using eager loading to fetch the associated
contract_ownerandsupplierforcontractsand loadingcontractsand theircontract_ownersfor thesupplierI also added specs for the controllers and specs for the new model and factories as well.