Company
- Code: SET-COM
- Module: Settings
- Type: Configuration
1. Overview
Company is the tenant’s official profile: code, name, contact, address, and logo. There is only one profile per tenant, and its data is used consistently throughout the application, including on transaction documents such as Purchase Orders.
Expected outcome: the tenant’s business identity appears consistently on every screen and document, and can be updated by admins themselves.
2. Problem
Without a centralized company profile, the business identity on documents and in the app easily becomes inconsistent or outdated. As a result:
- Documents sent to suppliers (for example PO PDFs) need an official and uniform company identity.
- A single-color logo is often unreadable in dark or light mode.
- Changes to the company address or phone number must be reflected immediately in new documents.
3. Goals & Non-goals
3.1 Goals
- The company identity appears uniformly throughout the app and on documents sent to external parties.
- Changes to company data take effect immediately on documents created afterwards.
- The logo stays readable in both light and dark themes.
- Profile updates are done by admins themselves, without involving the technical team.
3.2 Non-goals
- More than one company or legal entity within one tenant.
- Legal data such as tax ID (NPWP) and business ID (NIB), as well as bank accounts.
- Profile version history beyond the activity log records.
4. Business Rules
Business rules are the set of provisions and constraints that apply to Company throughout the application, on every screen and action that involves it, whoever performs it. These rules are the single source of truth: if another part of this PRD appears to differ, the rules here prevail.
- BR-01 Each tenant has only one company profile.
- BR-02 Code, name, phone number, and full address are required. Email may be left empty, but must be in a valid format if filled in.
- BR-03 The logo only accepts image files, one file for each display mode, maximum 1 MB.
- BR-04 Profile changes take effect throughout the app immediately after saving.
- BR-05 Documents created after a change use the latest profile; documents downloaded earlier do not change.
- BR-06 Every profile change is recorded along with its actor and time.
5. Flow
5.1 Main Flowchart
- View Profile — The current company profile is shown, including the logo for both display modes along with its contact and address data.
- Edit Profile — An authorized admin opens the profile to update it.
- Fill In Data and Logo — Company data is edited and the logo is replaced if needed, one file each for light and dark mode.
- Validation — Inputs are checked before saving, including completeness of required data and email format.
- Profile Saved — The latest profile is used immediately throughout the app and on documents created afterwards.
6. Document Structure
6.1 General
| Field | Type | Required | Default | Rules |
|---|---|---|---|---|
| Code | Text | Yes | — | Unique company identifier (BR-02) |
| Company Name | Text | Yes | — | Legal or registered name (BR-02) |
| Phone Number | Text | Yes | — | Main company contact (BR-02) |
| Text | No | — | Must be in a valid format if filled in (BR-02) | |
| Website | Text | No | — | — |
| Full Address | Text | Yes | — | Company business address (BR-02) |
| Light Mode Logo | File | No | — | One image file, maximum 1 MB (BR-03) |
| Dark Mode Logo | File | No | — | One image file, maximum 1 MB (BR-03) |
7. UI Structure
This section defines how Company is displayed and operated: form controls along with their option sources. This section only governs display and interaction; content and value rules still follow Document Structure.
7.1 Form & Details
A single page with view and edit modes. Empty optional fields appear as ”-” in view mode. Actions: Edit Data (view), Save (edit), Activity Logs.
| Field | Control | Options Source | Behavior |
|---|---|---|---|
| Code | Text Input | — | — |
| Company Name | Text Input | — | — |
| Phone Number | Text Input | — | — |
| Text Input | — | — | |
| Website | Text Input | — | Accepted as is, without URL format validation |
| Full Address | Textarea | — | — |
| Light Mode Logo | File Uploader | — | One image file |
| Dark Mode Logo | File Uploader | — | One image file |
8. User Stories
US-01 - View the company profile
As an admin, I want to see the company profile, so that I know the data used on documents.
| ID | Acceptance criteria |
|---|---|
| AC-01.1 | Users with the view permission see all profile fields along with light and dark logo previews. |
| AC-01.2 | Empty optional fields appear as ”-”. |
US-02 - Edit the company profile
As an owner, I want to update the company profile, so that the identity in the app and on documents is always correct.
| ID | Acceptance criteria |
|---|---|
| AC-02.1 | The Edit Data button only appears for users with the update permission. |
| AC-02.2 | Code, name, phone, and full address are required; email is optional but must be in a valid format if filled in. |
| AC-02.3 | The light and dark logos each accept one image file. |
| AC-02.4 | Email and website that are cleared are sent as null. |
| AC-02.5 | On success, a success toast appears, the tenant cache is refreshed, and the user returns to view mode. |
| AC-02.6 | Error messages are shown on the related fields. |
| AC-02.7 | Only one logo uploaded — the other mode does not display a logo. |
| AC-02.8 | Logo file larger than 1 MB or not an image — rejected by the uploader before submitting. |
| AC-02.9 | A logo file in use is deleted from the File Manager — Needs confirmation: the behavior; the file is recorded under “Used In” in the File Manager. |
| AC-02.10 | Two admins edit the profile at the same time — the last save wins. |
| AC-02.11 | Website filled in without http(s):// — accepted as is; there is no URL format validation. |
US-03 - Change history
As an owner, I want to see the company activity log, so that profile changes can be traced.
| ID | Acceptance criteria |
|---|---|
| AC-03.1 | The Activity Logs button in view mode opens the log panel with event, actor, and date range filters. |
9. User Scenarios
| Role | Scenario |
|---|---|
| Owner | Fills in the company profile when using the system for the first time |
| Owner | Uploads light and dark logos so they look good in both themes |
| Admin | Updates the company phone number, then reprints the PO PDF with the new data |
| Auditor | Checks who changed the company address |
10. Permissions & Actions
10.1 Permission by Action
| Action | Permission | Condition |
|---|---|---|
| View Company Profile | settings:company:view:any | — |
| View Activity Logs | settings:company:view:any | — |
| Edit Company Profile | settings:company:update:any | — |
11. Notifications
This feature does not trigger any notifications.
12. Dependencies
Related PRDs
- File Manager — storage for logo files.
- Appearance — shares tenant initialization data.
- Purchase Order — the PDF header uses the company profile.
- Activity Logs — the source of the activity log.
Effects on other modules
- The logo appears in the sidebar, store switcher, user greeting, and auth pages.
- PDF document headers use the company profile.