clients/libs/angular
Jared 7f895d62fe
[PM-34155] Enhance policy service with accepted policies retrieval and update sync response structure for new sync response (#20336)
* Enhance policy service with accepted policies retrieval and update sync response structure

- Added `acceptedPolicies$` method to `PolicyService` for fetching policies from organizations where the user has an Accepted membership status.
- Updated `DefaultPolicyService` to implement the new `acceptedPolicies$` method.
- Modified `DefaultSyncService` to handle a new `policiesNew` property in the sync response, ensuring backward compatibility with existing `policies`.
- Updated `SyncResponse` class to include the new `policiesNew` property and its mapping logic.

* Add DefaultNewPolicyService and integrate into MainBackground and ServiceContainer

- Introduced DefaultNewPolicyService for managing new policy formats.
- Updated MainBackground and ServiceContainer to include newPolicyService.
- Adjusted sync logic in DefaultSyncService to handle new policies.
- Refactored policy service abstractions to accommodate new policy management.
- Added tests for new policy service integration.

* Add unit tests for DefaultNewPolicyService and enhance policy handling in DefaultPolicyService

- Introduced comprehensive tests for DefaultNewPolicyService, covering upsert and replace functionalities.
- Added tests to ensure correct filtering of policies based on organization status in DefaultPolicyService.
- Enhanced policy synchronization logic in DefaultSyncService to handle new policies effectively.

* Refactor NewPolicyService initialization and remove organization dependency

- Updated the instantiation of DefaultNewPolicyService in both MainBackground and ServiceContainer to only require StateProvider.
- Removed organizationService dependency from DefaultNewPolicyService and its related tests, simplifying the service's interface.
- Cleaned up unused code and tests related to organization policies, ensuring the service focuses solely on state management.

* Adds use of InternalNewPolicyService to same places InternalPolicyService syncs

* Refactor server notifications tests to include InternalNewPolicyService mock and update sync service to handle empty policy sources correctly.

* Refactor server notifications tests to import InternalNewPolicyService and InternalPolicyService from their respective paths, improving code clarity and organization.

* Update MainBackground and ServiceContainer to use InternalNewPolicyService, enhancing consistency in policy service implementation across the application.
2026-05-04 11:11:01 -04:00
..
src [PM-34155] Enhance policy service with accepted policies retrieval and update sync response structure for new sync response (#20336) 2026-05-04 11:11:01 -04:00
jest.config.js Implement and extend tsconfig.base across projects (#14554) 2025-06-02 20:38:17 +00:00
package.json build: add nx configuration in libs/angular (#16539) 2025-09-23 14:20:34 -04:00
project.json build: add nx configuration in libs/angular (#16539) 2025-09-23 14:20:34 -04:00
test.setup.ts [PM-18599] Forbid unknown property and element in tests (#13556) 2025-02-25 14:02:19 -08:00
tsconfig.json Implement and extend tsconfig.base across projects (#14554) 2025-06-02 20:38:17 +00:00
tsconfig.spec.json [CL-525] Upgrade angular to v19 (#14815) 2025-06-02 13:13:31 -04:00