Skip to content

Commit a0b01fa

Browse files
feat(platform-objects): an organization sets the display decimal places of each standard unit of measure (ADR-0158 U6) (#37389)
<!-- claude-projects-attribution: {"github_login":"os-bill"} --> _Requested by **Bill** · [project thread](https://claude.ai/code/project/chan_016iMXWSZDzqWRWvWzdNo8wg?thread=cmsg_016iMXWSZDzqWRWvWzdNo8wg8ZBQe4UHadd2fGHGeWRW9V)_ repo:objectstack#5 · os-bill · session_01Utp6CbdHk3orAeensH6EzS Fixes #35498 Refs #35339 Clause-②: yes (widening) Metadata-protocol: none ## 维护者速读 - 管理员在设置的「配置」下、「计量单位」下面多一个「标准单位设置」页,可以给千克、克、件等国际标准单位各设一个显示小数位(比如珠宝行把克设成 3 位,砂石场把千克设成 0 位);所有成员都能看到这些设置,别的组织看不到。 - 这是「计量单位」第一期里你选的「组织可改,新开一处设置」那一项;数量按单位显示的卡片会读它,本改动本身还不改变任何页面上数字的显示。 - 只有组织管理员能新增、修改或删除,删除即清除;每次改动都记审计;组织里还留着设置时不能删除该组织,要先删掉设置,和汇率一样;可以直接撤回,因为还没有地方读取它。 - 需要你做的:无。 ## What changes - **`@objectstack/platform-objects`**: new organization-owned object `sys_standard_unit_setting` (ADR-0158 U6; Open item 10 option A), registered in the first manifest beside `sys_unit`. - `code`: text, max 3. A format rule admits exactly the `STANDARD_UNITS` codes in exact uppercase (`STANDARD_UNIT_SETTING_CODE_PATTERN`). Unique per organization, immutable after create. - `decimal_places`: 0 to 12, scale 0, required. - Field history on both columns. No tenancy opt-out, so `organization_id` is injected. - Setup → Configuration → Standard Unit Settings, directly under Units of Measure, with all eleven nav labels translated. The translation bundles are regenerated; the zh-CN object strings are translated. - **`@objectstack/plugin-security`**: - `member_default` reads it (read only). - `organization_admin` gets an explicit line: create, edit and delete. Clearing a setting is deleting its row. - **`@objectstack/spec`**: `sys_standard_unit_setting` joins `PLATFORM_OBJECTS_BY_PACKAGE['platform-objects']`. - **`@objectstack/cli`**: - The organization-ownership inventory lists the object as attributed. - The Setup nav count pin goes from 36 to 37. - `scripts/platform-object-tenancy-census.json` is regenerated. **Precedent: `sys_unit.decimal_places`.** The setting follows the same concept as an org unit's own decimal places: range 0 to 12, field history, member read, organization-admin write. The settings-key route (ADR-0144 D4's `localization.currency`) was measured and not followed, for four reasons. It is one org-wide scalar. Members read it only through a server projection. Its audit keeps hashes, not values. A per-code map would need a new settings column kind. The area approved this on claim amendments 7178077326 and 7178144166. **Deviations from the first shape, all on the card (amendments 7178077326, 7178144166, 7179529249):** - **No reader in this PR (amendment 7178077326).** The display card #35490 adds the reader with its first caller, and the ADR-0158 L4 clamp to the field's `scale` goes there. "A member can read them" is met by `member_default` read over the data API. - **Clear = delete, not set-to-null (amendment 7178144166).** An organization delete refuses `DELETE_RESTRICTED` while any organization-owned row remains. Only `sys_unit` is exempt, through the engine's own cascade. So a row with no delete would block the organization delete forever. This follows `sys_exchange_rate`'s posture: an admin deletes the setting, then the organization delete goes through. Pinned below. **Why `code` is text plus a format rule, not a select.** A select's option values are stored lowercase (`kgm`), while a unit code is stored in exact uppercase everywhere (U4). The rule's pattern is built from the `STANDARD_UNITS` keys, so a code the table gains is admitted with no second edit. First files to read, by risk: 1. `packages/plugins/plugin-security/src/objects/default-permission-sets.ts`: the two `sys_standard_unit_setting` lines. 2. `packages/platform-objects/src/system/sys-standard-unit-setting.object.ts`: the format rule and the immutable-code rule. 3. `packages/plugins/plugin-security/src/default-permission-sets.standard-unit-setting.integration.test.ts`: the tenancy posture it boots under. Two-minute check: `pnpm --filter @objectstack/plugin-security exec vitest run --maxWorkers=2 src/default-permission-sets.standard-unit-setting.integration.test.ts` prints 15 passed. It boots a real stack under the `isolated` tenancy posture. It shows each of these: - an admin and an owner set, change and clear a setting, each act landing in `sys_audit_log` with old and new values; - an admin changes and deletes a setting the owner created, and the owner one the admin created (the `organization_admin` line, no superuser bits); - a member reads, and is refused 403 `PERMISSION_DENIED` on every write; - another organization's setting is never read, changed or cleared; - a non-standard or lowercase code, an out-of-range value, a duplicate code and a changed code are each refused; - an organization delete refuses 409 `DELETE_RESTRICTED` naming this object, and succeeds once the setting is deleted. ## Tests **Rework round 1 (L1 7180149059, contract record 7180135740), head `98cbc47602`.** S1: the changeset sentence and the object's docblock now state the posture the isolation holds under (`isolated`; `single` raises no wall, `group` walls by membership, ADR-0105 D1), and N1 says the display card #35490 *will* read the value. S2: new cases where an admin and an owner each change and delete a setting the other created, plus the effective-permission map (delete kept, no `modifyAllRecords`). Affected tests re-run: the real-stack suite 15 passed (15), the declaration suite 14 passed (14). Ablation of the `organization_admin` line to `allowEdit: false, allowDelete: false` turned 8 of 15 red, the new cross-creator cases among them; restored, with the blob equal to HEAD and `git diff HEAD` empty. All readings below are on head `03e453e3`, and the tree is byte-identical to the commit. <details><summary>Package suites and typecheck (under the verify lock)</summary> - `@objectstack/plugin-security`, `src/default-permission-sets.standard-unit-setting.integration.test.ts`: Test Files 1 passed (1), Tests 12 passed (12). - `@objectstack/platform-objects`, full suite: Test Files 127 passed (127), Tests 2176 passed (2176). This includes the new `sys-standard-unit-setting.object.test.ts`. - `@objectstack/cli` unit layer, `src/utils/organization-ownership-inventory.test.ts` and `test/connect-agent-both-halves-wire.pin.test.ts`: Test Files 2 passed (2), Tests 28 passed (28). The CLI integration layer is left to CI. - `@objectstack/spec`, `src/system/constants/platform-object-names.test.ts`: Test Files 1 passed (1), Tests 14 passed (14). - Typecheck of `platform-objects`, `plugin-security`, `cli` and `spec`: run in one `set -e` batch that reached its last part, so each exited 0. `platform-objects` reports `check:test-typecheck: OK`. - The full `plugin-security` suite and `test:repo` are left to CI. </details> <details><summary>Ablation: the member read grant</summary> - `node scripts/ablation-replace.mjs` changed `member_default`'s `sys_standard_unit_setting` line to `allowRead: false`. Evidence: anchor x1 → x0, blob `d4a112e3` → `87691407`. - The suite went 2 failed | 10 passed. The member read test and the cross-organization read test both failed with `PermissionDeniedError`. - Restored: the blob equals HEAD (`d4a112e3`) and `git diff HEAD` is empty. </details> ## Acceptance notes - **The cross-organization pins need the `isolated` posture.** Under the default `single` posture no tenant wall stands, so another organization's row is visible. That is ADR-0105 D1's design, and every organization-owned object behaves the same way. The suite registers `tenancy: { posture: 'isolated' }`, as a deployment with organizations runs. The first run without it showed the other organization's row, which is how this was found. The `sys_unit` suite pins no cross-organization read. - **External members get no read**, the same as `sys_unit`. The display card #35490 already owes what an external member sees (comment 7030066814). - **No ADR text in this diff.** The ADR-0158 amendment (U3, U6 and L4 notes, and the Open item 10 answer) is drafted in the card report; the area lands it as row 7179515770 on the weekly ADR revisions card #37245 after this PR merges. - **Locale fill.** zh-CN carries translated object strings. The other nine locales carry the generator's English fill; nav labels are translated in all eleven. ## Verification <details><summary>Derived gate families (106 families, 212 commands) and the --ran reconciliation</summary> - `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` derived 212 commands from the tree at `03e453e3`. Each was run, with its exit code captured before any pipe. - 211 exited 0. Five of those first exited 3 because a build prerequisite was missing: `check-plugin-teardown-shape --self-test` needed an unshallowed clone, and `check:skill-examples`, `check:dual-build-cjs-loads`, `check:i18n-coverage` and `check:published-readme-exports` needed a full build. All five exited 0 after `git fetch --unshallow` and a full turbo build (122 of 122 tasks). - `pnpm check:platform-checklist` exited 1 on one problem: `areas/automation.json` cites `FlowItemMoreMenu.tsx#FlowItemMoreMenu`, a symbol the `ui/` file no longer declares. That is the base tree's own state: this diff touches neither `ui/` nor `docs/qa/`, and the cited file is the same on `origin/main`. - `--ran` printed: "106 derived famil(ies) accounted for — 106 run, 0 NOT-MEASURED (a DERIVED zero — all 106 recorded an exit code and none of them is 3)". </details> <details><summary>Overlap check</summary> - `node scripts/pm/overlap-check.mjs --branch=HEAD` against origin/main `02520ab480` printed "VERDICT clean exit 0". Two open PRs share a file, #37371 (`default-permission-sets.ts`) and #37366 (`platform-objects/src/plugin.ts`); both merge cleanly with this branch. </details> <details><summary>Not measured locally</summary> - The CLI `integration` layer, `test:repo`, the full `plugin-security` suite and the repo-wide lint are left to CI. - Dogfood: n/a. The title has no `!`, and Clause-② is a widening. </details> --- 🤖 Generated with [Claude Code](https://claude.com/claude-code) _Generated by [Claude Code](https://claude.ai/code/session_01Utp6CXM7nqtiQ3M9JqGAqL)_ <!-- signed: repo:objectstack#5 · os-bill · session_01Utp6CbdHk3orAeensH6EzS --> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 8061d83 commit a0b01fa

48 files changed

Lines changed: 1288 additions & 13 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
'@objectstack/spec': patch
3+
'@objectstack/platform-objects': patch
4+
'@objectstack/plugin-security': patch
5+
'@objectstack/cli': patch
6+
---
7+
8+
feat(platform-objects): an organization sets how many decimal places each standard unit of measure displays with (`sys_standard_unit_setting`, ADR-0158 U6)
9+
10+
Clause-②: yes (widening)
11+
Metadata-protocol: none
12+
13+
An organization administrator can now give any standard unit of measure (UN/ECE Recommendation 20 codes such as `KGM` or `H87`) its own display decimal places, for example 3 for grams at a jeweller or 0 for kilograms at a gravel yard. The value lives in the new organization-owned object `sys_standard_unit_setting` (Setup → Configuration → Standard Unit Settings): one row per standard code, `decimal_places` a whole number from 0 to 12. Deleting the row clears the setting. The organization's own units keep their decimal places on their own `sys_unit` row.
14+
15+
- Every member reads the settings (`member_default`, read only); organization administrators and owners create, edit and delete them (`organization_admin`). External members get no read, as with `sys_unit`.
16+
- `organization_id` is injected and stamped on every row. Under the `isolated` tenancy posture the tenant wall (ADR-0095 D1) confines every read and write to the caller's organization, so another organization's setting is never read. As with every organization-owned object (ADR-0105 D1), the `single` posture raises no wall, and the `group` posture walls by membership, so a member of several organizations can read each one's settings.
17+
- Every set, change and clear is written to `sys_audit_log`, with field history on both columns.
18+
- The value is a display default only (ADR-0158 L4): a field's own `scale` stays the storage ceiling, and nothing is rounded at write by it. No reader ships in this change; the quantity display card (#35490) will read it.
19+
- Like an exchange rate, a setting is a record the organization owns, so an organization delete is refused (`DELETE_RESTRICTED`) until its settings are deleted.

‎packages/cli/src/utils/organization-ownership-inventory.ts‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -860,6 +860,11 @@ export const ORGANIZATION_OWNERSHIP_INVENTORY: readonly InventoryEntry[] = [
860860
// organization's administrators author its own units; the platform ships no
861861
// row, and no parent row anchors a unit.
862862
{ object: 'sys_unit', census: PMAIN, fate: 'attribution', citation: `${CENSUS_MAIN} (in reach, added since the first census); ${D10_SINGLE}`, anchors: [] },
863+
// Standard unit settings (`@objectstack/platform-objects`, ADR-0158 U6 and
864+
// Open item 10): an organization's administrators set the display decimal
865+
// places of a standard unit; the platform ships no row, and no parent row
866+
// anchors a setting.
867+
{ object: 'sys_standard_unit_setting', census: PMAIN, fate: 'attribution', citation: `${CENSUS_MAIN} (in reach, added since the first census); ${D10_SINGLE}`, anchors: [] },
863868
// Tasks and notes (`@objectstack/platform-objects` `work/`): members write
864869
// them, and the organization column is stamped from the writing context; no
865870
// parent row anchors a task or a note (step 1 links neither to a record).

‎packages/cli/test/connect-agent-both-halves-wire.pin.test.ts‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -283,13 +283,15 @@ describe('#17647 — Connect-an-Agent visibility: BOTH halves, over the wire', (
283283
// +2, `group_apps` and `nav_packages`; 37 until #33933 moved the
284284
// Knowledge entry, `nav_settings_knowledge`, to
285285
// `@objectstack/service-knowledge`, which contributes it only where the
286-
// knowledge service is mounted.)
286+
// knowledge service is mounted; 36 until the Standard Unit Settings
287+
// entry, `nav_standard_unit_settings`, joined Configuration, ADR-0158
288+
// Open item 10.)
287289
// `nav_settings_branding` is not among them, and not because of a
288290
// tenancy wall (this harness boots none): since #24766 it is
289291
// contributed by `@objectstack/service-settings` together with the
290292
// `branding` namespace, offered only where no organization wall stands,
291293
// and this harness composes platform-objects and the MCP bundle alone.
292-
expect(allowedIds).toHaveLength(36);
294+
expect(allowedIds).toHaveLength(37);
293295
expect(allowedIds).toContain('nav_packages');
294296
expect(groupChildren(setupAllowed.body?.item, 'group_apps')).toEqual(['nav_packages']);
295297
expect(allowedIds).toContain('nav_public_forms');
@@ -300,6 +302,7 @@ describe('#17647 — Connect-an-Agent visibility: BOTH halves, over the wire', (
300302
expect(allowedIds).not.toContain('nav_settings_knowledge');
301303
expect(allowedIds).toContain('nav_recycle_bin');
302304
expect(allowedIds).toContain('nav_units_of_measure');
305+
expect(allowedIds).toContain('nav_standard_unit_settings');
303306
expect(allowedIds).not.toContain('nav_settings_branding');
304307
// The two per-user stores are reached from the User record page, not
305308
// from Setup's menu (#23803).
@@ -322,8 +325,8 @@ describe('#17647 — Connect-an-Agent visibility: BOTH halves, over the wire', (
322325
expect(withAccountHalf.statusCode).toBe(200);
323326
expect(withoutAccountHalf.statusCode).toBe(200);
324327
expect(navIds(withAccountHalf.body?.item)).toEqual(navIds(withoutAccountHalf.body?.item));
325-
// 36: the composition the count in the test above states.
326-
expect(navIds(withAccountHalf.body?.item)).toHaveLength(36);
328+
// 37: the composition the count in the test above states.
329+
expect(navIds(withAccountHalf.body?.item)).toHaveLength(37);
327330

328331
// The mechanism behind the invariance, asserted rather than assumed:
329332
// the bundle aims exactly one contribution at `setup` and one at

‎packages/platform-objects/scripts/i18n-extract.config.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ import {
204204
SysMigration,
205205
SysExchangeRate,
206206
SysUnit,
207+
SysStandardUnitSetting,
207208
SysWorkCalendar,
208209
SysWorkCalendarException,
209210
} from '../src/system/index.js';
@@ -368,6 +369,7 @@ const config: ObjectStackDefinition = defineStack({
368369
SysMigration,
369370
SysExchangeRate,
370371
SysUnit,
372+
SysStandardUnitSetting,
371373
SysWorkCalendar,
372374
SysWorkCalendarException,
373375
SysTask,

‎packages/platform-objects/src/apps/setup-nav.contributions.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,10 @@ export const SETUP_NAV_CONTRIBUTIONS: NavigationContribution[] = [
159159
// `requiredPermissions`: the object grant decides (every member reads,
160160
// organization admins write), and Setup itself already needs `setup.access`.
161161
{ id: 'nav_units_of_measure', type: 'object', label: 'Units of Measure', objectName: 'sys_unit', viewName: 'all_units', icon: 'ruler' },
162+
// [ADR-0158 U6, Open item 10] The decimal places each standard unit
163+
// displays with in the organization, next to the organization's own
164+
// units. No `requiredPermissions`, for the same reason as the entry above.
165+
{ id: 'nav_standard_unit_settings', type: 'object', label: 'Standard Unit Settings', objectName: 'sys_standard_unit_setting', viewName: 'all_settings', icon: 'ruler' },
162166
// [ADR-0157 D1, D3] Working calendars and their holidays, beside the
163167
// other organization reference data Localization governs. The exceptions
164168
// get their own entry because their list page is the import door for a

‎packages/platform-objects/src/apps/translations/ar.objects.generated.ts‎

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4505,6 +4505,42 @@ export const arObjects: NonNullable<TranslationData['objects']> = {
45054505
}
45064506
}
45074507
},
4508+
sys_standard_unit_setting: {
4509+
label: "Standard Unit Setting",
4510+
pluralLabel: "Standard Unit Settings",
4511+
description: "How many decimal places a quantity in a standard unit of measure (KGM, H87, …) displays with in this organization — one row per standard unit the organization has set.",
4512+
fields: {
4513+
id: {
4514+
label: "ID"
4515+
},
4516+
code: {
4517+
label: "Standard Unit",
4518+
help: "The standard unit code (UN/ECE Recommendation 20) in exact uppercase, for example KGM for kilogram, GRM for gram or H87 for piece. The organization's own units carry their decimal places on the unit itself, under Units of Measure. The code cannot be changed after the setting is created."
4519+
},
4520+
decimal_places: {
4521+
label: "Decimal Places",
4522+
help: "How many decimal places a quantity in this unit displays with by default. It never rounds a stored value, and a field's own decimal places still limit what is stored and shown. Delete the setting to clear it."
4523+
}
4524+
},
4525+
_views: {
4526+
all_settings: {
4527+
label: "All",
4528+
description: "Decimal places a quantity in a standard unit displays with in this organization. A field's own decimal places still limit what is stored and shown.",
4529+
emptyState: {
4530+
title: "No standard unit settings yet",
4531+
message: "Standard units display with the decimal places of the field that holds the quantity. Add a setting to give a standard unit, such as grams or kilograms, its own number of decimal places."
4532+
}
4533+
}
4534+
},
4535+
_validations: {
4536+
standard_unit_setting_code_standard: {
4537+
message: "Enter a standard unit code in exact uppercase, for example KGM or H87. An organization's own unit carries its decimal places on the unit itself, under Units of Measure."
4538+
},
4539+
standard_unit_setting_code_immutable: {
4540+
message: "A setting's unit cannot be changed after it is created. Delete it and add a setting for the other unit instead."
4541+
}
4542+
}
4543+
},
45084544
sys_work_calendar: {
45094545
label: "تقويم العمل",
45104546
pluralLabel: "تقويمات العمل",

‎packages/platform-objects/src/apps/translations/ar.source-hashes.generated.ts‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,20 @@ export const arGeneratedSourceHashes: Readonly<Record<string, string>> = {
123123
"objects.sys_sso_provider._actions.register_sso_provider.params.tokenEndpoint.label": "7cba958c95cef146",
124124
"objects.sys_sso_provider.fields.sign_out_of_idp.help": "ab8ff5fce3001c81",
125125
"objects.sys_sso_provider.fields.sign_out_of_idp.label": "212587b8191bb91b",
126+
"objects.sys_standard_unit_setting._validations.standard_unit_setting_code_immutable.message": "30dca7b5af0102a7",
127+
"objects.sys_standard_unit_setting._validations.standard_unit_setting_code_standard.message": "b8d744ecf7e2fd14",
128+
"objects.sys_standard_unit_setting._views.all_settings.description": "b2c6e313dfbaab6f",
129+
"objects.sys_standard_unit_setting._views.all_settings.emptyState.message": "4973c431bef4fb16",
130+
"objects.sys_standard_unit_setting._views.all_settings.emptyState.title": "c744be790895b52b",
131+
"objects.sys_standard_unit_setting._views.all_settings.label": "6d6f653f8264ab17",
132+
"objects.sys_standard_unit_setting.description": "8be70d71b4824c8a",
133+
"objects.sys_standard_unit_setting.fields.code.help": "171e0116c9d1a103",
134+
"objects.sys_standard_unit_setting.fields.code.label": "8101f71ea11455f1",
135+
"objects.sys_standard_unit_setting.fields.decimal_places.help": "8f87ae85775e6bb4",
136+
"objects.sys_standard_unit_setting.fields.decimal_places.label": "c376c70ccdda79b3",
137+
"objects.sys_standard_unit_setting.fields.id.label": "00b0385c9c152888",
138+
"objects.sys_standard_unit_setting.label": "97ace8a464552c96",
139+
"objects.sys_standard_unit_setting.pluralLabel": "507e2db8f56dcaf0",
126140
"objects.sys_unit._validations.unit_code_immutable.message": "c8ce340a53339ba2",
127141
"objects.sys_unit._validations.unit_code_organization_namespace.message": "a1feea8fefab1228",
128142
"objects.sys_unit._validations.unit_dimension_immutable.message": "b12c97027d369d60",

‎packages/platform-objects/src/apps/translations/ar.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ export const ar: TranslationData = {
9595
nav_settings_localization: { label: 'الترجمة والإعدادات المحلية' },
9696
nav_exchange_rates: { label: 'أسعار الصرف' },
9797
nav_units_of_measure: { label: 'وحدات القياس' },
98+
nav_standard_unit_settings: { label: 'إعدادات الوحدات القياسية' },
9899
nav_work_calendars: { label: 'تقويمات العمل' },
99100
nav_work_calendar_exceptions: { label: 'استثناءات التقويم' },
100101
nav_settings_company: { label: 'الشركة' },

‎packages/platform-objects/src/apps/translations/bundle-ownership.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ const OWNED_OBJECTS = new Set([
5656
// metadata (sys_view_definition retired as inert, ADR-0131 D13)
5757
'sys_metadata', 'sys_metadata_history', 'sys_metadata_audit', 'sys_metadata_commit',
5858
// system
59-
'sys_setting', 'sys_platform_setting', 'sys_secret', 'sys_setting_audit', 'sys_platform_setting_audit', 'sys_migration', 'sys_exchange_rate', 'sys_unit',
59+
'sys_setting', 'sys_platform_setting', 'sys_secret', 'sys_setting_audit', 'sys_platform_setting_audit', 'sys_migration', 'sys_exchange_rate', 'sys_unit', 'sys_standard_unit_setting',
6060
'sys_work_calendar', 'sys_work_calendar_exception',
6161
// work — the built-in tasks and notes
6262
'sys_task', 'sys_note',

‎packages/platform-objects/src/apps/translations/de.objects.generated.ts‎

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4505,6 +4505,42 @@ export const deObjects: NonNullable<TranslationData['objects']> = {
45054505
}
45064506
}
45074507
},
4508+
sys_standard_unit_setting: {
4509+
label: "Standard Unit Setting",
4510+
pluralLabel: "Standard Unit Settings",
4511+
description: "How many decimal places a quantity in a standard unit of measure (KGM, H87, …) displays with in this organization — one row per standard unit the organization has set.",
4512+
fields: {
4513+
id: {
4514+
label: "ID"
4515+
},
4516+
code: {
4517+
label: "Standard Unit",
4518+
help: "The standard unit code (UN/ECE Recommendation 20) in exact uppercase, for example KGM for kilogram, GRM for gram or H87 for piece. The organization's own units carry their decimal places on the unit itself, under Units of Measure. The code cannot be changed after the setting is created."
4519+
},
4520+
decimal_places: {
4521+
label: "Decimal Places",
4522+
help: "How many decimal places a quantity in this unit displays with by default. It never rounds a stored value, and a field's own decimal places still limit what is stored and shown. Delete the setting to clear it."
4523+
}
4524+
},
4525+
_views: {
4526+
all_settings: {
4527+
label: "All",
4528+
description: "Decimal places a quantity in a standard unit displays with in this organization. A field's own decimal places still limit what is stored and shown.",
4529+
emptyState: {
4530+
title: "No standard unit settings yet",
4531+
message: "Standard units display with the decimal places of the field that holds the quantity. Add a setting to give a standard unit, such as grams or kilograms, its own number of decimal places."
4532+
}
4533+
}
4534+
},
4535+
_validations: {
4536+
standard_unit_setting_code_standard: {
4537+
message: "Enter a standard unit code in exact uppercase, for example KGM or H87. An organization's own unit carries its decimal places on the unit itself, under Units of Measure."
4538+
},
4539+
standard_unit_setting_code_immutable: {
4540+
message: "A setting's unit cannot be changed after it is created. Delete it and add a setting for the other unit instead."
4541+
}
4542+
}
4543+
},
45084544
sys_work_calendar: {
45094545
label: "Arbeitskalender",
45104546
pluralLabel: "Arbeitskalender",

0 commit comments

Comments
 (0)