Skip to content

Ramsundar Update current week only on own page#3742

Closed
Ram-blip wants to merge 1 commit into
developmentfrom
Ramsundar-Update-current-week-only-on-own-page
Closed

Ramsundar Update current week only on own page#3742
Ram-blip wants to merge 1 commit into
developmentfrom
Ramsundar-Update-current-week-only-on-own-page

Conversation

@Ram-blip
Copy link
Copy Markdown
Contributor

Description

Screenshot 2025-07-11 at 11 30 30 PM Screenshot 2025-07-11 at 11 30 40 PM

Video Link: https://www.loom.com/share/5e27c7b0b61144d68c433044c7e97350?sid=60bac4c4-4432-4fd9-84c6-cd1a9447df30

Related PRS (if any):

This frontend PR is related to the latest Development backend branch.

Main changes explained:

Issue:
You're on User B's timelog page, but when you log time:

  • Your timer data temporarily appears in User B's timelog entries
  • User B's "Current Week" shows your logged time (ex: 0.53hrs) instead of their time
  • Refresh fixes it because it reloads the correct data from the server

Fixes:

  • Added a check to ensure time entries are only re-fetched if the personId of the entry matches the currently displayed user ID.
  • If the logged entry belongs to a different user than the one currently being viewed, the function exits early and skips dispatching any updates to the timeEntries slice.
  • By blocking the Redux state update for unrelated users, we prevent User A’s time data from being shown in User B’s UI when User A logs time.

How to test:

  1. check into current branch
  2. do npm install and ... to run this PR locally
  3. Clear site data/cache
  4. log as admin user
  5. go to dashboard
  6. Start timer -> Click any other teammate timelog
  7. In another teammate's timelog, log your time and check if your own "Current Week" is showing there.

Screenshots or videos of changes:

video1011269524.mp4

Note:

Include the information the reviewers need to know.

@netlify
Copy link
Copy Markdown

netlify Bot commented Jul 12, 2025

Deploy Preview for highestgoodnetwork-dev ready!

Name Link
🔨 Latest commit c662b2d
🔍 Latest deploy log https://app.netlify.com/projects/highestgoodnetwork-dev/deploys/687202daebd8d80008f5973d
😎 Deploy Preview https://deploy-preview-3742--highestgoodnetwork-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@one-community one-community added the High Priority - Please Review First This is an important PR we'd like to get merged as soon as possible label Aug 28, 2025
@akshith312
Copy link
Copy Markdown
Contributor

Checked out with current branch.
Ran npm install and shows version not compatible. Present development branch is in Node 20.
Attaching Screenshot for your reference.

image

Copy link
Copy Markdown
Contributor

@sourabhbagde sourabhbagde left a comment

Choose a reason for hiding this comment

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

Attempted to test the PR branch but was blocked during install due to Node version mismatch. The branch enforces Node 14, while development branch has node 20+

PR 3742 node

Copy link
Copy Markdown
Contributor

@vishnu-ing vishnu-ing left a comment

Choose a reason for hiding this comment

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

Please update the node version in package to v20, unable to build due to version mismatch.

image

Copy link
Copy Markdown
Contributor

@SreePujitha01 SreePujitha01 left a comment

Choose a reason for hiding this comment

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

Ran npm install but faced compatibility issues since the package requires Node 14 while the development branch is running on Node 20.

image

Copy link
Copy Markdown

@khan-zoha khan-zoha left a comment

Choose a reason for hiding this comment

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

Reviewed PR #3742. The node version needs to be updated to 20+. Got the following error.
PR#3742

Copy link
Copy Markdown

@munishpatel munishpatel left a comment

Choose a reason for hiding this comment

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

Reviewed testing the PR branch but was blocked during install due to Node version mismatch. The branch enforces Node 14, while development branch has node 20+:
Screenshot 2025-09-06 at 8 01 56 PM

Copy link
Copy Markdown
Contributor

@RitzzzZ2021 RitzzzZ2021 left a comment

Choose a reason for hiding this comment

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

Ran npm install but faced compatibility issues since the package requires Node 14 while the development branch is running on Node 20.

image

Copy link
Copy Markdown
Contributor

@Aditya-gam Aditya-gam left a comment

Choose a reason for hiding this comment

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

  • When I run npm install to install the repository, this is the error I get:
    InstallError

    • What I found was that this branch requires React ^16.14.0 (React 16)
    • @react-leaflet/core@1.0.2 requires: React ^17.0.1 (React 17+)
    • The conflict: @react-leaflet/core@1.0.2 has peer dependencies that require React 17+, but branch is locked to React 16.
  • I tried installing node 17 using nvm install 17 and installing using npm install --legacy-peer-deps, but it throws an unsupported engine error.
    UnsupportedEngine

  • Even npm install --legacy-peer-deps --force throws an error.
    NPMForceInstallError

  • Please provide a fix for this.

Copy link
Copy Markdown

@laynet laynet left a comment

Choose a reason for hiding this comment

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

I had the same error as everyone else, node version incompatibility after running npm install.
PR 3742 npm error

Copy link
Copy Markdown
Contributor

@MeronTeweldebrhan MeronTeweldebrhan left a comment

Choose a reason for hiding this comment

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

PR Review Feedback

Testing Outcome

⚠️ Encountered a build issue when running locally:

'react-scripts' is not recognized as an internal or external command,
operable program or batch file.

npm ERR! notsup Required: {"node": ">=14.0.0 <15"}
npm ERR! notsup Actual: {"npm": "10.9.3", "node": "v22.19.0"}

Screenshot 2025-09-26 091541

@dunstanad
Copy link
Copy Markdown

Unable to run the code because of Node version mismatch.
error

Copy link
Copy Markdown

@ShradhaMBhadrannavar ShradhaMBhadrannavar left a comment

Choose a reason for hiding this comment

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

I tried installing dependencies to test this PR, but encountered a dependency conflict error between react@16.14.0 and @react-leaflet/core@1.0.2, which requires React 17+.
The error prevents running the app locally (npm install fails with ERESOLVE unable to resolve dependency tree). Screenshot attached for reference.
Could you please confirm the compatible React version or update the dependency configuration so that it can be installed successfully?
Screenshot 2025-10-04 at 18 16 35

@sanjeev29
Copy link
Copy Markdown
Contributor

Tested the changes locally on Chrome browser. The changes work as shown in the video above.
Screenshot 2025-10-09 at 5 50 21 PM
Screenshot 2025-10-09 at 5 51 06 PM

Copy link
Copy Markdown
Contributor

@sumedhkumar96 sumedhkumar96 left a comment

Choose a reason for hiding this comment

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

Tested the changes by running the frontend changes locally. The admin account is able to see the current week's updates of the candidates.

Screenshot 2025-10-17 235310

@tomkkl
Copy link
Copy Markdown

tomkkl commented Oct 26, 2025

Hello,
Unable to compile due to node version mismatch

Screenshot 2025-10-25 at 10 07 54 PM

@Vinay944924
Copy link
Copy Markdown
Contributor

Hi Rmasundar,
I attempted to test the PR locally but the node version is 14 where as the actual node version is running >20. So please check that. I have provided the screenshot below.
Screenshot 2025-10-31 at 2 16 44 PM

@Sriamshreddy000
Copy link
Copy Markdown
Contributor

Hey Ramsundar,
I tried running the npm install command, but it seems there’s a compatibility error. Could you please check and confirm if the dependencies are aligned with the current setup?

I am attaching a screenshot below for reference
Screenshot 2025-11-06 at 7 17 38 PM

Copy link
Copy Markdown

@Anusha-Gali Anusha-Gali left a comment

Choose a reason for hiding this comment

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

Hi Ramsundar

I have tested this PR locally - and the code is not running due to the error in the node version. The dev is on version 20+ whereas your code has "node": ">=14.0.0 <15" in the package.json which could be causing this clash. Kindly update it.
Screenshot 2025-11-08 at 12 31 42 AM

@ManeeshBuddha21
Copy link
Copy Markdown

Tried running this PR locally but got a node-sass build error during npm install. Looks like a node-gyp/python distutils issue. Please advise if a specific Node version or dependency update is needed.

31

Copy link
Copy Markdown

@Raghu04122002 Raghu04122002 left a comment

Choose a reason for hiding this comment

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

Reviewed the PR#3742. The changes you have made are working as expected. The user is able to log his time while present on other users timelog

PR3742.mp4

Copy link
Copy Markdown

@debadyuti23 debadyuti23 left a comment

Choose a reason for hiding this comment

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

Hi @Ram-blip while testing your PR I have encountered the same issue as other reviewers mentioned.
npm error engine Not compatible with your version of node/npm: hgnreactapp@0.1.0 npm error notsup Not compatible with your version of node/npm: hgnreactapp@0.1.0 npm error notsup Required: {"node":">=14.0.0 <15"} npm error notsup Actual: {"npm":"10.8.2","node":"v20.19.6"}"
while I tried to install node 14.21.3 it does not integrate with the current backend whose screenshot I have attached.
image
I would recommend to sync the current development branch changes with your branch accordingly. Also left couple of NIT comments.

};
};


Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Not needed

};
};


Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Please do not include comments

Copy link
Copy Markdown

@VijayAnirudh VijayAnirudh left a comment

Choose a reason for hiding this comment

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

image

There's a version mismatch. Please resolve the version or let me know if you want to bypass the error and test it.

@SwathiAngadi
Copy link
Copy Markdown
Contributor

Hi Ramsundar,
Checked to current branch. Ran npm run start:local found 'react-scripts' is not recognized as an internal or external command. While trying to run npm install found node version mismatch. Could not test the PR.
Screenshot 2025-12-09 170219

Copy link
Copy Markdown

@rohanrastogi311 rohanrastogi311 left a comment

Choose a reason for hiding this comment

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

Hi Ramsundar,

It appears you're using an out-dated Node version which is causing errors with launch. Please check you're on 20.

PR 3742 Screenshot

@abhinav-TB
Copy link
Copy Markdown
Member

Hi Ramsundar, I have reviewed your PR but when trying to install the dependecies it requires a lower version of nodejs which is different from the current standard which is v20.
image

Copy link
Copy Markdown
Contributor

@Shravan-neelamsetty Shravan-neelamsetty left a comment

Choose a reason for hiding this comment

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

Hi Ramsundar, I attempted to test this PR locally but encountered a Node version compatibility issue. When running npm install, I received the error: npm error notsup Required: {"node":">=14.0.0 <15"} while my system is running Node v20.19.6, which matches the development branch requirements. This version mismatch prevents the installation from completing, making it impossible to test the changes locally.

Screenshot 2026-01-09 at 4 56 45 AM

Copy link
Copy Markdown

@Vikas-8055 Vikas-8055 left a comment

Choose a reason for hiding this comment

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

Hey Kanishk, I attempted to test this PR locally but encountered a Node version compatibility issue during npm install. The package.json specifies Node ">=14.0.0 <15" while the project runs on v20.19.6. Could you please update the Node version requirements to align with the current setup?

Screenshot 2026-01-10 at 12 25 48 AM

Copy link
Copy Markdown

@Ganesh112001 Ganesh112001 left a comment

Choose a reason for hiding this comment

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

I attempted to test PR #3742, which updates the "Current Week" display to only show on a user's own page and prevent data from appearing on other users' timelogs. However, I encountered multiple dependency and compatibility issues that prevented testing. The PR branch uses outdated dependencies requiring Node.js versions 14-18, but the current development environment runs Node v20. After switching to Node 18, installation still failed due to missing react-scripts and incompatible package-lock.json files created with older npm versions. The old dependencies and engine version conflicts make this PR untestable without significant environment reconfiguration. Recommend updating the PR dependencies to be compatible with current Node.js versions or testing in an environment matching the original development setup from July 2025.

Screenshot 2026-01-17 at 6 33 13 AM

@saitejakaasoju
Copy link
Copy Markdown
Contributor

Hey Kanishk, I tried testing this PR locally, but ran into a Node version compatibility issue during npm install. The current package.json enforces Node >=14.0.0 <15, while the project setup appears to be using Node v20.x. Because of this mismatch, I wasn’t able to run the changes locally.
PR-3742

@maithili20
Copy link
Copy Markdown
Contributor

Hi @Ram-blip
I tried rewviewing th changes you made in this PR. Seems like there is a version mismatch. Let me know what needs to be done.
image

// const updateTimeEntries = (timeEntry, oldDateOfWork) => {
// const startOfWeek = moment().startOf('week');

// return async dispatch => {
Copy link
Copy Markdown

@naznin07 naznin07 Mar 7, 2026

Choose a reason for hiding this comment

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

Redundant nested async.

PR # 3742

@ManojPuttaswamy
Copy link
Copy Markdown
Contributor

Unable to review because of the node version mismatch. Required node version 14.x.x

Screenshot 2026-03-12 at 7 17 14 PM

Comment on lines +253 to +255
if (timeEntry.personId !== currentlyViewedUserId) {
return; // Don't update Redux if viewing a different user's page
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Tested the current week refresh flow, this might be trying to prevent another user’s page from being updated, but it is checking state.userProfile._id here instead of using the same viewed-user source that is used when the time entry is submitted. This could be checked if the refresh condition is reading the wrong user id, because during profile switching or timer-based submissions the page that just logged time may not refresh correctly.

Copy link
Copy Markdown

@rajanidi1999 rajanidi1999 left a comment

Choose a reason for hiding this comment

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

Hi,
I have tested your PR node js should be updated.
image

Copy link
Copy Markdown
Contributor

@rithika-paii rithika-paii left a comment

Choose a reason for hiding this comment

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

Hi Ramsundar,
I reviewed this PR#3742 by checking out the branch and attempting to run the frontend locally. However, I encountered a setup issue during dependency installation.

The project specifies a Node.js engine requirement of >=14.0.0 <15, while the current development environment uses Node.js v20.x. Because of this mismatch, npm install fails with an EBADENGINE error and the application cannot be started locally.

Image

Copy link
Copy Markdown

@HemanthNidamanuru HemanthNidamanuru left a comment

Choose a reason for hiding this comment

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

Hi Ramsundar,

The code is not running locally due to a Node version mismatch. The dev environment uses version 20+ but package.json has "node": ">=14.0.0 <15". Please update it.

Image

@one-community
Copy link
Copy Markdown
Member

Redone with this PR: #5245

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

High Priority - Please Review First This is an important PR we'd like to get merged as soon as possible

Projects

None yet

Development

Successfully merging this pull request may close these issues.