Custom endpoints
This commit is contained in:
parent
ec951d0876
commit
f72d93b262
5 changed files with 56 additions and 31 deletions
|
|
@ -6569,9 +6569,9 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
new EditingFormItemDto { Order = 2, DataField = "Url", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 3, DataField = "Method", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions="{ \"showClearButton\" : true }" },
|
||||
new EditingFormItemDto { Order = 4, DataField = "DataSourceCode", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions="{ \"showClearButton\" : true }" },
|
||||
new EditingFormItemDto { Order = 5, DataField = "Sql", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextArea },
|
||||
new EditingFormItemDto { Order = 6, DataField = "ParametersJson", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextArea },
|
||||
new EditingFormItemDto { Order = 7, DataField = "PermissionsJson", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextArea },
|
||||
new EditingFormItemDto { Order = 5, DataField = "Sql", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextArea, EditorOptions="{ \"height\" : 60 }" },
|
||||
new EditingFormItemDto { Order = 6, DataField = "ParametersJson", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextArea, EditorOptions="{ \"height\" : 60 }" },
|
||||
new EditingFormItemDto { Order = 7, DataField = "PermissionsJson", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextArea, EditorOptions="{ \"height\" : 60 }" },
|
||||
new EditingFormItemDto { Order = 8, DataField = "Description", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextArea },
|
||||
]
|
||||
}
|
||||
|
|
@ -6625,7 +6625,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Name",
|
||||
Width = 300,
|
||||
Width = 150,
|
||||
ListOrderNo = 2,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
|
|
@ -6651,7 +6651,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Description",
|
||||
Width = 300,
|
||||
Width = 350,
|
||||
ListOrderNo = 3,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
|
|
@ -6677,7 +6677,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Url",
|
||||
Width = 300,
|
||||
Width = 100,
|
||||
ListOrderNo = 4,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
|
|
@ -6777,7 +6777,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Sql",
|
||||
Width = 500,
|
||||
Width = 200,
|
||||
ListOrderNo = 7,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ define(['./workbox-54d0af47'], (function (workbox) { 'use strict';
|
|||
"revision": "3ca0b8505b4bec776b69afdba2768812"
|
||||
}, {
|
||||
"url": "index.html",
|
||||
"revision": "0.q0hdfv947pg"
|
||||
"revision": "0.opl3kd80omo"
|
||||
}], {});
|
||||
workbox.cleanupOutdatedCaches();
|
||||
workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), {
|
||||
|
|
|
|||
|
|
@ -1,12 +1,27 @@
|
|||
import React, { useEffect, useRef } from 'react'
|
||||
import React from 'react'
|
||||
import { useNavigate } from 'react-router-dom'
|
||||
|
||||
const NotFoundPage = () => {
|
||||
const navigate = useNavigate()
|
||||
|
||||
return (
|
||||
<div className="flex flex-col items-center justify-center min-h-[90vh] bg-white font-inter">
|
||||
<div className="text-[8rem] sm:text-[10rem] md:text-[12rem] font-bold mb-6 bg-gradient-to-br from-primary to-secondary bg-clip-text animate-pulse">
|
||||
<div>
|
||||
<div className="flex items-center justify-center font-inter">
|
||||
<div className="text-[8rem] sm:text-[10rem] md:text-[12rem] font-bold bg-gradient-to-br from-primary to-secondary bg-clip-text animate-pulse">
|
||||
404
|
||||
</div>
|
||||
</div>
|
||||
<p className="flex items-center justify-center text-xl mb-6 text-gray-600">Aradığınız sayfa bulunamadı.</p>
|
||||
<div className="flex items-center justify-center font-inter">
|
||||
|
||||
<button
|
||||
onClick={() => navigate('/')}
|
||||
className="px-6 py-3 bg-primary rounded-xl shadow hover:bg-secondary transition"
|
||||
>
|
||||
Ana Sayfa'ya Dön
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ const Views = (props: ViewsProps) => {
|
|||
</UiDialog>
|
||||
))}
|
||||
<DialogProvider>
|
||||
<DialogShowComponent></DialogShowComponent>
|
||||
<DialogShowComponent />
|
||||
<DynamicRouter />
|
||||
</DialogProvider>
|
||||
</Suspense>
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ import DataGrid, {
|
|||
Sorting,
|
||||
Summary,
|
||||
Toolbar,
|
||||
TotalItem
|
||||
TotalItem,
|
||||
} from 'devextreme-react/data-grid'
|
||||
import { Item } from 'devextreme-react/toolbar'
|
||||
import { DataType } from 'devextreme/common'
|
||||
|
|
@ -64,10 +64,10 @@ import { GridBoxEditorComponent } from './editors/GridBoxEditorComponent'
|
|||
import { TagBoxEditorComponent } from './editors/TagBoxEditorComponent'
|
||||
import { useFilters } from './useFilters'
|
||||
import { useToolbar } from './useToolbar'
|
||||
import { Workbook } from 'exceljs';
|
||||
import saveAs from 'file-saver';
|
||||
import { Workbook } from 'exceljs'
|
||||
import saveAs from 'file-saver'
|
||||
import { jsPDF } from 'jspdf'
|
||||
import { exportDataGrid as exportDataPdf } from 'devextreme/pdf_exporter';
|
||||
import { exportDataGrid as exportDataPdf } from 'devextreme/pdf_exporter'
|
||||
import { exportDataGrid as exportDataExcel } from 'devextreme/excel_exporter'
|
||||
|
||||
interface GridProps {
|
||||
|
|
@ -441,7 +441,10 @@ const Grid = (props: GridProps) => {
|
|||
autoFilterEnabled: true,
|
||||
}).then(() => {
|
||||
workbook.xlsx.writeBuffer().then((buffer) => {
|
||||
saveAs(new Blob([buffer], { type: 'application/octet-stream' }), `${listFormCode}_export.xlsx`)
|
||||
saveAs(
|
||||
new Blob([buffer], { type: 'application/octet-stream' }),
|
||||
`${listFormCode}_export.xlsx`,
|
||||
)
|
||||
})
|
||||
})
|
||||
} else if (e.format == 'pdf') {
|
||||
|
|
@ -454,18 +457,21 @@ const Grid = (props: GridProps) => {
|
|||
doc.save(`${listFormCode}_export.pdf`)
|
||||
})
|
||||
} else if (e.format == 'csv') {
|
||||
const workbook = new Workbook();
|
||||
const workbook = new Workbook()
|
||||
const worksheet = workbook.addWorksheet(`${listFormCode}_sheet`)
|
||||
exportDataExcel({
|
||||
component: gridRef?.current?.instance,
|
||||
worksheet: worksheet
|
||||
worksheet: worksheet,
|
||||
}).then(function () {
|
||||
workbook.csv.writeBuffer().then(function (buffer) {
|
||||
saveAs(new Blob([buffer], { type: "application/octet-stream" }), `${listFormCode}_export.csv`)
|
||||
saveAs(
|
||||
new Blob([buffer], { type: 'application/octet-stream' }),
|
||||
`${listFormCode}_export.csv`,
|
||||
)
|
||||
})
|
||||
})
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
return (
|
||||
<Container className={DX_CLASSNAMES}>
|
||||
|
|
@ -524,7 +530,11 @@ const Grid = (props: GridProps) => {
|
|||
props.refreshData?.()
|
||||
}}
|
||||
>
|
||||
<Export enabled={true} allowExportSelectedData={false} formats={['pdf', 'xlsx', 'csv']} />
|
||||
<Export
|
||||
enabled={true}
|
||||
allowExportSelectedData={false}
|
||||
formats={['pdf', 'xlsx', 'csv']}
|
||||
/>
|
||||
<Editing
|
||||
refreshMode={gridDto.gridOptions.editingOptionDto?.refreshMode}
|
||||
mode={smaller.md ? 'form' : gridDto.gridOptions.editingOptionDto?.mode}
|
||||
|
|
|
|||
Loading…
Reference in a new issue