diff --git a/web_app/build/asset-manifest.json b/web_app/build/asset-manifest.json index 3af4b43..e81b86f 100644 --- a/web_app/build/asset-manifest.json +++ b/web_app/build/asset-manifest.json @@ -1,25 +1,25 @@ { "files": { - "main.css": "https://centrifuga4.herokuapp.com/static/css/main.68b8b5e7.chunk.css", - "main.js": "https://centrifuga4.herokuapp.com/static/js/main.d8d64694.chunk.js", - "main.js.map": "https://centrifuga4.herokuapp.com/static/js/main.d8d64694.chunk.js.map", - "runtime-main.js": "https://centrifuga4.herokuapp.com/static/js/runtime-main.f177619d.js", - "runtime-main.js.map": "https://centrifuga4.herokuapp.com/static/js/runtime-main.f177619d.js.map", - "static/css/2.f898fd43.chunk.css": "https://centrifuga4.herokuapp.com/static/css/2.f898fd43.chunk.css", - "static/js/2.b82ef6c7.chunk.js": "https://centrifuga4.herokuapp.com/static/js/2.b82ef6c7.chunk.js", - "static/js/2.b82ef6c7.chunk.js.map": "https://centrifuga4.herokuapp.com/static/js/2.b82ef6c7.chunk.js.map", - "static/js/3.4c05fd7e.chunk.js": "https://centrifuga4.herokuapp.com/static/js/3.4c05fd7e.chunk.js", - "static/js/3.4c05fd7e.chunk.js.map": "https://centrifuga4.herokuapp.com/static/js/3.4c05fd7e.chunk.js.map", - "index.html": "https://centrifuga4.herokuapp.com/index.html", - "static/css/2.f898fd43.chunk.css.map": "https://centrifuga4.herokuapp.com/static/css/2.f898fd43.chunk.css.map", - "static/css/main.68b8b5e7.chunk.css.map": "https://centrifuga4.herokuapp.com/static/css/main.68b8b5e7.chunk.css.map", - "static/js/2.b82ef6c7.chunk.js.LICENSE.txt": "https://centrifuga4.herokuapp.com/static/js/2.b82ef6c7.chunk.js.LICENSE.txt" + "main.css": "https://c4.xamfra.net/static/css/main.68b8b5e7.chunk.css", + "main.js": "https://c4.xamfra.net/static/js/main.e85fb0f1.chunk.js", + "main.js.map": "https://c4.xamfra.net/static/js/main.e85fb0f1.chunk.js.map", + "runtime-main.js": "https://c4.xamfra.net/static/js/runtime-main.c99b2fa0.js", + "runtime-main.js.map": "https://c4.xamfra.net/static/js/runtime-main.c99b2fa0.js.map", + "static/css/2.f898fd43.chunk.css": "https://c4.xamfra.net/static/css/2.f898fd43.chunk.css", + "static/js/2.b82ef6c7.chunk.js": "https://c4.xamfra.net/static/js/2.b82ef6c7.chunk.js", + "static/js/2.b82ef6c7.chunk.js.map": "https://c4.xamfra.net/static/js/2.b82ef6c7.chunk.js.map", + "static/js/3.4c05fd7e.chunk.js": "https://c4.xamfra.net/static/js/3.4c05fd7e.chunk.js", + "static/js/3.4c05fd7e.chunk.js.map": "https://c4.xamfra.net/static/js/3.4c05fd7e.chunk.js.map", + "index.html": "https://c4.xamfra.net/index.html", + "static/css/2.f898fd43.chunk.css.map": "https://c4.xamfra.net/static/css/2.f898fd43.chunk.css.map", + "static/css/main.68b8b5e7.chunk.css.map": "https://c4.xamfra.net/static/css/main.68b8b5e7.chunk.css.map", + "static/js/2.b82ef6c7.chunk.js.LICENSE.txt": "https://c4.xamfra.net/static/js/2.b82ef6c7.chunk.js.LICENSE.txt" }, "entrypoints": [ - "static/js/runtime-main.f177619d.js", + "static/js/runtime-main.c99b2fa0.js", "static/css/2.f898fd43.chunk.css", "static/js/2.b82ef6c7.chunk.js", "static/css/main.68b8b5e7.chunk.css", - "static/js/main.d8d64694.chunk.js" + "static/js/main.e85fb0f1.chunk.js" ] } \ No newline at end of file diff --git a/web_app/build/index.html b/web_app/build/index.html index fbb88df..43b4ebf 100644 --- a/web_app/build/index.html +++ b/web_app/build/index.html @@ -1 +1 @@ -centrífuga4, Xamfrà
\ No newline at end of file +centrífuga4, Xamfrà
\ No newline at end of file diff --git a/web_app/build/static/js/main.d8d64694.chunk.js b/web_app/build/static/js/main.d8d64694.chunk.js deleted file mode 100644 index da66c92..0000000 --- a/web_app/build/static/js/main.d8d64694.chunk.js +++ /dev/null @@ -1,2 +0,0 @@ -(this["webpackJsonpcentrifuga4-frontend"]=this["webpackJsonpcentrifuga4-frontend"]||[]).push([[0],{287:function(e){e.exports=JSON.parse('{"log_out":"log out","log_in":"log in","download_backup":"download backup","change_language":"change language","dark_light_theme":"dark/light theme","my_account":"my account","open_drawer":"open drawer","no role":"no role","students":"students","role":"role","administrator":"administrator","administrative":"administrative","layman":"layman","courses":"courses","rooms":"rooms","comment":"comment","add-comment":"add comment","export_attendances":"export saved attendances","docs":"docs","teachers":"teachers","load-more":"load more","home":"home","capacity":"capacity","locations":"locations","new_course":"new course","attended":"attended","absent":"absence","absent-justified":"justified absence","hi":"hi","chose_list_dates":"choose the first and last date for which you want the lists to be created","user":"user","teachers-only-zone":"teachers-only zone","more":"more","link-user-to-teacher":"Are you sure you want to link this user to this teacher?","teacher-user":"teacher-user","teacher":"teacher","payments":"payments","take attendance":"take attendance","users":"users","to":"to","teacher_dashboard":"teacher dashboard","send_bulk_email":"send bulk email \u26a1","send_bulk_email_description":"this email will be sent to all the chosen emails of the selected courses (to the actual families)!","send_email":"send email","use_emails":"emails to use","resolved":"resolved (student if 18+ or if no contacts available, otherwise contacts)","settings":"settings","contacts":"contacts","all":"all","search":"search","name":"name","surname1":"first surname","surname2":"second surname","email":"email","phone":"phone","address":"address","city":"city","zip":"zip","dni":"DNI / NIE / passport","gender":"gender","birth date":"birth date","country_of_origin":"country of origin of the family","been_invited":"you have been invited to join centr\xedfuga4 \ud83d\udcef","confirm_password":"confirm password","password":"password","username":"username","invalid_expired_invite":"Your invitation has expired or is invalid! \ud83d\udc82","invalid_expired_reset":"Your reset link has expired or is invalid! \ud83d\udc82","used_invite":"Your invitation can\'t be used twice or for a user that already exists! \ud83d\udc82","reset_password":"reset password","username_required_password_reset":"Fill in the email field to ask for a password reset!","started_password_reset":"Process started. If the username is correct, you will receive an email to finish the password change!","export":"export","empty":"none","export_results_csv":"export this page as .csv","email_required":"email is required","invalid_email":"enter a valid email","password_required":"password is required","delete_payment":"delete the payment","not_undone":"this action can not be undone","warning_not_logged_in":"you are not logged in! \ud83d\udc82","warning_not_enough_privileges":"you don\'t have enough privileges to continue! \ud83d\udc82","password_constraints":"must be longer than 8 characters; including: 1 uppercase, 1 lowercase, 1 number and 1 special character","passwords_unmatched":"passwords don\'t match","new_password":"choose your new password \ud83d\udd11","reset_password_success":"password change successful","sign_up_success":"sign up successful","sign_up":"sign up","change_password":"change password","name_required":"name is required","surname1_required":"first surname is required","surname2_required":"second surname is required","longer_8":"must be longer than 8 characters","shorter_64":"must be smaller than 64 characters","has_lowecase":"must have at least 1 lowercase character","has_uppercase":"must have at least 1 uppercase character","has_digit":"must have at least 1 digit (0-9)","has_special":"must have at least 1 special character (e.g. %)","no_plus":"can\'t contain \'+\'","reset":"reset","save":"save","upload":"attach files","birthdate":"birthdate","attendee":"student","contact":"guardian","price_term":"price per term","success":"done","send_receipt":"send confirmation email to student","export_receipt":"export receipt as pdf","no_payments":"there are no payments","delete":"delete","first":"first","last":"last","mark_all":"mark all","has_paid_cash":"has paid with cash","tooltip-bank-transfer":"has paid through a bank transfer","other-payment-method":"has paid though and unknown method","has_paid":"has paid","nb":"non binary / not represented by any of the above","m":"male","f":"female","bank-transfer":"bank transfer","bank-direct-debit":"direct debit","tooltip-bank-direct-debit":"has paid through direct debit","cash":"cash","method":"method","import":"amount","import_required":"amount is required","date":"date","concept":"concept","new_payment":"new payment","create":"create","field_required":"this field is required","date_required":"date is required","new_guardian":"new guardian","action_cant_undone":"this action can not be undone","delete_guardian_question":"do you want to delete this guardian?","delete_course_question":"do you want to delete this course?","confirm_add_to_course":"do you want to add the teacher to this course?","add_to_course":"add to course","confirm_remove_from_course":"do you want to remove the teacher from this course?","cancel":"cancel","delete_teacher":"do you want to delete this teacher?","delete_guardian":"delete this guardian","delete_student":"delete this student","delete_student_question":"do you want to delete this student?","delete_room":"delete location","delete_room_question":"do you want to delete this location?","delete_user":"delete user","new_room":"new location","new_teacher":"new teacher","delete_user_question":"do you want to delete this user?","student_also_deletes":"this action can not be undone; it will also delete the associated guardians, payments and schedules","default_payment_method":"payment method","payment_comments":"comments (payment)","other_comments":"comments","years_in_xamfra":"years in Xamfr\xe0","is_studying":"studies","is_working":"works","yes":"yes","no":"no","is_early_unenrolled":"unenrolled","is_enrolled":"enrolled","is_early_unenrolled_required":"unenrolled is required","is_enrolled_required":"enrolled is required","education_entity":"educational center","education_year":"year","kindergarten_p0":"p0","kindergarten_p1":"p1","kindergarten_p2":"p2","kindergarten_p3":"p3","kindergarten_p4":"p4","kindergarten_p5":"p5","primary_1":"primary, 1st","primary_2":"primary, 2nd","primary_3":"primary, 3rd","primary_4":"primary, 4th","primary_5":"primary, 5th","primary_6":"primary, 6th","eso_1":"ESO, 1st","eso_2":"ESO, 2nd","eso_3":"ESO, 3rd","eso_4":"ESO, 4th","baccalaureate_1":"baccalaureate, 1st","baccalaureate_2":"baccalaureate, 2nd","FP_lower":"lower FP","FP_higher":"higher FP","undergraduate":"undergraduate","master":"master","phd":"PhD","career":"career","working_required":"works is required","studying_required":"studies is required","career_required":"career is required","education_entity_required":"center is required","education_year_required":"year is required","enrolled_unenrolled":"can\'t be enrolled and unenrolled","relation":"relation","relation_required":"relation is required","father":"father","subject":"subject","can-register-attendance":"can register attendance for classes","attendance":"attendance","mother":"mother","grandfather":"grandfather","grandmother":"grandmother","brother":"brother","sister":"sister","uncle":"uncle","aunt":"aunt","cousin":"cousin","legal_guardian":"legal guardian","status":"enrolment status","enrolled":"enrolled","early-unenrolled":"early unenrolled","pre-enrolled":"pre-enrolled","other":"other","grant_letter":"grant letter","enrolment_agreement":"enrolment agreement","send_grant_letter":"send grant letter","export_grant_letter":"download grant letter","send_enrolment_agreement":"send enrolment agreement","export_enrolment_agreement":"download enrolment agreement","status_required":"status is required","image_required":"image use is required","image_agreement":"use of image","cant_remove_schedule":"schedules of a whole course can\'t be removed","continue":"continue","cancelled":"cancelled","sure_delete_event":"Are you sure? This will delete this schedule from the student.","new_student":"new student","birthdate_required":"birth date is required","no_courses":"there are no courses","published":"published","only_published":"show only published courses","labels":"labels","course":"course","adult":"adult","add_teacher":"add teacher","add_student":"add student","download":"download","god_file":"god file","export_contact_sheets":"export all students with their guardians","export_all_plus":"export all+","attendance_list":"attendance list","export_attendance_list":"download attendance list","students_contact_sheet":"students contact sheet","export_students_contact_sheet":"download students contact sheet","no_students":"no students in this course","no_teachers":"no teachers in this course","description":"description","public":"public","private":"private","confirm_link_to_room":"Are you sure you want to link this room to the course?","link_room":"link room to course","view":"view","pre_enrolment_date":"pre-enrolment date","enrolment_date":"enrolment date","early_unenrolment_date":"early unenrolment date","only_private":"show only private courses","only_enrolled":"show only enrolled students","only_preenrolled":"show only pre-enrolled students","only_earlyunenrolled":"show only early unenrolled students","only_cash":"show only students with cash as the default payment method","only_banktransfer":"show only students with bank transfer as the default payment method","only_bankdirectdebit":"show only students with direct debit as the default payment method","filters_actions":"filters & actions","enroll_to_course":"add to course","confirm_enroll_to_course":"Are you sure you want to add it to the selected course?","confirm_unenroll_to_course":"Are you sure you want to remove it from the selected course?","search_courses":"search courses","new_user":"invite user","send_grant_letter_question":"send grant letter?","this_will_be_sent":"this letter will be sent to the guardians (if -18) or to the student (if 18+ or no guardians available)","sure_delete_event_base":"Are you sure you want to delete the schedule from the course?","no_results":"no results","AF":"afghanistan","AX":"\xe5land islands","AL":"albania","DZ":"algeria","AS":"american samoa","AD":"andorra","AO":"angola","AI":"anguilla","AQ":"antarctica","AG":"antigua and barbuda","AR":"argentina","AM":"armenia","AW":"aruba","AU":"australia","AT":"austria","AZ":"azerbaijan","BS":"bahamas","BH":"bahrain","BD":"bangladesh","BB":"barbados","BY":"belarus","BE":"belgium","BZ":"belize","BJ":"benin","BM":"bermuda","BT":"bhutan","BO":"bolivia, plurinational state of","BQ":"bonaire, sint eustatius and saba","BA":"bosnia and herzegovina","BW":"botswana","BV":"bouvet island","BR":"brazil","IO":"british indian ocean territory","BN":"brunei darussalam","BG":"bulgaria","BF":"burkina faso","BI":"burundi","KH":"cambodia","CM":"cameroon","CA":"canada","CV":"cape verde","KY":"cayman islands","CF":"central african republic","TD":"chad","CL":"chile","CN":"china","CX":"christmas island","CC":"cocos (keeling) islands","CO":"colombia","KM":"comoros","CG":"congo","CD":"congo, the democratic republic of the","CK":"cook islands","CR":"costa rica","CI":"c\xf4te d\'ivoire","HR":"croatia","CU":"cuba","CW":"cura\xe7ao","CY":"cyprus","CZ":"czech republic","DK":"denmark","DJ":"djibouti","DM":"dominica","DO":"dominican republic","EC":"ecuador","EG":"egypt","SV":"el salvador","GQ":"equatorial guinea","ER":"eritrea","EE":"estonia","ET":"ethiopia","FK":"falkland islands (malvinas)","FO":"faroe islands","FJ":"fiji","FI":"finland","FR":"france","GF":"french guiana","PF":"french polynesia","TF":"french southern territories","GA":"gabon","GM":"gambia","GE":"georgia","DE":"germany","GH":"ghana","GI":"gibraltar","GR":"greece","GL":"greenland","GD":"grenada","GP":"guadeloupe","GU":"guam","GT":"guatemala","GG":"guernsey","GN":"guinea","GW":"guinea-bissau","GY":"guyana","HT":"haiti","HM":"heard island and mcdonald islands","VA":"holy see (vatican city state)","HN":"honduras","HK":"hong kong","HU":"hungary","IS":"iceland","IN":"india","ID":"indonesia","IR":"iran, islamic republic of","IQ":"iraq","IE":"ireland","IM":"isle of man","IL":"israel","IT":"italy","JM":"jamaica","JP":"japan","JE":"jersey","JO":"jordan","KZ":"kazakhstan","KE":"kenya","KI":"kiribati","KP":"korea, democratic people\'s republic of","KR":"korea, republic of","KW":"kuwait","KG":"kyrgyzstan","LA":"lao people\'s democratic republic","LV":"latvia","LB":"lebanon","LS":"lesotho","LR":"liberia","LY":"libya","LI":"liechtenstein","LT":"lithuania","LU":"luxembourg","MO":"macao","MK":"macedonia, the former yugoslav republic of","MG":"madagascar","MW":"malawi","MY":"malaysia","MV":"maldives","ML":"mali","MT":"malta","MH":"marshall islands","MQ":"martinique","MR":"mauritania","MU":"mauritius","YT":"mayotte","MX":"mexico","FM":"micronesia, federated states of","MD":"moldova, republic of","MC":"monaco","MN":"mongolia","ME":"montenegro","MS":"montserrat","MA":"morocco","MZ":"mozambique","MM":"myanmar","NA":"namibia","NR":"nauru","NP":"nepal","NL":"netherlands","NC":"new caledonia","NZ":"new zealand","NI":"nicaragua","NE":"niger","NG":"nigeria","NU":"niue","NF":"norfolk island","MP":"northern mariana islands","NO":"norway","OM":"oman","PK":"pakistan","PW":"palau","PS":"palestine, state of","PA":"panama","PG":"papua new guinea","PY":"paraguay","PE":"peru","PH":"philippines","PN":"pitcairn","PL":"poland","PT":"portugal","PR":"puerto rico","QA":"qatar","RE":"r\xe9union","RO":"romania","RU":"russian federation","RW":"rwanda","BL":"saint barth\xe9lemy","SH":"saint helena, ascension and tristan da cunha","KN":"saint kitts and nevis","LC":"saint lucia","MF":"saint martin (french part)","PM":"saint pierre and miquelon","VC":"saint vincent and the grenadines","WS":"samoa","SM":"san marino","ST":"sao tome and principe","SA":"saudi arabia","SN":"senegal","RS":"serbia","SC":"seychelles","SL":"sierra leone","SG":"singapore","SX":"sint maarten (dutch part)","SK":"slovakia","SI":"slovenia","SB":"solomon islands","SO":"somalia","ZA":"south africa","GS":"south georgia and the south sandwich islands","SS":"south sudan","ES":"spain","LK":"sri lanka","SD":"sudan","SR":"suriname","SJ":"svalbard and jan mayen","SZ":"swaziland","SE":"sweden","CH":"switzerland","SY":"syrian arab republic","TW":"taiwan, province of china","TJ":"tajikistan","TZ":"tanzania, united republic of","TH":"thailand","TL":"timor-leste","TG":"togo","TK":"tokelau","TO":"tonga","TT":"trinidad and tobago","TN":"tunisia","TR":"turkey","TM":"turkmenistan","TC":"turks and caicos islands","TV":"tuvalu","UG":"uganda","UA":"ukraine","AE":"united arab emirates","GB":"united kingdom","US":"united states","UM":"united states minor outlying islands","UY":"uruguay","UZ":"uzbekistan","VU":"vanuatu","VE":"venezuela, bolivarian republic of","VN":"viet nam","VG":"virgin islands, british","VI":"virgin islands, u.s.","WF":"wallis and futuna","EH":"western sahara","YE":"yemen","ZM":"zambia","ZW":"zimbabwe","invite":"invite","calendar_url":"calendar url","export_calendar":"export calendar","invite_user":"\ud83d\udcef invite user","permissions":"permissions","can-read":"can read","can-edit":"can edit","can-create":"can create","can-delete":"can delete","can-send-emails":"can send emails","can-invite-users":"can invite users","can-operate-with-students":"can operate with students","can-operate-with-courses":"can operate with courses","can-operate-with-guardians":"can operate with guardians","can-operate-with-payments":"can operate with payments","can-operate-with-rooms":"can operate with rooms","can-operate-with-schedules":"can operate with schedules","can-operate-with-teachers":"can operate with teachers","can-operate-with-users":"can operate with users","next":"next","back":"back","skip":"skip","schedules":"schedules","finish":"send","here":"here","can-operate-with-payment-receipts":"can operate with payment receipts","data_protection":"data protection","student_info":"student information","contact_person_1":"contact person (1)","contact_person_2":"contact person (2)","confirmation":"confirmation","ss_agent":"social service worker","no_courses_found_add_edu":"we can\'t find any courses for you; go back and add your education level! If you already did that, contact us (xamfra.net/contacte)!","student":"student","search_by_id":"search by id","search_by":"search by","export_all":"export all","export_all_csv":"export all pages as .csv","full_name":"full name","room":"room","use_eng":"see in english","use_cat":"see in catalan","use_dark":"use dark theme","use_light":"use light theme","required":"field required","2FA_code":"2FA code","2FA_needed":"fill in the 2FA code from the app","2FA_6digits":"the 2FA code has 6 digits","2FA_invalid":"the 2FA code has 6 integer digits","setup_2FA":"set up 2FA \ud83d\udee1\ufe0f","learn_how_2FA":"How to set up 2FA?","title_2fa_continue":"Have you scanned the QR code in the 2FA app?","description_2fa_continue":"You won\'t be able to access your account if you don\'t set up you 2FA app now. You won\'t be able to scan this QR code in the future.","2FA_tip1":"Two-factor authentication (2FA) is essential to guarantee you are the only one who can access student\'s data.","2FA_tip2":"Scan the QR code with your 2FA app of choice.","2FA_tip3":"This QR code will never be shown again.","rememberMe":"remember me"}')},288:function(e){e.exports=JSON.parse('{"log_out":"tancar la sessi\xf3","log_in":"iniciar sessi\xf3","download_backup":"descarregar c\xf2pia","change_language":"cambiar idioma","dark_light_theme":"tema clar/fosc","my_account":"el meu compte","open_drawer":"obrir men\xfa","no role":"sense rol","students":"estudiants","courses":"classes","role":"rol","administrator":"administrador","administrative":"administratiu","layman":"simple","teachers":"professors","rooms":"espais","docs":"documentaci\xf3","payments":"pagaments","new_course":"nou curs","no_results":"no hi ha resultats","sure_delete_event_base":"Segur? Si segueixes eliminar\xe0s l\'esdeveniment del curs.","capacity":"aforament","delete_room":"eliminar la sala","delete_room_question":"vols eliminar aquesta sala?","users":"usuaris","take attendance":"passar llista","new_room":"nou espai","new_teacher":"nou professor","settings":"configuraci\xf3","locations":"espais","empty":"cap","to":"destinataris","contacts":"contactes","first":"primer dia","mark_all":"marcar totxs","last":"darrer dia","send_bulk_email":"enviar correu massiu \u26a1","send_bulk_email_description":"aquest missatge s\'enviar\xe0 a les adreces triades dels cursos seleccionats (a les families reals)!","all":"tots","subject":"assumpte","upload":"adjuntar fitxers","can-register-attendance":"pot marcar assist\xe8ncia a classes","attendance":"assist\xe8ncia","send_email":"enviar correu","use_emails":"correus a usar","add-comment":"afegir comentari","comment":"comentari","resolved":"solucionat (l\'estudiant si \xe9s +18 o si no hi ha contactes disponibles, altrament els contactes)","OTHER":"altres","AF":"afganistan","AX":"aland","AL":"alb\xe0nia","DE":"alemanya","DZ":"alg\xe8ria","AD":"andorra","AO":"angola","AI":"anguilla","AQ":"ant\xe0rtida","AG":"antigua i barbuda","SA":"ar\xe0bia saud\xed","AR":"argentina","AM":"arm\xe8nia","AW":"aruba","AU":"austr\xe0lia","AT":"\xe0ustria","AZ":"azerbaidjan","BS":"bahames, les","BH":"bahrain","BD":"bangladesh","BB":"barbados","BY":"belar\xfas","BE":"b\xe8lgica","BZ":"belize","BJ":"ben\xedn","BM":"bermudes","BT":"bhutan","BO":"bol\xedvia","BQ":"bonaire, sint eustatius i saba","BA":"b\xf2snia i hercegovina","BW":"botswana","BR":"brasil","BN":"brunei","BG":"bulg\xe0ria","BF":"burkina faso","BI":"burundi","KH":"cambodja","CM":"camerun","CA":"canad\xe0","CV":"cap verd","CO":"col\xf2mbia","KM":"comores, les","CG":"congo","KP":"corea del nord","KR":"corea del sud","CI":"costa d\'ivori","CR":"costa rica","HR":"cro\xe0cia","CU":"cuba","CW":"cura\xe7ao","DK":"dinamarca","DJ":"djibouti","DM":"dominica","EG":"egipte","SV":"el salvador","AE":"emirats \xe0rabs units, els","EC":"equador","ER":"eritrea","SK":"eslov\xe0quia","SI":"eslov\xe8nia","ES":"espanya","US":"estats units, els","EE":"est\xf2nia","SZ":"eswatini","ET":"eti\xf2pia","FO":"f\xe8roe","FJ":"fiji","PH":"filipines","FI":"finl\xe0ndia","FR":"fran\xe7a","GA":"gabon","GM":"g\xe0mbia","GE":"ge\xf2rgia","GH":"ghana","GI":"gibraltar","GR":"gr\xe8cia","GD":"grenada","GL":"groenl\xe0ndia","GP":"guadalupe","GF":"guaiana francesa","GU":"guam","GT":"guatemala","GG":"guernsey","GN":"guinea","GQ":"guinea equatorial","GW":"guinea-bissau","GY":"guyana","HT":"hait\xed","HN":"hondures","HK":"hong kong, xina","HU":"hongria","YE":"iemen, el","BV":"illa bouvet","CX":"illa christmas","IM":"illa de man","NF":"illa norfolk","KY":"illes caiman","CC":"illes cocos (keeling)","CK":"illes cook","FK":"illes falkland (malvines)","GS":"illes ge\xf2rgia del sud i sandwich del sud","HM":"illes heard i mcdonald","MP":"illes marianes del nord","MH":"illes marshall","UM":"illes menors allunyades dels estats units","SB":"illes salom\xf3","TC":"illes turks i caicos","VG":"illes verges brit\xe0niques","VI":"illes verges dels estats units","IN":"\xedndia","ID":"indon\xe8sia","IR":"iran","IQ":"iraq, l\'","IE":"irlanda","IS":"isl\xe0ndia","IL":"israel","IT":"it\xe0lia","JM":"jamaica","JP":"jap\xf3","JE":"jersey","JO":"jord\xe0nia","KZ":"kazakhstan","KE":"kenya","KG":"kirguizstan","KI":"kiribati","KW":"kuwait","LA":"lao","LS":"lesotho","LV":"let\xf2nia","LB":"l\xedban","LR":"lib\xe8ria","LY":"l\xedbia","LI":"liechtenstein","LT":"litu\xe0nia","LU":"luxemburg","MO":"macao, xina","MK":"maced\xf2nia del nord","MG":"madagascar","MY":"mal\xe0isia","MW":"malawi","MV":"maldives","ML":"mali","MT":"malta","MA":"marroc, el","MQ":"martinica","MU":"maurici","MR":"maurit\xe0nia","YT":"mayotte","MX":"m\xe8xic","FM":"micron\xe8sia","MZ":"mo\xe7ambic","MD":"mold\xe0via","MC":"m\xf2naco","MN":"mong\xf2lia","ME":"montenegro","MS":"montserrat","MM":"myanmar","NA":"nam\xedbia","NR":"nauru","NP":"nepal","NI":"nicaragua","NE":"n\xedger","NG":"nig\xe8ria","NU":"niue","NO":"noruega","NC":"nova caled\xf2nia","NZ":"nova zelanda","OM":"oman","NL":"pa\xefsos baixos","PK":"pakistan","PW":"palau","PS":"palestina","PA":"panam\xe0","PG":"papua nova guinea","PY":"paraguai","PE":"per\xfa","PN":"pitcairn","PF":"polin\xe8sia francesa","PL":"pol\xf2nia","PT":"portugal","PR":"puerto rico","QA":"qatar","GB":"regne unit","CF":"rep\xfablica centreafricana","CD":"rep\xfablica democr\xe0tica del congo","DO":"rep\xfablica dominicana","RE":"reuni\xf3, la","RO":"romania","RW":"ruanda","RU":"r\xfassia","EH":"s\xe0hara occidental","SH":"saint helena, ascenci\xf3 i tristan da cunha","KN":"saint kitts i nevis","LC":"saint lucia","VC":"saint vincent i les grenadines","BL":"saint-barth\xe9lemy","MF":"saint-martin","PM":"saint-pierre-et-miquelon","WS":"samoa","AS":"samoa americana","SM":"san marino","VA":"santa seu","ST":"s\xe3o tom\xe9 i pr\xedncipe","SN":"senegal","RS":"s\xe8rbia","SC":"seychelles","SL":"sierra leone","SG":"singapur","SX":"sint maarten","SY":"s\xedria","SO":"som\xe0lia","LK":"sri lanka","ZA":"sud-\xe0frica","SS":"sudan del sud, el","SD":"sudan, el","SE":"su\xe8cia","CH":"su\xefssa","SR":"surinam","SJ":"svalbard i jan mayen","TJ":"tadjikistan","TH":"tail\xe0ndia","TW":"taiwan","TZ":"tanz\xe0nia","TF":"terres australs i ant\xe0rtiques franceses","IO":"territori brit\xe0nic de l\'oce\xe0 \xedndic","TL":"timor-leste","TG":"togo","TK":"tokelau","TO":"tonga","TT":"trinidad i tobago","TN":"tun\xedsia","TM":"turkmenistan","TR":"turquia","TV":"tuvalu","TD":"txad","CZ":"tx\xe8quia","UA":"ucra\xefna","UG":"uganda","UY":"uruguai","UZ":"uzbekistan","VU":"vanuatu","VE":"vene\xe7uela","VN":"vietnam","WF":"wallis i futuna","CL":"xile","CN":"xina","CY":"xipre","ZM":"z\xe0mbia","ZW":"zimb\xe0bue","send_grant_letter_question":"enviar carta de beca?","this_will_be_sent":"aquesta carta s\'enviar\xe0 als contactes (si \xe9s menor) o a l\'estudiant (si \xe9s major d\'edat o no hi ha contactes disponibles)","chose_list_dates":"escull el primer i l\'\xfaltim dia pels quals vulguis crear les llistes","user":"usuari","teacher":"professor","export_attendances":"baixar llista d\'assist\xe8ncia","attended":"assist\xe8ncia","absent":"abs\xe8ncia","absent-justified":"abs\xe8ncia justificada","confirm_link_to_room":"Segur que vols afegir aquesta sala al curs?","link_room":"afegir sala al curs","pre_enrolment_date":"data de prematr\xedcula","enrolment_date":"data de matr\xedcula","early_unenrolment_date":"data de baixa","export_calendar":"exportar calendari","room":"espai","teachers-only-zone":"zona nom\xe9s per a professorxs","search":"cercar","name":"nom","view":"veure","surname1":"primer cognom","surname2":"segon cognom","email":"correu","phone":"tel\xe8fon","calendar_url":"enlla\xe7 del calendari","address":"adre\xe7a","city":"ciutat","zip":"codi postal","dni":"DNI / NIE / passaport","gender":"g\xe8nere","adult":"adult","no_students":"no hi ha estudiants en aquest curs","no_teachers":"no hi ha professors en aquest curs","birth date":"data de naixement","country_of_origin":"estat d\'origen de la fam\xedlia","been_invited":"t\'han convidat a unir-te a la centr\xedfuga4 \ud83d\udcef","confirm_password":"confirma la contrasenya","password":"contrasenya","username":"nom d\'usuari","download":"descarregar","god_file":"fitxer mare","add_teacher":"afegir professor","export_contact_sheets":"exportar tots els estudiants amb els contactes","export_all_plus":"exportar tots+","add_student":"afegir estudiant","attendance_list":"llista d\'assist\xe8ncia","export_attendance_list":"descarregar llista d\'assist\xe8ncia","students_contact_sheet":"contactes dels estudiants","export_students_contact_sheet":"descarregar contactes dels estudiants","invalid_expired_invite":"La invitaci\xf3 ha caducat o no \xe9s v\xe0lida! \ud83d\udc82","invalid_expired_reset":"L\'enlla\xe7 pel canvi de contrasenya ha caducat o no \xe9s v\xe0lid! \ud83d\udc82","used_invite":"La invitaci\xf3 no es pot usar m\xe9s de dues vegades o per un usuari que ja existeix! \ud83d\udc82","reset_password":"restaurar contrasenya","username_required_password_reset":"Omple el camp del correu per restaurar la contrasenya!","started_password_reset":"El proc\xe9s ha comen\xe7at. Si l\'usuari \xe9s correcte, rebr\xe0s un correu per acabar el canvi de contrasenya!","export":"exportar","export_results_csv":"exportar aquesta p\xe0gina com a .csv","email_required":"cal un correu","invalid_email":"introdu\xefu un correu v\xe0lid","password_required":"cal una contrasenya","delete_payment":"eliminar el pagament","not_undone":"aquesta acci\xf3 no es pot desfer","warning_not_logged_in":"la sessi\xf3 no est\xe0 iniciada! \ud83d\udc82","warning_not_enough_privileges":"no tens els privilegis necessaris per seguir! \ud83d\udc82","password_constraints":"ha de ser de m\xe9s de 8 car\xe0cters; incloent: 1 maj\xfascula, 1 min\xfascula, 1 n\xfamero i 1 car\xe0cter especial","passwords_unmatched":"les contrasenyes no coincideixen","new_password":"escull la nova contrasenya \ud83d\udd10","reset_password_success":"canvi de contrasenya correcte","sign_up_success":"creaci\xf3 del nou compte correcta","sign_up":"iniciar sessi\xf3","change_password":"change password","name_required":"cal el nom","surname1_required":"cal el primer cognom","surname2_required":"cal el segon congom","longer_8":"ha de tenir m\xe9s de 8 car\xe0cters","shorter_64":"ha de tenir menys de 64 car\xe0cters","has_lowecase":"ha de tenir 1 min\xfascula com a m\xednim","has_uppercase":"ha de tenir 1 maj\xfascula com a m\xednim","has_digit":"ha de tenir 1 d\xedgit com a m\xednim (0-9)","has_special":"ha de tenir 1 car\xe0cter especial (p.ex. %) com a m\xednim","no_plus":"no pot contenir \'+\'","reset":"descartar","save":"guardar","birthdate":"data de naixement","attendee":"estudiant","contact":"contacte","price_term":"preu per trimestre","success":"fet","send_receipt":"enviar correu de confirmaci\xf3 a l\'estudiant","export_receipt":"exportar rebut com a pdf","no_payments":"no hi ha cap pagament","delete":"eliminar","has_paid_cash":"ha pagat en efectiu","tooltip-bank-transfer":"ha pagat mitjan\xe7ant una transfer\xe8ncia","other-payment-method":"ha pagat amb un m\xe8tode no reconegut","has_paid":"ha pagat","nb":"no binari / no representat per cap dels anteriors","m":"mascul\xed","f":"femen\xed","bank-transfer":"transfer\xe8ncia banc\xe0ria","bank-direct-debit":"domiciliaci\xf3 banc\xe0ria","tooltip-bank-direct-debit":"ha pagat mitjan\xe7ant domiciliaci\xf3 banc\xe0ria","cash":"efectiu","method":"m\xe8tode","import":"import","import_required":"cal l\'import","date":"data","concept":"concepte","new_payment":"nou pagament","create":"crear","field_required":"cal omplir el camp","date_required":"cal la data","new_guardian":"nou contacte","action_cant_undone":"aquesta acci\xf3 no es pot desfer","delete_guardian_question":"vols eliminar aquest contacte?","delete_course_question":"vols eliminar aquest curs?","confirm_add_to_course":"vols afegir el professor al curs?","add_to_course":"afegir al curs","confirm_remove_from_course":"vols eliminar el professor del curs?","cancel":"cancelar","delete_teacher":"vols eliminar aquest professor?","delete_guardian":"eliminar el contacte","delete_student":"eliminar l\'estudiant","delete_student_question":"vols eliminar aquest estudiant?","delete_user":"eliminar l\'usuari","delete_user_question":"vols eliminar aquest usuari?","student_also_deletes":"aquesta acci\xf3 no es pot desfer; tamb\xe9 s\'eliminaran els contactes associats, pagaments i horaris","default_payment_method":"m\xe8tode de pagament","payment_comments":"comentaris (pagament)","other_comments":"comentaris","years_in_xamfra":"anys a Xamfr\xe0","is_studying":"estudia","is_working":"treballa","home":"inici","yes":"s\xed","no":"no","load-more":"veure\'n m\xe9s","hi":"bones","is_early_unenrolled":"desmatriculat","more":"m\xe9s","is_enrolled":"matriculat","teacher-user":"usuari d\'unx professorx","link-user-to-teacher":"Est\xe0s segurx que vols associar aquest professorx a l\'usuari?","is_early_unenrolled_required":"cal el camp desmatriculat","is_enrolled_required":"cal el camp matriculat","education_entity":"centre educatiu","teacher_dashboard":"panell del professorx","education_year":"curs","kindergarten_p0":"p0","kindergarten_p1":"p1","kindergarten_p2":"p2","kindergarten_p3":"p3","kindergarten_p4":"p4","kindergarten_p5":"p5","primary_1":"1r de prim\xe0ria","primary_2":"2n de prim\xe0ria","primary_3":"3r de prim\xe0ria","primary_4":"4t de prim\xe0ria","primary_5":"5\xe8 de prim\xe0ria","primary_6":"6\xe8 de prim\xe0ria","eso_1":"1r d\'ESO","eso_2":"2n d\'ESO","eso_3":"3r d\'ESO","eso_4":"4t d\'ESO","baccalaureate_1":"1r de batxillerat","baccalaureate_2":"2n de batxillerat","FP_lower":"FP grau mig","FP_higher":"FP grau superior","undergraduate":"grau","master":"m\xe0ster","phd":"doctorat","career":"professi\xf3","working_required":"cal el camp treballa","studying_required":"cal el camp estudia","career_required":"cal la professi\xf3","education_entity_required":"cal el centre","education_year_required":"cal el curs","enrolled_unenrolled":"no pot estar matriculat i desmatriculat","relation":"relaci\xf3","relation_required":"cal la relaci\xf3","father":"pare","mother":"mare","grandfather":"avi","grandmother":"\xe0via","brother":"germ\xe0","sister":"germana","uncle":"oncle","aunt":"tieta","cousin":"cos\xed/ina","legal_guardian":"tutor legal","status":"estat de la matr\xedcula","enrolled":"matriculat/ada","early-unenrolled":"desmatriculat/ada","pre-enrolled":"prematriculat/ada","other":"altres","grant_letter":"carta de beca","send_grant_letter":"enviar carta de beca","export_grant_letter":"descarregar carta de beca","enrolment_agreement":"full de matr\xedcula","send_enrolment_agreement":"enviar full de matr\xedcula","export_enrolment_agreement":"descarregar full de matr\xedcula","status_required":"cal l\'estat de matr\xedcula","image_required":"cal l\'\xfas d\'imatge","image_agreement":"\xfas d\'imatge","cant_remove_schedule":"no es poden eliminar horaris comuns d\'un taller","continue":"seguir","cancelled":"cancelat","sure_delete_event":"Segur? Si segueixes eliminar\xe0s l\'esdeveniment de l\'estudiant.","new_student":"nou estudiant","birthdate_required":"cal la data de naixement","no_courses":"no hi ha cap classe","published":"publicats","labels":"etiquetes","course":"classe","description":"descripci\xf3","public":"p\xfablic","only_published":"mostrar nom\xe9s cursos publicats","private":"privats","only_private":"mostrar nom\xe9s cursos privats","only_enrolled":"mostrar nom\xe9s estudiants matriculats","only_preenrolled":"mostrar nom\xe9s estudiants prematriculats","only_earlyunenrolled":"mostrar nom\xe9s estudiants desmatriculats","only_cash":"mostrar nom\xe9s alumnes amb efectiu com a m\xe8tode de pagament per defecte","only_banktransfer":"mostrar nom\xe9s alumnes amb transfer\xe8ncia banc\xe0ria com a m\xe8tode de pagament per defecte","only_bankdirectdebit":"mostrar nom\xe9s alumnes amb domiciliaci\xf3 banc\xe0ria com a m\xe8tode de pagament per defecte","filters_actions":"filtres i accions","enroll_to_course":"afegir al curs","confirm_enroll_to_course":"Segur que vols afegir-lo a aquest curs?","confirm_unenroll_to_course":"Segur que vols eliminar-lo d\'aquest curs?","search_courses":"cercar cursos","new_user":"convidar un usuari nou","invite":"convidar","invite_user":"\ud83d\udcef convidar usuari","permissions":"permisos","can-read":"pot llegir","can-edit":"pot editar","can-create":"pot crear","can-delete":"pot eliminar","can-send-emails":"pot enviar correus","can-invite-users":"pot convidar usuaris","can-operate-with-students":"pot operar amb estudiants","can-operate-with-courses":"pot operar amb cursos","can-operate-with-guardians":"pot operar amb contactes","can-operate-with-payments":"pot operar amb pagaments","can-operate-with-rooms":"pot operar amb ubicacions","can-operate-with-schedules":"pot operar amb horaris","can-operate-with-teachers":"pot operar amb professors","can-operate-with-users":"pot operar amb usuaris","next":"seg\xfcent","back":"anterior","required":"camp obligatori","skip":"ometre","schedules":"horaris","finish":"enviar","can-operate-with-payment-receipts":"pot operar amb rebuts de pagament","data_protection":"protecci\xf3 de dades","student_info":"informaci\xf3 de l\'estudiant","contact_person_1":"persona de contacte (1)","contact_person_2":"persona de contacte (2)","confirmation":"confirmaci\xf3","ss_agent":"referent (serveis socials)","no_courses_found_add_edu":"no podem trobar-te cap curs; torna enrere i afegeix el teu nivell d\'educaci\xf3! Si ja ho has fet, contacta\'ns (xamfra.net/contacte)!","student":"estudiant","search_by_id":"cercar amb id","search_by":"cercar per","export_all":"exportar tots","export_all_csv":"exportar totes les p\xe0gines com a .csv","full_name":"nom complet","use_eng":"veure en angl\xe8s","use_cat":"veure en catal\xe0","use_dark":"usar tema fosc","use_light":"usar tema clar","2FA_code":"codi 2FA","2FA_needed":"escriu el codi de 2FA de l\'aplicaci\xf3","2FA_6digits":"el codi de 2FA t\xe9 6 d\xedgits","2FA_invalid":"el codi de 2FA t\xe9 6 d\xedgits num\xe8rics","setup_2FA":"configura 2FA \ud83d\udee1\ufe0f","learn_how_2FA":"Com configuro 2FA?","title_2fa_continue":"Has escanejat el codi QR amb la teva app de 2FA?","description_2fa_continue":"No podr\xe0s accedir al teu compte si no configures la teva aplicaci\xf3 de 2FA ara. No podr\xe0s escanejar aquest codi QR en el futur.","2FA_tip1":"L\'autentificaci\xf3 de doble factor (2FA) \xe9s essencial per assegurar que nom\xe9s tu pots accedir a les dades dels estudiants.","2FA_tip2":"Escaneja el codi QR amb la teva aplicaci\xf3 de 2FA.","2FA_tip3":"No podr\xe0s tornar a veure aquest codi QR mai m\xe9s.","rememberMe":"recorda\'m"}')},343:function(e,t,a){},517:function(e,t,a){"use strict";a.r(t);var n=a(0),r=a.n(n),i=a(25),c=a.n(i),s=(a(343),a(10)),o=a(5),l=a(9),d=a(581),u=a(308),b=a(568),h=Object(u.a)({palette:{type:"light",primary:{main:"#e98300",light:"#ffb342",dark:"#b05500",contrastText:"#000000",emphasisText:{high:"#000000DF",medium:"#00000098",low:"#0000005E"}},secondary:{main:"#934d98",light:"#c57bc9",dark:"#63206a",contrastText:"#000000",emphasisText:{high:"#000000DF",medium:"#00000098",low:"#0000005E"}},neutral:{main:"#ffffff",contrastText:"#000000",emphasisText:{high:"#000000DF",medium:"#00000098",low:"#0000005E"},status:{dirty:"#fbc02d",success:"#43a047",error:"#ff5252"}}}}),m=Object(u.a)({palette:{type:"dark",primary:{main:"#934d98",light:"#c57bc9",dark:"#63206a",contrastText:"#000000",emphasisText:{high:"#000000DF",medium:"#00000098",low:"#0000005E"}},secondary:{main:"#ffcc80",light:"#ffffb0",dark:"#ca9b52",contrastText:"#000000",emphasisText:{high:"#000000DF",medium:"#00000098",low:"#0000005E"}},neutral:{main:"#1f1f1f",contrastText:"#ffffff",emphasisText:{high:"#ffffffDF",medium:"#ffffff98",low:"#ffffff5E"},status:{dirty:"#ffcf3d",success:"#c0e882",error:"#ff5252"}}}}),j=a(47),p=r.a.createContext({confirm:function(e,t,a){}}),f=a(17),O=a(34),x=r.a.createContext({user:null,setUser:function(){},needs:[],setNeeds:function(){},teacher:[],setTeacher:function(){}}),g=a(1),_=["component"];var v=function(e){var t=e.component,a=Object(f.a)(e,_),n=r.a.useContext(x);return Object(g.jsx)(O.b,Object(o.a)(Object(o.a)({},a),{},{render:function(e){return n.user.logged?Object(g.jsx)(t,Object(o.a)(Object(o.a)({},e),a)):Object(g.jsx)(O.a,{to:{pathname:"/login",state:{from:e.location}}})}}))},y=a(29),w=a(549),S=a(546),k=a(574),C=a(6),N=a(521),I=a(582),T=a(293),A=a.n(T),q=a(294),B=a.n(q),P=a(558),F=a(554),E=a(525),D=a(583),R=a(556),M=a(572),L=a(43),G=a.n(L),z=a(280),V=a.n(z),U=a(281),K=a.n(U),W=a(282),H=a.n(W),Y=a(204),Z=a.n(Y),J=a(125),X=a.n(J),Q=a(284),$=a.n(Q),ee=a(283),te=a.n(ee),ae=a(577),ne=a(595),re=a(177),ie=a(80),ce=a.n(ie),se=a(589),oe=a(576),le=a(598),de=a(109),ue=a.n(de),be=a(559),he=a(31),me=a(32),je=a(264),pe=a.n(je);function fe(){return{"X-CSRFToken":pe.a.get("X-CSRF-TOKEN")}}var Oe="v1",xe="https://centrifuga4.herokuapp.com",ge="6LdHBOcbAAAAAAFOSVzvos0dxnVunKUB7ntQCaOP",_e="https://centrifuga4.herokuapp.com",ve="true"===Object({NODE_ENV:"production",PUBLIC_URL:"https://centrifuga4.herokuapp.com",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_RECAPTCHA:"6LdHBOcbAAAAAAFOSVzvos0dxnVunKUB7ntQCaOP",REACT_APP_API_VERSION:"v1",REACT_APP_BACKEND_URL:"https://centrifuga4.herokuapp.com",REACT_APP_DOCS_URL:"https://miquelvir.github.io/centrifuga4/"}).REACT_CHECK_NEEDS,ye=a(27);function we(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;a=null===a?"api":a,r=null===r?Oe:r;var i="".concat(n=null===n?xe:n,"/").concat(a,"/").concat(r);return function(){function a(){Object(he.a)(this,a)}return Object(me.a)(a,[{key:"getAll",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;return new Promise((function(l,d){var u={page:n,include:null===r?null:JSON.stringify(r)};null!==a&&(u["filter.".concat(a.name,".match")]=a.value),null!==c&&Object.keys(c).forEach((function(e){u["filter.".concat(e,".eq")]=c[e]})),ye({method:"get",url:"".concat(i,"/").concat(e).concat(null===t?"":"/".concat(s,"/").concat(t)),params:u,headers:Object(o.a)(Object(o.a)({},{"Content-Type":"application/json","Cache-Control":"no-cache"}),fe())}).then((function(e){l(e.data)})).catch((function(e){d(e)}))}))}},{key:"getOne",value:function(t){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return new Promise((function(n,r){ye({method:"get",url:"".concat(i,"/").concat(e,"/").concat(t),params:{include:null===a?null:JSON.stringify(a)},headers:Object(o.a)(Object(o.a)({},{"Content-Type":"application/json","Cache-Control":"no-cache"}),fe())}).then((function(e){n(e.data)})).catch((function(e){r(e)}))}))}},{key:"getMany",value:function(e){var t=this;return new Promise((function(a,n){0===e.length&&a([]),t.getOne(e.join(",")).then((function(t){1===e.length?a([t]):a(t)})).catch((function(e){n(e)}))}))}},{key:"patch",value:function(t){var a=t.id,n=t.body,r=t.initial_values,c=void 0===r?null:r;if(null!==c)var s=Object.keys(n).reduce((function(e,t){return t in c&&c[t]===n[t]||(e[t]=n[t]),e}),{});return"id"in s&&delete s.id,new Promise((function(t,n){ye({method:"patch",url:"".concat(i,"/").concat(e,"/").concat(a),data:s,headers:Object(o.a)(Object(o.a)({},{"Content-Type":"application/json","Cache-Control":"no-cache"}),fe())}).then((function(e){t(e.data)})).catch((function(e){n(e)}))}))}},{key:"post",value:function(a){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return"id"in a&&delete a.id,new Promise((function(r,c){ye({method:"post",url:"".concat(i,"/").concat(e).concat(null!==t?"/".concat(n,"/").concat(t):""),data:a,headers:Object(o.a)(Object(o.a)({},{"Content-Type":"application/json","Cache-Control":"no-cache"}),fe())}).then((function(e){r(e.data)})).catch((function(e){c(e)}))}))}},{key:"postWithId",value:function(a){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return new Promise((function(r,c){ye({method:"post",url:"".concat(i,"/").concat(e,"/").concat(a).concat(null===n?"":"/".concat(t,"/").concat(n)),headers:Object(o.a)(Object(o.a)({},{"Content-Type":"application/json","Cache-Control":"no-cache"}),fe())}).then((function(e){r(e)})).catch((function(e){c(e)}))}))}},{key:"delete",value:function(a){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return new Promise((function(r,c){ye({method:"delete",url:"".concat(i,"/").concat(e,"/").concat(a).concat(null!==t?"/".concat(t,"/").concat(n):""),headers:Object(o.a)(Object(o.a)({},{"Content-Type":"application/json","Cache-Control":"no-cache"}),fe())}).then((function(e){r(e)})).catch((function(e){c(e)}))}))}},{key:"deleteMany",value:function(e){var t=this;return Promise.all(e.map((function(e){return t.delete(e)})))}},{key:"downloadCsv",value:function(t,a){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return new Promise((function(c,s){var l={page:n};null!==t&&(l["filter.".concat(t,".like")]="%".concat(a,"%")),null!==r&&Object.keys(r).forEach((function(e){l["filter.".concat(e,".eq")]=r[e]})),ye({url:"".concat(i,"/").concat(e),method:"GET",responseType:"blob",params:l,headers:Object(o.a)(Object(o.a)({},{Accept:"text/csv","Cache-Control":"no-cache"}),fe())}).then((function(e){var t=e.headers["content-disposition"].split("filename=")[1];null===t&&(t="export.csv");var a=window.URL.createObjectURL(new Blob([e.data])),n=document.createElement("a");n.href=a,n.setAttribute("download",t),document.body.appendChild(n),n.click(),n.remove(),c()})).catch((function(e){s(e)}))}))}},{key:"downloadOneCsv",value:function(t){return new Promise((function(a,n){ye({url:"".concat(i,"/").concat(e,"/").concat(t),method:"GET",responseType:"blob",headers:Object(o.a)(Object(o.a)({},{Accept:"text/csv","Cache-Control":"no-cache"}),fe())}).then((function(e){var t=e.headers["content-disposition"].split("filename=")[1];null===t&&(t="export.csv");var n=window.URL.createObjectURL(new Blob([e.data])),r=document.createElement("a");r.href=n,r.setAttribute("download",t),document.body.appendChild(r),r.click(),r.remove(),a()})).catch((function(e){n(e)}))}))}},{key:"downloadSubresource",value:function(t,a,n){return new Promise((function(r,c){ye({url:"".concat(i,"/").concat(e,"/").concat(t,"/").concat(a),method:"POST",params:n,responseType:"blob",headers:Object(o.a)(Object(o.a)({},{"Cache-Control":"no-cache"}),fe())}).then((function(e){var t=e.headers["content-disposition"].split("filename=")[1],a=window.URL.createObjectURL(new Blob([e.data])),n=document.createElement("a");n.href=a,n.setAttribute("download",t),document.body.appendChild(n),n.click(),n.remove(),r()})).catch((function(e){c(e)}))}))}}]),a}()}var Se=new(we("students")),ke=a(12),Ce=a(550),Ne=function(e){var t=Object.assign({},e);return Object(g.jsx)(Ce.a,Object(o.a)(Object(o.a)({},t),{},{variant:"circle",children:Object(g.jsx)(N.a,{children:Object(g.jsx)(ue.a,{})})}))},Ie=a(594),Te=Object(w.a)((function(e){return Object(S.a)({root:function(t){return{"& label.Mui-focused":{color:t?e.palette.neutral.status.dirty:e.palette.primary.main},"& .MuiInput-underline:after":{borderBottomColor:t?e.palette.neutral.status.dirty:e.palette.primary.main},"& label":{color:t?e.palette.neutral.status.dirty:e.palette.neutral.emphasisText.medium}}}})})),Ae=function(e){var t=e.name,a=e.formik,n=!0!==e.noDirty&&a.values[t]!==a.initialValues[t],r=Te(n),i={value:void 0===a.values[t]?"":a.values[t],onChange:a.handleChange,onBlur:a.handleBlur,error:a.status||void 0!==a.errors[t],helperText:a.touched[t]&&a.errors[t]};return Object(g.jsx)(Ie.a,Object(o.a)(Object(o.a)({className:r.root,InputLabelProps:{shrink:""!==a.values[t]}},i),e))},qe=a(593),Be=[{code:"ES",label:"Spain",phone:"34"},{code:"AD",label:"Andorra",phone:"376"},{code:"AE",label:"United Arab Emirates",phone:"971"},{code:"AF",label:"Afghanistan",phone:"93"},{code:"AG",label:"Antigua and Barbuda",phone:"1-268"},{code:"AI",label:"Anguilla",phone:"1-264"},{code:"AL",label:"Albania",phone:"355"},{code:"AM",label:"Armenia",phone:"374"},{code:"AO",label:"Angola",phone:"244"},{code:"AQ",label:"Antarctica",phone:"672"},{code:"AR",label:"Argentina",phone:"54"},{code:"AS",label:"American Samoa",phone:"1-684"},{code:"AT",label:"Austria",phone:"43"},{code:"AU",label:"Australia",phone:"61",suggested:!0},{code:"AW",label:"Aruba",phone:"297"},{code:"AX",label:"Alland Islands",phone:"358"},{code:"AZ",label:"Azerbaijan",phone:"994"},{code:"BA",label:"Bosnia and Herzegovina",phone:"387"},{code:"BB",label:"Barbados",phone:"1-246"},{code:"BD",label:"Bangladesh",phone:"880"},{code:"BE",label:"Belgium",phone:"32"},{code:"BF",label:"Burkina Faso",phone:"226"},{code:"BG",label:"Bulgaria",phone:"359"},{code:"BH",label:"Bahrain",phone:"973"},{code:"BI",label:"Burundi",phone:"257"},{code:"BJ",label:"Benin",phone:"229"},{code:"BL",label:"Saint Barthelemy",phone:"590"},{code:"BM",label:"Bermuda",phone:"1-441"},{code:"BN",label:"Brunei Darussalam",phone:"673"},{code:"BO",label:"Bolivia",phone:"591"},{code:"BR",label:"Brazil",phone:"55"},{code:"BS",label:"Bahamas",phone:"1-242"},{code:"BT",label:"Bhutan",phone:"975"},{code:"BV",label:"Bouvet Island",phone:"47"},{code:"BW",label:"Botswana",phone:"267"},{code:"BY",label:"Belarus",phone:"375"},{code:"BZ",label:"Belize",phone:"501"},{code:"CA",label:"Canada",phone:"1",suggested:!0},{code:"CC",label:"Cocos (Keeling) Islands",phone:"61"},{code:"CD",label:"Congo, Democratic Republic of the",phone:"243"},{code:"CF",label:"Central African Republic",phone:"236"},{code:"CG",label:"Congo, Republic of the",phone:"242"},{code:"CH",label:"Switzerland",phone:"41"},{code:"CI",label:"Cote d'Ivoire",phone:"225"},{code:"CK",label:"Cook Islands",phone:"682"},{code:"CL",label:"Chile",phone:"56"},{code:"CM",label:"Cameroon",phone:"237"},{code:"CN",label:"China",phone:"86"},{code:"CO",label:"Colombia",phone:"57"},{code:"CR",label:"Costa Rica",phone:"506"},{code:"CU",label:"Cuba",phone:"53"},{code:"CV",label:"Cape Verde",phone:"238"},{code:"CW",label:"Curacao",phone:"599"},{code:"CX",label:"Christmas Island",phone:"61"},{code:"CY",label:"Cyprus",phone:"357"},{code:"CZ",label:"Czech Republic",phone:"420"},{code:"DE",label:"Germany",phone:"49",suggested:!0},{code:"DJ",label:"Djibouti",phone:"253"},{code:"DK",label:"Denmark",phone:"45"},{code:"DM",label:"Dominica",phone:"1-767"},{code:"DO",label:"Dominican Republic",phone:"1-809"},{code:"DZ",label:"Algeria",phone:"213"},{code:"EC",label:"Ecuador",phone:"593"},{code:"EE",label:"Estonia",phone:"372"},{code:"EG",label:"Egypt",phone:"20"},{code:"EH",label:"Western Sahara",phone:"212"},{code:"ER",label:"Eritrea",phone:"291"},{code:"ET",label:"Ethiopia",phone:"251"},{code:"FI",label:"Finland",phone:"358"},{code:"FJ",label:"Fiji",phone:"679"},{code:"FK",label:"Falkland Islands (Malvinas)",phone:"500"},{code:"FM",label:"Micronesia, Federated States of",phone:"691"},{code:"FO",label:"Faroe Islands",phone:"298"},{code:"FR",label:"France",phone:"33",suggested:!0},{code:"GA",label:"Gabon",phone:"241"},{code:"GB",label:"United Kingdom",phone:"44"},{code:"GD",label:"Grenada",phone:"1-473"},{code:"GE",label:"Georgia",phone:"995"},{code:"GF",label:"French Guiana",phone:"594"},{code:"GG",label:"Guernsey",phone:"44"},{code:"GH",label:"Ghana",phone:"233"},{code:"GI",label:"Gibraltar",phone:"350"},{code:"GL",label:"Greenland",phone:"299"},{code:"GM",label:"Gambia",phone:"220"},{code:"GN",label:"Guinea",phone:"224"},{code:"GP",label:"Guadeloupe",phone:"590"},{code:"GQ",label:"Equatorial Guinea",phone:"240"},{code:"GR",label:"Greece",phone:"30"},{code:"GS",label:"South Georgia and the South Sandwich Islands",phone:"500"},{code:"GT",label:"Guatemala",phone:"502"},{code:"GU",label:"Guam",phone:"1-671"},{code:"GW",label:"Guinea-Bissau",phone:"245"},{code:"GY",label:"Guyana",phone:"592"},{code:"HK",label:"Hong Kong",phone:"852"},{code:"HM",label:"Heard Island and McDonald Islands",phone:"672"},{code:"HN",label:"Honduras",phone:"504"},{code:"HR",label:"Croatia",phone:"385"},{code:"HT",label:"Haiti",phone:"509"},{code:"HU",label:"Hungary",phone:"36"},{code:"ID",label:"Indonesia",phone:"62"},{code:"IE",label:"Ireland",phone:"353"},{code:"IL",label:"Israel",phone:"972"},{code:"IM",label:"Isle of Man",phone:"44"},{code:"IN",label:"India",phone:"91"},{code:"IO",label:"British Indian Ocean Territory",phone:"246"},{code:"IQ",label:"Iraq",phone:"964"},{code:"IR",label:"Iran, Islamic Republic of",phone:"98"},{code:"IS",label:"Iceland",phone:"354"},{code:"IT",label:"Italy",phone:"39"},{code:"JE",label:"Jersey",phone:"44"},{code:"JM",label:"Jamaica",phone:"1-876"},{code:"JO",label:"Jordan",phone:"962"},{code:"JP",label:"Japan",phone:"81",suggested:!0},{code:"KE",label:"Kenya",phone:"254"},{code:"KG",label:"Kyrgyzstan",phone:"996"},{code:"KH",label:"Cambodia",phone:"855"},{code:"KI",label:"Kiribati",phone:"686"},{code:"KM",label:"Comoros",phone:"269"},{code:"KN",label:"Saint Kitts and Nevis",phone:"1-869"},{code:"KP",label:"Korea, Democratic People's Republic of",phone:"850"},{code:"KR",label:"Korea, Republic of",phone:"82"},{code:"KW",label:"Kuwait",phone:"965"},{code:"KY",label:"Cayman Islands",phone:"1-345"},{code:"KZ",label:"Kazakhstan",phone:"7"},{code:"LA",label:"Lao People's Democratic Republic",phone:"856"},{code:"LB",label:"Lebanon",phone:"961"},{code:"LC",label:"Saint Lucia",phone:"1-758"},{code:"LI",label:"Liechtenstein",phone:"423"},{code:"LK",label:"Sri Lanka",phone:"94"},{code:"LR",label:"Liberia",phone:"231"},{code:"LS",label:"Lesotho",phone:"266"},{code:"LT",label:"Lithuania",phone:"370"},{code:"LU",label:"Luxembourg",phone:"352"},{code:"LV",label:"Latvia",phone:"371"},{code:"LY",label:"Libya",phone:"218"},{code:"MA",label:"Morocco",phone:"212"},{code:"MC",label:"Monaco",phone:"377"},{code:"MD",label:"Moldova, Republic of",phone:"373"},{code:"ME",label:"Montenegro",phone:"382"},{code:"MF",label:"Saint Martin (French part)",phone:"590"},{code:"MG",label:"Madagascar",phone:"261"},{code:"MH",label:"Marshall Islands",phone:"692"},{code:"MK",label:"Macedonia, the Former Yugoslav Republic of",phone:"389"},{code:"ML",label:"Mali",phone:"223"},{code:"MM",label:"Myanmar",phone:"95"},{code:"MN",label:"Mongolia",phone:"976"},{code:"MO",label:"Macao",phone:"853"},{code:"MP",label:"Northern Mariana Islands",phone:"1-670"},{code:"MQ",label:"Martinique",phone:"596"},{code:"MR",label:"Mauritania",phone:"222"},{code:"MS",label:"Montserrat",phone:"1-664"},{code:"MT",label:"Malta",phone:"356"},{code:"MU",label:"Mauritius",phone:"230"},{code:"MV",label:"Maldives",phone:"960"},{code:"MW",label:"Malawi",phone:"265"},{code:"MX",label:"Mexico",phone:"52"},{code:"MY",label:"Malaysia",phone:"60"},{code:"MZ",label:"Mozambique",phone:"258"},{code:"NA",label:"Namibia",phone:"264"},{code:"NC",label:"New Caledonia",phone:"687"},{code:"NE",label:"Niger",phone:"227"},{code:"NF",label:"Norfolk Island",phone:"672"},{code:"NG",label:"Nigeria",phone:"234"},{code:"NI",label:"Nicaragua",phone:"505"},{code:"NL",label:"Netherlands",phone:"31"},{code:"NO",label:"Norway",phone:"47"},{code:"NP",label:"Nepal",phone:"977"},{code:"NR",label:"Nauru",phone:"674"},{code:"NU",label:"Niue",phone:"683"},{code:"NZ",label:"New Zealand",phone:"64"},{code:"OM",label:"Oman",phone:"968"},{code:"PA",label:"Panama",phone:"507"},{code:"PE",label:"Peru",phone:"51"},{code:"PF",label:"French Polynesia",phone:"689"},{code:"PG",label:"Papua New Guinea",phone:"675"},{code:"PH",label:"Philippines",phone:"63"},{code:"PK",label:"Pakistan",phone:"92"},{code:"PL",label:"Poland",phone:"48"},{code:"PM",label:"Saint Pierre and Miquelon",phone:"508"},{code:"PN",label:"Pitcairn",phone:"870"},{code:"PR",label:"Puerto Rico",phone:"1"},{code:"PS",label:"Palestine, State of",phone:"970"},{code:"PT",label:"Portugal",phone:"351"},{code:"PW",label:"Palau",phone:"680"},{code:"PY",label:"Paraguay",phone:"595"},{code:"QA",label:"Qatar",phone:"974"},{code:"RE",label:"Reunion",phone:"262"},{code:"RO",label:"Romania",phone:"40"},{code:"RS",label:"Serbia",phone:"381"},{code:"RU",label:"Russian Federation",phone:"7"},{code:"RW",label:"Rwanda",phone:"250"},{code:"SA",label:"Saudi Arabia",phone:"966"},{code:"SB",label:"Solomon Islands",phone:"677"},{code:"SC",label:"Seychelles",phone:"248"},{code:"SD",label:"Sudan",phone:"249"},{code:"SE",label:"Sweden",phone:"46"},{code:"SG",label:"Singapore",phone:"65"},{code:"SH",label:"Saint Helena",phone:"290"},{code:"SI",label:"Slovenia",phone:"386"},{code:"SJ",label:"Svalbard and Jan Mayen",phone:"47"},{code:"SK",label:"Slovakia",phone:"421"},{code:"SL",label:"Sierra Leone",phone:"232"},{code:"SM",label:"San Marino",phone:"378"},{code:"SN",label:"Senegal",phone:"221"},{code:"SO",label:"Somalia",phone:"252"},{code:"SR",label:"Suriname",phone:"597"},{code:"SS",label:"South Sudan",phone:"211"},{code:"ST",label:"Sao Tome and Principe",phone:"239"},{code:"SV",label:"El Salvador",phone:"503"},{code:"SX",label:"Sint Maarten (Dutch part)",phone:"1-721"},{code:"SY",label:"Syrian Arab Republic",phone:"963"},{code:"SZ",label:"Swaziland",phone:"268"},{code:"TC",label:"Turks and Caicos Islands",phone:"1-649"},{code:"TD",label:"Chad",phone:"235"},{code:"TF",label:"French Southern Territories",phone:"262"},{code:"TG",label:"Togo",phone:"228"},{code:"TH",label:"Thailand",phone:"66"},{code:"TJ",label:"Tajikistan",phone:"992"},{code:"TK",label:"Tokelau",phone:"690"},{code:"TL",label:"Timor-Leste",phone:"670"},{code:"TM",label:"Turkmenistan",phone:"993"},{code:"TN",label:"Tunisia",phone:"216"},{code:"TO",label:"Tonga",phone:"676"},{code:"TR",label:"Turkey",phone:"90"},{code:"TT",label:"Trinidad and Tobago",phone:"1-868"},{code:"TV",label:"Tuvalu",phone:"688"},{code:"TW",label:"Taiwan, Province of China",phone:"886"},{code:"TZ",label:"United Republic of Tanzania",phone:"255"},{code:"UA",label:"Ukraine",phone:"380"},{code:"UG",label:"Uganda",phone:"256"},{code:"US",label:"United States",phone:"1",suggested:!0},{code:"UY",label:"Uruguay",phone:"598"},{code:"UZ",label:"Uzbekistan",phone:"998"},{code:"VA",label:"Holy See (Vatican City State)",phone:"379"},{code:"VC",label:"Saint Vincent and the Grenadines",phone:"1-784"},{code:"VE",label:"Venezuela",phone:"58"},{code:"VG",label:"British Virgin Islands",phone:"1-284"},{code:"VI",label:"US Virgin Islands",phone:"1-340"},{code:"VN",label:"Vietnam",phone:"84"},{code:"VU",label:"Vanuatu",phone:"678"},{code:"WF",label:"Wallis and Futuna",phone:"681"},{code:"WS",label:"Samoa",phone:"685"},{code:"XK",label:"Kosovo",phone:"383"},{code:"YE",label:"Yemen",phone:"967"},{code:"YT",label:"Mayotte",phone:"262"},{code:"ZA",label:"South Africa",phone:"27"},{code:"ZM",label:"Zambia",phone:"260"},{code:"ZW",label:"Zimbabwe",phone:"263"},{code:"",label:"empty",phone:"-"},{code:"OTHER",label:"other",phone:"-"}],Pe=["formik","noDirty","name","label","style"];var Fe=Object(w.a)((function(e){return Object(S.a)({textField:function(t){return{"& label.Mui-focused":{color:t?e.palette.neutral.status.dirty:e.palette.primary.main},"& .MuiInput-underline:after":{borderBottomColor:t?e.palette.neutral.status.dirty:e.palette.primary.main},"& label":{color:t?e.palette.neutral.status.dirty:e.palette.neutral.emphasisText.medium},"& fieldset":{borderColor:t?e.palette.neutral.status.dirty:e.palette.neutral.emphasisText.medium}}},option:{fontSize:15,"& > span":{marginRight:10,fontSize:18}}})}));function Ee(e){var t=e.formik,a=e.noDirty,n=e.name,i=e.label,c=e.style,s=void 0===c?{width:300}:c,d=(Object(f.a)(e,Pe),function(e){return void 0===e?Be.find((function(e){return""===e.code})):Be.find((function(t){return t.code===e}))}),u=r.a.useState(d(t.values[n])),b=Object(l.a)(u,2),h=b[0],m=b[1];r.a.useEffect((function(){m(d(t.values[n]))}),[t.values,n]);var j=!0!==a&&t.values[n]!==t.initialValues[n],p=Fe(j),O=r.a.useState(""),x=Object(l.a)(O,2),_=x[0],v=x[1],y=Object(ne.a)().t;return Object(g.jsx)(qe.a,{style:s,options:Be,classes:{option:p.option},autoHighlight:!0,getOptionLabel:function(e){return y(e.code)},getOptionSelected:function(e){return e.code===h.code},value:h,onChange:function(e,a){!function(e){var a=null!==e?e.code:"";t.setFieldValue(n,a),m(e)}(a)},inputValue:_,onInputChange:function(e,t){v(t)},name:n,onBlur:t.handleBlur,renderOption:function(e){return Object(g.jsxs)(r.a.Fragment,{children:[Object(g.jsx)("span",{children:""!==e.code&&"OTHER"!==e.code?(t=e.code,"undefined"!==typeof String.fromCodePoint?t.toUpperCase().replace(/./g,(function(e){return String.fromCodePoint(e.charCodeAt(0)+127397)})):t):""}),""!==e.code&&"OTHER"!==e.code?y(e.code):y(e.label)," ",""!==e.code&&"OTHER"!==e.code?"("+e.code+") +"+e.phone:""]},e.code);var t},renderInput:function(e){return Object(g.jsx)(Ie.a,Object(o.a)(Object(o.a)({},e),{},{label:i,noDirty:a,className:p.textField,inputProps:Object(o.a)(Object(o.a)({},e.inputProps),{},{autoComplete:"new-password"}),error:t.status||void 0!==t.errors[n],helperText:t.touched[n]&&t.errors[n]}))}})}var De=a(555);function Re(){var e=r.a.useContext(x),t=Object(j.b)(),a=t.enqueueSnackbar,n=t.closeSnackbar,i=Object(ne.a)().t,c=function(e){return function(t){return function(e,t){return t&&a(i("success"),{variant:"success"}),Promise.resolve(e)}(t,e)}},s=function(t){return e.setUser({logged:!1,ping:!1}),a(i("warning_not_logged_in"),{variant:"warning"}),Promise.reject(t)},o=function(e){return a(i("warning_not_enough_privileges"),{variant:"warning"}),Promise.reject(e)},l=function(e,t,c,l,d,u){var b=function(e){return function(e,t){var c=function(c){a("Something went wrong! \ud83d\ude23 ".concat(c),{variant:"error",autoHideDuration:1e4,action:function(a){return Object(g.jsxs)(r.a.Fragment,{children:[Object(g.jsx)("img",{src:"logo_centrifuga4_dark_error.svg",alt:"Logo Centr\xedfuga",style:{height:"35px"}}),t?Object(g.jsx)(De.a,{onClick:function(){navigator.clipboard.writeText("TO: vazquezrius.miquel@gmail.com\n\nTo mark an item, use a cross, like this: [X]\n\n\ud83d\udece\ufe0f TRIAGE\n[ ] This issue has been reported previously and has NOT been marked as solved\n[ ] This issue has been reported previously and has been marked as solved\n[ ] This issue has not been reported previously\n[ ] I have written the steps to reproduce the issue in the specified section below - \u26a0\ufe0frequired!\n\n\ud83d\ude4b TYPE OF REQUEST\n[ ] Feature request\n[X] Error report\n\n\ud83d\udccb STEPS\nDescribe what were you doing when this error happened!\n\n example\n 1. Searched 'john' in the students section, two students appeared.\n 2. Clicked the CSV export option.\n 3. Nothing happened, the the error message appeared.\n\nWrite your steps for repeating the issue here:\n1. ...\n\n\n\ud83d\udcda STACK TRACE\n"+JSON.stringify(e)+"\n\n\n\ud83c\udf29\ufe0f RESPONSE\n"+JSON.stringify(e.response)+"\n\n\n\u2699\ufe0f DEVICE CONTEXT\n"+navigator.platform+"\n"+navigator.userAgent+"\n"+navigator.appVersion+"\n"+navigator.vendor+"\n").then((function(e){n(a),alert("Okey, so something got messed up... \ud83d\ude23 Let's fix it!\n\n\ud83d\udce4 Open your email client\n\ud83d\udccb Ctrl+V\n\u270f\ufe0f Fill in the details\n\ud83d\udce8 Send it to the support team!\n\n")}))},children:i("Report")}):null,Object(g.jsx)(De.a,{onClick:function(){n(a)},children:i("Dismiss")})]})}})};return"blob"==e.request.responseType?e.response.data.text().then((function(e){c(JSON.parse(e).message)})):c(""),Promise.reject(e)}(e,u)};if(401===e.request.status){if(!t)return Promise.reject(e);b=s}if(403===e.request.status){if(!c)return Promise.reject(e);b=o}return 400!==e.request.status||l?d?b(e):(b(e).catch((function(){})),null):Promise.reject(e)},d=function(e,t,a,n,r){return function(i){return l(i,e,t,a,n,r)}};return function(e){var t=e.handle401,a=void 0===t||t,n=e.handle403,r=void 0===n||n,i=e.handle400,s=void 0===i||i,o=e.errorOut,l=void 0===o||o,u=e.reportUnexpected,b=void 0===u||u,h=e.snackbarSuccess;return[c(void 0!==h&&h),d(a,r,s,l,b)]}}var Me=a(55);function Le(e,t){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n={};if("initialValues"in t){var r={};n=t.initialValues;for(var i=0,c=Object.entries(n);i0?(l(),(r=n.patch({id:p.id,body:e,initial_values:p})).then.apply(r,Object(s.a)(j({snackbarSuccess:!0}))).then((function(t){f.resetForm(t),c(t),"function"===typeof u&&u(e)})).catch((function(e){l(!0)})).finally((function(){d(!1)}))):d(!1)}});return Object(g.jsx)(le.a,{children:b?Object(g.jsxs)(le.a,{children:[Object(g.jsx)(Ne,{className:m.actionIcon}),Object(g.jsx)(Ne,{className:m.actionIcon}),Object(g.jsx)("div",{style:{clear:"both"},children:["100%","100%","100%","100%","100%","100%"].map((function(e,t){return Object(g.jsx)(le.a,{py:0,children:Object(g.jsx)(Ce.a,{variant:"text",width:e,height:"60px"})},t)}))})]}):Object(g.jsxs)("form",{onSubmit:f.handleSubmit,children:[Object(g.jsx)(Ke,{className:m.actionIcon,formik:f}),Object(g.jsx)(Xe,{className:m.actionIcon,formik:f}),Object(g.jsx)(Ae,{label:h("id"),name:"id",disabled:!0,className:m.line,formik:f}),Object(g.jsxs)(le.a,{className:[m.line,m.composite],children:[Object(g.jsx)(Ae,{label:h("name"),style:{flex:1},name:"name",formik:f}),Object(g.jsx)(Ae,{label:h("surname1"),style:{flex:1},name:"surname1",formik:f}),Object(g.jsx)(Ae,{label:h("surname2"),style:{flex:1},formik:f,name:"surname2"})]}),Object(g.jsx)(le.a,{className:[m.line,m.composite],children:Object(g.jsx)(Ae,{label:h("email"),type:"email",style:{flex:1},formik:f,name:"email",helperText:f.touched.email&&f.errors.email})}),Object(g.jsx)(le.a,{my:3,children:Object(g.jsx)(P.a,{})}),Object(g.jsxs)(le.a,{className:[m.line,m.composite],children:[Object(g.jsx)(Ae,{label:h("address"),formik:f,style:{flex:4},name:"address"}),Object(g.jsx)(Ae,{label:h("city"),style:{flex:2},formik:f,name:"city"}),Object(g.jsx)(Ae,{label:h("zip"),formik:f,type:"number",style:{flex:1},name:"zip"})]}),Object(g.jsxs)(le.a,{className:[m.line,m.composite],children:[Object(g.jsx)(Ae,{label:h("dni"),style:{flex:1},formik:f,name:"dni"}),Object(g.jsx)(Ae,{label:h("phone"),type:"tel",style:{flex:1},formik:f,name:"phone"})]}),Object(g.jsxs)(le.a,{className:[m.line,m.composite],children:[Object(g.jsx)(Ee,{formik:f,style:{flex:1},name:"country_of_origin",label:h("country_of_origin")}),Object(g.jsxs)(Ae,{label:h("gender"),style:{flex:1},formik:f,name:"gender",select:!0,children:[Object(g.jsx)(be.a,{value:"m",children:h("male")}),Object(g.jsx)(be.a,{value:"f",children:h("female")}),Object(g.jsx)(be.a,{value:"nb",children:h("nb")})]})]}),Object(g.jsx)(le.a,{my:3,children:Object(g.jsx)(P.a,{})}),Object(g.jsxs)(le.a,{className:[m.line,m.composite],children:[Object(g.jsxs)(Ae,{label:h("is_studying"),style:{flex:1},name:"is_studying",formik:f,select:!0,children:[Object(g.jsx)(be.a,{value:!0,children:h("yes")}),Object(g.jsx)(be.a,{value:!1,children:h("no")})]}),Object(g.jsx)(Ae,{label:h("education_entity"),style:{flex:2},formik:f,name:"education_entity"}),Object(g.jsx)(Ae,{label:h("education_year"),style:{flex:2},name:"education_year",formik:f,select:!0,children:Ge.map((function(e){return Object(g.jsx)(be.a,{value:e,children:h(e)},e)}))})]}),Object(g.jsxs)(le.a,{className:[m.line,m.composite],children:[Object(g.jsxs)(Ae,{label:h("is_working"),style:{flex:1},name:"is_working",formik:f,select:!0,children:[Object(g.jsx)(be.a,{value:!0,children:h("yes")}),Object(g.jsx)(be.a,{value:!1,children:h("no")})]}),Object(g.jsx)(Ae,{label:h("career"),style:{flex:4},formik:f,name:"career"})]}),(t=l,void 0===t?null:Object(g.jsxs)("div",{children:[Object(g.jsx)(le.a,{my:3,children:Object(g.jsx)(P.a,{})}),t.map((function(e,t){return null==e?Object(g.jsx)(le.a,{my:3,children:Object(g.jsx)(P.a,{})}):Object(g.jsx)(le.a,{className:"".concat(m.line," ").concat(m.composite),children:e instanceof Array?e.map((function(e,a){return r.a.cloneElement(e,{formik:f,key:t+"-"+a})})):r.a.cloneElement(e,{formik:f})},t)}))]}))]})})},jt=a(560),pt=new(we("guardians")),ft=new(we("payments")),Ot=a(44),xt=a.n(Ot),gt=a(96),_t=a.n(gt),vt=a(27),yt=a.n(vt),wt=a(67),St=a.n(wt),kt=["bank-transfer","cash","bank-direct-debit"],Ct={name:null,surname1:null,surname2:null,email:null,address:null,city:null,zip:null,dni:null,phone:null,gender:null,country_of_origin:null,is_studying:null,education_entity:null,education_year:null,is_working:null,career:null},Nt=Object(o.a)(Object(o.a)({},Ct),{},{relation:null}),It=Object(o.a)(Object(o.a)({},Ct),{},{price_term:null,payment_comments:null,birth_date:null,other_comments:null,image_agreement:null,enrolment_status:null,default_payment_method:null}),Tt=r.a.createContext({loading:!1,startLoading:function(){},stopLoading:function(){}}),At=["children","setNewStudent","addStudentId","newStudent","title","currentStudent","updateCurrentStudent","patchService","deleteStudent","addNewGuardian"],qt=Object(w.a)((function(e){return{actionIcon:{float:"right"},button:{margin:e.spacing(1)},line:{width:"100%",marginTop:e.spacing(1)},composite:{display:"flex",flexDirection:"row",flex:1,flexWrap:"wrap",gap:e.spacing(1),width:"100%"}}}));var Bt=function(e){e.children;var t=e.setNewStudent,a=e.addStudentId,n=e.newStudent,i=(e.title,e.currentStudent),c=e.updateCurrentStudent,d=e.patchService,u=e.deleteStudent,b=e.addNewGuardian,h=(Object(f.a)(e,At),Object(ne.a)().t),m=null===i,j=qt(),O=Re(),x=Ze(),_=Object(l.a)(x,2),v=_[0],y=_[1],w=r.a.useContext(p),S=r.a.useContext(Tt),k=function(){var e,t;S.startLoading(),(t=i.id,e=new Promise((function(e,a){yt()({method:"post",url:"".concat(xe,"/emails/v1/grantEmail/").concat(t),headers:Object(o.a)(Object(o.a)({},{"Content-Type":"application/json","Cache-Control":"no-cache"}),fe())}).then((function(t){e(t)})).catch((function(e){a(e)}))}))).then.apply(e,Object(s.a)(O({snackbarSuccess:!0}))).finally((function(){S.stopLoading()}))},C=function(){var e,t;S.startLoading(),(t=i.id,e=new Promise((function(e,a){yt()({method:"post",url:"".concat(xe,"/emails/v1/enrolmentEmail/").concat(t),headers:Object(o.a)(Object(o.a)({},{"Content-Type":"application/json","Cache-Control":"no-cache"}),fe())}).then((function(t){e(t)})).catch((function(e){a(e)}))}))).then.apply(e,Object(s.a)(O({snackbarSuccess:!0}))).finally((function(){S.stopLoading()}))};return Object(g.jsx)(r.a.Fragment,{children:Object(g.jsx)(le.a,{p:3,children:Object(g.jsxs)(le.a,{px:2,children:[m?!n&&Object(g.jsx)(Ne,{className:j.actionIcon}):!n&&v([y.guardians,y.post])&&Object(g.jsx)(R.a,{style:{float:"right"},title:h("new_guardian"),"aria-label":h("new_guardian"),children:Object(g.jsx)(N.a,{onClick:function(e){b()},children:Object(g.jsx)(ue.a,{})})}),m&&!n?Object(g.jsx)(Ne,{className:j.actionIcon}):v([y.delete])&&Object(g.jsx)(R.a,{style:{float:"right"},title:h("delete"),"aria-label":h("delete"),children:Object(g.jsx)(N.a,{onClick:function(e){n?t(!1):w.confirm("delete_student_question","student_also_deletes",(function(){!function(){var e;(e=Se.delete(i.id)).then.apply(e,Object(s.a)(O({snackbarSuccess:!0}))).then((function(e){var t,a;(t=ft.deleteMany(i.payments)).then.apply(t,Object(s.a)(O({}))).then((function(e){})),(a=pt.deleteMany(i.guardians)).then.apply(a,Object(s.a)(O({}))).then((function(e){})),u(i.id)}))}(i.id)}))},children:Object(g.jsx)(xt.a,{})})}),Object(g.jsx)(mt,{currentPerson:n?It:i,newPerson:n,updateCurrentStudent:function(e){if(!n)return c(e);a(e)},patchService:d,onUpdate:function(e){"enrolment_status"in e&&"enrolled"===e.enrolment_status&&w.confirm("send_grant_letter_question","this_will_be_sent",(function(){k()}))},additionalValidation:{enrolment_status:ke.f().required(h("status_required")),image_agreement:ke.a().required(h("image_required")),birth_date:ke.b().required(h("birthdate_required"))},additionalFields:[[Object(g.jsx)(Ae,{label:h("price_term"),style:{flex:1},name:"price_term",type:"number",InputProps:{endAdornment:Object(g.jsx)(jt.a,{position:"end",children:"\u20ac"})}}),Object(g.jsx)(Ae,{label:h("default_payment_method"),style:{flex:1},name:"default_payment_method",select:!0,children:kt.map((function(e){return Object(g.jsx)(be.a,{value:e,children:h(e)},e)}))})],Object(g.jsx)(Ae,{label:h("payment_comments"),style:{flex:1},multiline:!0,rowsMax:8,name:"payment_comments"}),null,[Object(g.jsx)(Ae,{label:h("birthdate"),type:"date",style:{flex:1},name:"birth_date",InputLabelProps:{shrink:!0}}),Object(g.jsx)(Ae,{label:h("years_in_xamfra"),type:"number",style:{flex:1},name:"years_in_xamfra"})],[Object(g.jsx)(Ae,{label:h("status"),style:{flex:1},name:"enrolment_status",select:!0,children:["enrolled","early-unenrolled","pre-enrolled"].map((function(e){return Object(g.jsx)(be.a,{value:e,children:h(e)},e)}))}),Object(g.jsxs)(Ae,{label:h("image_agreement"),style:{flex:1},name:"image_agreement",select:!0,children:[Object(g.jsx)(be.a,{value:!0,children:h("yes")}),Object(g.jsx)(be.a,{value:!1,children:h("no")})]})],[Object(g.jsx)(Ae,{label:h("pre_enrolment_date"),type:"date",style:{flex:1},name:"pre_enrolment_date",InputLabelProps:{shrink:!0}}),Object(g.jsx)(Ae,{label:h("enrolment_date"),type:"date",style:{flex:1},name:"enrolment_date",InputLabelProps:{shrink:!0}}),Object(g.jsx)(Ae,{label:h("early_unenrolment_date"),type:"date",style:{flex:1},name:"early_unenrolment_date",InputLabelProps:{shrink:!0}})],Object(g.jsx)(Ae,{label:h("other_comments"),style:{flex:1},multiline:!0,rowsMax:8,name:"other_comments"})]}),!m&&!n&&Object(g.jsx)(le.a,{my:3,children:Object(g.jsx)(P.a,{})}),Object(g.jsxs)(le.a,{className:[j.line,j.composite],children:[!m&&!n&&v([y.send_email])&&Object(g.jsx)(R.a,{style:{flex:1},title:h("send_grant_letter"),"aria-label":h("send_grant_letter"),children:Object(g.jsx)(De.a,{variant:"contained",color:"default",className:j.button,disabled:S.loading,startIcon:Object(g.jsx)(_t.a,{}),onClick:function(e){k()},children:h("grant_letter")})}),!m&&!n&&Object(g.jsx)(R.a,{style:{flex:1},title:h("export_grant_letter"),"aria-label":h("export_grant_letter"),children:Object(g.jsx)(De.a,{variant:"contained",color:"default",className:j.button,disabled:S.loading,startIcon:Object(g.jsx)(St.a,{}),onClick:function(e){var t;S.loading||(S.startLoading(),(t=Se.downloadSubresource(i.id,"grantLetter")).then.apply(t,Object(s.a)(O({snackbarSuccess:!0}))).finally((function(){S.stopLoading()})))},children:h("grant_letter")})})]}),Object(g.jsxs)(le.a,{className:[j.line,j.composite],children:[!m&&!n&&v([y.send_email])&&Object(g.jsx)(R.a,{style:{flex:1},title:h("send_enrolment_agreement"),"aria-label":h("enrolment_agreement"),children:Object(g.jsx)(De.a,{variant:"contained",color:"default",className:j.button,startIcon:Object(g.jsx)(_t.a,{}),disabled:S.loading,onClick:function(e){C()},children:h("enrolment_agreement")})}),!m&&!n&&Object(g.jsx)(R.a,{style:{flex:1},title:h("export_enrolment_agreement"),"aria-label":h("export_enrolment_agreement"),children:Object(g.jsx)(De.a,{variant:"contained",color:"default",className:j.button,startIcon:Object(g.jsx)(St.a,{}),disabled:S.loading,onClick:function(e){var t;S.loading||(S.startLoading(),(t=Se.downloadSubresource(i.id,"enrolmentAgreement")).then.apply(t,Object(s.a)(O({snackbarSuccess:!0}))).finally((function(){S.stopLoading()})))},children:h("enrolment_agreement")})})]})]})})})},Pt=new(we("students","guardians")),Ft=["father","mother","grandfather","grandmother","brother","sister","uncle","aunt","cousin","legal_guardian","ss_agent","other"],Et=["studentId","title","guardianId","deleteGuardianId","addGuardianId","deleteNewGuardian","newGuardian"];var Dt=function(e){var t=e.studentId,a=(e.title,e.guardianId),i=e.deleteGuardianId,c=e.addGuardianId,o=e.deleteNewGuardian,d=e.newGuardian,u=void 0!==d&&d,b=(Object(f.a)(e,Et),Object(ne.a)().t),h=Re(),m=Object(n.useState)(null),j=Object(l.a)(m,2),O=j[0],x=j[1],_=Ze(),v=Object(l.a)(_,2),y=v[0],w=v[1];Object(n.useEffect)((function(){var e;u||(e=pt.getOne(a)).then.apply(e,Object(s.a)(h({}))).then((function(e){x(e.data)}))}),[a]);var S=r.a.useContext(p);return Object(g.jsx)(r.a.Fragment,{children:Object(g.jsx)(le.a,{p:3,children:Object(g.jsxs)(le.a,{px:2,children:[y([w.delete])&&Object(g.jsx)(N.a,{style:{float:"right"},onClick:function(e){u?o():S.confirm("delete_guardian_question","not_undone",(function(){var e;(e=pt.delete(a)).then.apply(e,Object(s.a)(h({snackbarSuccess:!0}))).then((function(e){i(a)}))}))},children:Object(g.jsx)(R.a,{title:b("delete"),"aria-label":b("delete"),children:Object(g.jsx)(xt.a,{})})}),Object(g.jsx)(mt,{currentPerson:u?Nt:O,studentId:t,newPerson:u,updateCurrentStudent:function(e){var a;if(!u)return x(e);(a=Pt.postWithId(t,e)).then.apply(a,Object(s.a)(h({snackbarSuccess:!0}))).then((function(){c(e)}))},patchService:pt,additionalValidation:{relation:ke.f().required(b("relation_required"))},additionalFields:[[Object(g.jsxs)(Ae,{label:b("relation"),style:{flex:1},name:"relation",select:!0,children:[Ft.map((function(e){return Object(g.jsx)(be.a,{value:e,children:b(e)},e)})),"))}"]})]]})]})})})},Rt=a(68),Mt=a(126),Lt=a.n(Mt),Gt=a(201),zt=a.n(Gt),Vt=a(202),Ut=a.n(Vt),Kt=a(561),Wt=a(562),Ht=a(564),Yt=a(563),Zt=a(548),Jt=a(599),Xt=a(200),Qt=a.n(Xt),$t=a(127),ea=a.n($t),ta=a(565),aa=Object(w.a)((function(e){return{root:{maxWidth:"100%",backgroundColor:"dark"===e.palette.type?"#575757":null},expand:{transform:"rotate(0deg)",marginLeft:"auto",transition:e.transitions.create("transform",{duration:e.transitions.duration.shortest})},expandOpen:{transform:"rotate(180deg)"},avatar:{backgroundColor:e.palette.secondary.main},line:{width:"100%",marginTop:e.spacing(1)},composite:{display:"flex",flexDirection:"row",flex:1,flexWrap:"wrap",gap:e.spacing(1),width:"100%"}}}));function na(e){var t=e.payment,a=e.updatePayment,n=e.deletePayment,i=e.newPayment,c=void 0!==i&&i,d=e.addPaymentId,u=e.student_id,b=Object(ne.a)().t,h=aa(),m=r.a.useState(c),j=Object(l.a)(m,2),f=j[0],O=j[1],x=Re(),_=Ze(),v=Object(l.a)(_,2),w=v[0],S=v[1],k=r.a.useContext(p),I=r.a.useContext(Tt),T=function(e){var t;I.startLoading(),(t=function(e){return new Promise((function(t,a){yt()({method:"post",url:"".concat(xe,"/emails/v1/paymentReceipt/").concat(e),headers:Object(o.a)(Object(o.a)({},{"Content-Type":"application/json","Cache-Control":"no-cache"}),fe())}).then((function(e){t(e)})).catch((function(e){a(e)}))}))}(e)).then.apply(t,Object(s.a)(x({snackbarSuccess:!0}))).finally((function(){I.stopLoading()}))},A=Le(!c,{initialValues:t,validationSchema:ke.d({method:bt(b,kt),quantity:ke.c().required(b("import_required")),date:ke.b().required(b("date_required"))}),enableReinitialize:!0,onSubmit:function(e,n){var r,i,l=n.setStatus,b=n.setSubmitting;Object.keys(e).length>0?(l(),c?(r=ft.post(Object(o.a)(Object(o.a)({},e),{},{student_id:u}))).then.apply(r,Object(s.a)(x({snackbarSuccess:!0}))).then((function(e){d(e.id),k.confirm("send_receipt","send_receipt",(function(){return T(e.id)}))})).catch((function(e){l(!0)})).finally((function(){b(!1)})):(i=ft.patch({id:t.id,body:e,initial_values:t})).then.apply(i,Object(s.a)(x({snackbarSuccess:!0}))).then((function(e){A.resetForm(e),a(e.id,e)})).catch((function(e){l(!0)})).finally((function(){b(!1)}))):b(!1)}});return Object(g.jsx)(le.a,{my:2,children:Object(g.jsxs)(Kt.a,{className:h.root,children:[Object(g.jsx)(Wt.a,{avatar:Object(g.jsx)(R.a,{title:"cash"===t.method?b("has_paid_cash"):"bank-transfer"===t.method?b("tooltip-bank-transfer"):"bank-direct-debit"===t.method?b("tooltip-bank-direct-debit"):b("other-payment-method"),children:Object(g.jsx)(Jt.a,{"aria-label":"recipe",className:h.avatar,children:"cash"===t.method?Object(g.jsx)(Qt.a,{}):"bank-transfer"===t.method?Object(g.jsx)(zt.a,{}):"bank-direct-debit"===t.method?Object(g.jsx)(X.a,{}):Object(g.jsx)(Lt.a,{})})}),action:w([S.delete])&&Object(g.jsx)(R.a,{title:b("delete"),"aria-label":b("delete"),children:Object(g.jsx)(N.a,{onClick:function(e){k.confirm("delete_payment","not_undone",(function(){n(t.id)}))},children:Object(g.jsx)(xt.a,{})})}),title:c?b("new_payment"):"".concat(b("has_paid")," ").concat(t.quantity,"\u20ac"),subheader:t.date}),!c&&Object(g.jsxs)(Yt.a,{disableSpacing:!0,children:[w([S.paymentReceipts])&&Object(g.jsx)(R.a,{title:b("export_receipt"),"aria-label":b("export_receipt"),children:Object(g.jsx)(N.a,{disabled:I.loading,"aria-label":b("export_receipt"),onClick:function(e){var a;I.startLoading(),(a=ft.downloadSubresource(t.id,"receipt")).then.apply(a,Object(s.a)(x({snackbarSuccess:!0}))).finally((function(){I.stopLoading()}))},children:Object(g.jsx)(Ut.a,{})})}),w([S.paymentReceipts,S.send_email])&&Object(g.jsx)(R.a,{title:b("send_receipt"),"aria-label":b("send_receipt"),children:Object(g.jsx)(N.a,{disabled:I.loading,"aria-label":b("send_receipt"),onClick:function(){return T(t.id)},children:Object(g.jsx)(_t.a,{})})}),Object(g.jsx)(N.a,{className:Object(C.a)(h.expand,Object(y.a)({},h.expandOpen,f)),onClick:function(){O(!f)},"aria-expanded":f,"aria-label":"show more",children:Object(g.jsx)(ea.a,{})})]}),Object(g.jsx)(Zt.a,{in:f,timeout:"auto",unmountOnExit:!0,children:Object(g.jsx)(Ht.a,{children:Object(g.jsx)(le.a,{children:null===t?Object(g.jsx)(le.a,{children:["100%","100%","100%"].map((function(e,t){return Object(g.jsx)(le.a,{py:0,children:Object(g.jsx)(Ce.a,{variant:"text",width:e,height:"60px"})},t)}))}):Object(g.jsxs)("form",{onSubmit:A.handleSubmit,children:[Object(g.jsx)(Ae,{label:b("id"),name:"id",disabled:!0,className:h.line,formik:A}),Object(g.jsxs)(le.a,{className:[h.line,h.composite],children:[Object(g.jsx)(Ae,{label:b("method"),style:{flex:1},formik:A,name:"method",select:!0,children:kt.map((function(e){return Object(g.jsx)(be.a,{value:e,children:b(e)},e)}))}),Object(g.jsx)(Ae,{label:b("import"),formik:A,type:"number",style:{flex:1},name:"quantity",InputProps:{endAdornment:Object(g.jsx)(jt.a,{position:"end",children:"\u20ac"})}}),Object(g.jsx)(Ae,{label:b("date"),formik:A,type:"date",style:{flex:1},name:"date",InputLabelProps:{shrink:!0}})]}),Object(g.jsx)(le.a,{className:[h.line,h.composite],children:Object(g.jsx)(Ae,{label:b("concept"),formik:A,style:{flex:1},multiline:!0,rowsMax:8,name:"concept"})}),Object(g.jsxs)(ta.a,{children:[Object(g.jsx)(De.a,{type:"button",className:"outline",onClick:A.handleReset,disabled:!A.dirty||A.isSubmitting,children:b("reset")}),w([S.patch])&&Object(g.jsx)(De.a,{type:"submit",disabled:!A.dirty||A.isSubmitting,children:b(c?"create":"save")})]})]})})})})]})})}var ra=a(128),ia=a.n(ra),ca=["children","title","paymentIds","deletePaymentFromStudent","addPaymentId","student_id"],sa=function(){var e=new Date,t=e.getDate(),a=e.getMonth()+1,n=e.getFullYear();return{id:null,date:"".concat(n,"-").concat(a<=9?"0"+a:a,"-").concat(t<=9?"0"+t:t),quantity:null,concept:null,method:null}},oa=Object(w.a)((function(e){return{actionIcon:{float:"right"},newLine:{width:"100%",marginTop:e.spacing(1),display:"flex",flexDirection:"column"}}}));var la,da=function(e){e.children,e.title;var t=e.paymentIds,a=e.deletePaymentFromStudent,r=e.addPaymentId,i=e.student_id,c=(Object(f.a)(e,ca),Object(ne.a)().t),o=oa(),d=Re(),u=null===t,b=Object(n.useState)([]),h=Object(l.a)(b,2),m=h[0],j=h[1],p=Object(n.useState)(!1),O=Object(l.a)(p,2),x=O[0],_=O[1];Object(n.useEffect)((function(){_(!1)}),[m]);var v=function(e,t){j(m.map((function(a){return a.id!==e?a:t})))},y=Ze(),w=Object(l.a)(y,2),S=w[0],k=w[1],C=function(e){var t;(t=ft.delete(e)).then.apply(t,Object(s.a)(d({snackbarSuccess:!0}))).then((function(t){a(e)}))};return Object(n.useEffect)((function(){var e;null!==t&&(0===t.length?j([]):(e=ft.getMany(t)).then.apply(e,Object(s.a)(d({}))).then((function(e){j(e.map((function(e){return e.data})).sort((function(e,t){return e.date.localeCompare(t.date)})))})))}),[t]),Object(g.jsxs)(le.a,{p:3,children:[" "," ",Object(g.jsxs)(le.a,{px:2,children:[u?Object(g.jsx)(Ne,{className:o.actionIcon}):S([k.post])&&Object(g.jsx)(R.a,{className:o.actionIcon,title:c("new_payment"),"aria-label":c("new_payment"),children:Object(g.jsx)(N.a,{onClick:function(e){_(!0)},children:Object(g.jsx)(ia.a,{})})}),Object(g.jsxs)("div",{className:o.newLine,children:[m&&m.map((function(e){return Object(g.jsx)(na,{payment:e,updatePayment:v,deletePayment:C},e.id)})),x&&Object(g.jsx)(na,{payment:sa(),updatePayment:v,deletePayment:function(e){_(!1)},newPayment:!0,student_id:i,addPaymentId:r}),u&&Object(g.jsx)(Ce.a,{width:"100%",height:"250px"}),!u&&0===m.length&&!x&&Object(g.jsx)(Rt.a,{children:c("no_payments")})]})]})]})},ua=new(we("schedules")),ba=a(39),ha=a(275),ma=a(311),ja=a(312),pa=a(309),fa=a(276),Oa=a(566),xa=a(567),ga=r.a.createContext({currentTab:null,goTo:function(e){}}),_a=["snapDuration","allowView","viewUrl","allowDelete","selectable","viewStudent","deleteCustom","scheduleIds","setScheduleIds","onEventClick","onEventSelected","onEventChange","editable"],va=function(e,t){return{daysOfWeek:[t.day_week],title:t.display_name,groupId:[t.id],id:t.id,startTime:t.start_time,endTime:t.end_time,color:t.is_base?e.palette.secondary.main:e.palette.secondary.light,textColor:(t.is_base,e.palette.secondary.contrastText),extendedProps:{schedule:t}}};function ya(e){if(console.log(typeof e),"function"===typeof e){for(var t=arguments.length,a=new Array(t>1?t-1:0),n=1;n",prevYear:"<<",nextYear:">>",today:"today",month:"month",week:"week",day:"day"},selectable:m,selectMirror:!0,dayMaxEvents:!0,weekends:!0,snapDuration:a,events:I,eventAdd:function(){},eventChange:function(e){},eventRemove:function(){},select:function(e){e.view.calendar.unselect(),O(e.start.getDay(),e.start.toLocaleTimeString("en-US",{hour12:!1}),e.end.toLocaleTimeString("en-US",{hour12:!1}))},eventContent:function(){},eventClick:function(e){!function(e){R({open:!0,event:e.event,schedule:e.event.extendedProps.schedule})}(e)},eventTimeFormat:{hour:"2-digit",minute:"2-digit",hour12:!1},eventResize:function(e){return B(x,e)},eventDrop:function(e){return B(x,e)}})})]})})};Object(w.a)((function(e){return{button:{margin:e.spacing(1)},calendar:{margin:e.spacing(2)}}}));var Sa=new(we("students","courses")),ka=new(we("courses")),Ca=a(518),Na=a(575),Ia=a(590),Ta=a(571),Aa=a(278),qa=a.n(Aa),Ba=a(319),Pa=a(277),Fa=a.n(Pa),Ea=Object(w.a)((function(e){return{root:{padding:"2px 4px",display:"flex",alignItems:"center",width:"100%"},input:{marginLeft:e.spacing(1),flex:1},iconButton:{padding:10}}}));function Da(e){var t=e.label,a=e.searchTitle,n=e.onChange,r=e.onSearch,i=Ea(),c=Object(ne.a)().t;return Object(g.jsxs)(re.a,{className:i.root,children:[Object(g.jsx)(Ba.a,{className:i.input,placeholder:c("search")+" "+t,inputProps:{"aria-label":"search "+t},value:a,onChange:n,onKeyPress:function(e){"Enter"===e.key&&(r(),e.preventDefault())}}),Object(g.jsx)(N.a,{type:"submit",className:i.iconButton,"aria-label":"search",onClick:r,children:Object(g.jsx)(Fa.a,{})})]})}var Ra=a(600),Ma=a(569),La=a(570),Ga=a(597),za=a(573),Va=r.a.createContext({theme:null,switchTheme:function(){},label:null}),Ua=Object(w.a)((function(e){return{root:{padding:"2px 4px",display:"flex",alignItems:"center",flexWrap:"wrap"}}}));function Ka(e){var t=e.searchTermField,a=void 0===t?"full_name":t,n=e.searchTerm,i=void 0===n?null:n,c=e.page,o=void 0===c?null:c,l=e.dataService,d=e.exportAll,u=void 0!==d&&d,b=e.getFilters,h=void 0===b?null:b,m=(Ua(),Object(ne.a)().t),j=Re(),p=r.a.useContext(Tt);return Object(g.jsx)(R.a,{title:m(u?"export_all_csv":"export_results_csv"),"aria-label":m(u?"export_all_csv":"export_results_csv"),children:Object(g.jsx)(Ga.a,{variant:"outlined",color:"primary",size:"small",disabled:p.loading,avatar:Object(g.jsx)(Jt.a,{children:"csv"}),label:m(u?"export_all":"export"),onClick:function(){var e;p.loading||(p.startLoading(),(e=l.downloadCsv(a,i,u?"*":o,null===h?{}:h(),u)).then.apply(e,Object(s.a)(j({}))).finally((function(){p.stopLoading()})))}})})}var Wa=qa()((function(e){return{root:{flex:1,overflow:"auto",display:"flex",flexDirection:"column"},list:{overflow:"auto",display:"flex",flexDirection:"column",flex:1,minHeight:"150px"},searchAndFilters:{display:"flex",flexDirection:"column"},pagination:{margin:e.spacing(3)},chip:{margin:e.spacing(2)},avatar:{},selectedAvatar:{backgroundColor:e.palette.primary.dark},chips:{flexWrap:"wrap","& > *":{margin:e.spacing(.5)},heading:{fontSize:e.typography.pxToRem(15),fontWeight:e.typography.fontWeightRegular}},noResults:{textAlign:"center"}}})),Ha=function(e){var t=e.setCurrentItemId,a=void 0===t?function(){}:t,i=e.auxFields,c=void 0===i?[]:i,d=e.displayText,u=void 0===d?null:d,b=e.onItemClick,h=void 0===b?function(){}:b,m=e.parent_id,j=void 0===m?null:m,p=e.secondaryDisplayNameField,f=void 0===p?null:p,O=e.secondaryAction,x=void 0===O?null:O,_=e.secondaryActionNeeds,v=void 0===_?[]:_,w=e.secondaryActionTooltip,S=void 0===w?null:w,k=e.secondaryActionIcon,C=void 0===k?null:k,I=e.secondaryActionCallable,T=void 0===I?null:I,A=e.withAvatar,q=void 0===A||A,B=e.withFiltersBox,D=void 0===B||B,L=e.chips,G=void 0===L?[]:L,z=e.currentItemId,V=void 0===z?null:z,U=e.items,K=e.setItems,W=e.displayNameField,H=void 0===W?"full_name":W,Y=e.usableFilters,Z=void 0===Y?[]:Y,J=e.defaultSearchBy,X=void 0===J?"full_name":J,Q=e.searchByOptions,$=void 0===Q?["full_name"]:Q,ee=e.dataService,te=e.searchBarLabel,ae=e.exportPage,re=void 0===ae||ae,ie=e.exportAllPages,ce=void 0===ie||ie,se=Object(n.useState)(""),oe=Object(l.a)(se,2),de=oe[0],ue=oe[1],be=Object(n.useState)(Z.reduce((function(e,t){return e[t.name]=t.initialValue,e}),{})),he=Object(l.a)(be,2),me=he[0],je=he[1],pe=Object(n.useState)(X),fe=Object(l.a)(pe,2),Oe=fe[0],xe=fe[1],ge=Object(ne.a)().t,_e=Object(n.useState)(1),ve=Object(l.a)(_e,2),ye=ve[0],we=ve[1],Se=Object(n.useState)(0),ke=Object(l.a)(Se,2),Ce=ke[0],Ne=ke[1],Ie=Re(),Te=Ze(),Ae=Object(l.a)(Te,2),qe=Ae[0],Be=(Ae[1],Wa());function Pe(){return Object.fromEntries(Object.entries(me).filter((function(e){var t=Object(l.a)(e,2);t[0];return null!==t[1]})))}function Fe(){var e;(e=ee.getAll({name:Oe,value:de},ye,Object(s.a)(new Set(["id",H,null===f?"id":f].concat(Object(s.a)(c)))),Pe(),j)).then.apply(e,Object(s.a)(Ie({}))).then((function(e){K(e.data),Ne(e._pagination.totalPages)}))}Object(n.useEffect)((function(){1===ye?Fe():we(1)}),[me]),Object(n.useEffect)(Fe,[ye,Oe,j]);return Object(g.jsxs)(le.a,{className:Be.root,children:[Object(g.jsxs)(le.a,{className:Be.searchAndFilters,children:[Object(g.jsx)(Da,{label:ge(te),value:de,onChange:function(e){ue(e.target.value)},onSearch:function(){1===ye?Fe():we(1)}}),D&&Object(g.jsxs)(Ra.a,{children:[Object(g.jsx)(Ma.a,{expandIcon:Object(g.jsx)(ea.a,{}),children:Object(g.jsx)(Rt.a,{className:Be.heading,children:ge("filters_actions")})}),Object(g.jsx)(La.a,{children:Object(g.jsxs)(le.a,{className:Be.chips,children:[re&&Array.isArray(U)&&U.length>0&&Object(g.jsx)(Ka,{searchTerm:de,page:ye,searchTermField:Oe,dataService:ee,getFilters:Pe}),ce&&Array.isArray(U)&&U.length>0&&Object(g.jsx)(Ka,{searchTerm:de,page:ye,dataService:ee,searchTermField:Oe,exportAll:!0,getFilters:Pe}),G.map((function(e){return e})),"\xb7",$.map((function(e){return Object(g.jsx)(R.a,{title:"".concat(ge("search_by")," ").concat(ge(e)),children:Object(g.jsx)(Ga.a,{size:"small",color:Oe===e?"primary":"default",label:"".concat(ge("search_by")," ").concat(ge(e)),onClick:function(t){xe(Oe===e?X:e)}})},e)})),Z.map((function(e){return Object(g.jsxs)(r.a.Fragment,{children:["\xb7 ",e.options.map((function(t){return Object(g.jsx)(R.a,{title:ge(t.tooltip),"aria-label":ge(t.tooltip),children:Object(g.jsx)(Ga.a,{size:"small",color:me[e.name]===t.name?"primary":"default",label:ge(t.label),onClick:function(a){je(Object(o.a)(Object(o.a)({},me),{},Object(y.a)({},e.name,me[e.name]===t.name?null:t.name)))}})},e.name+t.name)}))]})}))]})})]}),Object(g.jsx)(le.a,{my:2,children:Object(g.jsx)(Ia.a,{className:"pagination",count:Ce,page:ye,size:"small",showFirstButton:!0,showLastButton:!0,siblingCount:1,boundaryCount:1,color:"primary",onChange:function(e,t){we(t)}})})]}),Object(g.jsxs)(F.a,{className:Be.list,children:[U&&U.map((function(e){return Object(g.jsxs)("div",{children:[Object(g.jsxs)(E.a,{button:!0,onClick:function(){h(e.id),a(e.id)},children:[q&&Object(g.jsx)(Ta.a,{children:Object(g.jsx)(Jt.a,{className:e.id===V?Be.selectedAvatar:Be.avatar,children:e[H].charAt(0).toUpperCase()})}),Object(g.jsx)(M.a,{id:"name",primary:null===u?e[H]:u(e),secondary:null===f?null:e[f]}),x&&qe(v)&&Object(g.jsx)(za.a,{children:Object(g.jsx)(R.a,{title:ge(S),children:Object(g.jsx)(N.a,{edge:"end","aria-label":ge("export"),onClick:function(t){T(e.id)},children:C})})})]},e.id),Object(g.jsx)(P.a,{})]},e.id)})),0===U.length&&Object(g.jsx)(Rt.a,{className:Be.noResults,children:ge("no_results")+" \ud83d\udc40"})]})]})},Ya=["dataService","displayText","auxFields","parent_id","deleteTooltip","delete_message","onItemDeleted"],Za=function(e){var t=e.dataService,a=e.displayText,n=e.auxFields,i=e.parent_id,c=e.deleteTooltip,l=e.delete_message,d=e.onItemDeleted,u=void 0===d?function(){}:d,b=Object(f.a)(e,Ya),h=Re(),m=r.a.useContext(p);Object(ne.a)().t;return Object(g.jsx)(Ha,Object(o.a)({secondaryAction:!0,withFiltersBox:!1,withAvatar:!1,secondaryActionCallable:function(e){m.confirm(l,"not_undone",(function(){var a;(a=t.delete(i,e)).then.apply(a,Object(s.a)(h({snackbarSuccess:!0}))).then((function(t){u(e)}))}))},parent_id:i,displayText:a,auxFields:n,secondaryActionTooltip:c,secondaryActionNeeds:[Ye.delete],secondaryActionIcon:Object(g.jsx)(xt.a,{}),dataService:t},b))},Ja=["dataService","dataServiceSR","add_message","parent_id","onAdded"],Xa=function(e){var t=e.dataService,a=e.dataServiceSR,i=e.add_message,c=e.parent_id,d=e.onAdded,u=void 0===d?function(){}:d,b=Object(f.a)(e,Ja),h=Re(),m=r.a.useContext(p),j=Object(n.useState)([]),O=Object(l.a)(j,2),x=O[0],_=O[1];return Object(g.jsx)(Ha,Object(o.a)({secondaryAction:!1,items:x,setItems:_,withFiltersBox:!1,withAvatar:!1,dataService:t,onItemClick:function(e){m.confirm(i,null,(function(){var t;if(null===a)return u(e,null);(t=a.postWithId(c,e)).then.apply(t,Object(s.a)(h({snackbarSuccess:!0}))).then((function(t){u(e,t.data)}))}))}},b))},Qa=["defaultSearchBy","withFiltersBox","displayText","auxFields","parentItemDataService","itemDataService","add_message_confirm","parent_id","secondaryDisplayNameField","searchByOptions","resourceName","displayNameField","add_message","onSubresourceAdded","onSubresourceDeleted","usableFilters"],$a=r.a.forwardRef((function(e,t){return Object(g.jsx)(Ca.a,Object(o.a)({direction:"up",ref:t},e))})),en=Object(w.a)((function(e){return{list:{overflow:"auto",display:"flex",flexDirection:"column",flex:1},box:{display:"flex",flexDirection:"column"},pagination:{margin:"30px"},appBar:{position:"relative"},newLine:{width:"100%",marginTop:e.spacing(1),display:"flex",flexDirection:"column"},title:{marginLeft:e.spacing(2),flex:1},actionIcon:{float:"right"}}}));var tn=function(e){var t=e.defaultSearchBy,a=e.withFiltersBox,i=void 0!==a&&a,c=e.displayText,o=e.auxFields,d=e.parentItemDataService,u=e.itemDataService,b=e.add_message_confirm,h=e.parent_id,m=e.secondaryDisplayNameField,j=e.searchByOptions,p=e.resourceName,O=e.displayNameField,x=e.add_message,_=e.onSubresourceAdded,v=e.onSubresourceDeleted,y=e.usableFilters,w=(Object(f.a)(e,Qa),Object(ne.a)().t),S=en(),C=Object(n.useState)(!1),I=Object(l.a)(C,2),T=I[0],A=I[1],q=function(){A(!1)},B=Ze(),P=Object(l.a)(B,2),F=P[0],E=P[1],D=null===h,M=Object(n.useState)([]),L=Object(l.a)(M,2),G=L[0],z=L[1],V=r.a.useContext(ga);return Object(g.jsxs)(le.a,{p:3,children:[" "," ",Object(g.jsxs)(le.a,{px:2,children:[Object(g.jsxs)(Oa.a,{fullScreen:!0,open:T,onClose:q,TransitionComponent:$a,children:[Object(g.jsx)(k.a,{className:S.appBar,color:"secondary",children:Object(g.jsxs)(Na.a,{children:[Object(g.jsx)(Rt.a,{variant:"h6",className:S.title,children:w(x)}),Object(g.jsx)(De.a,{autoFocus:!0,color:"inherit",onClick:q,children:w("cancel")})]})}),Object(g.jsx)(le.a,{className:S.box,m:3,children:Object(g.jsx)(Xa,{dataService:u,dataServiceSR:d,defaultSearchBy:t,searchByOptions:j,searchBarLabel:p,displayNameField:O,secondaryDisplayNameField:m,parent_id:h,add_message:b,onAdded:function(e,t){z([].concat(Object(s.a)(G),[t])),_(e),q()}})})]}),D?Object(g.jsx)(Ne,{className:S.actionIcon}):F([E.post])&&Object(g.jsx)(R.a,{className:S.actionIcon,title:w(x),"aria-label":w(x),children:Object(g.jsx)(N.a,{onClick:function(){A(!0)},children:Object(g.jsx)(ia.a,{})})}),Object(g.jsx)("div",{className:S.newLine,children:D?Object(g.jsx)(Ce.a,{width:"100%",height:"250px"}):Object(g.jsx)(Za,{dataService:d,defaultSearchBy:t,searchByOptions:j,items:G,withFiltersBox:i,setItems:z,displayText:c,auxFields:o,searchBarLabel:p,displayNameField:O,usableFilters:y,parent_id:h,deleteTooltip:"delete",delete_message:w("delete")+" "+w(p),onItemDeleted:function(e){z(G.filter((function(t){return t.id!==e}))),v(e)},onItemClick:function(e){V.goTo(p,e)}})})]})]})},an=["value","index","children"];function nn(e){return{id:"full-width-tab-".concat(e),"aria-controls":"full-width-tabpanel-".concat(e)}}var rn=function(e){var t=e.value,a=e.index,n=e.children,r=Object(f.a)(e,an);return Object(g.jsx)("div",Object(o.a)(Object(o.a)({role:"tabpanel",hidden:t!==a,id:"full-width-tabpanel-".concat(a),"aria-labelledby":"full-width-tab-".concat(a),style:{height:"100%",flex:1}},r),{},{children:n}))},cn=["setNewStudent","newStudent","addStudentId","currentStudentId","deleteStudent"],sn=Object(w.a)((function(e){return{contentPanel:{position:"relative",overflow:"auto",boxSizing:"border-box",height:"100%",display:"flex",flexDirection:"column"},content:{overflowX:"hidden",display:"flex",flexDirection:"column",overflowY:"auto",flex:1,height:"100%"},tab:{height:"100%"}}}));function on(e){var t=e.setNewStudent,a=e.newStudent,i=e.addStudentId,c=e.currentStudentId,d=e.deleteStudent,u=(Object(f.a)(e,cn),null===c),b=Re(),h=Object(n.useState)(null),m=Object(l.a)(h,2),j=m[0],p=m[1],O=Object(n.useState)(!1),x=Object(l.a)(O,2),_=x[0],v=x[1],y=Ze(),w=Object(l.a)(y,2),S=w[0],C=w[1];Object(n.useEffect)((function(){var e;if(u)return p(null);(e=Se.getOne(c)).then.apply(e,Object(s.a)(b({}))).then((function(e){p(e.data)}))}),[c]);var N=sn(),I=G()(),T=Object(ne.a)().t,A=r.a.useState(0),q=Object(l.a)(A,2),B=q[0],P=q[1];Object(n.useEffect)((function(){P(0)}),[c]);var F=null===j?[]:j.guardians;return Object(g.jsxs)(re.a,{elevation:3,square:!0,className:N.contentPanel,children:[Object(g.jsx)(k.a,{position:"static",color:"default",children:Object(g.jsxs)(se.a,{value:B,onChange:function(e,t){P(t)},indicatorColor:"primary",textColor:"primary",variant:"scrollable",scrollButtons:"on",children:[Object(g.jsx)(oe.a,Object(o.a)({label:T("attendee")},nn(0))),!a&&S([C.schedules])&&Object(g.jsx)(oe.a,Object(o.a)({label:T("schedules")},nn(1))),!a&&S([C.payments])&&Object(g.jsx)(oe.a,Object(o.a)({label:T("payments")},nn(2))),!a&&S([C.courses])&&Object(g.jsx)(oe.a,Object(o.a)({label:T("courses")},nn(3))),!a&&F&&S([C.guardians])&&F.map((function(e,t){return Object(g.jsx)(oe.a,Object(o.a)({label:T("contact")+" "+(t+1)},nn(t+4)),T("contact")+" "+(t+1))})),!a&&_&&Object(g.jsx)(oe.a,Object(o.a)({label:T("new_guardian")},nn(4+F.length)),T("new_guardian"))]})}),Object(g.jsxs)(ce.a,{axis:"rtl"===I.direction?"x-reverse":"x",index:B,containerStyle:{height:"100%"},className:N.content,onChangeIndex:function(e){P(e)},children:[Object(g.jsx)(rn,{value:B,index:0,children:Object(g.jsx)(Bt,{setNewStudent:t,dir:I.direction,newStudent:a,title:T("attendee"),currentStudent:j,addStudentId:i,patchService:Se,updateCurrentStudent:p,deleteStudent:d,addNewGuardian:function(){v(!0),P(4+F.length)}})}),S([C.schedules])&&Object(g.jsx)(rn,{value:B,index:1,children:Object(g.jsx)(wa,{allowDelete:function(e){return!e.is_base},allowView:!0,viewUrl:function(e){return["/courses",e.course_id]},setScheduleIds:function(e){return p(Object(o.a)(Object(o.a)({},j),{},{schedules:e}))},onEventChange:function(e,t,a,n,r){var i,l,d=e.event,u={};(u.day_week=t,u.start_time=a,u.end_time=n,r.is_base)?(u.course_id=r.course_id,u.student_id=c,(i=ua.post(u)).then.apply(i,Object(s.a)(b({errorOut:!0,snackbarSuccess:!0}))).then((function(t){var a=e.view.calendar;d.is_base=!1,a.addEvent(va(I,t)),e.revert(),p(Object(o.a)(Object(o.a)({},j),{},{schedules:[].concat(Object(s.a)(j.schedules),[t.id])}))})).catch((function(t){e.revert()}))):(l=ua.patch({id:r.id,body:u,initial_values:r})).then.apply(l,Object(s.a)(b({errorOut:!0,snackbarSuccess:!0}))).then((function(e){})).catch((function(t){e.revert()}))},scheduleIds:null===j?null:j.schedules,editable:!0,selectable:!1})}),S([C.payments])&&Object(g.jsx)(rn,{value:B,index:2,children:Object(g.jsx)(da,{paymentIds:null===j?null:j.payments,addPaymentId:function(e){p(Object(o.a)(Object(o.a)({},j),{},{payments:[].concat(Object(s.a)(j.payments),[e])}))},student_id:c,deletePaymentFromStudent:function(e){p(Object(o.a)(Object(o.a)({},j),{},{payments:j.payments.filter((function(t){return t!==e}))}))}})}),S([C.courses])&&Object(g.jsxs)(rn,{value:B,index:3,children:[" ",Object(g.jsx)(tn,{defaultSearchBy:"name",parentItemDataService:Sa,itemDataService:ka,add_message_confirm:"confirm_enroll_to_course",parent_id:c,secondaryDisplayNameField:"description",searchByOptions:["name"],resourceName:"courses",displayNameField:"name",add_message:"enroll_to_course",onSubresourceAdded:function(e){p(Object(o.a)(Object(o.a)({},j),{},{courses:[].concat(Object(s.a)(j.courses),[e])}))},onSubresourceDeleted:function(e){p(Object(o.a)(Object(o.a)({},j),{},{courses:j.courses.filter((function(t){return t!==e}))}))}})]}),F&&S([C.guardians])&&F.map((function(e,t){return Object(g.jsx)(rn,{value:B,index:t+4,children:Object(g.jsx)(Dt,{dir:I.direction,guardianId:e,deleteGuardianId:function(e){p(Object(o.a)(Object(o.a)({},j),{},{guardians:j.guardians.filter((function(t){return t!==e}))})),P(0)}},e)})})),Object(g.jsx)(rn,{value:B,index:4+F.length,children:Object(g.jsx)(Dt,{dir:I.direction,newGuardian:!0,deleteNewGuardian:function(){v(!1),P(0)},studentId:c,addGuardianId:function(e){v(!1),p(Object(o.a)(Object(o.a)({},j),{},{guardians:[].concat(Object(s.a)(j.guardians),[e])})),P(4+F.length)},deleteGuardianId:function(e){p(Object(o.a)(Object(o.a)({},j),{},{guardians:j.guardians.filter((function(t){return t!==e}))})),P(0)}})})]})]})}var ln=a(578),dn=a(97),un=a.n(dn),bn=["dataService"],hn=function(e){var t=e.dataService,a=Object(f.a)(e,bn),n=Re(),r=Object(ne.a)().t;return Object(g.jsx)(Ha,Object(o.a)({secondaryAction:!0,secondaryActionCallable:function(e){var a;(a=t.downloadOneCsv(e)).then.apply(a,Object(s.a)(n({})))},secondaryActionTooltip:r("export")+" .csv",secondaryActionIcon:Object(g.jsx)(St.a,{}),dataService:t},a))},mn=Object(w.a)((function(e){return{root:{height:"100%"},left:{display:"flex",flexDirection:"column",height:"100%",position:"relative"},fab:{position:"absolute",bottom:e.spacing(2),right:e.spacing(2)}}}));var jn=a(580);function pn(e){var t=e.formik,a=Object(ne.a)().t;return Object(g.jsx)(Ae,{label:a("role"),style:{flex:1},name:"role_id",formik:t,select:!0,children:[{name:"administrator",id:"administrator"},{name:"administrative",id:"administrative"},{name:"layman",id:"layman"},{name:"teacher",id:"teacher"},{name:"empty",id:"empty"},{name:"no role",id:null}].map((function(e){return Object(g.jsx)(be.a,{value:e.id,children:a(e.name)},e.name)}))})}var fn={inviteUser:function(e,t){return new Promise((function(a,n){yt()({url:"".concat(xe,"/user-invites/v1/request"),method:"POST",headers:Object(o.a)(Object(o.a)({},{"Cache-Control":"no-cache"}),fe()),data:{user_email:e,role_id:t}}).then((function(e){a(!0)})).catch((function(e){n(e)}))}))}};var On=new(we("users")),xn=a(279),gn=a.n(xn),_n=new(we("teachers")),vn=["children","addStudentId","newStudent","title","currentStudent","updateCurrentStudent","patchService","deleteStudent","addNewGuardian"],yn=r.a.forwardRef((function(e,t){return Object(g.jsx)(Ca.a,Object(o.a)({direction:"up",ref:t},e))})),wn=Object(w.a)((function(e){return Object(y.a)({actionIcon:{float:"right"},button:{margin:e.spacing(1)},line:{width:"100%",marginTop:e.spacing(1)},composite:{display:"flex",flexDirection:"row",flex:1,flexWrap:"wrap",gap:e.spacing(1),width:"100%"},list:{overflow:"auto",display:"flex",flexDirection:"column",flex:1},box:{display:"flex",flexDirection:"column"},pagination:{margin:"30px"},appBar:{position:"relative"},newLine:{width:"100%",marginTop:e.spacing(1),display:"flex",flexDirection:"column"},title:{marginLeft:e.spacing(2),flex:1}},"actionIcon",{float:"right"})}));var Sn=function(e){e.children,e.addStudentId,e.newStudent,e.title;var t=e.currentStudent,a=e.updateCurrentStudent,i=(e.patchService,e.deleteStudent),c=(e.addNewGuardian,Object(f.a)(e,vn),Object(ne.a)().t),o=null===t,d=wn(),u=Re(),b=Object(n.useState)(!1),h=Object(l.a)(b,2),m=h[0],j=h[1],O=function(){j(!1)},x=r.a.useContext(p),_=o?{}:t,v=Le(!0,{initialValues:_,validationSchema:ke.d({email:dt(c),name:ke.f().required(c("name_required")),role_id:ke.f().nullable()}),enableReinitialize:!0,onSubmit:function(e,t){var n,r=t.setStatus,i=t.setSubmitting;Object.keys(e).length>0?(r(),(n=On.patch({id:_.id,body:e,initial_values:_})).then.apply(n,Object(s.a)(u({snackbarSuccess:!0}))).then((function(e){v.resetForm(e),a(e)})).catch((function(e){r(!0)})).finally((function(){i(!1)}))):i(!1)}}),y=Ze(),w=Object(l.a)(y,2),S=w[0],C=w[1];return Object(g.jsx)(le.a,{p:3,children:Object(g.jsxs)(le.a,{px:2,children:[Object(g.jsxs)(Oa.a,{fullScreen:!0,open:m,onClose:O,TransitionComponent:yn,children:[Object(g.jsx)(k.a,{className:d.appBar,color:"secondary",children:Object(g.jsxs)(Na.a,{children:[Object(g.jsx)(Rt.a,{variant:"h6",className:d.title,children:c("teacher-user")}),Object(g.jsx)(De.a,{autoFocus:!0,color:"inherit",onClick:O,children:c("cancel")})]})}),Object(g.jsx)(le.a,{className:d.box,m:3,children:Object(g.jsx)(Xa,{dataService:_n,dataServiceSR:null,defaultSearchBy:"full_name",searchByOptions:["full_name"],searchBarLabel:"teachers",displayNameField:"full_name",secondaryDisplayNameField:null,parent_id:null===t?null:t.id,add_message:"link-user-to-teacher",onAdded:function(e,t){O(),v.setFieldValue("teacher_id",e),v.setFieldTouched("teacher_id",!0)}})})]}),o?Object(g.jsx)(Ne,{className:d.actionIcon}):S([C.delete])&&Object(g.jsx)(R.a,{style:{float:"right"},title:c("delete"),"aria-label":c("delete"),children:Object(g.jsx)(N.a,{onClick:function(e){x.confirm("delete_user_question","not_undone",(function(){!function(){var e;(e=On.delete(t.id)).then.apply(e,Object(s.a)(u({snackbarSuccess:!0}))).then((function(e){i(t.id)}))}()}))},children:Object(g.jsx)(xt.a,{})})}),o?Object(g.jsxs)(le.a,{children:[Object(g.jsx)(Ne,{className:d.actionIcon}),Object(g.jsx)(Ne,{className:d.actionIcon}),Object(g.jsx)("div",{style:{clear:"both"},children:["100%","100%","100%"].map((function(e,t){return Object(g.jsx)(le.a,{py:0,children:Object(g.jsx)(Ce.a,{variant:"text",width:e,height:"60px"})},t)}))})]}):Object(g.jsxs)("form",{onSubmit:v.handleSubmit,children:[Object(g.jsx)(Ke,{className:d.actionIcon,formik:v}),Object(g.jsx)(Xe,{className:d.actionIcon,formik:v}),Object(g.jsx)(Ae,{label:c("id"),name:"id",disabled:!0,className:d.line,formik:v}),Object(g.jsxs)(le.a,{className:[d.line,d.composite],children:[Object(g.jsx)(Ae,{label:c("name"),style:{flex:1},name:"name",formik:v}),Object(g.jsx)(Ae,{label:c("surname1"),style:{flex:1},name:"surname1",formik:v}),Object(g.jsx)(Ae,{label:c("surname2"),style:{flex:1},formik:v,name:"surname2"})]}),Object(g.jsx)(le.a,{className:[d.line,d.composite],children:Object(g.jsx)(Ae,{label:c("email"),type:"email",style:{flex:1},formik:v,name:"email",helperText:v.touched.email&&v.errors.email})}),Object(g.jsx)(le.a,{className:[d.line,d.composite],children:Object(g.jsx)(pn,{formik:v})}),"teacher"==v.values.role&&Object(g.jsx)(le.a,{className:[d.line,d.composite],children:Object(g.jsx)(Ae,{label:c("teacher"),style:{flex:1},name:"teacher_id",formik:v,disabled:!0,InputProps:{endAdornment:Object(g.jsx)(jt.a,{position:"end",children:Object(g.jsx)(N.a,{"aria-label":"link teacher",onClick:function(){j(!0)},children:Object(g.jsx)(gn.a,{})})})}})})]})]})})},kn=(new(we("users","needs")),a(579)),Cn=a(592),Nn=["name","value","formik","noDirty"],In=Object(w.a)((function(e){return Object(S.a)({root:function(t){return{color:t?e.palette.neutral.status.dirty:e.palette.neutral.emphasisText.medium,"&.Mui-checked":{color:t?e.palette.neutral.status.dirty:e.palette.primary.main}}}})})),Tn=function(e){var t=e.name,a=e.value,n=e.formik,r=e.noDirty,i=void 0!==r&&r,c=Object(f.a)(e,Nn),s=!0!==i&&(void 0!==n.values[t]&&void 0!==n.initialValues[t]&&n.values[t].includes(a)!==n.initialValues[t].includes(a)),l=In(s);return Object(g.jsx)(Cn.a,Object(o.a)({name:t,className:l.root,value:a,onChange:n.handleChange,onBlur:n.handleBlur,error:n.status||void 0!==n.errors[t],helperText:n.touched[t]&&n.errors[t],checked:n.values[t]},c))};var An=a(73),qn=function(e,t){var a,n=new Set(e),r=Object(An.a)(t);try{for(r.s();!(a=r.n()).done;){var i=a.value;n.has(i)?n.delete(i):n.add(i)}}catch(c){r.e(c)}finally{r.f()}return n};Object(w.a)((function(e){return{actionIcon:{float:"right"},button:{margin:e.spacing(1)},line:{width:"100%",marginTop:e.spacing(1)},composite:{display:"flex",flexDirection:"row",flex:1,flexWrap:"wrap",gap:e.spacing(1),width:"100%"}}}));var Bn=Object(w.a)((function(e){return{contentPanel:{position:"relative",overflow:"auto",boxSizing:"border-box",height:"100%",display:"flex",flexDirection:"column"},content:{overflowX:"hidden",display:"flex",flexDirection:"column",overflowY:"auto",flex:1,height:"100%"},tab:{height:"100%"}}}));function Pn(e){var t=e.currentUserId,a=e.deleteUser,i=null===t,c=Re(),d=Object(n.useState)(null),u=Object(l.a)(d,2),b=u[0],h=u[1];Object(n.useEffect)((function(){var e;if(i)return h(null);(e=On.getOne(t)).then.apply(e,Object(s.a)(c({}))).then((function(e){h(e.data)}))}),[t,i]);var m=Bn(),j=G()(),p=Object(ne.a)().t,f=r.a.useState(0),O=Object(l.a)(f,2),x=O[0],_=O[1];Object(n.useEffect)((function(){_(0)}),[t]);return Object(g.jsxs)(re.a,{elevation:3,square:!0,className:m.contentPanel,children:[Object(g.jsx)(k.a,{position:"static",color:"default",children:Object(g.jsx)(se.a,{value:x,onChange:function(e,t){_(t)},indicatorColor:"primary",textColor:"primary",variant:"scrollable",scrollButtons:"on",children:Object(g.jsx)(oe.a,Object(o.a)({label:p("user")},nn(0)))})}),Object(g.jsx)(ce.a,{axis:"rtl"===j.direction?"x-reverse":"x",index:x,containerStyle:{height:"100%"},className:m.content,onChangeIndex:function(e){_(e)},children:Object(g.jsx)(rn,{value:x,index:0,children:Object(g.jsx)(Sn,{dir:j.direction,currentStudent:b,updateCurrentStudent:h,deleteStudent:a})})})]})}var Fn=Object(w.a)((function(e){return{root:{height:"100%"},root2:{display:"flex"},line:{width:"100%",marginTop:e.spacing(1)},composite:{display:"flex",flexDirection:"row",flex:1,flexWrap:"wrap",gap:e.spacing(1),width:"100%"},formControl:{padding:e.spacing(2),maxHeight:"50vh",overflow:"auto",minWidth:"40vw"},dialog:{},left:{display:"flex",flexDirection:"column",height:"100%",position:"relative"},fab:{position:"absolute",bottom:e.spacing(2),right:e.spacing(2)}}}));var En=Object(w.a)((function(e){return{root:{height:"100%"},root2:{display:"flex"},formControl:{padding:e.spacing(2),maxHeight:"50vh",overflow:"auto",minWidth:"40vw"},dialog:{},left:{display:"flex",flexDirection:"column",height:"100%",position:"relative"},fab:{position:"absolute",bottom:e.spacing(2),right:e.spacing(2)}}}));var Dn=new(we("rooms")),Rn=["scheduleIds"],Mn=Object(w.a)((function(e){return{button:{margin:e.spacing(1)},calendar:{margin:e.spacing(2)}}}));var Ln=function(e){var t=e.scheduleIds,a=Object(f.a)(e,Rn);return Object(ne.a)().t,Mn(),Object(g.jsx)("div",Object(o.a)(Object(o.a)({},a),{},{style:{height:"100%",flex:1,minHeight:"70vh"},children:Object(g.jsx)(wa,{scheduleIds:t,editable:!1,allowView:!0,viewUrl:function(e){return["/courses",e.course_id]}})}))},Gn=["children","addStudentId","setNewRoom","newRoom","newStudent","title","currentStudent","updateCurrentStudent","patchService","deleteStudent","addNewGuardian"],zn=Object(w.a)((function(e){return{actionIcon:{float:"right"},button:{margin:e.spacing(1)},line:{width:"100%",marginTop:e.spacing(1)},composite:{display:"flex",flexDirection:"row",flex:1,flexWrap:"wrap",gap:e.spacing(1),width:"100%"}}}));var Vn=function(e){e.children,e.addStudentId;var t=e.setNewRoom,a=e.newRoom,n=(e.newStudent,e.title,e.currentStudent),i=e.updateCurrentStudent,c=(e.patchService,e.deleteStudent),o=(e.addNewGuardian,Object(f.a)(e,Gn),Object(ne.a)().t),d=null===n,u=zn(),b=Re(),h=r.a.useContext(p),m=d?{}:n,j=Le(!a,{initialValues:m,validationSchema:ke.d({name:ke.f().required(o("name_required"))}),enableReinitialize:!0,onSubmit:function(e,n){var r,c,o=n.setStatus,l=n.setSubmitting;Object.keys(e).length>0?(o(),a?(r=Dn.post(e)).then.apply(r,Object(s.a)(b({snackbarSuccess:!0}))).then((function(e){i(e),t(!1)})).catch((function(e){o(!0)})).finally((function(){l(!1)})):(c=Dn.patch({id:m.id,body:e,initial_values:m})).then.apply(c,Object(s.a)(b({snackbarSuccess:!0}))).then((function(e){j.resetForm(e),i(e)})).catch((function(e){o(!0)})).finally((function(){l(!1)}))):l(!1)}}),O=Ze(),x=Object(l.a)(O,2),_=x[0],v=x[1];return Object(g.jsx)(le.a,{p:3,children:Object(g.jsxs)(le.a,{px:2,children:[!a&&d?Object(g.jsx)(Ne,{className:u.actionIcon}):_([v.delete])&&Object(g.jsx)(R.a,{style:{float:"right"},title:o("delete"),"aria-label":o("delete"),children:Object(g.jsx)(N.a,{onClick:function(e){a?t(!1):h.confirm("delete_room_question","not_undone",(function(){!function(){var e;(e=Dn.delete(n.id)).then.apply(e,Object(s.a)(b({snackbarSuccess:!0}))).then((function(e){c(n.id)}))}()}))},children:Object(g.jsx)(xt.a,{})})}),!a&&d?Object(g.jsxs)(le.a,{children:[Object(g.jsx)(Ne,{className:u.actionIcon}),Object(g.jsx)(Ne,{className:u.actionIcon}),Object(g.jsx)("div",{style:{clear:"both"},children:["100%","100%","100%","100%"].map((function(e,t){return Object(g.jsx)(le.a,{py:0,children:Object(g.jsx)(Ce.a,{variant:"text",width:e,height:"60px"})},t)}))})]}):Object(g.jsxs)("form",{onSubmit:j.handleSubmit,children:[Object(g.jsx)(Ke,{className:u.actionIcon,formik:j}),Object(g.jsx)(Xe,{className:u.actionIcon,formik:j}),Object(g.jsx)(Ae,{label:o("id"),name:"id",disabled:!0,className:u.line,formik:j}),Object(g.jsxs)(le.a,{className:[u.line,u.composite],children:[Object(g.jsx)(Ae,{label:o("name"),style:{flex:4},name:"name",formik:j}),Object(g.jsx)(Ae,{label:o("capacity"),style:{flex:1},name:"capacity",formik:j,type:"number"})]})]})]})})},Un=Object(w.a)((function(e){return{contentPanel:{position:"relative",overflow:"auto",boxSizing:"border-box",height:"100%",display:"flex",flexDirection:"column"},content:{overflowX:"hidden",display:"flex",flexDirection:"column",overflowY:"auto",flex:1,height:"100%"},tab:{height:"100%"}}}));function Kn(e){return{id:"full-width-tab-".concat(e),"aria-controls":"full-width-tabpanel-".concat(e)}}function Wn(e){var t=e.setNewRoom,a=e.currentRoomId,i=e.deleteRoom,c=e.newRoom,d=(e.addRoomId,null===a),u=Re(),b=Object(n.useState)(null),h=Object(l.a)(b,2),m=h[0],j=h[1];Object(n.useEffect)((function(){var e;if(d)return j(null);(e=Dn.getOne(a)).then.apply(e,Object(s.a)(u({}))).then((function(e){j(e.data)}))}),[a]);var p=Un(),f=G()(),O=Object(ne.a)().t,x=r.a.useState(0),_=Object(l.a)(x,2),v=_[0],y=_[1];Object(n.useEffect)((function(){y(0)}),[a]);var w=Ze(),S=Object(l.a)(w,2),C=S[0],N=S[1];return Object(g.jsxs)(re.a,{elevation:3,square:!0,className:p.contentPanel,children:[Object(g.jsx)(k.a,{position:"static",color:"default",children:Object(g.jsxs)(se.a,{value:v,onChange:function(e,t){y(t)},indicatorColor:"primary",textColor:"primary",variant:"scrollable",scrollButtons:"on",children:[Object(g.jsx)(oe.a,Object(o.a)({label:O("room")},Kn(0))),!c&&C([N.schedules])&&Object(g.jsx)(oe.a,Object(o.a)({label:O("schedules")},Kn(1)))]})}),Object(g.jsxs)(ce.a,{axis:"rtl"===f.direction?"x-reverse":"x",index:v,containerStyle:{height:"100%"},className:p.content,onChangeIndex:function(e){y(e)},children:[Object(g.jsxs)(rn,{value:v,index:0,children:[" ",Object(g.jsx)(Vn,{newRoom:c,setNewRoom:t,dir:f.direction,currentStudent:m,updateCurrentStudent:j,deleteStudent:i})]}),C([N.schedules])&&Object(g.jsx)(rn,{value:v,index:1,children:Object(g.jsx)(Ln,{value:v,index:1,className:p.tab,dir:f.direction,scheduleIds:null===m?null:m.schedules,student_id:a})})]})]})}var Hn=Object(w.a)((function(e){return{root:{height:"100%"},left:{display:"flex",flexDirection:"column",height:"100%",position:"relative"},fab:{position:"absolute",bottom:e.spacing(2),right:e.spacing(2)}}}));var Yn=new(we("teachers","courses"));function Zn(e,t,a){return new Promise((function(n,r){yt()({url:"".concat(xe,"/calendars/v1/").concat(e,"/").concat(t,"/").concat(a),method:"GET",headers:Object(o.a)(Object(o.a)({},{"Cache-Control":"no-cache"}),fe())}).then((function(e){var t=e.headers["content-disposition"].split("filename=")[1];null===t&&(t="calendar.ics");var a=window.URL.createObjectURL(new Blob([e.data])),r=document.createElement("a");r.href=a,r.setAttribute("download",t),document.body.appendChild(r),r.click(),r.remove(),n()})).catch((function(e){r(e)}))}))}var Jn=["children","addStudentId","setNewRoom","newRoom","title","currentStudent","updateCurrentStudent","patchService","deleteStudent","addNewGuardian"],Xn=Object(w.a)((function(e){return{actionIcon:{float:"right"},button:{margin:e.spacing(1)},line:{width:"100%",marginTop:e.spacing(1)},composite:{display:"flex",flexDirection:"row",flex:1,flexWrap:"wrap",gap:e.spacing(1),width:"100%"}}}));var Qn=function(e){e.children,e.addStudentId;var t=e.setNewRoom,a=e.newRoom,n=(e.title,e.currentStudent),i=e.updateCurrentStudent,c=(e.patchService,e.deleteStudent),o=(e.addNewGuardian,Object(f.a)(e,Jn),Object(ne.a)().t),d=null===n,u=Xn(),b=Re(),h=r.a.useContext(p),m=d?{}:n,j=Le(!a,{initialValues:m,validationSchema:ke.d({email:dt(o),name:ke.f().required(o("name_required"))}),enableReinitialize:!0,onSubmit:function(e,n){var r,c,o=n.setStatus,l=n.setSubmitting;Object.keys(e).length>0?(o(),a?(r=_n.post(e)).then.apply(r,Object(s.a)(b({snackbarSuccess:!0}))).then((function(e){i(e),t(!1)})).catch((function(e){o(!0)})).finally((function(){l(!1)})):(c=_n.patch({id:m.id,body:e,initial_values:m})).then.apply(c,Object(s.a)(b({snackbarSuccess:!0}))).then((function(e){j.resetForm(e),i(e)})).catch((function(e){o(!0)})).finally((function(){l(!1)}))):l(!1)}}),O=Ze(),x=Object(l.a)(O,2),_=x[0],v=x[1];return Object(g.jsx)(le.a,{p:3,children:Object(g.jsxs)(le.a,{px:2,children:[!a&&d?Object(g.jsx)(Ne,{className:u.actionIcon}):_([v.delete])&&Object(g.jsx)(R.a,{style:{float:"right"},title:o("delete"),"aria-label":o("delete"),children:Object(g.jsx)(N.a,{onClick:function(e){a?t(!1):h.confirm("delete_teacher","not_undone",(function(){!function(){var e;(e=_n.delete(n.id)).then.apply(e,Object(s.a)(b({snackbarSuccess:!0}))).then((function(e){c(n.id)}))}()}))},children:Object(g.jsx)(xt.a,{})})}),!a&&d?Object(g.jsxs)(le.a,{children:[Object(g.jsx)(Ne,{className:u.actionIcon}),Object(g.jsx)(Ne,{className:u.actionIcon}),Object(g.jsx)("div",{style:{clear:"both"},children:["100%","100%","100%","100%"].map((function(e,t){return Object(g.jsx)(le.a,{py:0,children:Object(g.jsx)(Ce.a,{variant:"text",width:e,height:"60px"})},t)}))})]}):Object(g.jsxs)("form",{onSubmit:j.handleSubmit,children:[Object(g.jsx)(Ke,{className:u.actionIcon,formik:j}),Object(g.jsx)(Xe,{className:u.actionIcon,formik:j}),Object(g.jsx)(Ae,{label:o("id"),name:"id",disabled:!0,className:u.line,formik:j}),Object(g.jsx)(Ae,{label:o("calendar_url"),name:"calendar_url",disabled:!0,className:u.line,formik:j}),Object(g.jsxs)(le.a,{className:[u.line,u.composite],children:[Object(g.jsx)(Ae,{label:o("name"),style:{flex:1},name:"name",formik:j}),Object(g.jsx)(Ae,{label:o("surname1"),style:{flex:1},name:"surname1",formik:j}),Object(g.jsx)(Ae,{label:o("surname2"),style:{flex:1},formik:j,name:"surname2"})]}),Object(g.jsx)(le.a,{className:[u.line,u.composite],children:Object(g.jsx)(Ae,{label:o("email"),type:"email",style:{flex:1},formik:j,name:"email",helperText:j.touched.email&&j.errors.email})}),Object(g.jsx)(le.a,{my:3,children:Object(g.jsx)(P.a,{})}),Object(g.jsxs)(le.a,{className:[u.line,u.composite],children:[Object(g.jsx)(Ae,{label:o("address"),formik:j,style:{flex:4},name:"address"}),Object(g.jsx)(Ae,{label:o("city"),style:{flex:2},formik:j,name:"city"}),Object(g.jsx)(Ae,{label:o("zip"),formik:j,type:"number",style:{flex:1},name:"zip"})]}),Object(g.jsxs)(le.a,{className:[u.line,u.composite],children:[Object(g.jsx)(Ae,{label:o("dni"),style:{flex:1},formik:j,name:"dni"}),Object(g.jsx)(Ae,{label:o("phone"),type:"tel",style:{flex:1},formik:j,name:"phone"})]}),!d&&!a&&Object(g.jsx)(le.a,{my:3,children:Object(g.jsx)(P.a,{})}),Object(g.jsx)(le.a,{className:[u.line,u.composite],children:!d&&!a&&Object(g.jsx)(R.a,{style:{flex:1},title:o("export_calendar"),"aria-label":o("send_grant_letter"),children:Object(g.jsx)(De.a,{variant:"contained",color:"default",className:u.button,startIcon:Object(g.jsx)(St.a,{}),onClick:function(e){Zn("teachers",n.id,n.calendar_id).then((function(e){}))},children:o("export_calendar")})})})]})]})})},$n=["setSchedulesIds","scheduleIds"],er=Object(w.a)((function(e){return{button:{margin:e.spacing(1)},calendar:{margin:e.spacing(2)}}}));var tr=function(e){e.setSchedulesIds;var t=e.scheduleIds,a=Object(f.a)(e,$n);return Object(ne.a)().t,er(),Object(g.jsx)("div",Object(o.a)(Object(o.a)({},a),{},{style:{height:"100%",flex:1,minHeight:"70vh"},children:Object(g.jsx)(wa,{scheduleIds:t,editable:!1,allowView:!0,viewUrl:function(e){return["/courses",e.course_id]}})}))},ar=Object(w.a)((function(e){return{contentPanel:{position:"relative",overflow:"auto",boxSizing:"border-box",height:"100%",display:"flex",flexDirection:"column"},content:{overflowX:"hidden",display:"flex",flexDirection:"column",overflowY:"auto",flex:1,height:"100%"},tab:{height:"100%"}}}));function nr(e){var t=e.currentTeacherId,a=e.setNewTeacher,i=(e.addTeacherId,e.newTeacher),c=e.deleteTeacher,d=null===t,u=Re(),b=Object(n.useState)(null),h=Object(l.a)(b,2),m=h[0],j=h[1];Object(n.useEffect)((function(){var e;if(d)return j(null);(e=_n.getOne(t)).then.apply(e,Object(s.a)(u({}))).then((function(e){j(e.data)}))}),[t]);var p=ar(),f=G()(),O=Object(ne.a)().t,x=r.a.useState(0),_=Object(l.a)(x,2),v=_[0],y=_[1];Object(n.useEffect)((function(){y(0)}),[t]);var w=Ze(),S=Object(l.a)(w,2),C=S[0],N=S[1];return Object(g.jsxs)(re.a,{elevation:3,square:!0,className:p.contentPanel,children:[Object(g.jsx)(k.a,{position:"static",color:"default",children:Object(g.jsxs)(se.a,{value:v,onChange:function(e,t){y(t)},indicatorColor:"primary",textColor:"primary",variant:"scrollable",scrollButtons:"on",children:[Object(g.jsx)(oe.a,Object(o.a)({label:O("teacher")},nn(0))),!i&&C([N.schedules])&&Object(g.jsx)(oe.a,Object(o.a)({label:O("schedules")},nn(1))),!i&&C([N.courses])&&Object(g.jsx)(oe.a,Object(o.a)({label:O("courses")},nn(2)))]})}),Object(g.jsxs)(ce.a,{axis:"rtl"===f.direction?"x-reverse":"x",index:v,containerStyle:{height:"100%"},className:p.content,onChangeIndex:function(e){y(e)},children:[Object(g.jsx)(rn,{value:v,index:0,children:Object(g.jsx)(Qn,{newRoom:i,setNewRoom:a,dir:f.direction,currentStudent:m,updateCurrentStudent:j,deleteStudent:c})}),C([N.schedules])&&Object(g.jsx)(rn,{value:v,index:1,children:Object(g.jsx)(tr,{className:p.tab,dir:f.direction,scheduleIds:null===m?null:m.schedules,student_id:t})}),C([N.courses])&&Object(g.jsx)(rn,{value:v,index:2,children:Object(g.jsx)(tn,{defaultSearchBy:"name",parentItemDataService:Yn,itemDataService:ka,add_message_confirm:"confirm_enroll_to_course",parent_id:t,secondaryDisplayNameField:"description",searchByOptions:["name"],resourceName:"courses",displayNameField:"name",value:v,add_message:"enroll_to_course",index:2,onSubresourceAdded:function(e){j(Object(o.a)(Object(o.a)({},m),{},{courses:[].concat(Object(s.a)(m.courses),[e])}))},onSubresourceDeleted:function(e){j(Object(o.a)(Object(o.a)({},m),{},{courses:m.courses.filter((function(t){return t!==e}))}))}})})]})]})}var rr=Object(w.a)((function(e){return{root:{height:"100%"},left:{display:"flex",flexDirection:"column",height:"100%",position:"relative"},fab:{position:"absolute",bottom:e.spacing(2),right:e.spacing(2)}}}));var ir=new(we("courses","rooms")),cr=new(we("courses","students")),sr=new(we("courses","teachers")),or=a(203),lr=a.n(or),dr=["children","addCourseId","setNewCourse","newCourse","currentCourse","updateCurrentCourse","patchService","deleteCourse"],ur=Object(w.a)((function(e){return{actionIcon:{float:"right"},textField:{marginRight:e.spacing(1),width:200},button:{margin:e.spacing(1)},line:{width:"100%",marginTop:e.spacing(1)},composite:{display:"flex",flexDirection:"row",flex:1,flexWrap:"wrap",gap:e.spacing(1),width:"100%"},choose:{marginBottom:e.spacing(3)}}}));var br=function(e){e.children,e.addCourseId;var t=e.setNewCourse,a=e.newCourse,n=e.currentCourse,i=e.updateCurrentCourse,c=(e.patchService,e.deleteCourse),d=Object(f.a)(e,dr),u=Object(ne.a)().t,b=Object(O.g)(),h=null===n,m=ur(),j=Re(),x=r.a.useState(!1),_=Object(l.a)(x,2),v=_[0],y=_[1],w=r.a.useContext(p),S=h?{}:n;a&&(S={price_term:75,is_published:!1});var k=Object(Me.a)({initialValues:{},validationSchema:ke.d({startDate:ke.b().required(u("required")),endDate:ke.b().required(u("required"))}),enableReinitialize:!0,onSubmit:function(e,t){var a,r=t.setStatus,i=t.setSubmitting;i(!0),r(),(a=ka.downloadSubresource(n.id,"attendance-list/v1",e)).then.apply(a,Object(s.a)(j({snackbarSuccess:!0}))).then((function(){y(!1)})).catch((function(){r(!0)})).finally((function(){i(!1)}))}}),C=Le(!a,{initialValues:S,validationSchema:ke.d({name:ke.f().required(u("name_required"))}),enableReinitialize:!0,onSubmit:function(e,n){var r,c,o=n.setStatus,l=n.setSubmitting;Object.keys(e).length>0?(o(),a?(r=ka.post(e)).then.apply(r,Object(s.a)(j({snackbarSuccess:!0}))).then((function(e){i(e),t(!1)})).catch((function(e){o(!0)})).finally((function(){l(!1)})):(c=ka.patch({id:S.id,body:e,initial_values:S})).then.apply(c,Object(s.a)(j({snackbarSuccess:!0}))).then((function(e){C.resetForm(e),i(e)})).catch((function(e){o(!0)})).finally((function(){l(!1)}))):l(!1)}}),I=r.a.useContext(Tt),T=Ze(),A=Object(l.a)(T,2),q=A[0],B=A[1];return Object(g.jsxs)("div",Object(o.a)(Object(o.a)({},d),{},{children:[Object(g.jsx)(Oa.a,{open:v,onClose:function(e){y(!1)},"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:Object(g.jsxs)("form",{onSubmit:k.handleSubmit,children:[Object(g.jsx)(xa.a,{id:"alert-dialog-title",children:u("download")}),Object(g.jsxs)(jn.a,{children:[Object(g.jsx)(Rt.a,{className:m.choose,children:u("chose_list_dates")}),Object(g.jsx)(Ie.a,{id:"date",label:u("start"),type:"date",value:k.values.startDate,name:"startDate",onChange:k.handleChange,onBlur:k.handleBlur,error:k.status||void 0!==k.errors.startDate,helperText:k.touched.startDate&&k.errors.startDate,className:m.textField,InputLabelProps:{shrink:!0}}),Object(g.jsx)(Ie.a,{id:"date",label:u("end"),type:"date",value:k.values.endDate,name:"endDate",onChange:k.handleChange,error:k.status||void 0!==k.errors.endDate,helperText:k.touched.endDate&&k.errors.endDate,onBlur:k.handleBlur,className:m.textField,InputLabelProps:{shrink:!0}})]}),Object(g.jsxs)(ta.a,{children:[Object(g.jsx)(De.a,{onClick:function(e){y(!1)},color:"primary",children:u("cancel")}),Object(g.jsx)(De.a,{type:"submit",color:"primary",disabled:k.isSubmitting,autoFocus:!0,children:u("download")})]})]})}),Object(g.jsx)(le.a,{p:3,children:Object(g.jsxs)(le.a,{px:2,children:[!a&&h?Object(g.jsx)(Ne,{className:m.actionIcon}):q([B.delete])&&Object(g.jsx)(R.a,{style:{float:"right"},title:u("delete"),"aria-label":u("delete"),children:Object(g.jsx)(N.a,{onClick:function(e){a?t(!1):w.confirm("delete_course_question","not_undone",(function(){!function(e){var t;(t=ka.delete(e)).then.apply(t,Object(s.a)(j({snackbarSuccess:!0}))).then((function(t){c(e)}))}(n.id)}))},children:Object(g.jsx)(xt.a,{})})}),!a&&h?Object(g.jsxs)(le.a,{children:[Object(g.jsx)(Ne,{className:m.actionIcon}),Object(g.jsx)(Ne,{className:m.actionIcon}),Object(g.jsx)("div",{style:{clear:"both"},children:["100%","100%","100%","100%"].map((function(e,t){return Object(g.jsx)(le.a,{py:0,children:Object(g.jsx)(Ce.a,{variant:"text",width:e,height:"60px"})},t)}))})]}):Object(g.jsxs)("form",{onSubmit:C.handleSubmit,children:[Object(g.jsx)(Ke,{className:m.actionIcon,formik:C}),Object(g.jsx)(Xe,{className:m.actionIcon,formik:C}),Object(g.jsx)(Ae,{label:u("id"),name:"id",disabled:!0,className:m.line,formik:C}),Object(g.jsx)(Ae,{label:u("calendar_url"),name:"calendar_url",disabled:!0,className:m.line,formik:C}),Object(g.jsx)(le.a,{className:[m.line,m.composite],children:Object(g.jsx)(Ae,{label:u("name"),style:{flex:1},name:"name",formik:C})}),Object(g.jsx)(le.a,{className:[m.line,m.composite],children:Object(g.jsx)(Ae,{label:u("description"),style:{flex:1},multiline:!0,rowsMax:8,name:"description",formik:C})}),Object(g.jsxs)(le.a,{className:[m.line,m.composite],children:[Object(g.jsx)(Ae,{label:u("price_term"),style:{flex:1},name:"price_term",formik:C,type:"number"}),Object(g.jsxs)(Ae,{label:u("public"),style:{flex:1},name:"is_published",formik:C,select:!0,children:[Object(g.jsx)(be.a,{value:!0,children:u("yes")}),Object(g.jsx)(be.a,{value:!1,children:u("no")})]})]})]}),!h&&!a&&Object(g.jsx)(le.a,{my:3,children:Object(g.jsx)(P.a,{})}),Object(g.jsx)(le.a,{className:[m.line,m.composite],children:!h&&!a&&Object(g.jsx)(R.a,{style:{flex:1},title:u("take attendance"),"aria-label":u("take_attendance"),children:Object(g.jsx)(De.a,{variant:"contained",color:"default",className:m.button,startIcon:Object(g.jsx)(lr.a,{}),onClick:function(e){b.replace("/attendance?id=".concat(n.id))},children:u("take attendance")})})}),Object(g.jsxs)(le.a,{className:[m.line,m.composite],children:[!h&&q([B.students])&&!a&&Object(g.jsx)(R.a,{style:{flex:1},title:u("export_attendance_list"),"aria-label":u("export_attendance_list"),children:Object(g.jsx)(De.a,{variant:"contained",color:"default",className:m.button,startIcon:Object(g.jsx)(St.a,{}),onClick:function(e){y(!0)},children:u("attendance_list")})}),!h&&q([B.students])&&!a&&Object(g.jsx)(R.a,{style:{flex:1},title:u("export_attendance_list"),"aria-label":u("export_attendance_list"),children:Object(g.jsx)(De.a,{variant:"contained",color:"default",className:m.button,startIcon:Object(g.jsx)(St.a,{}),onClick:function(){var e;(e=ka.downloadSubresource(n.id,"attendance-list/v2")).then.apply(e,Object(s.a)(j({snackbarSuccess:!0})))},children:u("export_attendance_list")+" (".concat(u("v2"),")")})})]}),Object(g.jsxs)(le.a,{className:[m.line,m.composite],children:[!h&&!a&&Object(g.jsx)(R.a,{style:{flex:1},title:u("export_calendar"),"aria-label":u("send_grant_letter"),children:Object(g.jsx)(De.a,{variant:"contained",color:"default",className:m.button,startIcon:Object(g.jsx)(St.a,{}),onClick:function(e){Zn("courses",n.id,n.calendar_id).then((function(e){}))},children:u("export_calendar")})}),!h&&q([B.students,B.guardians])&&!a&&Object(g.jsx)(R.a,{style:{flex:1},title:u("export_students_contact_sheet"),"aria-label":u("export_grant_letter"),children:Object(g.jsx)(De.a,{variant:"contained",color:"default",className:m.button,disabled:I.loading,startIcon:Object(g.jsx)(St.a,{}),onClick:function(e){var t;I.startLoading(),(t=ka.downloadSubresource(n.id,"contactsSheet")).then.apply(t,Object(s.a)(j({snackbarSuccess:!0}))).finally((function(){I.stopLoading()}))},children:u("students_contact_sheet")})})]})]})})]}))},hr=new(we("courses","labels"));function mr(e){var t=e.formik,a=e.name,n=void 0===a?"labels":a,i=e.noDirty,c=void 0!==i&&i,s=Object(ne.a)().t;return Object(g.jsxs)(r.a.Fragment,{children:[Object(g.jsx)(Rt.a,{children:s("labels")}),Ge.map((function(e){return Object(g.jsx)(kn.a,{control:Object(g.jsx)(Tn,{checked:void 0!==t.values[n]&&t.values[n].includes(e),name:n,value:e,formik:t,noDirty:c}),label:s(e)},e)})),Object(g.jsx)(kn.a,{control:Object(g.jsx)(Tn,{checked:void 0!==t.values[n]&&t.values[n].includes("adult"),name:n,value:"adult",formik:t,noDirty:c}),label:s("adult")})]})}var jr=["currentCourse","updateCurrentCourse","patchService","deleteCourse"],pr=Object(w.a)((function(e){return{actionIcon:{float:"right"},button:{margin:e.spacing(1)},line:{width:"100%",marginTop:e.spacing(1)},composite:{display:"flex",flexDirection:"row",flex:1,flexWrap:"wrap",gap:e.spacing(1),width:"100%"}}}));var fr=function(e){var t=e.currentCourse,a=e.updateCurrentCourse,n=(e.patchService,e.deleteCourse,Object(f.a)(e,jr),Object(ne.a)().t,null===t),r=pr(),i=Re(),c=n?{}:t,l=Le(!1,{initialValues:c,enableReinitialize:!0,onSubmit:function(e,n){var r=n.setStatus,l=n.setSubmitting;r();var d=new Set(e.labels),u=new Set(c.labels),b=Array.from(qn(d,u));if(0!==b.size){var h;l(!0);var m=b.map((function(e){var a,n;return u.has(e)?(a=hr.delete(t.id,e)).then.apply(a,Object(s.a)(i({}))):(n=hr.postWithId(t.id,e)).then.apply(n,Object(s.a)(i({})))}));(h=Promise.all(m)).then.apply(h,Object(s.a)(i({snackbarSuccess:!0}))).then((function(){a(Object(o.a)(Object(o.a)({},t),{},{labels:e.labels}))})).finally((function(){l(!1)}))}}},!0);return Object(g.jsx)(le.a,{p:3,children:Object(g.jsx)(le.a,{px:2,children:n?Object(g.jsxs)(le.a,{children:[Object(g.jsx)(Ne,{className:r.actionIcon}),Object(g.jsx)(Ne,{className:r.actionIcon}),Object(g.jsx)("div",{style:{clear:"both"},children:Object(g.jsx)(le.a,{py:0,children:Object(g.jsx)(Ce.a,{variant:"text",width:"100%",height:"150px"})})})]}):Object(g.jsxs)("form",{onSubmit:l.handleSubmit,children:[Object(g.jsx)(Ke,{className:r.actionIcon,formik:l}),Object(g.jsx)(Xe,{className:r.actionIcon,formik:l}),Object(g.jsx)(le.a,{style:{display:"inline-block"},children:Object(g.jsx)(mr,{formik:l})})]})})})},Or=["title","scheduleIds","setScheduleIds","student_id"];Object(w.a)((function(e){return{button:{margin:e.spacing(1)},calendar:{margin:e.spacing(2)}}}));var xr=function(e){e.title;var t=e.scheduleIds,a=e.setScheduleIds,n=e.student_id,r=Object(f.a)(e,Or),i=Re();return Object(g.jsx)("div",Object(o.a)(Object(o.a)({},r),{},{style:{height:"100%",flex:1,minHeight:"70vh"},children:Object(g.jsx)(wa,{allowDelete:function(e){return!0},allowView:function(e){return!e.is_base},viewUrl:function(e){return["/students",e.student_id]},setScheduleIds:a,onEventChange:function(e,t,a,n,r){var c;(c=ua.patch({id:r.id,body:{day_week:t,start_time:a,end_time:n},initial_values:r})).then.apply(c,Object(s.a)(i({errorOut:!0,snackbarSuccess:!0}))).then((function(e){})).catch((function(t){e.revert()}))},viewStudent:!0,scheduleIds:t,editable:!0,selectable:!0,onEventSelected:function(e,r,i){ua.post({day_week:e,start_time:r,end_time:i,course_id:n}).then((function(e){a([].concat(Object(s.a)(t),[e.id]))}))}})}))},gr=Object(w.a)((function(e){return{contentPanel:{position:"relative",overflow:"auto",boxSizing:"border-box",height:"100%",display:"flex",flexDirection:"column"},content:{overflowX:"hidden",display:"flex",flexDirection:"column",overflowY:"auto",flex:1,height:"100%"},tab:{height:"100%"}}}));function _r(e){var t=e.currentCourseId,a=e.setNewCourse,i=(e.addCourseId,e.newCourse),c=e.deleteCourse,d=null===t,u=Re(),b=Object(n.useState)(null),h=Object(l.a)(b,2),m=h[0],j=h[1],p=Ze(),f=Object(l.a)(p,2),O=f[0],x=f[1];Object(n.useEffect)((function(){var e;if(d)return j(null);(e=ka.getOne(t)).then.apply(e,Object(s.a)(u({}))).then((function(e){j(e.data)}))}),[t]);var _=gr(),v=G()(),y=Object(ne.a)().t,w=r.a.useState(0),S=Object(l.a)(w,2),C=S[0],N=S[1];Object(n.useEffect)((function(){N(0)}),[t]);return Object(g.jsxs)(re.a,{elevation:3,square:!0,className:_.contentPanel,children:[Object(g.jsx)(k.a,{position:"static",color:"default",children:Object(g.jsxs)(se.a,{value:C,onChange:function(e,t){N(t)},indicatorColor:"primary",textColor:"primary",variant:"scrollable",scrollButtons:"on",children:[Object(g.jsx)(oe.a,Object(o.a)({label:y("course")},nn(0))),!i&&Object(g.jsx)(oe.a,Object(o.a)({label:y("labels")},nn(1))),!i&&O([x.schedules])&&Object(g.jsx)(oe.a,Object(o.a)({label:y("schedules")},nn(2))),!i&&O([x.students])&&Object(g.jsx)(oe.a,Object(o.a)({label:y("students")},nn(3))),!i&&O([x.teachers])&&Object(g.jsx)(oe.a,Object(o.a)({label:y("teachers")},nn(4))),!i&&O([x.rooms])&&Object(g.jsx)(oe.a,Object(o.a)({label:y("rooms")},nn(5)))]})}),Object(g.jsxs)(ce.a,{axis:"rtl"===v.direction?"x-reverse":"x",index:C,containerStyle:{height:"100%"},className:_.content,onChangeIndex:function(e){N(e)},children:[Object(g.jsxs)(rn,{value:C,index:0,children:[" ",Object(g.jsx)(br,{newCourse:i,setNewCourse:a,dir:v.direction,currentCourse:m,updateCurrentCourse:j,deleteCourse:c})]}),Object(g.jsxs)(rn,{value:C,index:1,children:[" ",Object(g.jsx)(fr,{dir:v.direction,currentCourse:m,updateCurrentCourse:j,deleteCourse:c})]}),O([x.schedules])&&Object(g.jsx)(rn,{value:C,index:2,children:Object(g.jsx)(xr,{setScheduleIds:function(e){return j(Object(o.a)(Object(o.a)({},m),{},{schedules:e}))},className:_.tab,dir:v.direction,scheduleIds:null===m?null:m.schedules,student_id:t})}),O([x.students])&&Object(g.jsxs)(rn,{value:C,index:3,children:[" ",Object(g.jsx)(tn,{defaultSearchBy:"full_name",parentItemDataService:cr,itemDataService:Se,add_message_confirm:"confirm_enroll_to_course",parent_id:t,searchByOptions:["full_name"],withFiltersBox:!0,resourceName:"students",displayNameField:"full_name",usableFilters:[{name:"enrolment_status",defaultValue:null,options:[{label:"enrolled",tooltip:"only_enrolled",name:"enrolled"},{label:"pre-enrolled",tooltip:"only_preenrolled",name:"pre-enrolled"},{label:"early-unenrolled",tooltip:"only_earlyunenrolled",name:"early-unenrolled"}]},{name:"default_payment_method",defaultValue:null,options:[{label:"cash",tooltip:"only_cash",name:"cash"},{label:"bank-transfer",tooltip:"only_banktransfer",name:"bank-transfer"},{label:"bank-direct-debit",tooltip:"only_bankdirectdebit",name:"bank-direct-debit"}]}],auxFields:["enrolment_status"],displayText:function(e){return e.full_name+("enrolled"===e.enrolment_status?" \u2611\ufe0f":"")},add_message:"enroll_to_course",onSubresourceAdded:function(e){j(Object(o.a)(Object(o.a)({},m),{},{students:[].concat(Object(s.a)(m.students),[e])}))},onSubresourceDeleted:function(e){j(Object(o.a)(Object(o.a)({},m),{},{students:m.students.filter((function(t){return t!==e}))}))}})]}),O([x.teachers])&&Object(g.jsxs)(rn,{value:C,index:4,children:[" ",Object(g.jsx)(tn,{defaultSearchBy:"full_name",parentItemDataService:sr,itemDataService:_n,add_message_confirm:"confirm_add_to_course",parent_id:t,searchByOptions:["full_name"],resourceName:"teachers",displayNameField:"full_name",add_message:"add_teacher",onSubresourceAdded:function(e){j(Object(o.a)(Object(o.a)({},m),{},{teachers:[].concat(Object(s.a)(m.teachers),[e])}))},onSubresourceDeleted:function(e){j(Object(o.a)(Object(o.a)({},m),{},{teachers:m.teachers.filter((function(t){return t!==e}))}))}})]}),O([x.rooms])&&Object(g.jsxs)(rn,{value:C,index:5,children:[" ",Object(g.jsx)(tn,{defaultSearchBy:"name",parentItemDataService:ir,itemDataService:Dn,add_message_confirm:"confirm_link_to_room",parent_id:t,searchByOptions:["name"],resourceName:"rooms",displayNameField:"name",add_message:"link_room",onSubresourceAdded:function(e){j(Object(o.a)(Object(o.a)({},m),{},{rooms:[].concat(Object(s.a)(m.rooms),[e])}))},onSubresourceDeleted:function(e){j(Object(o.a)(Object(o.a)({},m),{},{rooms:m.rooms.filter((function(t){return t!==e}))}))}})]})]})]})}var vr=Object(w.a)((function(e){return{root:{height:"100%"},left:{display:"flex",flexDirection:"column",height:"100%",position:"relative"},fab:{position:"absolute",bottom:e.spacing(2),right:e.spacing(2)}}}));var yr={bulkSend:function(e,t,a,n,r,i){var c=new FormData;return c.append("courseIds",JSON.stringify(e)),c.append("emailPreference",n),c.append("subject",t),c.append("studentEnrolmentStatus",r),c.append("body",a),i.forEach((function(e){c.append(e.name,e)})),new Promise((function(e,t){yt()({url:"".concat(xe,"/emails/v1/bulk"),method:"POST",headers:Object(o.a)(Object(o.a)({},{"Cache-Control":"no-cache"}),fe()),data:c}).then((function(t){e(!0)})).catch((function(e){t(e)}))}))}};var wr=["formik","name","label","options","addTo"];var Sr=Object(w.a)((function(e){return Object(S.a)({textField:{"& label.Mui-focused":{color:e.palette.primary.main},"& .MuiInput-underline:after":{borderBottomColor:e.palette.primary.main},"& label":{color:e.palette.neutral.emphasisText.medium},"& fieldset":{borderColor:e.palette.neutral.emphasisText.medium}},option:{fontSize:15,"& > span":{marginRight:10,fontSize:18}}})}));function kr(e){var t=e.formik,a=e.name,n=e.label,i=e.options,c=e.addTo,s=(Object(f.a)(e,wr),r.a.useState(null)),d=Object(l.a)(s,2),u=d[0],b=d[1];r.a.useEffect((function(){b(null)}),[a]);var h=Sr(),m=r.a.useState(""),j=Object(l.a)(m,2),p=j[0],O=j[1];Object(ne.a)().t;return Object(g.jsx)(qe.a,{style:{width:"100%"},options:i,classes:{option:h.option},defaultValue:{id:111,name:"name"},autoHighlight:!0,getOptionLabel:function(e){return e.name},getOptionSelected:function(e){return e.id===u.id},value:u,onChange:function(e,n){!function(e){var n=null!==e?e.code:"";t.setFieldValue(a,n),b(e),e&&c(e)}(n)},inputValue:p,onInputChange:function(e,t){O(t)},name:a,onBlur:t.handleBlur,renderOption:function(e){return Object(g.jsx)(r.a.Fragment,{children:Object(g.jsx)("span",{children:e.name})},e.id)},renderInput:function(e){return Object(g.jsx)(Ie.a,Object(o.a)(Object(o.a)({},e),{},{label:n,fullWidth:1,className:h.textField,inputProps:Object(o.a)(Object(o.a)({},e.inputProps),{},{autoComplete:"new-password"}),error:t.status||void 0!==t.errors[a],helperText:t.touched[a]&&t.errors[a]}))}})}var Cr=Object(w.a)((function(e){return{root:{height:"100%"},textBox:{width:"100%",border:"red"},chip:{margin:e.spacing(.5)},chips:{marginBottom:e.spacing(1)},in:{marginBottom:e.spacing(1),marginTop:e.spacing(2)},fab:{position:"absolute",bottom:e.spacing(4),right:e.spacing(4)},attach:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},card:{marginTop:e.spacing(1)}}}));var Nr=[{path:"students",component:function(e){Object.assign({},e);var t=mn(),a=Object(ne.a)().t,i=Object(n.useState)([]),c=Object(l.a)(i,2),d=c[0],u=c[1],b=Object(n.useState)(!1),h=Object(l.a)(b,2),m=h[0],j=h[1],p=Object(n.useState)(null),f=Object(l.a)(p,2),O=f[0],x=f[1],_=Re(),v=new URLSearchParams(window.location.search).get("id"),y=Ze(),w=Object(l.a)(y,2),S=w[0],k=w[1];Object(n.useEffect)((function(){null!==v&&void 0!==v&&x(v)}),[v]);var C=r.a.useContext(Tt);return Object(n.useEffect)((function(){null!==O&&j(!1)}),[O]),Object(g.jsxs)(ae.a,{container:!0,spacing:3,className:t.root,children:[Object(g.jsxs)(ae.a,{item:!0,xs:4,className:t.left,children:[Object(g.jsx)("h1",{children:a("students")}),Object(g.jsx)(hn,{setCurrentItemId:x,currentItemId:O,items:d,setItems:u,chips:[Object(g.jsx)(R.a,{title:a("export_contact_sheets"),"aria-label":a("export_contact_sheets"),children:Object(g.jsx)(Ga.a,{variant:"outlined",color:"primary",disabled:C.loading,size:"small",avatar:Object(g.jsx)(Jt.a,{children:"csv"}),label:a("export_all_plus"),onClick:function(){var e;C.loading||(C.startLoading(),(e=new Promise((function(e,t){yt()({url:"".concat(xe,"/api/").concat(Oe,"/files/god"),method:"POST",responseType:"blob",headers:Object(o.a)(Object(o.a)({},{Accept:"text/csv","Cache-Control":"no-cache"}),fe())}).then((function(t){var a=t.headers["content-disposition"].split("filename=")[1];null===a&&(a="export.zip");var n=window.URL.createObjectURL(new Blob([t.data])),r=document.createElement("a");r.href=n,r.setAttribute("download",a),document.body.appendChild(r),r.click(),r.remove(),e()})).catch((function(e){t(e)}))}))).then.apply(e,Object(s.a)(_({}))).finally((function(){C.stopLoading()})))}})})],usableFilters:[{name:"enrolment_status",defaultValue:null,options:[{label:"enrolled",tooltip:"only_enrolled",name:"enrolled"},{label:"pre-enrolled",tooltip:"only_preenrolled",name:"pre-enrolled"},{label:"early-unenrolled",tooltip:"only_earlyunenrolled",name:"early-unenrolled"}]},{name:"default_payment_method",defaultValue:null,options:[{label:"cash",tooltip:"only_cash",name:"cash"},{label:"bank-transfer",tooltip:"only_banktransfer",name:"bank-transfer"},{label:"bank-direct-debit",tooltip:"only_bankdirectdebit",name:"bank-direct-debit"}]}],defaultSearchBy:"full_name",searchByOptions:["full_name","id"],dataService:Se,searchBarLabel:"students"}),S([k.post])&&Object(g.jsx)(R.a,{title:a("new_student"),children:Object(g.jsx)(ln.a,{className:t.fab,color:"primary",onClick:function(e){x(null),j(!0)},children:Object(g.jsx)(un.a,{})})})]}),Object(g.jsx)(ae.a,{item:!0,xs:8,className:t.left,children:Object(g.jsx)(on,{currentStudentId:O,newStudent:m,setNewStudent:j,addStudentId:function(e){x(e)},deleteStudent:function(e){e===O&&x(null),u(d.filter((function(t){return t.id!==e})))}})})]})},title:"students",icon:V.a,needs:[Ye.students,Ye.get]},{path:"courses",component:function(e){Object.assign({},e);var t=vr(),a=Object(ne.a)().t,r=Object(n.useState)([]),i=Object(l.a)(r,2),c=i[0],s=i[1],o=Object(n.useState)(!1),d=Object(l.a)(o,2),u=d[0],b=d[1],h=Object(n.useState)(null),m=Object(l.a)(h,2),j=m[0],p=m[1],f=new URLSearchParams(window.location.search).get("id");Object(n.useEffect)((function(){null!==f&&void 0!==f&&p(f)}),[f]),Object(n.useEffect)((function(){null!==j&&b(!1)}),[j]);var O=Ze(),x=Object(l.a)(O,2),_=x[0],v=x[1];return Object(g.jsxs)(ae.a,{container:!0,spacing:3,className:t.root,children:[Object(g.jsxs)(ae.a,{item:!0,xs:4,className:t.left,children:[Object(g.jsx)("h1",{children:a("courses")}),Object(g.jsx)(hn,{setCurrentItemId:p,currentItemId:j,items:c,setItems:s,usableFilters:[{name:"is_published",defaultValue:null,options:[{label:"published",tooltip:"only_published",name:!0},{label:"private",tooltip:"only_private",name:!1}]}],defaultSearchBy:"name",searchByOptions:["name","id"],dataService:ka,searchBarLabel:"courses",displayNameField:"name"}),_([v.post])&&Object(g.jsx)(R.a,{title:a("new_course"),children:Object(g.jsx)(ln.a,{className:t.fab,color:"primary",onClick:function(e){p(null),b(!0)},children:Object(g.jsx)(un.a,{})})})]}),Object(g.jsx)(ae.a,{item:!0,xs:8,className:t.left,children:Object(g.jsx)(_r,{currentCourseId:j,newCourse:u,setNewCourse:b,addCourseId:function(e){p(e)},deleteCourse:function(e){e===j&&p(null),s(c.filter((function(t){return t.id!==e})))}})})]})},title:"courses",icon:K.a,needs:[Ye.courses,Ye.get]},{path:"teachers",component:function(e){Object.assign({},e);var t=rr(),a=Object(ne.a)().t,r=Object(n.useState)([]),i=Object(l.a)(r,2),c=i[0],s=i[1],o=Object(n.useState)(!1),d=Object(l.a)(o,2),u=d[0],b=d[1],h=Object(n.useState)(null),m=Object(l.a)(h,2),j=m[0],p=m[1],f=Ze(),O=Object(l.a)(f,2),x=O[0],_=O[1],v=new URLSearchParams(window.location.search).get("id");return Object(n.useEffect)((function(){null!==v&&void 0!==v&&p(v)}),[v]),Object(n.useEffect)((function(){null!==j&&b(!1)}),[j]),Object(g.jsxs)(ae.a,{container:!0,spacing:3,className:t.root,children:[Object(g.jsxs)(ae.a,{item:!0,xs:4,className:t.left,children:[Object(g.jsx)("h1",{children:a("teachers")}),Object(g.jsx)(hn,{setCurrentItemId:p,currentItemId:j,items:c,setItems:s,defaultSearchBy:"full_name",searchByOptions:["full_name","id"],dataService:_n,searchBarLabel:"teachers"}),x([_.post])&&Object(g.jsx)(R.a,{title:a("new_teacher"),children:Object(g.jsx)(ln.a,{className:t.fab,color:"primary",onClick:function(e){p(null),b(!0)},children:Object(g.jsx)(un.a,{})})})]}),Object(g.jsx)(ae.a,{item:!0,xs:8,className:t.left,children:Object(g.jsx)(nr,{currentTeacherId:j,newTeacher:u,setNewTeacher:b,addTeacherId:function(e){p(e)},deleteTeacher:function(e){e===j&&p(null),s(c.filter((function(t){return t.id!==e})))}})})]})},title:"teachers",icon:Z.a,needs:[Ye.teachers,Ye.get]},{path:"rooms",component:function(e){Object.assign({},e);var t=Hn(),a=Object(ne.a)().t,r=Object(n.useState)([]),i=Object(l.a)(r,2),c=i[0],s=i[1],o=Object(n.useState)(!1),d=Object(l.a)(o,2),u=d[0],b=d[1],h=Object(n.useState)(null),m=Object(l.a)(h,2),j=m[0],p=m[1],f=new URLSearchParams(window.location.search).get("id");Object(n.useEffect)((function(){null!==f&&void 0!==f&&p(f)}),[f]),Object(n.useEffect)((function(){null!==j&&b(!1)}),[j]);var O=Ze(),x=Object(l.a)(O,2),_=x[0],v=x[1];return Object(g.jsxs)(ae.a,{container:!0,spacing:3,className:t.root,children:[Object(g.jsxs)(ae.a,{item:!0,xs:4,className:t.left,children:[Object(g.jsx)("h1",{children:a("rooms")}),Object(g.jsx)(hn,{setCurrentItemId:p,currentItemId:j,items:c,setItems:s,defaultSearchBy:"name",displayNameField:"name",searchByOptions:["name","id"],dataService:Dn,searchBarLabel:"rooms"}),_([v.post])&&Object(g.jsx)(R.a,{title:a("new_room"),children:Object(g.jsx)(ln.a,{className:t.fab,color:"primary",onClick:function(e){p(null),b(!0)},children:Object(g.jsx)(un.a,{})})})]}),Object(g.jsx)(ae.a,{item:!0,xs:8,className:t.left,children:Object(g.jsx)(Wn,{currentRoomId:j,newRoom:u,setNewRoom:b,addRoomId:function(e){p(e)},deleteRoom:function(e){e===j&&p(null),s(c.filter((function(t){return t.id!==e})))}})})]})},title:"rooms",icon:H.a,needs:[Ye.rooms,Ye.get]},{path:"payments",component:function(e){Object.assign({},e);var t=En(),a=Object(ne.a)().t,n=Re(),i=r.a.useContext(Tt);return Object(g.jsxs)("div",{children:[Object(g.jsx)("h1",{children:a("payments")}),Object(g.jsxs)(F.a,{className:t.list,children:[Object(g.jsxs)(E.a,{button:!0,onClick:function(){var e;i.loading||(i.startLoading(),(e=ft.downloadCsv(null,null,"*",null)).then.apply(e,Object(s.a)(n({}))).finally((function(){i.stopLoading()})))},children:[Object(g.jsx)(Ta.a,{children:Object(g.jsx)(Jt.a,{className:t.avatar,children:"csv"})}),Object(g.jsx)(M.a,{id:"name",primary:a("export_all")})]}),Object(g.jsx)(P.a,{})]})]})},title:"payments",icon:X.a,needs:[Ye.payments,Ye.get]},{path:"users",component:function(e){Object.assign({},e);var t=Fn(),a=Object(ne.a)().t,i=Object(n.useState)([]),c=Object(l.a)(i,2),o=c[0],d=c[1],u=Object(n.useState)(null),b=Object(l.a)(u,2),h=b[0],m=b[1],j=r.a.useState(!1),p=Object(l.a)(j,2),f=p[0],O=p[1],x=Ze(),_=Object(l.a)(x,2),v=_[0],y=_[1],w=function(){O(!1)},S=new URLSearchParams(window.location.search).get("id");Object(n.useEffect)((function(){null!==S&&void 0!==S&&m(S)}),[S]);var k=Re(),C=Object(Me.a)({initialValues:{email:"",needs:[]},validationSchema:ke.d({email:dt(a)}),enableReinitialize:!0,onSubmit:function(e,t){var a,n=t.setStatus,r=t.setSubmitting;r(!0),(a=fn.inviteUser(e.email,e.role_id)).then.apply(a,Object(s.a)(k({snackbarSuccess:!0}))).then((function(e){w()})).catch((function(e){n(!0)})).finally((function(){r(!1)}))}});return Object(g.jsxs)(ae.a,{container:!0,spacing:3,className:t.root,children:[Object(g.jsxs)(Oa.a,{open:f,onClose:w,"aria-labelledby":"form-dialog-title",children:[Object(g.jsx)(xa.a,{id:"form-dialog-title",children:a("invite_user")}),Object(g.jsxs)("form",{onSubmit:C.handleSubmit,children:[Object(g.jsxs)(jn.a,{children:[Object(g.jsx)(Ie.a,{autoFocus:!0,margin:"dense",id:"email",name:"email",label:a("email"),type:"email",fullWidth:!0,value:C.values.email,onChange:C.handleChange,onBlur:C.handleBlur,error:C.status||void 0!==C.errors.email,helperText:C.touched.email&&C.errors.email}),Object(g.jsx)(le.a,{my:2,className:t.dialog,children:Object(g.jsx)(le.a,{className:[t.line,t.composite],children:Object(g.jsx)(pn,{formik:C})})})]}),Object(g.jsxs)(ta.a,{children:[Object(g.jsx)(De.a,{onClick:w,color:"primary",children:a("cancel")}),Object(g.jsx)(De.a,{type:"submit",color:"primary",disabled:C.isSubmitting,children:a("invite")})]})]})]}),Object(g.jsxs)(ae.a,{item:!0,xs:4,className:t.left,children:[Object(g.jsx)("h1",{children:a("users")}),Object(g.jsx)(hn,{setCurrentItemId:m,currentItemId:h,items:o,setItems:d,defaultSearchBy:"full_name",searchByOptions:["full_name","id"],dataService:On,searchBarLabel:"users"}),v([y.invite_users])&&Object(g.jsx)(R.a,{title:a("new_user"),children:Object(g.jsx)(ln.a,{className:t.fab,color:"primary",onClick:function(){O(!0)},children:Object(g.jsx)(ue.a,{})})})]}),Object(g.jsx)(ae.a,{item:!0,xs:8,className:t.left,children:Object(g.jsx)(Pn,{currentUserId:h,deleteUser:function(e){e===h&&m(null),d(o.filter((function(t){return t.id!==e})))}})})]})},title:"users",icon:te.a,needs:[Ye.users,Ye.get]},{path:"email",component:function(e){Object.assign({},e);var t=Cr(),a=Object(ne.a)().t,i=Object(n.useState)([]),c=Object(l.a)(i,2),o=c[0],d=c[1],u=Object(n.useState)([]),b=Object(l.a)(u,2),h=b[0],m=b[1],j=Object(n.useState)([]),f=Object(l.a)(j,2),O=f[0],x=f[1],_=r.a.useContext(Tt),v=r.a.useContext(p),y=Re(),w=Object(Me.a)({initialValues:{emailPreference:"resolved",studentEnrolmentStatus:"enrolled"},validationSchema:ke.d({email:dt(a)}),enableReinitialize:!0,onSubmit:function(e,t){t.setStatus;(0,t.setSubmitting)(!0)}});return Object(n.useEffect)((function(){var e;(e=ka.getAll(null,"*",["id","name"])).then.apply(e,Object(s.a)(y({}))).then((function(e){d(e.data)}))}),[]),Object(g.jsxs)("div",{children:[Object(g.jsx)("h1",{children:a("email")}),Object(g.jsxs)(le.a,{className:t.chips,children:[a("to"),": ",h.length>0?h.map((function(e){return Object(g.jsx)(R.a,{title:a("delete"),children:Object(g.jsx)(Ga.a,{variant:"outlined",color:"primary",className:t.chip,size:"small",avatar:Object(g.jsx)(Jt.a,{children:"G"}),label:e.name,onClick:function(){var t;t=e.id,m(h.filter((function(e){return e.id!==t})))}})})})):" - "]}),Object(g.jsxs)(Ie.a,{className:t.in,label:a("use_emails"),style:{width:"100%"},value:void 0===w.values.emailPreference?"":w.values.emailPreference,onChange:w.handleChange,onBlur:w.handleBlur,error:w.status||void 0!==w.errors.emailPreference,helperText:w.touched.emailPreference&&w.errors.emailPreference,name:"emailPreference",select:!0,children:[Object(g.jsx)(be.a,{value:"contacts",children:a("contacts")}),Object(g.jsx)(be.a,{value:"resolved",children:a("resolved")}),Object(g.jsx)(be.a,{value:"student",children:a("student")}),Object(g.jsx)(be.a,{value:"all",children:a("all")})]}),Object(g.jsxs)(Ie.a,{className:t.in,label:a("status"),style:{width:"100%"},value:void 0===w.values.studentEnrolmentStatus?"":w.values.studentEnrolmentStatus,onChange:w.handleChange,onBlur:w.handleBlur,error:w.status||void 0!==w.errors.studentEnrolmentStatus,helperText:w.touched.studentEnrolmentStatus&&w.errors.studentEnrolmentStatus,name:"studentEnrolmentStatus",select:!0,children:[Object(g.jsx)(be.a,{value:"enrolled",children:a("enrolled")}),Object(g.jsx)(be.a,{value:"pre-enrolled",children:a("pre-enrolled")}),Object(g.jsx)(be.a,{value:"early-unenrolled",children:a("early-unenrolled")}),Object(g.jsx)(be.a,{value:null,children:a("all")})]}),Object(g.jsx)(kr,{formik:w,style:{width:"100%"},options:o.filter((function(e){return!h.includes(e)})),addTo:function(e){m([].concat(Object(s.a)(h),[e]))},name:"courses",label:a("courses")}),Object(g.jsx)(Ie.a,{className:t.in,label:a("subject"),style:{width:"100%"},value:void 0===w.values.subject?"":w.values.subject,onChange:w.handleChange,onBlur:w.handleBlur,error:w.status||void 0!==w.errors.subject,helperText:w.touched.subject&&w.errors.subject,name:"subject"}),Object(g.jsx)(Ie.a,{className:t.textBox,multiline:!0,rows:16,value:void 0===w.values.body?"":w.values.body,onChange:w.handleChange,onBlur:w.handleBlur,error:w.status||void 0!==w.errors.body,helperText:w.touched.body&&w.errors.body,name:"body"}),Object(g.jsxs)("div",{children:[(console.log("sfs",O),O.map((function(e){return Object(g.jsx)(Kt.a,{className:t.card,children:Object(g.jsx)(Wt.a,{action:Object(g.jsx)(R.a,{title:a("delete"),"aria-label":a("delete"),children:Object(g.jsx)(N.a,{onClick:function(t){x(O.filter((function(t){return t!==e})))},children:Object(g.jsx)(xt.a,{})})}),titleTypographyProps:{variant:"subheading"},title:e.name})})}))),Object(g.jsx)("input",{style:{display:"none"},id:"contained-button-file",type:"file",multiple:!0,onChange:function(e){x(Object(s.a)(e.target.files))}}),Object(g.jsx)("label",{htmlFor:"contained-button-file",children:Object(g.jsx)(De.a,{className:t.attach,variant:"contained",color:"primary",component:"span",children:a("upload")})})]}),Object(g.jsx)(R.a,{title:a("send_email"),children:Object(g.jsx)(ln.a,{className:t.fab,color:"primary",onClick:function(){_.loading||w.isSubmitting||v.confirm("send_bulk_email","send_bulk_email_description",(function(){var e;_.startLoading(),w.setSubmitting(!0),(e=yr.bulkSend(h.map((function(e){return e.id})),w.values.subject,w.values.body,w.values.emailPreference,w.values.studentEnrolmentStatus,O)).then.apply(e,Object(s.a)(y({snackbarSuccess:!0}))).finally((function(){w.setSubmitting(!1),_.stopLoading()}))}))},disabled:w.isSubmitting||0===h.length,children:Object(g.jsx)(_t.a,{})})})]})},title:"email",icon:$.a,needs:[Ye.send_email,Ye.get]}],Ir=a(70),Tr=a(290),Ar=a.n(Tr),qr=a(292),Br=a.n(qr),Pr=a(310),Fr=a(66),Er={login:function(e,t,a){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return new Promise((function(r,i){yt()({url:"".concat(xe,"/auth/v1/login?totp=").concat(a,"&rememberMe=").concat(n?1:0),method:"POST",auth:{username:e,password:t},headers:Object(o.a)(Object(o.a)({},{"Cache-Control":"no-cache"}),fe())}).then((function(e){r({logged:!0,needs:e.data})})).catch((function(e){try{401===e.response.status&&r({logged:!1})}catch(t){}i(e)}))}))},logout:function(){return new Promise((function(e,t){yt()({url:"".concat(xe,"/auth/v1/logout"),method:"GET",headers:Object(o.a)(Object(o.a)({},{"Cache-Control":"no-cache"}),fe())}).then((function(t){e(!1)})).catch((function(e){t(e)}))}))},ping:function(){return new Promise((function(e,t){yt()({url:"".concat(xe,"/auth/v1/ping"),method:"GET",headers:{"Cache-Control":"no-cache"}}).then((function(t){e({isLoggedIn:!0,needs:t.data})})).catch((function(a){try{401===a.response.status&&e({isLoggedIn:!1,needs:null})}catch(n){}t(a)}))}))}};var Dr=a(289),Rr=a.n(Dr),Mr=a(131),Lr=a(285),Gr=a(286),zr=a(287),Vr=a(288),Ur=["cat"],Kr={eng:{translation:zr},cat:{translation:Vr}};Fr.a.use(Lr.a).use(Gr.a).use(Mr.e).init({resources:Kr,fallbackLng:Ur,detection:{checkWhitelist:!0},debug:!1,whitelist:["eng","cat"],interpolation:{escapeValue:!1}}).then((function(e){return{}}));Fr.a;var Wr=function(){return localStorage.getItem("i18nextLng")||Ur};function Hr(e){var t=Object.assign({},e),a=Object(ne.a)().t,n=Wr();return Object(g.jsx)(R.a,Object(o.a)(Object(o.a)({title:a("cat"===n?"use_eng":"use_cat"),style:{float:"right"}},t),{},{children:Object(g.jsx)(N.a,{color:"inherit",onClick:function(){Fr.a.changeLanguage("eng"===Wr()?"cat":"eng").then()},"aria-label":a("cat"===n?"use_eng":"use_cat"),children:Object(g.jsx)(Rr.a,{})})}))}var Yr=a(160),Zr=a.n(Yr);function Jr(e){var t=Object.assign({},e),a=r.a.useContext(Va),n=Object(ne.a)().t;return Object(g.jsx)(R.a,Object(o.a)(Object(o.a)({title:a.theme?n("use_light"):n("use_dark"),style:{float:"right"}},t),{},{children:Object(g.jsx)(N.a,{color:"inherit","aria-label":a.theme?n("use_light"):n("use_dark"),onClick:a.switchTheme,children:Object(g.jsx)(Zr.a,{})})}))}var Xr=a(291),Qr=a.n(Xr),$r=a(205),ei=a.n($r);function ti(e){var t=Object.assign({},e),a=Object(ne.a)().t,n=Object(O.g)();return Object(g.jsx)(R.a,Object(o.a)(Object(o.a)({title:a("teacher_dashboard"),style:{float:"right"}},t),{},{children:Object(g.jsx)(N.a,{color:"inherit",onClick:function(){return n.replace("/teacher-dashboard")},"aria-label":a("teacher_dashboard"),"aria-haspopup":"false",children:Object(g.jsx)(ei.a,{})})}))}var ai={eng:{label:"english",dir:"ltr",active:!0},cat:{label:"catal\xe0",dir:"ltr",active:!1}},ni=Object(w.a)((function(e){return Object(S.a)({toolbar:Object(o.a)({display:"flex",alignItems:"center",justifyContent:"flex-end",padding:e.spacing(0,1)},e.mixins.toolbar),grow:{flexGrow:1}})})),ri=Object(O.j)((function(e){Object(O.g)();var t,a=ni(),i=Re(),c=localStorage.getItem("i18nextLng")||"eng",o=Object(ne.a)().t,d=r.a.useState(null),u=Object(l.a)(d,2),b=u[0],h=u[1],m=Boolean(b),j=function(){h(null)},p=r.a.useState(null),f=Object(l.a)(p,2),_=f[0],v=f[1],w=Boolean(_),S=function(){v(null)};r.a.useEffect((function(){document.body.dir=ai[c].dir}),[_,c]);var k=Object(g.jsx)(Pr.a,{anchorEl:_,anchorOrigin:{vertical:"top",horizontal:"right"},id:"primary-language-select-menu",keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:w,onClose:S,children:null===(t=Object.keys(ai))||void 0===t?void 0:t.map((function(e){return Object(g.jsx)(be.a,{onClick:function(){return t=e,Fr.a.changeLanguage(t).then(),void S();var t},children:ai[e].label},e)}))}),I=Object(n.useContext)(x),T="primary-search-account-menu",A=Object(g.jsx)(Pr.a,{anchorEl:b,anchorOrigin:{vertical:"top",horizontal:"right"},id:T,keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:m,onClose:j,children:Object(g.jsx)(be.a,{onClick:function(e){var t;(t=Er.logout()).then.apply(t,Object(s.a)(i({}))).then((function(){I.setUser({logged:!1,ping:!1})})),j()},children:o("log_out")})});return Object(g.jsxs)(Na.a,{children:[Object(g.jsx)(N.a,{color:"inherit","aria-label":o("open_drawer"),onClick:e.handleDrawerOpen,edge:"start",className:Object(C.a)(a.menuButton,Object(y.a)({},a.hide,e.open)),children:Object(g.jsx)(Ar.a,{})}),Object(g.jsx)(Rt.a,{variant:"h6",noWrap:!0,children:"centr\xedfuga4"}),Object(g.jsx)("div",{className:a.grow}),Object(g.jsx)(ti,{}),Object(g.jsx)(R.a,{title:o("docs"),children:Object(g.jsx)(N.a,{color:"inherit",onClick:function(){return window.open("https://miquelvir.github.io/centrifuga4/","_blank")},"aria-label":o("docs"),"aria-haspopup":"false",children:Object(g.jsx)(Qr.a,{})})}),Object(g.jsx)(Hr,{}),Object(g.jsx)(Jr,{}),Object(g.jsx)(R.a,{title:o("my_account"),children:Object(g.jsx)(N.a,{color:"inherit",onClick:function(e){h(e.currentTarget)},"aria-label":o("my_account"),"aria-controls":T,"aria-haspopup":"true",children:Object(g.jsx)(Br.a,{})})}),k,A]})})),ii=a(316),ci=a(584),si=240,oi=Object(w.a)((function(e){return Object(S.a)({root:{display:"flex",height:"100vh"},appBar:{zIndex:e.zIndex.drawer+1,transition:e.transitions.create(["width","margin"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),background:e.palette.neutral.main,color:e.palette.neutral.emphasisText.medium},appBarShift:{marginLeft:si,width:"calc(100% - ".concat(si,"px)"),transition:e.transitions.create(["width","margin"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen})},menuButton:{marginRight:36},hide:{display:"none"},drawer:{width:si,flexShrink:0,whiteSpace:"nowrap"},drawerOpen:{width:si,transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen})},drawerClose:Object(y.a)({transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),overflowX:"hidden",width:e.spacing(7)+1},e.breakpoints.up("sm"),{width:e.spacing(9)+1}),backdrop:{zIndex:e.zIndex.drawer+1,color:"#fff"},toolbar:Object(o.a)({display:"flex",alignItems:"center",justifyContent:"flex-end",padding:e.spacing(0,1)},e.mixins.toolbar),content:{display:"flex",flexFlow:"column",height:"100%",width:"100%",overflow:"auto"},main:{flex:1,padding:e.spacing(3),overflow:"auto"},icon:{"&":{color:e.palette.neutral.emphasisText.medium}},selectedIcon:{"&":{color:e.palette.primary.main}},grow:{flexGrow:1}})})),li=function(e){var t,a,n=G()(),i=oi(),c=e.baseRouter,s=Object(ne.a)().t,o=r.a.useState(!1),u=Object(l.a)(o,2),b=u[0],h=u[1],m=(Object(O.i)(),Object(O.h)().pathname),j=Ze(),p=Object(l.a)(j,2),f=p[0],x=(p[1],function(){h(!1)}),_=r.a.useState(!1),v=Object(l.a)(_,2),w=v[0],S=v[1],T=r.a.createRef(),q=Object(O.g)();return Object(g.jsxs)("div",{className:i.root,children:[Object(g.jsx)(d.a,{}),Object(g.jsxs)(Tt.Provider,{value:{loading:w,startLoading:function(){S(!0)},stopLoading:function(){S(!1)}},children:[Object(g.jsx)(k.a,{position:"fixed",className:Object(C.a)(i.appBar,Object(y.a)({},i.appBarShift,b)),children:Object(g.jsx)(ri,{routerRef:c,changeTheme:e.changeTheme,handleDrawerOpen:function(){h(!0)},handleDrawerClose:x,open:b})}),Object(g.jsx)(O.d,{ref:T,children:Object(g.jsxs)(ga.Provider,{value:{currentTab:m,goTo:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;null===t?q.replace("/home/".concat(e)):q.replace("/home/".concat(e,"?id=").concat(t))}},children:[Object(g.jsxs)(I.a,{variant:"permanent",className:Object(C.a)(i.drawer,(t={},Object(y.a)(t,i.drawerOpen,b),Object(y.a)(t,i.drawerClose,!b),t)),classes:{paper:Object(C.a)((a={},Object(y.a)(a,i.drawerOpen,b),Object(y.a)(a,i.drawerClose,!b),a))},children:[Object(g.jsx)("div",{className:i.toolbar,children:Object(g.jsx)(N.a,{onClick:x,children:"rtl"===n.direction?Object(g.jsx)(A.a,{}):Object(g.jsx)(B.a,{})})}),Object(g.jsx)(P.a,{}),Object(g.jsx)(F.a,{children:Nr.filter((function(e){return f(e.needs)})).map((function(e){return Object(g.jsxs)(E.a,{to:e.path,button:!0,component:Ir.b,children:[Object(g.jsx)(D.a,{className:"/home/".concat(e.path)===m?i.selectedIcon:i.icon,children:Object(g.jsx)(R.a,{title:s(e.title),"aria-label":s(e.title),children:Object(g.jsx)(e.icon,{})})}),Object(g.jsx)(M.a,{primary:s(e.title)})]},e.title)}))})]}),Object(g.jsxs)("div",{className:i.content,children:[Object(g.jsx)("div",{className:i.toolbar}),Object(g.jsxs)("main",{className:i.main,children:[Object(g.jsx)(O.b,{exact:!0,path:"/home/",children:Object(g.jsx)(O.a,{to:"/home/students"})}),Nr.filter((function(e){return f(e.needs)})).map((function(e){return Object(g.jsx)(O.b,{path:"/home/".concat(e.path),component:e.component},e.title)}))]})]})]})}),Object(g.jsx)(ii.a,{className:i.backdrop,open:w,onClick:function(){S(!1)},children:Object(g.jsx)(ci.a,{color:"inherit"})})]})]})},di=a(586),ui={reset:function(e,t,a,n){return new Promise((function(r,i){yt()({url:"".concat(xe,"/password-reset/v1/redeem"),method:"POST",data:{email:e,password:t,token:a,recaptcha:n},headers:Object(o.a)(Object(o.a)({},{"Cache-Control":"no-cache"}),fe())}).then((function(e){r(!0)})).catch((function(e){i(e)}))}))},startReset:function(e,t){return new Promise((function(a,n){yt()({url:"".concat(xe,"/password-reset/v1/request"),method:"POST",data:{email:e,recaptcha:t},headers:Object(o.a)(Object(o.a)({},{"Cache-Control":"no-cache"}),fe())}).then((function(e){a(!0)})).catch((function(e){n(e)}))}))}};var bi=function(e){return Object(n.useEffect)((function(){return e()}),[])},hi=a(110),mi=a(585),ji=Object(w.a)((function(e){var t;return{root:{display:"flex",flexGrow:1,height:"100vh"},field:{width:"100%",margin:"5px"},details:{width:"100%",display:"flex",verticalAlign:"middle"},paper:(t={height:"50%"},Object(y.a)(t,e.breakpoints.up("md"),{minWidth:"500px",width:"50%"}),Object(y.a)(t,e.breakpoints.down("md"),{width:"100%"}),Object(y.a)(t,"margin","auto"),Object(y.a)(t,"padding","50px"),t),reset:{width:"100%",textAlign:"end",cursor:"",display:"flex",flexDirection:{xs:"column",md:"row"},verticalAlign:"middle"},remember:{width:"100%",textAlign:"start",cursor:"",verticalAlign:"middle"}}})),pi=function(e){var t=ji(),a=r.a.useContext(x),n=r.a.useContext(Va),i=Object(mi.a)("(max-width:960px)"),c=r.a.useState(null),o=Object(l.a)(c,2),d=o[0],u=o[1],b=r.a.useState(!1),h=Object(l.a)(b,2),m=h[0],p=h[1];var f=Re(),O=Object(j.b)().enqueueSnackbar,_=function(t){var n=a.setUser,r=a.setNeeds,i=a.setTeacher;n({logged:!0,ping:!0}),r(t.needs),i(t.teacher);var c=(e.location.state||{from:{pathname:"/home/students"}}).from;e.history.push(c)},v=Object(ne.a)().t,y=Object(Me.a)({initialValues:{username:"",password:"",totp:"",rememberMe:!1},validationSchema:ke.d({username:lt(v),password:ke.f().required(v("password_required")),totp:ke.f().required(v("2FA_needed")).test("len",v("2FA_6digits"),(function(e){return 6===(void 0===e?"":e).toString().length})).test("digits",v("2FA_invalid"),(function(e){return!!Number(e)}))}),enableReinitialize:!0,onSubmit:function(e,t){var a,n=e.username,r=e.password,i=e.totp,c=e.rememberMe,o=t.setStatus,l=t.setSubmitting;o(),(a=Er.login(n,r,i,c)).then.apply(a,Object(s.a)(f({handle401:!1}))).then((function(e){e.logged?_(e.needs):o(!0)})).finally((function(){l(!1)}))}});bi((function(){if(a.user.logged)return e.history.push("/home/students"),null;var t;!1!==a.user.ping&&(t=Er.ping()).then.apply(t,Object(s.a)(f({}))).then((function(e){e.isLoggedIn&&_(e.needs)}))}));return Object(g.jsx)("div",{className:t.root,children:Object(g.jsxs)(ae.a,{container:!0,children:[!i&&Object(g.jsx)(ae.a,{xs:2,item:!0}),Object(g.jsx)(ae.a,{xs:i?12:8,item:!0,children:Object(g.jsx)(ae.a,{container:!0,spacing:0,align:"center",justify:"center",direction:"column",style:{height:"100%"},children:Object(g.jsx)(ae.a,{item:!0,children:Object(g.jsxs)(le.a,{m:2,children:[i&&Object(g.jsxs)(g.Fragment,{children:[Object(g.jsx)(Hr,{style:{float:"right"}}),Object(g.jsx)(Jr,{style:{float:"right"}})," "]}),Object(g.jsxs)(re.a,{className:t.paper,children:[Object(g.jsx)("img",{src:"".concat(_e,"/logo_centrifuga4_").concat(n.label,".svg"),alt:"Logo Centr\xedfuga",style:{height:"85px"}}),Object(g.jsxs)("form",{onSubmit:y.handleSubmit,children:[Object(g.jsx)(Ie.a,{label:v("email"),disabled:y.isSubmitting,helperText:y.touched.username&&y.errors.username,type:"email",name:"username",className:t.field,value:y.values.username,onChange:y.handleChange,onBlur:y.handleBlur,error:y.status}),Object(g.jsx)(Ie.a,{label:v("password"),name:"password",type:"password",helperText:y.touched.password&&y.errors.password,className:t.field,value:y.values.password,disabled:y.isSubmitting,onChange:y.handleChange,onBlur:y.handleBlur,error:y.status}),Object(g.jsx)(Ie.a,{label:v("2FA_code"),name:"totp",type:"password",helperText:y.touched.totp&&y.errors.totp,className:t.field,value:y.values.totp,disabled:y.isSubmitting,onChange:y.handleChange,onBlur:y.handleBlur,error:y.status}),Object(g.jsx)(le.a,{my:3,children:Object(g.jsx)(De.a,{variant:"contained",color:"primary",type:"submit",disabled:y.isSubmitting,className:t.field,children:v("log_in")})}),Object(g.jsxs)(le.a,{my:1,className:t.details,children:[Object(g.jsxs)("div",{className:t.remember,children:[Object(g.jsx)(Cn.a,{name:"rememberMe",value:y.values.rememberMe,onChange:y.handleChange,onBlur:y.handleBlur,error:y.status,helperText:y.touched.rememberMe&&y.errors.rememberMe,checked:y.values.rememberMe}),Object(g.jsx)(Rt.a,{variant:"caption",children:v("rememberMe")})]}),Object(g.jsx)("div",{className:t.resetPa,children:Object(g.jsx)(Rt.a,{className:t.reset,variant:"caption",children:Object(g.jsx)(di.a,{component:"button",variant:"body2",onClick:function(){p(!0)},style:{verticalAlign:"middle"},children:v("reset_password")})})})]})]}),m&&Object(g.jsxs)("div",{children:[Object(g.jsx)(hi.a,{sitekey:ge,onChange:function(e){u(e)},theme:n.theme?"dark":"light",className:t.recaptcha}),Object(g.jsx)(le.a,{my:3,children:Object(g.jsx)(De.a,{variant:"contained",color:"primary",onClick:function(){var e,t=y.values.username;null===t||""===t||void 0===t?O(v("username_required_password_reset"),{variant:"warning"}):(e=ui.startReset(t,d)).then.apply(e,Object(s.a)(f({}))).then((function(e){p(!1),O(v("started_password_reset"),{variant:"success"})}))},disabled:null===d,className:t.field,children:v("reset_password")})})]})]})]})})})}),!i&&Object(g.jsxs)(ae.a,{xs:2,item:!0,children:[Object(g.jsx)(Hr,{style:{float:"right"}}),Object(g.jsx)(Jr,{style:{float:"right"}})]})]})})},fi={signup:function(e,t,a,n,r,i,c){return new Promise((function(e,s){yt()({url:"".concat(xe,"/user-invites/v1/redeem"),method:"POST",data:{password:t,email:a,name:n,surname1:r,surname2:i,token:c},headers:Object(o.a)(Object(o.a)({},{"Cache-Control":"no-cache"}),fe())}).then((function(t){e(t.data)})).catch((function(e){s(e)}))}))}};var Oi=a(295),xi=a.n(Oi),gi=Object(w.a)((function(e){return{root:{display:"flex",flexGrow:1,height:"100vh"},field:{width:"100%",margin:"5px"},paper:{width:"50%",minWidth:"500px",height:"50%",padding:"50px",margin:"auto"}}})),_i=function(e){var t=gi(),a=r.a.useContext(Va),i=Object(j.b)().enqueueSnackbar,c=Object(n.useState)(0),o=Object(l.a)(c,2),d=o[0],u=o[1],b=Object(n.useState)(null),h=Object(l.a)(b,2),m=h[0],f=h[1],O=r.a.useContext(p);bi((function(){Fr.a.changeLanguage(v.get("lan")).then()}));var x=Object(ne.a)().t,_=Re(),v=new URLSearchParams(window.location.search),y=v.get("token"),w=v.get("email"),S=Object(Me.a)({initialValues:{username:w,email:w,password:"",name:"",surname1:"",surname2:"",password2:""},validationSchema:ke.d({username:lt(x),email:dt(x),password:it(x),password2:ct(x),name:ke.f().required(x("name_required")),surname1:ke.f().required(x("surname1_required")),surname2:ke.f().required(x("surname2_required"))}),enableReinitialize:!0,onSubmit:function(e,t){var a,n=e.username,r=e.email,c=e.password,o=e.name,l=e.surname1,d=e.surname2,b=(e.password2,t.setStatus),h=t.setSubmitting;b(),(a=fi.signup(n,c,r,o,l,d,y)).then.apply(a,Object(s.a)(_({handle401:!1,handle400:!1}))).then((function(e){i(x("sign_up_success"),{variant:"success"}),h(!1),u(1),f(e.totp)}),(function(e){h(!1),b(e),401===e.response.status?i(x("invalid_expired_invite"),{variant:"warning"}):400===e.response.status&&i(x("used_invite"),{variant:"warning"})}))}});return Object(g.jsx)("div",{className:t.root,children:Object(g.jsxs)(ae.a,{container:!0,children:[Object(g.jsx)(ae.a,{xs:2,item:!0}),Object(g.jsx)(ae.a,{xs:8,item:!0,children:Object(g.jsx)(ae.a,{container:!0,spacing:0,align:"center",justify:"center",direction:"column",style:{height:"100%"},children:Object(g.jsx)(ae.a,{item:!0,children:Object(g.jsx)(le.a,{m:2,children:Object(g.jsxs)(re.a,{className:t.paper,children:[Object(g.jsx)("img",{src:"".concat(_e,"/logo_centrifuga4_").concat(a.label,".svg"),alt:"Logo Centr\xedfuga",style:{height:"85px"}}),0===d&&Object(g.jsxs)(r.a.Fragment,{children:[Object(g.jsx)(le.a,{m:2,children:Object(g.jsx)(Rt.a,{children:x("been_invited")})}),Object(g.jsxs)("form",{onSubmit:S.handleSubmit,children:[Object(g.jsx)(Ie.a,{label:x("email"),helperText:S.touched.email&&S.errors.email,type:"email",name:"email",className:t.field,value:S.values.email,onChange:S.handleChange,onBlur:S.handleBlur,error:S.status,disabled:!0}),Object(g.jsx)(Ie.a,{label:x("name"),helperText:S.touched.name&&S.errors.name,name:"name",className:t.field,value:S.values.name,onChange:S.handleChange,disabled:S.isSubmitting,onBlur:S.handleBlur,error:S.status}),Object(g.jsx)(Ie.a,{label:x("surname1"),helperText:S.touched.surname1&&S.errors.surname1,name:"surname1",disabled:S.isSubmitting,className:t.field,value:S.values.surname1,onChange:S.handleChange,onBlur:S.handleBlur,error:S.status}),Object(g.jsx)(Ie.a,{label:x("surname2"),helperText:S.touched.surname2&&S.errors.surname2,name:"surname2",disabled:S.isSubmitting,className:t.field,value:S.values.surname2,onChange:S.handleChange,onBlur:S.handleBlur,error:S.status}),Object(g.jsx)(Ie.a,{label:x("password"),name:"password",type:"password",helperText:S.touched.password&&S.errors.password,className:t.field,value:S.values.password,disabled:S.isSubmitting,onChange:S.handleChange,onBlur:S.handleBlur,error:S.status,autoComplete:"new-password"}),Object(g.jsx)(Ie.a,{label:x("confirm_password"),name:"password2",type:"password",helperText:S.touched.password2&&S.errors.password2,className:t.field,value:S.values.password2,disabled:S.isSubmitting,onChange:S.handleChange,onBlur:S.handleBlur,error:S.status,autoComplete:"new-password"}),Object(g.jsx)(le.a,{my:3,children:Object(g.jsx)(De.a,{variant:"contained",color:"primary",type:"submit",disabled:S.isSubmitting||!(S.isValid&&S.dirty),className:t.field,children:x("sign_up")})})]})]}),1===d&&Object(g.jsxs)(r.a.Fragment,{children:[Object(g.jsx)(le.a,{m:2,children:Object(g.jsx)(Rt.a,{children:x("setup_2FA")})}),Object(g.jsx)(le.a,{m:2,children:Object(g.jsxs)("ul",{style:{textAlign:"left"},children:[Object(g.jsx)("li",{children:Object(g.jsx)(Rt.a,{variant:"body2",children:x("2FA_tip1")})}),Object(g.jsx)("li",{children:Object(g.jsx)(Rt.a,{variant:"body2",children:x("2FA_tip2")})}),Object(g.jsx)("li",{children:Object(g.jsx)(Rt.a,{variant:"body2",children:x("2FA_tip3")})})]})}),Object(g.jsx)(le.a,{m:4,children:null!==m&&Object(g.jsx)(xi.a,{value:m,size:"125"})}),Object(g.jsx)(le.a,{m:1,style:{textAlign:"right"},children:Object(g.jsx)(di.a,{variant:"overline",href:"https://miquelvir.github.io/centrifuga4/docs/how-tos/2FA",target:"_blank",children:x("learn_how_2FA")})}),Object(g.jsx)(le.a,{my:3,children:Object(g.jsx)(De.a,{variant:"contained",color:"primary",onClick:function(){console.log("click"),O.confirm("title_2fa_continue","description_2fa_continue",(function(){e.history.push("/login")}))},className:t.field,children:x("continue")})})]})]})})})})}),Object(g.jsxs)(ae.a,{xs:2,item:!0,children:[Object(g.jsx)(Hr,{style:{float:"right"}}),Object(g.jsx)(Jr,{style:{float:"right"}})]})]})})},vi=Object(w.a)((function(e){return{root:{display:"flex",flexGrow:1,height:"100vh"},field:{width:"100%",margin:"5px"},recaptcha:{margin:e.spacing(3)},paper:{width:"50%",minWidth:"500px",height:"50%",padding:"50px",margin:"auto"}}})),yi=function(e){var t=vi(),a=r.a.useContext(Va),n=r.a.useState(null),i=Object(l.a)(n,2),c=i[0],o=i[1];var d=Object(j.b)().enqueueSnackbar;bi((function(){Fr.a.changeLanguage(b.get("lan")).then()}));var u=Object(ne.a)().t,b=new URLSearchParams(window.location.search),h=Re(),m=b.get("token"),p=b.get("email"),f=Object(Me.a)({initialValues:{email:p,password:"",password2:""},validationSchema:ke.d({email:lt(u),password:it(u),password2:ct(u)}),enableReinitialize:!0,onSubmit:function(t,a){var n,r=t.email,i=t.password,o=(t.password2,a.setStatus),l=a.setSubmitting;o(),(n=ui.reset(r,i,m,c)).then.apply(n,Object(s.a)(h({handle401:!1}))).then((function(t){d(u("reset_password_success"),{variant:"success"}),l(!1),e.history.push("/login")}),(function(e){l(!1),o(e),401===e.response.status&&d(u("invalid_expired_reset"),{variant:"warning"})}))}});return console.log("***",f.error,f.errors,f.errors.email,f.touched,f.values,f.initialValues),Object(g.jsx)("div",{className:t.root,children:Object(g.jsxs)(ae.a,{container:!0,children:[Object(g.jsx)(ae.a,{xs:2,item:!0}),Object(g.jsx)(ae.a,{xs:8,item:!0,children:Object(g.jsx)(ae.a,{container:!0,spacing:0,align:"center",justify:"center",direction:"column",style:{height:"100%"},children:Object(g.jsx)(ae.a,{item:!0,children:Object(g.jsx)(le.a,{m:2,children:Object(g.jsxs)(re.a,{className:t.paper,children:[Object(g.jsx)("img",{src:"".concat(_e,"/logo_centrifuga4_").concat(a.label,".svg"),alt:"Logo Centr\xedfuga",style:{height:"85px"}}),Object(g.jsx)(le.a,{m:2,children:Object(g.jsx)(Rt.a,{children:u("new_password")})}),Object(g.jsxs)("form",{onSubmit:f.handleSubmit,children:[Object(g.jsx)(Ie.a,{label:u("email"),helperText:f.touched.email&&f.errors.email,type:"email",name:"email",className:t.field,value:f.values.email,onChange:f.handleChange,onBlur:f.handleBlur,error:f.status,disabled:!0}),Object(g.jsx)(Ie.a,{label:u("password"),name:"password",type:"password",helperText:f.touched.password&&f.errors.password,className:t.field,value:f.values.password,disabled:f.isSubmitting,onChange:f.handleChange,onBlur:f.handleBlur,error:f.status}),Object(g.jsx)(Ie.a,{label:u("confirm_password"),name:"password2",type:"password",helperText:f.touched.password2&&f.errors.password2,className:t.field,value:f.values.password2,disabled:f.isSubmitting,onChange:f.handleChange,onBlur:f.handleBlur,error:f.status}),Object(g.jsx)(hi.a,{sitekey:ge,onChange:function(e){o(e)},theme:a.theme?"dark":"light",className:t.recaptcha}),Object(g.jsx)(le.a,{my:3,children:Object(g.jsx)(De.a,{variant:"contained",color:"primary",type:"submit",disabled:f.isSubmitting||null==c||!(f.isValid&&f.dirty),className:t.field,children:u("change_password")})})]})]})})})})}),Object(g.jsxs)(ae.a,{xs:2,item:!0,children:[Object(g.jsx)(Hr,{style:{float:"right"}}),Object(g.jsx)(Jr,{style:{float:"right"}})]})]})})},wi=a(587),Si=a(601);function ki(){var e=r.a.useContext(Va);return Object(g.jsx)(le.a,{mx:2,style:{textAlign:"left"},children:Object(g.jsx)("img",{src:"".concat(_e,"/logo_xamfra_").concat(e.label,".png"),alt:"Logo Xamfr\xe0",style:{height:"35px"}})})}var Ci=a(297),Ni=a.n(Ci),Ii=a(298),Ti=a.n(Ii),Ai=a(209),qi=a.n(Ai),Bi={getCourses:function(){return new Promise((function(e,t){yt()({method:"get",url:"".concat(xe,"/pre-enrolment/v1/courses"),headers:Object(o.a)(Object(o.a)({},{"Content-Type":"application/json","Cache-Control":"no-cache"}),fe())}).then((function(t){e(t.data)})).catch((function(e){t(e)}))}))},postPreEnrollment:function(e,t){return new Promise((function(a,n){yt()({method:"post",url:"".concat(xe,"/pre-enrolment/v1/pre-enrolment"),data:{body:e,recaptcha:t},headers:Object(o.a)(Object(o.a)({},{"Content-Type":"application/json","Cache-Control":"no-cache"}),fe())}).then((function(e){a(e)})).catch((function(e){n(e)}))}))}};var Pi=a(210),Fi=a.n(Pi),Ei=a(296),Di=a.n(Ei),Ri=function(e){return function(e,t){var a=new Date(e.getTime());return a.setDate(e.getDate()+(7+t-e.getDay())%7),a}(new Date,e).toLocaleString(window.navigator.language,{weekday:"short"})},Mi=function(e){return e.base_schedules?e.base_schedules.map((function(e){return Ri(e.day_week)+", "+e.start_time.slice(0,-3)+" - "+e.end_time.slice(0,-3)})).join("; "):null},Li=Object(w.a)((function(e){return{root:{backgroundColor:e.palette.background.paper}}}));function Gi(e){var t=Li();return Object(g.jsxs)(le.a,{className:t.root,children:[Object(g.jsxs)(le.a,{p:2,style:{width:"100%"},children:[e.children,Object(g.jsx)(ki,{})]}),Object(g.jsx)(P.a,{})]})}var zi=Object(w.a)((function(e){return{root:{width:"100%"},field:{width:"100%",margin:"5px"},cards:{"& > *":{margin:e.spacing(3)}},buttons:{"& > *":{margin:e.spacing(1)}},line:{width:"100%",marginTop:e.spacing(1)},card:{minWidth:200,width:"fit-content",maxWidth:500,display:"inline-block"},recaptcha:{margin:e.spacing(4)},bullet:{display:"inline-block",margin:"0 2px",transform:"scale(0.8)"},title:{fontSize:14},pos:{marginBottom:12},list:{minHeight:"150px",overflow:"auto"},composite:{display:"flex",flexDirection:"row",flex:1,flexWrap:"wrap",gap:e.spacing(1),width:"100%"}}})),Vi=function(e){var t=new Date,a=new Date(e),n=t.getFullYear()-a.getFullYear(),r=t.getMonth()-a.getMonth();return(r<0||0===r&&t.getDate()=h||S(O+1))},disabled:N})})]})]})]})},rc=a(300);function ic(e){Object(rc.a)(e);r.a.useContext(Va),Object(ne.a)().t;return Object(g.jsx)(Rt.a,{variant:"h1",children:"Nope, not found... \ud83d\udc7b"})}var cc=new(we("attendances")),sc=a(304),oc=a.n(sc),lc=a(553),dc=a(591),uc=a(301),bc=a.n(uc),hc=a(596),mc=Object(w.a)((function(e){var t;return{formControl:(t={},Object(y.a)(t,e.breakpoints.down("sm"),{minWidth:"50%",maxWidth:"50%"}),Object(y.a)(t,e.breakpoints.up("sm"),{minWidth:"25%",maxWidth:"25%"}),t),selectStatus:{"&:before":{borderColor:"red"},"&:after":{borderColor:"red"}},root:{width:"100%"}}}));function jc(e){var t=e.student,a=e.attendance,n=e.setAttendance,r=e.handleOpenCommentBox,i=mc(),c="checkbox-list-label-".concat(t.id),s=Object(ne.a)().t,l=null===a?null:a.status,d=function(e){return n(Object(o.a)(Object(o.a)({},a),{},{status:e}))},u=Object(w.a)((function(e){return{root:{"& $notchedOutline":{borderColor:0===l?e.palette.neutral.status.success:1===l?e.palette.neutral.status.error:e.palette.neutral.status.dirty}},focused:{},notchedOutline:{}}}))();return Object(g.jsxs)(E.a,{role:void 0,dense:!0,button:!0,onClick:function(){if(0===l)return d(1);d(0)},className:i.root,children:[Object(g.jsx)(lc.a,{variant:"outlined",className:i.formControl,children:Object(g.jsxs)(dc.a,{labelId:"demo-simple-select-outlined-label",id:"demo-simple-select-outlined",value:l,onChange:function(e){d(e.target.value)},className:i.selectStatus,onClick:function(e){return e.stopPropagation()},input:Object(g.jsx)(hc.a,{id:"outlined-age-simple",classes:u}),children:[Object(g.jsx)(be.a,{value:0,children:s("attended")}),Object(g.jsx)(be.a,{value:1,children:s("absent")}),Object(g.jsx)(be.a,{value:2,children:s("absent-justified")})]})}),Object(g.jsx)(le.a,{px:2,children:Object(g.jsx)(R.a,{title:s("add-comment"),children:Object(g.jsx)(N.a,{color:"secondary","aria-label":s("add-comment"),onClick:function(e){e.stopPropagation(),r()},children:Object(g.jsx)(bc.a,{})})})}),Object(g.jsx)(M.a,{id:c,primary:t.full_name})]},t.id)}var pc=a(303),fc=a.n(pc),Oc=a(302),xc=a.n(Oc);function gc(e){var t=e.commentBox,a=e.setCommentBoxValue,n=e.handleCloseCommentBox,r=e.commentBoxValue,i=e.handleCloseCancelCommentBox,c=Object(ne.a)().t;return Object(g.jsxs)(Oa.a,{open:t,onClose:n,"aria-labelledby":"form-dialog-title",children:[Object(g.jsx)(xa.a,{id:"form-dialog-title",children:c("comment")}),Object(g.jsx)(jn.a,{children:Object(g.jsx)(Ie.a,{value:r,onChange:function(e){a(e.target.value)},autoFocus:!0,margin:"dense",multiline:!0,rows:4,variant:"outlined",fullWidth:!0})}),Object(g.jsxs)(ta.a,{children:[Object(g.jsx)(De.a,{onClick:i,color:"primary",children:c("cancel")}),Object(g.jsx)(De.a,{onClick:n,color:"primary",children:c("save")})]})]})}var _c=Object(w.a)((function(e){return{root:Object(y.a)({height:"100%"},e.breakpoints.down("sm"),{paddingBottom:"100px"}),textBox:{width:"100%",border:"red"},line:{width:"100%",marginTop:e.spacing(1)},composite:{display:"flex",flexDirection:"row",flex:1,flexWrap:"wrap",gap:e.spacing(1),width:"100%"},chip:{margin:e.spacing(.5)},chips:{marginBottom:e.spacing(1)},in:{marginBottom:e.spacing(1)},fabs:{position:"fixed",bottom:e.spacing(4),right:e.spacing(4)},fab:{marginLeft:e.spacing(2)}}}));function vc(e){Object.assign({},e);var t=_c(),a=Object(ne.a)().t,r=new URLSearchParams(window.location.search).get("id"),i=Object(n.useState)(null),c=Object(l.a)(i,2),d=c[0],u=c[1],b=Object(n.useState)(null),h=Object(l.a)(b,2),m=h[0],j=h[1],p=function(){var e=Object.keys(d);return Object.keys(m).filter((function(t){return!e.includes(t)&&(null!==m[t].status||null!==m[t].comment)}))},f=function(e,t){if(console.log("iu",e,t),e.student_id!==t.student_id)throw new Error("student id has changed from ".concat(e.student_id," to ").concat(t.student_id));if(e.course_id!==t.course_id)throw new Error("course id has changed from ".concat(e.course_id," to ").concat(t.course_id));return e.date!==t.date||(e.comment!==t.comment||e.status!==t.status)},O=function(){return null!==d&&(null!==m&&(0!==p().length||!!S()))},x=Object(n.useState)(!1),_=Object(l.a)(x,2),v=_[0],w=_[1];Object(n.useEffect)((function(){w(O())}),[d,m]);var S=function(){return Object.keys(d).some((function(e){return f(d[e],m[e])}))},k=Object(n.useState)(null),C=Object(l.a)(k,2),N=C[0],I=C[1],T=Object(n.useState)(r),A=Object(l.a)(T,2),q=A[0],B=(A[1],Object(n.useState)(!0)),P=Object(l.a)(B,2),E=P[0],D=P[1];Object(n.useEffect)((function(){if(null!==m){var e=!Object.keys(m).some((function(e){return 0!==m[e].status}));D(e)}}),[m]);var M=function(e,t,a){if(null!==t&&null!==e){var n=Object(o.a)({},t);return e.forEach((function(e){var r=e.id;void 0===t[r]&&(n[r]={status:null,comment:null,course_id:q,student_id:r,date:a})})),n}},L=function(){var e;null!==q&&""!==V.values.start&&null!==N&&(e=cc.getAll(null,"*",null,{course_id:q,date:V.values.start})).then.apply(e,Object(s.a)(G({}))).then((function(e){var t=e.data.reduce((function(e,t){return Object(o.a)(Object(o.a)({},e),{},Object(y.a)({},t.student_id,t))}),{});u(t),j(M(N,t,U))}))};Object(n.useEffect)((function(){var e;null!==q&&(e=cr.getAll(null,"*",["full_name","id"],{enrolment_status:"enrolled"},q)).then.apply(e,Object(s.a)(G({}))).then((function(e){I(e.data)}))}),[q]);var G=Re(),z=(new Date).toISOString().split("T")[0],V=Object(Me.a)({initialValues:{start:z,course_id:r},validationSchema:ke.d({}),enableReinitialize:!0,onSubmit:function(e,t){t.setStatus;(0,t.setSubmitting)(!0)}}),U=V.values.start;Object(n.useEffect)(L,[V.values.start,q,N]);var K=function(e,t){var a=Object(o.a)({},m);a[e]=t,j(a)},W=Object(n.useState)(!1),H=Object(l.a)(W,2),Y=H[0],Z=H[1],J=function(){Z(!1)},X=Object(n.useState)(null),Q=Object(l.a)(X,2),$=Q[0],ee=Q[1],te=Object(n.useState)(null),ae=Object(l.a)(te,2),re=ae[0],ie=ae[1];return Object(g.jsxs)("div",{children:[Object(g.jsx)(gc,{commentBox:Y,handleCloseCommentBox:function(){J(),K(re,Object(o.a)(Object(o.a)({},m[re]),{},{comment:$}))},commentBoxValue:$,handleCloseCancelCommentBox:J,setCommentBoxValue:ee}),!1,Object(g.jsxs)(le.a,{p:2,children:[Object(g.jsx)("h1",{children:a("attendance")}),Object(g.jsx)(le.a,{className:[t.line,t.composite],children:Object(g.jsx)(Ae,{label:a("date"),type:"date",style:{flex:1},noDirty:!0,name:"start",formik:V,InputLabelProps:{shrink:!0}})})]}),N&&Object(g.jsx)(F.a,{className:t.root,children:m&&N&&N.map((function(e){var t;return Object(g.jsx)(jc,{student:e,setAttendance:function(t){return K(e.id,t)},handleOpenCommentBox:function(){return t=e.id,ee(m[t].comment),Z(!0),void ie(t);var t},attendance:null!==(t=m[e.id])&&void 0!==t?t:null})}))}),Object(g.jsxs)("div",{className:t.fabs,children:[Object(g.jsx)(R.a,{title:a("mark-all"),children:Object(g.jsx)(ln.a,{className:t.fab,color:"secondary",onClick:function(){!function(e){var t=Object(o.a)({},m);Object.keys(t).map((function(a,n){t[a].status=e})),j(t)}(E?1:0)},disabled:V.isSubmitting,children:E?Object(g.jsx)(xc.a,{}):Object(g.jsx)(fc.a,{})})}),Object(g.jsx)(R.a,{title:a("reset"),children:Object(g.jsx)(ln.a,{className:t.fab,color:"secondary",onClick:function(){return j(M(N,d,U))},disabled:V.isSubmitting||!v,children:Object(g.jsx)(oc.a,{})})}),Object(g.jsx)(R.a,{title:a("save"),children:Object(g.jsx)(ln.a,{className:t.fab,color:"primary",onClick:function(){var e,t=[],a=function(){var e=p();return 0===e.length?null:Object.keys(m).filter((function(t){return e.includes(t)})).reduce((function(e,t){return e[t]=m[t],e}),{})}();null!==a&&Object.keys(a).forEach((function(e){var n=a[e];t.push(cc.post(n))}));var n=Object.keys(d).reduce((function(e,t){return f(d[t],m[t])&&(e[t]=m[t]),e}),{});null!==n&&Object.keys(n).forEach((function(e){var a=n[e],r=d[e];t.push(cc.patch({id:r.id,body:a,initial_values:r}))})),(e=Promise.all(t)).then.apply(e,Object(s.a)(G({}))).then((function(e){L()}))},disabled:V.isSubmitting||!v,children:Object(g.jsx)(He.a,{})})})]})]})}var yc=Object(w.a)((function(e){return{list:{flexGrow:4},listCard:{height:"100%"},header:{},rootBase:{display:"flex",flexDirection:"column",height:"100vh",minHeight:0,alignItems:"stretch"},more:{width:"100%",textAlign:"center"}}})),wc=function(e){var t=yc();return Object(g.jsxs)(le.a,{className:t.rootBase,children:[Object(g.jsxs)(Gi,{children:[Object(g.jsx)(Hi,{}),Object(g.jsx)(Hr,{}),Object(g.jsx)(Jr,{}),Object(g.jsx)(ti,{})]}),Object(g.jsx)(le.a,{p:2,children:Object(g.jsx)(vc,{})})]})},Sc=a(588);var kc=function(){var e=Object(n.useState)("true"===localStorage.getItem("darkTheme")),t=Object(l.a)(e,2),a=t[0],i=t[1],c=Object(u.a)(a?m:h),f=Object(n.useState)({logged:!1,ping:!0}),_=Object(l.a)(f,2),y=_[0],w=_[1],S=Object(n.useState)([]),k=Object(l.a)(S,2),C=k[0],N=k[1],I=Object(n.useState)(null),T=Object(l.a)(I,2),A=T[0],q=T[1],B=r.a.createRef(),P=r.a.useState({open:!1,title:null,subtitle:null,success:function(){},cancel:function(){},args:[]}),F=Object(l.a)(P,2),E=F[0],D=F[1],R=function(){D(Object(o.a)(Object(o.a)({},E),{},{open:!1}))},M=Object(ne.a)().t;return Object(g.jsxs)(b.a,{theme:c,children:[Object(g.jsx)(d.a,{}),Object(g.jsx)(j.a,{maxSnack:3,children:Object(g.jsx)(x.Provider,{value:{user:y,setUser:w,needs:C,setNeeds:function(e){return Array.isArray(e)?N(e):N([])},teacher:A,setTeacher:q},children:Object(g.jsx)(Va.Provider,{value:{theme:a,switchTheme:function(){localStorage.setItem("darkTheme",(!a).toString()),i(!a)},label:a?"dark":"light"},children:Object(g.jsxs)(p.Provider,{value:{confirm:function(e,t,a){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];D({open:!0,title:e,subtitle:t,success:a,cancel:null===n?function(){}:n,args:r})}},children:[Object(g.jsx)(Ir.a,{ref:B,basename:"/app",children:Object(g.jsxs)(O.d,{children:[Object(g.jsx)(v,{path:"/home",baseRouter:B,component:li}),Object(g.jsx)(O.b,{path:"/login",component:pi}),Object(g.jsx)(O.b,{path:"/signup",component:_i}),Object(g.jsx)(O.b,{path:"/password-reset",component:yi}),Object(g.jsx)(O.b,{path:"/prematricula",component:Ui}),Object(g.jsx)(v,{path:"/teacher-dashboard",component:nc}),Object(g.jsx)(v,{path:"/attendance",component:wc}),Object(g.jsx)(O.b,{component:ic})]})}),Object(g.jsxs)(Oa.a,{open:E.open,onClose:R,"aria-labelledby":"responsive-dialog-title",children:[E.title&&Object(g.jsx)(xa.a,{id:"responsive-dialog-title",children:M(E.title)}),E.subtitle&&Object(g.jsx)(jn.a,{children:Object(g.jsx)(Sc.a,{children:M(E.subtitle)})}),Object(g.jsxs)(ta.a,{children:[Object(g.jsx)(De.a,{autoFocus:!0,onClick:function(){E.cancel.apply(E,Object(s.a)(E.args)),R()},color:"primary",children:M("cancel")}),Object(g.jsx)(De.a,{onClick:function(){E.success.apply(E,Object(s.a)(E.args)),R()},color:"primary",autoFocus:!0,children:M("continue")})]})]})]})})})})]})},Cc=function(e){e&&e instanceof Function&&a.e(3).then(a.bind(null,602)).then((function(t){var a=t.getCLS,n=t.getFID,r=t.getFCP,i=t.getLCP,c=t.getTTFB;a(e),n(e),r(e),i(e),c(e)}))},Nc=a(305);c.a.render(Object(g.jsxs)(r.a.StrictMode,{children:[Object(g.jsxs)(Nc.a,{children:[Object(g.jsx)("title",{children:"centr\xedfuga4"}),Object(g.jsx)("base",{href:"".concat("https://centrifuga4.herokuapp.com","/")}),Object(g.jsx)("link",{nonce:"{{csp_nonce()}}",rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap"}),Object(g.jsx)("link",{nonce:"{{csp_nonce()}}",rel:"stylesheet",href:"https://fonts.googleapis.com/icon?family=Material+Icons"}),Object(g.jsx)("meta",{name:"viewport",content:"minimum-scale=1, initial-scale=1, width=device-width"})]}),Object(g.jsx)(kc,{})]}),document.getElementById("root")),Cc()}},[[517,1,2]]]); -//# sourceMappingURL=main.d8d64694.chunk.js.map \ No newline at end of file diff --git a/web_app/build/static/js/main.e85fb0f1.chunk.js b/web_app/build/static/js/main.e85fb0f1.chunk.js new file mode 100644 index 0000000..59afec2 --- /dev/null +++ b/web_app/build/static/js/main.e85fb0f1.chunk.js @@ -0,0 +1,2 @@ +(this["webpackJsonpcentrifuga4-frontend"]=this["webpackJsonpcentrifuga4-frontend"]||[]).push([[0],{287:function(e){e.exports=JSON.parse('{"log_out":"log out","log_in":"log in","download_backup":"download backup","change_language":"change language","dark_light_theme":"dark/light theme","my_account":"my account","open_drawer":"open drawer","no role":"no role","students":"students","role":"role","administrator":"administrator","administrative":"administrative","layman":"layman","courses":"courses","rooms":"rooms","comment":"comment","add-comment":"add comment","export_attendances":"export saved attendances","docs":"docs","teachers":"teachers","load-more":"load more","home":"home","capacity":"capacity","locations":"locations","new_course":"new course","attended":"attended","absent":"absence","absent-justified":"justified absence","hi":"hi","chose_list_dates":"choose the first and last date for which you want the lists to be created","user":"user","teachers-only-zone":"teachers-only zone","more":"more","link-user-to-teacher":"Are you sure you want to link this user to this teacher?","teacher-user":"teacher-user","teacher":"teacher","payments":"payments","take attendance":"take attendance","users":"users","to":"to","teacher_dashboard":"teacher dashboard","send_bulk_email":"send bulk email \u26a1","send_bulk_email_description":"this email will be sent to all the chosen emails of the selected courses (to the actual families)!","send_email":"send email","use_emails":"emails to use","resolved":"resolved (student if 18+ or if no contacts available, otherwise contacts)","settings":"settings","contacts":"contacts","all":"all","search":"search","name":"name","surname1":"first surname","surname2":"second surname","email":"email","phone":"phone","address":"address","city":"city","zip":"zip","dni":"DNI / NIE / passport","gender":"gender","birth date":"birth date","country_of_origin":"country of origin of the family","been_invited":"you have been invited to join centr\xedfuga4 \ud83d\udcef","confirm_password":"confirm password","password":"password","username":"username","invalid_expired_invite":"Your invitation has expired or is invalid! \ud83d\udc82","invalid_expired_reset":"Your reset link has expired or is invalid! \ud83d\udc82","used_invite":"Your invitation can\'t be used twice or for a user that already exists! \ud83d\udc82","reset_password":"reset password","username_required_password_reset":"Fill in the email field to ask for a password reset!","started_password_reset":"Process started. If the username is correct, you will receive an email to finish the password change!","export":"export","empty":"none","export_results_csv":"export this page as .csv","email_required":"email is required","invalid_email":"enter a valid email","password_required":"password is required","delete_payment":"delete the payment","not_undone":"this action can not be undone","warning_not_logged_in":"you are not logged in! \ud83d\udc82","warning_not_enough_privileges":"you don\'t have enough privileges to continue! \ud83d\udc82","password_constraints":"must be longer than 8 characters; including: 1 uppercase, 1 lowercase, 1 number and 1 special character","passwords_unmatched":"passwords don\'t match","new_password":"choose your new password \ud83d\udd11","reset_password_success":"password change successful","sign_up_success":"sign up successful","sign_up":"sign up","change_password":"change password","name_required":"name is required","surname1_required":"first surname is required","surname2_required":"second surname is required","longer_8":"must be longer than 8 characters","shorter_64":"must be smaller than 64 characters","has_lowecase":"must have at least 1 lowercase character","has_uppercase":"must have at least 1 uppercase character","has_digit":"must have at least 1 digit (0-9)","has_special":"must have at least 1 special character (e.g. %)","no_plus":"can\'t contain \'+\'","reset":"reset","save":"save","upload":"attach files","birthdate":"birthdate","attendee":"student","contact":"guardian","price_term":"price per term","success":"done","send_receipt":"send confirmation email to student","export_receipt":"export receipt as pdf","no_payments":"there are no payments","delete":"delete","first":"first","last":"last","mark_all":"mark all","has_paid_cash":"has paid with cash","tooltip-bank-transfer":"has paid through a bank transfer","other-payment-method":"has paid though and unknown method","has_paid":"has paid","nb":"non binary / not represented by any of the above","m":"male","f":"female","bank-transfer":"bank transfer","bank-direct-debit":"direct debit","tooltip-bank-direct-debit":"has paid through direct debit","cash":"cash","method":"method","import":"amount","import_required":"amount is required","date":"date","concept":"concept","new_payment":"new payment","create":"create","field_required":"this field is required","date_required":"date is required","new_guardian":"new guardian","action_cant_undone":"this action can not be undone","delete_guardian_question":"do you want to delete this guardian?","delete_course_question":"do you want to delete this course?","confirm_add_to_course":"do you want to add the teacher to this course?","add_to_course":"add to course","confirm_remove_from_course":"do you want to remove the teacher from this course?","cancel":"cancel","delete_teacher":"do you want to delete this teacher?","delete_guardian":"delete this guardian","delete_student":"delete this student","delete_student_question":"do you want to delete this student?","delete_room":"delete location","delete_room_question":"do you want to delete this location?","delete_user":"delete user","new_room":"new location","new_teacher":"new teacher","delete_user_question":"do you want to delete this user?","student_also_deletes":"this action can not be undone; it will also delete the associated guardians, payments and schedules","default_payment_method":"payment method","payment_comments":"comments (payment)","other_comments":"comments","years_in_xamfra":"years in Xamfr\xe0","is_studying":"studies","is_working":"works","yes":"yes","no":"no","is_early_unenrolled":"unenrolled","is_enrolled":"enrolled","is_early_unenrolled_required":"unenrolled is required","is_enrolled_required":"enrolled is required","education_entity":"educational center","education_year":"year","kindergarten_p0":"p0","kindergarten_p1":"p1","kindergarten_p2":"p2","kindergarten_p3":"p3","kindergarten_p4":"p4","kindergarten_p5":"p5","primary_1":"primary, 1st","primary_2":"primary, 2nd","primary_3":"primary, 3rd","primary_4":"primary, 4th","primary_5":"primary, 5th","primary_6":"primary, 6th","eso_1":"ESO, 1st","eso_2":"ESO, 2nd","eso_3":"ESO, 3rd","eso_4":"ESO, 4th","baccalaureate_1":"baccalaureate, 1st","baccalaureate_2":"baccalaureate, 2nd","FP_lower":"lower FP","FP_higher":"higher FP","undergraduate":"undergraduate","master":"master","phd":"PhD","career":"career","working_required":"works is required","studying_required":"studies is required","career_required":"career is required","education_entity_required":"center is required","education_year_required":"year is required","enrolled_unenrolled":"can\'t be enrolled and unenrolled","relation":"relation","relation_required":"relation is required","father":"father","subject":"subject","can-register-attendance":"can register attendance for classes","attendance":"attendance","mother":"mother","grandfather":"grandfather","grandmother":"grandmother","brother":"brother","sister":"sister","uncle":"uncle","aunt":"aunt","cousin":"cousin","legal_guardian":"legal guardian","status":"enrolment status","enrolled":"enrolled","early-unenrolled":"early unenrolled","pre-enrolled":"pre-enrolled","other":"other","grant_letter":"grant letter","enrolment_agreement":"enrolment agreement","send_grant_letter":"send grant letter","export_grant_letter":"download grant letter","send_enrolment_agreement":"send enrolment agreement","export_enrolment_agreement":"download enrolment agreement","status_required":"status is required","image_required":"image use is required","image_agreement":"use of image","cant_remove_schedule":"schedules of a whole course can\'t be removed","continue":"continue","cancelled":"cancelled","sure_delete_event":"Are you sure? This will delete this schedule from the student.","new_student":"new student","birthdate_required":"birth date is required","no_courses":"there are no courses","published":"published","only_published":"show only published courses","labels":"labels","course":"course","adult":"adult","add_teacher":"add teacher","add_student":"add student","download":"download","god_file":"god file","export_contact_sheets":"export all students with their guardians","export_all_plus":"export all+","attendance_list":"attendance list","export_attendance_list":"download attendance list","students_contact_sheet":"students contact sheet","export_students_contact_sheet":"download students contact sheet","no_students":"no students in this course","no_teachers":"no teachers in this course","description":"description","public":"public","private":"private","confirm_link_to_room":"Are you sure you want to link this room to the course?","link_room":"link room to course","view":"view","pre_enrolment_date":"pre-enrolment date","enrolment_date":"enrolment date","early_unenrolment_date":"early unenrolment date","only_private":"show only private courses","only_enrolled":"show only enrolled students","only_preenrolled":"show only pre-enrolled students","only_earlyunenrolled":"show only early unenrolled students","only_cash":"show only students with cash as the default payment method","only_banktransfer":"show only students with bank transfer as the default payment method","only_bankdirectdebit":"show only students with direct debit as the default payment method","filters_actions":"filters & actions","enroll_to_course":"add to course","confirm_enroll_to_course":"Are you sure you want to add it to the selected course?","confirm_unenroll_to_course":"Are you sure you want to remove it from the selected course?","search_courses":"search courses","new_user":"invite user","send_grant_letter_question":"send grant letter?","this_will_be_sent":"this letter will be sent to the guardians (if -18) or to the student (if 18+ or no guardians available)","sure_delete_event_base":"Are you sure you want to delete the schedule from the course?","no_results":"no results","AF":"afghanistan","AX":"\xe5land islands","AL":"albania","DZ":"algeria","AS":"american samoa","AD":"andorra","AO":"angola","AI":"anguilla","AQ":"antarctica","AG":"antigua and barbuda","AR":"argentina","AM":"armenia","AW":"aruba","AU":"australia","AT":"austria","AZ":"azerbaijan","BS":"bahamas","BH":"bahrain","BD":"bangladesh","BB":"barbados","BY":"belarus","BE":"belgium","BZ":"belize","BJ":"benin","BM":"bermuda","BT":"bhutan","BO":"bolivia, plurinational state of","BQ":"bonaire, sint eustatius and saba","BA":"bosnia and herzegovina","BW":"botswana","BV":"bouvet island","BR":"brazil","IO":"british indian ocean territory","BN":"brunei darussalam","BG":"bulgaria","BF":"burkina faso","BI":"burundi","KH":"cambodia","CM":"cameroon","CA":"canada","CV":"cape verde","KY":"cayman islands","CF":"central african republic","TD":"chad","CL":"chile","CN":"china","CX":"christmas island","CC":"cocos (keeling) islands","CO":"colombia","KM":"comoros","CG":"congo","CD":"congo, the democratic republic of the","CK":"cook islands","CR":"costa rica","CI":"c\xf4te d\'ivoire","HR":"croatia","CU":"cuba","CW":"cura\xe7ao","CY":"cyprus","CZ":"czech republic","DK":"denmark","DJ":"djibouti","DM":"dominica","DO":"dominican republic","EC":"ecuador","EG":"egypt","SV":"el salvador","GQ":"equatorial guinea","ER":"eritrea","EE":"estonia","ET":"ethiopia","FK":"falkland islands (malvinas)","FO":"faroe islands","FJ":"fiji","FI":"finland","FR":"france","GF":"french guiana","PF":"french polynesia","TF":"french southern territories","GA":"gabon","GM":"gambia","GE":"georgia","DE":"germany","GH":"ghana","GI":"gibraltar","GR":"greece","GL":"greenland","GD":"grenada","GP":"guadeloupe","GU":"guam","GT":"guatemala","GG":"guernsey","GN":"guinea","GW":"guinea-bissau","GY":"guyana","HT":"haiti","HM":"heard island and mcdonald islands","VA":"holy see (vatican city state)","HN":"honduras","HK":"hong kong","HU":"hungary","IS":"iceland","IN":"india","ID":"indonesia","IR":"iran, islamic republic of","IQ":"iraq","IE":"ireland","IM":"isle of man","IL":"israel","IT":"italy","JM":"jamaica","JP":"japan","JE":"jersey","JO":"jordan","KZ":"kazakhstan","KE":"kenya","KI":"kiribati","KP":"korea, democratic people\'s republic of","KR":"korea, republic of","KW":"kuwait","KG":"kyrgyzstan","LA":"lao people\'s democratic republic","LV":"latvia","LB":"lebanon","LS":"lesotho","LR":"liberia","LY":"libya","LI":"liechtenstein","LT":"lithuania","LU":"luxembourg","MO":"macao","MK":"macedonia, the former yugoslav republic of","MG":"madagascar","MW":"malawi","MY":"malaysia","MV":"maldives","ML":"mali","MT":"malta","MH":"marshall islands","MQ":"martinique","MR":"mauritania","MU":"mauritius","YT":"mayotte","MX":"mexico","FM":"micronesia, federated states of","MD":"moldova, republic of","MC":"monaco","MN":"mongolia","ME":"montenegro","MS":"montserrat","MA":"morocco","MZ":"mozambique","MM":"myanmar","NA":"namibia","NR":"nauru","NP":"nepal","NL":"netherlands","NC":"new caledonia","NZ":"new zealand","NI":"nicaragua","NE":"niger","NG":"nigeria","NU":"niue","NF":"norfolk island","MP":"northern mariana islands","NO":"norway","OM":"oman","PK":"pakistan","PW":"palau","PS":"palestine, state of","PA":"panama","PG":"papua new guinea","PY":"paraguay","PE":"peru","PH":"philippines","PN":"pitcairn","PL":"poland","PT":"portugal","PR":"puerto rico","QA":"qatar","RE":"r\xe9union","RO":"romania","RU":"russian federation","RW":"rwanda","BL":"saint barth\xe9lemy","SH":"saint helena, ascension and tristan da cunha","KN":"saint kitts and nevis","LC":"saint lucia","MF":"saint martin (french part)","PM":"saint pierre and miquelon","VC":"saint vincent and the grenadines","WS":"samoa","SM":"san marino","ST":"sao tome and principe","SA":"saudi arabia","SN":"senegal","RS":"serbia","SC":"seychelles","SL":"sierra leone","SG":"singapore","SX":"sint maarten (dutch part)","SK":"slovakia","SI":"slovenia","SB":"solomon islands","SO":"somalia","ZA":"south africa","GS":"south georgia and the south sandwich islands","SS":"south sudan","ES":"spain","LK":"sri lanka","SD":"sudan","SR":"suriname","SJ":"svalbard and jan mayen","SZ":"swaziland","SE":"sweden","CH":"switzerland","SY":"syrian arab republic","TW":"taiwan, province of china","TJ":"tajikistan","TZ":"tanzania, united republic of","TH":"thailand","TL":"timor-leste","TG":"togo","TK":"tokelau","TO":"tonga","TT":"trinidad and tobago","TN":"tunisia","TR":"turkey","TM":"turkmenistan","TC":"turks and caicos islands","TV":"tuvalu","UG":"uganda","UA":"ukraine","AE":"united arab emirates","GB":"united kingdom","US":"united states","UM":"united states minor outlying islands","UY":"uruguay","UZ":"uzbekistan","VU":"vanuatu","VE":"venezuela, bolivarian republic of","VN":"viet nam","VG":"virgin islands, british","VI":"virgin islands, u.s.","WF":"wallis and futuna","EH":"western sahara","YE":"yemen","ZM":"zambia","ZW":"zimbabwe","invite":"invite","calendar_url":"calendar url","export_calendar":"export calendar","invite_user":"\ud83d\udcef invite user","permissions":"permissions","can-read":"can read","can-edit":"can edit","can-create":"can create","can-delete":"can delete","can-send-emails":"can send emails","can-invite-users":"can invite users","can-operate-with-students":"can operate with students","can-operate-with-courses":"can operate with courses","can-operate-with-guardians":"can operate with guardians","can-operate-with-payments":"can operate with payments","can-operate-with-rooms":"can operate with rooms","can-operate-with-schedules":"can operate with schedules","can-operate-with-teachers":"can operate with teachers","can-operate-with-users":"can operate with users","next":"next","back":"back","skip":"skip","schedules":"schedules","finish":"send","here":"here","can-operate-with-payment-receipts":"can operate with payment receipts","data_protection":"data protection","student_info":"student information","contact_person_1":"contact person (1)","contact_person_2":"contact person (2)","confirmation":"confirmation","ss_agent":"social service worker","no_courses_found_add_edu":"we can\'t find any courses for you; go back and add your education level! If you already did that, contact us (xamfra.net/contacte)!","student":"student","search_by_id":"search by id","search_by":"search by","export_all":"export all","export_all_csv":"export all pages as .csv","full_name":"full name","room":"room","use_eng":"see in english","use_cat":"see in catalan","use_dark":"use dark theme","use_light":"use light theme","required":"field required","2FA_code":"2FA code","2FA_needed":"fill in the 2FA code from the app","2FA_6digits":"the 2FA code has 6 digits","2FA_invalid":"the 2FA code has 6 integer digits","setup_2FA":"set up 2FA \ud83d\udee1\ufe0f","learn_how_2FA":"How to set up 2FA?","title_2fa_continue":"Have you scanned the QR code in the 2FA app?","description_2fa_continue":"You won\'t be able to access your account if you don\'t set up you 2FA app now. You won\'t be able to scan this QR code in the future.","2FA_tip1":"Two-factor authentication (2FA) is essential to guarantee you are the only one who can access student\'s data.","2FA_tip2":"Scan the QR code with your 2FA app of choice.","2FA_tip3":"This QR code will never be shown again.","rememberMe":"remember me"}')},288:function(e){e.exports=JSON.parse('{"log_out":"tancar la sessi\xf3","log_in":"iniciar sessi\xf3","download_backup":"descarregar c\xf2pia","change_language":"cambiar idioma","dark_light_theme":"tema clar/fosc","my_account":"el meu compte","open_drawer":"obrir men\xfa","no role":"sense rol","students":"estudiants","courses":"classes","role":"rol","administrator":"administrador","administrative":"administratiu","layman":"simple","teachers":"professors","rooms":"espais","docs":"documentaci\xf3","payments":"pagaments","new_course":"nou curs","no_results":"no hi ha resultats","sure_delete_event_base":"Segur? Si segueixes eliminar\xe0s l\'esdeveniment del curs.","capacity":"aforament","delete_room":"eliminar la sala","delete_room_question":"vols eliminar aquesta sala?","users":"usuaris","take attendance":"passar llista","new_room":"nou espai","new_teacher":"nou professor","settings":"configuraci\xf3","locations":"espais","empty":"cap","to":"destinataris","contacts":"contactes","first":"primer dia","mark_all":"marcar totxs","last":"darrer dia","send_bulk_email":"enviar correu massiu \u26a1","send_bulk_email_description":"aquest missatge s\'enviar\xe0 a les adreces triades dels cursos seleccionats (a les families reals)!","all":"tots","subject":"assumpte","upload":"adjuntar fitxers","can-register-attendance":"pot marcar assist\xe8ncia a classes","attendance":"assist\xe8ncia","send_email":"enviar correu","use_emails":"correus a usar","add-comment":"afegir comentari","comment":"comentari","resolved":"solucionat (l\'estudiant si \xe9s +18 o si no hi ha contactes disponibles, altrament els contactes)","OTHER":"altres","AF":"afganistan","AX":"aland","AL":"alb\xe0nia","DE":"alemanya","DZ":"alg\xe8ria","AD":"andorra","AO":"angola","AI":"anguilla","AQ":"ant\xe0rtida","AG":"antigua i barbuda","SA":"ar\xe0bia saud\xed","AR":"argentina","AM":"arm\xe8nia","AW":"aruba","AU":"austr\xe0lia","AT":"\xe0ustria","AZ":"azerbaidjan","BS":"bahames, les","BH":"bahrain","BD":"bangladesh","BB":"barbados","BY":"belar\xfas","BE":"b\xe8lgica","BZ":"belize","BJ":"ben\xedn","BM":"bermudes","BT":"bhutan","BO":"bol\xedvia","BQ":"bonaire, sint eustatius i saba","BA":"b\xf2snia i hercegovina","BW":"botswana","BR":"brasil","BN":"brunei","BG":"bulg\xe0ria","BF":"burkina faso","BI":"burundi","KH":"cambodja","CM":"camerun","CA":"canad\xe0","CV":"cap verd","CO":"col\xf2mbia","KM":"comores, les","CG":"congo","KP":"corea del nord","KR":"corea del sud","CI":"costa d\'ivori","CR":"costa rica","HR":"cro\xe0cia","CU":"cuba","CW":"cura\xe7ao","DK":"dinamarca","DJ":"djibouti","DM":"dominica","EG":"egipte","SV":"el salvador","AE":"emirats \xe0rabs units, els","EC":"equador","ER":"eritrea","SK":"eslov\xe0quia","SI":"eslov\xe8nia","ES":"espanya","US":"estats units, els","EE":"est\xf2nia","SZ":"eswatini","ET":"eti\xf2pia","FO":"f\xe8roe","FJ":"fiji","PH":"filipines","FI":"finl\xe0ndia","FR":"fran\xe7a","GA":"gabon","GM":"g\xe0mbia","GE":"ge\xf2rgia","GH":"ghana","GI":"gibraltar","GR":"gr\xe8cia","GD":"grenada","GL":"groenl\xe0ndia","GP":"guadalupe","GF":"guaiana francesa","GU":"guam","GT":"guatemala","GG":"guernsey","GN":"guinea","GQ":"guinea equatorial","GW":"guinea-bissau","GY":"guyana","HT":"hait\xed","HN":"hondures","HK":"hong kong, xina","HU":"hongria","YE":"iemen, el","BV":"illa bouvet","CX":"illa christmas","IM":"illa de man","NF":"illa norfolk","KY":"illes caiman","CC":"illes cocos (keeling)","CK":"illes cook","FK":"illes falkland (malvines)","GS":"illes ge\xf2rgia del sud i sandwich del sud","HM":"illes heard i mcdonald","MP":"illes marianes del nord","MH":"illes marshall","UM":"illes menors allunyades dels estats units","SB":"illes salom\xf3","TC":"illes turks i caicos","VG":"illes verges brit\xe0niques","VI":"illes verges dels estats units","IN":"\xedndia","ID":"indon\xe8sia","IR":"iran","IQ":"iraq, l\'","IE":"irlanda","IS":"isl\xe0ndia","IL":"israel","IT":"it\xe0lia","JM":"jamaica","JP":"jap\xf3","JE":"jersey","JO":"jord\xe0nia","KZ":"kazakhstan","KE":"kenya","KG":"kirguizstan","KI":"kiribati","KW":"kuwait","LA":"lao","LS":"lesotho","LV":"let\xf2nia","LB":"l\xedban","LR":"lib\xe8ria","LY":"l\xedbia","LI":"liechtenstein","LT":"litu\xe0nia","LU":"luxemburg","MO":"macao, xina","MK":"maced\xf2nia del nord","MG":"madagascar","MY":"mal\xe0isia","MW":"malawi","MV":"maldives","ML":"mali","MT":"malta","MA":"marroc, el","MQ":"martinica","MU":"maurici","MR":"maurit\xe0nia","YT":"mayotte","MX":"m\xe8xic","FM":"micron\xe8sia","MZ":"mo\xe7ambic","MD":"mold\xe0via","MC":"m\xf2naco","MN":"mong\xf2lia","ME":"montenegro","MS":"montserrat","MM":"myanmar","NA":"nam\xedbia","NR":"nauru","NP":"nepal","NI":"nicaragua","NE":"n\xedger","NG":"nig\xe8ria","NU":"niue","NO":"noruega","NC":"nova caled\xf2nia","NZ":"nova zelanda","OM":"oman","NL":"pa\xefsos baixos","PK":"pakistan","PW":"palau","PS":"palestina","PA":"panam\xe0","PG":"papua nova guinea","PY":"paraguai","PE":"per\xfa","PN":"pitcairn","PF":"polin\xe8sia francesa","PL":"pol\xf2nia","PT":"portugal","PR":"puerto rico","QA":"qatar","GB":"regne unit","CF":"rep\xfablica centreafricana","CD":"rep\xfablica democr\xe0tica del congo","DO":"rep\xfablica dominicana","RE":"reuni\xf3, la","RO":"romania","RW":"ruanda","RU":"r\xfassia","EH":"s\xe0hara occidental","SH":"saint helena, ascenci\xf3 i tristan da cunha","KN":"saint kitts i nevis","LC":"saint lucia","VC":"saint vincent i les grenadines","BL":"saint-barth\xe9lemy","MF":"saint-martin","PM":"saint-pierre-et-miquelon","WS":"samoa","AS":"samoa americana","SM":"san marino","VA":"santa seu","ST":"s\xe3o tom\xe9 i pr\xedncipe","SN":"senegal","RS":"s\xe8rbia","SC":"seychelles","SL":"sierra leone","SG":"singapur","SX":"sint maarten","SY":"s\xedria","SO":"som\xe0lia","LK":"sri lanka","ZA":"sud-\xe0frica","SS":"sudan del sud, el","SD":"sudan, el","SE":"su\xe8cia","CH":"su\xefssa","SR":"surinam","SJ":"svalbard i jan mayen","TJ":"tadjikistan","TH":"tail\xe0ndia","TW":"taiwan","TZ":"tanz\xe0nia","TF":"terres australs i ant\xe0rtiques franceses","IO":"territori brit\xe0nic de l\'oce\xe0 \xedndic","TL":"timor-leste","TG":"togo","TK":"tokelau","TO":"tonga","TT":"trinidad i tobago","TN":"tun\xedsia","TM":"turkmenistan","TR":"turquia","TV":"tuvalu","TD":"txad","CZ":"tx\xe8quia","UA":"ucra\xefna","UG":"uganda","UY":"uruguai","UZ":"uzbekistan","VU":"vanuatu","VE":"vene\xe7uela","VN":"vietnam","WF":"wallis i futuna","CL":"xile","CN":"xina","CY":"xipre","ZM":"z\xe0mbia","ZW":"zimb\xe0bue","send_grant_letter_question":"enviar carta de beca?","this_will_be_sent":"aquesta carta s\'enviar\xe0 als contactes (si \xe9s menor) o a l\'estudiant (si \xe9s major d\'edat o no hi ha contactes disponibles)","chose_list_dates":"escull el primer i l\'\xfaltim dia pels quals vulguis crear les llistes","user":"usuari","teacher":"professor","export_attendances":"baixar llista d\'assist\xe8ncia","attended":"assist\xe8ncia","absent":"abs\xe8ncia","absent-justified":"abs\xe8ncia justificada","confirm_link_to_room":"Segur que vols afegir aquesta sala al curs?","link_room":"afegir sala al curs","pre_enrolment_date":"data de prematr\xedcula","enrolment_date":"data de matr\xedcula","early_unenrolment_date":"data de baixa","export_calendar":"exportar calendari","room":"espai","teachers-only-zone":"zona nom\xe9s per a professorxs","search":"cercar","name":"nom","view":"veure","surname1":"primer cognom","surname2":"segon cognom","email":"correu","phone":"tel\xe8fon","calendar_url":"enlla\xe7 del calendari","address":"adre\xe7a","city":"ciutat","zip":"codi postal","dni":"DNI / NIE / passaport","gender":"g\xe8nere","adult":"adult","no_students":"no hi ha estudiants en aquest curs","no_teachers":"no hi ha professors en aquest curs","birth date":"data de naixement","country_of_origin":"estat d\'origen de la fam\xedlia","been_invited":"t\'han convidat a unir-te a la centr\xedfuga4 \ud83d\udcef","confirm_password":"confirma la contrasenya","password":"contrasenya","username":"nom d\'usuari","download":"descarregar","god_file":"fitxer mare","add_teacher":"afegir professor","export_contact_sheets":"exportar tots els estudiants amb els contactes","export_all_plus":"exportar tots+","add_student":"afegir estudiant","attendance_list":"llista d\'assist\xe8ncia","export_attendance_list":"descarregar llista d\'assist\xe8ncia","students_contact_sheet":"contactes dels estudiants","export_students_contact_sheet":"descarregar contactes dels estudiants","invalid_expired_invite":"La invitaci\xf3 ha caducat o no \xe9s v\xe0lida! \ud83d\udc82","invalid_expired_reset":"L\'enlla\xe7 pel canvi de contrasenya ha caducat o no \xe9s v\xe0lid! \ud83d\udc82","used_invite":"La invitaci\xf3 no es pot usar m\xe9s de dues vegades o per un usuari que ja existeix! \ud83d\udc82","reset_password":"restaurar contrasenya","username_required_password_reset":"Omple el camp del correu per restaurar la contrasenya!","started_password_reset":"El proc\xe9s ha comen\xe7at. Si l\'usuari \xe9s correcte, rebr\xe0s un correu per acabar el canvi de contrasenya!","export":"exportar","export_results_csv":"exportar aquesta p\xe0gina com a .csv","email_required":"cal un correu","invalid_email":"introdu\xefu un correu v\xe0lid","password_required":"cal una contrasenya","delete_payment":"eliminar el pagament","not_undone":"aquesta acci\xf3 no es pot desfer","warning_not_logged_in":"la sessi\xf3 no est\xe0 iniciada! \ud83d\udc82","warning_not_enough_privileges":"no tens els privilegis necessaris per seguir! \ud83d\udc82","password_constraints":"ha de ser de m\xe9s de 8 car\xe0cters; incloent: 1 maj\xfascula, 1 min\xfascula, 1 n\xfamero i 1 car\xe0cter especial","passwords_unmatched":"les contrasenyes no coincideixen","new_password":"escull la nova contrasenya \ud83d\udd10","reset_password_success":"canvi de contrasenya correcte","sign_up_success":"creaci\xf3 del nou compte correcta","sign_up":"iniciar sessi\xf3","change_password":"change password","name_required":"cal el nom","surname1_required":"cal el primer cognom","surname2_required":"cal el segon congom","longer_8":"ha de tenir m\xe9s de 8 car\xe0cters","shorter_64":"ha de tenir menys de 64 car\xe0cters","has_lowecase":"ha de tenir 1 min\xfascula com a m\xednim","has_uppercase":"ha de tenir 1 maj\xfascula com a m\xednim","has_digit":"ha de tenir 1 d\xedgit com a m\xednim (0-9)","has_special":"ha de tenir 1 car\xe0cter especial (p.ex. %) com a m\xednim","no_plus":"no pot contenir \'+\'","reset":"descartar","save":"guardar","birthdate":"data de naixement","attendee":"estudiant","contact":"contacte","price_term":"preu per trimestre","success":"fet","send_receipt":"enviar correu de confirmaci\xf3 a l\'estudiant","export_receipt":"exportar rebut com a pdf","no_payments":"no hi ha cap pagament","delete":"eliminar","has_paid_cash":"ha pagat en efectiu","tooltip-bank-transfer":"ha pagat mitjan\xe7ant una transfer\xe8ncia","other-payment-method":"ha pagat amb un m\xe8tode no reconegut","has_paid":"ha pagat","nb":"no binari / no representat per cap dels anteriors","m":"mascul\xed","f":"femen\xed","bank-transfer":"transfer\xe8ncia banc\xe0ria","bank-direct-debit":"domiciliaci\xf3 banc\xe0ria","tooltip-bank-direct-debit":"ha pagat mitjan\xe7ant domiciliaci\xf3 banc\xe0ria","cash":"efectiu","method":"m\xe8tode","import":"import","import_required":"cal l\'import","date":"data","concept":"concepte","new_payment":"nou pagament","create":"crear","field_required":"cal omplir el camp","date_required":"cal la data","new_guardian":"nou contacte","action_cant_undone":"aquesta acci\xf3 no es pot desfer","delete_guardian_question":"vols eliminar aquest contacte?","delete_course_question":"vols eliminar aquest curs?","confirm_add_to_course":"vols afegir el professor al curs?","add_to_course":"afegir al curs","confirm_remove_from_course":"vols eliminar el professor del curs?","cancel":"cancelar","delete_teacher":"vols eliminar aquest professor?","delete_guardian":"eliminar el contacte","delete_student":"eliminar l\'estudiant","delete_student_question":"vols eliminar aquest estudiant?","delete_user":"eliminar l\'usuari","delete_user_question":"vols eliminar aquest usuari?","student_also_deletes":"aquesta acci\xf3 no es pot desfer; tamb\xe9 s\'eliminaran els contactes associats, pagaments i horaris","default_payment_method":"m\xe8tode de pagament","payment_comments":"comentaris (pagament)","other_comments":"comentaris","years_in_xamfra":"anys a Xamfr\xe0","is_studying":"estudia","is_working":"treballa","home":"inici","yes":"s\xed","no":"no","load-more":"veure\'n m\xe9s","hi":"bones","is_early_unenrolled":"desmatriculat","more":"m\xe9s","is_enrolled":"matriculat","teacher-user":"usuari d\'unx professorx","link-user-to-teacher":"Est\xe0s segurx que vols associar aquest professorx a l\'usuari?","is_early_unenrolled_required":"cal el camp desmatriculat","is_enrolled_required":"cal el camp matriculat","education_entity":"centre educatiu","teacher_dashboard":"panell del professorx","education_year":"curs","kindergarten_p0":"p0","kindergarten_p1":"p1","kindergarten_p2":"p2","kindergarten_p3":"p3","kindergarten_p4":"p4","kindergarten_p5":"p5","primary_1":"1r de prim\xe0ria","primary_2":"2n de prim\xe0ria","primary_3":"3r de prim\xe0ria","primary_4":"4t de prim\xe0ria","primary_5":"5\xe8 de prim\xe0ria","primary_6":"6\xe8 de prim\xe0ria","eso_1":"1r d\'ESO","eso_2":"2n d\'ESO","eso_3":"3r d\'ESO","eso_4":"4t d\'ESO","baccalaureate_1":"1r de batxillerat","baccalaureate_2":"2n de batxillerat","FP_lower":"FP grau mig","FP_higher":"FP grau superior","undergraduate":"grau","master":"m\xe0ster","phd":"doctorat","career":"professi\xf3","working_required":"cal el camp treballa","studying_required":"cal el camp estudia","career_required":"cal la professi\xf3","education_entity_required":"cal el centre","education_year_required":"cal el curs","enrolled_unenrolled":"no pot estar matriculat i desmatriculat","relation":"relaci\xf3","relation_required":"cal la relaci\xf3","father":"pare","mother":"mare","grandfather":"avi","grandmother":"\xe0via","brother":"germ\xe0","sister":"germana","uncle":"oncle","aunt":"tieta","cousin":"cos\xed/ina","legal_guardian":"tutor legal","status":"estat de la matr\xedcula","enrolled":"matriculat/ada","early-unenrolled":"desmatriculat/ada","pre-enrolled":"prematriculat/ada","other":"altres","grant_letter":"carta de beca","send_grant_letter":"enviar carta de beca","export_grant_letter":"descarregar carta de beca","enrolment_agreement":"full de matr\xedcula","send_enrolment_agreement":"enviar full de matr\xedcula","export_enrolment_agreement":"descarregar full de matr\xedcula","status_required":"cal l\'estat de matr\xedcula","image_required":"cal l\'\xfas d\'imatge","image_agreement":"\xfas d\'imatge","cant_remove_schedule":"no es poden eliminar horaris comuns d\'un taller","continue":"seguir","cancelled":"cancelat","sure_delete_event":"Segur? Si segueixes eliminar\xe0s l\'esdeveniment de l\'estudiant.","new_student":"nou estudiant","birthdate_required":"cal la data de naixement","no_courses":"no hi ha cap classe","published":"publicats","labels":"etiquetes","course":"classe","description":"descripci\xf3","public":"p\xfablic","only_published":"mostrar nom\xe9s cursos publicats","private":"privats","only_private":"mostrar nom\xe9s cursos privats","only_enrolled":"mostrar nom\xe9s estudiants matriculats","only_preenrolled":"mostrar nom\xe9s estudiants prematriculats","only_earlyunenrolled":"mostrar nom\xe9s estudiants desmatriculats","only_cash":"mostrar nom\xe9s alumnes amb efectiu com a m\xe8tode de pagament per defecte","only_banktransfer":"mostrar nom\xe9s alumnes amb transfer\xe8ncia banc\xe0ria com a m\xe8tode de pagament per defecte","only_bankdirectdebit":"mostrar nom\xe9s alumnes amb domiciliaci\xf3 banc\xe0ria com a m\xe8tode de pagament per defecte","filters_actions":"filtres i accions","enroll_to_course":"afegir al curs","confirm_enroll_to_course":"Segur que vols afegir-lo a aquest curs?","confirm_unenroll_to_course":"Segur que vols eliminar-lo d\'aquest curs?","search_courses":"cercar cursos","new_user":"convidar un usuari nou","invite":"convidar","invite_user":"\ud83d\udcef convidar usuari","permissions":"permisos","can-read":"pot llegir","can-edit":"pot editar","can-create":"pot crear","can-delete":"pot eliminar","can-send-emails":"pot enviar correus","can-invite-users":"pot convidar usuaris","can-operate-with-students":"pot operar amb estudiants","can-operate-with-courses":"pot operar amb cursos","can-operate-with-guardians":"pot operar amb contactes","can-operate-with-payments":"pot operar amb pagaments","can-operate-with-rooms":"pot operar amb ubicacions","can-operate-with-schedules":"pot operar amb horaris","can-operate-with-teachers":"pot operar amb professors","can-operate-with-users":"pot operar amb usuaris","next":"seg\xfcent","back":"anterior","required":"camp obligatori","skip":"ometre","schedules":"horaris","finish":"enviar","can-operate-with-payment-receipts":"pot operar amb rebuts de pagament","data_protection":"protecci\xf3 de dades","student_info":"informaci\xf3 de l\'estudiant","contact_person_1":"persona de contacte (1)","contact_person_2":"persona de contacte (2)","confirmation":"confirmaci\xf3","ss_agent":"referent (serveis socials)","no_courses_found_add_edu":"no podem trobar-te cap curs; torna enrere i afegeix el teu nivell d\'educaci\xf3! Si ja ho has fet, contacta\'ns (xamfra.net/contacte)!","student":"estudiant","search_by_id":"cercar amb id","search_by":"cercar per","export_all":"exportar tots","export_all_csv":"exportar totes les p\xe0gines com a .csv","full_name":"nom complet","use_eng":"veure en angl\xe8s","use_cat":"veure en catal\xe0","use_dark":"usar tema fosc","use_light":"usar tema clar","2FA_code":"codi 2FA","2FA_needed":"escriu el codi de 2FA de l\'aplicaci\xf3","2FA_6digits":"el codi de 2FA t\xe9 6 d\xedgits","2FA_invalid":"el codi de 2FA t\xe9 6 d\xedgits num\xe8rics","setup_2FA":"configura 2FA \ud83d\udee1\ufe0f","learn_how_2FA":"Com configuro 2FA?","title_2fa_continue":"Has escanejat el codi QR amb la teva app de 2FA?","description_2fa_continue":"No podr\xe0s accedir al teu compte si no configures la teva aplicaci\xf3 de 2FA ara. No podr\xe0s escanejar aquest codi QR en el futur.","2FA_tip1":"L\'autentificaci\xf3 de doble factor (2FA) \xe9s essencial per assegurar que nom\xe9s tu pots accedir a les dades dels estudiants.","2FA_tip2":"Escaneja el codi QR amb la teva aplicaci\xf3 de 2FA.","2FA_tip3":"No podr\xe0s tornar a veure aquest codi QR mai m\xe9s.","rememberMe":"recorda\'m"}')},343:function(e,t,a){},517:function(e,t,a){"use strict";a.r(t);var n=a(0),r=a.n(n),i=a(25),c=a.n(i),s=(a(343),a(10)),o=a(5),l=a(9),d=a(581),u=a(308),b=a(568),h=Object(u.a)({palette:{type:"light",primary:{main:"#e98300",light:"#ffb342",dark:"#b05500",contrastText:"#000000",emphasisText:{high:"#000000DF",medium:"#00000098",low:"#0000005E"}},secondary:{main:"#934d98",light:"#c57bc9",dark:"#63206a",contrastText:"#000000",emphasisText:{high:"#000000DF",medium:"#00000098",low:"#0000005E"}},neutral:{main:"#ffffff",contrastText:"#000000",emphasisText:{high:"#000000DF",medium:"#00000098",low:"#0000005E"},status:{dirty:"#fbc02d",success:"#43a047",error:"#ff5252"}}}}),m=Object(u.a)({palette:{type:"dark",primary:{main:"#934d98",light:"#c57bc9",dark:"#63206a",contrastText:"#000000",emphasisText:{high:"#000000DF",medium:"#00000098",low:"#0000005E"}},secondary:{main:"#ffcc80",light:"#ffffb0",dark:"#ca9b52",contrastText:"#000000",emphasisText:{high:"#000000DF",medium:"#00000098",low:"#0000005E"}},neutral:{main:"#1f1f1f",contrastText:"#ffffff",emphasisText:{high:"#ffffffDF",medium:"#ffffff98",low:"#ffffff5E"},status:{dirty:"#ffcf3d",success:"#c0e882",error:"#ff5252"}}}}),j=a(47),p=r.a.createContext({confirm:function(e,t,a){}}),f=a(17),O=a(34),x=r.a.createContext({user:null,setUser:function(){},needs:[],setNeeds:function(){},teacher:[],setTeacher:function(){}}),g=a(1),_=["component"];var v=function(e){var t=e.component,a=Object(f.a)(e,_),n=r.a.useContext(x);return Object(g.jsx)(O.b,Object(o.a)(Object(o.a)({},a),{},{render:function(e){return n.user.logged?Object(g.jsx)(t,Object(o.a)(Object(o.a)({},e),a)):Object(g.jsx)(O.a,{to:{pathname:"/login",state:{from:e.location}}})}}))},y=a(29),w=a(549),S=a(546),k=a(574),C=a(6),N=a(521),I=a(582),T=a(293),A=a.n(T),q=a(294),B=a.n(q),P=a(558),F=a(554),E=a(525),D=a(583),R=a(556),M=a(572),L=a(43),G=a.n(L),z=a(280),V=a.n(z),U=a(281),K=a.n(U),W=a(282),H=a.n(W),Y=a(204),Z=a.n(Y),J=a(125),X=a.n(J),Q=a(284),$=a.n(Q),ee=a(283),te=a.n(ee),ae=a(577),ne=a(595),re=a(177),ie=a(80),ce=a.n(ie),se=a(589),oe=a(576),le=a(598),de=a(109),ue=a.n(de),be=a(559),he=a(31),me=a(32),je=a(264),pe=a.n(je);function fe(){return{"X-CSRFToken":pe.a.get("X-CSRF-TOKEN")}}var Oe="v1",xe="https://c4.xamfra.net",ge="6LdHBOcbAAAAAAFOSVzvos0dxnVunKUB7ntQCaOP",_e="https://c4.xamfra.net",ve="true"===Object({NODE_ENV:"production",PUBLIC_URL:"https://c4.xamfra.net",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_RECAPTCHA:"6LdHBOcbAAAAAAFOSVzvos0dxnVunKUB7ntQCaOP",REACT_APP_API_VERSION:"v1",REACT_APP_BACKEND_URL:"https://c4.xamfra.net",REACT_APP_DOCS_URL:"https://miquelvir.github.io/centrifuga4/"}).REACT_CHECK_NEEDS,ye=a(27);function we(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;a=null===a?"api":a,r=null===r?Oe:r;var i="".concat(n=null===n?xe:n,"/").concat(a,"/").concat(r);return function(){function a(){Object(he.a)(this,a)}return Object(me.a)(a,[{key:"getAll",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;return new Promise((function(l,d){var u={page:n,include:null===r?null:JSON.stringify(r)};null!==a&&(u["filter.".concat(a.name,".match")]=a.value),null!==c&&Object.keys(c).forEach((function(e){u["filter.".concat(e,".eq")]=c[e]})),ye({method:"get",url:"".concat(i,"/").concat(e).concat(null===t?"":"/".concat(s,"/").concat(t)),params:u,headers:Object(o.a)(Object(o.a)({},{"Content-Type":"application/json","Cache-Control":"no-cache"}),fe())}).then((function(e){l(e.data)})).catch((function(e){d(e)}))}))}},{key:"getOne",value:function(t){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return new Promise((function(n,r){ye({method:"get",url:"".concat(i,"/").concat(e,"/").concat(t),params:{include:null===a?null:JSON.stringify(a)},headers:Object(o.a)(Object(o.a)({},{"Content-Type":"application/json","Cache-Control":"no-cache"}),fe())}).then((function(e){n(e.data)})).catch((function(e){r(e)}))}))}},{key:"getMany",value:function(e){var t=this;return new Promise((function(a,n){0===e.length&&a([]),t.getOne(e.join(",")).then((function(t){1===e.length?a([t]):a(t)})).catch((function(e){n(e)}))}))}},{key:"patch",value:function(t){var a=t.id,n=t.body,r=t.initial_values,c=void 0===r?null:r;if(null!==c)var s=Object.keys(n).reduce((function(e,t){return t in c&&c[t]===n[t]||(e[t]=n[t]),e}),{});return"id"in s&&delete s.id,new Promise((function(t,n){ye({method:"patch",url:"".concat(i,"/").concat(e,"/").concat(a),data:s,headers:Object(o.a)(Object(o.a)({},{"Content-Type":"application/json","Cache-Control":"no-cache"}),fe())}).then((function(e){t(e.data)})).catch((function(e){n(e)}))}))}},{key:"post",value:function(a){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return"id"in a&&delete a.id,new Promise((function(r,c){ye({method:"post",url:"".concat(i,"/").concat(e).concat(null!==t?"/".concat(n,"/").concat(t):""),data:a,headers:Object(o.a)(Object(o.a)({},{"Content-Type":"application/json","Cache-Control":"no-cache"}),fe())}).then((function(e){r(e.data)})).catch((function(e){c(e)}))}))}},{key:"postWithId",value:function(a){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return new Promise((function(r,c){ye({method:"post",url:"".concat(i,"/").concat(e,"/").concat(a).concat(null===n?"":"/".concat(t,"/").concat(n)),headers:Object(o.a)(Object(o.a)({},{"Content-Type":"application/json","Cache-Control":"no-cache"}),fe())}).then((function(e){r(e)})).catch((function(e){c(e)}))}))}},{key:"delete",value:function(a){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return new Promise((function(r,c){ye({method:"delete",url:"".concat(i,"/").concat(e,"/").concat(a).concat(null!==t?"/".concat(t,"/").concat(n):""),headers:Object(o.a)(Object(o.a)({},{"Content-Type":"application/json","Cache-Control":"no-cache"}),fe())}).then((function(e){r(e)})).catch((function(e){c(e)}))}))}},{key:"deleteMany",value:function(e){var t=this;return Promise.all(e.map((function(e){return t.delete(e)})))}},{key:"downloadCsv",value:function(t,a){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return new Promise((function(c,s){var l={page:n};null!==t&&(l["filter.".concat(t,".like")]="%".concat(a,"%")),null!==r&&Object.keys(r).forEach((function(e){l["filter.".concat(e,".eq")]=r[e]})),ye({url:"".concat(i,"/").concat(e),method:"GET",responseType:"blob",params:l,headers:Object(o.a)(Object(o.a)({},{Accept:"text/csv","Cache-Control":"no-cache"}),fe())}).then((function(e){var t=e.headers["content-disposition"].split("filename=")[1];null===t&&(t="export.csv");var a=window.URL.createObjectURL(new Blob([e.data])),n=document.createElement("a");n.href=a,n.setAttribute("download",t),document.body.appendChild(n),n.click(),n.remove(),c()})).catch((function(e){s(e)}))}))}},{key:"downloadOneCsv",value:function(t){return new Promise((function(a,n){ye({url:"".concat(i,"/").concat(e,"/").concat(t),method:"GET",responseType:"blob",headers:Object(o.a)(Object(o.a)({},{Accept:"text/csv","Cache-Control":"no-cache"}),fe())}).then((function(e){var t=e.headers["content-disposition"].split("filename=")[1];null===t&&(t="export.csv");var n=window.URL.createObjectURL(new Blob([e.data])),r=document.createElement("a");r.href=n,r.setAttribute("download",t),document.body.appendChild(r),r.click(),r.remove(),a()})).catch((function(e){n(e)}))}))}},{key:"downloadSubresource",value:function(t,a,n){return new Promise((function(r,c){ye({url:"".concat(i,"/").concat(e,"/").concat(t,"/").concat(a),method:"POST",params:n,responseType:"blob",headers:Object(o.a)(Object(o.a)({},{"Cache-Control":"no-cache"}),fe())}).then((function(e){var t=e.headers["content-disposition"].split("filename=")[1],a=window.URL.createObjectURL(new Blob([e.data])),n=document.createElement("a");n.href=a,n.setAttribute("download",t),document.body.appendChild(n),n.click(),n.remove(),r()})).catch((function(e){c(e)}))}))}}]),a}()}var Se=new(we("students")),ke=a(12),Ce=a(550),Ne=function(e){var t=Object.assign({},e);return Object(g.jsx)(Ce.a,Object(o.a)(Object(o.a)({},t),{},{variant:"circle",children:Object(g.jsx)(N.a,{children:Object(g.jsx)(ue.a,{})})}))},Ie=a(594),Te=Object(w.a)((function(e){return Object(S.a)({root:function(t){return{"& label.Mui-focused":{color:t?e.palette.neutral.status.dirty:e.palette.primary.main},"& .MuiInput-underline:after":{borderBottomColor:t?e.palette.neutral.status.dirty:e.palette.primary.main},"& label":{color:t?e.palette.neutral.status.dirty:e.palette.neutral.emphasisText.medium}}}})})),Ae=function(e){var t=e.name,a=e.formik,n=!0!==e.noDirty&&a.values[t]!==a.initialValues[t],r=Te(n),i={value:void 0===a.values[t]?"":a.values[t],onChange:a.handleChange,onBlur:a.handleBlur,error:a.status||void 0!==a.errors[t],helperText:a.touched[t]&&a.errors[t]};return Object(g.jsx)(Ie.a,Object(o.a)(Object(o.a)({className:r.root,InputLabelProps:{shrink:""!==a.values[t]}},i),e))},qe=a(593),Be=[{code:"ES",label:"Spain",phone:"34"},{code:"AD",label:"Andorra",phone:"376"},{code:"AE",label:"United Arab Emirates",phone:"971"},{code:"AF",label:"Afghanistan",phone:"93"},{code:"AG",label:"Antigua and Barbuda",phone:"1-268"},{code:"AI",label:"Anguilla",phone:"1-264"},{code:"AL",label:"Albania",phone:"355"},{code:"AM",label:"Armenia",phone:"374"},{code:"AO",label:"Angola",phone:"244"},{code:"AQ",label:"Antarctica",phone:"672"},{code:"AR",label:"Argentina",phone:"54"},{code:"AS",label:"American Samoa",phone:"1-684"},{code:"AT",label:"Austria",phone:"43"},{code:"AU",label:"Australia",phone:"61",suggested:!0},{code:"AW",label:"Aruba",phone:"297"},{code:"AX",label:"Alland Islands",phone:"358"},{code:"AZ",label:"Azerbaijan",phone:"994"},{code:"BA",label:"Bosnia and Herzegovina",phone:"387"},{code:"BB",label:"Barbados",phone:"1-246"},{code:"BD",label:"Bangladesh",phone:"880"},{code:"BE",label:"Belgium",phone:"32"},{code:"BF",label:"Burkina Faso",phone:"226"},{code:"BG",label:"Bulgaria",phone:"359"},{code:"BH",label:"Bahrain",phone:"973"},{code:"BI",label:"Burundi",phone:"257"},{code:"BJ",label:"Benin",phone:"229"},{code:"BL",label:"Saint Barthelemy",phone:"590"},{code:"BM",label:"Bermuda",phone:"1-441"},{code:"BN",label:"Brunei Darussalam",phone:"673"},{code:"BO",label:"Bolivia",phone:"591"},{code:"BR",label:"Brazil",phone:"55"},{code:"BS",label:"Bahamas",phone:"1-242"},{code:"BT",label:"Bhutan",phone:"975"},{code:"BV",label:"Bouvet Island",phone:"47"},{code:"BW",label:"Botswana",phone:"267"},{code:"BY",label:"Belarus",phone:"375"},{code:"BZ",label:"Belize",phone:"501"},{code:"CA",label:"Canada",phone:"1",suggested:!0},{code:"CC",label:"Cocos (Keeling) Islands",phone:"61"},{code:"CD",label:"Congo, Democratic Republic of the",phone:"243"},{code:"CF",label:"Central African Republic",phone:"236"},{code:"CG",label:"Congo, Republic of the",phone:"242"},{code:"CH",label:"Switzerland",phone:"41"},{code:"CI",label:"Cote d'Ivoire",phone:"225"},{code:"CK",label:"Cook Islands",phone:"682"},{code:"CL",label:"Chile",phone:"56"},{code:"CM",label:"Cameroon",phone:"237"},{code:"CN",label:"China",phone:"86"},{code:"CO",label:"Colombia",phone:"57"},{code:"CR",label:"Costa Rica",phone:"506"},{code:"CU",label:"Cuba",phone:"53"},{code:"CV",label:"Cape Verde",phone:"238"},{code:"CW",label:"Curacao",phone:"599"},{code:"CX",label:"Christmas Island",phone:"61"},{code:"CY",label:"Cyprus",phone:"357"},{code:"CZ",label:"Czech Republic",phone:"420"},{code:"DE",label:"Germany",phone:"49",suggested:!0},{code:"DJ",label:"Djibouti",phone:"253"},{code:"DK",label:"Denmark",phone:"45"},{code:"DM",label:"Dominica",phone:"1-767"},{code:"DO",label:"Dominican Republic",phone:"1-809"},{code:"DZ",label:"Algeria",phone:"213"},{code:"EC",label:"Ecuador",phone:"593"},{code:"EE",label:"Estonia",phone:"372"},{code:"EG",label:"Egypt",phone:"20"},{code:"EH",label:"Western Sahara",phone:"212"},{code:"ER",label:"Eritrea",phone:"291"},{code:"ET",label:"Ethiopia",phone:"251"},{code:"FI",label:"Finland",phone:"358"},{code:"FJ",label:"Fiji",phone:"679"},{code:"FK",label:"Falkland Islands (Malvinas)",phone:"500"},{code:"FM",label:"Micronesia, Federated States of",phone:"691"},{code:"FO",label:"Faroe Islands",phone:"298"},{code:"FR",label:"France",phone:"33",suggested:!0},{code:"GA",label:"Gabon",phone:"241"},{code:"GB",label:"United Kingdom",phone:"44"},{code:"GD",label:"Grenada",phone:"1-473"},{code:"GE",label:"Georgia",phone:"995"},{code:"GF",label:"French Guiana",phone:"594"},{code:"GG",label:"Guernsey",phone:"44"},{code:"GH",label:"Ghana",phone:"233"},{code:"GI",label:"Gibraltar",phone:"350"},{code:"GL",label:"Greenland",phone:"299"},{code:"GM",label:"Gambia",phone:"220"},{code:"GN",label:"Guinea",phone:"224"},{code:"GP",label:"Guadeloupe",phone:"590"},{code:"GQ",label:"Equatorial Guinea",phone:"240"},{code:"GR",label:"Greece",phone:"30"},{code:"GS",label:"South Georgia and the South Sandwich Islands",phone:"500"},{code:"GT",label:"Guatemala",phone:"502"},{code:"GU",label:"Guam",phone:"1-671"},{code:"GW",label:"Guinea-Bissau",phone:"245"},{code:"GY",label:"Guyana",phone:"592"},{code:"HK",label:"Hong Kong",phone:"852"},{code:"HM",label:"Heard Island and McDonald Islands",phone:"672"},{code:"HN",label:"Honduras",phone:"504"},{code:"HR",label:"Croatia",phone:"385"},{code:"HT",label:"Haiti",phone:"509"},{code:"HU",label:"Hungary",phone:"36"},{code:"ID",label:"Indonesia",phone:"62"},{code:"IE",label:"Ireland",phone:"353"},{code:"IL",label:"Israel",phone:"972"},{code:"IM",label:"Isle of Man",phone:"44"},{code:"IN",label:"India",phone:"91"},{code:"IO",label:"British Indian Ocean Territory",phone:"246"},{code:"IQ",label:"Iraq",phone:"964"},{code:"IR",label:"Iran, Islamic Republic of",phone:"98"},{code:"IS",label:"Iceland",phone:"354"},{code:"IT",label:"Italy",phone:"39"},{code:"JE",label:"Jersey",phone:"44"},{code:"JM",label:"Jamaica",phone:"1-876"},{code:"JO",label:"Jordan",phone:"962"},{code:"JP",label:"Japan",phone:"81",suggested:!0},{code:"KE",label:"Kenya",phone:"254"},{code:"KG",label:"Kyrgyzstan",phone:"996"},{code:"KH",label:"Cambodia",phone:"855"},{code:"KI",label:"Kiribati",phone:"686"},{code:"KM",label:"Comoros",phone:"269"},{code:"KN",label:"Saint Kitts and Nevis",phone:"1-869"},{code:"KP",label:"Korea, Democratic People's Republic of",phone:"850"},{code:"KR",label:"Korea, Republic of",phone:"82"},{code:"KW",label:"Kuwait",phone:"965"},{code:"KY",label:"Cayman Islands",phone:"1-345"},{code:"KZ",label:"Kazakhstan",phone:"7"},{code:"LA",label:"Lao People's Democratic Republic",phone:"856"},{code:"LB",label:"Lebanon",phone:"961"},{code:"LC",label:"Saint Lucia",phone:"1-758"},{code:"LI",label:"Liechtenstein",phone:"423"},{code:"LK",label:"Sri Lanka",phone:"94"},{code:"LR",label:"Liberia",phone:"231"},{code:"LS",label:"Lesotho",phone:"266"},{code:"LT",label:"Lithuania",phone:"370"},{code:"LU",label:"Luxembourg",phone:"352"},{code:"LV",label:"Latvia",phone:"371"},{code:"LY",label:"Libya",phone:"218"},{code:"MA",label:"Morocco",phone:"212"},{code:"MC",label:"Monaco",phone:"377"},{code:"MD",label:"Moldova, Republic of",phone:"373"},{code:"ME",label:"Montenegro",phone:"382"},{code:"MF",label:"Saint Martin (French part)",phone:"590"},{code:"MG",label:"Madagascar",phone:"261"},{code:"MH",label:"Marshall Islands",phone:"692"},{code:"MK",label:"Macedonia, the Former Yugoslav Republic of",phone:"389"},{code:"ML",label:"Mali",phone:"223"},{code:"MM",label:"Myanmar",phone:"95"},{code:"MN",label:"Mongolia",phone:"976"},{code:"MO",label:"Macao",phone:"853"},{code:"MP",label:"Northern Mariana Islands",phone:"1-670"},{code:"MQ",label:"Martinique",phone:"596"},{code:"MR",label:"Mauritania",phone:"222"},{code:"MS",label:"Montserrat",phone:"1-664"},{code:"MT",label:"Malta",phone:"356"},{code:"MU",label:"Mauritius",phone:"230"},{code:"MV",label:"Maldives",phone:"960"},{code:"MW",label:"Malawi",phone:"265"},{code:"MX",label:"Mexico",phone:"52"},{code:"MY",label:"Malaysia",phone:"60"},{code:"MZ",label:"Mozambique",phone:"258"},{code:"NA",label:"Namibia",phone:"264"},{code:"NC",label:"New Caledonia",phone:"687"},{code:"NE",label:"Niger",phone:"227"},{code:"NF",label:"Norfolk Island",phone:"672"},{code:"NG",label:"Nigeria",phone:"234"},{code:"NI",label:"Nicaragua",phone:"505"},{code:"NL",label:"Netherlands",phone:"31"},{code:"NO",label:"Norway",phone:"47"},{code:"NP",label:"Nepal",phone:"977"},{code:"NR",label:"Nauru",phone:"674"},{code:"NU",label:"Niue",phone:"683"},{code:"NZ",label:"New Zealand",phone:"64"},{code:"OM",label:"Oman",phone:"968"},{code:"PA",label:"Panama",phone:"507"},{code:"PE",label:"Peru",phone:"51"},{code:"PF",label:"French Polynesia",phone:"689"},{code:"PG",label:"Papua New Guinea",phone:"675"},{code:"PH",label:"Philippines",phone:"63"},{code:"PK",label:"Pakistan",phone:"92"},{code:"PL",label:"Poland",phone:"48"},{code:"PM",label:"Saint Pierre and Miquelon",phone:"508"},{code:"PN",label:"Pitcairn",phone:"870"},{code:"PR",label:"Puerto Rico",phone:"1"},{code:"PS",label:"Palestine, State of",phone:"970"},{code:"PT",label:"Portugal",phone:"351"},{code:"PW",label:"Palau",phone:"680"},{code:"PY",label:"Paraguay",phone:"595"},{code:"QA",label:"Qatar",phone:"974"},{code:"RE",label:"Reunion",phone:"262"},{code:"RO",label:"Romania",phone:"40"},{code:"RS",label:"Serbia",phone:"381"},{code:"RU",label:"Russian Federation",phone:"7"},{code:"RW",label:"Rwanda",phone:"250"},{code:"SA",label:"Saudi Arabia",phone:"966"},{code:"SB",label:"Solomon Islands",phone:"677"},{code:"SC",label:"Seychelles",phone:"248"},{code:"SD",label:"Sudan",phone:"249"},{code:"SE",label:"Sweden",phone:"46"},{code:"SG",label:"Singapore",phone:"65"},{code:"SH",label:"Saint Helena",phone:"290"},{code:"SI",label:"Slovenia",phone:"386"},{code:"SJ",label:"Svalbard and Jan Mayen",phone:"47"},{code:"SK",label:"Slovakia",phone:"421"},{code:"SL",label:"Sierra Leone",phone:"232"},{code:"SM",label:"San Marino",phone:"378"},{code:"SN",label:"Senegal",phone:"221"},{code:"SO",label:"Somalia",phone:"252"},{code:"SR",label:"Suriname",phone:"597"},{code:"SS",label:"South Sudan",phone:"211"},{code:"ST",label:"Sao Tome and Principe",phone:"239"},{code:"SV",label:"El Salvador",phone:"503"},{code:"SX",label:"Sint Maarten (Dutch part)",phone:"1-721"},{code:"SY",label:"Syrian Arab Republic",phone:"963"},{code:"SZ",label:"Swaziland",phone:"268"},{code:"TC",label:"Turks and Caicos Islands",phone:"1-649"},{code:"TD",label:"Chad",phone:"235"},{code:"TF",label:"French Southern Territories",phone:"262"},{code:"TG",label:"Togo",phone:"228"},{code:"TH",label:"Thailand",phone:"66"},{code:"TJ",label:"Tajikistan",phone:"992"},{code:"TK",label:"Tokelau",phone:"690"},{code:"TL",label:"Timor-Leste",phone:"670"},{code:"TM",label:"Turkmenistan",phone:"993"},{code:"TN",label:"Tunisia",phone:"216"},{code:"TO",label:"Tonga",phone:"676"},{code:"TR",label:"Turkey",phone:"90"},{code:"TT",label:"Trinidad and Tobago",phone:"1-868"},{code:"TV",label:"Tuvalu",phone:"688"},{code:"TW",label:"Taiwan, Province of China",phone:"886"},{code:"TZ",label:"United Republic of Tanzania",phone:"255"},{code:"UA",label:"Ukraine",phone:"380"},{code:"UG",label:"Uganda",phone:"256"},{code:"US",label:"United States",phone:"1",suggested:!0},{code:"UY",label:"Uruguay",phone:"598"},{code:"UZ",label:"Uzbekistan",phone:"998"},{code:"VA",label:"Holy See (Vatican City State)",phone:"379"},{code:"VC",label:"Saint Vincent and the Grenadines",phone:"1-784"},{code:"VE",label:"Venezuela",phone:"58"},{code:"VG",label:"British Virgin Islands",phone:"1-284"},{code:"VI",label:"US Virgin Islands",phone:"1-340"},{code:"VN",label:"Vietnam",phone:"84"},{code:"VU",label:"Vanuatu",phone:"678"},{code:"WF",label:"Wallis and Futuna",phone:"681"},{code:"WS",label:"Samoa",phone:"685"},{code:"XK",label:"Kosovo",phone:"383"},{code:"YE",label:"Yemen",phone:"967"},{code:"YT",label:"Mayotte",phone:"262"},{code:"ZA",label:"South Africa",phone:"27"},{code:"ZM",label:"Zambia",phone:"260"},{code:"ZW",label:"Zimbabwe",phone:"263"},{code:"",label:"empty",phone:"-"},{code:"OTHER",label:"other",phone:"-"}],Pe=["formik","noDirty","name","label","style"];var Fe=Object(w.a)((function(e){return Object(S.a)({textField:function(t){return{"& label.Mui-focused":{color:t?e.palette.neutral.status.dirty:e.palette.primary.main},"& .MuiInput-underline:after":{borderBottomColor:t?e.palette.neutral.status.dirty:e.palette.primary.main},"& label":{color:t?e.palette.neutral.status.dirty:e.palette.neutral.emphasisText.medium},"& fieldset":{borderColor:t?e.palette.neutral.status.dirty:e.palette.neutral.emphasisText.medium}}},option:{fontSize:15,"& > span":{marginRight:10,fontSize:18}}})}));function Ee(e){var t=e.formik,a=e.noDirty,n=e.name,i=e.label,c=e.style,s=void 0===c?{width:300}:c,d=(Object(f.a)(e,Pe),function(e){return void 0===e?Be.find((function(e){return""===e.code})):Be.find((function(t){return t.code===e}))}),u=r.a.useState(d(t.values[n])),b=Object(l.a)(u,2),h=b[0],m=b[1];r.a.useEffect((function(){m(d(t.values[n]))}),[t.values,n]);var j=!0!==a&&t.values[n]!==t.initialValues[n],p=Fe(j),O=r.a.useState(""),x=Object(l.a)(O,2),_=x[0],v=x[1],y=Object(ne.a)().t;return Object(g.jsx)(qe.a,{style:s,options:Be,classes:{option:p.option},autoHighlight:!0,getOptionLabel:function(e){return y(e.code)},getOptionSelected:function(e){return e.code===h.code},value:h,onChange:function(e,a){!function(e){var a=null!==e?e.code:"";t.setFieldValue(n,a),m(e)}(a)},inputValue:_,onInputChange:function(e,t){v(t)},name:n,onBlur:t.handleBlur,renderOption:function(e){return Object(g.jsxs)(r.a.Fragment,{children:[Object(g.jsx)("span",{children:""!==e.code&&"OTHER"!==e.code?(t=e.code,"undefined"!==typeof String.fromCodePoint?t.toUpperCase().replace(/./g,(function(e){return String.fromCodePoint(e.charCodeAt(0)+127397)})):t):""}),""!==e.code&&"OTHER"!==e.code?y(e.code):y(e.label)," ",""!==e.code&&"OTHER"!==e.code?"("+e.code+") +"+e.phone:""]},e.code);var t},renderInput:function(e){return Object(g.jsx)(Ie.a,Object(o.a)(Object(o.a)({},e),{},{label:i,noDirty:a,className:p.textField,inputProps:Object(o.a)(Object(o.a)({},e.inputProps),{},{autoComplete:"new-password"}),error:t.status||void 0!==t.errors[n],helperText:t.touched[n]&&t.errors[n]}))}})}var De=a(555);function Re(){var e=r.a.useContext(x),t=Object(j.b)(),a=t.enqueueSnackbar,n=t.closeSnackbar,i=Object(ne.a)().t,c=function(e){return function(t){return function(e,t){return t&&a(i("success"),{variant:"success"}),Promise.resolve(e)}(t,e)}},s=function(t){return e.setUser({logged:!1,ping:!1}),a(i("warning_not_logged_in"),{variant:"warning"}),Promise.reject(t)},o=function(e){return a(i("warning_not_enough_privileges"),{variant:"warning"}),Promise.reject(e)},l=function(e,t,c,l,d,u){var b=function(e){return function(e,t){var c=function(c){a("Something went wrong! \ud83d\ude23 ".concat(c),{variant:"error",autoHideDuration:1e4,action:function(a){return Object(g.jsxs)(r.a.Fragment,{children:[Object(g.jsx)("img",{src:"logo_centrifuga4_dark_error.svg",alt:"Logo Centr\xedfuga",style:{height:"35px"}}),t?Object(g.jsx)(De.a,{onClick:function(){navigator.clipboard.writeText("TO: vazquezrius.miquel@gmail.com\n\nTo mark an item, use a cross, like this: [X]\n\n\ud83d\udece\ufe0f TRIAGE\n[ ] This issue has been reported previously and has NOT been marked as solved\n[ ] This issue has been reported previously and has been marked as solved\n[ ] This issue has not been reported previously\n[ ] I have written the steps to reproduce the issue in the specified section below - \u26a0\ufe0frequired!\n\n\ud83d\ude4b TYPE OF REQUEST\n[ ] Feature request\n[X] Error report\n\n\ud83d\udccb STEPS\nDescribe what were you doing when this error happened!\n\n example\n 1. Searched 'john' in the students section, two students appeared.\n 2. Clicked the CSV export option.\n 3. Nothing happened, the the error message appeared.\n\nWrite your steps for repeating the issue here:\n1. ...\n\n\n\ud83d\udcda STACK TRACE\n"+JSON.stringify(e)+"\n\n\n\ud83c\udf29\ufe0f RESPONSE\n"+JSON.stringify(e.response)+"\n\n\n\u2699\ufe0f DEVICE CONTEXT\n"+navigator.platform+"\n"+navigator.userAgent+"\n"+navigator.appVersion+"\n"+navigator.vendor+"\n").then((function(e){n(a),alert("Okey, so something got messed up... \ud83d\ude23 Let's fix it!\n\n\ud83d\udce4 Open your email client\n\ud83d\udccb Ctrl+V\n\u270f\ufe0f Fill in the details\n\ud83d\udce8 Send it to the support team!\n\n")}))},children:i("Report")}):null,Object(g.jsx)(De.a,{onClick:function(){n(a)},children:i("Dismiss")})]})}})};return"blob"==e.request.responseType?e.response.data.text().then((function(e){c(JSON.parse(e).message)})):c(""),Promise.reject(e)}(e,u)};if(401===e.request.status){if(!t)return Promise.reject(e);b=s}if(403===e.request.status){if(!c)return Promise.reject(e);b=o}return 400!==e.request.status||l?d?b(e):(b(e).catch((function(){})),null):Promise.reject(e)},d=function(e,t,a,n,r){return function(i){return l(i,e,t,a,n,r)}};return function(e){var t=e.handle401,a=void 0===t||t,n=e.handle403,r=void 0===n||n,i=e.handle400,s=void 0===i||i,o=e.errorOut,l=void 0===o||o,u=e.reportUnexpected,b=void 0===u||u,h=e.snackbarSuccess;return[c(void 0!==h&&h),d(a,r,s,l,b)]}}var Me=a(55);function Le(e,t){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n={};if("initialValues"in t){var r={};n=t.initialValues;for(var i=0,c=Object.entries(n);i0?(l(),(r=n.patch({id:p.id,body:e,initial_values:p})).then.apply(r,Object(s.a)(j({snackbarSuccess:!0}))).then((function(t){f.resetForm(t),c(t),"function"===typeof u&&u(e)})).catch((function(e){l(!0)})).finally((function(){d(!1)}))):d(!1)}});return Object(g.jsx)(le.a,{children:b?Object(g.jsxs)(le.a,{children:[Object(g.jsx)(Ne,{className:m.actionIcon}),Object(g.jsx)(Ne,{className:m.actionIcon}),Object(g.jsx)("div",{style:{clear:"both"},children:["100%","100%","100%","100%","100%","100%"].map((function(e,t){return Object(g.jsx)(le.a,{py:0,children:Object(g.jsx)(Ce.a,{variant:"text",width:e,height:"60px"})},t)}))})]}):Object(g.jsxs)("form",{onSubmit:f.handleSubmit,children:[Object(g.jsx)(Ke,{className:m.actionIcon,formik:f}),Object(g.jsx)(Xe,{className:m.actionIcon,formik:f}),Object(g.jsx)(Ae,{label:h("id"),name:"id",disabled:!0,className:m.line,formik:f}),Object(g.jsxs)(le.a,{className:[m.line,m.composite],children:[Object(g.jsx)(Ae,{label:h("name"),style:{flex:1},name:"name",formik:f}),Object(g.jsx)(Ae,{label:h("surname1"),style:{flex:1},name:"surname1",formik:f}),Object(g.jsx)(Ae,{label:h("surname2"),style:{flex:1},formik:f,name:"surname2"})]}),Object(g.jsx)(le.a,{className:[m.line,m.composite],children:Object(g.jsx)(Ae,{label:h("email"),type:"email",style:{flex:1},formik:f,name:"email",helperText:f.touched.email&&f.errors.email})}),Object(g.jsx)(le.a,{my:3,children:Object(g.jsx)(P.a,{})}),Object(g.jsxs)(le.a,{className:[m.line,m.composite],children:[Object(g.jsx)(Ae,{label:h("address"),formik:f,style:{flex:4},name:"address"}),Object(g.jsx)(Ae,{label:h("city"),style:{flex:2},formik:f,name:"city"}),Object(g.jsx)(Ae,{label:h("zip"),formik:f,type:"number",style:{flex:1},name:"zip"})]}),Object(g.jsxs)(le.a,{className:[m.line,m.composite],children:[Object(g.jsx)(Ae,{label:h("dni"),style:{flex:1},formik:f,name:"dni"}),Object(g.jsx)(Ae,{label:h("phone"),type:"tel",style:{flex:1},formik:f,name:"phone"})]}),Object(g.jsxs)(le.a,{className:[m.line,m.composite],children:[Object(g.jsx)(Ee,{formik:f,style:{flex:1},name:"country_of_origin",label:h("country_of_origin")}),Object(g.jsxs)(Ae,{label:h("gender"),style:{flex:1},formik:f,name:"gender",select:!0,children:[Object(g.jsx)(be.a,{value:"m",children:h("male")}),Object(g.jsx)(be.a,{value:"f",children:h("female")}),Object(g.jsx)(be.a,{value:"nb",children:h("nb")})]})]}),Object(g.jsx)(le.a,{my:3,children:Object(g.jsx)(P.a,{})}),Object(g.jsxs)(le.a,{className:[m.line,m.composite],children:[Object(g.jsxs)(Ae,{label:h("is_studying"),style:{flex:1},name:"is_studying",formik:f,select:!0,children:[Object(g.jsx)(be.a,{value:!0,children:h("yes")}),Object(g.jsx)(be.a,{value:!1,children:h("no")})]}),Object(g.jsx)(Ae,{label:h("education_entity"),style:{flex:2},formik:f,name:"education_entity"}),Object(g.jsx)(Ae,{label:h("education_year"),style:{flex:2},name:"education_year",formik:f,select:!0,children:Ge.map((function(e){return Object(g.jsx)(be.a,{value:e,children:h(e)},e)}))})]}),Object(g.jsxs)(le.a,{className:[m.line,m.composite],children:[Object(g.jsxs)(Ae,{label:h("is_working"),style:{flex:1},name:"is_working",formik:f,select:!0,children:[Object(g.jsx)(be.a,{value:!0,children:h("yes")}),Object(g.jsx)(be.a,{value:!1,children:h("no")})]}),Object(g.jsx)(Ae,{label:h("career"),style:{flex:4},formik:f,name:"career"})]}),(t=l,void 0===t?null:Object(g.jsxs)("div",{children:[Object(g.jsx)(le.a,{my:3,children:Object(g.jsx)(P.a,{})}),t.map((function(e,t){return null==e?Object(g.jsx)(le.a,{my:3,children:Object(g.jsx)(P.a,{})}):Object(g.jsx)(le.a,{className:"".concat(m.line," ").concat(m.composite),children:e instanceof Array?e.map((function(e,a){return r.a.cloneElement(e,{formik:f,key:t+"-"+a})})):r.a.cloneElement(e,{formik:f})},t)}))]}))]})})},jt=a(560),pt=new(we("guardians")),ft=new(we("payments")),Ot=a(44),xt=a.n(Ot),gt=a(96),_t=a.n(gt),vt=a(27),yt=a.n(vt),wt=a(67),St=a.n(wt),kt=["bank-transfer","cash","bank-direct-debit"],Ct={name:null,surname1:null,surname2:null,email:null,address:null,city:null,zip:null,dni:null,phone:null,gender:null,country_of_origin:null,is_studying:null,education_entity:null,education_year:null,is_working:null,career:null},Nt=Object(o.a)(Object(o.a)({},Ct),{},{relation:null}),It=Object(o.a)(Object(o.a)({},Ct),{},{price_term:null,payment_comments:null,birth_date:null,other_comments:null,image_agreement:null,enrolment_status:null,default_payment_method:null}),Tt=r.a.createContext({loading:!1,startLoading:function(){},stopLoading:function(){}}),At=["children","setNewStudent","addStudentId","newStudent","title","currentStudent","updateCurrentStudent","patchService","deleteStudent","addNewGuardian"],qt=Object(w.a)((function(e){return{actionIcon:{float:"right"},button:{margin:e.spacing(1)},line:{width:"100%",marginTop:e.spacing(1)},composite:{display:"flex",flexDirection:"row",flex:1,flexWrap:"wrap",gap:e.spacing(1),width:"100%"}}}));var Bt=function(e){e.children;var t=e.setNewStudent,a=e.addStudentId,n=e.newStudent,i=(e.title,e.currentStudent),c=e.updateCurrentStudent,d=e.patchService,u=e.deleteStudent,b=e.addNewGuardian,h=(Object(f.a)(e,At),Object(ne.a)().t),m=null===i,j=qt(),O=Re(),x=Ze(),_=Object(l.a)(x,2),v=_[0],y=_[1],w=r.a.useContext(p),S=r.a.useContext(Tt),k=function(){var e,t;S.startLoading(),(t=i.id,e=new Promise((function(e,a){yt()({method:"post",url:"".concat(xe,"/emails/v1/grantEmail/").concat(t),headers:Object(o.a)(Object(o.a)({},{"Content-Type":"application/json","Cache-Control":"no-cache"}),fe())}).then((function(t){e(t)})).catch((function(e){a(e)}))}))).then.apply(e,Object(s.a)(O({snackbarSuccess:!0}))).finally((function(){S.stopLoading()}))},C=function(){var e,t;S.startLoading(),(t=i.id,e=new Promise((function(e,a){yt()({method:"post",url:"".concat(xe,"/emails/v1/enrolmentEmail/").concat(t),headers:Object(o.a)(Object(o.a)({},{"Content-Type":"application/json","Cache-Control":"no-cache"}),fe())}).then((function(t){e(t)})).catch((function(e){a(e)}))}))).then.apply(e,Object(s.a)(O({snackbarSuccess:!0}))).finally((function(){S.stopLoading()}))};return Object(g.jsx)(r.a.Fragment,{children:Object(g.jsx)(le.a,{p:3,children:Object(g.jsxs)(le.a,{px:2,children:[m?!n&&Object(g.jsx)(Ne,{className:j.actionIcon}):!n&&v([y.guardians,y.post])&&Object(g.jsx)(R.a,{style:{float:"right"},title:h("new_guardian"),"aria-label":h("new_guardian"),children:Object(g.jsx)(N.a,{onClick:function(e){b()},children:Object(g.jsx)(ue.a,{})})}),m&&!n?Object(g.jsx)(Ne,{className:j.actionIcon}):v([y.delete])&&Object(g.jsx)(R.a,{style:{float:"right"},title:h("delete"),"aria-label":h("delete"),children:Object(g.jsx)(N.a,{onClick:function(e){n?t(!1):w.confirm("delete_student_question","student_also_deletes",(function(){!function(){var e;(e=Se.delete(i.id)).then.apply(e,Object(s.a)(O({snackbarSuccess:!0}))).then((function(e){var t,a;(t=ft.deleteMany(i.payments)).then.apply(t,Object(s.a)(O({}))).then((function(e){})),(a=pt.deleteMany(i.guardians)).then.apply(a,Object(s.a)(O({}))).then((function(e){})),u(i.id)}))}(i.id)}))},children:Object(g.jsx)(xt.a,{})})}),Object(g.jsx)(mt,{currentPerson:n?It:i,newPerson:n,updateCurrentStudent:function(e){if(!n)return c(e);a(e)},patchService:d,onUpdate:function(e){"enrolment_status"in e&&"enrolled"===e.enrolment_status&&w.confirm("send_grant_letter_question","this_will_be_sent",(function(){k()}))},additionalValidation:{enrolment_status:ke.f().required(h("status_required")),image_agreement:ke.a().required(h("image_required")),birth_date:ke.b().required(h("birthdate_required"))},additionalFields:[[Object(g.jsx)(Ae,{label:h("price_term"),style:{flex:1},name:"price_term",type:"number",InputProps:{endAdornment:Object(g.jsx)(jt.a,{position:"end",children:"\u20ac"})}}),Object(g.jsx)(Ae,{label:h("default_payment_method"),style:{flex:1},name:"default_payment_method",select:!0,children:kt.map((function(e){return Object(g.jsx)(be.a,{value:e,children:h(e)},e)}))})],Object(g.jsx)(Ae,{label:h("payment_comments"),style:{flex:1},multiline:!0,rowsMax:8,name:"payment_comments"}),null,[Object(g.jsx)(Ae,{label:h("birthdate"),type:"date",style:{flex:1},name:"birth_date",InputLabelProps:{shrink:!0}}),Object(g.jsx)(Ae,{label:h("years_in_xamfra"),type:"number",style:{flex:1},name:"years_in_xamfra"})],[Object(g.jsx)(Ae,{label:h("status"),style:{flex:1},name:"enrolment_status",select:!0,children:["enrolled","early-unenrolled","pre-enrolled"].map((function(e){return Object(g.jsx)(be.a,{value:e,children:h(e)},e)}))}),Object(g.jsxs)(Ae,{label:h("image_agreement"),style:{flex:1},name:"image_agreement",select:!0,children:[Object(g.jsx)(be.a,{value:!0,children:h("yes")}),Object(g.jsx)(be.a,{value:!1,children:h("no")})]})],[Object(g.jsx)(Ae,{label:h("pre_enrolment_date"),type:"date",style:{flex:1},name:"pre_enrolment_date",InputLabelProps:{shrink:!0}}),Object(g.jsx)(Ae,{label:h("enrolment_date"),type:"date",style:{flex:1},name:"enrolment_date",InputLabelProps:{shrink:!0}}),Object(g.jsx)(Ae,{label:h("early_unenrolment_date"),type:"date",style:{flex:1},name:"early_unenrolment_date",InputLabelProps:{shrink:!0}})],Object(g.jsx)(Ae,{label:h("other_comments"),style:{flex:1},multiline:!0,rowsMax:8,name:"other_comments"})]}),!m&&!n&&Object(g.jsx)(le.a,{my:3,children:Object(g.jsx)(P.a,{})}),Object(g.jsxs)(le.a,{className:[j.line,j.composite],children:[!m&&!n&&v([y.send_email])&&Object(g.jsx)(R.a,{style:{flex:1},title:h("send_grant_letter"),"aria-label":h("send_grant_letter"),children:Object(g.jsx)(De.a,{variant:"contained",color:"default",className:j.button,disabled:S.loading,startIcon:Object(g.jsx)(_t.a,{}),onClick:function(e){k()},children:h("grant_letter")})}),!m&&!n&&Object(g.jsx)(R.a,{style:{flex:1},title:h("export_grant_letter"),"aria-label":h("export_grant_letter"),children:Object(g.jsx)(De.a,{variant:"contained",color:"default",className:j.button,disabled:S.loading,startIcon:Object(g.jsx)(St.a,{}),onClick:function(e){var t;S.loading||(S.startLoading(),(t=Se.downloadSubresource(i.id,"grantLetter")).then.apply(t,Object(s.a)(O({snackbarSuccess:!0}))).finally((function(){S.stopLoading()})))},children:h("grant_letter")})})]}),Object(g.jsxs)(le.a,{className:[j.line,j.composite],children:[!m&&!n&&v([y.send_email])&&Object(g.jsx)(R.a,{style:{flex:1},title:h("send_enrolment_agreement"),"aria-label":h("enrolment_agreement"),children:Object(g.jsx)(De.a,{variant:"contained",color:"default",className:j.button,startIcon:Object(g.jsx)(_t.a,{}),disabled:S.loading,onClick:function(e){C()},children:h("enrolment_agreement")})}),!m&&!n&&Object(g.jsx)(R.a,{style:{flex:1},title:h("export_enrolment_agreement"),"aria-label":h("export_enrolment_agreement"),children:Object(g.jsx)(De.a,{variant:"contained",color:"default",className:j.button,startIcon:Object(g.jsx)(St.a,{}),disabled:S.loading,onClick:function(e){var t;S.loading||(S.startLoading(),(t=Se.downloadSubresource(i.id,"enrolmentAgreement")).then.apply(t,Object(s.a)(O({snackbarSuccess:!0}))).finally((function(){S.stopLoading()})))},children:h("enrolment_agreement")})})]})]})})})},Pt=new(we("students","guardians")),Ft=["father","mother","grandfather","grandmother","brother","sister","uncle","aunt","cousin","legal_guardian","ss_agent","other"],Et=["studentId","title","guardianId","deleteGuardianId","addGuardianId","deleteNewGuardian","newGuardian"];var Dt=function(e){var t=e.studentId,a=(e.title,e.guardianId),i=e.deleteGuardianId,c=e.addGuardianId,o=e.deleteNewGuardian,d=e.newGuardian,u=void 0!==d&&d,b=(Object(f.a)(e,Et),Object(ne.a)().t),h=Re(),m=Object(n.useState)(null),j=Object(l.a)(m,2),O=j[0],x=j[1],_=Ze(),v=Object(l.a)(_,2),y=v[0],w=v[1];Object(n.useEffect)((function(){var e;u||(e=pt.getOne(a)).then.apply(e,Object(s.a)(h({}))).then((function(e){x(e.data)}))}),[a]);var S=r.a.useContext(p);return Object(g.jsx)(r.a.Fragment,{children:Object(g.jsx)(le.a,{p:3,children:Object(g.jsxs)(le.a,{px:2,children:[y([w.delete])&&Object(g.jsx)(N.a,{style:{float:"right"},onClick:function(e){u?o():S.confirm("delete_guardian_question","not_undone",(function(){var e;(e=pt.delete(a)).then.apply(e,Object(s.a)(h({snackbarSuccess:!0}))).then((function(e){i(a)}))}))},children:Object(g.jsx)(R.a,{title:b("delete"),"aria-label":b("delete"),children:Object(g.jsx)(xt.a,{})})}),Object(g.jsx)(mt,{currentPerson:u?Nt:O,studentId:t,newPerson:u,updateCurrentStudent:function(e){var a;if(!u)return x(e);(a=Pt.postWithId(t,e)).then.apply(a,Object(s.a)(h({snackbarSuccess:!0}))).then((function(){c(e)}))},patchService:pt,additionalValidation:{relation:ke.f().required(b("relation_required"))},additionalFields:[[Object(g.jsxs)(Ae,{label:b("relation"),style:{flex:1},name:"relation",select:!0,children:[Ft.map((function(e){return Object(g.jsx)(be.a,{value:e,children:b(e)},e)})),"))}"]})]]})]})})})},Rt=a(68),Mt=a(126),Lt=a.n(Mt),Gt=a(201),zt=a.n(Gt),Vt=a(202),Ut=a.n(Vt),Kt=a(561),Wt=a(562),Ht=a(564),Yt=a(563),Zt=a(548),Jt=a(599),Xt=a(200),Qt=a.n(Xt),$t=a(127),ea=a.n($t),ta=a(565),aa=Object(w.a)((function(e){return{root:{maxWidth:"100%",backgroundColor:"dark"===e.palette.type?"#575757":null},expand:{transform:"rotate(0deg)",marginLeft:"auto",transition:e.transitions.create("transform",{duration:e.transitions.duration.shortest})},expandOpen:{transform:"rotate(180deg)"},avatar:{backgroundColor:e.palette.secondary.main},line:{width:"100%",marginTop:e.spacing(1)},composite:{display:"flex",flexDirection:"row",flex:1,flexWrap:"wrap",gap:e.spacing(1),width:"100%"}}}));function na(e){var t=e.payment,a=e.updatePayment,n=e.deletePayment,i=e.newPayment,c=void 0!==i&&i,d=e.addPaymentId,u=e.student_id,b=Object(ne.a)().t,h=aa(),m=r.a.useState(c),j=Object(l.a)(m,2),f=j[0],O=j[1],x=Re(),_=Ze(),v=Object(l.a)(_,2),w=v[0],S=v[1],k=r.a.useContext(p),I=r.a.useContext(Tt),T=function(e){var t;I.startLoading(),(t=function(e){return new Promise((function(t,a){yt()({method:"post",url:"".concat(xe,"/emails/v1/paymentReceipt/").concat(e),headers:Object(o.a)(Object(o.a)({},{"Content-Type":"application/json","Cache-Control":"no-cache"}),fe())}).then((function(e){t(e)})).catch((function(e){a(e)}))}))}(e)).then.apply(t,Object(s.a)(x({snackbarSuccess:!0}))).finally((function(){I.stopLoading()}))},A=Le(!c,{initialValues:t,validationSchema:ke.d({method:bt(b,kt),quantity:ke.c().required(b("import_required")),date:ke.b().required(b("date_required"))}),enableReinitialize:!0,onSubmit:function(e,n){var r,i,l=n.setStatus,b=n.setSubmitting;Object.keys(e).length>0?(l(),c?(r=ft.post(Object(o.a)(Object(o.a)({},e),{},{student_id:u}))).then.apply(r,Object(s.a)(x({snackbarSuccess:!0}))).then((function(e){d(e.id),k.confirm("send_receipt","send_receipt",(function(){return T(e.id)}))})).catch((function(e){l(!0)})).finally((function(){b(!1)})):(i=ft.patch({id:t.id,body:e,initial_values:t})).then.apply(i,Object(s.a)(x({snackbarSuccess:!0}))).then((function(e){A.resetForm(e),a(e.id,e)})).catch((function(e){l(!0)})).finally((function(){b(!1)}))):b(!1)}});return Object(g.jsx)(le.a,{my:2,children:Object(g.jsxs)(Kt.a,{className:h.root,children:[Object(g.jsx)(Wt.a,{avatar:Object(g.jsx)(R.a,{title:"cash"===t.method?b("has_paid_cash"):"bank-transfer"===t.method?b("tooltip-bank-transfer"):"bank-direct-debit"===t.method?b("tooltip-bank-direct-debit"):b("other-payment-method"),children:Object(g.jsx)(Jt.a,{"aria-label":"recipe",className:h.avatar,children:"cash"===t.method?Object(g.jsx)(Qt.a,{}):"bank-transfer"===t.method?Object(g.jsx)(zt.a,{}):"bank-direct-debit"===t.method?Object(g.jsx)(X.a,{}):Object(g.jsx)(Lt.a,{})})}),action:w([S.delete])&&Object(g.jsx)(R.a,{title:b("delete"),"aria-label":b("delete"),children:Object(g.jsx)(N.a,{onClick:function(e){k.confirm("delete_payment","not_undone",(function(){n(t.id)}))},children:Object(g.jsx)(xt.a,{})})}),title:c?b("new_payment"):"".concat(b("has_paid")," ").concat(t.quantity,"\u20ac"),subheader:t.date}),!c&&Object(g.jsxs)(Yt.a,{disableSpacing:!0,children:[w([S.paymentReceipts])&&Object(g.jsx)(R.a,{title:b("export_receipt"),"aria-label":b("export_receipt"),children:Object(g.jsx)(N.a,{disabled:I.loading,"aria-label":b("export_receipt"),onClick:function(e){var a;I.startLoading(),(a=ft.downloadSubresource(t.id,"receipt")).then.apply(a,Object(s.a)(x({snackbarSuccess:!0}))).finally((function(){I.stopLoading()}))},children:Object(g.jsx)(Ut.a,{})})}),w([S.paymentReceipts,S.send_email])&&Object(g.jsx)(R.a,{title:b("send_receipt"),"aria-label":b("send_receipt"),children:Object(g.jsx)(N.a,{disabled:I.loading,"aria-label":b("send_receipt"),onClick:function(){return T(t.id)},children:Object(g.jsx)(_t.a,{})})}),Object(g.jsx)(N.a,{className:Object(C.a)(h.expand,Object(y.a)({},h.expandOpen,f)),onClick:function(){O(!f)},"aria-expanded":f,"aria-label":"show more",children:Object(g.jsx)(ea.a,{})})]}),Object(g.jsx)(Zt.a,{in:f,timeout:"auto",unmountOnExit:!0,children:Object(g.jsx)(Ht.a,{children:Object(g.jsx)(le.a,{children:null===t?Object(g.jsx)(le.a,{children:["100%","100%","100%"].map((function(e,t){return Object(g.jsx)(le.a,{py:0,children:Object(g.jsx)(Ce.a,{variant:"text",width:e,height:"60px"})},t)}))}):Object(g.jsxs)("form",{onSubmit:A.handleSubmit,children:[Object(g.jsx)(Ae,{label:b("id"),name:"id",disabled:!0,className:h.line,formik:A}),Object(g.jsxs)(le.a,{className:[h.line,h.composite],children:[Object(g.jsx)(Ae,{label:b("method"),style:{flex:1},formik:A,name:"method",select:!0,children:kt.map((function(e){return Object(g.jsx)(be.a,{value:e,children:b(e)},e)}))}),Object(g.jsx)(Ae,{label:b("import"),formik:A,type:"number",style:{flex:1},name:"quantity",InputProps:{endAdornment:Object(g.jsx)(jt.a,{position:"end",children:"\u20ac"})}}),Object(g.jsx)(Ae,{label:b("date"),formik:A,type:"date",style:{flex:1},name:"date",InputLabelProps:{shrink:!0}})]}),Object(g.jsx)(le.a,{className:[h.line,h.composite],children:Object(g.jsx)(Ae,{label:b("concept"),formik:A,style:{flex:1},multiline:!0,rowsMax:8,name:"concept"})}),Object(g.jsxs)(ta.a,{children:[Object(g.jsx)(De.a,{type:"button",className:"outline",onClick:A.handleReset,disabled:!A.dirty||A.isSubmitting,children:b("reset")}),w([S.patch])&&Object(g.jsx)(De.a,{type:"submit",disabled:!A.dirty||A.isSubmitting,children:b(c?"create":"save")})]})]})})})})]})})}var ra=a(128),ia=a.n(ra),ca=["children","title","paymentIds","deletePaymentFromStudent","addPaymentId","student_id"],sa=function(){var e=new Date,t=e.getDate(),a=e.getMonth()+1,n=e.getFullYear();return{id:null,date:"".concat(n,"-").concat(a<=9?"0"+a:a,"-").concat(t<=9?"0"+t:t),quantity:null,concept:null,method:null}},oa=Object(w.a)((function(e){return{actionIcon:{float:"right"},newLine:{width:"100%",marginTop:e.spacing(1),display:"flex",flexDirection:"column"}}}));var la,da=function(e){e.children,e.title;var t=e.paymentIds,a=e.deletePaymentFromStudent,r=e.addPaymentId,i=e.student_id,c=(Object(f.a)(e,ca),Object(ne.a)().t),o=oa(),d=Re(),u=null===t,b=Object(n.useState)([]),h=Object(l.a)(b,2),m=h[0],j=h[1],p=Object(n.useState)(!1),O=Object(l.a)(p,2),x=O[0],_=O[1];Object(n.useEffect)((function(){_(!1)}),[m]);var v=function(e,t){j(m.map((function(a){return a.id!==e?a:t})))},y=Ze(),w=Object(l.a)(y,2),S=w[0],k=w[1],C=function(e){var t;(t=ft.delete(e)).then.apply(t,Object(s.a)(d({snackbarSuccess:!0}))).then((function(t){a(e)}))};return Object(n.useEffect)((function(){var e;null!==t&&(0===t.length?j([]):(e=ft.getMany(t)).then.apply(e,Object(s.a)(d({}))).then((function(e){j(e.map((function(e){return e.data})).sort((function(e,t){return e.date.localeCompare(t.date)})))})))}),[t]),Object(g.jsxs)(le.a,{p:3,children:[" "," ",Object(g.jsxs)(le.a,{px:2,children:[u?Object(g.jsx)(Ne,{className:o.actionIcon}):S([k.post])&&Object(g.jsx)(R.a,{className:o.actionIcon,title:c("new_payment"),"aria-label":c("new_payment"),children:Object(g.jsx)(N.a,{onClick:function(e){_(!0)},children:Object(g.jsx)(ia.a,{})})}),Object(g.jsxs)("div",{className:o.newLine,children:[m&&m.map((function(e){return Object(g.jsx)(na,{payment:e,updatePayment:v,deletePayment:C},e.id)})),x&&Object(g.jsx)(na,{payment:sa(),updatePayment:v,deletePayment:function(e){_(!1)},newPayment:!0,student_id:i,addPaymentId:r}),u&&Object(g.jsx)(Ce.a,{width:"100%",height:"250px"}),!u&&0===m.length&&!x&&Object(g.jsx)(Rt.a,{children:c("no_payments")})]})]})]})},ua=new(we("schedules")),ba=a(39),ha=a(275),ma=a(311),ja=a(312),pa=a(309),fa=a(276),Oa=a(566),xa=a(567),ga=r.a.createContext({currentTab:null,goTo:function(e){}}),_a=["snapDuration","allowView","viewUrl","allowDelete","selectable","viewStudent","deleteCustom","scheduleIds","setScheduleIds","onEventClick","onEventSelected","onEventChange","editable"],va=function(e,t){return{daysOfWeek:[t.day_week],title:t.display_name,groupId:[t.id],id:t.id,startTime:t.start_time,endTime:t.end_time,color:t.is_base?e.palette.secondary.main:e.palette.secondary.light,textColor:(t.is_base,e.palette.secondary.contrastText),extendedProps:{schedule:t}}};function ya(e){if(console.log(typeof e),"function"===typeof e){for(var t=arguments.length,a=new Array(t>1?t-1:0),n=1;n",prevYear:"<<",nextYear:">>",today:"today",month:"month",week:"week",day:"day"},selectable:m,selectMirror:!0,dayMaxEvents:!0,weekends:!0,snapDuration:a,events:I,eventAdd:function(){},eventChange:function(e){},eventRemove:function(){},select:function(e){e.view.calendar.unselect(),O(e.start.getDay(),e.start.toLocaleTimeString("en-US",{hour12:!1}),e.end.toLocaleTimeString("en-US",{hour12:!1}))},eventContent:function(){},eventClick:function(e){!function(e){R({open:!0,event:e.event,schedule:e.event.extendedProps.schedule})}(e)},eventTimeFormat:{hour:"2-digit",minute:"2-digit",hour12:!1},eventResize:function(e){return B(x,e)},eventDrop:function(e){return B(x,e)}})})]})})};Object(w.a)((function(e){return{button:{margin:e.spacing(1)},calendar:{margin:e.spacing(2)}}}));var Sa=new(we("students","courses")),ka=new(we("courses")),Ca=a(518),Na=a(575),Ia=a(590),Ta=a(571),Aa=a(278),qa=a.n(Aa),Ba=a(319),Pa=a(277),Fa=a.n(Pa),Ea=Object(w.a)((function(e){return{root:{padding:"2px 4px",display:"flex",alignItems:"center",width:"100%"},input:{marginLeft:e.spacing(1),flex:1},iconButton:{padding:10}}}));function Da(e){var t=e.label,a=e.searchTitle,n=e.onChange,r=e.onSearch,i=Ea(),c=Object(ne.a)().t;return Object(g.jsxs)(re.a,{className:i.root,children:[Object(g.jsx)(Ba.a,{className:i.input,placeholder:c("search")+" "+t,inputProps:{"aria-label":"search "+t},value:a,onChange:n,onKeyPress:function(e){"Enter"===e.key&&(r(),e.preventDefault())}}),Object(g.jsx)(N.a,{type:"submit",className:i.iconButton,"aria-label":"search",onClick:r,children:Object(g.jsx)(Fa.a,{})})]})}var Ra=a(600),Ma=a(569),La=a(570),Ga=a(597),za=a(573),Va=r.a.createContext({theme:null,switchTheme:function(){},label:null}),Ua=Object(w.a)((function(e){return{root:{padding:"2px 4px",display:"flex",alignItems:"center",flexWrap:"wrap"}}}));function Ka(e){var t=e.searchTermField,a=void 0===t?"full_name":t,n=e.searchTerm,i=void 0===n?null:n,c=e.page,o=void 0===c?null:c,l=e.dataService,d=e.exportAll,u=void 0!==d&&d,b=e.getFilters,h=void 0===b?null:b,m=(Ua(),Object(ne.a)().t),j=Re(),p=r.a.useContext(Tt);return Object(g.jsx)(R.a,{title:m(u?"export_all_csv":"export_results_csv"),"aria-label":m(u?"export_all_csv":"export_results_csv"),children:Object(g.jsx)(Ga.a,{variant:"outlined",color:"primary",size:"small",disabled:p.loading,avatar:Object(g.jsx)(Jt.a,{children:"csv"}),label:m(u?"export_all":"export"),onClick:function(){var e;p.loading||(p.startLoading(),(e=l.downloadCsv(a,i,u?"*":o,null===h?{}:h(),u)).then.apply(e,Object(s.a)(j({}))).finally((function(){p.stopLoading()})))}})})}var Wa=qa()((function(e){return{root:{flex:1,overflow:"auto",display:"flex",flexDirection:"column"},list:{overflow:"auto",display:"flex",flexDirection:"column",flex:1,minHeight:"150px"},searchAndFilters:{display:"flex",flexDirection:"column"},pagination:{margin:e.spacing(3)},chip:{margin:e.spacing(2)},avatar:{},selectedAvatar:{backgroundColor:e.palette.primary.dark},chips:{flexWrap:"wrap","& > *":{margin:e.spacing(.5)},heading:{fontSize:e.typography.pxToRem(15),fontWeight:e.typography.fontWeightRegular}},noResults:{textAlign:"center"}}})),Ha=function(e){var t=e.setCurrentItemId,a=void 0===t?function(){}:t,i=e.auxFields,c=void 0===i?[]:i,d=e.displayText,u=void 0===d?null:d,b=e.onItemClick,h=void 0===b?function(){}:b,m=e.parent_id,j=void 0===m?null:m,p=e.secondaryDisplayNameField,f=void 0===p?null:p,O=e.secondaryAction,x=void 0===O?null:O,_=e.secondaryActionNeeds,v=void 0===_?[]:_,w=e.secondaryActionTooltip,S=void 0===w?null:w,k=e.secondaryActionIcon,C=void 0===k?null:k,I=e.secondaryActionCallable,T=void 0===I?null:I,A=e.withAvatar,q=void 0===A||A,B=e.withFiltersBox,D=void 0===B||B,L=e.chips,G=void 0===L?[]:L,z=e.currentItemId,V=void 0===z?null:z,U=e.items,K=e.setItems,W=e.displayNameField,H=void 0===W?"full_name":W,Y=e.usableFilters,Z=void 0===Y?[]:Y,J=e.defaultSearchBy,X=void 0===J?"full_name":J,Q=e.searchByOptions,$=void 0===Q?["full_name"]:Q,ee=e.dataService,te=e.searchBarLabel,ae=e.exportPage,re=void 0===ae||ae,ie=e.exportAllPages,ce=void 0===ie||ie,se=Object(n.useState)(""),oe=Object(l.a)(se,2),de=oe[0],ue=oe[1],be=Object(n.useState)(Z.reduce((function(e,t){return e[t.name]=t.initialValue,e}),{})),he=Object(l.a)(be,2),me=he[0],je=he[1],pe=Object(n.useState)(X),fe=Object(l.a)(pe,2),Oe=fe[0],xe=fe[1],ge=Object(ne.a)().t,_e=Object(n.useState)(1),ve=Object(l.a)(_e,2),ye=ve[0],we=ve[1],Se=Object(n.useState)(0),ke=Object(l.a)(Se,2),Ce=ke[0],Ne=ke[1],Ie=Re(),Te=Ze(),Ae=Object(l.a)(Te,2),qe=Ae[0],Be=(Ae[1],Wa());function Pe(){return Object.fromEntries(Object.entries(me).filter((function(e){var t=Object(l.a)(e,2);t[0];return null!==t[1]})))}function Fe(){var e;(e=ee.getAll({name:Oe,value:de},ye,Object(s.a)(new Set(["id",H,null===f?"id":f].concat(Object(s.a)(c)))),Pe(),j)).then.apply(e,Object(s.a)(Ie({}))).then((function(e){K(e.data),Ne(e._pagination.totalPages)}))}Object(n.useEffect)((function(){1===ye?Fe():we(1)}),[me]),Object(n.useEffect)(Fe,[ye,Oe,j]);return Object(g.jsxs)(le.a,{className:Be.root,children:[Object(g.jsxs)(le.a,{className:Be.searchAndFilters,children:[Object(g.jsx)(Da,{label:ge(te),value:de,onChange:function(e){ue(e.target.value)},onSearch:function(){1===ye?Fe():we(1)}}),D&&Object(g.jsxs)(Ra.a,{children:[Object(g.jsx)(Ma.a,{expandIcon:Object(g.jsx)(ea.a,{}),children:Object(g.jsx)(Rt.a,{className:Be.heading,children:ge("filters_actions")})}),Object(g.jsx)(La.a,{children:Object(g.jsxs)(le.a,{className:Be.chips,children:[re&&Array.isArray(U)&&U.length>0&&Object(g.jsx)(Ka,{searchTerm:de,page:ye,searchTermField:Oe,dataService:ee,getFilters:Pe}),ce&&Array.isArray(U)&&U.length>0&&Object(g.jsx)(Ka,{searchTerm:de,page:ye,dataService:ee,searchTermField:Oe,exportAll:!0,getFilters:Pe}),G.map((function(e){return e})),"\xb7",$.map((function(e){return Object(g.jsx)(R.a,{title:"".concat(ge("search_by")," ").concat(ge(e)),children:Object(g.jsx)(Ga.a,{size:"small",color:Oe===e?"primary":"default",label:"".concat(ge("search_by")," ").concat(ge(e)),onClick:function(t){xe(Oe===e?X:e)}})},e)})),Z.map((function(e){return Object(g.jsxs)(r.a.Fragment,{children:["\xb7 ",e.options.map((function(t){return Object(g.jsx)(R.a,{title:ge(t.tooltip),"aria-label":ge(t.tooltip),children:Object(g.jsx)(Ga.a,{size:"small",color:me[e.name]===t.name?"primary":"default",label:ge(t.label),onClick:function(a){je(Object(o.a)(Object(o.a)({},me),{},Object(y.a)({},e.name,me[e.name]===t.name?null:t.name)))}})},e.name+t.name)}))]})}))]})})]}),Object(g.jsx)(le.a,{my:2,children:Object(g.jsx)(Ia.a,{className:"pagination",count:Ce,page:ye,size:"small",showFirstButton:!0,showLastButton:!0,siblingCount:1,boundaryCount:1,color:"primary",onChange:function(e,t){we(t)}})})]}),Object(g.jsxs)(F.a,{className:Be.list,children:[U&&U.map((function(e){return Object(g.jsxs)("div",{children:[Object(g.jsxs)(E.a,{button:!0,onClick:function(){h(e.id),a(e.id)},children:[q&&Object(g.jsx)(Ta.a,{children:Object(g.jsx)(Jt.a,{className:e.id===V?Be.selectedAvatar:Be.avatar,children:e[H].charAt(0).toUpperCase()})}),Object(g.jsx)(M.a,{id:"name",primary:null===u?e[H]:u(e),secondary:null===f?null:e[f]}),x&&qe(v)&&Object(g.jsx)(za.a,{children:Object(g.jsx)(R.a,{title:ge(S),children:Object(g.jsx)(N.a,{edge:"end","aria-label":ge("export"),onClick:function(t){T(e.id)},children:C})})})]},e.id),Object(g.jsx)(P.a,{})]},e.id)})),0===U.length&&Object(g.jsx)(Rt.a,{className:Be.noResults,children:ge("no_results")+" \ud83d\udc40"})]})]})},Ya=["dataService","displayText","auxFields","parent_id","deleteTooltip","delete_message","onItemDeleted"],Za=function(e){var t=e.dataService,a=e.displayText,n=e.auxFields,i=e.parent_id,c=e.deleteTooltip,l=e.delete_message,d=e.onItemDeleted,u=void 0===d?function(){}:d,b=Object(f.a)(e,Ya),h=Re(),m=r.a.useContext(p);Object(ne.a)().t;return Object(g.jsx)(Ha,Object(o.a)({secondaryAction:!0,withFiltersBox:!1,withAvatar:!1,secondaryActionCallable:function(e){m.confirm(l,"not_undone",(function(){var a;(a=t.delete(i,e)).then.apply(a,Object(s.a)(h({snackbarSuccess:!0}))).then((function(t){u(e)}))}))},parent_id:i,displayText:a,auxFields:n,secondaryActionTooltip:c,secondaryActionNeeds:[Ye.delete],secondaryActionIcon:Object(g.jsx)(xt.a,{}),dataService:t},b))},Ja=["dataService","dataServiceSR","add_message","parent_id","onAdded"],Xa=function(e){var t=e.dataService,a=e.dataServiceSR,i=e.add_message,c=e.parent_id,d=e.onAdded,u=void 0===d?function(){}:d,b=Object(f.a)(e,Ja),h=Re(),m=r.a.useContext(p),j=Object(n.useState)([]),O=Object(l.a)(j,2),x=O[0],_=O[1];return Object(g.jsx)(Ha,Object(o.a)({secondaryAction:!1,items:x,setItems:_,withFiltersBox:!1,withAvatar:!1,dataService:t,onItemClick:function(e){m.confirm(i,null,(function(){var t;if(null===a)return u(e,null);(t=a.postWithId(c,e)).then.apply(t,Object(s.a)(h({snackbarSuccess:!0}))).then((function(t){u(e,t.data)}))}))}},b))},Qa=["defaultSearchBy","withFiltersBox","displayText","auxFields","parentItemDataService","itemDataService","add_message_confirm","parent_id","secondaryDisplayNameField","searchByOptions","resourceName","displayNameField","add_message","onSubresourceAdded","onSubresourceDeleted","usableFilters"],$a=r.a.forwardRef((function(e,t){return Object(g.jsx)(Ca.a,Object(o.a)({direction:"up",ref:t},e))})),en=Object(w.a)((function(e){return{list:{overflow:"auto",display:"flex",flexDirection:"column",flex:1},box:{display:"flex",flexDirection:"column"},pagination:{margin:"30px"},appBar:{position:"relative"},newLine:{width:"100%",marginTop:e.spacing(1),display:"flex",flexDirection:"column"},title:{marginLeft:e.spacing(2),flex:1},actionIcon:{float:"right"}}}));var tn=function(e){var t=e.defaultSearchBy,a=e.withFiltersBox,i=void 0!==a&&a,c=e.displayText,o=e.auxFields,d=e.parentItemDataService,u=e.itemDataService,b=e.add_message_confirm,h=e.parent_id,m=e.secondaryDisplayNameField,j=e.searchByOptions,p=e.resourceName,O=e.displayNameField,x=e.add_message,_=e.onSubresourceAdded,v=e.onSubresourceDeleted,y=e.usableFilters,w=(Object(f.a)(e,Qa),Object(ne.a)().t),S=en(),C=Object(n.useState)(!1),I=Object(l.a)(C,2),T=I[0],A=I[1],q=function(){A(!1)},B=Ze(),P=Object(l.a)(B,2),F=P[0],E=P[1],D=null===h,M=Object(n.useState)([]),L=Object(l.a)(M,2),G=L[0],z=L[1],V=r.a.useContext(ga);return Object(g.jsxs)(le.a,{p:3,children:[" "," ",Object(g.jsxs)(le.a,{px:2,children:[Object(g.jsxs)(Oa.a,{fullScreen:!0,open:T,onClose:q,TransitionComponent:$a,children:[Object(g.jsx)(k.a,{className:S.appBar,color:"secondary",children:Object(g.jsxs)(Na.a,{children:[Object(g.jsx)(Rt.a,{variant:"h6",className:S.title,children:w(x)}),Object(g.jsx)(De.a,{autoFocus:!0,color:"inherit",onClick:q,children:w("cancel")})]})}),Object(g.jsx)(le.a,{className:S.box,m:3,children:Object(g.jsx)(Xa,{dataService:u,dataServiceSR:d,defaultSearchBy:t,searchByOptions:j,searchBarLabel:p,displayNameField:O,secondaryDisplayNameField:m,parent_id:h,add_message:b,onAdded:function(e,t){z([].concat(Object(s.a)(G),[t])),_(e),q()}})})]}),D?Object(g.jsx)(Ne,{className:S.actionIcon}):F([E.post])&&Object(g.jsx)(R.a,{className:S.actionIcon,title:w(x),"aria-label":w(x),children:Object(g.jsx)(N.a,{onClick:function(){A(!0)},children:Object(g.jsx)(ia.a,{})})}),Object(g.jsx)("div",{className:S.newLine,children:D?Object(g.jsx)(Ce.a,{width:"100%",height:"250px"}):Object(g.jsx)(Za,{dataService:d,defaultSearchBy:t,searchByOptions:j,items:G,withFiltersBox:i,setItems:z,displayText:c,auxFields:o,searchBarLabel:p,displayNameField:O,usableFilters:y,parent_id:h,deleteTooltip:"delete",delete_message:w("delete")+" "+w(p),onItemDeleted:function(e){z(G.filter((function(t){return t.id!==e}))),v(e)},onItemClick:function(e){V.goTo(p,e)}})})]})]})},an=["value","index","children"];function nn(e){return{id:"full-width-tab-".concat(e),"aria-controls":"full-width-tabpanel-".concat(e)}}var rn=function(e){var t=e.value,a=e.index,n=e.children,r=Object(f.a)(e,an);return Object(g.jsx)("div",Object(o.a)(Object(o.a)({role:"tabpanel",hidden:t!==a,id:"full-width-tabpanel-".concat(a),"aria-labelledby":"full-width-tab-".concat(a),style:{height:"100%",flex:1}},r),{},{children:n}))},cn=["setNewStudent","newStudent","addStudentId","currentStudentId","deleteStudent"],sn=Object(w.a)((function(e){return{contentPanel:{position:"relative",overflow:"auto",boxSizing:"border-box",height:"100%",display:"flex",flexDirection:"column"},content:{overflowX:"hidden",display:"flex",flexDirection:"column",overflowY:"auto",flex:1,height:"100%"},tab:{height:"100%"}}}));function on(e){var t=e.setNewStudent,a=e.newStudent,i=e.addStudentId,c=e.currentStudentId,d=e.deleteStudent,u=(Object(f.a)(e,cn),null===c),b=Re(),h=Object(n.useState)(null),m=Object(l.a)(h,2),j=m[0],p=m[1],O=Object(n.useState)(!1),x=Object(l.a)(O,2),_=x[0],v=x[1],y=Ze(),w=Object(l.a)(y,2),S=w[0],C=w[1];Object(n.useEffect)((function(){var e;if(u)return p(null);(e=Se.getOne(c)).then.apply(e,Object(s.a)(b({}))).then((function(e){p(e.data)}))}),[c]);var N=sn(),I=G()(),T=Object(ne.a)().t,A=r.a.useState(0),q=Object(l.a)(A,2),B=q[0],P=q[1];Object(n.useEffect)((function(){P(0)}),[c]);var F=null===j?[]:j.guardians;return Object(g.jsxs)(re.a,{elevation:3,square:!0,className:N.contentPanel,children:[Object(g.jsx)(k.a,{position:"static",color:"default",children:Object(g.jsxs)(se.a,{value:B,onChange:function(e,t){P(t)},indicatorColor:"primary",textColor:"primary",variant:"scrollable",scrollButtons:"on",children:[Object(g.jsx)(oe.a,Object(o.a)({label:T("attendee")},nn(0))),!a&&S([C.schedules])&&Object(g.jsx)(oe.a,Object(o.a)({label:T("schedules")},nn(1))),!a&&S([C.payments])&&Object(g.jsx)(oe.a,Object(o.a)({label:T("payments")},nn(2))),!a&&S([C.courses])&&Object(g.jsx)(oe.a,Object(o.a)({label:T("courses")},nn(3))),!a&&F&&S([C.guardians])&&F.map((function(e,t){return Object(g.jsx)(oe.a,Object(o.a)({label:T("contact")+" "+(t+1)},nn(t+4)),T("contact")+" "+(t+1))})),!a&&_&&Object(g.jsx)(oe.a,Object(o.a)({label:T("new_guardian")},nn(4+F.length)),T("new_guardian"))]})}),Object(g.jsxs)(ce.a,{axis:"rtl"===I.direction?"x-reverse":"x",index:B,containerStyle:{height:"100%"},className:N.content,onChangeIndex:function(e){P(e)},children:[Object(g.jsx)(rn,{value:B,index:0,children:Object(g.jsx)(Bt,{setNewStudent:t,dir:I.direction,newStudent:a,title:T("attendee"),currentStudent:j,addStudentId:i,patchService:Se,updateCurrentStudent:p,deleteStudent:d,addNewGuardian:function(){v(!0),P(4+F.length)}})}),S([C.schedules])&&Object(g.jsx)(rn,{value:B,index:1,children:Object(g.jsx)(wa,{allowDelete:function(e){return!e.is_base},allowView:!0,viewUrl:function(e){return["/courses",e.course_id]},setScheduleIds:function(e){return p(Object(o.a)(Object(o.a)({},j),{},{schedules:e}))},onEventChange:function(e,t,a,n,r){var i,l,d=e.event,u={};(u.day_week=t,u.start_time=a,u.end_time=n,r.is_base)?(u.course_id=r.course_id,u.student_id=c,(i=ua.post(u)).then.apply(i,Object(s.a)(b({errorOut:!0,snackbarSuccess:!0}))).then((function(t){var a=e.view.calendar;d.is_base=!1,a.addEvent(va(I,t)),e.revert(),p(Object(o.a)(Object(o.a)({},j),{},{schedules:[].concat(Object(s.a)(j.schedules),[t.id])}))})).catch((function(t){e.revert()}))):(l=ua.patch({id:r.id,body:u,initial_values:r})).then.apply(l,Object(s.a)(b({errorOut:!0,snackbarSuccess:!0}))).then((function(e){})).catch((function(t){e.revert()}))},scheduleIds:null===j?null:j.schedules,editable:!0,selectable:!1})}),S([C.payments])&&Object(g.jsx)(rn,{value:B,index:2,children:Object(g.jsx)(da,{paymentIds:null===j?null:j.payments,addPaymentId:function(e){p(Object(o.a)(Object(o.a)({},j),{},{payments:[].concat(Object(s.a)(j.payments),[e])}))},student_id:c,deletePaymentFromStudent:function(e){p(Object(o.a)(Object(o.a)({},j),{},{payments:j.payments.filter((function(t){return t!==e}))}))}})}),S([C.courses])&&Object(g.jsxs)(rn,{value:B,index:3,children:[" ",Object(g.jsx)(tn,{defaultSearchBy:"name",parentItemDataService:Sa,itemDataService:ka,add_message_confirm:"confirm_enroll_to_course",parent_id:c,secondaryDisplayNameField:"description",searchByOptions:["name"],resourceName:"courses",displayNameField:"name",add_message:"enroll_to_course",onSubresourceAdded:function(e){p(Object(o.a)(Object(o.a)({},j),{},{courses:[].concat(Object(s.a)(j.courses),[e])}))},onSubresourceDeleted:function(e){p(Object(o.a)(Object(o.a)({},j),{},{courses:j.courses.filter((function(t){return t!==e}))}))}})]}),F&&S([C.guardians])&&F.map((function(e,t){return Object(g.jsx)(rn,{value:B,index:t+4,children:Object(g.jsx)(Dt,{dir:I.direction,guardianId:e,deleteGuardianId:function(e){p(Object(o.a)(Object(o.a)({},j),{},{guardians:j.guardians.filter((function(t){return t!==e}))})),P(0)}},e)})})),Object(g.jsx)(rn,{value:B,index:4+F.length,children:Object(g.jsx)(Dt,{dir:I.direction,newGuardian:!0,deleteNewGuardian:function(){v(!1),P(0)},studentId:c,addGuardianId:function(e){v(!1),p(Object(o.a)(Object(o.a)({},j),{},{guardians:[].concat(Object(s.a)(j.guardians),[e])})),P(4+F.length)},deleteGuardianId:function(e){p(Object(o.a)(Object(o.a)({},j),{},{guardians:j.guardians.filter((function(t){return t!==e}))})),P(0)}})})]})]})}var ln=a(578),dn=a(97),un=a.n(dn),bn=["dataService"],hn=function(e){var t=e.dataService,a=Object(f.a)(e,bn),n=Re(),r=Object(ne.a)().t;return Object(g.jsx)(Ha,Object(o.a)({secondaryAction:!0,secondaryActionCallable:function(e){var a;(a=t.downloadOneCsv(e)).then.apply(a,Object(s.a)(n({})))},secondaryActionTooltip:r("export")+" .csv",secondaryActionIcon:Object(g.jsx)(St.a,{}),dataService:t},a))},mn=Object(w.a)((function(e){return{root:{height:"100%"},left:{display:"flex",flexDirection:"column",height:"100%",position:"relative"},fab:{position:"absolute",bottom:e.spacing(2),right:e.spacing(2)}}}));var jn=a(580);function pn(e){var t=e.formik,a=Object(ne.a)().t;return Object(g.jsx)(Ae,{label:a("role"),style:{flex:1},name:"role_id",formik:t,select:!0,children:[{name:"administrator",id:"administrator"},{name:"administrative",id:"administrative"},{name:"layman",id:"layman"},{name:"teacher",id:"teacher"},{name:"empty",id:"empty"},{name:"no role",id:null}].map((function(e){return Object(g.jsx)(be.a,{value:e.id,children:a(e.name)},e.name)}))})}var fn={inviteUser:function(e,t){return new Promise((function(a,n){yt()({url:"".concat(xe,"/user-invites/v1/request"),method:"POST",headers:Object(o.a)(Object(o.a)({},{"Cache-Control":"no-cache"}),fe()),data:{user_email:e,role_id:t}}).then((function(e){a(!0)})).catch((function(e){n(e)}))}))}};var On=new(we("users")),xn=a(279),gn=a.n(xn),_n=new(we("teachers")),vn=["children","addStudentId","newStudent","title","currentStudent","updateCurrentStudent","patchService","deleteStudent","addNewGuardian"],yn=r.a.forwardRef((function(e,t){return Object(g.jsx)(Ca.a,Object(o.a)({direction:"up",ref:t},e))})),wn=Object(w.a)((function(e){return Object(y.a)({actionIcon:{float:"right"},button:{margin:e.spacing(1)},line:{width:"100%",marginTop:e.spacing(1)},composite:{display:"flex",flexDirection:"row",flex:1,flexWrap:"wrap",gap:e.spacing(1),width:"100%"},list:{overflow:"auto",display:"flex",flexDirection:"column",flex:1},box:{display:"flex",flexDirection:"column"},pagination:{margin:"30px"},appBar:{position:"relative"},newLine:{width:"100%",marginTop:e.spacing(1),display:"flex",flexDirection:"column"},title:{marginLeft:e.spacing(2),flex:1}},"actionIcon",{float:"right"})}));var Sn=function(e){e.children,e.addStudentId,e.newStudent,e.title;var t=e.currentStudent,a=e.updateCurrentStudent,i=(e.patchService,e.deleteStudent),c=(e.addNewGuardian,Object(f.a)(e,vn),Object(ne.a)().t),o=null===t,d=wn(),u=Re(),b=Object(n.useState)(!1),h=Object(l.a)(b,2),m=h[0],j=h[1],O=function(){j(!1)},x=r.a.useContext(p),_=o?{}:t,v=Le(!0,{initialValues:_,validationSchema:ke.d({email:dt(c),name:ke.f().required(c("name_required")),role_id:ke.f().nullable()}),enableReinitialize:!0,onSubmit:function(e,t){var n,r=t.setStatus,i=t.setSubmitting;Object.keys(e).length>0?(r(),(n=On.patch({id:_.id,body:e,initial_values:_})).then.apply(n,Object(s.a)(u({snackbarSuccess:!0}))).then((function(e){v.resetForm(e),a(e)})).catch((function(e){r(!0)})).finally((function(){i(!1)}))):i(!1)}}),y=Ze(),w=Object(l.a)(y,2),S=w[0],C=w[1];return Object(g.jsx)(le.a,{p:3,children:Object(g.jsxs)(le.a,{px:2,children:[Object(g.jsxs)(Oa.a,{fullScreen:!0,open:m,onClose:O,TransitionComponent:yn,children:[Object(g.jsx)(k.a,{className:d.appBar,color:"secondary",children:Object(g.jsxs)(Na.a,{children:[Object(g.jsx)(Rt.a,{variant:"h6",className:d.title,children:c("teacher-user")}),Object(g.jsx)(De.a,{autoFocus:!0,color:"inherit",onClick:O,children:c("cancel")})]})}),Object(g.jsx)(le.a,{className:d.box,m:3,children:Object(g.jsx)(Xa,{dataService:_n,dataServiceSR:null,defaultSearchBy:"full_name",searchByOptions:["full_name"],searchBarLabel:"teachers",displayNameField:"full_name",secondaryDisplayNameField:null,parent_id:null===t?null:t.id,add_message:"link-user-to-teacher",onAdded:function(e,t){O(),v.setFieldValue("teacher_id",e),v.setFieldTouched("teacher_id",!0)}})})]}),o?Object(g.jsx)(Ne,{className:d.actionIcon}):S([C.delete])&&Object(g.jsx)(R.a,{style:{float:"right"},title:c("delete"),"aria-label":c("delete"),children:Object(g.jsx)(N.a,{onClick:function(e){x.confirm("delete_user_question","not_undone",(function(){!function(){var e;(e=On.delete(t.id)).then.apply(e,Object(s.a)(u({snackbarSuccess:!0}))).then((function(e){i(t.id)}))}()}))},children:Object(g.jsx)(xt.a,{})})}),o?Object(g.jsxs)(le.a,{children:[Object(g.jsx)(Ne,{className:d.actionIcon}),Object(g.jsx)(Ne,{className:d.actionIcon}),Object(g.jsx)("div",{style:{clear:"both"},children:["100%","100%","100%"].map((function(e,t){return Object(g.jsx)(le.a,{py:0,children:Object(g.jsx)(Ce.a,{variant:"text",width:e,height:"60px"})},t)}))})]}):Object(g.jsxs)("form",{onSubmit:v.handleSubmit,children:[Object(g.jsx)(Ke,{className:d.actionIcon,formik:v}),Object(g.jsx)(Xe,{className:d.actionIcon,formik:v}),Object(g.jsx)(Ae,{label:c("id"),name:"id",disabled:!0,className:d.line,formik:v}),Object(g.jsxs)(le.a,{className:[d.line,d.composite],children:[Object(g.jsx)(Ae,{label:c("name"),style:{flex:1},name:"name",formik:v}),Object(g.jsx)(Ae,{label:c("surname1"),style:{flex:1},name:"surname1",formik:v}),Object(g.jsx)(Ae,{label:c("surname2"),style:{flex:1},formik:v,name:"surname2"})]}),Object(g.jsx)(le.a,{className:[d.line,d.composite],children:Object(g.jsx)(Ae,{label:c("email"),type:"email",style:{flex:1},formik:v,name:"email",helperText:v.touched.email&&v.errors.email})}),Object(g.jsx)(le.a,{className:[d.line,d.composite],children:Object(g.jsx)(pn,{formik:v})}),"teacher"==v.values.role&&Object(g.jsx)(le.a,{className:[d.line,d.composite],children:Object(g.jsx)(Ae,{label:c("teacher"),style:{flex:1},name:"teacher_id",formik:v,disabled:!0,InputProps:{endAdornment:Object(g.jsx)(jt.a,{position:"end",children:Object(g.jsx)(N.a,{"aria-label":"link teacher",onClick:function(){j(!0)},children:Object(g.jsx)(gn.a,{})})})}})})]})]})})},kn=(new(we("users","needs")),a(579)),Cn=a(592),Nn=["name","value","formik","noDirty"],In=Object(w.a)((function(e){return Object(S.a)({root:function(t){return{color:t?e.palette.neutral.status.dirty:e.palette.neutral.emphasisText.medium,"&.Mui-checked":{color:t?e.palette.neutral.status.dirty:e.palette.primary.main}}}})})),Tn=function(e){var t=e.name,a=e.value,n=e.formik,r=e.noDirty,i=void 0!==r&&r,c=Object(f.a)(e,Nn),s=!0!==i&&(void 0!==n.values[t]&&void 0!==n.initialValues[t]&&n.values[t].includes(a)!==n.initialValues[t].includes(a)),l=In(s);return Object(g.jsx)(Cn.a,Object(o.a)({name:t,className:l.root,value:a,onChange:n.handleChange,onBlur:n.handleBlur,error:n.status||void 0!==n.errors[t],helperText:n.touched[t]&&n.errors[t],checked:n.values[t]},c))};var An=a(73),qn=function(e,t){var a,n=new Set(e),r=Object(An.a)(t);try{for(r.s();!(a=r.n()).done;){var i=a.value;n.has(i)?n.delete(i):n.add(i)}}catch(c){r.e(c)}finally{r.f()}return n};Object(w.a)((function(e){return{actionIcon:{float:"right"},button:{margin:e.spacing(1)},line:{width:"100%",marginTop:e.spacing(1)},composite:{display:"flex",flexDirection:"row",flex:1,flexWrap:"wrap",gap:e.spacing(1),width:"100%"}}}));var Bn=Object(w.a)((function(e){return{contentPanel:{position:"relative",overflow:"auto",boxSizing:"border-box",height:"100%",display:"flex",flexDirection:"column"},content:{overflowX:"hidden",display:"flex",flexDirection:"column",overflowY:"auto",flex:1,height:"100%"},tab:{height:"100%"}}}));function Pn(e){var t=e.currentUserId,a=e.deleteUser,i=null===t,c=Re(),d=Object(n.useState)(null),u=Object(l.a)(d,2),b=u[0],h=u[1];Object(n.useEffect)((function(){var e;if(i)return h(null);(e=On.getOne(t)).then.apply(e,Object(s.a)(c({}))).then((function(e){h(e.data)}))}),[t,i]);var m=Bn(),j=G()(),p=Object(ne.a)().t,f=r.a.useState(0),O=Object(l.a)(f,2),x=O[0],_=O[1];Object(n.useEffect)((function(){_(0)}),[t]);return Object(g.jsxs)(re.a,{elevation:3,square:!0,className:m.contentPanel,children:[Object(g.jsx)(k.a,{position:"static",color:"default",children:Object(g.jsx)(se.a,{value:x,onChange:function(e,t){_(t)},indicatorColor:"primary",textColor:"primary",variant:"scrollable",scrollButtons:"on",children:Object(g.jsx)(oe.a,Object(o.a)({label:p("user")},nn(0)))})}),Object(g.jsx)(ce.a,{axis:"rtl"===j.direction?"x-reverse":"x",index:x,containerStyle:{height:"100%"},className:m.content,onChangeIndex:function(e){_(e)},children:Object(g.jsx)(rn,{value:x,index:0,children:Object(g.jsx)(Sn,{dir:j.direction,currentStudent:b,updateCurrentStudent:h,deleteStudent:a})})})]})}var Fn=Object(w.a)((function(e){return{root:{height:"100%"},root2:{display:"flex"},line:{width:"100%",marginTop:e.spacing(1)},composite:{display:"flex",flexDirection:"row",flex:1,flexWrap:"wrap",gap:e.spacing(1),width:"100%"},formControl:{padding:e.spacing(2),maxHeight:"50vh",overflow:"auto",minWidth:"40vw"},dialog:{},left:{display:"flex",flexDirection:"column",height:"100%",position:"relative"},fab:{position:"absolute",bottom:e.spacing(2),right:e.spacing(2)}}}));var En=Object(w.a)((function(e){return{root:{height:"100%"},root2:{display:"flex"},formControl:{padding:e.spacing(2),maxHeight:"50vh",overflow:"auto",minWidth:"40vw"},dialog:{},left:{display:"flex",flexDirection:"column",height:"100%",position:"relative"},fab:{position:"absolute",bottom:e.spacing(2),right:e.spacing(2)}}}));var Dn=new(we("rooms")),Rn=["scheduleIds"],Mn=Object(w.a)((function(e){return{button:{margin:e.spacing(1)},calendar:{margin:e.spacing(2)}}}));var Ln=function(e){var t=e.scheduleIds,a=Object(f.a)(e,Rn);return Object(ne.a)().t,Mn(),Object(g.jsx)("div",Object(o.a)(Object(o.a)({},a),{},{style:{height:"100%",flex:1,minHeight:"70vh"},children:Object(g.jsx)(wa,{scheduleIds:t,editable:!1,allowView:!0,viewUrl:function(e){return["/courses",e.course_id]}})}))},Gn=["children","addStudentId","setNewRoom","newRoom","newStudent","title","currentStudent","updateCurrentStudent","patchService","deleteStudent","addNewGuardian"],zn=Object(w.a)((function(e){return{actionIcon:{float:"right"},button:{margin:e.spacing(1)},line:{width:"100%",marginTop:e.spacing(1)},composite:{display:"flex",flexDirection:"row",flex:1,flexWrap:"wrap",gap:e.spacing(1),width:"100%"}}}));var Vn=function(e){e.children,e.addStudentId;var t=e.setNewRoom,a=e.newRoom,n=(e.newStudent,e.title,e.currentStudent),i=e.updateCurrentStudent,c=(e.patchService,e.deleteStudent),o=(e.addNewGuardian,Object(f.a)(e,Gn),Object(ne.a)().t),d=null===n,u=zn(),b=Re(),h=r.a.useContext(p),m=d?{}:n,j=Le(!a,{initialValues:m,validationSchema:ke.d({name:ke.f().required(o("name_required"))}),enableReinitialize:!0,onSubmit:function(e,n){var r,c,o=n.setStatus,l=n.setSubmitting;Object.keys(e).length>0?(o(),a?(r=Dn.post(e)).then.apply(r,Object(s.a)(b({snackbarSuccess:!0}))).then((function(e){i(e),t(!1)})).catch((function(e){o(!0)})).finally((function(){l(!1)})):(c=Dn.patch({id:m.id,body:e,initial_values:m})).then.apply(c,Object(s.a)(b({snackbarSuccess:!0}))).then((function(e){j.resetForm(e),i(e)})).catch((function(e){o(!0)})).finally((function(){l(!1)}))):l(!1)}}),O=Ze(),x=Object(l.a)(O,2),_=x[0],v=x[1];return Object(g.jsx)(le.a,{p:3,children:Object(g.jsxs)(le.a,{px:2,children:[!a&&d?Object(g.jsx)(Ne,{className:u.actionIcon}):_([v.delete])&&Object(g.jsx)(R.a,{style:{float:"right"},title:o("delete"),"aria-label":o("delete"),children:Object(g.jsx)(N.a,{onClick:function(e){a?t(!1):h.confirm("delete_room_question","not_undone",(function(){!function(){var e;(e=Dn.delete(n.id)).then.apply(e,Object(s.a)(b({snackbarSuccess:!0}))).then((function(e){c(n.id)}))}()}))},children:Object(g.jsx)(xt.a,{})})}),!a&&d?Object(g.jsxs)(le.a,{children:[Object(g.jsx)(Ne,{className:u.actionIcon}),Object(g.jsx)(Ne,{className:u.actionIcon}),Object(g.jsx)("div",{style:{clear:"both"},children:["100%","100%","100%","100%"].map((function(e,t){return Object(g.jsx)(le.a,{py:0,children:Object(g.jsx)(Ce.a,{variant:"text",width:e,height:"60px"})},t)}))})]}):Object(g.jsxs)("form",{onSubmit:j.handleSubmit,children:[Object(g.jsx)(Ke,{className:u.actionIcon,formik:j}),Object(g.jsx)(Xe,{className:u.actionIcon,formik:j}),Object(g.jsx)(Ae,{label:o("id"),name:"id",disabled:!0,className:u.line,formik:j}),Object(g.jsxs)(le.a,{className:[u.line,u.composite],children:[Object(g.jsx)(Ae,{label:o("name"),style:{flex:4},name:"name",formik:j}),Object(g.jsx)(Ae,{label:o("capacity"),style:{flex:1},name:"capacity",formik:j,type:"number"})]})]})]})})},Un=Object(w.a)((function(e){return{contentPanel:{position:"relative",overflow:"auto",boxSizing:"border-box",height:"100%",display:"flex",flexDirection:"column"},content:{overflowX:"hidden",display:"flex",flexDirection:"column",overflowY:"auto",flex:1,height:"100%"},tab:{height:"100%"}}}));function Kn(e){return{id:"full-width-tab-".concat(e),"aria-controls":"full-width-tabpanel-".concat(e)}}function Wn(e){var t=e.setNewRoom,a=e.currentRoomId,i=e.deleteRoom,c=e.newRoom,d=(e.addRoomId,null===a),u=Re(),b=Object(n.useState)(null),h=Object(l.a)(b,2),m=h[0],j=h[1];Object(n.useEffect)((function(){var e;if(d)return j(null);(e=Dn.getOne(a)).then.apply(e,Object(s.a)(u({}))).then((function(e){j(e.data)}))}),[a]);var p=Un(),f=G()(),O=Object(ne.a)().t,x=r.a.useState(0),_=Object(l.a)(x,2),v=_[0],y=_[1];Object(n.useEffect)((function(){y(0)}),[a]);var w=Ze(),S=Object(l.a)(w,2),C=S[0],N=S[1];return Object(g.jsxs)(re.a,{elevation:3,square:!0,className:p.contentPanel,children:[Object(g.jsx)(k.a,{position:"static",color:"default",children:Object(g.jsxs)(se.a,{value:v,onChange:function(e,t){y(t)},indicatorColor:"primary",textColor:"primary",variant:"scrollable",scrollButtons:"on",children:[Object(g.jsx)(oe.a,Object(o.a)({label:O("room")},Kn(0))),!c&&C([N.schedules])&&Object(g.jsx)(oe.a,Object(o.a)({label:O("schedules")},Kn(1)))]})}),Object(g.jsxs)(ce.a,{axis:"rtl"===f.direction?"x-reverse":"x",index:v,containerStyle:{height:"100%"},className:p.content,onChangeIndex:function(e){y(e)},children:[Object(g.jsxs)(rn,{value:v,index:0,children:[" ",Object(g.jsx)(Vn,{newRoom:c,setNewRoom:t,dir:f.direction,currentStudent:m,updateCurrentStudent:j,deleteStudent:i})]}),C([N.schedules])&&Object(g.jsx)(rn,{value:v,index:1,children:Object(g.jsx)(Ln,{value:v,index:1,className:p.tab,dir:f.direction,scheduleIds:null===m?null:m.schedules,student_id:a})})]})]})}var Hn=Object(w.a)((function(e){return{root:{height:"100%"},left:{display:"flex",flexDirection:"column",height:"100%",position:"relative"},fab:{position:"absolute",bottom:e.spacing(2),right:e.spacing(2)}}}));var Yn=new(we("teachers","courses"));function Zn(e,t,a){return new Promise((function(n,r){yt()({url:"".concat(xe,"/calendars/v1/").concat(e,"/").concat(t,"/").concat(a),method:"GET",headers:Object(o.a)(Object(o.a)({},{"Cache-Control":"no-cache"}),fe())}).then((function(e){var t=e.headers["content-disposition"].split("filename=")[1];null===t&&(t="calendar.ics");var a=window.URL.createObjectURL(new Blob([e.data])),r=document.createElement("a");r.href=a,r.setAttribute("download",t),document.body.appendChild(r),r.click(),r.remove(),n()})).catch((function(e){r(e)}))}))}var Jn=["children","addStudentId","setNewRoom","newRoom","title","currentStudent","updateCurrentStudent","patchService","deleteStudent","addNewGuardian"],Xn=Object(w.a)((function(e){return{actionIcon:{float:"right"},button:{margin:e.spacing(1)},line:{width:"100%",marginTop:e.spacing(1)},composite:{display:"flex",flexDirection:"row",flex:1,flexWrap:"wrap",gap:e.spacing(1),width:"100%"}}}));var Qn=function(e){e.children,e.addStudentId;var t=e.setNewRoom,a=e.newRoom,n=(e.title,e.currentStudent),i=e.updateCurrentStudent,c=(e.patchService,e.deleteStudent),o=(e.addNewGuardian,Object(f.a)(e,Jn),Object(ne.a)().t),d=null===n,u=Xn(),b=Re(),h=r.a.useContext(p),m=d?{}:n,j=Le(!a,{initialValues:m,validationSchema:ke.d({email:dt(o),name:ke.f().required(o("name_required"))}),enableReinitialize:!0,onSubmit:function(e,n){var r,c,o=n.setStatus,l=n.setSubmitting;Object.keys(e).length>0?(o(),a?(r=_n.post(e)).then.apply(r,Object(s.a)(b({snackbarSuccess:!0}))).then((function(e){i(e),t(!1)})).catch((function(e){o(!0)})).finally((function(){l(!1)})):(c=_n.patch({id:m.id,body:e,initial_values:m})).then.apply(c,Object(s.a)(b({snackbarSuccess:!0}))).then((function(e){j.resetForm(e),i(e)})).catch((function(e){o(!0)})).finally((function(){l(!1)}))):l(!1)}}),O=Ze(),x=Object(l.a)(O,2),_=x[0],v=x[1];return Object(g.jsx)(le.a,{p:3,children:Object(g.jsxs)(le.a,{px:2,children:[!a&&d?Object(g.jsx)(Ne,{className:u.actionIcon}):_([v.delete])&&Object(g.jsx)(R.a,{style:{float:"right"},title:o("delete"),"aria-label":o("delete"),children:Object(g.jsx)(N.a,{onClick:function(e){a?t(!1):h.confirm("delete_teacher","not_undone",(function(){!function(){var e;(e=_n.delete(n.id)).then.apply(e,Object(s.a)(b({snackbarSuccess:!0}))).then((function(e){c(n.id)}))}()}))},children:Object(g.jsx)(xt.a,{})})}),!a&&d?Object(g.jsxs)(le.a,{children:[Object(g.jsx)(Ne,{className:u.actionIcon}),Object(g.jsx)(Ne,{className:u.actionIcon}),Object(g.jsx)("div",{style:{clear:"both"},children:["100%","100%","100%","100%"].map((function(e,t){return Object(g.jsx)(le.a,{py:0,children:Object(g.jsx)(Ce.a,{variant:"text",width:e,height:"60px"})},t)}))})]}):Object(g.jsxs)("form",{onSubmit:j.handleSubmit,children:[Object(g.jsx)(Ke,{className:u.actionIcon,formik:j}),Object(g.jsx)(Xe,{className:u.actionIcon,formik:j}),Object(g.jsx)(Ae,{label:o("id"),name:"id",disabled:!0,className:u.line,formik:j}),Object(g.jsx)(Ae,{label:o("calendar_url"),name:"calendar_url",disabled:!0,className:u.line,formik:j}),Object(g.jsxs)(le.a,{className:[u.line,u.composite],children:[Object(g.jsx)(Ae,{label:o("name"),style:{flex:1},name:"name",formik:j}),Object(g.jsx)(Ae,{label:o("surname1"),style:{flex:1},name:"surname1",formik:j}),Object(g.jsx)(Ae,{label:o("surname2"),style:{flex:1},formik:j,name:"surname2"})]}),Object(g.jsx)(le.a,{className:[u.line,u.composite],children:Object(g.jsx)(Ae,{label:o("email"),type:"email",style:{flex:1},formik:j,name:"email",helperText:j.touched.email&&j.errors.email})}),Object(g.jsx)(le.a,{my:3,children:Object(g.jsx)(P.a,{})}),Object(g.jsxs)(le.a,{className:[u.line,u.composite],children:[Object(g.jsx)(Ae,{label:o("address"),formik:j,style:{flex:4},name:"address"}),Object(g.jsx)(Ae,{label:o("city"),style:{flex:2},formik:j,name:"city"}),Object(g.jsx)(Ae,{label:o("zip"),formik:j,type:"number",style:{flex:1},name:"zip"})]}),Object(g.jsxs)(le.a,{className:[u.line,u.composite],children:[Object(g.jsx)(Ae,{label:o("dni"),style:{flex:1},formik:j,name:"dni"}),Object(g.jsx)(Ae,{label:o("phone"),type:"tel",style:{flex:1},formik:j,name:"phone"})]}),!d&&!a&&Object(g.jsx)(le.a,{my:3,children:Object(g.jsx)(P.a,{})}),Object(g.jsx)(le.a,{className:[u.line,u.composite],children:!d&&!a&&Object(g.jsx)(R.a,{style:{flex:1},title:o("export_calendar"),"aria-label":o("send_grant_letter"),children:Object(g.jsx)(De.a,{variant:"contained",color:"default",className:u.button,startIcon:Object(g.jsx)(St.a,{}),onClick:function(e){Zn("teachers",n.id,n.calendar_id).then((function(e){}))},children:o("export_calendar")})})})]})]})})},$n=["setSchedulesIds","scheduleIds"],er=Object(w.a)((function(e){return{button:{margin:e.spacing(1)},calendar:{margin:e.spacing(2)}}}));var tr=function(e){e.setSchedulesIds;var t=e.scheduleIds,a=Object(f.a)(e,$n);return Object(ne.a)().t,er(),Object(g.jsx)("div",Object(o.a)(Object(o.a)({},a),{},{style:{height:"100%",flex:1,minHeight:"70vh"},children:Object(g.jsx)(wa,{scheduleIds:t,editable:!1,allowView:!0,viewUrl:function(e){return["/courses",e.course_id]}})}))},ar=Object(w.a)((function(e){return{contentPanel:{position:"relative",overflow:"auto",boxSizing:"border-box",height:"100%",display:"flex",flexDirection:"column"},content:{overflowX:"hidden",display:"flex",flexDirection:"column",overflowY:"auto",flex:1,height:"100%"},tab:{height:"100%"}}}));function nr(e){var t=e.currentTeacherId,a=e.setNewTeacher,i=(e.addTeacherId,e.newTeacher),c=e.deleteTeacher,d=null===t,u=Re(),b=Object(n.useState)(null),h=Object(l.a)(b,2),m=h[0],j=h[1];Object(n.useEffect)((function(){var e;if(d)return j(null);(e=_n.getOne(t)).then.apply(e,Object(s.a)(u({}))).then((function(e){j(e.data)}))}),[t]);var p=ar(),f=G()(),O=Object(ne.a)().t,x=r.a.useState(0),_=Object(l.a)(x,2),v=_[0],y=_[1];Object(n.useEffect)((function(){y(0)}),[t]);var w=Ze(),S=Object(l.a)(w,2),C=S[0],N=S[1];return Object(g.jsxs)(re.a,{elevation:3,square:!0,className:p.contentPanel,children:[Object(g.jsx)(k.a,{position:"static",color:"default",children:Object(g.jsxs)(se.a,{value:v,onChange:function(e,t){y(t)},indicatorColor:"primary",textColor:"primary",variant:"scrollable",scrollButtons:"on",children:[Object(g.jsx)(oe.a,Object(o.a)({label:O("teacher")},nn(0))),!i&&C([N.schedules])&&Object(g.jsx)(oe.a,Object(o.a)({label:O("schedules")},nn(1))),!i&&C([N.courses])&&Object(g.jsx)(oe.a,Object(o.a)({label:O("courses")},nn(2)))]})}),Object(g.jsxs)(ce.a,{axis:"rtl"===f.direction?"x-reverse":"x",index:v,containerStyle:{height:"100%"},className:p.content,onChangeIndex:function(e){y(e)},children:[Object(g.jsx)(rn,{value:v,index:0,children:Object(g.jsx)(Qn,{newRoom:i,setNewRoom:a,dir:f.direction,currentStudent:m,updateCurrentStudent:j,deleteStudent:c})}),C([N.schedules])&&Object(g.jsx)(rn,{value:v,index:1,children:Object(g.jsx)(tr,{className:p.tab,dir:f.direction,scheduleIds:null===m?null:m.schedules,student_id:t})}),C([N.courses])&&Object(g.jsx)(rn,{value:v,index:2,children:Object(g.jsx)(tn,{defaultSearchBy:"name",parentItemDataService:Yn,itemDataService:ka,add_message_confirm:"confirm_enroll_to_course",parent_id:t,secondaryDisplayNameField:"description",searchByOptions:["name"],resourceName:"courses",displayNameField:"name",value:v,add_message:"enroll_to_course",index:2,onSubresourceAdded:function(e){j(Object(o.a)(Object(o.a)({},m),{},{courses:[].concat(Object(s.a)(m.courses),[e])}))},onSubresourceDeleted:function(e){j(Object(o.a)(Object(o.a)({},m),{},{courses:m.courses.filter((function(t){return t!==e}))}))}})})]})]})}var rr=Object(w.a)((function(e){return{root:{height:"100%"},left:{display:"flex",flexDirection:"column",height:"100%",position:"relative"},fab:{position:"absolute",bottom:e.spacing(2),right:e.spacing(2)}}}));var ir=new(we("courses","rooms")),cr=new(we("courses","students")),sr=new(we("courses","teachers")),or=a(203),lr=a.n(or),dr=["children","addCourseId","setNewCourse","newCourse","currentCourse","updateCurrentCourse","patchService","deleteCourse"],ur=Object(w.a)((function(e){return{actionIcon:{float:"right"},textField:{marginRight:e.spacing(1),width:200},button:{margin:e.spacing(1)},line:{width:"100%",marginTop:e.spacing(1)},composite:{display:"flex",flexDirection:"row",flex:1,flexWrap:"wrap",gap:e.spacing(1),width:"100%"},choose:{marginBottom:e.spacing(3)}}}));var br=function(e){e.children,e.addCourseId;var t=e.setNewCourse,a=e.newCourse,n=e.currentCourse,i=e.updateCurrentCourse,c=(e.patchService,e.deleteCourse),d=Object(f.a)(e,dr),u=Object(ne.a)().t,b=Object(O.g)(),h=null===n,m=ur(),j=Re(),x=r.a.useState(!1),_=Object(l.a)(x,2),v=_[0],y=_[1],w=r.a.useContext(p),S=h?{}:n;a&&(S={price_term:75,is_published:!1});var k=Object(Me.a)({initialValues:{},validationSchema:ke.d({startDate:ke.b().required(u("required")),endDate:ke.b().required(u("required"))}),enableReinitialize:!0,onSubmit:function(e,t){var a,r=t.setStatus,i=t.setSubmitting;i(!0),r(),(a=ka.downloadSubresource(n.id,"attendance-list/v1",e)).then.apply(a,Object(s.a)(j({snackbarSuccess:!0}))).then((function(){y(!1)})).catch((function(){r(!0)})).finally((function(){i(!1)}))}}),C=Le(!a,{initialValues:S,validationSchema:ke.d({name:ke.f().required(u("name_required"))}),enableReinitialize:!0,onSubmit:function(e,n){var r,c,o=n.setStatus,l=n.setSubmitting;Object.keys(e).length>0?(o(),a?(r=ka.post(e)).then.apply(r,Object(s.a)(j({snackbarSuccess:!0}))).then((function(e){i(e),t(!1)})).catch((function(e){o(!0)})).finally((function(){l(!1)})):(c=ka.patch({id:S.id,body:e,initial_values:S})).then.apply(c,Object(s.a)(j({snackbarSuccess:!0}))).then((function(e){C.resetForm(e),i(e)})).catch((function(e){o(!0)})).finally((function(){l(!1)}))):l(!1)}}),I=r.a.useContext(Tt),T=Ze(),A=Object(l.a)(T,2),q=A[0],B=A[1];return Object(g.jsxs)("div",Object(o.a)(Object(o.a)({},d),{},{children:[Object(g.jsx)(Oa.a,{open:v,onClose:function(e){y(!1)},"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:Object(g.jsxs)("form",{onSubmit:k.handleSubmit,children:[Object(g.jsx)(xa.a,{id:"alert-dialog-title",children:u("download")}),Object(g.jsxs)(jn.a,{children:[Object(g.jsx)(Rt.a,{className:m.choose,children:u("chose_list_dates")}),Object(g.jsx)(Ie.a,{id:"date",label:u("start"),type:"date",value:k.values.startDate,name:"startDate",onChange:k.handleChange,onBlur:k.handleBlur,error:k.status||void 0!==k.errors.startDate,helperText:k.touched.startDate&&k.errors.startDate,className:m.textField,InputLabelProps:{shrink:!0}}),Object(g.jsx)(Ie.a,{id:"date",label:u("end"),type:"date",value:k.values.endDate,name:"endDate",onChange:k.handleChange,error:k.status||void 0!==k.errors.endDate,helperText:k.touched.endDate&&k.errors.endDate,onBlur:k.handleBlur,className:m.textField,InputLabelProps:{shrink:!0}})]}),Object(g.jsxs)(ta.a,{children:[Object(g.jsx)(De.a,{onClick:function(e){y(!1)},color:"primary",children:u("cancel")}),Object(g.jsx)(De.a,{type:"submit",color:"primary",disabled:k.isSubmitting,autoFocus:!0,children:u("download")})]})]})}),Object(g.jsx)(le.a,{p:3,children:Object(g.jsxs)(le.a,{px:2,children:[!a&&h?Object(g.jsx)(Ne,{className:m.actionIcon}):q([B.delete])&&Object(g.jsx)(R.a,{style:{float:"right"},title:u("delete"),"aria-label":u("delete"),children:Object(g.jsx)(N.a,{onClick:function(e){a?t(!1):w.confirm("delete_course_question","not_undone",(function(){!function(e){var t;(t=ka.delete(e)).then.apply(t,Object(s.a)(j({snackbarSuccess:!0}))).then((function(t){c(e)}))}(n.id)}))},children:Object(g.jsx)(xt.a,{})})}),!a&&h?Object(g.jsxs)(le.a,{children:[Object(g.jsx)(Ne,{className:m.actionIcon}),Object(g.jsx)(Ne,{className:m.actionIcon}),Object(g.jsx)("div",{style:{clear:"both"},children:["100%","100%","100%","100%"].map((function(e,t){return Object(g.jsx)(le.a,{py:0,children:Object(g.jsx)(Ce.a,{variant:"text",width:e,height:"60px"})},t)}))})]}):Object(g.jsxs)("form",{onSubmit:C.handleSubmit,children:[Object(g.jsx)(Ke,{className:m.actionIcon,formik:C}),Object(g.jsx)(Xe,{className:m.actionIcon,formik:C}),Object(g.jsx)(Ae,{label:u("id"),name:"id",disabled:!0,className:m.line,formik:C}),Object(g.jsx)(Ae,{label:u("calendar_url"),name:"calendar_url",disabled:!0,className:m.line,formik:C}),Object(g.jsx)(le.a,{className:[m.line,m.composite],children:Object(g.jsx)(Ae,{label:u("name"),style:{flex:1},name:"name",formik:C})}),Object(g.jsx)(le.a,{className:[m.line,m.composite],children:Object(g.jsx)(Ae,{label:u("description"),style:{flex:1},multiline:!0,rowsMax:8,name:"description",formik:C})}),Object(g.jsxs)(le.a,{className:[m.line,m.composite],children:[Object(g.jsx)(Ae,{label:u("price_term"),style:{flex:1},name:"price_term",formik:C,type:"number"}),Object(g.jsxs)(Ae,{label:u("public"),style:{flex:1},name:"is_published",formik:C,select:!0,children:[Object(g.jsx)(be.a,{value:!0,children:u("yes")}),Object(g.jsx)(be.a,{value:!1,children:u("no")})]})]})]}),!h&&!a&&Object(g.jsx)(le.a,{my:3,children:Object(g.jsx)(P.a,{})}),Object(g.jsx)(le.a,{className:[m.line,m.composite],children:!h&&!a&&Object(g.jsx)(R.a,{style:{flex:1},title:u("take attendance"),"aria-label":u("take_attendance"),children:Object(g.jsx)(De.a,{variant:"contained",color:"default",className:m.button,startIcon:Object(g.jsx)(lr.a,{}),onClick:function(e){b.replace("/attendance?id=".concat(n.id))},children:u("take attendance")})})}),Object(g.jsxs)(le.a,{className:[m.line,m.composite],children:[!h&&q([B.students])&&!a&&Object(g.jsx)(R.a,{style:{flex:1},title:u("export_attendance_list"),"aria-label":u("export_attendance_list"),children:Object(g.jsx)(De.a,{variant:"contained",color:"default",className:m.button,startIcon:Object(g.jsx)(St.a,{}),onClick:function(e){y(!0)},children:u("attendance_list")})}),!h&&q([B.students])&&!a&&Object(g.jsx)(R.a,{style:{flex:1},title:u("export_attendance_list"),"aria-label":u("export_attendance_list"),children:Object(g.jsx)(De.a,{variant:"contained",color:"default",className:m.button,startIcon:Object(g.jsx)(St.a,{}),onClick:function(){var e;(e=ka.downloadSubresource(n.id,"attendance-list/v2")).then.apply(e,Object(s.a)(j({snackbarSuccess:!0})))},children:u("export_attendance_list")+" (".concat(u("v2"),")")})})]}),Object(g.jsxs)(le.a,{className:[m.line,m.composite],children:[!h&&!a&&Object(g.jsx)(R.a,{style:{flex:1},title:u("export_calendar"),"aria-label":u("send_grant_letter"),children:Object(g.jsx)(De.a,{variant:"contained",color:"default",className:m.button,startIcon:Object(g.jsx)(St.a,{}),onClick:function(e){Zn("courses",n.id,n.calendar_id).then((function(e){}))},children:u("export_calendar")})}),!h&&q([B.students,B.guardians])&&!a&&Object(g.jsx)(R.a,{style:{flex:1},title:u("export_students_contact_sheet"),"aria-label":u("export_grant_letter"),children:Object(g.jsx)(De.a,{variant:"contained",color:"default",className:m.button,disabled:I.loading,startIcon:Object(g.jsx)(St.a,{}),onClick:function(e){var t;I.startLoading(),(t=ka.downloadSubresource(n.id,"contactsSheet")).then.apply(t,Object(s.a)(j({snackbarSuccess:!0}))).finally((function(){I.stopLoading()}))},children:u("students_contact_sheet")})})]})]})})]}))},hr=new(we("courses","labels"));function mr(e){var t=e.formik,a=e.name,n=void 0===a?"labels":a,i=e.noDirty,c=void 0!==i&&i,s=Object(ne.a)().t;return Object(g.jsxs)(r.a.Fragment,{children:[Object(g.jsx)(Rt.a,{children:s("labels")}),Ge.map((function(e){return Object(g.jsx)(kn.a,{control:Object(g.jsx)(Tn,{checked:void 0!==t.values[n]&&t.values[n].includes(e),name:n,value:e,formik:t,noDirty:c}),label:s(e)},e)})),Object(g.jsx)(kn.a,{control:Object(g.jsx)(Tn,{checked:void 0!==t.values[n]&&t.values[n].includes("adult"),name:n,value:"adult",formik:t,noDirty:c}),label:s("adult")})]})}var jr=["currentCourse","updateCurrentCourse","patchService","deleteCourse"],pr=Object(w.a)((function(e){return{actionIcon:{float:"right"},button:{margin:e.spacing(1)},line:{width:"100%",marginTop:e.spacing(1)},composite:{display:"flex",flexDirection:"row",flex:1,flexWrap:"wrap",gap:e.spacing(1),width:"100%"}}}));var fr=function(e){var t=e.currentCourse,a=e.updateCurrentCourse,n=(e.patchService,e.deleteCourse,Object(f.a)(e,jr),Object(ne.a)().t,null===t),r=pr(),i=Re(),c=n?{}:t,l=Le(!1,{initialValues:c,enableReinitialize:!0,onSubmit:function(e,n){var r=n.setStatus,l=n.setSubmitting;r();var d=new Set(e.labels),u=new Set(c.labels),b=Array.from(qn(d,u));if(0!==b.size){var h;l(!0);var m=b.map((function(e){var a,n;return u.has(e)?(a=hr.delete(t.id,e)).then.apply(a,Object(s.a)(i({}))):(n=hr.postWithId(t.id,e)).then.apply(n,Object(s.a)(i({})))}));(h=Promise.all(m)).then.apply(h,Object(s.a)(i({snackbarSuccess:!0}))).then((function(){a(Object(o.a)(Object(o.a)({},t),{},{labels:e.labels}))})).finally((function(){l(!1)}))}}},!0);return Object(g.jsx)(le.a,{p:3,children:Object(g.jsx)(le.a,{px:2,children:n?Object(g.jsxs)(le.a,{children:[Object(g.jsx)(Ne,{className:r.actionIcon}),Object(g.jsx)(Ne,{className:r.actionIcon}),Object(g.jsx)("div",{style:{clear:"both"},children:Object(g.jsx)(le.a,{py:0,children:Object(g.jsx)(Ce.a,{variant:"text",width:"100%",height:"150px"})})})]}):Object(g.jsxs)("form",{onSubmit:l.handleSubmit,children:[Object(g.jsx)(Ke,{className:r.actionIcon,formik:l}),Object(g.jsx)(Xe,{className:r.actionIcon,formik:l}),Object(g.jsx)(le.a,{style:{display:"inline-block"},children:Object(g.jsx)(mr,{formik:l})})]})})})},Or=["title","scheduleIds","setScheduleIds","student_id"];Object(w.a)((function(e){return{button:{margin:e.spacing(1)},calendar:{margin:e.spacing(2)}}}));var xr=function(e){e.title;var t=e.scheduleIds,a=e.setScheduleIds,n=e.student_id,r=Object(f.a)(e,Or),i=Re();return Object(g.jsx)("div",Object(o.a)(Object(o.a)({},r),{},{style:{height:"100%",flex:1,minHeight:"70vh"},children:Object(g.jsx)(wa,{allowDelete:function(e){return!0},allowView:function(e){return!e.is_base},viewUrl:function(e){return["/students",e.student_id]},setScheduleIds:a,onEventChange:function(e,t,a,n,r){var c;(c=ua.patch({id:r.id,body:{day_week:t,start_time:a,end_time:n},initial_values:r})).then.apply(c,Object(s.a)(i({errorOut:!0,snackbarSuccess:!0}))).then((function(e){})).catch((function(t){e.revert()}))},viewStudent:!0,scheduleIds:t,editable:!0,selectable:!0,onEventSelected:function(e,r,i){ua.post({day_week:e,start_time:r,end_time:i,course_id:n}).then((function(e){a([].concat(Object(s.a)(t),[e.id]))}))}})}))},gr=Object(w.a)((function(e){return{contentPanel:{position:"relative",overflow:"auto",boxSizing:"border-box",height:"100%",display:"flex",flexDirection:"column"},content:{overflowX:"hidden",display:"flex",flexDirection:"column",overflowY:"auto",flex:1,height:"100%"},tab:{height:"100%"}}}));function _r(e){var t=e.currentCourseId,a=e.setNewCourse,i=(e.addCourseId,e.newCourse),c=e.deleteCourse,d=null===t,u=Re(),b=Object(n.useState)(null),h=Object(l.a)(b,2),m=h[0],j=h[1],p=Ze(),f=Object(l.a)(p,2),O=f[0],x=f[1];Object(n.useEffect)((function(){var e;if(d)return j(null);(e=ka.getOne(t)).then.apply(e,Object(s.a)(u({}))).then((function(e){j(e.data)}))}),[t]);var _=gr(),v=G()(),y=Object(ne.a)().t,w=r.a.useState(0),S=Object(l.a)(w,2),C=S[0],N=S[1];Object(n.useEffect)((function(){N(0)}),[t]);return Object(g.jsxs)(re.a,{elevation:3,square:!0,className:_.contentPanel,children:[Object(g.jsx)(k.a,{position:"static",color:"default",children:Object(g.jsxs)(se.a,{value:C,onChange:function(e,t){N(t)},indicatorColor:"primary",textColor:"primary",variant:"scrollable",scrollButtons:"on",children:[Object(g.jsx)(oe.a,Object(o.a)({label:y("course")},nn(0))),!i&&Object(g.jsx)(oe.a,Object(o.a)({label:y("labels")},nn(1))),!i&&O([x.schedules])&&Object(g.jsx)(oe.a,Object(o.a)({label:y("schedules")},nn(2))),!i&&O([x.students])&&Object(g.jsx)(oe.a,Object(o.a)({label:y("students")},nn(3))),!i&&O([x.teachers])&&Object(g.jsx)(oe.a,Object(o.a)({label:y("teachers")},nn(4))),!i&&O([x.rooms])&&Object(g.jsx)(oe.a,Object(o.a)({label:y("rooms")},nn(5)))]})}),Object(g.jsxs)(ce.a,{axis:"rtl"===v.direction?"x-reverse":"x",index:C,containerStyle:{height:"100%"},className:_.content,onChangeIndex:function(e){N(e)},children:[Object(g.jsxs)(rn,{value:C,index:0,children:[" ",Object(g.jsx)(br,{newCourse:i,setNewCourse:a,dir:v.direction,currentCourse:m,updateCurrentCourse:j,deleteCourse:c})]}),Object(g.jsxs)(rn,{value:C,index:1,children:[" ",Object(g.jsx)(fr,{dir:v.direction,currentCourse:m,updateCurrentCourse:j,deleteCourse:c})]}),O([x.schedules])&&Object(g.jsx)(rn,{value:C,index:2,children:Object(g.jsx)(xr,{setScheduleIds:function(e){return j(Object(o.a)(Object(o.a)({},m),{},{schedules:e}))},className:_.tab,dir:v.direction,scheduleIds:null===m?null:m.schedules,student_id:t})}),O([x.students])&&Object(g.jsxs)(rn,{value:C,index:3,children:[" ",Object(g.jsx)(tn,{defaultSearchBy:"full_name",parentItemDataService:cr,itemDataService:Se,add_message_confirm:"confirm_enroll_to_course",parent_id:t,searchByOptions:["full_name"],withFiltersBox:!0,resourceName:"students",displayNameField:"full_name",usableFilters:[{name:"enrolment_status",defaultValue:null,options:[{label:"enrolled",tooltip:"only_enrolled",name:"enrolled"},{label:"pre-enrolled",tooltip:"only_preenrolled",name:"pre-enrolled"},{label:"early-unenrolled",tooltip:"only_earlyunenrolled",name:"early-unenrolled"}]},{name:"default_payment_method",defaultValue:null,options:[{label:"cash",tooltip:"only_cash",name:"cash"},{label:"bank-transfer",tooltip:"only_banktransfer",name:"bank-transfer"},{label:"bank-direct-debit",tooltip:"only_bankdirectdebit",name:"bank-direct-debit"}]}],auxFields:["enrolment_status"],displayText:function(e){return e.full_name+("enrolled"===e.enrolment_status?" \u2611\ufe0f":"")},add_message:"enroll_to_course",onSubresourceAdded:function(e){j(Object(o.a)(Object(o.a)({},m),{},{students:[].concat(Object(s.a)(m.students),[e])}))},onSubresourceDeleted:function(e){j(Object(o.a)(Object(o.a)({},m),{},{students:m.students.filter((function(t){return t!==e}))}))}})]}),O([x.teachers])&&Object(g.jsxs)(rn,{value:C,index:4,children:[" ",Object(g.jsx)(tn,{defaultSearchBy:"full_name",parentItemDataService:sr,itemDataService:_n,add_message_confirm:"confirm_add_to_course",parent_id:t,searchByOptions:["full_name"],resourceName:"teachers",displayNameField:"full_name",add_message:"add_teacher",onSubresourceAdded:function(e){j(Object(o.a)(Object(o.a)({},m),{},{teachers:[].concat(Object(s.a)(m.teachers),[e])}))},onSubresourceDeleted:function(e){j(Object(o.a)(Object(o.a)({},m),{},{teachers:m.teachers.filter((function(t){return t!==e}))}))}})]}),O([x.rooms])&&Object(g.jsxs)(rn,{value:C,index:5,children:[" ",Object(g.jsx)(tn,{defaultSearchBy:"name",parentItemDataService:ir,itemDataService:Dn,add_message_confirm:"confirm_link_to_room",parent_id:t,searchByOptions:["name"],resourceName:"rooms",displayNameField:"name",add_message:"link_room",onSubresourceAdded:function(e){j(Object(o.a)(Object(o.a)({},m),{},{rooms:[].concat(Object(s.a)(m.rooms),[e])}))},onSubresourceDeleted:function(e){j(Object(o.a)(Object(o.a)({},m),{},{rooms:m.rooms.filter((function(t){return t!==e}))}))}})]})]})]})}var vr=Object(w.a)((function(e){return{root:{height:"100%"},left:{display:"flex",flexDirection:"column",height:"100%",position:"relative"},fab:{position:"absolute",bottom:e.spacing(2),right:e.spacing(2)}}}));var yr={bulkSend:function(e,t,a,n,r,i){var c=new FormData;return c.append("courseIds",JSON.stringify(e)),c.append("emailPreference",n),c.append("subject",t),c.append("studentEnrolmentStatus",r),c.append("body",a),i.forEach((function(e){c.append(e.name,e)})),new Promise((function(e,t){yt()({url:"".concat(xe,"/emails/v1/bulk"),method:"POST",headers:Object(o.a)(Object(o.a)({},{"Cache-Control":"no-cache"}),fe()),data:c}).then((function(t){e(!0)})).catch((function(e){t(e)}))}))}};var wr=["formik","name","label","options","addTo"];var Sr=Object(w.a)((function(e){return Object(S.a)({textField:{"& label.Mui-focused":{color:e.palette.primary.main},"& .MuiInput-underline:after":{borderBottomColor:e.palette.primary.main},"& label":{color:e.palette.neutral.emphasisText.medium},"& fieldset":{borderColor:e.palette.neutral.emphasisText.medium}},option:{fontSize:15,"& > span":{marginRight:10,fontSize:18}}})}));function kr(e){var t=e.formik,a=e.name,n=e.label,i=e.options,c=e.addTo,s=(Object(f.a)(e,wr),r.a.useState(null)),d=Object(l.a)(s,2),u=d[0],b=d[1];r.a.useEffect((function(){b(null)}),[a]);var h=Sr(),m=r.a.useState(""),j=Object(l.a)(m,2),p=j[0],O=j[1];Object(ne.a)().t;return Object(g.jsx)(qe.a,{style:{width:"100%"},options:i,classes:{option:h.option},defaultValue:{id:111,name:"name"},autoHighlight:!0,getOptionLabel:function(e){return e.name},getOptionSelected:function(e){return e.id===u.id},value:u,onChange:function(e,n){!function(e){var n=null!==e?e.code:"";t.setFieldValue(a,n),b(e),e&&c(e)}(n)},inputValue:p,onInputChange:function(e,t){O(t)},name:a,onBlur:t.handleBlur,renderOption:function(e){return Object(g.jsx)(r.a.Fragment,{children:Object(g.jsx)("span",{children:e.name})},e.id)},renderInput:function(e){return Object(g.jsx)(Ie.a,Object(o.a)(Object(o.a)({},e),{},{label:n,fullWidth:1,className:h.textField,inputProps:Object(o.a)(Object(o.a)({},e.inputProps),{},{autoComplete:"new-password"}),error:t.status||void 0!==t.errors[a],helperText:t.touched[a]&&t.errors[a]}))}})}var Cr=Object(w.a)((function(e){return{root:{height:"100%"},textBox:{width:"100%",border:"red"},chip:{margin:e.spacing(.5)},chips:{marginBottom:e.spacing(1)},in:{marginBottom:e.spacing(1),marginTop:e.spacing(2)},fab:{position:"absolute",bottom:e.spacing(4),right:e.spacing(4)},attach:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},card:{marginTop:e.spacing(1)}}}));var Nr=[{path:"students",component:function(e){Object.assign({},e);var t=mn(),a=Object(ne.a)().t,i=Object(n.useState)([]),c=Object(l.a)(i,2),d=c[0],u=c[1],b=Object(n.useState)(!1),h=Object(l.a)(b,2),m=h[0],j=h[1],p=Object(n.useState)(null),f=Object(l.a)(p,2),O=f[0],x=f[1],_=Re(),v=new URLSearchParams(window.location.search).get("id"),y=Ze(),w=Object(l.a)(y,2),S=w[0],k=w[1];Object(n.useEffect)((function(){null!==v&&void 0!==v&&x(v)}),[v]);var C=r.a.useContext(Tt);return Object(n.useEffect)((function(){null!==O&&j(!1)}),[O]),Object(g.jsxs)(ae.a,{container:!0,spacing:3,className:t.root,children:[Object(g.jsxs)(ae.a,{item:!0,xs:4,className:t.left,children:[Object(g.jsx)("h1",{children:a("students")}),Object(g.jsx)(hn,{setCurrentItemId:x,currentItemId:O,items:d,setItems:u,chips:[Object(g.jsx)(R.a,{title:a("export_contact_sheets"),"aria-label":a("export_contact_sheets"),children:Object(g.jsx)(Ga.a,{variant:"outlined",color:"primary",disabled:C.loading,size:"small",avatar:Object(g.jsx)(Jt.a,{children:"csv"}),label:a("export_all_plus"),onClick:function(){var e;C.loading||(C.startLoading(),(e=new Promise((function(e,t){yt()({url:"".concat(xe,"/api/").concat(Oe,"/files/god"),method:"POST",responseType:"blob",headers:Object(o.a)(Object(o.a)({},{Accept:"text/csv","Cache-Control":"no-cache"}),fe())}).then((function(t){var a=t.headers["content-disposition"].split("filename=")[1];null===a&&(a="export.zip");var n=window.URL.createObjectURL(new Blob([t.data])),r=document.createElement("a");r.href=n,r.setAttribute("download",a),document.body.appendChild(r),r.click(),r.remove(),e()})).catch((function(e){t(e)}))}))).then.apply(e,Object(s.a)(_({}))).finally((function(){C.stopLoading()})))}})})],usableFilters:[{name:"enrolment_status",defaultValue:null,options:[{label:"enrolled",tooltip:"only_enrolled",name:"enrolled"},{label:"pre-enrolled",tooltip:"only_preenrolled",name:"pre-enrolled"},{label:"early-unenrolled",tooltip:"only_earlyunenrolled",name:"early-unenrolled"}]},{name:"default_payment_method",defaultValue:null,options:[{label:"cash",tooltip:"only_cash",name:"cash"},{label:"bank-transfer",tooltip:"only_banktransfer",name:"bank-transfer"},{label:"bank-direct-debit",tooltip:"only_bankdirectdebit",name:"bank-direct-debit"}]}],defaultSearchBy:"full_name",searchByOptions:["full_name","id"],dataService:Se,searchBarLabel:"students"}),S([k.post])&&Object(g.jsx)(R.a,{title:a("new_student"),children:Object(g.jsx)(ln.a,{className:t.fab,color:"primary",onClick:function(e){x(null),j(!0)},children:Object(g.jsx)(un.a,{})})})]}),Object(g.jsx)(ae.a,{item:!0,xs:8,className:t.left,children:Object(g.jsx)(on,{currentStudentId:O,newStudent:m,setNewStudent:j,addStudentId:function(e){x(e)},deleteStudent:function(e){e===O&&x(null),u(d.filter((function(t){return t.id!==e})))}})})]})},title:"students",icon:V.a,needs:[Ye.students,Ye.get]},{path:"courses",component:function(e){Object.assign({},e);var t=vr(),a=Object(ne.a)().t,r=Object(n.useState)([]),i=Object(l.a)(r,2),c=i[0],s=i[1],o=Object(n.useState)(!1),d=Object(l.a)(o,2),u=d[0],b=d[1],h=Object(n.useState)(null),m=Object(l.a)(h,2),j=m[0],p=m[1],f=new URLSearchParams(window.location.search).get("id");Object(n.useEffect)((function(){null!==f&&void 0!==f&&p(f)}),[f]),Object(n.useEffect)((function(){null!==j&&b(!1)}),[j]);var O=Ze(),x=Object(l.a)(O,2),_=x[0],v=x[1];return Object(g.jsxs)(ae.a,{container:!0,spacing:3,className:t.root,children:[Object(g.jsxs)(ae.a,{item:!0,xs:4,className:t.left,children:[Object(g.jsx)("h1",{children:a("courses")}),Object(g.jsx)(hn,{setCurrentItemId:p,currentItemId:j,items:c,setItems:s,usableFilters:[{name:"is_published",defaultValue:null,options:[{label:"published",tooltip:"only_published",name:!0},{label:"private",tooltip:"only_private",name:!1}]}],defaultSearchBy:"name",searchByOptions:["name","id"],dataService:ka,searchBarLabel:"courses",displayNameField:"name"}),_([v.post])&&Object(g.jsx)(R.a,{title:a("new_course"),children:Object(g.jsx)(ln.a,{className:t.fab,color:"primary",onClick:function(e){p(null),b(!0)},children:Object(g.jsx)(un.a,{})})})]}),Object(g.jsx)(ae.a,{item:!0,xs:8,className:t.left,children:Object(g.jsx)(_r,{currentCourseId:j,newCourse:u,setNewCourse:b,addCourseId:function(e){p(e)},deleteCourse:function(e){e===j&&p(null),s(c.filter((function(t){return t.id!==e})))}})})]})},title:"courses",icon:K.a,needs:[Ye.courses,Ye.get]},{path:"teachers",component:function(e){Object.assign({},e);var t=rr(),a=Object(ne.a)().t,r=Object(n.useState)([]),i=Object(l.a)(r,2),c=i[0],s=i[1],o=Object(n.useState)(!1),d=Object(l.a)(o,2),u=d[0],b=d[1],h=Object(n.useState)(null),m=Object(l.a)(h,2),j=m[0],p=m[1],f=Ze(),O=Object(l.a)(f,2),x=O[0],_=O[1],v=new URLSearchParams(window.location.search).get("id");return Object(n.useEffect)((function(){null!==v&&void 0!==v&&p(v)}),[v]),Object(n.useEffect)((function(){null!==j&&b(!1)}),[j]),Object(g.jsxs)(ae.a,{container:!0,spacing:3,className:t.root,children:[Object(g.jsxs)(ae.a,{item:!0,xs:4,className:t.left,children:[Object(g.jsx)("h1",{children:a("teachers")}),Object(g.jsx)(hn,{setCurrentItemId:p,currentItemId:j,items:c,setItems:s,defaultSearchBy:"full_name",searchByOptions:["full_name","id"],dataService:_n,searchBarLabel:"teachers"}),x([_.post])&&Object(g.jsx)(R.a,{title:a("new_teacher"),children:Object(g.jsx)(ln.a,{className:t.fab,color:"primary",onClick:function(e){p(null),b(!0)},children:Object(g.jsx)(un.a,{})})})]}),Object(g.jsx)(ae.a,{item:!0,xs:8,className:t.left,children:Object(g.jsx)(nr,{currentTeacherId:j,newTeacher:u,setNewTeacher:b,addTeacherId:function(e){p(e)},deleteTeacher:function(e){e===j&&p(null),s(c.filter((function(t){return t.id!==e})))}})})]})},title:"teachers",icon:Z.a,needs:[Ye.teachers,Ye.get]},{path:"rooms",component:function(e){Object.assign({},e);var t=Hn(),a=Object(ne.a)().t,r=Object(n.useState)([]),i=Object(l.a)(r,2),c=i[0],s=i[1],o=Object(n.useState)(!1),d=Object(l.a)(o,2),u=d[0],b=d[1],h=Object(n.useState)(null),m=Object(l.a)(h,2),j=m[0],p=m[1],f=new URLSearchParams(window.location.search).get("id");Object(n.useEffect)((function(){null!==f&&void 0!==f&&p(f)}),[f]),Object(n.useEffect)((function(){null!==j&&b(!1)}),[j]);var O=Ze(),x=Object(l.a)(O,2),_=x[0],v=x[1];return Object(g.jsxs)(ae.a,{container:!0,spacing:3,className:t.root,children:[Object(g.jsxs)(ae.a,{item:!0,xs:4,className:t.left,children:[Object(g.jsx)("h1",{children:a("rooms")}),Object(g.jsx)(hn,{setCurrentItemId:p,currentItemId:j,items:c,setItems:s,defaultSearchBy:"name",displayNameField:"name",searchByOptions:["name","id"],dataService:Dn,searchBarLabel:"rooms"}),_([v.post])&&Object(g.jsx)(R.a,{title:a("new_room"),children:Object(g.jsx)(ln.a,{className:t.fab,color:"primary",onClick:function(e){p(null),b(!0)},children:Object(g.jsx)(un.a,{})})})]}),Object(g.jsx)(ae.a,{item:!0,xs:8,className:t.left,children:Object(g.jsx)(Wn,{currentRoomId:j,newRoom:u,setNewRoom:b,addRoomId:function(e){p(e)},deleteRoom:function(e){e===j&&p(null),s(c.filter((function(t){return t.id!==e})))}})})]})},title:"rooms",icon:H.a,needs:[Ye.rooms,Ye.get]},{path:"payments",component:function(e){Object.assign({},e);var t=En(),a=Object(ne.a)().t,n=Re(),i=r.a.useContext(Tt);return Object(g.jsxs)("div",{children:[Object(g.jsx)("h1",{children:a("payments")}),Object(g.jsxs)(F.a,{className:t.list,children:[Object(g.jsxs)(E.a,{button:!0,onClick:function(){var e;i.loading||(i.startLoading(),(e=ft.downloadCsv(null,null,"*",null)).then.apply(e,Object(s.a)(n({}))).finally((function(){i.stopLoading()})))},children:[Object(g.jsx)(Ta.a,{children:Object(g.jsx)(Jt.a,{className:t.avatar,children:"csv"})}),Object(g.jsx)(M.a,{id:"name",primary:a("export_all")})]}),Object(g.jsx)(P.a,{})]})]})},title:"payments",icon:X.a,needs:[Ye.payments,Ye.get]},{path:"users",component:function(e){Object.assign({},e);var t=Fn(),a=Object(ne.a)().t,i=Object(n.useState)([]),c=Object(l.a)(i,2),o=c[0],d=c[1],u=Object(n.useState)(null),b=Object(l.a)(u,2),h=b[0],m=b[1],j=r.a.useState(!1),p=Object(l.a)(j,2),f=p[0],O=p[1],x=Ze(),_=Object(l.a)(x,2),v=_[0],y=_[1],w=function(){O(!1)},S=new URLSearchParams(window.location.search).get("id");Object(n.useEffect)((function(){null!==S&&void 0!==S&&m(S)}),[S]);var k=Re(),C=Object(Me.a)({initialValues:{email:"",needs:[]},validationSchema:ke.d({email:dt(a)}),enableReinitialize:!0,onSubmit:function(e,t){var a,n=t.setStatus,r=t.setSubmitting;r(!0),(a=fn.inviteUser(e.email,e.role_id)).then.apply(a,Object(s.a)(k({snackbarSuccess:!0}))).then((function(e){w()})).catch((function(e){n(!0)})).finally((function(){r(!1)}))}});return Object(g.jsxs)(ae.a,{container:!0,spacing:3,className:t.root,children:[Object(g.jsxs)(Oa.a,{open:f,onClose:w,"aria-labelledby":"form-dialog-title",children:[Object(g.jsx)(xa.a,{id:"form-dialog-title",children:a("invite_user")}),Object(g.jsxs)("form",{onSubmit:C.handleSubmit,children:[Object(g.jsxs)(jn.a,{children:[Object(g.jsx)(Ie.a,{autoFocus:!0,margin:"dense",id:"email",name:"email",label:a("email"),type:"email",fullWidth:!0,value:C.values.email,onChange:C.handleChange,onBlur:C.handleBlur,error:C.status||void 0!==C.errors.email,helperText:C.touched.email&&C.errors.email}),Object(g.jsx)(le.a,{my:2,className:t.dialog,children:Object(g.jsx)(le.a,{className:[t.line,t.composite],children:Object(g.jsx)(pn,{formik:C})})})]}),Object(g.jsxs)(ta.a,{children:[Object(g.jsx)(De.a,{onClick:w,color:"primary",children:a("cancel")}),Object(g.jsx)(De.a,{type:"submit",color:"primary",disabled:C.isSubmitting,children:a("invite")})]})]})]}),Object(g.jsxs)(ae.a,{item:!0,xs:4,className:t.left,children:[Object(g.jsx)("h1",{children:a("users")}),Object(g.jsx)(hn,{setCurrentItemId:m,currentItemId:h,items:o,setItems:d,defaultSearchBy:"full_name",searchByOptions:["full_name","id"],dataService:On,searchBarLabel:"users"}),v([y.invite_users])&&Object(g.jsx)(R.a,{title:a("new_user"),children:Object(g.jsx)(ln.a,{className:t.fab,color:"primary",onClick:function(){O(!0)},children:Object(g.jsx)(ue.a,{})})})]}),Object(g.jsx)(ae.a,{item:!0,xs:8,className:t.left,children:Object(g.jsx)(Pn,{currentUserId:h,deleteUser:function(e){e===h&&m(null),d(o.filter((function(t){return t.id!==e})))}})})]})},title:"users",icon:te.a,needs:[Ye.users,Ye.get]},{path:"email",component:function(e){Object.assign({},e);var t=Cr(),a=Object(ne.a)().t,i=Object(n.useState)([]),c=Object(l.a)(i,2),o=c[0],d=c[1],u=Object(n.useState)([]),b=Object(l.a)(u,2),h=b[0],m=b[1],j=Object(n.useState)([]),f=Object(l.a)(j,2),O=f[0],x=f[1],_=r.a.useContext(Tt),v=r.a.useContext(p),y=Re(),w=Object(Me.a)({initialValues:{emailPreference:"resolved",studentEnrolmentStatus:"enrolled"},validationSchema:ke.d({email:dt(a)}),enableReinitialize:!0,onSubmit:function(e,t){t.setStatus;(0,t.setSubmitting)(!0)}});return Object(n.useEffect)((function(){var e;(e=ka.getAll(null,"*",["id","name"])).then.apply(e,Object(s.a)(y({}))).then((function(e){d(e.data)}))}),[]),Object(g.jsxs)("div",{children:[Object(g.jsx)("h1",{children:a("email")}),Object(g.jsxs)(le.a,{className:t.chips,children:[a("to"),": ",h.length>0?h.map((function(e){return Object(g.jsx)(R.a,{title:a("delete"),children:Object(g.jsx)(Ga.a,{variant:"outlined",color:"primary",className:t.chip,size:"small",avatar:Object(g.jsx)(Jt.a,{children:"G"}),label:e.name,onClick:function(){var t;t=e.id,m(h.filter((function(e){return e.id!==t})))}})})})):" - "]}),Object(g.jsxs)(Ie.a,{className:t.in,label:a("use_emails"),style:{width:"100%"},value:void 0===w.values.emailPreference?"":w.values.emailPreference,onChange:w.handleChange,onBlur:w.handleBlur,error:w.status||void 0!==w.errors.emailPreference,helperText:w.touched.emailPreference&&w.errors.emailPreference,name:"emailPreference",select:!0,children:[Object(g.jsx)(be.a,{value:"contacts",children:a("contacts")}),Object(g.jsx)(be.a,{value:"resolved",children:a("resolved")}),Object(g.jsx)(be.a,{value:"student",children:a("student")}),Object(g.jsx)(be.a,{value:"all",children:a("all")})]}),Object(g.jsxs)(Ie.a,{className:t.in,label:a("status"),style:{width:"100%"},value:void 0===w.values.studentEnrolmentStatus?"":w.values.studentEnrolmentStatus,onChange:w.handleChange,onBlur:w.handleBlur,error:w.status||void 0!==w.errors.studentEnrolmentStatus,helperText:w.touched.studentEnrolmentStatus&&w.errors.studentEnrolmentStatus,name:"studentEnrolmentStatus",select:!0,children:[Object(g.jsx)(be.a,{value:"enrolled",children:a("enrolled")}),Object(g.jsx)(be.a,{value:"pre-enrolled",children:a("pre-enrolled")}),Object(g.jsx)(be.a,{value:"early-unenrolled",children:a("early-unenrolled")}),Object(g.jsx)(be.a,{value:null,children:a("all")})]}),Object(g.jsx)(kr,{formik:w,style:{width:"100%"},options:o.filter((function(e){return!h.includes(e)})),addTo:function(e){m([].concat(Object(s.a)(h),[e]))},name:"courses",label:a("courses")}),Object(g.jsx)(Ie.a,{className:t.in,label:a("subject"),style:{width:"100%"},value:void 0===w.values.subject?"":w.values.subject,onChange:w.handleChange,onBlur:w.handleBlur,error:w.status||void 0!==w.errors.subject,helperText:w.touched.subject&&w.errors.subject,name:"subject"}),Object(g.jsx)(Ie.a,{className:t.textBox,multiline:!0,rows:16,value:void 0===w.values.body?"":w.values.body,onChange:w.handleChange,onBlur:w.handleBlur,error:w.status||void 0!==w.errors.body,helperText:w.touched.body&&w.errors.body,name:"body"}),Object(g.jsxs)("div",{children:[(console.log("sfs",O),O.map((function(e){return Object(g.jsx)(Kt.a,{className:t.card,children:Object(g.jsx)(Wt.a,{action:Object(g.jsx)(R.a,{title:a("delete"),"aria-label":a("delete"),children:Object(g.jsx)(N.a,{onClick:function(t){x(O.filter((function(t){return t!==e})))},children:Object(g.jsx)(xt.a,{})})}),titleTypographyProps:{variant:"subheading"},title:e.name})})}))),Object(g.jsx)("input",{style:{display:"none"},id:"contained-button-file",type:"file",multiple:!0,onChange:function(e){x(Object(s.a)(e.target.files))}}),Object(g.jsx)("label",{htmlFor:"contained-button-file",children:Object(g.jsx)(De.a,{className:t.attach,variant:"contained",color:"primary",component:"span",children:a("upload")})})]}),Object(g.jsx)(R.a,{title:a("send_email"),children:Object(g.jsx)(ln.a,{className:t.fab,color:"primary",onClick:function(){_.loading||w.isSubmitting||v.confirm("send_bulk_email","send_bulk_email_description",(function(){var e;_.startLoading(),w.setSubmitting(!0),(e=yr.bulkSend(h.map((function(e){return e.id})),w.values.subject,w.values.body,w.values.emailPreference,w.values.studentEnrolmentStatus,O)).then.apply(e,Object(s.a)(y({snackbarSuccess:!0}))).finally((function(){w.setSubmitting(!1),_.stopLoading()}))}))},disabled:w.isSubmitting||0===h.length,children:Object(g.jsx)(_t.a,{})})})]})},title:"email",icon:$.a,needs:[Ye.send_email,Ye.get]}],Ir=a(70),Tr=a(290),Ar=a.n(Tr),qr=a(292),Br=a.n(qr),Pr=a(310),Fr=a(66),Er={login:function(e,t,a){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return new Promise((function(r,i){yt()({url:"".concat(xe,"/auth/v1/login?totp=").concat(a,"&rememberMe=").concat(n?1:0),method:"POST",auth:{username:e,password:t},headers:Object(o.a)(Object(o.a)({},{"Cache-Control":"no-cache"}),fe())}).then((function(e){r({logged:!0,needs:e.data})})).catch((function(e){try{401===e.response.status&&r({logged:!1})}catch(t){}i(e)}))}))},logout:function(){return new Promise((function(e,t){yt()({url:"".concat(xe,"/auth/v1/logout"),method:"GET",headers:Object(o.a)(Object(o.a)({},{"Cache-Control":"no-cache"}),fe())}).then((function(t){e(!1)})).catch((function(e){t(e)}))}))},ping:function(){return new Promise((function(e,t){yt()({url:"".concat(xe,"/auth/v1/ping"),method:"GET",headers:{"Cache-Control":"no-cache"}}).then((function(t){e({isLoggedIn:!0,needs:t.data})})).catch((function(a){try{401===a.response.status&&e({isLoggedIn:!1,needs:null})}catch(n){}t(a)}))}))}};var Dr=a(289),Rr=a.n(Dr),Mr=a(131),Lr=a(285),Gr=a(286),zr=a(287),Vr=a(288),Ur=["cat"],Kr={eng:{translation:zr},cat:{translation:Vr}};Fr.a.use(Lr.a).use(Gr.a).use(Mr.e).init({resources:Kr,fallbackLng:Ur,detection:{checkWhitelist:!0},debug:!1,whitelist:["eng","cat"],interpolation:{escapeValue:!1}}).then((function(e){return{}}));Fr.a;var Wr=function(){return localStorage.getItem("i18nextLng")||Ur};function Hr(e){var t=Object.assign({},e),a=Object(ne.a)().t,n=Wr();return Object(g.jsx)(R.a,Object(o.a)(Object(o.a)({title:a("cat"===n?"use_eng":"use_cat"),style:{float:"right"}},t),{},{children:Object(g.jsx)(N.a,{color:"inherit",onClick:function(){Fr.a.changeLanguage("eng"===Wr()?"cat":"eng").then()},"aria-label":a("cat"===n?"use_eng":"use_cat"),children:Object(g.jsx)(Rr.a,{})})}))}var Yr=a(160),Zr=a.n(Yr);function Jr(e){var t=Object.assign({},e),a=r.a.useContext(Va),n=Object(ne.a)().t;return Object(g.jsx)(R.a,Object(o.a)(Object(o.a)({title:a.theme?n("use_light"):n("use_dark"),style:{float:"right"}},t),{},{children:Object(g.jsx)(N.a,{color:"inherit","aria-label":a.theme?n("use_light"):n("use_dark"),onClick:a.switchTheme,children:Object(g.jsx)(Zr.a,{})})}))}var Xr=a(291),Qr=a.n(Xr),$r=a(205),ei=a.n($r);function ti(e){var t=Object.assign({},e),a=Object(ne.a)().t,n=Object(O.g)();return Object(g.jsx)(R.a,Object(o.a)(Object(o.a)({title:a("teacher_dashboard"),style:{float:"right"}},t),{},{children:Object(g.jsx)(N.a,{color:"inherit",onClick:function(){return n.replace("/teacher-dashboard")},"aria-label":a("teacher_dashboard"),"aria-haspopup":"false",children:Object(g.jsx)(ei.a,{})})}))}var ai={eng:{label:"english",dir:"ltr",active:!0},cat:{label:"catal\xe0",dir:"ltr",active:!1}},ni=Object(w.a)((function(e){return Object(S.a)({toolbar:Object(o.a)({display:"flex",alignItems:"center",justifyContent:"flex-end",padding:e.spacing(0,1)},e.mixins.toolbar),grow:{flexGrow:1}})})),ri=Object(O.j)((function(e){Object(O.g)();var t,a=ni(),i=Re(),c=localStorage.getItem("i18nextLng")||"eng",o=Object(ne.a)().t,d=r.a.useState(null),u=Object(l.a)(d,2),b=u[0],h=u[1],m=Boolean(b),j=function(){h(null)},p=r.a.useState(null),f=Object(l.a)(p,2),_=f[0],v=f[1],w=Boolean(_),S=function(){v(null)};r.a.useEffect((function(){document.body.dir=ai[c].dir}),[_,c]);var k=Object(g.jsx)(Pr.a,{anchorEl:_,anchorOrigin:{vertical:"top",horizontal:"right"},id:"primary-language-select-menu",keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:w,onClose:S,children:null===(t=Object.keys(ai))||void 0===t?void 0:t.map((function(e){return Object(g.jsx)(be.a,{onClick:function(){return t=e,Fr.a.changeLanguage(t).then(),void S();var t},children:ai[e].label},e)}))}),I=Object(n.useContext)(x),T="primary-search-account-menu",A=Object(g.jsx)(Pr.a,{anchorEl:b,anchorOrigin:{vertical:"top",horizontal:"right"},id:T,keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:m,onClose:j,children:Object(g.jsx)(be.a,{onClick:function(e){var t;(t=Er.logout()).then.apply(t,Object(s.a)(i({}))).then((function(){I.setUser({logged:!1,ping:!1})})),j()},children:o("log_out")})});return Object(g.jsxs)(Na.a,{children:[Object(g.jsx)(N.a,{color:"inherit","aria-label":o("open_drawer"),onClick:e.handleDrawerOpen,edge:"start",className:Object(C.a)(a.menuButton,Object(y.a)({},a.hide,e.open)),children:Object(g.jsx)(Ar.a,{})}),Object(g.jsx)(Rt.a,{variant:"h6",noWrap:!0,children:"centr\xedfuga4"}),Object(g.jsx)("div",{className:a.grow}),Object(g.jsx)(ti,{}),Object(g.jsx)(R.a,{title:o("docs"),children:Object(g.jsx)(N.a,{color:"inherit",onClick:function(){return window.open("https://miquelvir.github.io/centrifuga4/","_blank")},"aria-label":o("docs"),"aria-haspopup":"false",children:Object(g.jsx)(Qr.a,{})})}),Object(g.jsx)(Hr,{}),Object(g.jsx)(Jr,{}),Object(g.jsx)(R.a,{title:o("my_account"),children:Object(g.jsx)(N.a,{color:"inherit",onClick:function(e){h(e.currentTarget)},"aria-label":o("my_account"),"aria-controls":T,"aria-haspopup":"true",children:Object(g.jsx)(Br.a,{})})}),k,A]})})),ii=a(316),ci=a(584),si=240,oi=Object(w.a)((function(e){return Object(S.a)({root:{display:"flex",height:"100vh"},appBar:{zIndex:e.zIndex.drawer+1,transition:e.transitions.create(["width","margin"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),background:e.palette.neutral.main,color:e.palette.neutral.emphasisText.medium},appBarShift:{marginLeft:si,width:"calc(100% - ".concat(si,"px)"),transition:e.transitions.create(["width","margin"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen})},menuButton:{marginRight:36},hide:{display:"none"},drawer:{width:si,flexShrink:0,whiteSpace:"nowrap"},drawerOpen:{width:si,transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen})},drawerClose:Object(y.a)({transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),overflowX:"hidden",width:e.spacing(7)+1},e.breakpoints.up("sm"),{width:e.spacing(9)+1}),backdrop:{zIndex:e.zIndex.drawer+1,color:"#fff"},toolbar:Object(o.a)({display:"flex",alignItems:"center",justifyContent:"flex-end",padding:e.spacing(0,1)},e.mixins.toolbar),content:{display:"flex",flexFlow:"column",height:"100%",width:"100%",overflow:"auto"},main:{flex:1,padding:e.spacing(3),overflow:"auto"},icon:{"&":{color:e.palette.neutral.emphasisText.medium}},selectedIcon:{"&":{color:e.palette.primary.main}},grow:{flexGrow:1}})})),li=function(e){var t,a,n=G()(),i=oi(),c=e.baseRouter,s=Object(ne.a)().t,o=r.a.useState(!1),u=Object(l.a)(o,2),b=u[0],h=u[1],m=(Object(O.i)(),Object(O.h)().pathname),j=Ze(),p=Object(l.a)(j,2),f=p[0],x=(p[1],function(){h(!1)}),_=r.a.useState(!1),v=Object(l.a)(_,2),w=v[0],S=v[1],T=r.a.createRef(),q=Object(O.g)();return Object(g.jsxs)("div",{className:i.root,children:[Object(g.jsx)(d.a,{}),Object(g.jsxs)(Tt.Provider,{value:{loading:w,startLoading:function(){S(!0)},stopLoading:function(){S(!1)}},children:[Object(g.jsx)(k.a,{position:"fixed",className:Object(C.a)(i.appBar,Object(y.a)({},i.appBarShift,b)),children:Object(g.jsx)(ri,{routerRef:c,changeTheme:e.changeTheme,handleDrawerOpen:function(){h(!0)},handleDrawerClose:x,open:b})}),Object(g.jsx)(O.d,{ref:T,children:Object(g.jsxs)(ga.Provider,{value:{currentTab:m,goTo:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;null===t?q.replace("/home/".concat(e)):q.replace("/home/".concat(e,"?id=").concat(t))}},children:[Object(g.jsxs)(I.a,{variant:"permanent",className:Object(C.a)(i.drawer,(t={},Object(y.a)(t,i.drawerOpen,b),Object(y.a)(t,i.drawerClose,!b),t)),classes:{paper:Object(C.a)((a={},Object(y.a)(a,i.drawerOpen,b),Object(y.a)(a,i.drawerClose,!b),a))},children:[Object(g.jsx)("div",{className:i.toolbar,children:Object(g.jsx)(N.a,{onClick:x,children:"rtl"===n.direction?Object(g.jsx)(A.a,{}):Object(g.jsx)(B.a,{})})}),Object(g.jsx)(P.a,{}),Object(g.jsx)(F.a,{children:Nr.filter((function(e){return f(e.needs)})).map((function(e){return Object(g.jsxs)(E.a,{to:e.path,button:!0,component:Ir.b,children:[Object(g.jsx)(D.a,{className:"/home/".concat(e.path)===m?i.selectedIcon:i.icon,children:Object(g.jsx)(R.a,{title:s(e.title),"aria-label":s(e.title),children:Object(g.jsx)(e.icon,{})})}),Object(g.jsx)(M.a,{primary:s(e.title)})]},e.title)}))})]}),Object(g.jsxs)("div",{className:i.content,children:[Object(g.jsx)("div",{className:i.toolbar}),Object(g.jsxs)("main",{className:i.main,children:[Object(g.jsx)(O.b,{exact:!0,path:"/home/",children:Object(g.jsx)(O.a,{to:"/home/students"})}),Nr.filter((function(e){return f(e.needs)})).map((function(e){return Object(g.jsx)(O.b,{path:"/home/".concat(e.path),component:e.component},e.title)}))]})]})]})}),Object(g.jsx)(ii.a,{className:i.backdrop,open:w,onClick:function(){S(!1)},children:Object(g.jsx)(ci.a,{color:"inherit"})})]})]})},di=a(586),ui={reset:function(e,t,a,n){return new Promise((function(r,i){yt()({url:"".concat(xe,"/password-reset/v1/redeem"),method:"POST",data:{email:e,password:t,token:a,recaptcha:n},headers:Object(o.a)(Object(o.a)({},{"Cache-Control":"no-cache"}),fe())}).then((function(e){r(!0)})).catch((function(e){i(e)}))}))},startReset:function(e,t){return new Promise((function(a,n){yt()({url:"".concat(xe,"/password-reset/v1/request"),method:"POST",data:{email:e,recaptcha:t},headers:Object(o.a)(Object(o.a)({},{"Cache-Control":"no-cache"}),fe())}).then((function(e){a(!0)})).catch((function(e){n(e)}))}))}};var bi=function(e){return Object(n.useEffect)((function(){return e()}),[])},hi=a(110),mi=a(585),ji=Object(w.a)((function(e){var t;return{root:{display:"flex",flexGrow:1,height:"100vh"},field:{width:"100%",margin:"5px"},details:{width:"100%",display:"flex",verticalAlign:"middle"},paper:(t={height:"50%"},Object(y.a)(t,e.breakpoints.up("md"),{minWidth:"500px",width:"50%"}),Object(y.a)(t,e.breakpoints.down("md"),{width:"100%"}),Object(y.a)(t,"margin","auto"),Object(y.a)(t,"padding","50px"),t),reset:{width:"100%",textAlign:"end",cursor:"",display:"flex",flexDirection:{xs:"column",md:"row"},verticalAlign:"middle"},remember:{width:"100%",textAlign:"start",cursor:"",verticalAlign:"middle"}}})),pi=function(e){var t=ji(),a=r.a.useContext(x),n=r.a.useContext(Va),i=Object(mi.a)("(max-width:960px)"),c=r.a.useState(null),o=Object(l.a)(c,2),d=o[0],u=o[1],b=r.a.useState(!1),h=Object(l.a)(b,2),m=h[0],p=h[1];var f=Re(),O=Object(j.b)().enqueueSnackbar,_=function(t){var n=a.setUser,r=a.setNeeds,i=a.setTeacher;n({logged:!0,ping:!0}),r(t.needs),i(t.teacher);var c=(e.location.state||{from:{pathname:"/home/students"}}).from;e.history.push(c)},v=Object(ne.a)().t,y=Object(Me.a)({initialValues:{username:"",password:"",totp:"",rememberMe:!1},validationSchema:ke.d({username:lt(v),password:ke.f().required(v("password_required")),totp:ke.f().required(v("2FA_needed")).test("len",v("2FA_6digits"),(function(e){return 6===(void 0===e?"":e).toString().length})).test("digits",v("2FA_invalid"),(function(e){return!!Number(e)}))}),enableReinitialize:!0,onSubmit:function(e,t){var a,n=e.username,r=e.password,i=e.totp,c=e.rememberMe,o=t.setStatus,l=t.setSubmitting;o(),(a=Er.login(n,r,i,c)).then.apply(a,Object(s.a)(f({handle401:!1}))).then((function(e){e.logged?_(e.needs):o(!0)})).finally((function(){l(!1)}))}});bi((function(){if(a.user.logged)return e.history.push("/home/students"),null;var t;!1!==a.user.ping&&(t=Er.ping()).then.apply(t,Object(s.a)(f({}))).then((function(e){e.isLoggedIn&&_(e.needs)}))}));return Object(g.jsx)("div",{className:t.root,children:Object(g.jsxs)(ae.a,{container:!0,children:[!i&&Object(g.jsx)(ae.a,{xs:2,item:!0}),Object(g.jsx)(ae.a,{xs:i?12:8,item:!0,children:Object(g.jsx)(ae.a,{container:!0,spacing:0,align:"center",justify:"center",direction:"column",style:{height:"100%"},children:Object(g.jsx)(ae.a,{item:!0,children:Object(g.jsxs)(le.a,{m:2,children:[i&&Object(g.jsxs)(g.Fragment,{children:[Object(g.jsx)(Hr,{style:{float:"right"}}),Object(g.jsx)(Jr,{style:{float:"right"}})," "]}),Object(g.jsxs)(re.a,{className:t.paper,children:[Object(g.jsx)("img",{src:"".concat(_e,"/logo_centrifuga4_").concat(n.label,".svg"),alt:"Logo Centr\xedfuga",style:{height:"85px"}}),Object(g.jsxs)("form",{onSubmit:y.handleSubmit,children:[Object(g.jsx)(Ie.a,{label:v("email"),disabled:y.isSubmitting,helperText:y.touched.username&&y.errors.username,type:"email",name:"username",className:t.field,value:y.values.username,onChange:y.handleChange,onBlur:y.handleBlur,error:y.status}),Object(g.jsx)(Ie.a,{label:v("password"),name:"password",type:"password",helperText:y.touched.password&&y.errors.password,className:t.field,value:y.values.password,disabled:y.isSubmitting,onChange:y.handleChange,onBlur:y.handleBlur,error:y.status}),Object(g.jsx)(Ie.a,{label:v("2FA_code"),name:"totp",type:"password",helperText:y.touched.totp&&y.errors.totp,className:t.field,value:y.values.totp,disabled:y.isSubmitting,onChange:y.handleChange,onBlur:y.handleBlur,error:y.status}),Object(g.jsx)(le.a,{my:3,children:Object(g.jsx)(De.a,{variant:"contained",color:"primary",type:"submit",disabled:y.isSubmitting,className:t.field,children:v("log_in")})}),Object(g.jsxs)(le.a,{my:1,className:t.details,children:[Object(g.jsxs)("div",{className:t.remember,children:[Object(g.jsx)(Cn.a,{name:"rememberMe",value:y.values.rememberMe,onChange:y.handleChange,onBlur:y.handleBlur,error:y.status,helperText:y.touched.rememberMe&&y.errors.rememberMe,checked:y.values.rememberMe}),Object(g.jsx)(Rt.a,{variant:"caption",children:v("rememberMe")})]}),Object(g.jsx)("div",{className:t.resetPa,children:Object(g.jsx)(Rt.a,{className:t.reset,variant:"caption",children:Object(g.jsx)(di.a,{component:"button",variant:"body2",onClick:function(){p(!0)},style:{verticalAlign:"middle"},children:v("reset_password")})})})]})]}),m&&Object(g.jsxs)("div",{children:[Object(g.jsx)(hi.a,{sitekey:ge,onChange:function(e){u(e)},theme:n.theme?"dark":"light",className:t.recaptcha}),Object(g.jsx)(le.a,{my:3,children:Object(g.jsx)(De.a,{variant:"contained",color:"primary",onClick:function(){var e,t=y.values.username;null===t||""===t||void 0===t?O(v("username_required_password_reset"),{variant:"warning"}):(e=ui.startReset(t,d)).then.apply(e,Object(s.a)(f({}))).then((function(e){p(!1),O(v("started_password_reset"),{variant:"success"})}))},disabled:null===d,className:t.field,children:v("reset_password")})})]})]})]})})})}),!i&&Object(g.jsxs)(ae.a,{xs:2,item:!0,children:[Object(g.jsx)(Hr,{style:{float:"right"}}),Object(g.jsx)(Jr,{style:{float:"right"}})]})]})})},fi={signup:function(e,t,a,n,r,i,c){return new Promise((function(e,s){yt()({url:"".concat(xe,"/user-invites/v1/redeem"),method:"POST",data:{password:t,email:a,name:n,surname1:r,surname2:i,token:c},headers:Object(o.a)(Object(o.a)({},{"Cache-Control":"no-cache"}),fe())}).then((function(t){e(t.data)})).catch((function(e){s(e)}))}))}};var Oi=a(295),xi=a.n(Oi),gi=Object(w.a)((function(e){return{root:{display:"flex",flexGrow:1,height:"100vh"},field:{width:"100%",margin:"5px"},paper:{width:"50%",minWidth:"500px",height:"50%",padding:"50px",margin:"auto"}}})),_i=function(e){var t=gi(),a=r.a.useContext(Va),i=Object(j.b)().enqueueSnackbar,c=Object(n.useState)(0),o=Object(l.a)(c,2),d=o[0],u=o[1],b=Object(n.useState)(null),h=Object(l.a)(b,2),m=h[0],f=h[1],O=r.a.useContext(p);bi((function(){Fr.a.changeLanguage(v.get("lan")).then()}));var x=Object(ne.a)().t,_=Re(),v=new URLSearchParams(window.location.search),y=v.get("token"),w=v.get("email"),S=Object(Me.a)({initialValues:{username:w,email:w,password:"",name:"",surname1:"",surname2:"",password2:""},validationSchema:ke.d({username:lt(x),email:dt(x),password:it(x),password2:ct(x),name:ke.f().required(x("name_required")),surname1:ke.f().required(x("surname1_required")),surname2:ke.f().required(x("surname2_required"))}),enableReinitialize:!0,onSubmit:function(e,t){var a,n=e.username,r=e.email,c=e.password,o=e.name,l=e.surname1,d=e.surname2,b=(e.password2,t.setStatus),h=t.setSubmitting;b(),(a=fi.signup(n,c,r,o,l,d,y)).then.apply(a,Object(s.a)(_({handle401:!1,handle400:!1}))).then((function(e){i(x("sign_up_success"),{variant:"success"}),h(!1),u(1),f(e.totp)}),(function(e){h(!1),b(e),401===e.response.status?i(x("invalid_expired_invite"),{variant:"warning"}):400===e.response.status&&i(x("used_invite"),{variant:"warning"})}))}});return Object(g.jsx)("div",{className:t.root,children:Object(g.jsxs)(ae.a,{container:!0,children:[Object(g.jsx)(ae.a,{xs:2,item:!0}),Object(g.jsx)(ae.a,{xs:8,item:!0,children:Object(g.jsx)(ae.a,{container:!0,spacing:0,align:"center",justify:"center",direction:"column",style:{height:"100%"},children:Object(g.jsx)(ae.a,{item:!0,children:Object(g.jsx)(le.a,{m:2,children:Object(g.jsxs)(re.a,{className:t.paper,children:[Object(g.jsx)("img",{src:"".concat(_e,"/logo_centrifuga4_").concat(a.label,".svg"),alt:"Logo Centr\xedfuga",style:{height:"85px"}}),0===d&&Object(g.jsxs)(r.a.Fragment,{children:[Object(g.jsx)(le.a,{m:2,children:Object(g.jsx)(Rt.a,{children:x("been_invited")})}),Object(g.jsxs)("form",{onSubmit:S.handleSubmit,children:[Object(g.jsx)(Ie.a,{label:x("email"),helperText:S.touched.email&&S.errors.email,type:"email",name:"email",className:t.field,value:S.values.email,onChange:S.handleChange,onBlur:S.handleBlur,error:S.status,disabled:!0}),Object(g.jsx)(Ie.a,{label:x("name"),helperText:S.touched.name&&S.errors.name,name:"name",className:t.field,value:S.values.name,onChange:S.handleChange,disabled:S.isSubmitting,onBlur:S.handleBlur,error:S.status}),Object(g.jsx)(Ie.a,{label:x("surname1"),helperText:S.touched.surname1&&S.errors.surname1,name:"surname1",disabled:S.isSubmitting,className:t.field,value:S.values.surname1,onChange:S.handleChange,onBlur:S.handleBlur,error:S.status}),Object(g.jsx)(Ie.a,{label:x("surname2"),helperText:S.touched.surname2&&S.errors.surname2,name:"surname2",disabled:S.isSubmitting,className:t.field,value:S.values.surname2,onChange:S.handleChange,onBlur:S.handleBlur,error:S.status}),Object(g.jsx)(Ie.a,{label:x("password"),name:"password",type:"password",helperText:S.touched.password&&S.errors.password,className:t.field,value:S.values.password,disabled:S.isSubmitting,onChange:S.handleChange,onBlur:S.handleBlur,error:S.status,autoComplete:"new-password"}),Object(g.jsx)(Ie.a,{label:x("confirm_password"),name:"password2",type:"password",helperText:S.touched.password2&&S.errors.password2,className:t.field,value:S.values.password2,disabled:S.isSubmitting,onChange:S.handleChange,onBlur:S.handleBlur,error:S.status,autoComplete:"new-password"}),Object(g.jsx)(le.a,{my:3,children:Object(g.jsx)(De.a,{variant:"contained",color:"primary",type:"submit",disabled:S.isSubmitting||!(S.isValid&&S.dirty),className:t.field,children:x("sign_up")})})]})]}),1===d&&Object(g.jsxs)(r.a.Fragment,{children:[Object(g.jsx)(le.a,{m:2,children:Object(g.jsx)(Rt.a,{children:x("setup_2FA")})}),Object(g.jsx)(le.a,{m:2,children:Object(g.jsxs)("ul",{style:{textAlign:"left"},children:[Object(g.jsx)("li",{children:Object(g.jsx)(Rt.a,{variant:"body2",children:x("2FA_tip1")})}),Object(g.jsx)("li",{children:Object(g.jsx)(Rt.a,{variant:"body2",children:x("2FA_tip2")})}),Object(g.jsx)("li",{children:Object(g.jsx)(Rt.a,{variant:"body2",children:x("2FA_tip3")})})]})}),Object(g.jsx)(le.a,{m:4,children:null!==m&&Object(g.jsx)(xi.a,{value:m,size:"125"})}),Object(g.jsx)(le.a,{m:1,style:{textAlign:"right"},children:Object(g.jsx)(di.a,{variant:"overline",href:"https://miquelvir.github.io/centrifuga4/docs/how-tos/2FA",target:"_blank",children:x("learn_how_2FA")})}),Object(g.jsx)(le.a,{my:3,children:Object(g.jsx)(De.a,{variant:"contained",color:"primary",onClick:function(){console.log("click"),O.confirm("title_2fa_continue","description_2fa_continue",(function(){e.history.push("/login")}))},className:t.field,children:x("continue")})})]})]})})})})}),Object(g.jsxs)(ae.a,{xs:2,item:!0,children:[Object(g.jsx)(Hr,{style:{float:"right"}}),Object(g.jsx)(Jr,{style:{float:"right"}})]})]})})},vi=Object(w.a)((function(e){return{root:{display:"flex",flexGrow:1,height:"100vh"},field:{width:"100%",margin:"5px"},recaptcha:{margin:e.spacing(3)},paper:{width:"50%",minWidth:"500px",height:"50%",padding:"50px",margin:"auto"}}})),yi=function(e){var t=vi(),a=r.a.useContext(Va),n=r.a.useState(null),i=Object(l.a)(n,2),c=i[0],o=i[1];var d=Object(j.b)().enqueueSnackbar;bi((function(){Fr.a.changeLanguage(b.get("lan")).then()}));var u=Object(ne.a)().t,b=new URLSearchParams(window.location.search),h=Re(),m=b.get("token"),p=b.get("email"),f=Object(Me.a)({initialValues:{email:p,password:"",password2:""},validationSchema:ke.d({email:lt(u),password:it(u),password2:ct(u)}),enableReinitialize:!0,onSubmit:function(t,a){var n,r=t.email,i=t.password,o=(t.password2,a.setStatus),l=a.setSubmitting;o(),(n=ui.reset(r,i,m,c)).then.apply(n,Object(s.a)(h({handle401:!1}))).then((function(t){d(u("reset_password_success"),{variant:"success"}),l(!1),e.history.push("/login")}),(function(e){l(!1),o(e),401===e.response.status&&d(u("invalid_expired_reset"),{variant:"warning"})}))}});return console.log("***",f.error,f.errors,f.errors.email,f.touched,f.values,f.initialValues),Object(g.jsx)("div",{className:t.root,children:Object(g.jsxs)(ae.a,{container:!0,children:[Object(g.jsx)(ae.a,{xs:2,item:!0}),Object(g.jsx)(ae.a,{xs:8,item:!0,children:Object(g.jsx)(ae.a,{container:!0,spacing:0,align:"center",justify:"center",direction:"column",style:{height:"100%"},children:Object(g.jsx)(ae.a,{item:!0,children:Object(g.jsx)(le.a,{m:2,children:Object(g.jsxs)(re.a,{className:t.paper,children:[Object(g.jsx)("img",{src:"".concat(_e,"/logo_centrifuga4_").concat(a.label,".svg"),alt:"Logo Centr\xedfuga",style:{height:"85px"}}),Object(g.jsx)(le.a,{m:2,children:Object(g.jsx)(Rt.a,{children:u("new_password")})}),Object(g.jsxs)("form",{onSubmit:f.handleSubmit,children:[Object(g.jsx)(Ie.a,{label:u("email"),helperText:f.touched.email&&f.errors.email,type:"email",name:"email",className:t.field,value:f.values.email,onChange:f.handleChange,onBlur:f.handleBlur,error:f.status,disabled:!0}),Object(g.jsx)(Ie.a,{label:u("password"),name:"password",type:"password",helperText:f.touched.password&&f.errors.password,className:t.field,value:f.values.password,disabled:f.isSubmitting,onChange:f.handleChange,onBlur:f.handleBlur,error:f.status}),Object(g.jsx)(Ie.a,{label:u("confirm_password"),name:"password2",type:"password",helperText:f.touched.password2&&f.errors.password2,className:t.field,value:f.values.password2,disabled:f.isSubmitting,onChange:f.handleChange,onBlur:f.handleBlur,error:f.status}),Object(g.jsx)(hi.a,{sitekey:ge,onChange:function(e){o(e)},theme:a.theme?"dark":"light",className:t.recaptcha}),Object(g.jsx)(le.a,{my:3,children:Object(g.jsx)(De.a,{variant:"contained",color:"primary",type:"submit",disabled:f.isSubmitting||null==c||!(f.isValid&&f.dirty),className:t.field,children:u("change_password")})})]})]})})})})}),Object(g.jsxs)(ae.a,{xs:2,item:!0,children:[Object(g.jsx)(Hr,{style:{float:"right"}}),Object(g.jsx)(Jr,{style:{float:"right"}})]})]})})},wi=a(587),Si=a(601);function ki(){var e=r.a.useContext(Va);return Object(g.jsx)(le.a,{mx:2,style:{textAlign:"left"},children:Object(g.jsx)("img",{src:"".concat(_e,"/logo_xamfra_").concat(e.label,".png"),alt:"Logo Xamfr\xe0",style:{height:"35px"}})})}var Ci=a(297),Ni=a.n(Ci),Ii=a(298),Ti=a.n(Ii),Ai=a(209),qi=a.n(Ai),Bi={getCourses:function(){return new Promise((function(e,t){yt()({method:"get",url:"".concat(xe,"/pre-enrolment/v1/courses"),headers:Object(o.a)(Object(o.a)({},{"Content-Type":"application/json","Cache-Control":"no-cache"}),fe())}).then((function(t){e(t.data)})).catch((function(e){t(e)}))}))},postPreEnrollment:function(e,t){return new Promise((function(a,n){yt()({method:"post",url:"".concat(xe,"/pre-enrolment/v1/pre-enrolment"),data:{body:e,recaptcha:t},headers:Object(o.a)(Object(o.a)({},{"Content-Type":"application/json","Cache-Control":"no-cache"}),fe())}).then((function(e){a(e)})).catch((function(e){n(e)}))}))}};var Pi=a(210),Fi=a.n(Pi),Ei=a(296),Di=a.n(Ei),Ri=function(e){return function(e,t){var a=new Date(e.getTime());return a.setDate(e.getDate()+(7+t-e.getDay())%7),a}(new Date,e).toLocaleString(window.navigator.language,{weekday:"short"})},Mi=function(e){return e.base_schedules?e.base_schedules.map((function(e){return Ri(e.day_week)+", "+e.start_time.slice(0,-3)+" - "+e.end_time.slice(0,-3)})).join("; "):null},Li=Object(w.a)((function(e){return{root:{backgroundColor:e.palette.background.paper}}}));function Gi(e){var t=Li();return Object(g.jsxs)(le.a,{className:t.root,children:[Object(g.jsxs)(le.a,{p:2,style:{width:"100%"},children:[e.children,Object(g.jsx)(ki,{})]}),Object(g.jsx)(P.a,{})]})}var zi=Object(w.a)((function(e){return{root:{width:"100%"},field:{width:"100%",margin:"5px"},cards:{"& > *":{margin:e.spacing(3)}},buttons:{"& > *":{margin:e.spacing(1)}},line:{width:"100%",marginTop:e.spacing(1)},card:{minWidth:200,width:"fit-content",maxWidth:500,display:"inline-block"},recaptcha:{margin:e.spacing(4)},bullet:{display:"inline-block",margin:"0 2px",transform:"scale(0.8)"},title:{fontSize:14},pos:{marginBottom:12},list:{minHeight:"150px",overflow:"auto"},composite:{display:"flex",flexDirection:"row",flex:1,flexWrap:"wrap",gap:e.spacing(1),width:"100%"}}})),Vi=function(e){var t=new Date,a=new Date(e),n=t.getFullYear()-a.getFullYear(),r=t.getMonth()-a.getMonth();return(r<0||0===r&&t.getDate()=h||S(O+1))},disabled:N})})]})]})]})},rc=a(300);function ic(e){Object(rc.a)(e);r.a.useContext(Va),Object(ne.a)().t;return Object(g.jsx)(Rt.a,{variant:"h1",children:"Nope, not found... \ud83d\udc7b"})}var cc=new(we("attendances")),sc=a(304),oc=a.n(sc),lc=a(553),dc=a(591),uc=a(301),bc=a.n(uc),hc=a(596),mc=Object(w.a)((function(e){var t;return{formControl:(t={},Object(y.a)(t,e.breakpoints.down("sm"),{minWidth:"50%",maxWidth:"50%"}),Object(y.a)(t,e.breakpoints.up("sm"),{minWidth:"25%",maxWidth:"25%"}),t),selectStatus:{"&:before":{borderColor:"red"},"&:after":{borderColor:"red"}},root:{width:"100%"}}}));function jc(e){var t=e.student,a=e.attendance,n=e.setAttendance,r=e.handleOpenCommentBox,i=mc(),c="checkbox-list-label-".concat(t.id),s=Object(ne.a)().t,l=null===a?null:a.status,d=function(e){return n(Object(o.a)(Object(o.a)({},a),{},{status:e}))},u=Object(w.a)((function(e){return{root:{"& $notchedOutline":{borderColor:0===l?e.palette.neutral.status.success:1===l?e.palette.neutral.status.error:e.palette.neutral.status.dirty}},focused:{},notchedOutline:{}}}))();return Object(g.jsxs)(E.a,{role:void 0,dense:!0,button:!0,onClick:function(){if(0===l)return d(1);d(0)},className:i.root,children:[Object(g.jsx)(lc.a,{variant:"outlined",className:i.formControl,children:Object(g.jsxs)(dc.a,{labelId:"demo-simple-select-outlined-label",id:"demo-simple-select-outlined",value:l,onChange:function(e){d(e.target.value)},className:i.selectStatus,onClick:function(e){return e.stopPropagation()},input:Object(g.jsx)(hc.a,{id:"outlined-age-simple",classes:u}),children:[Object(g.jsx)(be.a,{value:0,children:s("attended")}),Object(g.jsx)(be.a,{value:1,children:s("absent")}),Object(g.jsx)(be.a,{value:2,children:s("absent-justified")})]})}),Object(g.jsx)(le.a,{px:2,children:Object(g.jsx)(R.a,{title:s("add-comment"),children:Object(g.jsx)(N.a,{color:"secondary","aria-label":s("add-comment"),onClick:function(e){e.stopPropagation(),r()},children:Object(g.jsx)(bc.a,{})})})}),Object(g.jsx)(M.a,{id:c,primary:t.full_name})]},t.id)}var pc=a(303),fc=a.n(pc),Oc=a(302),xc=a.n(Oc);function gc(e){var t=e.commentBox,a=e.setCommentBoxValue,n=e.handleCloseCommentBox,r=e.commentBoxValue,i=e.handleCloseCancelCommentBox,c=Object(ne.a)().t;return Object(g.jsxs)(Oa.a,{open:t,onClose:n,"aria-labelledby":"form-dialog-title",children:[Object(g.jsx)(xa.a,{id:"form-dialog-title",children:c("comment")}),Object(g.jsx)(jn.a,{children:Object(g.jsx)(Ie.a,{value:r,onChange:function(e){a(e.target.value)},autoFocus:!0,margin:"dense",multiline:!0,rows:4,variant:"outlined",fullWidth:!0})}),Object(g.jsxs)(ta.a,{children:[Object(g.jsx)(De.a,{onClick:i,color:"primary",children:c("cancel")}),Object(g.jsx)(De.a,{onClick:n,color:"primary",children:c("save")})]})]})}var _c=Object(w.a)((function(e){return{root:Object(y.a)({height:"100%"},e.breakpoints.down("sm"),{paddingBottom:"100px"}),textBox:{width:"100%",border:"red"},line:{width:"100%",marginTop:e.spacing(1)},composite:{display:"flex",flexDirection:"row",flex:1,flexWrap:"wrap",gap:e.spacing(1),width:"100%"},chip:{margin:e.spacing(.5)},chips:{marginBottom:e.spacing(1)},in:{marginBottom:e.spacing(1)},fabs:{position:"fixed",bottom:e.spacing(4),right:e.spacing(4)},fab:{marginLeft:e.spacing(2)}}}));function vc(e){Object.assign({},e);var t=_c(),a=Object(ne.a)().t,r=new URLSearchParams(window.location.search).get("id"),i=Object(n.useState)(null),c=Object(l.a)(i,2),d=c[0],u=c[1],b=Object(n.useState)(null),h=Object(l.a)(b,2),m=h[0],j=h[1],p=function(){var e=Object.keys(d);return Object.keys(m).filter((function(t){return!e.includes(t)&&(null!==m[t].status||null!==m[t].comment)}))},f=function(e,t){if(console.log("iu",e,t),e.student_id!==t.student_id)throw new Error("student id has changed from ".concat(e.student_id," to ").concat(t.student_id));if(e.course_id!==t.course_id)throw new Error("course id has changed from ".concat(e.course_id," to ").concat(t.course_id));return e.date!==t.date||(e.comment!==t.comment||e.status!==t.status)},O=function(){return null!==d&&(null!==m&&(0!==p().length||!!S()))},x=Object(n.useState)(!1),_=Object(l.a)(x,2),v=_[0],w=_[1];Object(n.useEffect)((function(){w(O())}),[d,m]);var S=function(){return Object.keys(d).some((function(e){return f(d[e],m[e])}))},k=Object(n.useState)(null),C=Object(l.a)(k,2),N=C[0],I=C[1],T=Object(n.useState)(r),A=Object(l.a)(T,2),q=A[0],B=(A[1],Object(n.useState)(!0)),P=Object(l.a)(B,2),E=P[0],D=P[1];Object(n.useEffect)((function(){if(null!==m){var e=!Object.keys(m).some((function(e){return 0!==m[e].status}));D(e)}}),[m]);var M=function(e,t,a){if(null!==t&&null!==e){var n=Object(o.a)({},t);return e.forEach((function(e){var r=e.id;void 0===t[r]&&(n[r]={status:null,comment:null,course_id:q,student_id:r,date:a})})),n}},L=function(){var e;null!==q&&""!==V.values.start&&null!==N&&(e=cc.getAll(null,"*",null,{course_id:q,date:V.values.start})).then.apply(e,Object(s.a)(G({}))).then((function(e){var t=e.data.reduce((function(e,t){return Object(o.a)(Object(o.a)({},e),{},Object(y.a)({},t.student_id,t))}),{});u(t),j(M(N,t,U))}))};Object(n.useEffect)((function(){var e;null!==q&&(e=cr.getAll(null,"*",["full_name","id"],{enrolment_status:"enrolled"},q)).then.apply(e,Object(s.a)(G({}))).then((function(e){I(e.data)}))}),[q]);var G=Re(),z=(new Date).toISOString().split("T")[0],V=Object(Me.a)({initialValues:{start:z,course_id:r},validationSchema:ke.d({}),enableReinitialize:!0,onSubmit:function(e,t){t.setStatus;(0,t.setSubmitting)(!0)}}),U=V.values.start;Object(n.useEffect)(L,[V.values.start,q,N]);var K=function(e,t){var a=Object(o.a)({},m);a[e]=t,j(a)},W=Object(n.useState)(!1),H=Object(l.a)(W,2),Y=H[0],Z=H[1],J=function(){Z(!1)},X=Object(n.useState)(null),Q=Object(l.a)(X,2),$=Q[0],ee=Q[1],te=Object(n.useState)(null),ae=Object(l.a)(te,2),re=ae[0],ie=ae[1];return Object(g.jsxs)("div",{children:[Object(g.jsx)(gc,{commentBox:Y,handleCloseCommentBox:function(){J(),K(re,Object(o.a)(Object(o.a)({},m[re]),{},{comment:$}))},commentBoxValue:$,handleCloseCancelCommentBox:J,setCommentBoxValue:ee}),!1,Object(g.jsxs)(le.a,{p:2,children:[Object(g.jsx)("h1",{children:a("attendance")}),Object(g.jsx)(le.a,{className:[t.line,t.composite],children:Object(g.jsx)(Ae,{label:a("date"),type:"date",style:{flex:1},noDirty:!0,name:"start",formik:V,InputLabelProps:{shrink:!0}})})]}),N&&Object(g.jsx)(F.a,{className:t.root,children:m&&N&&N.map((function(e){var t;return Object(g.jsx)(jc,{student:e,setAttendance:function(t){return K(e.id,t)},handleOpenCommentBox:function(){return t=e.id,ee(m[t].comment),Z(!0),void ie(t);var t},attendance:null!==(t=m[e.id])&&void 0!==t?t:null})}))}),Object(g.jsxs)("div",{className:t.fabs,children:[Object(g.jsx)(R.a,{title:a("mark-all"),children:Object(g.jsx)(ln.a,{className:t.fab,color:"secondary",onClick:function(){!function(e){var t=Object(o.a)({},m);Object.keys(t).map((function(a,n){t[a].status=e})),j(t)}(E?1:0)},disabled:V.isSubmitting,children:E?Object(g.jsx)(xc.a,{}):Object(g.jsx)(fc.a,{})})}),Object(g.jsx)(R.a,{title:a("reset"),children:Object(g.jsx)(ln.a,{className:t.fab,color:"secondary",onClick:function(){return j(M(N,d,U))},disabled:V.isSubmitting||!v,children:Object(g.jsx)(oc.a,{})})}),Object(g.jsx)(R.a,{title:a("save"),children:Object(g.jsx)(ln.a,{className:t.fab,color:"primary",onClick:function(){var e,t=[],a=function(){var e=p();return 0===e.length?null:Object.keys(m).filter((function(t){return e.includes(t)})).reduce((function(e,t){return e[t]=m[t],e}),{})}();null!==a&&Object.keys(a).forEach((function(e){var n=a[e];t.push(cc.post(n))}));var n=Object.keys(d).reduce((function(e,t){return f(d[t],m[t])&&(e[t]=m[t]),e}),{});null!==n&&Object.keys(n).forEach((function(e){var a=n[e],r=d[e];t.push(cc.patch({id:r.id,body:a,initial_values:r}))})),(e=Promise.all(t)).then.apply(e,Object(s.a)(G({}))).then((function(e){L()}))},disabled:V.isSubmitting||!v,children:Object(g.jsx)(He.a,{})})})]})]})}var yc=Object(w.a)((function(e){return{list:{flexGrow:4},listCard:{height:"100%"},header:{},rootBase:{display:"flex",flexDirection:"column",height:"100vh",minHeight:0,alignItems:"stretch"},more:{width:"100%",textAlign:"center"}}})),wc=function(e){var t=yc();return Object(g.jsxs)(le.a,{className:t.rootBase,children:[Object(g.jsxs)(Gi,{children:[Object(g.jsx)(Hi,{}),Object(g.jsx)(Hr,{}),Object(g.jsx)(Jr,{}),Object(g.jsx)(ti,{})]}),Object(g.jsx)(le.a,{p:2,children:Object(g.jsx)(vc,{})})]})},Sc=a(588);var kc=function(){var e=Object(n.useState)("true"===localStorage.getItem("darkTheme")),t=Object(l.a)(e,2),a=t[0],i=t[1],c=Object(u.a)(a?m:h),f=Object(n.useState)({logged:!1,ping:!0}),_=Object(l.a)(f,2),y=_[0],w=_[1],S=Object(n.useState)([]),k=Object(l.a)(S,2),C=k[0],N=k[1],I=Object(n.useState)(null),T=Object(l.a)(I,2),A=T[0],q=T[1],B=r.a.createRef(),P=r.a.useState({open:!1,title:null,subtitle:null,success:function(){},cancel:function(){},args:[]}),F=Object(l.a)(P,2),E=F[0],D=F[1],R=function(){D(Object(o.a)(Object(o.a)({},E),{},{open:!1}))},M=Object(ne.a)().t;return Object(g.jsxs)(b.a,{theme:c,children:[Object(g.jsx)(d.a,{}),Object(g.jsx)(j.a,{maxSnack:3,children:Object(g.jsx)(x.Provider,{value:{user:y,setUser:w,needs:C,setNeeds:function(e){return Array.isArray(e)?N(e):N([])},teacher:A,setTeacher:q},children:Object(g.jsx)(Va.Provider,{value:{theme:a,switchTheme:function(){localStorage.setItem("darkTheme",(!a).toString()),i(!a)},label:a?"dark":"light"},children:Object(g.jsxs)(p.Provider,{value:{confirm:function(e,t,a){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];D({open:!0,title:e,subtitle:t,success:a,cancel:null===n?function(){}:n,args:r})}},children:[Object(g.jsx)(Ir.a,{ref:B,basename:"/app",children:Object(g.jsxs)(O.d,{children:[Object(g.jsx)(v,{path:"/home",baseRouter:B,component:li}),Object(g.jsx)(O.b,{path:"/login",component:pi}),Object(g.jsx)(O.b,{path:"/signup",component:_i}),Object(g.jsx)(O.b,{path:"/password-reset",component:yi}),Object(g.jsx)(O.b,{path:"/prematricula",component:Ui}),Object(g.jsx)(v,{path:"/teacher-dashboard",component:nc}),Object(g.jsx)(v,{path:"/attendance",component:wc}),Object(g.jsx)(O.b,{component:ic})]})}),Object(g.jsxs)(Oa.a,{open:E.open,onClose:R,"aria-labelledby":"responsive-dialog-title",children:[E.title&&Object(g.jsx)(xa.a,{id:"responsive-dialog-title",children:M(E.title)}),E.subtitle&&Object(g.jsx)(jn.a,{children:Object(g.jsx)(Sc.a,{children:M(E.subtitle)})}),Object(g.jsxs)(ta.a,{children:[Object(g.jsx)(De.a,{autoFocus:!0,onClick:function(){E.cancel.apply(E,Object(s.a)(E.args)),R()},color:"primary",children:M("cancel")}),Object(g.jsx)(De.a,{onClick:function(){E.success.apply(E,Object(s.a)(E.args)),R()},color:"primary",autoFocus:!0,children:M("continue")})]})]})]})})})})]})},Cc=function(e){e&&e instanceof Function&&a.e(3).then(a.bind(null,602)).then((function(t){var a=t.getCLS,n=t.getFID,r=t.getFCP,i=t.getLCP,c=t.getTTFB;a(e),n(e),r(e),i(e),c(e)}))},Nc=a(305);c.a.render(Object(g.jsxs)(r.a.StrictMode,{children:[Object(g.jsxs)(Nc.a,{children:[Object(g.jsx)("title",{children:"centr\xedfuga4"}),Object(g.jsx)("base",{href:"".concat("https://c4.xamfra.net","/")}),Object(g.jsx)("link",{nonce:"{{csp_nonce()}}",rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap"}),Object(g.jsx)("link",{nonce:"{{csp_nonce()}}",rel:"stylesheet",href:"https://fonts.googleapis.com/icon?family=Material+Icons"}),Object(g.jsx)("meta",{name:"viewport",content:"minimum-scale=1, initial-scale=1, width=device-width"})]}),Object(g.jsx)(kc,{})]}),document.getElementById("root")),Cc()}},[[517,1,2]]]); +//# sourceMappingURL=main.e85fb0f1.chunk.js.map \ No newline at end of file diff --git a/web_app/build/static/js/main.d8d64694.chunk.js.map b/web_app/build/static/js/main.e85fb0f1.chunk.js.map similarity index 99% rename from web_app/build/static/js/main.d8d64694.chunk.js.map rename to web_app/build/static/js/main.e85fb0f1.chunk.js.map index 2d46264..77d95d3 100644 --- a/web_app/build/static/js/main.d8d64694.chunk.js.map +++ b/web_app/build/static/js/main.e85fb0f1.chunk.js.map @@ -1 +1 @@ -{"version":3,"sources":["theme.js","_context/confirm-context.js","_context/user-context.js","_components/PrivateRoute.js","_helpers/auth-header.js","config.js","_services/service-factory.js","_services/students.service.js","_skeletons/iconButton.js","_components/dirtytextfield.component.js","_data/countries.js","_components/contry-select.component.js","_helpers/handle-response.js","_helpers/normik.js","_data/education.js","_components/formik_discard_button.js","_helpers/needs.js","_components/formik_save_button.js","_data/password_regex.js","_yup/validators.js","_components/students.student.person.component.js","_services/guardians.service.js","_services/payments.service.js","_data/payment_methods.js","_data/empty_objects.js","_context/loading-context.js","_components/students.student.attendee.component.js","_services/emailsGrants.service.js","_services/emailsEnrollment.service.js","_services/student_guardians.service.js","_data/relations.js","_components/students.student.guardian.component.js","_components/students.student.payments.payment.component.js","_services/emailsReceipts.service.js","_components/students.student.payments.component.js","_services/schedules.service.js","_context/tab-context.js","_components/scheduler.component.js","_components/students.student.schedule.component.js","_services/student_courses.service.js","_services/courses.service.js","_components/searchbar.component.js","_context/theme-context.js","_components/ExportSearchChip.component.js","_components/items_list.component.js","_components/items_list_secondary.component.js","_components/items_list_terciary.component.js","_components/subresource_add_delete.component.js","_components/tab.js","_components/students.student.component.js","_components/items_list_main.component.js","_components/students.component.js","_components/user.role-select.component.js","_services/userInvites.service.js","_services/users.service.js","_services/teachers.service.js","_components/users.user.userperson.component.js","_services/user_needs.service.js","_components/dirty_checkbox.js","_helpers/set_operations.js","_components/users.user.permissions.component.js","_components/users.user.component.js","_components/users.component.js","_components/payments.component.js","_services/rooms.service.js","_components/rooms.room.schedule.component.js","_components/rooms.room.details.component.js","_components/rooms.room.component.js","_components/rooms.component.js","_services/teachers_courses.service.js","_services/calendar.service.js","_components/teachers.teacher.details.component.js","_components/teachers.teacher.schedule.component.js","_components/teachers.teacher.component.js","_components/teachers.component.js","_services/course_rooms.service.js","_services/course_students.service.js","_services/course_teachers.service.js","_components/courses.course.details.component.js","_data/price_term.js","_services/course_labels.service.js","_components/labels_selection.component.js","_components/courses.course.labels.component.js","_components/courses.course.schedule.component.js","_components/courses.course.component.js","_components/courses.component.js","_services/bulkEmail.service.js","_components/emailTo.component.js","_components/email.component.js","HomePage/routes.js","_services/god.service.js","_services/auth.service.js","i18nextConf.js","_translations/utils.js","_components/translate_button.component.js","_components/theme_button.component.js","_components/teacher_dashboard_button.js","_components/toolbar.home.component.js","HomePage/HomePage.js","_services/password-reset.service.js","_helpers/on-mount.js","LoginPage/LoginPage.js","_services/signup.service.js","SignupPage/SignupPage.js","ResetPage/ResetPage.js","_components/xamfra.logo.component.js","_services/pre-enrolment.service.js","utils/localized-weekdays.js","_components/xamfra.header.component.js","PreEnrolmentPage/PreEnrolmentPage.js","_components/home_button.js","TeacherDashboardPage/components/WelcomeTitle.js","TeacherDashboardPage/components/CourseCard.js","TeacherDashboardPage/components/MoreButton.js","TeacherDashboardPage/components/NotATeacherTitle.js","TeacherDashboardPage/TeacherDashboardPage.js","_components/not_found.js","_services/attendance.service.js","AttendancePage/components/attendance.component.item.js","AttendancePage/components/status.js","AttendancePage/components/commentDialog.js","AttendancePage/components/attendance.component.js","AttendancePage/AttendancePage.js","App/App.js","reportWebVitals.js","index.js"],"names":["lightTheme","createMuiTheme","palette","type","primary","main","light","dark","contrastText","emphasisText","high","medium","low","secondary","neutral","status","dirty","success","error","darkTheme","confirmContext","React","createContext","confirm","title","subtitle","successCallable","userContext","user","setUser","needs","setNeeds","teacher","setTeacher","PrivateRoute","Component","component","rest","userCtx","useContext","render","props","to","pathname","state","from","location","authHeader","Cookies","get","API_VERSION","process","BACKEND_URL","RECAPTCHA","PUBLIC_URL","CHECK_NEEDS","REACT_CHECK_NEEDS","axios","require","serviceFactory","resource","subresource","serviceName","baseUrl","apiVersion","url","likeSearchText","page","include","filters","parent_id","Promise","resolve","reject","myFilters","JSON","stringify","name","value","Object","keys","forEach","key","method","params","headers","then","response","data","catch","err","id","ids","length","getOne","join","res","body","initial_values","dirtyBody","reduce","filtered","subresourcId","subresourceid","subresourceId","all","map","delete","searchtermfield","searchterm","responseType","filename","split","window","URL","createObjectURL","Blob","link","document","createElement","href","setAttribute","appendChild","click","remove","IconButtonSkeleton","Skeleton","variant","IconButton","useStyles","makeStyles","theme","createStyles","root","color","borderBottomColor","DirtyTextField","formik","noDirty","values","initialValues","classes","formikProps","undefined","onChange","handleChange","onBlur","handleBlur","errors","helperText","touched","TextField","className","InputLabelProps","shrink","countries","code","label","phone","suggested","textField","borderColor","option","fontSize","marginRight","DirtyCountrySelect","style","width","getInitialOption","find","x","useState","_setOption","useEffect","inputValue","setInputValue","t","useTranslation","Autocomplete","options","autoHighlight","getOptionLabel","getOptionSelected","o","event","newValue","newOption","setFieldValue","setOption","onInputChange","newInputValue","renderOption","Fragment","isoCode","String","fromCodePoint","toUpperCase","replace","char","charCodeAt","renderInput","inputProps","autoComplete","useErrorHandler","useSnackbar","enqueueSnackbar","closeSnackbar","successHandlerFactory","snackbarSuccess","successHandler","failureHandler401","logged","ping","failureHandler403","failureHandler","handle401","handle403","handle400","errorOut","reportUnexpected","handler","showSnackbar","message","autoHideDuration","action","src","alt","height","Button","onClick","navigator","clipboard","writeText","platform","userAgent","appVersion","vendor","r","alert","request","text","parse","failureHandlerUnexpected","failureHandlerFactory","useNormik","onlyChangedValuesOnSubmit","allowArrays","originalInitialValues","nullSafeInitialValues","entries","oldOnSubmit","onSubmit","nullSafeOnSubmit","actions","normalizedValues","normalizedValue","Array","isArray","useFormik","education_years","DiscardButton","handleReset","disabled","isSubmitting","Tooltip","NEEDS","patch","post","send_email","invite_users","students","courses","guardians","payments","rooms","schedules","teachers","users","paymentReceipts","attendance","useNeeds","every","need","includes","SaveButton","hasNeeds","longer_8","shorter_64","has_lowercase","has_uppercase","has_digit","has_special","no_plus","safe_password","RegExp","source","yup","required","matches","safe_password_repetition","oneOf","safe_username_email","email","safe_username_email_required","safe_username_required","safe_email_required","safe_email","one_of","test","toString","v","line","marginTop","spacing","composite","display","flexDirection","flex","flexWrap","gap","actionIcon","float","Person","elements","currentPerson","dataService","patchService","newPerson","updateCurrentPerson","updateCurrentStudent","additionalFields","additionalValidation","onUpdate","studentId","loading","errorHandler","validationSchema","is_studying","is_working","career","when","is","education_entity","education_year","enableReinitialize","changedValues","setStatus","setSubmitting","new_id","finally","patched_body","resetForm","Box","clear","idx","py","handleSubmit","my","Divider","select","MenuItem","level","idx2","cloneElement","payment_methods","surname1","surname2","address","city","zip","dni","gender","country_of_origin","emptyGuardian","relation","emptyAttendee","price_term","payment_comments","birth_date","other_comments","image_agreement","enrolment_status","default_payment_method","loadingContext","startLoading","stopLoading","button","margin","Attendee","children","setNewStudent","addStudentId","newStudent","currentStudent","deleteStudent","addNewGuardian","loadingCtx","sendGrantLetter","sendEnrollmentAgreement","p","px","e","StudentsDataService","PaymentsDataService","deleteMany","GuardiansDataService","deleteFullStudent","changedBody","InputProps","endAdornment","InputAdornment","position","multiline","rowsMax","s","startIcon","downloadSubresource","student_guardian_relations","Guardian","guardianId","deleteGuardianId","addGuardianId","deleteNewGuardian","newGuardian","guardian","setGuardian","StudentGuardianDataService","postWithId","maxWidth","backgroundColor","expand","transform","marginLeft","transition","transitions","create","duration","shortest","expandOpen","avatar","PaymentCard","payment","updatePayment","deletePayment","newPayment","addPaymentId","student_id","expanded","setExpanded","sendReceipt","sendReceiptEmail","quantity","date","Card","CardHeader","Avatar","subheader","CardActions","disableSpacing","clsx","Collapse","in","timeout","unmountOnExit","CardContent","DialogActions","getDefaultValues","Date","dd","getDate","mm","getMonth","yyyy","getFullYear","newLine","Payments","paymentIds","deletePaymentFromStudent","setPayments","newPaymentCard","setNewPaymentCard","getMany","sort","p1","p2","localeCompare","_","Typography","tabContext","currentTab","goTo","eventFromSchedule","schedule","daysOfWeek","groupId","startTime","endTime","textColor","extendedProps","evaluate","expression","console","log","args","Scheduler","snapDuration","allowView","viewUrl","allowDelete","selectable","scheduleIds","viewStudent","deleteCustom","setScheduleIds","onEventSelected","onEventClick","onEventChange","editable","useTheme","calendarRef","createRef","StyleWrapper","styled","div","setSchedules","SchedulesDataService","withScheduleInfo","info","getDay","toLocaleTimeString","hour12","open","currentSchedule","setCurrentSchedule","handleClose","minHeight","Dialog","onClose","DialogTitle","filter","plugins","timeGridPlugin","interactionPlugin","initialView","firstDay","ref","buttonText","prev","next","prevYear","nextYear","today","month","week","day","selectMirror","dayMaxEvents","weekends","events","eventAdd","eventChange","clickInfo","eventRemove","selectInfo","view","calendar","unselect","start","end","eventContent","eventClick","handleClickOpen","eventTimeFormat","hour","minute","eventResize","eventDrop","Schedule","padding","alignItems","input","iconButton","SearchBar","searchTitle","onSearch","Paper","InputBase","placeholder","onKeyPress","preventDefault","themeContext","switchTheme","ExportSearchChip","searchTermField","searchTerm","exportAll","getFilters","Chip","size","downloadCsv","overflow","list","searchAndFilters","pagination","chip","selectedAvatar","chips","heading","typography","pxToRem","fontWeight","fontWeightRegular","noResults","textAlign","ItemsList","setCurrentItemId","auxFields","displayText","onItemClick","secondaryDisplayNameField","secondaryAction","secondaryActionNeeds","secondaryActionTooltip","secondaryActionIcon","secondaryActionCallable","withAvatar","withFiltersBox","currentItemId","items","setItems","displayNameField","usableFilters","defaultSearchBy","searchByOptions","searchBarLabel","exportPage","exportAllPages","setSearchTerm","f","initialValue","setFilters","searchBy","setSearchBy","setPage","count","setCount","fromEntries","search","getAll","Set","target","Accordion","AccordionSummary","expandIcon","AccordionDetails","tooltip","Pagination","showFirstButton","showLastButton","siblingCount","boundaryCount","List","item","ListItem","ListItemAvatar","charAt","ListItemText","ListItemSecondaryAction","edge","ItemsListSecondary","deleteTooltip","delete_message","onItemDeleted","ItemsListTerciary","dataServiceSR","add_message","onAdded","newItem","Transition","forwardRef","Slide","direction","box","appBar","AddDeleteSubresource","parentItemDataService","itemDataService","add_message_confirm","resourceName","onSubresourceAdded","onSubresourceDeleted","addDialogOpen","setAddDialogOpen","handleAddDialogClose","fullScreen","TransitionComponent","AppBar","Toolbar","autoFocus","m","a11yProps","index","TabFrame","other","role","hidden","contentPanel","boxSizing","content","overflowX","overflowY","tab","Student","currentStudentId","student","setStudent","setNewGuardian","setValue","elevation","square","Tabs","indicatorColor","scrollButtons","Tab","contact","axis","containerStyle","onChangeIndex","dir","is_base","course_id","day_week","start_time","end_time","newEvent","calendarApi","addEvent","revert","payment_id","StudentsCourseDataService","CoursesDataService","gId","ItemsListMain","downloadOneCsv","left","fab","bottom","right","RoleSelect","invitationsService","inviteUser","userEmail","user_email","role_id","UserPerson","nullable","UsersDataService","TeachersDataService","setFieldTouched","deleteFullUser","DirtyCheckbox","Checkbox","checked","symmetricDifference","setA","setB","_difference","elem","has","add","User","currentUserId","deleteUser","root2","formControl","maxHeight","minWidth","dialog","RoomSchedule","RoomDetails","setNewRoom","newRoom","RoomsDataService","Room","currentRoomId","deleteRoom","addRoomId","room","setRoom","downloadCalendar","resource_id","calendar_id","TeacherDetails","TeacherSchedule","setSchedulesIds","Teacher","currentTeacherId","setNewTeacher","newTeacher","addTeacherId","deleteTeacher","TeachersCoursesDataService","c","choose","marginBottom","CourseDetails","addCourseId","setNewCourse","newCourse","currentCourse","updateCurrentCourse","deleteCourse","history","useHistory","openDownloadAttendanceList","setOpenDownloadAttendanceList","is_published","formik2","startDate","endDate","DialogContent","id_","deleteFullCourse","LabelsSelection","FormControlLabel","control","CourseLabels","a","b","difference","jobs","CourseLabelsDataService","labels","CourseSchedule","Course","currentCourseId","course","setCourse","CourseStudentsDataService","defaultValue","CourseTeachersDataService","CourseRoomsDataService","bulkEmailService","bulkSend","courseIds","subject","emailPreference","studentEnrolmentStatus","files","FormData","append","EmailTo","addTo","fullWidth","textBox","border","attach","card","Routes","path","setStudents","setCurrentStudentId","handleError","URLSearchParams","Grid","container","xs","Fab","icon","PersonIcon","setCourses","setCurrentCourseId","ClassIcon","setTeachers","setCurrentTeacherId","SchoolIcon","setRooms","setCurrentRoomId","RoomIcon","AccountBalanceIcon","setUsers","setCurrentUserId","setOpen","userId","ContactMailIcon","groups","setGroups","setTo","selectedFiles","setSelectedFiles","g","rows","selectedFile","titleTypographyProps","multiple","htmlFor","EmailIcon","authenticationService","login","username","password","totp","rememberMe","auth","logout","isLoggedIn","fallbackLng","resources","eng","translation","translationEN","cat","translationCAT","i18n","use","Backend","LanguageDetector","initReactI18next","init","detection","checkWhitelist","debug","whitelist","interpolation","escapeValue","getCurrentLanguage","localStorage","getItem","TranslateButton","selectedLanguage","i18next","changeLanguage","ThemeButton","themeCtx","TeacherDashboardButton","languageMap","active","toolbar","justifyContent","mixins","grow","flexGrow","withRouter","selected","anchorEl","setAnchorEl","isMenuOpen","Boolean","handleMenuClose","anchorElLan","setAnchorElLan","isLanguageMenuOpen","handleLanguageMenuClose","languageMenu","anchorOrigin","vertical","horizontal","keepMounted","transformOrigin","language","userMenuId","userMenu","handleDrawerOpen","menuButton","hide","noWrap","currentTarget","drawerWidth","zIndex","drawer","easing","sharp","leavingScreen","background","appBarShift","enteringScreen","flexShrink","whiteSpace","drawerOpen","drawerClose","breakpoints","up","backdrop","flexFlow","selectedIcon","HomePage","baseRouter","currentRoute","useRouteMatch","useLocation","handleDrawerClose","setLoading","routerRef","CssBaseline","Provider","changeTheme","Drawer","paper","route","prop","Link","ListItemIcon","exact","Backdrop","CircularProgress","passwordResetService","reset","token","recaptcha","startReset","useOnMount","field","details","verticalAlign","down","cursor","md","remember","LoginPage","mobile","useMediaQuery","setRecaptcha","showRecaptcha","setShowRecaptcha","setLogged","push","val","Number","align","justify","resetPa","sitekey","signup","SignupPage","step","setStep","totpUri","setTotpUri","query","password2","signupService","result","isValid","ResetPage","XamfraLogo","mx","preEnrolmentService","getCourses","postPreEnrollment","getLocalisedWeekday","dayOfWeek","resultDate","getTime","setDate","getNextDayOfWeek","toLocaleString","weekday","textSchedulesForCourse","slice","XamfraHeader","cards","buttons","bullet","pos","isUnderage","birthDateString","birthDate","age","PreEnrolmentPage","can_pay_75","skipped","setSkipped","availableCourses","setAvailableCourses","filteredCourses","setFilteredCourses","chosenCourses","setChosenCourses","raw_economic_comments","setRawEconomicComments","isStepSkipped","activeStep","setActiveStep","steps","handleSkip","isStepOptional","Error","prevActiveStep","prevSkipped","newSkipped","__person1__name","__person2__name","__person1__surname1","__person1__surname2","__person1__email","__person1__phone","__person1__relation","__person1__is_studying","__person1__is_working","__person1__career","__person1__education_entity","__person1__education_year","__person2__surname1","__person2__surname2","__person2__email","__person2__phone","__person2__relation","__person2__is_studying","__person2__is_working","__person2__career","__person2__education_entity","__person2__education_year","schema","notOneOf","years_in_xamfra","prefix","some","l","fieldsToValidatePerStep","secondaryListItemTextForCourse","description","canNotGoNext","courseToListItem","disableRipple","tabIndex","autocomplete","defaultChecked","BottomNavigation","showLabels","MobileStepper","nextButton","scrollTo","backButton","HomeButton","welcomeMessage","WelcomeTitle","hi","welcomeEmoji","setWelcomeEmoji","onMouseOver","onMouseOut","CourseCard","courseId","gutterBottom","MoreButton","clickable","NotATeacherTitle","rootBase","more","TeacherDashboardPage","maxPage","setMaxPage","loadedUntilPage","setLoadedUntilPage","attemptLoadedUntilPage","setAttemptLoadedUntilPage","attemptingLoad","setAttemptingLoad","TeacherCoursesService","newCourses","sm","NotFound","selectStatus","AttendanceItem","setAttendance","handleOpenCommentBox","labelId","newStatus","outlinedInputClasses","focused","notchedOutline","useOutlinedInputStyles","dense","FormControl","Select","stopPropagation","OutlinedInput","CommentDialog","commentBox","setCommentBoxValue","handleCloseCommentBox","commentBoxValue","handleCloseCancelCommentBox","paddingBottom","fabs","Attendance","initialAttendances","setInitialAttendances","attendances","setAttendances","getAddedStudentIds","studentsInInitial","hasChanges","initial","updated","hasChangesGlobal","hasUpdatedAttendances","setDirty","allDone","setAllDone","createEmptyAttendances","newAttendances","comment","loadAttendances","AttendanceService","toISOString","setCommentBox","commentBoxId","setCommentBoxId","targetStatus","markAll","promises","addedStudentIds","obj","getNewAttendances","updatedAttendances","initialAttendance","listCard","header","AttendancePage","App","setTheme","appliedTheme","_setNeeds","cancel","confirmDialog","setConfirmDialog","handleCloseConfirm","ThemeProvider","maxSnack","setItem","cancelCallable","basename","DialogContentText","reportWebVitals","onPerfEntry","Function","getCLS","getFID","getFCP","getLCP","getTTFB","ReactDOM","StrictMode","Helmet","nonce","rel","getElementById"],"mappings":"g3mCAEaA,EAAaC,YAAe,CACvCC,QAAS,CACPC,KAAM,QACNC,QAAS,CACPC,KAAM,UACNC,MAAO,UACPC,KAAM,UACNC,aAAc,UACdC,aAAc,CACZC,KAAM,YACNC,OAAQ,YACRC,IAAK,cAGTC,UAAW,CACTR,KAAM,UACNC,MAAO,UACPC,KAAM,UACNC,aAAc,UACdC,aAAc,CACZC,KAAM,YACNC,OAAQ,YACRC,IAAK,cAITE,QAAS,CACPT,KAAM,UACNG,aAAc,UACdC,aAAc,CACZC,KAAM,YACNC,OAAQ,YACRC,IAAK,aAEPG,OAAQ,CACNC,MAAO,UACPC,QAAS,UACTC,MAAO,eAMFC,EAAYlB,YAAe,CACtCC,QAAS,CACPC,KAAM,OACNC,QAAS,CACPC,KAAM,UACNC,MAAO,UACPC,KAAM,UACNC,aAAc,UACdC,aAAc,CACZC,KAAM,YACNC,OAAQ,YACRC,IAAK,cAGTC,UAAW,CACTR,KAAM,UACNC,MAAO,UACPC,KAAM,UACNC,aAAc,UACdC,aAAc,CACZC,KAAM,YACNC,OAAQ,YACRC,IAAK,cAGTE,QAAS,CACPT,KAAM,UACNG,aAAc,UACdC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EAAsC,EAAtCA,OAAQC,EAA8B,EAA9BA,OAAQC,EAAsB,EAAtBA,OAAQC,EAAc,EAAdA,QAC3DJ,EAAOF,GACPG,EAAOH,GACPI,EAAOJ,GACPK,EAAOL,GACPM,EAAQN,O,UCCdO,IAASlrC,OACP,eAAC,IAAMmrC,WAAP,WACI,eAACC,GAAA,EAAD,WACI,mDACM,sBAAMpmC,KAAI,UAAKrE,oCAAL,OAChB,sBAAM0qC,MAAM,kBAAkBC,IAAI,aAAatmC,KAAK,gFACpD,sBAAMqmC,MAAM,kBAAkBC,IAAI,aAAatmC,KAAK,4DACpD,sBACI3C,KAAK,WACLunB,QAAQ,4DAEhB,cAAC,GAAD,OAEJ9kB,SAASymC,eAAe,SAM1Bb,O","file":"static/js/main.d8d64694.chunk.js","sourcesContent":["import {createMuiTheme} from \"@material-ui/core/styles\";\n\nexport const lightTheme = createMuiTheme({\n palette: {\n type: 'light',\n primary: {\n main: '#e98300',\n light: '#ffb342',\n dark: '#b05500',\n contrastText: '#000000', // todo deprecate\n emphasisText: {\n high: '#000000DF',\n medium: '#00000098',\n low: '#0000005E',\n },\n },\n secondary: {\n main: '#934d98',\n light: '#c57bc9',\n dark: '#63206a',\n contrastText: '#000000', // todo deprecate\n emphasisText: {\n high: '#000000DF',\n medium: '#00000098',\n low: '#0000005E',\n },\n\n },\n neutral: {\n main: '#ffffff',\n contrastText: '#000000',\n emphasisText: {\n high: '#000000DF',\n medium: '#00000098',\n low: '#0000005E',\n },\n status: {\n dirty: '#fbc02d',\n success: '#43a047',\n error: '#ff5252'\n }\n }\n }\n})\n\nexport const darkTheme = createMuiTheme({\n palette: {\n type: 'dark',\n primary: {\n main: '#934d98',\n light: '#c57bc9',\n dark: '#63206a',\n contrastText: '#000000', // todo deprecate\n emphasisText: {\n high: '#000000DF',\n medium: '#00000098',\n low: '#0000005E',\n },\n },\n secondary: {\n main: '#ffcc80',\n light: '#ffffb0',\n dark: '#ca9b52',\n contrastText: '#000000', // todo deprecate\n emphasisText: {\n high: '#000000DF',\n medium: '#00000098',\n low: '#0000005E',\n },\n },\n neutral: {\n main: '#1f1f1f',\n contrastText: '#ffffff', // todo deprecate\n emphasisText: {\n high: '#ffffffDF',\n medium: '#ffffff98',\n low: '#ffffff5E',\n },\n status: {\n dirty: '#ffcf3d',\n success: '#c0e882',\n error: '#ff5252'\n }\n }\n }\n})\n","import React from \"react\";\n\nconst confirmContext = React.createContext(\n {confirm: (title, subtitle, successCallable, cancelCallable=null) => {}}); // Create a context object\n\nexport {\n confirmContext // Export it so it can be used by other Components\n};","import React from \"react\";\n\nconst userContext = React.createContext({\n user: null, \n setUser: () => {}, \n needs: [], \n setNeeds: () => {},\n teacher: [],\n setTeacher: () => {}\n}); // Create a context object\n\nexport {\n userContext // Export it so it can be used by other Components\n};","import {Redirect, Route} from 'react-router-dom';\nimport React from \"react\";\nimport {userContext} from '../_context/user-context';\n\nfunction PrivateRoute({ component: Component, ...rest }) {\n const userCtx = React.useContext(userContext);\n return (\n \n {\n if (!userCtx[\"user\"][\"logged\"]) {\n // not logged in so redirect to login page with the return url\n return \n }\n\n // authorised so return component\n return \n }}/>\n );\n}\n\n\nexport default PrivateRoute;","import Cookies from 'js-cookie';\n\nexport function authHeader() {\n // return authorization header with jwt token\n return { 'X-CSRFToken': Cookies.get('X-CSRF-TOKEN')};\n}","export const API_VERSION = process.env.REACT_APP_API_VERSION;\nexport const BACKEND_URL = process.env.REACT_APP_BACKEND_URL;\nexport const RECAPTCHA = process.env.REACT_APP_RECAPTCHA;\nexport const PUBLIC_URL = process.env.PUBLIC_URL;\nexport const CHECK_NEEDS = process.env.REACT_CHECK_NEEDS === \"true\";\nexport const DOCS_URL = process.env.REACT_APP_DOCS_URL;","import {authHeader} from \"../_helpers/auth-header\";\nimport {API_VERSION, BACKEND_URL} from \"../config\";\n\nconst axios = require('axios'); // todo default headers\n\nexport default function serviceFactory(resource, subresource=null, serviceName=null, baseUrl=null, apiVersion=null){ // todo subresource for all methods?\n \n baseUrl = baseUrl === null? BACKEND_URL: baseUrl;\n serviceName = serviceName === null? 'api': serviceName;\n apiVersion = apiVersion === null? API_VERSION: apiVersion;\n const url = `${baseUrl}/${serviceName}/${apiVersion}`;\n\n return class {\n \n\n getAll(likeSearchText=null, page = 1, include=null, filters=null, parent_id=null) {\n return new Promise(function (resolve, reject) {\n\n let myFilters = {\n \"page\": page,\n \"include\": include === null? null: JSON.stringify(include)\n };\n if (likeSearchText !== null) {\n myFilters[`filter.${likeSearchText.name}.match`] = likeSearchText.value;\n }\n\n if (filters !== null) {\n Object.keys(filters).forEach((key) => {\n myFilters[`filter.${key}.eq`] = filters[key];\n })\n }\n \n axios({\n method: 'get',\n url: `${url}/${resource}${subresource===null? '': `/${parent_id}/${subresource}`}`,\n params: myFilters,\n headers: {\n ...{\n 'Content-Type': 'application/json',\n 'Cache-Control': 'no-cache'\n }, ...authHeader() // todo are auth headers needed for gets?\n }\n }).then(function (response) {\n resolve(response.data);\n }).catch(function (err) {\n reject(err);\n });\n });\n }\n\n getOne(id, include=null, expect_batch=false) {\n return new Promise(function (resolve, reject) {\n axios({\n method: 'get',\n url: `${url}/${resource}/${id}`,\n params: {\n \"include\": include === null? null: JSON.stringify(include)\n },\n headers: {\n ...{\n 'Content-Type': 'application/json',\n 'Cache-Control': 'no-cache'\n }, ...authHeader() // todo are auth headers needed for gets?\n }\n }).then(function (response) {\n resolve(response.data);\n }).catch(function (err) {\n reject(err);\n });\n });\n }\n\n getMany(ids) {\n return new Promise((resolve, reject) => {\n if (ids.length === 0) {\n resolve([]);\n }\n this.getOne(ids.join(','))\n .then(res => {\n if (ids.length === 1) {\n resolve([res]);\n } else {\n resolve(res);\n }\n })\n .catch(err => {\n reject(err);\n })\n });\n }\n\n patch({id, body, initial_values = null}) {\n if (initial_values !== null) {\n var dirtyBody = Object.keys(body).reduce(function (filtered, key) {\n if (!(key in initial_values && initial_values[key] === body[key])){\n filtered[key] = body[key];\n }\n return filtered;\n }, {});\n }\n\n if (\"id\" in dirtyBody) {\n delete dirtyBody[\"id\"]; // no id is to be sent in the body, since it is sent as url param\n }\n return new Promise(function (resolve, reject) {\n axios({\n method: 'patch',\n url: `${url}/${resource}/${id}`,\n data: dirtyBody,\n headers: {\n ...{\n 'Content-Type': 'application/json',\n 'Cache-Control': 'no-cache'\n }, ...authHeader()\n }\n }).then(function (response) {\n resolve(response.data);\n }).catch(function (err) {\n reject(err);\n });\n });\n }\n\n post(body, subresourcId=null) {\n if (\"id\" in body) delete body[\"id\"]; // no id is to be sent in the body, since it is sent as url param\n\n return new Promise(function (resolve, reject) {\n axios({\n method: 'post',\n url: `${url}/${resource}${subresource !== null? `/${subresourcId}/${subresource}`: ''}`,\n data: body,\n headers: {\n ...{\n 'Content-Type': 'application/json',\n 'Cache-Control': 'no-cache'\n }, ...authHeader()\n }\n }).then(function (res) {\n resolve(res.data);\n }).catch(function (err) {\n reject(err);\n });\n });\n }\n\n // todo arent post and postwith id nearly same? merge\n\n postWithId(id, subresourceid=null) {\n return new Promise(function (resolve, reject) {\n axios({\n method: 'post',\n url: `${url}/${resource}/${id}${subresourceid === null?\n '': `/${subresource}/${subresourceid}`}`,\n headers: {\n ...{\n 'Content-Type': 'application/json',\n 'Cache-Control': 'no-cache'\n }, ...authHeader()\n }\n }).then(function (res) {\n resolve(res);\n }).catch(function (err) {\n reject(err);\n });\n });\n }\n\n delete(id, subresourceId=null) {\n return new Promise(function (resolve, reject) {\n axios({\n method: 'delete',\n url: `${url}/${resource}/${id}${subresource !== null? `/${subresource}/${subresourceId}`: ''}`,\n headers: {\n ...{\n 'Content-Type': 'application/json',\n 'Cache-Control': 'no-cache'\n }, ...authHeader()\n }\n }).then(function (response) {\n resolve(response);\n }).catch(function (err) {\n reject(err);\n });\n });\n }\n\n deleteMany(ids) {\n return Promise.all(ids.map(id => (this.delete(id))));\n }\n\n downloadCsv(searchtermfield, searchterm, page = 1, filters=null) {\n return new Promise(function (resolve, reject) {\n let myFilters = {\n \"page\": page\n };\n\n if (searchtermfield !== null){\n myFilters[`filter.${searchtermfield}.like`]= `%${searchterm}%`;\n }\n\n if (filters !== null){\n Object.keys(filters).forEach((key) => {\n myFilters[`filter.${key}.eq`] = filters[key];\n })\n }\n\n axios({\n url: `${url}/${resource}`,\n method: 'GET',\n responseType: 'blob', // important\n params: myFilters,\n headers: {\n ...{\n 'Accept': 'text/csv',\n 'Cache-Control': 'no-cache'\n }, ...authHeader()\n }\n }).then(response => {\n let filename = response.headers[\"content-disposition\"].split(\"filename=\")[1];\n if (filename === null) filename = \"export.csv\";\n\n const url = window.URL.createObjectURL(new Blob([response.data]));\n const link = document.createElement('a');\n link.href = url;\n link.setAttribute('download', filename);\n document.body.appendChild(link);\n link.click();\n link.remove();\n resolve();\n }).catch(function (err) {\n reject(err);\n });\n\n });\n }\n\n\n downloadOneCsv(id) {\n return new Promise(function (resolve, reject) {\n axios({\n url: `${url}/${resource}/${id}`,\n method: 'GET',\n responseType: 'blob', // important\n headers: {\n ...{\n 'Accept': 'text/csv',\n 'Cache-Control': 'no-cache'\n }, ...authHeader()\n }\n }).then(response => {\n /*\n _download(response){\n let filename = response.headers[\"content-disposition\"].split(\"filename=\")[1];\n if (filename === null) filename = \"export.csv\";\n\n const url = window.URL.createObjectURL(new Blob([response.data]));\n const link = document.createElement('a');\n link.href = url;\n link.setAttribute('download', filename);\n document.body.appendChild(link);\n link.click();\n link.remove();\n resolve();\n }\n **/\n let filename = response.headers[\"content-disposition\"].split(\"filename=\")[1];\n if (filename === null) filename = \"export.csv\";\n\n const url = window.URL.createObjectURL(new Blob([response.data]));\n const link = document.createElement('a');\n link.href = url;\n link.setAttribute('download', filename);\n document.body.appendChild(link);\n link.click();\n link.remove();\n resolve();\n }).catch(function (err) {\n reject(err);\n });\n\n });\n }\n\n\n downloadSubresource(id, subresource, params) {\n return new Promise(function (resolve, reject) {\n axios({\n url: `${url}/${resource}/${id}/${subresource}`,\n method: 'POST',\n params: params,\n responseType: 'blob', // important\n headers: {\n ...{\n 'Cache-Control': 'no-cache'\n }, ...authHeader()\n }\n }).then(response => {\n let filename = response.headers[\"content-disposition\"].split(\"filename=\")[1];\n const url = window.URL.createObjectURL(new Blob([response.data]));\n const link = document.createElement('a');\n link.href = url;\n link.setAttribute('download', filename);\n document.body.appendChild(link);\n link.click();\n link.remove();\n resolve();\n }).catch(function (err) {\n reject(err);\n });\n\n });\n }\n }\n}\n","import serviceFactory from \"./service-factory\";\n\n\nexport default new (serviceFactory('students'))();\n\n","import IconButton from \"@material-ui/core/IconButton\";\nimport PersonAddIcon from \"@material-ui/icons/PersonAdd\";\nimport {Skeleton} from \"@material-ui/lab\";\nimport React from \"react\";\n\nexport const IconButtonSkeleton = ({...props}) => {\n return \n \n \n}","import React from 'react';\nimport TextField from '@material-ui/core/TextField';\nimport {makeStyles} from \"@material-ui/core\";\nimport createStyles from \"@material-ui/styles/createStyles\";\n\n\nconst useStyles = makeStyles(theme => (createStyles({\n root: dirty => ({\n '& label.Mui-focused': {color: dirty? theme.palette.neutral.status.dirty: theme.palette.primary.main},\n '& .MuiInput-underline:after': {borderBottomColor: dirty? theme.palette.neutral.status.dirty: theme.palette.primary.main},\n '& label': {color: dirty? theme.palette.neutral.status.dirty: theme.palette.neutral.emphasisText.medium}\n })\n})));\n\n\nconst DirtyTextField = (props) => {\n const name = props.name;\n const formik = props.formik;\n const dirty = props.noDirty === true? false: formik.values[name] !== formik.initialValues[name];\n const classes = useStyles(dirty);\n const formikProps = {\n value: formik.values[name] === undefined? '': formik.values[name], // todo why is this being called with undefined tho\n onChange: formik.handleChange,\n onBlur: formik.handleBlur,\n error: formik.status || formik.errors[name] !== undefined,\n helperText: formik.touched[name] && formik.errors[name]\n }\n return \n}\n\nexport default DirtyTextField;","export const countries = [\n { code: 'ES', label: 'Spain', phone: '34' },\n { code: 'AD', label: 'Andorra', phone: '376' },\n { code: 'AE', label: 'United Arab Emirates', phone: '971' },\n { code: 'AF', label: 'Afghanistan', phone: '93' },\n { code: 'AG', label: 'Antigua and Barbuda', phone: '1-268' },\n { code: 'AI', label: 'Anguilla', phone: '1-264' },\n { code: 'AL', label: 'Albania', phone: '355' },\n { code: 'AM', label: 'Armenia', phone: '374' },\n { code: 'AO', label: 'Angola', phone: '244' },\n { code: 'AQ', label: 'Antarctica', phone: '672' },\n { code: 'AR', label: 'Argentina', phone: '54' },\n { code: 'AS', label: 'American Samoa', phone: '1-684' },\n { code: 'AT', label: 'Austria', phone: '43' },\n { code: 'AU', label: 'Australia', phone: '61', suggested: true },\n { code: 'AW', label: 'Aruba', phone: '297' },\n { code: 'AX', label: 'Alland Islands', phone: '358' },\n { code: 'AZ', label: 'Azerbaijan', phone: '994' },\n { code: 'BA', label: 'Bosnia and Herzegovina', phone: '387' },\n { code: 'BB', label: 'Barbados', phone: '1-246' },\n { code: 'BD', label: 'Bangladesh', phone: '880' },\n { code: 'BE', label: 'Belgium', phone: '32' },\n { code: 'BF', label: 'Burkina Faso', phone: '226' },\n { code: 'BG', label: 'Bulgaria', phone: '359' },\n { code: 'BH', label: 'Bahrain', phone: '973' },\n { code: 'BI', label: 'Burundi', phone: '257' },\n { code: 'BJ', label: 'Benin', phone: '229' },\n { code: 'BL', label: 'Saint Barthelemy', phone: '590' },\n { code: 'BM', label: 'Bermuda', phone: '1-441' },\n { code: 'BN', label: 'Brunei Darussalam', phone: '673' },\n { code: 'BO', label: 'Bolivia', phone: '591' },\n { code: 'BR', label: 'Brazil', phone: '55' },\n { code: 'BS', label: 'Bahamas', phone: '1-242' },\n { code: 'BT', label: 'Bhutan', phone: '975' },\n { code: 'BV', label: 'Bouvet Island', phone: '47' },\n { code: 'BW', label: 'Botswana', phone: '267' },\n { code: 'BY', label: 'Belarus', phone: '375' },\n { code: 'BZ', label: 'Belize', phone: '501' },\n { code: 'CA', label: 'Canada', phone: '1', suggested: true },\n { code: 'CC', label: 'Cocos (Keeling) Islands', phone: '61' },\n { code: 'CD', label: 'Congo, Democratic Republic of the', phone: '243' },\n { code: 'CF', label: 'Central African Republic', phone: '236' },\n { code: 'CG', label: 'Congo, Republic of the', phone: '242' },\n { code: 'CH', label: 'Switzerland', phone: '41' },\n { code: 'CI', label: \"Cote d'Ivoire\", phone: '225' },\n { code: 'CK', label: 'Cook Islands', phone: '682' },\n { code: 'CL', label: 'Chile', phone: '56' },\n { code: 'CM', label: 'Cameroon', phone: '237' },\n { code: 'CN', label: 'China', phone: '86' },\n { code: 'CO', label: 'Colombia', phone: '57' },\n { code: 'CR', label: 'Costa Rica', phone: '506' },\n { code: 'CU', label: 'Cuba', phone: '53' },\n { code: 'CV', label: 'Cape Verde', phone: '238' },\n { code: 'CW', label: 'Curacao', phone: '599' },\n { code: 'CX', label: 'Christmas Island', phone: '61' },\n { code: 'CY', label: 'Cyprus', phone: '357' },\n { code: 'CZ', label: 'Czech Republic', phone: '420' },\n { code: 'DE', label: 'Germany', phone: '49', suggested: true },\n { code: 'DJ', label: 'Djibouti', phone: '253' },\n { code: 'DK', label: 'Denmark', phone: '45' },\n { code: 'DM', label: 'Dominica', phone: '1-767' },\n { code: 'DO', label: 'Dominican Republic', phone: '1-809' },\n { code: 'DZ', label: 'Algeria', phone: '213' },\n { code: 'EC', label: 'Ecuador', phone: '593' },\n { code: 'EE', label: 'Estonia', phone: '372' },\n { code: 'EG', label: 'Egypt', phone: '20' },\n { code: 'EH', label: 'Western Sahara', phone: '212' },\n { code: 'ER', label: 'Eritrea', phone: '291' },\n { code: 'ET', label: 'Ethiopia', phone: '251' },\n { code: 'FI', label: 'Finland', phone: '358' },\n { code: 'FJ', label: 'Fiji', phone: '679' },\n { code: 'FK', label: 'Falkland Islands (Malvinas)', phone: '500' },\n { code: 'FM', label: 'Micronesia, Federated States of', phone: '691' },\n { code: 'FO', label: 'Faroe Islands', phone: '298' },\n { code: 'FR', label: 'France', phone: '33', suggested: true },\n { code: 'GA', label: 'Gabon', phone: '241' },\n { code: 'GB', label: 'United Kingdom', phone: '44' },\n { code: 'GD', label: 'Grenada', phone: '1-473' },\n { code: 'GE', label: 'Georgia', phone: '995' },\n { code: 'GF', label: 'French Guiana', phone: '594' },\n { code: 'GG', label: 'Guernsey', phone: '44' },\n { code: 'GH', label: 'Ghana', phone: '233' },\n { code: 'GI', label: 'Gibraltar', phone: '350' },\n { code: 'GL', label: 'Greenland', phone: '299' },\n { code: 'GM', label: 'Gambia', phone: '220' },\n { code: 'GN', label: 'Guinea', phone: '224' },\n { code: 'GP', label: 'Guadeloupe', phone: '590' },\n { code: 'GQ', label: 'Equatorial Guinea', phone: '240' },\n { code: 'GR', label: 'Greece', phone: '30' },\n { code: 'GS', label: 'South Georgia and the South Sandwich Islands', phone: '500' },\n { code: 'GT', label: 'Guatemala', phone: '502' },\n { code: 'GU', label: 'Guam', phone: '1-671' },\n { code: 'GW', label: 'Guinea-Bissau', phone: '245' },\n { code: 'GY', label: 'Guyana', phone: '592' },\n { code: 'HK', label: 'Hong Kong', phone: '852' },\n { code: 'HM', label: 'Heard Island and McDonald Islands', phone: '672' },\n { code: 'HN', label: 'Honduras', phone: '504' },\n { code: 'HR', label: 'Croatia', phone: '385' },\n { code: 'HT', label: 'Haiti', phone: '509' },\n { code: 'HU', label: 'Hungary', phone: '36' },\n { code: 'ID', label: 'Indonesia', phone: '62' },\n { code: 'IE', label: 'Ireland', phone: '353' },\n { code: 'IL', label: 'Israel', phone: '972' },\n { code: 'IM', label: 'Isle of Man', phone: '44' },\n { code: 'IN', label: 'India', phone: '91' },\n { code: 'IO', label: 'British Indian Ocean Territory', phone: '246' },\n { code: 'IQ', label: 'Iraq', phone: '964' },\n { code: 'IR', label: 'Iran, Islamic Republic of', phone: '98' },\n { code: 'IS', label: 'Iceland', phone: '354' },\n { code: 'IT', label: 'Italy', phone: '39' },\n { code: 'JE', label: 'Jersey', phone: '44' },\n { code: 'JM', label: 'Jamaica', phone: '1-876' },\n { code: 'JO', label: 'Jordan', phone: '962' },\n { code: 'JP', label: 'Japan', phone: '81', suggested: true },\n { code: 'KE', label: 'Kenya', phone: '254' },\n { code: 'KG', label: 'Kyrgyzstan', phone: '996' },\n { code: 'KH', label: 'Cambodia', phone: '855' },\n { code: 'KI', label: 'Kiribati', phone: '686' },\n { code: 'KM', label: 'Comoros', phone: '269' },\n { code: 'KN', label: 'Saint Kitts and Nevis', phone: '1-869' },\n { code: 'KP', label: \"Korea, Democratic People's Republic of\", phone: '850' },\n { code: 'KR', label: 'Korea, Republic of', phone: '82' },\n { code: 'KW', label: 'Kuwait', phone: '965' },\n { code: 'KY', label: 'Cayman Islands', phone: '1-345' },\n { code: 'KZ', label: 'Kazakhstan', phone: '7' },\n { code: 'LA', label: \"Lao People's Democratic Republic\", phone: '856' },\n { code: 'LB', label: 'Lebanon', phone: '961' },\n { code: 'LC', label: 'Saint Lucia', phone: '1-758' },\n { code: 'LI', label: 'Liechtenstein', phone: '423' },\n { code: 'LK', label: 'Sri Lanka', phone: '94' },\n { code: 'LR', label: 'Liberia', phone: '231' },\n { code: 'LS', label: 'Lesotho', phone: '266' },\n { code: 'LT', label: 'Lithuania', phone: '370' },\n { code: 'LU', label: 'Luxembourg', phone: '352' },\n { code: 'LV', label: 'Latvia', phone: '371' },\n { code: 'LY', label: 'Libya', phone: '218' },\n { code: 'MA', label: 'Morocco', phone: '212' },\n { code: 'MC', label: 'Monaco', phone: '377' },\n { code: 'MD', label: 'Moldova, Republic of', phone: '373' },\n { code: 'ME', label: 'Montenegro', phone: '382' },\n { code: 'MF', label: 'Saint Martin (French part)', phone: '590' },\n { code: 'MG', label: 'Madagascar', phone: '261' },\n { code: 'MH', label: 'Marshall Islands', phone: '692' },\n { code: 'MK', label: 'Macedonia, the Former Yugoslav Republic of', phone: '389' },\n { code: 'ML', label: 'Mali', phone: '223' },\n { code: 'MM', label: 'Myanmar', phone: '95' },\n { code: 'MN', label: 'Mongolia', phone: '976' },\n { code: 'MO', label: 'Macao', phone: '853' },\n { code: 'MP', label: 'Northern Mariana Islands', phone: '1-670' },\n { code: 'MQ', label: 'Martinique', phone: '596' },\n { code: 'MR', label: 'Mauritania', phone: '222' },\n { code: 'MS', label: 'Montserrat', phone: '1-664' },\n { code: 'MT', label: 'Malta', phone: '356' },\n { code: 'MU', label: 'Mauritius', phone: '230' },\n { code: 'MV', label: 'Maldives', phone: '960' },\n { code: 'MW', label: 'Malawi', phone: '265' },\n { code: 'MX', label: 'Mexico', phone: '52' },\n { code: 'MY', label: 'Malaysia', phone: '60' },\n { code: 'MZ', label: 'Mozambique', phone: '258' },\n { code: 'NA', label: 'Namibia', phone: '264' },\n { code: 'NC', label: 'New Caledonia', phone: '687' },\n { code: 'NE', label: 'Niger', phone: '227' },\n { code: 'NF', label: 'Norfolk Island', phone: '672' },\n { code: 'NG', label: 'Nigeria', phone: '234' },\n { code: 'NI', label: 'Nicaragua', phone: '505' },\n { code: 'NL', label: 'Netherlands', phone: '31' },\n { code: 'NO', label: 'Norway', phone: '47' },\n { code: 'NP', label: 'Nepal', phone: '977' },\n { code: 'NR', label: 'Nauru', phone: '674' },\n { code: 'NU', label: 'Niue', phone: '683' },\n { code: 'NZ', label: 'New Zealand', phone: '64' },\n { code: 'OM', label: 'Oman', phone: '968' },\n { code: 'PA', label: 'Panama', phone: '507' },\n { code: 'PE', label: 'Peru', phone: '51' },\n { code: 'PF', label: 'French Polynesia', phone: '689' },\n { code: 'PG', label: 'Papua New Guinea', phone: '675' },\n { code: 'PH', label: 'Philippines', phone: '63' },\n { code: 'PK', label: 'Pakistan', phone: '92' },\n { code: 'PL', label: 'Poland', phone: '48' },\n { code: 'PM', label: 'Saint Pierre and Miquelon', phone: '508' },\n { code: 'PN', label: 'Pitcairn', phone: '870' },\n { code: 'PR', label: 'Puerto Rico', phone: '1' },\n { code: 'PS', label: 'Palestine, State of', phone: '970' },\n { code: 'PT', label: 'Portugal', phone: '351' },\n { code: 'PW', label: 'Palau', phone: '680' },\n { code: 'PY', label: 'Paraguay', phone: '595' },\n { code: 'QA', label: 'Qatar', phone: '974' },\n { code: 'RE', label: 'Reunion', phone: '262' },\n { code: 'RO', label: 'Romania', phone: '40' },\n { code: 'RS', label: 'Serbia', phone: '381' },\n { code: 'RU', label: 'Russian Federation', phone: '7' },\n { code: 'RW', label: 'Rwanda', phone: '250' },\n { code: 'SA', label: 'Saudi Arabia', phone: '966' },\n { code: 'SB', label: 'Solomon Islands', phone: '677' },\n { code: 'SC', label: 'Seychelles', phone: '248' },\n { code: 'SD', label: 'Sudan', phone: '249' },\n { code: 'SE', label: 'Sweden', phone: '46' },\n { code: 'SG', label: 'Singapore', phone: '65' },\n { code: 'SH', label: 'Saint Helena', phone: '290' },\n { code: 'SI', label: 'Slovenia', phone: '386' },\n { code: 'SJ', label: 'Svalbard and Jan Mayen', phone: '47' },\n { code: 'SK', label: 'Slovakia', phone: '421' },\n { code: 'SL', label: 'Sierra Leone', phone: '232' },\n { code: 'SM', label: 'San Marino', phone: '378' },\n { code: 'SN', label: 'Senegal', phone: '221' },\n { code: 'SO', label: 'Somalia', phone: '252' },\n { code: 'SR', label: 'Suriname', phone: '597' },\n { code: 'SS', label: 'South Sudan', phone: '211' },\n { code: 'ST', label: 'Sao Tome and Principe', phone: '239' },\n { code: 'SV', label: 'El Salvador', phone: '503' },\n { code: 'SX', label: 'Sint Maarten (Dutch part)', phone: '1-721' },\n { code: 'SY', label: 'Syrian Arab Republic', phone: '963' },\n { code: 'SZ', label: 'Swaziland', phone: '268' },\n { code: 'TC', label: 'Turks and Caicos Islands', phone: '1-649' },\n { code: 'TD', label: 'Chad', phone: '235' },\n { code: 'TF', label: 'French Southern Territories', phone: '262' },\n { code: 'TG', label: 'Togo', phone: '228' },\n { code: 'TH', label: 'Thailand', phone: '66' },\n { code: 'TJ', label: 'Tajikistan', phone: '992' },\n { code: 'TK', label: 'Tokelau', phone: '690' },\n { code: 'TL', label: 'Timor-Leste', phone: '670' },\n { code: 'TM', label: 'Turkmenistan', phone: '993' },\n { code: 'TN', label: 'Tunisia', phone: '216' },\n { code: 'TO', label: 'Tonga', phone: '676' },\n { code: 'TR', label: 'Turkey', phone: '90' },\n { code: 'TT', label: 'Trinidad and Tobago', phone: '1-868' },\n { code: 'TV', label: 'Tuvalu', phone: '688' },\n { code: 'TW', label: 'Taiwan, Province of China', phone: '886' },\n { code: 'TZ', label: 'United Republic of Tanzania', phone: '255' },\n { code: 'UA', label: 'Ukraine', phone: '380' },\n { code: 'UG', label: 'Uganda', phone: '256' },\n { code: 'US', label: 'United States', phone: '1', suggested: true },\n { code: 'UY', label: 'Uruguay', phone: '598' },\n { code: 'UZ', label: 'Uzbekistan', phone: '998' },\n { code: 'VA', label: 'Holy See (Vatican City State)', phone: '379' },\n { code: 'VC', label: 'Saint Vincent and the Grenadines', phone: '1-784' },\n { code: 'VE', label: 'Venezuela', phone: '58' },\n { code: 'VG', label: 'British Virgin Islands', phone: '1-284' },\n { code: 'VI', label: 'US Virgin Islands', phone: '1-340' },\n { code: 'VN', label: 'Vietnam', phone: '84' },\n { code: 'VU', label: 'Vanuatu', phone: '678' },\n { code: 'WF', label: 'Wallis and Futuna', phone: '681' },\n { code: 'WS', label: 'Samoa', phone: '685' },\n { code: 'XK', label: 'Kosovo', phone: '383' },\n { code: 'YE', label: 'Yemen', phone: '967' },\n { code: 'YT', label: 'Mayotte', phone: '262' },\n { code: 'ZA', label: 'South Africa', phone: '27' },\n { code: 'ZM', label: 'Zambia', phone: '260' },\n { code: 'ZW', label: 'Zimbabwe', phone: '263' },\n { code: '', label: \"empty\", phone: '-'},\n { code: 'OTHER', label: 'other', phone: '-'}\n];\n\nexport default countries;","import {makeStyles} from \"@material-ui/core/styles\";\nimport {useTranslation} from \"react-i18next\";\nimport React from \"react\";\nimport {Autocomplete} from \"@material-ui/lab\";\nimport {countries} from \"../_data/countries\";\nimport TextField from \"@material-ui/core/TextField\";\nimport createStyles from \"@material-ui/styles/createStyles\";\n\n// ISO 3166-1 alpha-2\n// ⚠️ No support for IE 11\nfunction countryToFlag(isoCode) {\n return typeof String.fromCodePoint !== 'undefined'\n ? isoCode\n .toUpperCase()\n .replace(/./g, (char) => String.fromCodePoint(char.charCodeAt(0) + 127397))\n : isoCode;\n}\n\n\nconst useStyles = makeStyles(theme => (createStyles({\n textField: dirty => ({\n '& label.Mui-focused': {color: dirty? theme.palette.neutral.status.dirty: theme.palette.primary.main}, // todo color to theme\n '& .MuiInput-underline:after': {borderBottomColor: dirty? theme.palette.neutral.status.dirty: theme.palette.primary.main},\n '& label': {color: dirty? theme.palette.neutral.status.dirty: theme.palette.neutral.emphasisText.medium},\n '& fieldset': {borderColor: dirty? theme.palette.neutral.status.dirty: theme.palette.neutral.emphasisText.medium},\n }\n ),\n option: {\n fontSize: 15,\n '& > span': {\n marginRight: 10,\n fontSize: 18,\n },\n },})));\n\nexport default function DirtyCountrySelect({formik, noDirty, name, label, style={ width: 300 }, ...textFieldProps}) {\n const getInitialOption = (code) => {\n if (code === undefined) return countries.find(x=>x.code==='');\n return countries.find(x=>x.code===code);\n }\n\n const [option, _setOption] = React.useState(getInitialOption(formik.values[name]));\n\n React.useEffect(() => {\n _setOption(getInitialOption(formik.values[name]));\n }, [formik.values, name]);\n\n const setOption = (option) => {\n const newOption = (option !== null)? option.code: '';\n formik.setFieldValue(name, newOption);\n _setOption(option);\n }\n\n const dirty = noDirty === true? false: formik.values[name] !== formik.initialValues[name];\n const classes = useStyles(dirty);\n\n const [inputValue, setInputValue] = React.useState('');\n\n const { t } = useTranslation();\n\n return (\n t(option.code) }\n getOptionSelected={(o) => o.code === option.code}\n value={option}\n onChange={(event, newValue) => {\n setOption(newValue);\n }}\n inputValue={inputValue}\n onInputChange={(event, newInputValue) => {\n setInputValue(newInputValue);\n }}\n name={name}\n onBlur={formik.handleBlur}\n renderOption={(option) => (\n \n {option.code !== \"\" && option.code !== \"OTHER\"? countryToFlag(option.code): \"\"}\n {option.code !== \"\" && option.code !== \"OTHER\"? t(option.code): t(option.label)} {option.code !== \"\" && option.code !== \"OTHER\"? \"(\"+option.code+\") +\"+option.phone: \"\"}\n \n )}\n\n renderInput={(params) => (\n \n )}\n />\n );\n}","import {userContext} from \"../_context/user-context\";\nimport React from 'react';\nimport {useSnackbar} from \"notistack\";\nimport {useTranslation} from \"react-i18next\";\nimport {Button} from \"@material-ui/core\";\n\n\nexport function useErrorHandler() {\n\n const userCtx = React.useContext(userContext);\n const {enqueueSnackbar, closeSnackbar} = useSnackbar();\n const {t} = useTranslation();\n\n const successHandler = (res, snackbarSuccess) => {\n if (snackbarSuccess) enqueueSnackbar(t(\"success\"), {variant: \"success\"});\n return Promise.resolve(res);\n }\n\n const successHandlerFactory = (snackbarSuccess) => {\n return (res) => successHandler(res, snackbarSuccess)\n }\n\n const failureHandler401 = (res) => {\n // auto logout if 401 unauthenticated\n userCtx[\"setUser\"]({logged: false, ping: false});\n\n enqueueSnackbar(t(\"warning_not_logged_in\"), {variant: \"warning\"});\n\n return Promise.reject(res);\n }\n\n const failureHandler403 = (res) => {\n // unauthorized\n enqueueSnackbar(t(\"warning_not_enough_privileges\"), {variant: \"warning\"});\n\n return Promise.reject(res);\n }\n\n const failureHandlerUnexpected = (res, reportUnexpected) => {\n // an unexpected error happened\n \n \n const showSnackbar = (message) => {\n enqueueSnackbar(`Something went wrong! 😣 ${message}`,\n {\n variant: \"error\",\n autoHideDuration: 10000,\n action: key => {\n return \n \"Logo\n\n {reportUnexpected? : null}\n \n\n \n }\n });\n }\n\n if (res.request.responseType == 'blob'){\n res.response.data.text().then(res => {\n showSnackbar(JSON.parse(res)['message']);\n });\n } else {\n showSnackbar('');\n }\n\n return Promise.reject(res);\n }\n\n const failureHandler = (res, handle401, handle403, handle400, errorOut, reportUnexpected) => {\n // decide which handler is going to handle the error response depending on status code\n let handler = (res) => failureHandlerUnexpected(res, reportUnexpected);\n if (res.request.status === 401) {\n if (handle401) { handler = failureHandler401; }\n else { return Promise.reject(res) }\n }\n if (res.request.status === 403) {\n if (handle403) { handler = failureHandler403; }\n else { return Promise.reject(res) }\n }\n if (res.request.status === 400) {\n if (!handle400) { return Promise.reject(res) }\n // else just use the default handler\n }\n\n // use the handler, return a rejected promise if errorOut,\n // else just execute the handler but don't return a rejected catch\n // (otherwise there will be either empty rejection handlers or unhandled rejections everywhere)\n if (errorOut) {\n return handler(res);\n } else {\n handler(res).catch(()=>{}); // ignores the rejection response\n return null;\n }\n }\n\n const failureHandlerFactory = (handle401, handle403, handle400, errorOut, reportUnexpected) => {\n return (res) => (failureHandler(res, handle401, handle403, handle400, errorOut, reportUnexpected))\n }\n\n return ({\n handle401 = true,\n handle403 = true,\n handle400 = true,\n errorOut = true,\n reportUnexpected = true,\n snackbarSuccess = false\n }) => {\n return [successHandlerFactory(snackbarSuccess),\n failureHandlerFactory(handle401, handle403, handle400, errorOut, reportUnexpected)]\n };\n}","import {useFormik} from \"formik\";\n\n\nexport function useNormik(onlyChangedValuesOnSubmit, props, allowArrays=false) {\n let originalInitialValues = {};\n if (\"initialValues\" in props) {\n let nullSafeInitialValues = {};\n originalInitialValues = props.initialValues;\n for (const [key, value] of Object.entries(originalInitialValues)) {\n if (value === null) {\n nullSafeInitialValues[key] = '';\n } else {\n nullSafeInitialValues[key] = value;\n }\n }\n props.initialValues = nullSafeInitialValues;\n }\n\n if (\"onSubmit\" in props){\n const oldOnSubmit = props.onSubmit;\n const nullSafeOnSubmit = (values, actions) => {\n let normalizedValues = {};\n for (const [key, value] of Object.entries(values)) {\n const normalizedValue = value === ''? null : value;\n if (!onlyChangedValuesOnSubmit ||\n (onlyChangedValuesOnSubmit && normalizedValue !== originalInitialValues[key] &&\n (allowArrays || !Array.isArray(originalInitialValues[key])) )){\n normalizedValues[key] = normalizedValue;\n }\n\n }\n oldOnSubmit(normalizedValues, actions);\n }\n props.onSubmit = nullSafeOnSubmit;\n }\n\n return useFormik(props);\n}","export const education_years = [\n \"kindergarten_p0\",\n \"kindergarten_p1\",\n \"kindergarten_p2\",\n \"kindergarten_p3\",\n \"kindergarten_p4\",\n \"kindergarten_p5\",\n \"primary_1\",\n \"primary_2\",\n \"primary_3\",\n \"primary_4\",\n \"primary_5\",\n \"primary_6\",\n \"eso_1\",\n \"eso_2\",\n \"eso_3\",\n \"eso_4\",\n \"baccalaureate_1\",\n \"baccalaureate_2\",\n \"FP_lower\",\n \"FP_higher\",\n \"undergraduate\",\n \"master\",\n \"phd\",\n \"other\"\n];\n","import React, {useEffect} from 'react';\nimport {makeStyles} from '@material-ui/core/styles';\nimport {useTranslation} from \"react-i18next\";\nimport {Checkbox, FormControlLabel} from \"@material-ui/core\";\nimport {allNeeds} from \"../_data/needs\";\nimport Typography from \"@material-ui/core/Typography\";\nimport createStyles from \"@material-ui/styles/createStyles\";\nimport TextField from \"@material-ui/core/TextField\";\nimport useTheme from \"@material-ui/core/styles/useTheme\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport Tooltip from \"@material-ui/core/Tooltip\";\nimport SaveIcon from \"@material-ui/icons/Save\";\nimport RestoreIcon from \"@material-ui/icons/Restore\";\n\n\nconst DiscardButton = ({formik, ...props}) => {\n const {t} = useTranslation();\n\n return \n \n \n \n \n}\n\nexport default DiscardButton;","import {userContext} from \"../_context/user-context\";\nimport React from 'react';\nimport {useSnackbar} from \"notistack\";\nimport {useTranslation} from \"react-i18next\";\nimport {Button} from \"@material-ui/core\";\nimport {CHECK_NEEDS} from \"../config\";\n\n\nexport const NEEDS = {\n get: \"get\",\n patch: \"patch\",\n delete: \"delete\",\n post: \"post\",\n send_email: \"send_email\",\n invite_users: \"invite_users\",\n students: \"students\",\n courses: \"courses\",\n guardians: \"guardians\",\n payments: \"payments\",\n rooms: \"rooms\",\n schedules: \"schedules\",\n teachers: \"teachers\",\n users: \"users\",\n paymentReceipts: \"payments-receipts\",\n attendance: \"attendance\"\n };\n\n\nexport function useNeeds() {\n\n const userCtx = React.useContext(userContext);\n\n const hasNeed = (needs) => (!CHECK_NEEDS || needs.every(need => userCtx.needs.includes(need)));\n\n return [hasNeed, NEEDS];\n}","import React, {useEffect} from 'react';\nimport {makeStyles} from '@material-ui/core/styles';\nimport {useTranslation} from \"react-i18next\";\nimport {Checkbox, FormControlLabel} from \"@material-ui/core\";\nimport {allNeeds} from \"../_data/needs\";\nimport Typography from \"@material-ui/core/Typography\";\nimport createStyles from \"@material-ui/styles/createStyles\";\nimport TextField from \"@material-ui/core/TextField\";\nimport useTheme from \"@material-ui/core/styles/useTheme\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport Tooltip from \"@material-ui/core/Tooltip\";\nimport SaveIcon from \"@material-ui/icons/Save\";\nimport {useNeeds} from \"../_helpers/needs\";\n\n\nconst SaveButton = ({formik, ...props}) => {\n const {t} = useTranslation();\n const [hasNeeds, NEEDS] = useNeeds();\n return hasNeeds([NEEDS.patch]) && \n \n \n \n \n}\n\nexport default SaveButton;","export const longer_8 = /^.{8,}$/;\nexport const shorter_64 = /^.{0,64}$/;\nexport const has_lowercase = /(?=.*[a-z])/;\nexport const has_uppercase = /(?=.*[A-Z])/;\nexport const has_digit = /(?=.*\\d)/;\nexport const has_special = /(?=.*[-\\/:-@\\!.,+`´\\-%&\\(\\)#$€_[-`{-~]{1,})/;\nexport const no_plus = /^((?!\\+).)*$/;\n","import * as yup from \"yup\";\nimport {\n has_digit,\n has_lowercase,\n has_special,\n has_uppercase,\n longer_8,\n no_plus,\n shorter_64\n} from \"../_data/password_regex\";\n\nexport const DNI_REGEX = /^[0-9]{8}[TRWAGMYFPDXBNJZSQVHLCKE]$/i;\nexport const NIE_REGEX = /^[XYZ][0-9]{7}[A-Z]$/i;\nexport const DNI_OR_NIE_REGEX = new RegExp(DNI_REGEX.source + \"|\" + NIE_REGEX.source).source;\nexport const safe_password = (t) => (\n yup.string()\n .required(t(\"password_required\"))\n .matches(longer_8, t(\"longer_8\"))\n .matches(shorter_64, t(\"shorter_64\"))\n .matches(has_lowercase, t(\"has_lowercase\"))\n .matches(has_uppercase, t(\"has_uppercase\"))\n .matches(has_digit, t(\"has_digit\"))\n .matches(has_special, t(\"has_special\"))\n)\n\nexport const safe_password_repetition = (t) => (\n yup.string()\n .required(t(\"password_required\"))\n .oneOf([yup.ref('password'), null], t(\"passwords_unmatched\"))\n)\n\n\nconst safe_username_email = (t) => (\n yup.string()\n .email(t(\"invalid_email\"))\n .matches(no_plus, t(\"no_plus\"))\n)\n\nconst safe_username_email_required = (t) => (\n safe_username_email(t).required(t(\"email_required\"))\n);\n\n\nexport const safe_username_required = safe_username_email_required;\nexport const safe_email_required = safe_username_email_required;\nexport const safe_email = safe_username_email;\n\nexport const one_of = (t, options) => yup.string().required(t('field_required'))\n .test( // one of the array\n 'oneOfRequired',\n `${t(\"one_of\")}: ${options.toString()}`,\n v => options.includes(v)\n )","import {useTranslation} from \"react-i18next\";\nimport Box from \"@material-ui/core/Box\";\nimport {MenuItem} from \"@material-ui/core\";\nimport React from \"react\";\nimport {makeStyles} from \"@material-ui/core/styles\";\nimport {Skeleton} from \"@material-ui/lab\";\nimport DirtyTextField from \"./dirtytextfield.component\";\nimport * as yup from 'yup';\nimport DirtyCountrySelect from \"./contry-select.component\";\nimport {useErrorHandler} from \"../_helpers/handle-response\";\nimport {useNormik} from \"../_helpers/normik\";\nimport {education_years} from \"../_data/education\";\nimport Divider from \"@material-ui/core/Divider\";\nimport {IconButtonSkeleton} from \"../_skeletons/iconButton\";\nimport DiscardButton from \"./formik_discard_button\";\nimport SaveButton from \"./formik_save_button\";\nimport {safe_email} from \"../_yup/validators\";\n\nconst useStyles = makeStyles((theme) => ({\n line: {\n width: \"100%\",\n marginTop: theme.spacing(1)\n },\n composite: {\n display: \"flex\", flexDirection: \"row\", flex: 1, flexWrap: \"wrap\",\n gap: theme.spacing(1), width: \"100%\"\n },\n actionIcon: {\n float: 'right'\n }\n}));\n\nfunction Person(props) {\n const currentPerson = props.currentPerson;\n const dataService = props.patchService;\n const newPerson = props.newPerson;\n const updateCurrentPerson = props.updateCurrentStudent;\n const additionalFields = props.additionalFields;\n const additionalValidation = props.additionalValidation === undefined? {}: props.additionalValidation;\n const studentId = props.studentId;\n const onUpdate = props.onUpdate;\n const loading = currentPerson === null;\n\n const {t} = useTranslation();\n const classes = useStyles();\n const errorHandler = useErrorHandler();\n let initialValues = loading ? {} : currentPerson;\n\n\n const formik = useNormik(!newPerson, {\n initialValues: initialValues,\n validationSchema: yup.object({...{\n email: safe_email(t),\n name: yup.string().required(t(\"name_required\")),\n is_studying: yup.boolean().required(t(\"studying_required\")),\n is_working: yup.boolean().required(t(\"working_required\")),\n career: yup.string().when('is_working', {\n is: true,\n then: yup.string().required(t(\"career_required\"))\n }),\n education_entity: yup.string().when('is_studying', {\n is: true,\n then: yup.string().required(t(\"education_entity_required\"))\n }),\n education_year: yup.string().when('is_studying', {\n is: true,\n then: yup.string().required(t(\"education_year_required\"))\n })\n }, ...additionalValidation}),\n enableReinitialize: true,\n onSubmit: (changedValues, {setStatus, setSubmitting}) => {\n if (newPerson) {\n setStatus();\n dataService.post({...changedValues})\n .then(...errorHandler({snackbarSuccess: true}))\n .then(function (new_id) {\n updateCurrentPerson(new_id['id']);\n if (typeof onUpdate === 'function') onUpdate(changedValues);\n }).catch(function (err) {\n setStatus(true);\n }).finally(() => {\n setSubmitting(false);\n });\n } else {\n if (Object.keys(changedValues).length > 0) {\n setStatus();\n dataService.patch({\n id: initialValues[\"id\"],\n body: changedValues,\n initial_values: initialValues\n }).then(...errorHandler({snackbarSuccess: true}))\n .then(function (patched_body) {\n formik.resetForm(patched_body);\n updateCurrentPerson(patched_body);\n\n if (typeof onUpdate === 'function') onUpdate(changedValues);\n }).catch(function (err) {\n setStatus(true);\n }).finally(() => {\n setSubmitting(false);\n });\n\n\n } else {\n setSubmitting(false);\n }\n }\n }\n });\n\n function recursiveForm(elements) {\n if (elements === undefined) return null;\n\n return
\n \n \n \n {\n elements.map((res, idx) => (\n res == null? \n \n :\n \n {res instanceof Array ?\n res.map((r, idx2) => (\n React.cloneElement(r, {formik: formik, key: idx+\"-\"+idx2})\n ))\n : React.cloneElement(res, {formik: formik})}\n ))\n }\n
;\n }\n\n\n return (\n \n {loading?\n (\n\n \n \n \n\n\n
\n { [\"100%\", \"100%\", \"100%\", \"100%\", \"100%\", \"100%\"].map((value, idx) => {\n return (\n \n \n );\n })}\n
\n
\n )\n :\n (\n
\n\n \n\n\n \n\n\n \n\n \n \n \n \n \n\n \n \n \n\n \n \n \n\n \n \n \n \n \n\n \n \n \n\n\n\n \n\n\n\n \n\n \n\n {t(\"male\")}\n {t(\"female\")}\n {t(\"nb\")}\n \n \n\n \n \n \n \n {t(\"yes\")}\n {t(\"no\")}\n \n \n \n {education_years.map((level) => (\n {t(level)}\n ))}\n \n \n\n \n\n\n \n {t(\"yes\")}\n {t(\"no\")}\n \n \n \n\n {recursiveForm(additionalFields)}\n\n \n )\n\n }\n
\n );\n}\n\n\nexport default Person;","import serviceFactory from \"./service-factory\";\n\n\nexport default new (serviceFactory('guardians'))();\n\n","import serviceFactory from \"./service-factory\";\n\n\nexport default new (serviceFactory('payments'))();\n\n","export const payment_methods = [\n \"bank-transfer\",\n \"cash\",\n \"bank-direct-debit\"\n]","const newPerson = {\n name: null,\n surname1: null,\n surname2: null,\n email: null,\n address: null,\n city: null,\n zip: null,\n dni: null,\n phone: null,\n gender: null,\n\n country_of_origin: null,\n is_studying: null,\n education_entity: null,\n education_year: null,\n is_working: null,\n career: null\n };\nexport const emptyGuardian = {...newPerson, relation: null};\nexport const emptyAttendee = {...newPerson,\n price_term: null,\n payment_comments: null,\n birth_date: null,\n other_comments: null,\n image_agreement: null,\n enrolment_status: null,\n default_payment_method: null\n};\n","import React from \"react\";\n\nconst loadingContext = React.createContext({loading: false,\n startLoading: () => {},\n stopLoading: () => {},\n}); // Create a context object\n\nexport {\n loadingContext // Export it so it can be used by other Components\n};","import {useTranslation} from \"react-i18next\";\nimport Box from \"@material-ui/core/Box\";\nimport PersonAddIcon from '@material-ui/icons/PersonAdd';\nimport {MenuItem} from \"@material-ui/core\";\nimport PropTypes from \"prop-types\";\nimport React from \"react\";\nimport StudentsDataService from \"../_services/students.service\";\nimport {makeStyles} from \"@material-ui/core/styles\";\nimport * as yup from 'yup';\nimport {IconButtonSkeleton} from \"../_skeletons/iconButton\"\nimport Person from \"./students.student.person.component\";\nimport InputAdornment from \"@material-ui/core/InputAdornment\";\nimport Button from \"@material-ui/core/Button\";\nimport GuardiansDataService from \"../_services/guardians.service\";\nimport PaymentsDataService from \"../_services/payments.service\";\nimport {useErrorHandler} from \"../_helpers/handle-response\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport DeleteIcon from \"@material-ui/icons/Delete\";\nimport Tooltip from \"@material-ui/core/Tooltip\";\nimport DirtyTextField from \"./dirtytextfield.component\";\nimport SendIcon from \"@material-ui/icons/Send\";\nimport {sendEnrollmentEmail} from \"../_services/emailsEnrollment.service\";\nimport Divider from \"@material-ui/core/Divider\";\nimport {sendGrantEmail} from \"../_services/emailsGrants.service\";\nimport GetAppIcon from \"@material-ui/icons/GetApp\";\nimport {payment_methods} from \"../_data/payment_methods\";\nimport {emptyAttendee} from \"../_data/empty_objects\";\nimport {useNeeds} from \"../_helpers/needs\";\nimport {loadingContext} from \"../_context/loading-context\";\nimport {confirmContext} from \"../_context/confirm-context\";\nimport TextField from \"@material-ui/core/TextField\";\n\n\nconst useStyles = makeStyles((theme) => ({\n actionIcon: {\n float: 'right'\n },\n button: {\n margin: theme.spacing(1),\n },\n line: {\n width: \"100%\",\n marginTop: theme.spacing(1)\n },\n composite: {\n display: \"flex\", flexDirection: \"row\", flex: 1, flexWrap: \"wrap\",\n gap: theme.spacing(1), width: \"100%\"\n }\n}));\n\nfunction Attendee({ children, setNewStudent, addStudentId, newStudent, title, currentStudent, updateCurrentStudent, patchService, deleteStudent, addNewGuardian, ...other }) {\n const { t } = useTranslation();\n const loading = currentStudent === null;\n const classes = useStyles();\n const errorHandler = useErrorHandler();\n const [hasNeeds, NEEDS] = useNeeds();\n const confirm = React.useContext(confirmContext);\n\n const deleteFullStudent = () => {\n StudentsDataService\n .delete(currentStudent['id'])\n .then(...errorHandler({snackbarSuccess: true})) // todo everywhere\n .then(function (res) {\n PaymentsDataService\n .deleteMany(currentStudent['payments'])\n .then(...errorHandler({})) // todo everywhere\n .then(function (res) {\n\n });\n\n GuardiansDataService\n .deleteMany(currentStudent['guardians'])\n .then(...errorHandler({})) // todo everywhere\n .then(function (res) {\n\n });\n\n\n // todo schedules, courses\n\n\n deleteStudent(currentStudent['id']);\n });\n }\n const loadingCtx = React.useContext(loadingContext);\n const sendGrantLetter = () => {\n loadingCtx.startLoading();\n sendGrantEmail(currentStudent['id'])\n .then(...errorHandler({snackbarSuccess: true}))\n .finally(() => {\n loadingCtx.stopLoading();\n });\n }\n const sendEnrollmentAgreement = () => {\n loadingCtx.startLoading();\n sendEnrollmentEmail(currentStudent['id'])\n .then(...errorHandler({snackbarSuccess: true}))\n .finally(() => {\n loadingCtx.stopLoading();\n });\n }\n\n\n\n return (\n \n\n \n \n {loading?\n !newStudent && \n :\n !newStudent && hasNeeds([NEEDS.guardians, NEEDS.post]) && \n {\n addNewGuardian();\n }}>\n \n \n \n }\n\n\n {loading && !newStudent ?\n \n :\n hasNeeds([NEEDS.delete]) && \n {\n if (newStudent) {\n setNewStudent(false);\n } else {\n confirm.confirm(\"delete_student_question\",\n \"student_also_deletes\",\n () => {\n deleteFullStudent(currentStudent['id'])\n });\n }\n\n }}>\n \n \n \n }\n\n {\n if (!newStudent) return updateCurrentStudent(x);\n addStudentId(x);\n }}\n patchService={patchService}\n onUpdate={(changedBody) => {\n if (\"enrolment_status\" in changedBody && changedBody[\"enrolment_status\"] === \"enrolled\"){\n confirm.confirm(\"send_grant_letter_question\",\n \"this_will_be_sent\",\n () => {\n sendGrantLetter();\n });\n }\n }}\n additionalValidation={{\n enrolment_status: yup.string().required(t(\"status_required\")),\n image_agreement: yup.boolean().required(t(\"image_required\")),\n birth_date: yup.date().required(t(\"birthdate_required\"))\n }}\n additionalFields={\n [[€,}}\n />,\n \n { payment_methods.map(\n (method) => (\n {t(method)}\n )\n )\n }\n ],\n ,\n null,\n [,\n ],\n [\n \n {['enrolled', 'early-unenrolled', 'pre-enrolled'].map((s) => (\n {t(s)}\n ))}\n ,\n \n {t(\"yes\")}\n {t(\"no\")}\n \n ], [,\n ,\n \n ],\n ]}\n >\n\n \n\n {!loading && !newStudent && \n \n }\n\n \n {!loading && !newStudent && hasNeeds([NEEDS.send_email]) &&\n \n }\n onClick={(e) => {\n sendGrantLetter();\n }}\n >\n {t(\"grant_letter\")}\n \n }\n\n {!loading && !newStudent &&\n \n }\n onClick={(e) => {\n if (loadingCtx.loading) return;\n loadingCtx.startLoading();\n StudentsDataService\n .downloadSubresource(currentStudent[\"id\"], 'grantLetter')\n .then(...errorHandler({snackbarSuccess: true}))\n .finally(() => {\n loadingCtx.stopLoading();\n })\n }}\n >\n {t(\"grant_letter\")}\n \n }\n \n\n \n {!loading && !newStudent && hasNeeds([NEEDS.send_email]) &&\n \n }\n disabled={loadingCtx.loading}\n onClick={(e) => {\n sendEnrollmentAgreement();\n }}\n >\n {t(\"enrolment_agreement\")}\n \n }\n\n {!loading && !newStudent && \n }\n disabled={loadingCtx.loading}\n onClick={(e) => {\n if (loadingCtx.loading) return;\n loadingCtx.startLoading();\n StudentsDataService\n .downloadSubresource(currentStudent[\"id\"], 'enrolmentAgreement')\n .then(...errorHandler({snackbarSuccess: true}))\n .finally(() => {\n loadingCtx.stopLoading();\n })\n }}\n >\n {t(\"enrolment_agreement\")}\n \n }\n \n \n \n \n );\n}\n\n\nexport default Attendee;","import serviceFactory from \"./service-factory\";\nimport {API_VERSION, BACKEND_URL} from \"../config\";\nimport {authHeader} from \"../_helpers/auth-header\";\nimport axios from \"axios\";\n\n\nexport const sendGrantEmail = (id) => { // todo abstract\n return new Promise(function (resolve, reject) {\n axios({\n method: 'post',\n url: `${BACKEND_URL}/emails/v1/grantEmail/${id}`,\n headers: {\n ...{\n 'Content-Type': 'application/json',\n 'Cache-Control': 'no-cache'\n }, ...authHeader()\n }\n }).then(function (res) {\n resolve(res);\n }).catch(function (err) {\n reject(err);\n });\n });\n };\n\n","import serviceFactory from \"./service-factory\";\nimport {API_VERSION, BACKEND_URL} from \"../config\";\nimport {authHeader} from \"../_helpers/auth-header\";\nimport axios from \"axios\";\n\n\nexport const sendEnrollmentEmail = (id) => { // todo abstract\n return new Promise(function (resolve, reject) {\n axios({\n method: 'post',\n url: `${BACKEND_URL}/emails/v1/enrolmentEmail/${id}`,\n headers: {\n ...{\n 'Content-Type': 'application/json',\n 'Cache-Control': 'no-cache'\n }, ...authHeader()\n }\n }).then(function (res) {\n resolve(res);\n }).catch(function (err) {\n reject(err);\n });\n });\n };\n\n","import serviceFactory from \"./service-factory\";\n\n\nexport default new (serviceFactory('students', 'guardians'))();\n\n","export const student_guardian_relations = [\n 'father',\n 'mother',\n 'grandfather',\n 'grandmother',\n 'brother',\n 'sister',\n 'uncle',\n 'aunt',\n 'cousin',\n 'legal_guardian',\n 'ss_agent',\n 'other'\n]","import {useTranslation} from \"react-i18next\";\nimport Box from \"@material-ui/core/Box\";\nimport {MenuItem} from \"@material-ui/core\";\nimport PropTypes from \"prop-types\";\nimport React, {useEffect, useState} from \"react\";\nimport StudentGuardianDataService from \"../_services/student_guardians.service\"\nimport {student_guardian_relations} from \"../_data/relations\"\nimport Person from \"./students.student.person.component\";\nimport GuardiansDataService from \"../_services/guardians.service\";\nimport {useErrorHandler} from \"../_helpers/handle-response\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport DeleteIcon from \"@material-ui/icons/Delete\";\nimport Tooltip from \"@material-ui/core/Tooltip\";\nimport * as yup from \"yup\";\nimport DirtyTextField from \"./dirtytextfield.component\";\nimport {emptyGuardian} from \"../_data/empty_objects\";\nimport {useNeeds} from \"../_helpers/needs\";\nimport {confirmContext} from \"../_context/confirm-context\";\n\nfunction Guardian({ studentId, title, guardianId, deleteGuardianId, addGuardianId, deleteNewGuardian, newGuardian=false, ...other }) {\n const { t } = useTranslation();\n const errorHandler = useErrorHandler();\n\n const [guardian, setGuardian] = useState(null);\n\n const [hasNeeds, NEEDS] = useNeeds();\n useEffect(() => {\n if (newGuardian) return;\n\n GuardiansDataService\n .getOne(guardianId)\n .then(...errorHandler({})) // todo everywhere\n .then(function (res) {\n setGuardian(res[\"data\"]);\n\n });\n }, [guardianId]);\nconst confirm = React.useContext(confirmContext);\n return (\n \n\n\n \n \n\n\n {hasNeeds([NEEDS.delete]) && {\n if (!newGuardian) {\n confirm.confirm(\"delete_guardian_question\", \"not_undone\", () => {\n GuardiansDataService\n .delete(guardianId)\n .then(...errorHandler({snackbarSuccess: true})) // todo everywhere\n .then(function (res) {\n deleteGuardianId(guardianId);\n });\n })\n return;\n }\n deleteNewGuardian();\n }}>\n \n \n \n }\n\n\n {\n if (!newGuardian) return setGuardian(x);\n StudentGuardianDataService.postWithId(studentId, x)\n .then(...errorHandler({snackbarSuccess: true}))\n .then(() => {\n addGuardianId(x);\n });\n }}\n patchService={GuardiansDataService}\n additionalValidation={{\n relation: yup.string().required(t(\"relation_required\"))}}\n additionalFields={\n [[\n {student_guardian_relations.map((r) => (\n {t(r)}\n ))}\n ))}\n\n ]]}\n />\n\n \n \n\n \n );\n}\n\nexport default Guardian;","import {useTranslation} from \"react-i18next\";\nimport React from \"react\";\nimport AccountBalanceIcon from '@material-ui/icons/AccountBalance';\nimport MoreHorizIcon from '@material-ui/icons/MoreHoriz';\nimport SendIcon from '@material-ui/icons/Send';\nimport {makeStyles} from \"@material-ui/core/styles\";\nimport clsx from 'clsx';\nimport AccountBalanceWalletIcon from '@material-ui/icons/AccountBalanceWallet';\nimport DeleteIcon from '@material-ui/icons/Delete';\nimport ReceiptIcon from '@material-ui/icons/Receipt';\nimport Card from '@material-ui/core/Card';\nimport CardHeader from '@material-ui/core/CardHeader';\nimport CardContent from '@material-ui/core/CardContent';\nimport CardActions from '@material-ui/core/CardActions';\nimport Collapse from '@material-ui/core/Collapse';\nimport Avatar from '@material-ui/core/Avatar';\nimport IconButton from '@material-ui/core/IconButton';\nimport EuroIcon from '@material-ui/icons/Euro';\nimport PaymentsDataService from '../_services/payments.service';\nimport {sendReceiptEmail} from '../_services/emailsReceipts.service';\nimport ExpandMoreIcon from '@material-ui/icons/ExpandMore';\nimport Tooltip from \"@material-ui/core/Tooltip\";\nimport Box from \"@material-ui/core/Box\";\nimport {Skeleton} from \"@material-ui/lab\";\nimport DirtyTextField from \"./dirtytextfield.component\";\nimport {Button, DialogActions, MenuItem} from \"@material-ui/core\";\nimport {useNormik} from \"../_helpers/normik\";\nimport * as yup from \"yup\";\nimport {one_of} from \"../_yup/validators\";\nimport {useErrorHandler} from \"../_helpers/handle-response\";\nimport InputAdornment from \"@material-ui/core/InputAdornment\";\nimport {payment_methods} from \"../_data/payment_methods\"\nimport {useNeeds} from \"../_helpers/needs\";\nimport {loadingContext} from \"../_context/loading-context\";\nimport {confirmContext} from \"../_context/confirm-context\";\nconst useStyles = makeStyles((theme) => ({\n root: {\n maxWidth: '100%',\n backgroundColor: theme.palette.type === 'dark'? '#575757': null\n },\n expand: {\n transform: 'rotate(0deg)',\n marginLeft: 'auto',\n transition: theme.transitions.create('transform', {\n duration: theme.transitions.duration.shortest,\n }),\n },\n expandOpen: {\n transform: 'rotate(180deg)',\n },\n avatar: {\n backgroundColor: theme.palette.secondary.main,\n },\n line: {\n width: \"100%\",\n marginTop: theme.spacing(1)\n },\n composite: {\n display: \"flex\", flexDirection: \"row\", flex: 1, flexWrap: \"wrap\",\n gap: theme.spacing(1), width: \"100%\"\n }\n}));\n\nexport default function PaymentCard({ payment, updatePayment, deletePayment, newPayment=false, addPaymentId, student_id} ) {\n const { t } = useTranslation();\n const classes = useStyles();\n const [expanded, setExpanded] = React.useState(newPayment);\n const errorHandler = useErrorHandler();\n const [hasNeeds, NEEDS] = useNeeds();\n const handleExpandClick = () => {\n setExpanded(!expanded);\n };\n\n const confirm = React.useContext(confirmContext);\nconst loadingCtx = React.useContext(loadingContext);\n\nconst sendReceipt = (id) => {\n loadingCtx.startLoading();\n sendReceiptEmail(id)\n .then(...errorHandler({snackbarSuccess:true}))\n .finally(() => {\n loadingCtx.stopLoading();\n });\n}\n const formik = useNormik(!newPayment, {\n initialValues: payment,\n validationSchema: yup.object({method: one_of(t, payment_methods),\n quantity: yup.number().required(t(\"import_required\")),\n date: yup.date().required(t(\"date_required\"))}), // todo\n enableReinitialize: true,\n onSubmit: (changedValues, {setStatus, setSubmitting}) => {\n if (Object.keys(changedValues).length > 0){\n setStatus();\n\n if (newPayment) {\n PaymentsDataService\n .post({...changedValues, student_id: student_id})\n .then(...errorHandler({snackbarSuccess:true}))\n .then(function (res) {\n addPaymentId(res['id']);\n confirm.confirm(\"send_receipt\", \"send_receipt\",\n () => sendReceipt(res['id']))\n }).catch(function (err){\n setStatus(true);\n })\n .finally(() => {\n setSubmitting(false);\n\n });\n } else {\n PaymentsDataService.patch({\n id: payment[\"id\"], // id\n body: changedValues,\n initial_values: payment // todo doesnt normik do this?\n }).then(...errorHandler({snackbarSuccess:true}))\n .then(function (patched_body) {\n formik.resetForm(patched_body);\n updatePayment(patched_body['id'], patched_body);\n }).catch(function (err){\n setStatus(true);\n })\n .finally(() => {\n setSubmitting(false);\n });\n\n }\n\n } else {\n setSubmitting(false);\n }\n\n }\n });\n\n\n return (\n \n \n \n \n {payment[\"method\"] === 'cash'? :\n payment[\"method\"] === 'bank-transfer'? :\n payment[\"method\"] === 'bank-direct-debit'? :\n \n }\n \n \n\n }\n action={\n hasNeeds([NEEDS.delete]) && \n {\n confirm.confirm(\"delete_payment\", \"not_undone\", () => {\n deletePayment(payment['id'])\n });\n\n }}>\n \n \n \n }\n title={newPayment? t('new_payment') : `${t(\"has_paid\")} ${payment['quantity']}€`}\n subheader={payment['date']}\n />\n\n {!newPayment && \n {hasNeeds([NEEDS.paymentReceipts]) &&\n \n {\n loadingCtx.startLoading();\n PaymentsDataService\n .downloadSubresource(payment[\"id\"], 'receipt')\n .then(...errorHandler({snackbarSuccess:true}))\n .finally(() => {\n loadingCtx.stopLoading();\n })\n }}>\n \n \n }\n {hasNeeds([NEEDS.paymentReceipts, NEEDS.send_email]) &&\n \n sendReceipt(payment['id'])}>\n \n \n }\n \n \n \n }\n \n \n \n {payment === null\n ?\n (\n\n \n {\n [\"100%\", \"100%\", \"100%\"].map((value, idx) => {\n return (\n \n \n );\n })\n }\n \n )\n :\n (\n
\n \n\n \n \n { payment_methods.map(\n (method) => (\n {t(method)}\n )\n )\n }\n \n €,\n }}\n />\n \n \n\n \n \n \n\n\n \n \n {t(\"reset\")}\n \n {hasNeeds([NEEDS.patch]) && }\n \n \n )\n\n }\n
\n
\n
\n
\n );\n}\n","import serviceFactory from \"./service-factory\";\nimport {API_VERSION, BACKEND_URL} from \"../config\";\nimport {authHeader} from \"../_helpers/auth-header\";\nimport axios from \"axios\";\n\n\nexport const sendReceiptEmail = (id) => { // todo abstract\n return new Promise(function (resolve, reject) {\n axios({\n method: 'post',\n url: `${BACKEND_URL}/emails/v1/paymentReceipt/${id}`,\n headers: {\n ...{\n 'Content-Type': 'application/json',\n 'Cache-Control': 'no-cache'\n }, ...authHeader()\n }\n }).then(function (res) {\n resolve(res);\n }).catch(function (err) {\n reject(err);\n });\n });\n };\n\n","import {useTranslation} from \"react-i18next\";\nimport Box from \"@material-ui/core/Box\";\nimport Typography from \"@material-ui/core/Typography\";\nimport PropTypes from \"prop-types\";\nimport React, {useEffect, useState} from \"react\";\nimport {makeStyles} from \"@material-ui/core/styles\";\nimport PaymentsDataService from \"../_services/payments.service\";\nimport {useErrorHandler} from \"../_helpers/handle-response\";\nimport PaymentCard from \"./students.student.payments.payment.component\";\nimport {Skeleton} from \"@material-ui/lab\";\nimport Tooltip from \"@material-ui/core/Tooltip\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport AddCircleIcon from '@material-ui/icons/AddCircle';\nimport {IconButtonSkeleton} from \"../_skeletons/iconButton\";\nimport {useNeeds} from \"../_helpers/needs\";\n\nconst getDefaultValues = () => {\n const date = new Date();\n const dd = date.getDate();\n const mm = date.getMonth() + 1; //Month from 0 to 11\n const yyyy = date.getFullYear();\n return {'id': null, 'date': `${yyyy}-${mm<=9 ? '0' + mm : mm}-${dd <= 9 ? '0' + dd : dd}`, 'quantity': null, 'concept': null, 'method': null}\n}\nconst useStyles = makeStyles((theme) => ({\n\n actionIcon: {\n float: 'right'\n },\n newLine: {\n width: '100%',\n marginTop: theme.spacing(1),\n display: \"flex\",\n flexDirection: \"column\"\n }\n}));\n\nfunction Payments({ children, title, paymentIds, deletePaymentFromStudent, addPaymentId, student_id, ...other }) {\n const { t } = useTranslation();\n const classes = useStyles();\n const errorHandler = useErrorHandler();\n const loading = paymentIds === null;\n\n const [payments, setPayments] = useState([]);\n const [newPaymentCard, setNewPaymentCard] = useState(false);\n\n useEffect(()=>{\n setNewPaymentCard(false);\n }, [payments])\n\n const updatePayment = (id, body) => {\n setPayments(payments.map(payment => {\n if (payment.id !== id) return payment;\n return body;\n }))\n }\n const [hasNeeds, NEEDS] = useNeeds();\n\n const deletePayment = (id) => {\n PaymentsDataService.delete(id)\n .then(...errorHandler({snackbarSuccess:true}))\n .then(function (r) {\n deletePaymentFromStudent(id);\n });\n }\n\n useEffect(() => {\n if (paymentIds === null) return;\n\n if (paymentIds.length === 0){\n setPayments([]);\n } else {\n PaymentsDataService\n .getMany(paymentIds)\n .then(...errorHandler({})) // todo everywhere\n .then(function (res) {\n setPayments(res.map(res => res[\"data\"]).sort((p1, p2) => p1.date.localeCompare(p2.date)));\n });\n }\n }, [paymentIds])\n\n return (\n {// todo simplify everywhere\n } \n\n {loading?\n \n :\n hasNeeds([NEEDS.post]) && \n { setNewPaymentCard(true); }}>\n \n \n \n }\n\n
\n\n {\n payments && payments.map(payment =>\n ()\n )\n }\n\n {newPaymentCard &&\n {setNewPaymentCard(false)}}\n newPayment={true}\n student_id={student_id}\n addPaymentId={addPaymentId}/>\n }\n\n {loading &&\n // todo we can do better\n }\n\n {!loading && payments.length === 0 && !newPaymentCard &&\n {t(\"no_payments\")}\n }\n
\n
\n
\n );\n}\n\nPayments.propTypes = {\n children: PropTypes.node,\n index: PropTypes.any.isRequired,\n value: PropTypes.any.isRequired,\n};\n\nexport default Payments;","import serviceFactory from \"./service-factory\";\n\n\nexport default new (serviceFactory('schedules'))();\n\n","import React from \"react\";\n\nconst tabContext = React.createContext(\n {currentTab: null, goTo: (res) => {}}); // Create a context object\n\nexport {\n tabContext // Export it so it can be used by other Components\n};","import Box from \"@material-ui/core/Box\";\nimport React, {useEffect, useState} from \"react\";\nimport SchedulesDataService from \"../_services/schedules.service\";\nimport {makeStyles} from \"@material-ui/core/styles\";\nimport {useErrorHandler} from \"../_helpers/handle-response\";\nimport FullCalendar from \"@fullcalendar/react\";\nimport timeGridPlugin from '@fullcalendar/timegrid';\nimport styled from \"@emotion/styled\";\nimport {useTheme} from '@material-ui/core/styles';\nimport interactionPlugin from '@fullcalendar/interaction';\nimport Skeleton from \"@material-ui/lab/Skeleton\";\nimport {Dialog, DialogActions, DialogContent, DialogTitle, TextField} from \"@material-ui/core\";\nimport DialogContentText from \"@material-ui/core/DialogContentText\";\nimport Button from \"@material-ui/core/Button\";\nimport {useTranslation} from \"react-i18next\";\nimport {confirmContext} from \"../_context/confirm-context\";\nimport {tabContext} from \"../_context/tab-context\";\n\n\nexport const eventFromSchedule = (theme, schedule) => {\n return {\n daysOfWeek: [schedule['day_week']],\n title: schedule['display_name'],\n groupId: [schedule['id']],\n id: schedule['id'],\n startTime: schedule['start_time'],\n endTime: schedule['end_time'],\n color: schedule[\"is_base\"] ? theme.palette.secondary.main : theme.palette.secondary.light,\n textColor: schedule[\"is_base\"] ? theme.palette.secondary.contrastText : theme.palette.secondary.contrastText,\n extendedProps: {\n schedule: schedule\n },\n }\n}\n\nfunction evaluate(expression, ...args){\n console.log(typeof expression);\n if (typeof expression === 'function'){\n return expression(...args);\n }\n\n return expression;\n}\n\nfunction Scheduler({snapDuration = '00:15',\n allowView=false, viewUrl=null,\n allowDelete=false,\n selectable=false,\n viewStudent=false, deleteCustom=false,\n scheduleIds,\n setScheduleIds,\n onEventClick, onEventSelected,\n onEventChange, editable=false, ...other}) {\n const errorHandler = useErrorHandler();\n const theme = useTheme();\n const calendarRef = React.createRef();\n const StyleWrapper = styled.div`\n .fc-button, .fc-button.fc-button-primary {\n background: ${theme.palette.primary.main};\n color: ${theme.palette.primary.contrastText};\n border-color: ${theme.palette.primary.main};\n background-image: none;\n }\n .fc-button:enabled:hover {\n background: ${theme.palette.primary.dark};\n color: ${theme.palette.primary.contrastText};\n border-color: ${theme.palette.primary.dark};\n background-image: none;\n }\n `\n\n const [schedules, setSchedules] = useState(null);\n\n\n const loading = scheduleIds === null;\n const {t} = useTranslation();\n // todo right click menu to delete\n\n\n useEffect(() => {\n if (scheduleIds === null) return;\n\n if (scheduleIds.length === 0) {\n setSchedules([]);\n } else {\n SchedulesDataService\n .getMany(scheduleIds)\n .then(...errorHandler({}))\n .then(function (res) {\n setSchedules(res.map(res => res[\"data\"]).map(schedule => {\n return eventFromSchedule(theme, schedule);\n }));\n });\n }\n }, [scheduleIds, theme]);\n\n const withScheduleInfo = (method, info) => {\n return method(info,\n info.event['start'].getDay(),\n info.event['start'].toLocaleTimeString('en-US', {hour12: false}),\n info.event['end'].toLocaleTimeString('en-US', {hour12: false}),\n info.event.extendedProps[\"schedule\"]);\n }\n const navigator = React.useContext(tabContext);\n\n const [currentSchedule, setCurrentSchedule] = React.useState({open: false, event: null, schedule: null})\n\n const handleClickOpen = (info) => {\n setCurrentSchedule({open: true, event: info.event, schedule: info.event.extendedProps['schedule']});\n };\n\n const handleClose = () => {\n setCurrentSchedule({open: false, event: null, schedule: null});\n };\n const handleView = () => {\n navigator.goTo(...evaluate(viewUrl, currentSchedule.schedule));\n handleClose();\n }\n const handleDelete = () => {\n SchedulesDataService\n .delete(currentSchedule.schedule.id)\n .then(...errorHandler({snackbarSuccess: true}))\n .then(function (res) {\n handleClose();\n setScheduleIds(scheduleIds.filter(id => id !== currentSchedule.schedule.id));\n setSchedules(schedules.filter(s => s.id !== currentSchedule.schedule.id));\n });\n }\n\n return (\n \n {loading ? \n :\n \n \n {currentSchedule.schedule? currentSchedule.schedule[\"display_name\"]: \"\"}\n \n \n\n \n {t(\"view\")}\n \n\n \n {t(\"delete\")}\n \n \n \n \n ', // >\n prevYear: '<<', // <<\n nextYear: '>>', // >>\n today: 'today',\n month: 'month',\n week: 'week',\n day: 'day'\n }}\n selectable={selectable}\n selectMirror={true}\n dayMaxEvents={true}\n weekends={true}\n snapDuration={snapDuration}\n events={schedules}\n eventAdd={function () {\n }}\n eventChange={function (clickInfo) {\n // const schedule = clickInfo.event.extendedProps[\"schedule\"];\n // if (schedule[\"is_base\"] === true) return enqueueSnackbar(t(\"cant_remove_schedule\"), {'variant': 'warning'});\n }}\n eventRemove={function () {\n }}\n select={function (selectInfo) {\n selectInfo.view.calendar.unselect();\n onEventSelected( selectInfo.start.getDay(),\n selectInfo.start.toLocaleTimeString('en-US', {hour12: false}),\n selectInfo.end.toLocaleTimeString('en-US', {hour12: false}),)\n }}\n eventContent={function () {\n }} // custom render function\n eventClick={(info) => {\n /* let calendarApi = calendarRef.current.getApi();\n console.log(calendarApi.getEventById(info.event.id).remove());\n setSchedules(schedules.filter(s=>s.id !== info.event.id));*/\n handleClickOpen(info);\n }}\n eventTimeFormat={{\n hour: '2-digit',\n minute: '2-digit',\n hour12: false\n }}\n eventResize={(info) => (withScheduleInfo(onEventChange, info))}\n eventDrop={(info) => (withScheduleInfo(onEventChange, info))}\n />\n \n \n }\n \n );\n}\n\nexport default Scheduler;","import {useTranslation} from \"react-i18next\";\nimport React from \"react\";\nimport SchedulesDataService from \"../_services/schedules.service\";\nimport {makeStyles, useTheme} from \"@material-ui/core/styles\";\nimport {useErrorHandler} from \"../_helpers/handle-response\";\nimport {useSnackbar} from \"notistack\";\nimport Scheduler, {eventFromSchedule} from \"./scheduler.component\";\nimport {confirmContext} from \"../_context/confirm-context\";\nconst useStyles = makeStyles((theme) => ({\n button: {\n margin: theme.spacing(1),\n },\n calendar: {\n margin: theme.spacing(2)\n }\n\n}));\n\n\nfunction Schedule({ title, scheduleIds, setScheduleIds, student_id, ...other }) {\n const classes = useStyles();\n const errorHandler = useErrorHandler();\n const theme = useTheme();\n\n return (\n
\n\n
\n );\n}\n\nexport default Schedule;","import serviceFactory from \"./service-factory\";\n\n\nexport default new (serviceFactory('students', 'courses'))();\n\n","import serviceFactory from \"./service-factory\";\n\n\nexport default new (serviceFactory('courses'))();\n\n","import React from 'react';\nimport {makeStyles} from '@material-ui/core/styles';\nimport Paper from '@material-ui/core/Paper';\nimport InputBase from '@material-ui/core/InputBase';\nimport IconButton from '@material-ui/core/IconButton';\nimport SearchIcon from '@material-ui/icons/Search';\nimport {useTranslation} from \"react-i18next\";\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n padding: '2px 4px',\n display: 'flex',\n alignItems: 'center',\n width: '100%',\n },\n input: {\n marginLeft: theme.spacing(1),\n flex: 1,\n },\n iconButton: {\n padding: 10,\n }\n}));\n\nexport default function SearchBar({label, searchTitle, onChange, onSearch}) {\n const classes = useStyles();\n\n const { t } = useTranslation();\n\n return (\n \n \n { if(e.key === 'Enter'){\n onSearch();\n e.preventDefault();\n } }}\n\n />\n \n \n \n \n );\n}","import React from \"react\";\n\nconst themeContext = React.createContext({theme: null, switchTheme: () => {}, label: null}); // Create a context object\n\nexport {\n themeContext // Export it so it can be used by other Components\n};","import React from 'react';\nimport {makeStyles} from '@material-ui/core/styles';\nimport {useTranslation} from \"react-i18next\";\nimport {Chip, CircularProgress} from \"@material-ui/core\";\nimport Avatar from \"@material-ui/core/Avatar\";\nimport Tooltip from \"@material-ui/core/Tooltip\";\nimport {useErrorHandler} from \"../_helpers/handle-response\";\nimport {themeContext} from \"../_context/theme-context\";\nimport {loadingContext} from \"../_context/loading-context\";\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n padding: '2px 4px',\n display: 'flex',\n alignItems: 'center',\n flexWrap: 'wrap'\n },\n}));\n\nexport default function ExportSearchChip({searchTermField=\"full_name\", searchTerm=null, page=null, dataService, exportAll=false, getFilters=null}) {\n const classes = useStyles();\n\n const {t} = useTranslation();\n const errorHandler = useErrorHandler();\n const loadingCtx = React.useContext(loadingContext);\n\n return (\n \n\n csv}\n label={t(exportAll ? \"export_all\" : \"export\")}\n onClick={() => {\n if (loadingCtx.loading) return;\n\n loadingCtx.startLoading();\n dataService\n .downloadCsv(searchTermField, searchTerm,\n exportAll ? \"*\" : page,\n getFilters === null ? {} : getFilters(),\n exportAll)\n .then(...errorHandler({}))\n .finally(() => {\n loadingCtx.stopLoading();\n })\n }}/>\n \n\n );\n}","import React, {useEffect, useState} from \"react\";\nimport Pagination from '@material-ui/lab/Pagination';\nimport ListItem from \"@material-ui/core/ListItem\";\nimport List from \"@material-ui/core/List\";\nimport ListItemAvatar from \"@material-ui/core/ListItemAvatar\";\nimport Avatar from \"@material-ui/core/Avatar\";\nimport ListItemText from \"@material-ui/core/ListItemText\";\nimport makeStyles from \"@material-ui/core/styles/makeStyles\";\nimport Divider from \"@material-ui/core/Divider\";\nimport SearchBar from './searchbar.component'\nimport Box from \"@material-ui/core/Box\";\nimport {useTranslation} from \"react-i18next\";\nimport {Accordion, AccordionDetails, AccordionSummary, Chip, ListItemSecondaryAction} from \"@material-ui/core\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport GetAppIcon from '@material-ui/icons/GetApp';\nimport Tooltip from \"@material-ui/core/Tooltip\";\nimport {useErrorHandler} from \"../_helpers/handle-response\";\nimport ExpandMoreIcon from \"@material-ui/icons/ExpandMore\";\nimport Typography from \"@material-ui/core/Typography\";\nimport ExportSearchChip from \"./ExportSearchChip.component\";\nimport {useNeeds} from \"../_helpers/needs\";\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n flex: 1,\n overflow: 'auto',\n display: \"flex\",\n flexDirection: \"column\"\n },\n list: {\n overflow: \"auto\",\n display: \"flex\",\n flexDirection: \"column\",\n flex: 1,\n minHeight: '150px'\n },\n searchAndFilters: {\n display: \"flex\",\n flexDirection: \"column\",\n },\n pagination: {\n margin: theme.spacing(3)\n },\n chip: {\n margin: theme.spacing(2)\n },\n avatar: {},\n selectedAvatar: {\n backgroundColor: theme.palette.primary.dark\n },\n chips: {\n flexWrap: 'wrap',\n '& > *': {\n margin: theme.spacing(0.5),\n },\n heading: {\n fontSize: theme.typography.pxToRem(15),\n fontWeight: theme.typography.fontWeightRegular,\n },\n },\n noResults: {\n textAlign: 'center'\n }\n}));\n\nconst ItemsList = ({setCurrentItemId=() => {}, auxFields = [], displayText = null, onItemClick = () => {}, parent_id=null, secondaryDisplayNameField=null,\n secondaryAction=null, secondaryActionNeeds=[], secondaryActionTooltip=null, secondaryActionIcon=null, secondaryActionCallable=null,\n withAvatar=true, withFiltersBox = true,\n chips=[], currentItemId = null, items, setItems, displayNameField=\"full_name\",\n usableFilters=[], defaultSearchBy=\"full_name\", searchByOptions=[\"full_name\"],\n dataService, searchBarLabel, exportPage=true, exportAllPages=true}) => {\n \n \n const [searchTerm, setSearchTerm] = useState(\"\");\n const [filters, setFilters] = useState(usableFilters.reduce((map, f) => {\n map[f.name] = f.initialValue;\n return map;\n }, {})\n );\n const [searchBy, setSearchBy] = useState(defaultSearchBy);\n\n const {t} = useTranslation();\n\n const [page, setPage] = useState(1);\n const [count, setCount] = useState(0);\n const errorHandler = useErrorHandler();\n const [hasNeeds, NEEDS] = useNeeds();\n\n const classes = useStyles();\n\n const onChangeSearchTerm = (e) => {\n setSearchTerm(e.target.value);\n };\n\n const resetSearchBy = () => {\n setSearchBy(defaultSearchBy);\n }\n\n function getFilters(){\n return Object.fromEntries(Object.entries(filters).filter(([k,v]) => (v !== null)))\n }\n\n function search() {\n dataService\n .getAll({name: searchBy, value: searchTerm}, page, [...new Set(['id', displayNameField, secondaryDisplayNameField === null? 'id': secondaryDisplayNameField, ...auxFields])], getFilters(), parent_id)\n .then(...errorHandler({}))\n .then(function (res) {\n setItems(res[\"data\"]);\n setCount(res[\"_pagination\"][\"totalPages\"]);\n });\n }\n\n // we don't want the search to trigger for each searchTerm change\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useEffect(() => {\n if (page === 1) {\n search(); // no need to change page, since we are at page 1\n } else {\n setPage(1); // will trigger search due tot the effect below\n }\n }, [filters]); // todo\n\n useEffect(search, [page, searchBy, parent_id]);\n\n const handlePageChange = (event, value) => {\n setPage(value);\n };\n\n return (\n \n \n {\n if (page === 1){\n search();\n } else {\n setPage(1); // search will be triggered\n }\n\n }}\n />\n\n {withFiltersBox && \n }>\n {t(\"filters_actions\")}\n \n \n \n\n {exportPage && Array.isArray(items) && items.length > 0 && }\n {exportAllPages && Array.isArray(items) && items.length > 0 && }\n\n {chips.map((chip) => (\n chip\n ))}\n\n ·\n\n {searchByOptions.map(option => (\n \n {\n if (searchBy === option) {\n resetSearchBy();\n } else {\n setSearchBy(option);\n }\n }}/>\n \n ))}\n\n\n {usableFilters.map(f => (\n \n · {f['options'].map(option => (\n \n {\n setFilters({\n ...filters,\n [f.name]: (filters[f.name] === option.name) ? null : option.name\n })\n }}/>\n \n )\n )}\n\n ))\n }\n \n \n }\n\n\n \n \n \n \n \n {items && items.map((item) => (\n
\n {\n onItemClick(item['id']);\n setCurrentItemId(item['id']);\n }}>\n {withAvatar && \n {item[displayNameField].charAt(0).toUpperCase()}\n }\n \n\n {secondaryAction && hasNeeds(secondaryActionNeeds) &&\n \n \n {\n secondaryActionCallable(item['id']);\n }}>\n {secondaryActionIcon}\n \n \n }\n \n \n
\n ))}\n {\n (items.length === 0) && \n {t(\"no_results\") +\" 👀\"}\n \n }\n
\n
\n );\n};\n\nexport default ItemsList;\n","import React from \"react\";\nimport {useTranslation} from \"react-i18next\";\nimport {useErrorHandler} from \"../_helpers/handle-response\";\nimport ItemsList from \"./items_list.component\";\nimport DeleteIcon from \"@material-ui/icons/Delete\";\nimport {NEEDS} from \"../_helpers/needs\";\nimport {confirmContext} from \"../_context/confirm-context\";\n\n\nconst ItemsListSecondary = ({dataService, displayText, auxFields, parent_id, deleteTooltip, delete_message, onItemDeleted = () => {}, ...props}) => {\n const errorHandler = useErrorHandler();\n const confirm = React.useContext(confirmContext);\n const {t} = useTranslation();\n\n return {\n confirm.confirm(delete_message, \"not_undone\", () => {\n dataService\n .delete(parent_id, id)\n .then(...errorHandler({snackbarSuccess:true}))\n .then(function (r) {\n onItemDeleted(id);\n });\n });\n }}\n parent_id={parent_id}\n displayText={displayText}\n auxFields={auxFields}\n secondaryActionTooltip={deleteTooltip}\n secondaryActionNeeds={[NEEDS.delete]}\n secondaryActionIcon={}\n dataService={dataService}\n {...props}\n />\n};\n\nexport default ItemsListSecondary;\n","import React, {useState} from \"react\";\nimport {useErrorHandler} from \"../_helpers/handle-response\";\nimport ItemsList from \"./items_list.component\";\nimport {confirmContext} from \"../_context/confirm-context\";\n\n\nconst ItemsListTerciary = ({dataService, dataServiceSR, add_message, parent_id, onAdded = () => {}, ...props}) => {\n const errorHandler = useErrorHandler();\n const confirm = React.useContext(confirmContext);\n const [items, setItems] = useState([]);\n return {\n confirm.confirm(add_message,null, () => {\n if (dataServiceSR === null) return onAdded(id, null);\n dataServiceSR\n .postWithId(parent_id, id)\n .then(...errorHandler({snackbarSuccess: true}))\n .then((newItem) => {\n onAdded(id, newItem[\"data\"]);\n })\n });\n\n }\n }\n {...props}\n />\n};\n\nexport default ItemsListTerciary;\n","import {useTranslation} from \"react-i18next\";\nimport Box from \"@material-ui/core/Box\";\nimport Typography from \"@material-ui/core/Typography\";\nimport React, {useState} from \"react\";\nimport {makeStyles} from \"@material-ui/core/styles\";\nimport Tooltip from \"@material-ui/core/Tooltip\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport AddCircleIcon from '@material-ui/icons/AddCircle';\nimport {\n AppBar,\n Dialog,\n Slide\n} from \"@material-ui/core\";\nimport Toolbar from \"@material-ui/core/Toolbar\";\nimport Button from \"@material-ui/core/Button\";\nimport {IconButtonSkeleton} from \"../_skeletons/iconButton\";\nimport {useNeeds} from \"../_helpers/needs\";\nimport ItemsListSecondary from \"./items_list_secondary.component\";\nimport ItemsListTerciary from \"./items_list_terciary.component\";\nimport Skeleton from \"@material-ui/lab/Skeleton\";\nimport {tabContext} from \"../_context/tab-context\";\n\nconst Transition = React.forwardRef(function Transition(props, ref) {\n return ;\n});\n\n\nconst useStyles = makeStyles((theme) => ({\n list: {\n overflow: \"auto\",\n display: \"flex\",\n flexDirection: \"column\",\n flex: 1\n },\n box: {\n display: \"flex\",\n flexDirection: \"column\",\n },\n pagination: {\n margin: '30px'\n },\n appBar: {\n position: 'relative',\n },\n newLine: {\n width: '100%',\n marginTop: theme.spacing(1),\n display: \"flex\",\n flexDirection: \"column\"\n },\n title: {\n marginLeft: theme.spacing(2),\n flex: 1,\n }, actionIcon: {\n float: 'right'\n }\n}));\n\n\nfunction AddDeleteSubresource({ defaultSearchBy, withFiltersBox=false, displayText, auxFields, parentItemDataService, itemDataService, add_message_confirm, parent_id, secondaryDisplayNameField, searchByOptions, resourceName, displayNameField, add_message,onSubresourceAdded, onSubresourceDeleted, usableFilters, ...other}) {\n const { t } = useTranslation();\n const classes = useStyles();\n\n const [addDialogOpen, setAddDialogOpen] = useState(false);\n const handleAddDialogClose = () => {\n setAddDialogOpen(false);\n };\n const handleAddDialogOpen = () => {\n setAddDialogOpen(true);\n }\n\n const [hasNeeds, NEEDS] = useNeeds();\n const loading = parent_id === null;\n const [items, setItems] = useState([]);\nconst navigator = React.useContext(tabContext);\n\n return (\n\n {// todo simplify everywhere\n } \n\n \n \n \n \n {t(add_message)}\n \n \n \n \n \n {\n setItems([...items, body]);\n onSubresourceAdded(id);\n handleAddDialogClose();\n }}\n />\n \n \n\n {loading?\n \n :\n hasNeeds([NEEDS.post]) && \n \n \n \n \n }\n\n\n
\n {loading?\n \n :\n {\n setItems(items.filter(x => x.id !== id));\n onSubresourceDeleted(id);\n }}\n onItemClick={(id) => {\n navigator.goTo(resourceName, id);\n }}\n />}\n
\n
\n
\n\n );\n}\n\nexport default AddDeleteSubresource;\n","import React from \"react\";\n\nexport function a11yProps(index) {\n return {\n id: `full-width-tab-${index}`,\n 'aria-controls': `full-width-tabpanel-${index}`,\n };\n}\n\nfunction TabFrame({ value, index, children, ...other }) {\n return (\n