Commit 8fe4c4a8 authored by Jerome Chauveau's avatar Jerome Chauveau
Browse files

non editable tags : rpc call for tag list init

parent 472fcda7
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -123,7 +123,7 @@ export default {
    return {
      addDialogVisible: false,
      model: null,
      entries: [],
      entries: [{id:'ok', label:'ok'},{id: 2, label: 'test'}],
      isLoading: false,
      search: null,
      descriptionLimit: 60,
@@ -159,7 +159,7 @@ export default {

  watch: {
    search(val) {
      if (!val)
      if (!val || !this.$store.getters.editableTags)
        return;
      this.currentClient.doQuery(val).then((res) => {
        this.entries = [...res];
@@ -176,6 +176,8 @@ export default {

  mounted(){
    this.tagsClient = new JamaTagClient(this.$jamaClient, this.currentProjectId);
    if(!this.$store.getters.editableTags)
      this.tagsClient.getAllTags().then((res) => this.entries = res)
    this.conceptsClient = this.conceptsConfig ?
        new JamaOpenthesoTagClient(
          this.$jamaClient,
+6 −1
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@ class JamaTagClient{
    }

    async doQuery(term) {
        let res =  await this.jamaClient.tags(this.projectId);
        let res =  await this.getAllTags()
        res = res.filter((e) => e.label.toLowerCase().includes(term.toLowerCase()));
        return res;
    }
@@ -16,6 +16,11 @@ class JamaTagClient{
    setProjectId(projectId){
        this.projectId = projectId;
    }

    async getAllTags(){
        let res = await this.jamaClient.tags(this.projectId);
        return res;
    }
}