Team 4 ( Motair LC Kid)
Specific Folder FTP Upload / ftp-deploy (push) Successful in 39s Details

This commit is contained in:
zeeshan 2026-08-25 16:28:52 +05:30
parent 44f06cc3d6
commit 2df557edfd
1 changed files with 48 additions and 11 deletions

View File

@ -88,9 +88,16 @@
$submissions = Formhelper::getMultiformData( $form->partition, $form_id, $form->user_id);
$submissions = $submissions->data->submissions;
/* echo "<pre>";
print_r($submissions);
echo "</pre>"; */
$existingCount = count($submissions);
$targetLimit = 20; // नवीन लिमिट २०
@endphp
@if(count($submissions)===0 || $id)
@if($existingCount<20 || $id)
<form method="POST" action="/form/submit" id="report-form" enctype="multipart/form-data">
<input type="hidden" name="form_id" value="{{$form_id}}">
@csrf
@ -287,7 +294,7 @@
@endif
</form>
@elseif(!$id)
<h4>You have already submitted the Chemist & Dr Tagging.</h4>
<h4>You have already submitted the 20 Chemist & Dr Tagging.</h4>
@endif
</div> <!-- end card-body -->
</div>
@ -608,8 +615,25 @@ $(document).on(
preventDuplicateDoctors();
});
var existingCount = {{ $existingCount ?? 0 }};
var targetLimit = 20;
var maxAllowedToAdd = targetLimit - existingCount;
if(maxAllowedToAdd===1){
$('#adddoctor-btn').hide();
}
// सुरुवातीला स्क्रीनवर 1 फॉर्म असतो
var currentFormsOnScreen = 1;
var doctor_count = 0;
console.log("Existing Count:", existingCount);
console.log("Max Allowed to Add:", maxAllowedToAdd);
var doctor_count = 0
let numberOfSubmission=1;
@ -617,7 +641,7 @@ $(document).on(
$('#adddoctor-btn').click(function() {
let doctorName=$('#field-contact_id').html();
console.log("Doctor Name : ",doctorName);
/* console.log("Doctor Name : ",doctorName); */
doctor_count++;
numberOfSubmission=numberOfSubmission+1;
console.log("Number of Submission : ",numberOfSubmission);
@ -692,7 +716,20 @@ $(document).on(
width: '100%'
});
let length=$('.doctor-wrapper').length;
console.log("length : ",length);
let lengthToBeAdded= maxAllowedToAdd;
let lengthUserWillAdd=maxAllowedToAdd-1;
console.log("Wrappers user can add",lengthToBeAdded);
if ($('.doctor-wrapper').length > lengthUserWillAdd) {
$('#adddoctor-btn').hide();
} else {
$('#adddoctor-btn').show();
}
setTimeout(() => {
@ -703,12 +740,9 @@ $(document).on(
}, 500);
if ($('.doctor-wrapper').length >= 20) {
$('#adddoctor-btn').hide();
} else {
$('#adddoctor-btn').show();
}
$('.btn-remove').unbind();
$('.btn-remove').click(function() {
@ -728,6 +762,9 @@ $(document).on(
console.log("Number of doctors : ", doctor_count);
$('#adddoctor-btn').show();
});
@ -773,7 +810,7 @@ $(document).on(
$('#report-form').on('submit', function(event) {
event.preventDefault();
if (numberOfSubmission != 20) {
if (numberOfSubmission<maxAllowedToAdd) {
Swal.fire({
icon: 'warning',