{"id":2128,"date":"2023-11-27T07:11:25","date_gmt":"2023-11-27T07:11:25","guid":{"rendered":"http:\/\/194.126.11.162\/%d8%a7%d9%84%d9%85%d9%8a%d8%b2%d8%a7%d9%86%d9%8a%d8%a9\/"},"modified":"2024-12-05T11:26:42","modified_gmt":"2024-12-05T11:26:42","slug":"medical-allowances","status":"publish","type":"page","link":"https:\/\/isf.gov.lb\/ar\/medical-allowances\/","title":{"rendered":"\u0627\u0644\u0645\u0633\u0627\u0639\u062f\u0627\u062a \u0627\u0644\u0645\u0631\u0636\u064a\u0629"},"content":{"rendered":"\r\n<section class=\"w-100 py-5 bg-cover bg-center bg-repeat-none d-flex align-items-end justify-content-center\" style=\"background-image: linear-gradient(to bottom right, rgba(255, 255, 255, 0.3), rgba(0, 84, 158, 0.3)), url('https:\/\/isf.gov.lb\/wp-content\/uploads\/2023\/10\/desktop-banner-2.png');height:40%\">\r\n    <h1 class=\"text-white fw-bold text-xl text-center text-capitalize\">\r\n        \u062e\u062f\u0645\u0627\u062a \u0627\u0644\u0645\u0648\u0627\u0637\u0646\u064a\u0646    <\/h1>\r\n<\/section>\n\n<section class=\"w-100 py-5 bg-cover bg-center bg-repeat-none bg-light-subtle\" style=\"background-image: url(https:\/\/isf.gov.lb\/wp-content\/themes\/ISF\/resources\/images\/lines_background.png);\">\r\n    <div class=\"d-flex flex-column align-items-center justify-content-center pb-5\">\r\n        <h2 class=\"fw-bold isf-text-primary\">\r\n            \u0627\u0644\u0645\u0633\u0627\u0639\u062f\u0627\u062a \u0627\u0644\u0645\u0631\u0636\u064a\u0629 \u0644\u0644\u0645\u062a\u0642\u0627\u0639\u062f\u064a\u0646         <\/h2>\r\n        <div class=\"row justify-content-center w-25\">\r\n            <hr class=\"col-1 mt-3 border-3 isf-border-primary opacity-100\" \/>\r\n        <\/div>\r\n    <\/div>\r\n    <div class=\"container mb-5\">\r\n        <div class=\"row px-3 justify-content-center\">\r\n            <div class=\"col-8  g-3\">\r\n                <input id=\"name\" data-field=\"name\" class=\"form-control form-control-lg fs-6 fw-bold rounded-pill bg-white border isf-border-primary\" placeholder=\" \u0627\u0644\u0627\u0633\u0645*\" required>\r\n            <\/div>\r\n        <\/div>\r\n        <div class=\"row px-3 justify-content-center\">\r\n            <div class=\"col-8  g-3\">\r\n                <input id=\"military_number\" data-field=\"military_number\" class=\"form-control form-control-lg fs-6 fw-bold rounded-pill bg-white border isf-border-primary\" placeholder=\" \u0627\u0644\u0631\u0642\u0645 \u0627\u0644\u0639\u0633\u0643\u0631\u064a*\" required>\r\n            <\/div>\r\n        <\/div>\r\n        <div class=\"d-flex justify-content-center align-items-center flex-column mt-5\">\r\n            <button type=\"button\" id=\"submitFormBtn\" onclick=\"submitForm()\" class=\"btn btn-primary fw-bold isf-btn-primary py-2 px-2 border-0 rounded-pill d-flex align-items-center justify-content-between mb-4\">\r\n                <i class=\"bi bi-chevron-right me-4 opacity-0\"><\/i>\r\n                \u0628\u062d\u062b                <i class=\"bi bi-chevron-right ms-4\"><\/i>\r\n            <\/button>\r\n        <\/div>\r\n        <div id=\"resultContainer\" class=\"row px-3 mt-3\">\r\n\r\n        <\/div>\r\n    <\/div>\r\n<\/section>\r\n<script>\r\n    function submitForm() {\r\n        $(\"#submitFormBtn\").attr(\"disabled\", true);\r\n        var formData = new FormData();\r\n        if ($(\"#name\").val() == '') {\r\n            $(\"#name\").addClass('is-invalid');\r\n            $(\"#submitFormBtn\").attr(\"disabled\", false);\r\n            return;\r\n        } else {\r\n            $(\"#name\").removeClass('is-invalid');\r\n        }\r\n\r\n        if ($(\"#military_number\").val() == '') {\r\n            $(\"#military_number\").addClass('is-invalid');\r\n            $(\"#submitFormBtn\").attr(\"disabled\", false);\r\n            return;\r\n        } else {\r\n            $(\"#military_number\").removeClass('is-invalid');\r\n        }\r\n        formData.append(\"name\", $(\"#name\").val());\r\n        formData.append(\"military_number\", $(\"#military_number\").val());\r\n        $.ajax({\r\n            type: \"POST\",\r\n            url: 'https:\/\/isf.gov.lb\/wp-content\/themes\/ISF\/services\/apis\/medical_aid.php',\r\n            data: formData,\r\n            processData: false,\r\n            contentType: false,\r\n            success: function(response) {\r\n                const container = document.getElementById('resultContainer');\r\n\r\n                \/\/ Clear previous results\r\n                container.innerHTML = '';\r\n\r\n                const json_response = JSON.parse(response);\r\n\r\n                if (json_response.length === 0) {\r\n                    const noDataHTML = `\r\n                <div class=\"alert alert-light isf-text-primary text-center fw-bold fs-5\" role=\"alert\">\r\n                   \u0644\u0627 \u064a\u0648\u062c\u062f \u0646\u062a\u0627\u0626\u062c                <\/div>`;\r\n                    container.insertAdjacentHTML('beforeend', noDataHTML);\r\n                } else {\r\n                    \/\/ Create table structure\r\n                    const tableHTML = `\r\n                <div class=\"card p-0 mb-4\">\r\n                    <div class=\"table-responsive\">\r\n                        <table class=\"table table-striped table-borderless m-0\">\r\n                            <thead class=\"table-dark\">\r\n                                <tr>\r\n                                    <th style=\"background-color: var(--isf-primary);\">\u0627\u0644\u0627\u0633\u0645<\/th>\r\n                                    <th style=\"background-color: var(--isf-primary);\">\u0627\u0644\u0645\u0628\u0644\u063a \u0627\u0644\u0635\u0627\u0641\u064a<\/th>\r\n                                    <th style=\"background-color: var(--isf-primary);\">\u0627\u0644\u0645\u0628\u0644\u063a \u0627\u0644\u0623\u0633\u0627\u0633\u064a<\/th>\r\n                                    <th style=\"background-color: var(--isf-primary);\">\u0631\u0642\u0645 \u0627\u0644\u0642\u0631\u0627\u0631<\/th>\r\n                                    <th style=\"background-color: var(--isf-primary);\">\u0627\u0644\u0639\u0644\u0627\u0642\u0629<\/th>\r\n                                    <th style=\"background-color: var(--isf-primary);\">\u0631\u0642\u0645 \u0627\u0644\u0645\u0634\u0631\u0648\u0639<\/th>\r\n                                    <th style=\"background-color: var(--isf-primary);\">\u0627\u0644\u062a\u0627\u0631\u064a\u062e<\/th>\r\n                                <\/tr>\r\n                            <\/thead>\r\n                            <tbody id=\"tableBody\">\r\n                                <!-- Rows will be inserted here -->\r\n                            <\/tbody>\r\n                        <\/table>\r\n                    <\/div>\r\n                <\/div>`;\r\n                    container.innerHTML = tableHTML;\r\n\r\n                    \/\/ Populate table rows\r\n                    const tableBody = document.getElementById('tableBody');\r\n                    json_response.forEach(item => {\r\n                        const rowHTML = `\r\n                    <tr>\r\n                        <td>${item.name}<\/td>\r\n                        <td>${item.valuesafi}<\/td>\r\n                        <td>${item.valueasasi}<\/td>\r\n                        <td>${item.numkarar || 'N\/A'}<\/td>\r\n                        <td>${item.alaka || 'N\/A'}<\/td>\r\n                        <td>${item.num_machroua}<\/td>\r\n                        <td>${item.dat || 'N\/A'}<\/td>\r\n                    <\/tr>`;\r\n                        tableBody.insertAdjacentHTML('beforeend', rowHTML);\r\n                    });\r\n                }\r\n\r\n                $(\"#submitFormBtn\").attr(\"disabled\", false);\r\n            },\r\n            error: function(xhr, status, error) {\r\n                console.log(error);\r\n                $(\"#submitFormBtn\").attr(\"disabled\", false);\r\n            }\r\n        });\r\n\r\n    }\r\n<\/script>","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"isf-members.php","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"class_list":["post-2128","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/isf.gov.lb\/ar\/wp-json\/wp\/v2\/pages\/2128","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/isf.gov.lb\/ar\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/isf.gov.lb\/ar\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/isf.gov.lb\/ar\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/isf.gov.lb\/ar\/wp-json\/wp\/v2\/comments?post=2128"}],"version-history":[{"count":12,"href":"https:\/\/isf.gov.lb\/ar\/wp-json\/wp\/v2\/pages\/2128\/revisions"}],"predecessor-version":[{"id":29863,"href":"https:\/\/isf.gov.lb\/ar\/wp-json\/wp\/v2\/pages\/2128\/revisions\/29863"}],"wp:attachment":[{"href":"https:\/\/isf.gov.lb\/ar\/wp-json\/wp\/v2\/media?parent=2128"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}