Introducing a new way to review your PRs.

Read the announcement

frappe / hrms

Open Source HR and Payroll Software

View on GitHub

20 documents · Updated Nov 23, 2026

docs / employee-portal-application

Employee portal application

The employee portal application is the Vue and Ionic client for daily employee self-service. It gives a signed-in employee one place to check attendance, request leave or shifts, submit expenses and advances, review salary slips, and follow request status. It uses Frappe HR APIs for data and rules while keeping the employee context and selected lists current in the client. See the employee self-service page for the wider product area.

Application shell

Runtime boundary

The application runs as a mobile-first page under the /hrms URL scope. Vue supplies the page and state model. Ionic supplies page, tab, modal, and action-sheet behavior. Frappe UI supplies resource loading and common controls. The shell also supports installation as a progressive web app and can show push messages while the app is open.

The install prompt adapts to the device. Supported browsers can accept a deferred install prompt. iOS users receive instructions to add the portal to the home screen. An installed app clears the prompt state.

References: frontend/…/App.vue• L1-24 frontend/vite.config.js• L15-61 frontend/…/main.js• L1-59 frontend/…/InstallPrompt.vue• L1-103

The main signed-in area uses a tab frame with Home, Attendance, Leaves, Expenses, and Salary as its primary destinations. Pages inside that frame use a shared header with the employee avatar and notification access. Detail and request pages remain reachable as child routes even when they are not primary tabs.

References: frontend/…/TabbedView.vue• L1-13 frontend/…/BottomTabs.vue• L1-66 frontend/…/BaseLayout.vue• L1-68

Home workspace

The Home page brings the most time-sensitive employee actions together. It shows check-in or check-out, links to common requests, and combines the employee’s recent requests with requests that need team attention. Compensatory leave is available from the same quick-action area as regular leave.

The check-in panel bases its next action on the employee’s latest check-in log. When mobile check-in is enabled, the employee opens a confirmation modal with the current time. If location tracking is also enabled, the panel tries to show the browser location and sends the available coordinates with the check-in or check-out request.

References: frontend/…/Home.vue• L1-66 frontend/…/CheckInPanel.vue• L1-77 frontend/…/CheckInPanel.vue• L99-218 frontend/…/RequestPanel.vue• L1-79

Route model

Route groups

The router separates public access pages from employee pages and groups feature routes by business area. Dashboards provide a broad view. List routes provide history and filters. Form routes handle new and existing records through an optional record ID. Leave routes cover both regular leave applications and compensatory leave requests.

References: frontend/…/index.js• L10-95 frontend/…/attendance.js• L1-57 frontend/…/leaves.js• L1-36 frontend/…/claims.js• L1-20 frontend/…/advances.js• L1-20 frontend/…/salary_slips.js• L1-10

Route access

Navigation checks the session before each route. A signed-in user must also resolve to an employee whose user ID matches the current user. Users without that match go to the Invalid Employee page instead of entering employee-specific views. Public login and password recovery routes remain available without an active session.

References: frontend/…/main.js• L117-152 frontend/…/InvalidEmployee.vue• L1-38

The route model can be read as a short request path from entry to record action:

flowchart LR
    A[Open portal] --> B{Signed in?}
    B -- No --> C[Login or recovery]
    B -- Yes --> D{Employee match?}
    D -- No --> E[Invalid employee]
    D -- Yes --> F[Dashboard or Home]
    F --> G[List or request form]
    G --> H[Review, save, submit, or approve]

Identity and session

Session lifecycle

The session is based on the browser user cookie and is exposed as reactive state to the application. Password login and OTP login use the same server login service. A successful login refreshes user and employee data before it returns the user to the portal. Logout clears both resources and returns the browser to Login.

References: frontend/…/session.js• L1-50 frontend/…/Login.vue• L126-195 frontend/…/Profile.vue• L283-290

User and employee context

The user resource describes the authenticated account. The employee resource describes the employee record that the portal can act for. The router waits for this employee context before allowing employee pages. Feature resources use it to limit requests to the current employee or to requests that employee can approve.

The Profile page uses the employee context as a live view of the employee record. It groups employee, company, contact, and salary information into readable sections. A change to the Employee record refreshes the profile while the page is open. The profile also links to password and notification settings.

References: frontend/…/user.js• L1-12 frontend/…/employee.js• L1-12 frontend/…/attendance.js• L49-108 frontend/…/leaves.js• L29-73 frontend/…/claims.js• L18-47 frontend/…/Profile.vue• L21-43 frontend/…/Profile.vue• L236-307 frontend/…/AppSettings.vue• L21-57

Authentication alternatives

The login view supports password login when the site allows it, OTP verification when the server asks for it, and configured OAuth providers. An expired password sends the user to the server password reset page rather than placing the account in the portal. A signed-in employee can change the current password from Settings. A user can request a reset link from the public recovery page.

References: frontend/…/Login.vue• L1-121 frontend/…/Login.vue• L151-195 frontend/…/ChangePassword.vue• L19-121 frontend/…/ForgotPassword.vue• L19-115

Shared request experience

List and form surfaces

The portal presents employee records through two shared surfaces. ListView adds employee or team scope, filters, paging, permission-aware creation, and record navigation. FormView provides field display, dirty-state handling, save, submit, cancel, delete, attachments, and read-only behavior. Feature views mainly supply the document type and the fields or tabs that shape these shared surfaces.

FormView also supports read-only detail actions such as PDF download. A request action sheet can show a compact record summary, attachments, workflow actions, approval actions, or a link to the full record. This lets dashboards handle a request without forcing the employee to leave the current page.

References: frontend/…/ListView.vue• L1-129 frontend/…/ListView.vue• L193-202 frontend/…/ListView.vue• L216-405 frontend/…/FormView.vue• L1-217 frontend/…/FormView.vue• L524-789 frontend/…/RequestActionSheet.vue• L1-186

Request summary

RequestList turns data from leave, claim, attendance, and shift resources into a short summary feed. Each record keeps its document type so the feed can select the right summary item and action fields. A selected item opens a compact action view instead of forcing the employee to leave the current dashboard.

Attendance summaries use focused item views. Check-ins show the log type and time. Shift assignments show dates, timing, and draft or submitted state. Shift requests show dates and approval state for either personal or team requests. Leave items now also represent compensatory leave with its work dates, day count, and request state.

References: frontend/…/RequestList.vue• L1-44 frontend/…/RequestPanel.vue• L38-79 frontend/…/EmployeeCheckinItem.vue• L1-29 frontend/…/ShiftAssignmentItem.vue• L1-49 frontend/…/ShiftRequestItem.vue• L1-61 frontend/…/LeaveRequestItem.vue• L1-60 frontend/…/CompensatoryLeaveRequestItem.vue• L1-58 frontend/…/requestSummaryFields.js• L4-261

Workflow and attachments

The shared form experience follows server workflow and permission rules instead of assuming that every record can be edited. It exposes only transitions allowed for the current user and makes submitted, cancelled, or role-restricted records read-only. Attachments can be added to new records or managed on existing records. Shared field display also gives dates, status values, employee links, currency, and location data a consistent form in detail and action views.

References: frontend/…/workflow.js• L5-100 frontend/…/index.js• L9-128 frontend/…/WorkflowActionSheet.vue• L1-131 frontend/…/FormView.vue• L468-519 frontend/…/FormattedField.vue• L1-86 frontend/…/RequestActionSheet.vue• L240-389

Attendance and shift management

Attendance workspace

The Attendance dashboard combines a calendar view with recent attendance requests, upcoming shift assignments, and recent shift requests. Employees can request a correction to attendance or ask for a shift from the same workspace. The Home check-in panel provides a faster path for a check-in or check-out when mobile check-in is enabled in HR settings. When location tracking is enabled, the panel tries to collect browser location before the employee confirms the log.

The check-in action derives its next state from the latest employee log. It sends the employee, log type, time, and available coordinates to the server. A live Employee Checkin update then reloads the latest log so the next action changes from Check In to Check Out or back again.

References: frontend/…/Dashboard.vue• L1-96 frontend/…/CheckInPanel.vue• L7-77 frontend/…/CheckInPanel.vue• L99-218 frontend/…/settings.js• L1-6

Attendance records

Attendance requests and shift requests use the shared list and form model. Employee check-ins are viewable as a list and can be opened in a summary sheet. Team tabs use approval-oriented data so an employee with the required role can review requests from other employees. Attendance request forms keep date ranges valid and set the employee context when the record is saved.

Shift request history supports personal and team views. Its filters cover status, shift type, employee, department, and date range. The dashboard limits the first view to recent requests and near-term shift assignments while the history route provides the wider record set.

References: frontend/…/attendance.js• L1-57 frontend/…/AttendanceRequestList.vue• L1-30 frontend/…/AttendanceRequestForm.vue• L35-114 frontend/…/ShiftRequestList.vue• L1-60 frontend/…/attendance.js• L49-108

Leave management

Leave workspace

The Leaves dashboard shows the employee’s leave balance, recent leave applications, and holidays. Its main action starts a leave request. It also links to compensatory leave requests. The history routes provide the full list and filters for personal and team review. Leave data is scoped to the current employee for personal history and to an approver for team review.

References: frontend/…/Dashboard.vue• L1-44 frontend/…/LeaveBalance.vue• L1-57 frontend/…/List.vue• L1-60 frontend/…/leaves.js• L29-73

Leave request rules

The leave form adapts its choices to the employee and date range. It supplies eligible leave types and approvers, checks the date order, calculates the number of leave days, and shows the balance for the selected period. Existing requests can become read-only when the record belongs to another employee and the viewer is not the approver. The form keeps an approved draft visibly distinct until it is submitted.

References: frontend/…/Form.vue• L60-117 frontend/…/Form.vue• L199-249 frontend/…/Form.vue• L276-321 frontend/…/leaves.js• L14-27 frontend/…/LeaveRequestItem.vue• L27-59

Compensatory leave requests

Compensatory leave records cover leave earned from work on defined dates. Employees can create and review these requests from a dedicated list. The form limits leave types to compensatory types, keeps the employee context protected, and constrains a half-day date to the work date range.

References: frontend/…/leaves.js• L1-17 frontend/…/CompensatoryLeaveRequestList.vue• L1-35 frontend/…/CompensatoryLeaveRequestForm.vue• L1-91 frontend/…/CompensatoryLeaveRequestItem.vue• L1-58

Expense claims and advances

Expense workspace

The Expenses dashboard gives the employee a summary of claims, a quick path to submit a claim, recent claims, and the current employee advance balance. Claim history supports personal and team views. Advance history is available from the expense area and from the Home quick links.

Claim history can be filtered by approval state, payment state, employee, department, and posting date. The list also keeps the employee, company, currency, approver, amount, and expense count together so a row gives enough context before the employee opens the claim.

References: frontend/…/Dashboard.vue• L1-63 frontend/…/List.vue• L1-62 frontend/…/List.vue• L1-71 frontend/…/Home.vue• L29-64

Claim composition

An expense claim combines expense rows, taxes, and selected advances into one request. The form keeps totals and the amount covered by advances aligned as the employee edits the claim. It also adapts account choices, currency labels, approval details, and company defaults to the selected employee and company. When multi-currency claims are enabled, it also keeps the exchange rate and company currency in the claim totals.

References: frontend/…/Form.vue• L80-128 frontend/…/Form.vue• L132-212 frontend/…/Form.vue• L221-271 frontend/…/Form.vue• L273-500

Advance requests

The advance flow uses the common list and form surfaces for new and existing Employee Advance records. It shows the employee context on new requests and keeps account choices aligned with the selected currency and company. The balance is also used as an input to expense claim review.

References: frontend/…/Form.vue• L1-105 frontend/…/advances.js• L1-17 frontend/…/Dashboard.vue• L32-46

Salary slip access

Salary slip workspace

The Salary dashboard lists submitted salary slips for the current employee and lets the employee narrow the list to a payroll period. It highlights year-to-date pay from the most recent matching slip. A selected slip opens a read-only detail view with earnings, deductions, pay information, tax information, bank details, and PDF download.

The detail view groups fields by business meaning rather than showing one long record. Earnings and deductions appear as separate tables with their own totals. Currency labels adapt when the salary slip currency differs from the company currency.

References: frontend/…/Dashboard.vue• L1-146 frontend/…/Detail.vue• L1-168 frontend/…/SalaryDetailTable.vue• L1-71

Payroll period updates

Salary slip data responds to a real-time update event for the current employee. This lets the dashboard refresh when new payroll results are available without changing the employee’s selected period.

References: frontend/…/Dashboard.vue• L97-145

Notifications and language

Notification center

The notification center gives the employee a server-backed list of PWA notifications. It starts with unread items, can switch to all items, marks one or all items as read, and follows a reference to the related portal record. The unread count reloads after notification data changes so the shell badge stays aligned with the list. When push delivery is available, the notification view links to Settings so the employee can control it.

References: frontend/…/notifications.js• L1-36 frontend/…/Notifications.vue• L17-170 frontend/…/BaseLayout.vue• L12-26

Push delivery

Push delivery is available when the site has a push relay and the server has enabled push notifications. The client passes the message body, optional icon, and click target to the service worker. Settings lets the employee enable or disable delivery when the site supports it. Browser differences change whether the target is stored as notification data or shown as an action.

References: frontend/…/main.js• L61-95 frontend/…/AppSettings.vue• L75-173 frontend/…/notifications.js• L32-36 frontend/…/pushNotifications.js• L1-32

Translation service

The translation service loads boot translations when the application starts. If boot data is absent, it requests translations for the active language and version. Components use the provided translation function for labels and for messages with numbered replacements. The shell also applies the boot language direction so shared navigation works for right-to-left languages.

References: frontend/…/translationsPlugin.js• L1-81 frontend/…/main.js• L98-115 frontend/…/main.css• L18-36 frontend/…/FormView.vue• L393-425

Real-time data

Socket connection

The portal opens a Socket.IO connection for the current site and retries a limited number of times. A resource refetch event can refresh a cached single record or list. This keeps shared resource data aligned with changes made elsewhere in the HR system.

References: frontend/…/socket.js• L1-30 frontend/…/main.js• L36-59

Document subscriptions

Views subscribe to document types when a list or dashboard needs live changes. List updates refresh the active data set. The request panel listens for changes to the request types it summarizes. The Home check-in panel subscribes to Employee Checkin updates and reloads the employee’s latest log. Salary slips use a separate employee-scoped event because payroll updates are not a generic list update. The Profile page uses the same document update path to refresh the current Employee record.

References: frontend/…/realtime.js• L1-19 frontend/…/ListView.vue• L399-405 frontend/…/RequestPanel.vue• L74-79 frontend/…/CheckInPanel.vue• L206-218 frontend/…/Dashboard.vue• L135-145 frontend/…/Profile.vue• L295-307

Change checklist

When these files or sections are changed, remember to consider these:

  • A route name change must be checked against Home quick links, bottom tabs, list creation links, detail links, notification references, and dashboard list buttons.
  • A document type or field contract change must be checked across the feature resource, ListView item mapping, RequestList summary mapping, RequestActionSheet fields, FormView tabs, notification route mapping, and workflow state lookup.
  • Changes to user or employee loading must preserve the route guard that blocks employee pages until the current account has a matching employee record.
  • Changes to socket event names or document subscriptions must preserve refresh behavior for list pages, request summaries, check-ins, profile data, and salary slips.
  • Changes to form fields or permissions must preserve read-only rules, workflow actions, attachment handling, PDF actions, and feature-specific validation that runs before save or submit.
  • Changes to leave types or date rules must keep leave balance, approver choices, half-day dates, status labels, and compensatory leave filters in agreement.
  • Changes to claim or advance currency rules must keep field labels, account filters, exchange rates, totals, and advance allocation in agreement.
  • Changes to mobile check-in settings must keep the check-in action, location capture attempt, confirmation payload, and Employee Checkin refresh behavior in agreement.
  • Changes to notification references or document detail routes must keep the notification target resolvable and the unread count consistent after read actions.
  • Changes to push setup must keep service-worker registration, site capability checks, Settings state, and notification delivery in agreement.
  • Changes to translation loading or message keys must preserve boot fallback, language selection, right-to-left direction, context-specific labels, and numbered replacements.

Important failure modes

TriggerConsequenceGuard
The session cookie is absent or the user resource returns an authentication error.The portal sends the user to Login and employee pages cannot open.The session state and route guard check authentication before navigation.
The signed-in account has no matching active employee context.The user reaches Invalid Employee and cannot use employee-specific views.The route guard compares the employee user ID with the current user ID.
A record is submitted, cancelled, or restricted by workflow or role.The form becomes read-only or shows no valid workflow action.FormView checks document permission, permitted write fields, document state, and workflow transitions.
A socket connection or subscription stops receiving updates.Lists and dashboards can show old request, profile, check-in, or payroll data until a refresh.Socket reconnection is limited, so views also provide resource reload and pull-to-refresh paths.
Mobile check-in requires location but browser geolocation is unavailable or denied.The panel shows a location error and still sends the default coordinate values unless the server rejects the request.The panel reports the browser error before confirmation. Server-side validation remains the final check on the submitted log.
A compensatory leave request uses a non-compensatory leave type or an invalid half-day date.The request can fail validation or represent a leave period that does not match the earned work dates.The form filters leave types and bounds the half-day date to the work date range.
A notification points to an unknown document type or name.Selecting the notification can lead to a missing route or record.Notification navigation derives the detail route from the stored reference and depends on matching document routes.
Push delivery is unavailable or permission is denied.The employee cannot receive browser push messages and the Settings control stays unavailable or reports the error.Site capability checks and the push client gate enablement and report failure.
Translation boot data and the translation request both fail.The portal falls back to source-language labels and messages.The translation function returns the original text when no translation is loaded.

Key files

FileWhy to read it
frontend/…/main.jsShows application startup, shared providers, push setup, and route access checks.
frontend/…/index.jsShows the top-level page groups and the /hrms history scope.
frontend/…/leaves.jsShows regular and compensatory leave entry points.
frontend/…/session.jsShows login, OTP login, logout, and session state changes.
frontend/…/BaseLayout.vueShows the common signed-in header and notification entry point.
frontend/…/Home.vueShows how common employee actions connect to feature routes.
frontend/…/ListView.vueShows the shared history, filter, team scope, permission, and live refresh model.
frontend/…/FormView.vueShows the shared record lifecycle from load through save, submit, workflow, attachments, and PDF actions.
frontend/…/RequestActionSheet.vueShows the compact record review and approval surface.
frontend/…/RequestPanel.vueShows how personal and team requests from several areas become one feed.
frontend/…/workflow.jsShows how server workflow rules become available actions and read-only state.
frontend/…/index.jsShows shared attachment handling and status display rules.
frontend/…/realtime.jsShows the common document subscription behavior.
frontend/…/Profile.vueShows the employee profile groups, settings links, logout path, and live Employee refresh.
frontend/…/Notifications.vueShows unread and all-notification views, read actions, paging, and reference navigation.
frontend/…/AppSettings.vueShows password navigation and push notification control.
frontend/…/CheckInPanel.vueShows the Home check-in and check-out flow, optional location capture, and live check-in refresh.
frontend/…/Dashboard.vueShows the attendance and shift employee workspace.
frontend/…/AttendanceRequestForm.vueShows attendance date validation and employee context rules.
frontend/…/ShiftRequestList.vueShows personal and team shift history with its main filters.
frontend/…/Dashboard.vueShows leave balance, recent leave, holidays, and compensatory leave entry points.
frontend/…/Form.vueShows the leave-specific date, balance, type, and approver rules.
frontend/…/CompensatoryLeaveRequestForm.vueShows compensatory leave type and work-date rules.
frontend/…/Form.vueShows how claims combine expenses, taxes, advances, currency, and totals.
frontend/…/List.vueShows how claim history supports personal and team views with approval and payment filters.
frontend/…/Dashboard.vueShows payroll period selection and employee salary slip refresh behavior.
frontend/…/Detail.vueShows the read-only salary detail and PDF access path.
frontend/…/translationsPlugin.jsShows how boot or fetched messages become the application translation service.
frontend/…/pushNotifications.jsShows how push payloads become service-worker notifications and click targets.

For the surrounding business flows, read employee self-service, leave management, attendance and shift management, employee expenses and travel, and salary processing.