Files
psp_panel/src/app/core/services/fake-api.service.ts
T
ahasani 07fec02ea1 feat: add logo image and RTL support styles
- Added logo image to assets.
- Implemented RTL support styles in rtlSupport.scss for various components including breadcrumb, datatable, and tree node toggle button.

chore: configure environment files for production, staging, and development

- Created environment.prod.ts for production settings.
- Created environment.staging.ts for staging settings.
- Created environment.ts for local development settings.

feat: define custom theme preset

- Added presets.ts to define a custom theme preset using PrimeUIX with specific component styles and semantic colors.

chore: set up proxy configuration for local development
2025-12-04 21:07:18 +03:30

28 lines
652 B
TypeScript

import { Injectable } from '@angular/core';
import { Observable, of, throwError } from 'rxjs';
import { delay } from 'rxjs/operators';
@Injectable({ providedIn: 'root' })
export class FakeApiService {
/**
* Simulate a GET request
*/
get<T>(data: T, ms: number = 500): Observable<T> {
return of(data).pipe(delay(ms));
}
/**
* Simulate a POST request
*/
post<T>(data: T, ms: number = 500): Observable<T> {
return of(data).pipe(delay(ms));
}
/**
* Simulate an error response
*/
error<T>(message: string, ms: number = 500): Observable<T> {
return throwError(() => new Error(message)).pipe(delay(ms));
}
}