Saltar al contenido
HubHub

Recursos Humanos

Recursos humanos para tu equipo: empleados, roles, turnos, asistencia y comisiones. La nómina se conecta con el satélite de nómina hacia contabilidad.

Por AstebyRecursos Humanos

Se instala desde tu panel, en un click. ¿Aún no tienes plataforma? Pruébala 1 mes gratis

Qué puedes hacer

  • Directorio de empleados con ciclo de alta/baja
  • Roles internos de RR. HH. con tarifa por hora y % de comisión por defecto
  • Programación de turnos (crear / actualizar / eliminar) más acciones de entrada / salida
  • Bitácora de asistencia de solo anexado (entrada / salida / inicio de descanso / fin de descanso) — manual, QR, biométrica o web
  • Libro de comisiones con ciclo pendiente → aprobada → pagada
  • Origen de comisión polimórfico (venta, servicio, personalizado) — disparado por eventos de addons hermanos
  • Emisión de eventos para nómina / contabilidad / notificaciones aguas abajo
  • Contratos laborales y solicitudes de vacaciones / permisos

Vista previa

Este addon todavía no tiene capturas publicadas.

Lo verás en acción en cuanto lo instales en tu plataforma.

Más información

@asteby/addon-hr-lite

Foundation addon for basic Human Resources across the Asteby ecosystem. Universal across retail, restaurant, tire shops, workshops and field-services.

Status

Wave 3 — last foundation addon. Created from scratch (no precursor in ops/backend/core/).

Contents

| Path | What | |---|---| | manifest.json | Module Contract v3 addon manifest (5 models, RBAC, 6 events). | | backend/ | Go module (github.com/asteby-hq/addons/packages/hr-lite/backend) — kernel-based, no local internal/{models,database} copy. | | frontend/ | Vite + React bundle (@asteby/addon-hr-lite-ui) — currently stub routes. | | locales/ | i18n bundles (es-MX, en-US). | | schemas/events/ | JSON Schemas for emitted events. | | migrations/ | DDL bootstrap (001_init.up.sql). |

Models

  • Employee — directory record with hire/termination lifecycle. tax_id /

bankclabe are fiscal-optional fields validated against $org.taxidvalidator / $org.bankaccount_validator so the kernel never ships MX-specific regex.

  • HRRole — internal job role (Mecánico, Cajero, Gerente). NOT the system

RBAC role: that lives in kernel/permission.

  • Shift — scheduled work window. scheduled → checked_in → completed.
  • AttendanceEvent — append-only ledger of clock-in / clock-out / break

events. Method covers manual, qr, biometric, web.

  • Commission — payable commission accrued by an employee for a sale or

service. SourceType + SourceID form a polymorphic soft FK so this addon does not depend on pos or workshop directly — they emit events and hr-lite subscribers (Wave 2.6) materialise the rows.

Currency

Employee.currencycode and HRRole.currencycode are resolved at write time via config.GetCurrencyOrDefault(ctx, getter, orgID, "USD"). No MXN hardcoding. Apps wire a concrete OrgCurrencyGetter on the request context (see metacore-kernel/config/currency.go).

Org scoping

Every handler reads organization_id from c.Locals (kernel auth middleware) and filters DB reads / writes by it (pattern from fix #31). Sub-resource creates that also update a parent (e.g. POST /shifts/:id/check-in creates an AttendanceEvent and bumps the Shift) use Session(&gorm.Session{NewDB: true}) between the two statements to avoid GORM chain contamination (pattern from fix #37).

Events emitted

  • hrlite.employeehired
  • hrlite.employeeterminated
  • hrlite.shiftstarted
  • hrlite.shiftcompleted
  • hrlite.commissionearned
  • hrlite.commissionpaid

Schemas live under schemas/events/. Actual emission is // TODO(wave-2.6) stubs in the handlers; the cross-addon event bus lands then.

Pitsline

The Pitsline vertical preset currently lists this addon as required: false (the addon did not exist when the preset was authored). Once this PR lands, the follow-up bumps it to required: true.

Build

pnpm install
pnpm -F @asteby/addon-hr-lite-ui build
go build ./packages/hr-lite/backend/...