Withdrawal Plan
Used to create and manage withdrawal requests for deployed units.
Page: Withdrawal Plan
Purpose
Create and track withdrawal plans linked to a unit and its client for operational planning and record tracking.
1. Add Withdrawal Plan Section
Form fields:
- Unit Code — Enter the unit code
- Search Unit Code — Search/select dropdown for unit code
- Unit Name — Display or enter unit name
- Search Unit Name — Search/select dropdown for unit name
- Client — Search / select client (optional; auto-selected when unit is chosen)
- Client Name — Auto-filled based on selected unit
- Branch — Branch name (auto-filled based on selected unit)
- Handover Company — Text input
- Withdraw Type — Dropdown select
- Withdraw Date — Date picker
- Reason for Withdrawal — Dropdown select
- Remark — Text area for additional remarks
Behavior:
- Selecting
Unit CodeorUnit Nameauto-fills Client Name and Branch. - The withdrawal plan is linked to the selected unit and client.
2. Actions
- Submit — Saves the withdrawal plan record.
- Reset — Clears all entered and selected fields.
3. Module Behavior & Validation
Unit CodeorUnit Nameselection drives client and branch auto-fill.- Required fields must be validated before submission.
- Submitted plans are associated with the selected unit and client for audit and operations.
4. Typical UI Flow
- Navigate to the
Withdrawal Planpage. - Search/select the unit using
Search Unit CodeorSearch Unit Name. - Confirm
Client NameandBranchare auto-filled. - Enter
Handover Company, chooseWithdraw Type, pickWithdraw Date. - Select
Reason for Withdrawaland addRemarkif needed. - Click Submit to save or Reset to clear the form.
API Endpoints
The Unit Withdrawal Plan module interacts with the following API endpoints:
Base URL
export const UNITWITHDRAWPLAN_URL = '/api/unitWithdrawPlan'
Endpoints
| Endpoint | Method | Description | Parameters/Body |
|---|---|---|---|
${UNITWITHDRAWPLAN_URL} | GET | Get all unit withdrawal plans | Query: page, limit |
${UNITWITHDRAWPLAN_URL}/:unitWithdrawplanId | GET | Get unit withdrawal plan by ID | Path: unitWithdrawplanId |
${UNITWITHDRAWPLAN_URL} | POST | Create a new unit withdrawal plan | Body: data |
${UNITWITHDRAWPLAN_URL}/:unitWithdrawplanId | PATCH | Update an existing unit withdrawal plan | Path: unitWithdrawplanId, Body: body |
${UNITWITHDRAWPLAN_URL}/delete/:unitWithdrawplanId | PATCH | Delete a unit withdrawal plan | Path: unitWithdrawplanId |
${UNITWITHDRAWPLAN_URL}/search | GET | Search unit withdrawal plans | Query: query |
RTK Query Hooks
The following hooks are available for frontend integration:
useGetAllUnitWithdrawplansQueryuseGetUnitWithdrawplanByIdQueryuseCreateUnitWithdrawplanMutationuseUpdateUnitWithdrawplanMutationuseDeleteUnitWithdrawplanMutationuseSearchUnitWithdrawplansQuery
End of documentation.