Gantt içerisine ScaleType ve Seeder düzenlemeleri
This commit is contained in:
parent
0681eb9479
commit
260784d016
10 changed files with 76 additions and 22 deletions
|
|
@ -44,6 +44,11 @@ public class GanttOptionDto
|
|||
/// </summary>
|
||||
public string TitleExpr { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Zaman ölçeği tipi (örn: "days", "weeks", "months")
|
||||
/// </summary>
|
||||
public string ScaleType { get; set; } = "weeks";
|
||||
|
||||
/// <summary>
|
||||
/// Başlangıç Tarihi ifadesi (örn: "0001-01-01")
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -200,9 +200,7 @@ const FormEdit = () => {
|
|||
<TabNav value="database">{translate('::ListForms.ListFormEdit.TabDatabase')}</TabNav>
|
||||
)}
|
||||
{visibleTabs.includes('permissions') && (
|
||||
<TabNav value="permissions">
|
||||
{translate('::Abp.Identity.Permissions')}
|
||||
</TabNav>
|
||||
<TabNav value="permissions">{translate('::Abp.Identity.Permissions')}</TabNav>
|
||||
)}
|
||||
{visibleTabs.includes('commands') && (
|
||||
<TabNav value="commands">{translate('::ListForms.ListFormEdit.TabCommands')}</TabNav>
|
||||
|
|
@ -231,15 +229,6 @@ const FormEdit = () => {
|
|||
{visibleTabs.includes('select') && (
|
||||
<TabNav value="select">{translate('::ListForms.ListFormEdit.TabSelection')}</TabNav>
|
||||
)}
|
||||
{visibleTabs.includes('pivots') && (
|
||||
<TabNav value="pivots">{translate('::ListForms.ListForm.Pivots')}</TabNav>
|
||||
)}
|
||||
{visibleTabs.includes('tree') && (
|
||||
<TabNav value="tree">{translate('::ListForms.ListFormEdit.TabTree')}</TabNav>
|
||||
)}
|
||||
{visibleTabs.includes('gantt') && (
|
||||
<TabNav value="gantt">{translate('::ListForms.ListFormEdit.TabGantt')}</TabNav>
|
||||
)}
|
||||
{visibleTabs.includes('pager') && (
|
||||
<TabNav value="pager">{translate('::ListForms.ListFormEdit.TabPaging')}</TabNav>
|
||||
)}
|
||||
|
|
@ -262,6 +251,15 @@ const FormEdit = () => {
|
|||
{visibleTabs.includes('editForm') && (
|
||||
<TabNav value="editForm">{translate('::ListForms.ListFormEdit.EditingForm')}</TabNav>
|
||||
)}
|
||||
{visibleTabs.includes('pivots') && (
|
||||
<TabNav value="pivots">{translate('::ListForms.ListFormEdit.TabPivot')}</TabNav>
|
||||
)}
|
||||
{visibleTabs.includes('tree') && (
|
||||
<TabNav value="tree">{translate('::ListForms.ListFormEdit.TabTree')}</TabNav>
|
||||
)}
|
||||
{visibleTabs.includes('gantt') && (
|
||||
<TabNav value="gantt">{translate('::ListForms.ListFormEdit.TabGantt')}</TabNav>
|
||||
)}
|
||||
{visibleTabs.includes('subForms') && (
|
||||
<TabNav value="subForms">{translate('::ListForms.ListFormEdit.SubForms')}</TabNav>
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -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) {
|
|||
/>
|
||||
</FormItem>
|
||||
|
||||
<FormItem
|
||||
label={translate('::ListForms.ListFormEdit.ScaleType')}
|
||||
invalid={errors.ganttOptionDto?.scaleType && touched.ganttOptionDto?.scaleType}
|
||||
errorMessage={errors.ganttOptionDto?.scaleType}
|
||||
>
|
||||
<Field
|
||||
type="text"
|
||||
name="ganttOptionDto.scaleType"
|
||||
placeholder={translate('::ListForms.ListFormEdit.ScaleType')}
|
||||
>
|
||||
{({ field, form }: FieldProps<GanttScaleType>) => (
|
||||
<Select
|
||||
field={field}
|
||||
form={form}
|
||||
isClearable={true}
|
||||
options={gantScaleOptions}
|
||||
value={gantScaleOptions?.filter(
|
||||
(option) => option.value === values.ganttOptionDto.scaleType,
|
||||
)}
|
||||
onChange={(option) => form.setFieldValue(field.name, option?.value)}
|
||||
/>
|
||||
)}
|
||||
</Field>
|
||||
</FormItem>
|
||||
|
||||
<FormItem
|
||||
label={translate('::ListForms.ListFormEdit.TitleExpr')}
|
||||
invalid={errors.ganttOptionDto?.titleExpr && touched.ganttOptionDto?.titleExpr}
|
||||
|
|
|
|||
|
|
@ -1,22 +1,15 @@
|
|||
import { Container } from '@/components/shared'
|
||||
import { Button, Checkbox, FormContainer, FormItem, Input, Select, Tabs } from '@/components/ui'
|
||||
import { Button, FormContainer, FormItem, Input, Select } from '@/components/ui'
|
||||
import { ListFormEditTabs } from '@/proxy/admin/list-form/options'
|
||||
import { useStoreState } from '@/store'
|
||||
import { useLocalization } from '@/utils/hooks/useLocalization'
|
||||
import { ApplyFilterMode } from 'devextreme/common/grids'
|
||||
import { Field, FieldProps, Form, Formik } from 'formik'
|
||||
import * as Yup from 'yup'
|
||||
import { FormEditProps } from './FormEdit'
|
||||
import {
|
||||
applyFilterOptions,
|
||||
overflowWrapOptions,
|
||||
sortModeOptions,
|
||||
whiteSpaceOptions,
|
||||
} from './options'
|
||||
import TabList from '@/components/ui/Tabs/TabList'
|
||||
import TabNav from '@/components/ui/Tabs/TabNav'
|
||||
import TabContent from '@/components/ui/Tabs/TabContent'
|
||||
import { GridOptionsSortModeEnum } from '@/proxy/form/models'
|
||||
import { SelectBoxOption } from '@/types/shared'
|
||||
|
||||
const validationSchema = Yup.object().shape({})
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import {
|
|||
DataSourceTypeEnum,
|
||||
DbTypeEnum,
|
||||
FixedPositionEnum,
|
||||
GanttScaleTypeEnum,
|
||||
ListFormCustomizationTypeEnum,
|
||||
PivotSettingsAreaEnum,
|
||||
PivotSettingsGroupIntervalEnum,
|
||||
|
|
@ -437,3 +438,4 @@ export const colSpanOptions = colSpan.map((span) => ({
|
|||
value: span,
|
||||
label: span,
|
||||
}))
|
||||
export const gantScaleOptions = enumToList<string>(GanttScaleTypeEnum)
|
||||
|
|
|
|||
|
|
@ -66,6 +66,8 @@ const GanttView = (props: GanttViewProps) => {
|
|||
} else {
|
||||
setGridDto(extGridDto)
|
||||
}
|
||||
|
||||
setScaleType(extGridDto?.gridOptions.ganttOptionDto?.scaleType || 'weeks')
|
||||
}, [listFormCode, extGridDto])
|
||||
|
||||
useEffect(() => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue