Skip to content

Conversation

jcalarcon98
Copy link
Contributor

Description

Currently there is the functionality to store recent projects in the LocalStorage, this feature works correctly, however, it does not keep an update with the data that exists on the server, that is, if a project/customer is deactivated and if the person had it saved in the LocalStorage of his browser, he will still have it available and will be able to mark entries with that project, even though the project/customer has already been deactivated.

Solution

With this PR a synchronization is established between the user's projects in the LocalStorage and the projects returned by the server. For example, if the user has a project in the LocalStorage that has been disabled, it will be removed since it does not exist in the server.

@codecov
Copy link

codecov bot commented Aug 18, 2021

Codecov Report

Merging #729 (dc84461) into master (9a68415) will increase coverage by 0.13%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #729      +/-   ##
==========================================
+ Coverage   95.24%   95.37%   +0.13%     
==========================================
  Files         106      107       +1     
  Lines        2206     2268      +62     
  Branches      169      173       +4     
==========================================
+ Hits         2101     2163      +62     
  Misses         61       61              
  Partials       44       44              
Impacted Files Coverage Δ
...ponents/details-fields/details-fields.component.ts 96.29% <100.00%> (+0.05%) ⬆️
...c/app/modules/shared/utils/project-storage.util.ts 100.00% <100.00%> (ø)
...project-list-hover/project-list-hover.component.ts 90.74% <100.00%> (+0.35%) ⬆️
...sers/components/users-list/users-list.component.ts 100.00% <100.00%> (ø)
src/app/modules/users/store/user.actions.ts 100.00% <100.00%> (ø)
src/app/modules/users/store/user.effects.ts 100.00% <100.00%> (ø)
src/app/modules/users/store/user.reducers.ts 96.55% <100.00%> (+1.81%) ⬆️
src/environments/environment.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6fe13c1...dc84461. Read the comment docs.

@jcalarcon98 jcalarcon98 force-pushed the TT-314-local-storage-to-projects branch from 69e76f4 to f8eaa4c Compare August 19, 2021 18:30
@jcalarcon98 jcalarcon98 requested a review from ridouku August 19, 2021 18:31
@jcalarcon98 jcalarcon98 force-pushed the TT-314-local-storage-to-projects branch from 144166e to dc84461 Compare August 21, 2021 02:40
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

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
0.0% 0.0% Duplication

@jcalarcon98 jcalarcon98 merged commit 24aa000 into master Aug 21, 2021
@jcalarcon98 jcalarcon98 deleted the TT-314-local-storage-to-projects branch August 21, 2021 02:46
@JosueOb
Copy link
Collaborator

JosueOb commented Aug 21, 2021

I reviewed the changes you made and tested them in the development environment with test data, using the script to generate test data in the local database. Test entries were generated and some projects were disabled. As a result, the projects were no longer presented in the Time Clock and Add new entry forms and removed from local storage. Very good job @jcalarcon98.

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.

4 participants