mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-07 15:25:41 +01:00
Cambios realizados:
1. ai-status.service.ts:
- Importa 'of' desde 'rxjs' para retornar Observables correctamente
- Corrige catchError que retornaba array [] en lugar de Observable
- Ahora retorna of({...}) con valores por defecto cuando falla el endpoint
- Estadísticas ahora muestran 0 en lugar de valores mock cuando hay error
2. ai-suggestions-panel.component.ts:
- Importa 'of' y 'catchError' desde 'rxjs/operators'
- Agrega catchError a TODAS las llamadas de servicios (tags, correspondents, etc.)
- Cada llamada ahora maneja errores y retorna array vacío en caso de fallo
- Previene que errores de red rompan la funcionalidad del panel
- Agrega logging de errores para debugging
Estos cambios corrigen:
- ✓ Estadísticas mostrando 0 incorrectamente
- ✓ Errores no manejados en llamadas HTTP
- ✓ Fallos al cargar metadata de sugerencias
- ✓ Panel de sugerencias fallando silenciosamente
|
||
|---|---|---|
| .. | ||
| __mocks__ | ||
| e2e | ||
| src | ||
| .editorconfig | ||
| .eslintrc.json | ||
| .gitignore | ||
| .npmrc | ||
| angular.json | ||
| extra-webpack.config.ts | ||
| jest.config.js | ||
| messages.xlf | ||
| package-lock.json | ||
| package.json | ||
| playwright.config.ts | ||
| pnpm-lock.yaml | ||
| README.md | ||
| setup-jest.ts | ||
| tsconfig.app.json | ||
| tsconfig.json | ||
| tsconfig.spec.json | ||
PaperlessUi
This project was generated with Angular CLI version 10.1.5.
Development server
Run ng serve for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.
Code scaffolding
Run ng generate component component-name to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module.
Build
Run ng build to build the project. The build artifacts will be stored in the dist/ directory. Use the --configuration production flag for a production build.
Running unit tests
Run ng test to execute the unit tests via Karma.
Running end-to-end tests
Run ng e2e to execute the end-to-end tests via Protractor.
Further help
To get more help on the Angular CLI use ng help or go check out the Angular CLI README.