Scheduler View
This commit is contained in:
parent
f5315a4aca
commit
9055657ef2
15 changed files with 472 additions and 146 deletions
|
|
@ -63,5 +63,25 @@ public class GanttOptionDto
|
|||
/// İlerleme ifadesi (örn: "%50")
|
||||
/// </summary>
|
||||
public string ProgressExpr { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Bağlantılar için kullanılan field adı (örn: "predecessors")
|
||||
/// </summary>
|
||||
public bool AllowDependencyAdding { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Bağlantılar için kullanılan field adı (örn: "predecessors")
|
||||
/// </summary>
|
||||
public bool AllowDependencyDeleting { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Kaynaklar için kullanılan field adı (örn: "resources")
|
||||
/// </summary>
|
||||
public bool AllowResourceAdding { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Kaynaklar için kullanılan field adı (örn: "resources")
|
||||
/// </summary>
|
||||
public bool AllowResourceDeleting { get; set; } = false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ public class LayoutDto
|
|||
public bool Chart { get; set; } = true;
|
||||
public bool Tree { get; set; } = true;
|
||||
public bool Gantt { get; set; } = true;
|
||||
public bool Scheduler { get; set; } = true;
|
||||
public string DefaultLayout { get; set; } = "grid";
|
||||
public int CardLayoutColumn { get; set; } = 4;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,20 +8,61 @@ public class SchedulerOptionDto
|
|||
/// <summary>
|
||||
/// Text olarak gösterilecek field adı (örn: "title")
|
||||
/// </summary>
|
||||
public string TextField { get; set; }
|
||||
public string TextExpr { get; set; }
|
||||
/// <summary>
|
||||
/// Başlangıç tarihinin tutulduğu field adı (örn: "startDate")
|
||||
/// </summary>
|
||||
public string StartDateField { get; set; }
|
||||
|
||||
public string StartDateExpr { get; set; }
|
||||
/// <summary>
|
||||
/// Bitiş tarihinin tutulduğu field adı (örn: "endDate")
|
||||
/// </summary>
|
||||
public string EndDateField { get; set; }
|
||||
|
||||
public string EndDateExpr { get; set; }
|
||||
/// <summary>
|
||||
/// Tüm gün etkinlikler için kullanılan field adı (örn: "allDay")
|
||||
/// </summary>
|
||||
public string AllDayField { get; set; }
|
||||
public string AllDayExpr { get; set; }
|
||||
/// <summary>
|
||||
/// Tekrarlama kuralının tutulduğu field adı (örn: "recurrenceRule")
|
||||
/// </summary>
|
||||
public string RecurrenceRuleExpr { get; set; }
|
||||
/// <summary>
|
||||
/// Tekrarlama istisnasının tutulduğu field adı (örn: "recurrenceException")
|
||||
/// </summary>
|
||||
public string RecurrenceExceptionExpr { get; set; }
|
||||
/// <summary>
|
||||
/// Kaynaklar (örn: kaynaklar için kullanılan field adı, veri kaynağı vb.)
|
||||
/// </summary>
|
||||
public int StartDayHour { get; set; } = 8;
|
||||
/// <summary>
|
||||
/// Günün bitiş saati (örn: "18" = 18:00)
|
||||
/// </summary>
|
||||
public int EndDayHour { get; set; } = 18;
|
||||
/// <summary>
|
||||
/// Varsayılan görünüm (örn: "week", "month", "day")
|
||||
/// </summary>
|
||||
public string DefaultView { get; set; } = "week";
|
||||
/// <summary>
|
||||
/// Tüm gün panelini gösterme durumu
|
||||
/// </summary>
|
||||
public bool ShowAllDayPanel { get; set; } = true;
|
||||
/// <summary>
|
||||
/// Hücre süresi (dakika cinsinden, örn: 30)
|
||||
/// </summary>
|
||||
public int CellDuration { get; set; } = 30;
|
||||
/// <summary>
|
||||
/// Haftanın ilk günü (örn: "0" = Pazar, "1" = Pazartesi)
|
||||
/// </summary>
|
||||
public int FirstDayOfWeek { get; set; } = 1;
|
||||
/// <summary>
|
||||
/// Kaydırma çubuğunun çapraz kaydırma durumunu belirtir
|
||||
/// </summary>
|
||||
public bool CrossScrollingEnabled { get; set; } = false;
|
||||
/// <summary>
|
||||
/// Etkinliklerin yeniden boyutlandırılmasına izin verilip verilmediğini belirtir
|
||||
/// </summary>
|
||||
public bool AllowResizing { get; set; } = false;
|
||||
/// <summary>
|
||||
/// Etkinliklerin sürüklenip bırakılmasına izin verilip verilmediğini belirtir
|
||||
/// </summary>
|
||||
public bool AllowDragging { get; set; } = false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3817,6 +3817,12 @@
|
|||
"en": "Full Height",
|
||||
"tr": "Tam Yükseklik"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.ListFormEdit.DetailsLayoutDto.SchedulerLayout",
|
||||
"en": "Scheduler Layout",
|
||||
"tr": "Zamanlayıcı Düzeni"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.ListFormEdit.DetailsLayoutDto.GanttLayout",
|
||||
|
|
@ -4645,6 +4651,30 @@
|
|||
"en": "Auto Expand All",
|
||||
"tr": "Otomatik Tümünü Genişlet"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.ListFormEdit.AllowDependencyAdding",
|
||||
"en": "Allow Dependency Adding",
|
||||
"tr": "Bağımlılık Ekleme İzni"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.ListFormEdit.AllowDependencyDeleting",
|
||||
"en": "Allow Dependency Deleting",
|
||||
"tr": "Bağımlılık Silme İzni"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.ListFormEdit.AllowResourceAdding",
|
||||
"en": "Allow Resource Adding",
|
||||
"tr": "Kaynak Ekleme İzni"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.ListFormEdit.AllowResourceDeleting",
|
||||
"en": "Allow Resource Deleting",
|
||||
"tr": "Kaynak Silme İzni"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.ListFormEdit.SelectionMode",
|
||||
|
|
@ -10020,6 +10050,168 @@
|
|||
"key": "App.Accounting.CheckNote",
|
||||
"tr": "Çek & Senet",
|
||||
"en": "Check & Notes"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.SchedulerOptions.BasicSettings",
|
||||
"tr": "Temel Ayarlar",
|
||||
"en": "Basic Settings"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.SchedulerOptions.TextExpr",
|
||||
"tr": "Metin İfadesi",
|
||||
"en": "Text Expression"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.SchedulerOptions.StartDateExpr",
|
||||
"tr": "Başlangıç Tarihi İfadesi",
|
||||
"en": "Start Date Expression"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.SchedulerOptions.EndDateExpr",
|
||||
"tr": "Bitiş Tarihi İfadesi",
|
||||
"en": "End Date Expression"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.SchedulerOptions.AllDayExpr",
|
||||
"tr": "Tüm Gün İfadesi",
|
||||
"en": "All Day Expression"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.SchedulerOptions.RecurrenceSettings",
|
||||
"tr": "Tekrarlama Ayarları",
|
||||
"en": "Recurrence Settings"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.SchedulerOptions.RecurrenceRuleExpr",
|
||||
"tr": "Tekrarlama Kuralı İfadesi",
|
||||
"en": "Recurrence Rule Expression"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.SchedulerOptions.RecurrenceExceptionExpr",
|
||||
"tr": "Tekrarlama İstisnası İfadesi",
|
||||
"en": "Recurrence Exception Expression"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.SchedulerOptions.ViewSettings",
|
||||
"tr": "Görünüm Ayarları",
|
||||
"en": "View Settings"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.SchedulerOptions.DefaultView",
|
||||
"tr": "Varsayılan Görünüm",
|
||||
"en": "Default View"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.SchedulerOptions.FirstDayOfWeek",
|
||||
"tr": "Haftanın İlk Günü",
|
||||
"en": "First Day of Week"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.SchedulerOptions.StartDayHour",
|
||||
"tr": "Günün Başlangıç Saati",
|
||||
"en": "Start Day Hour"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.SchedulerOptions.EndDayHour",
|
||||
"tr": "Günün Bitiş Saati",
|
||||
"en": "End Day Hour"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.SchedulerOptions.CellDuration",
|
||||
"tr": "Hücre Süresi",
|
||||
"en": "Cell Duration"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.SchedulerOptions.InteractionSettings",
|
||||
"tr": "Etkileşim Ayarları",
|
||||
"en": "Interaction Settings"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.SchedulerOptions.ShowAllDayPanel",
|
||||
"tr": "Tüm Gün Panelini Göster",
|
||||
"en": "Show All Day Panel"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.SchedulerOptions.CrossScrollingEnabled",
|
||||
"tr": "Çapraz Kaydırma Etkin",
|
||||
"en": "Cross Scrolling Enabled"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.SchedulerOptions.AllowResizing",
|
||||
"tr": "Boyutlandırmaya İzin Ver",
|
||||
"en": "Allow Resizing"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.SchedulerOptions.AllowDragging",
|
||||
"tr": "Sürüklemeye İzin Ver",
|
||||
"en": "Allow Dragging"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.SchedulerOptions.Day",
|
||||
"tr": "Gün",
|
||||
"en": "Day"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.SchedulerOptions.Week",
|
||||
"tr": "Hafta",
|
||||
"en": "Week"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.SchedulerOptions.WorkWeek",
|
||||
"tr": "İş Haftası",
|
||||
"en": "WorkWeek"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.SchedulerOptions.Month",
|
||||
"tr": "Ay",
|
||||
"en": "Month"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.SchedulerOptions.TimelineDay",
|
||||
"tr": "Gün Çizelgesi",
|
||||
"en": "Timeline Day"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.SchedulerOptions.TimelineWeek",
|
||||
"tr": "Hafta Çizelgesi",
|
||||
"en": "Timeline Week"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.SchedulerOptions.TimelineMonth",
|
||||
"tr": "Ay Çizelgesi",
|
||||
"en": "Timeline Month"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.SchedulerOptions.Agenda",
|
||||
"tr": "Ajanda",
|
||||
"en": "Agenda"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -70,6 +70,7 @@ public static class SeederDefaults
|
|||
Chart = true,
|
||||
Tree = true,
|
||||
Gantt = true,
|
||||
Scheduler = true,
|
||||
DefaultLayout = "grid",
|
||||
CardLayoutColumn = 4
|
||||
});
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore;
|
|||
namespace Erp.Platform.Migrations
|
||||
{
|
||||
[DbContext(typeof(PlatformDbContext))]
|
||||
[Migration("20251202131047_Initial")]
|
||||
[Migration("20251202182338_Initial")]
|
||||
partial class Initial
|
||||
{
|
||||
/// <inheritdoc />
|
||||
|
|
@ -6274,6 +6274,9 @@ namespace Erp.Platform.Migrations
|
|||
b.Property<string>("RowJson")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("SchedulerOptionJson")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ScrollBarJson")
|
||||
.HasColumnType("text");
|
||||
|
||||
|
|
@ -2247,6 +2247,7 @@ namespace Erp.Platform.Migrations
|
|||
PivotOptionJson = table.Column<string>(type: "text", nullable: true),
|
||||
TreeOptionJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
GanttOptionJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
SchedulerOptionJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
FilterRowJson = table.Column<string>(type: "text", nullable: true),
|
||||
RowJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
HeaderFilterJson = table.Column<string>(type: "text", nullable: true),
|
||||
|
|
@ -6271,6 +6271,9 @@ namespace Erp.Platform.Migrations
|
|||
b.Property<string>("RowJson")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("SchedulerOptionJson")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ScrollBarJson")
|
||||
.HasColumnType("text");
|
||||
|
||||
|
|
|
|||
|
|
@ -402,6 +402,10 @@ export interface GanttOptionDto {
|
|||
endExpr?: string
|
||||
progressExpr?: string
|
||||
scaleType: GanttScaleType
|
||||
allowDependencyAdding?: boolean
|
||||
allowDependencyDeleting?: boolean
|
||||
allowResourceAdding?: boolean
|
||||
allowResourceDeleting?: boolean
|
||||
}
|
||||
|
||||
export interface SchedulerOptionDto {
|
||||
|
|
|
|||
|
|
@ -366,6 +366,20 @@ function FormTabDetails(
|
|||
component={Checkbox}
|
||||
/>
|
||||
</FormItem>
|
||||
|
||||
<FormItem
|
||||
label={translate('::ListForms.ListFormEdit.DetailsLayoutDto.SchedulerLayout')}
|
||||
invalid={errors.layoutDto?.scheduler && touched.layoutDto?.scheduler}
|
||||
errorMessage={errors.layoutDto?.scheduler}
|
||||
>
|
||||
<Field
|
||||
className="w-20"
|
||||
autoComplete="off"
|
||||
name="layoutDto.scheduler"
|
||||
placeholder={translate('::ListForms.ListFormEdit.DetailsLayoutDto.SchedulerLayout')}
|
||||
component={Checkbox}
|
||||
/>
|
||||
</FormItem>
|
||||
</div>
|
||||
|
||||
<FormItem
|
||||
|
|
|
|||
|
|
@ -314,6 +314,63 @@ function FormTabGantt(props: FormEditProps) {
|
|||
)}
|
||||
</Field>
|
||||
</FormItem>
|
||||
|
||||
<FormItem
|
||||
label={translate('::ListForms.ListFormEdit.AllowDependencyAdding')}
|
||||
invalid={
|
||||
errors.ganttOptionDto?.allowDependencyAdding && touched.ganttOptionDto?.allowDependencyAdding
|
||||
}
|
||||
errorMessage={errors.ganttOptionDto?.allowDependencyAdding}
|
||||
>
|
||||
<Field
|
||||
name="ganttOptionDto.allowDependencyAdding"
|
||||
placeholder={translate('::ListForms.ListFormEdit.AllowDependencyAdding')}
|
||||
component={Checkbox}
|
||||
/>
|
||||
</FormItem>
|
||||
|
||||
<FormItem
|
||||
label={translate('::ListForms.ListFormEdit.AllowDependencyDeleting')}
|
||||
invalid={
|
||||
errors.ganttOptionDto?.allowDependencyDeleting && touched.ganttOptionDto?.allowDependencyDeleting
|
||||
}
|
||||
errorMessage={errors.ganttOptionDto?.allowDependencyDeleting}
|
||||
>
|
||||
<Field
|
||||
name="ganttOptionDto.allowDependencyDeleting"
|
||||
placeholder={translate('::ListForms.ListFormEdit.AllowDependencyDeleting')}
|
||||
component={Checkbox}
|
||||
/>
|
||||
</FormItem>
|
||||
|
||||
<FormItem
|
||||
label={translate('::ListForms.ListFormEdit.AllowResourceAdding')}
|
||||
invalid={
|
||||
errors.ganttOptionDto?.allowResourceAdding && touched.ganttOptionDto?.allowResourceAdding
|
||||
}
|
||||
errorMessage={errors.ganttOptionDto?.allowResourceAdding}
|
||||
>
|
||||
<Field
|
||||
name="ganttOptionDto.allowResourceAdding"
|
||||
placeholder={translate('::ListForms.ListFormEdit.AllowResourceAdding')}
|
||||
component={Checkbox}
|
||||
/>
|
||||
</FormItem>
|
||||
|
||||
<FormItem
|
||||
label={translate('::ListForms.ListFormEdit.AllowResourceDeleting')}
|
||||
invalid={
|
||||
errors.ganttOptionDto?.allowResourceDeleting && touched.ganttOptionDto?.allowResourceDeleting
|
||||
}
|
||||
errorMessage={errors.ganttOptionDto?.allowResourceDeleting}
|
||||
>
|
||||
<Field
|
||||
name="ganttOptionDto.allowResourceDeleting"
|
||||
placeholder={translate('::ListForms.ListFormEdit.AllowResourceDeleting')}
|
||||
component={Checkbox}
|
||||
/>
|
||||
</FormItem>
|
||||
|
||||
<Button block variant="solid" loading={isSubmitting} type="submit" className="my-2">
|
||||
{isSubmitting ? translate('::SavingWithThreeDot') : translate('::Save')}
|
||||
</Button>
|
||||
|
|
|
|||
|
|
@ -20,30 +20,10 @@ 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 { firstDayOfWeekOptions, schedulerViewOptions } from './options'
|
||||
|
||||
const validationSchema = Yup.object().shape({})
|
||||
|
||||
const schedulerViewOptions = [
|
||||
{ value: 'day', label: 'Day' },
|
||||
{ value: 'week', label: 'Week' },
|
||||
{ value: 'workWeek', label: 'Work Week' },
|
||||
{ value: 'month', label: 'Month' },
|
||||
{ value: 'timelineDay', label: 'Timeline Day' },
|
||||
{ value: 'timelineWeek', label: 'Timeline Week' },
|
||||
{ value: 'timelineMonth', label: 'Timeline Month' },
|
||||
{ value: 'agenda', label: 'Agenda' },
|
||||
]
|
||||
|
||||
const firstDayOfWeekOptions = [
|
||||
{ value: 0, label: 'Sunday' },
|
||||
{ value: 1, label: 'Monday' },
|
||||
{ value: 2, label: 'Tuesday' },
|
||||
{ value: 3, label: 'Wednesday' },
|
||||
{ value: 4, label: 'Thursday' },
|
||||
{ value: 5, label: 'Friday' },
|
||||
{ value: 6, label: 'Saturday' },
|
||||
]
|
||||
|
||||
function FormTabScheduler(props: FormEditProps) {
|
||||
const { listFormCode } = useParams()
|
||||
const { translate } = useLocalization()
|
||||
|
|
@ -104,10 +84,10 @@ function FormTabScheduler(props: FormEditProps) {
|
|||
<FormContainer size="sm">
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-3">
|
||||
<Card>
|
||||
<h5 className="mb-4">{translate('::SchedulerOptions.BasicSettings')}</h5>
|
||||
<h5 className="mb-4">{translate('::ListForms.SchedulerOptions.BasicSettings')}</h5>
|
||||
|
||||
<FormItem
|
||||
label={translate('::SchedulerOptions.TextField')}
|
||||
label={translate('::ListForms.SchedulerOptions.TextExpr')}
|
||||
invalid={
|
||||
errors.schedulerOptionDto?.textExpr && touched.schedulerOptionDto?.textExpr
|
||||
}
|
||||
|
|
@ -121,15 +101,16 @@ function FormTabScheduler(props: FormEditProps) {
|
|||
isClearable={true}
|
||||
options={fieldList}
|
||||
value={fieldList.find(
|
||||
(option) => option.value === values.schedulerOptionDto?.textExpr,
|
||||
(option) => option.value === values.schedulerOptionDto.textExpr,
|
||||
)}
|
||||
onChange={(option) => form.setFieldValue(field.name, option?.value)}
|
||||
/>
|
||||
)}
|
||||
</Field>
|
||||
</FormItem>
|
||||
|
||||
<FormItem
|
||||
label={translate('::SchedulerOptions.StartDateField')}
|
||||
label={translate('::ListForms.SchedulerOptions.StartDateExpr')}
|
||||
invalid={
|
||||
errors.schedulerOptionDto?.startDateExpr &&
|
||||
touched.schedulerOptionDto?.startDateExpr
|
||||
|
|
@ -146,13 +127,14 @@ function FormTabScheduler(props: FormEditProps) {
|
|||
value={fieldList.find(
|
||||
(option) => option.value === values.schedulerOptionDto?.startDateExpr,
|
||||
)}
|
||||
onChange={(option) => form.setFieldValue(field.name, option?.value)}
|
||||
/>
|
||||
)}
|
||||
</Field>
|
||||
</FormItem>
|
||||
|
||||
<FormItem
|
||||
label={translate('::SchedulerOptions.EndDateField')}
|
||||
label={translate('::ListForms.SchedulerOptions.EndDateExpr')}
|
||||
invalid={
|
||||
errors.schedulerOptionDto?.endDateExpr &&
|
||||
touched.schedulerOptionDto?.endDateExpr
|
||||
|
|
@ -169,13 +151,14 @@ function FormTabScheduler(props: FormEditProps) {
|
|||
value={fieldList.find(
|
||||
(option) => option.value === values.schedulerOptionDto?.endDateExpr,
|
||||
)}
|
||||
onChange={(option) => form.setFieldValue(field.name, option?.value)}
|
||||
/>
|
||||
)}
|
||||
</Field>
|
||||
</FormItem>
|
||||
|
||||
<FormItem
|
||||
label={translate('::SchedulerOptions.AllDayField')}
|
||||
label={translate('::ListForms.SchedulerOptions.AllDayExpr')}
|
||||
invalid={
|
||||
errors.schedulerOptionDto?.allDayExpr && touched.schedulerOptionDto?.allDayExpr
|
||||
}
|
||||
|
|
@ -191,6 +174,7 @@ function FormTabScheduler(props: FormEditProps) {
|
|||
value={fieldList.find(
|
||||
(option) => option.value === values.schedulerOptionDto?.allDayExpr,
|
||||
)}
|
||||
onChange={(option) => form.setFieldValue(field.name, option?.value)}
|
||||
/>
|
||||
)}
|
||||
</Field>
|
||||
|
|
@ -198,10 +182,12 @@ function FormTabScheduler(props: FormEditProps) {
|
|||
</Card>
|
||||
|
||||
<Card className="mt-4">
|
||||
<h5 className="mb-4">{translate('::SchedulerOptions.RecurrenceSettings')}</h5>
|
||||
<h5 className="mb-4">
|
||||
{translate('::ListForms.SchedulerOptions.RecurrenceSettings')}
|
||||
</h5>
|
||||
|
||||
<FormItem
|
||||
label={translate('::SchedulerOptions.RecurrenceRuleField')}
|
||||
label={translate('::ListForms.SchedulerOptions.RecurrenceRuleExpr')}
|
||||
invalid={
|
||||
errors.schedulerOptionDto?.recurrenceRuleExpr &&
|
||||
touched.schedulerOptionDto?.recurrenceRuleExpr
|
||||
|
|
@ -219,13 +205,14 @@ function FormTabScheduler(props: FormEditProps) {
|
|||
(option) =>
|
||||
option.value === values.schedulerOptionDto?.recurrenceRuleExpr,
|
||||
)}
|
||||
onChange={(option) => form.setFieldValue(field.name, option?.value)}
|
||||
/>
|
||||
)}
|
||||
</Field>
|
||||
</FormItem>
|
||||
|
||||
<FormItem
|
||||
label={translate('::SchedulerOptions.RecurrenceExceptionField')}
|
||||
label={translate('::ListForms.SchedulerOptions.RecurrenceExceptionExpr')}
|
||||
invalid={
|
||||
errors.schedulerOptionDto?.recurrenceExceptionExpr &&
|
||||
touched.schedulerOptionDto?.recurrenceExceptionExpr
|
||||
|
|
@ -243,6 +230,7 @@ function FormTabScheduler(props: FormEditProps) {
|
|||
(option) =>
|
||||
option.value === values.schedulerOptionDto?.recurrenceExceptionExpr,
|
||||
)}
|
||||
onChange={(option) => form.setFieldValue(field.name, option?.value)}
|
||||
/>
|
||||
)}
|
||||
</Field>
|
||||
|
|
@ -250,9 +238,9 @@ function FormTabScheduler(props: FormEditProps) {
|
|||
</Card>
|
||||
|
||||
<Card className="mt-4">
|
||||
<h5 className="mb-4">{translate('::SchedulerOptions.ViewSettings')}</h5>
|
||||
<h5 className="mb-4">{translate('::ListForms.SchedulerOptions.ViewSettings')}</h5>
|
||||
|
||||
<FormItem label={translate('::SchedulerOptions.DefaultView')}>
|
||||
<FormItem label={translate('::ListForms.SchedulerOptions.DefaultView')}>
|
||||
<Field name="schedulerOptionDto.defaultView">
|
||||
{({ field, form }: FieldProps) => (
|
||||
<Select
|
||||
|
|
@ -262,12 +250,13 @@ function FormTabScheduler(props: FormEditProps) {
|
|||
value={schedulerViewOptions.find(
|
||||
(option) => option.value === values.schedulerOptionDto?.defaultView,
|
||||
)}
|
||||
onChange={(option) => form.setFieldValue(field.name, option?.value)}
|
||||
/>
|
||||
)}
|
||||
</Field>
|
||||
</FormItem>
|
||||
|
||||
<FormItem label={translate('::SchedulerOptions.FirstDayOfWeek')}>
|
||||
<FormItem label={translate('::ListForms.SchedulerOptions.FirstDayOfWeek')}>
|
||||
<Field name="schedulerOptionDto.firstDayOfWeek">
|
||||
{({ field, form }: FieldProps) => (
|
||||
<Select
|
||||
|
|
@ -277,110 +266,81 @@ function FormTabScheduler(props: FormEditProps) {
|
|||
value={firstDayOfWeekOptions.find(
|
||||
(option) => option.value === values.schedulerOptionDto?.firstDayOfWeek,
|
||||
)}
|
||||
onChange={(option) => form.setFieldValue(field.name, option?.value)}
|
||||
/>
|
||||
)}
|
||||
</Field>
|
||||
</FormItem>
|
||||
|
||||
<FormItem label={translate('::SchedulerOptions.StartDayHour')}>
|
||||
<Field name="schedulerOptionDto.startDayHour">
|
||||
{({ field, form }: FieldProps) => (
|
||||
<Input
|
||||
<FormItem
|
||||
label={translate('::ListForms.SchedulerOptions.StartDayHour')}
|
||||
invalid={errors.schedulerOptionDto?.startDayHour && touched.schedulerOptionDto?.startDayHour}
|
||||
errorMessage={errors.schedulerOptionDto?.startDayHour}
|
||||
>
|
||||
<Field
|
||||
type="number"
|
||||
field={field}
|
||||
form={form}
|
||||
autoComplete="off"
|
||||
name="schedulerOptionDto.startDayHour"
|
||||
placeholder="8"
|
||||
component={Input}
|
||||
min={0}
|
||||
max={23}
|
||||
/>
|
||||
)}
|
||||
</Field>
|
||||
</FormItem>
|
||||
|
||||
<FormItem label={translate('::SchedulerOptions.EndDayHour')}>
|
||||
<Field name="schedulerOptionDto.endDayHour">
|
||||
{({ field, form }: FieldProps) => (
|
||||
<Input
|
||||
<FormItem
|
||||
label={translate('::ListForms.SchedulerOptions.EndDayHour')}
|
||||
invalid={errors.schedulerOptionDto?.endDayHour && touched.schedulerOptionDto?.endDayHour}
|
||||
errorMessage={errors.schedulerOptionDto?.endDayHour}
|
||||
>
|
||||
<Field
|
||||
type="number"
|
||||
field={field}
|
||||
form={form}
|
||||
autoComplete="off"
|
||||
name="schedulerOptionDto.endDayHour"
|
||||
placeholder="18"
|
||||
component={Input}
|
||||
min={0}
|
||||
max={24}
|
||||
/>
|
||||
)}
|
||||
</Field>
|
||||
</FormItem>
|
||||
|
||||
<FormItem label={translate('::SchedulerOptions.CellDuration')}>
|
||||
<Field name="schedulerOptionDto.cellDuration">
|
||||
{({ field, form }: FieldProps) => (
|
||||
<Input
|
||||
<FormItem
|
||||
label={translate('::ListForms.SchedulerOptions.CellDuration')}
|
||||
invalid={errors.schedulerOptionDto?.cellDuration && touched.schedulerOptionDto?.cellDuration}
|
||||
errorMessage={errors.schedulerOptionDto?.cellDuration}
|
||||
>
|
||||
<Field
|
||||
type="number"
|
||||
field={field}
|
||||
form={form}
|
||||
autoComplete="off"
|
||||
name="schedulerOptionDto.cellDuration"
|
||||
component={Input}
|
||||
placeholder="30"
|
||||
min={5}
|
||||
step={5}
|
||||
/>
|
||||
)}
|
||||
</Field>
|
||||
</FormItem>
|
||||
</Card>
|
||||
|
||||
<Card className="mt-4">
|
||||
<h5 className="mb-4">{translate('::SchedulerOptions.InteractionSettings')}</h5>
|
||||
<h5 className="mb-4">
|
||||
{translate('::ListForms.SchedulerOptions.InteractionSettings')}
|
||||
</h5>
|
||||
|
||||
<FormItem>
|
||||
<Field name="schedulerOptionDto.showAllDayPanel">
|
||||
{({ field, form }: FieldProps) => (
|
||||
<Checkbox
|
||||
{...field}
|
||||
checked={values.schedulerOptionDto?.showAllDayPanel ?? true}
|
||||
>
|
||||
{translate('::SchedulerOptions.ShowAllDayPanel')}
|
||||
</Checkbox>
|
||||
)}
|
||||
</Field>
|
||||
|
||||
<FormItem label={translate('::ListForms.SchedulerOptions.ShowAllDayPanel')}>
|
||||
<Field name="schedulerOptionDto.showAllDayPanel" component={Checkbox} />
|
||||
</FormItem>
|
||||
|
||||
<FormItem>
|
||||
<Field name="schedulerOptionDto.crossScrollingEnabled">
|
||||
{({ field, form }: FieldProps) => (
|
||||
<Checkbox
|
||||
{...field}
|
||||
checked={values.schedulerOptionDto?.crossScrollingEnabled ?? false}
|
||||
>
|
||||
{translate('::SchedulerOptions.CrossScrollingEnabled')}
|
||||
</Checkbox>
|
||||
)}
|
||||
</Field>
|
||||
<FormItem label={translate('::ListForms.SchedulerOptions.CrossScrollingEnabled')}>
|
||||
<Field name="schedulerOptionDto.crossScrollingEnabled" component={Checkbox} />
|
||||
</FormItem>
|
||||
|
||||
<FormItem>
|
||||
<Field name="schedulerOptionDto.allowResizing">
|
||||
{({ field, form }: FieldProps) => (
|
||||
<Checkbox
|
||||
{...field}
|
||||
checked={values.schedulerOptionDto?.allowResizing ?? false}
|
||||
>
|
||||
{translate('::SchedulerOptions.AllowResizing')}
|
||||
</Checkbox>
|
||||
)}
|
||||
</Field>
|
||||
<FormItem label={translate('::ListForms.SchedulerOptions.AllowResizing')}>
|
||||
<Field name="schedulerOptionDto.allowResizing" component={Checkbox} />
|
||||
</FormItem>
|
||||
|
||||
<FormItem>
|
||||
<Field name="schedulerOptionDto.allowDragging">
|
||||
{({ field, form }: FieldProps) => (
|
||||
<Checkbox
|
||||
{...field}
|
||||
checked={values.schedulerOptionDto?.allowDragging ?? false}
|
||||
>
|
||||
{translate('::SchedulerOptions.AllowDragging')}
|
||||
</Checkbox>
|
||||
)}
|
||||
</Field>
|
||||
<FormItem label={translate('::ListForms.SchedulerOptions.AllowDragging')}>
|
||||
<Field name="schedulerOptionDto.allowDragging" component={Checkbox} />
|
||||
</FormItem>
|
||||
</Card>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -405,6 +405,33 @@ export const chartBreakStyleLineListOptions = [
|
|||
{ value: 'waved', label: 'Waved' },
|
||||
]
|
||||
|
||||
export const colSpanOptions = colSpan.map((span) => ({
|
||||
value: span,
|
||||
label: span,
|
||||
}))
|
||||
export const gantScaleOptions = enumToList<string>(GanttScaleTypeEnum)
|
||||
|
||||
export const schedulerViewOptions = [
|
||||
{ value: 'day', label: 'Day' },
|
||||
{ value: 'week', label: 'Week' },
|
||||
{ value: 'workWeek', label: 'Work Week' },
|
||||
{ value: 'month', label: 'Month' },
|
||||
{ value: 'timelineDay', label: 'Timeline Day' },
|
||||
{ value: 'timelineWeek', label: 'Timeline Week' },
|
||||
{ value: 'timelineMonth', label: 'Timeline Month' },
|
||||
{ value: 'agenda', label: 'Agenda' },
|
||||
]
|
||||
|
||||
export const firstDayOfWeekOptions = [
|
||||
{ value: 0, label: 'Sunday' },
|
||||
{ value: 1, label: 'Monday' },
|
||||
{ value: 2, label: 'Tuesday' },
|
||||
{ value: 3, label: 'Wednesday' },
|
||||
{ value: 4, label: 'Thursday' },
|
||||
{ value: 5, label: 'Friday' },
|
||||
{ value: 6, label: 'Saturday' },
|
||||
]
|
||||
|
||||
export const dbSourceTypeOptions = enumToList(DbTypeEnum)
|
||||
export const dataSourceTypeOptions = enumToList(DataSourceTypeEnum)
|
||||
export const selectCommandTypeOptions = enumToList(SelectCommandTypeEnum)
|
||||
|
|
@ -433,9 +460,3 @@ export const widgetIconOptions = iconList.map((icon) => ({
|
|||
value: icon,
|
||||
label: icon,
|
||||
}))
|
||||
|
||||
export const colSpanOptions = colSpan.map((span) => ({
|
||||
value: span,
|
||||
label: span,
|
||||
}))
|
||||
export const gantScaleOptions = enumToList<string>(GanttScaleTypeEnum)
|
||||
|
|
|
|||
|
|
@ -279,7 +279,17 @@ const GanttView = (props: GanttViewProps) => {
|
|||
<Item location="after" widget="dxButton" options={getSettingButtonOptions()} />
|
||||
</Toolbar>
|
||||
|
||||
<Editing enabled={false} />
|
||||
<Editing
|
||||
enabled={gridDto.gridOptions.editingOptionDto?.allowUpdating}
|
||||
allowTaskAdding={gridDto.gridOptions.editingOptionDto?.allowAdding}
|
||||
allowTaskUpdating={gridDto.gridOptions.editingOptionDto?.allowUpdating}
|
||||
allowTaskDeleting={gridDto.gridOptions.editingOptionDto?.allowDeleting}
|
||||
allowDependencyAdding={false}
|
||||
allowDependencyDeleting={false}
|
||||
allowResourceAdding={false}
|
||||
allowResourceDeleting={false}
|
||||
/>
|
||||
|
||||
<FilterRow visible={gridDto.gridOptions.filterRowDto?.visible}></FilterRow>
|
||||
<HeaderFilter visible={gridDto.gridOptions.headerFilterDto.visible}></HeaderFilter>
|
||||
<Sorting mode={gridDto.gridOptions?.sortMode}></Sorting>
|
||||
|
|
|
|||
|
|
@ -155,8 +155,6 @@ const SchedulerView = (props: SchedulerViewProps) => {
|
|||
title={translate('::' + gridDto?.gridOptions.title)}
|
||||
defaultTitle="Erp Platform"
|
||||
>
|
||||
<link rel="stylesheet" href="/css/scheduler/dx.common.css" />
|
||||
<link rel="stylesheet" href="/css/scheduler/dx.light.css" />
|
||||
</Helmet>
|
||||
)}
|
||||
{!gridDto && (
|
||||
|
|
@ -222,26 +220,26 @@ const SchedulerView = (props: SchedulerViewProps) => {
|
|||
allowDragging={gridDto.gridOptions.schedulerOptionDto?.allowDragging ?? false}
|
||||
/>
|
||||
|
||||
<View type="day" name={translate('::Day')} />
|
||||
<View type="week" name={translate('::Week')} />
|
||||
<View type="workWeek" name={translate('::WorkWeek')} />
|
||||
<View type="month" name={translate('::Month')} />
|
||||
<View type="day" name={translate('::ListForms.SchedulerOptions.Day')} />
|
||||
<View type="week" name={translate('::ListForms.SchedulerOptions.Week')} />
|
||||
<View type="workWeek" name={translate('::ListForms.SchedulerOptions.WorkWeek')} />
|
||||
<View type="month" name={translate('::ListForms.SchedulerOptions.Month')} />
|
||||
<View
|
||||
type="timelineDay"
|
||||
name={translate('::TimelineDay')}
|
||||
name={translate('::ListForms.SchedulerOptions.TimelineDay')}
|
||||
maxAppointmentsPerCell="unlimited"
|
||||
/>
|
||||
<View
|
||||
type="timelineWeek"
|
||||
name={translate('::TimelineWeek')}
|
||||
name={translate('::ListForms.SchedulerOptions.TimelineWeek')}
|
||||
maxAppointmentsPerCell="unlimited"
|
||||
/>
|
||||
<View
|
||||
type="timelineMonth"
|
||||
name={translate('::TimelineMonth')}
|
||||
name={translate('::ListForms.SchedulerOptions.TimelineMonth')}
|
||||
maxAppointmentsPerCell="unlimited"
|
||||
/>
|
||||
<View type="agenda" name={translate('::Agenda')} />
|
||||
<View type="agenda" name={translate('::ListForms.SchedulerOptions.Agenda')} />
|
||||
|
||||
{gridDto.gridOptions.schedulerOptionDto?.resources?.map((resource, index) => (
|
||||
<Resource
|
||||
|
|
|
|||
Loading…
Reference in a new issue