Commit 4a0ad9b8 authored by Jerome Chauveau's avatar Jerome Chauveau
Browse files

debug lié à la collection courante inexistante dans un contexte de recherche

parent b1e38a94
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -42,6 +42,7 @@
                {{ $t('add_to_collection') }}
              </v-list-item-title>
            </v-list-item>
            <template v-if="currentCollection">
              <v-divider></v-divider>
              <v-list-item>
                <v-list-item-title class="caption">
@@ -54,9 +55,10 @@

                </v-list-item-title>
              </v-list-item>
            </template>
            <v-divider></v-divider>

            <v-list-item :disabled="ancestors.length===1 ? true : false" @click="askRemove(false)">
            <v-list-item v-if="currentCollection" :disabled="ancestors.length===1 ? true : false" @click="askRemove(false)">
              <v-list-item-title class="caption">
                <v-icon>
                  mdi-delete
@@ -180,7 +182,7 @@ export default {
  },
  watch: {
    resource() {
      this.isThumbnail = this.currentCollection.represented_by &&
      this.isThumbnail = this.currentCollection && this.currentCollection.represented_by &&
          this.resource.id === this.currentCollection.represented_by.id
    }
  },
@@ -189,7 +191,7 @@ export default {
    return {
      collectionsDialog: false,
      ancestors: [],
      isThumbnail: this.currentCollection.represented_by &&
      isThumbnail: this.currentCollection && this.currentCollection.represented_by &&
          this.resource.id === this.currentCollection.represented_by.id
    }
  },
+0 −1
Original line number Diff line number Diff line
@@ -363,7 +363,6 @@ export default {
  },

  async beforeMount() {
    console.log(this.viewMode);
    if (this.defaultCollection && this.defaultCollection !== '') {
      this.path = await this.$jamaClient.addCollectionFromPath(this.defaultCollection);
      this.loadCollection(this.path[this.path.length - 1])
+3 −0
Original line number Diff line number Diff line
@@ -70,6 +70,7 @@
                <jama-items-mosaic
                        :resources="foundResources"
                        :collections="foundCollections"
                        :current-resource="selectedResource"
                        @collection-selected="collectionSelected"
                        @resource-selected="resourceSelected"
                />
@@ -116,6 +117,7 @@
                loading: false,
                terms: null,
                metaSets: null,
                selectedResource: null,
                mediaProperties: [
                    {text: this.$t("title"), value: "title"},
                    {text: this.$t("original_name"), value: "original_name"}
@@ -169,6 +171,7 @@
            },

            resourceSelected(media) {
                this.selectedResource = media;
                this.$emit('resource-selected', media)
            },