-
Notifications
You must be signed in to change notification settings - Fork 18
Feature/properties diff #2822
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 2025.4
Are you sure you want to change the base?
Feature/properties diff #2822
Changes from all commits
49f7322
bd6aacc
789eca0
97f70d3
e6bda92
8d99276
1716164
d7bf2b1
5643a41
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,5 +10,6 @@ | |
|
|
||
| export enum VersionCategoryName { | ||
| SYSTEM_DATA = 'systemData', | ||
| PROPERTIES = 'properties', | ||
| META = 'meta' | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -82,10 +82,41 @@ export const getFormattedDataStructure = async ({ objectId, layout, versionData, | |
| return result | ||
| } | ||
|
|
||
| const getPropertiesData = (): IFormattedDataStructureData[] => { | ||
| return versionData.properties.map((property) => { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I propose to add the fallback: This helps us avoid typing errors and prevent potential data mismatches. |
||
| let fieldtype = 'input' | ||
| let fieldValue = property.data | ||
|
|
||
| if (['asset', 'document', 'object'].includes(property.type)) { | ||
| if (property.data && typeof property.data === 'object' && 'id' in property.data) { | ||
| fieldValue = `${property.type} [ID: ${property.data.id}]` | ||
| } else { | ||
| fieldValue = property.data | ||
| } | ||
| } else if (property.type === 'bool') { | ||
| fieldtype = 'checkbox' | ||
| } | ||
|
|
||
| return { | ||
| fieldBreadcrumbTitle: 'properties', | ||
| fieldData: { | ||
| title: property.key, | ||
| name: property.key, | ||
| fieldtype, | ||
| config: property.config | ||
| } as any, | ||
| fieldValue, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In IFormattedDataStructureData, we have the fieldPath. Please just add |
||
| versionId, | ||
| versionCount | ||
| } | ||
| }) | ||
| } | ||
|
|
||
| const layoutData = await processLayoutData({ data: layout }) | ||
| const generalSystemData = getGeneralSystemData() | ||
| const propertiesData = getPropertiesData() | ||
|
|
||
| return [...generalSystemData, ...layoutData] | ||
| return [...generalSystemData, ...propertiesData, ...layoutData] | ||
| } | ||
|
|
||
| const getUniqFieldKey = (item: any): string => { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| import { api } from "@sdk/api"; | ||
| import { DataProperty } from "../properties/properties-api-slice-enhanced"; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need to remove this code ;) |
||
| export const addTagTypes = ["Versions"] as const; | ||
| const injectedRtkApi = api | ||
| .enhanceEndpoints({ | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
breadcrumbKey should be passed as an argument to renderFieldTitle, and isCommonSection can be deleted.