Commit 3df9b4ca authored by Sergey's avatar Sergey

Statistics is done, all pages is done

parent f32b1e63
......@@ -1605,6 +1605,18 @@ function validationForms(forms)
if(!checkFieldPassword(input)) valid = false;
});
// Проверка даты
const fieldsDates = form.querySelectorAll('input[data-picker="datepicker"]');
fieldsDates.forEach(function(input)
{
if(input.value.trim() !== '')
{
if(!checkFieldDate(input)) valid = false;
}
});
// Если были ошибки, не отправляем форму
......@@ -1675,6 +1687,25 @@ function checkFieldPassword(password)
return result;
}
function checkFieldDate(input)
{
let date = input.value;
let errorClass = 'field-error';
let result;
if(!date.match(/([0-2]\d|3[01])\.(0\d|1[012])\.(\d{4})/))
{
result = false;
result ? input.classList.remove(errorClass) : input.classList.add(errorClass);
return result;
}
else
{
result = true;
result ? input.classList.remove(errorClass) : input.classList.add(errorClass);
return result;
}
}
function sendForm(form)
{
fetch(form.action, { method: 'POST', body: new FormData(form)})
......@@ -1689,22 +1720,6 @@ function sendForm(form)
successSending.classList.add('successful-sending_active');
shadow.appendChild(successSending);
// arrayFields.forEach(field =>
// {
// field.addEventListener('click', (e) =>
// {
// e.preventDefault();
// successSending.classList.remove('successful-sending_active');
// shadow.classList.remove('wrapper-shadow_active');
// document.body.classList.remove('disabled');
// document.body.appendChild(successSending);
// shadow.innerHTML = '';
// });
// });
shadow.addEventListener('click', (e) =>
{
if(e.target.classList.contains('wrapper-shadow'))
......@@ -1821,26 +1836,6 @@ let invoicePayment = document.querySelectorAll('.invoice-payment');
let rates = document.querySelectorAll('.rates');
let employees = document.querySelectorAll('.employees');
// if(tables.length)
// {
// tables.forEach(function(table)
// {
// table.insertAdjacentHTML('beforebegin', '<div class="wrapper-table"></div>');
// let wrapperTable = table.previousElementSibling;
// wrapperTable.appendChild(table);
// });
// }
// if(responses.length)
// {
// responses.forEach(function(response)
// {
// response.insertAdjacentHTML('beforebegin', '<div class="wrapper-table"></div>');
// let wrapperTable = response.previousElementSibling;
// wrapperTable.appendChild(response);
// });
// }
function wrapTable(tables)
{
if(tables.length)
......@@ -1940,8 +1935,8 @@ if(sortingRef.length)
{
mainRows.forEach(row =>
{
arrayDates = [];
let rowsDate = row.querySelectorAll('.response-date-column p');
arrayDates = [];
if(rowsDate.length)
{
......@@ -1953,10 +1948,13 @@ if(sortingRef.length)
arrayDates.sort();
rowsDate.forEach(async rowDate =>
console.log(arrayDates);
rowsDate.forEach((rowDate) =>
{
arrayDates.forEach((dateSort, index) =>
{
console.log(index);
let dateStr = rowDate.innerHTML;
let date = new Date(dateStr.split('.').reverse().join('-')).getTime();
if(date === dateSort)
......@@ -1966,7 +1964,6 @@ if(sortingRef.length)
});
});
}
});
}
......@@ -2032,7 +2029,7 @@ if(rows.length)
{
let maxHeight = tariffContents[0].getBoundingClientRect().height;
console.log(maxHeight);
// console.log(maxHeight);
tariffContents.forEach(content =>
{
......@@ -2096,6 +2093,15 @@ if(tabs.length)
{
let oldTabsContent = tabsContent.querySelectorAll('.tabs-content-block_active');
oldTabsContent.forEach(tab => {
let inputs = tab.querySelectorAll('input[type="text"]');
if(inputs.length)
{
inputs.forEach(input => {
input.setAttribute('disabled', 'disabled');
});
}
tab.classList.remove('tabs-content-block_active');
tab.style.display = 'none';
});
......@@ -2105,6 +2111,15 @@ if(tabs.length)
{
let newTabsContent = tabsContent.querySelectorAll('div[data-tab="' + dataTab + '"]');
newTabsContent.forEach(tab => {
let inputs = tab.querySelectorAll('input[type="text"]');
if(inputs.length)
{
inputs.forEach(input => {
input.removeAttribute('disabled');
});
}
tab.classList.add('tabs-content-block_active');
});
// tabsContent.querySelector('div[data-tab="' + dataTab + '"]').classList.add('tabs-content-block_active');
......@@ -2331,6 +2346,10 @@ document.addEventListener('DOMContentLoaded', () =>
let scheduleViews = document.querySelector('#schedule-views');
let scheduleResponse = document.querySelector('#schedule-response');
Chart.defaults.global.defaultFontColor = '#3c3b55';
Chart.defaults.global.defaultFontFamily = 'Montserrat Bold';
Chart.defaults.global.defaultFontSize = 13;
if(scheduleViews)
{
let ctx = scheduleViews.getContext('2d');
......@@ -2345,39 +2364,49 @@ document.addEventListener('DOMContentLoaded', () =>
borderCapStyle: 'square',
tension: 0,
radius: 0,
// label: false,
data: [1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
data: [11, 12, 13, 14, 13, 12, 11, 15, 17, 20, 23, 26, 20, 15, 18, 20],
backgroundColor: '#f7f6fb',
borderWidth: 3,
borderColor: '#92c83e',
borderColor: '#262262',
}]
},
options: {
responsive: false,
legend: {
display: false
},
scales: {
yAxes: [{
gridLines: {
color: "#DDDCE8",
drawOnChartArea: false,
zeroLineColor: '#DDDCE8'
},
ticks: {
suggestedMin: 0,
suggestedMax: 2,
stepSize: 2
suggestedMax: 26,
stepSize: 26
}
}],
xAxes: [{
gridLines: {
drawOnChartArea: false,
color: "#DDDCE8",
tickMarkLength: 0,
zeroLineColor: '#DDDCE8'
},
ticks: {
fontFamily: 'Montserrat Regular',
padding: 35
},
scaleLabel: {
display: true,
labelString: 'июнь 2020 - июль 2020',
fontFamily: 'Montserrat Regular',
padding: 22
}
}],
scaleLabel: {
display: false
},
// xAxes: [{
// ticks: {
// suggestedMin: 0,
// suggestedMax: 100
// }
// }]
},
// scale: {
// gridLines: {
// // drawOnChartArea: false
// // display: false
// }
// },
tooltips: {
enabled: false
}
......@@ -2398,7 +2427,6 @@ document.addEventListener('DOMContentLoaded', () =>
borderCapStyle: 'square',
tension: 0,
radius: 0,
// label: false,
data: [1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
backgroundColor: '#f7f6fb',
borderWidth: 3,
......@@ -2407,30 +2435,44 @@ document.addEventListener('DOMContentLoaded', () =>
},
options: {
responsive: false,
legend: {
display: false
},
scales: {
yAxes: [{
gridLines: {
color: "#DDDCE8",
drawOnChartArea: false,
zeroLineColor: '#DDDCE8'
},
ticks: {
suggestedMin: 0,
suggestedMax: 2,
stepSize: 2
}
}],
scaleLabel: {
display: false
},
// xAxes: [{
// ticks: {
// suggestedMin: 0,
// suggestedMax: 100
// }
// }]
xAxes: [{
gridLines: {
drawOnChartArea: false,
color: "#DDDCE8",
tickMarkLength: 0,
zeroLineColor: '#DDDCE8'
},
ticks: {
fontFamily: 'Montserrat Regular',
padding: 35
},
scaleLabel: {
display: true,
labelString: 'июнь 2020 - июль 2020',
fontFamily: 'Montserrat Regular',
padding: 22
}
}],
gridLines: {
color: "#DDDCE8"
}
},
// scale: {
// gridLines: {
// // drawOnChartArea: false
// // display: false
// }
// },
tooltips: {
enabled: false
}
......
......@@ -464,9 +464,9 @@
<li>
<a href="profile-employee.html">Профиль - Сотрудник</a>
</li>
<!-- <li>
<li>
<a href="statistics-employer.html">Статистика</a>
</li> -->
</li>
</ul>
</div>
</div>
......
......@@ -319,7 +319,7 @@
</div>
<div class="block-mb-yellow">
<label for="birthday">Дата рождения</label>
<input type="text" name="birthday" id="birthday" data-picker="datepicker" pattern="/([0-2]\d|3[01])\.(0\d|1[012])\.(\d{4})/" placeholder="ВЫБЕРИТЕ ДАТУ" value="26.08.1980" disabled>
<input type="text" name="birthday" id="birthday" data-picker="datepicker" placeholder="ВЫБЕРИТЕ ДАТУ" value="26.08.1980" disabled>
</div>
<div class="block-gender block-mb-green">
<p>Пол:</p>
......
......@@ -342,7 +342,7 @@
<div class="tabs-content-block" data-tab="tab-extended-registration">
<div class="block-mb-yellow">
<label for="birthday">Дата рождения</label>
<input type="text" name="birthday" data-picker="datepicker" placeholder="ВЫБЕРИТЕ ДАТУ">
<input type="text" name="birthday" data-picker="datepicker" placeholder="ВЫБЕРИТЕ ДАТУ" disabled>
</div>
<div class="block-gender block-mb-green">
<p>Пол:</p>
......@@ -369,11 +369,11 @@
<div class="tabs-content-block" data-tab="tab-extended-registration">
<div class="block-mb-yellow">
<label for="email">E-mail <span>*</span></label>
<input type="text" name="email" id="email" placeholder="E-MAIL" pattern="^([a-z0-9_-]+\.)*[a-z0-9_-]+@[a-z0-9_-]+(\.[a-z0-9_-]+)*\.[a-z]{2,6}$" data-required="true">
<input type="text" name="email" id="email" placeholder="E-MAIL" pattern="^([a-z0-9_-]+\.)*[a-z0-9_-]+@[a-z0-9_-]+(\.[a-z0-9_-]+)*\.[a-z]{2,6}$" data-required="true" disabled>
</div>
<div class="block-mb-yellow">
<label for="address">Адрес</label>
<input type="text" name="address" id="address" placeholder="РЕГИОН / РАЙОН, ГОРОД / Н.П., УЛИЦА">
<input type="text" name="address" id="address" placeholder="РЕГИОН / РАЙОН, ГОРОД / Н.П., УЛИЦА" disabled>
</div>
</div>
<div class="block-mb-green">
......
......@@ -869,7 +869,7 @@
Профиль
</a>
<a href="#" class="button-text">
<img class="img-svg" src="./img/icon_my_table.svg" alt="">
<img class="img-svg" src="./img/icon_my_resumes.svg" alt="">
Мои вакансии
</a>
<a href="#" class="button-text">
......
......@@ -565,6 +565,15 @@
// }
// }
// }
.general-info .col-4, .general-info .col-6
{
flex: 0 0 100%;
max-width: 100%;
}
.general-info .col-6
{
margin-top: 24px;
}
.row-article .col-3, .row-article .col-4, .row-card .col-3, .row-card .col-4
{
padding-left: 16px;
......@@ -1169,6 +1178,15 @@
margin-bottom: 25px;
width: 100%;
}
.general-info-content
{
flex-direction: column;
align-items: flex-start;
}
.general-info-content-block__response
{
margin-left: 0;
}
}
@media(max-width: 450px)
{
......
......@@ -1764,7 +1764,7 @@ textarea:disabled
p
{
font-family: Montserrat Bold;
font-size: 16px;
// font-size: 16px;
font-stretch: normal;
font-style: normal;
line-height: normal;
......@@ -3747,7 +3747,7 @@ label
p
{
font-family:Montserrat Regular;
font-size: 16px;
// font-size: 16px;
font-weight: normal;
font-stretch: normal;
font-style: normal;
......@@ -4404,7 +4404,7 @@ ymaps[class$='pie-chart-content']
{
margin-right: 20px;
font-family: Montserrat Bold;
font-size: 16px;
// font-size: 16px;
font-stretch: normal;
font-style: normal;
......@@ -4478,8 +4478,7 @@ ymaps[class$='pie-chart-content']
p
{
font-family: Montserrat Bold;
font-size: 16px;
// font-size: 16px;
font-stretch: normal;
font-style: normal;
line-height: 30px;
......@@ -4493,7 +4492,7 @@ ymaps[class$='pie-chart-content']
p
{
font-family: Montserrat Regular;
font-size: 16px;
// font-size: 16px;
font-weight: normal;
font-stretch: normal;
font-style: normal;
......@@ -4660,7 +4659,7 @@ input[type="submit"]
p
{
font-family: Montserrat Regular;
font-size: 16px;
// font-size: 16px;
font-weight: normal;
font-stretch: normal;
font-style: normal;
......@@ -4694,13 +4693,17 @@ input[type="submit"]
max-width: 20px;
}
}
a.current-ref
.button-text.current-ref
{
color: $color-hover;
.img-svg path
{
fill: $color-hover;
}
p
{
color: $color-hover;
}
}
a:last-child
{
......@@ -4804,7 +4807,6 @@ input[type="submit"]
{
font-family: Raleway Bold;
font-size: 14px;
font-stretch: normal;
font-style: normal;
line-height: normal;
......@@ -5543,7 +5545,7 @@ form
p
{
font-family: Montserrat Bold;
font-size: 16px;
// font-size: 16px;
font-stretch: normal;
font-style: normal;
line-height: normal;
......@@ -5817,7 +5819,7 @@ form
p
{
font-family: Montserrat Bold;
font-size: 16px;
// font-size: 16px;
font-stretch: normal;
font-style: normal;
line-height: 1.88;
......@@ -5827,7 +5829,7 @@ form
{
margin-left: 40px;
font-family: Montserrat Regular;
font-size: 16px;
// font-size: 16px;
font-weight: normal;
font-stretch: normal;
font-style: normal;
......@@ -6151,7 +6153,7 @@ hr
p
{
font-family: Montserrat Bold;
font-size: 16px;
// font-size: 16px;
font-stretch: normal;
font-style: normal;
line-height: normal;
......@@ -6164,7 +6166,7 @@ hr
p
{
font-family: Montserrat Regular;
font-size: 16px;
// font-size: 16px;
font-weight: normal;
font-stretch: normal;
font-style: normal;
......@@ -6347,45 +6349,37 @@ hr
.general-info
{
&__title
{
}
&__content
&-content
{
&__block
display: flex;
align-items: center;
&-block
{
display: flex;
align-items: center;
span
{
display: block;
width: 10px;
height: 10px;
border-radius: 50%;
margin-right: 12px;
}
}
}
&__views
{
display: flex;
align-items: center;
span
&-block__views
{
display: block;
width: 10px;
height: 10px;
background-color: $color-ref;
border-radius: 50%;
margin-right: 12px;
span
{
background-color: $color-ref;
}
}
}
&__response
{
display: flex;
align-items: center;
margin-left: 30px;
span
&-block__response
{
display: block;
width: 10px;
height: 10px;
background-color: $color-hover;
border-radius: 50%;
margin-right: 12px;
margin-left: 30px;
span
{
background-color: $color-hover;
}
}
}
}
......
......@@ -343,44 +343,36 @@
<div class="block-mt-green">
<h3>Просмотры</h3>
<div class="block-mt-orange">
<canvas id="schedule-views" style="width: 923px; height: 200px;" data-schedule="true"></canvas>
<canvas id="schedule-views" style="width: 923px; height: 300px;" data-schedule="true"></canvas>
</div>
</div>
<div class="block-mt-yellow">
<h3>Отклики</h3>
<div class="block-mt-orange">
<canvas id="schedule-response" style="width: 923px; height: 200px;" data-schedule="true"></canvas>
<canvas id="schedule-response" style="width: 923px; height: 300px;" data-schedule="true"></canvas>
</div>
</div>
<div class="block-mt-blue">
<div class="container-compressed">
<div class="general-info">
<div class="block-mb-yellow general-info__title">
<div class="row">
<div class="col-4">
<h3>Тариф</h3>
</div>
<div class="col-6">
<h3>Всего</h3>
</div>
<div class="row">
<div class="col-4">
<h3>Тариф</h3>
<div class="block-mt-yellow">
<p>Базовый</p>
</div>
</div>
</div>
<div class="general-info__content">
<div class="row">
<div class="col-4">
<p>Базовый</p>
</div>
<div class="col-6">
<div class="general-info__content__block">
<div class="general-info__views">
<span></span>
<p>183 просмотра</p>
</div>
<div class="general-info__response">
<span></span>
<p>3 отлика</p>
</div>
</div>
<div class="col-6">
<h3>Всего</h3>
<div class="block-mt-yellow general-info-content">
<div class="general-info-content-block general-info-content-block__views">
<span></span>
<p>183 просмотра</p>
</div>
<div class="general-info-content-block general-info-content-block__response">
<span></span>
<p>3 отлика</p>
</div>
</div>
</div>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment