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-7598 | Properties list view filter by ownership #3781

Merged
merged 7 commits into from
Feb 9, 2024

Conversation

FuriousLlama
Copy link
Collaborator

image

@FuriousLlama FuriousLlama added the enhancement New feature or request label Feb 9, 2024
@FuriousLlama FuriousLlama self-assigned this Feb 9, 2024
Copy link
Contributor

github-actions bot commented Feb 9, 2024

✅ No secrets were detected in the code.

1 similar comment
Copy link
Contributor

github-actions bot commented Feb 9, 2024

✅ No secrets were detected in the code.

@devinleighsmith
Copy link
Collaborator

@FuriousLlama backend build failing, frontend tests failing.

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 a little nervous about these map deletions since mapping errors only show up at runtime. Since this is a release sprint, are you 100% confident these deletions are safe?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, given that the model it was mapping was deleted I have confidence it was not being used anywhere else, and therefore, not mapped

{
if (tempSort[i].StartsWith("Location"))
{
tempSort[i] = tempSort[i].Replace("Location", "Address.MunicipalityName");
Copy link
Collaborator

Choose a reason for hiding this comment

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

I can't check the story, but are we sure location maps to municipality (I know we also have a general location field in the db)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes, that is mapped on the frontend columns.

image

{
// The order will affect the display in the frontend. For now in alphabetical order.
// i.e. [Core Inventory, Disposed, Other Interest, Property of Interest]
var direction = this.Sort[i].Split(' ')[1];
Copy link
Collaborator

Choose a reason for hiding this comment

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

is this safe (ie. we always have a direction of asc or desc)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes, the sort expects a direction to be able to be process later

@@ -2,6 +2,7 @@
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
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.

I get this sometimes too, but I'm pretty sure this is not needed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

weird, i've cleansed up other instances of it.

if (orderExpression != null)
{
var genericMethod = OrderByMethod.MakeGenericMethod(typeof(T), rType);
var genericMethod = orderMethod.MakeGenericMethod(typeof(T), rType);
Copy link
Collaborator

Choose a reason for hiding this comment

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

oh right, I forgot about this generic sort implementation we have.

@@ -27,4 +29,5 @@ export const defaultPropertyFilter: IPropertyFilter = {
longitude: '',
page: undefined,
quantity: undefined,
ownership: 'isCoreInventory,isPropertyOfInterest,isOtherInterest',
Copy link
Collaborator

Choose a reason for hiding this comment

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

isDisposed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not part of the default set, per the story definition.


const [pageSize, setPageSize] = useState(10);
const [pageIndex, setPageIndex] = useState(0);
const [pageCount, setPageCount] = useState(0);
const [totalItems, setTotalItems] = useState(0);
const [sort, setSort] = useState<TableSort<IProperty>>({});
const [sort, setSort] = useState<TableSort<any>>({});
Copy link
Collaborator

@devinleighsmith devinleighsmith Feb 9, 2024

Choose a reason for hiding this comment

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

are they <any> 's in this file intentional?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yeah I was matching the other definitions. I made it Api_Property instead

@devinleighsmith
Copy link
Collaborator

Finished code review, but will hold off on approval until I can actually run the code.

Copy link
Contributor

github-actions bot commented Feb 9, 2024

✅ No secrets were detected in the code.

Copy link

codecov bot commented Feb 9, 2024

Codecov Report

Attention: 31 lines in your changes are missing coverage. Please review.

Comparison is base (b19f2f8) 75.75% compared to head (58d9274) 75.69%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##              dev    #3781      +/-   ##
==========================================
- Coverage   75.75%   75.69%   -0.06%     
==========================================
  Files        1448     1446       -2     
  Lines       38076    38080       +4     
  Branches     7136     7154      +18     
==========================================
- Hits        28844    28826      -18     
- Misses       8949     8967      +18     
- Partials      283      287       +4     
Flag Coverage Δ
unittests 75.69% <69.90%> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...api/Areas/Property/Controllers/SearchController.cs 59.25% <100.00%> (ø)
.../apimodels/Models/Concepts/Property/PropertyMap.cs 100.00% <100.00%> (ø)
source/backend/dal/Models/PropertyFilter.cs 100.00% <100.00%> (ø)
source/backend/dal/Repositories/LeaseRepository.cs 97.67% <100.00%> (ø)
...urce/backend/dal/Repositories/ProjectRepository.cs 97.19% <ø> (ø)
...rce/backend/dal/Repositories/PropertyRepository.cs 91.84% <100.00%> (ø)
source/backend/dal/Repositories/UserRepository.cs 78.48% <100.00%> (ø)
...es/shared/propertyPicker/LeasePropertySelector.tsx 36.04% <100.00%> (ø)
.../src/features/properties/filter/IPropertyFilter.ts 100.00% <ø> (ø)
.../src/features/properties/filter/PropertyFilter.tsx 52.54% <ø> (ø)
... and 11 more

... and 1 file with indirect coverage changes

Copy link
Collaborator

@devinleighsmith devinleighsmith left a comment

Choose a reason for hiding this comment

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

approving based on checking out the PR, please see comments.

Copy link
Contributor

github-actions bot commented Feb 9, 2024

✅ No secrets were detected in the code.

Copy link
Contributor

github-actions bot commented Feb 9, 2024

✅ No secrets were detected in the code.

1 similar comment
Copy link
Contributor

github-actions bot commented Feb 9, 2024

✅ No secrets were detected in the code.

@FuriousLlama FuriousLlama merged commit 764200f into bcgov:dev Feb 9, 2024
9 checks passed
@FuriousLlama FuriousLlama deleted the features/psp-7598 branch May 23, 2024 18:36
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.

2 participants