frontend-pages

Guides building and registering Vue 3 pages in OrangeHRM's per-page mini-SPA architecture.

Updated Jul 23, 2026
One-click install
npx skills add https://github.com/snow-gift111/orangehrm-ai-sdlc-capstone --skill frontend-pages-snow-gift111
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: frontend-pages
Source: https://github.com/snow-gift111/orangehrm-ai-sdlc-capstone/tree/main/.agents/skills/frontend-pages
Command: npx skills add https://github.com/snow-gift111/orangehrm-ai-sdlc-capstone --skill frontend-pages-snow-gift111

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? OrangeHRM's frontend is not a typical single-page app: there is no vue-router, every page is a fresh Vue app mounted by a backend Twig template, and a kebab-case component name is the contract between PHP controllers and Vue. This Skill explains that architecture so new pages render correctly instead of failing silently. ## Core Features & Use Cases - Four-step page registration: create the Vue component, register it in the plugin's index.ts with a kebab-case key, confirm pages.ts spreads the plugin, and reference the same string in the backend controller's preRender(). - OXD design system catalog: documents the @ohrm/oxd components actually used (oxd-form, oxd-card-table, oxd-grid, oxd-button) plus the custom @ohrm/components layer (DateInput, EmployeeAutocomplete, DeleteConfirmationDialog). - Page anatomy and conventions: mixed Composition + Options API, external scoped SCSS, $t() translations, $can ACL gates, usePaginate/useSort composables, and navigate() for full-page transitions. - Use Case: You need to add a new employee list page. Follow the checklist to write the .vue file, register 'employee-list' in orangehrmPimPlugin/index.ts, and wire the matching PHP controller so the page renders on first try. ## Quick Start Ask the agent to add a new Vue list page for a feature and have it follow the four-step registration flow with OXD table components.

Frequently Asked Questions about frontend-pages

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a new Vue page in OrangeHRM?

Create the .vue file under src/client/src/orangehrm{X}Plugin/pages/<feature>/, register it with a kebab-case key in the plugin's index.ts, and have the backend controller call new Component('same-key') in preRender(). Existing plugins are already spread in pages.ts, so no change there is needed.

Why does my new OrangeHRM Vue page render blank?

The most common cause is a component name mismatch: the kebab-case key in index.ts must exactly match the string in the PHP new Component() call. Vue treats unknown components as raw HTML and renders nothing without a console error. Also check for stale builds and rerun yarn build.

Does OrangeHRM frontend use vue-router?

No, there is no vue-router in the codebase. Every page navigation is a full browser reload where the server renders a Twig template mounting one Vue root component. Use the navigate() helper from @ohrm/core/util/helper/navigation for transitions.

What is the difference between @ohrm/oxd and @ohrm/components?

@ohrm/oxd is the external OXD design system package providing generic components like oxd-form, oxd-card-table, and oxd-button. @ohrm/components resolves to src/client/src/core/components and holds project-specific wrappers like DateInput, EmployeeAutocomplete, and DeleteConfirmationDialog.

How do I pass data between pages without a state store?

State does not survive navigation because each page is a fresh Vue app, and there is no Pinia or Vuex. Pass data via URL parameters using navigate(url, params, query), server-side session, or the API. Server-injected props and window.appGlobal cover per-page needs.