Убрал должность и подразделение из справки
This commit is contained in:
parent
0db26bb4af
commit
34ee7a77c5
21
index.html
21
index.html
@ -45,17 +45,6 @@
|
||||
<input type="text" id="fio" name="fio" placeholder="Иванов Иван Иванович" required>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group">
|
||||
<label for="position">Должность *</label>
|
||||
<input type="text" id="position" name="position" placeholder="Менеджер по продажам" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="department">Подразделение</label>
|
||||
<input type="text" id="department" name="department" placeholder="Отдел продаж">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group">
|
||||
<label for="employeeId">Табельный номер</label>
|
||||
@ -205,17 +194,11 @@
|
||||
Выдана в том, что <strong id="certFio">___________________________</strong>
|
||||
</p>
|
||||
<p id="certHireDateBlock" style="display:none;">
|
||||
работает(ет) в <strong id="certCompanyNameInline">___________________________</strong>
|
||||
работала(ет) в <strong id="certCompanyNameInline">___________________________</strong>
|
||||
с <span id="certHireDate">«___» ________ 20__ г.</span>
|
||||
</p>
|
||||
<p id="certHireDateEmpty" style="display:block;">
|
||||
работает(ет) в <strong id="certCompanyNameInline2">___________________________</strong>
|
||||
</p>
|
||||
<p>
|
||||
в должности <strong id="certPosition">___________________________</strong>
|
||||
</p>
|
||||
<p id="certDepartmentBlock" style="display:none;">
|
||||
подразделение: <strong id="certDepartment">___________________________</strong>
|
||||
работала(ет) в <strong id="certCompanyNameInline2">___________________________</strong>
|
||||
</p>
|
||||
<p id="certEmployeeIdBlock" style="display:none;">
|
||||
табельный номер: <strong id="certEmployeeId">______</strong>
|
||||
|
||||
15
script.js
15
script.js
@ -29,8 +29,6 @@ function updateCertificate() {
|
||||
companyBin: document.getElementById('companyBin').value,
|
||||
companyAddress: document.getElementById('companyAddress').value,
|
||||
fio: document.getElementById('fio').value || '___________________________',
|
||||
position: document.getElementById('position').value || '___________________________',
|
||||
department: document.getElementById('department').value,
|
||||
employeeId: document.getElementById('employeeId').value,
|
||||
employmentStatus: document.getElementById('employmentStatus').value,
|
||||
hireDate: document.getElementById('hireDate').value,
|
||||
@ -90,7 +88,6 @@ function updateCertificate() {
|
||||
|
||||
// Статус сотрудника
|
||||
document.getElementById('certFio').textContent = data.fio;
|
||||
document.getElementById('certPosition').textContent = data.position;
|
||||
|
||||
const hireDateBlock = document.getElementById('certHireDateBlock');
|
||||
const hireDateEmpty = document.getElementById('certHireDateEmpty');
|
||||
@ -105,9 +102,8 @@ function updateCertificate() {
|
||||
|
||||
// Если уволена - показываем дату увольнения
|
||||
if (data.employmentStatus === 'terminated' && data.terminationDate) {
|
||||
const termBlock = document.getElementById('certTerminationBlock');
|
||||
let termBlock = document.getElementById('certTerminationBlock');
|
||||
if (!termBlock) {
|
||||
// Создаём блок даты увольнения динамически
|
||||
const termParagraph = document.createElement('p');
|
||||
termParagraph.id = 'certTerminationBlock';
|
||||
termParagraph.innerHTML = 'по состоянию на дату увольнения: <strong id="certTerminationDate">' + terminationDateFormatted + '</strong>';
|
||||
@ -121,15 +117,6 @@ function updateCertificate() {
|
||||
if (termBlock) termBlock.style.display = 'none';
|
||||
}
|
||||
|
||||
// Подразделение и табельный номер
|
||||
const deptBlock = document.getElementById('certDepartmentBlock');
|
||||
if (data.department) {
|
||||
deptBlock.style.display = 'block';
|
||||
document.getElementById('certDepartment').textContent = data.department;
|
||||
} else {
|
||||
deptBlock.style.display = 'none';
|
||||
}
|
||||
|
||||
const empIdBlock = document.getElementById('certEmployeeIdBlock');
|
||||
if (data.employeeId) {
|
||||
empIdBlock.style.display = 'block';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user