mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-07-01 10:42:19 +08:00
feat: gantt block suprt process update
This commit is contained in:
parent
a437cf2f5f
commit
01e93148b9
@ -95,7 +95,7 @@ const formatData = (data = [], fieldNames, tasks: any[] = [], projectId: any = u
|
||||
name: item[fieldNames.title],
|
||||
id: item.id + '',
|
||||
type: fieldNames.end?'task':'milestone',
|
||||
progress: item[fieldNames.progress],
|
||||
progress: item[fieldNames.progress]*100,
|
||||
project: projectId,
|
||||
});
|
||||
}
|
||||
|
@ -130,7 +130,7 @@ export const GanttDesigner = () => {
|
||||
<SchemaSettings.SelectItem
|
||||
title={t('Progress field')}
|
||||
value={fieldNames.progress}
|
||||
options={useOptions('double')}
|
||||
options={useOptions('float')}
|
||||
onChange={(progress) => {
|
||||
const fieldNames = field.decoratorProps.fieldNames || {};
|
||||
fieldNames['progress'] = progress;
|
||||
|
@ -374,7 +374,7 @@ export const Gantt: any = (props:any) => {
|
||||
filterByTk: task.id,
|
||||
values: {
|
||||
...task,
|
||||
[fieldNames.progress]: task.progress,
|
||||
[fieldNames.progress]: task.progress/100,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
@ -38,7 +38,7 @@ export const GanttBlockInitializer = (props) => {
|
||||
};
|
||||
});
|
||||
const numberFields = collectionFields
|
||||
?.filter((field) => field.type === 'double')
|
||||
?.filter((field) => field.type === 'float')
|
||||
?.map((field) => {
|
||||
return {
|
||||
label: field?.uiSchema?.title,
|
||||
@ -83,8 +83,8 @@ export const GanttBlockInitializer = (props) => {
|
||||
title: t('Time range'),
|
||||
enum: [
|
||||
{ label: '{{t("Hour")}}', value: 'hour', color: 'orange' },
|
||||
{ label: '{{t("Quarter of day")}}', value: 'quarterOfDay', color: 'default' },
|
||||
{ label: '{{t("Half of day")}}', value: 'halOfDay', color: 'blue' },
|
||||
{ label: '{{t("Quarter of day")}}', value: 'quarterDay', color: 'default' },
|
||||
{ label: '{{t("Half of day")}}', value: 'halfDay', color: 'blue' },
|
||||
{ label: '{{t("Day")}}', value: 'day', color: 'yellow' },
|
||||
{ label: '{{t("Week")}}', value: 'week', color: 'pule' },
|
||||
{ label: '{{t("Month")}}', value: 'month', color: 'green' },
|
||||
|
Loading…
x
Reference in New Issue
Block a user