|
@@ -3,13 +3,12 @@ export default {
|
|
|
backTrackingResolver(gen, active) {
|
|
|
const models = this.generation.activeModels.find(item => item.generation == gen)?.models || []
|
|
|
this.formatRows.forEach(item => {
|
|
|
- const currentGroup = models.find(group => group.groupId == item.groupId)
|
|
|
- console.log(currentGroup)
|
|
|
- const disenrollAll = Math.abs(models.sum(m => Math.min(0, m.nextGroupIndicator || 0)))
|
|
|
- item.groupIndicator = currentGroup.nextGroupIndicator
|
|
|
- item.supplyBestIndicator = currentGroup.bestInIndicator || '/'
|
|
|
- item.supplyRankInBest = (!currentGroup.approved && !currentGroup.forceAdjusted)? `${currentGroup.rankInBest}/${currentGroup.bestInIndicator}` : '/'
|
|
|
- item.supplyRankInDisenroll = currentGroup.rankInDisenroll ? `${currentGroup.rankInDisenroll}/${disenrollAll}` : '/'
|
|
|
+ const currentGroup = models.find(group => group.groupId == item.groupId) || {}
|
|
|
+ const disenrollAll = Math.abs(models.sum(m => m.groupIndicator))
|
|
|
+ item.groupIndicator = currentGroup.groupIndicator
|
|
|
+ item.supplyBestIndicator = currentGroup.bestInIndicator || '-'
|
|
|
+ item.supplyRankInBest = currentGroup.rankInBest ? `${currentGroup.rankInBest}/${currentGroup.bestInIndicator}` : '-'
|
|
|
+ item.supplyRankInDisenroll = currentGroup.rankInDisenroll ? `${currentGroup.rankInDisenroll}/${disenrollAll}` : '-'
|
|
|
|
|
|
})
|
|
|
return {
|