


<form role="form" id="form-add-residence">
    <input type="hidden" name="user_id" value="<?php echo e($userId); ?>">
    <input type="hidden" name="type" value="0">
    <div class="form-body">
        <div class="row">
            <div class="col-md-4">
                <div class="form-group">
                    <label>1. Họ và tên</label>
                    <input type="text" class="form-control" name="name" value="<?php echo e(optional($residence)->name); ?>">
                    <span class="help-block"> Viết chữ in hoa đủ dấu </span>
                </div>
            </div>
            <div class="col-md-4">

                <div class="form-group">
                    <label>2. Họ và tên gọi khác (nếu có):</label>
                    <input type="text" class="form-control" name="other_name"
                           value="<?php echo e(optional($residence)->other_name); ?>">
                </div>
            </div>
            <div class="col-md-4">

                <div class="form-group">
                    <label>3. Ngày, tháng, năm sinh</label>
                    <input type="text" class="form-control datepicker" name="birthday"
                           value="<?php echo e(optional($residence)->birthday); ?>">
                </div>
            </div>

        </div>
        <div class="row">
            <div class="col-md-4">
                <div class="form-group">
                    <label>4. Giới tính</label>
                    <input type="text" class="form-control" name="gender" value="<?php echo e(optional($residence)->gender); ?>">
                </div>
            </div>
            <div class="col-md-4">

                <div class="form-group">
                    <label>5. Nơi sinh</label>
                    <input type="text" class="form-control" name="birth_location"
                           value="<?php echo e(optional($residence)->birth_location); ?>">
                </div>
            </div>
            <div class="col-md-4">

                <div class="form-group">
                    <label>6. Nguyên quán</label>
                    <input type="text" class="form-control" name="hometown"
                           value="<?php echo e(optional($residence)->hometown); ?>">
                </div>
            </div>

        </div>
        <div class="row">
            <div class="col-md-4">
                <div class="form-group">
                    <label>7. Dân tộc</label>
                    <input type="text" class="form-control" name="folk" value="<?php echo e(optional($residence)->folk); ?>">
                </div>
            </div>
            <div class="col-md-4">

                <div class="form-group">
                    <label>8. Tôn giáo</label>
                    <input type="text" class="form-control" name="religion"
                           value="<?php echo e(optional($residence)->religion); ?>">
                </div>
            </div>
            <div class="col-md-4">

                <div class="form-group">
                    <label>9. Quốc tịch</label>
                    <input type="text" class="form-control" name="nationality"
                           value="<?php echo e(optional($residence)->nationality); ?>">
                </div>
            </div>

        </div>
        <div class="row">
            <div class="col-md-4">
                <div class="form-group">
                    <label>10. CMND số</label>
                    <input type="text" class="form-control" name="id_number"
                           value="<?php echo e(optional($residence)->id_number); ?>">
                </div>
            </div>
            <div class="col-md-4">

                <div class="form-group">
                    <label>11. Hộ chiếu số</label>
                    <input type="text" class="form-control" name="passport_number"
                           value="<?php echo e(optional($residence)->passport_number); ?>">
                </div>
            </div>
            <div class="col-md-4">

                <div class="form-group">
                    <label>12. Nơi thường trú</label>
                    <input type="text" class="form-control" name="residence_location"
                           value="<?php echo e(optional($residence)->residence_location); ?>">
                </div>
            </div>

        </div>
        <div class="row">
            <div class="col-md-4">
                <div class="form-group">
                    <label>13. Địa chỉ chỗ ở hiện nay</label>
                    <input type="text" class="form-control" name="current_address"
                           value="<?php echo e(optional($residence)->current_address); ?>">
                </div>
            </div>
            <div class="col-md-4">

                <div class="form-group">
                    <label>14. Trình độ học vấn</label>
                    <input type="text" class="form-control" name="learning"
                           value="<?php echo e(optional($residence)->learning); ?>">
                    <span class="help-block">Ghi rõ trình độ học vấn cao nhất (Tiến sỹ, Thạc sỹ, Đại học, Cao đẳng, Trung cấp, tốt nghiệp phổ thông trung học,
                        tốt nghiệp phổ thông cơ sở...; nếu không biết chữ thì ghi rõ "không biết chữ")</span>
                </div>
            </div>
            <div class="col-md-4">

                <div class="form-group">
                    <label>15. Trình độ chuyên môn</label>
                    <input type="text" class="form-control" name="skill" value="<?php echo e(optional($residence)->skill); ?>">
                    <span class="help-block"> Ghi rõ chuyên ngành được đào tạo hoặc trình độ tay nghề, bậc thợ, chuyên môn
                        kỹ thuật khác được ghi trong văn bằng, chứng chỉ.</span>
                </div>
            </div>

        </div>
        <div class="row">
            <div class="col-md-4">
                <div class="form-group">
                    <label>16. Biết tiếng dân tộc</label>
                    <input type="text" class="form-control" name="folk_lang" value="<?php echo e(optional($residence)->folk_lang); ?>">
                </div>
            </div>
            <div class="col-md-4">

                <div class="form-group">
                    <label>17. Trình độ ngoại ngữ</label>
                    <input type="text" class="form-control" name="foreign_lang" value="<?php echo e(optional($residence)->foreign_lang); ?>">
                </div>
            </div>
            <div class="col-md-4">

                <div class="form-group">
                    <label>18. Nghề nghiệp, nơi làm việc</label>
                    <input type="text" class="form-control" name="job" value="<?php echo e(optional($residence)->job); ?>">
                </div>
            </div>

        </div>

        <div class="row">
            <div class="col-md-12">
                <div class="form-group">
                    <label>19. Tóm tắt về bản thân (Từ đủ 14 tuổi trở lên đến nay ở đâu, làm gì)</label>
                    <table class="table table-bordered table-hover">

                        <tbody id="table-summarize">
                        <tr>
                            <td><strong>Từ tháng, năm đến tháng, năm</strong></td>
                            <td style="text-align: center"><strong>Chỗ ở</strong><br>
                                (Ghi rõ số nhà, đường phố; thôn, xóm, làng, ấp, bản, buôn, phum, sóc; xã/ phường/thị
                                trấn; quận/ huyện; tỉnh/ thành phố. Nếu ở nước ngoài thì ghi rõ tên nước)
                            </td>
                            <td><strong>Nghề nghiệp, nơi làm việc</strong></td>
                        </tr>
                        <?php if(!empty((optional($residence)->summarize_yourself))): ?>


                            <?php $__currentLoopData = $residence->summarize_yourself; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $yourself): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <tr>
                                    <td><?php echo e($yourself['date']); ?></td>
                                    <td><?php echo e($yourself['location']); ?></td>
                                    <td><?php echo e($yourself['job']); ?></td>
                                </tr>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        <?php endif; ?>
                        </tbody>
                    </table>
                    <button type="button" class="btn green-meadow btn-add-row">Thêm tóm tắt</button>
                </div>
            </div>
        </div>

        <div class="row">
            <div class="col-md-12">
                <div class="form-group">
                    <label>20. Tiền án (Tội danh, hình phạt, theo bản án số, ngày, tháng, năm của Tòa án)</label>
                    <textarea class="form-control" name="criminal"
                              rows="5"><?php echo e(optional($residence)->criminal); ?></textarea>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-md-12">
                <div class="form-group">
                    <label> 21. Tóm tắt về gia đình (Bố, mẹ; vợ/chồng; con; anh, chị, em ruột)</label>
                    <table class="table table-bordered table-hover">

                        <tbody id="table-summarize-family">
                        <tr>
                            <td><strong>TT</strong></td>
                            <td style="text-align: center"><strong>Họ và tên</strong><br>
                            </td>
                            <td><strong>Ngày, tháng, năm sinh</strong></td>
                            <td><strong>Giới tính</strong></td>
                            <td><strong>Quan hệ</strong></td>
                            <td><strong>Nghề nghiệp</strong></td>
                            <td><strong>Địa chỉ chỗ ở hiện nay</strong></td>
                        </tr>
                        <?php if(!empty((optional($residence)->summarize_family))): ?>
                            <?php $__currentLoopData = $residence->summarize_family; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $family): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <tr>
                                    <td><?php echo e($index + 1); ?></td>
                                    <td><?php echo e($family['name']); ?></td>
                                    <td><?php echo e($family['birthday']); ?></td>
                                    <td><?php echo e($family['gender']); ?></td>
                                    <td><?php echo e($family['relation']); ?></td>
                                    <td><?php echo e($family['job']); ?></td>
                                    <td><?php echo e($family['current_location']); ?></td>
                                </tr>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        <?php endif; ?>

                        </tbody>
                    </table>
                    <button type="button" class="btn green-meadow btn-add-row-family">Thêm tóm tắt</button>
                </div>
            </div>
        </div>
    </div>
</form>