@obe-loms/coms-parser 1.5.1 → 1.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle.js +31 -31
- package/main.d.ts +13 -9
- package/package.json +1 -1
- package/payloads/getAssessmentData.d.ts +1 -2
- package/payloads/getCOAEP.d.ts +4 -1
- package/payloads/getClassList.d.ts +1 -2
- package/payloads/getCourseOffering.d.ts +1 -2
- package/payloads/getCurriculum.d.ts +1 -2
- package/payloads/getDeptFaculty.d.ts +1 -2
- package/payloads/getEnrolledStudent.d.ts +1 -2
- package/payloads/getPOAEP.d.ts +4 -2
package/bundle.js
CHANGED
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
import
|
|
2
|
-
import * as
|
|
1
|
+
import _0x4d14f7 from 'papaparse';
|
|
2
|
+
import * as _0xf8a8f8 from 'xlsx';
|
|
3
3
|
|
|
4
|
-
function parseCurriculum(
|
|
4
|
+
function parseCurriculum(_0x44cea8){let _0x4ce8ca='',_0x192441='',_0x152549=0x0,_0x315429=null;const _0x59acd6=[];return _0x4d14f7['parse'](_0x44cea8,{'skipEmptyLines':!![],'complete':_0x4d9b2e=>{_0x4d9b2e['data']['forEach'](_0x2664cd=>{const _0x4d913d=_0x2664cd['map'](_0x55e1b7=>(_0x55e1b7??'')['toString']()['trim']()),_0x8fa2a0=_0x4d913d[0x0]??'';if(_0x8fa2a0['includes']('Rev#')){const _0x129de4=_0x8fa2a0['match'](/([A-Z0-9]+)\s*-\s*.*:\s*(.*?)\s+Rev#\s*(\d+)/i);_0x129de4&&(_0x4ce8ca=_0x129de4[0x1]?.['trim']()??'',_0x192441=_0x129de4[0x2]?.['trim']()??'',_0x152549=parseInt(_0x129de4[0x3]??'0',0xa));return;}if(/FIRST YEAR/i['test'](_0x8fa2a0)){_0x315429=0x1;return;}if(/SECOND YEAR/i['test'](_0x8fa2a0)){_0x315429=0x2;return;}if(/THIRD YEAR/i['test'](_0x8fa2a0)){_0x315429=0x3;return;}if(/FOURTH YEAR/i['test'](_0x8fa2a0)){_0x315429=0x4;return;}if(/FIFTH YEAR/i['test'](_0x8fa2a0)){_0x315429=0x5;return;}if(/First Semester/i['test'](_0x8fa2a0)||/Second Semester/i['test'](_0x8fa2a0)||/Summer/i['test'](_0x8fa2a0))return;const _0x39727b=[{'sem':0x1,'offset':0x0},{'sem':0x2,'offset':0x6},{'sem':0x3,'offset':0xc}];_0x39727b['forEach'](({sem:_0x249e26,offset:_0x2a73de})=>{const _0x2e6ec1=_0x4d913d[_0x2a73de]??'',_0x48daf4=_0x4d913d[_0x2a73de+0x1]??'',_0x4faaff=_0x4d913d[_0x2a73de+0x2]??'',_0x5035b7=_0x4d913d[_0x2a73de+0x3]??'',_0x2c09c7=_0x4d913d[_0x2a73de+0x4]??'';_0x2e6ec1&&_0x315429&&_0x59acd6['push']({'curr_id':_0x4ce8ca,'program_name':_0x192441,'revision_no':_0x152549,'year_level':_0x315429,'sem':_0x249e26,'course_id':_0x2e6ec1,'course_desc':_0x48daf4,'total_units':_0x4faaff,'lec_unit':_0x5035b7,'lab_unit':_0x2c09c7});});});}}),_0x59acd6;}
|
|
5
5
|
|
|
6
|
-
function convertToCSVFile(
|
|
6
|
+
function convertToCSVFile(_0x8d38f9,_0x2a8131){return new Promise((_0x187c19,_0x475614)=>{const _0x2762b9=new FileReader();_0x2762b9['onload']=_0x4e4536=>{const _0x313871=_0x4e4536['target']?.['result'];if(!_0x313871){_0x475614(new Error('Failed\x20to\x20read\x20file'));return;}try{const _0x1903d1=_0xf8a8f8['read'](_0x313871,{'type':'array'});!_0x2a8131&&(_0x2a8131=_0x1903d1['SheetNames'][0x0]);if(!_0x2a8131){_0x475614(new Error('No\x20sheets\x20found\x20in\x20workbook'));return;}const _0x53ea44=_0x1903d1['Sheets'][_0x2a8131];if(!_0x53ea44){_0x475614(new Error('No\x20sheets\x20found\x20in\x20worksheet'));return;}const _0x107040=_0xf8a8f8['utils']['sheet_to_csv'](_0x53ea44,{'strip':!![]}),_0x191191=_0x8d38f9['name']['replace'](/\.[^/.]+$/,'.csv'),_0x1a591d=new File([_0x107040],_0x191191,{'type':'text/csv','lastModified':Date['now']()});_0x187c19(_0x1a591d);}catch(_0x2c393d){_0x475614(_0x2c393d);}},_0x2762b9['onerror']=()=>{_0x475614(new Error('File\x20reading\x20failed'));},_0x2762b9['readAsArrayBuffer'](_0x8d38f9);});}
|
|
7
7
|
|
|
8
|
-
async function uploadCurriculum(
|
|
8
|
+
async function uploadCurriculum(_0x39bc91,_0x4802d0){try{const _0x236d3e=await convertToCSVFile(_0x4802d0),_0x5df739=await _0x236d3e['text'](),_0x3f6fcd=parseCurriculum(_0x5df739),_0x44d780=_0x4d14f7['unparse'](_0x3f6fcd),_0x326159=new File([_0x44d780],_0x236d3e['name'],{'type':'text/csv'}),_0x3e0500=new FormData();_0x3e0500['append']('csvFile',_0x326159);const _0x436076=await fetch(_0x39bc91+'/curr-courses/upload',{'method':'POST','body':_0x3e0500});if(!_0x436076['ok']){const _0x2ad229=await _0x436076['json']();throw _0x2ad229;}return _0x436076['json']();}catch(_0x49c882){throw _0x49c882;}}
|
|
9
9
|
|
|
10
|
-
function parseCourseOffering(
|
|
10
|
+
function parseCourseOffering(_0x35b1a1){let _0x3754c5='',_0x3d9d0b='';const _0x18ddb4=[],_0x469247=_0x4d14f7['parse'](_0x35b1a1,{'header':![],'skipEmptyLines':!![],'delimiter':','}),_0x128f88=_0x469247['data'];for(let _0x59e9f7=0x0;_0x59e9f7<Math['min'](0x5,_0x128f88['length']);_0x59e9f7++){const _0x3017b1=_0x128f88[_0x59e9f7];if(_0x3017b1&&_0x3017b1['length']>0x0){const _0xda74c0=_0x3017b1[0x0]?.['toString']()||'',_0x1c9d3d=_0xda74c0['match'](/(First|Second)\s+Sem\s+S\/Y\s+(\d{4}-\d{4})/i);if(_0x1c9d3d){_0x3754c5=_0x1c9d3d[0x1]?.['toLowerCase']()==='first'?'1':'2';if(_0x1c9d3d[0x2]){const _0x7a0eff=_0x1c9d3d[0x2]['match'](/(\d{2})(\d{2})-(\d{2})(\d{2})/);_0x7a0eff&&_0x7a0eff[0x2]&&_0x7a0eff[0x4]&&(_0x3d9d0b=_0x7a0eff[0x2]+_0x7a0eff[0x4]);}}}}let _0x47807f=-1;for(let _0x105803=0x0;_0x105803<_0x128f88['length'];_0x105803++){const _0x3e8c34=_0x128f88[_0x105803];if(_0x3e8c34&&_0x3e8c34['some'](_0x41769b=>_0x41769b?.['toString']()['toUpperCase']()['includes']('CODE'))){_0x47807f=_0x105803;break;}}if(_0x47807f===-1)throw new Error('Could\x20not\x20find\x20header\x20row\x20in\x20CSV\x20data');let _0x186cfe={'code':'','description':'','unit':0x0};for(let _0x1bc4f3=_0x47807f+0x1;_0x1bc4f3<_0x128f88['length'];_0x1bc4f3++){const _0x2baefe=_0x128f88[_0x1bc4f3];if(!_0x2baefe||_0x2baefe['length']<0x8)continue;const _0x110fae=_0x2baefe[0x1]?.['toString']()['trim']()||'',_0x57f096=_0x2baefe[0x4]?.['toString']()['trim']()||'',_0x35e21b=_0x2baefe[0x5]?.['toString']()['trim']()||'',_0x2b9b6d=_0x2baefe[0x6]?.['toString']()['trim']()||'',_0x43cd73=_0x2baefe[0x7]?.['toString']()['trim']()||'',_0x21b91f=_0x2baefe[0x3]?.['toString']()['trim']()||'';let _0x21d1f1=_0x2baefe[0x0]?.['toString']()['trim']()||'',_0x1ee6be=_0x2baefe[0x2]?.['toString']()['trim']()||'';if(!_0x110fae)continue;if(!_0x21d1f1)_0x21d1f1=_0x186cfe['code'];if(!_0x1ee6be)_0x1ee6be=_0x186cfe['description'];let _0x4c9eea=_0x186cfe['unit'];if(_0x21b91f){const _0x1d1582=_0x21b91f['match'](/(\d+)/);_0x1d1582&&_0x1d1582[0x1]&&(_0x4c9eea=parseInt(_0x1d1582[0x1],0xa));}const _0x33d067={'sem':_0x3754c5,'school_year':_0x3d9d0b,'code':_0x21d1f1,'course_no':_0x110fae,'course_desc':_0x1ee6be,'unit':_0x4c9eea,'time':_0x57f096,'days':_0x35e21b,'faculty':_0x2b9b6d,'room':_0x43cd73};_0x186cfe['code']=_0x21d1f1,_0x186cfe['description']=_0x1ee6be,_0x186cfe['unit']=_0x4c9eea,_0x18ddb4['push'](_0x33d067);}return _0x18ddb4;}
|
|
11
11
|
|
|
12
|
-
async function uploadCourseOffering(
|
|
12
|
+
async function uploadCourseOffering(_0x5da0be,_0x21b745){try{const _0x5ad5a1=await convertToCSVFile(_0x21b745),_0x30d4a2=await _0x5ad5a1['text'](),_0x1e3041=parseCourseOffering(_0x30d4a2),_0x45bb43=_0x4d14f7['unparse'](_0x1e3041),_0x4a64c6=new File([_0x45bb43],_0x5ad5a1['name'],{'type':'text/csv'}),_0x453d15=new FormData();_0x453d15['append']('csvFile',_0x4a64c6);const _0x419edc=await fetch(_0x5da0be+'/course-offerings/upload',{'method':'POST','body':_0x453d15});if(!_0x419edc['ok']){const _0x349164=await _0x419edc['json']();throw _0x349164;}return _0x419edc['json']();}catch(_0x255614){throw _0x255614;}}
|
|
13
13
|
|
|
14
|
-
function performaceTarget(
|
|
14
|
+
function performaceTarget(_0x1e39d4){if(!_0x1e39d4)return {'performance_target':null,'passing_score':null};const _0x3a5b66=_0x1e39d4['match'](/\d+/g);return {'performance_target':_0x3a5b66?.[0x0]?parseInt(_0x3a5b66[0x0],0xa):null,'passing_score':_0x3a5b66?.[0x1]?parseInt(_0x3a5b66[0x1],0xa):null};}
|
|
15
15
|
|
|
16
|
-
const HEADERS$1={'co':['course\x20outcome','co\x20statement','outcome\x20statement'],'ilo':['intended\x20learning','ilo','learning\x20outcome'],'assessTool':['assessment\x20tool','assessment\x20method','tool'],'perfTarget':['performance\x20target','target','passing']};function getCoaepHeader(
|
|
16
|
+
const HEADERS$1={'co':['course\x20outcome','co\x20statement','outcome\x20statement'],'ilo':['intended\x20learning','ilo','learning\x20outcome'],'assessTool':['assessment\x20tool','assessment\x20method','tool'],'perfTarget':['performance\x20target','target','passing']};function getCoaepHeader(_0x3629a4){let _0x1ea373={'headerRowIndex':-1,'coIdx':-1,'iloIdx':-1,'assessToolIdx':-1,'perfTargetIdx':-1};for(let _0x4eb6e3=0x0;_0x4eb6e3<Math['min'](_0x3629a4['length'],0x14);_0x4eb6e3++){const _0x19da62=(_0x3629a4[_0x4eb6e3]??[])['map'](_0x26db22=>_0x26db22['toLowerCase']()['trim']()),_0x44bf26=_0x19da62['findIndex'](_0x2f0a37=>HEADERS$1['co']['some'](_0x4d85ea=>_0x2f0a37['includes'](_0x4d85ea))),_0x22eede=_0x19da62['findIndex'](_0x1358ac=>HEADERS$1['ilo']['some'](_0x5ad7f6=>_0x1358ac['includes'](_0x5ad7f6))),_0x199d8e=_0x19da62['findIndex'](_0x1ce8cc=>HEADERS$1['assessTool']['some'](_0x59e704=>_0x1ce8cc['includes'](_0x59e704))),_0x357eca=_0x19da62['findIndex'](_0x5c220e=>HEADERS$1['perfTarget']['some'](_0x4edebf=>_0x5c220e['includes'](_0x4edebf))),_0x46d030=[_0x44bf26,_0x22eede,_0x199d8e,_0x357eca]['filter'](_0x1379cc=>_0x1379cc!==-1)['length'];if(_0x46d030>=0x3){_0x1ea373={'headerRowIndex':_0x4eb6e3,'coIdx':_0x44bf26,'iloIdx':_0x22eede,'assessToolIdx':_0x199d8e,'perfTargetIdx':_0x357eca};break;}}return _0x1ea373;}
|
|
17
17
|
|
|
18
|
-
function extractFromObjective(
|
|
18
|
+
function extractFromObjective(_0x4d70d4){const _0x192f21={'cognitive_level':null,'taxonomy_level':null,'verb':null},_0x22d32d=/(?:\(([IED])\))?\s*(\w+)\s*:\s*(\w+)/,_0x66f012=_0x4d70d4['match'](_0x22d32d);if(_0x66f012){if(_0x66f012[0x1])_0x192f21['cognitive_level']=_0x66f012[0x1];if(_0x66f012[0x2])_0x192f21['taxonomy_level']=_0x66f012[0x2]['toLowerCase']();if(_0x66f012[0x3])_0x192f21['verb']=_0x66f012[0x3]['toLowerCase']();}return _0x192f21;}
|
|
19
19
|
|
|
20
|
-
function parseCOAEP(
|
|
20
|
+
function parseCOAEP(_0x241623){const _0x2429c0=_0x4d14f7['parse'](_0x241623,{'skipEmptyLines':![]})['data'],_0x5edf20={'COAEP':{'faculty':null,'course':null,'sy':null,'semester':null,'co':[]}},{headerRowIndex:_0x45ce85,coIdx:_0x3843b2,iloIdx:_0x56157e,assessToolIdx:_0x15cf97,perfTargetIdx:_0x3a6116}=getCoaepHeader(_0x2429c0);if(_0x45ce85===-1)return {'error':'Could\x20not\x20auto-detect\x20header\x20row.','message':'Please\x20ensure\x20the\x20CSV\x20file\x20is\x20in\x20the\x20correct\x20COAEP\x20format.'};_0x2429c0['forEach'](_0x29017d=>{const _0x11ccae=_0x29017d['indexOf']('Name\x20of\x20Faculty:'),_0x46f171=_0x29017d['indexOf']('School\x20Year'),_0x4d7119=_0x29017d['indexOf']('Course:'),_0x25ab83=_0x29017d['indexOf']('Semester');_0x11ccae!==-1&&(_0x5edf20['COAEP']['faculty']=_0x29017d[_0x11ccae+0x1]?.['trim']()||_0x5edf20['COAEP']['faculty']);_0x46f171!==-1&&(_0x5edf20['COAEP']['sy']=_0x29017d[_0x46f171+0x1]?.['trim']()||_0x5edf20['COAEP']['sy']);_0x4d7119!==-1&&(_0x5edf20['COAEP']['course']=_0x29017d[_0x4d7119+0x1]?.['trim']()||_0x5edf20['COAEP']['course']);if(_0x25ab83!==-1){const _0x320f49=_0x29017d[_0x25ab83+0x1]?.['trim']()||'',_0x30a4e3=_0x320f49['match'](/\d+/)?.[0x0];_0x5edf20['COAEP']['semester']=_0x30a4e3?parseInt(_0x30a4e3,0xa):_0x5edf20['COAEP']['semester'];}});let _0x421f6d=null;return _0x2429c0['forEach']((_0x4990ce,_0x1316e4)=>{if(_0x1316e4<=_0x45ce85)return;let _0x58a345=_0x4990ce[_0x3843b2-0x1]?.['trim']()||'',_0x25ecad=_0x4990ce[_0x3843b2]?.['trim']()||'';/^\d+$/['test'](_0x4990ce[_0x3843b2]?.['trim']()||'')&&(_0x58a345=_0x4990ce[_0x3843b2]?.['trim']()||'',_0x25ecad=_0x4990ce[_0x3843b2+0x1]?.['trim']()||'');const _0x128f28=_0x4990ce[_0x56157e]?.['trim']()||'',_0x206bb1=_0x4990ce[_0x15cf97]?.['replace'](/^ILO\d+[:.]?\s*/,'')['trim']()||'',_0x5e3ec0=_0x4990ce[_0x3a6116]?.['replace'](/\s+/g,'\x20')['trim']()||'';if(_0x58a345&&/^\d+$/['test'](_0x58a345)){_0x421f6d&&_0x5edf20['COAEP']['co']['push'](_0x421f6d);const _0x3cdd37=_0x25ecad,{verb:_0xb645c9,cognitive_level:_0x593222,taxonomy_level:_0x31b547}=extractFromObjective(_0x3cdd37);_0x421f6d={'statement':_0x3cdd37,'ilo':[],'verb':_0xb645c9,'cognitive_level':_0x593222,'taxonomy_level':_0x31b547};}if(_0x421f6d&&_0x128f28&&_0x5e3ec0){const _0x4b9b77=_0x128f28['replace'](/^ILO\d+[:.]?\s*/,'');if(_0x4b9b77['match'](/^(Revision|Prepared|Date|Approved|Effectivity|Page)/i)||_0x4b9b77['length']<0xa)return;let _0x545c23=_0x206bb1;if(!_0x545c23&&_0x4b9b77['includes'](':')){const _0xa194a4=_0x4b9b77['match'](/^ILO\d+:\s*(.+?)(?:\s*\(|$)/);_0xa194a4&&(_0x545c23=_0xa194a4[0x1]?.['trim']()||'');}const {performance_target:_0x3cdf94,passing_score:_0xf8f64c}=performaceTarget(_0x5e3ec0),{verb:_0x2a97ab,cognitive_level:_0x1b971,taxonomy_level:_0x1553ff}=extractFromObjective(_0x4b9b77);_0x421f6d['ilo']['push']({'statement':_0x4b9b77,'assessment_tool':_0x545c23,'performance_target':_0x3cdf94,'passing_score':_0xf8f64c,'verb':_0x2a97ab,'cognitive_level':_0x1b971,'taxonomy_level':_0x1553ff});}}),_0x421f6d&&_0x5edf20['COAEP']['co']['push'](_0x421f6d),_0x5edf20;}
|
|
21
21
|
|
|
22
|
-
async function uploadCOAEP(
|
|
22
|
+
async function uploadCOAEP(_0x32444a,_0x46142a,_0x43f8aa){try{const _0x64b5c9=await convertToCSVFile(_0x46142a),_0x188854=await _0x64b5c9['text'](),_0x23ff44=parseCOAEP(_0x188854);console['log'](_0x23ff44);const _0x30ed76=await fetch(_0x32444a+'/coaeps/upload?course_id='+_0x43f8aa,{'method':'POST','headers':{'Content-Type':'application/json'},'body':JSON['stringify'](_0x23ff44)});if(!_0x30ed76['ok']){const _0x366405=await _0x30ed76['json']();throw _0x366405;}return _0x30ed76['json']();}catch(_0x41682b){throw _0x41682b;}}
|
|
23
23
|
|
|
24
|
-
async function uploadEnrolledStudent(
|
|
24
|
+
async function uploadEnrolledStudent(_0x54bc4e,_0x330aec){try{const _0x555a8a=await convertToCSVFile(_0x330aec),_0x258156=new FormData();_0x258156['append']('csvFile',_0x555a8a);const _0x6ef890=await fetch(_0x54bc4e+'/enrolled-students/upload',{'method':'POST','body':_0x258156});if(!_0x6ef890['ok']){const _0x51b2df=await _0x6ef890['json']();throw _0x51b2df;}return _0x6ef890['json']();}catch(_0x4dd94c){throw _0x4dd94c;}}
|
|
25
25
|
|
|
26
|
-
function parseClassList(
|
|
26
|
+
function parseClassList(_0x5bf874){const _0x2d8a02=_0x4d14f7['parse'](_0x5bf874,{'skipEmptyLines':!![]})['data'];let _0x2f3000='',_0x2e8ef2='',_0x346d7c='';const _0x38db13=[];return _0x2d8a02['forEach'](_0x10750e=>{const _0x133284=_0x10750e['map'](_0x9aa2bf=>(_0x9aa2bf??'')['toString']()['trim']()),_0x81f1e=_0x133284[0x0]??'';if(_0x81f1e['startsWith']('Course\x20No:')){const _0x2e5f93=_0x81f1e['replace']('Course\x20No:','')['trim'](),_0x128caf=_0x2e5f93['split'](/\s+/);_0x346d7c=_0x128caf[0x0]??'';const [_0x1f398c,_0x35a26d]=(_0x128caf[0x1]??'')['split']('-');_0x2e8ef2=_0x1f398c??'';const _0x5da15a=(_0x35a26d??'')['match'](/[a-z]$/);_0x2f3000=_0x5da15a?_0x5da15a[0x0]:'';}if(/^\d+$/['test'](_0x81f1e)){const _0x58f372=_0x133284[0x2]??'';_0x38db13['push']({'subj_code':_0x346d7c,'student_no':_0x58f372,'course_id':_0x2e8ef2,'section':_0x2f3000});}}),{'enrolledCourses':_0x38db13};}
|
|
27
27
|
|
|
28
|
-
async function uploadClassList(
|
|
28
|
+
async function uploadClassList(_0x65df4e,_0x5981e0,_0x5604d8,_0x1ff4cc){try{const _0x40b4c5=await convertToCSVFile(_0x5981e0),_0x3c17b6=await _0x40b4c5['text'](),_0x9b61f1=parseClassList(_0x3c17b6),_0x4053c9='subj_code='+_0x5604d8+'&period_id='+_0x1ff4cc,_0x5843f7=await fetch(_0x65df4e+'/enrolled-courses/upload?'+_0x4053c9,{'method':'POST','headers':{'Content-Type':'application/json'},'body':JSON['stringify'](_0x9b61f1)});if(!_0x5843f7['ok']){const _0x326d07=await _0x5843f7['json']();throw _0x326d07;}return _0x5843f7['json']();}catch(_0x245f61){throw _0x245f61;}}
|
|
29
29
|
|
|
30
|
-
function parseAssessmentCsv(
|
|
30
|
+
function parseAssessmentCsv(_0x446725){const {data:_0x36a5dd}=_0x4d14f7['parse'](_0x446725,{'skipEmptyLines':!![]}),_0x2cadcb=_0x36a5dd['filter'](_0x219ed1=>_0x219ed1['length']>0x0),_0x58397e=_0x2cadcb['find'](_0x23893d=>_0x23893d['some'](_0x1c619b=>_0x1c619b?.['includes']('Faculty'))),_0x819cc=_0x58397e?_0x58397e['findIndex'](_0xcf18db=>_0xcf18db?.['includes']('Faculty')):-1,_0x136c1e=_0x819cc!==-1&&_0x58397e?_0x58397e[_0x819cc+0x2]?.['replace'](/"/g,'')['trim']()??'':'',_0x31fd30=_0x2cadcb['find'](_0x5b6fd7=>_0x5b6fd7['some'](_0x1286f0=>_0x1286f0?.['includes']('Semester'))),_0x38f9d5=_0x31fd30?_0x31fd30['findIndex'](_0x6435c6=>_0x6435c6?.['includes']('Semester')):-1,_0x5295ac=_0x38f9d5!==-1&&_0x31fd30?_0x31fd30[_0x38f9d5+0x2]?.['trim']()??'':'',_0x9b42bc=_0x5295ac['includes']('1st')?0x1:_0x5295ac['includes']('2nd')?0x2:0x0,_0x565f9a=_0x2cadcb['find'](_0x23e072=>_0x23e072['some'](_0x5ca548=>_0x5ca548?.['includes']('Course\x20&\x20Sec'))),_0x1132d0=_0x565f9a?_0x565f9a['findIndex'](_0x26bdc9=>_0x26bdc9?.['includes']('Course\x20&\x20Sec')):-1,_0x4c8a65=_0x1132d0!==-1&&_0x565f9a?_0x565f9a[_0x1132d0+0x2]?.['trim']()??'':'';let _0x5cad55='',_0x476578='';if(_0x4c8a65){const _0x3c6844=_0x4c8a65['match'](/^([A-Za-z0-9]+)-?([A-Za-z]+)?/);_0x3c6844&&(_0x5cad55=_0x3c6844[0x1]??'',_0x3c6844[0x2]&&(_0x476578=_0x3c6844[0x2]['replace'](/^OC/i,'')));}const _0x52b818=_0x2cadcb['find'](_0x12ad68=>_0x12ad68['some'](_0x2fb100=>_0x2fb100?.['includes']('School\x20Year'))),_0x475a80=_0x52b818?_0x52b818['findIndex'](_0x44e632=>_0x44e632?.['includes']('School\x20Year')):-1,_0x25e41c=_0x475a80!==-1&&_0x52b818?_0x52b818[_0x475a80+0x2]?.['trim']()??'':'';let _0x23462a=0x0;if(_0x25e41c){const _0x437141=_0x25e41c['match'](/(\d{4})-(\d{4})/);if(_0x437141){const _0x5030ab=(_0x437141[0x1]??'')['slice'](0x2),_0x3ef955=(_0x437141[0x2]??'')['slice'](0x2);_0x23462a=parseInt(_0x5030ab+_0x3ef955,0xa);}}const _0x30f35b={'faculty':_0x136c1e,'course':_0x5cad55,'section':_0x476578,'semester':_0x9b42bc,'sy':_0x23462a},_0x5c0733=_0x2cadcb['findIndex'](_0x1a1eb4=>_0x1a1eb4['some'](_0x211621=>_0x211621?.['trim']()==='CO\x20#'));if(_0x5c0733===-1)throw new Error('CO\x20header\x20row\x20not\x20found\x20in\x20CSV');const _0x59c01f=_0x2cadcb[_0x5c0733+0x1];if(!_0x59c01f)throw new Error('ILO\x20header\x20row\x20not\x20found\x20in\x20CSV');const _0x50e9dd={};let _0x16ddf5=0x1,_0x124f11=0x1;for(let _0x4e01e8=0x3;_0x4e01e8<_0x59c01f['length'];_0x4e01e8++){const _0x231b80=_0x59c01f[_0x4e01e8];if(!_0x231b80)continue;const _0xb43c93='co'+_0x16ddf5;if(!_0x50e9dd[_0xb43c93])_0x50e9dd[_0xb43c93]=[];_0x50e9dd[_0xb43c93]['push']('ilo'+_0x124f11),_0x124f11++,_0x124f11>0x3&&(_0x16ddf5++,_0x124f11=0x1);}const _0x471ee7=_0x2cadcb['findIndex'](_0x108ed7=>_0x108ed7['includes']('Name\x20of\x20Students'));if(_0x471ee7===-1)throw new Error('Student\x20header\x20row\x20not\x20found\x20in\x20CSV');const _0x59ba6b=_0x2cadcb[_0x471ee7];if(!_0x59ba6b)throw new Error('Student\x20header\x20row\x20is\x20missing');const _0xdc1ff8=_0x59ba6b['findIndex'](_0x4971f7=>_0x4971f7?.['includes']('Name\x20of\x20Students'));if(_0xdc1ff8===-1)throw new Error('Name\x20of\x20Students\x20column\x20not\x20found\x20in\x20CSV');const _0xbaf48e=_0xdc1ff8+0x2,_0x236d29=[];for(let _0x419c70=_0x471ee7+0x1;_0x419c70<_0x2cadcb['length'];_0x419c70++){const _0xe85f64=_0x2cadcb[_0x419c70];if(!_0xe85f64)continue;if(_0xe85f64['some'](_0xeb7ecd=>_0xeb7ecd?.['toUpperCase']()['includes']('TOTAL\x20STUDENTS')||_0xeb7ecd?.['toUpperCase']()['includes']('ACHIEVED\x20THE\x20MINIMUM')||_0xeb7ecd?.['toUpperCase']()['includes']('INACTIVE')||_0xeb7ecd?.['toUpperCase']()['includes']('AVERAGE')))continue;if(!_0xe85f64[_0xdc1ff8])continue;const _0x1afbbe=_0xe85f64[_0xdc1ff8]['replace'](/"/g,'')['trim'](),_0x209bb8=_0xe85f64['slice'](_0xbaf48e)['map'](_0x4752a9=>_0x4752a9===null?null:!isNaN(Number(_0x4752a9))?parseFloat(_0x4752a9):0x0);let _0x500792=0x0;const _0x31774d={};Object['entries'](_0x50e9dd)['forEach'](([_0x9675df,_0x19cbb1])=>{const _0x5a11e2={};_0x19cbb1['forEach'](_0x257766=>{_0x5a11e2[_0x257766]=_0x209bb8[_0x500792]??0x0,_0x500792++;}),_0x31774d[_0x9675df]={'transmuted_score':_0x5a11e2};}),_0x236d29['push']({'student_name':_0x1afbbe,'coaep':_0x31774d});}const _0xf840a0=_0x2cadcb['find'](_0x1de6b2=>_0x1de6b2['some'](_0x3691da=>_0x3691da?.['includes']('ACHIEVED\x20THE\x20MINIMUM'))),_0x6f1f6c=_0x2cadcb['find'](_0x401d70=>_0x401d70['some'](_0x4c132f=>_0x4c132f?.['includes']('AVERAGE'))),_0x2d4efc=_0xf840a0?_0xf840a0['slice'](_0xbaf48e)['map'](_0x599f2a=>_0x599f2a&&!isNaN(Number(_0x599f2a))?parseInt(_0x599f2a):0x0):[],_0x475bd0=_0x6f1f6c?_0x6f1f6c['slice'](_0xbaf48e)['map'](_0x4cd253=>_0x4cd253&&_0x4cd253!=='#DIV/0!'&&!isNaN(Number(_0x4cd253))?parseInt(_0x4cd253):0x0):[],_0x414367={};let _0x4c358e=0x0;return Object['entries'](_0x50e9dd)['forEach'](([_0x1892c2,_0x5c7965])=>{if(!_0x414367[_0x1892c2])_0x414367[_0x1892c2]={};_0x5c7965['forEach'](_0x1993f6=>{_0x414367[_0x1892c2][_0x1993f6]={'achievedMinimum':_0x2d4efc[_0x4c358e]??0x0,'average':_0x475bd0[_0x4c358e]??0x0},_0x4c358e++;});}),{'assessmentData':{'classAssignment':_0x30f35b,'student':_0x236d29,'total':_0x414367}};}
|
|
31
31
|
|
|
32
|
-
async function uploadAssessmentData(
|
|
32
|
+
async function uploadAssessmentData(_0x56b849,_0x409d15){try{const _0x5ab5dd=await convertToCSVFile(_0x409d15),_0xc20e9f=await _0x5ab5dd['text'](),_0x2a8d65=parseAssessmentCsv(_0xc20e9f),_0x79ce51=await fetch(_0x56b849+'/assessment-data/upload',{'method':'POST','headers':{'Content-Type':'application/json'},'body':JSON['stringify'](_0x2a8d65)});if(!_0x79ce51['ok']){const _0x3d5897=await _0x79ce51['json']();throw _0x3d5897;}return _0x79ce51['json']();}catch(_0xb509e9){throw _0xb509e9;}}
|
|
33
33
|
|
|
34
|
-
async function uploadDeptFaculty(
|
|
34
|
+
async function uploadDeptFaculty(_0x326300,_0x34a24e){try{const _0x2f5a77=await convertToCSVFile(_0x34a24e),_0x15de9c=new FormData();_0x15de9c['append']('csvFile',_0x2f5a77);const _0x21a494=await fetch(_0x326300+'/dept-faculties/upload',{'method':'POST','body':_0x15de9c});if(!_0x21a494['ok']){const _0x328903=await _0x21a494['json']();throw _0x328903;}return _0x21a494['json']();}catch(_0x52f1e7){throw _0x52f1e7;}}
|
|
35
35
|
|
|
36
|
-
const HEADERS={'po':['program\x20outcome','po\x20statement','outcome\x20statement'],'tl':['taxonomy','level'],'pi':['performance\x20indicator'],'fc':['formative'],'sc':['summative'],'at':['assessment\x20tool','assessment\x20method','tool'],'pt':['performance\x20target','target','passing']};function getPoaepHeader(
|
|
36
|
+
const HEADERS={'po':['program\x20outcome','po\x20statement','outcome\x20statement'],'tl':['taxonomy','level'],'pi':['performance\x20indicator'],'fc':['formative'],'sc':['summative'],'at':['assessment\x20tool','assessment\x20method','tool'],'pt':['performance\x20target','target','passing']};function getPoaepHeader(_0x39df05){let _0x31e5bf={'headerIdx':-1,'poIdx':-1,'tlIdx':-1,'piIdx':-1,'fcIdx':-1,'scIdx':-1,'atIdx':-1,'ptIdx':-1};for(let _0x2fe1e6=0x0;_0x2fe1e6<Math['min'](_0x39df05['length'],0x14);_0x2fe1e6++){const _0x1633f1=(_0x39df05[_0x2fe1e6]??[])['map'](_0x5c8500=>_0x5c8500['toLowerCase']()['trim']()),_0x30343d=_0x1633f1['findIndex'](_0x4083b5=>HEADERS['po']['some'](_0x21594a=>_0x4083b5['toLowerCase']()['includes'](_0x21594a))),_0xc1d0f2=_0x1633f1['findIndex'](_0x7cd2e9=>HEADERS['tl']['some'](_0x185237=>_0x7cd2e9['toLowerCase']()['includes'](_0x185237))),_0xdcc12=_0x1633f1['findIndex'](_0xf42742=>HEADERS['pi']['some'](_0x33db01=>_0xf42742['toLowerCase']()['includes'](_0x33db01))),_0xcef350=_0x1633f1['findIndex'](_0x2db493=>HEADERS['fc']['some'](_0x1bba23=>_0x2db493['toLowerCase']()['includes'](_0x1bba23))),_0xd8b7fc=_0x1633f1['findIndex'](_0x3c20ac=>HEADERS['sc']['some'](_0x24c188=>_0x3c20ac['toLowerCase']()['includes'](_0x24c188))),_0x26b731=_0x1633f1['findIndex'](_0x534e16=>HEADERS['at']['some'](_0x154189=>_0x534e16['toLowerCase']()['includes'](_0x154189))),_0x137345=_0x1633f1['findIndex'](_0x4b2dfa=>HEADERS['pt']['some'](_0x1526c0=>_0x4b2dfa['toLowerCase']()['includes'](_0x1526c0))),_0x2830b6=[_0x30343d,_0xc1d0f2,_0xdcc12,_0xcef350,_0xd8b7fc,_0x26b731,_0x137345]['filter'](_0x1724f8=>_0x1724f8!==-1)['length'];if(_0x2830b6>=0x3){_0x31e5bf={'headerIdx':_0x2fe1e6,'poIdx':_0x30343d,'tlIdx':_0xc1d0f2,'piIdx':_0xdcc12,'fcIdx':_0xcef350,'scIdx':_0xd8b7fc,'atIdx':_0x26b731,'ptIdx':_0x137345};break;}}if(_0x31e5bf['headerIdx']===-1)throw new Error('No\x20valid\x20headers\x20found\x20in\x20POAEP\x20file.');return _0x31e5bf;}
|
|
37
37
|
|
|
38
|
-
const parseFormativeCourses=
|
|
38
|
+
const parseFormativeCourses=_0x5b831c=>{let _0x1f1618=_0x5b831c['split'](',')['reduce']((_0x5031e6,_0x41fdb5)=>{const _0x425c3f=_0x41fdb5['trim']();if(_0x425c3f)_0x5031e6['push'](_0x425c3f);return _0x5031e6;},[]);return _0x1f1618;};
|
|
39
39
|
|
|
40
|
-
const parsePOAEP=
|
|
40
|
+
const parsePOAEP=_0x4d947e=>{try{const _0x2313c4=_0x4d14f7['parse'](_0x4d947e,{'skipEmptyLines':![]})['data'],{headerIdx:_0x112e22,poIdx:_0x113ffd,tlIdx:_0x12cdc6,piIdx:_0x41bf0d,fcIdx:_0x1aaf9a,scIdx:_0x37d6b3,atIdx:_0x33176f,ptIdx:_0x19b6d0}=getPoaepHeader(_0x2313c4),_0xf07ba9=[];let _0x32de96={'po_desc':'','seq_no':0x0,'PerfIndicators':[]},_0x2b062f='',_0x4bf855='',_0x87bc58='';for(let _0x20ae10=_0x112e22+0x1;_0x20ae10<_0x2313c4['length'];_0x20ae10++){const _0x42ae12=_0x2313c4[_0x20ae10];if(!_0x42ae12)break;const _0x136a74=_0x42ae12[_0x113ffd]?.['trim']()||'';_0x136a74!==''&&(_0x32de96={'po_desc':_0x136a74,'seq_no':_0x32de96['seq_no']+0x1,'PerfIndicators':[]},_0xf07ba9['push'](_0x32de96),_0x2b062f='',_0x4bf855='',_0x87bc58='');if(_0x32de96['po_desc']==='')throw new Error('Invalid\x20Program\x20Outcome\x20at\x20row\x20'+_0x20ae10+'.');const _0x10dca9=_0x42ae12[_0x41bf0d]?.['trim']()||'';if(_0x10dca9==='')break;const _0x2fc350=_0x42ae12[_0x1aaf9a]?.['trim']()||'';if(_0x2fc350==='')throw new Error('Empty\x20Formative\x20Courses\x20at\x20row\x20'+_0x20ae10+'.');const _0x171916=_0x42ae12[_0x37d6b3]?.['trim']()||_0x2b062f;if(_0x171916==='')throw new Error('Empty\x20Summative\x20Course\x20at\x20row\x20'+_0x20ae10+'.');_0x2b062f=_0x171916;const _0x306bed=_0x42ae12[_0x33176f]?.['trim']()||_0x4bf855;if(_0x306bed==='')throw new Error('Empty\x20Assessment\x20Tool\x20at\x20row\x20'+_0x20ae10+'.');_0x4bf855=_0x306bed;const _0x2ab42c=_0x42ae12[_0x19b6d0]?.['trim']()||_0x87bc58;if(_0x2ab42c==='')throw new Error('Empty\x20Performance\x20Target\x20at\x20row\x20'+_0x20ae10+'.');_0x87bc58=_0x2ab42c;const _0x7ac250=parseFormativeCourses(_0x2fc350);if(_0x7ac250['length']===0x0)throw new Error('Invalid\x20Formative\x20Courses\x20format\x20at\x20row\x20'+_0x20ae10+'.');const _0xa778c5=performaceTarget(_0x2ab42c);if(!_0xa778c5['performance_target']||!_0xa778c5['passing_score'])throw new Error('Invalid\x20Performance\x20Targets\x20format\x20at\x20row\x20'+_0x20ae10+'.');const _0x267b01={'pi_desc':_0x10dca9,'FormativeCourses':_0x7ac250['map'](_0x3e9024=>({'course_id':_0x3e9024,'cognitive_level':0x0})),'SummativeCourse':{'course_id':_0x171916},'AssessmentTool':{'at_desc':_0x306bed},'PerformanceTargets':{'target_percent':_0xa778c5['performance_target'],'min_score':_0xa778c5['passing_score']}};_0x32de96['PerfIndicators']['push'](_0x267b01);}return {'success':!![],'message':'Successfully\x20parsed\x20POAEP\x20file.','data':{'POAEP':_0xf07ba9}};}catch(_0x56e886){return {'success':![],'error':_0x56e886 instanceof Error?_0x56e886['message']:_0x56e886,'message':'Please\x20ensure\x20the\x20file\x20follows\x20the\x20POAEP\x20template.'};}};
|
|
41
41
|
|
|
42
|
-
async function uploadPOAEP(
|
|
42
|
+
async function uploadPOAEP(_0x1b9a65,_0x28c2bd,_0x580487,_0x57c37f,_0x3cb306){try{const _0x3eb3fc=await convertToCSVFile(_0x28c2bd),_0x54c53e=await _0x3eb3fc['text'](),_0x2d9e40=parsePOAEP(_0x54c53e),_0x2008a1=await fetch(_0x1b9a65+'/program-outcomes/poaep/upload?curr_id='+_0x57c37f+'&period_id='+_0x3cb306,{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x580487},'credentials':'include','body':JSON['stringify'](_0x2d9e40)});if(!_0x2008a1['ok']){const _0x5d1995=await _0x2008a1['json']();throw _0x5d1995;}return _0x2008a1['json']();}catch(_0x15f79d){throw _0x15f79d;}}
|
|
43
43
|
|
|
44
|
-
const
|
|
44
|
+
const getAssessmentDataFromXLSX=async _0x387540=>{try{const _0x142fe2=await convertToCSVFile(_0x387540),_0x1f00a4=await _0x142fe2['text'](),_0x5e264d=parseAssessmentCsv(_0x1f00a4),_0x28ea14={'success':!![],'message':'Successfully\x20parsed\x20Assessment\x20Data.','data':_0x5e264d};return Promise['resolve'](_0x28ea14);}catch(_0x26a2d5){return Promise['reject']({'success':![],'message':'Error\x20parsing\x20Assessment\x20Data.','error':_0x26a2d5});}};
|
|
45
45
|
|
|
46
|
-
const
|
|
46
|
+
const getClassListFromXLSX=async _0xe0a81f=>{try{const _0x19d0a1=await convertToCSVFile(_0xe0a81f),_0x14b76a=await _0x19d0a1['text'](),_0x19db04=parseClassList(_0x14b76a),_0x311c2e={'success':!![],'message':'Successfully\x20parsed\x20Class\x20List.','data':_0x19db04};return Promise['resolve'](_0x311c2e);}catch(_0x6dc2c6){return Promise['reject']({'success':![],'message':'Error\x20parsing\x20Assessment\x20Data.','error':_0x6dc2c6});}};
|
|
47
47
|
|
|
48
|
-
async function
|
|
48
|
+
async function getCOAEPFromXLSX(_0x2e4f30){try{const _0x45b287=await convertToCSVFile(_0x2e4f30),_0x5720c7=await _0x45b287['text'](),_0xc12b6f=parseCOAEP(_0x5720c7);if('error'in _0xc12b6f)return Promise['reject']({'success':![],'message':_0xc12b6f['message'],'error':_0xc12b6f['error']});const _0x3a1978={'success':!![],'message':'Successfully\x20parsed\x20COAEP\x20Data.','data':_0xc12b6f};return Promise['resolve'](_0x3a1978);}catch(_0x2830f8){return Promise['reject']({'success':![],'message':'Error\x20parsing\x20COAEP\x20Data.','error':_0x2830f8});}}async function getCOAEPFromCSV(_0x2375ee){try{const _0xdd9da0=parseCOAEP(_0x2375ee);if(!_0xdd9da0['success'])return Promise['reject'](_0xdd9da0);return Promise['resolve'](_0xdd9da0);}catch(_0x9418d0){return Promise['reject']({'success':![],'message':'Error\x20parsing\x20COAEP','error':_0x9418d0});}}
|
|
49
49
|
|
|
50
|
-
const
|
|
50
|
+
const getCourseOfferingFromXLSX=async _0x1f47b5=>{try{const _0x118b61=await convertToCSVFile(_0x1f47b5),_0x1d936e=await _0x118b61['text'](),_0x17af45=parseCourseOffering(_0x1d936e),_0x487fa7={'success':!![],'message':'Successfully\x20parsed\x20Course\x20Offering.','data':{'courseOfferings':_0x17af45}};return Promise['resolve'](_0x487fa7);}catch(_0x1d63be){return Promise['reject']({'success':![],'message':'Error\x20parsing\x20Course\x20Offering.','error':_0x1d63be});}};
|
|
51
51
|
|
|
52
|
-
const
|
|
52
|
+
const getCurriculumFromXLSX=async _0x560bea=>{try{const _0x26439d=await convertToCSVFile(_0x560bea),_0x25735f=await _0x26439d['text'](),_0x6a12da=parseCurriculum(_0x25735f),_0x231560={'success':!![],'message':'Successfully\x20parsed\x20Curriculum.','data':{'curriculums':_0x6a12da}};return Promise['resolve'](_0x231560);}catch(_0x17c5b8){return Promise['reject']({'success':![],'message':'Error\x20parsing\x20Curriculum.','error':_0x17c5b8});}};
|
|
53
53
|
|
|
54
|
-
const
|
|
54
|
+
const getPOAEPFromXLSX=async _0x380272=>{try{const _0x1960de=await convertToCSVFile(_0x380272),_0x3279e4=await _0x1960de['text'](),_0x31cd40=parsePOAEP(_0x3279e4);if(!_0x31cd40['success'])return Promise['reject'](_0x31cd40);return Promise['resolve'](_0x31cd40);}catch(_0x2e3947){return Promise['reject']({'success':![],'message':'Error\x20parsing\x20POAEP.','error':_0x2e3947});}};const getPOAEPFromCSV=async _0x57af9b=>{try{const _0x11ece6=parsePOAEP(_0x57af9b);if(!_0x11ece6['success'])return Promise['reject'](_0x11ece6);return Promise['resolve'](_0x11ece6);}catch(_0x2bba98){return Promise['reject']({'success':![],'message':'Error\x20parsing\x20POAEP','error':_0x2bba98});}};
|
|
55
55
|
|
|
56
|
-
const
|
|
56
|
+
const getDeptFacultyFromXLSX=async _0x26936d=>{try{const _0x42c031=await convertToCSVFile(_0x26936d),_0x3e792c=new FormData();_0x3e792c['append']('csvFile',_0x42c031);const _0x57ed38={'success':!![],'message':'Successfully\x20parsed\x20Dept\x20Faculty.','data':{'body':_0x3e792c}};return Promise['resolve'](_0x57ed38);}catch(_0x47014d){return Promise['reject']({'success':![],'message':'Error\x20parsing\x20Dept\x20Faculty.','error':_0x47014d});}};
|
|
57
57
|
|
|
58
|
-
const
|
|
58
|
+
const getEnrolledStudentsFromXLSX=async _0x5a6e16=>{try{const _0x4d9fc8=await convertToCSVFile(_0x5a6e16),_0x486f74=new FormData();_0x486f74['append']('csvFile',_0x4d9fc8);const _0x396600={'success':!![],'message':'Successfully\x20parsed\x20Enrolled\x20Students.','data':{'body':_0x486f74}};return Promise['resolve'](_0x396600);}catch(_0x40e73d){return Promise['reject']({'success':![],'message':'Error\x20parsing\x20Enrolled\x20Students.','error':_0x40e73d});}};
|
|
59
59
|
|
|
60
|
-
class Client{['BASE_URL'];constructor(
|
|
60
|
+
class Client{['BASE_URL'];constructor(_0x16d716){this['BASE_URL']=_0x16d716;}['Parser'](){return {'curriculum':async _0x4d2d34=>{const _0x3adcdd=await uploadCurriculum(this['BASE_URL'],_0x4d2d34);return _0x3adcdd;},'courseOffering':async _0x3a31ed=>{const _0x27e920=await uploadCourseOffering(this['BASE_URL'],_0x3a31ed);return _0x27e920;},'coaep':async(_0x39f30e,_0x4f9212)=>{const _0xeb67dc=await uploadCOAEP(this['BASE_URL'],_0x39f30e,_0x4f9212);return _0xeb67dc;},'enrolledStudent':async _0x193966=>{const _0x514d9d=await uploadEnrolledStudent(this['BASE_URL'],_0x193966);return _0x514d9d;},'classlist':async(_0x20b849,_0x3f5d48,_0x42a35b)=>{const _0x5c3168=await uploadClassList(this['BASE_URL'],_0x20b849,_0x3f5d48,_0x42a35b);return _0x5c3168;},'assessmentData':async _0x382dba=>{const _0x5b3a57=await uploadAssessmentData(this['BASE_URL'],_0x382dba);return _0x5b3a57;},'deptFaculty':async _0x2749c0=>{const _0x6b5ed5=await uploadDeptFaculty(this['BASE_URL'],_0x2749c0);return _0x6b5ed5;},'poaep':async(_0x5601ac,_0x26690a,_0x415690,_0x4067ee)=>{const _0xd13e4e=await uploadPOAEP(this['BASE_URL'],_0x5601ac,_0x26690a,_0x415690,_0x4067ee);return _0xd13e4e;},'getAssessmentDataFromXLSX':getAssessmentDataFromXLSX,'getClassListFromXLSX':getClassListFromXLSX,'getCOAEPFromCSV':getCOAEPFromCSV,'getCOAEPFromXLSX':getCOAEPFromXLSX,'getCourseOfferingFromXLSX':getCourseOfferingFromXLSX,'getCurriculumFromXLSX':getCurriculumFromXLSX,'getPOAEPFromCSV':getPOAEPFromCSV,'getPOAEPFromXLSX':getPOAEPFromXLSX,'getDeptFacultyFromXLSX':getDeptFacultyFromXLSX,'getEnrolledStudentsFromXLSX':getEnrolledStudentsFromXLSX};}}
|
|
61
61
|
|
|
62
62
|
export { Client as default };
|
package/main.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getCOAEPFromCSV, getCOAEPFromXLSX } from "./payloads/getCOAEP";
|
|
2
2
|
export default class Client {
|
|
3
3
|
private BASE_URL;
|
|
4
4
|
constructor(url: string);
|
|
@@ -25,30 +25,34 @@ export default class Client {
|
|
|
25
25
|
* Functions that parse then return the payload
|
|
26
26
|
* instead of directly calling the backend and returning the response
|
|
27
27
|
*/
|
|
28
|
-
|
|
28
|
+
getAssessmentDataFromXLSX: (xls: File) => Promise<import("./types/parserResult").ParserResult<{
|
|
29
29
|
assessmentData: import("./types/assessmentdata").AssessmentData;
|
|
30
30
|
}>>;
|
|
31
|
-
|
|
31
|
+
getClassListFromXLSX: (xls: File) => Promise<import("./types/parserResult").ParserResult<{
|
|
32
32
|
enrolledCourses: import("./types/classList").classList[];
|
|
33
33
|
}>>;
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
getCOAEPFromCSV: typeof getCOAEPFromCSV;
|
|
35
|
+
getCOAEPFromXLSX: typeof getCOAEPFromXLSX;
|
|
36
|
+
getCourseOfferingFromXLSX: (xls: File) => Promise<import("./types/parserResult").ParserResult<{
|
|
36
37
|
courseOfferings: import("./types/courseOffering").CourseOffering[];
|
|
37
38
|
}>>;
|
|
38
|
-
|
|
39
|
+
getCurriculumFromXLSX: (xls: File) => Promise<import("./types/parserResult").ParserResult<{
|
|
39
40
|
curriculums: import("./types/curriculum").CurriculumCourses[];
|
|
40
41
|
}>>;
|
|
41
|
-
|
|
42
|
+
getPOAEPFromCSV: (csv: string) => Promise<import("./types/parserResult").ParserResult<{
|
|
43
|
+
POAEP: import("./types/poaep").PO[];
|
|
44
|
+
}>>;
|
|
45
|
+
getPOAEPFromXLSX: (xls: File) => Promise<import("./types/parserResult").ParserResult<{
|
|
42
46
|
POAEP: import("./types/poaep").PO[];
|
|
43
47
|
}>>;
|
|
44
48
|
/**
|
|
45
49
|
* Functions that converts the xls to csv
|
|
46
50
|
* then returns the csv as formdata
|
|
47
51
|
*/
|
|
48
|
-
|
|
52
|
+
getDeptFacultyFromXLSX: (xls: File) => Promise<import("./types/parserResult").ParserResult<{
|
|
49
53
|
body: FormData;
|
|
50
54
|
}>>;
|
|
51
|
-
|
|
55
|
+
getEnrolledStudentsFromXLSX: (xls: File) => Promise<import("./types/parserResult").ParserResult<{
|
|
52
56
|
body: FormData;
|
|
53
57
|
}>>;
|
|
54
58
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { AssessmentData } from "../types/assessmentdata";
|
|
2
2
|
import { ParserResult } from "../types/parserResult";
|
|
3
|
-
declare const
|
|
3
|
+
export declare const getAssessmentDataFromXLSX: (xls: File) => Promise<ParserResult<{
|
|
4
4
|
assessmentData: AssessmentData;
|
|
5
5
|
}>>;
|
|
6
|
-
export default getAssessmentData;
|
package/payloads/getCOAEP.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { COAEP } from "../types/coaep";
|
|
2
2
|
import { ParserResult } from "../types/parserResult";
|
|
3
|
-
export declare function
|
|
3
|
+
export declare function getCOAEPFromXLSX(xls: File): Promise<ParserResult<{
|
|
4
|
+
COAEP: COAEP;
|
|
5
|
+
}>>;
|
|
6
|
+
export declare function getCOAEPFromCSV(csv: string): Promise<ParserResult<{
|
|
4
7
|
COAEP: COAEP;
|
|
5
8
|
}>>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { classList } from "../types/classList";
|
|
2
2
|
import { ParserResult } from "../types/parserResult";
|
|
3
|
-
declare const
|
|
3
|
+
export declare const getClassListFromXLSX: (xls: File) => Promise<ParserResult<{
|
|
4
4
|
enrolledCourses: classList[];
|
|
5
5
|
}>>;
|
|
6
|
-
export default getClassList;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ParserResult } from "../types/parserResult";
|
|
2
2
|
import { CourseOffering } from "../types/courseOffering";
|
|
3
|
-
declare const
|
|
3
|
+
export declare const getCourseOfferingFromXLSX: (xls: File) => Promise<ParserResult<{
|
|
4
4
|
courseOfferings: CourseOffering[];
|
|
5
5
|
}>>;
|
|
6
|
-
export default getCourseOffering;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ParserResult } from "../types/parserResult";
|
|
2
2
|
import { CurriculumCourses } from "../types/curriculum";
|
|
3
|
-
declare const
|
|
3
|
+
export declare const getCurriculumFromXLSX: (xls: File) => Promise<ParserResult<{
|
|
4
4
|
curriculums: CurriculumCourses[];
|
|
5
5
|
}>>;
|
|
6
|
-
export default getCurriculum;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ParserResult } from "../types/parserResult";
|
|
2
|
-
declare const
|
|
2
|
+
export declare const getEnrolledStudentsFromXLSX: (xls: File) => Promise<ParserResult<{
|
|
3
3
|
body: FormData;
|
|
4
4
|
}>>;
|
|
5
|
-
export default getEnrolledStudents;
|
package/payloads/getPOAEP.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { ParserResult } from "../types/parserResult";
|
|
2
2
|
import { PO } from "../types/poaep";
|
|
3
|
-
declare const
|
|
3
|
+
export declare const getPOAEPFromXLSX: (xls: File) => Promise<ParserResult<{
|
|
4
|
+
POAEP: PO[];
|
|
5
|
+
}>>;
|
|
6
|
+
export declare const getPOAEPFromCSV: (csv: string) => Promise<ParserResult<{
|
|
4
7
|
POAEP: PO[];
|
|
5
8
|
}>>;
|
|
6
|
-
export default getPOAEP;
|