Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .changeset/27916-showcase-owner-email-label.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
'@objectstack/example-showcase': patch
---

Clause-②: no
Metadata-protocol: none

The showcase's project and invoice objects no longer show two fields called "Owner". Their own `owner`
text field, which holds the owner's email address, is now labelled "Owner Email" (负责人邮箱 in zh-CN),
so the platform's `owner_id` user lookup is the one field labelled "Owner" in the field grid, pickers and
filters. The API name stays `owner`, so seeded rows, flows, permission rules and anything else that
reads `record.owner` are unchanged.
5 changes: 3 additions & 2 deletions examples/app-showcase/src/data/objects/invoice.object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,9 @@ export const Invoice = ObjectSchema.create({
// permission set scopes invoice SELECT to `owner = current_user.email` (email
// is the unique, seedable identifier), so a contributor sees only their own
// invoices; because `showcase_invoice_line` is `controlled_by_parent`, the
// lines follow automatically (ADR-0055). Mirror of `project.owner`.
owner: Field.text({ label: 'Owner', maxLength: 200 }),
// lines follow automatically (ADR-0055). Mirror of `project.owner`, and
// labelled apart from the platform-injected `owner_id` lookup ("Owner").
owner: Field.text({ label: 'Owner Email', maxLength: 200 }),
// Region the sale was booked in — the invoice-side target of the Revenue
// Pulse dashboard's shared "region" filter (framework#2501): accounts map
// the same filter to their own `sales_region` via `filterBindings`.
Expand Down
4 changes: 3 additions & 1 deletion examples/app-showcase/src/data/objects/project.object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ export const Project = ObjectSchema.create({
}),
start_date: Field.date({ label: 'Start Date' }),
end_date: Field.date({ label: 'Target End Date' }),
owner: Field.text({ label: 'Owner', maxLength: 200 }),
// The owner's email, as text. Labelled apart from the platform-injected
// `owner_id` lookup, which is the one field here labelled "Owner".
owner: Field.text({ label: 'Owner Email', maxLength: 200 }),
// Multi-value fields — the payload for the grid's *bulk-edit* showcase. A
// multiselect (fixed options) and a multi-user field are exactly the two
// shapes that, before #2185, the bulk dialog could not set: its people /
Expand Down
8 changes: 4 additions & 4 deletions examples/app-showcase/src/system/translations/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const ShowcaseTranslationBundle = {
fields: {
name: { label: 'Project Name' },
account: { label: 'Account' },
owner: { label: 'Owner' },
owner: { label: 'Owner Email' },
status: { label: 'Status' },
health: { label: 'Health' },
budget: { label: 'Budget' },
Expand Down Expand Up @@ -226,7 +226,7 @@ export const ShowcaseTranslationBundle = {
name: { label: 'Invoice Number' },
account: { label: 'Account' },
contact: { label: 'Contact' },
owner: { label: 'Owner' },
owner: { label: 'Owner Email' },
status: { label: 'Status' },
issued_on: { label: 'Issued On' },
tax_rate: { label: 'Tax Rate (%)' },
Expand Down Expand Up @@ -383,7 +383,7 @@ export const ShowcaseTranslationBundle = {
fields: {
name: { label: '项目名称' },
account: { label: '客户' },
owner: { label: '负责人' },
owner: { label: '负责人邮箱' },
status: {
label: '状态',
options: { planned: '计划中', active: '进行中', on_hold: '已暂停', completed: '已完成', cancelled: '已取消' },
Expand Down Expand Up @@ -723,7 +723,7 @@ export const ShowcaseTranslationBundle = {
name: { label: '发票号' },
account: { label: '客户' },
contact: { label: '联系人' },
owner: { label: '负责人' },
owner: { label: '负责人邮箱' },
status: { label: '状态' },
issued_on: { label: '开具日期' },
tax_rate: { label: '税率 (%)' },
Expand Down
Loading