Conflicts:
	css/main/style.css
	css/main/style.less
This commit is contained in:
merelendor 2022-08-31 03:50:43 +03:00
commit b9f9dbc8a2
9 changed files with 212 additions and 37 deletions

View File

@ -1938,10 +1938,26 @@ main .dropdown_blocks_list.filled .dropdown_block.open .block_header {
background: var(--inactive);
color: var(--blue);
}
@media all and (max-width: 1279px) {
main aside {
position: relative;
z-index: 2;
main aside {
background: #fff;
position: relative;
z-index: 2;
}
main aside:before {
content: "";
display: block;
width: auto;
position: absolute;
left: -50vw;
right: 0;
background: #fff;
top: 0;
bottom: 0;
z-index: -1;
}
@media all and (max-width: 1280px) {
main aside:before {
display: none;
}
}
main aside .nav_toggle {
@ -3926,9 +3942,6 @@ main .dropdown_blocks_list .dropdown_block .block_body .fines_detail ul li {
.grecaptcha-badge {
visibility: hidden;
}
.changes {
overflow: hidden;
}
.changes .block {
margin-bottom: 55px;
}
@ -4839,3 +4852,58 @@ main .dropdown_blocks_list .dropdown_block .block_body .fines_detail ul li {
font-size: 12px;
margin-bottom: -14px;
}
/* fix for gibdd*/
main .dropdown_blocks_list.zero-margin.gibdd .dropdown_block {
margin-bottom: 15px;
}
main .dropdown_blocks_list.zero-margin.gibdd .dropdown_block:after {
left: 0;
right: 0;
}
main .dropdown_blocks_list.zero-margin.gibdd .dropdown_block .block_body {
max-width: none;
margin-left: 0;
}
@media all and (max-width: 767px) {
main .dropdown_blocks_list.zero-margin.gibdd .dropdown_block .block_body {
padding-left: 0;
}
}
main .dropdown_blocks_list.zero-margin.gibdd .dropdown_block .block_body .fines_detail {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
margin: 0;
}
main .dropdown_blocks_list.zero-margin.gibdd .dropdown_block .block_body .fines_detail p {
width: 100%;
margin-bottom: 15px;
}
main .dropdown_blocks_list.zero-margin.gibdd .dropdown_block .block_body .fines_detail p.fines_doc {
margin-top: 20px;
}
@media all and (max-width: 767px) {
main .dropdown_blocks_list.zero-margin.gibdd .dropdown_block .block_body .fines_detail p.fines_doc {
margin-bottom: 0;
margin-top: 10px;
}
}
main .dropdown_blocks_list.zero-margin.gibdd .dropdown_block .block_body .fines_detail ul {
margin-left: 0;
display: block;
width: calc(50% - 15px);
}
main .dropdown_blocks_list.zero-margin.gibdd .dropdown_block .block_body .fines_detail ul li {
width: 100%;
}
@media all and (max-width: 767px) {
main .dropdown_blocks_list.zero-margin.gibdd .dropdown_block .block_body .fines_detail ul {
width: 100%;
padding-bottom: 0;
}
}
@media all and (max-width: 767px) {
main .dropdown_blocks_list.zero-margin.gibdd .dropdown_block .block_body .dosc_list {
margin-bottom: 15px;
}
}

File diff suppressed because one or more lines are too long

View File

@ -12,7 +12,7 @@ main {
padding-top: 86px;
}
section {
//padding: 80px 0;
@ -2008,9 +2008,25 @@ main {
}
aside {
@media all and (max-width: 1279px) {
position: relative;
z-index: 2;
background: #fff;
position: relative;
z-index: 2;
&:before {
content: "";
display: block;
width: auto;
position: absolute;
left: -50vw;
right: 0;
background: #fff;
top: 0;
bottom: 0;
z-index: -1;
@media all and (max-width: 1280px) {
display: none;
}
}
.nav_toggle {
@ -4408,7 +4424,7 @@ main .dropdown_blocks_list .dropdown_block .block_body {
.grecaptcha-badge { visibility: hidden; }
.changes {
overflow: hidden;
.block {
margin-bottom: 55px;
@ -5480,3 +5496,66 @@ main .dropdown_blocks_list .dropdown_block .block_body {
}
}
}
/* fix for gibdd*/
main .dropdown_blocks_list.zero-margin.gibdd .dropdown_block {
&:after {
left: 0;
right: 0;
}
margin-bottom: 15px;
.block_body {
max-width: none;
margin-left: 0;
@media all and (max-width: 767px) {
padding-left: 0;
}
.fines_detail {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
margin: 0;
p {
width: 100%;
margin-bottom: 15px;
&.fines_doc {
margin-top: 20px;
@media all and (max-width: 767px) {
margin-bottom: 0;
margin-top: 10px;
}
}
}
ul {
margin-left: 0;
display: block;
width: calc(50% - 15px);
li {
width: 100%;
}
@media all and (max-width: 767px) {
width: 100%;
padding-bottom: 0;
}
}
}
.dosc_list {
@media all and (max-width: 767px) {
margin-bottom: 15px;
}
}
}
}

View File

@ -68,7 +68,7 @@ class Manager extends React.Component
<div className="info">
<a href={ `mailto:${ company.manager_email }` }>{ company.manager_email }</a>
{ company.manager_mobilephone !== undefined && company.manager_mobilephone !== null && company.manager_mobilephone !== "" && (
<a href={ `tel:+${ company.manager_mobilephone.replace('/[^\d]/m', '') }` }>{ company.manager_mobilephone }</a>
<a href={ `tel:+${ company.manager_mobilephone.replace(/[^\d]/mg, '') }` }>{ company.manager_mobilephone }</a>
) }
{ company.manager_telegram !== undefined && company.manager_telegram !== null && company.manager_telegram !== "" && (
<a href={ `https://telegram.me/${ company.manager_telegram.replace("@", "") }` } target="_blank">{ `@${ company.manager_telegram.replace("@", "")}` }</a>

View File

@ -50,7 +50,7 @@ export default class CalculationsList extends React.Component
dots: false,
infinite: false,
speed: 500,
slidesToShow: 2.5,
slidesToShow: 2.3,
slidesToScroll: 1,
centerMode: false,
variableWidth: false,

View File

@ -291,7 +291,7 @@ class SumSelector extends React.Component
const { onOption } = this.props;
const { min, max } = this.state;
const value = parseFloat(event.target.value.replace('/[^\d]/m', ''));
const value = parseFloat(event.target.value.replace(/[^\d]/mg, ''));
if(value >= min && value <= max && !isNaN(value))
{
this.setState({ value: value }, () =>
@ -380,7 +380,7 @@ class InsurancePriceSelector extends React.Component
//}
//else
//{
const value = parseFloat(event.target.value.replace('/[^\d]/m', ''));
const value = parseFloat(event.target.value.replace(/[^\d]/mg, ''));
if(value >= min && value <= max && !isNaN(value))
{
this.setState({ value: value }, () =>

View File

@ -141,22 +141,14 @@ class ContractFinesPage extends React.Component
{moment(fine.violation_date).format("DD.MM.YYYY")}
</b>
</li>
{ fine.violation_place !== undefined && fine.violation_place !== null && (
<li>
Место нарушения: <b>{fine.violation_place}</b>
</li>
) }
<li>
Сумма:{" "}
<b style={{ whiteSpace: "nowrap" }}>
{numeral(fine.amount).format(" ., ")}&nbsp;
</b>
</li>
{fine.gibdd !== undefined && fine.gibdd !== null && (
<li>
Подразделение: <b>{fine.gibdd}</b>
</li>
)}
<li>
Статус:{" "}
<b className={status[fine.status_code]}>
@ -164,7 +156,20 @@ class ContractFinesPage extends React.Component
</b>
</li>
</ul>
<p style={{ paddingTop: "15px" }}>
<ul>
{ fine.violation_place !== undefined && fine.violation_place !== null && (
<li>
Место нарушения: <b>{fine.violation_place}</b>
</li>
) }
{fine.gibdd !== undefined && fine.gibdd !== null && (
<li>
Подразделение: <b>{fine.gibdd}</b>
</li>
)}
</ul>
<p className="fines_doc">
Штраф: {fine.fine_title}
</p>
</div>
@ -274,7 +279,6 @@ class ContractFinesPage extends React.Component
<div className={`dropdown_block open`}>
<div className="block_body full">
<div className="company">
<p className="title lower">Штрафы ГИБДД</p>
{fines !== undefined && fines !== null ? (
<>
{this._renderFines(fines)}

View File

@ -191,7 +191,9 @@ class ContractPage extends React.Component
</div>
</div>
) }
<button className="button button-blue" onClick={ () => this._handle_onRequest(question.id) }>Создать обращение</button>
{ question.request && (
<button className="button button-blue" onClick={ () => this._handle_onRequest(question.id) }>Создать обращение</button>
) }
</div>
</div>
</div>

View File

@ -113,6 +113,7 @@ class SupportRequestPage extends React.Component
loading: false,
contracts: null,
themes: null,
themes_filtered: null,
name: "",
phone: "",
email: "",
@ -169,7 +170,26 @@ class SupportRequestPage extends React.Component
opened_theme++;
}
this.setState({ loading: false, opened_theme: found ? opened_theme : 0, opened_question: found ? opened_question : 0 });
let themes_filtered = [];
for(let t in this.state.themes)
{
let questions = [];
for(let q in this.state.themes[t].questions)
{
if(this.state.themes[t].questions[q].request)
{
questions.push(this.state.themes[t].questions[q]);
}
}
if(questions.length > 0)
{
themes_filtered.push({ ...this.state.themes[t], ...{ questions } });
}
}
this.setState({ loading: false, themes_filtered, opened_theme: found ? opened_theme : 0, opened_question: found ? opened_question : 0 });
})
.catch(() => {});
});
@ -301,7 +321,7 @@ class SupportRequestPage extends React.Component
_renderForm = () =>
{
const { loading, contracts, themes, name, phone, email, question, file, files, opened_theme, opened_question } = this.state;
const { loading, contracts, themes, themes_filtered, name, phone, email, question, file, files, opened_theme, opened_question } = this.state;
const contracts_list = [];
for(let i in contracts)
@ -346,9 +366,11 @@ class SupportRequestPage extends React.Component
render()
{
const { number } = this.props;
const { loading, success, themes, opened_theme, opened_question } = this.state;
const { loading, success, themes, themes_filtered, opened_theme, opened_question } = this.state;
const procedure = themes !== undefined && themes !== null ? themes[opened_theme].questions[opened_question] : undefined;
const procedure = themes_filtered !== undefined && themes_filtered !== null ? themes_filtered[ opened_theme ].questions[ opened_question ] : undefined;
console.log("themes_filtered", themes_filtered);
return (
<React.Fragment>
@ -379,9 +401,9 @@ class SupportRequestPage extends React.Component
<div className="new_appeal">
<div className="column">
<div className="dropdown_blocks_list appeal_list visible">
{ themes !== undefined && themes !== null && themes.map((theme, theme_index) =>
{ themes_filtered !== undefined && themes_filtered !== null && themes_filtered.map((theme, theme_index) =>
(
<React.Fragment key={ `theme_${ theme_index }` } >
<React.Fragment key={ `theme_${ theme_index }` }>
<div className={ `appeal_item dropdown_block ${ theme_index === opened_theme && "open" }` } style={ theme_index === opened_theme ? { backgroundColor: "unset"} : {} } onClick={ () => this._handle_onChangeTheme(theme_index) }>
<div className="block_header">
<p style={{ fontWeight: "bold" }}>{ theme.name }</p>
@ -400,7 +422,7 @@ class SupportRequestPage extends React.Component
)) }
</div>
</div>
{ themes !== undefined && themes !== null && (
{ themes_filtered !== undefined && themes_filtered !== null && (
<div className="column">
<div className="column_text_block">
<p><b>Процедура</b></p>