File tree 1 file changed +13
-5
lines changed
1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -174,13 +174,21 @@ const Print = ({
174
174
const hours = currentDate . getHours ( ) . toString ( ) . padStart ( 2 , '0' ) ;
175
175
const minutes = currentDate . getMinutes ( ) . toString ( ) . padStart ( 2 , '0' ) ;
176
176
const seconds = currentDate . getSeconds ( ) . toString ( ) . padStart ( 2 , '0' ) ;
177
- // const serverName = process.env.NODE_ENV === 'production' ? '' : process.env.NODE_ENV === 'development' ? '_iprdev' : '_iprstaging';
178
-
177
+ let serverName ;
178
+ switch ( process . env . NODE_ENV ) {
179
+ case 'production' :
180
+ serverName = '' ;
181
+ break ;
182
+ case 'development' :
183
+ serverName = '_iprdev' ;
184
+ break ;
185
+ default :
186
+ serverName = '_iprstaging' ;
187
+ break ;
188
+ }
179
189
const formattedDate = `${ year } -${ month } -${ day } _${ hours } h${ minutes } m${ seconds } s` ;
180
190
181
- // document.title = `${report.patientId}${serverName}_${report.template.name}_report_${formattedDate}`;
182
- document . title = `${ report . patientId } _${ templateName } _report_${ formattedDate } ` ;
183
-
191
+ document . title = `${ report . patientId } ${ serverName } _${ templateName } _report_${ formattedDate } ` ;
184
192
window . print ( ) ;
185
193
setIsPrintDialogShown ( true ) ;
186
194
} ;
You can’t perform that action at this time.
0 commit comments