feat: add edit holiday component (#783)

Fixes: #750
This commit is contained in:
Benura Abeywardena
2020-07-12 16:12:11 +05:30
committed by GitHub
parent d56f950b53
commit 1c820d4467
9 changed files with 298 additions and 2 deletions
@@ -477,6 +477,24 @@ export class OrganizationService {
return this.http.get(`/holidays/${holidayId}`);
}
/**
* Get Holiday template.
* @returns {Observable<any>} Holiday data.
*/
getHolidayTemplate(): Observable<any> {
return this.http.get('/holidays/template');
}
/**
* Update Holiday.
* @param holidayId Holiday Id to be updated.
* @param holidayData Holiday data to be updated.
* @returns {Observable<any>}
*/
updateHoliday(holidayId: any, holidayData: any): Observable<any> {
return this.http.put(`/holidays/${holidayId}`, holidayData);
}
/**
* Delete Holiday.
* @param holidayId Holiday Id to be deleted.