diff --git a/api/src/Erp.Platform.Application.Contracts/ListForms/GridOptionsDto/GanttOptionDto.cs b/api/src/Erp.Platform.Application.Contracts/ListForms/GridOptionsDto/GanttOptionDto.cs index 5ad83d52..3822a4ac 100644 --- a/api/src/Erp.Platform.Application.Contracts/ListForms/GridOptionsDto/GanttOptionDto.cs +++ b/api/src/Erp.Platform.Application.Contracts/ListForms/GridOptionsDto/GanttOptionDto.cs @@ -44,6 +44,11 @@ public class GanttOptionDto /// public string TitleExpr { get; set; } + /// + /// Zaman ölçeği tipi (örn: "days", "weeks", "months") + /// + public string ScaleType { get; set; } = "weeks"; + /// /// Başlangıç Tarihi ifadesi (örn: "0001-01-01") /// diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/LanguagesData.json b/api/src/Erp.Platform.DbMigrator/Seeds/LanguagesData.json index 30cc8951..6edfcdfa 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/LanguagesData.json +++ b/api/src/Erp.Platform.DbMigrator/Seeds/LanguagesData.json @@ -3589,6 +3589,12 @@ "en": "Formatting", "tr": "Formatlama" }, + { + "resourceName": "Platform", + "key": "ListForms.ListFormEdit.TabPivot", + "en": "Pivot", + "tr": "Pivot" + }, { "resourceName": "Platform", "key": "ListForms.ListFormEdit.TabTree", @@ -4567,6 +4573,12 @@ "en": "Parent Field Name", "tr": "Üst Kimlik İfadesi" }, + { + "resourceName": "Platform", + "key": "ListForms.ListFormEdit.ScaleType", + "en": "Scale Type", + "tr": "Ölçek Türü" + }, { "resourceName": "Platform", "key": "ListForms.ListFormEdit.TitleExpr", diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Project.cs b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Project.cs index dd5af936..3e0b0ab5 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Project.cs +++ b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Project.cs @@ -2112,7 +2112,8 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency TitleExpr = "Name", StartExpr = "StartDate", EndExpr = "EndDate", - ProgressExpr = "Progress" + ProgressExpr = "Progress", + ScaleType = "weeks" }), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.ProjectTask)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, diff --git a/ui/src/proxy/admin/list-form/options.ts b/ui/src/proxy/admin/list-form/options.ts index 6c1eff4a..1c5e05f4 100644 --- a/ui/src/proxy/admin/list-form/options.ts +++ b/ui/src/proxy/admin/list-form/options.ts @@ -171,4 +171,4 @@ export const tooltipFormatListOptions = [ { value: 'thousands', label: 'Thousands' }, { value: 'trillions', label: 'Trillions' }, { value: 'year', label: 'Year' }, -] +] \ No newline at end of file diff --git a/ui/src/proxy/form/models.ts b/ui/src/proxy/form/models.ts index 7eeb175e..d23e034a 100644 --- a/ui/src/proxy/form/models.ts +++ b/ui/src/proxy/form/models.ts @@ -44,6 +44,7 @@ import { import { ListViewLayoutType } from '@/views/admin/listForm/edit/types' import { SeriesType } from 'devextreme/common/charts' import { PagerDisplayMode } from 'devextreme/common/grids' +import { GanttScaleType } from 'devextreme/ui/gantt' //1 export interface SelectListItem { @@ -400,6 +401,7 @@ export interface GanttOptionDto { startExpr?: string endExpr?: string progressExpr?: string + scaleType: GanttScaleType } export interface GridEditingDto { @@ -774,6 +776,18 @@ export enum PlatformEditorTypes { dxGridBox = 'dxGridBox', } +export enum GanttScaleTypeEnum { + Auto = 'auto', + Minutes = 'minutes', + Hours = 'hours', + SixHours = 'sixHours', + Days = 'days', + Weeks = 'weeks', + Months = 'months', + Quarters = 'quarters', + Years = 'years', +} + export enum PivotSettingsAreaEnum { Column = 'column', Data = 'data', diff --git a/ui/src/views/admin/listForm/edit/FormEdit.tsx b/ui/src/views/admin/listForm/edit/FormEdit.tsx index 6f588430..76a8b427 100644 --- a/ui/src/views/admin/listForm/edit/FormEdit.tsx +++ b/ui/src/views/admin/listForm/edit/FormEdit.tsx @@ -200,9 +200,7 @@ const FormEdit = () => { {translate('::ListForms.ListFormEdit.TabDatabase')} )} {visibleTabs.includes('permissions') && ( - - {translate('::Abp.Identity.Permissions')} - + {translate('::Abp.Identity.Permissions')} )} {visibleTabs.includes('commands') && ( {translate('::ListForms.ListFormEdit.TabCommands')} @@ -231,15 +229,6 @@ const FormEdit = () => { {visibleTabs.includes('select') && ( {translate('::ListForms.ListFormEdit.TabSelection')} )} - {visibleTabs.includes('pivots') && ( - {translate('::ListForms.ListForm.Pivots')} - )} - {visibleTabs.includes('tree') && ( - {translate('::ListForms.ListFormEdit.TabTree')} - )} - {visibleTabs.includes('gantt') && ( - {translate('::ListForms.ListFormEdit.TabGantt')} - )} {visibleTabs.includes('pager') && ( {translate('::ListForms.ListFormEdit.TabPaging')} )} @@ -262,6 +251,15 @@ const FormEdit = () => { {visibleTabs.includes('editForm') && ( {translate('::ListForms.ListFormEdit.EditingForm')} )} + {visibleTabs.includes('pivots') && ( + {translate('::ListForms.ListFormEdit.TabPivot')} + )} + {visibleTabs.includes('tree') && ( + {translate('::ListForms.ListFormEdit.TabTree')} + )} + {visibleTabs.includes('gantt') && ( + {translate('::ListForms.ListFormEdit.TabGantt')} + )} {visibleTabs.includes('subForms') && ( {translate('::ListForms.ListFormEdit.SubForms')} )} diff --git a/ui/src/views/admin/listForm/edit/FormTabGantt.tsx b/ui/src/views/admin/listForm/edit/FormTabGantt.tsx index ddc5baf0..ed669cf4 100644 --- a/ui/src/views/admin/listForm/edit/FormTabGantt.tsx +++ b/ui/src/views/admin/listForm/edit/FormTabGantt.tsx @@ -20,6 +20,8 @@ import { useEffect, useState } from 'react' import { getListFormFields } from '@/services/admin/list-form-field.service' import { groupBy } from 'lodash' import { useParams } from 'react-router-dom' +import { GanttScaleType } from 'devextreme/ui/gantt' +import { gantScaleOptions } from './options' const validationSchema = Yup.object().shape({}) @@ -188,6 +190,31 @@ function FormTabGantt(props: FormEditProps) { /> + + + {({ field, form }: FieldProps) => ( +