Fix description export
This commit is contained in:
@@ -6,6 +6,7 @@ import ExportSelectionModal, { type ExportSelectionState } from "../modals/Expor
|
|||||||
|
|
||||||
type MenuConfigImportExportProps = {
|
type MenuConfigImportExportProps = {
|
||||||
config?: OrderFormConfig | null;
|
config?: OrderFormConfig | null;
|
||||||
|
description?: string;
|
||||||
onImportConfig?: (config: OrderFormConfig) => void | Promise<void>;
|
onImportConfig?: (config: OrderFormConfig) => void | Promise<void>;
|
||||||
showImport?: boolean;
|
showImport?: boolean;
|
||||||
showExport?: boolean;
|
showExport?: boolean;
|
||||||
@@ -23,6 +24,7 @@ function normalizeConfig(value: unknown): OrderFormConfig {
|
|||||||
|
|
||||||
export default function MenuConfigImportExport({
|
export default function MenuConfigImportExport({
|
||||||
config,
|
config,
|
||||||
|
description,
|
||||||
onImportConfig,
|
onImportConfig,
|
||||||
showImport = true,
|
showImport = true,
|
||||||
showExport = true,
|
showExport = true,
|
||||||
@@ -98,8 +100,8 @@ export default function MenuConfigImportExport({
|
|||||||
payload.title = fileNameBase || "";
|
payload.title = fileNameBase || "";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (exportSelection.description) {
|
if (exportSelection.description || description) {
|
||||||
payload.description = "";
|
payload.description = description || "";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (exportSelection.menu) {
|
if (exportSelection.menu) {
|
||||||
|
|||||||
@@ -76,6 +76,7 @@ export default function ReadOnlyOrderOverviewCard({
|
|||||||
extra={
|
extra={
|
||||||
<MenuConfigImportExport
|
<MenuConfigImportExport
|
||||||
config={currentConfig}
|
config={currentConfig}
|
||||||
|
description={currentDescription}
|
||||||
showImport={false}
|
showImport={false}
|
||||||
onImportConfig={onImportConfig}
|
onImportConfig={onImportConfig}
|
||||||
fileNameBase={order.title || "order"}
|
fileNameBase={order.title || "order"}
|
||||||
|
|||||||
Reference in New Issue
Block a user