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

17708 - Fixing NEW label status displaying in every page #2600

Merged

Conversation

rodrigo-barraza
Copy link
Collaborator

*Issue #:17708 *
bcgov/entity#17708

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the sbc-auth license (Apache 2.0).

@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
5.9% 5.9% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@@ -249,6 +249,12 @@ export default defineComponent({
pageLimit: itemsPerPage
}
const getStatementsListResponse = await getStatementsList(filterParams)

if ((pageNumber === 1 || !pageNumber) && getStatementsListResponse?.items?.length > 0) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Instead of setting the highest ID of the current list as new, we now check to see if the current page we're on in statements is the first (1), or if it has no number at all, before we set the property isNew to the newest statement with the highest ID. This to ensure that when the user switches between pages, that the new label displays as the data loaded, rather than before.

@rodrigo-barraza rodrigo-barraza changed the title Bugfix/17708 new status label fix 17708 - Fixing NEW label status displaying in every page Oct 13, 2023
@seeker25 seeker25 merged commit 1ab78c2 into bcgov:main Oct 13, 2023
AbrahamRostampoor pushed a commit to AbrahamRostampoor/sbc-auth that referenced this pull request Oct 17, 2023
* Refactoring how statement is determined as new

* Updating package version
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.

2 participants