Skip to main content

Asset Form

Summary

The asset form has two variants: an admin create/save form and an employee request form. The admin form captures asset attributes with fixed dropdown option sets and an uppercase asset code; the employee form submits a lightweight request. No vendor, warranty, or financial fields exist in either variant.

Audience

  • Developers maintaining the asset form.
  • QA engineers validating fields, option sets, and submission.
  • Support engineers explaining form behaviour.
  • Product owners assessing captured attributes.

Reference Content

Admin create/save form

FieldControlNotes
Asset CodeText inputValue forced to uppercase
TypeSelectFixed options: Laptop, ID Card, Mobile, SIM, Accessory, Tool, Vehicle
Asset NameText
Serial NoText
Assign ToEmployeeSelectOptional
ConditionSelectFixed options: New, Good, Repair, Damaged
NotesText

The default status is "Available". The primary button "Save Asset" calls save("asset","assets",...).

Employee-only request variant

FieldBound to
Request ReasonassetName
Required DatereturnDueDate
Notesnotes

The button "Submit Request" posts to the compatibility endpoint /hr-operations/asset-requests with { assetType, assetName, returnDueDate, notes }. On success the message "Asset request submitted." is shown.

Client validation

Client validation requires both an asset Type and an asset Name. When missing, an inline error is shown ("Asset type is required." for the type, and a name-required error for the name).

Fixed dropdown option sets

The Type and Condition selects use fixed, hard-coded option lists (Type: Laptop, ID Card, Mobile, SIM, Accessory, Tool, Vehicle; Condition: New, Good, Repair, Damaged). The UI surfaces only a subset of the full backend status/condition sets, documented separately.

Absent fields

No vendor, warranty, or financial fields exist in the asset form. These are verified absences and must not be assumed present.

Source References

  • UI/salary-ui/apps/client-hrms-portal/src/pages/hr/HrOperationsPage.tsx
  • microservices/src/asset-service/Api/AssetCompatEndpoints.cs

See Also

Keywords

asset form, request variant, dropdown options, uppercase code, no financial fields

Revision Information

  • Status: Draft
  • Last reviewed: 2026-07-17
  • Review cycle: Quarterly