Обновить templates/modal.html
This commit is contained in:
parent
9c3eb2fa95
commit
2ffa171e48
|
@ -1,7 +1,7 @@
|
||||||
<!-- Модальное окно -->
|
<!-- Модальное окно -->
|
||||||
<div id="client-modal" class="fixed inset-0 hidden bg-gray-800 bg-opacity-75 flex items-center justify-center z-50 overflow-y-auto">
|
<div id="client-modal" class="fixed inset-0 hidden bg-gray-800 bg-opacity-75 flex items-center justify-center z-50 overflow-y-auto">
|
||||||
<div class="bg-white rounded-lg p-6 w-11/12 max-w-6xl h-5/6 max-h-screen relative shadow-2xl flex flex-col">
|
<div class="bg-white rounded-lg p-6 w-11/12 max-w-6xl h-5/6 max-h-screen relative shadow-2xl flex flex-col">
|
||||||
<span id="close-modal" class="absolute top-2 right-4 text-xl cursor-pointer">×</span>
|
<span id="close-modal" class="absolute top-2 right-4 text-xl cursor-pointer"></span>
|
||||||
<h2 class="modal__content text-xl font-bold mb-4">Client Details</h2>
|
<h2 class="modal__content text-xl font-bold mb-4">Client Details</h2>
|
||||||
<div class="post intro-y overflow-hidden box mt-2 flex-1 overflow-y-auto">
|
<div class="post intro-y overflow-hidden box mt-2 flex-1 overflow-y-auto">
|
||||||
<div class="post__tabs nav-tabs flex flex-col sm:flex-row bg-gray-200 text-gray-600">
|
<div class="post__tabs nav-tabs flex flex-col sm:flex-row bg-gray-200 text-gray-600">
|
||||||
|
@ -95,9 +95,11 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="intro-y box p-4">
|
<div class="intro-y box p-4">
|
||||||
<div class="font-medium text-lg">Legal Status</div>
|
<div class="font-medium text-lg">Legal Status</div>
|
||||||
|
<span id="output"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="intro-y box p-4">
|
<div class="intro-y box p-4">
|
||||||
<div class="font-medium text-lg">Equal Opportunity</div>
|
<div class="font-medium text-lg">Equal Opportunity</div>
|
||||||
|
<span id="equal"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -129,7 +131,40 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
.then(data => {
|
.then(data => {
|
||||||
console.log("Ответ от сервера:", data);
|
console.log("Ответ от сервера:", data);
|
||||||
|
|
||||||
|
|
||||||
|
const getYesNo = val => val === "autorization-yes" ? "yes" : "no";
|
||||||
|
|
||||||
|
const lines = [
|
||||||
|
`Are you authorized to work in the US? ${getYesNo(data.autorization)}`,
|
||||||
|
`Will you now or in the future require sponsorship for employment visa status? ${getYesNo(data.sponsorship)}`,
|
||||||
|
`Are you authorized to work in Canada? ${getYesNo(data.autorization_canada)}`,
|
||||||
|
];
|
||||||
|
|
||||||
|
if (data.autorization_canada === "autorization-yes") {
|
||||||
|
lines.push(`(If Yes) What is your status in Canada? ${data["status-Canada"]}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
lines.push(`Are you authorized to work in the United Kingdom? ${getYesNo(data.autorization_uk)}`);
|
||||||
|
|
||||||
|
document.getElementById("output").innerHTML = lines.join("<br>");
|
||||||
|
|
||||||
|
const equalLines = [];
|
||||||
|
|
||||||
|
if (data["ethnicity-no-answer"] !== "on") {
|
||||||
|
equalLines.push(`What's your ethnicity? ${data.ethnicity}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (data["gender-no-answer"] !== "on") {
|
||||||
|
equalLines.push(`What's your gender? ${data.gender}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
equalLines.push(`Do you have a disability? ${data.disability}`);
|
||||||
|
equalLines.push(`Are you a veteran? ${data.veteran}`);
|
||||||
|
|
||||||
|
document.getElementById("equal").innerHTML = equalLines.join("<br>");
|
||||||
|
|
||||||
|
|
||||||
const education = data.education_list?.map(item => {
|
const education = data.education_list?.map(item => {
|
||||||
return `
|
return `
|
||||||
<div class="mb-4">
|
<div class="mb-4">
|
||||||
|
|
Loading…
Reference in New Issue