G Gaia

Switch factory

CYTO-11 — Balakong Jaya CTSB CYTO-29 CTSB CYTOWELL-54 — Taming Jaya PIC/S CTWSB CYTOCNGZ-602 — Guangzhou CTCNGZ

Only factories you are granted appear here (Filament tenant menu).

Leo Lim

leo@navi.my · Owner / Admin

Profile settings Change password

Theme

Sign out
RetailSellR&DMakeBuyStockPlanItemsGMPAdminInsights

Users & access

Access model: every operational record belongs to one factory/entity. A user sees only the factories ticked below — the factory switcher in the top bar lists only those. Users with a single factory get no switcher at all. Roles cap what they can do within a factory.
users
User Role NVMSB
Sales (NaVi)
CTSB
Factory (CT1)
CTWSB
Factory (CTW · PIC/S)
CTCNGZ
Factory (Guangzhou)
Modules Status Last active

Project Gaia — static mockup in Filament v3 idiom. No backend. Sample users are illustrative; factory columns are the real entities.

Users & access

Invite user

Not saved

The invite link goes here.

Role caps what the user can do within a factory (spatie/laravel-permission); modules derive from role.

User sees only ticked factories in the switcher; a single factory ⇒ no switcher at all (Filament tenant menu).

Will get: Make (tasks) · Stock (read) at CTSB — operator dashboard on login.

Users & access — field manifest

FieldFilament componentTypeSourceFK target
UserTextColumn::description(email)string + emailstored: users.name / users.email
RoleTextColumn badge + SelectFilterenumstored: model_has_roles (spatie/laravel-permission)roles.id
Factory access ×4IconColumn::boolean() per tenantbool per factorystored: user_factories pivot (user_id, factory_id)factories.id
ModulesTextColumn (derived from role permissions)string listderived: role → permission setpermissions
StatusTextColumn badge; Action toggle enable/disableenum Active/Disabledstored: users.disabled_at
Last activeTextColumn::since()datetimestored: users.last_active_at
InviteFilament Action modalactionstored: users (name, email, invited_at, signed invite URL mailed), model_has_roles row, user_factories pivot rows per ticked factory; status Invited until first login sets password (Fortify)roles.id · factories.id

Engine / architecture notes

  • Tenancy = factory/entity. Filament Panels multi-tenancy with tenant: Factory. Every operational table (items are global; stock, MOs, SOs, POs, batches, shipments are not) carries factory_id with a global scope bound to the active tenant.
  • Factory switcher = Filament's tenant menu. It lists only auth()->user()->factories; one factory ⇒ menu hidden, user is pinned.
  • Items/variants and suppliers are shared masters (global), but stock levels, costs and documents are per-factory — matches Katana's per-location ledger, elevated to per-entity.
  • NVMSB users creating SOs in factory tenants (current NaVi practice) = grant NVMSB sales role access to the factory tenant with a Sales role — visible on Kevin's row.
  • QA release role at CTWSB maps to the PIC/S paper flow: software shows batches read-only; wet-ink release stays on paper (current direction).
  • Roles via spatie/laravel-permission; Filament Shield or manual policies gate Resources per role.