12
sazack
7y

You know that feel as a developer when you add a feature to someone's existing project and you see a shitty code. well this has to be one of the shittiest code I have seen.

select_patient:function(patient)
{
console.log(patient)
this.select_patient_index = 0;
var pending = patient.Pending;
var USER_ID_Patient = patient.ID;
var prescription_ID = patient.Prescription_ID;
if(prescription_ID == null) prescription_ID = 0;
patient.Pending = pending = parseInt(pending);
patient.Prescription_ID = prescription_ID = parseInt(prescription_ID);
patient.USER_ID_Patient = USER_ID_Patient = parseInt(USER_ID_Patient);

if(pending > 0 && prescription_ID > 0)
{
this.select_patient_index = this.list.indexOf(patient);
$('#patientContinueModal').modal('show');
return false;
}

$scope.prescription.set(patient,null);
return false;
}

Also the guy has a space in his url.
xxxxxx.com/shopping cart !

My first instinct is to poke my eyes, find the developer (if we can call him that and shove it up his ______)

Comments
  • 1
    Welcome to DevRant! I see you have already let some steam off :D
  • 1
    @Tored haha I used to be the quiet one reading top rants on my email. This issue was too much to handle for me this time :D
Add Comment