Team approvals
Plan section 2.8 · Screens S40–S42. Read Server rules → approve first.
When to show Approvals
Show the Approvals segment (S30) only when login isApprover is true and Setting/GetAllSettings returns isLeadersCanApproveApplication: true. The server allows approve/reject only for applications of the leader's team (leader hierarchy), never the leader's own, and only with that setting on.
Inbox (S40): which lists work
Load each type's list with applicationStatus: 0 (Pending) and drop rows where employee.id is the leader's own employee id.
| Type | List endpoint | Returns the team? | Approve/reject |
|---|---|---|---|
| Leave | LeaveApplication/GetAllLeaveApplications | Yes | below |
| Work from home | WorkFromHome/GetAllWorkFromHomeData | Yes | below |
| Overtime | OverTimeApplication/GetAllOvertimeApplications | Yes | below |
| Fuel allowance | FuelAllowanceApplication/GetAllFuelAllowanceApplications | Yes | below |
| Compensation | CompensationApplication/GetAllCompensationApplications | Yes | below |
| Missed punch | ThumbApplication/GetAllThumbApplications | No, self only (G4) | below (works by id) |
| Clarification | Clarification/GetAllClarification | No, self only | below |
| Resignation | ResignApplication/GetAllResignApplications | No, self only | below |
Example inbox request for leave:
{ "employeeIds": null, "applicationStatus": 0, "fromDate": null, "toDate": null }
Approval detail (S41)
Use the type's get-by-id call (for example LeaveApplication/GetLeaveApplication). Not available from the API: the requester's leave balance (G2) and an approver remark (G1).
Approve or reject
All Update…Status endpoints take the same body:
{ "ids": [1045, 1046], "updateTransactionStatus": 1 }
ids: one or more application ids (multi-select approve sends several).updateTransactionStatus:1Approve,2Reject.- There is no remark field (G1).
- If any id is not allowed for the caller, the whole call fails with
You can't approve or reject these applications.and nothing changes. - Approving overtime or fuel copies the requested hours/km into the approved value when none was set.
- The applicant gets a notification (push + inbox).
Leave
/api/LeaveApplication/UpdateLeaveApplicationStatusRequest
JSON body:
| Field (JSON name) | Type |
|---|---|
ids | integer[] |
updateTransactionStatus | TransactionStatus (enum)0 = Pending1 = Approved2 = Rejected |
- curl
- TypeScript (HRMS.Mobile)
- Body only
curl -X POST "$BASE_URL/LeaveApplication/UpdateLeaveApplicationStatus" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"ids": [
1045
],
"updateTransactionStatus": 1
}'
const body: UpdateTransactionStatusDto = {
"ids": [
1045
],
"updateTransactionStatus": 1
};
import { api } from '@/services/api'; // HRMS.Mobile: unwraps ApiResponse<T>, throws ApiError
import type { UpdateTransactionStatusDto } from './types'; // request DTO
const data = await api.post<boolean>('LeaveApplication/UpdateLeaveApplicationStatus', body);
{
"ids": [
1045
],
"updateTransactionStatus": 1
}
Response
HTTP 200 with the standard envelope. responseData is boolean.
Type: boolean Example response
Errors
- isSuccess: false · errorCode 1 “You can't approve or reject these applications.”
- HTTP 401 missing or expired token (see token expiry).
- HTTP 500 unhandled server exception (HTML/text body, not JSON).
On these errors responseData is false. Show errorMessage to the user as-is.
Source: HRMS.WebAPI/Controllers/LeaveApplicationController.cs → LeaveApplicationService.UpdateLeaveApplicationStatus · returns boolean
Missed punch
/api/ThumbApplication/UpdateThumbApplicationStatusApproving a punch also runs the attendance update for that punch. Leaders cannot list their team's punches today (G4), so this is reachable only from a notification or a known id.
Request
JSON body:
| Field (JSON name) | Type |
|---|---|
ids | integer[] |
updateTransactionStatus | TransactionStatus (enum)0 = Pending1 = Approved2 = Rejected |
- curl
- TypeScript (HRMS.Mobile)
- Body only
curl -X POST "$BASE_URL/ThumbApplication/UpdateThumbApplicationStatus" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"ids": [
5532
],
"updateTransactionStatus": 1
}'
const body: UpdateTransactionStatusDto = {
"ids": [
5532
],
"updateTransactionStatus": 1
};
import { api } from '@/services/api'; // HRMS.Mobile: unwraps ApiResponse<T>, throws ApiError
import type { UpdateTransactionStatusDto } from './types'; // request DTO
const data = await api.post<boolean>('ThumbApplication/UpdateThumbApplicationStatus', body);
{
"ids": [
5532
],
"updateTransactionStatus": 1
}
Response
HTTP 200 with the standard envelope. responseData is boolean.
Type: boolean Example response
Errors
- isSuccess: false · errorCode 1 “You can't approve or reject these applications.”
- HTTP 401 missing or expired token (see token expiry).
- HTTP 500 unhandled server exception (HTML/text body, not JSON).
On these errors responseData is false. Show errorMessage to the user as-is.
Source: HRMS.WebAPI/Controllers/ThumbApplicationController.cs → ThumbApplicationService.UpdateThumbApplicationStatus · returns boolean
Work from home
/api/WorkFromHome/UpdateWorkFromHomeStatusRequest
JSON body:
| Field (JSON name) | Type |
|---|---|
ids | integer[] |
updateTransactionStatus | TransactionStatus (enum)0 = Pending1 = Approved2 = Rejected |
- curl
- TypeScript (HRMS.Mobile)
- Body only
curl -X POST "$BASE_URL/WorkFromHome/UpdateWorkFromHomeStatus" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"ids": [
212
],
"updateTransactionStatus": 1
}'
const body: UpdateTransactionStatusDto = {
"ids": [
212
],
"updateTransactionStatus": 1
};
import { api } from '@/services/api'; // HRMS.Mobile: unwraps ApiResponse<T>, throws ApiError
import type { UpdateTransactionStatusDto } from './types'; // request DTO
const data = await api.post<boolean>('WorkFromHome/UpdateWorkFromHomeStatus', body);
{
"ids": [
212
],
"updateTransactionStatus": 1
}
Response
HTTP 200 with the standard envelope. responseData is boolean.
Type: boolean Example response
Errors
- isSuccess: false · errorCode 1 “You can't approve or reject these applications.”
- HTTP 401 missing or expired token (see token expiry).
- HTTP 500 unhandled server exception (HTML/text body, not JSON).
On these errors responseData is false. Show errorMessage to the user as-is.
Source: HRMS.WebAPI/Controllers/WorkFromHomeController.cs → WorkFromHomeService.UpdateWorkFromHomeStatus · returns boolean
Overtime
/api/OverTimeApplication/UpdateOvertimeApplicationStatusRequest
JSON body:
| Field (JSON name) | Type |
|---|---|
ids | integer[] |
updateTransactionStatus | TransactionStatus (enum)0 = Pending1 = Approved2 = Rejected |
- curl
- TypeScript (HRMS.Mobile)
- Body only
curl -X POST "$BASE_URL/OverTimeApplication/UpdateOvertimeApplicationStatus" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"ids": [
77
],
"updateTransactionStatus": 1
}'
const body: UpdateTransactionStatusDto = {
"ids": [
77
],
"updateTransactionStatus": 1
};
import { api } from '@/services/api'; // HRMS.Mobile: unwraps ApiResponse<T>, throws ApiError
import type { UpdateTransactionStatusDto } from './types'; // request DTO
const data = await api.post<boolean>('OverTimeApplication/UpdateOvertimeApplicationStatus', body);
{
"ids": [
77
],
"updateTransactionStatus": 1
}
Response
HTTP 200 with the standard envelope. responseData is boolean.
Type: boolean Example response
Errors
- isSuccess: false · errorCode 1 “You can't approve or reject these applications.”
- HTTP 401 missing or expired token (see token expiry).
- HTTP 500 unhandled server exception (HTML/text body, not JSON).
On these errors responseData is false. Show errorMessage to the user as-is.
Source: HRMS.WebAPI/Controllers/OverTimeApplicationController.cs → OvertimeApplicationService.UpdateOvertimeApplicationStatus · returns boolean
Fuel allowance
/api/FuelAllowanceApplication/UpdateFuelAllowanceApplicationStatusRequest
JSON body:
| Field (JSON name) | Type |
|---|---|
ids | integer[] |
updateTransactionStatus | TransactionStatus (enum)0 = Pending1 = Approved2 = Rejected |
- curl
- TypeScript (HRMS.Mobile)
- Body only
curl -X POST "$BASE_URL/FuelAllowanceApplication/UpdateFuelAllowanceApplicationStatus" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"ids": [
64
],
"updateTransactionStatus": 1
}'
const body: UpdateTransactionStatusDto = {
"ids": [
64
],
"updateTransactionStatus": 1
};
import { api } from '@/services/api'; // HRMS.Mobile: unwraps ApiResponse<T>, throws ApiError
import type { UpdateTransactionStatusDto } from './types'; // request DTO
const data = await api.post<boolean>('FuelAllowanceApplication/UpdateFuelAllowanceApplicationStatus', body);
{
"ids": [
64
],
"updateTransactionStatus": 1
}
Response
HTTP 200 with the standard envelope. responseData is boolean.
Type: boolean Example response
Errors
- isSuccess: false · errorCode 1 “You can't approve or reject these applications.”
- HTTP 401 missing or expired token (see token expiry).
- HTTP 500 unhandled server exception (HTML/text body, not JSON).
On these errors responseData is false. Show errorMessage to the user as-is.
Source: HRMS.WebAPI/Controllers/FuelAllowanceApplicationController.cs → FuelAllowanceApplicationService.UpdateFuelAllowanceApplicationStatus · returns boolean
Compensation
/api/CompensationApplication/UpdateCompensationApplicationStatusRequest
JSON body:
| Field (JSON name) | Type |
|---|---|
ids | integer[] |
updateTransactionStatus | TransactionStatus (enum)0 = Pending1 = Approved2 = Rejected |
- curl
- TypeScript (HRMS.Mobile)
- Body only
curl -X POST "$BASE_URL/CompensationApplication/UpdateCompensationApplicationStatus" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"ids": [
9
],
"updateTransactionStatus": 1
}'
const body: UpdateTransactionStatusDto = {
"ids": [
9
],
"updateTransactionStatus": 1
};
import { api } from '@/services/api'; // HRMS.Mobile: unwraps ApiResponse<T>, throws ApiError
import type { UpdateTransactionStatusDto } from './types'; // request DTO
const data = await api.post<boolean>('CompensationApplication/UpdateCompensationApplicationStatus', body);
{
"ids": [
9
],
"updateTransactionStatus": 1
}
Response
HTTP 200 with the standard envelope. responseData is boolean.
Type: boolean Example response
Errors
- isSuccess: false · errorCode 1 “You can't approve or reject these applications.”
- HTTP 401 missing or expired token (see token expiry).
- HTTP 500 unhandled server exception (HTML/text body, not JSON).
On these errors responseData is false. Show errorMessage to the user as-is.
Source: HRMS.WebAPI/Controllers/CompensationApplicationController.cs → CompensationApplicationService.UpdateCompensationApplicationStatus · returns boolean
Clarification
/api/Clarification/UpdateClarificationStatusRequest
JSON body:
| Field (JSON name) | Type |
|---|---|
ids | integer[] |
updateTransactionStatus | TransactionStatus (enum)0 = Pending1 = Approved2 = Rejected |
- curl
- TypeScript (HRMS.Mobile)
- Body only
curl -X POST "$BASE_URL/Clarification/UpdateClarificationStatus" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"ids": [
18
],
"updateTransactionStatus": 1
}'
const body: UpdateTransactionStatusDto = {
"ids": [
18
],
"updateTransactionStatus": 1
};
import { api } from '@/services/api'; // HRMS.Mobile: unwraps ApiResponse<T>, throws ApiError
import type { UpdateTransactionStatusDto } from './types'; // request DTO
const data = await api.post<boolean>('Clarification/UpdateClarificationStatus', body);
{
"ids": [
18
],
"updateTransactionStatus": 1
}
Response
HTTP 200 with the standard envelope. responseData is boolean.
Type: boolean Example response
Errors
- isSuccess: false · errorCode 1 “You can't approve or reject these applications.”
- HTTP 401 missing or expired token (see token expiry).
- HTTP 500 unhandled server exception (HTML/text body, not JSON).
On these errors responseData is false. Show errorMessage to the user as-is.
Source: HRMS.WebAPI/Controllers/ClarificationController.cs → ClarificationService.UpdateClarificationStatus · returns boolean
Resignation
/api/ResignApplication/UpdateResignApplicationStatusRequest
JSON body:
| Field (JSON name) | Type |
|---|---|
ids | integer[] |
updateTransactionStatus | TransactionStatus (enum)0 = Pending1 = Approved2 = Rejected |
- curl
- TypeScript (HRMS.Mobile)
- Body only
curl -X POST "$BASE_URL/ResignApplication/UpdateResignApplicationStatus" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"ids": [
3
],
"updateTransactionStatus": 1
}'
const body: UpdateTransactionStatusDto = {
"ids": [
3
],
"updateTransactionStatus": 1
};
import { api } from '@/services/api'; // HRMS.Mobile: unwraps ApiResponse<T>, throws ApiError
import type { UpdateTransactionStatusDto } from './types'; // request DTO
const data = await api.post<boolean>('ResignApplication/UpdateResignApplicationStatus', body);
{
"ids": [
3
],
"updateTransactionStatus": 1
}
Response
HTTP 200 with the standard envelope. responseData is boolean.
Type: boolean Example response
Errors
- isSuccess: false · errorCode 1 “You can't approve or reject these applications.”
- HTTP 401 missing or expired token (see token expiry).
- HTTP 500 unhandled server exception (HTML/text body, not JSON).
On these errors responseData is false. Show errorMessage to the user as-is.
Source: HRMS.WebAPI/Controllers/ResignApplicationController.cs → ResignApplicationService.UpdateResignApplicationStatus · returns boolean
Team today (S42)
There is no endpoint for a leader's team or the team's attendance today (G5). Hide S42 until the backend adds one.