diff --git a/.changeset/27916-showcase-owner-email-label.md b/.changeset/27916-showcase-owner-email-label.md new file mode 100644 index 00000000000..282e5a03da0 --- /dev/null +++ b/.changeset/27916-showcase-owner-email-label.md @@ -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. diff --git a/examples/app-showcase/src/data/objects/invoice.object.ts b/examples/app-showcase/src/data/objects/invoice.object.ts index cae5cc4acd4..6737e01b7d4 100644 --- a/examples/app-showcase/src/data/objects/invoice.object.ts +++ b/examples/app-showcase/src/data/objects/invoice.object.ts @@ -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`. diff --git a/examples/app-showcase/src/data/objects/project.object.ts b/examples/app-showcase/src/data/objects/project.object.ts index fdc0b0126f0..9964f9805f6 100644 --- a/examples/app-showcase/src/data/objects/project.object.ts +++ b/examples/app-showcase/src/data/objects/project.object.ts @@ -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 / diff --git a/examples/app-showcase/src/system/translations/index.ts b/examples/app-showcase/src/system/translations/index.ts index 82f1e71767a..b0573e19c27 100644 --- a/examples/app-showcase/src/system/translations/index.ts +++ b/examples/app-showcase/src/system/translations/index.ts @@ -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' }, @@ -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 (%)' }, @@ -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: '已取消' }, @@ -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: '税率 (%)' },