2
0
mirror of https://github.com/frappe/books.git synced 2024-12-22 19:09:01 +00:00

fix: log import and export events

This commit is contained in:
18alantom 2023-06-28 12:25:17 +05:30
parent 00ce281afc
commit e8041b7d9c
2 changed files with 10 additions and 4 deletions

View File

@ -26,7 +26,7 @@
<Int
v-if="configFields.limit"
:df="configFields.limit"
:value="limit"
:value="limit ?? undefined"
:border="true"
@change="(value: number) => (limit = value)"
/>
@ -104,6 +104,7 @@ import Check from './Controls/Check.vue';
import Int from './Controls/Int.vue';
import Select from './Controls/Select.vue';
import FormHeader from './FormHeader.vue';
import { Verb } from 'fyo/telemetry/types';
interface ExportWizardData {
useListFilters: boolean;
@ -165,13 +166,13 @@ export default defineComponent({
fieldtype: 'Check',
label: t`Use List Filters`,
fieldname: 'useListFilters',
},
} as Field,
limit: {
placeholder: 'Limit number of rows',
fieldtype: 'Int',
label: t`Limit`,
fieldname: 'limit',
},
} as Field,
exportFormat: {
fieldtype: 'Select',
label: t`Export Format`,
@ -180,7 +181,7 @@ export default defineComponent({
{ value: 'json', label: 'JSON' },
{ value: 'csv', label: 'CSV' },
],
},
} as Field,
};
},
},
@ -257,6 +258,9 @@ export default defineComponent({
}
await saveData(data, filePath);
this.fyo.telemetry.log(Verb.Exported, this.schemaName, {
extension: this.exportFormat,
});
showExportInFolder(fyo.t`Export Successful`, filePath);
},
getFileName() {

View File

@ -371,6 +371,7 @@
<script lang="ts">
import { DocValue } from 'fyo/core/types';
import { Action } from 'fyo/model/types';
import { Verb } from 'fyo/telemetry/types';
import { ValidationError } from 'fyo/utils/errors';
import { ModelNameEnum } from 'models/types';
import { OptionField, RawValue, SelectOption } from 'schemas/types';
@ -864,6 +865,7 @@ export default defineComponent({
}
}
this.fyo.telemetry.log(Verb.Imported, this.importer.schemaName);
this.isMakingEntries = false;
this.complete = true;
},