Skip to content

Commit

Permalink
refactored to use ImportResults component
Browse files Browse the repository at this point in the history
Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>
  • Loading branch information
elzody committed Mar 1, 2024
1 parent 127def5 commit 62aa604
Showing 1 changed file with 3 additions and 42 deletions.
45 changes: 3 additions & 42 deletions src/modules/modals/Import.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,48 +63,7 @@

<!-- show results -->
<div v-if="!loading && result !== null && !waitForReload">
<RowFormWrapper v-if="result !== ''" :title="t('tables', 'Result')">
<div class="fix-col-1">
{{ t('tables', 'Found columns') }}
</div>
<div class="fix-col-3" data-cy="importResultColumnsFound">
{{ result['found_columns_count'] }}
</div>
<div class="fix-col-1">
{{ t('tables', 'Matching columns') }}
</div>
<div class="fix-col-3" data-cy="importResultColumnsMatch">
{{ result['matching_columns_count'] }}
</div>
<div class="fix-col-1">
{{ t('tables', 'Created columns') }}
</div>
<div class="fix-col-3" data-cy="importResultColumnsCreated">
{{ result['created_columns_count'] }}
</div>
<div class="fix-col-1">
{{ t('tables', 'Inserted rows') }}
</div>
<div class="fix-col-3" data-cy="importResultRowsInserted">
{{ result['inserted_rows_count'] }}
</div>
<div class="fix-col-1">
{{ t('tables', 'Value parsing errors') }}
</div>
<div class="fix-col-3" data-cy="importResultParsingErrors">
{{ result['errors_parsing_count'] }}
</div>
<div class="fix-col-1">
{{ t('tables', 'Row creation errors') }}
</div>
<div class="fix-col-3" data-cy="importResultRowErrors">
{{ result['errors_count'] }}
</div>
</RowFormWrapper>

<RowFormWrapper v-else :title="t('tables', 'Result')">
{{ t('tables', 'Error during importing. Please read the logs for more information.') }}
</RowFormWrapper>
<ImportResults :results="result" />

<div class="row">
<div class="fix-col-4 space-T end">
Expand Down Expand Up @@ -141,6 +100,7 @@ import axios from '@nextcloud/axios'
import { generateUrl } from '@nextcloud/router'
import { mapGetters } from 'vuex'
import NcIconTimerSand from '../../shared/components/ncIconTimerSand/NcIconTimerSand.vue'
import ImportResults from './ImportResults.vue'
export default {
Expand All @@ -150,6 +110,7 @@ export default {
IconFolder,
NcModal,
NcButton,
ImportResults,
NcCheckboxRadioSwitch,
RowFormWrapper,
NcEmptyContent,
Expand Down

0 comments on commit 62aa604

Please sign in to comment.