' +
'
'+
'
' +
'
' +
''
);
var formattedDate = "";
if (offerLetterFormData.sentDate) {
var formattedDate = "Offered on: " + moment(offerLetterFormData.sentDate).format("MM/DD/YYYY");
}
offerFormItem.find('.head-line-2').html(jobPositionName + ', ' + jobCity + ',' + jobState);
offerFormItem.find('.head-line-3').html(formattedDate);
offerFormItem.find('.offer-letter-body pre').html(offerLetterFormData.letterBody);
//handle putting the signature together
if (offerLetterFormData.responseType === 'Accept') {
var signedDate = "";
if (offerLetterFormData.responseDate) {
var signedDate = moment(offerLetterFormData.responseDate).format("MM-DD-YYYY");
}
offerFormItem.find('.offer-letter-signature').append(
$('
Digitally Signed By ' + applicantName + ' Date: ' + signedDate + '' +
'
'+
'
Signature of Applicant')
);
}
else if (offerLetterFormData.responseType === 'Counter' || offerLetterFormData.responseType === 'Decline') {
var signedDate = "";
if (offerLetterFormData.responseDate) {
signedDate = moment(offerLetterFormData.responseDate).format("MM-DD-YYYY");
}
offerFormItem.find('.offer-letter-signature').append(
$('
' + applicantName + ' Declined Offer On ' + signedDate + '' +
'
' +
'
Reason: ' + offerLetterFormData.responseDesc + '')
);
}
return offerFormItem;
}
function toggleCollapse(event, el) {
if ($(event.target).hasClass('fa-download')) { // Don't do anything if download button is clicked.
return;
}
var collapsableParent = $(el).parent();
if (collapsableParent.hasClass('collapsed')) {
collapsableParent.removeClass('collapsed');
}
else {
collapsableParent.addClass('collapsed');
}
}
function constructDigitialSignatureSection(signedOnDate) {
var signatureSection = $('
' +
'Digitally Signed By Some Person Date: here is the date' +
'
' +
'Signature of Applicant'
);
}