<commit_before>import './campaign-admin-box.scss';
import template from './campaign-admin-box.html';

const Component = {
  bindings: {
    campaign: '=',
    index: '<',
  },
  controller,
  template,
};

function controller() {
  const vm = this;

  vm.lastRound = null;
  vm.link = null;

  vm.$onInit = () => {
    if (!vm.campaign) { return; }

    vm.campaign.rounds = vm.campaign.rounds
      .filter(round => round.status !== 'cancelled');

    vm.link = [
      vm.campaign.id,
      vm.campaign.url_name,
    ].join('-');

    if (vm.campaign.rounds && vm.campaign.rounds.length) {
      vm.lastRound = {<commit_msg>fix(dashboard): fix empty campaign error Empty campaign is the last tile with Create New Campaign button.<commit_after>import './campaign-admin-box.scss';
import template from './campaign-admin-box.html';

const Component = {
  bindings: {
    campaign: '=',
    index: '<',
  },
  controller,
  template,
};

function controller() {
  const vm = this;

  vm.lastRound = null;
  vm.link = null;

  vm.$onInit = () => {
    if (!vm.campaign.id) { return; }

    vm.campaign.rounds = vm.campaign.rounds
      .filter(round => round.status !== 'cancelled');

    vm.link = [
      vm.campaign.id,
      vm.campaign.url_name,
    ].join('-');

    if (vm.campaign.rounds && vm.campaign.rounds.length) {
      vm.lastRound = {
{'fraction_non_alphanumeric': 0.170007423904974, 'fraction_numerical': 0.0, 'mean_word_length': 2.723756906077348, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5399526', 'n_tokens_mistral': 478, 'n_tokens_neox': 441, 'n_words': 93}