Card Layout kaldırıldı
This commit is contained in:
parent
0b17c625e3
commit
8b162ac641
11 changed files with 40 additions and 1332 deletions
|
|
@ -3,13 +3,11 @@
|
||||||
public class LayoutDto
|
public class LayoutDto
|
||||||
{
|
{
|
||||||
public bool Grid { get; set; } = true;
|
public bool Grid { get; set; } = true;
|
||||||
public bool Card { get; set; } = true;
|
|
||||||
public bool Pivot { get; set; } = true;
|
public bool Pivot { get; set; } = true;
|
||||||
public bool Chart { get; set; } = true;
|
public bool Chart { get; set; } = true;
|
||||||
public bool Tree { get; set; } = true;
|
public bool Tree { get; set; } = true;
|
||||||
public bool Gantt { get; set; } = true;
|
public bool Gantt { get; set; } = true;
|
||||||
public bool Scheduler { get; set; } = true;
|
public bool Scheduler { get; set; } = true;
|
||||||
public string DefaultLayout { get; set; } = "grid";
|
public string DefaultLayout { get; set; } = "grid";
|
||||||
public int CardLayoutColumn { get; set; } = 4;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3588,12 +3588,6 @@
|
||||||
"en": "Grid Layout",
|
"en": "Grid Layout",
|
||||||
"tr": "Liste Düzeni"
|
"tr": "Liste Düzeni"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"resourceName": "Platform",
|
|
||||||
"key": "ListForms.ListFormEdit.DetailsLayoutDto.CardLayout",
|
|
||||||
"en": "Card Layout",
|
|
||||||
"tr": "Kart Düzeni"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"resourceName": "Platform",
|
"resourceName": "Platform",
|
||||||
"key": "ListForms.ListFormEdit.DetailsLayoutDto.PivotLayout",
|
"key": "ListForms.ListFormEdit.DetailsLayoutDto.PivotLayout",
|
||||||
|
|
@ -3618,12 +3612,6 @@
|
||||||
"en": "Default Layout",
|
"en": "Default Layout",
|
||||||
"tr": "Varsayılan Düzen"
|
"tr": "Varsayılan Düzen"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"resourceName": "Platform",
|
|
||||||
"key": "ListForms.ListFormEdit.DetailsLayoutDto.CardLayoutColumn",
|
|
||||||
"en": "Card Layout Column",
|
|
||||||
"tr": "Kart Düzeni Sütunu"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"resourceName": "Platform",
|
"resourceName": "Platform",
|
||||||
"key": "ListForms.ListFormEdit.DatabaseDataSource",
|
"key": "ListForms.ListFormEdit.DatabaseDataSource",
|
||||||
|
|
@ -15432,7 +15420,7 @@
|
||||||
"resourceName": "Platform",
|
"resourceName": "Platform",
|
||||||
"key": "App.Listform.ListformField.Township",
|
"key": "App.Listform.ListformField.Township",
|
||||||
"en": "Township",
|
"en": "Township",
|
||||||
"tr": "İlçe"
|
"tr": "Mahalle"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"resourceName": "Platform",
|
"resourceName": "Platform",
|
||||||
|
|
|
||||||
|
|
@ -1516,39 +1516,6 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
},
|
},
|
||||||
|
|
||||||
new() {
|
|
||||||
ListFormCode = listForm.ListFormCode,
|
|
||||||
CultureName = LanguageCodes.En,
|
|
||||||
SourceDbType = DbType.String,
|
|
||||||
FieldName = "Address1",
|
|
||||||
CaptionName = "App.Listform.ListformField.Address1",
|
|
||||||
Width = 200,
|
|
||||||
ListOrderNo = 10,
|
|
||||||
Visible = true,
|
|
||||||
IsActive = true,
|
|
||||||
IsDeleted = false,
|
|
||||||
AllowSearch = true,
|
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
|
||||||
},
|
|
||||||
new() {
|
|
||||||
ListFormCode = listForm.ListFormCode,
|
|
||||||
CultureName = LanguageCodes.En,
|
|
||||||
SourceDbType = DbType.String,
|
|
||||||
FieldName = "Address2",
|
|
||||||
CaptionName = "App.Listform.ListformField.Address2",
|
|
||||||
Width = 200,
|
|
||||||
ListOrderNo = 11,
|
|
||||||
Visible = true,
|
|
||||||
IsActive = true,
|
|
||||||
IsDeleted = false,
|
|
||||||
AllowSearch = true,
|
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
|
||||||
},
|
|
||||||
new() {
|
new() {
|
||||||
ListFormCode = listForm.ListFormCode,
|
ListFormCode = listForm.ListFormCode,
|
||||||
CultureName = LanguageCodes.En,
|
CultureName = LanguageCodes.En,
|
||||||
|
|
@ -1556,7 +1523,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
||||||
FieldName = "Country",
|
FieldName = "Country",
|
||||||
CaptionName = "App.Listform.ListformField.Country",
|
CaptionName = "App.Listform.ListformField.Country",
|
||||||
Width = 100,
|
Width = 100,
|
||||||
ListOrderNo = 12,
|
ListOrderNo = 10,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
IsDeleted = false,
|
IsDeleted = false,
|
||||||
|
|
@ -1581,7 +1548,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
||||||
FieldName = "City",
|
FieldName = "City",
|
||||||
CaptionName = "App.Listform.ListformField.City",
|
CaptionName = "App.Listform.ListformField.City",
|
||||||
Width = 100,
|
Width = 100,
|
||||||
ListOrderNo = 13,
|
ListOrderNo = 11,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
IsDeleted = false,
|
IsDeleted = false,
|
||||||
|
|
@ -1609,7 +1576,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
||||||
FieldName = "District",
|
FieldName = "District",
|
||||||
CaptionName = "App.Listform.ListformField.District",
|
CaptionName = "App.Listform.ListformField.District",
|
||||||
Width = 100,
|
Width = 100,
|
||||||
ListOrderNo = 14,
|
ListOrderNo = 12,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
IsDeleted = false,
|
IsDeleted = false,
|
||||||
|
|
@ -1637,7 +1604,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
||||||
FieldName = "Township",
|
FieldName = "Township",
|
||||||
CaptionName = "App.Listform.ListformField.Township",
|
CaptionName = "App.Listform.ListformField.Township",
|
||||||
Width = 100,
|
Width = 100,
|
||||||
ListOrderNo = 15,
|
ListOrderNo = 13,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
IsDeleted = false,
|
IsDeleted = false,
|
||||||
|
|
@ -1657,6 +1624,38 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
},
|
},
|
||||||
|
new() {
|
||||||
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.String,
|
||||||
|
FieldName = "Address1",
|
||||||
|
CaptionName = "App.Listform.ListformField.Address1",
|
||||||
|
Width = 200,
|
||||||
|
ListOrderNo = 14,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
},
|
||||||
|
new() {
|
||||||
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.String,
|
||||||
|
FieldName = "Address2",
|
||||||
|
CaptionName = "App.Listform.ListformField.Address2",
|
||||||
|
Width = 200,
|
||||||
|
ListOrderNo = 15,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
},
|
||||||
new() {
|
new() {
|
||||||
ListFormCode = listForm.ListFormCode,
|
ListFormCode = listForm.ListFormCode,
|
||||||
CultureName = LanguageCodes.En,
|
CultureName = LanguageCodes.En,
|
||||||
|
|
|
||||||
|
|
@ -65,14 +65,12 @@ public static class SeederDefaults
|
||||||
public static string DefaultLayoutJson(string DefaultLayout = "grid") => JsonSerializer.Serialize(new LayoutDto()
|
public static string DefaultLayoutJson(string DefaultLayout = "grid") => JsonSerializer.Serialize(new LayoutDto()
|
||||||
{
|
{
|
||||||
Grid = true,
|
Grid = true,
|
||||||
Card = true,
|
|
||||||
Pivot = true,
|
Pivot = true,
|
||||||
Chart = true,
|
Chart = true,
|
||||||
Tree = true,
|
Tree = true,
|
||||||
Gantt = true,
|
Gantt = true,
|
||||||
Scheduler = true,
|
Scheduler = true,
|
||||||
DefaultLayout = DefaultLayout,
|
DefaultLayout = DefaultLayout,
|
||||||
CardLayoutColumn = 4
|
|
||||||
});
|
});
|
||||||
public static readonly string DefaultExportJson = JsonSerializer.Serialize(new ChartExportDto
|
public static readonly string DefaultExportJson = JsonSerializer.Serialize(new ChartExportDto
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -55,5 +55,4 @@ export interface ListFormJsonRowDto {
|
||||||
export interface ListState {
|
export interface ListState {
|
||||||
listFormCode: string
|
listFormCode: string
|
||||||
layout: ListViewLayoutType
|
layout: ListViewLayoutType
|
||||||
cardLayoutColumn?: number
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -893,14 +893,12 @@ export interface WidgetEditDto {
|
||||||
|
|
||||||
export interface LayoutDto {
|
export interface LayoutDto {
|
||||||
grid: boolean
|
grid: boolean
|
||||||
card: boolean
|
|
||||||
pivot: boolean
|
pivot: boolean
|
||||||
tree: boolean
|
tree: boolean
|
||||||
chart: boolean
|
chart: boolean
|
||||||
gantt: boolean
|
gantt: boolean
|
||||||
scheduler: boolean
|
scheduler: boolean
|
||||||
defaultLayout: ListViewLayoutType
|
defaultLayout: ListViewLayoutType
|
||||||
cardLayoutColumn: number
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ExtraFilterDto {
|
export interface ExtraFilterDto {
|
||||||
|
|
|
||||||
|
|
@ -23,13 +23,11 @@ const schema = Yup.object().shape({
|
||||||
showNote: Yup.boolean(),
|
showNote: Yup.boolean(),
|
||||||
layoutDto: Yup.object().shape({
|
layoutDto: Yup.object().shape({
|
||||||
grid: Yup.boolean(),
|
grid: Yup.boolean(),
|
||||||
card: Yup.boolean(),
|
|
||||||
pivot: Yup.boolean(),
|
pivot: Yup.boolean(),
|
||||||
chart: Yup.boolean(),
|
chart: Yup.boolean(),
|
||||||
tree: Yup.boolean(),
|
tree: Yup.boolean(),
|
||||||
gantt: Yup.boolean(),
|
gantt: Yup.boolean(),
|
||||||
defaultLayout: Yup.string(),
|
defaultLayout: Yup.string(),
|
||||||
cardLayoutColumn: Yup.number(),
|
|
||||||
}),
|
}),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
@ -259,25 +257,6 @@ function FormTabDetails(
|
||||||
)}
|
)}
|
||||||
</Field>
|
</Field>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
||||||
<FormItem
|
|
||||||
label={translate('::ListForms.ListFormEdit.DetailsLayoutDto.CardLayoutColumn')}
|
|
||||||
invalid={
|
|
||||||
errors.layoutDto?.cardLayoutColumn && touched.layoutDto?.cardLayoutColumn
|
|
||||||
}
|
|
||||||
errorMessage={errors.layoutDto?.cardLayoutColumn}
|
|
||||||
>
|
|
||||||
<Field
|
|
||||||
type="number"
|
|
||||||
className="w-20"
|
|
||||||
autoComplete="off"
|
|
||||||
name="layoutDto.cardLayoutColumn"
|
|
||||||
placeholder={translate(
|
|
||||||
'::ListForms.ListFormEdit.DetailsLayoutDto.CardLayoutColumn',
|
|
||||||
)}
|
|
||||||
component={Input}
|
|
||||||
/>
|
|
||||||
</FormItem>
|
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
@ -296,20 +275,6 @@ function FormTabDetails(
|
||||||
/>
|
/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
||||||
<FormItem
|
|
||||||
label={translate('::ListForms.ListFormEdit.DetailsLayoutDto.CardLayout')}
|
|
||||||
invalid={errors.layoutDto?.card && touched.layoutDto?.card}
|
|
||||||
errorMessage={errors.layoutDto?.card}
|
|
||||||
>
|
|
||||||
<Field
|
|
||||||
className="w-20"
|
|
||||||
autoComplete="off"
|
|
||||||
name="layoutDto.card"
|
|
||||||
placeholder={translate('::ListForms.ListFormEdit.DetailsLayoutDto.CardLayout')}
|
|
||||||
component={Checkbox}
|
|
||||||
/>
|
|
||||||
</FormItem>
|
|
||||||
|
|
||||||
<FormItem
|
<FormItem
|
||||||
label={translate('::ListForms.ListFormEdit.DetailsLayoutDto.PivotLayout')}
|
label={translate('::ListForms.ListFormEdit.DetailsLayoutDto.PivotLayout')}
|
||||||
invalid={errors.layoutDto?.pivot && touched.layoutDto?.pivot}
|
invalid={errors.layoutDto?.pivot && touched.layoutDto?.pivot}
|
||||||
|
|
|
||||||
|
|
@ -209,10 +209,11 @@ export const listFormTypeOptions = [
|
||||||
|
|
||||||
export const listFormDefaultLayoutOptions = [
|
export const listFormDefaultLayoutOptions = [
|
||||||
{ value: 'grid', label: 'Grid' },
|
{ value: 'grid', label: 'Grid' },
|
||||||
{ value: 'card', label: 'Card' },
|
|
||||||
{ value: 'pivot', label: 'Pivot' },
|
{ value: 'pivot', label: 'Pivot' },
|
||||||
{ value: 'chart', label: 'Chart' },
|
{ value: 'chart', label: 'Chart' },
|
||||||
{ value: 'tree', label: 'Tree' },
|
{ value: 'tree', label: 'Tree' },
|
||||||
|
{ value: 'gantt', label: 'Gantt' },
|
||||||
|
{ value: 'scheduler', label: 'Scheduler' },
|
||||||
]
|
]
|
||||||
|
|
||||||
export const listFormAlignmentOptions = [
|
export const listFormAlignmentOptions = [
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,9 @@
|
||||||
export type ChartOperation = '' | 'select' | 'insert' | 'update' | 'delete'
|
export type ChartOperation = '' | 'select' | 'insert' | 'update' | 'delete'
|
||||||
export type ChartDialogType = '' | 'pane' | 'serie' | 'annotation' | 'axis'
|
export type ChartDialogType = '' | 'pane' | 'serie' | 'annotation' | 'axis'
|
||||||
export type ListViewLayoutType = 'grid' | 'card' | 'pivot' | 'tree' | 'chart' | 'gantt' | 'scheduler'
|
export type ListViewLayoutType = 'grid' | 'pivot' | 'tree' | 'chart' | 'gantt' | 'scheduler'
|
||||||
|
|
||||||
export const layoutTypes = {
|
export const layoutTypes = {
|
||||||
grid: 'Grid',
|
grid: 'Grid',
|
||||||
card: 'Card',
|
|
||||||
pivot: 'Pivot',
|
pivot: 'Pivot',
|
||||||
tree: 'Tree',
|
tree: 'Tree',
|
||||||
chart: 'Chart',
|
chart: 'Chart',
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -14,7 +14,6 @@ import { getList } from '@/services/form.service'
|
||||||
import { useCurrentMenuIcon } from '@/utils/hooks/useCurrentMenuIcon'
|
import { useCurrentMenuIcon } from '@/utils/hooks/useCurrentMenuIcon'
|
||||||
import { ListViewLayoutType } from '../admin/listForm/edit/types'
|
import { ListViewLayoutType } from '../admin/listForm/edit/types'
|
||||||
import Chart from './Chart'
|
import Chart from './Chart'
|
||||||
import CardView from './CardView'
|
|
||||||
import GanttView from './GanttView'
|
import GanttView from './GanttView'
|
||||||
import SchedulerView from './SchedulerView'
|
import SchedulerView from './SchedulerView'
|
||||||
|
|
||||||
|
|
@ -156,20 +155,6 @@ const List = () => {
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{gridDto?.gridOptions?.layoutDto.card && (
|
|
||||||
<Button
|
|
||||||
size="xs"
|
|
||||||
variant={viewMode === 'card' ? 'solid' : 'default'}
|
|
||||||
onClick={() => {
|
|
||||||
setViewMode('card')
|
|
||||||
setStates({ listFormCode, layout: 'card' })
|
|
||||||
}}
|
|
||||||
title="Card Görünümü"
|
|
||||||
>
|
|
||||||
<FaIdCard className="w-4 h-4" />
|
|
||||||
</Button>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{gridDto?.gridOptions?.layoutDto.pivot && (
|
{gridDto?.gridOptions?.layoutDto.pivot && (
|
||||||
<Button
|
<Button
|
||||||
size="xs"
|
size="xs"
|
||||||
|
|
@ -229,14 +214,6 @@ const List = () => {
|
||||||
isSubForm={false}
|
isSubForm={false}
|
||||||
gridDto={gridDto}
|
gridDto={gridDto}
|
||||||
/>
|
/>
|
||||||
) : viewMode === 'card' ? (
|
|
||||||
<CardView
|
|
||||||
listFormCode={listFormCode}
|
|
||||||
searchParams={searchParams}
|
|
||||||
isSubForm={false}
|
|
||||||
gridDto={gridDto}
|
|
||||||
refreshGridDto={refreshGridDto}
|
|
||||||
/>
|
|
||||||
) : viewMode === 'grid' ? (
|
) : viewMode === 'grid' ? (
|
||||||
<Grid
|
<Grid
|
||||||
listFormCode={listFormCode}
|
listFormCode={listFormCode}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue