feat: client signature actions (#1120)

Fixes: #1119
This commit is contained in:
Karan Takalkar
2020-07-16 17:08:22 +05:30
committed by GitHub
parent d7f33a97b2
commit 9e859afe09
16 changed files with 325 additions and 5 deletions
+12
View File
@@ -151,6 +151,18 @@ export class ClientsService {
return this.http.skipErrorHandler().get(`/clients/${clientId}/images`, { params: httpParams, responseType: 'text' });
}
uploadClientSignature(clientId: string, signature: File) {
const formData = new FormData();
formData.append('file', signature);
formData.append('filename', signature.name);
return this.http.post(`/clients/${clientId}/images`, formData);
}
getClientSignatureImage(clientId: string, documentId: string) {
const httpParams = new HttpParams().set('tenantIdentifier', 'default');
return this.http.get(`/clients/${clientId}/documents/${documentId}/attachment`, { params: httpParams, responseType: 'blob' });
}
getClientFamilyMembers(clientId: string) {
return this.http.get(`/clients/${clientId}/familymembers`);
}