Added logic for office files.
This commit is contained in:
11
index.js
11
index.js
@@ -34,7 +34,6 @@ function removeExtraZipCode(value){
|
||||
function readFilesFromDir(){
|
||||
var files = fs.readdirSync('./intake');
|
||||
for (var i = 0; i < files.length; i++){
|
||||
console.log(files[i]);
|
||||
if (files[i].toLowerCase().includes('owner')){
|
||||
ownerFiles.push(files[i]);
|
||||
} else
|
||||
@@ -115,7 +114,11 @@ function processOwnerFile(fileName){
|
||||
y['Owner Phone L owner Phone'] = '';
|
||||
y['Owner Name Name C Name'] = x.TrueOwnerName.length > 0 ? addQuotes(x.TrueOwnerName): addQuotes(x.OwnerName);
|
||||
y['Assignee L Assignee'] = 'EJR';
|
||||
if (fileName.toLowerCase().includes('office')){
|
||||
y['C Tag Office'] = 'Office';
|
||||
} else {
|
||||
y['C Tag Industrial'] = 'Industrial';
|
||||
}
|
||||
y['Market Area L Custom'] = 'Central I-96 Corridor';
|
||||
y['Owner C Tag'] = 'Owner';
|
||||
y['Status L'] = 'Pending';
|
||||
@@ -186,7 +189,11 @@ function processTenantFile(fileName){
|
||||
y['Mailing Address: City P Address: Main City'] = x.MailingAddressCity;
|
||||
y['Mailing Address: State P Address: Main State'] = x.MailingAddressState;
|
||||
y['Mailing Address: Zip P Address: Main State'] = x.MailingAddressZip;
|
||||
y['C Tag'] = `"Industrial", "Tenant"`;
|
||||
if (fileName.toLowerCase().includes('office')){
|
||||
y['C Tag'] = `"Office, Tenant"`;
|
||||
} else {
|
||||
y['C Tag'] = `"Industrial, Tenant"`;
|
||||
}
|
||||
y['C Description'] = 'Tenant';
|
||||
|
||||
return y;
|
||||
|
||||
Reference in New Issue
Block a user