Reorganizes 'components' folder
This commit is contained in:
parent
0e627f4649
commit
c23834582d
|
@ -41,7 +41,7 @@
|
||||||
<script>
|
<script>
|
||||||
import { isCancel } from '../../../front/admin/js/axios';
|
import { isCancel } from '../../../front/admin/js/axios';
|
||||||
import { filterTypeMixin, dynamicFilterTypeMixin } from '../filter-types-mixin';
|
import { filterTypeMixin, dynamicFilterTypeMixin } from '../filter-types-mixin';
|
||||||
import CheckboxRadioModal from '../../../front/admin/components/other/checkbox-radio-modal.vue';
|
import CheckboxRadioModal from '../../../front/admin/components/modals/checkbox-radio-modal.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [filterTypeMixin, dynamicFilterTypeMixin],
|
mixins: [filterTypeMixin, dynamicFilterTypeMixin],
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
import qs from 'qs';
|
import qs from 'qs';
|
||||||
import { tainacan as axios, CancelToken, isCancel } from '../../../front/admin/js/axios';
|
import { tainacan as axios, CancelToken, isCancel } from '../../../front/admin/js/axios';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import CheckboxRadioModal from '../../../front/admin/components/other/checkbox-radio-modal.vue';
|
import CheckboxRadioModal from '../../../front/admin/components/modals/checkbox-radio-modal.vue';
|
||||||
import { filterTypeMixin, dynamicFilterTypeMixin } from '../filter-types-mixin';
|
import { filterTypeMixin, dynamicFilterTypeMixin } from '../filter-types-mixin';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
|
@ -102,7 +102,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { eventBus } from '../../front/admin/js/event-bus-web-components'
|
import { eventBusItemMetadata } from '../../front/admin/js/event-bus-item-metadata'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TainacanFormItem',
|
name: 'TainacanFormItem',
|
||||||
|
@ -123,7 +123,7 @@
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.createInputs();
|
this.createInputs();
|
||||||
eventBus.$on('updateErrorMessageOf#' + this.metadatum.metadatum.id, (errors) => {
|
eventBusItemMetadata.$on('updateErrorMessageOf#' + this.metadatum.metadatum.id, (errors) => {
|
||||||
let updatedErrorMessage = '';
|
let updatedErrorMessage = '';
|
||||||
if (errors && this.metadatum.metadatum.id == errors.metadatum_id && errors.errors) {
|
if (errors && this.metadatum.metadatum.id == errors.metadatum_id && errors.errors) {
|
||||||
for (let error of errors.errors) {
|
for (let error of errors.errors) {
|
||||||
|
@ -176,7 +176,7 @@
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
eventBus.$emit('input', {
|
eventBusItemMetadata.$emit('input', {
|
||||||
itemId: this.metadatum.item.id,
|
itemId: this.metadatum.item.id,
|
||||||
metadatumId: this.metadatum.metadatum.id,
|
metadatumId: this.metadatum.metadatum.id,
|
||||||
values: this.inputs ? this.inputs : ''
|
values: this.inputs ? this.inputs : ''
|
||||||
|
@ -202,7 +202,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
eventBus.$off('updateErrorMessageOf#' + this.metadatum.metadatum.id);
|
eventBusItemMetadata.$off('updateErrorMessageOf#' + this.metadatum.metadatum.id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -66,7 +66,7 @@
|
||||||
<script>
|
<script>
|
||||||
import { tainacan as axios } from '../../../front/admin/js/axios';
|
import { tainacan as axios } from '../../../front/admin/js/axios';
|
||||||
import qs from 'qs';
|
import qs from 'qs';
|
||||||
import CheckboxRadioModal from '../../../front/admin/components/other/checkbox-radio-modal.vue'
|
import CheckboxRadioModal from '../../../front/admin/components/modals/checkbox-radio-modal.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
created() {
|
created() {
|
||||||
|
|
|
@ -75,7 +75,7 @@
|
||||||
<script>
|
<script>
|
||||||
import { tainacan as axios } from '../../../front/admin/js/axios';
|
import { tainacan as axios } from '../../../front/admin/js/axios';
|
||||||
import qs from 'qs';
|
import qs from 'qs';
|
||||||
import CheckboxRadioModal from '../../../front/admin/components/other/checkbox-radio-modal.vue'
|
import CheckboxRadioModal from '../../../front/admin/components/modals/checkbox-radio-modal.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
created() {
|
created() {
|
||||||
|
|
|
@ -187,7 +187,7 @@
|
||||||
<script>
|
<script>
|
||||||
import { mapActions, mapGetters } from 'vuex';
|
import { mapActions, mapGetters } from 'vuex';
|
||||||
import CustomDialog from '../other/custom-dialog.vue';
|
import CustomDialog from '../other/custom-dialog.vue';
|
||||||
import BulkEditionModal from '../bulk-edition/bulk-edition-modal.vue';
|
import BulkEditionModal from '../modals/bulk-edition-modal.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ItemBulkEditionForm',
|
name: 'ItemBulkEditionForm',
|
||||||
|
|
|
@ -762,7 +762,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapActions, mapGetters } from 'vuex';
|
import { mapActions, mapGetters } from 'vuex';
|
||||||
import { eventBus } from '../../js/event-bus-web-components';
|
import { eventBusItemMetadata } from '../../js/event-bus-item-metadata';
|
||||||
import wpMediaFrames from '../../js/wp-media-frames';
|
import wpMediaFrames from '../../js/wp-media-frames';
|
||||||
import FileItem from '../other/file-item.vue';
|
import FileItem from '../other/file-item.vue';
|
||||||
import DocumentItem from '../other/document-item.vue';
|
import DocumentItem from '../other/document-item.vue';
|
||||||
|
@ -848,7 +848,7 @@ export default {
|
||||||
|
|
||||||
// Clear form variables
|
// Clear form variables
|
||||||
this.cleanMetadata();
|
this.cleanMetadata();
|
||||||
eventBus.clearAllErrors();
|
eventBusItemMetadata.clearAllErrors();
|
||||||
this.formErrorMessage = '';
|
this.formErrorMessage = '';
|
||||||
|
|
||||||
this.isLoading = true;
|
this.isLoading = true;
|
||||||
|
@ -957,7 +957,7 @@ export default {
|
||||||
if (errors.errors) {
|
if (errors.errors) {
|
||||||
for (let error of errors.errors) {
|
for (let error of errors.errors) {
|
||||||
for (let metadatum of Object.keys(error)){
|
for (let metadatum of Object.keys(error)){
|
||||||
eventBus.errors.push({ metadatum_id: metadatum, errors: error[metadatum]});
|
eventBusItemMetadata.errors.push({ metadatum_id: metadatum, errors: error[metadatum]});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.formErrorMessage = errors.error_message;
|
this.formErrorMessage = errors.error_message;
|
||||||
|
@ -1055,7 +1055,7 @@ export default {
|
||||||
.catch((errors) => {
|
.catch((errors) => {
|
||||||
for (let error of errors.errors) {
|
for (let error of errors.errors) {
|
||||||
for (let metadatum of Object.keys(error)){
|
for (let metadatum of Object.keys(error)){
|
||||||
eventBus.errors.push({ metadatum_id: metadatum, errors: error[metadatum]});
|
eventBusItemMetadata.errors.push({ metadatum_id: metadatum, errors: error[metadatum]});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.formErrorMessage = errors.error_message;
|
this.formErrorMessage = errors.error_message;
|
||||||
|
@ -1087,7 +1087,7 @@ export default {
|
||||||
.catch((errors) => {
|
.catch((errors) => {
|
||||||
for (let error of errors.errors) {
|
for (let error of errors.errors) {
|
||||||
for (let metadatum of Object.keys(error)){
|
for (let metadatum of Object.keys(error)){
|
||||||
eventBus.errors.push({ metadatum_id: metadatum, errors: error[metadatum]});
|
eventBusItemMetadata.errors.push({ metadatum_id: metadatum, errors: error[metadatum]});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.formErrorMessage = errors.error_message;
|
this.formErrorMessage = errors.error_message;
|
||||||
|
@ -1118,7 +1118,7 @@ export default {
|
||||||
.catch((errors) => {
|
.catch((errors) => {
|
||||||
for (let error of errors.errors) {
|
for (let error of errors.errors) {
|
||||||
for (let metadatum of Object.keys(error)){
|
for (let metadatum of Object.keys(error)){
|
||||||
eventBus.errors.push({ metadatum_id: metadatum, errors: error[metadatum]});
|
eventBusItemMetadata.errors.push({ metadatum_id: metadatum, errors: error[metadatum]});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.formErrorMessage = errors.error_message;
|
this.formErrorMessage = errors.error_message;
|
||||||
|
@ -1185,7 +1185,7 @@ export default {
|
||||||
.catch((errors) => {
|
.catch((errors) => {
|
||||||
for (let error of errors.errors) {
|
for (let error of errors.errors) {
|
||||||
for (let metadatum of Object.keys(error)){
|
for (let metadatum of Object.keys(error)){
|
||||||
eventBus.errors.push({ metadatum_id: metadatum, errors: error[metadatum]});
|
eventBusItemMetadata.errors.push({ metadatum_id: metadatum, errors: error[metadatum]});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.formErrorMessage = errors.error_message;
|
this.formErrorMessage = errors.error_message;
|
||||||
|
@ -1332,7 +1332,7 @@ export default {
|
||||||
created(){
|
created(){
|
||||||
// Obtains collection ID
|
// Obtains collection ID
|
||||||
this.cleanMetadata();
|
this.cleanMetadata();
|
||||||
eventBus.clearAllErrors();
|
eventBusItemMetadata.clearAllErrors();
|
||||||
this.formErrorMessage = '';
|
this.formErrorMessage = '';
|
||||||
this.collectionId = this.$route.params.collectionId;
|
this.collectionId = this.$route.params.collectionId;
|
||||||
this.form.collectionId = this.collectionId;
|
this.form.collectionId = this.collectionId;
|
||||||
|
@ -1378,10 +1378,10 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sets feedback variables
|
// Sets feedback variables
|
||||||
eventBus.$on('isUpdatingValue', (status) => {
|
eventBusItemMetadata.$on('isUpdatingValue', (status) => {
|
||||||
this.isUpdatingValues = status;
|
this.isUpdatingValues = status;
|
||||||
});
|
});
|
||||||
eventBus.$on('hasErrorsOnForm', (hasErrors) => {
|
eventBusItemMetadata.$on('hasErrorsOnForm', (hasErrors) => {
|
||||||
if (hasErrors)
|
if (hasErrors)
|
||||||
this.formErrorMessage = this.$i18n.get('info_errors_in_form');
|
this.formErrorMessage = this.$i18n.get('info_errors_in_form');
|
||||||
else
|
else
|
||||||
|
@ -1390,8 +1390,8 @@ export default {
|
||||||
this.cleanLastUpdated();
|
this.cleanLastUpdated();
|
||||||
},
|
},
|
||||||
beforeDestroy () {
|
beforeDestroy () {
|
||||||
eventBus.$off('isUpdatingValue');
|
eventBusItemMetadata.$off('isUpdatingValue');
|
||||||
eventBus.$off('hasErrorsOnForm');
|
eventBusItemMetadata.$off('hasErrorsOnForm');
|
||||||
},
|
},
|
||||||
beforeRouteLeave ( to, from, next ) {
|
beforeRouteLeave ( to, from, next ) {
|
||||||
if (this.item.status == 'auto-draft') {
|
if (this.item.status == 'auto-draft') {
|
||||||
|
|
|
@ -129,7 +129,7 @@
|
||||||
<script>
|
<script>
|
||||||
import { mapActions } from 'vuex';
|
import { mapActions } from 'vuex';
|
||||||
|
|
||||||
import ActivityDetailsModal from '../other/activity-details-modal.vue';
|
import ActivityDetailsModal from '../modals/activity-details-modal.vue';
|
||||||
import ThreeStateToggleButton from '../other/three-state-toggle-button.vue';
|
import ThreeStateToggleButton from '../other/three-state-toggle-button.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
|
@ -117,7 +117,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import CapabilityEditionModal from '../other/capability-edition-modal.vue';
|
import CapabilityEditionModal from '../modals/capability-edition-modal.vue';
|
||||||
|
|
||||||
// Auxiliary component for avoinding multiple calls to getCompleteRolesList
|
// Auxiliary component for avoinding multiple calls to getCompleteRolesList
|
||||||
const CompleteRolesList = {
|
const CompleteRolesList = {
|
||||||
|
|
|
@ -918,7 +918,7 @@
|
||||||
import { mapActions, mapGetters } from 'vuex';
|
import { mapActions, mapGetters } from 'vuex';
|
||||||
import CustomDialog from '../other/custom-dialog.vue';
|
import CustomDialog from '../other/custom-dialog.vue';
|
||||||
import ItemCopyDialog from '../other/item-copy-dialog.vue';
|
import ItemCopyDialog from '../other/item-copy-dialog.vue';
|
||||||
import BulkEditionModal from '../bulk-edition/bulk-edition-modal.vue';
|
import BulkEditionModal from '../modals/bulk-edition-modal.vue';
|
||||||
import { dateInter } from "../../js/mixins";
|
import { dateInter } from "../../js/mixins";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
|
@ -607,7 +607,7 @@
|
||||||
<script>
|
<script>
|
||||||
import { mapActions, mapGetters } from 'vuex';
|
import { mapActions, mapGetters } from 'vuex';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import FileItem from './file-item.vue';
|
import FileItem from '../other/file-item.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "ActivityDetailsModal",
|
name: "ActivityDetailsModal",
|
|
@ -126,7 +126,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import AdvancedSearch from '../advanced-search/advanced-search.vue';
|
import AdvancedSearch from '../search/advanced-search.vue';
|
||||||
import ProcessesPopup from '../other/processes-popup.vue';
|
import ProcessesPopup from '../other/processes-popup.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
|
@ -82,7 +82,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import AvailableExportersModal from '../other/available-exporters-modal.vue';
|
import AvailableExportersModal from '../modals/available-exporters-modal.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TainacanRepositorySubheader',
|
name: 'TainacanRepositorySubheader',
|
||||||
|
|
|
@ -93,7 +93,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapActions } from 'vuex';
|
import { mapActions } from 'vuex';
|
||||||
import BulkEditionModal from '../bulk-edition/bulk-edition-modal.vue';
|
import BulkEditionModal from '../modals/bulk-edition-modal.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ItemCopyDialog',
|
name: 'ItemCopyDialog',
|
||||||
|
|
|
@ -198,7 +198,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters, mapActions } from 'vuex';
|
import { mapGetters, mapActions } from 'vuex';
|
||||||
import CollectionsFilter from '../repository/collection-filter/collection-filter.vue';
|
import CollectionsFilter from '../other/collection-filter.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import store from './store/store'
|
import store from './store/store'
|
||||||
|
|
||||||
export const eventBus = new Vue({
|
export const eventBusItemMetadata = new Vue({
|
||||||
store,
|
store,
|
||||||
data: {
|
data: {
|
||||||
errors : []
|
errors : []
|
|
@ -315,7 +315,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import CollectionsList from '../../components/lists/collections-list.vue';
|
import CollectionsList from '../../components/lists/collections-list.vue';
|
||||||
import AvailableImportersModal from '../../components/other/available-importers-modal.vue';
|
import AvailableImportersModal from '../../components/modals/available-importers-modal.vue';
|
||||||
import { mapActions, mapGetters } from 'vuex';
|
import { mapActions, mapGetters } from 'vuex';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
|
@ -901,10 +901,10 @@
|
||||||
import FiltersTagsList from '../../components/search/filters-tags-list.vue';
|
import FiltersTagsList from '../../components/search/filters-tags-list.vue';
|
||||||
import FiltersItemsList from '../../components/search/filters-items-list.vue';
|
import FiltersItemsList from '../../components/search/filters-items-list.vue';
|
||||||
import Pagination from '../../components/search/pagination.vue'
|
import Pagination from '../../components/search/pagination.vue'
|
||||||
import AdvancedSearch from '../../components/advanced-search/advanced-search.vue';
|
import AdvancedSearch from '../../components/search/advanced-search.vue';
|
||||||
import AvailableImportersModal from '../../components/other/available-importers-modal.vue';
|
import AvailableImportersModal from '../../components/modals/available-importers-modal.vue';
|
||||||
import ExposersModal from '../../components/other/exposers-modal.vue';
|
import ExposersModal from '../../components/modals/exposers-modal.vue';
|
||||||
import CollectionsModal from '../../components/other/collections-modal.vue';
|
import CollectionsModal from '../../components/modals/collections-modal.vue';
|
||||||
import CustomDialog from '../../components/other/custom-dialog.vue';
|
import CustomDialog from '../../components/other/custom-dialog.vue';
|
||||||
import { mapActions, mapGetters } from 'vuex';
|
import { mapActions, mapGetters } from 'vuex';
|
||||||
|
|
||||||
|
|
|
@ -870,9 +870,9 @@
|
||||||
import FiltersTagsList from '../../components/search/filters-tags-list.vue';
|
import FiltersTagsList from '../../components/search/filters-tags-list.vue';
|
||||||
import FiltersItemsList from '../../components/search/filters-items-list.vue';
|
import FiltersItemsList from '../../components/search/filters-items-list.vue';
|
||||||
import Pagination from '../../components/search/pagination.vue'
|
import Pagination from '../../components/search/pagination.vue'
|
||||||
import AdvancedSearch from '../../components/advanced-search/advanced-search.vue';
|
import AdvancedSearch from '../../components/search/advanced-search.vue';
|
||||||
import ExposersModal from '../../components/other/exposers-modal.vue';
|
import ExposersModal from '../../components/modals/exposers-modal.vue';
|
||||||
import AvailableImportersModal from '../../components/other/available-importers-modal.vue';
|
import AvailableImportersModal from '../../components/modals/available-importers-modal.vue';
|
||||||
import CustomDialog from '../../components/other/custom-dialog.vue';
|
import CustomDialog from '../../components/other/custom-dialog.vue';
|
||||||
import { mapActions, mapGetters } from 'vuex';
|
import { mapActions, mapGetters } from 'vuex';
|
||||||
|
|
||||||
|
|
|
@ -313,7 +313,7 @@
|
||||||
import DocumentItem from '../../components/other/document-item.vue';
|
import DocumentItem from '../../components/other/document-item.vue';
|
||||||
import {formHooks} from '../../js/mixins';
|
import {formHooks} from '../../js/mixins';
|
||||||
import ActivitiesPage from '../lists/activities-page.vue';
|
import ActivitiesPage from '../lists/activities-page.vue';
|
||||||
import ExposersModal from '../../components/other/exposers-modal.vue';
|
import ExposersModal from '../../components/modals/exposers-modal.vue';
|
||||||
import AttachmentsList from '../../components/lists/attachments-list.vue';
|
import AttachmentsList from '../../components/lists/attachments-list.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
Loading…
Reference in New Issue