hr: в мастере найма сначала место, затем кандидат и доступы.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -475,16 +475,6 @@ function hrHiringVal(name) {
|
||||
|
||||
function hrHiringValidate(step) {
|
||||
if (step === 1) {
|
||||
if (!hrHiringVal('last_name') || !hrHiringVal('first_name')) {
|
||||
hrHiringShowError('Укажите фамилию и имя.');
|
||||
return false;
|
||||
}
|
||||
if (!/^\d{10}$/.test(hrHiringVal('inn_code'))) {
|
||||
hrHiringShowError('ИНН должен содержать 10 цифр.');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (step === 2) {
|
||||
var loc = hrHiringVal('user_location_type');
|
||||
if (!loc) {
|
||||
hrHiringShowError('Выберите тип локации.');
|
||||
@@ -503,6 +493,16 @@ function hrHiringValidate(step) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (step === 2) {
|
||||
if (!hrHiringVal('last_name') || !hrHiringVal('first_name')) {
|
||||
hrHiringShowError('Укажите фамилию и имя.');
|
||||
return false;
|
||||
}
|
||||
if (!/^\d{10}$/.test(hrHiringVal('inn_code'))) {
|
||||
hrHiringShowError('ИНН должен содержать 10 цифр.');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,11 +21,11 @@
|
||||
<div style="display:flex; gap:0.5rem; padding:0.875rem 1.25rem 0;">
|
||||
<button type="button" class="hr-hire-step-btn" data-step="1" onclick="hrHiringGo(1)" style="flex:1; border:none; background:transparent; cursor:pointer; padding:0;">
|
||||
<div class="hr-hire-step-num" data-step="1" style="width:1.5rem; height:1.5rem; border-radius:999px; margin:0 auto 0.25rem; display:flex; align-items:center; justify-content:center; font-size:0.75rem; font-weight:600;">1</div>
|
||||
<div style="font-size:0.75rem; color:var(--color-muted-foreground);">{% trans "Кандидат" %}</div>
|
||||
<div style="font-size:0.75rem; color:var(--color-muted-foreground);">{% trans "Место" %}</div>
|
||||
</button>
|
||||
<button type="button" class="hr-hire-step-btn" data-step="2" onclick="hrHiringGo(2)" style="flex:1; border:none; background:transparent; cursor:pointer; padding:0;">
|
||||
<div class="hr-hire-step-num" data-step="2" style="width:1.5rem; height:1.5rem; border-radius:999px; margin:0 auto 0.25rem; display:flex; align-items:center; justify-content:center; font-size:0.75rem; font-weight:600;">2</div>
|
||||
<div style="font-size:0.75rem; color:var(--color-muted-foreground);">{% trans "Место" %}</div>
|
||||
<div style="font-size:0.75rem; color:var(--color-muted-foreground);">{% trans "Кандидат" %}</div>
|
||||
</button>
|
||||
<button type="button" class="hr-hire-step-btn" data-step="3" onclick="hrHiringGo(3)" style="flex:1; border:none; background:transparent; cursor:pointer; padding:0;">
|
||||
<div class="hr-hire-step-num" data-step="3" style="width:1.5rem; height:1.5rem; border-radius:999px; margin:0 auto 0.25rem; display:flex; align-items:center; justify-content:center; font-size:0.75rem; font-weight:600;">3</div>
|
||||
@@ -46,7 +46,7 @@
|
||||
{% endif %}
|
||||
|
||||
<div style="padding:1.25rem; display:flex; flex-direction:column; gap:0.75rem; min-height:14rem;">
|
||||
<div class="hr-hire-step" data-step="1">
|
||||
<div class="hr-hire-step" data-step="2" style="display:none;">
|
||||
<div style="display:grid; grid-template-columns:1fr 1fr; gap:0.75rem;">
|
||||
<div>
|
||||
<label style="display:block; font-size:0.8125rem; font-weight:500; margin-bottom:0.375rem;">{% trans "Фамилия " %}<span style="color:var(--color-destructive);">*</span></label>
|
||||
@@ -79,7 +79,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="hr-hire-step" data-step="2" style="display:none;">
|
||||
<div class="hr-hire-step" data-step="1">
|
||||
<div>
|
||||
<label style="display:block; font-size:0.8125rem; font-weight:500; margin-bottom:0.375rem;">{% trans "Тип локации " %}<span style="color:var(--color-destructive);">*</span></label>
|
||||
<select name="user_location_type" id="hr-hiring-loc-type" class="input" style="width:100%;" onchange="hrHiringLocToggle(this.value)">
|
||||
|
||||
Reference in New Issue
Block a user