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 bool Grid { get; set; } = true;
|
||||
public bool Card { get; set; } = true;
|
||||
public bool Pivot { get; set; } = true;
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3588,12 +3588,6 @@
|
|||
"en": "Grid Layout",
|
||||
"tr": "Liste Düzeni"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.ListFormEdit.DetailsLayoutDto.CardLayout",
|
||||
"en": "Card Layout",
|
||||
"tr": "Kart Düzeni"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.ListFormEdit.DetailsLayoutDto.PivotLayout",
|
||||
|
|
@ -3618,12 +3612,6 @@
|
|||
"en": "Default Layout",
|
||||
"tr": "Varsayılan Düzen"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.ListFormEdit.DetailsLayoutDto.CardLayoutColumn",
|
||||
"en": "Card Layout Column",
|
||||
"tr": "Kart Düzeni Sütunu"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.ListFormEdit.DatabaseDataSource",
|
||||
|
|
@ -15432,7 +15420,7 @@
|
|||
"resourceName": "Platform",
|
||||
"key": "App.Listform.ListformField.Township",
|
||||
"en": "Township",
|
||||
"tr": "İlçe"
|
||||
"tr": "Mahalle"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
|
|
|
|||
|
|
@ -1516,39 +1516,6 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
|||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
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() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
|
|
@ -1556,7 +1523,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
|||
FieldName = "Country",
|
||||
CaptionName = "App.Listform.ListformField.Country",
|
||||
Width = 100,
|
||||
ListOrderNo = 12,
|
||||
ListOrderNo = 10,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
|
|
@ -1581,7 +1548,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
|||
FieldName = "City",
|
||||
CaptionName = "App.Listform.ListformField.City",
|
||||
Width = 100,
|
||||
ListOrderNo = 13,
|
||||
ListOrderNo = 11,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
|
|
@ -1609,7 +1576,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
|||
FieldName = "District",
|
||||
CaptionName = "App.Listform.ListformField.District",
|
||||
Width = 100,
|
||||
ListOrderNo = 14,
|
||||
ListOrderNo = 12,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
|
|
@ -1637,7 +1604,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
|||
FieldName = "Township",
|
||||
CaptionName = "App.Listform.ListformField.Township",
|
||||
Width = 100,
|
||||
ListOrderNo = 15,
|
||||
ListOrderNo = 13,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
|
|
@ -1657,6 +1624,38 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
|||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
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() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
|
|
|
|||
|
|
@ -65,14 +65,12 @@ public static class SeederDefaults
|
|||
public static string DefaultLayoutJson(string DefaultLayout = "grid") => JsonSerializer.Serialize(new LayoutDto()
|
||||
{
|
||||
Grid = true,
|
||||
Card = true,
|
||||
Pivot = true,
|
||||
Chart = true,
|
||||
Tree = true,
|
||||
Gantt = true,
|
||||
Scheduler = true,
|
||||
DefaultLayout = DefaultLayout,
|
||||
CardLayoutColumn = 4
|
||||
});
|
||||
public static readonly string DefaultExportJson = JsonSerializer.Serialize(new ChartExportDto
|
||||
{
|
||||
|
|
|
|||
|
|
@ -55,5 +55,4 @@ export interface ListFormJsonRowDto {
|
|||
export interface ListState {
|
||||
listFormCode: string
|
||||
layout: ListViewLayoutType
|
||||
cardLayoutColumn?: number
|
||||
}
|
||||
|
|
|
|||
|
|
@ -893,14 +893,12 @@ export interface WidgetEditDto {
|
|||
|
||||
export interface LayoutDto {
|
||||
grid: boolean
|
||||
card: boolean
|
||||
pivot: boolean
|
||||
tree: boolean
|
||||
chart: boolean
|
||||
gantt: boolean
|
||||
scheduler: boolean
|
||||
defaultLayout: ListViewLayoutType
|
||||
cardLayoutColumn: number
|
||||
}
|
||||
|
||||
export interface ExtraFilterDto {
|
||||
|
|
|
|||
|
|
@ -23,13 +23,11 @@ const schema = Yup.object().shape({
|
|||
showNote: Yup.boolean(),
|
||||
layoutDto: Yup.object().shape({
|
||||
grid: Yup.boolean(),
|
||||
card: Yup.boolean(),
|
||||
pivot: Yup.boolean(),
|
||||
chart: Yup.boolean(),
|
||||
tree: Yup.boolean(),
|
||||
gantt: Yup.boolean(),
|
||||
defaultLayout: Yup.string(),
|
||||
cardLayoutColumn: Yup.number(),
|
||||
}),
|
||||
})
|
||||
|
||||
|
|
@ -259,25 +257,6 @@ function FormTabDetails(
|
|||
)}
|
||||
</Field>
|
||||
</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
|
||||
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
|
||||
label={translate('::ListForms.ListFormEdit.DetailsLayoutDto.PivotLayout')}
|
||||
invalid={errors.layoutDto?.pivot && touched.layoutDto?.pivot}
|
||||
|
|
|
|||
|
|
@ -209,10 +209,11 @@ export const listFormTypeOptions = [
|
|||
|
||||
export const listFormDefaultLayoutOptions = [
|
||||
{ value: 'grid', label: 'Grid' },
|
||||
{ value: 'card', label: 'Card' },
|
||||
{ value: 'pivot', label: 'Pivot' },
|
||||
{ value: 'chart', label: 'Chart' },
|
||||
{ value: 'tree', label: 'Tree' },
|
||||
{ value: 'gantt', label: 'Gantt' },
|
||||
{ value: 'scheduler', label: 'Scheduler' },
|
||||
]
|
||||
|
||||
export const listFormAlignmentOptions = [
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
export type ChartOperation = '' | 'select' | 'insert' | 'update' | 'delete'
|
||||
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 = {
|
||||
grid: 'Grid',
|
||||
card: 'Card',
|
||||
pivot: 'Pivot',
|
||||
tree: 'Tree',
|
||||
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 { ListViewLayoutType } from '../admin/listForm/edit/types'
|
||||
import Chart from './Chart'
|
||||
import CardView from './CardView'
|
||||
import GanttView from './GanttView'
|
||||
import SchedulerView from './SchedulerView'
|
||||
|
||||
|
|
@ -156,20 +155,6 @@ const List = () => {
|
|||
</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 && (
|
||||
<Button
|
||||
size="xs"
|
||||
|
|
@ -229,14 +214,6 @@ const List = () => {
|
|||
isSubForm={false}
|
||||
gridDto={gridDto}
|
||||
/>
|
||||
) : viewMode === 'card' ? (
|
||||
<CardView
|
||||
listFormCode={listFormCode}
|
||||
searchParams={searchParams}
|
||||
isSubForm={false}
|
||||
gridDto={gridDto}
|
||||
refreshGridDto={refreshGridDto}
|
||||
/>
|
||||
) : viewMode === 'grid' ? (
|
||||
<Grid
|
||||
listFormCode={listFormCode}
|
||||
|
|
|
|||
Loading…
Reference in a new issue