Include source-only forms in IDE rendering
This commit is contained in:
@@ -825,6 +825,14 @@ function ownerQualifiedNameForForm(formQualifiedName: string) {
|
||||
return parts.length > 1 ? parts.slice(0, -1).join(".") : formQualifiedName;
|
||||
}
|
||||
|
||||
function looksLikeObjectFormQualifiedName(qualifiedName: string) {
|
||||
const parts = qualifiedName.split(".");
|
||||
if (parts[0] === "ОбщаяФорма") {
|
||||
return parts.length === 2;
|
||||
}
|
||||
return parts.length >= 3;
|
||||
}
|
||||
|
||||
export async function getProjectWorkspaceData(projectId: string, apiUrl = resolveApiUrl(), selectedRoutine?: string | null, activeMode?: string | null) {
|
||||
const selectedRoutineName = selectedRoutine?.trim() ?? null;
|
||||
const workspaceMode = activeMode?.trim() || "overview";
|
||||
@@ -862,7 +870,10 @@ export async function getProjectWorkspaceData(projectId: string, apiUrl = resolv
|
||||
const selectedFormQualifiedName =
|
||||
selectedTreeNode?.kind === "FORM"
|
||||
? selectedTreeNode.qualified_name
|
||||
: selectedRoutineName && selectedRoutineName.split(".").at(-1)?.toLocaleLowerCase("ru-RU").includes("форма")
|
||||
: selectedRoutineName && (
|
||||
selectedRoutineName.split(".").at(-1)?.toLocaleLowerCase("ru-RU").includes("форма") ||
|
||||
looksLikeObjectFormQualifiedName(selectedRoutineName)
|
||||
)
|
||||
? selectedRoutineName
|
||||
: null;
|
||||
const selectedObjectName = selectedFormQualifiedName
|
||||
|
||||
Reference in New Issue
Block a user