Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Generated by Django 3.1.5 on 2023-04-11 13:41

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('health_center', '0002_auto_20230406_1140'),
('health_center', '0002_doctor_contact_no'),
]

operations = [
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 3.1.5 on 2023-04-11 13:42

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('health_center', '0003_merge_20230411_1341'),
]

operations = [
migrations.AlterField(
model_name='ambulance_request',
name='reason',
field=models.CharField(max_length=255),
),
]
2 changes: 1 addition & 1 deletion FusionIIIT/applications/health_center/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ class Ambulance_request(models.Model):
date_request = models.DateTimeField()
start_date = models.DateField()
end_date = models.DateField(null=True, blank=True)
reason = models.CharField(max_length=50)
reason = models.CharField(max_length=255)

class Hospital_admit(models.Model):
user_id = models.ForeignKey(ExtraInfo,on_delete=models.CASCADE)
Expand Down
21 changes: 8 additions & 13 deletions FusionIIIT/templates/phcModule/appointment.html
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@
$('#inputdate1').attr('min', maxDate);
});
</script>
<p id="dte"></p>
</div>
<div class="field">
<label>To</label>
Expand All @@ -209,14 +208,12 @@
$('#inputdate2').attr('min', maxDate);
});
</script>
<p id="dte"></p>
</div>
</div>
<div class="field">
<label>Reason</label>
<div class="ui fluid input">
<textarea class="ui textarea" rows="2" id="reason" name="reason"></textarea>
<p id="reas"></p>
</div>
</div>

Expand All @@ -234,9 +231,10 @@
return str.replace(/^\s+|\s+$/g, '');
}

$('#amb_submit').click(function (e) {
var startDate = document.getElementById('start_date').value;
var endDate = document.getElementById('end_date').value;
$('#amb_submit').click(function(e)
{
var startDate = document.getElementById('inputdate1').value;
var endDate = document.getElementById('inputdate2').value;
var start = new Date(startDate);
var end = new Date(endDate);
var today = new Date(new Date().setHours(0, 0, 0, 0));
Expand Down Expand Up @@ -265,16 +263,13 @@
url: '/healthcenter/student/',
data: {
csrfmiddlewaretoken: '{{ csrf_token }}',
start_date: $("#start_date").val(),
end_date: $("#end_date").val(),
reason: $("#reason").val(),
amb_submit: $("#amb_submit").val()
start_date:$("#inputdate1").val(),
end_date:$("#inputdate2").val(),
reason:$("#reason").val(),
amb_submit:$("#amb_submit").val()
},
success: function (data) {
alert("Ambulance requested.");
document.getElementById("start_date").value = "";
document.getElementById("end_date").value = "";
document.getElementById("reason").value = "";
window.location.reload();

$('#reas').html('');
Expand Down