Professional Documents
Culture Documents
console.log(
'%cError, script failed to parse your data',
'font-size: 18px; color: #f00; background: #000;'
);
throw new Error('NOT_LOGGED_IN');
};
const currentCycle = 5;
doc.cycle_int = Number.parseInt(doc.cycle);
mapDocumentByType[doc.type].push(doc);
});
return mapDocumentByType;
};
const getDocumentLatestCycle = (currentCycle, data) => {
const sortedData = [...data].sort(
(docA, docB) => docB.cycle_int - docA.cycle_int
);
return sortedData.find((doc) => doc.cycle_int <= currentCycle);
};
return status;
};
if (!docsSPTJM || !docsSR) {
throw 'data SPTJM atau SURAT REKOMENDASI tidak ditemukan';
}
if (!docsSPTJM || !docsSR) {
throw 'data SPTJM atau SURAT REKOMENDASI tidak ditemukan';
}
console.log(
`%cstatus SPTJM kamu adalah %c${statusUserSptjm}`,
'font-size: 24px; color: black; background: white;',
`font-size: 30px; background: ${
statusUserSptjm === 'VERIFIED'
? 'green'
: statusUserSptjm === 'REJECTED'
? 'red'
: 'blue'
}; color: white;`
);
console.log(
`%cstatus SURAT REKOMENDASI kamu adalah %c${statusUserSr}`,
'font-size: 24px; color: black; background: white;',
`font-size: 30px; background: ${
statusUserSr === 'VERIFIED'
? 'green'
: statusUserSr === 'REJECTED'
? 'red'
: 'blue'
}; color: white;`
);
} catch (err) {
printGenericError(err);
}
};
main();