@@ -140,10 +140,14 @@ export const PegaExtensionsCalendar = (props: CalendarProps) => {
140140 isdayGrid = false ;
141141 }
142142 const eventDateStr = `${ obj [ startTimeProperty ] . substring ( 0 , 5 ) } - ${ obj [ endTimeProperty ] . substring ( 0 , 5 ) } ` ;
143+ const pyID = ( window as any ) . PCore . getNameSpaceUtils ( ) . getDefaultQualifiedName ( 'pyID' ) ;
144+ const pxObjClass = ( window as any ) . PCore . getNameSpaceUtils ( ) . getDefaultQualifiedName ( 'pxObjClass' ) ;
145+ const pzInsKey = ( window as any ) . PCore . getNameSpaceUtils ( ) . getDefaultQualifiedName ( 'pzInsKey' ) ;
146+ const pyStatusWork = ( window as any ) . PCore . getNameSpaceUtils ( ) . getDefaultQualifiedName ( 'pyStatusWork' ) ;
143147 const linkURL = ( window as any ) . PCore . getSemanticUrlUtils ( ) . getResolvedSemanticURL (
144148 ( window as any ) . PCore . getSemanticUrlUtils ( ) . getActions ( ) . ACTION_OPENWORKBYHANDLE ,
145- { caseClassName : obj . pxObjClass } ,
146- { workID : obj . pyID } ,
149+ { caseClassName : obj [ pxObjClass ] } ,
150+ { workID : obj [ pyID ] } ,
147151 ) ;
148152 const linkEl = (
149153 < Link
@@ -161,18 +165,18 @@ export const PegaExtensionsCalendar = (props: CalendarProps) => {
161165 }
162166 onPreview = { ( ) => {
163167 getPConnect ( ) . getActionsApi ( ) . showCasePreview ( encodeURI ( eventInfo . event . id ) , {
164- caseClassName : obj . pxObjClass ,
168+ caseClassName : obj [ pxObjClass ] ,
165169 } ) ;
166170 } }
167171 onClick = { ( e : MouseEvent < HTMLButtonElement > ) => {
168172 /* for links - need to set onClick for spa to avoid full reload - (cmd | ctrl) + click for opening in new tab */
169173 if ( ! e . metaKey && ! e . ctrlKey ) {
170174 e . preventDefault ( ) ;
171- getPConnect ( ) . getActionsApi ( ) . openWorkByHandle ( obj . pzInsKey , obj . pxObjClass ) ;
175+ getPConnect ( ) . getActionsApi ( ) . openWorkByHandle ( obj [ pzInsKey ] , obj [ pxObjClass ] ) ;
172176 }
173177 } }
174178 >
175- { isdayGrid ? obj . pyID : `${ eventInfo . event . title } - ${ eventDateStr } ` }
179+ { isdayGrid ? obj [ pyID ] : `${ eventInfo . event . title } - ${ eventDateStr } ` }
176180 </ Link >
177181 ) ;
178182 if ( ! isdayGrid ) {
@@ -200,7 +204,7 @@ export const PegaExtensionsCalendar = (props: CalendarProps) => {
200204 {
201205 id : 'status' ,
202206 name : 'Status' ,
203- value : < Status variant = 'success' > { obj . pyStatusWork } </ Status > ,
207+ value : < Status variant = 'success' > { obj [ pyStatusWork ] } </ Status > ,
204208 } ,
205209 ] }
206210 />
@@ -209,6 +213,9 @@ export const PegaExtensionsCalendar = (props: CalendarProps) => {
209213 } ;
210214
211215 const loadEvents = ( ) => {
216+ const pzInsKey = ( window as any ) . PCore . getNameSpaceUtils ( ) . getDefaultQualifiedName ( 'pzInsKey' ) ;
217+ const pyLabel = ( window as any ) . PCore . getNameSpaceUtils ( ) . getDefaultQualifiedName ( 'pyLabel' ) ;
218+
212219 ( window as any ) . PCore . getDataApiUtils ( )
213220 . getData ( dataPage , { } )
214221 . then ( ( response : any ) => {
@@ -220,8 +227,8 @@ export const PegaExtensionsCalendar = (props: CalendarProps) => {
220227 const endTime = item [ endTimeProperty ] ;
221228 if ( sessionDate && startTime && endTime ) {
222229 tmpevents . push ( {
223- id : item . pzInsKey ,
224- title : item . pyLabel ,
230+ id : item [ pzInsKey ] ,
231+ title : item [ pyLabel ] ,
225232 start : new Date ( `${ sessionDate } T${ startTime } ` ) ,
226233 end : new Date ( `${ sessionDate } T${ endTime } ` ) ,
227234 item,
@@ -234,8 +241,10 @@ export const PegaExtensionsCalendar = (props: CalendarProps) => {
234241 } ;
235242
236243 const handleEventClick = ( eventClickInfo : EventClickArg ) => {
244+ const pzInsKey = ( window as any ) . PCore . getNameSpaceUtils ( ) . getDefaultQualifiedName ( 'pzInsKey' ) ;
245+ const pxObjClass = ( window as any ) . PCore . getNameSpaceUtils ( ) . getDefaultQualifiedName ( 'pxObjClass' ) ;
237246 const eventDetails = eventClickInfo . event . extendedProps ;
238- getPConnect ( ) . getActionsApi ( ) . openWorkByHandle ( eventDetails . item . pzInsKey , eventDetails . item . pxObjClass ) ;
247+ getPConnect ( ) . getActionsApi ( ) . openWorkByHandle ( eventDetails . item [ pzInsKey ] , eventDetails . item [ pxObjClass ] ) ;
239248 } ;
240249
241250 const handleDateChange = ( objInfo : any ) => {
0 commit comments