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