From 81d5cf6569d3aef42eb83bb59de030f03a82f327 Mon Sep 17 00:00:00 2001 From: merelendor Date: Fri, 24 Mar 2023 17:14:36 +0300 Subject: [PATCH] 4 pages semi-ready --- actions/index.js | 3 +- actions/questionnaireActions.js | 61 + actions/suggestsActions.js | 6 +- constants/actionTypes.js | 5 +- css/forms/style.css | 1563 ++++++++++++++++- css/forms/style.less | 4 +- css/var.css | 570 +++++- package.json | 3 +- pages/api/questionnaire/get.js | 66 + pages/api/questionnaire/put.js | 0 pages/api/suggests/address.js | 32 +- pages/components/DatePicker/index.js | 16 +- .../components/InnerMenu/index.js | 96 +- .../components/forms/AddressSuggestsSelect.js | 215 +++ .../components/forms/FilesList.js | 8 +- .../components/forms/Form_1_Main/index.js | 177 +- .../components/forms/Form_2_Contacts/index.js | 62 +- .../components/forms/Form_3_Signer/index.js | 106 +- .../forms/Form_4_Shareholders/index.js | 617 ++++--- .../components/forms/QuestionnaireForm.js | 54 +- .../components/forms/citizenships.js | 255 +++ .../components/forms/countries.js | 251 +++ pages/questionnaire/index.js | 3 +- reducers/initialState.js | 4 +- reducers/questionnaireReducer.js | 4 +- yarn.lock | 62 +- 26 files changed, 3830 insertions(+), 413 deletions(-) create mode 100644 actions/questionnaireActions.js create mode 100644 pages/api/questionnaire/get.js create mode 100644 pages/api/questionnaire/put.js create mode 100644 pages/questionnaire/components/forms/AddressSuggestsSelect.js create mode 100644 pages/questionnaire/components/forms/citizenships.js create mode 100644 pages/questionnaire/components/forms/countries.js diff --git a/actions/index.js b/actions/index.js index 66b4d08..e581ce5 100644 --- a/actions/index.js +++ b/actions/index.js @@ -11,4 +11,5 @@ export * from './announcementsActions'; export * from './eventsActions'; export * from './supportActions'; export * from './adminActions'; -export * from './suggestsActions'; \ No newline at end of file +export * from './suggestsActions'; +export * from './questionnaireActions'; \ No newline at end of file diff --git a/actions/questionnaireActions.js b/actions/questionnaireActions.js new file mode 100644 index 0000000..3f006be --- /dev/null +++ b/actions/questionnaireActions.js @@ -0,0 +1,61 @@ +import axios from 'axios'; +import { Cookies } from 'react-cookie'; +import Router from 'next/router'; +import moment from 'moment'; +import { nSQL } from "@nano-sql/core"; + +import * as actionTypes from '../constants/actionTypes'; + +if(process.browser) +{ + FormData.prototype.appendObject = function(obj, namespace) + { + let keyName; + for (var key in obj) + { + if (obj.hasOwnProperty(key)) + { + keyName = [namespace, '[', key, ']'].join(''); + this.append(keyName, obj[key]); + } + } + }; +} + +export const getQuestionnaire = ({ dispatch }) => +{ + console.log("ACTION", "support", "getAppeals()", `${ process.env.NEXT_PUBLIC_SELF_API_HOST }/api/questionnaire/get`); + + return new Promise((resolve, reject) => + { + axios.get(`${ process.env.NEXT_PUBLIC_SELF_API_HOST }/api/questionnaire/get`) + .then((response) => + { + console.log("ACTION", "support", "getAppeals()", "response", response.data); + + //dispatch({ type: actionTypes.SUPPORT_APPEALS, data: { appeals: { list: response.data.appeals, new: response.data.new, } } }); + resolve(); + }) + .catch((error) => + { + console.log("error"); + console.error(error); + + reject(); + }); + }); +} + +export const updateQuestionnaire = ({ dispatch, questionnaire }) => +{ + console.log("ACTION", "questionnaireActions", "updateQuestionnaire()", { questionnaire }); + + return new Promise((resolve, reject) => + { + dispatch({ type: actionTypes.QUESTIONNAIRE_UPDATE, data: { questionnaire, } }); + setTimeout(() => { + console.log("UPDATE UPDATE UPDATE", global.store.getState(), { dispatch: dispatch }); + resolve(); + }, 500); + }); +} \ No newline at end of file diff --git a/actions/suggestsActions.js b/actions/suggestsActions.js index 80d27c5..ab5a0cb 100644 --- a/actions/suggestsActions.js +++ b/actions/suggestsActions.js @@ -20,16 +20,16 @@ if(process.browser) }; } -export const getAddress = (text) => +export const getAddress = (query) => { return new Promise((resolve, reject) => { - axios.post(`${ process.env.NEXT_PUBLIC_SELF_API_HOST }/api/suggests/address`, { text }, { + axios.post(`${ process.env.NEXT_PUBLIC_SELF_API_HOST }/api/suggests/address`, { query }, { withCredentials: true, }) .then((response) => { - resolve(""); + resolve(response.data); }) .catch((error) => { diff --git a/constants/actionTypes.js b/constants/actionTypes.js index 710919d..71967a7 100644 --- a/constants/actionTypes.js +++ b/constants/actionTypes.js @@ -40,4 +40,7 @@ export const SUPPORT_THEMES = 'SUPPORT_THEMES'; export const SUPPORT_THEMES_FILTERED = 'SUPPORT_THEMES_FILTERED'; export const SUPPORT_APPEALS = 'SUPPORT_APPEALS'; export const SUPPORT_APPEAL = 'SUPPORT_APPEAL'; -export const SUPPORT_RESET = 'SUPPORT_RESET'; \ No newline at end of file +export const SUPPORT_RESET = 'SUPPORT_RESET'; + +export const QUESTIONNAIRE_UPDATE = 'QUESTIONNAIRE_UPDATE'; +export const QUESTIONNAIRE_RESET = 'QUESTIONNAIRE_RESET'; \ No newline at end of file diff --git a/css/forms/style.css b/css/forms/style.css index da46a14..ff1a84d 100644 --- a/css/forms/style.css +++ b/css/forms/style.css @@ -1 +1,1562 @@ -#filter{position:relative}#filter .container{position:relative}#filter.filter_in_catalog:not(.visible){display:none}#filter.filter_in_catalog .container{padding-top:0;padding-bottom:0;margin-bottom:40px}@media all and (max-width:1420px){#filter.filter_in_catalog .container{margin-left:0;margin-right:0;width:100%}#filter.filter_in_catalog .container .filter_header .button{bottom:10px}}@media all and (max-width:768px){#filter.filter_in_catalog .container{bottom:40px}}#filter .filter_header{display:flex;align-items:center;justify-content:space-between;margin-bottom:40px}#filter .filter_header .button{width:calc(33.333% - 21px)}@media all and (max-width:1279px){#filter .filter_header .button{width:calc(50% - 15px);position:absolute;right:0;bottom:90px}}@media all and (max-width:1280px){#filter .filter_header .button{bottom:50px}}@media all and (max-width:768px){#filter .filter_header .button{width:100%;bottom:60px}}#filter .filter_body{display:flex;flex-wrap:wrap;justify-content:space-between}#filter .filter_body .filter_column{width:calc(33.333% - 21px)}@media all and (max-width:1279px){#filter .filter_body .filter_column{width:calc(50% - 15px);margin-bottom:35px}#filter .filter_body .filter_column:nth-child(3){margin-bottom:0}}@media all and (max-width:768px){#filter .filter_body .filter_column{width:100%;margin-bottom:24px}#filter .filter_body .filter_column:last-child{margin-bottom:100px}}#filter .filter_body .form_field{width:100%;margin-bottom:10px}#filter .filter_body .fieldgroup{width:100%}#filter .filter_body .fieldgroup .form_field{width:calc(50% - 20px)}@media all and (max-width:768px){#filter .filter_body .fieldgroup .form_field{width:calc(50% - 4px)}}#catalog_small_filter{margin-bottom:40px}#catalog_small_filter.hidden{display:none}#catalog_small_filter .filter_body{display:flex;justify-content:flex-end}#catalog_small_filter .filter_body select{margin-right:30px;width:306px}#catalog_small_filter .filter_body button{width:220px}@media all and (max-width:1280px){#catalog_small_filter .filter_body{justify-content:space-between}#catalog_small_filter .filter_body .form_field{width:calc(33.333% - 30px)}#catalog_small_filter .filter_body .form_field select{width:100%}#catalog_small_filter .filter_body button{width:33.3333%}}@media all and (max-width:768px){#catalog_small_filter .filter_body{display:block}#catalog_small_filter .filter_body .form_field,#catalog_small_filter .filter_body button{width:100%;margin-bottom:8px}}#order .order_form{position:relative;margin:0}@media all and (max-width:960px){#order .order_form{margin-top:-60px}}@media all and (max-width:768px){#order .order_form{margin:0}}#order .order_form .order_email{display:flex;align-items:center;position:absolute;z-index:1;background:#EDEFF5;height:235px;left:0;right:0;top:0;bottom:0;margin:auto}#order .order_form .order_email p{width:320px;font-size:24px;line-height:45px;padding:0 20px}@media all and (max-width:1280px){#order .order_form .order_email p{width:220px;font-size:13px;line-height:20px}}@media all and (max-width:768px){#order .order_form .order_email{position:relative;height:auto;margin-bottom:25px}#order .order_form .order_email p{padding:0}}#order .order_form form{width:750px;background:var(--blue);box-sizing:border-box;padding:55px 90px;margin:auto;margin-left:390px;position:relative;z-index:2}@media all and (max-width:1420px){#order .order_form form{width:550px;margin-left:320px}}@media all and (max-width:960px){#order .order_form form{width:50%;padding:15px 25px;margin-left:285px}}@media all and (max-width:768px){#order .order_form form{width:auto;margin-left:-16px;margin-right:-16px;padding:25px 16px}}#order .order_form form input{margin-bottom:15px;background:rgba(255,255,255,0.2);color:#fff}#order .order_form form input::placeholder{color:#fff}@media all and (max-width:1280px){#order .order_form form input{margin-bottom:15px}}#order .order_form form .policy{position:relative;z-index:2;margin:5px 25px 45px 25px}@media all and (max-width:1280px){#order .order_form form .policy{margin-top:-5px;margin-bottom:25px;margin-left:0;margin-right:0}}#order .order_form form .policy label{color:#fff;font-weight:300}#order .order_form form .policy label:before{background:#fff;border-radius:0}#order .order_form form .policy input:checked+label:before{border-color:#fff;background:url("/assets/images/icons/checkbox_blue.svg") no-repeat center #fff}#order .order_form form .button{display:inherit;margin-left:auto}.login{max-width:610px}.login .login_with{display:flex;align-items:center;margin-bottom:50px;justify-content:flex-start}.login .login_with p{margin-right:20px}.login .login_with .tabs .tab{margin-right:0}.login .login_with .tabs .tab:not(.active){background-color:var(--inactive)}.login .button-group{display:flex;align-items:center;justify-content:flex-end}.login .button-group .button{margin-left:30px;display:flex}.login .button-group .button:first-child{width:auto}.login .form_field{margin-bottom:15px}.login .form_field.error{margin-bottom:25px}.login input[name="login"]{padding-left:32px;background:url("/assets/images/icons/icon-login.svg") no-repeat 8px 50%}.login input[name="pass"]{padding-left:32px;background:url("/assets/images/icons/icon-pass.svg") no-repeat 8px 50%}.login .button{width:90px;display:block;margin-left:auto}@media all and (max-width:960px){.login{max-width:440px}.login form{max-width:400px}}@media all and (max-width:768px){.login .login_with{display:block;margin-bottom:30px}.login .login_with p{margin-bottom:10px}.login .login_with .tabs{width:100%}.login .login_with .tabs .tab{width:50%;text-align:center}.login .button-group{flex-wrap:wrap;justify-content:center}.login .button-group .button{margin-left:0}.login .button-group button{order:1;width:100%}.login .button-group a{order:2;display:inline-flex}}.login.recovery{max-width:815px}.login.recovery p.full{width:100%}.login.recovery .message{margin-bottom:15px}.login.recovery form{display:flex;justify-content:space-between}.login.recovery form .form_field{width:calc(100% - 205px)}.login.recovery form .button{width:175px}.login.recovery form.newPass_form{flex-wrap:wrap}.login.recovery .resend{display:flex;align-items:center;justify-content:flex-start}.login.recovery .resend p{margin-right:30px}.login.recovery .resend .button{margin-left:0;width:auto}@media all and (max-width:960px){.login.recovery form{max-width:100%}}@media all and (max-width:768px){.login.recovery form{display:block}.login.recovery form .form_field,.login.recovery form .button{width:100%}.login.recovery .resend{display:block;text-align:center;margin-top:15px}.login.recovery .resend p{margin-right:0}.login.recovery .resend .button{margin-left:auto;margin-right:auto}}.contract_search{margin-bottom:40px}@media all and (max-width:1600px) and (min-width:1280px){.contract_search{margin-bottom:30px}}.contract_search form{display:flex;align-items:center;justify-content:space-between}.contract_search form .form_field.full{width:100% !important;margin-right:30px !important}@media all and (max-width:960px){.contract_search form .form_field.full{margin-right:0 !important}}.contract_search form .form_field:first-child{width:calc(50% - 15px);min-width:calc(50% - 15px);margin-right:15px}.contract_search form .form_field:nth-child(2),.contract_search form .form_field:nth-child(3){width:100%;margin-right:15px}.contract_search form .form_field.single{width:100%;margin-right:80px}.contract_search form .form_field .button{width:158px;min-width:158px}@media all and (max-width:768px){.contract_search form .form_field .button{display:none}}.contract_search form .form_field input+label{display:none}@media all and (max-width:960px){.contract_search{margin-bottom:20px}.contract_search form{flex-wrap:wrap;justify-content:flex-start}.contract_search form .form_field:first-child{margin-bottom:15px;width:100%}.contract_search form .form_field:first-child.single{width:calc(100% - 105px);margin-right:30px;margin-bottom:0}.contract_search form .form_field:nth-child(2),.contract_search form .form_field:nth-child(3){width:25%;margin-right:30px}.contract_search form .button{margin-left:auto}}@media all and (max-width:768px){.contract_search form{justify-content:space-between}.contract_search form .form_field{margin-right:0}.contract_search form .form_field:first-child{margin-right:0;margin-bottom:15px;width:100%}.contract_search form .form_field:first-child.single{width:100%;margin-right:0px}.contract_search form .form_field:nth-child(2),.contract_search form .form_field:nth-child(3){width:calc(50% - 4px);margin-right:0px}.contract_search form .form_field .date_input,.contract_search form .form_field input[type="date"]{height:55px;background-position:8px 14px;position:relative;padding-bottom:8px}.contract_search form .form_field .date_input::placeholder,.contract_search form .form_field input[type="date"]::placeholder{color:transparent}.contract_search form .form_field .date_input[value=""]+label,.contract_search form .form_field input[type="date"][value=""]+label{display:inline-block;position:absolute;left:32px;top:10px;z-index:2;font-size:13px;line-height:20px;color:#919399}.contract_search form .button{margin-left:auto;width:100%;margin-top:15px;background:var(--blue);color:#fff;display:none}.contract_search form .button:disabled{opacity:.48}}.reconciliation_form:not(.small){margin-bottom:35px;display:flex;flex-wrap:wrap;justify-content:space-between}.reconciliation_form:not(.small) p{width:100%;font-weight:700;margin-bottom:20px}.reconciliation_form:not(.small) .form_group{width:calc(65% - 8px);display:flex;flex-wrap:wrap;justify-content:space-between}.reconciliation_form:not(.small) .form_group:last-child{width:calc(35% - 8px)}.reconciliation_form:not(.small) .form_field{width:calc(50% - 8px)}.reconciliation_form:not(.small) .button{width:calc(40% - 8px)}.reconciliation_form:not(.small) .button:last-child{width:calc(60% - 8px)}@media all and (max-width:1279px){.reconciliation_form:not(.small) .form_group,.reconciliation_form:not(.small) .form_group:last-child{width:calc(50% - 8px)}}@media all and (max-width:768px){.reconciliation_form:not(.small) p{margin-bottom:8px}.reconciliation_form:not(.small) .form_group,.reconciliation_form:not(.small) .form_group:last-child{width:100%}.reconciliation_form:not(.small) .form_field{margin-bottom:15px}.reconciliation_form:not(.small) .button,.reconciliation_form:not(.small) .form_field{width:calc(50% - 4px)}.reconciliation_form:not(.small) .button:last-child,.reconciliation_form:not(.small) .form_field:last-child{width:calc(50% - 4px)}}.reconciliation_form.small{display:flex;flex-wrap:wrap;justify-content:space-between;max-width:420px}@media all and (max-width:768px){.reconciliation_form.small{max-width:100%}}.reconciliation_form.small .form_field{width:calc(50% - 8px)}@media all and (max-width:768px){.reconciliation_form.small .form_field{width:calc(50% - 4px)}}.reconciliation_form.small .form_field .date_input_wrapper>.rw-widget .rw-widget-container{display:block}.reconciliation_form.small .form_field .date_input_wrapper>.rw-widget .rw-widget-container>button{margin:0;width:100%}.reconciliation_form.small button.button{margin-top:35px;width:calc(45% - 8px)}.reconciliation_form.small button.button:last-child{width:calc(55% - 8px)}@media all and (max-width:768px){.reconciliation_form.small button.button{width:calc(50% - 4px) !important;margin-top:15px}}.fade{position:fixed;z-index:99999;top:0;left:0;width:100%;height:100%;overflow:auto;background:rgba(0,0,0,0.5);display:block}.fade:not(.opened){display:none}.fade .modal{max-width:700px;width:100%;background:#fff;margin:100px auto;padding:45px 40px}.fade .modal .modal_footer{text-align:right;margin-top:30px}.fade .modal .modal_footer .button{margin-left:auto}@media all and (max-width:768px){.fade .modal{padding:25px 20px;margin:0}}.reconciliation_form.small{display:flex;flex-wrap:wrap;justify-content:space-between;max-width:420px}.reconciliation_form.small .form_field{width:calc(50% - 8px)}@media all and (max-width:768px){.reconciliation_form.small .form_field{width:calc(50% - 4px)}}.reconciliation_form.small button.button{margin-top:15px;width:calc(45% - 8px)}.reconciliation_form.small button.button:last-child{width:calc(55% - 8px)}@media all and (max-width:768px){.reconciliation_form.small button.button{width:calc(50% - 4px)}}.fade{position:fixed;z-index:99999;top:0;left:0;width:100%;height:100%;overflow:auto;background:rgba(0,0,0,0.5);display:block}.fade:not(.opened){display:none}.fade .modal{max-width:700px;width:100%;background:#fff;margin:100px auto;padding:45px 40px}.fade .modal .modal_footer{text-align:right;margin-top:30px}.fade .modal .modal_footer .button{margin-left:auto}.settings_user_control{display:flex;align-items:center;justify-content:space-between;margin-bottom:45px}.settings_user_control p{font-weight:700}.settings_user_control div{display:flex;align-items:center;gap:0 7px}@media all and (max-width:1279px){.settings_user_control p{width:160px;margin-right:16px;min-width:160px}.settings_user_control div{width:100%}.settings_user_control div button:first-child{width:60%}.settings_user_control div button:last-child{width:40%}}@media all and (max-width:768px){.settings_user_control{display:block;margin-bottom:35px;width:100%}.settings_user_control p{width:100%}.settings_user_control div{display:block}.settings_user_control div button{width:100% !important;margin-top:16px}}.settings_table{display:table;border-collapse:collapse;width:100%}@media all and (max-width:1279px){.settings_table{display:block}}.settings_table .table_row{display:table-row}@media all and (max-width:1279px){.settings_table .table_row{display:block;padding-bottom:16px;margin-bottom:16px;border-bottom:1px solid #EDEFF5;padding-left:55px;background:url("../../public/assets/images/icons/user.svg") no-repeat top left;position:relative}}@media all and (max-width:768px){.settings_table .table_row{padding-left:0;background:transparent}}.settings_table .table_row .table_cell{display:table-cell;padding:18px 12px;border:1px solid #EDEFF5;position:relative}.settings_table .table_row .table_cell.delete{position:static}@media all and (max-width:1279px){.settings_table .table_row .table_cell{display:flex;flex-wrap:wrap;border:0;font-size:13px;line-height:20px;padding:0;margin-bottom:4px}.settings_table .table_row .table_cell:before{content:attr(data-title);color:#8E94A7;font-weight:700;display:block;width:190px;padding-right:10px}}@media all and (max-width:768px){.settings_table .table_row .table_cell:before{width:100%;margin-bottom:2px}}.settings_table .table_row .table_cell:last-child{border-left:0;min-width:36px}.settings_table .table_row .table_cell:last-child button{position:absolute;width:16px;height:16px;padding:0;top:0;left:0;right:0;bottom:0;margin:auto;visibility:hidden;pointer-events:none;background:url("../../public/assets/images/icons/icon-delete.svg") no-repeat center}@media all and (max-width:1279px){.settings_table .table_row .table_cell:last-child:before{border:0}.settings_table .table_row .table_cell:last-child button{bottom:auto;left:auto;width:32px;height:32px;background:url("../../public/assets/images/icons/Trash.svg") no-repeat center;font-size:0;text-indent:-999px;overflow:hidden}}@media all and (max-width:768px){.settings_table .table_row .table_cell:last-child button{text-indent:0;font-weight:600;font-size:15px;line-height:20px;color:#A8026B;width:140px;position:relative}}.settings_table .table_row .table_cell:nth-last-child(2){border-right:0}.settings_table .table_row .table_cell input{border:0;outline:none;background:#fff;font-size:15px;padding:0}.settings_table .table_row .table_cell input::placeholder{color:var(--text_not_active);font-size:15px}@media all and (max-width:1279px){.settings_table .table_row .table_cell input{padding:0 12px;border:1px solid rgba(0,16,61,0.12);height:40px;max-width:320px;width:100%;box-sizing:border-box}}@media all and (max-width:768px){.settings_table .table_row .table_cell input{max-width:none;width:100%}}.settings_table .table_row .table_cell .settings_dropdown{font-family:'Montserrat',sans-serif;cursor:pointer;width:100%;text-align:left;font-weight:400;justify-content:flex-start;font-size:15px;line-height:20px;color:#0C0C0C;padding:0;background:url(/assets/images/icons/company-arrow.svg) no-repeat 100% 50%}.settings_table .table_row .table_cell .settings_dropdown[data-selected="false"]{color:var(--text_not_active)}@media all and (max-width:1279px){.settings_table .table_row .table_cell .settings_dropdown{border:1px solid rgba(0,16,61,0.12);padding:0 10px;background-position:calc(100% - 10px) 50%;width:calc(100% - 200px);max-width:320px}}@media all and (max-width:768px){.settings_table .table_row .table_cell .settings_dropdown{max-width:none;width:100%}}.settings_table .table_row .table_cell .dropdown_list{position:absolute;top:100%;left:0;width:412px;display:none;background:#FFFFFF;box-shadow:0 4px 32px rgba(0,0,0,0.16);padding:25px 35px;z-index:9}@media all and (max-width:1279px){.settings_table .table_row .table_cell .dropdown_list{left:200px}}@media all and (max-width:768px){.settings_table .table_row .table_cell .dropdown_list{left:0;right:0;width:100%;padding:16px}}.settings_table .table_row .table_cell .dropdown_list.opened{display:block}.settings_table .table_row .table_cell .dropdown_list .list_item{position:relative;padding-bottom:16px;margin-bottom:16px;border-bottom:1px solid var(--inactive)}.settings_table .table_row .table_cell .dropdown_list .list_item label{font-weight:700;padding-left:0;padding-right:30px;line-height:23px}.settings_table .table_row .table_cell .dropdown_list .list_item label:before{right:0;left:auto}.settings_table .table_row .table_cell .dropdown_list .list_item label span{display:block;font-weight:400}.settings_table .table_row .table_cell .dropdown_list .list_item:last-child{border:0;padding-bottom:0;margin-bottom:0}.settings_table .table_row.table_header .table_cell{color:#8E94A7;font-weight:700;border:0}.settings_table .table_row.table_header .table_cell:last-child{border-left:0 !important}@media all and (max-width:1279px){.settings_table .table_row.table_header{display:none}}.settings_table.editable .table_row.editable .table_cell{margin-bottom:8px}.settings_table.editable .table_row .table_cell:last-child{border:1px solid #EDEFF5}@media all and (max-width:1279px){.settings_table.editable .table_row .table_cell:last-child{border:0}}.settings_table.editable .table_row .table_cell:last-child button{pointer-events:all;visibility:visible}.new_appeal form .form_field{margin-bottom:14px}.new_appeal form textarea{height:208px}.dropzone{height:208px;position:relative;border:1px dashed #1C01A9;border-radius:4px;background:rgba(28,1,169,0.1);text-align:center;display:flex;align-items:center;justify-content:center;margin-top:30px}.dropzone .files{width:100%;padding:16px}.dropzone .files:empty{display:none}.dropzone label.blue{color:var(--blue);display:block}.dropzone [type="file"]{cursor:pointer;position:absolute;opacity:0;top:0;right:0;bottom:0;left:0}.dropzone div{max-width:404px;text-align:center}.dropzone div p{color:#828282;margin-bottom:20px}@media all and (max-width:768px){.dropzone{border:0;background:transparent;height:auto}.dropzone div p{margin-bottom:10px}.dropzone div p:before{content:attr(data-sm-text);display:block}.dropzone div p span{display:none}}.questionnaire:not(:last-child){margin-bottom:50px}.questionnaire.disabled input,.questionnaire.disabled select,.questionnaire.disabled textarea{cursor:default;background:#fff;pointer-events:none}.questionnaire .title{font-weight:700;font-size:15px;line-height:23px;color:#000;margin-bottom:16px;padding-bottom:16px;margin-top:0;border-bottom:1px solid var(--inactive);margin-left:-30px;padding-left:30px}@media all and (max-width:1280px){.questionnaire .title{margin-left:0;padding-left:0}}.questionnaire small{display:block;color:#8E94A7;font-size:11px;line-height:15px;font-weight:400;margin-top:4px}.questionnaire>p{margin:15px 0}.questionnaire textarea{resize:none}.questionnaire .formgroup{display:flex;flex-wrap:wrap;justify-content:space-between}.questionnaire .formgroup .form_field{width:calc(50% - 12px)}@media all and (max-width:1024px){.questionnaire .formgroup .form_field{width:100%}}.questionnaire .form_field{display:flex;align-items:center;flex-wrap:wrap;margin-bottom:30px;width:100%}@media all and (max-width:1024px){.questionnaire .form_field{margin-bottom:15px}.questionnaire .form_field.picker div{width:100% !important}.questionnaire .form_field.picker input[type="date"]{width:100% !important}.questionnaire .form_field.picker .checkbox{margin-left:0 !important}}.questionnaire .form_field.bg{padding:8px 0;align-items:flex-start;background:rgba(28,1,169,0.1)}@media all and (max-width:1024px){.questionnaire .form_field.bg{padding:8px}}.questionnaire .form_field.checkbox{margin:8px 0;width:100%}.questionnaire .form_field.checkbox label{width:auto;display:flex;align-items:center}@media all and (max-width:1024px){.questionnaire .form_field.checkbox label{flex-wrap:wrap}}.questionnaire .form_field.checkbox label::before{top:0;bottom:0;margin:auto}.questionnaire .form_field.checkbox label input{margin-left:12px;width:100%;background:var(--inactive);cursor:default}.questionnaire .form_field.checkbox label span{white-space:pre-line;white-space:nowrap}@media all and (max-width:1024px){.questionnaire .form_field.checkbox label span{white-space:unset}.questionnaire .form_field.checkbox label span+input{margin-left:0;margin-top:10px}}.questionnaire .form_field.checkbox input:checked+label input{background:#fff;cursor:text}.questionnaire .form_field label{width:186px;margin-right:12px}@media all and (max-width:1024px){.questionnaire .form_field label{width:100%;margin-right:0;margin-bottom:8px}}.questionnaire .form_field label a{text-decoration:underline}.questionnaire .form_field textarea,.questionnaire .form_field input:not(.rw-input),.questionnaire .form_field select,.questionnaire .form_field .autocomlete{width:calc(100% - 198px)}.questionnaire .form_field textarea[value=""],.questionnaire .form_field input:not(.rw-input)[value=""],.questionnaire .form_field select[value=""],.questionnaire .form_field .autocomlete[value=""]{background-color:#EDEFF5}@media all and (max-width:1024px){.questionnaire .form_field textarea,.questionnaire .form_field input:not(.rw-input),.questionnaire .form_field select,.questionnaire .form_field .autocomlete{width:100%}}.questionnaire .form_field textarea[type="date"],.questionnaire .form_field input:not(.rw-input)[type="date"],.questionnaire .form_field select[type="date"],.questionnaire .form_field .autocomlete[type="date"]{width:245px}.questionnaire .form_field textarea+p,.questionnaire .form_field input:not(.rw-input)+p,.questionnaire .form_field select+p,.questionnaire .form_field .autocomlete+p{font-size:11px;line-height:15px;margin-left:198px;margin-top:2px}@media all and (max-width:1024px){.questionnaire .form_field textarea+p,.questionnaire .form_field input:not(.rw-input)+p,.questionnaire .form_field select+p,.questionnaire .form_field .autocomlete+p{margin-left:0}}.questionnaire .action{text-align:right;margin-top:40px}.questionnaire ul{margin:20px 0;padding-left:20px;list-style:disc;font-size:14px;line-height:29px}.questionnaire ul li:not(:last-child){margin-bottom:8px}@media all and (max-width:1024px){.questionnaire .dropzone{width:100% !important;max-width:360px;margin-left:auto;margin-right:auto}}.questionnaire .feed .feed_list{margin-right:0;max-width:800px}.questionnaire .autocomlete *{outline:none;box-shadow:none !important}.questionnaire .autocomlete .react-select__control{border-radius:0;border:1px solid rgba(0,16,61,0.12);height:40px;min-height:40px}.questionnaire .autocomlete .react-select__control.react-select__control--menu-is-open{border-color:var(--blue)}.questionnaire .autocomlete .react-select__control .react-select__value-container{padding:0 12px;height:100%;background:#fff}.questionnaire .autocomlete .react-select__control .react-select__value-container:not(.react-select__value-container--has-value){background-color:#EDEFF5}.questionnaire .autocomlete .react-select__control .react-select__value-container .react-select__input-container{margin:0;padding:0}.questionnaire .autocomlete .react-select__control .react-select__indicators{display:none}.questionnaire .autocomlete .react-select__menu{border-radius:0;border-width:0px 1px 1px 1px;border-style:solid;border-color:rgba(0,16,61,0.12);border-radius:0px 0px 4px 4px;margin-top:0;top:40px;padding:8px 12px}.questionnaire .autocomlete .react-select__menu .react-select__option{color:#8E94A7;font-size:15px;line-height:24px;background:transparent !important;cursor:pointer;padding:0}.questionnaire .autocomlete .react-select__menu .react-select__option:not(:last-child){margin-bottom:8px}.questionnaire .autocomlete .react-select__menu .react-select__option:hover{color:#000}.questionnaire .autocomlete .react-select__menu .react-select__option.react-select__option--is-selected{color:var(--blue)}@media all and (max-width:960px){.questionnaire .autocomlete .react-select__menu .react-select__option{font-size:13px;line-height:20px}}.questionnaire.questionnaire_4 .form_field label,.questionnaire.questionnaire_5 .form_field label{width:calc(50% - 12px);font-weight:700}@media all and (max-width:1024px){.questionnaire.questionnaire_4 .form_field label,.questionnaire.questionnaire_5 .form_field label{width:100%}}.questionnaire.questionnaire_4 .form_field.checkbox label,.questionnaire.questionnaire_5 .form_field.checkbox label{font-weight:400}.questionnaire.questionnaire_4 .form_field textarea,.questionnaire.questionnaire_5 .form_field textarea,.questionnaire.questionnaire_4 .form_field input,.questionnaire.questionnaire_5 .form_field input,.questionnaire.questionnaire_4 .form_field select,.questionnaire.questionnaire_5 .form_field select{width:50%}@media all and (max-width:1024px){.questionnaire.questionnaire_4 .form_field textarea,.questionnaire.questionnaire_5 .form_field textarea,.questionnaire.questionnaire_4 .form_field input,.questionnaire.questionnaire_5 .form_field input,.questionnaire.questionnaire_4 .form_field select,.questionnaire.questionnaire_5 .form_field select{width:100%}}.questionnaire.questionnaire_4 .form_field .form_field,.questionnaire.questionnaire_5 .form_field .form_field{margin-bottom:0}.questionnaire.questionnaire_4 .form_field .formgroup,.questionnaire.questionnaire_5 .form_field .formgroup{gap:0 12px;width:50%}@media all and (max-width:1024px){.questionnaire.questionnaire_4 .form_field .formgroup,.questionnaire.questionnaire_5 .form_field .formgroup{width:100%}}.questionnaire.questionnaire_4 .form_field .formgroup .form_field,.questionnaire.questionnaire_5 .form_field .formgroup .form_field{width:calc(50% - 6px)}.questionnaire.questionnaire_4 .form_field .formgroup .form_field textarea,.questionnaire.questionnaire_5 .form_field .formgroup .form_field textarea,.questionnaire.questionnaire_4 .form_field .formgroup .form_field input,.questionnaire.questionnaire_5 .form_field .formgroup .form_field input{width:100%}.questionnaire.questionnaire_4 .form_field .formgroup .form_field.checkbox,.questionnaire.questionnaire_5 .form_field .formgroup .form_field.checkbox{width:100%}.questionnaire.questionnaire_4 .form_field .formgroup.control .form_field,.questionnaire.questionnaire_5 .form_field .formgroup.control .form_field{width:calc(100% - 42px)}.questionnaire.questionnaire_4 .form_field .formgroup.control .form_field label,.questionnaire.questionnaire_5 .form_field .formgroup.control .form_field label{width:100%}.questionnaire.questionnaire_4 .form_field .formgroup.control .delete,.questionnaire.questionnaire_5 .form_field .formgroup.control .delete{width:30px;height:30px;padding:0;display:flex;align-items:center;justify-content:center}.questionnaire.questionnaire_4 .added_person,.questionnaire.questionnaire_5 .added_person{border-top:1px solid var(--inactive);margin-top:30px;padding-top:30px}.questionnaire.questionnaire_4 .added_person .feed_list .checkbox,.questionnaire.questionnaire_5 .added_person .feed_list .checkbox,.questionnaire.questionnaire_4 .added_person .feed_list .checkbox label,.questionnaire.questionnaire_5 .added_person .feed_list .checkbox label{width:100%}.questionnaire.questionnaire_4 .added_person .feed_item.user,.questionnaire.questionnaire_5 .added_person .feed_item.user{width:100%;padding:12px 16px}.questionnaire.questionnaire_4 .added_person .feed_item.user .item_desc,.questionnaire.questionnaire_5 .added_person .feed_item.user .item_desc{width:100%;display:flex;flex-wrap:wrap;justify-content:space-between;font-weight:400;font-size:15px;line-height:24px;color:#8E94A7}.questionnaire.questionnaire_4 .added_person .feed_item.user div,.questionnaire.questionnaire_5 .added_person .feed_item.user div{width:100%}.questionnaire.questionnaire_4 .action,.questionnaire.questionnaire_5 .action{display:flex;justify-content:space-between}.questionnaire.questionnaire_4 .action button[type="sumbit"],.questionnaire.questionnaire_5 .action button[type="sumbit"]{margin-left:auto}.questionnaire.questionnaire_8 .feed>p{padding-left:28px}.questionnaire.questionnaire_8 .feed_list .checkbox,.questionnaire.questionnaire_8 .feed_list .checkbox label{width:100%}.questionnaire.questionnaire_8 .feed_item.user{width:100%;padding:12px 16px}.questionnaire.questionnaire_8 .feed_item.user .item_desc{width:100%;display:flex;flex-wrap:wrap;justify-content:space-between;font-weight:400;font-size:15px;line-height:24px;color:#8E94A7}.questionnaire.questionnaire_8 .feed_item.user div{width:100%}.questionnaire.status_action{max-width:850px;padding:0 0 0 40px;display:inline-block;padding-bottom:20px;border-bottom:1px solid var(--inactive)}@media all and (max-width:1024px){.questionnaire.status_action{padding:0}}.questionnaire.message{display:flex;align-items:center;gap:0 16px;padding:16px;background-color:var(--inactive);margin:20px 0;margin-left:-30px}@media all and (max-width:1024px){.questionnaire.message{margin-left:0}}.questionnaire.message p{color:#000;margin:0}.questionnaire.message p b{display:block;font-weight:700}.questionnaire.message svg{min-width:44px}.questionnaire.message svg path{fill:#000}.questionnaire.message.error{background:#ED0A34}.questionnaire.message.error p{color:#fff}.questionnaire.message.error svg path{fill:#fff}.questionnaire.message.moderate{background:#8E94A7;margin-left:0}.questionnaire.message.moderate p{color:#fff}.questionnaire.message.moderate svg path{fill:#fff}.questionnaire.message.success{background:#5FB158;margin-left:0}.questionnaire.message.success p{color:#fff}.questionnaire.message.success svg path{fill:#fff}/*# sourceMappingURL=./style.css.map */ \ No newline at end of file +#filter { + position: relative; +} +#filter .container { + position: relative; +} +#filter.filter_in_catalog:not(.visible) { + display: none; +} +#filter.filter_in_catalog .container { + padding-top: 0; + padding-bottom: 0; + margin-bottom: 40px; +} +@media all and (max-width: 1420px) { + #filter.filter_in_catalog .container { + margin-left: 0; + margin-right: 0; + width: 100%; + } + #filter.filter_in_catalog .container .filter_header .button { + bottom: 10px; + } +} +@media all and (max-width: 768px) { + #filter.filter_in_catalog .container { + bottom: 40px; + } +} +#filter .filter_header { + display: flex; + align-items: center; + justify-content: space-between; + margin-bottom: 40px; +} +#filter .filter_header .button { + width: calc(33.333% - 21px); +} +@media all and (max-width: 1279px) { + #filter .filter_header .button { + width: calc(50% - 15px); + position: absolute; + right: 0; + bottom: 90px; + } +} +@media all and (max-width: 1280px) { + #filter .filter_header .button { + bottom: 50px; + } +} +@media all and (max-width: 768px) { + #filter .filter_header .button { + width: 100%; + bottom: 60px; + } +} +#filter .filter_body { + display: flex; + flex-wrap: wrap; + justify-content: space-between; +} +#filter .filter_body .filter_column { + width: calc(33.333% - 21px); +} +@media all and (max-width: 1279px) { + #filter .filter_body .filter_column { + width: calc(50% - 15px); + margin-bottom: 35px; + } + #filter .filter_body .filter_column:nth-child(3) { + margin-bottom: 0; + } +} +@media all and (max-width: 768px) { + #filter .filter_body .filter_column { + width: 100%; + margin-bottom: 24px; + } + #filter .filter_body .filter_column:last-child { + margin-bottom: 100px; + } +} +#filter .filter_body .form_field { + width: 100%; + margin-bottom: 10px; +} +#filter .filter_body .fieldgroup { + width: 100%; +} +#filter .filter_body .fieldgroup .form_field { + width: calc(50% - 20px); +} +@media all and (max-width: 768px) { + #filter .filter_body .fieldgroup .form_field { + width: calc(50% - 4px); + } +} +#catalog_small_filter { + margin-bottom: 40px; +} +#catalog_small_filter.hidden { + display: none; +} +#catalog_small_filter .filter_body { + display: flex; + justify-content: flex-end; +} +#catalog_small_filter .filter_body select { + margin-right: 30px; + width: 306px; +} +#catalog_small_filter .filter_body button { + width: 220px; +} +@media all and (max-width: 1280px) { + #catalog_small_filter .filter_body { + justify-content: space-between; + } + #catalog_small_filter .filter_body .form_field { + width: calc(33.333% - 30px); + } + #catalog_small_filter .filter_body .form_field select { + width: 100%; + } + #catalog_small_filter .filter_body button { + width: 33.3333%; + } +} +@media all and (max-width: 768px) { + #catalog_small_filter .filter_body { + display: block; + } + #catalog_small_filter .filter_body .form_field, + #catalog_small_filter .filter_body button { + width: 100%; + margin-bottom: 8px; + } +} +#order .order_form { + position: relative; + margin: 0; +} +@media all and (max-width: 960px) { + #order .order_form { + margin-top: -60px; + } +} +@media all and (max-width: 768px) { + #order .order_form { + margin: 0; + } +} +#order .order_form .order_email { + display: flex; + align-items: center; + position: absolute; + z-index: 1; + background: #EDEFF5; + height: 235px; + left: 0; + right: 0; + top: 0; + bottom: 0; + margin: auto; +} +#order .order_form .order_email p { + width: 320px; + font-size: 24px; + line-height: 45px; + padding: 0 20px; +} +@media all and (max-width: 1280px) { + #order .order_form .order_email p { + width: 220px; + font-size: 13px; + line-height: 20px; + } +} +@media all and (max-width: 768px) { + #order .order_form .order_email { + position: relative; + height: auto; + margin-bottom: 25px; + } + #order .order_form .order_email p { + padding: 0; + } +} +#order .order_form form { + width: 750px; + background: var(--blue); + box-sizing: border-box; + padding: 55px 90px; + margin: auto; + margin-left: 390px; + position: relative; + z-index: 2; +} +@media all and (max-width: 1420px) { + #order .order_form form { + width: 550px; + margin-left: 320px; + } +} +@media all and (max-width: 960px) { + #order .order_form form { + width: 50%; + padding: 15px 25px; + margin-left: 285px; + } +} +@media all and (max-width: 768px) { + #order .order_form form { + width: auto; + margin-left: -16px; + margin-right: -16px; + padding: 25px 16px; + } +} +#order .order_form form input { + margin-bottom: 15px; + background: rgba(255, 255, 255, 0.2); + color: #fff; +} +#order .order_form form input::placeholder { + color: #fff; +} +@media all and (max-width: 1280px) { + #order .order_form form input { + margin-bottom: 15px; + } +} +#order .order_form form .policy { + position: relative; + z-index: 2; + margin: 5px 25px 45px 25px; +} +@media all and (max-width: 1280px) { + #order .order_form form .policy { + margin-top: -5px; + margin-bottom: 25px; + margin-left: 0; + margin-right: 0; + } +} +#order .order_form form .policy label { + color: #fff; + font-weight: 300; +} +#order .order_form form .policy label:before { + background: #fff; + border-radius: 0; +} +#order .order_form form .policy input:checked + label:before { + border-color: #fff; + background: url("/assets/images/icons/checkbox_blue.svg") no-repeat center #fff; +} +#order .order_form form .button { + display: inherit; + margin-left: auto; +} +.login { + max-width: 610px; +} +.login .login_with { + display: flex; + align-items: center; + margin-bottom: 50px; + justify-content: flex-start; +} +.login .login_with p { + margin-right: 20px; +} +.login .login_with .tabs .tab { + margin-right: 0; +} +.login .login_with .tabs .tab:not(.active) { + background-color: var(--inactive); +} +.login .button-group { + display: flex; + align-items: center; + justify-content: flex-end; +} +.login .button-group .button { + margin-left: 30px; + display: flex; +} +.login .button-group .button:first-child { + width: auto; +} +.login .form_field { + margin-bottom: 15px; +} +.login .form_field.error { + margin-bottom: 25px; +} +.login input[name="login"] { + padding-left: 32px; + background: url("/assets/images/icons/icon-login.svg") no-repeat 8px 50%; +} +.login input[name="pass"] { + padding-left: 32px; + background: url("/assets/images/icons/icon-pass.svg") no-repeat 8px 50%; +} +.login .button { + width: 90px; + display: block; + margin-left: auto; +} +@media all and (max-width: 960px) { + .login { + max-width: 440px; + } + .login form { + max-width: 400px; + } +} +@media all and (max-width: 768px) { + .login .login_with { + display: block; + margin-bottom: 30px; + } + .login .login_with p { + margin-bottom: 10px; + } + .login .login_with .tabs { + width: 100%; + } + .login .login_with .tabs .tab { + width: 50%; + text-align: center; + } + .login .button-group { + flex-wrap: wrap; + justify-content: center; + } + .login .button-group .button { + margin-left: 0; + } + .login .button-group button { + order: 1; + width: 100%; + } + .login .button-group a { + order: 2; + display: inline-flex; + } +} +.login.recovery { + max-width: 815px; +} +.login.recovery p.full { + width: 100%; +} +.login.recovery .message { + margin-bottom: 15px; +} +.login.recovery form { + display: flex; + justify-content: space-between; +} +.login.recovery form .form_field { + width: calc(100% - 205px); +} +.login.recovery form .button { + width: 175px; +} +.login.recovery form.newPass_form { + flex-wrap: wrap; +} +.login.recovery .resend { + display: flex; + align-items: center; + justify-content: flex-start; +} +.login.recovery .resend p { + margin-right: 30px; +} +.login.recovery .resend .button { + margin-left: 0; + width: auto; +} +@media all and (max-width: 960px) { + .login.recovery form { + max-width: 100%; + } +} +@media all and (max-width: 768px) { + .login.recovery form { + display: block; + } + .login.recovery form .form_field, + .login.recovery form .button { + width: 100%; + } + .login.recovery .resend { + display: block; + text-align: center; + margin-top: 15px; + } + .login.recovery .resend p { + margin-right: 0; + } + .login.recovery .resend .button { + margin-left: auto; + margin-right: auto; + } +} +.contract_search { + margin-bottom: 40px; +} +@media all and (max-width: 1600px) and (min-width: 1280px) { + .contract_search { + margin-bottom: 30px; + } +} +.contract_search form { + display: flex; + align-items: center; + justify-content: space-between; +} +.contract_search form .form_field.full { + width: 100% !important; + margin-right: 30px !important; +} +@media all and (max-width: 960px) { + .contract_search form .form_field.full { + margin-right: 0 !important; + } +} +.contract_search form .form_field:first-child { + width: calc(50% - 15px); + min-width: calc(50% - 15px); + margin-right: 15px; +} +.contract_search form .form_field:nth-child(2), +.contract_search form .form_field:nth-child(3) { + width: 100%; + margin-right: 15px; +} +.contract_search form .form_field.single { + width: 100%; + margin-right: 80px; +} +.contract_search form .form_field .button { + width: 158px; + min-width: 158px; +} +@media all and (max-width: 768px) { + .contract_search form .form_field .button { + display: none; + } +} +.contract_search form .form_field input + label { + display: none; +} +@media all and (max-width: 960px) { + .contract_search { + margin-bottom: 20px; + } + .contract_search form { + flex-wrap: wrap; + justify-content: flex-start; + } + .contract_search form .form_field:first-child { + margin-bottom: 15px; + width: 100%; + } + .contract_search form .form_field:first-child.single { + width: calc(100% - 105px); + margin-right: 30px; + margin-bottom: 0; + } + .contract_search form .form_field:nth-child(2), + .contract_search form .form_field:nth-child(3) { + width: 25%; + margin-right: 30px; + } + .contract_search form .button { + margin-left: auto; + } +} +@media all and (max-width: 768px) { + .contract_search form { + justify-content: space-between; + } + .contract_search form .form_field { + margin-right: 0; + } + .contract_search form .form_field:first-child { + margin-right: 0; + margin-bottom: 15px; + width: 100%; + } + .contract_search form .form_field:first-child.single { + width: 100%; + margin-right: 0px; + } + .contract_search form .form_field:nth-child(2), + .contract_search form .form_field:nth-child(3) { + width: calc(50% - 4px); + margin-right: 0px; + } + .contract_search form .form_field .date_input, + .contract_search form .form_field input[type="date"] { + height: 55px; + background-position: 8px 14px; + position: relative; + padding-bottom: 8px; + } + .contract_search form .form_field .date_input::placeholder, + .contract_search form .form_field input[type="date"]::placeholder { + color: transparent; + } + .contract_search form .form_field .date_input[value=""] + label, + .contract_search form .form_field input[type="date"][value=""] + label { + display: inline-block; + position: absolute; + left: 32px; + top: 10px; + z-index: 2; + font-size: 13px; + line-height: 20px; + color: #919399; + } + .contract_search form .button { + margin-left: auto; + width: 100%; + margin-top: 15px; + background: var(--blue); + color: #fff; + display: none; + } + .contract_search form .button:disabled { + opacity: 0.48; + } +} +.reconciliation_form:not(.small) { + margin-bottom: 35px; + display: flex; + flex-wrap: wrap; + justify-content: space-between; +} +.reconciliation_form:not(.small) p { + width: 100%; + font-weight: 700; + margin-bottom: 20px; +} +.reconciliation_form:not(.small) .form_group { + width: calc(65% - 8px); + display: flex; + flex-wrap: wrap; + justify-content: space-between; +} +.reconciliation_form:not(.small) .form_group:last-child { + width: calc(35% - 8px); +} +.reconciliation_form:not(.small) .form_field { + width: calc(50% - 8px); +} +.reconciliation_form:not(.small) .button { + width: calc(40% - 8px); +} +.reconciliation_form:not(.small) .button:last-child { + width: calc(60% - 8px); +} +@media all and (max-width: 1279px) { + .reconciliation_form:not(.small) .form_group, + .reconciliation_form:not(.small) .form_group:last-child { + width: calc(50% - 8px); + } +} +@media all and (max-width: 768px) { + .reconciliation_form:not(.small) p { + margin-bottom: 8px; + } + .reconciliation_form:not(.small) .form_group, + .reconciliation_form:not(.small) .form_group:last-child { + width: 100%; + } + .reconciliation_form:not(.small) .form_field { + margin-bottom: 15px; + } + .reconciliation_form:not(.small) .button, + .reconciliation_form:not(.small) .form_field { + width: calc(50% - 4px); + } + .reconciliation_form:not(.small) .button:last-child, + .reconciliation_form:not(.small) .form_field:last-child { + width: calc(50% - 4px); + } +} +.reconciliation_form.small { + display: flex; + flex-wrap: wrap; + justify-content: space-between; + max-width: 420px; +} +@media all and (max-width: 768px) { + .reconciliation_form.small { + max-width: 100%; + } +} +.reconciliation_form.small .form_field { + width: calc(50% - 8px); +} +@media all and (max-width: 768px) { + .reconciliation_form.small .form_field { + width: calc(50% - 4px); + } +} +.reconciliation_form.small .form_field .date_input_wrapper > .rw-widget .rw-widget-container { + display: block; +} +.reconciliation_form.small .form_field .date_input_wrapper > .rw-widget .rw-widget-container > button { + margin: 0; + width: 100%; +} +.reconciliation_form.small button.button { + margin-top: 35px; + width: calc(45% - 8px); +} +.reconciliation_form.small button.button:last-child { + width: calc(55% - 8px); +} +@media all and (max-width: 768px) { + .reconciliation_form.small button.button { + width: calc(50% - 4px) !important; + margin-top: 15px; + } +} +.fade { + position: fixed; + z-index: 99999; + top: 0; + left: 0; + width: 100%; + height: 100%; + overflow: auto; + background: rgba(0, 0, 0, 0.5); + display: block; +} +.fade:not(.opened) { + display: none; +} +.fade .modal { + max-width: 700px; + width: 100%; + background: #fff; + margin: 100px auto; + padding: 45px 40px; +} +.fade .modal .modal_footer { + text-align: right; + margin-top: 30px; +} +.fade .modal .modal_footer .button { + margin-left: auto; +} +@media all and (max-width: 768px) { + .fade .modal { + padding: 25px 20px; + margin: 0; + } +} +.reconciliation_form.small { + display: flex; + flex-wrap: wrap; + justify-content: space-between; + max-width: 420px; +} +.reconciliation_form.small .form_field { + width: calc(50% - 8px); +} +@media all and (max-width: 768px) { + .reconciliation_form.small .form_field { + width: calc(50% - 4px); + } +} +.reconciliation_form.small button.button { + margin-top: 15px; + width: calc(45% - 8px); +} +.reconciliation_form.small button.button:last-child { + width: calc(55% - 8px); +} +@media all and (max-width: 768px) { + .reconciliation_form.small button.button { + width: calc(50% - 4px); + } +} +.fade { + position: fixed; + z-index: 99999; + top: 0; + left: 0; + width: 100%; + height: 100%; + overflow: auto; + background: rgba(0, 0, 0, 0.5); + display: block; +} +.fade:not(.opened) { + display: none; +} +.fade .modal { + max-width: 700px; + width: 100%; + background: #fff; + margin: 100px auto; + padding: 45px 40px; +} +.fade .modal .modal_footer { + text-align: right; + margin-top: 30px; +} +.fade .modal .modal_footer .button { + margin-left: auto; +} +.settings_user_control { + display: flex; + align-items: center; + justify-content: space-between; + margin-bottom: 45px; +} +.settings_user_control p { + font-weight: 700; +} +.settings_user_control div { + display: flex; + align-items: center; + gap: 0 7px; +} +@media all and (max-width: 1279px) { + .settings_user_control p { + width: 160px; + margin-right: 16px; + min-width: 160px; + } + .settings_user_control div { + width: 100%; + } + .settings_user_control div button:first-child { + width: 60%; + } + .settings_user_control div button:last-child { + width: 40%; + } +} +@media all and (max-width: 768px) { + .settings_user_control { + display: block; + margin-bottom: 35px; + width: 100%; + } + .settings_user_control p { + width: 100%; + } + .settings_user_control div { + display: block; + } + .settings_user_control div button { + width: 100% !important; + margin-top: 16px; + } +} +.settings_table { + display: table; + border-collapse: collapse; + width: 100%; +} +@media all and (max-width: 1279px) { + .settings_table { + display: block; + } +} +.settings_table .table_row { + display: table-row; +} +@media all and (max-width: 1279px) { + .settings_table .table_row { + display: block; + padding-bottom: 16px; + margin-bottom: 16px; + border-bottom: 1px solid #EDEFF5; + padding-left: 55px; + background: url("../../public/assets/images/icons/user.svg") no-repeat top left; + position: relative; + } +} +@media all and (max-width: 768px) { + .settings_table .table_row { + padding-left: 0; + background: transparent; + } +} +.settings_table .table_row .table_cell { + display: table-cell; + padding: 18px 12px; + border: 1px solid #EDEFF5; + position: relative; +} +.settings_table .table_row .table_cell.delete { + position: static; +} +@media all and (max-width: 1279px) { + .settings_table .table_row .table_cell { + display: flex; + flex-wrap: wrap; + border: 0; + font-size: 13px; + line-height: 20px; + padding: 0; + margin-bottom: 4px; + } + .settings_table .table_row .table_cell:before { + content: attr(data-title); + color: #8E94A7; + font-weight: 700; + display: block; + width: 190px; + padding-right: 10px; + } +} +@media all and (max-width: 768px) { + .settings_table .table_row .table_cell:before { + width: 100%; + margin-bottom: 2px; + } +} +.settings_table .table_row .table_cell:last-child { + border-left: 0; + min-width: 36px; +} +.settings_table .table_row .table_cell:last-child button { + position: absolute; + width: 16px; + height: 16px; + padding: 0; + top: 0; + left: 0; + right: 0; + bottom: 0; + margin: auto; + visibility: hidden; + pointer-events: none; + background: url("../../public/assets/images/icons/icon-delete.svg") no-repeat center; +} +@media all and (max-width: 1279px) { + .settings_table .table_row .table_cell:last-child:before { + border: 0; + } + .settings_table .table_row .table_cell:last-child button { + bottom: auto; + left: auto; + width: 32px; + height: 32px; + background: url("../../public/assets/images/icons/Trash.svg") no-repeat center; + font-size: 0; + text-indent: -999px; + overflow: hidden; + } +} +@media all and (max-width: 768px) { + .settings_table .table_row .table_cell:last-child button { + /*background: transparent;*/ + text-indent: 0; + font-weight: 600; + font-size: 15px; + line-height: 20px; + color: #A8026B; + width: 140px; + position: relative; + } +} +.settings_table .table_row .table_cell:nth-last-child(2) { + border-right: 0; +} +.settings_table .table_row .table_cell input { + border: 0; + outline: none; + background: #fff; + font-size: 15px; + padding: 0; +} +.settings_table .table_row .table_cell input::placeholder { + color: var(--text_not_active); + font-size: 15px; +} +@media all and (max-width: 1279px) { + .settings_table .table_row .table_cell input { + padding: 0 12px; + border: 1px solid rgba(0, 16, 61, 0.12); + height: 40px; + max-width: 320px; + width: 100%; + box-sizing: border-box; + } +} +@media all and (max-width: 768px) { + .settings_table .table_row .table_cell input { + max-width: none; + width: 100%; + } +} +.settings_table .table_row .table_cell .settings_dropdown { + font-family: 'Montserrat', sans-serif; + cursor: pointer; + width: 100%; + text-align: left; + font-weight: 400; + justify-content: flex-start; + font-size: 15px; + line-height: 20px; + color: #0C0C0C; + padding: 0; + background: url(/assets/images/icons/company-arrow.svg) no-repeat 100% 50%; +} +.settings_table .table_row .table_cell .settings_dropdown[data-selected="false"] { + color: var(--text_not_active); +} +@media all and (max-width: 1279px) { + .settings_table .table_row .table_cell .settings_dropdown { + border: 1px solid rgba(0, 16, 61, 0.12); + padding: 0 10px; + background-position: calc(100% - 10px) 50%; + width: calc(100% - 200px); + max-width: 320px; + } +} +@media all and (max-width: 768px) { + .settings_table .table_row .table_cell .settings_dropdown { + max-width: none; + width: 100%; + } +} +.settings_table .table_row .table_cell .dropdown_list { + position: absolute; + top: 100%; + left: 0; + width: 412px; + display: none; + background: #FFFFFF; + box-shadow: 0px 4px 32px rgba(0, 0, 0, 0.16); + padding: 25px 35px; + z-index: 9; +} +@media all and (max-width: 1279px) { + .settings_table .table_row .table_cell .dropdown_list { + left: 200px; + } +} +@media all and (max-width: 768px) { + .settings_table .table_row .table_cell .dropdown_list { + left: 0; + right: 0; + width: 100%; + padding: 16px; + } +} +.settings_table .table_row .table_cell .dropdown_list.opened { + display: block; +} +.settings_table .table_row .table_cell .dropdown_list .list_item { + position: relative; + padding-bottom: 16px; + margin-bottom: 16px; + border-bottom: 1px solid var(--inactive); +} +.settings_table .table_row .table_cell .dropdown_list .list_item label { + font-weight: 700; + padding-left: 0; + padding-right: 30px; + line-height: 23px; +} +.settings_table .table_row .table_cell .dropdown_list .list_item label:before { + right: 0; + left: auto; +} +.settings_table .table_row .table_cell .dropdown_list .list_item label span { + display: block; + font-weight: 400; +} +.settings_table .table_row .table_cell .dropdown_list .list_item:last-child { + border: 0; + padding-bottom: 0; + margin-bottom: 0; +} +.settings_table .table_row.table_header .table_cell { + color: #8E94A7; + font-weight: 700; + border: 0; +} +.settings_table .table_row.table_header .table_cell:last-child { + border-left: 0 !important; +} +@media all and (max-width: 1279px) { + .settings_table .table_row.table_header { + display: none; + } +} +.settings_table.editable .table_row.editable .table_cell { + margin-bottom: 8px; +} +.settings_table.editable .table_row .table_cell:last-child { + border: 1px solid #EDEFF5; +} +@media all and (max-width: 1279px) { + .settings_table.editable .table_row .table_cell:last-child { + border: 0; + } +} +.settings_table.editable .table_row .table_cell:last-child button { + pointer-events: all; + visibility: visible; +} +.new_appeal form .form_field { + margin-bottom: 14px; +} +.new_appeal form textarea { + height: 208px; +} +.dropzone { + height: 208px; + position: relative; + border: 1px dashed #1C01A9; + border-radius: 4px; + background: rgba(28, 1, 169, 0.1); + text-align: center; + display: flex; + align-items: center; + justify-content: center; + margin-top: 30px; +} +.dropzone .files { + width: 100%; + padding: 16px; +} +.dropzone .files:empty { + display: none; +} +.dropzone label.blue { + color: var(--blue); + display: block; +} +.dropzone [type="file"] { + cursor: pointer; + position: absolute; + opacity: 0; + top: 0; + right: 0; + bottom: 0; + left: 0; +} +.dropzone div { + max-width: 404px; + text-align: center; +} +.dropzone div p { + color: #828282; + margin-bottom: 20px; +} +@media all and (max-width: 768px) { + .dropzone { + border: 0; + background: transparent; + height: auto; + } + .dropzone div p { + margin-bottom: 10px; + } + .dropzone div p:before { + content: attr(data-sm-text); + display: block; + } + .dropzone div p span { + display: none; + } +} +/* questionnaire */ +.questionnaire:not(:last-child) { + margin-bottom: 50px; +} +.questionnaire.disabled input, +.questionnaire.disabled select, +.questionnaire.disabled textarea { + cursor: default; + background: #fff; + pointer-events: none; +} +.questionnaire .title { + font-weight: 700; + font-size: 15px; + line-height: 23px; + color: #000; + margin-bottom: 16px; + padding-bottom: 16px; + margin-top: 0; + border-bottom: 1px solid var(--inactive); + margin-left: -30px; + padding-left: 30px; +} +@media all and (max-width: 1280px) { + .questionnaire .title { + margin-left: 0; + padding-left: 0; + } +} +.questionnaire small { + display: block; + color: #8E94A7; + font-size: 11px; + line-height: 15px; + font-weight: 400; + margin-top: 4px; +} +.questionnaire > p { + margin: 15px 0; +} +.questionnaire textarea { + resize: none; +} +.questionnaire .formgroup { + display: flex; + flex-wrap: wrap; + justify-content: space-between; +} +.questionnaire .formgroup .form_field { + width: calc(50% - 12px); +} +@media all and (max-width: 1024px) { + .questionnaire .formgroup .form_field { + width: 100%; + } +} +.questionnaire .form_field { + display: flex; + align-items: center; + flex-wrap: wrap; + margin-bottom: 30px; + width: 100%; +} +@media all and (max-width: 1024px) { + .questionnaire .form_field { + margin-bottom: 15px; + } + .questionnaire .form_field.picker div { + width: 100% !important; + } + .questionnaire .form_field.picker input[type="date"] { + width: 100% !important; + } + .questionnaire .form_field.picker .checkbox { + margin-left: 0 !important; + } +} +.questionnaire .form_field.bg { + padding: 8px 0; + align-items: flex-start; + background: rgba(28, 1, 169, 0.1); +} +@media all and (max-width: 1024px) { + .questionnaire .form_field.bg { + padding: 8px; + } +} +.questionnaire .form_field.checkbox { + margin: 8px 0; + width: 100%; +} +.questionnaire .form_field.checkbox label { + width: auto; + display: flex; + align-items: center; +} +@media all and (max-width: 1024px) { + .questionnaire .form_field.checkbox label { + flex-wrap: wrap; + } +} +.questionnaire .form_field.checkbox label::before { + top: 0; + bottom: 0; + margin: auto; +} +.questionnaire .form_field.checkbox label input { + margin-left: 12px; + width: 100%; + background: var(--inactive); + cursor: default; +} +.questionnaire .form_field.checkbox label span { + white-space: pre-line; + white-space: nowrap; +} +@media all and (max-width: 1024px) { + .questionnaire .form_field.checkbox label span { + white-space: unset; + } + .questionnaire .form_field.checkbox label span + input { + margin-left: 0; + margin-top: 10px; + } +} +.questionnaire .form_field.checkbox input:checked + label input { + background: #fff; + cursor: text; +} +.questionnaire .form_field label { + width: 186px; + margin-right: 12px; +} +@media all and (max-width: 1024px) { + .questionnaire .form_field label { + width: 100%; + margin-right: 0; + margin-bottom: 8px; + } +} +.questionnaire .form_field label a { + text-decoration: underline; +} +.questionnaire .form_field textarea, +.questionnaire .form_field input:not(.rw-input), +.questionnaire .form_field select, +.questionnaire .form_field .autocomlete { + width: calc(100% - 198px); +} +@media all and (max-width: 1024px) { + .questionnaire .form_field textarea, + .questionnaire .form_field input:not(.rw-input), + .questionnaire .form_field select, + .questionnaire .form_field .autocomlete { + width: 100%; + } +} +.questionnaire .form_field textarea[type="date"], +.questionnaire .form_field input:not(.rw-input)[type="date"], +.questionnaire .form_field select[type="date"], +.questionnaire .form_field .autocomlete[type="date"] { + width: 245px; +} +.questionnaire .form_field textarea + p, +.questionnaire .form_field input:not(.rw-input) + p, +.questionnaire .form_field select + p, +.questionnaire .form_field .autocomlete + p { + font-size: 11px; + line-height: 15px; + margin-left: 198px; + margin-top: 2px; +} +@media all and (max-width: 1024px) { + .questionnaire .form_field textarea + p, + .questionnaire .form_field input:not(.rw-input) + p, + .questionnaire .form_field select + p, + .questionnaire .form_field .autocomlete + p { + margin-left: 0; + } +} +.questionnaire .action { + text-align: right; + margin-top: 40px; +} +.questionnaire ul { + margin: 20px 0; + padding-left: 20px; + list-style: disc; + font-size: 14px; + line-height: 29px; +} +.questionnaire ul li:not(:last-child) { + margin-bottom: 8px; +} +@media all and (max-width: 1024px) { + .questionnaire .dropzone { + width: 100% !important; + max-width: 360px; + margin-left: auto; + margin-right: auto; + } +} +.questionnaire .feed .feed_list { + margin-right: 0; + max-width: 800px; +} +.questionnaire .autocomlete * { + outline: none; + box-shadow: none !important; +} +.questionnaire .autocomlete .react-select__control { + border-radius: 0; + border: 1px solid rgba(0, 16, 61, 0.12); + height: 40px; + min-height: 40px; +} +.questionnaire .autocomlete .react-select__control.react-select__control--menu-is-open { + border-color: var(--blue); +} +.questionnaire .autocomlete .react-select__control .react-select__value-container { + padding: 0 12px; + height: 100%; + background: #fff; +} +.questionnaire .autocomlete .react-select__control .react-select__value-container .react-select__input-container { + margin: 0; + padding: 0; +} +.questionnaire .autocomlete .react-select__control .react-select__indicators { + display: none; +} +.questionnaire .autocomlete .react-select__menu { + border-radius: 0; + border-width: 0px 1px 1px 1px; + border-style: solid; + border-color: rgba(0, 16, 61, 0.12); + border-radius: 0px 0px 4px 4px; + margin-top: 0; + top: 40px; + padding: 8px 12px; +} +.questionnaire .autocomlete .react-select__menu .react-select__option { + color: #8E94A7; + font-size: 15px; + line-height: 24px; + background: transparent !important; + cursor: pointer; + padding: 0; +} +.questionnaire .autocomlete .react-select__menu .react-select__option:not(:last-child) { + margin-bottom: 8px; +} +.questionnaire .autocomlete .react-select__menu .react-select__option:hover { + color: #000; +} +.questionnaire .autocomlete .react-select__menu .react-select__option.react-select__option--is-selected { + color: var(--blue); +} +@media all and (max-width: 960px) { + .questionnaire .autocomlete .react-select__menu .react-select__option { + font-size: 13px; + line-height: 20px; + } +} +.questionnaire.questionnaire_4 .form_field label, +.questionnaire.questionnaire_5 .form_field label { + width: calc(50% - 12px); + font-weight: 700; +} +@media all and (max-width: 1024px) { + .questionnaire.questionnaire_4 .form_field label, + .questionnaire.questionnaire_5 .form_field label { + width: 100%; + } +} +.questionnaire.questionnaire_4 .form_field.checkbox label, +.questionnaire.questionnaire_5 .form_field.checkbox label { + font-weight: 400; +} +.questionnaire.questionnaire_4 .form_field textarea, +.questionnaire.questionnaire_5 .form_field textarea, +.questionnaire.questionnaire_4 .form_field input, +.questionnaire.questionnaire_5 .form_field input, +.questionnaire.questionnaire_4 .form_field select, +.questionnaire.questionnaire_5 .form_field select { + width: 50%; +} +@media all and (max-width: 1024px) { + .questionnaire.questionnaire_4 .form_field textarea, + .questionnaire.questionnaire_5 .form_field textarea, + .questionnaire.questionnaire_4 .form_field input, + .questionnaire.questionnaire_5 .form_field input, + .questionnaire.questionnaire_4 .form_field select, + .questionnaire.questionnaire_5 .form_field select { + width: 100%; + } +} +.questionnaire.questionnaire_4 .form_field .form_field, +.questionnaire.questionnaire_5 .form_field .form_field { + margin-bottom: 0; +} +.questionnaire.questionnaire_4 .form_field .formgroup, +.questionnaire.questionnaire_5 .form_field .formgroup { + gap: 0 12px; + width: 50%; +} +@media all and (max-width: 1024px) { + .questionnaire.questionnaire_4 .form_field .formgroup, + .questionnaire.questionnaire_5 .form_field .formgroup { + width: 100%; + } +} +.questionnaire.questionnaire_4 .form_field .formgroup .form_field, +.questionnaire.questionnaire_5 .form_field .formgroup .form_field { + width: calc(50% - 6px); +} +.questionnaire.questionnaire_4 .form_field .formgroup .form_field textarea, +.questionnaire.questionnaire_5 .form_field .formgroup .form_field textarea, +.questionnaire.questionnaire_4 .form_field .formgroup .form_field input, +.questionnaire.questionnaire_5 .form_field .formgroup .form_field input { + width: 100%; +} +.questionnaire.questionnaire_4 .form_field .formgroup .form_field.checkbox, +.questionnaire.questionnaire_5 .form_field .formgroup .form_field.checkbox { + width: 100%; +} +.questionnaire.questionnaire_4 .form_field .formgroup.control .form_field, +.questionnaire.questionnaire_5 .form_field .formgroup.control .form_field { + width: calc(100% - 42px); +} +.questionnaire.questionnaire_4 .form_field .formgroup.control .form_field label, +.questionnaire.questionnaire_5 .form_field .formgroup.control .form_field label { + width: 100%; +} +.questionnaire.questionnaire_4 .form_field .formgroup.control .delete, +.questionnaire.questionnaire_5 .form_field .formgroup.control .delete { + width: 30px; + height: 30px; + padding: 0; + display: flex; + align-items: center; + justify-content: center; +} +.questionnaire.questionnaire_4 .added_person, +.questionnaire.questionnaire_5 .added_person { + border-top: 1px solid var(--inactive); + margin-top: 30px; + padding-top: 30px; +} +.questionnaire.questionnaire_4 .added_person .feed_list .checkbox, +.questionnaire.questionnaire_5 .added_person .feed_list .checkbox, +.questionnaire.questionnaire_4 .added_person .feed_list .checkbox label, +.questionnaire.questionnaire_5 .added_person .feed_list .checkbox label { + width: 100%; +} +.questionnaire.questionnaire_4 .added_person .feed_item.user, +.questionnaire.questionnaire_5 .added_person .feed_item.user { + width: 100%; + padding: 12px 16px; +} +.questionnaire.questionnaire_4 .added_person .feed_item.user .item_desc, +.questionnaire.questionnaire_5 .added_person .feed_item.user .item_desc { + width: 100%; + display: flex; + flex-wrap: wrap; + justify-content: space-between; + font-weight: 400; + font-size: 15px; + line-height: 24px; + /* identical to box height, or 160% */ + /* text not active */ + color: #8E94A7; +} +.questionnaire.questionnaire_4 .added_person .feed_item.user div, +.questionnaire.questionnaire_5 .added_person .feed_item.user div { + width: 100%; +} +.questionnaire.questionnaire_4 .action, +.questionnaire.questionnaire_5 .action { + display: flex; + justify-content: space-between; +} +.questionnaire.questionnaire_4 .action button[type="sumbit"], +.questionnaire.questionnaire_5 .action button[type="sumbit"] { + margin-left: auto; +} +.questionnaire.questionnaire_8 .feed > p { + padding-left: 28px; +} +.questionnaire.questionnaire_8 .feed_list .checkbox, +.questionnaire.questionnaire_8 .feed_list .checkbox label { + width: 100%; +} +.questionnaire.questionnaire_8 .feed_item.user { + width: 100%; + padding: 12px 16px; +} +.questionnaire.questionnaire_8 .feed_item.user .item_desc { + width: 100%; + display: flex; + flex-wrap: wrap; + justify-content: space-between; + font-weight: 400; + font-size: 15px; + line-height: 24px; + /* identical to box height, or 160% */ + /* text not active */ + color: #8E94A7; +} +.questionnaire.questionnaire_8 .feed_item.user div { + width: 100%; +} +.questionnaire.status_action { + max-width: 850px; + padding: 0 0 0 40px; + display: inline-block; + padding-bottom: 20px; + border-bottom: 1px solid var(--inactive); +} +@media all and (max-width: 1024px) { + .questionnaire.status_action { + padding: 0; + } +} +.questionnaire.message { + display: flex; + align-items: center; + gap: 0 16px; + padding: 16px; + background-color: var(--inactive); + margin: 20px 0; + margin-left: -30px; +} +@media all and (max-width: 1024px) { + .questionnaire.message { + margin-left: 0; + } +} +.questionnaire.message p { + color: #000; + margin: 0; +} +.questionnaire.message p b { + display: block; + font-weight: 700; +} +.questionnaire.message svg { + min-width: 44px; +} +.questionnaire.message svg path { + fill: #000; +} +.questionnaire.message.error { + background: #ED0A34; +} +.questionnaire.message.error p { + color: #fff; +} +.questionnaire.message.error svg path { + fill: #fff; +} +.questionnaire.message.moderate { + background: #8E94A7; + margin-left: 0; +} +.questionnaire.message.moderate p { + color: #fff; +} +.questionnaire.message.moderate svg path { + fill: #fff; +} +.questionnaire.message.success { + background: #5FB158; + margin-left: 0; +} +.questionnaire.message.success p { + color: #fff; +} +.questionnaire.message.success svg path { + fill: #fff; +} diff --git a/css/forms/style.less b/css/forms/style.less index 6179d1a..e66023e 100644 --- a/css/forms/style.less +++ b/css/forms/style.less @@ -1457,7 +1457,7 @@ width: ~"calc(100% - 198px)"; &[value=""] { - background-color: #EDEFF5; + //background-color: #EDEFF5; } @media all and (max-width: 1024px) { @@ -1536,7 +1536,7 @@ background: #fff; &:not(.react-select__value-container--has-value) { - background-color: #EDEFF5; + //background-color: #EDEFF5; } .react-select__input-container { diff --git a/css/var.css b/css/var.css index 7cf17bc..5d5d342 100644 --- a/css/var.css +++ b/css/var.css @@ -1 +1,569 @@ -:root{--blue:#1C01A9;--blue-secondary:#85B2FC;--gray:#2C2D2E;--gray-light:rgba(0,16,61,0.06);--primary:#005FF9;--primary-light:rgba(0,95,249,0.1);--red:#ED0A34;--inactive:#EDEFF5;--green:#04A8A4;--text_not_active:#8E94A7}body{font-size:15px;line-height:20px;color:#0C0C0C;font-family:'Montserrat',sans-serif;font-weight:400;overflow-x:hidden;width:100%}@media all and (max-width:1600px) and (min-width:1280px){body{font-size:13px;line-height:20px}}@media all and (max-width:960px){body{font-size:13px;line-height:20px}}.overflow{overflow:hidden}@media all and (max-width:960px){.overflow{overflow:unset}}@media all and (max-width:960px){#__next{overflow:hidden}}.container{padding-top:80px;width:100%;max-width:1310px;margin:auto;position:relative;padding-bottom:140px;margin-bottom:40px}.container:after{content:"";display:block;position:absolute;top:0;left:0;right:-4px;bottom:0;z-index:-1}@media all and (max-width:1600px) and (min-width:1280px){.container{padding-top:40px}}@media all and (max-width:1279px){.container{padding-top:30px}}@media all and (max-width:960px){.container{padding-top:30px;padding-bottom:20px}}@media all and (max-width:1420px){.container{width:calc(100% - 160px);margin:0 80px 30px 80px}}@media all and (max-width:768px){.container{margin:0 16px 16px 16px;width:calc(100% - 32px)}}.aside_container{display:flex;justify-content:space-between;position:relative}@media all and (min-width:1280px){.aside_container:before{content:"";display:block;position:absolute;width:1px;top:-135px;left:0;bottom:0;z-index:3;background:var(--inactive)}}.aside_container aside{width:415px}@media all and (max-width:960px){.aside_container aside{width:100%}}.aside_container article{width:calc(100% - 550px)}.aside_container article:only-child{width:100%}.aside_container article .info_column{padding:20px 40px;display:flex;flex-wrap:wrap;justify-content:space-between;border-bottom:1px solid #EDEFF5}.aside_container article .info_column div{width:calc(50% - 55px)}@media all and (max-width:960px){.aside_container article .info_column{padding:0}.aside_container article .info_column div{width:100%}}@media all and (max-width:960px){.aside_container article{width:100%}.aside_container article .info_column{padding:25px 0}}.aside_container.about aside{width:255px;border-right:1px solid var(--inactive);padding-bottom:80px}@media all and (max-width:1600px) and (min-width:1280px){.aside_container.about aside{width:255px;padding-bottom:40px}}@media all and (max-width:1279px){.aside_container.about aside{border-right:0;padding-bottom:20px}}.aside_container.about article{width:calc(100% - 285px);padding-bottom:80px}.aside_container.about article.full{width:100%}@media all and (max-width:1600px) and (min-width:1280px){.aside_container.about article{width:calc(100% - 295px);padding-bottom:40px}}@media all and (max-width:960px){.aside_container.about article{padding-bottom:0px}}@media all and (max-width:1279px){.aside_container.about{display:block}.aside_container.about aside,.aside_container.about article{width:100%}.aside_container.about aside.flex{display:flex;align-items:center;flex-wrap:wrap}}.section_title{font-size:50px;line-height:60px;font-weight:700;color:#0C0C0C;margin-bottom:35px}.section_title.no-margin{margin-bottom:0}@media all and (max-width:1600px) and (min-width:1280px){.section_title{font-size:36px;line-height:48px}}@media all and (max-width:1279px){.section_title{font-size:32px;line-height:44px}}@media all and (max-width:960px){.section_title{font-size:22px;line-height:33px}}@media all and (max-width:768px){.section_title{margin-bottom:25px}}h1{font-size:32px;line-height:40px}h2{font-size:24px;line-height:28px;margin-top:1.5em;margin-bottom:10px}@media all and (max-width:1600px) and (min-width:1280px){h2{font-size:22px;line-height:26px}}h2.model{font-size:26px;line-height:35px;color:var(--text_not_active);margin-top:0;margin-bottom:0}@media all and (max-width:768px){h2.model{font-size:19px;line-height:26px}}h2:first-child{margin-top:0}h3{font-size:17px;line-height:24px;margin-top:1.5em;margin-bottom:10px}h3:first-child{margin-top:0}h4{font-size:15px;line-height:20px;margin-top:1.5em;margin-bottom:10px}h4:first-child{margin-top:0}.secondary{font-size:13px;line-height:20px}.secondary.not_active{color:#8E94A7}@media all and (max-width:960px){.secondary{font-size:10px;line-height:15px}}b,strong{font-weight:700}p.primary{color:var(--blue)}a{text-decoration:none;color:var(--blue)}div{box-sizing:border-box}.clear{display:block;clear:both}@media all and (max-width:736px){h1{font-size:24px;line-height:32px}h2{font-size:20px;line-height:24px}}.i-phone{padding-left:28px;background:url("/assets/images/icons/icon-phone-hot.svg") no-repeat 0 2px}.i-phone-secondary{padding-left:28px;background:url("/assets/images/icons/icon-phone-secondary.svg") no-repeat 0 2px}.i-address{padding-left:28px;background:url("/assets/images/icons/icon-address.svg") no-repeat 0 2px}.i-worktime{padding-left:28px;background:url("/assets/images/icons/icon-worktime.svg") no-repeat 0 2px}.i-pdf{padding-left:80px;background:url("/assets/images/icons/icon-pdf.svg") no-repeat left center}.i-pdf[data-format]{background:url("/assets/images/icons/icon-file.svg") no-repeat left center;position:relative}.i-pdf[data-format]:before{content:attr(data-format);color:#fff;font-weight:700;position:absolute;left:3px;right:1px;bottom:1px;top:0;font-size:11px;width:27px;display:flex;align-content:center;justify-content:center;align-items:center;text-transform:uppercase;word-break:break-all}@media all and (max-width:1600px) and (min-width:1280px){.i-pdf[data-format]{padding-left:56px;background-size:42px}.i-pdf[data-format]:before{width:27px;font-size:8px}}@media all and (max-width:960px){.i-pdf[data-format]{padding-left:55px;background-size:32px;background-position:0 5px}.i-pdf[data-format]:before{font-size:8px;width:31px;height:42px;left:0;right:0}}@media all and (max-width:1600px) and (min-width:1280px){.i-pdf{padding-left:56px;background-size:42px}}@media all and (max-width:960px){.i-pdf{padding-left:55px;background-size:32px;background-position:0 5px}}.extension[data-format]{background:url("/assets/images/icons/icon-file.svg") no-repeat left center;position:relative}.extension[data-format]:before{content:attr(data-format);color:#fff;font-weight:700;position:absolute;left:10px;right:1px;bottom:1px;top:0;font-size:10px;width:35px;display:flex;align-content:center;justify-content:center;align-items:center;text-transform:uppercase;word-break:break-all}@media all and (max-width:1600px) and (min-width:1280px){.extension[data-format]{padding-left:56px;background-size:42px}.extension[data-format]:before{width:27px;font-size:8px;left:8px}}@media all and (max-width:960px){.extension[data-format]{padding-left:42px;background-size:32px;background-position:0 5px}.extension[data-format]:before{font-size:7px;width:24px;height:42px;line-height:11px;text-align:center;left:4px;right:5px}}.medium-icon [data-format]:before{line-height:1.2;text-align:center;padding:2px 8px 0 8px;box-sizing:border-box;font-weight:600;font-size:7px;left:0;width:34px}@media all and (max-width:1600px){.medium-icon [data-format]:before{width:32px}}.i-doc{padding-left:80px;background:url("/assets/images/icons/icon-doc.svg") no-repeat left center;background-size:56px}@media all and (max-width:1600px) and (min-width:1280px){.i-doc{padding-left:56px;background-size:42px}}@media all and (max-width:960px){.i-doc{padding-left:55px;background-size:32px;background-position:0 5px}}.success{color:var(--green)}.danger{color:var(--red)}@media all and (max-width:768px){::-webkit-scrollbar{display:none}}.avans{display:flex;justify-content:flex-start;margin-bottom:80px}.avans p{font-weight:700;font-size:15px;line-height:23px;color:#000;padding-bottom:0px}@media all and (max-width:1280px){.avans p{font-size:14px;padding-bottom:10px}}@media all and (max-width:1279px){.avans{margin-bottom:30px}.avans p{font-size:13px;line-height:20px}}.rw-calendar-btn-view{font-weight:bold;font-size:12px !important}@media all and (max-width:768px){.rw-calendar-btn-view{font-size:12px !important;line-height:20px}}@media (max-width:1600px) and (min-width:1280px){.rw-calendar-btn-view{font-size:12px !important;line-height:20px}}.interactive{cursor:pointer}.unselectable{user-select:none;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}/*# sourceMappingURL=./var.css.map */ \ No newline at end of file +:root { + --blue: #1C01A9; + --blue-secondary: #85B2FC; + --gray: #2C2D2E; + --gray-light: rgba(0, 16, 61, 0.06); + --primary: #005FF9; + --primary-light: rgba(0, 95, 249, 0.1); + --red: #ED0A34; + --inactive: #EDEFF5; + --green: #04A8A4; + --text_not_active: #8E94A7; +} +html { + /* + @media all and (max-width: 1420px) and (min-width: 1280px) { + zoom: 0.7; + + .container, .bx-breadcrumb { + margin-left: auto; + margin-right: auto; + } + } + */ +} +body { + font-size: 15px; + line-height: 20px; + color: #0C0C0C; + font-family: 'Montserrat', sans-serif; + font-weight: 400; + overflow-x: hidden; + width: 100%; +} +@media all and (max-width: 1600px) and (min-width: 1280px) { + body { + font-size: 13px; + line-height: 20px; + } +} +@media all and (max-width: 960px) { + body { + font-size: 13px; + line-height: 20px; + } +} +.overflow { + overflow: hidden; +} +@media all and (max-width: 960px) { + .overflow { + overflow: unset; + } +} +@media all and (max-width: 960px) { + #__next { + overflow: hidden; + } +} +.container { + padding-top: 80px; + width: 100%; + max-width: 1310px; + margin: auto; + position: relative; + padding-bottom: 140px; + margin-bottom: 40px; +} +.container:after { + content: ""; + display: block; + position: absolute; + top: 0; + left: 0; + right: -4px; + bottom: 0; + z-index: -1; + /* + background: repeating-linear-gradient( + 90deg, + #fff, + #EDEFF5 1px, + transparent 0px, + transparent 25%); + background: repeating-linear-gradient(to right, transparent 1px, transparent calc(25% - 1px), #EDEFF5 25%, #EDEFF5 25%); + */ +} +@media all and (max-width: 1600px) and (min-width: 1280px) { + .container { + padding-top: 40px; + } +} +@media all and (max-width: 1279px) { + .container { + padding-top: 30px; + } +} +@media all and (max-width: 960px) { + .container { + padding-top: 30px; + padding-bottom: 20px; + } +} +@media all and (max-width: 1420px) { + .container { + width: calc(100% - 160px); + margin: 0 80px 30px 80px; + } +} +@media all and (max-width: 768px) { + .container { + margin: 0 16px 16px 16px; + width: calc(100% - 32px); + } +} +.aside_container { + display: flex; + justify-content: space-between; + position: relative; +} +@media all and (min-width: 1280px) { + .aside_container:before { + content: ""; + display: block; + position: absolute; + width: 1px; + top: -135px; + left: 0; + bottom: 0; + z-index: 3; + background: var(--inactive); + } +} +.aside_container aside { + width: 415px; +} +@media all and (max-width: 960px) { + .aside_container aside { + width: 100%; + } +} +.aside_container article { + width: calc(100% - 550px); +} +.aside_container article:only-child { + width: 100%; +} +.aside_container article .info_column { + padding: 20px 40px; + display: flex; + flex-wrap: wrap; + justify-content: space-between; + border-bottom: 1px solid #EDEFF5; +} +.aside_container article .info_column div { + width: calc(50% - 55px); +} +@media all and (max-width: 960px) { + .aside_container article .info_column { + padding: 0; + } + .aside_container article .info_column div { + width: 100%; + } +} +@media all and (max-width: 960px) { + .aside_container article { + width: 100%; + } + .aside_container article .info_column { + padding: 25px 0; + } +} +.aside_container.about aside { + width: 255px; + border-right: 1px solid var(--inactive); + padding-bottom: 80px; +} +@media all and (max-width: 1600px) and (min-width: 1280px) { + .aside_container.about aside { + width: 255px; + padding-bottom: 40px; + } +} +@media all and (max-width: 1279px) { + .aside_container.about aside { + border-right: 0; + padding-bottom: 20px; + } +} +.aside_container.about article { + width: calc(100% - 285px); + padding-bottom: 80px; +} +.aside_container.about article.full { + width: 100%; +} +@media all and (max-width: 1600px) and (min-width: 1280px) { + .aside_container.about article { + width: calc(100% - 295px); + padding-bottom: 40px; + } +} +@media all and (max-width: 960px) { + .aside_container.about article { + padding-bottom: 0px; + } +} +@media all and (max-width: 1279px) { + .aside_container.about { + display: block; + } + .aside_container.about aside, + .aside_container.about article { + width: 100%; + } + .aside_container.about aside.flex { + display: flex; + align-items: center; + flex-wrap: wrap; + } +} +.section_title { + font-size: 50px; + line-height: 60px; + font-weight: 700; + color: #0C0C0C; + margin-bottom: 35px; +} +.section_title.no-margin { + margin-bottom: 0; +} +@media all and (max-width: 1600px) and (min-width: 1280px) { + .section_title { + font-size: 36px; + line-height: 48px; + } +} +@media all and (max-width: 1279px) { + .section_title { + font-size: 32px; + line-height: 44px; + } +} +@media all and (max-width: 960px) { + .section_title { + font-size: 22px; + line-height: 33px; + } +} +@media all and (max-width: 768px) { + .section_title { + margin-bottom: 25px; + } +} +h1 { + font-size: 32px; + line-height: 40px; +} +h2 { + font-size: 24px; + line-height: 28px; + margin-top: 1.5em; + margin-bottom: 10px; +} +@media all and (max-width: 1600px) and (min-width: 1280px) { + h2 { + font-size: 22px; + line-height: 26px; + } +} +h2.model { + font-size: 26px; + line-height: 35px; + color: var(--text_not_active); + margin-top: 0; + margin-bottom: 0; +} +@media all and (max-width: 768px) { + h2.model { + font-size: 19px; + line-height: 26px; + } +} +h2:first-child { + margin-top: 0; +} +h3 { + font-size: 17px; + line-height: 24px; + margin-top: 1.5em; + margin-bottom: 10px; +} +h3:first-child { + margin-top: 0; +} +h4 { + font-size: 15px; + line-height: 20px; + margin-top: 1.5em; + margin-bottom: 10px; +} +h4:first-child { + margin-top: 0; +} +.secondary { + font-size: 13px; + line-height: 20px; +} +.secondary.not_active { + color: #8E94A7; +} +@media all and (max-width: 960px) { + .secondary { + font-size: 10px; + line-height: 15px; + } +} +b, +strong { + font-weight: 700; +} +p.primary { + color: var(--blue); +} +a { + text-decoration: none; + color: var(--blue); +} +div { + box-sizing: border-box; +} +.clear { + display: block; + clear: both; +} +@media all and (max-width: 736px) { + h1 { + font-size: 24px; + line-height: 32px; + } + h2 { + font-size: 20px; + line-height: 24px; + } +} +.i-phone { + padding-left: 28px; + background: url("/assets/images/icons/icon-phone-hot.svg") no-repeat 0 2px; +} +.i-phone-secondary { + padding-left: 28px; + background: url("/assets/images/icons/icon-phone-secondary.svg") no-repeat 0 2px; +} +.i-address { + padding-left: 28px; + background: url("/assets/images/icons/icon-address.svg") no-repeat 0 2px; +} +.i-worktime { + padding-left: 28px; + background: url("/assets/images/icons/icon-worktime.svg") no-repeat 0 2px; +} +.i-pdf { + padding-left: 80px; + background: url("/assets/images/icons/icon-pdf.svg") no-repeat left center; +} +.i-pdf[data-format] { + background: url("/assets/images/icons/icon-file.svg") no-repeat left center; + position: relative; +} +.i-pdf[data-format]:before { + content: attr(data-format); + color: #fff; + font-weight: 700; + position: absolute; + left: 3px; + right: 1px; + bottom: 1px; + top: 0; + font-size: 11px; + width: 27px; + display: flex; + align-content: center; + justify-content: center; + align-items: center; + text-transform: uppercase; + word-break: break-all; +} +@media all and (max-width: 1600px) and (min-width: 1280px) { + .i-pdf[data-format] { + padding-left: 56px; + background-size: 42px; + } + .i-pdf[data-format]:before { + width: 27px; + font-size: 8px; + } +} +@media all and (max-width: 960px) { + .i-pdf[data-format] { + padding-left: 55px; + background-size: 32px; + background-position: 0 5px; + } + .i-pdf[data-format]:before { + font-size: 8px; + width: 31px; + height: 42px; + left: 0; + right: 0; + } +} +@media all and (max-width: 1600px) and (min-width: 1280px) { + .i-pdf { + padding-left: 56px; + background-size: 42px; + } +} +@media all and (max-width: 960px) { + .i-pdf { + padding-left: 55px; + background-size: 32px; + background-position: 0 5px; + } +} +.extension[data-format] { + background: url("/assets/images/icons/icon-file.svg") no-repeat left center; + position: relative; +} +.extension[data-format]:before { + content: attr(data-format); + color: #fff; + font-weight: 700; + position: absolute; + left: 10px; + right: 1px; + bottom: 1px; + top: 0; + font-size: 10px; + width: 35px; + display: flex; + align-content: center; + justify-content: center; + align-items: center; + text-transform: uppercase; + word-break: break-all; +} +@media all and (max-width: 1600px) and (min-width: 1280px) { + .extension[data-format] { + padding-left: 56px; + background-size: 42px; + } + .extension[data-format]:before { + width: 27px; + font-size: 8px; + left: 8px; + } +} +@media all and (max-width: 960px) { + .extension[data-format] { + padding-left: 42px; + background-size: 32px; + background-position: 0 5px; + } + .extension[data-format]:before { + font-size: 7px; + width: 24px; + height: 42px; + line-height: 11px; + text-align: center; + left: 4px; + right: 5px; + } +} +.medium-icon [data-format]:before { + line-height: 1.2; + text-align: center; + padding: 2px 8px 0 8px; + box-sizing: border-box; + font-weight: 600; + font-size: 7px; + left: 0; + width: 34px; +} +@media all and (max-width: 1600px) { + .medium-icon [data-format]:before { + width: 32px; + } +} +.i-doc { + padding-left: 80px; + background: url("/assets/images/icons/icon-doc.svg") no-repeat left center; + background-size: 56px; +} +@media all and (max-width: 1600px) and (min-width: 1280px) { + .i-doc { + padding-left: 56px; + background-size: 42px; + } +} +@media all and (max-width: 960px) { + .i-doc { + padding-left: 55px; + background-size: 32px; + background-position: 0 5px; + } +} +.success { + color: var(--green); +} +.danger { + color: var(--red); +} +@media all and (max-width: 768px) { + ::-webkit-scrollbar { + display: none; + } +} +.avans { + display: flex; + justify-content: flex-start; + margin-bottom: 80px; +} +.avans p { + font-weight: 700; + font-size: 15px; + line-height: 23px; + color: #000; + padding-bottom: 0px; +} +@media all and (max-width: 1280px) { + .avans p { + font-size: 14px; + padding-bottom: 10px; + } +} +@media all and (max-width: 1279px) { + .avans { + margin-bottom: 30px; + } + .avans p { + font-size: 13px; + line-height: 20px; + } +} +.rw-calendar-btn-view { + font-weight: bold; + font-size: 12px !important; +} +@media all and (max-width: 768px) { + .rw-calendar-btn-view { + font-size: 12px !important; + line-height: 20px; + } +} +@media (max-width: 1600px) and (min-width: 1280px) { + .rw-calendar-btn-view { + font-size: 12px !important; + line-height: 20px; + } +} +.interactive { + cursor: pointer; +} +.unselectable { + user-select: none; + -moz-user-select: none; + -webkit-user-select: none; + -ms-user-select: none; +} diff --git a/package.json b/package.json index 1540228..1313435 100644 --- a/package.json +++ b/package.json @@ -39,8 +39,9 @@ "react-dom": "17.0.2", "react-dropzone": "^14.2.2", "react-google-recaptcha-v3": "^1.10.0", + "react-no-ssr": "^1.1.0", "react-redux": "^7.2.6", - "react-select": "^5.7.1", + "react-select": "^5.7.2", "react-slick": "^0.29.0", "react-widgets": "^5.5.1", "redux": "^4.1.2", diff --git a/pages/api/questionnaire/get.js b/pages/api/questionnaire/get.js new file mode 100644 index 0000000..307767e --- /dev/null +++ b/pages/api/questionnaire/get.js @@ -0,0 +1,66 @@ +// Next.js API route support: https://nextjs.org/docs/api-routes/introduction +import axios from 'axios'; +import { Cookies } from 'react-cookie'; +import cookie from 'cookie'; +import moment from 'moment'; +import jwt from 'jsonwebtoken'; +import { cors } from '../../../lib/cors'; +import { inspect } from 'util'; + +export default async function handler(req, res) +{ + console.log("API", "questionnaire", "get"); + console.log(req.body); + console.log("-".repeat(50)); + await cors(req, res); + + if(req.headers.cookie !== undefined) + { + const cookies = cookie.parse(req.headers?.cookie ? req.headers?.cookie : ""); + + if(cookies.jwt !== undefined && cookies.jwt !== null) + { + console.log("cookies.jwt"); + console.log(cookies.jwt); + + 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 }); + + const path = `${ process.env.CRM_API_HOST }/lk/Questionnaire/InfoQuestionnaire/`; + + try + { + await axios.get(path, { + params: { name: 1 }, + headers: { + "Authorization": `Bearer ${ crm_jwt }`, + } + }) + .then((crm_response) => + { + console.log("crm_response for", path); + console.log(inspect(crm_response.data, true, null, true)); + + res.status(200).json(crm_response.data); + }) + .catch((error) => + { + console.error(error); + console.error("-".repeat(30), "error.response.data:"); + console.error(error.response.data); + + res.status(500).json(error.response.data); + }); + } + catch(e) + { + console.error(e); + res.status(500).send(e); + } + } + else + { + res.status(403); + } + } +} \ No newline at end of file diff --git a/pages/api/questionnaire/put.js b/pages/api/questionnaire/put.js new file mode 100644 index 0000000..e69de29 diff --git a/pages/api/suggests/address.js b/pages/api/suggests/address.js index 638ee13..79a92e0 100644 --- a/pages/api/suggests/address.js +++ b/pages/api/suggests/address.js @@ -1,4 +1,5 @@ // Next.js API route support: https://nextjs.org/docs/api-routes/introduction +import https from 'https'; import axios from 'axios'; import { Cookies } from 'react-cookie'; import cookie from 'cookie'; @@ -6,6 +7,8 @@ import moment from 'moment'; import jwt from 'jsonwebtoken'; import { cors } from '../../../lib/cors'; +const keepAliveAgent = new https.Agent({ keepAlive: true }); + export default async function handler(req, res) { await cors(req, res); @@ -20,15 +23,30 @@ export default async function handler(req, res) { try { - /* - dadata('address', ['мск сухонска 11/-89'], function (dadata_error, dadata_response) - { - console.log(dadata_error); - console.log(dadata_response); + const { query, } = req.body; - res.status(200).send(); + axios.post(`https://suggestions.dadata.ru/suggestions/api/4_1/rs/suggest/address`, { query }, { + httpAgent: keepAliveAgent, + headers: { + "Content-Type": "application/json", + "Authorization": `Token ${ process.env.DADATA_API_KEY }`, + "X-Secret": process.env.DADATA_SECRET_KEY + }, + }) + .then((api_response) => + { + //console.log("RESPONSE"); + //console.log(api_response.data); + + res.status(200).send(api_response.data); + }) + .catch((error) => + { + console.log("error"); + console.error(error); + + res.status(500); }); - */ } catch(e) { diff --git a/pages/components/DatePicker/index.js b/pages/components/DatePicker/index.js index 055231f..abf973c 100644 --- a/pages/components/DatePicker/index.js +++ b/pages/components/DatePicker/index.js @@ -21,7 +21,7 @@ export default class DateInput extends React.Component super(props); this.state = { readonly: true, - } + }; } _handle_onChange = (date) => @@ -56,18 +56,17 @@ export default class DateInput extends React.Component ) : ( <> - }} />
{ event.stopPropagation(); event.preventDefault(); } }/> @@ -80,18 +79,17 @@ export default class DateInput extends React.Component return (
{ return moment(str, 'DD.MM.YYYY').toDate(); } } + id={ id } placeholder={ placeholder } value={ value } min={ min } max={ max } onChange={ this._handle_onChange } - inputProps={{ - component: props => - }} />
) diff --git a/pages/questionnaire/components/InnerMenu/index.js b/pages/questionnaire/components/InnerMenu/index.js index 684d17f..002684d 100644 --- a/pages/questionnaire/components/InnerMenu/index.js +++ b/pages/questionnaire/components/InnerMenu/index.js @@ -2,6 +2,7 @@ import React from "react"; import Link from "next/link"; import { connect } from "react-redux"; import { getContractEvents, getContractFines, getContractInfo, } from "../../../../actions"; +import NoSSR from 'react-no-ssr'; class InnerMenu extends React.Component { @@ -56,53 +57,58 @@ class InnerMenu extends React.Component const { menuOpened, } = this.state; const { questionnaire } = this.props; + console.log("this.props.router.asPath", this.props.router.asPath); + return ( ) } diff --git a/pages/questionnaire/components/forms/AddressSuggestsSelect.js b/pages/questionnaire/components/forms/AddressSuggestsSelect.js new file mode 100644 index 0000000..61875c7 --- /dev/null +++ b/pages/questionnaire/components/forms/AddressSuggestsSelect.js @@ -0,0 +1,215 @@ +import React from "react"; +import Head from 'next/head'; +import Image from 'next/image'; +import Link from "next/link"; +import cookie from 'cookie'; +import { connect } from "react-redux"; +import numeral from "numeral"; +import pluralize from 'pluralize-ru'; +import { SpinnerCircular } from 'spinners-react'; +import { getAddress } from '../../../../actions'; +import debounce from 'debounce-promise'; +import { set as _set, get as _get } from 'lodash'; +import AsyncSelect from 'react-select/async'; + +const suggestsAddressDebounce = (text) => +{ + return getAddress(text); +} + +const suggestsAddress = debounce(suggestsAddressDebounce, 200); + +export default class AddressSuggestsSelect extends React.Component +{ + constructor(props) + { + super(props); + this.state = { + options: [], + fias: [], + value: "", + value_selected: "", + custom: false, + }; + } + + componentDidMount() + { + //console.log("AddressSuggestsSelect", this.props); + this.setState({ value: this.props.value, custom: this.props.value !== "" ? true : false }); + } + + componentDidUpdate(prevProps, prevState) + { + if(prevProps.value !== this.props.value) + { + //console.log("WTF"); + this.setState({ value: this.props.value }); + } + } + + _handle_onChange = (data) => + { + //console.log("_handle_onChange"); + const { fias } = this.state; + this.setState({ value_selected: data.value, value: data.value, custom: false, }, () => + { + this.props.onChange({ title: data.value, fias_id: fias[data.value] }); + }); + } + + _handle_onBlur = (data, action) => + { + const { value, value_selected } = this.state; + //console.log("_handle_onBlur", { value, value_selected }, { action }); + + //if(value_selected !== "") + //{ + // this.setState({ value_selected: "" }); + //} + //else + //{ + //console.log("this", value); + this.props.onChange({ title: value, fias_id: "" }); + //} + } + + _handle_onInputChange = (value, action) => + { + //console.log("_handle_onInputChange", { value }, action); + if (action.action !== "input-blur" && action.action !== "menu-close") + { + this.setState({ value }); + } + else + { + if(action.action === "input-blur" && action.prevInputValue !== "" && value === "") + { + this.setState({ value: action.prevInputValue, custom: true, }); + } + else + { + if(value === "" && action.prevInputValue === "") + { + this.setState({ value, value_selected: "", custom: false, }); + } + } + } + //this.setState({ value }); + } + + _getAddress = (text) => + { + return new Promise((resolve, reject) => + { + if(text === "") + { + this.setState({ options: [], fias: {}, value: "" }, () => + { + resolve([]); + }); + } + else + { + suggestsAddress(text) + .then((result) => + { + const options = []; + const fias = {}; + + for(let i in result.suggestions) + { + const s = result.suggestions[i]; + options.push({ value: s.value, label: s.value }); + fias[s.value] = s.data.fias_id; + } + + this.setState({ options, fias }, () => + { + resolve(options); + }); + }) + .catch(() => + { + + }); + } + }) + } + + render() + { + const { value, value_selected, custom, disabled } = this.state; + //console.log(">>>>>>>>>>|", value, "|", value_selected); + + if(custom) + { + //console.log("CUSTOM"); + return ( + null } + loadingMessage={ () => null } + loadOptions={ (text) => this._getAddress(text) } + onChange={ this._handle_onChange } + //onBlur={ this._handle_onBlur } + onInputChange={ this._handle_onInputChange } + isDisabled={ disabled ? true : false } + /> + ) + } + else + { + //console.log("SEARCH", value); + return ( + null } + loadingMessage={ () => null } + loadOptions={ (text) => this._getAddress(text) } + onChange={ this._handle_onChange } + //onBlur={ this._handle_onBlur } + onInputChange={ this._handle_onInputChange } + isDisabled={ disabled ? true : false } + /> + ) + } + /* + if(value_selected !== "") + { + console.log("22222222222222222"); + return ( + null } + loadingMessage={ () => null } + loadOptions={ (text) => this._getAddress(text) } + onChange={ this._handle_onChange } + //onBlur={ this._handle_onBlur } + onInputChange={ this._handle_onInputChange } + /> + ) + } + else + { + */ + + //} + } +} \ No newline at end of file diff --git a/pages/questionnaire/components/forms/FilesList.js b/pages/questionnaire/components/forms/FilesList.js index 186801c..c80e889 100644 --- a/pages/questionnaire/components/forms/FilesList.js +++ b/pages/questionnaire/components/forms/FilesList.js @@ -75,10 +75,10 @@ export default class FilesList extends React.Component
- - - - + + + +
diff --git a/pages/questionnaire/components/forms/Form_1_Main/index.js b/pages/questionnaire/components/forms/Form_1_Main/index.js index f9723fd..4385486 100644 --- a/pages/questionnaire/components/forms/Form_1_Main/index.js +++ b/pages/questionnaire/components/forms/Form_1_Main/index.js @@ -7,44 +7,36 @@ import { connect } from "react-redux"; import numeral from "numeral"; import pluralize from 'pluralize-ru'; import { SpinnerCircular } from 'spinners-react'; -import { getAddress } from '../../../../../actions'; -import debounce from 'debounce-promise'; +import QuestionnaireForm from "../QuestionnaireForm"; -const suggestsAddressDebounce = (text) => -{ - return getAddress(text); -} - -const suggestsAddress = debounce(suggestsAddressDebounce, 500); - -export default class Form_1_Main extends React.Component +export default class Form_1_Main extends QuestionnaireForm { constructor(props) { super(props); this.state = { - title: "", - inn: "", - kpp: "", - email: "", - telephone: "", - websiteurl: "", - financial_loan: "", - is_individual_executive: false, - individual_executive_inn: "", - individual_executive_kpp: "", - individual_executive_oop: "", - individual_executive_docnum: "", - individual_executive_docdate: "", - high_level: "", - board_of_directors: "", - collective_executive: "", - individual_executive: "", - other_control: "", - address: "", - phone_check_loading: false, - phone_number_format_error: false, - nko: false, + main: { + title: "", + inn: "", + kpp: "", + email: "", + telephone: "", + websiteurl: "", + financial_loan: "", + is_individual_executive: false, + individual_executive_inn: "", + individual_executive_kpp: "", + individual_executive_oop: "", + individual_executive_docnum: "", + individual_executive_docdate: "", + high_level: "", + board_of_directors: "", + collective_executive: "", + individual_executive: "", + other_control: "", + nko: false, + }, + loading: false, }; } @@ -60,6 +52,22 @@ export default class Form_1_Main extends React.Component { } + _checkDisabled = () => + { + const { main } = this.state; + const check = ["title", "inn", "kpp", "email", "telephone", "financial_loan"]; + + for(let i in check) + { + if(main[check[i]] === "") + { + return true; + } + } + + return false; + } + _handle_onPhoneSubmit = (event) => { event.preventDefault(); @@ -91,24 +99,6 @@ export default class Form_1_Main extends React.Component //} } - _handle_onTextFieldChange = (name, value) => - { - console.log("_handle_onTextFieldChange", name, value); - - const update = {}; - update[name] = value; - this.setState(update); - } - - _handle_onCheckboxFieldChange = (name, value) => - { - console.log("_handle_onCheckboxFieldChange", name, value); - - const update = {}; - update[name] = value; - this.setState(update); - } - _handle_onAddressChange = (value) => { this.setState({ address: value, }, () => @@ -150,7 +140,7 @@ export default class Form_1_Main extends React.Component render() { - const { title, inn, kpp, email, telephone, websiteurl, financial_loan, nko, phone_check_loading, phone_number_format_error } = this.state; + const { loading, main} = this.state; return ( @@ -159,42 +149,87 @@ export default class Form_1_Main extends React.Component
- this._handle_onTextFieldChange(event.target.name, event.target.value) } required={ true }/> + this._handle_onTextFieldChange(event.target.name, event.target.value) } + required={ true } + />
- this._handle_onTextFieldChange(event.target.name, event.target.value) } required={ true }/> + this._handle_onTextFieldChange(event.target.name, event.target.value) } + required={ true } + />
-
- this._handle_onTextFieldChange(event.target.name, event.target.value) } required={ true }/> + this._handle_onTextFieldChange(event.target.name, event.target.value) } + required={ true } + />
- this._handle_onTextFieldChange(event.target.name, event.target.value) } required={ true }/> + this._handle_onTextFieldChange(event.target.name, event.target.value) } + required={ true } + />
- this._handle_onTextFieldChange(event.target.name, event.target.value) } required={ true }/> + this._handle_onTextFieldChange(event.target.name, event.target.value) } + />
- this._handle_onTextFieldChange(event.target.name, event.target.value) } required={ true }/> + this._handle_onTextFieldChange(event.target.name, event.target.value) } + />

может использоваться для отправки лизингодателем юридически значимых сообщений в соответсвии с условиями договора лизинга, а так же для операций в электронном ПТС/ПСМ

- this._handle_onTextFieldChange(event.target.name, event.target.value) } required={ true }/> + this._handle_onTextFieldChange(event.target.name, event.target.value) } + />

сумма текущих ежемесячных платежей по действующим кредитам/договорам лизинга

@@ -202,19 +237,31 @@ export default class Form_1_Main extends React.Component
- this._handle_onCheckboxFieldChange(event.target.name, false) }/> - + this._handle_onCheckboxFieldChange(event.target.name, !main.nko ? true : false) } + /> +
- this._handle_onCheckboxFieldChange(event.target.name, true) }/> - + this._handle_onCheckboxFieldChange(event.target.name, !main.nko ? true : false) } + /> +
- diff --git a/pages/questionnaire/components/forms/Form_2_Contacts/index.js b/pages/questionnaire/components/forms/Form_2_Contacts/index.js index f04ad5d..4364527 100644 --- a/pages/questionnaire/components/forms/Form_2_Contacts/index.js +++ b/pages/questionnaire/components/forms/Form_2_Contacts/index.js @@ -9,6 +9,7 @@ import pluralize from 'pluralize-ru'; import Select from 'react-select' import { SpinnerCircular } from 'spinners-react'; import QuestionnaireForm from "../QuestionnaireForm"; +import AddressSuggestsSelect from "../AddressSuggestsSelect"; export default class Form_2_Contacts extends QuestionnaireForm { @@ -16,12 +17,23 @@ export default class Form_2_Contacts extends QuestionnaireForm { super(props); this.state = { - fact_address: "", - postal_address: "", address_type: "legal", address: "", phone_check_loading: false, phone_number_format_error: false, + + fact_address: { + name: "", + fias_id: "", + }, + legal_address: { + title: "", + fias_id: "", + }, + postal_address: { + name: "", + fias_id: "", + }, }; } @@ -65,13 +77,14 @@ export default class Form_2_Contacts extends QuestionnaireForm render() { - const { fact_address, postal_address, address_type, phone_check_loading, phone_number_format_error } = this.state; + const { address_type, fact_address, postal_address, phone_check_loading, phone_number_format_error } = this.state; const options = [ { value: 'Москва', label: 'Москва' }, { value: 'Казань', label: 'Казань' }, { value: 'Воронеж', label: 'Воронеж' } - ] + ] + return (
@@ -79,10 +92,18 @@ export default class Form_2_Contacts extends QuestionnaireForm
+ {/* this._handle_onTextFieldChange(event.target.name, event.target.value) } required={ true }/> + */} {/* this._handle_onAddressChange(event.target.value) } required={ true }/> */} + this._handle_onTextFieldChange("fact_address", data) } + /> + {/*} this._handle_onCheckboxFieldChange(event.target.name, event.target.value) }/> + this._handle_onCheckboxFieldChange(event.target.name, event.target.value) } + />
- this._handle_onCheckboxFieldChange(event.target.name, event.target.value) }/> + this._handle_onCheckboxFieldChange(event.target.name, event.target.value) } + />
- this._handle_onCheckboxFieldChange(event.target.name, event.target.value) }/> + this._handle_onCheckboxFieldChange(event.target.name, event.target.value) } + />
diff --git a/pages/questionnaire/components/forms/Form_3_Signer/index.js b/pages/questionnaire/components/forms/Form_3_Signer/index.js index f41fa09..01e099e 100644 --- a/pages/questionnaire/components/forms/Form_3_Signer/index.js +++ b/pages/questionnaire/components/forms/Form_3_Signer/index.js @@ -7,10 +7,15 @@ import { connect } from "react-redux"; import numeral from "numeral"; import pluralize from 'pluralize-ru'; import { SpinnerCircular } from 'spinners-react'; +import Select from 'react-select'; + import DateInput from '../../../../components/DatePicker'; import QuestionnaireForm from "../QuestionnaireForm"; import FilesList from "../FilesList"; import Modal from "../../../../components/Modal/modal"; +import countries from "../countries"; +import citizenships from "../citizenships"; +import AddressSuggestsSelect from "../AddressSuggestsSelect"; export default class Form_3_Signer extends QuestionnaireForm { @@ -60,7 +65,7 @@ export default class Form_3_Signer extends QuestionnaireForm placebirth: "", citizenship_code: "", registration_address: { - title: "", + title: "Армения Ереван", fias_id: "", } }, @@ -113,6 +118,8 @@ export default class Form_3_Signer extends QuestionnaireForm evo_indefinite: false, modal_show_personal_data: false, + head_person_registration_address_values: [], + signatory_person_address_values: [], }; } @@ -242,7 +249,7 @@ export default class Form_3_Signer extends QuestionnaireForm this._handle_onTextFieldChange("head_person.identity_document.issuedate", date) } required={ true } @@ -284,21 +291,46 @@ export default class Form_3_Signer extends QuestionnaireForm
- + this._handle_onTextFieldChange(event.target.name, event.target.value) } - required={ true } + required={ true } /> + {*/}
@@ -321,7 +353,7 @@ export default class Form_3_Signer extends QuestionnaireForm
this._handle_onTextFieldChange("head_person.evo_assignment_date", date) } required={ true } @@ -342,7 +374,7 @@ export default class Form_3_Signer extends QuestionnaireForm
this._handle_onTextFieldChange("head_person.evo_credentials_dateend", date) } required={ true } @@ -358,34 +390,6 @@ export default class Form_3_Signer extends QuestionnaireForm onRemoveFile={ this._handle_onRemoveFile } /> - {/*} - -
- - { head_person_files.map((file, index) => ( -
-
-

№ 01/20/2020 (.PDF)Постановление

-
-
- )) } -
-
-
- - - - - - - -
- -
- -
- {*/} -
this._handle_onTextFieldChange("main.individual_executive_docdate", date) } required={ true } @@ -573,7 +577,7 @@ export default class Form_3_Signer extends QuestionnaireForm id="signatory_person.identity_document.issuedate" name="signatory_person.identity_document.issuedate" value={ signatory_person.identity_document.issuedate } - placeholder="Введите дату" + placeholder="ДД.ММ.ГГГГ" onChange={ (event) => this._handle_onTextFieldChange(event.target.name, event.target.value) } required={ true } /> @@ -618,14 +622,29 @@ export default class Form_3_Signer extends QuestionnaireForm
- + this._handle_onTextFieldChange(event.target.name, event.target.value) } required={ true } /> + {*/}
diff --git a/pages/questionnaire/components/forms/Form_4_Shareholders/index.js b/pages/questionnaire/components/forms/Form_4_Shareholders/index.js index 6ac71b1..c8ba08e 100644 --- a/pages/questionnaire/components/forms/Form_4_Shareholders/index.js +++ b/pages/questionnaire/components/forms/Form_4_Shareholders/index.js @@ -3,13 +3,343 @@ import Head from 'next/head'; import Image from 'next/image'; import Link from "next/link"; import cookie from 'cookie'; -import { connect } from "react-redux"; import numeral from "numeral"; import pluralize from 'pluralize-ru'; import { SpinnerCircular } from 'spinners-react'; -import DateInput from '../../../../components/DatePicker'; +import Select from 'react-select'; +import { connect } from "react-redux"; +import { withRouter } from 'next/router'; -export default class Form_4_Shareholders extends React.Component +import { reduxWrapper } from '../../../../../store'; +import DateInput from '../../../../components/DatePicker'; +import QuestionnaireForm from "../QuestionnaireForm"; +import citizenships from "../citizenships"; +import AddressSuggestsSelect from "../AddressSuggestsSelect"; + +class ShareholderForm extends React.Component +{ + _handle_onTextFieldChange = this.props._handle_onTextFieldChange; + _handle_onCheckboxFieldChange = this.props._handle_onCheckboxFieldChange; + + render() + { + const { index, shareholder } = this.props; + console.log({ index, shareholder }); + + let citizenship = undefined; + if(shareholder.identity_document.citizenship_code !== "") + { + for(let i in citizenships) + { + if(parseInt(citizenships[i].value, 10) === parseInt(shareholder.identity_document.citizenship_code, 10)) + { + citizenship = citizenships[i]; + } + } + } + + return ( + +
+ + this._handle_onTextFieldChange(event.target.name, event.target.value) } + required={ true } + /> +
+ +
+ + this._handle_onTextFieldChange(event.target.name, event.target.value) } + required={ true } + /> +
+ +
+ + this._handle_onTextFieldChange(event.target.name, event.target.value) } + required={ true } + /> +
+ +
+
+ +
+
+ this._handle_onTextFieldChange(event.target.name, event.target.value) } + required={ true } + /> +
+
+ this._handle_onTextFieldChange(event.target.name, event.target.value) } + required={ true } + /> +
+
+
+
+ +
+
+ +
+
+ this._handle_onTextFieldChange(`founded_persons[${ index }].identity_document.issuedate`, date) } + required={ true } + /> +
+
+ this._handle_onTextFieldChange(event.target.name, event.target.value) } + required={ true } + /> +
+
+
+
+ +
+ + this._handle_onTextFieldChange(event.target.name, event.target.value) } + required={ true } + /> +
+ +
+ + this._handle_onTextFieldChange(`founded_persons[${ index }].identity_document.placebirth`, data.title) } + /> +
+ +
+ + this._handle_onCheckboxFieldChange(event.target.name, !shareholder.founder_from_list ? true : false) } + /> + +
+ + + +
+
+ ) } + + { index > 0 ? ( + + { shareholder.founder_from_list ? ( +
+
+
+ + +
+ +
+ + +
+ +
+ + +
+
+
+ ) : ( + + ) } +
+ ) : ( + + ) } + +
+ + this._handle_onTextFieldChange(event.target.name, event.target.value) } + required={ true } + /> +
+ +
+ +
+
+ this._handle_onCheckboxFieldChange(event.target.name, parseInt(event.target.value, 10)) } + /> + +
+
+ this._handle_onCheckboxFieldChange(event.target.name, parseInt(event.target.value, 10)) } + /> + +
+
+
+
+ + + ) + } +} + +class Form_4_Shareholders extends QuestionnaireForm { constructor(props) { @@ -18,32 +348,68 @@ export default class Form_4_Shareholders extends React.Component address: "", phone_check_loading: false, phone_number_format_error: false, + + founded_persons: [], + founded_persons_template: {}, }; } static getDerivedStateFromProps(nextProps, prevState) { return { - observer: nextProps.observer, - user: nextProps.user, + founded_persons: nextProps.founded_persons, + founded_persons_template: nextProps.founded_persons_template, }; } componentDidMount() { + const { founded_persons_template } = this.state; + + if(this.state.founded_persons.length === 0) + { + this._updateQuestionnaire({ + founded_persons: [{ ...founded_persons_template }], + }); + } + } + + _handle_onAddShareholder = () => + { + const founded_persons = [ ...this.state.founded_persons ]; + const { founded_persons_template } = this.state; + + if(founded_persons.length < 4) + { + console.log("TEMPLATE", founded_persons_template); + console.log("founded_persons BEFORE PUSH", founded_persons); + founded_persons.push({ ...founded_persons_template }); + console.log("founded_persons AFTER PUSH", founded_persons); + + this._updateQuestionnaire({ + founded_persons, + }); + } + } + + _handle_onRemoveShareholder = (index) => + { + console.log("_handle_onRemoveShareholder", index); + const founded_persons = [ ...this.state.founded_persons ]; + + console.log("founded_persons", founded_persons); + + founded_persons.splice(index, 1); + console.log("founded_persons AFTER SPLICE", founded_persons); + + this._updateQuestionnaire({ + founded_persons, + }); } _handle_onFormSubmit = (event) => { event.preventDefault(); - console.log("FormAddress", "_handle_onFormSubmit"); - } - - _handle_onAddressChange = (value) => - { - this.setState({ address: value, }, () => - { - }); } _check_fields_disabled = (values) => @@ -61,7 +427,7 @@ export default class Form_4_Shareholders extends React.Component render() { - const { address, phone_check_loading, phone_number_format_error } = this.state; + const { founded_persons, phone_check_loading, address, phone_number_format_error } = this.state; return ( @@ -74,207 +440,44 @@ export default class Form_4_Shareholders extends React.Component полагать, что бенефициарным владельцем является иное физическое лицо. В случае, если бенефициарным владельцем являются несколько человек, сведения предоставляются в отношении каждого.

-
- - this._handle_onAddressChange(event.target.value) } required={ true }/> -
- -
- - this._handle_onAddressChange(event.target.value) } required={ true }/> -
- -
- - this._handle_onAddressChange(event.target.value) } required={ true }/> -
- -
- - this._handle_onAddressChange(event.target.value) } required={ true }/> -
- -
-
- -
-
- this._handle_onAddressChange(event.target.value) } required={ true }/> -
-
- this._handle_onAddressChange(event.target.value) } required={ true }/> -
-
-
-
- -
-
- -
-
- this._handle_onAddressChange(event.target.value) } required={ true }/> -
-
- this._handle_onAddressChange(event.target.value) } required={ true }/> -
-
-
-
- -
- - this._handle_onAddressChange(event.target.value) } required={ true }/> -
- -
- - this._handle_onAddressChange(event.target.value) } required={ true }/> -
- -
- - -
- -
- - this._handle_onAddressChange(event.target.value) } required={ true }/> -
- -
- - this._handle_onAddressChange(event.target.value) } required={ true }/> -
- -
- - -
-
- - -
- -
- - -
-
-
- - -
-
- - -
-
- - -
- - -
-
- -
-
-
- - -
- -
- - -
- -
- - -
-
-
- -
- - this._handle_onAddressChange(event.target.value) } required={ true }/> -
- -
- - -
-
- - -
- -
- - -
-
-
-
- + { founded_persons.map((shareholder, index) => ( + + )) }
- +
) } -} \ No newline at end of file +} + +function mapStateToProps(state, ownProps) +{ + return { + founded_persons: state.questionnaire.founded_persons, + founded_persons_template: state.questionnaire.founded_persons_template, + } +} + +export const getServerSideProps = reduxWrapper.getServerSideProps(store => + async ({ req, res, query }) => + { + } +); + +export default connect(mapStateToProps)(Form_4_Shareholders); \ No newline at end of file diff --git a/pages/questionnaire/components/forms/QuestionnaireForm.js b/pages/questionnaire/components/forms/QuestionnaireForm.js index 963da25..a8d9654 100644 --- a/pages/questionnaire/components/forms/QuestionnaireForm.js +++ b/pages/questionnaire/components/forms/QuestionnaireForm.js @@ -3,23 +3,71 @@ import Head from 'next/head'; import Image from 'next/image'; import Link from "next/link"; import cookie from 'cookie'; -import { connect } from "react-redux"; import numeral from "numeral"; import pluralize from 'pluralize-ru'; import { SpinnerCircular } from 'spinners-react'; -import { getAddress } from '../../../../actions'; import debounce from 'debounce-promise'; import { set as _set, get as _get } from 'lodash'; +import { updateQuestionnaire, getAddress } from "../../../../actions"; + const suggestsAddressDebounce = (text) => { return getAddress(text); } -const suggestsAddress = debounce(suggestsAddressDebounce, 500); +const suggestsAddress = debounce(suggestsAddressDebounce, 200); + +/* +const getAddress = (inputValue) => { + return + new Promise((resolve) => { + setTimeout(() => { + resolve(filterColors(inputValue)); + }, 1000); + }); +} +*/ export default class QuestionnaireForm extends React.Component { + _updateQuestionnaire = (questionnaire) => + { + return new Promise((resolve, reject) => + { + updateQuestionnaire({ dispatch: this.props.dispatch, questionnaire }) + .then(() => + { + resolve(); + }) + .catch(() => + { + + }); + }); + } + + _getAddress = (name, text) => + { + return new Promise((resolve, reject) => + { + suggestsAddress(text) + .then((result) => + { + const update = {}; + update[name] = result.suggestions; + this.setState(update, () => + { + resolve(result.suggestions.map(s => ({ value: s.value, label: s.value }))); + }); + }) + .catch(() => + { + + }); + }) + } + _handle_onTextFieldChange = (name, value) => { console.log("QuestionnaireForm", "_handle_onTextFieldChange", { name, value }); diff --git a/pages/questionnaire/components/forms/citizenships.js b/pages/questionnaire/components/forms/citizenships.js new file mode 100644 index 0000000..0675058 --- /dev/null +++ b/pages/questionnaire/components/forms/citizenships.js @@ -0,0 +1,255 @@ +export default [ + { value: "004", label: "АФГАНИСТАН" }, + { value: "008", label: "АЛБАНИЯ" }, + { value: "010", label: "АНТАРКТИДА" }, + { value: "012", label: "АЛЖИР" }, + { value: "016", label: "АМЕРИКАНСКОЕ САМОА" }, + { value: "020", label: "АНДОРРА" }, + { value: "024", label: "АНГОЛА" }, + { value: "028", label: "АНТИГУА И БАРБУДА" }, + { value: "031", label: "АЗЕРБАЙДЖАН" }, + { value: "032", label: "АРГЕНТИНА" }, + { value: "036", label: "АВСТРАЛИЯ" }, + { value: "040", label: "АВСТРИЯ" }, + { value: "044", label: "БАГАМЫ" }, + { value: "048", label: "БАХРЕЙН" }, + { value: "050", label: "БАНГЛАДЕШ" }, + { value: "051", label: "АРМЕНИЯ" }, + { value: "052", label: "БАРБАДОС" }, + { value: "056", label: "БЕЛЬГИЯ" }, + { value: "060", label: "БЕРМУДЫ" }, + { value: "064", label: "БУТАН" }, + { value: "068", label: "БОЛИВИЯ, МНОГОНАЦИОНАЛЬНОЕ ГОСУДАРСТВО" }, + { value: "070", label: "БОСНИЯ И ГЕРЦЕГОВИНА" }, + { value: "072", label: "БОТСВАНА" }, + { value: "074", label: "ОСТРОВ БУВЕ" }, + { value: "076", label: "БРАЗИЛИЯ" }, + { value: "084", label: "БЕЛИЗ" }, + { value: "086", label: "БРИТАНСКАЯ ТЕРРИТОРИЯ В ИНДИЙСКОМ ОКЕАНЕ" }, + { value: "090", label: "СОЛОМОНОВЫ ОСТРОВА" }, + { value: "092", label: "ВИРГИНСКИЕ ОСТРОВА (БРИТАНСКИЕ)" }, + { value: "096", label: "БРУНЕЙ-ДАРУССАЛАМ" }, + { value: "100", label: "БОЛГАРИЯ" }, + { value: "104", label: "МЬЯНМА" }, + { value: "108", label: "БУРУНДИ" }, + { value: "112", label: "БЕЛАРУСЬ" }, + { value: "116", label: "КАМБОДЖА" }, + { value: "120", label: "КАМЕРУН" }, + { value: "124", label: "КАНАДА" }, + { value: "132", label: "КАБО-ВЕРДЕ" }, + { value: "136", label: "ОСТРОВА КАЙМАН" }, + { value: "140", label: "ЦЕНТРАЛЬНО-АФРИКАНСКАЯ РЕСПУБЛИКА" }, + { value: "144", label: "ШРИ-ЛАНКА" }, + { value: "148", label: "ЧАД" }, + { value: "152", label: "ЧИЛИ" }, + { value: "156", label: "КИТАЙ" }, + { value: "158", label: "ТАЙВАНЬ (КИТАЙ)" }, + { value: "162", label: "ОСТРОВ РОЖДЕСТВА" }, + { value: "166", label: "КОКОСОВЫЕ (КИЛИНГ) ОСТРОВА" }, + { value: "170", label: "КОЛУМБИЯ" }, + { value: "174", label: "КОМОРЫ" }, + { value: "175", label: "МАЙОТТА" }, + { value: "178", label: "КОНГО" }, + { value: "180", label: "КОНГО, ДЕМОКРАТИЧЕСКАЯ РЕСПУБЛИКА" }, + { value: "184", label: "ОСТРОВА КУКА" }, + { value: "188", label: "КОСТА-РИКА" }, + { value: "191", label: "ХОРВАТИЯ" }, + { value: "192", label: "КУБА" }, + { value: "196", label: "КИПР" }, + { value: "203", label: "ЧЕХИЯ" }, + { value: "204", label: "БЕНИН" }, + { value: "208", label: "ДАНИЯ" }, + { value: "212", label: "ДОМИНИКА" }, + { value: "214", label: "ДОМИНИКАНСКАЯ РЕСПУБЛИКА" }, + { value: "218", label: "ЭКВАДОР" }, + { value: "222", label: "ЭЛЬ-САЛЬВАДОР" }, + { value: "226", label: "ЭКВАТОРИАЛЬНАЯ ГВИНЕЯ" }, + { value: "231", label: "ЭФИОПИЯ" }, + { value: "232", label: "ЭРИТРЕЯ" }, + { value: "233", label: "ЭСТОНИЯ" }, + { value: "234", label: "ФАРЕРСКИЕ ОСТРОВА" }, + { value: "238", label: "ФОЛКЛЕНДСКИЕ ОСТРОВА (МАЛЬВИНСКИЕ)" }, + { value: "239", label: "ЮЖНАЯ ДЖОРДЖИЯ И ЮЖНЫЕ САНДВИЧЕВЫ ОСТРОВА" }, + { value: "242", label: "ФИДЖИ" }, + { value: "246", label: "ФИНЛЯНДИЯ" }, + { value: "248", label: "ЭЛАНДСКИЕ ОСТРОВА" }, + { value: "250", label: "ФРАНЦИЯ" }, + { value: "254", label: "ФРАНЦУЗСКАЯ ГВИАНА" }, + { value: "258", label: "ФРАНЦУЗСКАЯ ПОЛИНЕЗИЯ" }, + { value: "260", label: "ФРАНЦУЗСКИЕ ЮЖНЫЕ ТЕРРИТОРИИ" }, + { value: "262", label: "ДЖИБУТИ" }, + { value: "266", label: "ГАБОН" }, + { value: "268", label: "ГРУЗИЯ" }, + { value: "270", label: "ГАМБИЯ" }, + { value: "275", label: "ПАЛЕСТИНА, ГОСУДАРСТВО" }, + { value: "276", label: "ГЕРМАНИЯ" }, + { value: "288", label: "ГАНА" }, + { value: "292", label: "ГИБРАЛТАР" }, + { value: "296", label: "КИРИБАТИ" }, + { value: "300", label: "ГРЕЦИЯ" }, + { value: "304", label: "ГРЕНЛАНДИЯ" }, + { value: "308", label: "ГРЕНАДА" }, + { value: "312", label: "ГВАДЕЛУПА" }, + { value: "316", label: "ГУАМ" }, + { value: "320", label: "ГВАТЕМАЛА" }, + { value: "324", label: "ГВИНЕЯ" }, + { value: "328", label: "ГАЙАНА" }, + { value: "332", label: "ГАИТИ" }, + { value: "334", label: "ОСТРОВ ХЕРД И ОСТРОВА МАКДОНАЛЬД" }, + { value: "336", label: "ПАПСКИЙ ПРЕСТОЛ (ГОСУДАРСТВО - ГОРОД ВАТИКАН)" }, + { value: "340", label: "ГОНДУРАС" }, + { value: "344", label: "ГОНКОНГ" }, + { value: "348", label: "ВЕНГРИЯ" }, + { value: "352", label: "ИСЛАНДИЯ" }, + { value: "356", label: "ИНДИЯ" }, + { value: "360", label: "ИНДОНЕЗИЯ" }, + { value: "364", label: "ИРАН (ИСЛАМСКАЯ РЕСПУБЛИКА)" }, + { value: "368", label: "ИРАК" }, + { value: "372", label: "ИРЛАНДИЯ" }, + { value: "376", label: "ИЗРАИЛЬ" }, + { value: "380", label: "ИТАЛИЯ" }, + { value: "384", label: "КОТ Д'ИВУАР" }, + { value: "388", label: "ЯМАЙКА" }, + { value: "392", label: "ЯПОНИЯ" }, + { value: "398", label: "КАЗАХСТАН" }, + { value: "400", label: "ИОРДАНИЯ" }, + { value: "404", label: "КЕНИЯ" }, + { value: "408", label: "КОРЕЯ, НАРОДНО-ДЕМОКРАТИЧЕСКАЯ РЕСПУБЛИКА" }, + { value: "410", label: "КОРЕЯ, РЕСПУБЛИКА" }, + { value: "414", label: "КУВЕЙТ" }, + { value: "417", label: "КИРГИЗИЯ" }, + { value: "418", label: "ЛАОССКАЯ НАРОДНО-ДЕМОКРАТИЧЕСКАЯ РЕСПУБЛИКА" }, + { value: "422", label: "ЛИВАН" }, + { value: "426", label: "ЛЕСОТО" }, + { value: "428", label: "ЛАТВИЯ" }, + { value: "430", label: "ЛИБЕРИЯ" }, + { value: "434", label: "ЛИВИЯ" }, + { value: "438", label: "ЛИХТЕНШТЕЙН" }, + { value: "440", label: "ЛИТВА" }, + { value: "442", label: "ЛЮКСЕМБУРГ" }, + { value: "446", label: "МАКАО" }, + { value: "450", label: "МАДАГАСКАР" }, + { value: "454", label: "МАЛАВИ" }, + { value: "458", label: "МАЛАЙЗИЯ" }, + { value: "462", label: "МАЛЬДИВЫ" }, + { value: "466", label: "МАЛИ" }, + { value: "470", label: "МАЛЬТА" }, + { value: "474", label: "МАРТИНИКА" }, + { value: "478", label: "МАВРИТАНИЯ" }, + { value: "480", label: "МАВРИКИЙ" }, + { value: "484", label: "МЕКСИКА" }, + { value: "492", label: "МОНАКО" }, + { value: "496", label: "МОНГОЛИЯ" }, + { value: "498", label: "МОЛДОВА, РЕСПУБЛИКА" }, + { value: "499", label: "ЧЕРНОГОРИЯ" }, + { value: "500", label: "МОНТСЕРРАТ" }, + { value: "504", label: "МАРОККО" }, + { value: "508", label: "МОЗАМБИК" }, + { value: "512", label: "ОМАН" }, + { value: "516", label: "НАМИБИЯ" }, + { value: "520", label: "НАУРУ" }, + { value: "524", label: "НЕПАЛ" }, + { value: "528", label: "НИДЕРЛАНДЫ" }, + { value: "531", label: "КЮРАСАО" }, + { value: "533", label: "АРУБА" }, + { value: "534", label: "СЕН-МАРТЕН (нидерландская часть)" }, + { value: "535", label: "БОНЭЙР, СИНТ-ЭСТАТИУС И САБА" }, + { value: "540", label: "НОВАЯ КАЛЕДОНИЯ" }, + { value: "548", label: "ВАНУАТУ" }, + { value: "554", label: "НОВАЯ ЗЕЛАНДИЯ" }, + { value: "558", label: "НИКАРАГУА" }, + { value: "562", label: "НИГЕР" }, + { value: "566", label: "НИГЕРИЯ" }, + { value: "570", label: "НИУЭ" }, + { value: "574", label: "ОСТРОВ НОРФОЛК" }, + { value: "578", label: "НОРВЕГИЯ" }, + { value: "580", label: "СЕВЕРНЫЕ МАРИАНСКИЕ ОСТРОВА" }, + { value: "581", label: "МАЛЫЕ ТИХООКЕАНСКИЕ ОТДАЛЕННЫЕ ОСТРОВА СОЕДИНЕННЫХ ШТАТОВ" }, + { value: "583", label: "МИКРОНЕЗИЯ, ФЕДЕРАТИВНЫЕ ШТАТЫ" }, + { value: "584", label: "МАРШАЛЛОВЫ ОСТРОВА" }, + { value: "585", label: "ПАЛАУ" }, + { value: "586", label: "ПАКИСТАН" }, + { value: "591", label: "ПАНАМА" }, + { value: "598", label: "ПАПУА-НОВАЯ ГВИНЕЯ" }, + { value: "600", label: "ПАРАГВАЙ" }, + { value: "604", label: "ПЕРУ" }, + { value: "608", label: "ФИЛИППИНЫ" }, + { value: "612", label: "ПИТКЕРН" }, + { value: "616", label: "ПОЛЬША" }, + { value: "620", label: "ПОРТУГАЛИЯ" }, + { value: "624", label: "ГВИНЕЯ-БИСАУ" }, + { value: "626", label: "ТИМОР-ЛЕСТЕ" }, + { value: "630", label: "ПУЭРТО-РИКО" }, + { value: "634", label: "КАТАР" }, + { value: "638", label: "РЕЮНЬОН" }, + { value: "642", label: "РУМЫНИЯ" }, + { value: "643", label: "РОССИЯ" }, + { value: "646", label: "РУАНДА" }, + { value: "652", label: "СЕН-БАРТЕЛЕМИ" }, + { value: "654", label: "СВЯТАЯ ЕЛЕНА, ОСТРОВ ВОЗНЕСЕНИЯ, ТРИСТАН-ДА-КУНЬЯ" }, + { value: "659", label: "СЕНТ-КИТС И НЕВИС" }, + { value: "660", label: "АНГИЛЬЯ" }, + { value: "662", label: "СЕНТ-ЛЮСИЯ" }, + { value: "663", label: "СЕН-МАРТЕН (французская часть)" }, + { value: "666", label: "СЕН-ПЬЕР И МИКЕЛОН" }, + { value: "670", label: "СЕНТ-ВИНСЕНТ И ГРЕНАДИНЫ" }, + { value: "674", label: "САН-МАРИНО" }, + { value: "678", label: "САН-ТОМЕ И ПРИНСИПИ" }, + { value: "682", label: "САУДОВСКАЯ АРАВИЯ" }, + { value: "686", label: "СЕНЕГАЛ" }, + { value: "688", label: "СЕРБИЯ" }, + { value: "690", label: "СЕЙШЕЛЫ" }, + { value: "694", label: "СЬЕРРА-ЛЕОНЕ" }, + { value: "702", label: "СИНГАПУР" }, + { value: "703", label: "СЛОВАКИЯ" }, + { value: "704", label: "ВЬЕТНАМ" }, + { value: "705", label: "СЛОВЕНИЯ" }, + { value: "706", label: "СОМАЛИ" }, + { value: "710", label: "ЮЖНАЯ АФРИКА" }, + { value: "716", label: "ЗИМБАБВЕ" }, + { value: "724", label: "ИСПАНИЯ" }, + { value: "728", label: "ЮЖНЫЙ СУДАН" }, + { value: "729", label: "СУДАН" }, + { value: "732", label: "ЗАПАДНАЯ САХАРА" }, + { value: "740", label: "СУРИНАМ" }, + { value: "744", label: "ШПИЦБЕРГЕН И ЯН МАЙЕН" }, + { value: "748", label: "ЭСВАТИНИ" }, + { value: "752", label: "ШВЕЦИЯ" }, + { value: "756", label: "ШВЕЙЦАРИЯ" }, + { value: "760", label: "СИРИЙСКАЯ АРАБСКАЯ РЕСПУБЛИКА" }, + { value: "762", label: "ТАДЖИКИСТАН" }, + { value: "764", label: "ТАИЛАНД" }, + { value: "768", label: "ТОГО" }, + { value: "772", label: "ТОКЕЛАУ" }, + { value: "776", label: "ТОНГА" }, + { value: "780", label: "ТРИНИДАД И ТОБАГО" }, + { value: "784", label: "ОБЪЕДИНЕННЫЕ АРАБСКИЕ ЭМИРАТЫ" }, + { value: "788", label: "ТУНИС" }, + { value: "792", label: "ТУРЦИЯ" }, + { value: "795", label: "ТУРКМЕНИСТАН" }, + { value: "796", label: "ОСТРОВА ТЕРКС И КАЙКОС" }, + { value: "798", label: "ТУВАЛУ" }, + { value: "800", label: "УГАНДА" }, + { value: "804", label: "УКРАИНА" }, + { value: "807", label: "СЕВЕРНАЯ МАКЕДОНИЯ" }, + { value: "818", label: "ЕГИПЕТ" }, + { value: "826", label: "СОЕДИНЕННОЕ КОРОЛЕВСТВО" }, + { value: "831", label: "ГЕРНСИ" }, + { value: "832", label: "ДЖЕРСИ" }, + { value: "833", label: "ОСТРОВ МЭН" }, + { value: "834", label: "ТАНЗАНИЯ, ОБЪЕДИНЕННАЯ РЕСПУБЛИКА" }, + { value: "840", label: "СОЕДИНЕННЫЕ ШТАТЫ" }, + { value: "850", label: "ВИРГИНСКИЕ ОСТРОВА (США)" }, + { value: "854", label: "БУРКИНА-ФАСО" }, + { value: "858", label: "УРУГВАЙ" }, + { value: "860", label: "УЗБЕКИСТАН" }, + { value: "862", label: "ВЕНЕСУЭЛА (БОЛИВАРИАНСКАЯ РЕСПУБЛИКА)" }, + { value: "876", label: "УОЛЛИС И ФУТУНА" }, + { value: "882", label: "САМОА" }, + { value: "887", label: "ЙЕМЕН" }, + { value: "894", label: "ЗАМБИЯ" }, + { value: "895", label: "АБХАЗИЯ" }, + { value: "896", label: "ЮЖНАЯ ОСЕТИЯ" }, + { value: "897", label: "ДНР" }, + { value: "898", label: "ЛНР" }, +]; \ No newline at end of file diff --git a/pages/questionnaire/components/forms/countries.js b/pages/questionnaire/components/forms/countries.js new file mode 100644 index 0000000..5067bf1 --- /dev/null +++ b/pages/questionnaire/components/forms/countries.js @@ -0,0 +1,251 @@ +export default [ + { label: "Австралия", value: "Австралия" }, + { label: "Австрия", value: "Австрия" }, + { label: "Азербайджан", value: "Азербайджан" }, + { label: "Аландские о-ва", value: "Аландские о-ва" }, + { label: "Албания", value: "Албания" }, + { label: "Алжир", value: "Алжир" }, + { label: "Американское Самоа", value: "Американское Самоа" }, + { label: "Ангилья", value: "Ангилья" }, + { label: "Ангола", value: "Ангола" }, + { label: "Андорра", value: "Андорра" }, + { label: "Антарктида", value: "Антарктида" }, + { label: "Антигуа и Барбуда", value: "Антигуа и Барбуда" }, + { label: "Аргентина", value: "Аргентина" }, + { label: "Армения", value: "Армения" }, + { label: "Аруба", value: "Аруба" }, + { label: "Афганистан", value: "Афганистан" }, + { label: "Багамы", value: "Багамы" }, + { label: "Бангладеш", value: "Бангладеш" }, + { label: "Барбадос", value: "Барбадос" }, + { label: "Бахрейн", value: "Бахрейн" }, + { label: "Беларусь", value: "Беларусь" }, + { label: "Белиз", value: "Белиз" }, + { label: "Бельгия", value: "Бельгия" }, + { label: "Бенин", value: "Бенин" }, + { label: "Бермудские о-ва", value: "Бермудские о-ва" }, + { label: "Болгария", value: "Болгария" }, + { label: "Боливия", value: "Боливия" }, + { label: "Бонэйр, Синт-Эстатиус и Саба", value: "Бонэйр, Синт-Эстатиус и Саба" }, + { label: "Босния и Герцеговина", value: "Босния и Герцеговина" }, + { label: "Ботсвана", value: "Ботсвана" }, + { label: "Бразилия", value: "Бразилия" }, + { label: "Британская территория в Индийском океане", value: "Британская территория в Индийском океане" }, + { label: "Бруней-Даруссалам", value: "Бруней-Даруссалам" }, + { label: "Буркина-Фасо", value: "Буркина-Фасо" }, + { label: "Бурунди", value: "Бурунди" }, + { label: "Бутан", value: "Бутан" }, + { label: "Вануату", value: "Вануату" }, + { label: "Ватикан", value: "Ватикан" }, + { label: "Великобритания", value: "Великобритания" }, + { label: "Венгрия", value: "Венгрия" }, + { label: "Венесуэла", value: "Венесуэла" }, + { label: "Виргинские о-ва", value: "Виргинские о-ва" }, + { label: "Виргинские о-ва", value: "Виргинские о-ва" }, + { label: "Внешние малые о-ва", value: "Внешние малые о-ва" }, + { label: "Восточный Тимор", value: "Восточный Тимор" }, + { label: "Вьетнам", value: "Вьетнам" }, + { label: "Габон", value: "Габон" }, + { label: "Гаити", value: "Гаити" }, + { label: "Гайана", value: "Гайана" }, + { label: "Гамбия", value: "Гамбия" }, + { label: "Гана", value: "Гана" }, + { label: "Гваделупа", value: "Гваделупа" }, + { label: "Гватемала", value: "Гватемала" }, + { label: "Гвинея", value: "Гвинея" }, + { label: "Гвинея-Бисау", value: "Гвинея-Бисау" }, + { label: "Германия", value: "Германия" }, + { label: "Гернси", value: "Гернси" }, + { label: "Гибралтар", value: "Гибралтар" }, + { label: "Гондурас", value: "Гондурас" }, + { label: "Гонконг", value: "Гонконг" }, + { label: "Гренада", value: "Гренада" }, + { label: "Гренландия", value: "Гренландия" }, + { label: "Греция", value: "Греция" }, + { label: "Грузия", value: "Грузия" }, + { label: "Гуам", value: "Гуам" }, + { label: "Дания", value: "Дания" }, + { label: "Джерси", value: "Джерси" }, + { label: "Джибути", value: "Джибути" }, + { label: "Доминика", value: "Доминика" }, + { label: "Доминиканская Республика", value: "Доминиканская Республика" }, + { label: "Египет", value: "Египет" }, + { label: "Замбия", value: "Замбия" }, + { label: "Западная Сахара", value: "Западная Сахара" }, + { label: "Зимбабве", value: "Зимбабве" }, + { label: "Израиль", value: "Израиль" }, + { label: "Индия", value: "Индия" }, + { label: "Индонезия", value: "Индонезия" }, + { label: "Иордания", value: "Иордания" }, + { label: "Ирак", value: "Ирак" }, + { label: "Иран", value: "Иран" }, + { label: "Ирландия", value: "Ирландия" }, + { label: "Исландия", value: "Исландия" }, + { label: "Испания", value: "Испания" }, + { label: "Италия", value: "Италия" }, + { label: "Йемен", value: "Йемен" }, + { label: "Кабо-Верде", value: "Кабо-Верде" }, + { label: "Казахстан", value: "Казахстан" }, + { label: "Камбоджа", value: "Камбоджа" }, + { label: "Камерун", value: "Камерун" }, + { label: "Канада", value: "Канада" }, + { label: "Катар", value: "Катар" }, + { label: "Кения", value: "Кения" }, + { label: "Кипр", value: "Кипр" }, + { label: "Киргизия", value: "Киргизия" }, + { label: "Кирибати", value: "Кирибати" }, + { label: "Китай", value: "Китай" }, + { label: "КНДР", value: "КНДР" }, + { label: "Кокосовые о-ва", value: "Кокосовые о-ва" }, + { label: "Колумбия", value: "Колумбия" }, + { label: "Коморы", value: "Коморы" }, + { label: "Конго - Браззавиль", value: "Конго - Браззавиль" }, + { label: "Конго - Киншаса", value: "Конго - Киншаса" }, + { label: "Коста-Рика", value: "Коста-Рика" }, + { label: "Кот-д’Ивуар", value: "Кот-д’Ивуар" }, + { label: "Куба", value: "Куба" }, + { label: "Кувейт", value: "Кувейт" }, + { label: "Кюрасао", value: "Кюрасао" }, + { label: "Лаос", value: "Лаос" }, + { label: "Латвия", value: "Латвия" }, + { label: "Лесото", value: "Лесото" }, + { label: "Либерия", value: "Либерия" }, + { label: "Ливан", value: "Ливан" }, + { label: "Ливия", value: "Ливия" }, + { label: "Литва", value: "Литва" }, + { label: "Лихтенштейн", value: "Лихтенштейн" }, + { label: "Люксембург", value: "Люксембург" }, + { label: "Маврикий", value: "Маврикий" }, + { label: "Мавритания", value: "Мавритания" }, + { label: "Мадагаскар", value: "Мадагаскар" }, + { label: "Майотта", value: "Майотта" }, + { label: "Макао", value: "Макао" }, + { label: "Малави", value: "Малави" }, + { label: "Малайзия", value: "Малайзия" }, + { label: "Мали", value: "Мали" }, + { label: "Мальдивы", value: "Мальдивы" }, + { label: "Мальта", value: "Мальта" }, + { label: "Марокко", value: "Марокко" }, + { label: "Мартиника", value: "Мартиника" }, + { label: "Маршалловы Острова", value: "Маршалловы Острова" }, + { label: "Мексика", value: "Мексика" }, + { label: "Мозамбик", value: "Мозамбик" }, + { label: "Молдова", value: "Молдова" }, + { label: "Монако", value: "Монако" }, + { label: "Монголия", value: "Монголия" }, + { label: "Монтсеррат", value: "Монтсеррат" }, + { label: "Мьянма", value: "Мьянма" }, + { label: "Намибия", value: "Намибия" }, + { label: "Науру", value: "Науру" }, + { label: "Непал", value: "Непал" }, + { label: "Нигер", value: "Нигер" }, + { label: "Нигерия", value: "Нигерия" }, + { label: "Нидерланды", value: "Нидерланды" }, + { label: "Никарагуа", value: "Никарагуа" }, + { label: "Ниуэ", value: "Ниуэ" }, + { label: "Новая Зеландия", value: "Новая Зеландия" }, + { label: "Новая Каледония", value: "Новая Каледония" }, + { label: "Норвегия", value: "Норвегия" }, + { label: "о-в Буве", value: "о-в Буве" }, + { label: "о-в Мэн", value: "о-в Мэн" }, + { label: "о-в Норфолк", value: "о-в Норфолк" }, + { label: "о-в Рождества", value: "о-в Рождества" }, + { label: "о-в Св. Елены", value: "о-в Св. Елены" }, + { label: "о-ва Питкэрн", value: "о-ва Питкэрн" }, + { label: "о-ва Тёркс и Кайкос", value: "о-ва Тёркс и Кайкос" }, + { label: "о-ва Херд и Макдональд", value: "о-ва Херд и Макдональд" }, + { label: "ОАЭ", value: "ОАЭ" }, + { label: "Оман", value: "Оман" }, + { label: "Острова Кайман", value: "Острова Кайман" }, + { label: "Острова Кука", value: "Острова Кука" }, + { label: "Пакистан", value: "Пакистан" }, + { label: "Палау", value: "Палау" }, + { label: "Палестинские территории", value: "Палестинские территории" }, + { label: "Панама", value: "Панама" }, + { label: "Папуа — Новая Гвинея", value: "Папуа — Новая Гвинея" }, + { label: "Парагвай", value: "Парагвай" }, + { label: "Перу", value: "Перу" }, + { label: "Польша", value: "Польша" }, + { label: "Португалия", value: "Португалия" }, + { label: "Пуэрто-Рико", value: "Пуэрто-Рико" }, + { label: "Республика Корея", value: "Республика Корея" }, + { label: "Реюньон", value: "Реюньон" }, + { label: "Россия", value: "Россия" }, + { label: "Руанда", value: "Руанда" }, + { label: "Румыния", value: "Румыния" }, + { label: "Сальвадор", value: "Сальвадор" }, + { label: "Самоа", value: "Самоа" }, + { label: "Сан-Марино", value: "Сан-Марино" }, + { label: "Сан-Томе и Принсипи", value: "Сан-Томе и Принсипи" }, + { label: "Саудовская Аравия", value: "Саудовская Аравия" }, + { label: "Северная Македония", value: "Северная Македония" }, + { label: "Северные Марианские о-ва", value: "Северные Марианские о-ва" }, + { label: "Сейшельские Острова", value: "Сейшельские Острова" }, + { label: "Сен-Бартелеми", value: "Сен-Бартелеми" }, + { label: "Сен-Мартен", value: "Сен-Мартен" }, + { label: "Сен-Пьер и Микелон", value: "Сен-Пьер и Микелон" }, + { label: "Сенегал", value: "Сенегал" }, + { label: "Сент-Винсент и Гренадины", value: "Сент-Винсент и Гренадины" }, + { label: "Сент-Китс и Невис", value: "Сент-Китс и Невис" }, + { label: "Сент-Люсия", value: "Сент-Люсия" }, + { label: "Сербия", value: "Сербия" }, + { label: "Сингапур", value: "Сингапур" }, + { label: "Синт-Мартен", value: "Синт-Мартен" }, + { label: "Сирия", value: "Сирия" }, + { label: "Словакия", value: "Словакия" }, + { label: "Словения", value: "Словения" }, + { label: "Соединенные Штаты", value: "Соединенные Штаты" }, + { label: "Соломоновы Острова", value: "Соломоновы Острова" }, + { label: "Сомали", value: "Сомали" }, + { label: "Судан", value: "Судан" }, + { label: "Суринам", value: "Суринам" }, + { label: "Сьерра-Леоне", value: "Сьерра-Леоне" }, + { label: "Таджикистан", value: "Таджикистан" }, + { label: "Таиланд", value: "Таиланд" }, + { label: "Тайвань", value: "Тайвань" }, + { label: "Танзания", value: "Танзания" }, + { label: "Того", value: "Того" }, + { label: "Токелау", value: "Токелау" }, + { label: "Тонга", value: "Тонга" }, + { label: "Тринидад и Тобаго", value: "Тринидад и Тобаго" }, + { label: "Тувалу", value: "Тувалу" }, + { label: "Тунис", value: "Тунис" }, + { label: "Туркменистан", value: "Туркменистан" }, + { label: "Турция", value: "Турция" }, + { label: "Уганда", value: "Уганда" }, + { label: "Узбекистан", value: "Узбекистан" }, + { label: "Украина", value: "Украина" }, + { label: "Уоллис и Футуна", value: "Уоллис и Футуна" }, + { label: "Уругвай", value: "Уругвай" }, + { label: "Фарерские о-ва", value: "Фарерские о-ва" }, + { label: "Федеративные Штаты Микронезии", value: "Федеративные Штаты Микронезии" }, + { label: "Фиджи", value: "Фиджи" }, + { label: "Филиппины", value: "Филиппины" }, + { label: "Финляндия", value: "Финляндия" }, + { label: "Фолклендские о-ва", value: "Фолклендские о-ва" }, + { label: "Франция", value: "Франция" }, + { label: "Французская Гвиана", value: "Французская Гвиана" }, + { label: "Французская Полинезия", value: "Французская Полинезия" }, + { label: "Французские Южные территории", value: "Французские Южные территории" }, + { label: "Хорватия", value: "Хорватия" }, + { label: "Центрально-Африканская Республика", value: "Центрально-Африканская Республика" }, + { label: "Чад", value: "Чад" }, + { label: "Черногория", value: "Черногория" }, + { label: "Чехия", value: "Чехия" }, + { label: "Чили", value: "Чили" }, + { label: "Швейцария", value: "Швейцария" }, + { label: "Швеция", value: "Швеция" }, + { label: "Шпицберген и Ян-Майен", value: "Шпицберген и Ян-Майен" }, + { label: "Шри-Ланка", value: "Шри-Ланка" }, + { label: "Эквадор", value: "Эквадор" }, + { label: "Экваториальная Гвинея", value: "Экваториальная Гвинея" }, + { label: "Эритрея", value: "Эритрея" }, + { label: "Эсватини", value: "Эсватини" }, + { label: "Эстония", value: "Эстония" }, + { label: "Эфиопия", value: "Эфиопия" }, + { label: "Южная Георгия и Южные Сандвичевы о-ва", value: "Южная Георгия и Южные Сандвичевы о-ва" }, + { label: "Южно-Африканская Республика", value: "Южно-Африканская Республика" }, + { label: "Южный Судан", value: "Южный Судан" }, + { label: "Ямайка", value: "Ямайка" }, + { label: "Япония", value: "Япония" }, +]; \ No newline at end of file diff --git a/pages/questionnaire/index.js b/pages/questionnaire/index.js index 2b37e2e..a7fdd7c 100644 --- a/pages/questionnaire/index.js +++ b/pages/questionnaire/index.js @@ -15,7 +15,7 @@ import InnerMenu from "./components/InnerMenu"; import Header from '../components/Header'; import Footer from '../components/Footer'; -import { sendPhoneChangeNumber, sendPhoneChangeNumberSmsCode, setUserPhone } from '../../actions'; +import { sendPhoneChangeNumber, sendPhoneChangeNumberSmsCode, setUserPhone, getQuestionnaire } from '../../actions'; import AccountLayout from "../components/Layout/Account"; import Form_1_Main from "./components/forms/Form_1_Main"; import Form_2_Contacts from "./components/forms/Form_2_Contacts"; @@ -40,6 +40,7 @@ class QuestionnairePage extends React.Component componentDidMount() { + getQuestionnaire({ dispatch: this.props.dispatch }); } _handle_onPhoneSubmit = (event) => diff --git a/reducers/initialState.js b/reducers/initialState.js index b61516e..4be9843 100644 --- a/reducers/initialState.js +++ b/reducers/initialState.js @@ -121,6 +121,7 @@ export const defaultState = { collective_executive: "", individual_executive: "", other_control: "", + nko: false, }, legal_address: { title: "", @@ -204,6 +205,7 @@ export const defaultState = { jobtitle: "", telephone: "", email: "", + founder_from_list: true, founder_number: "", founder_part: "", is_beneficial: false, @@ -224,7 +226,7 @@ export const defaultState = { } } }, - founded_persons: [], + founded_persons: [], client_contacts: { lastname: "", firstname: "", diff --git a/reducers/questionnaireReducer.js b/reducers/questionnaireReducer.js index d4464f2..b78fc47 100644 --- a/reducers/questionnaireReducer.js +++ b/reducers/questionnaireReducer.js @@ -21,7 +21,7 @@ const questionnaireReducer = (state = initialState.questionnaire, action) => { return { ...state, - questionnaire: action.data.questionnaire, + ...action.data.questionnaire, }; } @@ -29,7 +29,7 @@ const questionnaireReducer = (state = initialState.questionnaire, action) => { return { ...state, - questionnaire: action.data.questionnaire, + ...action.data.questionnaire, }; } diff --git a/yarn.lock b/yarn.lock index 4f00a62..f4f54e5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -198,6 +198,18 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" +"@floating-ui/core@^1.2.4": + version "1.2.4" + resolved "https://registry.yarnpkg.com/@floating-ui/core/-/core-1.2.4.tgz#89e6311b021190c9e121fcf20306e76ac66e4066" + integrity sha512-SQOeVbMwb1di+mVWWJLpsUTToKfqVNioXys011beCAhyOIFtS+GQoW4EQSneuxzmQKddExDwQ+X0hLl4lJJaSQ== + +"@floating-ui/dom@^1.0.1": + version "1.2.5" + resolved "https://registry.yarnpkg.com/@floating-ui/dom/-/dom-1.2.5.tgz#c9ec259a24ce0958b1ea29674df4eee4455361a9" + integrity sha512-+sAUfpQ3Frz+VCbPCqj+cZzvEESy3fjSeT/pDWkYCWOBXYNNKZfuVsHuv8/JO2zze8+Eb/Q7a6hZVgzS81fLbQ== + dependencies: + "@floating-ui/core" "^1.2.4" + "@hapi/accept@5.0.2": version "5.0.2" resolved "https://registry.yarnpkg.com/@hapi/accept/-/accept-5.0.2.tgz#ab7043b037e68b722f93f376afb05e85c0699523" @@ -675,6 +687,14 @@ babel-plugin-macros@^3.1.0: cosmiconfig "^7.0.0" resolve "^1.19.0" +babel-runtime@6.x.x: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" + integrity sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g== + dependencies: + core-js "^2.4.0" + regenerator-runtime "^0.11.0" + balanced-match@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" @@ -1056,6 +1076,11 @@ core-js-pure@^3.20.2: resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.24.1.tgz#8839dde5da545521bf282feb7dc6d0b425f39fd3" integrity sha512-r1nJk41QLLPyozHUUPmILCEMtMw24NG4oWK6RbsDdjzQgg9ZvrUsPBj1MnG0wXXp1DCDU6j+wUvEmBSrtRbLXg== +core-js@^2.4.0: + version "2.6.12" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.12.tgz#d9333dfa7b065e347cc5682219d6f690859cc2ec" + integrity sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ== + core-util-is@~1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" @@ -2593,10 +2618,10 @@ media-typer@0.3.0: resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" integrity sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ== -memoize-one@^5.0.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-5.2.1.tgz#8337aa3c4335581839ec01c3d594090cebe8f00e" - integrity sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q== +memoize-one@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-6.0.0.tgz#b2591b871ed82948aee4727dc6abceeeac8c1045" + integrity sha512-rkpe71W0N0c0Xz6QD0eJETuWAJGnJ9afsl1srmwPrI+yBCkge5EycXXbYRyvL29zZVUWQCY7InPRCv3GDXuZNw== merge-stream@^2.0.0: version "2.0.0" @@ -3295,6 +3320,13 @@ react-lifecycles-compat@^3.0.4: resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362" integrity sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA== +react-no-ssr@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/react-no-ssr/-/react-no-ssr-1.1.0.tgz#313b48d2e26020f969ed98e472f10481604e3cc8" + integrity sha512-3td8iPIEFKWXOJ3Ar5xURvZAsv/aIlngJLBH6fP5QC3WhsfuO2pn7WQR0ZlkTE0puWCL0RDEvXtOfAg4qMp+xA== + dependencies: + babel-runtime "6.x.x" + react-redux@^7.2.6: version "7.2.8" resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-7.2.8.tgz#a894068315e65de5b1b68899f9c6ee0923dd28de" @@ -3312,18 +3344,20 @@ react-refresh@0.8.3: resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.8.3.tgz#721d4657672d400c5e3c75d063c4a85fb2d5d68f" integrity sha512-X8jZHc7nCMjaCqoU+V2I0cOhNW+QMBwSUkeXnTi8IPe6zaRWfn60ZzvFDZqWPfmSJfjub7dDW1SP0jaHWLu/hg== -react-select@^5.4.0: - version "5.4.0" - resolved "https://registry.yarnpkg.com/react-select/-/react-select-5.4.0.tgz#81f6ac73906126706f104751ee14437bd16798f4" - integrity sha512-CjE9RFLUvChd5SdlfG4vqxZd55AZJRrLrHzkQyTYeHlpOztqcgnyftYAolJ0SGsBev6zAs6qFrjm6KU3eo2hzg== +react-select@^5.7.2: + version "5.7.2" + resolved "https://registry.yarnpkg.com/react-select/-/react-select-5.7.2.tgz#ccd40071b9429277983bf15526e7a5773a060e09" + integrity sha512-cTlJkQ8YjV6T/js8wW0owTzht0hHGABh29vjLscY4HfZGkv7hc3FFTmRp9NzY/Ib1uQ36GieAKEjxpHdpCFpcA== dependencies: "@babel/runtime" "^7.12.0" "@emotion/cache" "^11.4.0" "@emotion/react" "^11.8.1" + "@floating-ui/dom" "^1.0.1" "@types/react-transition-group" "^4.4.0" - memoize-one "^5.0.0" + memoize-one "^6.0.0" prop-types "^15.6.0" react-transition-group "^4.3.0" + use-isomorphic-layout-effect "^1.1.2" react-slick@^0.29.0: version "0.29.0" @@ -3440,6 +3474,11 @@ redux@^4.0.0, redux@^4.1.2: dependencies: "@babel/runtime" "^7.9.2" +regenerator-runtime@^0.11.0: + version "0.11.1" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" + integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg== + regenerator-runtime@^0.13.4: version "0.13.9" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz#8925742a98ffd90814988d7566ad30ca3b263b52" @@ -4032,6 +4071,11 @@ url@^0.11.0: punycode "1.3.2" querystring "0.2.0" +use-isomorphic-layout-effect@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/use-isomorphic-layout-effect/-/use-isomorphic-layout-effect-1.1.2.tgz#497cefb13d863d687b08477d9e5a164ad8c1a6fb" + integrity sha512-49L8yCO3iGT/ZF9QttjwLF/ZD9Iwto5LnH5LmEdk/6cFmXddqi2ulF0edxTwjj+7mqvpVVGQWvbXZdn32wRSHA== + use-subscription@1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/use-subscription/-/use-subscription-1.5.1.tgz#73501107f02fad84c6dd57965beb0b75c68c42d1"