Account components
@paprel/embed-accounting includes the account list, detail, create/edit form, and reusable account picker.
| Element | Main attributes | Events and methods |
|---|---|---|
paprel-chart-of-accounts | tree | paprel:resource-open, refresh() |
paprel-account-detail | account-id, show-actions | account-action, refresh() |
paprel-account-form | account-id, currency | account-saved, paprel:operation-success |
paprel-account-select | value, label, compact | account-change, refresh() |
List to detail
HTML
<paprel-chart-of-accounts></paprel-chart-of-accounts>
<paprel-account-detail account-id="ACCOUNT_ID"></paprel-account-detail>
Handle the shared paprel:resource-open event on your shell to map an account row to your own detail route. The detail component renders operational bank accounts through the bank-account workspace automatically.
Create or edit
HTML
<paprel-account-form currency="USD"></paprel-account-form>
<paprel-account-form account-id="ACCOUNT_ID" currency="USD"></paprel-account-form>
Successful saves emit both account-saved with the returned account and paprel:operation-success for host-owned feedback.