|
|
|
@@ -165,6 +165,21 @@ export const gazetteLength = (length,noOfPages) => { |
|
|
|
return countLength+" cm" |
|
|
|
} |
|
|
|
|
|
|
|
export const formatPaymentParticularsLength = (row, intl) => { |
|
|
|
if (row.groupTitle === 'Private Bill') { |
|
|
|
const pages = row.noOfPages ?? 1; |
|
|
|
if (intl) { |
|
|
|
if (intl.locale === 'en') { |
|
|
|
return pages === 1 ? '1 page' : `${pages} pages`; |
|
|
|
} |
|
|
|
const pageLabel = intl.formatMessage({ id: 'pages' }); |
|
|
|
return `${pages} ${pageLabel}`; |
|
|
|
} |
|
|
|
return pages === 1 ? '1 page' : `${pages} pages`; |
|
|
|
} |
|
|
|
return `${row.length ?? 0} cm`; |
|
|
|
} |
|
|
|
|
|
|
|
export const getUserId = () =>{ |
|
|
|
if (localStorage.getItem('userData') != null){ |
|
|
|
return JSON.parse(localStorage.getItem('userData')).id |
|
|
|
|