File tree 1 file changed +19
-1
lines changed
1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import * as R from 'remeda'
4
4
5
5
import { dayIndexToDay , getWeekNumber } from '../../utils/date'
6
6
import { ScoredAsk , ScoredQuestion } from '../../metrics/metrics'
7
- import { plainHeader , textSection } from '../events/modal-utils'
7
+ import { addIf , plainHeader , textSection } from '../events/modal-utils'
8
8
import { questionTypeToText } from '../../utils/asked'
9
9
import { scoreToEmoji } from '../../utils/score'
10
10
import { QuestionType } from '../../safe-types'
@@ -99,6 +99,24 @@ export function createScoreBlocks(
99
99
100
100
return [
101
101
plainHeader ( `Helsesjekkresultat for team ${ team . name } i uke ${ getWeekNumber ( asked . timestamp ) } ` ) ,
102
+ ...addIf ( team . assosiatedGroup != null , ( ) => ( {
103
+ type : 'section' ,
104
+ text : {
105
+ type : 'mrkdwn' ,
106
+ text : 'Du kan se utviklingen over tid i Helsesjekk Dashboard' ,
107
+ } ,
108
+ accessory : {
109
+ type : 'button' ,
110
+ text : {
111
+ type : 'plain_text' ,
112
+ text : 'Helsegraf' ,
113
+ emoji : true ,
114
+ } ,
115
+ value : 'helsesjekk-link-button' ,
116
+ url : `https://helsesjekk-bot.nav.no/team/${ team . assosiatedGroup } /${ team . id } /graph` ,
117
+ action_id : 'button-action' ,
118
+ } ,
119
+ } ) ) ,
102
120
{
103
121
type : 'section' ,
104
122
text : {
You can’t perform that action at this time.
0 commit comments