project synergy "Synergy 2"  2022-01-01-0:00--0500 +12m {
  timezone "Europe/Berlin"
  timeformat "%Y-%m-%d"
  numberformat "-" "" "." "," 2
  currencyformat "-" "" "." "," 2
  now 2022-03-13
  currency "EUR"
}

account kosten "Kosten"
account einnahmen "Einnahmen"
balance kosten einnahmen

include "mitarbeiter.tji"

# macros
macro TaskTip [
  tooltip istask() -8<-
    '''Start: ''' <-query attribute='start'->
    '''End: ''' <-query attribute='end'->
    ----
    '''Resources:'''

    <-query attribute='resources'->
    ----
    '''Precursors: '''

    <-query attribute='precursors'->
    ----
    '''Followers: '''

    <-query attribute='followers'->
    ->8-
]

# flags
flags important, hidden

task sgkp "Standard Geschäftskundenportal entwickeln" {
	task rahmen "Rahmenbedingungen klären" {
		task sla "SLA entwickeln" {
			effort 5d
			allocate cec
			allocate jkl
		}
		task vertrag "Vertrag entwickeln" {
			effort 5d
			allocate cec
			allocate jkl
		}
		task agb "AGB entwickeln" {
			effort 5d
			allocate cec
			allocate jkl
		}
		task pricing "Preismodell entwickeln" {
			effort 5d
			allocate cec
			allocate nas
			allocate the
		}
	}
	task legal_milestone "Rechtliche Rahmenbedingunen sind vollständig geklärt" {
      depends !!sgkp.rahmen
  }

	task starter "Starter/Bronze GKP vertreiben" {
		depends !develop
	}

	task gold "Konzept auf Silber/Gold GKP ausbauen" {
		depends !starter
		depends !!kundenmigration
	}

	task develop "Technische Umsetzung des Starter/Bronze SGKP" {
		task api "Standardisierte Schnittstellen entwickeln"
	}

	task vertrieb "Vertriebskonzept entwickeln" {
		task homepage "BI-Website vorbereiten"
		task vertriebsmaterial "Vertriebsmaterial bereitstellen"
	}
}

task kundenmigration "Bestandskunden in den Cloudbetrieb migrieren" {
	task lackmann "Lackmann migrieren" {
		effort 20d
		allocate ffo
		allocate frr
	}
	task sachsenenergie "Sachsenenergie migrieren" {
		effort 20d
		allocate ffo
		allocate frr
	}
	task bsenergy "BSEnergy migrieren" {
		effort 20d
		allocate the
		allocate frr
	}
}

navigator navbar {
  hidereport @none
}

textreport frame "" {
  header -8<-
    == Toy Software Development Project ==
    <[navigator id="navbar"]>
  ->8-
  footer "----"
  textreport index "Overview" {
    formats html
    center '<[report id="overview"]>'
  }

  textreport development "Development" {
    formats html
    center '<[report id="development"]>'
  }

   textreport "ResourceGraph" {
    formats html
    title "Resource Graph"
    center '<[report id="resourceGraph"]>'
  }
}

taskreport overview "" {
  header -8<-
    === Project Overview ===

    The project is structured into 3 phases.


    # <-reportlink id='frame.development'->


    === Original Project Plan ===
  ->8-
  columns bsi { title 'WBS' },
          name, start, end, effort, cost,
          revenue, chart { ${TaskTip} }
  # For this report we like to have the abbreviated weekday in front
  # of the date. %a is the tag for this.
  timeformat "%a %Y-%m-%d"
  loadunit days
  hideresource @all
  balance kosten einnahmen
  caption 'All effort values are in man days.'

footer -8<-
    === Staffing ===

    All project phases are properly staffed. See [[ResourceGraph]] for
    detailed resource allocations.
  ->8-
}

taskreport development "" {
  headline "Development - Resource Allocation Report"
  columns bsi { title 'WBS' }, name, start, end, effort { title "Work" },
          duration, chart { ${TaskTip} scale day width 500 }
  timeformat "%Y-%m-%d"
  hideresource ~(isleaf() & isleaf_())
  sortresources name.up
}

resourcereport resourceGraph "" {
  headline "Resource Allocation Graph"
  columns no, name, effort, rate, weekly { ${TaskTip} }
  loadunit shortauto
  # We only like to show leaf tasks for leaf resources.
  hidetask ~(isleaf() & isleaf_())
  sorttasks plan.start.up
}