1- // @ts -nocheck
21// element dashboard assignees issue
32
43import { useRouter } from "next/router"
@@ -130,7 +129,7 @@ export const PMElement = () => {
130129 return task . schema !== null
131130 } )
132131 if ( allAssignments . length > 0 ) {
133- const allForms = allAssignments . flatMap ( ( assignment ) => assignment . assignees )
132+ const allForms = allAssignments . flatMap ( ( assignment ) => assignment [ " assignees" ] )
134133 const completedAssignments = allForms . filter (
135134 ( assignment ) => assignment . statusLogs [ 0 ] . status === "COMPLETED"
136135 )
@@ -140,7 +139,8 @@ export const PMElement = () => {
140139 }
141140
142141 const completedLabels = tasks . filter ( ( task ) => {
143- return task . labels . length > 0
142+ const l = task . hasOwnProperty ( "labels" ) ? task [ "labels" ] . length : 0
143+ return l > 0
144144 } )
145145 labelPercent = completedLabels . length / tasks . length
146146 } else {
@@ -171,7 +171,7 @@ export const PMElement = () => {
171171 text = { `${ Math . round ( taskPercent * 100 ) } %` }
172172 styles = { buildStyles ( {
173173 textSize : "16px" ,
174- pathTransitionDuration : "none" ,
174+ pathTransitionDuration : 0 ,
175175 pathColor : "oklch(var(--p))" ,
176176 textColor : "oklch(var(--s))" ,
177177 trailColor : "oklch(var(--pc))" ,
@@ -196,7 +196,7 @@ export const PMElement = () => {
196196 text = { `${ Math . round ( formPercent * 100 ) } %` }
197197 styles = { buildStyles ( {
198198 textSize : "16px" ,
199- pathTransitionDuration : "none" ,
199+ pathTransitionDuration : 0 ,
200200 pathColor : "oklch(var(--p))" ,
201201 textColor : "oklch(var(--s))" ,
202202 trailColor : "oklch(var(--pc))" ,
@@ -221,7 +221,7 @@ export const PMElement = () => {
221221 text = { `${ Math . round ( labelPercent * 100 ) } %` }
222222 styles = { buildStyles ( {
223223 textSize : "16px" ,
224- pathTransitionDuration : "none" ,
224+ pathTransitionDuration : 0 ,
225225 pathColor : "oklch(var(--p))" ,
226226 textColor : "oklch(var(--s))" ,
227227 trailColor : "oklch(var(--pc))" ,
0 commit comments