/** * @api {put} /employee/:id/timesheet 15.Update Timesheet * @apiName updateTimesheet * @apiGroup Time * @apiVersion 0.1.0 * @apiUse AdminDescription * * @apiParam {Date} startDate Timesheet start date. * @apiParam {Number} id Employee id. * @apiParam {String} state Timesheet status (NOT SUBMITTED,SUBMITTED,APPROVED,REJECTED). * @apiParam {String} comment Comment when changing the timesheet status. * @apiParam {Number} projectId Project id. * @apiParam {Number} activityId Activity id. * @apiParam {Number} TimesheetItemId0 First timesheet item value should be timesheet item ID. * @apiParam {Time} 0 First timesheet item duration. * @apiParam {Number} TimesheetItemId1 Second timesheet item value should be timesheet item ID. * @apiParam {Time} 1 Second timesheet item duration. * @apiParam {Number} TimesheetItemId2 Third timesheet item value should be timesheet item ID. * @apiParam {Time} 2 Third timesheet item duration. * @apiParam {Number} TimesheetItemId3 4th timesheet item value should be timesheet item ID. * @apiParam {Time} 3 4th timesheet item duration. * @apiParam {Number} TimesheetItemId4 5th timesheet item value should be timesheet item ID. * @apiParam {Time} 4 5th timesheet item duration. * @apiParam {Number} TimesheetItemId5 6th timesheet item value should be timesheet item ID. * @apiParam {Time} 5 6th timesheet item duration. * @apiParam {Number} TimesheetItemId6 7th timesheet item value should be timesheet item ID. * @apiParam {Time} 6 7th timesheet item duration. * *@apiDescription NOTE data should be row Json and should be formatted as following given example,Sample Data Input Timesheet items TimesheetItemId0-TimesheetItemId6 should be presented and values should be given as [0 -6] in time format ex 8:00 ( duration ),To add a new row project id and activity id needed and timesheet item values should be empty ("").. * * @apiParamExample: * { * "startDate":"2017-06-26", * "state":"INITIAL", * "comment":"Initial update", * "timeSheetItems":[ * { * "projectId":"1", * "projectActivityId":"1", * "0":"4:00", * "TimesheetItemId0":"1", * "1":"4:00", * "TimesheetItemId1":"2", * "2":"5:00", * "TimesheetItemId2":"3", * "3":"5:00", * "TimesheetItemId3":"4", * "4":"5:00", * "TimesheetItemId4":"5", * "5":"", * "TimesheetItemId5":"", * "6":"", * "TimesheetItemId6":"" * } * * @apiSuccessExample Success-Response: * HTTP/1.1 200 OK * * { * "success": "Successfully Updated" * } * * @apiError Invalid Parameter. * * @apiErrorExample Error-Response: * HTTP/1.1 202 No Accessible Timesheets * { * "error": ["No Accessible Timesheets"] * } * * */