feat(client): edit address form (#146)

* feat(client): edit address form
This commit is contained in:
Anwesh Nayak
2018-07-24 20:33:26 +05:30
committed by GitHub
parent 4f095b76cf
commit 11f277b6bc
11 changed files with 329 additions and 10 deletions
+42
View File
@@ -183,6 +183,28 @@ export class ClientsService {
);
}
putClientAddress(clientId: number, body: any, type: any) {
const headers = new Headers(); // tslint:disable-line
const params = new URLSearchParams(); // tslint:disable-line
params.set('type', type);
this.createAuthorizationHeader(headers);
// body = JSON.stringify(body);
const options = new RequestOptions({ // tslint:disable-line
headers: headers,
params: params,
});
return this.http.put('https://demo.openmf.org/fineract-provider/api/v1/client/' + clientId +
'/addresses?' + 'tenantIdentifier=default', body,
options)
.pipe(
map(
(response: Response) => { // tslint:disable-line
response.json();
}
)
);
}
getClientIdentifierTemplate(clientId: number) {
const headers = new Headers(); // tslint:disable-line
this.createAuthorizationHeader(headers);
@@ -301,5 +323,25 @@ export class ClientsService {
)
);
}
downloadClientDocuments(clientId: number, documentId: number) {
const headers = new Headers(); // tslint:disable-line
this.createAuthorizationHeader(headers);
return this.http.get('https://demo.openmf.org/fineract-provider/api/v1/clients/' + clientId +
'/documents/' + documentId + '/attachment/?tenantIdentifier=default', {
headers: headers
})
.pipe(
map(
(response: Response) => { // tslint:disable-line
return response.json();
}
)
);
}
}