Compare commits
No commits in common. "pages" and "main" have entirely different histories.
571
index.html
571
index.html
@ -13,9 +13,9 @@
|
|||||||
|
|
||||||
body {
|
body {
|
||||||
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
||||||
background: #f5f7fa;
|
background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
color: #333;
|
color: #eee;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
@ -25,402 +25,228 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
header {
|
header {
|
||||||
background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
|
text-align: center;
|
||||||
padding: 25px 30px;
|
padding: 30px 0;
|
||||||
|
border-bottom: 2px solid #e94560;
|
||||||
margin-bottom: 30px;
|
margin-bottom: 30px;
|
||||||
box-shadow: 0 2px 10px rgba(0, 102, 204, 0.2);
|
|
||||||
border-bottom: 3px solid #00a0e3;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
header h1 {
|
header h1 {
|
||||||
color: #fff;
|
color: #e94560;
|
||||||
font-size: 1.8rem;
|
font-size: 2.5rem;
|
||||||
margin-bottom: 5px;
|
margin-bottom: 10px;
|
||||||
font-weight: 600;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
header p {
|
header p {
|
||||||
color: #e6f0ff;
|
color: #aaa;
|
||||||
font-size: 0.95rem;
|
font-size: 1.1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.filters {
|
.filters {
|
||||||
background: #fff;
|
background: rgba(255, 255, 255, 0.05);
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
border-radius: 4px;
|
border-radius: 10px;
|
||||||
margin-bottom: 25px;
|
margin-bottom: 30px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
gap: 15px;
|
gap: 15px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
border: 1px solid #e0e6ed;
|
|
||||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.filter-group {
|
.filter-group {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 6px;
|
gap: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.filter-group label {
|
.filter-group label {
|
||||||
font-size: 0.8rem;
|
font-size: 0.85rem;
|
||||||
color: #555;
|
color: #aaa;
|
||||||
font-weight: 500;
|
|
||||||
text-transform: uppercase;
|
|
||||||
letter-spacing: 0.5px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.filter-group input,
|
.filter-group input,
|
||||||
.filter-group select {
|
.filter-group select {
|
||||||
padding: 10px 14px;
|
padding: 10px 15px;
|
||||||
border: 1px solid #d0d9e2;
|
border: 1px solid #444;
|
||||||
border-radius: 4px;
|
border-radius: 5px;
|
||||||
background: #fff;
|
background: #1a1a2e;
|
||||||
color: #333;
|
color: #eee;
|
||||||
font-size: 0.95rem;
|
font-size: 1rem;
|
||||||
transition: border-color 0.2s;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.filter-group input:focus,
|
.filter-group input:focus,
|
||||||
.filter-group select:focus {
|
.filter-group select:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
border-color: #0066cc;
|
border-color: #e94560;
|
||||||
box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.stats {
|
.stats {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
||||||
gap: 15px;
|
gap: 15px;
|
||||||
margin-bottom: 25px;
|
margin-bottom: 30px;
|
||||||
}
|
|
||||||
|
|
||||||
.archive-toggle {
|
|
||||||
background: #fff;
|
|
||||||
padding: 15px 20px;
|
|
||||||
border-radius: 4px;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
border: 1px solid #e0e6ed;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 12px;
|
|
||||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
|
|
||||||
}
|
|
||||||
|
|
||||||
.archive-toggle input[type="checkbox"] {
|
|
||||||
width: 20px;
|
|
||||||
height: 20px;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.archive-toggle label {
|
|
||||||
font-size: 0.95rem;
|
|
||||||
color: #333;
|
|
||||||
font-weight: 500;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.stat-card {
|
.stat-card {
|
||||||
background: #fff;
|
background: linear-gradient(135deg, #e94560 0%, #c23a51 100%);
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
border-radius: 4px;
|
border-radius: 10px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
border-left: 4px solid #0066cc;
|
|
||||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.stat-card h3 {
|
.stat-card h3 {
|
||||||
font-size: 2.2rem;
|
font-size: 2rem;
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
color: #0066cc;
|
|
||||||
font-weight: 700;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.stat-card p {
|
.stat-card p {
|
||||||
font-size: 0.85rem;
|
font-size: 0.9rem;
|
||||||
color: #666;
|
opacity: 0.9;
|
||||||
text-transform: uppercase;
|
|
||||||
letter-spacing: 0.5px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.employees-grid {
|
.employees-grid {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(auto-fill, minmax(480px, 1fr));
|
grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
|
||||||
gap: 20px;
|
gap: 25px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.employee-card {
|
.employee-card {
|
||||||
background: #fff;
|
background: rgba(255, 255, 255, 0.05);
|
||||||
border-radius: 4px;
|
border-radius: 15px;
|
||||||
padding: 22px;
|
padding: 25px;
|
||||||
border: 1px solid #e0e6ed;
|
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||||
transition: all 0.2s;
|
transition: transform 0.3s, box-shadow 0.3s;
|
||||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.employee-card:hover {
|
.employee-card:hover {
|
||||||
box-shadow: 0 4px 12px rgba(0, 102, 204, 0.15);
|
transform: translateY(-5px);
|
||||||
border-color: #0066cc;
|
box-shadow: 0 10px 30px rgba(233, 69, 96, 0.2);
|
||||||
|
border-color: #e94560;
|
||||||
}
|
}
|
||||||
|
|
||||||
.employee-header {
|
.employee-header {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
margin-bottom: 18px;
|
margin-bottom: 20px;
|
||||||
padding-bottom: 15px;
|
padding-bottom: 15px;
|
||||||
border-bottom: 2px solid #e0e6ed;
|
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.employee-name {
|
.employee-name {
|
||||||
font-size: 1.3rem;
|
font-size: 1.4rem;
|
||||||
color: #0066cc;
|
color: #e94560;
|
||||||
margin-bottom: 6px;
|
margin-bottom: 5px;
|
||||||
font-weight: 600;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.employee-position {
|
.employee-position {
|
||||||
color: #666;
|
color: #aaa;
|
||||||
font-size: 0.95rem;
|
font-size: 1rem;
|
||||||
font-weight: 500;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.employee-number {
|
.employee-number {
|
||||||
background: #0066cc;
|
background: #e94560;
|
||||||
color: #fff;
|
padding: 5px 12px;
|
||||||
padding: 6px 14px;
|
border-radius: 20px;
|
||||||
border-radius: 4px;
|
|
||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
font-weight: 600;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.info-grid {
|
.info-grid {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(2, 1fr);
|
grid-template-columns: repeat(2, 1fr);
|
||||||
gap: 12px;
|
gap: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.info-item {
|
.info-item {
|
||||||
padding: 12px;
|
padding: 10px;
|
||||||
background: #f8fafc;
|
background: rgba(255, 255, 255, 0.03);
|
||||||
border-radius: 4px;
|
border-radius: 8px;
|
||||||
border: 1px solid #eef2f6;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.info-label {
|
.info-label {
|
||||||
font-size: 0.7rem;
|
font-size: 0.75rem;
|
||||||
color: #8898aa;
|
color: #888;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
letter-spacing: 0.8px;
|
margin-bottom: 5px;
|
||||||
margin-bottom: 6px;
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.info-value {
|
.info-value {
|
||||||
font-size: 0.95rem;
|
font-size: 0.95rem;
|
||||||
color: #333;
|
color: #eee;
|
||||||
font-weight: 500;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.highlight-1class {
|
.highlight-1class {
|
||||||
background: #fff8e6 !important;
|
background: rgba(255, 193, 7, 0.2) !important;
|
||||||
border-left: 3px solid #f0ad4e;
|
border-left: 3px solid #ffc107;
|
||||||
}
|
}
|
||||||
|
|
||||||
.highlight-11class {
|
.highlight-11class {
|
||||||
background: #e8f5e9 !important;
|
background: rgba(76, 175, 80, 0.2) !important;
|
||||||
border-left: 3px solid #4caf50;
|
border-left: 3px solid #4caf50;
|
||||||
}
|
}
|
||||||
|
|
||||||
.children-section {
|
.children-section {
|
||||||
margin-top: 18px;
|
margin-top: 15px;
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
background: #f8fafc;
|
background: rgba(255, 255, 255, 0.03);
|
||||||
border-radius: 4px;
|
border-radius: 10px;
|
||||||
border: 1px solid #eef2f6;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.children-section h4 {
|
.children-section h4 {
|
||||||
color: #0066cc;
|
color: #e94560;
|
||||||
margin-bottom: 12px;
|
margin-bottom: 10px;
|
||||||
font-size: 0.95rem;
|
font-size: 1rem;
|
||||||
font-weight: 600;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.child-item {
|
.child-item {
|
||||||
padding: 10px;
|
padding: 8px;
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
background: #fff;
|
background: rgba(255, 255, 255, 0.05);
|
||||||
border-radius: 4px;
|
border-radius: 5px;
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
border: 1px solid #eef2f6;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.vacation-section {
|
.vacation-section {
|
||||||
margin-top: 18px;
|
margin-top: 15px;
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
background: #e8f4fd;
|
background: rgba(233, 69, 96, 0.1);
|
||||||
border-radius: 4px;
|
border-radius: 10px;
|
||||||
border: 1px solid #b3d9f2;
|
border: 1px solid rgba(233, 69, 96, 0.3);
|
||||||
}
|
}
|
||||||
|
|
||||||
.vacation-section h4 {
|
.vacation-section h4 {
|
||||||
color: #0066cc;
|
color: #e94560;
|
||||||
margin-bottom: 12px;
|
margin-bottom: 10px;
|
||||||
font-size: 0.95rem;
|
font-size: 1rem;
|
||||||
font-weight: 600;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.vacation-item {
|
.vacation-item {
|
||||||
padding: 10px;
|
padding: 8px;
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
background: #fff;
|
background: rgba(255, 255, 255, 0.05);
|
||||||
border-radius: 4px;
|
border-radius: 5px;
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
border: 1px solid #eef2f6;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.location-badge {
|
.location-badge {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
background: #e8f4fd;
|
background: rgba(33, 150, 243, 0.2);
|
||||||
color: #0066cc;
|
color: #2196f3;
|
||||||
padding: 6px 12px;
|
padding: 5px 10px;
|
||||||
border-radius: 4px;
|
border-radius: 5px;
|
||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
font-weight: 500;
|
|
||||||
margin-top: 15px;
|
|
||||||
border: 1px solid #b3d9f2;
|
|
||||||
}
|
|
||||||
|
|
||||||
.decoration-badge {
|
|
||||||
display: inline-block;
|
|
||||||
background: #fff3cd;
|
|
||||||
color: #856404;
|
|
||||||
padding: 6px 12px;
|
|
||||||
border-radius: 4px;
|
|
||||||
font-size: 0.85rem;
|
|
||||||
font-weight: 500;
|
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
border: 1px solid #ffc107;
|
|
||||||
}
|
|
||||||
|
|
||||||
.substitute-info {
|
|
||||||
margin-top: 12px;
|
|
||||||
padding: 12px;
|
|
||||||
background: #e8f5e9;
|
|
||||||
border-radius: 4px;
|
|
||||||
border: 1px solid #a5d6a7;
|
|
||||||
font-size: 0.9rem;
|
|
||||||
color: #2e7d32;
|
|
||||||
}
|
|
||||||
|
|
||||||
.substitute-info strong {
|
|
||||||
display: block;
|
|
||||||
margin-bottom: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.modal-overlay {
|
|
||||||
display: none;
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
background: rgba(0, 0, 0, 0.5);
|
|
||||||
z-index: 1000;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.modal-overlay.active {
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
|
|
||||||
.modal {
|
|
||||||
background: #fff;
|
|
||||||
border-radius: 8px;
|
|
||||||
max-width: 600px;
|
|
||||||
width: 90%;
|
|
||||||
max-height: 80vh;
|
|
||||||
overflow-y: auto;
|
|
||||||
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
|
|
||||||
}
|
|
||||||
|
|
||||||
.modal-header {
|
|
||||||
background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
|
|
||||||
color: #fff;
|
|
||||||
padding: 20px;
|
|
||||||
border-radius: 8px 8px 0 0;
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.modal-header h3 {
|
|
||||||
font-size: 1.2rem;
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
|
|
||||||
.modal-close {
|
|
||||||
background: none;
|
|
||||||
border: none;
|
|
||||||
color: #fff;
|
|
||||||
font-size: 1.5rem;
|
|
||||||
cursor: pointer;
|
|
||||||
padding: 0;
|
|
||||||
line-height: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.modal-body {
|
|
||||||
padding: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.notification-item {
|
|
||||||
padding: 15px;
|
|
||||||
margin-bottom: 12px;
|
|
||||||
border-radius: 6px;
|
|
||||||
border-left: 4px solid;
|
|
||||||
}
|
|
||||||
|
|
||||||
.notification-item.urgent {
|
|
||||||
background: #fff3cd;
|
|
||||||
border-color: #ffc107;
|
|
||||||
color: #856404;
|
|
||||||
}
|
|
||||||
|
|
||||||
.notification-item.warning {
|
|
||||||
background: #f8d7da;
|
|
||||||
border-color: #dc3545;
|
|
||||||
color: #721c24;
|
|
||||||
}
|
|
||||||
|
|
||||||
.notification-item.info {
|
|
||||||
background: #d1ecf1;
|
|
||||||
border-color: #17a2b8;
|
|
||||||
color: #0c5460;
|
|
||||||
}
|
|
||||||
|
|
||||||
.notification-item h4 {
|
|
||||||
margin-bottom: 5px;
|
|
||||||
font-size: 1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.notification-item p {
|
|
||||||
font-size: 0.9rem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.no-results {
|
.no-results {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 60px;
|
padding: 50px;
|
||||||
color: #8898aa;
|
color: #888;
|
||||||
font-size: 1.1rem;
|
font-size: 1.2rem;
|
||||||
grid-column: 1 / -1;
|
grid-column: 1 / -1;
|
||||||
background: #fff;
|
|
||||||
border-radius: 4px;
|
|
||||||
border: 1px solid #e0e6ed;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
@ -444,10 +270,6 @@
|
|||||||
.filter-group select {
|
.filter-group select {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
header h1 {
|
|
||||||
font-size: 1.4rem;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
@ -455,14 +277,9 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<header>
|
<header>
|
||||||
<h1>📋 Карточки сотрудников СОК-1 СД</h1>
|
<h1>📋 Карточки сотрудников СОК-1 СД</h1>
|
||||||
<p>Корпоративная система управления персоналом | АО «Казахтелеком»</p>
|
<p>Внутренняя система учёта кадров</p>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div class="archive-toggle">
|
|
||||||
<input type="checkbox" id="archiveFilter" onchange="applyFilters()">
|
|
||||||
<label for="archiveFilter">📁 Показать архив (уволенные сотрудники)</label>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="filters">
|
<div class="filters">
|
||||||
<div class="filter-group">
|
<div class="filter-group">
|
||||||
<label>🔍 Поиск</label>
|
<label>🔍 Поиск</label>
|
||||||
@ -525,18 +342,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Modal для уведомлений -->
|
|
||||||
<div class="modal-overlay" id="notificationModal">
|
|
||||||
<div class="modal">
|
|
||||||
<div class="modal-header">
|
|
||||||
<h3>🔔 Уведомления</h3>
|
|
||||||
<button class="modal-close" onclick="closeModal()">×</button>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body" id="notificationBody">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
const employees = [
|
const employees = [
|
||||||
{
|
{
|
||||||
@ -664,52 +469,6 @@
|
|||||||
{ start: "15.09.2025", end: "28.09.2025" }
|
{ start: "15.09.2025", end: "28.09.2025" }
|
||||||
],
|
],
|
||||||
location: "Хозяйственный отдел"
|
location: "Хозяйственный отдел"
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 7,
|
|
||||||
tabNumber: "001240",
|
|
||||||
fullName: "Нурова Айгуль Ержановна",
|
|
||||||
birthDate: "12.06.1992",
|
|
||||||
age: 34,
|
|
||||||
position: "Менеджер по кадрам",
|
|
||||||
familyStatus: "Замужем",
|
|
||||||
children: [
|
|
||||||
{ name: "Нуров Али", age: 2, school: "До 3 лет" }
|
|
||||||
],
|
|
||||||
address: "г. Алматы, ул. Абылай хана 33, кв. 67",
|
|
||||||
phone: "+7 (777) 789-01-23",
|
|
||||||
experience: "6 лет",
|
|
||||||
experienceYears: 6,
|
|
||||||
vacations: [
|
|
||||||
{ start: "01.09.2025", end: "14.09.2025", type: "Ежегодный" },
|
|
||||||
{ start: "15.01.2026", end: "15.07.2026", type: "Декретный" }
|
|
||||||
],
|
|
||||||
location: "Отдел кадров",
|
|
||||||
onDecree: true,
|
|
||||||
substitute: "Ахметова Гульнара Ерлановна"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 8,
|
|
||||||
tabNumber: "001241",
|
|
||||||
fullName: "Ибраев Болатбек Серикович",
|
|
||||||
birthDate: "25.03.1975",
|
|
||||||
age: 51,
|
|
||||||
position: "Главный бухгалтер",
|
|
||||||
familyStatus: "Женат",
|
|
||||||
children: [
|
|
||||||
{ name: "Ибраева Сауле", age: 25, school: "Работает" }
|
|
||||||
],
|
|
||||||
address: "г. Алматы, ул. Желтоксан 88, кв. 12",
|
|
||||||
phone: "+7 (777) 890-12-34",
|
|
||||||
experience: "28 лет",
|
|
||||||
experienceYears: 28,
|
|
||||||
vacations: [
|
|
||||||
{ start: "10.06.2025", end: "24.06.2025" }
|
|
||||||
],
|
|
||||||
location: "Бухгалтерия",
|
|
||||||
dismissed: true,
|
|
||||||
dismissDate: "15.01.2025",
|
|
||||||
dismissReason: "По собственному желанию"
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -724,110 +483,22 @@
|
|||||||
return age;
|
return age;
|
||||||
}
|
}
|
||||||
|
|
||||||
function parseDate(dateStr) {
|
|
||||||
const parts = dateStr.split('.');
|
|
||||||
return new Date(parts[2], parts[1] - 1, parts[0]);
|
|
||||||
}
|
|
||||||
|
|
||||||
function isWithinMonth(dateStr) {
|
|
||||||
if (!dateStr) return false;
|
|
||||||
const targetDate = parseDate(dateStr);
|
|
||||||
const today = new Date();
|
|
||||||
const oneMonthFromNow = new Date();
|
|
||||||
oneMonthFromNow.setMonth(oneMonthFromNow.getMonth() + 1);
|
|
||||||
|
|
||||||
return targetDate >= today && targetDate <= oneMonthFromNow;
|
|
||||||
}
|
|
||||||
|
|
||||||
function getUpcomingNotifications() {
|
|
||||||
const notifications = [];
|
|
||||||
const today = new Date();
|
|
||||||
|
|
||||||
employees.forEach(emp => {
|
|
||||||
if (emp.dismissed) return; // Не показывать уведомления для уволенных
|
|
||||||
|
|
||||||
// Проверка отпусков
|
|
||||||
if (emp.vacations) {
|
|
||||||
emp.vacations.forEach(vac => {
|
|
||||||
// Уведомление за месяц до начала отпуска
|
|
||||||
if (isWithinMonth(vac.start)) {
|
|
||||||
notifications.push({
|
|
||||||
type: 'urgent',
|
|
||||||
title: `Отпуск: ${emp.fullName}`,
|
|
||||||
message: `Начало отпуска ${vac.start} (${vac.type || 'ежегодный'}). Табельный № ${emp.tabNumber}`
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// Уведомление о выходе из декрета
|
|
||||||
if (vac.type === 'Декретный' && vac.end) {
|
|
||||||
if (isWithinMonth(vac.end)) {
|
|
||||||
notifications.push({
|
|
||||||
type: 'warning',
|
|
||||||
title: `Выход из декрета: ${emp.fullName}`,
|
|
||||||
message: `Выход на работу ${vac.end}. Замещающий: ${emp.substitute || 'не назначен'}`
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// Уведомление о декрете за месяц до начала
|
|
||||||
if (emp.onDecree) {
|
|
||||||
const decreeStart = emp.vacations?.find(v => v.type === 'Декретный')?.start;
|
|
||||||
if (decreeStart && isWithinMonth(decreeStart)) {
|
|
||||||
notifications.push({
|
|
||||||
type: 'info',
|
|
||||||
title: `Декретный отпуск: ${emp.fullName}`,
|
|
||||||
message: `Начало декрета ${decreeStart}. Замещает: ${emp.substitute || 'не назначен'}`
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return notifications;
|
|
||||||
}
|
|
||||||
|
|
||||||
function showNotifications() {
|
|
||||||
const notifications = getUpcomingNotifications();
|
|
||||||
const modal = document.getElementById('notificationModal');
|
|
||||||
const body = document.getElementById('notificationBody');
|
|
||||||
|
|
||||||
if (notifications.length === 0) {
|
|
||||||
body.innerHTML = '<p style="color: #28a745; text-align: center; padding: 20px;">✅ Новых уведомлений нет</p>';
|
|
||||||
} else {
|
|
||||||
body.innerHTML = notifications.map(n => `
|
|
||||||
<div class="notification-item ${n.type}">
|
|
||||||
<h4>${n.title}</h4>
|
|
||||||
<p>${n.message}</p>
|
|
||||||
</div>
|
|
||||||
`).join('');
|
|
||||||
}
|
|
||||||
|
|
||||||
modal.classList.add('active');
|
|
||||||
}
|
|
||||||
|
|
||||||
function closeModal() {
|
|
||||||
document.getElementById('notificationModal').classList.remove('active');
|
|
||||||
}
|
|
||||||
|
|
||||||
function renderEmployees(data) {
|
function renderEmployees(data) {
|
||||||
const grid = document.getElementById('employeesGrid');
|
const grid = document.getElementById('employeesGrid');
|
||||||
grid.innerHTML = '';
|
grid.innerHTML = '';
|
||||||
|
|
||||||
if (data.length === 0) {
|
if (data.length === 0) {
|
||||||
const archiveFilter = document.getElementById('archiveFilter');
|
grid.innerHTML = '<div class="no-results">😕 Сотрудники не найдены</div>';
|
||||||
const showArchived = archiveFilter ? archiveFilter.checked : false;
|
|
||||||
grid.innerHTML = '<div class="no-results">' + (showArchived ? '😕 В архиве нет сотрудников' : '😕 Сотрудники не найдены') + '</div>';
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
data.forEach(emp => {
|
data.forEach(emp => {
|
||||||
const childrenUnder14 = emp.children ? emp.children.filter(c => c.age < 14) : [];
|
const childrenUnder14 = emp.children.filter(c => c.age < 14);
|
||||||
const firstGraders = emp.children ? emp.children.filter(c => c.age >= 6 && c.age <= 7) : [];
|
const firstGraders = emp.children.filter(c => c.age >= 6 && c.age <= 7);
|
||||||
const eleventhGraders = emp.children ? emp.children.filter(c => c.age >= 17 && c.age <= 18) : [];
|
const eleventhGraders = emp.children.filter(c => c.age >= 17 && c.age <= 18);
|
||||||
|
|
||||||
let childrenHtml = '';
|
let childrenHtml = '';
|
||||||
if (emp.children && emp.children.length > 0) {
|
if (emp.children.length > 0) {
|
||||||
childrenHtml = '<div class="children-section"><h4>👶 Дети (' + emp.children.length + ')</h4>';
|
childrenHtml = '<div class="children-section"><h4>👶 Дети (' + emp.children.length + ')</h4>';
|
||||||
emp.children.forEach(child => {
|
emp.children.forEach(child => {
|
||||||
let childClass = '';
|
let childClass = '';
|
||||||
@ -849,29 +520,14 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
let vacationHtml = '';
|
let vacationHtml = '';
|
||||||
if (emp.vacations && emp.vacations.length > 0) {
|
if (emp.vacations.length > 0) {
|
||||||
vacationHtml = '<div class="vacation-section"><h4>🏖 Отпуска</h4>';
|
vacationHtml = '<div class="vacation-section"><h4>🏖 Отпуска 2025</h4>';
|
||||||
emp.vacations.forEach(vac => {
|
emp.vacations.forEach(vac => {
|
||||||
vacationHtml += '<div class="vacation-item"><span>📅 ' + vac.start + ' — ' + vac.end + (vac.type ? ' (' + vac.type + ')' : '') + '</span></div>';
|
vacationHtml += '<div class="vacation-item"><span>📅 ' + vac.start + ' — ' + vac.end + '</span></div>';
|
||||||
});
|
});
|
||||||
vacationHtml += '</div>';
|
vacationHtml += '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
let decreeBadge = '';
|
|
||||||
if (emp.onDecree) {
|
|
||||||
decreeBadge = '<div class="decoration-badge">🤰 В декретном отпуске</div>';
|
|
||||||
}
|
|
||||||
|
|
||||||
let substituteHtml = '';
|
|
||||||
if (emp.substitute) {
|
|
||||||
substituteHtml = '<div class="substitute-info"><strong>👤 Временно замещает:</strong>' + emp.substitute + '</div>';
|
|
||||||
}
|
|
||||||
|
|
||||||
let dismissInfo = '';
|
|
||||||
if (emp.dismissed) {
|
|
||||||
dismissInfo = '<div class="vacation-section" style="background: #f8d7da; border-color: #dc3545;"><h4 style="color: #dc3545;">❌ Уволен</h4><div class="vacation-item"><span>📅 Дата: ' + emp.dismissDate + '</span></div><div class="vacation-item"><span>📝 Причина: ' + emp.dismissReason + '</span></div></div>';
|
|
||||||
}
|
|
||||||
|
|
||||||
const card = document.createElement('div');
|
const card = document.createElement('div');
|
||||||
card.className = 'employee-card';
|
card.className = 'employee-card';
|
||||||
card.innerHTML = `
|
card.innerHTML = `
|
||||||
@ -906,9 +562,6 @@
|
|||||||
</div>
|
</div>
|
||||||
${childrenHtml}
|
${childrenHtml}
|
||||||
${vacationHtml}
|
${vacationHtml}
|
||||||
${dismissInfo}
|
|
||||||
${decreeBadge}
|
|
||||||
${substituteHtml}
|
|
||||||
<div class="location-badge">📍 ${emp.location}</div>
|
<div class="location-badge">📍 ${emp.location}</div>
|
||||||
`;
|
`;
|
||||||
grid.appendChild(card);
|
grid.appendChild(card);
|
||||||
@ -938,21 +591,14 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function applyFilters() {
|
function filterEmployees() {
|
||||||
const searchTerm = document.getElementById('searchInput').value.toLowerCase();
|
const searchTerm = document.getElementById('searchInput').value.toLowerCase();
|
||||||
const location = document.getElementById('locationFilter').value;
|
const location = document.getElementById('locationFilter').value;
|
||||||
const childrenFilter = document.getElementById('childrenFilter').value;
|
const childrenFilter = document.getElementById('childrenFilter').value;
|
||||||
const experienceFilter = document.getElementById('experienceFilter').value;
|
const experienceFilter = document.getElementById('experienceFilter').value;
|
||||||
const familyFilter = document.getElementById('familyFilter').value;
|
const familyFilter = document.getElementById('familyFilter').value;
|
||||||
const archiveFilter = document.getElementById('archiveFilter');
|
|
||||||
const showArchived = archiveFilter ? archiveFilter.checked : false;
|
|
||||||
|
|
||||||
// Сначала фильтруем по архиву
|
let filtered = employees.filter(emp => {
|
||||||
let baseFiltered = employees.filter(emp => {
|
|
||||||
return showArchived ? emp.dismissed : !emp.dismissed;
|
|
||||||
});
|
|
||||||
|
|
||||||
let filtered = baseFiltered.filter(emp => {
|
|
||||||
const matchSearch = emp.fullName.toLowerCase().includes(searchTerm) ||
|
const matchSearch = emp.fullName.toLowerCase().includes(searchTerm) ||
|
||||||
emp.position.toLowerCase().includes(searchTerm) ||
|
emp.position.toLowerCase().includes(searchTerm) ||
|
||||||
emp.phone.includes(searchTerm) ||
|
emp.phone.includes(searchTerm) ||
|
||||||
@ -992,22 +638,15 @@
|
|||||||
updateStats(filtered);
|
updateStats(filtered);
|
||||||
}
|
}
|
||||||
|
|
||||||
document.getElementById('searchInput').addEventListener('input', applyFilters);
|
document.getElementById('searchInput').addEventListener('input', filterEmployees);
|
||||||
document.getElementById('locationFilter').addEventListener('change', applyFilters);
|
document.getElementById('locationFilter').addEventListener('change', filterEmployees);
|
||||||
document.getElementById('childrenFilter').addEventListener('change', applyFilters);
|
document.getElementById('childrenFilter').addEventListener('change', filterEmployees);
|
||||||
document.getElementById('experienceFilter').addEventListener('change', applyFilters);
|
document.getElementById('experienceFilter').addEventListener('change', filterEmployees);
|
||||||
document.getElementById('familyFilter').addEventListener('change', applyFilters);
|
document.getElementById('familyFilter').addEventListener('change', filterEmployees);
|
||||||
|
|
||||||
// Показываем уведомления при загрузке
|
|
||||||
window.addEventListener('load', function() {
|
|
||||||
setTimeout(function() {
|
|
||||||
showNotifications();
|
|
||||||
}, 500);
|
|
||||||
});
|
|
||||||
|
|
||||||
populateLocationFilter();
|
populateLocationFilter();
|
||||||
renderEmployees(employees.filter(emp => !emp.dismissed));
|
renderEmployees(employees);
|
||||||
updateStats(employees.filter(emp => !emp.dismissed));
|
updateStats(employees);
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user