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>
|
/// </summary>
|
||||||
public string TitleExpr { get; set; }
|
public string TitleExpr { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Zaman ölçeği tipi (örn: "days", "weeks", "months")
|
||||||
|
/// </summary>
|
||||||
|
public string ScaleType { get; set; } = "weeks";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Başlangıç Tarihi ifadesi (örn: "0001-01-01")
|
/// Başlangıç Tarihi ifadesi (örn: "0001-01-01")
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -3589,6 +3589,12 @@
|
||||||
"en": "Formatting",
|
"en": "Formatting",
|
||||||
"tr": "Formatlama"
|
"tr": "Formatlama"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "ListForms.ListFormEdit.TabPivot",
|
||||||
|
"en": "Pivot",
|
||||||
|
"tr": "Pivot"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"resourceName": "Platform",
|
"resourceName": "Platform",
|
||||||
"key": "ListForms.ListFormEdit.TabTree",
|
"key": "ListForms.ListFormEdit.TabTree",
|
||||||
|
|
@ -4567,6 +4573,12 @@
|
||||||
"en": "Parent Field Name",
|
"en": "Parent Field Name",
|
||||||
"tr": "Üst Kimlik İfadesi"
|
"tr": "Üst Kimlik İfadesi"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "ListForms.ListFormEdit.ScaleType",
|
||||||
|
"en": "Scale Type",
|
||||||
|
"tr": "Ölçek Türü"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"resourceName": "Platform",
|
"resourceName": "Platform",
|
||||||
"key": "ListForms.ListFormEdit.TitleExpr",
|
"key": "ListForms.ListFormEdit.TitleExpr",
|
||||||
|
|
|
||||||
|
|
@ -2112,7 +2112,8 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency
|
||||||
TitleExpr = "Name",
|
TitleExpr = "Name",
|
||||||
StartExpr = "StartDate",
|
StartExpr = "StartDate",
|
||||||
EndExpr = "EndDate",
|
EndExpr = "EndDate",
|
||||||
ProgressExpr = "Progress"
|
ProgressExpr = "Progress",
|
||||||
|
ScaleType = "weeks"
|
||||||
}),
|
}),
|
||||||
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.ProjectTask)),
|
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.ProjectTask)),
|
||||||
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson,
|
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson,
|
||||||
|
|
|
||||||
|
|
@ -171,4 +171,4 @@ export const tooltipFormatListOptions = [
|
||||||
{ value: 'thousands', label: 'Thousands' },
|
{ value: 'thousands', label: 'Thousands' },
|
||||||
{ value: 'trillions', label: 'Trillions' },
|
{ value: 'trillions', label: 'Trillions' },
|
||||||
{ value: 'year', label: 'Year' },
|
{ value: 'year', label: 'Year' },
|
||||||
]
|
]
|
||||||
|
|
@ -44,6 +44,7 @@ import {
|
||||||
import { ListViewLayoutType } from '@/views/admin/listForm/edit/types'
|
import { ListViewLayoutType } from '@/views/admin/listForm/edit/types'
|
||||||
import { SeriesType } from 'devextreme/common/charts'
|
import { SeriesType } from 'devextreme/common/charts'
|
||||||
import { PagerDisplayMode } from 'devextreme/common/grids'
|
import { PagerDisplayMode } from 'devextreme/common/grids'
|
||||||
|
import { GanttScaleType } from 'devextreme/ui/gantt'
|
||||||
|
|
||||||
//1
|
//1
|
||||||
export interface SelectListItem {
|
export interface SelectListItem {
|
||||||
|
|
@ -400,6 +401,7 @@ export interface GanttOptionDto {
|
||||||
startExpr?: string
|
startExpr?: string
|
||||||
endExpr?: string
|
endExpr?: string
|
||||||
progressExpr?: string
|
progressExpr?: string
|
||||||
|
scaleType: GanttScaleType
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface GridEditingDto {
|
export interface GridEditingDto {
|
||||||
|
|
@ -774,6 +776,18 @@ export enum PlatformEditorTypes {
|
||||||
dxGridBox = 'dxGridBox',
|
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 {
|
export enum PivotSettingsAreaEnum {
|
||||||
Column = 'column',
|
Column = 'column',
|
||||||
Data = 'data',
|
Data = 'data',
|
||||||
|
|
|
||||||
|
|
@ -200,9 +200,7 @@ const FormEdit = () => {
|
||||||
<TabNav value="database">{translate('::ListForms.ListFormEdit.TabDatabase')}</TabNav>
|
<TabNav value="database">{translate('::ListForms.ListFormEdit.TabDatabase')}</TabNav>
|
||||||
)}
|
)}
|
||||||
{visibleTabs.includes('permissions') && (
|
{visibleTabs.includes('permissions') && (
|
||||||
<TabNav value="permissions">
|
<TabNav value="permissions">{translate('::Abp.Identity.Permissions')}</TabNav>
|
||||||
{translate('::Abp.Identity.Permissions')}
|
|
||||||
</TabNav>
|
|
||||||
)}
|
)}
|
||||||
{visibleTabs.includes('commands') && (
|
{visibleTabs.includes('commands') && (
|
||||||
<TabNav value="commands">{translate('::ListForms.ListFormEdit.TabCommands')}</TabNav>
|
<TabNav value="commands">{translate('::ListForms.ListFormEdit.TabCommands')}</TabNav>
|
||||||
|
|
@ -231,15 +229,6 @@ const FormEdit = () => {
|
||||||
{visibleTabs.includes('select') && (
|
{visibleTabs.includes('select') && (
|
||||||
<TabNav value="select">{translate('::ListForms.ListFormEdit.TabSelection')}</TabNav>
|
<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') && (
|
{visibleTabs.includes('pager') && (
|
||||||
<TabNav value="pager">{translate('::ListForms.ListFormEdit.TabPaging')}</TabNav>
|
<TabNav value="pager">{translate('::ListForms.ListFormEdit.TabPaging')}</TabNav>
|
||||||
)}
|
)}
|
||||||
|
|
@ -262,6 +251,15 @@ const FormEdit = () => {
|
||||||
{visibleTabs.includes('editForm') && (
|
{visibleTabs.includes('editForm') && (
|
||||||
<TabNav value="editForm">{translate('::ListForms.ListFormEdit.EditingForm')}</TabNav>
|
<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') && (
|
{visibleTabs.includes('subForms') && (
|
||||||
<TabNav value="subForms">{translate('::ListForms.ListFormEdit.SubForms')}</TabNav>
|
<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 { getListFormFields } from '@/services/admin/list-form-field.service'
|
||||||
import { groupBy } from 'lodash'
|
import { groupBy } from 'lodash'
|
||||||
import { useParams } from 'react-router-dom'
|
import { useParams } from 'react-router-dom'
|
||||||
|
import { GanttScaleType } from 'devextreme/ui/gantt'
|
||||||
|
import { gantScaleOptions } from './options'
|
||||||
|
|
||||||
const validationSchema = Yup.object().shape({})
|
const validationSchema = Yup.object().shape({})
|
||||||
|
|
||||||
|
|
@ -188,6 +190,31 @@ function FormTabGantt(props: FormEditProps) {
|
||||||
/>
|
/>
|
||||||
</FormItem>
|
</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
|
<FormItem
|
||||||
label={translate('::ListForms.ListFormEdit.TitleExpr')}
|
label={translate('::ListForms.ListFormEdit.TitleExpr')}
|
||||||
invalid={errors.ganttOptionDto?.titleExpr && touched.ganttOptionDto?.titleExpr}
|
invalid={errors.ganttOptionDto?.titleExpr && touched.ganttOptionDto?.titleExpr}
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,15 @@
|
||||||
import { Container } from '@/components/shared'
|
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 { ListFormEditTabs } from '@/proxy/admin/list-form/options'
|
||||||
import { useStoreState } from '@/store'
|
import { useStoreState } from '@/store'
|
||||||
import { useLocalization } from '@/utils/hooks/useLocalization'
|
import { useLocalization } from '@/utils/hooks/useLocalization'
|
||||||
import { ApplyFilterMode } from 'devextreme/common/grids'
|
|
||||||
import { Field, FieldProps, Form, Formik } from 'formik'
|
import { Field, FieldProps, Form, Formik } from 'formik'
|
||||||
import * as Yup from 'yup'
|
import * as Yup from 'yup'
|
||||||
import { FormEditProps } from './FormEdit'
|
import { FormEditProps } from './FormEdit'
|
||||||
import {
|
import {
|
||||||
applyFilterOptions,
|
|
||||||
overflowWrapOptions,
|
overflowWrapOptions,
|
||||||
sortModeOptions,
|
|
||||||
whiteSpaceOptions,
|
whiteSpaceOptions,
|
||||||
} from './options'
|
} 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'
|
import { SelectBoxOption } from '@/types/shared'
|
||||||
|
|
||||||
const validationSchema = Yup.object().shape({})
|
const validationSchema = Yup.object().shape({})
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ import {
|
||||||
DataSourceTypeEnum,
|
DataSourceTypeEnum,
|
||||||
DbTypeEnum,
|
DbTypeEnum,
|
||||||
FixedPositionEnum,
|
FixedPositionEnum,
|
||||||
|
GanttScaleTypeEnum,
|
||||||
ListFormCustomizationTypeEnum,
|
ListFormCustomizationTypeEnum,
|
||||||
PivotSettingsAreaEnum,
|
PivotSettingsAreaEnum,
|
||||||
PivotSettingsGroupIntervalEnum,
|
PivotSettingsGroupIntervalEnum,
|
||||||
|
|
@ -437,3 +438,4 @@ export const colSpanOptions = colSpan.map((span) => ({
|
||||||
value: span,
|
value: span,
|
||||||
label: span,
|
label: span,
|
||||||
}))
|
}))
|
||||||
|
export const gantScaleOptions = enumToList<string>(GanttScaleTypeEnum)
|
||||||
|
|
|
||||||
|
|
@ -66,6 +66,8 @@ const GanttView = (props: GanttViewProps) => {
|
||||||
} else {
|
} else {
|
||||||
setGridDto(extGridDto)
|
setGridDto(extGridDto)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setScaleType(extGridDto?.gridOptions.ganttOptionDto?.scaleType || 'weeks')
|
||||||
}, [listFormCode, extGridDto])
|
}, [listFormCode, extGridDto])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue