@@ -44,6 +44,13 @@ export const convertEpochToDate = (dateEpoch) => {
44
44
refetchOnWindowFocus : false ,
45
45
} ) ;
46
46
console . log ( "datatatataty" , data )
47
+ const cities = Digit . Hooks . useTenants ( ) ;
48
+ let ulbType = ""
49
+ const loginCity = JSON . parse ( sessionStorage . getItem ( "Digit.User" ) ) ?. value ?. info ?. permanentCity
50
+ if ( cities . data !== undefined ) {
51
+ const selectedTenantData = cities . data . find ( item => item . city . districtTenantCode === loginCity ) ;
52
+ ulbType = selectedTenantData . city . ulbGrade
53
+ }
47
54
48
55
const { label } = Digit . Hooks . useApplicationsForBusinessServiceSearch ( { businessService : business_service } , { enabled : false } ) ;
49
56
@@ -226,6 +233,19 @@ export const convertEpochToDate = (dateEpoch) => {
226
233
if ( business_service == "WS" || business_service == "SW" ) {
227
234
response = await Digit . PaymentService . generatePdf ( state , { Payments : [ { ...paymentData } ] } , generatePdfKeyForWs ) ;
228
235
}
236
+ else if ( paymentData . paymentDetails [ 0 ] . businessService . includes ( "BPA" ) ) {
237
+ const designation = ( ulbType === "Municipal Corporation" ) ? "Municipal Commissioner" : "Executive Officer"
238
+ const updatedpayments = {
239
+ ...paymentData ,
240
+ additionalDetails :{
241
+ ...paymentData . additionalDetails ,
242
+ designation :designation ,
243
+ ulbType :ulbType
244
+ }
245
+ }
246
+
247
+ response = await Digit . PaymentService . generatePdf ( state , { Payments : [ { ...updatedpayments } ] } , generatePdfKey ) ;
248
+ }
229
249
else {
230
250
response = await Digit . PaymentService . generatePdf ( state , { Payments : [ { ...paymentData } ] } , generatePdfKey ) ;
231
251
}
0 commit comments