-
-
-
- №1234567 от 21.01.2021
-
-
-
+ { sign.digital && (
+
+
+
+ Анкета заполнена и подписана
+ Вы заполнили и подписали анкету лизингополучателя посредством
+ ЭЦП. Анкета передана в обрабатывающий центр. Если у
+ сотрудников возникнут вопросы мы свяжемся с Вами. Спасибо!
+
-
-
-
-
- Анкета заполнена и подписана
- Вы заполнили и подписали анкету лизингополучателя посредством
- загрузки скана анкеты. Анкета передана в обрабатывающий центр.
- Если у сотрудников возникнут вопросы мы свяжемся с Вами.
- Спасибо!
-
-
+ ) }
+ { sign.print && (
+
+ { file === null ? (
+
+
+
+
+ Анкета заполнена и ожидает вашего подписания
+ Вы заполнили анкету лизингополучателя для подписания в режиме загрузки скана анкеты. Пожалуйста, загрузите скан подписанной анкеты.
+
+
+
+ <>
+
+
+ >
+
+
+ ) : (
+
+ { !sent ? (
+
+
+
+
+ Анкета заполнена, подписана и ожидает отправки
+ Вы заполнили и подписали анкету лизингополучателя в режиме загрузки скана анкеты. Пожалуйста, отправьте подписанный документ.
+
+
+
+
+
+
+ { file.name }
+ Подписанный скан анкеты
+
+
+
+
+
+
+ ) : (
+
+
+
+
+ Анкета заполнена и подписана
+ Вы заполнили и подписали анкету лизингополучателя посредством
+ загрузки скана анкеты. Анкета передана в обрабатывающий центр.
+ Если у сотрудников возникнут вопросы мы свяжемся с Вами.
+ Спасибо!
+
+
+
+ ) }
+
+ )}
+
+ ) }
);
}
@@ -96,17 +181,8 @@ class Form_9_Status extends QuestionnaireForm
function mapStateToProps(state, ownProps)
{
return {
- main: state.questionnaire.main,
- legal_address: state.questionnaire.legal_address,
- fact_address: state.questionnaire.fact_address,
- postal_address: state.questionnaire.postal_address,
- head_person: state.questionnaire.head_person,
- head_person_files: state.questionnaire.head_person_files,
- signatory_person: state.questionnaire.signatory_person,
- signatory_person_files: state.questionnaire.signatory_person_files,
- founder_persons: state.questionnaire.founder_persons,
- client_contacts: state.questionnaire.client_contacts,
- non_profit: state.questionnaire.non_profit,
+ questionnaire: state.questionnaire,
+ company: state.company,
}
}
diff --git a/css/components/style.css b/css/components/style.css
index 07e42fa..ae81485 100644
--- a/css/components/style.css
+++ b/css/components/style.css
@@ -1 +1,579 @@
-.bx-breadcrumb{display:flex;flex-wrap:wrap;width:100%;max-width:1310px;margin:25px auto -40px auto;position:relative;z-index:2}.bx-breadcrumb .bx-breadcrumb-item{color:rgba(0,0,0,0.5)}.bx-breadcrumb .bx-breadcrumb-item a{text-decoration:none;color:rgba(0,0,0,0.5)}.bx-breadcrumb .bx-breadcrumb-item a:hover{color:#000}.bx-breadcrumb .bx-breadcrumb-item:before{content:"<";display:inline-block;margin:0 4px}@media all and (max-width:1420px){.bx-breadcrumb{width:calc(100% - 160px);margin:25px 80px -40px 80px}}@media all and (max-width:960px){.bx-breadcrumb{margin:25px 80px -25px 80px}}@media all and (max-width:768px){.bx-breadcrumb{margin:12px 16px -25px 16px;width:calc(100% - 32px)}}hr{display:block;width:100%;height:1px;background:#EDEFF5;border:0;margin:20px 0}button,.button{border:0;background:transparent;appearance:none;box-shadow:none;cursor:pointer;box-sizing:border-box;padding:0px 15px;display:inline-flex;align-items:center;justify-content:center;height:40px;font-weight:600;font-size:15px;line-height:20px}@media all and (max-width:1600px){button,.button{font-size:13px}}.button{color:var(--blue);background:#fff}.button:disabled{opacity:.48;cursor:default}.button.icon:before{content:"";display:block;width:16px;height:16px;margin-right:12px}.button.button-blue{background:var(--blue);color:#fff}.button.button-blue.icon:before{background:url("/assets/images/icons/btn_icon_white.svg") no-repeat center}.button.button-blue.transparent{color:var(--blue);background:transparent}.button.button-blue.transparent.icon:before{background:url("/assets/images/icons/btn_icon_blue.svg") no-repeat center}.button.button-gray{color:var(--gray);background:var(--gray-light)}.button.button-gray.transparent{color:var(--gray);background:transparent}.button.button-gray.icon:before{background:url("/assets/images/icons/btn_icon_gray.svg") no-repeat center}.button.button-compact{width:40px;height:40px;text-indent:-9999px;overflow:hidden}.button.button-compact.icon:before{margin-right:0}@media all and (max-width:768px){.button.download-icon{width:24px;height:24px;background:url("/assets/images/icons/download_icon.svg") no-repeat center;overflow:hidden;text-indent:-999px}.button.download-icon svg{color:var(--blue) !important;background:#fff}}.form_field{position:relative}input[type="checkbox"]{display:none;visibility:hidden;position:relative}input[type="checkbox"]+label{cursor:pointer;padding-left:28px;display:block}input[type="checkbox"]+label:before{content:"";display:block;width:16px;min-width:16px;height:16px;border:1px solid rgba(0,16,61,0.12);box-sizing:border-box;border-radius:4px;margin-right:12px;position:absolute;left:0;top:2px}input[type="checkbox"]:checked+label:before{background:url("/assets/images/icons/checkbox_white.svg") no-repeat center var(--primary);border-color:var(--primary)}input[type="checkbox"]:disabled+label{cursor:default}input[type="checkbox"]:disabled+label:before{background:var(--inactive);opacity:.45;cursor:default;border-color:var(--gray-light)}input[type="radio"]{display:none;visibility:hidden}input[type="radio"]+label{display:block;padding-left:28px;cursor:pointer}input[type="radio"]+label:before{content:"";display:block;border:1px solid rgba(0,16,61,0.12);box-sizing:border-box;border-radius:100%;width:16px;min-width:16px;height:16px;position:absolute;left:0;top:2px}input[type="radio"]:checked+label:before{background:#fff;box-shadow:inset 0 0 0 5px #005FF9;border-color:#005FF9;border:0}input[type="radio"]:disabled+label{cursor:default}input[type="radio"]:disabled+label:before{background:var(--inactive);cursor:default}.selected_item{display:flex;align-items:center;justify-content:center;background:var(--gray-light);box-sizing:border-box;padding:0 2px}.selected_item img{width:24px;height:24px;object-fit:cover;object-position:center;margin-right:8px}.selected_item .delete{margin-left:8px;width:28px;height:28px;background:url("/assets/images/icons/delete_gray.svg") no-repeat center}.list-column{column-gap:20px;list-style:disc;margin:15px 0 15px 20px}.list-column li{line-height:25px}.list-column[data-column="2"]{column-count:2}@media all and (max-width:768px){.list-column[data-column="2"]{column-count:1}}.list-column[data-column="3"]{column-count:3}@media all and (max-width:768px){.list-column[data-column="3"]{column-count:1}}.form_field{position:relative}.form_field .clear{position:absolute;top:0;right:0;width:40px;height:40px;background:url("/assets/images/icons/delete_black.svg") no-repeat center;z-index:2}.form_field.error input,.form_field.error textarea,.form_field.error select{border-color:#FFADAD;margin-bottom:30px !important}.form_field.error:after{content:attr(data-error);display:block;font-size:11px;line-height:15px;color:#FFADAD;position:absolute;left:0;bottom:12px}@media all and (max-width:1600px){.form_field.error:after{font-size:9px}}.form_field input,.form_field textarea,.form_field select{border:1px solid rgba(0,16,61,0.12);box-sizing:border-box;height:40px;background:#fff;padding:0 12px;width:100%;outline:none;font-family:'Montserrat',sans-serif;font-size:1rem}.form_field input::placeholder,.form_field textarea::placeholder,.form_field select::placeholder{font-size:15px;line-height:24px;color:#919399;font-family:'Montserrat',sans-serif;font-weight:400}.form_field input.error,.form_field textarea.error,.form_field select.error{border-color:var(--red)}.form_field input.filled,.form_field textarea.filled,.form_field select.filled{border-color:rgba(0,16,61,0.48)}.form_field input:disabled,.form_field textarea:disabled,.form_field select:disabled{background:var(--gray-light)}.form_field input[type="search"],.form_field textarea[type="search"],.form_field select[type="search"]{padding-left:32px;background-image:url("/assets/images/icons/icon-search.svg");background-repeat:no-repeat;background-position:8px 50%}.form_field input[type="date"],.form_field textarea[type="date"],.form_field select[type="date"],.form_field input.date_input,.form_field textarea.date_input,.form_field select.date_input{padding-left:32px;background-image:url("/assets/images/icons/icon-date.svg");background-repeat:no-repeat;background-position:8px 50%}.form_field input[type="date"]::-webkit-inner-spin-button,.form_field textarea[type="date"]::-webkit-inner-spin-button,.form_field select[type="date"]::-webkit-inner-spin-button,.form_field input.date_input::-webkit-inner-spin-button,.form_field textarea.date_input::-webkit-inner-spin-button,.form_field select.date_input::-webkit-inner-spin-button,.form_field input[type="date"]::-webkit-calendar-picker-indicator,.form_field textarea[type="date"]::-webkit-calendar-picker-indicator,.form_field select[type="date"]::-webkit-calendar-picker-indicator,.form_field input.date_input::-webkit-calendar-picker-indicator,.form_field textarea.date_input::-webkit-calendar-picker-indicator,.form_field select.date_input::-webkit-calendar-picker-indicator{display:none;-webkit-appearance:none}@media all and (max-width:1600px) and (min-width:1280px){.form_field input,.form_field textarea,.form_field select{font-size:14px}.form_field input::placeholder,.form_field textarea::placeholder,.form_field select::placeholder{font-size:14px}}@media all and (max-width:960px){.form_field input,.form_field textarea,.form_field select{font-size:13px}}.form_field select{background-image:url("/assets/images/icons/icon-select.svg");background-repeat:no-repeat;background-position:calc(100% - 16px) 50%;-webkit-appearance:none;-moz-appearance:none}.form_field select::-ms-expand{display:none}.form_field textarea{padding-top:10px;height:80px}.fieldgroup{display:flex;justify-content:space-between}.socials{display:flex}.socials a{display:block;width:32px;height:32px;text-decoration:none}.socials a:not(:last-child){margin-right:22px}@media all and (max-width:1279px){.socials a:not(:last-child){margin-right:6px}}.tabs{display:flex}.tabs .tab{line-height:40px;margin-right:8px;padding:0 20px;cursor:pointer}.tabs .tab.active{background:var(--blue);color:#fff;font-weight:700;cursor:default}@media all and (max-width:960px){.tabs .tab{font-size:10px;line-height:35px}.tabs .tab.active{font-weight:400}}@media all and (max-width:768px){.tabs .tab{margin-right:0;padding:0 16px}}.pagination{margin-top:40px}@media all and (max-width:1600px) and (min-width:1280px){.pagination{margin-top:20px}}.pagination ul{display:flex;align-items:flex-end;justify-content:flex-end}.pagination ul li{font-size:26px;line-height:35px;color:var(--blue)}@media all and (max-width:1600px) and (min-width:1280px){.pagination ul li{font-size:20px;line-height:30px}}.pagination ul li a{display:block;padding:0 5px}@media all and (max-width:1279px){.pagination ul{justify-content:center}.pagination ul li{font-size:13px;line-height:28px;min-width:30px}.pagination ul li a{text-align:center;font-weight:600}}.image-full{width:100%;margin-bottom:50px;height:450px;background:var(--gray-light)}.image-full img{width:100%;height:100%;object-fit:cover}ul.custom-dots{list-style:none;padding:0}ul.custom-dots li{padding-left:15px;position:relative}ul.custom-dots li:before{content:"";display:block;position:absolute;width:2px;height:2px;background:#000;border-radius:2px;top:9px;left:5px}.date_input_wrapper{position:relative}.date_input_wrapper .rw-widget-picker{border:1px solid rgba(0,16,61,0.12) !important;box-shadow:none !important;box-sizing:border-box;height:40px;background:#fff;border-radius:0;width:100%;outline:none;font-size:15px}.date_input_wrapper .rw-widget-input{padding:0 12px 0 32px;outline:none;box-shadow:none !important;border:0}@media all and (max-width:768px){.date_input_wrapper .rw-widget-input{margin-top:0}}.date_input_wrapper .rw-input-addon.rw-picker-btn{border:0;width:100%;background-image:url("/assets/images/icons/icon-date.svg");background-repeat:no-repeat;background-position:8px 50%;position:absolute;top:0;left:0;height:40px}.date_input_wrapper .rw-input-addon.rw-picker-btn:hover{background-color:transparent}.date_input_wrapper .rw-input-addon.rw-picker-btn svg{display:none}.custom-multi-select .custom-select__control{min-height:40px;border-radius:0;border:1px solid rgba(0,16,61,0.12) !important;background:#fff;box-shadow:unset !important}.custom-multi-select .custom-select__control .custom-select__control{margin:0}.custom-multi-select .custom-select__control .custom-select__value-container{padding:2px 12px}.custom-multi-select .custom-select__control .custom-select__input-container{margin-top:0;min-height:38px}.custom-multi-select .custom-select__control .custom-select__multi-value{margin-top:0}/*# sourceMappingURL=./style.css.map */
\ No newline at end of file
+.bx-breadcrumb {
+ display: flex;
+ flex-wrap: wrap;
+ width: 100%;
+ max-width: 1310px;
+ margin: 25px auto -40px auto;
+ position: relative;
+ z-index: 2;
+}
+.bx-breadcrumb .bx-breadcrumb-item {
+ color: rgba(0, 0, 0, 0.5);
+}
+.bx-breadcrumb .bx-breadcrumb-item a {
+ text-decoration: none;
+ color: rgba(0, 0, 0, 0.5);
+}
+.bx-breadcrumb .bx-breadcrumb-item a:hover {
+ color: #000;
+}
+.bx-breadcrumb .bx-breadcrumb-item:before {
+ content: "<";
+ display: inline-block;
+ margin: 0 4px;
+}
+@media all and (max-width: 1420px) {
+ .bx-breadcrumb {
+ width: calc(100% - 160px);
+ margin: 25px 80px -40px 80px;
+ }
+}
+@media all and (max-width: 960px) {
+ .bx-breadcrumb {
+ margin: 25px 80px -25px 80px;
+ }
+}
+@media all and (max-width: 768px) {
+ .bx-breadcrumb {
+ margin: 12px 16px -25px 16px;
+ width: calc(100% - 32px);
+ }
+}
+hr {
+ display: block;
+ width: 100%;
+ height: 1px;
+ background: #EDEFF5;
+ border: 0;
+ margin: 20px 0;
+}
+button,
+.button {
+ border: 0;
+ background: transparent;
+ appearance: none;
+ box-shadow: none;
+ cursor: pointer;
+ box-sizing: border-box;
+ padding: 0px 15px;
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
+ height: 40px;
+ font-weight: 600;
+ font-size: 15px;
+ line-height: 20px;
+}
+@media all and (max-width: 1600px) {
+ button,
+ .button {
+ font-size: 13px;
+ }
+}
+.button {
+ color: var(--blue);
+ background: #fff;
+}
+.button:disabled {
+ opacity: 0.48;
+ cursor: default;
+}
+.button.icon:before {
+ content: "";
+ display: block;
+ width: 16px;
+ height: 16px;
+ margin-right: 12px;
+}
+.button.button-blue {
+ background: var(--blue);
+ color: #fff;
+}
+.button.button-blue.icon:before {
+ background: url("/assets/images/icons/btn_icon_white.svg") no-repeat center;
+}
+.button.button-blue.transparent {
+ color: var(--blue);
+ background: transparent;
+}
+.button.button-blue.transparent.icon:before {
+ background: url("/assets/images/icons/btn_icon_blue.svg") no-repeat center;
+}
+.button.button-gray {
+ color: var(--gray);
+ background: var(--gray-light);
+}
+.button.button-gray.transparent {
+ color: var(--gray);
+ background: transparent;
+}
+.button.button-gray.icon:before {
+ background: url("/assets/images/icons/btn_icon_gray.svg") no-repeat center;
+}
+.button.button-compact {
+ width: 40px;
+ height: 40px;
+ text-indent: -9999px;
+ overflow: hidden;
+}
+.button.button-compact.icon:before {
+ margin-right: 0;
+}
+@media all and (max-width: 768px) {
+ .button.download-icon {
+ width: 24px;
+ height: 24px;
+ background: url("/assets/images/icons/download_icon.svg") no-repeat center;
+ overflow: hidden;
+ text-indent: -999px;
+ }
+ .button.download-icon svg {
+ color: var(--blue) !important;
+ background: #fff;
+ }
+}
+.form_field {
+ position: relative;
+}
+input[type="checkbox"] {
+ display: none;
+ visibility: hidden;
+ position: relative;
+}
+input[type="checkbox"] + label {
+ cursor: pointer;
+ padding-left: 28px;
+ display: block;
+}
+input[type="checkbox"] + label:before {
+ content: "";
+ display: block;
+ width: 16px;
+ min-width: 16px;
+ height: 16px;
+ border: 1px solid rgba(0, 16, 61, 0.12);
+ box-sizing: border-box;
+ border-radius: 4px;
+ margin-right: 12px;
+ position: absolute;
+ left: 0;
+ top: 2px;
+}
+input[type="checkbox"]:checked + label:before {
+ background: url("/assets/images/icons/checkbox_white.svg") no-repeat center var(--primary);
+ border-color: var(--primary);
+}
+input[type="checkbox"]:disabled + label {
+ cursor: default;
+}
+input[type="checkbox"]:disabled + label:before {
+ background: var(--inactive);
+ opacity: 0.45;
+ cursor: default;
+ border-color: var(--gray-light);
+}
+input[type="radio"] {
+ display: none;
+ visibility: hidden;
+}
+input[type="radio"] + label {
+ display: block;
+ padding-left: 28px;
+ cursor: pointer;
+}
+input[type="radio"] + label:before {
+ content: "";
+ display: block;
+ border: 1px solid rgba(0, 16, 61, 0.12);
+ box-sizing: border-box;
+ border-radius: 100%;
+ width: 16px;
+ min-width: 16px;
+ height: 16px;
+ position: absolute;
+ left: 0;
+ top: 2px;
+}
+input[type="radio"]:checked + label:before {
+ background: #fff;
+ box-shadow: inset 0px 0 0px 5px #005FF9;
+ border-color: #005FF9;
+ border: 0;
+}
+input[type="radio"]:disabled + label {
+ cursor: default;
+}
+input[type="radio"]:disabled + label:before {
+ background: var(--inactive);
+ cursor: default;
+}
+.selected_item {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ background: var(--gray-light);
+ box-sizing: border-box;
+ padding: 0 2px;
+}
+.selected_item img {
+ width: 24px;
+ height: 24px;
+ object-fit: cover;
+ object-position: center;
+ margin-right: 8px;
+}
+.selected_item .delete {
+ margin-left: 8px;
+ width: 28px;
+ height: 28px;
+ background: url("/assets/images/icons/delete_gray.svg") no-repeat center;
+}
+.list-column {
+ column-gap: 20px;
+ list-style: disc;
+ margin: 15px 0 15px 20px;
+}
+.list-column li {
+ line-height: 25px;
+}
+.list-column[data-column="2"] {
+ column-count: 2;
+}
+@media all and (max-width: 768px) {
+ .list-column[data-column="2"] {
+ column-count: 1;
+ }
+}
+.list-column[data-column="3"] {
+ column-count: 3;
+}
+@media all and (max-width: 768px) {
+ .list-column[data-column="3"] {
+ column-count: 1;
+ }
+}
+.form_field {
+ position: relative;
+}
+.form_field .clear {
+ position: absolute;
+ top: 0;
+ right: 0;
+ width: 40px;
+ height: 40px;
+ background: url("/assets/images/icons/delete_black.svg") no-repeat center;
+ z-index: 2;
+}
+.form_field.error input,
+.form_field.error textarea,
+.form_field.error select {
+ border-color: #FFADAD;
+ margin-bottom: 30px !important;
+}
+.form_field.error:after {
+ content: attr(data-error);
+ display: block;
+ font-size: 11px;
+ line-height: 15px;
+ color: #FFADAD;
+ position: absolute;
+ left: 0;
+ bottom: 12px;
+}
+@media all and (max-width: 1600px) {
+ .form_field.error:after {
+ font-size: 9px;
+ }
+}
+.form_field input,
+.form_field textarea,
+.form_field select {
+ border: 1px solid rgba(0, 16, 61, 0.12);
+ box-sizing: border-box;
+ height: 40px;
+ background: #fff;
+ padding: 0 12px;
+ width: 100%;
+ outline: none;
+ font-family: 'Montserrat', sans-serif;
+ font-size: 1rem;
+}
+.form_field input::placeholder,
+.form_field textarea::placeholder,
+.form_field select::placeholder {
+ font-size: 15px;
+ line-height: 24px;
+ color: #919399;
+ font-family: 'Montserrat', sans-serif;
+ font-weight: 400;
+}
+.form_field input.error,
+.form_field textarea.error,
+.form_field select.error {
+ border-color: var(--red) !important;
+}
+.form_field input.filled,
+.form_field textarea.filled,
+.form_field select.filled {
+ border-color: rgba(0, 16, 61, 0.48);
+}
+.form_field input:disabled,
+.form_field textarea:disabled,
+.form_field select:disabled {
+ background: var(--gray-light);
+}
+.form_field input[type="search"],
+.form_field textarea[type="search"],
+.form_field select[type="search"] {
+ padding-left: 32px;
+ background-image: url("/assets/images/icons/icon-search.svg");
+ background-repeat: no-repeat;
+ background-position: 8px 50%;
+}
+.form_field input[type="date"],
+.form_field textarea[type="date"],
+.form_field select[type="date"],
+.form_field input.date_input,
+.form_field textarea.date_input,
+.form_field select.date_input {
+ padding-left: 32px;
+ background-image: url("/assets/images/icons/icon-date.svg");
+ background-repeat: no-repeat;
+ background-position: 8px 50%;
+}
+.form_field input[type="date"]::-webkit-inner-spin-button,
+.form_field textarea[type="date"]::-webkit-inner-spin-button,
+.form_field select[type="date"]::-webkit-inner-spin-button,
+.form_field input.date_input::-webkit-inner-spin-button,
+.form_field textarea.date_input::-webkit-inner-spin-button,
+.form_field select.date_input::-webkit-inner-spin-button,
+.form_field input[type="date"]::-webkit-calendar-picker-indicator,
+.form_field textarea[type="date"]::-webkit-calendar-picker-indicator,
+.form_field select[type="date"]::-webkit-calendar-picker-indicator,
+.form_field input.date_input::-webkit-calendar-picker-indicator,
+.form_field textarea.date_input::-webkit-calendar-picker-indicator,
+.form_field select.date_input::-webkit-calendar-picker-indicator {
+ display: none;
+ -webkit-appearance: none;
+}
+@media all and (max-width: 1600px) and (min-width: 1280px) {
+ .form_field input,
+ .form_field textarea,
+ .form_field select {
+ font-size: 14px;
+ }
+ .form_field input::placeholder,
+ .form_field textarea::placeholder,
+ .form_field select::placeholder {
+ font-size: 14px;
+ }
+}
+@media all and (max-width: 960px) {
+ .form_field input,
+ .form_field textarea,
+ .form_field select {
+ font-size: 13px;
+ }
+}
+.form_field select {
+ background-image: url("/assets/images/icons/icon-select.svg");
+ background-repeat: no-repeat;
+ background-position: calc(100% - 16px) 50%;
+ -webkit-appearance: none;
+ -moz-appearance: none;
+}
+.form_field select::-ms-expand {
+ display: none;
+}
+.form_field textarea {
+ padding-top: 10px;
+ height: 80px;
+}
+.fieldgroup {
+ display: flex;
+ justify-content: space-between;
+}
+.socials {
+ display: flex;
+}
+.socials a {
+ display: block;
+ width: 32px;
+ height: 32px;
+ text-decoration: none;
+}
+.socials a:not(:last-child) {
+ margin-right: 22px;
+}
+@media all and (max-width: 1279px) {
+ .socials a:not(:last-child) {
+ margin-right: 6px;
+ }
+}
+.tabs {
+ display: flex;
+}
+.tabs .tab {
+ line-height: 40px;
+ margin-right: 8px;
+ padding: 0 20px;
+ cursor: pointer;
+}
+.tabs .tab.active {
+ background: var(--blue);
+ color: #fff;
+ font-weight: 700;
+ cursor: default;
+}
+@media all and (max-width: 960px) {
+ .tabs .tab {
+ font-size: 10px;
+ line-height: 35px;
+ }
+ .tabs .tab.active {
+ font-weight: 400;
+ }
+}
+@media all and (max-width: 768px) {
+ .tabs .tab {
+ margin-right: 0;
+ padding: 0 16px;
+ }
+}
+.pagination {
+ margin-top: 40px;
+}
+@media all and (max-width: 1600px) and (min-width: 1280px) {
+ .pagination {
+ margin-top: 20px;
+ }
+}
+.pagination ul {
+ display: flex;
+ align-items: flex-end;
+ justify-content: flex-end;
+}
+.pagination ul li {
+ font-size: 26px;
+ line-height: 35px;
+ color: var(--blue);
+}
+@media all and (max-width: 1600px) and (min-width: 1280px) {
+ .pagination ul li {
+ font-size: 20px;
+ line-height: 30px;
+ }
+}
+.pagination ul li a {
+ display: block;
+ padding: 0 5px;
+}
+@media all and (max-width: 1279px) {
+ .pagination ul {
+ justify-content: center;
+ }
+ .pagination ul li {
+ font-size: 13px;
+ line-height: 28px;
+ min-width: 30px;
+ }
+ .pagination ul li a {
+ text-align: center;
+ font-weight: 600;
+ }
+}
+.image-full {
+ width: 100%;
+ margin-bottom: 50px;
+ height: 450px;
+ background: var(--gray-light);
+}
+.image-full img {
+ width: 100%;
+ height: 100%;
+ object-fit: cover;
+}
+ul.custom-dots {
+ list-style: none;
+ padding: 0;
+}
+ul.custom-dots li {
+ padding-left: 15px;
+ position: relative;
+}
+ul.custom-dots li:before {
+ content: "";
+ display: block;
+ position: absolute;
+ width: 2px;
+ height: 2px;
+ background: #000;
+ border-radius: 2px;
+ top: 9px;
+ left: 5px;
+}
+.date_input_wrapper {
+ position: relative;
+}
+.date_input_wrapper .rw-widget-picker {
+ border: 1px solid rgba(0, 16, 61, 0.12) !important;
+ box-shadow: none !important;
+ box-sizing: border-box;
+ height: 40px;
+ background: #fff;
+ border-radius: 0;
+ width: 100%;
+ outline: none;
+ font-size: 15px;
+}
+.date_input_wrapper .rw-widget-input {
+ padding: 0 12px 0 32px;
+ outline: none;
+ box-shadow: none !important;
+ border: 0;
+}
+@media all and (max-width: 768px) {
+ .date_input_wrapper .rw-widget-input {
+ margin-top: 0;
+ }
+}
+.date_input_wrapper .rw-input-addon.rw-picker-btn {
+ border: 0;
+ width: 100%;
+ background-image: url("/assets/images/icons/icon-date.svg");
+ background-repeat: no-repeat;
+ background-position: 8px 50%;
+ position: absolute;
+ top: 0;
+ left: 0;
+ height: 40px;
+}
+.date_input_wrapper .rw-input-addon.rw-picker-btn:hover {
+ background-color: transparent;
+}
+.date_input_wrapper .rw-input-addon.rw-picker-btn svg {
+ display: none;
+}
+.custom-multi-select .custom-select__control {
+ min-height: 40px;
+ border-radius: 0;
+ border: 1px solid rgba(0, 16, 61, 0.12) !important;
+ background: #fff;
+ box-shadow: unset !important;
+}
+.custom-multi-select .custom-select__control .custom-select__control {
+ margin: 0;
+}
+.custom-multi-select .custom-select__control .custom-select__value-container {
+ padding: 2px 12px;
+}
+.custom-multi-select .custom-select__control .custom-select__input-container {
+ margin-top: 0;
+ min-height: 38px;
+}
+.custom-multi-select .custom-select__control .custom-select__multi-value {
+ margin-top: 0;
+}
+.error {
+ border: solid 1px var(--red) !important;
+}
diff --git a/css/components/style.less b/css/components/style.less
index 9c2d3be..05866f2 100644
--- a/css/components/style.less
+++ b/css/components/style.less
@@ -359,7 +359,7 @@ input[type="radio"] {
}
&.error {
- border-color: var(--red);
+ border-color: var(--red) !important;
}
&.filled {
@@ -644,4 +644,8 @@ ul.custom-dots {
margin-top: 0;
}
}
-}
\ No newline at end of file
+}
+
+.error {
+ border: solid 1px var(--red) !important;
+}
diff --git a/lib/doctypes_corporate.json b/lib/doctypes_corporate.json
new file mode 100644
index 0000000..caeb30b
--- /dev/null
+++ b/lib/doctypes_corporate.json
@@ -0,0 +1,6 @@
+[
+ { "label": "Доверенности", "value": 100000000 },
+ { "label": "Устава", "value": 100000001 },
+ { "label": "Является главой ИП \\ ИН КФХ", "value": 100000002 },
+ { "label": "Прочего", "value": 100000003 }
+]
\ No newline at end of file
diff --git a/lib/doctypes_personal.json b/lib/doctypes_personal.json
new file mode 100644
index 0000000..a1283a2
--- /dev/null
+++ b/lib/doctypes_personal.json
@@ -0,0 +1,5 @@
+[
+ { "label": "Паспорт гражданина РФ", "value": 100000000 },
+ { "label": "Иностранный паспорт", "value": 100000001 },
+ { "label": "Вид на жительство", "value": 100000002 }
+]
\ No newline at end of file
diff --git a/package.json b/package.json
index a99e082..ad139b7 100644
--- a/package.json
+++ b/package.json
@@ -18,6 +18,7 @@
"cors": "^2.8.5",
"dadata": "^0.0.3",
"debounce-promise": "^3.1.2",
+ "file-type": "^18.2.1",
"form-data": "^4.0.0",
"ioredis": "^4.28.2",
"js-file-download": "^0.4.12",
diff --git a/pages/api/questionnaire/download.js b/pages/api/questionnaire/download.js
index 585c775..9f45648 100644
--- a/pages/api/questionnaire/download.js
+++ b/pages/api/questionnaire/download.js
@@ -114,7 +114,7 @@ export default async function handler(req, res)
console.log("API", "questionnaire", "get");
console.log(req.body);
console.log("-".repeat(50));
- const { questionnaire } = req.body;
+ const { questionnaire, filename } = req.body;
await cors(req, res);
@@ -303,11 +303,11 @@ export default async function handler(req, res)
const pdfBytes = await pdfDoc.save();
//responseType: 'blob',
- //fs.writeFileSync(`${ __dirname }/../../../../../uploads/${ client_jwt_decoded.acc_number }_anketa.pdf`, pdfBytes);
+ fs.writeFileSync(`${ __dirname }/../../../../../uploads/${ client_jwt_decoded.acc_number }_questionnaire.pdf`, pdfBytes);
//res.setHeader('Content-Type', 'application/pdf');
//res.send(pdfBytes);
console.log("pdfBytes.size", pdfBytes, pdfBytes.byteLength);
- res.setHeader("filename", `${ client_jwt_decoded.acc_number }_anketa.pdf`);
+ res.setHeader("filename", filename);
res.setHeader('Content-Type', 'application/pdf');
res.send(Buffer.from(pdfBytes));
diff --git a/pages/api/questionnaire/file/signed.js b/pages/api/questionnaire/file/signed.js
new file mode 100644
index 0000000..90315bb
--- /dev/null
+++ b/pages/api/questionnaire/file/signed.js
@@ -0,0 +1,82 @@
+// Next.js API route support: https://nextjs.org/docs/api-routes/introduction
+import fs from 'fs';
+import axios from 'axios';
+import { Cookies } from 'react-cookie';
+import cookie from 'cookie';
+import moment from 'moment';
+import jwt from 'jsonwebtoken';
+import Redis from 'ioredis';
+import md5 from 'md5';
+import { inspect } from 'util';
+import multer from 'multer';
+
+import { fileTypeFromBuffer } from "file-type";
+//import { MIMEType } from 'util';
+
+import { cors } from '../../../../lib/cors';
+
+const storage = multer.memoryStorage();
+const upload = multer({ storage: storage });
+
+export default async function handler(req, res)
+{
+ console.log("API", "questionnaire", "get");
+ await cors(req, res);
+
+ return new Promise((resolve) =>
+ {
+ if(req.headers.cookie !== undefined)
+ {
+ const cookies = cookie.parse(req.headers?.cookie ? req.headers?.cookie : "");
+
+ if(cookies.jwt !== undefined && cookies.jwt !== null)
+ {
+ var client_jwt_decoded = jwt.verify(cookies.jwt, process.env.JWT_SECRET_CLIENT);
+ var crm_jwt = jwt.sign({ acc_number: client_jwt_decoded.acc_number }, process.env.JWT_SECRET_CRM, { noTimestamp: true });
+
+ upload.single("file")(req, {}, async (err) =>
+ {
+ const { file, body } = req;
+
+ const id = md5(`${ file.buffer }`);
+ const local_filename = `${ client_jwt_decoded.acc_number }_signed_questionnaire_${ moment().format("YYYY_MM_DD_HH:mm:ss") }`;
+ console.log("fileTypeFromBuffer", await fileTypeFromBuffer(file.buffer));
+
+ const file_payload = {
+ id: id,
+ name: Buffer.from(file.originalname, 'latin1').toString('utf8'),
+ filename: local_filename,
+ };
+
+ try
+ {
+ fs.writeFileSync(`${ __dirname }/../../../../../../uploads/${ local_filename }`, file.buffer);
+ console.log("multer.upload.single file");
+ console.log({ file_payload });
+
+ res.status(200).json(file_payload);
+ resolve();
+ }
+ catch(upload_single_error)
+ {
+ console.error("upload_single_error");
+ console.error(upload_single_error);
+ res.status(500).send();
+ resolve();
+ }
+ });
+ }
+ else
+ {
+ res.status(403).send();
+ resolve();
+ }
+ }
+ });
+}
+
+export const config = {
+ api: {
+ bodyParser: false
+ }
+}
\ No newline at end of file
diff --git a/pages/api/questionnaire/send.js b/pages/api/questionnaire/send.js
new file mode 100644
index 0000000..bb77698
--- /dev/null
+++ b/pages/api/questionnaire/send.js
@@ -0,0 +1,279 @@
+// Next.js API route support: https://nextjs.org/docs/api-routes/introduction
+import fs from 'fs';
+import axios from 'axios';
+import { Cookies } from 'react-cookie';
+import cookie from 'cookie';
+import moment from 'moment';
+import jwt from 'jsonwebtoken';
+import FormData from 'form-data';
+import Redis from 'ioredis';
+import md5 from 'md5';
+import { inspect } from 'util';
+import multer from 'multer';
+import { get as _get, pick as _pick } from 'lodash';
+import { eachSeries } from 'async';
+
+import { fileTypeFromBuffer } from "file-type";
+//import { MIMEType } from 'util';
+
+import { cors } from '../../../lib/cors';
+import RedisClient from '../../../lib/RedisClient';
+
+const storage = multer.memoryStorage();
+const upload = multer({ storage: storage });
+
+export default async function handler(req, res)
+{
+ console.log("API", "questionnaire", "send");
+ await cors(req, res);
+
+ return new Promise((resolve) =>
+ {
+ if(req.headers.cookie !== undefined)
+ {
+ const cookies = cookie.parse(req.headers?.cookie ? req.headers?.cookie : "");
+
+ if(cookies.jwt !== undefined && cookies.jwt !== null)
+ {
+ var client_jwt_decoded = jwt.verify(cookies.jwt, process.env.JWT_SECRET_CLIENT);
+ var crm_jwt = jwt.sign({ acc_number: client_jwt_decoded.acc_number }, process.env.JWT_SECRET_CRM, { noTimestamp: true });
+
+ console.log("JWT", cookies.jwt);
+ console.log("CRM_JWT", crm_jwt);
+
+ upload.single("file")(req, {}, async (err) =>
+ {
+ const { file } = req;
+ const { id } = req.body;
+ const path = `${ process.env.CRM_API_HOST }/lk/Questionnaire/PreQuestionnaire/`;
+
+ const filetype = await fileTypeFromBuffer(file.buffer);
+ console.log("fileTypeFromBuffer", filetype);
+ const local_filename = `${ client_jwt_decoded.acc_number }_signed_questionnaire_${ moment().format("YYYY_MM_DD_HH:mm:ss") }.${ filetype.ext }`;
+
+ const key = md5(`questionnaire_${ client_jwt_decoded.acc_number }`);
+ const questionnaire = await RedisClient.get(key);
+
+ try
+ {
+ fs.writeFileSync(`${ __dirname }/../../../../../uploads/${ local_filename }`, file.buffer);
+ console.log("multer.upload.single file");
+ console.log({ questionnaire });
+
+ const parsed = JSON.parse(questionnaire);
+ console.log("parsed");
+ console.log(".".repeat(50));
+ console.log(inspect(parsed, true, null, true));
+
+ //const main = _pick(parsed.main, ["title", "inn", "kpp", "email", "telephone", "websiteurl", "financial_loan"]);
+
+ let payload = { ...parsed.main, ...{ head_person: parsed.head_person }, ...{ signatory_person: parsed.signatory_person }, };
+
+ payload.telephone = payload.telephone.replace(/[^0-9]/g, '');
+ payload.individual_executive_inn = payload.individual_executive_inn.replace(/[^0-9]/g, '');
+ payload.individual_executive_kpp = payload.individual_executive_kpp.replace(/[^0-9]/g, '');
+ payload.individual_executive_docdate = payload.individual_executive_docdate !== null ? moment(payload.individual_executive_docdate).format("YYYY-MM-DD") : null;
+
+ if(payload.head_person.middlename !== "" && payload.head_person.middlename !== null)
+ {
+ payload.head_person.no_middle_name = false;
+ }
+ else
+ {
+ payload.head_person.no_middle_name = true;
+ }
+ payload.head_person.identity_document.citizenship_code = payload.head_person.identity_document.citizenship.code;
+ payload.head_person.telephone = payload.head_person.telephone.replace(/[^0-9]/g, '');
+ payload.head_person.identity_document.issuedate = payload.head_person.identity_document.issuedate !== null ? moment(payload.head_person.identity_document.issuedate).format("YYYY-MM-DD") : null;
+ payload.head_person.evo_assignment_date = payload.head_person.evo_assignment_date !== null ? moment(payload.head_person.evo_assignment_date).format("YYYY-MM-DD") : null;
+
+ if(payload.signatory_person.not_head_person)
+ {
+ if(payload.signatory_person.middlename !== "" && payload.signatory_person.middlename !== null)
+ {
+ payload.signatory_person.no_middle_name = false;
+ }
+ else
+ {
+ payload.signatory_person.no_middle_name = true;
+ }
+ }
+ else
+ {
+ payload.signatory_person = { ...payload.signatory_person, ..._pick(payload.head_person, [
+ "lastname", "firstname", "middlename", "no_middle_name", "jobtitle", "telephone", "email", "identity_document", "evo_assignment_date", "evo_credentials_dateend", "evo_indefinite",
+ ]) };
+ }
+ payload.signatory_person.identity_document.citizenship_code = payload.signatory_person.identity_document.citizenship.code;
+ payload.signatory_person.telephone = payload.signatory_person.telephone.replace(/[^0-9]/g, '');
+ payload.signatory_person.identity_document.issuedate = payload.signatory_person.identity_document.issuedate !== null ? moment(payload.signatory_person.identity_document.issuedate).format("YYYY-MM-DD") : null;
+ payload.signatory_person.docdate = payload.signatory_person.docdate !== null ? moment(payload.signatory_person.docdate).format("YYYY-MM-DD") : null;
+ payload.signatory_person.assignment_date = payload.signatory_person.assignment_date !== null ? moment(payload.signatory_person.assignment_date).format("YYYY-MM-DD") : null;
+
+ const founder_persons = parsed.founder_persons;
+
+ for(let i in founder_persons)
+ {
+ founder_persons[i].founder_number = parseInt(i, 10) + 1;
+ founder_persons[i].telephone = founder_persons[i].telephone.replace(/[^0-9]/g, '');
+ founder_persons[i].identity_document.issuedate = founder_persons[i].identity_document.issuedate !== null ? moment(founder_persons[i].identity_document.issuedate).format("YYYY-MM-DD") : null;
+
+ if(founder_persons[i].middlename !== "" && founder_persons[i].middlename !== null)
+ {
+ founder_persons[i].no_middle_name = false;
+ }
+ else
+ {
+ founder_persons[i].no_middle_name = true;
+ }
+ }
+
+ payload = { ...payload, ...{ founder_persons }, ...{
+ revenue_source_main: parsed.non_profit.fin_source_business,
+ revenue_source_donat: parsed.non_profit.fin_source_donate,
+ revenue_source_entrance_fee: parsed.non_profit.fin_source_fees,
+ revenue_source_other: parsed.non_profit.fin_source_another_description,
+ foreign_countries_financing: parsed.non_profit.foreign_payers,
+ purpose_use_la: parsed.non_profit.fin_goals_cars,
+ purpose_use_lkt: parsed.non_profit.fin_goals_trucks,
+ purpose_use_gt_sc: parsed.non_profit.fin_goals_special,
+ } };
+ payload.financial_loan = parseFloat(payload.financial_loan.replace(/[^0-9.]/g, ''));
+
+ console.log("=".repeat(50));
+ console.log(inspect(payload, true, null, true));
+
+ /*
+ for(let i in parsed.main)
+ {
+ payload[i] = parsed.main[i] === null ? "" : parsed.main[i];
+ }
+ */
+
+ console.log(id);
+ console.log("path", path);
+ console.log("*".repeat(50));
+ console.log(payload);
+
+ const files_to_send = [];
+ for(let i in parsed.head_person_files)
+ {
+ //console.log(parsed.head_person_files[i]);
+ files_to_send.push({ ...parsed.head_person_files[i], ...{ number: 1, } })
+ }
+ /*
+ for(let i in parsed.delegation_files)
+ {
+ console.log(parsed.delegation_files[i]);
+ files_to_send.push({ ...parsed.delegation_files[i], ...{ number: 1, } })
+ }
+ */
+ for(let i in parsed.signatory_person_files)
+ {
+ //console.log(parsed.signatory_person_files[i]);
+ files_to_send.push({ ...parsed.signatory_person_files[i], ...{ number: 23, } })
+ }
+ for(let i in parsed.signatory_corporate_files)
+ {
+ //console.log(parsed.signatory_corporate_files[i]);
+ files_to_send.push({ ...parsed.signatory_corporate_files[i], ...{ number: 22, } })
+ }
+
+ files_to_send.push({ ...{
+ name: `${ client_jwt_decoded.acc_number }_questionnaire.pdf`,
+ filename: `${ client_jwt_decoded.acc_number }_questionnaire.pdf`,
+ }, ...{ number: 18, } });
+
+ files_to_send.push({ ...{
+ name: local_filename,
+ filename: local_filename,
+ }, ...{ number: 161, } });
+
+ console.log("@".repeat(200));
+ console.log(payload);
+
+ axios.put(path, payload,
+ {
+ params: { name: id },
+ headers: {
+ "Authorization": `Bearer ${ crm_jwt }`,
+ "Content-Type": "application/json"
+ }
+ }
+ )
+ .then((crm_response) =>
+ {
+ console.log("crm_response for", path);
+ console.log(inspect(crm_response.data, true, null, true));
+
+ eachSeries(files_to_send, (file_entry, callback) =>
+ {
+ console.log({ file_entry });
+
+ const file_to_send_data = fs.readFileSync(`${ __dirname }/../../../../../uploads/${ file_entry.filename }`);
+ const data = new FormData();
+ data.append("file", file_to_send_data, file_entry.name);
+ data.append("entity", "evo_client_questionnaire");
+ data.append("documentTypeNumber", file_entry.number);
+ data.append("name", id);
+
+ axios.post(`${ process.env.CRM_API_HOST }/lk/document/upload/`, data,
+ {
+ headers: {
+ "Content-Type": `multipart/form-data; boundary=${ data._boundary }`,
+ "Authorization": `Bearer ${ crm_jwt }`,
+ },
+ withCredentials: true,
+ })
+ .then(() =>
+ {
+ console.log("FILE", file_entry.filename, "SENT");
+ callback();
+ })
+ .catch((crm_file_upload_error) =>
+ {
+ console.error("crm_file_upload_error", crm_file_upload_error);
+ callback();
+ });
+ }, () =>
+ {
+ res.status(200).send();
+ resolve();
+ });
+ })
+ .catch((error) =>
+ {
+ console.error(error);
+ console.error("-".repeat(30), "error.response.data:");
+ console.error(error.response.data);
+
+ res.status(500).send();
+ resolve();
+ });
+
+ //res.status(200).send();
+ }
+ catch(upload_single_error)
+ {
+ console.error("upload_single_error");
+ console.error(upload_single_error.response.data);
+
+ res.status(500).send();
+ resolve();
+ }
+ });
+ }
+ else
+ {
+ res.status(403).send();
+ resolve();
+ }
+ }
+ });
+}
+
+export const config = {
+ api: {
+ bodyParser: false
+ }
+}
\ No newline at end of file
diff --git a/pages/questionnaire/index.js b/pages/questionnaire/index.js
index ff9f2fa..ecf7c48 100644
--- a/pages/questionnaire/index.js
+++ b/pages/questionnaire/index.js
@@ -7,6 +7,7 @@ import { connect } from "react-redux";
import numeral from "numeral";
import pluralize from 'pluralize-ru';
import { SpinnerCircular } from 'spinners-react';
+import NoSSR from "@mpth/react-no-ssr";
import { withRouter } from 'next/router';
import { reduxWrapper } from '../../store';
@@ -104,7 +105,7 @@ class QuestionnairePage extends React.Component
if (route.indexOf("#regulatory") > -1) return (
);
if (route.indexOf("#non-profit") > -1) return (
);
if (route.indexOf("#check") > -1) return (
);
- if (route.indexOf("#signing") > -1) return (
);
+ if (route.indexOf("#signing") > -1) return (
);
if (route.indexOf("#status") > -1) return (
);
return (
);
@@ -128,14 +129,16 @@ class QuestionnairePage extends React.Component
Анкета лизингополучателя