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

PSP-7247 : View disposition file (offers and sale) #3669

Merged
merged 11 commits into from
Dec 21, 2023

Conversation

eddherrera
Copy link
Collaborator

image

image

image

@eddherrera eddherrera added the enhancement New feature or request label Dec 18, 2023
@eddherrera eddherrera self-assigned this Dec 18, 2023
@devinleighsmith
Copy link
Collaborator

@eddherrera the order of fields in the sales section doesn't seem to match the mockup. Can you please check in with Ana and see if either you or her needs to update their work to match?

[ProducesResponseType(typeof(IEnumerable<DispositionFileSaleModel>), 200)]
[SwaggerOperation(Tags = new[] { "dispositionfile" })]
[TypeFilter(typeof(NullJsonResultFilter))]
public IActionResult GetDispositionFileSales([FromRoute]long id)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Hmm, not sure I agree with this, if this is mapped as a 0-1 I think I would rather this return an object or null, returning an array like this isn't clear to the consumer what the data model actually is.

@@ -48,6 +51,18 @@ export const DispositionRouter: React.FC<IDispositionRouterProps> = props => {
<Route path={`${stripTrailingSlash(path)}/property`}>
<></>
</Route>
<AppRoute
exact
path={`${stripTrailingSlash(path)}/${FileTabType.OFFERS_AND_SALE}/addOffer`}
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm pretty sure we are going to want something like:
${stripTrailingSlash(path)}/${FileTabType.OFFERS_AND_SALE}/offers/new
(new seems to be our standard naming)
why? because for edit we will want to include the specific id of the offer that is being edited, and we want our create/edit paths to follow a similar format, ie:
${stripTrailingSlash(path)}/${FileTabType.OFFERS_AND_SALE}/offers/1

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

will fix this on my next PR.

]);

if (offersResponse) {
setDispositionOffers(offersResponse);
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: could simplify this to just get the data object that is returned by the api request wrapper instead of needing two additional state vars.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I am using state vars to hold the list of offers and be able to update the offers state once the delete offers succeds.

dispositionSale: Api_DispositionFileSale | null;
}

const OffersAndSaleContainerView: React.FunctionComponent<IOffersAndSaleContainerViewProps> = ({
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit containerview -> view
all containers have views, so no need to include container in the naming of a view.

@devinleighsmith
Copy link
Collaborator

@eddherrera approved, but please make requested frontend/backend route changes.

@@ -1,6 +1,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Security.Claims;
using DocumentFormat.OpenXml.Office2010.Excel;
Copy link
Collaborator

Choose a reason for hiding this comment

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

most likely this import can be safely removed...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I have no idea how this keeps getting included.


IEnumerable<PimsDispositionOffer> GetOffers(long dispositionFileId);

IEnumerable<PimsDispositionSale> GetSales(long dispositionFileId);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Agree with Devin that this should return a single instance of PimsDispositionSale (or null)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I am a little conflicted with this because the Entity Classes from the Scaffolding do not declare the relationship as such.

namespace Pims.Dal.Entities
{
/// <summary>
/// PimsDispositionFileProperty class, provides an entity for the datamodel to manage Disposition File's Sale.
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: PimsDispositionFileProperty -> PimsDispositionSale

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

updated

namespace Pims.Dal.Entities
{
/// <summary>
/// PimsDspPurchAgent class, provides an entity for the datamodel to manage the relationship between the Disposition Sale and the Purchaser Agent.
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: PimsDspPurchAgent -> PimsDspPurchSolicitor

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

updated

@eddherrera eddherrera merged commit 81d77b5 into bcgov:disposition Dec 21, 2023
1 check passed
@eddherrera eddherrera deleted the psp-7247 branch January 3, 2024 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants