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