Team 4 ( Motair LC Kid)
Specific Folder FTP Upload / ftp-deploy (push) Successful in 39s
Details
Specific Folder FTP Upload / ftp-deploy (push) Successful in 39s
Details
This commit is contained in:
parent
44f06cc3d6
commit
2df557edfd
|
|
@ -88,9 +88,16 @@
|
||||||
$submissions = Formhelper::getMultiformData( $form->partition, $form_id, $form->user_id);
|
$submissions = Formhelper::getMultiformData( $form->partition, $form_id, $form->user_id);
|
||||||
$submissions = $submissions->data->submissions;
|
$submissions = $submissions->data->submissions;
|
||||||
|
|
||||||
|
/* echo "<pre>";
|
||||||
|
print_r($submissions);
|
||||||
|
echo "</pre>"; */
|
||||||
|
|
||||||
|
$existingCount = count($submissions);
|
||||||
|
$targetLimit = 20; // नवीन लिमिट २०
|
||||||
|
|
||||||
@endphp
|
@endphp
|
||||||
@if(count($submissions)===0 || $id)
|
|
||||||
|
@if($existingCount<20 || $id)
|
||||||
<form method="POST" action="/form/submit" id="report-form" enctype="multipart/form-data">
|
<form method="POST" action="/form/submit" id="report-form" enctype="multipart/form-data">
|
||||||
<input type="hidden" name="form_id" value="{{$form_id}}">
|
<input type="hidden" name="form_id" value="{{$form_id}}">
|
||||||
@csrf
|
@csrf
|
||||||
|
|
@ -287,7 +294,7 @@
|
||||||
@endif
|
@endif
|
||||||
</form>
|
</form>
|
||||||
@elseif(!$id)
|
@elseif(!$id)
|
||||||
<h4>You have already submitted the Chemist & Dr Tagging.</h4>
|
<h4>You have already submitted the 20 Chemist & Dr Tagging.</h4>
|
||||||
@endif
|
@endif
|
||||||
</div> <!-- end card-body -->
|
</div> <!-- end card-body -->
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -608,8 +615,25 @@ $(document).on(
|
||||||
preventDuplicateDoctors();
|
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
|
var doctor_count = 0
|
||||||
let numberOfSubmission=1;
|
let numberOfSubmission=1;
|
||||||
|
|
@ -617,7 +641,7 @@ $(document).on(
|
||||||
$('#adddoctor-btn').click(function() {
|
$('#adddoctor-btn').click(function() {
|
||||||
let doctorName=$('#field-contact_id').html();
|
let doctorName=$('#field-contact_id').html();
|
||||||
|
|
||||||
console.log("Doctor Name : ",doctorName);
|
/* console.log("Doctor Name : ",doctorName); */
|
||||||
doctor_count++;
|
doctor_count++;
|
||||||
numberOfSubmission=numberOfSubmission+1;
|
numberOfSubmission=numberOfSubmission+1;
|
||||||
console.log("Number of Submission : ",numberOfSubmission);
|
console.log("Number of Submission : ",numberOfSubmission);
|
||||||
|
|
@ -692,7 +716,20 @@ $(document).on(
|
||||||
width: '100%'
|
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(() => {
|
setTimeout(() => {
|
||||||
|
|
@ -703,12 +740,9 @@ $(document).on(
|
||||||
|
|
||||||
}, 500);
|
}, 500);
|
||||||
|
|
||||||
|
|
||||||
if ($('.doctor-wrapper').length >= 20) {
|
|
||||||
$('#adddoctor-btn').hide();
|
|
||||||
} else {
|
|
||||||
$('#adddoctor-btn').show();
|
|
||||||
}
|
|
||||||
|
|
||||||
$('.btn-remove').unbind();
|
$('.btn-remove').unbind();
|
||||||
$('.btn-remove').click(function() {
|
$('.btn-remove').click(function() {
|
||||||
|
|
@ -728,6 +762,9 @@ $(document).on(
|
||||||
console.log("Number of doctors : ", doctor_count);
|
console.log("Number of doctors : ", doctor_count);
|
||||||
|
|
||||||
$('#adddoctor-btn').show();
|
$('#adddoctor-btn').show();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -773,7 +810,7 @@ $(document).on(
|
||||||
$('#report-form').on('submit', function(event) {
|
$('#report-form').on('submit', function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
if (numberOfSubmission != 20) {
|
if (numberOfSubmission<maxAllowedToAdd) {
|
||||||
|
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
icon: 'warning',
|
icon: 'warning',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue