ngOnInit()

in frontend/src/app/campaign-list/campaign-list.component.ts [78:103]


  ngOnInit() {
    this.campaignServ.getCampaigns(this.userId).subscribe((res: any) => {
      this.campaignResults = res.results;
      this.ELEMENT_DATA = this.campaignResults?.map((res: any) => {
        return { name: res.data.name, theme: res.data.theme, status: res.data.status, doc_id: res.data.workspace_assets, id: res.id };
      })
    });
    this.menuitems = [{
      items: [{

        icon: 'pi pi-upload',
        command: () => {
          this.update(this.selectedItems);
        }
      },
      {

        icon: 'pi pi-fw pi-trash',
        command: () => {
          this.deleteProduct(this.selectedItems);
        }
      }
      ]
    }
    ];
  }