diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-01 21:13:56 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-01 21:13:56 +0300 |
commit | 1769b59b9fd05325e3016b1a53a82ae6cf56adb5 (patch) | |
tree | a7e81e0c94fce5cc033e802d53d0c08d833fc87d /app/assets/javascripts/issuable | |
parent | 05003789d95f2f5d28a2f018d9e1b51ad7ab983c (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/issuable')
3 files changed, 35 insertions, 11 deletions
diff --git a/app/assets/javascripts/issuable/components/csv_export_modal.vue b/app/assets/javascripts/issuable/components/csv_export_modal.vue index 78987a5c629..7bdd55ddda3 100644 --- a/app/assets/javascripts/issuable/components/csv_export_modal.vue +++ b/app/assets/javascripts/issuable/components/csv_export_modal.vue @@ -12,19 +12,23 @@ export default { }, inject: { issuableType: { - default: '', - }, - issuableCount: { - default: 0, + default: ISSUABLE_TYPE.issues, }, email: { default: '', }, + }, + props: { exportCsvPath: { + type: String, + required: false, default: '', }, - }, - props: { + issuableCount: { + type: Number, + required: false, + default: 0, + }, modalId: { type: String, required: true, diff --git a/app/assets/javascripts/issuable/components/csv_import_export_buttons.vue b/app/assets/javascripts/issuable/components/csv_import_export_buttons.vue index 14474d44e10..fb4d5aca2f5 100644 --- a/app/assets/javascripts/issuable/components/csv_import_export_buttons.vue +++ b/app/assets/javascripts/issuable/components/csv_import_export_buttons.vue @@ -53,6 +53,18 @@ export default { default: false, }, }, + props: { + exportCsvPath: { + type: String, + required: false, + default: '', + }, + issuableCount: { + type: Number, + required: false, + default: undefined, + }, + }, computed: { exportModalId() { return `${this.issuableType}-export-modal`; @@ -105,7 +117,12 @@ export default { > </gl-dropdown> </gl-button-group> - <csv-export-modal v-if="showExportButton" :modal-id="exportModalId" /> + <csv-export-modal + v-if="showExportButton" + :modal-id="exportModalId" + :export-csv-path="exportCsvPath" + :issuable-count="issuableCount" + /> <csv-import-modal v-if="showImportButton" :modal-id="importModalId" /> </div> </template> diff --git a/app/assets/javascripts/issuable/init_csv_import_export_buttons.js b/app/assets/javascripts/issuable/init_csv_import_export_buttons.js index 5a720b89d33..83163e3c478 100644 --- a/app/assets/javascripts/issuable/init_csv_import_export_buttons.js +++ b/app/assets/javascripts/issuable/init_csv_import_export_buttons.js @@ -1,6 +1,6 @@ import Vue from 'vue'; import { parseBoolean } from '~/lib/utils/common_utils'; -import ImportExportButtons from './components/csv_import_export_buttons.vue'; +import CsvImportExportButtons from './components/csv_import_export_buttons.vue'; export default () => { const el = document.querySelector('.js-csv-import-export-buttons'); @@ -28,9 +28,7 @@ export default () => { showExportButton: parseBoolean(showExportButton), showImportButton: parseBoolean(showImportButton), issuableType, - issuableCount, email, - exportCsvPath, importCsvIssuesPath, containerClass, canEdit: parseBoolean(canEdit), @@ -39,7 +37,12 @@ export default () => { showLabel, }, render(h) { - return h(ImportExportButtons); + return h(CsvImportExportButtons, { + props: { + exportCsvPath, + issuableCount: parseInt(issuableCount, 10), + }, + }); }, }); }; |