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.

@jcalarcon98 jcalarcon98 requested a review from EdansRocks August 23, 2021 15:43
@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

@codecov
Copy link

codecov bot commented Aug 23, 2021

Codecov Report

Merging #734 (23e3a46) into master (9a68415) will increase coverage by 0.13%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #734      +/-   ##
==========================================
+ Coverage   95.24%   95.37%   +0.13%     
==========================================
  Files         106      107       +1     
  Lines        2206     2269      +63     
  Branches      169      173       +4     
==========================================
+ Hits         2101     2164      +63     
  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%) ⬆️
...dules/time-entries/pages/time-entries.component.ts 88.11% <100.00%> (+0.11%) ⬆️
...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 6cad459...23e3a46. Read the comment docs.

@jcalarcon98 jcalarcon98 merged commit ea8ed92 into master Aug 23, 2021
@jcalarcon98 jcalarcon98 deleted the TT-314-synchronize-local-storage-projects branch August 23, 2021 15:47
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.

3 participants