From 0681eb94795042cdd69388cca6bf00548a4397a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sedat=20=C3=96ZT=C3=9CRK?= <76204082+iamsedatozturk@users.noreply.github.com> Date: Tue, 2 Dec 2025 12:56:11 +0300 Subject: [PATCH] =?UTF-8?q?Tree=20ile=20Gantt=20birbirinden=20ayr=C4=B1ld?= =?UTF-8?q?=C4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../GridOptionsDto/GanttOptionDto.cs | 62 ++++ .../GridOptionsDto/GridOptionsDto.cs | 15 +- .../ListForms/ListFormEditTabs.cs | 1 + .../Administration/ListFormsAppService.cs | 4 + .../Seeds/LanguagesData.json | 10 +- .../Seeds/ListFormSeeder_Project.cs | 2 +- .../Entities/Host/ListForm.cs | 3 +- ....cs => 20251202094339_Initial.Designer.cs} | 5 +- ...6_Initial.cs => 20251202094339_Initial.cs} | 1 + .../PlatformDbContextModelSnapshot.cs | 3 + ui/src/proxy/admin/list-form/options.ts | 2 + ui/src/proxy/form/models.ts | 12 + ui/src/views/admin/listForm/edit/FormEdit.tsx | 11 +- .../admin/listForm/edit/FormTabGantt.tsx | 300 +++++++++++++++++ .../views/admin/listForm/edit/FormTabTree.tsx | 198 +++++++++++ .../admin/listForm/edit/FormTabTreeGantt.tsx | 315 ------------------ ui/src/views/list/GanttView.tsx | 18 +- 17 files changed, 630 insertions(+), 332 deletions(-) create mode 100644 api/src/Erp.Platform.Application.Contracts/ListForms/GridOptionsDto/GanttOptionDto.cs rename api/src/Erp.Platform.EntityFrameworkCore/Migrations/{20251201104936_Initial.Designer.cs => 20251202094339_Initial.Designer.cs} (99%) rename api/src/Erp.Platform.EntityFrameworkCore/Migrations/{20251201104936_Initial.cs => 20251202094339_Initial.cs} (99%) create mode 100644 ui/src/views/admin/listForm/edit/FormTabGantt.tsx create mode 100644 ui/src/views/admin/listForm/edit/FormTabTree.tsx delete mode 100644 ui/src/views/admin/listForm/edit/FormTabTreeGantt.tsx diff --git a/api/src/Erp.Platform.Application.Contracts/ListForms/GridOptionsDto/GanttOptionDto.cs b/api/src/Erp.Platform.Application.Contracts/ListForms/GridOptionsDto/GanttOptionDto.cs new file mode 100644 index 00000000..5ad83d52 --- /dev/null +++ b/api/src/Erp.Platform.Application.Contracts/ListForms/GridOptionsDto/GanttOptionDto.cs @@ -0,0 +1,62 @@ +namespace Erp.Platform.ListForms; + +/// +/// TreeList için özel ayarları içerir +/// +public class GanttOptionDto +{ + /// + /// Parent kaydı belirten field adı (örn: "Id") + /// + public string KeyExpr { get; set; } + /// + /// Parent kaydı belirten field adı (örn: "parentId") + /// + public string ParentIdExpr { get; set; } + + /// + /// Alt kayıtların olup olmadığını belirten field adı (opsiyonel) + /// + public string HasItemsExpr { get; set; } + + /// + /// Root (en üst) seviyedeki kayıtların parent değeri (genelde null veya 0) + /// + public object RootValue { get; set; } = null; + + /// + /// Başlangıçta açık olacak node'ların ID'leri + /// + public object[] ExpandedRowKeys { get; set; } = []; + + /// + /// Tüm node'ları başlangıçta açık göster + /// + public bool AutoExpandAll { get; set; } = false; + + /// + /// Alt kayıtlar seçildiğinde parent kayıtları da seç (recursive selection) + /// + public bool RecursiveSelection { get; set; } = false; + + /// + /// Başlık alanı (örn: "Title") + /// + public string TitleExpr { get; set; } + + /// + /// Başlangıç Tarihi ifadesi (örn: "0001-01-01") + /// + public string StartExpr { get; set; } + + /// + /// Bitiş Tarihi ifadesi (örn: "9999-12-31") + /// + public string EndExpr { get; set; } + + /// + /// İlerleme ifadesi (örn: "%50") + /// + public string ProgressExpr { get; set; } +} + diff --git a/api/src/Erp.Platform.Application.Contracts/ListForms/GridOptionsDto/GridOptionsDto.cs b/api/src/Erp.Platform.Application.Contracts/ListForms/GridOptionsDto/GridOptionsDto.cs index b9aa694e..e58299c8 100644 --- a/api/src/Erp.Platform.Application.Contracts/ListForms/GridOptionsDto/GridOptionsDto.cs +++ b/api/src/Erp.Platform.Application.Contracts/ListForms/GridOptionsDto/GridOptionsDto.cs @@ -25,7 +25,7 @@ public class GridOptionsDto : AuditedEntityDto public int Width { get; set; } public int Height { get; set; } public bool FullHeight { get; set; } - + //[TextArea] public string Description { get; set; } @@ -164,6 +164,19 @@ public class GridOptionsDto : AuditedEntityDto set { TreeOptionJson = JsonSerializer.Serialize(value); } } + [JsonIgnore] + public string GanttOptionJson { get; set; } + public GanttOptionDto GanttOptionDto + { + get + { + if (!string.IsNullOrEmpty(GanttOptionJson)) + return JsonSerializer.Deserialize(GanttOptionJson); + return new GanttOptionDto(); + } + set { GanttOptionJson = JsonSerializer.Serialize(value); } + } + [JsonIgnore] public string PagerOptionJson { get; set; } public GridPagerOptionDto PagerOptionDto diff --git a/api/src/Erp.Platform.Application.Contracts/ListForms/ListFormEditTabs.cs b/api/src/Erp.Platform.Application.Contracts/ListForms/ListFormEditTabs.cs index 8e62ff0c..d0407d0a 100644 --- a/api/src/Erp.Platform.Application.Contracts/ListForms/ListFormEditTabs.cs +++ b/api/src/Erp.Platform.Application.Contracts/ListForms/ListFormEditTabs.cs @@ -47,6 +47,7 @@ public class ListFormEditTabs public const string ColumnForm = "column"; public const string PivotForm = "pivot"; public const string TreeForm = "tree"; + public const string GanttForm = "gantt"; public const string PagerForm = "pager"; public const string StateForm = "state"; public const string SubFormJsonRow = "subForm"; diff --git a/api/src/Erp.Platform.Application/ListForms/Administration/ListFormsAppService.cs b/api/src/Erp.Platform.Application/ListForms/Administration/ListFormsAppService.cs index fb10c5ff..8d2ce695 100644 --- a/api/src/Erp.Platform.Application/ListForms/Administration/ListFormsAppService.cs +++ b/api/src/Erp.Platform.Application/ListForms/Administration/ListFormsAppService.cs @@ -151,6 +151,10 @@ public class ListFormsAppService : CrudAppService< { item.TreeOptionJson = JsonSerializer.Serialize(input.TreeOptionDto); } + else if (input.EditType == ListFormEditTabs.GanttForm) + { + item.GanttOptionJson = JsonSerializer.Serialize(input.GanttOptionDto); + } else if (input.EditType == ListFormEditTabs.PagerForm) { item.PageSize = input.PageSize; diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/LanguagesData.json b/api/src/Erp.Platform.DbMigrator/Seeds/LanguagesData.json index 7bfc0265..30cc8951 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/LanguagesData.json +++ b/api/src/Erp.Platform.DbMigrator/Seeds/LanguagesData.json @@ -3592,8 +3592,14 @@ { "resourceName": "Platform", "key": "ListForms.ListFormEdit.TabTree", - "en": "Tree & Gantt", - "tr": "Ağaç & Gantt" + "en": "Tree", + "tr": "Ağaç" + }, + { + "resourceName": "Platform", + "key": "ListForms.ListFormEdit.TabGantt", + "en": "Gantt", + "tr": "Gantt" }, { "resourceName": "Platform", diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Project.cs b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Project.cs index e52a4a19..dd5af936 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Project.cs +++ b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Project.cs @@ -2103,7 +2103,7 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency SelectionJson = DefaultSelectionSingleJson, ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(listFormName), - TreeOptionJson = JsonSerializer.Serialize(new TreeOptionDto + GanttOptionJson = JsonSerializer.Serialize(new GanttOptionDto { KeyExpr = "Id", ParentIdExpr = "ParentId", diff --git a/api/src/Erp.Platform.Domain/Entities/Host/ListForm.cs b/api/src/Erp.Platform.Domain/Entities/Host/ListForm.cs index f3813009..0859b8e4 100644 --- a/api/src/Erp.Platform.Domain/Entities/Host/ListForm.cs +++ b/api/src/Erp.Platform.Domain/Entities/Host/ListForm.cs @@ -33,7 +33,8 @@ public class ListForm : FullAuditedEntity public string DefaultFilter { get; set; } // Her sorgunun sonuna eklenecek default WHERE condition public string ColumnOptionJson { get; set; } public string PivotOptionJson { get; set; } - public string TreeOptionJson { get; set; } + public string TreeOptionJson { get; set; } // Tree yapisi ile ilgili ayarlar + public string GanttOptionJson { get; set; } // Gantt yapisi ile ilgili ayarlar public string FilterRowJson { get; set; } // Filtre ayarlari, Json olarak tutulur, donus sinifi FilterRowDto public string RowJson { get; set; } // Row ayarları, Json olarak tutulur, donus sinifi FilterRowDto public string HeaderFilterJson { get; set; } // Header filtreleme ayarlari, Json olarak tutulur diff --git a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251201104936_Initial.Designer.cs b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251202094339_Initial.Designer.cs similarity index 99% rename from api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251201104936_Initial.Designer.cs rename to api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251202094339_Initial.Designer.cs index b9484e58..b4dac517 100644 --- a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251201104936_Initial.Designer.cs +++ b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251202094339_Initial.Designer.cs @@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore; namespace Erp.Platform.Migrations { [DbContext(typeof(PlatformDbContext))] - [Migration("20251201104936_Initial")] + [Migration("20251202094339_Initial")] partial class Initial { /// @@ -6173,6 +6173,9 @@ namespace Erp.Platform.Migrations b.Property("FullHeight") .HasColumnType("bit"); + b.Property("GanttOptionJson") + .HasColumnType("nvarchar(max)"); + b.Property("GroupPanelJson") .HasColumnType("text"); diff --git a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251201104936_Initial.cs b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251202094339_Initial.cs similarity index 99% rename from api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251201104936_Initial.cs rename to api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251202094339_Initial.cs index 6be7da80..719ecd61 100644 --- a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251201104936_Initial.cs +++ b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251202094339_Initial.cs @@ -2246,6 +2246,7 @@ namespace Erp.Platform.Migrations ColumnOptionJson = table.Column(type: "text", nullable: true), PivotOptionJson = table.Column(type: "text", nullable: true), TreeOptionJson = table.Column(type: "nvarchar(max)", nullable: true), + GanttOptionJson = table.Column(type: "nvarchar(max)", nullable: true), FilterRowJson = table.Column(type: "text", nullable: true), RowJson = table.Column(type: "nvarchar(max)", nullable: true), HeaderFilterJson = table.Column(type: "text", nullable: true), diff --git a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs index a430ddc8..3c8e7055 100644 --- a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs +++ b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs @@ -6170,6 +6170,9 @@ namespace Erp.Platform.Migrations b.Property("FullHeight") .HasColumnType("bit"); + b.Property("GanttOptionJson") + .HasColumnType("nvarchar(max)"); + b.Property("GroupPanelJson") .HasColumnType("text"); diff --git a/ui/src/proxy/admin/list-form/options.ts b/ui/src/proxy/admin/list-form/options.ts index 87445e1a..6c1eff4a 100644 --- a/ui/src/proxy/admin/list-form/options.ts +++ b/ui/src/proxy/admin/list-form/options.ts @@ -42,6 +42,7 @@ export const ListFormEditTabs = { ColumnForm: 'column', PivotForm: 'pivot', TreeForm: 'tree', + GanttForm: 'gantt', PagerForm: 'pager', StateForm: 'state', SubForm: 'subForm', @@ -90,6 +91,7 @@ export const tabVisibilityConfig: Record = { 'columns', 'pivots', 'tree', + 'gantt', 'pager', 'state', 'extrafilter', diff --git a/ui/src/proxy/form/models.ts b/ui/src/proxy/form/models.ts index 0b810543..7eeb175e 100644 --- a/ui/src/proxy/form/models.ts +++ b/ui/src/proxy/form/models.ts @@ -386,6 +386,16 @@ export interface TreeOptionDto { expandedRowKeys?: any[] autoExpandAll?: boolean recursiveSelection?: boolean +} + +export interface GanttOptionDto { + keyExpr?: string + parentIdExpr?: string + hasItemsExpr?: string + rootValue?: any + expandedRowKeys?: any[] + autoExpandAll?: boolean + recursiveSelection?: boolean titleExpr?: string startExpr?: string endExpr?: string @@ -490,6 +500,8 @@ export interface GridOptionsDto extends AuditedEntityDto { pivotOptionDto: GridPivotOptionDto treeOptionJson?: string treeOptionDto: TreeOptionDto + ganttOptionJson?: string + ganttOptionDto: GanttOptionDto pagerOptionJson?: string pagerOptionDto: GridPagerOptionDto editingOptionJson?: string diff --git a/ui/src/views/admin/listForm/edit/FormEdit.tsx b/ui/src/views/admin/listForm/edit/FormEdit.tsx index 02d45065..6f588430 100644 --- a/ui/src/views/admin/listForm/edit/FormEdit.tsx +++ b/ui/src/views/admin/listForm/edit/FormEdit.tsx @@ -36,7 +36,7 @@ import FormTabWidgets from './FormTabWidgets' import FormTabExtraFilters from './FormTabExtraFilters' import FormTabEditForm from './FormTabEditForm' import FormTabPivots from './FormTabPivots' -import FormTabTreeGantt from './FormTabTreeGantt' +import FormTabTree from './FormTabTree' import ChartTabAnimation from './ChartTabAnimation' import ChartTabAnnotations from './ChartTabAnnotations' import ChartTabZoomAndPan from './ChartTabZoomAndPan' @@ -50,6 +50,7 @@ import ChartTabPanes from './ChartTabPanes' import { tabVisibilityConfig } from '@/proxy/admin/list-form/options' import FormTabSorting from './FormTabSorting' import FormTabRow from './FormTabRow' +import FormTabGantt from './FormTabGantt' export interface FormEditProps { onSubmit: ( @@ -236,6 +237,9 @@ const FormEdit = () => { {visibleTabs.includes('tree') && ( {translate('::ListForms.ListFormEdit.TabTree')} )} + {visibleTabs.includes('gantt') && ( + {translate('::ListForms.ListFormEdit.TabGantt')} + )} {visibleTabs.includes('pager') && ( {translate('::ListForms.ListFormEdit.TabPaging')} )} @@ -360,7 +364,10 @@ const FormEdit = () => { - + + + + diff --git a/ui/src/views/admin/listForm/edit/FormTabGantt.tsx b/ui/src/views/admin/listForm/edit/FormTabGantt.tsx new file mode 100644 index 00000000..ddc5baf0 --- /dev/null +++ b/ui/src/views/admin/listForm/edit/FormTabGantt.tsx @@ -0,0 +1,300 @@ +import { + Button, + Notification, + Checkbox, + FormContainer, + FormItem, + Input, + Select, + toast, + Card, +} from '@/components/ui' +import { ListFormEditTabs } from '@/proxy/admin/list-form/options' +import { useStoreState } from '@/store' +import { useLocalization } from '@/utils/hooks/useLocalization' +import { Field, FieldProps, Form, Formik } from 'formik' +import * as Yup from 'yup' +import { FormEditProps } from './FormEdit' +import { SelectBoxOption } from '@/types/shared' +import { useEffect, useState } from 'react' +import { getListFormFields } from '@/services/admin/list-form-field.service' +import { groupBy } from 'lodash' +import { useParams } from 'react-router-dom' + +const validationSchema = Yup.object().shape({}) + +function FormTabGantt(props: FormEditProps) { + const { listFormCode } = useParams() + const { translate } = useLocalization() + const [fieldList, setFieldList] = useState([]) + + const getFields = async () => { + if (!listFormCode) { + return + } + + try { + const resp = await getListFormFields({ + listFormCode, + sorting: 'ListOrderNo', + maxResultCount: 1000, + }) + if (resp.data?.items) { + const fieldNames = groupBy(resp?.data?.items, 'fieldName') + setFieldList( + Object.keys(fieldNames).map((a) => ({ + value: a, + label: a, + })), + ) + } + } catch (error: any) { + toast.push( + + Alanlar getirilemedi + {error.toString()} + , + { + placement: 'top-end', + }, + ) + } + } + + useEffect(() => { + getFields() + }, [listFormCode]) + + const listFormValues = useStoreState((s) => s.admin.lists.values) + if (!listFormValues) { + return null + } + + return ( + { + await props.onSubmit(ListFormEditTabs.GanttForm, values, formikHelpers) + }} + > + {({ touched, errors, isSubmitting, values }) => ( +
+ + + + {({ field, form }: FieldProps) => ( + option.value === values.ganttOptionDto.parentIdExpr, + )} + onChange={(option) => form.setFieldValue(field.name, option?.value)} + /> + )} + + + + + + + + + + + + + + + + + + + + + + {({ field, form }: FieldProps) => ( + option.value === values.ganttOptionDto.startExpr, + )} + onChange={(option) => form.setFieldValue(field.name, option?.value)} + /> + )} + + + + + + {({ field, form }: FieldProps) => ( + option.value === values.ganttOptionDto.progressExpr, + )} + onChange={(option) => form.setFieldValue(field.name, option?.value)} + /> + )} + + + + +
+ )} +
+ ) +} + +export default FormTabGantt diff --git a/ui/src/views/admin/listForm/edit/FormTabTree.tsx b/ui/src/views/admin/listForm/edit/FormTabTree.tsx new file mode 100644 index 00000000..7c1024e3 --- /dev/null +++ b/ui/src/views/admin/listForm/edit/FormTabTree.tsx @@ -0,0 +1,198 @@ +import { + Button, + Notification, + Checkbox, + FormContainer, + FormItem, + Input, + Select, + toast, + Card, +} from '@/components/ui' +import { ListFormEditTabs } from '@/proxy/admin/list-form/options' +import { useStoreState } from '@/store' +import { useLocalization } from '@/utils/hooks/useLocalization' +import { Field, FieldProps, Form, Formik } from 'formik' +import * as Yup from 'yup' +import { FormEditProps } from './FormEdit' +import { SelectBoxOption } from '@/types/shared' +import { useEffect, useState } from 'react' +import { getListFormFields } from '@/services/admin/list-form-field.service' +import { groupBy } from 'lodash' +import { useParams } from 'react-router-dom' + +const validationSchema = Yup.object().shape({}) + +function FormTabTree(props: FormEditProps) { + const { listFormCode } = useParams() + const { translate } = useLocalization() + const [fieldList, setFieldList] = useState([]) + + const getFields = async () => { + if (!listFormCode) { + return + } + + try { + const resp = await getListFormFields({ + listFormCode, + sorting: 'ListOrderNo', + maxResultCount: 1000, + }) + if (resp.data?.items) { + const fieldNames = groupBy(resp?.data?.items, 'fieldName') + setFieldList( + Object.keys(fieldNames).map((a) => ({ + value: a, + label: a, + })), + ) + } + } catch (error: any) { + toast.push( + + Alanlar getirilemedi + {error.toString()} + , + { + placement: 'top-end', + }, + ) + } + } + + useEffect(() => { + getFields() + }, [listFormCode]) + + const listFormValues = useStoreState((s) => s.admin.lists.values) + if (!listFormValues) { + return null + } + + return ( + { + await props.onSubmit(ListFormEditTabs.TreeForm, values, formikHelpers) + }} + > + {({ touched, errors, isSubmitting, values }) => ( +
+ + + + {({ field, form }: FieldProps) => ( + option.value === values.treeOptionDto.parentIdExpr, + )} + onChange={(option) => form.setFieldValue(field.name, option?.value)} + /> + )} + + + + + + + + + + + + + + + + + + + + +
+ )} +
+ ) +} + +export default FormTabTree diff --git a/ui/src/views/admin/listForm/edit/FormTabTreeGantt.tsx b/ui/src/views/admin/listForm/edit/FormTabTreeGantt.tsx deleted file mode 100644 index 61893e1e..00000000 --- a/ui/src/views/admin/listForm/edit/FormTabTreeGantt.tsx +++ /dev/null @@ -1,315 +0,0 @@ -import { Container } from '@/components/shared' -import { - Button, - Notification, - Checkbox, - FormContainer, - FormItem, - Input, - Select, - toast, - Card, -} from '@/components/ui' -import { ListFormEditTabs } from '@/proxy/admin/list-form/options' -import { useStoreState } from '@/store' -import { useLocalization } from '@/utils/hooks/useLocalization' -import { Field, FieldProps, Form, Formik } from 'formik' -import * as Yup from 'yup' -import { FormEditProps } from './FormEdit' -import { SelectBoxOption } from '@/types/shared' -import { useEffect, useState } from 'react' -import { getListFormFields } from '@/services/admin/list-form-field.service' -import { groupBy } from 'lodash' -import { useParams } from 'react-router-dom' - -const validationSchema = Yup.object().shape({}) - -function FormTabTreeGantt(props: FormEditProps) { - const { listFormCode } = useParams() - const { translate } = useLocalization() - const [fieldList, setFieldList] = useState([]) - - const getFields = async () => { - if (!listFormCode) { - return - } - - try { - const resp = await getListFormFields({ - listFormCode, - sorting: 'ListOrderNo', - maxResultCount: 1000, - }) - if (resp.data?.items) { - const fieldNames = groupBy(resp?.data?.items, 'fieldName') - setFieldList( - Object.keys(fieldNames).map((a) => ({ - value: a, - label: a, - })), - ) - } - } catch (error: any) { - toast.push( - - Alanlar getirilemedi - {error.toString()} - , - { - placement: 'top-end', - }, - ) - } - } - - useEffect(() => { - getFields() - }, [listFormCode]) - - const listFormValues = useStoreState((s) => s.admin.lists.values) - if (!listFormValues) { - return null - } - - return ( - { - await props.onSubmit(ListFormEditTabs.TreeForm, values, formikHelpers) - }} - > - {({ touched, errors, isSubmitting, values }) => ( -
- -
- - - - {({ field, form }: FieldProps) => ( - option.value === values.treeOptionDto.parentIdExpr, - )} - onChange={(option) => form.setFieldValue(field.name, option?.value)} - /> - )} - - - - - - - - - - - - - - - - - - - - - - - - {({ field, form }: FieldProps) => ( - option.value === values.treeOptionDto.startExpr, - )} - onChange={(option) => form.setFieldValue(field.name, option?.value)} - /> - )} - - - - - - {({ field, form }: FieldProps) => ( - option.value === values.treeOptionDto.progressExpr, - )} - onChange={(option) => form.setFieldValue(field.name, option?.value)} - /> - )} - - - -
- -
-
- )} -
- ) -} - -export default FormTabTreeGantt diff --git a/ui/src/views/list/GanttView.tsx b/ui/src/views/list/GanttView.tsx index 56f86cfc..5492b795 100644 --- a/ui/src/views/list/GanttView.tsx +++ b/ui/src/views/list/GanttView.tsx @@ -216,10 +216,10 @@ const GanttView = (props: GanttViewProps) => { taskListWidth={500} scaleType={scaleType} rootValue={ - gridDto.gridOptions.treeOptionDto?.rootValue === '' || - gridDto.gridOptions.treeOptionDto?.rootValue === undefined + gridDto.gridOptions.ganttOptionDto?.rootValue === '' || + gridDto.gridOptions.ganttOptionDto?.rootValue === undefined ? null - : gridDto.gridOptions.treeOptionDto?.rootValue + : gridDto.gridOptions.ganttOptionDto?.rootValue } height={ gridDto.gridOptions.height > 0 @@ -231,12 +231,12 @@ const GanttView = (props: GanttViewProps) => { >