Reorganizes 'components' folder

This commit is contained in:
Mateus Machado Luna 2020-01-14 09:42:51 -03:00
parent 0e627f4649
commit c23834582d
29 changed files with 39 additions and 39 deletions

View File

@ -41,7 +41,7 @@
<script>
import { isCancel } from '../../../front/admin/js/axios';
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 {
mixins: [filterTypeMixin, dynamicFilterTypeMixin],

View File

@ -49,7 +49,7 @@
import qs from 'qs';
import { tainacan as axios, CancelToken, isCancel } from '../../../front/admin/js/axios';
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';
export default {

View File

@ -102,7 +102,7 @@
</template>
<script>
import { eventBus } from '../../front/admin/js/event-bus-web-components'
import { eventBusItemMetadata } from '../../front/admin/js/event-bus-item-metadata'
export default {
name: 'TainacanFormItem',
@ -123,7 +123,7 @@
},
created() {
this.createInputs();
eventBus.$on('updateErrorMessageOf#' + this.metadatum.metadatum.id, (errors) => {
eventBusItemMetadata.$on('updateErrorMessageOf#' + this.metadatum.metadatum.id, (errors) => {
let updatedErrorMessage = '';
if (errors && this.metadatum.metadatum.id == errors.metadatum_id && errors.errors) {
for (let error of errors.errors) {
@ -176,7 +176,7 @@
return
}
eventBus.$emit('input', {
eventBusItemMetadata.$emit('input', {
itemId: this.metadatum.item.id,
metadatumId: this.metadatum.metadatum.id,
values: this.inputs ? this.inputs : ''
@ -202,7 +202,7 @@
}
},
beforeDestroy() {
eventBus.$off('updateErrorMessageOf#' + this.metadatum.metadatum.id);
eventBusItemMetadata.$off('updateErrorMessageOf#' + this.metadatum.metadatum.id);
}
}
</script>

View File

@ -66,7 +66,7 @@
<script>
import { tainacan as axios } from '../../../front/admin/js/axios';
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 {
created() {

View File

@ -75,7 +75,7 @@
<script>
import { tainacan as axios } from '../../../front/admin/js/axios';
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 {
created() {

View File

@ -187,7 +187,7 @@
<script>
import { mapActions, mapGetters } from 'vuex';
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 {
name: 'ItemBulkEditionForm',

View File

@ -762,7 +762,7 @@
<script>
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 FileItem from '../other/file-item.vue';
import DocumentItem from '../other/document-item.vue';
@ -848,7 +848,7 @@ export default {
// Clear form variables
this.cleanMetadata();
eventBus.clearAllErrors();
eventBusItemMetadata.clearAllErrors();
this.formErrorMessage = '';
this.isLoading = true;
@ -957,7 +957,7 @@ export default {
if (errors.errors) {
for (let error of errors.errors) {
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;
@ -1055,7 +1055,7 @@ export default {
.catch((errors) => {
for (let error of errors.errors) {
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;
@ -1087,7 +1087,7 @@ export default {
.catch((errors) => {
for (let error of errors.errors) {
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;
@ -1118,7 +1118,7 @@ export default {
.catch((errors) => {
for (let error of errors.errors) {
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;
@ -1185,7 +1185,7 @@ export default {
.catch((errors) => {
for (let error of errors.errors) {
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;
@ -1332,7 +1332,7 @@ export default {
created(){
// Obtains collection ID
this.cleanMetadata();
eventBus.clearAllErrors();
eventBusItemMetadata.clearAllErrors();
this.formErrorMessage = '';
this.collectionId = this.$route.params.collectionId;
this.form.collectionId = this.collectionId;
@ -1378,10 +1378,10 @@ export default {
}
// Sets feedback variables
eventBus.$on('isUpdatingValue', (status) => {
eventBusItemMetadata.$on('isUpdatingValue', (status) => {
this.isUpdatingValues = status;
});
eventBus.$on('hasErrorsOnForm', (hasErrors) => {
eventBusItemMetadata.$on('hasErrorsOnForm', (hasErrors) => {
if (hasErrors)
this.formErrorMessage = this.$i18n.get('info_errors_in_form');
else
@ -1390,8 +1390,8 @@ export default {
this.cleanLastUpdated();
},
beforeDestroy () {
eventBus.$off('isUpdatingValue');
eventBus.$off('hasErrorsOnForm');
eventBusItemMetadata.$off('isUpdatingValue');
eventBusItemMetadata.$off('hasErrorsOnForm');
},
beforeRouteLeave ( to, from, next ) {
if (this.item.status == 'auto-draft') {

View File

@ -129,7 +129,7 @@
<script>
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';
export default {

View File

@ -117,7 +117,7 @@
</template>
<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
const CompleteRolesList = {

View File

@ -918,7 +918,7 @@
import { mapActions, mapGetters } from 'vuex';
import CustomDialog from '../other/custom-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";
export default {

View File

@ -607,7 +607,7 @@
<script>
import { mapActions, mapGetters } from 'vuex';
import moment from 'moment';
import FileItem from './file-item.vue';
import FileItem from '../other/file-item.vue';
export default {
name: "ActivityDetailsModal",

View File

@ -126,7 +126,7 @@
</template>
<script>
import AdvancedSearch from '../advanced-search/advanced-search.vue';
import AdvancedSearch from '../search/advanced-search.vue';
import ProcessesPopup from '../other/processes-popup.vue';
export default {

View File

@ -82,7 +82,7 @@
<script>
import { mapGetters } from 'vuex';
import AvailableExportersModal from '../other/available-exporters-modal.vue';
import AvailableExportersModal from '../modals/available-exporters-modal.vue';
export default {
name: 'TainacanRepositorySubheader',

View File

@ -93,7 +93,7 @@
<script>
import { mapActions } from 'vuex';
import BulkEditionModal from '../bulk-edition/bulk-edition-modal.vue';
import BulkEditionModal from '../modals/bulk-edition-modal.vue';
export default {
name: 'ItemCopyDialog',

View File

@ -198,7 +198,7 @@
<script>
import { mapGetters, mapActions } from 'vuex';
import CollectionsFilter from '../repository/collection-filter/collection-filter.vue';
import CollectionsFilter from '../other/collection-filter.vue';
export default {
data() {

View File

@ -1,7 +1,7 @@
import Vue from 'vue';
import store from './store/store'
export const eventBus = new Vue({
export const eventBusItemMetadata = new Vue({
store,
data: {
errors : []

View File

@ -315,7 +315,7 @@
<script>
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';
export default {

View File

@ -901,10 +901,10 @@
import FiltersTagsList from '../../components/search/filters-tags-list.vue';
import FiltersItemsList from '../../components/search/filters-items-list.vue';
import Pagination from '../../components/search/pagination.vue'
import AdvancedSearch from '../../components/advanced-search/advanced-search.vue';
import AvailableImportersModal from '../../components/other/available-importers-modal.vue';
import ExposersModal from '../../components/other/exposers-modal.vue';
import CollectionsModal from '../../components/other/collections-modal.vue';
import AdvancedSearch from '../../components/search/advanced-search.vue';
import AvailableImportersModal from '../../components/modals/available-importers-modal.vue';
import ExposersModal from '../../components/modals/exposers-modal.vue';
import CollectionsModal from '../../components/modals/collections-modal.vue';
import CustomDialog from '../../components/other/custom-dialog.vue';
import { mapActions, mapGetters } from 'vuex';

View File

@ -870,9 +870,9 @@
import FiltersTagsList from '../../components/search/filters-tags-list.vue';
import FiltersItemsList from '../../components/search/filters-items-list.vue';
import Pagination from '../../components/search/pagination.vue'
import AdvancedSearch from '../../components/advanced-search/advanced-search.vue';
import ExposersModal from '../../components/other/exposers-modal.vue';
import AvailableImportersModal from '../../components/other/available-importers-modal.vue';
import AdvancedSearch from '../../components/search/advanced-search.vue';
import ExposersModal from '../../components/modals/exposers-modal.vue';
import AvailableImportersModal from '../../components/modals/available-importers-modal.vue';
import CustomDialog from '../../components/other/custom-dialog.vue';
import { mapActions, mapGetters } from 'vuex';

View File

@ -313,7 +313,7 @@
import DocumentItem from '../../components/other/document-item.vue';
import {formHooks} from '../../js/mixins';
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';
export default {