- Current Account module with full CRUD, transactions, charges, hold/release, block/unblock - Current Products management under Products module - DIP mobile number verification with real API call to /lookup/check - Sanctions verification dialog - Charges support for Current Account (chargeAppliesTo=5) in create/edit - Fixed permissions from SAVINGSACCOUNT to CURRENTACCOUNT across all current account components - Added all missing translation keys for Current Account in en-US.json Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
53 lines
1.4 KiB
TypeScript
53 lines
1.4 KiB
TypeScript
/**
|
|
* Copyright since 2025 Mifos Initiative
|
|
*
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
*/
|
|
|
|
import { Injectable, inject } from '@angular/core';
|
|
import { HttpClient, HttpParams } from '@angular/common/http';
|
|
import { Observable } from 'rxjs';
|
|
import { environment } from 'environments/environment';
|
|
|
|
export interface OpenProjectWorkPackage {
|
|
id: number;
|
|
subject: string;
|
|
description?: string;
|
|
status: string;
|
|
type: string;
|
|
priority: string;
|
|
assignee?: string;
|
|
project: string;
|
|
createdAt: string;
|
|
updatedAt: string;
|
|
dueDate?: string;
|
|
percentageDone?: number;
|
|
openProjectUrl?: string;
|
|
}
|
|
|
|
@Injectable({
|
|
providedIn: 'root'
|
|
})
|
|
export class OpenProjectService {
|
|
private http = inject(HttpClient);
|
|
|
|
get isEnabled(): boolean {
|
|
return environment.openProjectEnabled;
|
|
}
|
|
|
|
getWorkPackages(pageSize = 50, offset = 1): Observable<OpenProjectWorkPackage[]> {
|
|
let params = new HttpParams().set('pageSize', pageSize).set('offset', offset);
|
|
return this.http.get<OpenProjectWorkPackage[]>('/openproject/work-packages', { params });
|
|
}
|
|
|
|
getWorkPackageById(id: number): Observable<OpenProjectWorkPackage> {
|
|
return this.http.get<OpenProjectWorkPackage>(`/openproject/work-packages/${id}`);
|
|
}
|
|
|
|
triggerSync(): Observable<any> {
|
|
return this.http.post('/openproject/sync', {});
|
|
}
|
|
}
|