digital certificates list error hotfix, disable date if indefinite in PDF generation

This commit is contained in:
merelendor 2023-12-25 10:20:29 +03:00
parent a9f5f56cbb
commit 93dd5688ae
2 changed files with 36 additions and 22 deletions

View File

@ -238,6 +238,8 @@ export default class DigitalCertificates extends React.Component
const { loading, certificates, certificates_error, certificate_selected, signing, show_all } = this.state;
//console.log("render()", { certificates });
console.log({ certificates_error });
if(loading)
{
return (
@ -250,9 +252,9 @@ export default class DigitalCertificates extends React.Component
{
return (
<>
{ (certificates_error !== null) &&
{ certificates_error !== null && (
<>
{ certificates_error === "NOT_INSTALLED" || certificates_error === "CERTIFICATES" && (
{ (certificates_error === "NOT_INSTALLED" || certificates_error === "CERTIFICATES") && (
<FormMessage type="moderate" title="Внимание!" message={ <>
Плагин КриптоПРО не установлен или не активирован. Посмотите <a style={{ color: "#fff", textDecoration: "underline", }} href={ `${ process.env.NEXT_PUBLIC_MAIN_SITE }/upload/docs/anketa-sign.pdf` }>инструкцию</a> как установить, активировать и проверить работу плагина КриптоПро.<br/>
</> }/>
@ -274,6 +276,7 @@ export default class DigitalCertificates extends React.Component
<FormMessage type="moderate" title="Внимание!" message={ <>Подписант не соответствует указанному подписанту в анкете.</> }/>
) }
</>
)
}
{ certificates.length > 0 && (
<>

View File

@ -298,6 +298,17 @@ export default async function handler(req, res)
}
}
if(group === "head_person")
{
if(field === "credentials_dateend")
{
if(questionnaire[group].indefinite)
{
continue;
}
}
}
if(field === "fullname")
{
fields[group][field].bind = form.getTextField(fields[group][field].name);