refactor: notification

This commit is contained in:
thomas
2024-05-13 16:24:11 +02:00
parent fbb9e3eccf
commit 678dd77030
37 changed files with 41 additions and 41 deletions

View File

@@ -1,4 +1,4 @@
import { FakeBackendService } from '@angular-challenges/ngrx-notification/backend'; import { FakeBackendService } from '@angular-challenges/power-of-effect/backend';
import { APP_INITIALIZER, ApplicationConfig, inject } from '@angular/core'; import { APP_INITIALIZER, ApplicationConfig, inject } from '@angular/core';
import { provideAnimations } from '@angular/platform-browser/animations'; import { provideAnimations } from '@angular/platform-browser/animations';
import { provideRouter } from '@angular/router'; import { provideRouter } from '@angular/router';

View File

@@ -1,4 +1,4 @@
import { FakeBackendService } from '@angular-challenges/ngrx-notification/backend'; import { FakeBackendService } from '@angular-challenges/power-of-effect/backend';
import { inject, Injectable } from '@angular/core'; import { inject, Injectable } from '@angular/core';
import { take } from 'rxjs'; import { take } from 'rxjs';

View File

@@ -1,10 +1,10 @@
import { PushService } from '@angular-challenges/ngrx-notification/backend'; import { PushService } from '@angular-challenges/power-of-effect/backend';
import { import {
isSchool, isSchool,
isStudent, isStudent,
isTeacher, isTeacher,
Push, Push,
} from '@angular-challenges/ngrx-notification/model'; } from '@angular-challenges/power-of-effect/model';
import { inject, Injectable } from '@angular/core'; import { inject, Injectable } from '@angular/core';
import { Store } from '@ngrx/store'; import { Store } from '@ngrx/store';
import { filter } from 'rxjs'; import { filter } from 'rxjs';

View File

@@ -1,4 +1,4 @@
import { School } from '@angular-challenges/ngrx-notification/model'; import { School } from '@angular-challenges/power-of-effect/model';
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { import {
ComponentStore, ComponentStore,

View File

@@ -1,4 +1,4 @@
import { Student } from '@angular-challenges/ngrx-notification/model'; import { Student } from '@angular-challenges/power-of-effect/model';
import { createActionGroup, props } from '@ngrx/store'; import { createActionGroup, props } from '@ngrx/store';
export const studentActions = createActionGroup({ export const studentActions = createActionGroup({

View File

@@ -1,4 +1,4 @@
import { Student } from '@angular-challenges/ngrx-notification/model'; import { Student } from '@angular-challenges/power-of-effect/model';
import { createEntityAdapter, EntityAdapter, EntityState } from '@ngrx/entity'; import { createEntityAdapter, EntityAdapter, EntityState } from '@ngrx/entity';
import { createReducer, on } from '@ngrx/store'; import { createReducer, on } from '@ngrx/store';
import { studentActions } from './student.actions'; import { studentActions } from './student.actions';

View File

@@ -1,4 +1,4 @@
import { Teacher } from '@angular-challenges/ngrx-notification/model'; import { Teacher } from '@angular-challenges/power-of-effect/model';
import { createActionGroup, props } from '@ngrx/store'; import { createActionGroup, props } from '@ngrx/store';
export const teacherActions = createActionGroup({ export const teacherActions = createActionGroup({

View File

@@ -1,4 +1,4 @@
import { Teacher } from '@angular-challenges/ngrx-notification/model'; import { Teacher } from '@angular-challenges/power-of-effect/model';
import { createEntityAdapter, EntityAdapter, EntityState } from '@ngrx/entity'; import { createEntityAdapter, EntityAdapter, EntityState } from '@ngrx/entity';
import { createReducer, on } from '@ngrx/store'; import { createReducer, on } from '@ngrx/store';
import { teacherActions } from './teacher.actions'; import { teacherActions } from './teacher.actions';

View File

@@ -2,7 +2,7 @@
"extends": "./tsconfig.json", "extends": "./tsconfig.json",
"include": [ "include": [
"**/*.ts", "**/*.ts",
"../../../libs/ngrx-notification/backend/src/lib/fake-backend.service.ts" "../../../libs/power-of-effect/backend/src/lib/fake-backend.service.ts"
], ],
"compilerOptions": { "compilerOptions": {
"types": [] "types": []

View File

@@ -1,7 +0,0 @@
# ngrx-notification-backend
This library was generated with [Nx](https://nx.dev).
## Running unit tests
Run `nx test ngrx-notification-backend` to execute the unit tests.

View File

@@ -1,7 +0,0 @@
# ngrx-notification-model
This library was generated with [Nx](https://nx.dev).
## Running unit tests
Run `nx test ngrx-notification-model` to execute the unit tests.

View File

@@ -0,0 +1,7 @@
# power-of-effect-backend
This library was generated with [Nx](https://nx.dev).
## Running unit tests
Run `nx test power-of-effect-backend` to execute the unit tests.

View File

@@ -1,10 +1,10 @@
/* eslint-disable */ /* eslint-disable */
export default { export default {
displayName: 'ngrx-notification-model', displayName: 'power-of-effect-backend',
preset: '../../../jest.preset.js', preset: '../../../jest.preset.js',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'], setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
globals: {}, globals: {},
coverageDirectory: '../../../coverage/libs/ngrx-notification/model', coverageDirectory: '../../../coverage/libs/power-of-effect/backend',
transform: { transform: {
'^.+\\.(ts|mjs|js|html)$': [ '^.+\\.(ts|mjs|js|html)$': [
'jest-preset-angular', 'jest-preset-angular',

View File

@@ -1,15 +1,15 @@
{ {
"name": "ngrx-notification-model", "name": "power-of-effect-backend",
"$schema": "../../../node_modules/nx/schemas/project-schema.json", "$schema": "../../../node_modules/nx/schemas/project-schema.json",
"projectType": "library", "projectType": "library",
"sourceRoot": "libs/ngrx-notification/model/src", "sourceRoot": "libs/power-of-effect/backend/src",
"prefix": "lib", "prefix": "lib",
"targets": { "targets": {
"test": { "test": {
"executor": "@nx/jest:jest", "executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"options": { "options": {
"jestConfig": "libs/ngrx-notification/model/jest.config.ts" "jestConfig": "libs/power-of-effect/backend/jest.config.ts"
} }
}, },
"lint": { "lint": {

View File

@@ -2,7 +2,7 @@ import {
randSchool, randSchool,
randStudent, randStudent,
randTeacher, randTeacher,
} from '@angular-challenges/ngrx-notification/model'; } from '@angular-challenges/power-of-effect/model';
import { Injectable, inject } from '@angular/core'; import { Injectable, inject } from '@angular/core';
import { randCompanyName, randFirstName } from '@ngneat/falso'; import { randCompanyName, randFirstName } from '@ngneat/falso';
import { concatLatestFrom } from '@ngrx/effects'; import { concatLatestFrom } from '@ngrx/effects';

View File

@@ -2,7 +2,7 @@ import {
School, School,
Student, Student,
Teacher, Teacher,
} from '@angular-challenges/ngrx-notification/model'; } from '@angular-challenges/power-of-effect/model';
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { randNumber } from '@ngneat/falso'; import { randNumber } from '@ngneat/falso';
import { ComponentStore } from '@ngrx/component-store'; import { ComponentStore } from '@ngrx/component-store';

View File

@@ -1,4 +1,4 @@
import { Push } from '@angular-challenges/ngrx-notification/model'; import { Push } from '@angular-challenges/power-of-effect/model';
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { BehaviorSubject } from 'rxjs'; import { BehaviorSubject } from 'rxjs';

View File

@@ -0,0 +1,7 @@
# power-of-effect-model
This library was generated with [Nx](https://nx.dev).
## Running unit tests
Run `nx test power-of-effect-model` to execute the unit tests.

View File

@@ -1,10 +1,10 @@
/* eslint-disable */ /* eslint-disable */
export default { export default {
displayName: 'ngrx-notification-backend', displayName: 'power-of-effect-model',
preset: '../../../jest.preset.js', preset: '../../../jest.preset.js',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'], setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
globals: {}, globals: {},
coverageDirectory: '../../../coverage/libs/ngrx-notification/backend', coverageDirectory: '../../../coverage/libs/power-of-effect/model',
transform: { transform: {
'^.+\\.(ts|mjs|js|html)$': [ '^.+\\.(ts|mjs|js|html)$': [
'jest-preset-angular', 'jest-preset-angular',

View File

@@ -1,15 +1,15 @@
{ {
"name": "ngrx-notification-backend", "name": "power-of-effect-model",
"$schema": "../../../node_modules/nx/schemas/project-schema.json", "$schema": "../../../node_modules/nx/schemas/project-schema.json",
"projectType": "library", "projectType": "library",
"sourceRoot": "libs/ngrx-notification/backend/src", "sourceRoot": "libs/power-of-effect/model/src",
"prefix": "lib", "prefix": "lib",
"targets": { "targets": {
"test": { "test": {
"executor": "@nx/jest:jest", "executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"options": { "options": {
"jestConfig": "libs/ngrx-notification/backend/jest.config.ts" "jestConfig": "libs/power-of-effect/model/jest.config.ts"
} }
}, },
"lint": { "lint": {

View File

@@ -57,11 +57,11 @@
"@angular-challenges/module-to-standalone/user/shell": [ "@angular-challenges/module-to-standalone/user/shell": [
"libs/module-to-standalone/user/shell/src/index.ts" "libs/module-to-standalone/user/shell/src/index.ts"
], ],
"@angular-challenges/ngrx-notification/backend": [ "@angular-challenges/power-of-effect/backend": [
"libs/ngrx-notification/backend/src/index.ts" "libs/power-of-effect/backend/src/index.ts"
], ],
"@angular-challenges/ngrx-notification/model": [ "@angular-challenges/power-of-effect/model": [
"libs/ngrx-notification/model/src/index.ts" "libs/power-of-effect/model/src/index.ts"
], ],
"@angular-challenges/shared/directives": [ "@angular-challenges/shared/directives": [
"libs/shared/directives/src/index.ts" "libs/shared/directives/src/index.ts"