From 0420f1a3e5cd219dfd89b424896d6ce3ec25e85a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sedat=20=C3=96zt=C3=BCrk?= Date: Tue, 2 Dec 2025 23:54:56 +0300 Subject: [PATCH] =?UTF-8?q?Gantt=20ve=20Scheduler=20i=C3=A7in=20AllowAddin?= =?UTF-8?q?g=20vs...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../GridOptionsDto/GanttOptionDto.cs | 17 +- .../GridOptionsDto/SchedulerOptionDto.cs | 14 +- .../Seeds/LanguagesData.json | 42 ++ ui/src/proxy/form/models.ts | 7 + .../admin/listForm/edit/FormTabGantt.tsx | 623 ++++++++++-------- .../admin/listForm/edit/FormTabScheduler.tsx | 200 +++--- ui/src/views/list/GanttView.tsx | 23 +- ui/src/views/list/SchedulerView.tsx | 6 +- 8 files changed, 556 insertions(+), 376 deletions(-) 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 a31cd20c..d063b5c7 100644 --- a/api/src/Erp.Platform.Application.Contracts/ListForms/GridOptionsDto/GanttOptionDto.cs +++ b/api/src/Erp.Platform.Application.Contracts/ListForms/GridOptionsDto/GanttOptionDto.cs @@ -63,7 +63,22 @@ public class GanttOptionDto /// İlerleme ifadesi (örn: "%50") /// public string ProgressExpr { get; set; } - + /// + /// Düzenlemeye izin verilsin mi + /// + public bool AllowEditing { get; set; } = false; + /// + /// Task eklemeye izin verilsin mi + /// + public bool AllowTaskAdding { get; set; } = false; + /// + /// Task güncellemeye izin verilsin mi + /// + public bool AllowTaskUpdating { get; set; } = false; + /// + /// Task silmeye izin verilsin mi + /// + public bool AllowTaskDeleting { get; set; } = false; /// /// Bağlantılar için kullanılan field adı (örn: "predecessors") /// diff --git a/api/src/Erp.Platform.Application.Contracts/ListForms/GridOptionsDto/SchedulerOptionDto.cs b/api/src/Erp.Platform.Application.Contracts/ListForms/GridOptionsDto/SchedulerOptionDto.cs index 1dc1af1c..b1aee7b8 100644 --- a/api/src/Erp.Platform.Application.Contracts/ListForms/GridOptionsDto/SchedulerOptionDto.cs +++ b/api/src/Erp.Platform.Application.Contracts/ListForms/GridOptionsDto/SchedulerOptionDto.cs @@ -45,7 +45,7 @@ public class SchedulerOptionDto /// Tüm gün panelini gösterme durumu /// public bool ShowAllDayPanel { get; set; } = true; - /// + /// /// Hücre süresi (dakika cinsinden, örn: 30) /// public int CellDuration { get; set; } = 30; @@ -65,4 +65,16 @@ public class SchedulerOptionDto /// Etkinliklerin sürüklenip bırakılmasına izin verilip verilmediğini belirtir /// public bool AllowDragging { get; set; } = false; + /// + /// Etkinlik eklemeye izin verilip verilmediğini belirtir + /// + public bool AllowDeleting { get; set; } = false; + /// + /// Etkinlik güncellemeye izin verilip verilmediğini belirtir + /// + public bool AllowUpdating { get; set; } = false; + /// + /// Etkinlik eklemeye izin verilip verilmediğini belirtir + /// + public bool AllowAdding { get; set; } = false; } diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/LanguagesData.json b/api/src/Erp.Platform.DbMigrator/Seeds/LanguagesData.json index 04d64117..d7358dd0 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/LanguagesData.json +++ b/api/src/Erp.Platform.DbMigrator/Seeds/LanguagesData.json @@ -4651,6 +4651,30 @@ "en": "Auto Expand All", "tr": "Otomatik Tümünü Genişlet" }, + { + "resourceName": "Platform", + "key": "ListForms.ListFormEdit.AllowEditing", + "en": "Allow Editing", + "tr": "Düzenlemeye İzin Ver" + }, + { + "resourceName": "Platform", + "key": "ListForms.ListFormEdit.AllowTaskAdding", + "en": "Allow Task Adding", + "tr": "Görev Ekleme İzni" + }, + { + "resourceName": "Platform", + "key": "ListForms.ListFormEdit.AllowTaskDeleting", + "en": "Allow Task Deleting", + "tr": "Görev Silme İzni" + }, + { + "resourceName": "Platform", + "key": "ListForms.ListFormEdit.AllowTaskUpdating", + "en": "Allow Task Updating", + "tr": "Görev Güncelleme İzni" + }, { "resourceName": "Platform", "key": "ListForms.ListFormEdit.AllowDependencyAdding", @@ -10165,6 +10189,24 @@ "tr": "Sürüklemeye İzin Ver", "en": "Allow Dragging" }, + { + "resourceName": "Platform", + "key": "ListForms.SchedulerOptions.AllowAdding", + "tr": "Ekleme İzin Ver", + "en": "Allow Adding" + }, + { + "resourceName": "Platform", + "key": "ListForms.SchedulerOptions.AllowUpdating", + "tr": "Güncellemeye İzin Ver", + "en": "Allow Updating" + }, + { + "resourceName": "Platform", + "key": "ListForms.SchedulerOptions.AllowDeleting", + "tr": "Silmeye İzin Ver", + "en": "Allow Deleting" + }, { "resourceName": "Platform", "key": "ListForms.SchedulerOptions.Day", diff --git a/ui/src/proxy/form/models.ts b/ui/src/proxy/form/models.ts index e60d86e7..a27cb70f 100644 --- a/ui/src/proxy/form/models.ts +++ b/ui/src/proxy/form/models.ts @@ -402,6 +402,10 @@ export interface GanttOptionDto { endExpr?: string progressExpr?: string scaleType: GanttScaleType + allowEditing?: boolean + allowTaskAdding?: boolean + allowTaskUpdating?: boolean + allowTaskDeleting?: boolean allowDependencyAdding?: boolean allowDependencyDeleting?: boolean allowResourceAdding?: boolean @@ -424,6 +428,9 @@ export interface SchedulerOptionDto { firstDayOfWeek?: number allowResizing?: boolean allowDragging?: boolean + allowDeleting?: boolean + allowUpdating?: boolean + allowAdding?: boolean resources?: SchedulerResourceDto[] } diff --git a/ui/src/views/admin/listForm/edit/FormTabGantt.tsx b/ui/src/views/admin/listForm/edit/FormTabGantt.tsx index e01a3181..0188b890 100644 --- a/ui/src/views/admin/listForm/edit/FormTabGantt.tsx +++ b/ui/src/views/admin/listForm/edit/FormTabGantt.tsx @@ -83,293 +83,376 @@ function FormTabGantt(props: FormEditProps) { {({ touched, errors, isSubmitting, values }) => (
- - - {({ field, form }: FieldProps) => ( - option.value === values.ganttOptionDto.parentIdExpr, + > + {({ field, form }: FieldProps) => ( + option.value === values.ganttOptionDto.scaleType, + + + {({ field, form }: FieldProps) => ( + option.value === values.ganttOptionDto.titleExpr, + + + + + + + + + + + + + + + + + + + {({ field, form }: FieldProps) => ( + option.value === values.ganttOptionDto.startExpr, + + + {({ field, form }: FieldProps) => ( + option.value === values.ganttOptionDto.endExpr, + + + {({ field, form }: FieldProps) => ( + option.value === values.ganttOptionDto.progressExpr, + + + {({ field, form }: FieldProps) => ( + option.value === values.ganttOptionDto.progressExpr, + )} + onChange={(option) => form.setFieldValue(field.name, option?.value)} + /> + )} + + + + + +
+ {translate('::ListForms.SchedulerOptions.InteractionSettings')} +
+ + - )} - - +
- - - + + + - - - + + + - - - + + + - - - + + + + + + + + + + + + + + + + + -
+ + {' '}
)} diff --git a/ui/src/views/list/GanttView.tsx b/ui/src/views/list/GanttView.tsx index 0d35eae8..924ac62b 100644 --- a/ui/src/views/list/GanttView.tsx +++ b/ui/src/views/list/GanttView.tsx @@ -249,8 +249,8 @@ const GanttView = (props: GanttViewProps) => { - {gridDto.gridOptions.editingOptionDto?.allowAdding && } - {gridDto.gridOptions.editingOptionDto?.allowDeleting && ( + {gridDto.gridOptions.ganttOptionDto?.allowTaskAdding && } + {gridDto.gridOptions.ganttOptionDto?.allowTaskDeleting && ( )} @@ -285,14 +285,17 @@ const GanttView = (props: GanttViewProps) => { diff --git a/ui/src/views/list/SchedulerView.tsx b/ui/src/views/list/SchedulerView.tsx index 5e5f67b4..9a714210 100644 --- a/ui/src/views/list/SchedulerView.tsx +++ b/ui/src/views/list/SchedulerView.tsx @@ -257,9 +257,9 @@ const SchedulerView = (props: SchedulerViewProps) => {