Remove console messages and unecessary help messages, and adjusts to new mapping list structure (#160)
This commit is contained in:
parent
64558dd01c
commit
271b278d1c
|
@ -51,7 +51,7 @@
|
||||||
class="is-block"
|
class="is-block"
|
||||||
v-if="Object.keys(exporterSession).length &&
|
v-if="Object.keys(exporterSession).length &&
|
||||||
Object.keys(exporterSession.mapping_accept).length &&
|
Object.keys(exporterSession.mapping_accept).length &&
|
||||||
exporterSession.mapping_accept.any"
|
exporterSession.mapping_list.length"
|
||||||
:label="$i18n.get('mapping')">
|
:label="$i18n.get('mapping')">
|
||||||
|
|
||||||
<b-select
|
<b-select
|
||||||
|
@ -61,10 +61,10 @@
|
||||||
:placeholder="$i18n.get('instruction_select_a_mapper')">
|
:placeholder="$i18n.get('instruction_select_a_mapper')">
|
||||||
<option :value="''">-</option>
|
<option :value="''">-</option>
|
||||||
<option
|
<option
|
||||||
v-for="(mapping, key) in exporterSession.mapping_list"
|
v-for="(mapping) in exporterSession.mapping_list"
|
||||||
:value="key"
|
:value="mapping"
|
||||||
:key="key">
|
:key="mapping">
|
||||||
{{ key.replace(/-/, ' ') }}
|
{{ mapping.replace(/-/, ' ') }}
|
||||||
</option>
|
</option>
|
||||||
</b-select>
|
</b-select>
|
||||||
|
|
||||||
|
@ -102,6 +102,9 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
<pre>
|
||||||
|
{{ exporterSession }}
|
||||||
|
</pre>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -174,11 +177,12 @@
|
||||||
formIsValid(){
|
formIsValid(){
|
||||||
return (
|
return (
|
||||||
this.selectedCollection &&
|
this.selectedCollection &&
|
||||||
|
((!this.exporterSession.accept_no_mapping && this.selectedMapping) ||
|
||||||
|
this.exporterSession.accept_no_mapping) &&
|
||||||
!this.formErrorMessage
|
!this.formErrorMessage
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
verifyError(response){
|
verifyError(response){
|
||||||
console.log(response);
|
|
||||||
if(response.constructor.name === 'Object' &&
|
if(response.constructor.name === 'Object' &&
|
||||||
(response.data && response.data.status &&
|
(response.data && response.data.status &&
|
||||||
response.data.status.toString().split('')[0] != 2) || response.error_message) {
|
response.data.status.toString().split('')[0] != 2) || response.error_message) {
|
||||||
|
|
|
@ -14,7 +14,6 @@ import Page from '../pages/lists/taxonomies-page.vue'
|
||||||
import ActivitiesPage from '../pages/lists/activities-page.vue'
|
import ActivitiesPage from '../pages/lists/activities-page.vue'
|
||||||
import AvailableExportersPage from '../pages/lists/available-exporters-page.vue'
|
import AvailableExportersPage from '../pages/lists/available-exporters-page.vue'
|
||||||
import AvailableImportersPage from '../pages/lists/available-importers-page.vue'
|
import AvailableImportersPage from '../pages/lists/available-importers-page.vue'
|
||||||
import ExportPage from '../pages/singles/export-page.vue'
|
|
||||||
|
|
||||||
// Edition Form Components
|
// Edition Form Components
|
||||||
import CollectionEditionForm from '../components/edition/collection-edition-form.vue'
|
import CollectionEditionForm from '../components/edition/collection-edition-form.vue'
|
||||||
|
@ -82,9 +81,6 @@ const routes = [
|
||||||
{ path: '/importers/:importerSlug/:sessionId', name: 'ImporterCreationForm', component: ImporterEditionForm, meta: { title: i18nGet('title_importer_page'), icon: 'import' } },
|
{ path: '/importers/:importerSlug/:sessionId', name: 'ImporterCreationForm', component: ImporterEditionForm, meta: { title: i18nGet('title_importer_page'), icon: 'import' } },
|
||||||
{ path: '/importers/:importerType/:sessionId/mapping/:collectionId', name: 'ImporterMappingForm', component: ImporterMappingForm, meta: {title: i18nGet('title_importer_mapping_page'), icon: 'import'} },
|
{ path: '/importers/:importerType/:sessionId/mapping/:collectionId', name: 'ImporterMappingForm', component: ImporterMappingForm, meta: {title: i18nGet('title_importer_mapping_page'), icon: 'import'} },
|
||||||
|
|
||||||
{ path: '/exporters/collection/:collectionId', name: 'ExportCollection', component: ExportPage, meta: {title: i18nGet('title_export_collection_page'), icon: 'export'} },
|
|
||||||
{ path: '/exporters/item/:itemId', name: 'ExportItem', component: ExportPage, meta: {title: i18nGet('title_export_item_page'), icon: 'export'} },
|
|
||||||
|
|
||||||
{ path: '/exporters', name: 'ExportersPage', component: AvailableExportersPage, meta: {title: i18nGet('title_exporters_page'), icon: 'export'} },
|
{ path: '/exporters', name: 'ExportersPage', component: AvailableExportersPage, meta: {title: i18nGet('title_exporters_page'), icon: 'export'} },
|
||||||
{ path: '/exporters/:exporterSlug', name: 'ExporterEditionForm', component: ExporterEditionForm, meta: {title: i18nGet('title_exporter_page'), icon: 'export'}},
|
{ path: '/exporters/:exporterSlug', name: 'ExporterEditionForm', component: ExporterEditionForm, meta: {title: i18nGet('title_exporter_page'), icon: 'export'}},
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
:bread-crumb-items="[{ path: '', label: $i18n.get('exporters') }]" />
|
:bread-crumb-items="[{ path: '', label: $i18n.get('exporters') }]" />
|
||||||
|
|
||||||
<h3>{{ $i18n.get('label_available_exporters') }}</h3>
|
<h3>{{ $i18n.get('label_available_exporters') }}</h3>
|
||||||
<p>{{ $i18n.get('info_available_exporters_helper') }}</p>
|
|
||||||
<p>{{ $i18n.get('instruction_select_an_exporter_type') }}</p>
|
<p>{{ $i18n.get('instruction_select_an_exporter_type') }}</p>
|
||||||
<div class="exporter-types-container">
|
<div class="exporter-types-container">
|
||||||
<div
|
<div
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
:bread-crumb-items="[{ path: '', label: $i18n.get('importers') }]" />
|
:bread-crumb-items="[{ path: '', label: $i18n.get('importers') }]" />
|
||||||
|
|
||||||
<h3>{{ $i18n.get('label_available_importers') }}</h3>
|
<h3>{{ $i18n.get('label_available_importers') }}</h3>
|
||||||
<p>{{ $i18n.get('info_available_importers_helper') }}</p>
|
|
||||||
<p>{{ $i18n.get('instruction_select_an_importer_type') }}</p>
|
<p>{{ $i18n.get('instruction_select_an_importer_type') }}</p>
|
||||||
<div class="importer-types-container">
|
<div class="importer-types-container">
|
||||||
<div
|
<div
|
||||||
|
|
|
@ -1,42 +0,0 @@
|
||||||
<template>
|
|
||||||
<div class="columns is-fullheight">
|
|
||||||
<section class="column is-secondary-content">
|
|
||||||
<tainacan-collection-subheader :id="collectionId"/>
|
|
||||||
<router-view
|
|
||||||
id="export-page-container"
|
|
||||||
:collection-id="collectionId"
|
|
||||||
class="page-container page-container-small"/>
|
|
||||||
</section>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import TainacanCollectionSubheader from '../../components/navigation/tainacan-collection-subheader.vue';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'ExportPage',
|
|
||||||
data(){
|
|
||||||
return {
|
|
||||||
collectionId: Number,
|
|
||||||
itemId: Number,
|
|
||||||
selectedList: []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
components: {
|
|
||||||
TainacanCollectionSubheader
|
|
||||||
},
|
|
||||||
created(){
|
|
||||||
this.collectionId = parseInt(this.$route.params.collectionId);
|
|
||||||
this.itemId = parseInt(this.$route.params.itemId);
|
|
||||||
this.selectedList = [];
|
|
||||||
this.$eventBusSearch.setCollectionId(this.collectionId);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
|
|
||||||
</style>
|
|
||||||
|
|
||||||
|
|
|
@ -468,7 +468,6 @@ return apply_filters( 'tainacan-admin-i18n', [
|
||||||
'info_create_filters' => __( 'Click or Drag and Drop Metadata here for creating a new Filter.', 'tainacan' ),
|
'info_create_filters' => __( 'Click or Drag and Drop Metadata here for creating a new Filter.', 'tainacan' ),
|
||||||
'info_create_metadata' => __( 'Click or Drag and Drop Metadata Types here for creating a new Metadata.', 'tainacan' ),
|
'info_create_metadata' => __( 'Click or Drag and Drop Metadata Types here for creating a new Metadata.', 'tainacan' ),
|
||||||
'info_choose_your_metadata' => __( 'Choose your metadata.', 'tainacan' ),
|
'info_choose_your_metadata' => __( 'Choose your metadata.', 'tainacan' ),
|
||||||
'info_available_importers_helper' => __( 'The available importer type will affect the file or link that will provide your data besides deciding wich options are available to the importer.', 'tainacan' ),
|
|
||||||
'info_target_collection_helper' => __( 'The collection where imported item will be added.', 'tainacan' ),
|
'info_target_collection_helper' => __( 'The collection where imported item will be added.', 'tainacan' ),
|
||||||
'info_source_file_upload' => __( 'The file containing the data to be imported.', 'tainacan' ),
|
'info_source_file_upload' => __( 'The file containing the data to be imported.', 'tainacan' ),
|
||||||
'info_metadata_mapping_helper' => __( 'Map each file metadata with the corresponding one in selected collection.', 'tainacan' ),
|
'info_metadata_mapping_helper' => __( 'Map each file metadata with the corresponding one in selected collection.', 'tainacan' ),
|
||||||
|
@ -513,7 +512,6 @@ return apply_filters( 'tainacan-admin-i18n', [
|
||||||
'info_leaving_bulk_edition' => __( 'You are leaving the bulk edition now.', 'tainacan' ),
|
'info_leaving_bulk_edition' => __( 'You are leaving the bulk edition now.', 'tainacan' ),
|
||||||
'info_current_view_mode_metadata_not_allowed' => __( 'Current view mode does not allow displayed metadata selection.', 'tainacan' ),
|
'info_current_view_mode_metadata_not_allowed' => __( 'Current view mode does not allow displayed metadata selection.', 'tainacan' ),
|
||||||
'info_cant_select_metadata_without_items' => __( 'Can not select displayed metadata without items on list.', 'tainacan' ),
|
'info_cant_select_metadata_without_items' => __( 'Can not select displayed metadata without items on list.', 'tainacan' ),
|
||||||
'info_available_exporters_helper' => __( '?', 'tainacan' ),
|
|
||||||
'info_empty' => __( 'empty', 'tainacan' ),
|
'info_empty' => __( 'empty', 'tainacan' ),
|
||||||
'info_url_copied' => __( 'URL link copied', 'tainacan' ),
|
'info_url_copied' => __( 'URL link copied', 'tainacan' ),
|
||||||
'info_other_item_listing_options' => __('Other items listing options: ', 'tainacan'),
|
'info_other_item_listing_options' => __('Other items listing options: ', 'tainacan'),
|
||||||
|
|
|
@ -73,10 +73,12 @@ class GutenbergBlock {
|
||||||
array('wp-edit-blocks')
|
array('wp-edit-blocks')
|
||||||
);
|
);
|
||||||
|
|
||||||
register_block_type('tainacan/items-grid', array(
|
if(function_exists('register_block_type')) {
|
||||||
|
register_block_type( 'tainacan/items-grid', array(
|
||||||
'editor_script' => 'items-grid',
|
'editor_script' => 'items-grid',
|
||||||
'style' => 'items-grid'
|
'style' => 'items-grid'
|
||||||
));
|
) );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function register_tainacan_collections_carousel(){
|
public function register_tainacan_collections_carousel(){
|
||||||
|
@ -94,10 +96,12 @@ class GutenbergBlock {
|
||||||
array('wp-edit-blocks')
|
array('wp-edit-blocks')
|
||||||
);
|
);
|
||||||
|
|
||||||
register_block_type('tainacan/collections-carousel', array(
|
if(function_exists('register_block_type')) {
|
||||||
|
register_block_type( 'tainacan/collections-carousel', array(
|
||||||
'editor_script' => 'collections-carousel',
|
'editor_script' => 'collections-carousel',
|
||||||
'style' => 'collections-carousel'
|
'style' => 'collections-carousel'
|
||||||
));
|
) );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function get_plugin_js_settings(){
|
public function get_plugin_js_settings(){
|
||||||
|
|
|
@ -28,7 +28,6 @@ export const updateExporterSession = ({commit}, exporterSessionUpdated) => {
|
||||||
|
|
||||||
return tainacan.patch(`/exporters/session/${exporterSessionUpdated.id}`, exporterSessionUpdated.body)
|
return tainacan.patch(`/exporters/session/${exporterSessionUpdated.id}`, exporterSessionUpdated.body)
|
||||||
.then(response => {
|
.then(response => {
|
||||||
console.info(response.data);
|
|
||||||
commit('setExporterSession');
|
commit('setExporterSession');
|
||||||
|
|
||||||
return response;
|
return response;
|
||||||
|
|
Loading…
Reference in New Issue