From b5aaa08d100eaf825d589e7dc0e68a23a27753f1 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Thu, 10 Jun 2021 14:58:27 +0200 Subject: [PATCH] Mobile 1.4 --- static/mobile/asset-manifest.json | 6 +++--- static/mobile/index.html | 2 +- .../js/{main.96d680e0.chunk.js => main.81258512.chunk.js} | 4 ++-- static/mobile/static/js/main.81258512.chunk.js.map | 1 + static/mobile/static/js/main.96d680e0.chunk.js.map | 1 - 5 files changed, 7 insertions(+), 7 deletions(-) rename static/mobile/static/js/{main.96d680e0.chunk.js => main.81258512.chunk.js} (69%) create mode 100644 static/mobile/static/js/main.81258512.chunk.js.map delete mode 100644 static/mobile/static/js/main.96d680e0.chunk.js.map diff --git a/static/mobile/asset-manifest.json b/static/mobile/asset-manifest.json index 562c2d639..a0ade1fc6 100644 --- a/static/mobile/asset-manifest.json +++ b/static/mobile/asset-manifest.json @@ -1,8 +1,8 @@ { "files": { "main.css": "./static/css/main.6be5a531.chunk.css", - "main.js": "./static/js/main.96d680e0.chunk.js", - "main.js.map": "./static/js/main.96d680e0.chunk.js.map", + "main.js": "./static/js/main.81258512.chunk.js", + "main.js.map": "./static/js/main.81258512.chunk.js.map", "runtime-main.js": "./static/js/runtime-main.ca83272f.js", "runtime-main.js.map": "./static/js/runtime-main.ca83272f.js.map", "static/css/2.4c97ca4f.chunk.css": "./static/css/2.4c97ca4f.chunk.css", @@ -20,6 +20,6 @@ "static/css/2.4c97ca4f.chunk.css", "static/js/2.64a47d60.chunk.js", "static/css/main.6be5a531.chunk.css", - "static/js/main.96d680e0.chunk.js" + "static/js/main.81258512.chunk.js" ] } \ No newline at end of file diff --git a/static/mobile/index.html b/static/mobile/index.html index fddcbee49..ec080d111 100644 --- a/static/mobile/index.html +++ b/static/mobile/index.html @@ -1 +1 @@ -Scodoc Mobile
\ No newline at end of file +Scodoc Mobile
\ No newline at end of file diff --git a/static/mobile/static/js/main.96d680e0.chunk.js b/static/mobile/static/js/main.81258512.chunk.js similarity index 69% rename from static/mobile/static/js/main.96d680e0.chunk.js rename to static/mobile/static/js/main.81258512.chunk.js index eb5c22ca7..1a9fe147f 100644 --- a/static/mobile/static/js/main.96d680e0.chunk.js +++ b/static/mobile/static/js/main.81258512.chunk.js @@ -1,2 +1,2 @@ -(this.webpackJsonpscodocmobile=this.webpackJsonpscodocmobile||[]).push([[0],{101:function(e,t,s){"use strict";s.r(t);var a=s(0),n=s(17),i=s.n(n),c=s(16),r=function(e){e&&e instanceof Function&&s.e(3).then(s.bind(null,118)).then((function(t){var s=t.getCLS,a=t.getFID,n=t.getFCP,i=t.getLCP,c=t.getTTFB;s(e),a(e),n(e),i(e),c(e)}))},o=s(14),d=s(7),l=s(8),h=s(21),j=s(10),u=s(9),b=(s(29),s(114)),p=s(106),m=s(77),O=s(72),f=s(1),x=function(e){Object(j.a)(s,e);var t=Object(u.a)(s);function s(e){var a;return Object(d.a)(this,s),(a=t.call(this,e)).state={logout:!1},a}return Object(l.a)(s,[{key:"logout",value:function(){var e=this,t=window.$api_url;fetch(t+"acl_users/logout").then((function(t){e.setState({logout:!0})})).catch(console.log)}},{key:"render",value:function(){var e=this;return Object(f.jsxs)(b.a,{bg:"light",expand:"sm",children:[Object(f.jsxs)(p.a,{children:[Object(f.jsxs)(b.a.Brand,{href:window.$api_url+"static/mobile/",children:[Object(f.jsx)("img",{alt:"ScodocLogo",src:"/ScoDoc/static/icons/scologo_img.png",width:"20",height:"30",className:"d-inline-block align-top"})," ","ScoDoc"]}),Object(f.jsx)(b.a.Toggle,{"aria-controls":"basic-navbar-nav"}),Object(f.jsx)(b.a.Collapse,{id:"basic-navbar-nav",children:Object(f.jsxs)(m.a,{className:"ml-auto",children:[Object(f.jsx)(m.a.Link,{href:"/ScoDoc",children:"Version Desktop"}),Object(f.jsx)(O.a,{variant:"primary",onClick:function(){e.logout()},children:"D\xe9connexion"})]})})]}),!0===this.state.logout&&Object(f.jsx)(o.a,{push:!0,to:"/"})]})}}]),s}(a.Component),v=s(73),g=s(107);function w(e){return fetch(e,{method:"GET",verify:!1,credentials:"include"})}function y(e){return w(e).then((function(e){return e.json().then((function(e){return{data:e}})).then((function(e){return e}))}))}function S(e,t){return fetch(e,{method:"POST",verify:!1,credentials:"include",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:t})}var C=function(e){Object(j.a)(s,e);var t=Object(u.a)(s);function s(e){var a;return Object(d.a)(this,s),(a=t.call(this,e)).state={students:[],search_status:0},a.handleChangeSearch=a.handleChangeSearch.bind(Object(h.a)(a)),a.searchStudent=a.searchStudent.bind(Object(h.a)(a)),a}return Object(l.a)(s,[{key:"handleChangeSearch",value:function(e){this.setState({search:e.target.value})}},{key:"searchStudent",value:function(e){var t=this,s=window.location.href.split("/")[7];y(window.$api_url+s+"/Scolarite/Notes/search_etud_by_name?term="+e+"&format=json").then((function(e){t.setState({students:e.data}),0===t.state.students.length?t.setState({search_status:1,toast:!0}):t.setState({search_status:2,toast:!1})})),this.setState({searched:!0})}},{key:"result",value:function(){return!0===this.state.toast?Object(f.jsx)("div",{id:"wrapDept",children:"Aucun \xe9tudiant trouv\xe9"}):2===this.state.search_status?Object(f.jsx)(v.a,{children:this.state.students.map((function(e){return Object(f.jsx)(g.a,{id:"wrapDept",children:Object(f.jsx)(c.c,{to:"/".concat(window.location.href.split("/")[7],"/Scolarite/Etudiant/").concat(e.value),children:Object(f.jsx)("span",{children:e.label})})})}))}):void 0}},{key:"render",value:function(){var e=this;return Object(f.jsxs)("div",{className:"wrapper",children:[Object(f.jsxs)("div",{className:"input-group",children:[Object(f.jsx)("input",{type:"text",id:"search",className:"form-control",onChange:this.handleChangeSearch}),Object(f.jsx)("div",{className:"input-group-append",children:Object(f.jsx)("button",{type:"button",className:"btn waves-effect waves-light btn-primary",onClick:function(){e.searchStudent(e.state.search)},children:"Rechercher"})})]}),this.result()]})}}]),s}(a.Component),k=s(115),D=s(116),_=function(e){Object(j.a)(s,e);var t=Object(u.a)(s);function s(e){var a;return Object(d.a)(this,s),(a=t.call(this,e)).dismissToast=function(){return a.setState({toast:!1})},a.state={semestres:[],students:[],toast:!1},a.dismissToast=a.dismissToast.bind(Object(h.a)(a)),a}return Object(l.a)(s,[{key:"componentWillMount",value:function(){this.getData()}},{key:"getData",value:function(){var e=this,t=window.location.href.split("/")[7];y(window.$api_url+t+"/Scolarite/Notes/formsemestre_list?format=json").then((function(t){e.setState({semestres:t.data})}))}},{key:"render",value:function(){return Object(f.jsxs)("div",{children:[Object(f.jsx)(x,{}),Object(f.jsx)("section",{children:Object(f.jsx)("h1",{id:"pageTitle",children:"Scolarit\xe9"})}),Object(f.jsxs)(k.a,{defaultActiveKey:"0",children:[Object(f.jsxs)(D.a,{children:[Object(f.jsx)(D.a.Header,{children:Object(f.jsx)(k.a.Toggle,{as:O.a,variant:"link",eventKey:"0",children:"Semestres en cours"})}),Object(f.jsx)(k.a.Collapse,{eventKey:"0",children:Object(f.jsx)(D.a.Body,{children:Object(f.jsx)("div",{className:"container",children:Object(f.jsx)("div",{className:"row",children:this.state.semestres.map((function(e,t){if("1"===e.etat)return Object(f.jsx)("div",{className:"col-sm",id:"wrapDept",children:Object(f.jsxs)(c.c,{to:"/".concat(window.location.href.split("/")[7],"/Scolarite/").concat(e.formsemestre_id,"/GestionSem"),children:[Object(f.jsxs)("h4",{children:[e.titre," [",e.modalite,"]"]}),Object(f.jsxs)("p",{children:["Semestre ",e.semestre_id," - Ann\xe9e ",e.anneescolaire," [",e.date_debut," - ",e.date_fin,"]"]})]})},t)}))})})})})]}),Object(f.jsxs)(D.a,{children:[Object(f.jsx)(D.a.Header,{children:Object(f.jsx)(k.a.Toggle,{as:O.a,variant:"link",eventKey:"1",children:"Semestres pass\xe9s"})}),Object(f.jsx)(k.a.Collapse,{eventKey:"1",children:Object(f.jsx)(D.a.Body,{children:this.state.semestres.map((function(e,t){if("1"!==e.etat)return Object(f.jsx)("div",{className:"col-12",id:"wrapDept",children:Object(f.jsxs)(c.c,{to:"/".concat(window.location.href.split("/")[7],"/Scolarite/").concat(e.formsemestre_id,"/GestionSem"),children:[Object(f.jsxs)("h3",{children:[e.titre," [",e.modalite,"]"]}),Object(f.jsxs)("p",{children:["Semestre ",e.semestre_id," - Ann\xe9e ",e.anneescolaire," [",e.date_debut," - ",e.date_fin,"]"]})]})},t)}))})})]}),Object(f.jsxs)(D.a,{children:[Object(f.jsx)(D.a.Header,{children:Object(f.jsx)(k.a.Toggle,{as:O.a,variant:"link",eventKey:"2",children:"Recherche \xe9tudiant"})}),Object(f.jsx)(k.a.Collapse,{eventKey:"2",children:Object(f.jsx)(D.a.Body,{children:Object(f.jsx)(C,{})})})]})]})]})}}]),s}(a.Component),N=s(74),M=function(e){Object(j.a)(s,e);var t=Object(u.a)(s);function s(e){var a;return Object(d.a)(this,s),(a=t.call(this,e)).state={depts:[]},a}return Object(l.a)(s,[{key:"componentWillMount",value:function(){this.getData()}},{key:"getData",value:function(){var e=this;y(window.$api_url+"list_depts?format=json").then((function(t){e.setState({depts:t.data})}))}},{key:"render",value:function(){return Object(f.jsxs)("div",{className:"wrapper",children:[Object(f.jsx)("h1",{id:"pageTitle",children:"Choix du d\xe9partement"}),Object(f.jsx)("div",{className:"container",children:Object(f.jsx)("div",{className:"row",children:this.state.depts.map((function(e,t){return Object(f.jsx)("div",{className:"col-sm",id:"wrapDept",children:Object(f.jsxs)(c.c,{to:"/".concat(e,"/Scolarite"),children:["D\xe9partement ",e]})},t)}))})})]})}}]),s}(a.Component),F=function(e){Object(j.a)(s,e);var t=Object(u.a)(s);function s(e){var a;return Object(d.a)(this,s),(a=t.call(this,e)).state={login:"",pass:"",status:0},a.handleChangeLogin=a.handleChangeLogin.bind(Object(h.a)(a)),a.handleChangePass=a.handleChangePass.bind(Object(h.a)(a)),a.checkCredentials=a.checkCredentials.bind(Object(h.a)(a)),a}return Object(l.a)(s,[{key:"handleChangeLogin",value:function(e){this.setState({login:e.target.value})}},{key:"handleChangePass",value:function(e){this.setState({pass:e.target.value})}},{key:"checkCredentials",value:function(e){var t=this;e.preventDefault();var s=this.state.login,a=this.state.pass;(function(e,t,s){return fetch(e,{method:"GET",verify:!1,credentials:"include",headers:{"Content-Type":"application/x-www-form-urlencoded",Authorization:"Basic "+btoa(t+":"+s)}})})(window.$api_url,s,a).then((function(e){t.setState({status:e.status})})).catch(console.log)}},{key:"render",value:function(){return Object(f.jsxs)("div",{children:[!N.isMobile&&Object(f.jsx)("span",{}),0!==this.state.status&&200!==this.state.status&&Object(f.jsx)("div",{className:"wrapper",children:Object(f.jsx)("div",{id:"errorMsg",children:Object(f.jsxs)("h2",{id:"loginTitle",children:["\u26a0\ufe0f"," Login ou mot de passe incorrect"]})})}),""===document.cookie&&Object(f.jsx)("div",{className:"wrapper",children:Object(f.jsxs)("div",{id:"formContent",children:[Object(f.jsx)("h2",{id:"loginTitle",children:"Connexion a ScoDoc"}),Object(f.jsxs)("form",{children:[Object(f.jsx)("input",{type:"text",id:"login",placeholder:"Identifiant",onChange:this.handleChangeLogin}),Object(f.jsx)("input",{type:"password",id:"password",placeholder:"Mot de passe",onChange:this.handleChangePass}),Object(f.jsx)("button",{type:"submit",value:"Log In",onClick:this.checkCredentials,children:"Log in"})]})]})}),Object(f.jsxs)("div",{children:[""!==document.cookie&&Object(f.jsx)(x,{}),""!==document.cookie&&Object(f.jsx)(M,{})]})]})}}]),s}(a.Component),T=s(117),A=s(110),I=s(108),L=function(e){Object(j.a)(s,e);var t=Object(u.a)(s);function s(e){var a;return Object(d.a)(this,s),(a=t.call(this,e)).state={semestre:{},resp:[],loading:!0},a}return Object(l.a)(s,[{key:"componentWillMount",value:function(){this.setState({loading:!0}),this.getData()}},{key:"getData",value:function(){var e=this,t=window.location.href.split("/")[7],s=window.location.href.split("/")[9],a=window.$api_url;y(a+t+"/Scolarite/Notes/formsemestre_list?format=json&formsemestre_id="+s).then((function(s){e.setState({semestre:s.data[0],resp_l:s.data[0].responsables}),s.data[0].responsables.map((function(s){return y(a+t+"/Scolarite/Users/user_info?format=json&user_name="+s).then((function(t){var s=e.state.resp.concat(t.data.nomplogin);e.setState({resp:s,loading:!1})})).catch((function(t){e.setState({resp:e.state.resp_l,loading:!1})}))}))}))}},{key:"render",value:function(){var e=this;return Object(f.jsx)("div",{className:"wrapper",children:!1===this.state.loading?Object(f.jsxs)("h1",{id:"pageTitle",children:[this.state.semestre.titre,Object(f.jsx)("br",{}),"Semestre ",this.state.semestre.semestre_id," en ",this.state.semestre.modalite,Object(f.jsx)("br",{}),1===this.state.resp.length?"Responsable: (":"Responsables (",this.state.resp.map((function(t,s){return s!==e.state.resp.length-1?t+", ":t+")"}))]}):Object(f.jsx)(I.a,{animation:"border"})})}}]),s}(a.Component),P=s(67),E=s(112),B=s(113),G=function(e){Object(j.a)(s,e);var t=Object(u.a)(s);function s(e){var a;return Object(d.a)(this,s),(a=t.call(this,e)).openModal=function(){return a.setState({isOpen:!0})},a.closeModal=function(){return a.setState({isOpen:!1})},a.onFormSubmit=function(e){e.preventDefault();var t=new FormData(e.target),s=Object.fromEntries(t.entries()),n="etudid="+a.state.etudid+"&datedebut=";if(s.hasOwnProperty("dateDebut")&&""!==s.dateDebut){var i=s.dateDebut.split("-");if(n+=i=i[2]+"/"+i[1]+"/"+i[0],s.hasOwnProperty("dateFin")&&""!==s.dateFin){var c=s.dateFin.split("-");n+="&datefin="+(c=c[2]+"/"+c[1]+"/"+c[0])}else n+="&datefin="+i;s.hasOwnProperty("duree")&&(n+="&demijournee="+s.duree),s.hasOwnProperty("estjust")&&s.hasOwnProperty("motif")&&""!==s.motif&&(n+="&estjust=True&description="+s.motif),a.postData(n)}else a.setState({error:!0})},a.state={isOpen:!1,form:{},error:!1,etudid:""},a}return Object(l.a)(s,[{key:"componentDidUpdate",value:function(e){e.open!==this.props.open&&(this.setState({etudid:this.props.etudid}),!0===this.props.open&&this.setState({isOpen:!0}))}},{key:"postData",value:function(e){var t=this,s=window.location.href.split("/")[7];S(window.$api_url+s+"/Scolarite/Absences/doSignaleAbsence",e).then((function(e){200===e.status&&t.closeModal()}))}},{key:"render",value:function(){var e=this;return Object(f.jsx)(f.Fragment,{children:Object(f.jsxs)(E.a,{show:this.state.isOpen,onHide:this.closeModal,children:[Object(f.jsx)(E.a.Header,{closeButton:!0,children:Object(f.jsx)(E.a.Title,{children:"Saisie d'absence"})}),Object(f.jsxs)(E.a.Body,{children:[this.state.error&&Object(f.jsx)("span",{children:"Erreur: La date de d\xe9but ne doit pas \xeatre vide"}),Object(f.jsxs)(B.a,{onSubmit:this.onFormSubmit,children:[Object(f.jsxs)(B.a.Row,{children:[Object(f.jsxs)(B.a.Group,{as:v.a,ControlId:"dateDebut",children:[Object(f.jsx)(B.a.Label,{children:"Date d\xe9but"}),Object(f.jsx)(B.a.Control,{type:"date",name:"dateDebut"})]}),Object(f.jsxs)(B.a.Group,{as:v.a,ControlId:"dateFin",children:[Object(f.jsx)(B.a.Label,{children:"Date fin (Optionnel)"}),Object(f.jsx)(B.a.Control,{type:"date",name:"dateFin"})]})]}),Object(f.jsx)(B.a.Row,{children:Object(f.jsxs)(B.a.Group,{as:v.a,ControlId:"duree",children:[Object(f.jsx)(B.a.Check,{inline:!0,label:"Journ\xe9e(s)",name:"duree",type:"radio",value:"2"}),Object(f.jsx)(B.a.Check,{inline:!0,label:"Matin(s)",name:"duree",type:"radio",value:"1"}),Object(f.jsx)(B.a.Check,{inline:!0,label:"Apr\xe8s-midi",name:"duree",type:"radio",value:"0"})]})}),Object(f.jsx)(B.a.Row,{children:Object(f.jsx)(B.a.Group,{as:v.a,ControlId:"estjust",children:Object(f.jsx)(B.a.Check,{label:"Justifi\xe9e",name:"estjust",type:"checkbox",id:"estjust"})})}),Object(f.jsx)(B.a.Row,{children:Object(f.jsxs)(B.a.Group,{as:v.a,ControlId:"motif",children:[Object(f.jsx)(B.a.Label,{children:"Motif"}),Object(f.jsx)(B.a.Control,{as:"textarea",rows:3,name:"motif"})]})}),Object(f.jsx)(B.a.Row,{children:Object(f.jsx)(O.a,{type:"submit",variant:"primary",children:"Sauvegarder"})})]})]}),Object(f.jsx)(E.a.Footer,{children:Object(f.jsx)(O.a,{variant:"secondary",onClick:function(){e.closeModal()},children:"Fermer"})})]})})}}]),s}(a.Component),R=function(e){Object(j.a)(s,e);var t=Object(u.a)(s);function s(e){var a;return Object(d.a)(this,s),(a=t.call(this,e)).openModal=function(){return a.setState({isOpen:!0})},a.closeModal=function(){return a.setState({isOpen:!1})},a.state={isOpen:!1,etudid:""},a}return Object(l.a)(s,[{key:"componentDidUpdate",value:function(e){e.open!==this.props.open&&(this.setState({etudid:this.props.etudid}),!0===this.props.open&&this.setState({isOpen:!0}))}},{key:"postData",value:function(){var e=window.location.href.split("/")[7];S(window.$api_url+e+"/Scolarite/Absences/doAnnuleAbsence","datedebut="+this.props.data.date+"&datefin="+this.props.data.date+"&demijournee="+this.props.data.demijournee+"&etudid="+this.state.etudid),this.setState({isOpen:!1})}},{key:"render",value:function(){var e=this;return Object(f.jsx)(f.Fragment,{children:Object(f.jsxs)(E.a,{show:this.state.isOpen,onHide:this.closeModal,children:[Object(f.jsx)(E.a.Header,{closeButton:!0,children:Object(f.jsx)(E.a.Title,{children:"Suppression d'absence"})}),Object(f.jsx)(E.a.Body,{children:Object(f.jsx)("p",{children:"Etes-vous s\xfbr.e de vouloir supprimer cette absence ?"})}),Object(f.jsxs)(E.a.Footer,{children:[Object(f.jsx)(O.a,{variant:"danger",onClick:function(){e.postData()},children:"Supprimer"}),Object(f.jsx)(O.a,{variant:"secondary",onClick:function(){e.closeModal()},children:"Fermer"})]})]})})}}]),s}(a.Component),$=function(e){Object(j.a)(s,e);var t=Object(u.a)(s);function s(e){var a;return Object(d.a)(this,s),(a=t.call(this,e)).openModal=function(){return a.setState({isOpen:!0})},a.closeModal=function(){return a.setState({isOpen:!1})},a.onFormSubmit=function(e){e.preventDefault();var t=new FormData(e.target),s=Object.fromEntries(t.entries()),n="etudid="+a.state.etudid+"&datedebut="+a.props.data.date;if(s.hasOwnProperty("dateFin")&&""!==s.dateFin){var i=s.dateFin.split("-");n+="&datefin="+(i=i[2]+"/"+i[1]+"/"+i[0])}else n+="&datefin="+a.props.data.date;s.hasOwnProperty("duree")?n+="&demijournee="+s.duree:n+="&demijournee="+a.props.data.demijournee,s.hasOwnProperty("motif")&&""!==s.motif&&(n+="&description="+s.motif),a.postData(n)},a.state={isOpen:!1,etudid:"",date:""},a}return Object(l.a)(s,[{key:"componentDidUpdate",value:function(e){if(e.open!==this.props.open){this.setState({etudid:this.props.etudid}),!0===this.props.open&&this.setState({isOpen:!0});var t=this.props.data.date.split("/");t=(t=new Date(t[2]+"-"+t[1]+"-"+t[0])).toISOString().substr(0,10),this.setState({date:t})}}},{key:"postData",value:function(e){var t=window.location.href.split("/")[7];S(window.$api_url+t+"/Scolarite/Absences/doJustifAbsence",e),this.setState({isOpen:!1})}},{key:"render",value:function(){var e=this;return Object(f.jsx)(f.Fragment,{children:Object(f.jsxs)(E.a,{show:this.state.isOpen,onHide:this.closeModal,children:[Object(f.jsx)(E.a.Header,{closeButton:!0,children:Object(f.jsx)(E.a.Title,{children:"Suppression d'absence"})}),Object(f.jsx)(E.a.Body,{children:Object(f.jsxs)(B.a,{onSubmit:this.onFormSubmit,children:[Object(f.jsxs)(B.a.Row,{children:[Object(f.jsxs)(B.a.Group,{as:v.a,ControlId:"dateDebut",children:[Object(f.jsx)(B.a.Label,{children:"Date d\xe9but"}),Object(f.jsx)(B.a.Control,{type:"date",name:"dateDebut",defaultValue:this.state.date,readOnly:!0})]}),Object(f.jsxs)(B.a.Group,{as:v.a,ControlId:"dateFin",children:[Object(f.jsx)(B.a.Label,{children:"Date fin (Optionnel)"}),Object(f.jsx)(B.a.Control,{type:"date",name:"dateFin",defaultValue:this.state.date})]})]}),Object(f.jsx)(B.a.Row,{children:Object(f.jsxs)(B.a.Group,{as:v.a,ControlId:"duree",children:[Object(f.jsx)(B.a.Check,{inline:!0,label:"Journ\xe9e",name:"duree",type:"radio",value:"2"}),Object(f.jsx)(B.a.Check,{inline:!0,label:"Demie-journ\xe9e",name:"duree",type:"radio",defaultValue:this.props.data.demijournee,checked:!0})]})}),Object(f.jsx)(B.a.Row,{children:Object(f.jsxs)(B.a.Group,{as:v.a,ControlId:"motif",children:[Object(f.jsx)(B.a.Label,{children:"Motif"}),Object(f.jsx)(B.a.Control,{as:"textarea",rows:3,name:"motif"})]})}),Object(f.jsx)(B.a.Row,{children:Object(f.jsx)(O.a,{type:"submit",variant:"primary",children:"Sauvegarder"})})]})}),Object(f.jsx)(E.a.Footer,{children:Object(f.jsx)(O.a,{variant:"secondary",onClick:function(){e.closeModal()},children:"Fermer"})})]})})}}]),s}(a.Component),K=function(e){Object(j.a)(s,e);var t=Object(u.a)(s);function s(e){var a;return Object(d.a)(this,s),(a=t.call(this,e)).state={isOpen:!1,isDelOpen:!1,isJustOpen:!1,abs:[],absjust:[],data:{},loading:!1},a}return Object(l.a)(s,[{key:"componentDidUpdate",value:function(e){e.id!==this.props.id&&(this.setState({loading:!0}),this.getData())}},{key:"componentDidMount",value:function(){""!==this.props.id&&this.getData()}},{key:"openModal",value:function(e,t){var s=this;this.setState(Object(P.a)({},e,!0),(function(){return setTimeout((function(){s.setState(Object(P.a)({},e,!1))}),500)})),t&&this.setState({data:t})}},{key:"getData",value:function(){var e=this,t=window.location.href.split("/")[7],s=window.$api_url;""!==this.state.id&&(y(s+t+"/Scolarite/Absences/ListeAbsEtud?format=json&absjust_only=0&etudid="+this.props.id).then((function(t){return e.setState({abs:t.data})})),y(s+t+"/Scolarite/Absences/ListeAbsEtud?format=json&absjust_only=1&etudid="+this.props.id).then((function(t){return e.setState({absjust:t.data,loading:!1})})))}},{key:"render",value:function(){var e=this;return Object(f.jsxs)("div",{className:"wrapper",children:[""!==this.props.id&&Object(f.jsx)(G,{open:this.state.isOpen,etudid:this.props.id})," ",""!==this.props.id&&Object(f.jsx)(R,{open:this.state.isDelOpen,etudid:this.props.id,data:this.state.data})," ",""!==this.props.id&&Object(f.jsx)($,{open:this.state.isJustOpen,etudid:this.props.id,data:this.state.data}),Object(f.jsx)("h1",{id:"pageTitle",children:"Gestion des absences"}),""!==this.props.name&&Object(f.jsxs)("div",{className:"col-sm",id:"wrapDept",children:[Object(f.jsxs)("h4",{children:["Absences de ",this.props.name+" ",Object(f.jsx)(O.a,{variant:"primary",size:"sm",style:{"margin-right":"2px"},onClick:function(){return e.openModal("isOpen",null)},children:Object(f.jsx)("span",{children:"+"})}),Object(f.jsx)(O.a,{variant:"secondary",size:"sm",style:{"margin-left":"2px"},onClick:function(){return e.getData()},children:Object(f.jsx)("span",{children:"\ud83d\uddd8"})})]}),!0===this.state.loading&&Object(f.jsx)(I.a,{animation:"border"}),this.state.abs.length+this.state.absjust.length===0&&""!==this.props.name&&!1===this.state.loading&&Object(f.jsx)("h6",{children:"Aucune absence de l'\xe9tudiant.e"}),this.state.abs.map((function(t){return Object(f.jsxs)("div",{className:"col-sm",id:"wrapDept",children:[Object(f.jsxs)(v.a,{children:[Object(f.jsxs)("h5",{children:[t.datedmy," | ",t.matin]}),""!==t.motif&&Object(f.jsxs)("span",{children:["Motif: ",t.motif]})," ",""!==t.exams&&Object(f.jsxs)("span",{children:["Exam a rattraper: ",t.exams]})]}),Object(f.jsxs)(v.a,{children:[""===t.motif&&Object(f.jsx)(O.a,{variant:"primary",size:"sm",style:{"margin-right":"2px"},onClick:function(){return e.openModal("isJustOpen",{date:t.datedmy,demijournee:t.ampm})},children:"Justifier"}),Object(f.jsx)(O.a,{variant:"danger",size:"sm",style:{"margin-left":"2px"},onClick:function(){return e.openModal("isDelOpen",{date:t.datedmy,demijournee:t.ampm})},children:"Supprimer"})]})]})})),this.state.absjust.map((function(t){return Object(f.jsxs)("div",{className:"col-sm",id:"wrapDept",children:[Object(f.jsxs)(v.a,{children:[Object(f.jsxs)("h5",{children:[t.datedmy," | ",t.matin]}),""!==t.motif&&Object(f.jsxs)("span",{children:["Motif: ",t.motif]})," ",""!==t.exams&&Object(f.jsxs)("span",{children:["Exam a rattraper: ",t.exams]})]}),Object(f.jsx)(v.a,{children:Object(f.jsx)(O.a,{variant:"danger",size:"sm",style:{"margin-left":"2px"},onClick:function(){return e.openModal("isDelOpen",{date:t.datedmy,demijournee:t.ampm})},children:"Supprimer"})})]})}))]})]})}}]),s}(a.Component),z=s(75),J=function(e){Object(j.a)(s,e);var t=Object(u.a)(s);function s(e){var a;return Object(d.a)(this,s),(a=t.call(this,e)).state={students:[]},a}return Object(l.a)(s,[{key:"componentWillMount",value:function(){}},{key:"componentDidUpdate",value:function(e){var t=this;if(e!==this.props&&this.props.students.length){var s=this.props.students.map((function(e,s){return s%2===0?t.props.students.slice(s,s+2):null})).filter((function(e){return null!=e}));this.setState({students:s})}}},{key:"getData",value:function(){var e=this,t=window.location.href.split("/")[7],s=window.location.href.split("/")[9];y(window.$api_url+t+"/Scolarite/Notes/groups_view?with_codes=1&format=json&formsemestre_id="+s).then((function(t){var s=t.data.map((function(e,s){return s%2===0?t.data.slice(s,s+2):null})).filter((function(e){return null!=e}));e.setState({students:s})}))}},{key:"render",value:function(){return Object(f.jsxs)("div",{className:"wrapper",children:[Object(f.jsx)("h1",{id:"pageTitle",children:"Liste des \xe9tudiants"}),Object(f.jsx)("div",{className:"container",children:0!==this.state.students.length?this.state.students.map((function(e){return Object(f.jsx)("div",{className:"row justify-content-center",children:e.map((function(e,t){return Object(f.jsx)("div",{className:"col",id:"wrapDept",children:Object(f.jsxs)(c.c,{to:"/".concat(window.location.href.split("/")[7],"/Scolarite/Etudiant/").concat(e.etudid),children:[Object(f.jsx)(z.LazyLoadImage,{alt:"".concat(e.nom_disp," ").concat(e.prenom),src:"/ScoDoc/".concat(window.location.href.split("/")[7],"/Scolarite/Notes/get_photo_image?etudid=").concat(e.etudid),width:"102",height:"128",className:"d-inline-block align-top"})," ",Object(f.jsx)("br",{}),e.nom_disp," ",e.prenom]})},t)}))})})):Object(f.jsx)("div",{className:"row justify-content-center",children:Object(f.jsx)(I.a,{animation:"border"})})})]})}}]),s}(a.Component),H=s(109),U=s(111),V=function(e){Object(j.a)(s,e);var t=Object(u.a)(s);function s(e){var a;return Object(d.a)(this,s),(a=t.call(this,e)).state={bltn:{},datue:{},loaded:!1,loading:!1},a.getData=a.getData.bind(Object(h.a)(a)),a}return Object(l.a)(s,[{key:"getData",value:function(){var e=this,t=window.location.href.split("/")[7],s=window.location.href.split("/")[9];y(window.$api_url+t+"/Scolarite/Notes/formsemestre_bulletinetud?formsemestre_id="+s+"&etudid="+this.props.id+"&format=json").then((function(t){e.setState({bltn:t.data},(function(){var t={};for(var s in e.state.bltn.decision_ue)t[(s=e.state.bltn.decision_ue[s]).acronyme]=s.titre;e.setState({datue:t},(function(){e.setState({loaded:!0,loading:!1})}))}))}))}},{key:"getPdf",value:function(){w(window.$api_url+window.location.href.split("/")[7]+"/Scolarite/Notes/formsemestre_bulletinetud?formsemestre_id="+window.location.href.split("/")[9]+"&etudid="+this.props.id+"&format=pdf&version=selectedevals").then((function(e){return e.blob()})).then((function(e){var t=window.URL.createObjectURL(e);window.location.assign(t)}))}},{key:"componentDidUpdate",value:function(e){e.id!==this.props.id&&(this.setState({loading:!0}),this.getData())}},{key:"componentDidMount",value:function(){""!==this.props.id&&this.getData()}},{key:"render",value:function(){var e=this;return Object(f.jsxs)("div",{className:"wrapper",children:[Object(f.jsx)("div",{style:{"margin-bottom":"20px"},children:Object(f.jsx)("h1",{id:"pageTitle",children:"Bulletins de notes"})}),!0===this.state.loading&&!1===this.state.loaded&&Object(f.jsx)(I.a,{animation:"border"}),!0===this.state.loaded&&Object(f.jsxs)("div",{children:[Object(f.jsxs)(H.a,{responsive:"sm",children:[Object(f.jsxs)("thead",{children:[Object(f.jsxs)("tr",{children:[Object(f.jsx)("th",{colSpan:"3"}),Object(f.jsx)("th",{children:"Note/20"})]}),Object(f.jsxs)("tr",{className:"bigRow",children:[Object(f.jsx)("th",{colSpan:"3",children:"Moyenne g\xe9n\xe9rale"}),Object(f.jsx)("th",{children:Object(f.jsxs)(U.a,{children:[Object(f.jsx)(U.a.Toggle,{variant:"primary",size:"sm",id:"dropdown-basic",children:this.state.bltn.note.value}),Object(f.jsxs)(U.a.Menu,{children:[Object(f.jsxs)(U.a.Item,{href:"#",children:["Min: ",this.state.bltn.note.min]}),Object(f.jsxs)(U.a.Item,{href:"#",children:["Max: ",this.state.bltn.note.max]}),Object(f.jsxs)(U.a.Item,{href:"#",children:["Classement: ",this.state.bltn.rang.value,"/",this.state.bltn.rang.ninscrits]})]})]})})]})]}),this.state.bltn.ue.map((function(t){return Object(f.jsxs)("tbody",{children:[Object(f.jsxs)("tr",{className:"ueRow",children:[Object(f.jsxs)("td",{colSpan:"3",children:[t.acronyme," - ",e.state.datue[t.acronyme]]}),Object(f.jsx)("td",{children:Object(f.jsxs)(U.a,{children:[Object(f.jsx)(U.a.Toggle,{variant:"primary",size:"sm",id:t.acronyme,children:t.note.value}),Object(f.jsxs)(U.a.Menu,{children:[Object(f.jsxs)(U.a.Item,{href:"#",children:["Min: ",t.note.min]}),Object(f.jsxs)(U.a.Item,{href:"#",children:["Max: ",t.note.max]}),Object(f.jsxs)(U.a.Item,{href:"#",children:["Classement: ",t.rang,"/",e.state.bltn.rang.ninscrits]})]})]})})]}),t.module.map((function(t){return Object(f.jsxs)("tr",{children:[Object(f.jsx)("td",{colSpan:"3",children:t.titre.replace("'","'")}),Object(f.jsx)("td",{children:Object(f.jsxs)(U.a,{children:[Object(f.jsx)(U.a.Toggle,{variant:"primary",size:"sm",id:t.code,children:t.note.value}),Object(f.jsxs)(U.a.Menu,{children:[Object(f.jsxs)(U.a.Item,{href:"#",children:["Min: ",t.note.min]}),Object(f.jsxs)(U.a.Item,{href:"#",children:["Max: ",t.note.max]}),Object(f.jsxs)(U.a.Item,{href:"#",children:["Classement: ",t.rang.value,"/",e.state.bltn.rang.ninscrits]}),Object(f.jsxs)(U.a.Item,{href:"#",children:["Coefficient: ",t.coefficient]})]})]})})]})}))]})}))]}),Object(f.jsx)("div",{children:Object(f.jsx)(O.a,{className:"btn-primary",onClick:function(){e.getPdf()},children:"Version PDF"})})]})]})}}]),s}(a.Component),W=s(76),q=function(e){Object(j.a)(s,e);var t=Object(u.a)(s);function s(e){var a;return Object(d.a)(this,s),(a=t.call(this,e)).state={selectOptions:[],id:"",name:"",defaulttab:"Accueil",defaultsel:""},a}return Object(l.a)(s,[{key:"componentWillMount",value:function(){var e=this;this.getData(),this.props.location.tab&&this.setState({defaulttab:this.props.location.tab,defaultsel:this.props.location.etudid,id:this.props.location.etudid,name:this.state.selectOptions.find((function(t){return t.value===e.state.id}))})}},{key:"getData",value:function(){var e=this,t=window.location.href.split("/")[7],s=window.location.href.split("/")[9];y(window.$api_url+t+"/Scolarite/Notes/groups_view?with_codes=1&format=json&formsemestre_id="+s).then((function(t){e.setState({students:t.data}),t.data.map((function(t){var s=e.state.selectOptions.concat({label:t.nom_disp+" "+t.prenom,value:t.etudid});e.setState({selectOptions:s})}))}))}},{key:"handleSelectChange",value:function(e){this.setState({id:e.value,name:e.label})}},{key:"render",value:function(){var e=this;return Object(f.jsxs)("div",{children:[Object(f.jsx)(x,{}),Object(f.jsx)("div",{className:"container",children:Object(f.jsx)("div",{className:"row justify-content-center",children:Object(f.jsxs)("div",{className:"col-sm",id:"wrapDept",children:["Choix de l'\xe9tudiant",Object(f.jsx)(W.a,{className:"mySelect",options:this.state.selectOptions,onChange:this.handleSelectChange.bind(this),value:this.state.selectOptions.find((function(t){return t.value===e.state.defaultsel}))})]})})}),Object(f.jsx)("div",{children:Object(f.jsxs)(T.a,{defaultActiveKey:this.state.defaulttab,id:"controlled-tab-example",children:[Object(f.jsx)(A.a,{eventKey:"Accueil",title:"Accueil",children:Object(f.jsx)(L,{})}),Object(f.jsx)(A.a,{eventKey:"Absences",title:"Absences",children:Object(f.jsx)(K,{id:this.state.id,name:this.state.name})}),Object(f.jsx)(A.a,{eventKey:"Bulletin",title:"Bulletin",children:Object(f.jsx)(V,{id:this.state.id,name:this.state.name})}),Object(f.jsx)(A.a,{eventKey:"Etud",title:"Etudiants",children:Object(f.jsx)(J,{students:this.state.students})})]})})]})}}]),s}(a.Component),Q=function(e){Object(j.a)(s,e);var t=Object(u.a)(s);function s(e){var a;return Object(d.a)(this,s),(a=t.call(this,e)).state={etud:{},formation:[],semestres:[],loaded:!1},a}return Object(l.a)(s,[{key:"componentWillMount",value:function(){this.getData()}},{key:"getData",value:function(){var e=this,t=window.location.href.split("/")[7],s=window.location.href.split("/")[10],a=window.$api_url;y(a+t+"/Scolarite/Notes/etud_info?format=json&etudid="+s).then((function(s){e.setState({etud:s.data,formation:s.data.insemestre}),s.data.insemestre.map((function(s){y(a+t+"/Scolarite/Notes/formsemestre_list?format=json&formsemestre_id="+s.formsemestre_id).then((function(t){var s=e.state.semestres.concat(t.data[0]);e.setState({semestres:s,loaded:!0})}))}))}))}},{key:"render",value:function(){var e=this;return Object(f.jsxs)("div",{children:[Object(f.jsx)(x,{}),Object(f.jsx)("div",{className:"wrapper",children:Object(f.jsxs)("div",{id:"wrapDept",children:[Object(f.jsx)("h1",{children:this.state.etud.nomprenom}),Object(f.jsx)("img",{alt:"".concat(this.state.etud.nomprenom),src:"/ScoDoc/".concat(window.location.href.split("/")[7],"/Scolarite/Notes/").concat(this.state.etud.photo_url),width:"102",height:"128",className:"d-inline-block align-top"})," ",Object(f.jsxs)("div",{id:"wrapDept",className:"col-sm",children:[Object(f.jsx)("h3",{children:"Informations personnelles"}),""!==this.state.etud.telephone||""!==this.state.etud.telephonemobile||""!==this.state.etud.email||""!==this.state.etud.emailperso?Object(f.jsxs)("div",{className:"col-sm",children:[Object(f.jsx)("h4",{children:"Contact"}),""!==this.state.etud.telephone&&Object(f.jsxs)(f.Fragment,{children:[Object(f.jsxs)("a",{href:"tel:"+this.state.etud.telephone,children:["T\xe9l\xe9phone: ",this.state.etud.telephone]}),Object(f.jsx)("br",{})]}),""!==this.state.etud.telephonemobile&&Object(f.jsxs)(f.Fragment,{children:[Object(f.jsxs)("a",{href:"tel:"+this.state.etud.telephonemobile,children:["Mobile: ",this.state.etud.telephonemobile]}),Object(f.jsx)("br",{})]}),""!==this.state.etud.email&&Object(f.jsxs)(f.Fragment,{children:[Object(f.jsxs)("a",{href:"mailto:"+this.state.etud.email,children:["Mail \xe9tudiant: ",this.state.etud.email]}),Object(f.jsx)("br",{})]}),""!==this.state.etud.emailperso&&Object(f.jsxs)(f.Fragment,{children:[Object(f.jsxs)("a",{href:"mailto:"+this.state.etud.emailperso,children:["Mail personnel: ",this.state.etud.emailperso]}),Object(f.jsx)("br",{})]})]}):Object(f.jsx)("div",{className:"col-sm",children:"Aucun contact disponible"}),""!==this.state.etud.domicile||""!==this.state.etud.codepostaldomicile||""!==this.state.etud.villedomicile?Object(f.jsxs)("div",{className:"col-sm",children:[Object(f.jsx)("h4",{children:"Lieu de r\xe9sidence"}),"Domicile: ",this.state.etud.domicile," -"," "+this.state.etud.codepostaldomicile," ",this.state.etud.villedomicile,Object(f.jsx)("br",{})]}):Object(f.jsx)("div",{className:"col-sm",children:"Aucune information de r\xe9sidence disponible"})]}),Object(f.jsxs)("div",{id:"wrapDept",className:"col-sm",children:[""!==this.state.etud.bac||""!==this.state.etud.specialite?Object(f.jsxs)("div",{className:"col-sm",children:[Object(f.jsx)("h4",{children:"Parcours"}),"Bac ",this.state.etud.bac," ",this.state.etud.specialite,""!==this.state.etud.nomlycee||""!==this.state.etud.codepostallycee||""!==this.state.etud.villelycee?Object(f.jsxs)("div",{children:[" "+this.state.etud.nomlycee," (",this.state.etud.codepostallycee," ",this.state.etud.villelycee,")",Object(f.jsx)("br",{})]}):null]}):null,!0===this.state.loaded&&Object(f.jsxs)("div",{className:"col-sm",children:[Object(f.jsx)("h4",{children:"Formation actuelle"}),this.state.semestres.map((function(t,s){return Object(f.jsxs)("div",{children:[Object(f.jsx)("b",{children:t.titreannee}),Object(f.jsx)("br",{}),t.date_debut," - ",t.date_fin,Object(f.jsx)("br",{}),""!==e.state.etud.insemestre[s].groupes&&e.state.etud.insemestre[s].groupes&&"Groupes: "+e.state.etud.insemestre[s].groupes,Object(f.jsx)("h5",{children:"Liens"}),Object(f.jsx)(c.c,{to:{pathname:"/".concat(window.location.href.split("/")[7],"/Scolarite/").concat(t.formsemestre_id,"/GestionSem"),tab:"Absences",etudid:window.location.href.split("/")[10]},children:Object(f.jsx)(O.a,{variant:"primary",style:{"margin-right":"2px"},children:"Vers Absences"})}),Object(f.jsx)(c.c,{to:{pathname:"/".concat(window.location.href.split("/")[7],"/Scolarite/").concat(t.formsemestre_id,"/GestionSem"),tab:"Bulletin",etudid:window.location.href.split("/")[10]},children:Object(f.jsx)(O.a,{variant:"primary",style:{"margin-left":"2px"},children:"Vers bulletin"})})]})}))]})]})]})})]})}}]),s}(a.Component),X=function(){return Object(f.jsxs)(c.b,{children:[Object(f.jsx)(o.b,{exact:!0,path:"/",component:F}),Object(f.jsx)(o.b,{exact:!0,path:"/:DEPT/Scolarite",component:_}),Object(f.jsx)(o.b,{exact:!0,path:"/:DEPT/Scolarite/Etudiant/:EtudId",component:Q}),Object(f.jsx)(o.b,{exact:!0,path:"/:DEPT/Scolarite/:SEM/GestionSem",component:q})]})};s(100);window.$api_url="/ScoDoc/",i.a.render(Object(f.jsx)(c.a,{children:Object(f.jsx)(X,{})}),document.getElementById("root")),r()},29:function(e,t,s){}},[[101,1,2]]]); -//# sourceMappingURL=main.96d680e0.chunk.js.map \ No newline at end of file +(this.webpackJsonpscodocmobile=this.webpackJsonpscodocmobile||[]).push([[0],{101:function(e,t,s){"use strict";s.r(t);var a=s(0),n=s(17),i=s.n(n),c=s(16),r=function(e){e&&e instanceof Function&&s.e(3).then(s.bind(null,118)).then((function(t){var s=t.getCLS,a=t.getFID,n=t.getFCP,i=t.getLCP,c=t.getTTFB;s(e),a(e),n(e),i(e),c(e)}))},o=s(14),l=s(7),d=s(8),h=s(21),j=s(10),u=s(9),b=(s(29),s(114)),p=s(106),m=s(77),O=s(72),f=s(1),x=function(e){Object(j.a)(s,e);var t=Object(u.a)(s);function s(e){var a;return Object(l.a)(this,s),(a=t.call(this,e)).state={logout:!1},a}return Object(d.a)(s,[{key:"logout",value:function(){var e=this,t=window.$api_url;fetch(t+"acl_users/logout").then((function(t){e.setState({logout:!0})})).catch(console.log)}},{key:"render",value:function(){var e=this;return Object(f.jsxs)(b.a,{bg:"light",expand:"sm",children:[Object(f.jsxs)(p.a,{children:[Object(f.jsxs)(b.a.Brand,{href:window.$api_url+"static/mobile/",children:[Object(f.jsx)("img",{alt:"ScodocLogo",src:"/ScoDoc/static/icons/scologo_img.png",width:"20",height:"30",className:"d-inline-block align-top"})," ","ScoDoc"]}),Object(f.jsx)(b.a.Toggle,{"aria-controls":"basic-navbar-nav"}),Object(f.jsx)(b.a.Collapse,{id:"basic-navbar-nav",children:Object(f.jsxs)(m.a,{className:"ml-auto",children:[Object(f.jsx)(m.a.Link,{href:"/ScoDoc",children:"Version Desktop"}),Object(f.jsx)(O.a,{variant:"primary",onClick:function(){e.logout()},children:"D\xe9connexion"})]})})]}),!0===this.state.logout&&Object(f.jsx)(o.a,{push:!0,to:"/"})]})}}]),s}(a.Component),v=s(73),g=s(107);function w(e){return fetch(e,{method:"GET",verify:!1,credentials:"include"})}function y(e){return w(e).then((function(e){return e.json().then((function(e){return{data:e}})).then((function(e){return e}))}))}function S(e,t){return fetch(e,{method:"POST",verify:!1,credentials:"include",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:t})}var C=function(e){Object(j.a)(s,e);var t=Object(u.a)(s);function s(e){var a;return Object(l.a)(this,s),(a=t.call(this,e)).state={students:[],search_status:0},a.handleChangeSearch=a.handleChangeSearch.bind(Object(h.a)(a)),a.searchStudent=a.searchStudent.bind(Object(h.a)(a)),a}return Object(d.a)(s,[{key:"handleChangeSearch",value:function(e){this.setState({search:e.target.value})}},{key:"searchStudent",value:function(e){var t=this,s=window.location.href.split("/")[7];y(window.$api_url+s+"/Scolarite/Notes/search_etud_by_name?term="+e+"&format=json").then((function(e){t.setState({students:e.data}),0===t.state.students.length?t.setState({search_status:1,toast:!0}):t.setState({search_status:2,toast:!1})})),this.setState({searched:!0})}},{key:"result",value:function(){return!0===this.state.toast?Object(f.jsx)("div",{id:"wrapDept",children:"Aucun \xe9tudiant trouv\xe9"}):2===this.state.search_status?Object(f.jsx)(v.a,{children:this.state.students.map((function(e){return Object(f.jsx)(g.a,{id:"wrapDept",children:Object(f.jsx)(c.c,{to:"/".concat(window.location.href.split("/")[7],"/Scolarite/Etudiant/").concat(e.value),children:Object(f.jsx)("span",{children:e.label})})})}))}):void 0}},{key:"render",value:function(){var e=this;return Object(f.jsxs)("div",{className:"wrapper",children:[Object(f.jsxs)("div",{className:"input-group",children:[Object(f.jsx)("input",{type:"text",id:"search",className:"form-control",onChange:this.handleChangeSearch}),Object(f.jsx)("div",{className:"input-group-append",children:Object(f.jsx)("button",{type:"button",className:"btn waves-effect waves-light btn-primary",onClick:function(){e.searchStudent(e.state.search)},children:"Rechercher"})})]}),this.result()]})}}]),s}(a.Component),k=s(115),D=s(116),_=function(e){Object(j.a)(s,e);var t=Object(u.a)(s);function s(e){var a;return Object(l.a)(this,s),(a=t.call(this,e)).dismissToast=function(){return a.setState({toast:!1})},a.state={semestres:[],students:[],toast:!1},a.dismissToast=a.dismissToast.bind(Object(h.a)(a)),a}return Object(d.a)(s,[{key:"componentWillMount",value:function(){this.getData()}},{key:"getData",value:function(){var e=this,t=window.location.href.split("/")[7];y(window.$api_url+t+"/Scolarite/Notes/formsemestre_list?format=json").then((function(t){e.setState({semestres:t.data})}))}},{key:"render",value:function(){return Object(f.jsxs)("div",{children:[Object(f.jsx)(x,{}),Object(f.jsx)("section",{children:Object(f.jsx)("h1",{id:"pageTitle",children:"Scolarit\xe9"})}),Object(f.jsxs)(k.a,{defaultActiveKey:"0",children:[Object(f.jsxs)(D.a,{children:[Object(f.jsx)(D.a.Header,{children:Object(f.jsx)(k.a.Toggle,{as:O.a,variant:"link",eventKey:"0",children:"Semestres en cours"})}),Object(f.jsx)(k.a.Collapse,{eventKey:"0",children:Object(f.jsx)(D.a.Body,{children:Object(f.jsx)("div",{className:"container",children:Object(f.jsx)("div",{className:"row",children:this.state.semestres.map((function(e,t){if("1"===e.etat)return Object(f.jsx)("div",{className:"col-sm",id:"wrapDept",children:Object(f.jsxs)(c.c,{to:"/".concat(window.location.href.split("/")[7],"/Scolarite/").concat(e.formsemestre_id,"/GestionSem"),children:[Object(f.jsxs)("h4",{children:[e.titre," [",e.modalite,"]"]}),Object(f.jsxs)("p",{children:["Semestre ",e.semestre_id," - Ann\xe9e ",e.anneescolaire," [",e.date_debut," - ",e.date_fin,"]"]})]})},t)}))})})})})]}),Object(f.jsxs)(D.a,{children:[Object(f.jsx)(D.a.Header,{children:Object(f.jsx)(k.a.Toggle,{as:O.a,variant:"link",eventKey:"1",children:"Semestres pass\xe9s"})}),Object(f.jsx)(k.a.Collapse,{eventKey:"1",children:Object(f.jsx)(D.a.Body,{children:this.state.semestres.map((function(e,t){if("1"!==e.etat)return Object(f.jsx)("div",{className:"col-12",id:"wrapDept",children:Object(f.jsxs)(c.c,{to:"/".concat(window.location.href.split("/")[7],"/Scolarite/").concat(e.formsemestre_id,"/GestionSem"),children:[Object(f.jsxs)("h3",{children:[e.titre," [",e.modalite,"]"]}),Object(f.jsxs)("p",{children:["Semestre ",e.semestre_id," - Ann\xe9e ",e.anneescolaire," [",e.date_debut," - ",e.date_fin,"]"]})]})},t)}))})})]}),Object(f.jsxs)(D.a,{children:[Object(f.jsx)(D.a.Header,{children:Object(f.jsx)(k.a.Toggle,{as:O.a,variant:"link",eventKey:"2",children:"Recherche \xe9tudiant"})}),Object(f.jsx)(k.a.Collapse,{eventKey:"2",children:Object(f.jsx)(D.a.Body,{children:Object(f.jsx)(C,{})})})]})]})]})}}]),s}(a.Component),N=s(74),M=function(e){Object(j.a)(s,e);var t=Object(u.a)(s);function s(e){var a;return Object(l.a)(this,s),(a=t.call(this,e)).state={depts:[]},a}return Object(d.a)(s,[{key:"componentWillMount",value:function(){this.getData()}},{key:"getData",value:function(){var e=this;y(window.$api_url+"list_depts?format=json").then((function(t){e.setState({depts:t.data})}))}},{key:"render",value:function(){return Object(f.jsxs)("div",{className:"wrapper",children:[Object(f.jsx)("h1",{id:"pageTitle",children:"Choix du d\xe9partement"}),Object(f.jsx)("div",{className:"container",children:Object(f.jsx)("div",{className:"row",children:this.state.depts.map((function(e,t){return Object(f.jsx)("div",{className:"col-sm",id:"wrapDept",children:Object(f.jsxs)(c.c,{to:"/".concat(e,"/Scolarite"),children:["D\xe9partement ",e]})},t)}))})})]})}}]),s}(a.Component),F=function(e){Object(j.a)(s,e);var t=Object(u.a)(s);function s(e){var a;return Object(l.a)(this,s),(a=t.call(this,e)).state={login:"",pass:"",status:0},a.handleChangeLogin=a.handleChangeLogin.bind(Object(h.a)(a)),a.handleChangePass=a.handleChangePass.bind(Object(h.a)(a)),a.checkCredentials=a.checkCredentials.bind(Object(h.a)(a)),a}return Object(d.a)(s,[{key:"handleChangeLogin",value:function(e){this.setState({login:e.target.value})}},{key:"handleChangePass",value:function(e){this.setState({pass:e.target.value})}},{key:"checkCredentials",value:function(e){var t=this;e.preventDefault();var s=this.state.login,a=this.state.pass;(function(e,t,s){return fetch(e,{method:"GET",verify:!1,credentials:"include",headers:{"Content-Type":"application/x-www-form-urlencoded",Authorization:"Basic "+btoa(t+":"+s)}})})(window.$api_url,s,a).then((function(e){t.setState({status:e.status})})).catch(console.log)}},{key:"render",value:function(){return Object(f.jsxs)("div",{children:[!N.isMobile&&Object(f.jsx)("span",{}),0!==this.state.status&&200!==this.state.status&&Object(f.jsx)("div",{className:"wrapper",children:Object(f.jsx)("div",{id:"errorMsg",children:Object(f.jsxs)("h2",{id:"loginTitle",children:["\u26a0\ufe0f"," Login ou mot de passe incorrect"]})})}),""===document.cookie&&Object(f.jsx)("div",{className:"wrapper",children:Object(f.jsxs)("div",{id:"formContent",children:[Object(f.jsx)("h2",{id:"loginTitle",children:"Connexion a ScoDoc"}),Object(f.jsxs)("form",{children:[Object(f.jsx)("input",{type:"text",id:"login",placeholder:"Identifiant",onChange:this.handleChangeLogin}),Object(f.jsx)("input",{type:"password",id:"password",placeholder:"Mot de passe",onChange:this.handleChangePass}),Object(f.jsx)("button",{type:"submit",value:"Log In",onClick:this.checkCredentials,children:"Log in"})]})]})}),Object(f.jsxs)("div",{children:[""!==document.cookie&&Object(f.jsx)(x,{}),""!==document.cookie&&Object(f.jsx)(M,{})]})]})}}]),s}(a.Component),T=s(117),A=s(110),I=s(108),L=function(e){Object(j.a)(s,e);var t=Object(u.a)(s);function s(e){var a;return Object(l.a)(this,s),(a=t.call(this,e)).state={semestre:{},resp:[],loading:!0},a}return Object(d.a)(s,[{key:"componentWillMount",value:function(){this.setState({loading:!0}),this.getData()}},{key:"getData",value:function(){var e=this,t=window.location.href.split("/")[7],s=window.location.href.split("/")[9],a=window.$api_url;y(a+t+"/Scolarite/Notes/formsemestre_list?format=json&formsemestre_id="+s).then((function(s){e.setState({semestre:s.data[0],resp_l:s.data[0].responsables}),s.data[0].responsables.map((function(s){return y(a+t+"/Scolarite/Users/user_info?format=json&user_name="+s).then((function(t){var s=e.state.resp.concat(t.data.nomplogin);e.setState({resp:s,loading:!1})})).catch((function(t){e.setState({resp:e.state.resp_l,loading:!1})}))}))}))}},{key:"render",value:function(){var e=this;return Object(f.jsx)("div",{className:"wrapper",children:!1===this.state.loading?Object(f.jsxs)("h1",{id:"pageTitle",children:[this.state.semestre.titre,Object(f.jsx)("br",{}),"Semestre ",this.state.semestre.semestre_id," en ",this.state.semestre.modalite,Object(f.jsx)("br",{}),1===this.state.resp.length?"Responsable: (":"Responsables (",this.state.resp.map((function(t,s){return s!==e.state.resp.length-1?t+", ":t+")"}))]}):Object(f.jsx)(I.a,{animation:"border"})})}}]),s}(a.Component),P=s(67),E=s(112),B=s(113),G=function(e){Object(j.a)(s,e);var t=Object(u.a)(s);function s(e){var a;return Object(l.a)(this,s),(a=t.call(this,e)).openModal=function(){return a.setState({isOpen:!0})},a.closeModal=function(){return a.setState({isOpen:!1})},a.onFormSubmit=function(e){e.preventDefault();var t=new FormData(e.target),s=Object.fromEntries(t.entries()),n="etudid="+a.state.etudid+"&datedebut=";if(s.hasOwnProperty("dateDebut")&&""!==s.dateDebut){var i=s.dateDebut.split("-");if(n+=i=i[2]+"/"+i[1]+"/"+i[0],s.hasOwnProperty("dateFin")&&""!==s.dateFin){var c=s.dateFin.split("-");n+="&datefin="+(c=c[2]+"/"+c[1]+"/"+c[0])}else n+="&datefin="+i;s.hasOwnProperty("duree")&&(n+="&demijournee="+s.duree),s.hasOwnProperty("estjust")&&s.hasOwnProperty("motif")&&""!==s.motif&&(n+="&estjust=True&description="+s.motif),a.postData(n)}else a.setState({error:!0})},a.state={isOpen:!1,form:{},error:!1,etudid:""},a}return Object(d.a)(s,[{key:"componentDidUpdate",value:function(e){e.open!==this.props.open&&(this.setState({etudid:this.props.etudid}),!0===this.props.open&&this.setState({isOpen:!0}))}},{key:"postData",value:function(e){var t=this,s=window.location.href.split("/")[7];S(window.$api_url+s+"/Scolarite/Absences/doSignaleAbsence",e).then((function(e){200===e.status&&t.closeModal()}))}},{key:"render",value:function(){var e=this;return Object(f.jsx)(f.Fragment,{children:Object(f.jsxs)(E.a,{show:this.state.isOpen,onHide:this.closeModal,children:[Object(f.jsx)(E.a.Header,{closeButton:!0,children:Object(f.jsx)(E.a.Title,{children:"Saisie d'absence"})}),Object(f.jsxs)(E.a.Body,{children:[this.state.error&&Object(f.jsx)("span",{children:"Erreur: La date de d\xe9but ne doit pas \xeatre vide"}),Object(f.jsxs)(B.a,{onSubmit:this.onFormSubmit,children:[Object(f.jsxs)(B.a.Row,{children:[Object(f.jsxs)(B.a.Group,{as:v.a,ControlId:"dateDebut",children:[Object(f.jsx)(B.a.Label,{children:"Date d\xe9but"}),Object(f.jsx)(B.a.Control,{type:"date",name:"dateDebut"})]}),Object(f.jsxs)(B.a.Group,{as:v.a,ControlId:"dateFin",children:[Object(f.jsx)(B.a.Label,{children:"Date fin (Optionnel)"}),Object(f.jsx)(B.a.Control,{type:"date",name:"dateFin"})]})]}),Object(f.jsx)(B.a.Row,{children:Object(f.jsxs)(B.a.Group,{as:v.a,ControlId:"duree",children:[Object(f.jsx)(B.a.Check,{inline:!0,label:"Journ\xe9e(s)",name:"duree",type:"radio",value:"2"}),Object(f.jsx)(B.a.Check,{inline:!0,label:"Matin(s)",name:"duree",type:"radio",value:"1"}),Object(f.jsx)(B.a.Check,{inline:!0,label:"Apr\xe8s-midi",name:"duree",type:"radio",value:"0"})]})}),Object(f.jsx)(B.a.Row,{children:Object(f.jsx)(B.a.Group,{as:v.a,ControlId:"estjust",children:Object(f.jsx)(B.a.Check,{label:"Justifi\xe9e",name:"estjust",type:"checkbox",id:"estjust"})})}),Object(f.jsx)(B.a.Row,{children:Object(f.jsxs)(B.a.Group,{as:v.a,ControlId:"motif",children:[Object(f.jsx)(B.a.Label,{children:"Motif"}),Object(f.jsx)(B.a.Control,{as:"textarea",rows:3,name:"motif"})]})}),Object(f.jsx)(B.a.Row,{children:Object(f.jsx)(O.a,{type:"submit",variant:"primary",children:"Sauvegarder"})})]})]}),Object(f.jsx)(E.a.Footer,{children:Object(f.jsx)(O.a,{variant:"secondary",onClick:function(){e.closeModal()},children:"Fermer"})})]})})}}]),s}(a.Component),R=function(e){Object(j.a)(s,e);var t=Object(u.a)(s);function s(e){var a;return Object(l.a)(this,s),(a=t.call(this,e)).openModal=function(){return a.setState({isOpen:!0})},a.closeModal=function(){return a.setState({isOpen:!1})},a.state={isOpen:!1,etudid:""},a}return Object(d.a)(s,[{key:"componentDidUpdate",value:function(e){e.open!==this.props.open&&(this.setState({etudid:this.props.etudid}),!0===this.props.open&&this.setState({isOpen:!0}))}},{key:"postData",value:function(){var e=window.location.href.split("/")[7];S(window.$api_url+e+"/Scolarite/Absences/doAnnuleAbsence","datedebut="+this.props.data.date+"&datefin="+this.props.data.date+"&demijournee="+this.props.data.demijournee+"&etudid="+this.state.etudid),this.setState({isOpen:!1})}},{key:"render",value:function(){var e=this;return Object(f.jsx)(f.Fragment,{children:Object(f.jsxs)(E.a,{show:this.state.isOpen,onHide:this.closeModal,children:[Object(f.jsx)(E.a.Header,{closeButton:!0,children:Object(f.jsx)(E.a.Title,{children:"Suppression d'absence"})}),Object(f.jsx)(E.a.Body,{children:Object(f.jsx)("p",{children:"Etes-vous s\xfbr.e de vouloir supprimer cette absence ?"})}),Object(f.jsxs)(E.a.Footer,{children:[Object(f.jsx)(O.a,{variant:"danger",onClick:function(){e.postData()},children:"Supprimer"}),Object(f.jsx)(O.a,{variant:"secondary",onClick:function(){e.closeModal()},children:"Fermer"})]})]})})}}]),s}(a.Component),$=function(e){Object(j.a)(s,e);var t=Object(u.a)(s);function s(e){var a;return Object(l.a)(this,s),(a=t.call(this,e)).openModal=function(){return a.setState({isOpen:!0})},a.closeModal=function(){return a.setState({isOpen:!1})},a.onFormSubmit=function(e){e.preventDefault();var t=new FormData(e.target),s=Object.fromEntries(t.entries()),n="etudid="+a.state.etudid+"&datedebut="+a.props.data.date;if(s.hasOwnProperty("dateFin")&&""!==s.dateFin){var i=s.dateFin.split("-");n+="&datefin="+(i=i[2]+"/"+i[1]+"/"+i[0])}else n+="&datefin="+a.props.data.date;s.hasOwnProperty("duree")?n+="&demijournee="+s.duree:n+="&demijournee="+a.props.data.demijournee,s.hasOwnProperty("motif")&&""!==s.motif&&(n+="&description="+s.motif),a.postData(n)},a.state={isOpen:!1,etudid:"",date:""},a}return Object(d.a)(s,[{key:"componentDidUpdate",value:function(e){if(e.open!==this.props.open){this.setState({etudid:this.props.etudid}),!0===this.props.open&&this.setState({isOpen:!0});var t=this.props.data.date.split("/");t=(t=new Date(t[2]+"-"+t[1]+"-"+t[0])).toISOString().substr(0,10),this.setState({date:t})}}},{key:"postData",value:function(e){var t=window.location.href.split("/")[7];S(window.$api_url+t+"/Scolarite/Absences/doJustifAbsence",e),this.setState({isOpen:!1})}},{key:"render",value:function(){var e=this;return Object(f.jsx)(f.Fragment,{children:Object(f.jsxs)(E.a,{show:this.state.isOpen,onHide:this.closeModal,children:[Object(f.jsx)(E.a.Header,{closeButton:!0,children:Object(f.jsx)(E.a.Title,{children:"Suppression d'absence"})}),Object(f.jsx)(E.a.Body,{children:Object(f.jsxs)(B.a,{onSubmit:this.onFormSubmit,children:[Object(f.jsxs)(B.a.Row,{children:[Object(f.jsxs)(B.a.Group,{as:v.a,ControlId:"dateDebut",children:[Object(f.jsx)(B.a.Label,{children:"Date d\xe9but"}),Object(f.jsx)(B.a.Control,{type:"date",name:"dateDebut",defaultValue:this.state.date,readOnly:!0})]}),Object(f.jsxs)(B.a.Group,{as:v.a,ControlId:"dateFin",children:[Object(f.jsx)(B.a.Label,{children:"Date fin (Optionnel)"}),Object(f.jsx)(B.a.Control,{type:"date",name:"dateFin",defaultValue:this.state.date})]})]}),Object(f.jsx)(B.a.Row,{children:Object(f.jsxs)(B.a.Group,{as:v.a,ControlId:"duree",children:[Object(f.jsx)(B.a.Check,{inline:!0,label:"Journ\xe9e",name:"duree",type:"radio",value:"2"}),Object(f.jsx)(B.a.Check,{inline:!0,label:"Demie-journ\xe9e",name:"duree",type:"radio",defaultValue:this.props.data.demijournee,checked:!0})]})}),Object(f.jsx)(B.a.Row,{children:Object(f.jsxs)(B.a.Group,{as:v.a,ControlId:"motif",children:[Object(f.jsx)(B.a.Label,{children:"Motif"}),Object(f.jsx)(B.a.Control,{as:"textarea",rows:3,name:"motif"})]})}),Object(f.jsx)(B.a.Row,{children:Object(f.jsx)(O.a,{type:"submit",variant:"primary",children:"Sauvegarder"})})]})}),Object(f.jsx)(E.a.Footer,{children:Object(f.jsx)(O.a,{variant:"secondary",onClick:function(){e.closeModal()},children:"Fermer"})})]})})}}]),s}(a.Component),K=function(e){Object(j.a)(s,e);var t=Object(u.a)(s);function s(e){var a;return Object(l.a)(this,s),(a=t.call(this,e)).state={isOpen:!1,isDelOpen:!1,isJustOpen:!1,abs:[],absjust:[],data:{},loading:!1},a}return Object(d.a)(s,[{key:"componentDidUpdate",value:function(e){e.id!==this.props.id&&(this.setState({loading:!0}),this.getData())}},{key:"componentDidMount",value:function(){""!==this.props.id&&this.getData()}},{key:"openModal",value:function(e,t){var s=this;this.setState(Object(P.a)({},e,!0),(function(){return setTimeout((function(){s.setState(Object(P.a)({},e,!1))}),500)})),t&&this.setState({data:t})}},{key:"getData",value:function(){var e=this,t=window.location.href.split("/")[7],s=window.$api_url;""!==this.state.id&&(y(s+t+"/Scolarite/Absences/ListeAbsEtud?format=json&absjust_only=0&etudid="+this.props.id).then((function(t){return e.setState({abs:t.data})})),y(s+t+"/Scolarite/Absences/ListeAbsEtud?format=json&absjust_only=1&etudid="+this.props.id).then((function(t){return e.setState({absjust:t.data,loading:!1})})))}},{key:"render",value:function(){var e=this;return Object(f.jsxs)("div",{className:"wrapper",children:[""!==this.props.id&&Object(f.jsx)(G,{open:this.state.isOpen,etudid:this.props.id})," ",""!==this.props.id&&Object(f.jsx)(R,{open:this.state.isDelOpen,etudid:this.props.id,data:this.state.data})," ",""!==this.props.id&&Object(f.jsx)($,{open:this.state.isJustOpen,etudid:this.props.id,data:this.state.data}),Object(f.jsx)("h1",{id:"pageTitle",children:"Gestion des absences"}),""!==this.props.name&&Object(f.jsxs)("div",{className:"col-sm",id:"wrapDept",children:[Object(f.jsxs)("h4",{children:["Absences de ",this.props.name+" ",Object(f.jsx)(O.a,{variant:"primary",size:"sm",style:{"margin-right":"2px"},onClick:function(){return e.openModal("isOpen",null)},children:Object(f.jsx)("span",{children:"+"})}),Object(f.jsx)(O.a,{variant:"secondary",size:"sm",style:{"margin-left":"2px"},onClick:function(){return e.getData()},children:Object(f.jsx)("span",{children:"\ud83d\uddd8"})})]}),!0===this.state.loading&&Object(f.jsx)(I.a,{animation:"border"}),this.state.abs.length+this.state.absjust.length===0&&""!==this.props.name&&!1===this.state.loading&&Object(f.jsx)("h6",{children:"Aucune absence de l'\xe9tudiant.e"}),this.state.abs.map((function(t){return Object(f.jsxs)("div",{className:"col-sm",id:"wrapDept",children:[Object(f.jsxs)(v.a,{children:[Object(f.jsxs)("h5",{children:[t.datedmy," | ",t.matin]}),""!==t.motif&&Object(f.jsxs)("span",{children:["Motif: ",t.motif]})," ",""!==t.exams&&Object(f.jsxs)("span",{children:["Exam a rattraper: ",t.exams]})]}),Object(f.jsxs)(v.a,{children:[""===t.motif&&Object(f.jsx)(O.a,{variant:"primary",size:"sm",style:{"margin-right":"2px"},onClick:function(){return e.openModal("isJustOpen",{date:t.datedmy,demijournee:t.ampm})},children:"Justifier"}),Object(f.jsx)(O.a,{variant:"danger",size:"sm",style:{"margin-left":"2px"},onClick:function(){return e.openModal("isDelOpen",{date:t.datedmy,demijournee:t.ampm})},children:"Supprimer"})]})]})})),this.state.absjust.map((function(t){return Object(f.jsxs)("div",{className:"col-sm",id:"wrapDept",children:[Object(f.jsxs)(v.a,{children:[Object(f.jsxs)("h5",{children:[t.datedmy," | ",t.matin]}),""!==t.motif&&Object(f.jsxs)("span",{children:["Motif: ",t.motif]})," ",""!==t.exams&&Object(f.jsxs)("span",{children:["Exam a rattraper: ",t.exams]})]}),Object(f.jsx)(v.a,{children:Object(f.jsx)(O.a,{variant:"danger",size:"sm",style:{"margin-left":"2px"},onClick:function(){return e.openModal("isDelOpen",{date:t.datedmy,demijournee:t.ampm})},children:"Supprimer"})})]})}))]})]})}}]),s}(a.Component),z=s(75),J=function(e){Object(j.a)(s,e);var t=Object(u.a)(s);function s(e){var a;return Object(l.a)(this,s),(a=t.call(this,e)).state={students:[]},a}return Object(d.a)(s,[{key:"componentWillMount",value:function(){}},{key:"componentDidUpdate",value:function(e){var t=this;if(e!==this.props&&this.props.students.length){var s=this.props.students.map((function(e,s){return s%2===0?t.props.students.slice(s,s+2):null})).filter((function(e){return null!=e}));this.setState({students:s})}}},{key:"getData",value:function(){var e=this,t=window.location.href.split("/")[7],s=window.location.href.split("/")[9];y(window.$api_url+t+"/Scolarite/Notes/groups_view?with_codes=1&format=json&formsemestre_id="+s).then((function(t){var s=t.data.map((function(e,s){return s%2===0?t.data.slice(s,s+2):null})).filter((function(e){return null!=e}));e.setState({students:s})}))}},{key:"render",value:function(){return Object(f.jsxs)("div",{className:"wrapper",children:[Object(f.jsx)("h1",{id:"pageTitle",children:"Liste des \xe9tudiants"}),Object(f.jsx)("div",{className:"container",children:0!==this.state.students.length?this.state.students.map((function(e){return Object(f.jsx)("div",{className:"row justify-content-center",children:e.map((function(e,t){return Object(f.jsx)("div",{className:"col",id:"wrapDept",children:Object(f.jsxs)(c.c,{to:"/".concat(window.location.href.split("/")[7],"/Scolarite/Etudiant/").concat(e.etudid),children:[Object(f.jsx)(z.LazyLoadImage,{alt:"".concat(e.nom_disp," ").concat(e.prenom),src:"/ScoDoc/".concat(window.location.href.split("/")[7],"/Scolarite/Notes/get_photo_image?etudid=").concat(e.etudid),width:"102",height:"128",className:"d-inline-block align-top"})," ",Object(f.jsx)("br",{}),e.nom_disp," ",e.prenom]})},t)}))})})):Object(f.jsx)("div",{className:"row justify-content-center",children:Object(f.jsx)(I.a,{animation:"border"})})})]})}}]),s}(a.Component),H=s(109),U=s(111),V=function(e){Object(j.a)(s,e);var t=Object(u.a)(s);function s(e){var a;return Object(l.a)(this,s),(a=t.call(this,e)).state={bltn:{},datue:{},loaded:!1,loading:!1},a.getData=a.getData.bind(Object(h.a)(a)),a}return Object(d.a)(s,[{key:"getData",value:function(){var e=this,t=window.location.href.split("/")[7],s=window.location.href.split("/")[9];y(window.$api_url+t+"/Scolarite/Notes/formsemestre_bulletinetud?formsemestre_id="+s+"&etudid="+this.props.id+"&format=json").then((function(t){e.setState({bltn:t.data},(function(){var t={};for(var s in e.state.bltn.decision_ue)t[(s=e.state.bltn.decision_ue[s]).acronyme]=s.titre;e.setState({datue:t},(function(){e.setState({loaded:!0,loading:!1})}))}))}))}},{key:"getPdf",value:function(){w(window.$api_url+window.location.href.split("/")[7]+"/Scolarite/Notes/formsemestre_bulletinetud?formsemestre_id="+window.location.href.split("/")[9]+"&etudid="+this.props.id+"&format=pdf&version=selectedevals").then((function(e){return e.blob()})).then((function(e){var t=window.URL.createObjectURL(e);window.location.assign(t)}))}},{key:"componentDidUpdate",value:function(e){e.id!==this.props.id&&(this.setState({loading:!0}),this.getData())}},{key:"componentDidMount",value:function(){""!==this.props.id&&this.getData()}},{key:"render",value:function(){var e=this;return Object(f.jsxs)("div",{className:"wrapper",children:[Object(f.jsx)("div",{style:{"margin-bottom":"20px"},children:Object(f.jsx)("h1",{id:"pageTitle",children:"Bulletins de notes"})}),!0===this.state.loading&&!1===this.state.loaded&&Object(f.jsx)(I.a,{animation:"border"}),!0===this.state.loaded&&Object(f.jsxs)("div",{children:[Object(f.jsxs)(H.a,{responsive:"sm",children:[Object(f.jsxs)("thead",{children:[Object(f.jsxs)("tr",{children:[Object(f.jsx)("th",{colSpan:"3"}),Object(f.jsx)("th",{children:"Note/20"})]}),Object(f.jsxs)("tr",{className:"bigRow",children:[Object(f.jsx)("th",{colSpan:"3",children:"Moyenne g\xe9n\xe9rale"}),Object(f.jsx)("th",{children:Object(f.jsxs)(U.a,{children:[Object(f.jsx)(U.a.Toggle,{variant:"primary",size:"sm",id:"dropdown-basic",children:this.state.bltn.note.value}),Object(f.jsxs)(U.a.Menu,{children:[Object(f.jsxs)(U.a.Item,{href:"#",children:["Min: ",this.state.bltn.note.min]}),Object(f.jsxs)(U.a.Item,{href:"#",children:["Max: ",this.state.bltn.note.max]}),this.state.bltn.hasOwnProperty("rang")&&Object(f.jsxs)(U.a.Item,{href:"#",children:["Classement: ",this.state.bltn.rang.value,"/",this.state.bltn.rang.ninscrits]})]})]})})]})]}),this.state.bltn.ue.map((function(t){return Object(f.jsxs)("tbody",{children:[Object(f.jsxs)("tr",{className:"ueRow",children:[Object(f.jsxs)("td",{colSpan:"3",children:[t.acronyme," - ",e.state.datue[t.acronyme]]}),Object(f.jsx)("td",{children:Object(f.jsxs)(U.a,{children:[Object(f.jsx)(U.a.Toggle,{variant:"primary",size:"sm",id:t.acronyme,children:t.note.value}),Object(f.jsxs)(U.a.Menu,{children:[Object(f.jsxs)(U.a.Item,{href:"#",children:["Min: ",t.note.min]}),Object(f.jsxs)(U.a.Item,{href:"#",children:["Max: ",t.note.max]}),t.hasOwnProperty("rang")&&Object(f.jsxs)(U.a.Item,{href:"#",children:["Classement: ",t.rang,"/",e.state.bltn.rang.ninscrits]})]})]})})]}),t.module.map((function(t){return Object(f.jsxs)("tr",{children:[Object(f.jsx)("td",{colSpan:"3",children:t.titre.replace("'","'")}),Object(f.jsx)("td",{children:Object(f.jsxs)(U.a,{children:[Object(f.jsx)(U.a.Toggle,{variant:"primary",size:"sm",id:t.code,children:t.note.value}),Object(f.jsxs)(U.a.Menu,{children:[Object(f.jsxs)(U.a.Item,{href:"#",children:["Min: ",t.note.min]}),Object(f.jsxs)(U.a.Item,{href:"#",children:["Max: ",t.note.max]}),t.hasOwnProperty("rang")&&Object(f.jsxs)(U.a.Item,{href:"#",children:["Classement: ",t.rang.value,"/",e.state.bltn.rang.ninscrits]}),Object(f.jsxs)(U.a.Item,{href:"#",children:["Coefficient: ",t.coefficient]})]})]})})]})}))]})}))]}),Object(f.jsx)("div",{children:Object(f.jsx)(O.a,{className:"btn-primary",onClick:function(){e.getPdf()},children:"Version PDF"})})]})]})}}]),s}(a.Component),W=s(76),q=function(e){Object(j.a)(s,e);var t=Object(u.a)(s);function s(e){var a;return Object(l.a)(this,s),(a=t.call(this,e)).state={selectOptions:[],id:"",name:"",defaulttab:"Accueil",defaultsel:""},a}return Object(d.a)(s,[{key:"componentWillMount",value:function(){var e=this;this.getData(),this.props.location.tab&&this.setState({defaulttab:this.props.location.tab,defaultsel:this.props.location.etudid,id:this.props.location.etudid,name:this.state.selectOptions.find((function(t){return t.value===e.state.id}))})}},{key:"getData",value:function(){var e=this,t=window.location.href.split("/")[7],s=window.location.href.split("/")[9];y(window.$api_url+t+"/Scolarite/Notes/groups_view?with_codes=1&format=json&formsemestre_id="+s).then((function(t){e.setState({students:t.data}),t.data.map((function(t){var s=e.state.selectOptions.concat({label:t.nom_disp+" "+t.prenom,value:t.etudid});e.setState({selectOptions:s})}))}))}},{key:"handleSelectChange",value:function(e){this.setState({id:e.value,name:e.label})}},{key:"render",value:function(){var e=this;return Object(f.jsxs)("div",{children:[Object(f.jsx)(x,{}),Object(f.jsx)("div",{className:"container",children:Object(f.jsx)("div",{className:"row justify-content-center",children:Object(f.jsxs)("div",{className:"col-sm",id:"wrapDept",children:["Choix de l'\xe9tudiant",Object(f.jsx)(W.a,{className:"mySelect",options:this.state.selectOptions,onChange:this.handleSelectChange.bind(this),value:this.state.selectOptions.find((function(t){return t.value===e.state.defaultsel}))})]})})}),Object(f.jsx)("div",{children:Object(f.jsxs)(T.a,{defaultActiveKey:this.state.defaulttab,id:"controlled-tab-example",children:[Object(f.jsx)(A.a,{eventKey:"Accueil",title:"Accueil",children:Object(f.jsx)(L,{})}),Object(f.jsx)(A.a,{eventKey:"Absences",title:"Absences",children:Object(f.jsx)(K,{id:this.state.id,name:this.state.name})}),Object(f.jsx)(A.a,{eventKey:"Bulletin",title:"Bulletin",children:Object(f.jsx)(V,{id:this.state.id,name:this.state.name})}),Object(f.jsx)(A.a,{eventKey:"Etud",title:"Etudiants",children:Object(f.jsx)(J,{students:this.state.students})})]})})]})}}]),s}(a.Component),Q=function(e){Object(j.a)(s,e);var t=Object(u.a)(s);function s(e){var a;return Object(l.a)(this,s),(a=t.call(this,e)).state={etud:{},formation:[],semestres:[],loaded:!1},a}return Object(d.a)(s,[{key:"componentWillMount",value:function(){this.getData()}},{key:"getData",value:function(){var e=this,t=window.location.href.split("/")[7],s=window.location.href.split("/")[10],a=window.$api_url;y(a+t+"/Scolarite/Notes/etud_info?format=json&etudid="+s).then((function(s){e.setState({etud:s.data,formation:s.data.insemestre}),s.data.insemestre.map((function(s){y(a+t+"/Scolarite/Notes/formsemestre_list?format=json&formsemestre_id="+s.formsemestre_id).then((function(t){var s=e.state.semestres.concat(t.data[0]);e.setState({semestres:s,loaded:!0})}))}))}))}},{key:"render",value:function(){var e=this;return Object(f.jsxs)("div",{children:[Object(f.jsx)(x,{}),Object(f.jsx)("div",{className:"wrapper",children:Object(f.jsxs)("div",{id:"wrapDept",children:[Object(f.jsx)("h1",{children:this.state.etud.nomprenom}),Object(f.jsx)("img",{alt:"".concat(this.state.etud.nomprenom),src:"/ScoDoc/".concat(window.location.href.split("/")[7],"/Scolarite/Notes/").concat(this.state.etud.photo_url),width:"102",height:"128",className:"d-inline-block align-top"})," ",Object(f.jsxs)("div",{id:"wrapDept",className:"col-sm",children:[Object(f.jsx)("h3",{children:"Informations personnelles"}),""!==this.state.etud.telephone||""!==this.state.etud.telephonemobile||""!==this.state.etud.email||""!==this.state.etud.emailperso?Object(f.jsxs)("div",{className:"col-sm",children:[Object(f.jsx)("h4",{children:"Contact"}),""!==this.state.etud.telephone&&Object(f.jsxs)(f.Fragment,{children:[Object(f.jsxs)("a",{href:"tel:"+this.state.etud.telephone,children:["T\xe9l\xe9phone: ",this.state.etud.telephone]}),Object(f.jsx)("br",{})]}),""!==this.state.etud.telephonemobile&&Object(f.jsxs)(f.Fragment,{children:[Object(f.jsxs)("a",{href:"tel:"+this.state.etud.telephonemobile,children:["Mobile: ",this.state.etud.telephonemobile]}),Object(f.jsx)("br",{})]}),""!==this.state.etud.email&&Object(f.jsxs)(f.Fragment,{children:[Object(f.jsxs)("a",{href:"mailto:"+this.state.etud.email,children:["Mail \xe9tudiant: ",this.state.etud.email]}),Object(f.jsx)("br",{})]}),""!==this.state.etud.emailperso&&Object(f.jsxs)(f.Fragment,{children:[Object(f.jsxs)("a",{href:"mailto:"+this.state.etud.emailperso,children:["Mail personnel: ",this.state.etud.emailperso]}),Object(f.jsx)("br",{})]})]}):Object(f.jsx)("div",{className:"col-sm",children:"Aucun contact disponible"}),""!==this.state.etud.domicile||""!==this.state.etud.codepostaldomicile||""!==this.state.etud.villedomicile?Object(f.jsxs)("div",{className:"col-sm",children:[Object(f.jsx)("h4",{children:"Lieu de r\xe9sidence"}),"Domicile: ",this.state.etud.domicile," -"," "+this.state.etud.codepostaldomicile," ",this.state.etud.villedomicile,Object(f.jsx)("br",{})]}):Object(f.jsx)("div",{className:"col-sm",children:"Aucune information de r\xe9sidence disponible"})]}),Object(f.jsxs)("div",{id:"wrapDept",className:"col-sm",children:[""!==this.state.etud.bac||""!==this.state.etud.specialite?Object(f.jsxs)("div",{className:"col-sm",children:[Object(f.jsx)("h4",{children:"Parcours"}),"Bac ",this.state.etud.bac," ",this.state.etud.specialite,""!==this.state.etud.nomlycee||""!==this.state.etud.codepostallycee||""!==this.state.etud.villelycee?Object(f.jsxs)("div",{children:[" "+this.state.etud.nomlycee," (",this.state.etud.codepostallycee," ",this.state.etud.villelycee,")",Object(f.jsx)("br",{})]}):null]}):null,!0===this.state.loaded&&Object(f.jsxs)("div",{className:"col-sm",children:[Object(f.jsx)("h4",{children:"Formation actuelle"}),this.state.semestres.map((function(t,s){return Object(f.jsxs)("div",{children:[Object(f.jsx)("b",{children:t.titreannee}),Object(f.jsx)("br",{}),t.date_debut," - ",t.date_fin,Object(f.jsx)("br",{}),""!==e.state.etud.insemestre[s].groupes&&e.state.etud.insemestre[s].groupes&&"Groupes: "+e.state.etud.insemestre[s].groupes,Object(f.jsx)("h5",{children:"Liens"}),Object(f.jsx)(c.c,{to:{pathname:"/".concat(window.location.href.split("/")[7],"/Scolarite/").concat(t.formsemestre_id,"/GestionSem"),tab:"Absences",etudid:window.location.href.split("/")[10]},children:Object(f.jsx)(O.a,{variant:"primary",style:{"margin-right":"2px"},children:"Vers Absences"})}),Object(f.jsx)(c.c,{to:{pathname:"/".concat(window.location.href.split("/")[7],"/Scolarite/").concat(t.formsemestre_id,"/GestionSem"),tab:"Bulletin",etudid:window.location.href.split("/")[10]},children:Object(f.jsx)(O.a,{variant:"primary",style:{"margin-left":"2px"},children:"Vers bulletin"})})]})}))]})]})]})})]})}}]),s}(a.Component),X=function(){return Object(f.jsxs)(c.b,{children:[Object(f.jsx)(o.b,{exact:!0,path:"/",component:F}),Object(f.jsx)(o.b,{exact:!0,path:"/:DEPT/Scolarite",component:_}),Object(f.jsx)(o.b,{exact:!0,path:"/:DEPT/Scolarite/Etudiant/:EtudId",component:Q}),Object(f.jsx)(o.b,{exact:!0,path:"/:DEPT/Scolarite/:SEM/GestionSem",component:q})]})};s(100);window.$api_url="/ScoDoc/",i.a.render(Object(f.jsx)(c.a,{children:Object(f.jsx)(X,{})}),document.getElementById("root")),r()},29:function(e,t,s){}},[[101,1,2]]]); +//# sourceMappingURL=main.81258512.chunk.js.map \ No newline at end of file diff --git a/static/mobile/static/js/main.81258512.chunk.js.map b/static/mobile/static/js/main.81258512.chunk.js.map new file mode 100644 index 000000000..246b006ec --- /dev/null +++ b/static/mobile/static/js/main.81258512.chunk.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["reportWebVitals.js","ScoDoc/ScoNavBar.js","ScoDoc/Request.js","ScoDoc/SearchStudent.js","ScoDoc/Scolarite.js","ScoDoc/ChoixDept.js","ScoDoc/Login.js","ScoDoc/GestionSemestre/Accueil.js","ScoDoc/GestionSemestre/Absences/SaisieAbs.js","ScoDoc/GestionSemestre/Absences/SupprAbs.js","ScoDoc/GestionSemestre/Absences/JustAbs.js","ScoDoc/GestionSemestre/Absences.js","ScoDoc/GestionSemestre/Etudiants.js","ScoDoc/GestionSemestre/Bulletin.js","ScoDoc/GestionSemestre.js","ScoDoc/Etudiant.js","main.js","index.js"],"names":["reportWebVitals","onPerfEntry","Function","then","getCLS","getFID","getFCP","getLCP","getTTFB","ScoNavBar","props","state","logout","BASE_URL","window","$api_url","fetch","res","setState","catch","console","log","Navbar","bg","expand","Container","Brand","href","alt","src","width","height","className","Toggle","aria-controls","Collapse","id","Nav","Link","Button","variant","onClick","this","push","to","Component","get","url","method","verify","credentials","getJson","response","json","data","post","headers","body","SearchStudent","students","search_status","handleChangeSearch","bind","searchStudent","e","search","target","value","dept","location","split","length","toast","searched","Col","map","student","Row","label","type","onChange","result","Scolarite","dismissToast","semestres","getData","Accordion","defaultActiveKey","Card","Header","as","eventKey","Body","sem","index","etat","formsemestre_id","titre","modalite","semestre_id","anneescolaire","date_debut","date_fin","ChoixDept","depts","Login","login","pass","status","handleChangeLogin","handleChangePass","checkCredentials","preventDefault","btoa","getLogin","isMobile","document","cookie","placeholder","Accueil","semestre","resp","loading","resp_l","responsables","joined","concat","nomplogin","error","Spinner","animation","SaisieAbs","openModal","isOpen","closeModal","onFormSubmit","formData","FormData","formDataObj","Object","fromEntries","entries","reqstr","etudid","hasOwnProperty","dateDebut","dateFin","postData","form","prevProps","open","Modal","show","onHide","closeButton","Title","Form","onSubmit","Group","ControlId","Label","Control","name","Check","inline","rows","Footer","SupprAbs","date","demijournee","JustAbs","Date","toISOString","substr","defaultValue","readOnly","checked","Absences","isDelOpen","isJustOpen","abs","absjust","key","setTimeout","size","style","datedmy","matin","motif","exams","ampm","Etudiants","dat","x","i","slice","filter","etud","nom_disp","prenom","Bulletin","bltn","datue","loaded","ls","elm","decision_ue","acronyme","blob","file","URL","createObjectURL","assign","Table","responsive","colSpan","Dropdown","note","Menu","Item","min","max","rang","ninscrits","ue","module","mod","replace","code","coefficient","getPdf","GestionSemestre","selectOptions","defaulttab","defaultsel","tab","find","option","options","handleSelectChange","Tabs","Tab","title","Etudiant","formation","insemestre","nomprenom","photo_url","telephone","telephonemobile","email","emailperso","domicile","codepostaldomicile","villedomicile","bac","specialite","nomlycee","codepostallycee","villelycee","titreannee","groupes","pathname","Main","exact","path","component","ReactDOM","render","getElementById"],"mappings":"yJAYeA,EAZS,SAAAC,GAClBA,GAAeA,aAAuBC,UACxC,8BAAqBC,MAAK,YAAkD,IAA/CC,EAA8C,EAA9CA,OAAQC,EAAsC,EAAtCA,OAAQC,EAA8B,EAA9BA,OAAQC,EAAsB,EAAtBA,OAAQC,EAAc,EAAdA,QAC3DJ,EAAOH,GACPI,EAAOJ,GACPK,EAAOL,GACPM,EAAON,GACPO,EAAQP,O,8FC6CCQ,E,kDA7CX,WAAYC,GAAQ,IAAD,8BACf,cAAMA,IACDC,MAAQ,CACTC,QAAQ,GAHG,E,0CAOnB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GAAOuK,QAEpD,uCACA,cAAC,IAAD,CAAMzN,GAAI,CACN0N,SAAS,IAAD,OAAMxP,OAAOuD,SAAS1C,KAAK2C,MAAM,KAAK,GAAtC,sBAAsDuB,EAAIG,gBAA1D,eACR2I,IAAK,WACL5F,OAAQjI,OAAOuD,SAAS1C,KAAK2C,MAAM,KAAK,KAH5C,SAKI,cAAC/B,EAAA,EAAD,CAAQC,QAAQ,UAAUiJ,MAAO,CAAC,eAAgB,OAAlD,6BAEJ,cAAC,IAAD,CAAM7I,GAAI,CACN0N,SAAS,IAAD,OAAMxP,OAAOuD,SAAS1C,KAAK2C,MAAM,KAAK,GAAtC,sBAAsDuB,EAAIG,gBAA1D,eACR2I,IAAK,WACL5F,OAAQjI,OAAOuD,SAAS1C,KAAK2C,MAAM,KAAK,KAH5C,SAKI,cAAC/B,EAAA,EAAD,CAAQC,QAAQ,UAAUiJ,MAAO,CAAC,cAAe,OAAjD,qD,GAtH7B5I,aCiBR0N,EAjBF,WACT,OAOI,cANA,CAMC,IAAD,WACI,cAAC,IAAD,CAAOC,OAAK,EAACC,KAAK,IAAIC,UAAWjK,IACjC,cAAC,IAAD,CAAO+J,OAAK,EAACC,KAAK,mBAAmBC,UAAWxL,IAChD,cAAC,IAAD,CAAOsL,OAAK,EAACC,KAAK,oCAAoCC,UAAWvB,IACjE,cAAC,IAAD,CAAOqB,OAAK,EAACC,KAAK,mCAAmCC,UAAWnC,Q,OCb5EzN,OAAOC,SAAW,WAElB4P,IAASC,OACP,cAAC,IAAD,UACI,cAAC,EAAD,MAEJxJ,SAASyJ,eAAe,SAM1B7Q,K","file":"static/js/main.81258512.chunk.js","sourcesContent":["const reportWebVitals = onPerfEntry => {\n if (onPerfEntry && onPerfEntry instanceof Function) {\n import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {\n getCLS(onPerfEntry);\n getFID(onPerfEntry);\n getFCP(onPerfEntry);\n getLCP(onPerfEntry);\n getTTFB(onPerfEntry);\n });\n }\n};\n\nexport default reportWebVitals;\n","import React, {Component} from \"react\";\r\nimport {Nav, Navbar, Button, Container} from 'react-bootstrap'\r\nimport { Redirect } from 'react-router-dom';\r\nimport './Style.css'\r\n\r\n/** Barre de navigation */\r\nclass ScoNavBar extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n logout: false\r\n };\r\n }\r\n\r\n logout() {\r\n let BASE_URL = window.$api_url\r\n\r\n fetch(BASE_URL + \"acl_users/logout\")\r\n .then(res => {this.setState({logout: true})})\r\n .catch(console.log)\r\n }\r\n\r\n render() {\r\n return (\r\n \r\n \r\n \r\n {' '}\r\n ScoDoc\r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.state.logout === true &&\r\n \r\n }\r\n \r\n )\r\n }\r\n}\r\n\r\nexport default ScoNavBar","/**\r\n * Lance une requête GET a l'URL donnée en paramètre et retourne une Promise.\r\n * @param url {String} - URL de la requête\r\n * @returns {Promise}\r\n */\r\nexport function get(url) {\r\n return (\r\n fetch(url, {\r\n method: 'GET',\r\n verify: false,\r\n credentials: 'include',\r\n })\r\n )\r\n}\r\n\r\n/**\r\n * Lance une requête GET a l'URL donnée en paramètre et retourne une Promise.\r\n * Dans ce cas particulier, on ajoute un header d'authentification.\r\n * @param url {String} - URL de la requête\r\n * @param login {String} - Identifiant\r\n * @param pass {String} - Mot de passe\r\n * @returns {Promise}\r\n */\r\nexport function getLogin(url, login, pass) {\r\n return (\r\n fetch(url, {\r\n method: 'GET',\r\n verify: false,\r\n credentials: 'include',\r\n headers: {\r\n 'Content-Type': 'application/x-www-form-urlencoded',\r\n 'Authorization': 'Basic ' + btoa(login + \":\" + pass)\r\n },\r\n })\r\n )\r\n}\r\n\r\n/**\r\n * Lance une requête GET a l'URL donnée en paramètre et retourne les données JSON d'une Promise.\r\n * @param url {String} - URL de la requête\r\n * @returns {Promise<{data: any}>}\r\n */\r\nexport function getJson(url) {\r\n return get(url)\r\n .then(response => response.json()\r\n .then(data => ({data: data}))\r\n .then(res => {return res})\r\n );\r\n}\r\n\r\n/**\r\n * Lance une requête POST a l'URL donnée en paramètre et retourne une Promise.\r\n * @param url {String} - URL de la requête\r\n * @param data {String} - Données de la requête au format \"param1=val1¶m2=val2...\"\r\n * @returns {Promise}\r\n */\r\nexport function post(url, data) {\r\n return (\r\n fetch(url, {\r\n method: 'POST',\r\n verify: false,\r\n credentials: 'include',\r\n headers: {'Content-Type': 'application/x-www-form-urlencoded'},\r\n body: data\r\n })\r\n )\r\n}","import React, {Component} from \"react\";\r\nimport {Link} from \"react-router-dom\";\r\nimport {Row, Col} from \"react-bootstrap\"\r\nimport {getJson} from \"./Request\";\r\n\r\n/** Module de recherche d'étudiant */\r\nclass SearchStudent extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n students: [],\r\n // Status possibles:\r\n // 0: Vide - 1: Pas de resultat - 2: Un ou plusieurs resultats\r\n search_status: 0,\r\n };\r\n this.handleChangeSearch = this.handleChangeSearch.bind(this)\r\n this.searchStudent = this.searchStudent.bind(this);\r\n }\r\n\r\n\r\n handleChangeSearch(e) {\r\n this.setState({ search: e.target.value });\r\n }\r\n\r\n /**\r\n * Lance une recherche de l'étudiant depuis l'API\r\n * @param search {String} - Texte recherché\r\n */\r\n searchStudent(search) {\r\n let dept = window.location.href.split('/')[7]\r\n let BASE_URL = window.$api_url\r\n getJson(BASE_URL + dept + '/Scolarite/Notes/search_etud_by_name?term=' + search +'&format=json')\r\n .then(res => {\r\n this.setState({ students: res.data });\r\n if (this.state.students.length === 0) {\r\n this.setState({search_status: 1, toast: true});\r\n } else {\r\n this.setState({search_status: 2, toast: false});\r\n }\r\n })\r\n this.setState({searched: true})\r\n }\r\n\r\n /**\r\n * Presentation du résultat\r\n * @returns {JSX.Element} - Resultat au format JSX\r\n */\r\n result() {\r\n if (this.state.toast === true) {\r\n return (\r\n
\r\n Aucun étudiant trouvé\r\n
\r\n )\r\n } else if (this.state.search_status === 2) {\r\n return (\r\n \r\n {this.state.students.map((student) => {\r\n return (\r\n \r\n \r\n {student.label}\r\n \r\n \r\n )\r\n })}\r\n \r\n )\r\n }\r\n }\r\n\r\n render() {\r\n return (\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n {this.result()}\r\n
\r\n )\r\n }\r\n}\r\n\r\nexport default SearchStudent","import React, {Component} from \"react\";\r\nimport {Link} from \"react-router-dom\";\r\nimport './Style.css'\r\nimport ScoNavBar from \"./ScoNavBar\";\r\nimport SearchStudent from './SearchStudent'\r\nimport {Accordion, Card, Button} from 'react-bootstrap'\r\nimport {getJson} from \"./Request\";\r\n\r\n/** Page de choix du semestre */\r\nclass Scolarite extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n semestres: [],\r\n students: [],\r\n toast: false\r\n };\r\n this.dismissToast = this.dismissToast.bind(this);\r\n }\r\n\r\n componentWillMount() {\r\n this.getData()\r\n }\r\n\r\n /**\r\n * Recupère la liste des semestres depuis l'API\r\n */\r\n getData () {\r\n let dept = window.location.href.split('/')[7]\r\n let BASE_URL = window.$api_url\r\n getJson(BASE_URL + dept + '/Scolarite/Notes/formsemestre_list?format=json')\r\n .then(res => {\r\n this.setState({ semestres: res.data });\r\n })\r\n }\r\n\r\n dismissToast = () => this.setState({toast: false})\r\n\r\n render() {\r\n return (\r\n
\r\n \r\n
\r\n

Scolarité

\r\n
\r\n\r\n \r\n \r\n \r\n \r\n Semestres en cours\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n {this.state.semestres.map((sem, index) => {\r\n if (sem.etat === \"1\") {\r\n return (\r\n
\r\n \r\n

{sem.titre} [{sem.modalite}]

\r\n

Semestre {sem.semestre_id} - Année {sem.anneescolaire} [{sem.date_debut} - {sem.date_fin}]

\r\n \r\n
\r\n )\r\n }\r\n })}\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n Semestres passés\r\n \r\n \r\n \r\n \r\n {this.state.semestres.map((sem, index) => {\r\n if (sem.etat !== \"1\") {\r\n return (\r\n
\r\n \r\n

{sem.titre} [{sem.modalite}]

\r\n

Semestre {sem.semestre_id} - Année {sem.anneescolaire} [{sem.date_debut} - {sem.date_fin}]

\r\n \r\n
\r\n )\r\n }\r\n })}\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n Recherche étudiant\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default Scolarite;","import React, {Component} from \"react\";\r\nimport {Link} from \"react-router-dom\";\r\nimport './Style.css'\r\nimport {getJson} from './Request'\r\n\r\n/** Page de choix du département */\r\nclass ChoixDept extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n // Liste des départements disponibles pour l'utilisateur\r\n depts: [],\r\n };\r\n }\r\n\r\n componentWillMount() {\r\n this.getData()\r\n }\r\n\r\n /**\r\n * Recupère la liste des départements depuis l'API\r\n */\r\n getData() {\r\n let BASE_URL = window.$api_url\r\n getJson(BASE_URL + 'list_depts?format=json')\r\n .then(res => {\r\n this.setState({ depts: res.data })\r\n });\r\n }\r\n\r\n render() {\r\n return (\r\n
\r\n

Choix du département

\r\n
\r\n
\r\n {this.state.depts.map((dept, index) => {\r\n return (\r\n
\r\n \r\n Département {dept}\r\n \r\n
\r\n )\r\n },)}\r\n
\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default ChoixDept","import React, {Component} from \"react\";\r\nimport { isMobile } from 'react-device-detect';\r\nimport './Style.css'\r\nimport ChoixDept from \"./ChoixDept\";\r\nimport ScoNavBar from \"./ScoNavBar\";\r\nimport {getLogin} from \"./Request\";\r\n\r\n/** Page de Login */\r\nclass Login extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n login: \"\",\r\n pass: \"\",\r\n status: 0,\r\n };\r\n this.handleChangeLogin = this.handleChangeLogin.bind(this);\r\n this.handleChangePass = this.handleChangePass.bind(this);\r\n this.checkCredentials = this.checkCredentials.bind(this)\r\n }\r\n\r\n handleChangeLogin(e) {\r\n this.setState({ login: e.target.value });\r\n }\r\n\r\n handleChangePass(e) {\r\n this.setState({ pass: e.target.value });\r\n }\r\n\r\n /**\r\n * Verifie la validité des identifiants depuis l'API\r\n * @param e {event}\r\n */\r\n checkCredentials(e) {\r\n e.preventDefault();\r\n\r\n let login = this.state.login\r\n let pass = this.state.pass\r\n\r\n let BASE_URL = window.$api_url\r\n\r\n getLogin(BASE_URL, login, pass)\r\n .then(res => {\r\n this.setState({ status: res[\"status\"] });\r\n })\r\n .catch(console.log)\r\n }\r\n\r\n\r\n render() {\r\n return (\r\n
\r\n {!isMobile &&\r\n // TODO: Redirection mobile/desktop\r\n \r\n }\r\n {(this.state.status !== 0 && this.state.status !== 200) &&\r\n
\r\n
\r\n

{\"⚠️\"} Login ou mot de passe incorrect

\r\n
\r\n
\r\n }\r\n {document.cookie === \"\" &&\r\n
\r\n
\r\n

Connexion a ScoDoc

\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n }\r\n
\r\n {document.cookie !== \"\" &&\r\n \r\n }{document.cookie !== \"\" &&\r\n \r\n }\r\n
\r\n
\r\n )\r\n }\r\n}\r\n\r\nexport default Login","import React, {Component} from \"react\";\r\nimport '../Style.css'\r\nimport {getJson} from \"../Request\";\r\nimport {Spinner} from \"react-bootstrap\";\r\n\r\n/** Page d'accueil de la gestion du semestre */\r\nclass Accueil extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n semestre: {},\r\n resp: [],\r\n loading: true\r\n };\r\n }\r\n\r\n componentWillMount() {\r\n this.setState({loading: true})\r\n this.getData()\r\n }\r\n\r\n /**\r\n * Recupère les données du semestre selectionné depuis l'API\r\n */\r\n getData() {\r\n let dept = window.location.href.split('/')[7]\r\n let sem = window.location.href.split('/')[9]\r\n let BASE_URL = window.$api_url\r\n // Recuperation des infos de semestre\r\n getJson(BASE_URL + dept + '/Scolarite/Notes/formsemestre_list?format=json&formsemestre_id=' + sem)\r\n .then(res => {\r\n this.setState({ semestre: res.data[0], resp_l: res.data[0].responsables});\r\n // Recuperation des noms complets des responsables\r\n res.data[0].responsables.map((resp) =>\r\n getJson(BASE_URL + dept + '/Scolarite/Users/user_info?format=json&user_name=' + resp)\r\n .then(res => {\r\n let joined = this.state.resp.concat(res.data.nomplogin)\r\n this.setState({resp: joined, loading: false})\r\n })\r\n .catch(error => {\r\n this.setState({resp: this.state.resp_l, loading: false})\r\n })\r\n )\r\n })\r\n\r\n }\r\n\r\n render() {\r\n return (\r\n
\r\n {this.state.loading === false ?\r\n

{this.state.semestre.titre}
\r\n Semestre {this.state.semestre.semestre_id} en {this.state.semestre.modalite}
\r\n {this.state.resp.length === 1 ? \"Responsable: (\" : \"Responsables (\"}\r\n {this.state.resp.map((resp, index) => {\r\n if (index !== this.state.resp.length-1) {return (resp + \", \")}\r\n else {return (resp + \")\")}\r\n })}\r\n

\r\n :\r\n // En cas de chargement\r\n \r\n }\r\n
\r\n )\r\n }\r\n}\r\n\r\nexport default Accueil","import React, {Component} from \"react\";\r\nimport {Button, Col, Form, Modal} from \"react-bootstrap\";\r\nimport {post} from \"../../Request\";\r\n\r\n/** Module de saisie des absences */\r\nclass SaisieAbs extends Component {\r\n constructor(props){\r\n super(props)\r\n this.state = {\r\n isOpen: false,\r\n form: {},\r\n error: false,\r\n etudid: \"\"\r\n }\r\n }\r\n\r\n openModal = () => this.setState({ isOpen: true });\r\n closeModal = () => this.setState({ isOpen: false });\r\n\r\n componentDidUpdate(prevProps) {\r\n if (prevProps.open !== this.props.open) {\r\n this.setState({etudid: this.props.etudid})\r\n if (this.props.open === true) {\r\n this.setState({isOpen: true})\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Gestion des données du formulaire\r\n * @param e {Event}\r\n */\r\n onFormSubmit = e => {\r\n // Traitement du formulaire\r\n // Empeche le bouton de rediriger ou actualiser la page\r\n e.preventDefault()\r\n // Recuperation des valeurs\r\n const formData = new FormData(e.target), formDataObj = Object.fromEntries(formData.entries())\r\n\r\n let reqstr = \"etudid=\" + this.state.etudid + \"&datedebut=\"\r\n\r\n if (formDataObj.hasOwnProperty('dateDebut') && formDataObj['dateDebut'] !== \"\") {\r\n let dateDebut = formDataObj['dateDebut'].split(\"-\")\r\n dateDebut = dateDebut[2] + \"/\" + dateDebut[1] + \"/\" + dateDebut[0]\r\n reqstr += dateDebut\r\n if (formDataObj.hasOwnProperty('dateFin') && formDataObj['dateFin'] !== \"\") {\r\n let dateFin = formDataObj['dateFin'].split(\"-\")\r\n dateFin = dateFin[2] + \"/\" + dateFin[1] + \"/\" + dateFin[0]\r\n reqstr += \"&datefin=\" + dateFin\r\n } else {\r\n reqstr += \"&datefin=\" + dateDebut\r\n }\r\n if (formDataObj.hasOwnProperty('duree')) {\r\n reqstr += \"&demijournee=\" + formDataObj['duree']\r\n }\r\n if (formDataObj.hasOwnProperty('estjust') && formDataObj.hasOwnProperty('motif') && formDataObj['motif'] !== \"\") {\r\n reqstr += \"&estjust=True&description=\" + formDataObj['motif']\r\n }\r\n this.postData(reqstr)\r\n } else {\r\n this.setState({error: true})\r\n }\r\n }\r\n\r\n /**\r\n * Envoie une requête POST a l'API\r\n * @param data {String} - Données à envoyer sous la forme param1=val1¶m2=val2...\r\n */\r\n postData(data) {\r\n let dept = window.location.href.split('/')[7]\r\n let BASE_URL = window.$api_url\r\n post(BASE_URL + dept + \"/Scolarite/Absences/doSignaleAbsence\", data)\r\n .then(response => {\r\n if (response.status === 200) {\r\n // Fermeture du modal\r\n this.closeModal()\r\n }\r\n });\r\n }\r\n\r\n render() {\r\n return (\r\n <>\r\n \r\n \r\n Saisie d'absence\r\n \r\n\r\n \r\n {this.state.error &&\r\n Erreur: La date de début ne doit pas être vide\r\n }\r\n
\r\n \r\n \r\n Date début\r\n \r\n \r\n \r\n Date fin (Optionnel)\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Motif\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n\r\n \r\n \r\n
\r\n \r\n )\r\n }\r\n}\r\n\r\nexport default SaisieAbs","import React, {Component} from \"react\";\r\nimport {Button, Modal} from \"react-bootstrap\";\r\nimport {post} from \"../../Request\";\r\n\r\n/** Module de suppression des absences */\r\nclass SupprAbs extends Component {\r\n constructor(props){\r\n super(props)\r\n this.state = {\r\n isOpen: false,\r\n etudid: \"\",\r\n }\r\n }\r\n\r\n openModal = () => this.setState({ isOpen: true });\r\n closeModal = () => this.setState({ isOpen: false });\r\n\r\n componentDidUpdate(prevProps) {\r\n if (prevProps.open !== this.props.open) {\r\n this.setState({etudid: this.props.etudid})\r\n if (this.props.open === true) {\r\n this.setState({isOpen: true})\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Envoie une requête POST a l'API\r\n * @param data {String} - Données à envoyer sous la forme param1=val1¶m2=val2...\r\n */\r\n postData() {\r\n let dept = window.location.href.split('/')[7]\r\n let BASE_URL = window.$api_url\r\n let data = \"datedebut=\" + this.props.data.date + \"&datefin=\" + this.props.data.date +\r\n \"&demijournee=\" + this.props.data.demijournee + \"&etudid=\" + this.state.etudid\r\n post(BASE_URL + dept + \"/Scolarite/Absences/doAnnuleAbsence\", data)\r\n // Fermeture du modal\r\n this.setState({isOpen: false})\r\n }\r\n\r\n render() {\r\n return (\r\n <>\r\n \r\n \r\n Suppression d'absence\r\n \r\n \r\n

Etes-vous sûr.e de vouloir supprimer cette absence ?

\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n \r\n )\r\n }\r\n}\r\n\r\nexport default SupprAbs","import React, {Component} from \"react\";\r\nimport {Button, Col, Form, Modal} from \"react-bootstrap\";\r\nimport {post} from \"../../Request\";\r\n\r\n/** Module de justification des absences */\r\nclass JustAbs extends Component {\r\n constructor(props){\r\n super(props)\r\n this.state = {\r\n isOpen: false,\r\n etudid: \"\",\r\n date: \"\"\r\n }\r\n }\r\n\r\n openModal = () => this.setState({ isOpen: true });\r\n closeModal = () => this.setState({ isOpen: false });\r\n\r\n componentDidUpdate(prevProps) {\r\n if (prevProps.open !== this.props.open) {\r\n this.setState({etudid: this.props.etudid})\r\n if (this.props.open === true) {\r\n this.setState({isOpen: true})\r\n }\r\n // Recuperation et conversion de la date par defaut de l'absence (Format ISO demandé par les form Bootstrap)\r\n let date = this.props.data.date.split(\"/\")\r\n date = new Date(date[2] + \"-\" + date[1] + \"-\" + date[0])\r\n date = date.toISOString().substr(0,10);\r\n this.setState({date: date})\r\n }\r\n }\r\n\r\n /**\r\n * Envoie une requête POST a l'API\r\n * @param data {String} - Données à envoyer sous la forme param1=val1¶m2=val2...\r\n */\r\n postData(data) {\r\n let dept = window.location.href.split('/')[7]\r\n let BASE_URL = window.$api_url\r\n post(BASE_URL + dept + \"/Scolarite/Absences/doJustifAbsence\", data)\r\n // Fermeture du modal\r\n this.setState({isOpen: false})\r\n }\r\n\r\n /**\r\n * Gestion des données du formulaire\r\n * @param e {Event}\r\n */\r\n onFormSubmit = e => {\r\n // Traitement du formulaire\r\n // Empeche le bouton de rediriger ou actualiser la page\r\n e.preventDefault()\r\n // Recuperation des valeurs\r\n const formData = new FormData(e.target), formDataObj = Object.fromEntries(formData.entries())\r\n\r\n let reqstr = \"etudid=\" + this.state.etudid + \"&datedebut=\" + this.props.data.date\r\n\r\n if (formDataObj.hasOwnProperty('dateFin') && formDataObj['dateFin'] !== \"\") {\r\n let dateFin = formDataObj['dateFin'].split(\"-\")\r\n dateFin = dateFin[2] + \"/\" + dateFin[1] + \"/\" + dateFin[0]\r\n reqstr += \"&datefin=\" + dateFin\r\n } else {\r\n reqstr += \"&datefin=\" + this.props.data.date\r\n } if (formDataObj.hasOwnProperty('duree')) {\r\n reqstr += \"&demijournee=\" + formDataObj['duree']\r\n } else {\r\n reqstr += \"&demijournee=\" + this.props.data.demijournee\r\n } if (formDataObj.hasOwnProperty('motif') && formDataObj['motif'] !== \"\") {\r\n reqstr += \"&description=\" + formDataObj['motif']\r\n }\r\n this.postData(reqstr)\r\n }\r\n\r\n render() {\r\n return (\r\n <>\r\n \r\n \r\n Suppression d'absence\r\n \r\n \r\n
\r\n \r\n \r\n Date début\r\n \r\n \r\n \r\n Date fin (Optionnel)\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Motif\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n )\r\n }\r\n}\r\n\r\nexport default JustAbs","import React, {Component} from \"react\";\r\nimport {Button, Spinner, Col} from 'react-bootstrap'\r\nimport '../Style.css'\r\nimport SaisieAbs from \"./Absences/SaisieAbs\";\r\nimport SupprAbs from \"./Absences/SupprAbs\";\r\nimport JustAbs from \"./Absences/JustAbs\";\r\nimport {getJson} from \"../Request\";\r\n\r\n/** Page de gestion des absences */\r\nclass Absences extends Component {\r\n constructor(props){\r\n super(props)\r\n this.state = {\r\n // Gestion des fenetres modales\r\n // Ajout d'absences\r\n isOpen: false,\r\n // Suppression\r\n isDelOpen: false,\r\n // Justification\r\n isJustOpen: false,\r\n // Données de la liste des absences\r\n abs: [],\r\n absjust: [],\r\n // Données d'une absence selectionnée\r\n data: {},\r\n // En cours de recuperation de données\r\n loading: false\r\n }\r\n }\r\n\r\n // Recuperation des données en cas de changement de props (dans notre cas, changement d'étudiant.e)\r\n componentDidUpdate(prevProps) {\r\n if (prevProps.id !== this.props.id) {\r\n this.setState({loading: true})\r\n this.getData();\r\n }\r\n }\r\n\r\n // Recuperation des données lors du chargement de la page si un étudiant est selectionné\r\n componentDidMount() {\r\n if (this.props.id !== \"\") {this.getData()}\r\n }\r\n\r\n /**\r\n * Gère l'ouverture des Modal\r\n * @param key {String} - Correspond au type de modal [isOpen, isDelOpen, isJustOpen]\r\n * @param data {Object} - Objet contenant les données à transmettre\r\n */\r\n openModal(key, data) {\r\n this.setState({[key]: true}, () => setTimeout(() => {\r\n this.setState({[key]: false})\r\n }, 500))\r\n if (data) {this.setState({data: data})}\r\n }\r\n\r\n /**\r\n * Recupère les données d'absences depuis l'API\r\n */\r\n getData() {\r\n let dept = window.location.href.split('/')[7]\r\n let BASE_URL = window.$api_url\r\n if (this.state.id !== \"\") {\r\n // Recuperation des absences non-justifiées\r\n getJson(BASE_URL + dept + \"/Scolarite/Absences/ListeAbsEtud?format=json&absjust_only=0&etudid=\" + this.props.id)\r\n .then(res => this.setState({abs: res.data}));\r\n // Recuperation des absences justifiées\r\n getJson(BASE_URL + dept + \"/Scolarite/Absences/ListeAbsEtud?format=json&absjust_only=1&etudid=\" + this.props.id)\r\n .then(res => this.setState({absjust: res.data, loading: false}));\r\n }\r\n }\r\n\r\n render() {\r\n return (\r\n
\r\n {this.props.id !== \"\" &&\r\n // Gestion du modal de saisie\r\n \r\n } {this.props.id !== \"\" &&\r\n // Gestion du modal de suppression\r\n \r\n } {this.props.id !== \"\" &&\r\n // Gestion du modal de justification\r\n \r\n }\r\n

Gestion des absences

\r\n {this.props.name !== \"\" &&\r\n
\r\n

Absences de {this.props.name + \" \"}\r\n \r\n \r\n

\r\n {this.state.loading === true &&\r\n \r\n }\r\n {(this.state.abs.length + this.state.absjust.length === 0 && this.props.name !== \"\" && this.state.loading === false) &&\r\n
Aucune absence de l'étudiant.e
\r\n }\r\n {this.state.abs.map((abs) => {\r\n return (\r\n
\r\n \r\n
{abs.datedmy} | {abs.matin}
\r\n {abs.motif !== \"\" &&\r\n Motif: {abs.motif}\r\n } {abs.exams !== \"\" &&\r\n Exam a rattraper: {abs.exams}\r\n }\r\n \r\n \r\n {abs.motif === \"\" &&\r\n \r\n }\r\n \r\n \r\n
\r\n )\r\n })}\r\n {this.state.absjust.map((abs) => {\r\n return (\r\n
\r\n \r\n
{abs.datedmy} | {abs.matin}
\r\n {abs.motif !== \"\" &&\r\n Motif: {abs.motif}\r\n } {abs.exams !== \"\" &&\r\n Exam a rattraper: {abs.exams}\r\n }\r\n \r\n \r\n \r\n \r\n
\r\n )\r\n })}\r\n
\r\n }\r\n
\r\n )\r\n }\r\n}\r\n\r\nexport default Absences","import React, {Component} from \"react\";\r\nimport {LazyLoadImage} from 'react-lazy-load-image-component';\r\nimport '../Style.css'\r\nimport {Link} from \"react-router-dom\";\r\nimport {getJson} from \"../Request\";\r\nimport {Spinner} from \"react-bootstrap\";\r\n\r\n/** Page de présentation des étudiants inscrits au semestre */\r\nclass Etudiants extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n // Liste des étudiants inscrits au semestre\r\n students: [],\r\n };\r\n }\r\n\r\n componentWillMount() {\r\n // this.getData()\r\n }\r\n\r\n componentDidUpdate(prevProps) {\r\n if (prevProps !== this.props) {\r\n if (this.props.students.length) {\r\n const dat = this.props.students.map((x,i) => {\r\n return i % 2 === 0 ? this.props.students.slice(i, i+2) : null;\r\n }).filter(x => x != null);\r\n this.setState({ students: dat});\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Recupère la liste des étudiants inscrits au semestre depuis l'API\r\n */\r\n getData() {\r\n let dept = window.location.href.split('/')[7]\r\n let sem = window.location.href.split('/')[9]\r\n let BASE_URL = window.$api_url\r\n getJson(BASE_URL + dept + '/Scolarite/Notes/groups_view?with_codes=1&format=json&formsemestre_id=' + sem)\r\n .then(res => {\r\n // Gestion des données sous forme de tableau a deux colonnes\r\n const dat = res.data.map((x,i) => {\r\n return i % 2 === 0 ? res.data.slice(i, i+2) : null;\r\n }).filter(x => x != null);\r\n this.setState({ students: dat});\r\n })\r\n }\r\n\r\n render() {\r\n return (\r\n
\r\n

Liste des étudiants

\r\n
\r\n {this.state.students.length !== 0 ?\r\n this.state.students.map((students) => {\r\n // Creation du tableau de deux colonnes\r\n return (\r\n
\r\n {students.map((etud, index) => {\r\n return (\r\n
\r\n \r\n {/* Recuperation de la photo de l'etudiant */}\r\n {' '}
\r\n {etud.nom_disp} {etud.prenom}\r\n \r\n
\r\n )\r\n })}\r\n
\r\n )\r\n })\r\n :\r\n
\r\n \r\n
\r\n }\r\n
\r\n
\r\n )\r\n }\r\n}\r\n\r\nexport default Etudiants","import React, {Component} from \"react\";\r\nimport {Table, Button, Dropdown, Spinner} from \"react-bootstrap\"\r\nimport '../Style.css'\r\nimport {get, getJson} from \"../Request\";\r\n\r\n/** Page de présentation des bulletins étudiants */\r\nclass Bulletin extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n bltn: {},\r\n datue: {},\r\n loaded: false,\r\n loading: false\r\n };\r\n this.getData = this.getData.bind(this);\r\n }\r\n\r\n /**\r\n * Recupère les données de bulletin depuis l'API\r\n */\r\n getData() {\r\n let dept = window.location.href.split('/')[7]\r\n let sem = window.location.href.split('/')[9]\r\n let BASE_URL = window.$api_url\r\n getJson(BASE_URL + dept + '/Scolarite/Notes/formsemestre_bulletinetud?formsemestre_id=' + sem +'&etudid=' +\r\n this.props.id +'&format=json')\r\n .then(res => {\r\n // Recuperation des données du bulletin\r\n this.setState({ bltn: res.data }, () => {\r\n // Recuperation d'un tableau CodeUE | NomUE\r\n let ls = {}\r\n for (let elm in this.state.bltn.decision_ue) {\r\n elm = this.state.bltn.decision_ue[elm]\r\n ls[elm.acronyme] = elm.titre\r\n }\r\n this.setState({datue: ls}, () => {\r\n // Marquage du bulletin comme \"chargé\"\r\n this.setState({loaded: true, loading: false})\r\n })\r\n })\r\n })\r\n }\r\n\r\n /**\r\n * Recupère les données de bulletin en tant que \"blob\" pour un PDF depuis l'API\r\n */\r\n getPdf() {\r\n let BASE_URL = window.$api_url\r\n let dept = window.location.href.split('/')[7]\r\n let sem = window.location.href.split('/')[9]\r\n get(BASE_URL + dept + \"/Scolarite/Notes/formsemestre_bulletinetud?formsemestre_id=\" + sem +\r\n \"&etudid=\" + this.props.id + \"&format=pdf&version=selectedevals\")\r\n .then(res => res.blob())\r\n .then(blob => {\r\n let file = window.URL.createObjectURL(blob);\r\n window.location.assign(file);\r\n });\r\n }\r\n\r\n // Recuperation des données en cas de changement de props (dans notre cas, changement d'étudiant.e)\r\n componentDidUpdate(prevProps) {\r\n if (prevProps.id !== this.props.id) {\r\n this.setState({loading: true})\r\n this.getData();\r\n }\r\n }\r\n\r\n // Recuperation des données lors du chargement de la page si un étudiant est selectionné\r\n componentDidMount() {\r\n if (this.props.id !== \"\") {this.getData()}\r\n }\r\n\r\n render() {\r\n return (\r\n
\r\n
\r\n

Bulletins de notes

\r\n
\r\n {this.state.loading === true && this.state.loaded === false &&\r\n \r\n }\r\n {this.state.loaded === true &&\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.state.bltn.ue.map((ue) => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n {ue.module.map((mod) => {\r\n return (\r\n \r\n \r\n \r\n \r\n )\r\n })}\r\n \r\n )\r\n })}\r\n
\r\n Note/20
Moyenne générale\r\n \r\n \r\n {this.state.bltn.note.value}\r\n \r\n\r\n \r\n Min: {this.state.bltn.note.min}\r\n Max: {this.state.bltn.note.max}\r\n {this.state.bltn.hasOwnProperty('rang') &&\r\n Classement: {this.state.bltn.rang.value}/{this.state.bltn.rang.ninscrits}\r\n }\r\n \r\n \r\n
{ue.acronyme} - {this.state.datue[ue.acronyme]}\r\n \r\n \r\n {ue.note.value}\r\n \r\n\r\n \r\n Min: {ue.note.min}\r\n Max: {ue.note.max}\r\n {ue.hasOwnProperty('rang') &&\r\n Classement: {ue.rang}/{this.state.bltn.rang.ninscrits}\r\n }\r\n \r\n \r\n
{mod.titre.replace(\"'\", \"'\")}\r\n \r\n \r\n {mod.note.value}\r\n \r\n\r\n \r\n Min: {mod.note.min}\r\n Max: {mod.note.max}\r\n {mod.hasOwnProperty('rang') &&\r\n Classement: {mod.rang.value}/{this.state.bltn.rang.ninscrits}\r\n }\r\n Coefficient: {mod.coefficient}\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n }\r\n
\r\n )\r\n }\r\n}\r\n\r\nexport default Bulletin","import React, {Component} from \"react\";\r\nimport {Tabs, Tab} from \"react-bootstrap\"\r\nimport Accueil from \"./GestionSemestre/Accueil\";\r\nimport Absences from \"./GestionSemestre/Absences\";\r\nimport Etudiants from \"./GestionSemestre/Etudiants\";\r\nimport ScoNavBar from \"./ScoNavBar\";\r\nimport Bulletin from \"./GestionSemestre/Bulletin\";\r\nimport Select from \"react-select\";\r\nimport {getJson} from \"./Request\";\r\n\r\n/** Page de gestion du semestre */\r\nclass GestionSemestre extends Component {\r\n constructor(props){\r\n super(props)\r\n this.state = {\r\n selectOptions: [],\r\n id: \"\",\r\n name: '',\r\n defaulttab: \"Accueil\",\r\n defaultsel: \"\"\r\n }\r\n }\r\n\r\n componentWillMount() {\r\n this.getData()\r\n\r\n if (this.props.location.tab) {\r\n this.setState({defaulttab: this.props.location.tab, defaultsel: this.props.location.etudid,\r\n id: this.props.location.etudid, name: this.state.selectOptions.find(option => option.value === this.state.id)\r\n })\r\n }\r\n }\r\n\r\n /**\r\n * Recupère la liste des étudiants inscrits au semestre pour le Select depuis l'API\r\n */\r\n getData() {\r\n let dept = window.location.href.split('/')[7]\r\n let sem = window.location.href.split('/')[9]\r\n let BASE_URL = window.$api_url\r\n getJson(BASE_URL + dept + '/Scolarite/Notes/groups_view?with_codes=1&format=json&formsemestre_id=' + sem)\r\n .then(res => {\r\n this.setState({students: res.data})\r\n // Création d'une liste pour le select\r\n res.data.map((student) => {\r\n let joined = this.state.selectOptions.concat({label: student.nom_disp + \" \" + student.prenom, value: student.etudid});\r\n this.setState({selectOptions: joined})\r\n })\r\n })\r\n }\r\n\r\n handleSelectChange(e){\r\n this.setState({id:e.value, name:e.label})\r\n }\r\n\r\n render() {\r\n return (\r\n
\r\n \r\n
\r\n
\r\n {/* Selection de l'étudiant pour les sous-composants */}\r\n
\r\n Choix de l'étudiant\r\n \r\n
\r\n \r\n
\r\n
\r\n {this.result()}\r\n
\r\n )\r\n }\r\n}\r\n\r\nexport default SearchStudent","import React, {Component} from \"react\";\r\nimport {Link} from \"react-router-dom\";\r\nimport './Style.css'\r\nimport ScoNavBar from \"./ScoNavBar\";\r\nimport SearchStudent from './SearchStudent'\r\nimport {Accordion, Card, Button} from 'react-bootstrap'\r\nimport {getJson} from \"./Request\";\r\n\r\n/** Page de choix du semestre */\r\nclass Scolarite extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n semestres: [],\r\n students: [],\r\n toast: false\r\n };\r\n this.dismissToast = this.dismissToast.bind(this);\r\n }\r\n\r\n componentWillMount() {\r\n this.getData()\r\n }\r\n\r\n /**\r\n * Recupère la liste des semestres depuis l'API\r\n */\r\n getData () {\r\n let dept = window.location.href.split('/')[7]\r\n let BASE_URL = window.$api_url\r\n getJson(BASE_URL + dept + '/Scolarite/Notes/formsemestre_list?format=json')\r\n .then(res => {\r\n this.setState({ semestres: res.data });\r\n })\r\n }\r\n\r\n dismissToast = () => this.setState({toast: false})\r\n\r\n render() {\r\n return (\r\n
\r\n \r\n
\r\n

Scolarité

\r\n
\r\n\r\n \r\n \r\n \r\n \r\n Semestres en cours\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n {this.state.semestres.map((sem, index) => {\r\n if (sem.etat === \"1\") {\r\n return (\r\n
\r\n \r\n

{sem.titre} [{sem.modalite}]

\r\n

Semestre {sem.semestre_id} - Année {sem.anneescolaire} [{sem.date_debut} - {sem.date_fin}]

\r\n \r\n
\r\n )\r\n }\r\n })}\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n Semestres passés\r\n \r\n \r\n \r\n \r\n {this.state.semestres.map((sem, index) => {\r\n if (sem.etat !== \"1\") {\r\n return (\r\n
\r\n \r\n

{sem.titre} [{sem.modalite}]

\r\n

Semestre {sem.semestre_id} - Année {sem.anneescolaire} [{sem.date_debut} - {sem.date_fin}]

\r\n \r\n
\r\n )\r\n }\r\n })}\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n Recherche étudiant\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default Scolarite;","import React, {Component} from \"react\";\r\nimport {Link} from \"react-router-dom\";\r\nimport './Style.css'\r\nimport {getJson} from './Request'\r\n\r\n/** Page de choix du département */\r\nclass ChoixDept extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n // Liste des départements disponibles pour l'utilisateur\r\n depts: [],\r\n };\r\n }\r\n\r\n componentWillMount() {\r\n this.getData()\r\n }\r\n\r\n /**\r\n * Recupère la liste des départements depuis l'API\r\n */\r\n getData() {\r\n let BASE_URL = window.$api_url\r\n getJson(BASE_URL + 'list_depts?format=json')\r\n .then(res => {\r\n this.setState({ depts: res.data })\r\n });\r\n }\r\n\r\n render() {\r\n return (\r\n
\r\n

Choix du département

\r\n
\r\n
\r\n {this.state.depts.map((dept, index) => {\r\n return (\r\n
\r\n \r\n Département {dept}\r\n \r\n
\r\n )\r\n },)}\r\n
\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default ChoixDept","import React, {Component} from \"react\";\r\nimport { isMobile } from 'react-device-detect';\r\nimport './Style.css'\r\nimport ChoixDept from \"./ChoixDept\";\r\nimport ScoNavBar from \"./ScoNavBar\";\r\nimport {getLogin} from \"./Request\";\r\n\r\n/** Page de Login */\r\nclass Login extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n login: \"\",\r\n pass: \"\",\r\n status: 0,\r\n };\r\n this.handleChangeLogin = this.handleChangeLogin.bind(this);\r\n this.handleChangePass = this.handleChangePass.bind(this);\r\n this.checkCredentials = this.checkCredentials.bind(this)\r\n }\r\n\r\n handleChangeLogin(e) {\r\n this.setState({ login: e.target.value });\r\n }\r\n\r\n handleChangePass(e) {\r\n this.setState({ pass: e.target.value });\r\n }\r\n\r\n /**\r\n * Verifie la validité des identifiants depuis l'API\r\n * @param e {event}\r\n */\r\n checkCredentials(e) {\r\n e.preventDefault();\r\n\r\n let login = this.state.login\r\n let pass = this.state.pass\r\n\r\n let BASE_URL = window.$api_url\r\n\r\n getLogin(BASE_URL, login, pass)\r\n .then(res => {\r\n this.setState({ status: res[\"status\"] });\r\n })\r\n .catch(console.log)\r\n }\r\n\r\n\r\n render() {\r\n return (\r\n
\r\n {!isMobile &&\r\n // TODO: Redirection mobile/desktop\r\n \r\n }\r\n {(this.state.status !== 0 && this.state.status !== 200) &&\r\n
\r\n
\r\n

{\"⚠️\"} Login ou mot de passe incorrect

\r\n
\r\n
\r\n }\r\n {document.cookie === \"\" &&\r\n
\r\n
\r\n

Connexion a ScoDoc

\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n }\r\n
\r\n {document.cookie !== \"\" &&\r\n \r\n }{document.cookie !== \"\" &&\r\n \r\n }\r\n
\r\n
\r\n )\r\n }\r\n}\r\n\r\nexport default Login","import React, {Component} from \"react\";\r\nimport '../Style.css'\r\nimport {getJson} from \"../Request\";\r\nimport {Spinner} from \"react-bootstrap\";\r\n\r\n/** Page d'accueil de la gestion du semestre */\r\nclass Accueil extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n semestre: {},\r\n resp: [],\r\n loading: true\r\n };\r\n }\r\n\r\n componentWillMount() {\r\n this.setState({loading: true})\r\n this.getData()\r\n }\r\n\r\n /**\r\n * Recupère les données du semestre selectionné depuis l'API\r\n */\r\n getData() {\r\n let dept = window.location.href.split('/')[7]\r\n let sem = window.location.href.split('/')[9]\r\n let BASE_URL = window.$api_url\r\n // Recuperation des infos de semestre\r\n getJson(BASE_URL + dept + '/Scolarite/Notes/formsemestre_list?format=json&formsemestre_id=' + sem)\r\n .then(res => {\r\n this.setState({ semestre: res.data[0], resp_l: res.data[0].responsables});\r\n // Recuperation des noms complets des responsables\r\n res.data[0].responsables.map((resp) =>\r\n getJson(BASE_URL + dept + '/Scolarite/Users/user_info?format=json&user_name=' + resp)\r\n .then(res => {\r\n let joined = this.state.resp.concat(res.data.nomplogin)\r\n this.setState({resp: joined, loading: false})\r\n })\r\n .catch(error => {\r\n this.setState({resp: this.state.resp_l, loading: false})\r\n })\r\n )\r\n })\r\n\r\n }\r\n\r\n render() {\r\n return (\r\n
\r\n {this.state.loading === false ?\r\n

{this.state.semestre.titre}
\r\n Semestre {this.state.semestre.semestre_id} en {this.state.semestre.modalite}
\r\n {this.state.resp.length === 1 ? \"Responsable: (\" : \"Responsables (\"}\r\n {this.state.resp.map((resp, index) => {\r\n if (index !== this.state.resp.length-1) {return (resp + \", \")}\r\n else {return (resp + \")\")}\r\n })}\r\n

\r\n :\r\n // En cas de chargement\r\n \r\n }\r\n
\r\n )\r\n }\r\n}\r\n\r\nexport default Accueil","import React, {Component} from \"react\";\r\nimport {Button, Col, Form, Modal} from \"react-bootstrap\";\r\nimport {post} from \"../../Request\";\r\n\r\n/** Module de saisie des absences */\r\nclass SaisieAbs extends Component {\r\n constructor(props){\r\n super(props)\r\n this.state = {\r\n isOpen: false,\r\n form: {},\r\n error: false,\r\n etudid: \"\"\r\n }\r\n }\r\n\r\n openModal = () => this.setState({ isOpen: true });\r\n closeModal = () => this.setState({ isOpen: false });\r\n\r\n componentDidUpdate(prevProps) {\r\n if (prevProps.open !== this.props.open) {\r\n this.setState({etudid: this.props.etudid})\r\n if (this.props.open === true) {\r\n this.setState({isOpen: true})\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Gestion des données du formulaire\r\n * @param e {Event}\r\n */\r\n onFormSubmit = e => {\r\n // Traitement du formulaire\r\n // Empeche le bouton de rediriger ou actualiser la page\r\n e.preventDefault()\r\n // Recuperation des valeurs\r\n const formData = new FormData(e.target), formDataObj = Object.fromEntries(formData.entries())\r\n\r\n let reqstr = \"etudid=\" + this.state.etudid + \"&datedebut=\"\r\n\r\n if (formDataObj.hasOwnProperty('dateDebut') && formDataObj['dateDebut'] !== \"\") {\r\n let dateDebut = formDataObj['dateDebut'].split(\"-\")\r\n dateDebut = dateDebut[2] + \"/\" + dateDebut[1] + \"/\" + dateDebut[0]\r\n reqstr += dateDebut\r\n if (formDataObj.hasOwnProperty('dateFin') && formDataObj['dateFin'] !== \"\") {\r\n let dateFin = formDataObj['dateFin'].split(\"-\")\r\n dateFin = dateFin[2] + \"/\" + dateFin[1] + \"/\" + dateFin[0]\r\n reqstr += \"&datefin=\" + dateFin\r\n } else {\r\n reqstr += \"&datefin=\" + dateDebut\r\n }\r\n if (formDataObj.hasOwnProperty('duree')) {\r\n reqstr += \"&demijournee=\" + formDataObj['duree']\r\n }\r\n if (formDataObj.hasOwnProperty('estjust') && formDataObj.hasOwnProperty('motif') && formDataObj['motif'] !== \"\") {\r\n reqstr += \"&estjust=True&description=\" + formDataObj['motif']\r\n }\r\n this.postData(reqstr)\r\n } else {\r\n this.setState({error: true})\r\n }\r\n }\r\n\r\n /**\r\n * Envoie une requête POST a l'API\r\n * @param data {String} - Données à envoyer sous la forme param1=val1¶m2=val2...\r\n */\r\n postData(data) {\r\n let dept = window.location.href.split('/')[7]\r\n let BASE_URL = window.$api_url\r\n post(BASE_URL + dept + \"/Scolarite/Absences/doSignaleAbsence\", data)\r\n .then(response => {\r\n if (response.status === 200) {\r\n // Fermeture du modal\r\n this.closeModal()\r\n }\r\n });\r\n }\r\n\r\n render() {\r\n return (\r\n <>\r\n \r\n \r\n Saisie d'absence\r\n \r\n\r\n \r\n {this.state.error &&\r\n Erreur: La date de début ne doit pas être vide\r\n }\r\n
\r\n \r\n \r\n Date début\r\n \r\n \r\n \r\n Date fin (Optionnel)\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Motif\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n\r\n \r\n \r\n
\r\n \r\n )\r\n }\r\n}\r\n\r\nexport default SaisieAbs","import React, {Component} from \"react\";\r\nimport {Button, Modal} from \"react-bootstrap\";\r\nimport {post} from \"../../Request\";\r\n\r\n/** Module de suppression des absences */\r\nclass SupprAbs extends Component {\r\n constructor(props){\r\n super(props)\r\n this.state = {\r\n isOpen: false,\r\n etudid: \"\",\r\n }\r\n }\r\n\r\n openModal = () => this.setState({ isOpen: true });\r\n closeModal = () => this.setState({ isOpen: false });\r\n\r\n componentDidUpdate(prevProps) {\r\n if (prevProps.open !== this.props.open) {\r\n this.setState({etudid: this.props.etudid})\r\n if (this.props.open === true) {\r\n this.setState({isOpen: true})\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Envoie une requête POST a l'API\r\n * @param data {String} - Données à envoyer sous la forme param1=val1¶m2=val2...\r\n */\r\n postData() {\r\n let dept = window.location.href.split('/')[7]\r\n let BASE_URL = window.$api_url\r\n let data = \"datedebut=\" + this.props.data.date + \"&datefin=\" + this.props.data.date +\r\n \"&demijournee=\" + this.props.data.demijournee + \"&etudid=\" + this.state.etudid\r\n post(BASE_URL + dept + \"/Scolarite/Absences/doAnnuleAbsence\", data)\r\n // Fermeture du modal\r\n this.setState({isOpen: false})\r\n }\r\n\r\n render() {\r\n return (\r\n <>\r\n \r\n \r\n Suppression d'absence\r\n \r\n \r\n

Etes-vous sûr.e de vouloir supprimer cette absence ?

\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n \r\n )\r\n }\r\n}\r\n\r\nexport default SupprAbs","import React, {Component} from \"react\";\r\nimport {Button, Col, Form, Modal} from \"react-bootstrap\";\r\nimport {post} from \"../../Request\";\r\n\r\n/** Module de justification des absences */\r\nclass JustAbs extends Component {\r\n constructor(props){\r\n super(props)\r\n this.state = {\r\n isOpen: false,\r\n etudid: \"\",\r\n date: \"\"\r\n }\r\n }\r\n\r\n openModal = () => this.setState({ isOpen: true });\r\n closeModal = () => this.setState({ isOpen: false });\r\n\r\n componentDidUpdate(prevProps) {\r\n if (prevProps.open !== this.props.open) {\r\n this.setState({etudid: this.props.etudid})\r\n if (this.props.open === true) {\r\n this.setState({isOpen: true})\r\n }\r\n // Recuperation et conversion de la date par defaut de l'absence (Format ISO demandé par les form Bootstrap)\r\n let date = this.props.data.date.split(\"/\")\r\n date = new Date(date[2] + \"-\" + date[1] + \"-\" + date[0])\r\n date = date.toISOString().substr(0,10);\r\n this.setState({date: date})\r\n }\r\n }\r\n\r\n /**\r\n * Envoie une requête POST a l'API\r\n * @param data {String} - Données à envoyer sous la forme param1=val1¶m2=val2...\r\n */\r\n postData(data) {\r\n let dept = window.location.href.split('/')[7]\r\n let BASE_URL = window.$api_url\r\n post(BASE_URL + dept + \"/Scolarite/Absences/doJustifAbsence\", data)\r\n // Fermeture du modal\r\n this.setState({isOpen: false})\r\n }\r\n\r\n /**\r\n * Gestion des données du formulaire\r\n * @param e {Event}\r\n */\r\n onFormSubmit = e => {\r\n // Traitement du formulaire\r\n // Empeche le bouton de rediriger ou actualiser la page\r\n e.preventDefault()\r\n // Recuperation des valeurs\r\n const formData = new FormData(e.target), formDataObj = Object.fromEntries(formData.entries())\r\n\r\n let reqstr = \"etudid=\" + this.state.etudid + \"&datedebut=\" + this.props.data.date\r\n\r\n if (formDataObj.hasOwnProperty('dateFin') && formDataObj['dateFin'] !== \"\") {\r\n let dateFin = formDataObj['dateFin'].split(\"-\")\r\n dateFin = dateFin[2] + \"/\" + dateFin[1] + \"/\" + dateFin[0]\r\n reqstr += \"&datefin=\" + dateFin\r\n } else {\r\n reqstr += \"&datefin=\" + this.props.data.date\r\n } if (formDataObj.hasOwnProperty('duree')) {\r\n reqstr += \"&demijournee=\" + formDataObj['duree']\r\n } else {\r\n reqstr += \"&demijournee=\" + this.props.data.demijournee\r\n } if (formDataObj.hasOwnProperty('motif') && formDataObj['motif'] !== \"\") {\r\n reqstr += \"&description=\" + formDataObj['motif']\r\n }\r\n this.postData(reqstr)\r\n }\r\n\r\n render() {\r\n return (\r\n <>\r\n \r\n \r\n Suppression d'absence\r\n \r\n \r\n
\r\n \r\n \r\n Date début\r\n \r\n \r\n \r\n Date fin (Optionnel)\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Motif\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n )\r\n }\r\n}\r\n\r\nexport default JustAbs","import React, {Component} from \"react\";\r\nimport {Button, Spinner, Col} from 'react-bootstrap'\r\nimport '../Style.css'\r\nimport SaisieAbs from \"./Absences/SaisieAbs\";\r\nimport SupprAbs from \"./Absences/SupprAbs\";\r\nimport JustAbs from \"./Absences/JustAbs\";\r\nimport {getJson} from \"../Request\";\r\n\r\n/** Page de gestion des absences */\r\nclass Absences extends Component {\r\n constructor(props){\r\n super(props)\r\n this.state = {\r\n // Gestion des fenetres modales\r\n // Ajout d'absences\r\n isOpen: false,\r\n // Suppression\r\n isDelOpen: false,\r\n // Justification\r\n isJustOpen: false,\r\n // Données de la liste des absences\r\n abs: [],\r\n absjust: [],\r\n // Données d'une absence selectionnée\r\n data: {},\r\n // En cours de recuperation de données\r\n loading: false\r\n }\r\n }\r\n\r\n // Recuperation des données en cas de changement de props (dans notre cas, changement d'étudiant.e)\r\n componentDidUpdate(prevProps) {\r\n if (prevProps.id !== this.props.id) {\r\n this.setState({loading: true})\r\n this.getData();\r\n }\r\n }\r\n\r\n // Recuperation des données lors du chargement de la page si un étudiant est selectionné\r\n componentDidMount() {\r\n if (this.props.id !== \"\") {this.getData()}\r\n }\r\n\r\n /**\r\n * Gère l'ouverture des Modal\r\n * @param key {String} - Correspond au type de modal [isOpen, isDelOpen, isJustOpen]\r\n * @param data {Object} - Objet contenant les données à transmettre\r\n */\r\n openModal(key, data) {\r\n this.setState({[key]: true}, () => setTimeout(() => {\r\n this.setState({[key]: false})\r\n }, 500))\r\n if (data) {this.setState({data: data})}\r\n }\r\n\r\n /**\r\n * Recupère les données d'absences depuis l'API\r\n */\r\n getData() {\r\n let dept = window.location.href.split('/')[7]\r\n let BASE_URL = window.$api_url\r\n if (this.state.id !== \"\") {\r\n // Recuperation des absences non-justifiées\r\n getJson(BASE_URL + dept + \"/Scolarite/Absences/ListeAbsEtud?format=json&absjust_only=0&etudid=\" + this.props.id)\r\n .then(res => this.setState({abs: res.data}));\r\n // Recuperation des absences justifiées\r\n getJson(BASE_URL + dept + \"/Scolarite/Absences/ListeAbsEtud?format=json&absjust_only=1&etudid=\" + this.props.id)\r\n .then(res => this.setState({absjust: res.data, loading: false}));\r\n }\r\n }\r\n\r\n render() {\r\n return (\r\n
\r\n {this.props.id !== \"\" &&\r\n // Gestion du modal de saisie\r\n \r\n } {this.props.id !== \"\" &&\r\n // Gestion du modal de suppression\r\n \r\n } {this.props.id !== \"\" &&\r\n // Gestion du modal de justification\r\n \r\n }\r\n

Gestion des absences

\r\n {this.props.name !== \"\" &&\r\n
\r\n

Absences de {this.props.name + \" \"}\r\n \r\n \r\n

\r\n {this.state.loading === true &&\r\n \r\n }\r\n {(this.state.abs.length + this.state.absjust.length === 0 && this.props.name !== \"\" && this.state.loading === false) &&\r\n
Aucune absence de l'étudiant.e
\r\n }\r\n {this.state.abs.map((abs) => {\r\n return (\r\n
\r\n \r\n
{abs.datedmy} | {abs.matin}
\r\n {abs.motif !== \"\" &&\r\n Motif: {abs.motif}\r\n } {abs.exams !== \"\" &&\r\n Exam a rattraper: {abs.exams}\r\n }\r\n \r\n \r\n {abs.motif === \"\" &&\r\n \r\n }\r\n \r\n \r\n
\r\n )\r\n })}\r\n {this.state.absjust.map((abs) => {\r\n return (\r\n
\r\n \r\n
{abs.datedmy} | {abs.matin}
\r\n {abs.motif !== \"\" &&\r\n Motif: {abs.motif}\r\n } {abs.exams !== \"\" &&\r\n Exam a rattraper: {abs.exams}\r\n }\r\n \r\n \r\n \r\n \r\n
\r\n )\r\n })}\r\n
\r\n }\r\n
\r\n )\r\n }\r\n}\r\n\r\nexport default Absences","import React, {Component} from \"react\";\r\nimport {LazyLoadImage} from 'react-lazy-load-image-component';\r\nimport '../Style.css'\r\nimport {Link} from \"react-router-dom\";\r\nimport {getJson} from \"../Request\";\r\nimport {Spinner} from \"react-bootstrap\";\r\n\r\n/** Page de présentation des étudiants inscrits au semestre */\r\nclass Etudiants extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n // Liste des étudiants inscrits au semestre\r\n students: [],\r\n };\r\n }\r\n\r\n componentWillMount() {\r\n // this.getData()\r\n }\r\n\r\n componentDidUpdate(prevProps) {\r\n if (prevProps !== this.props) {\r\n if (this.props.students.length) {\r\n const dat = this.props.students.map((x,i) => {\r\n return i % 2 === 0 ? this.props.students.slice(i, i+2) : null;\r\n }).filter(x => x != null);\r\n this.setState({ students: dat});\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Recupère la liste des étudiants inscrits au semestre depuis l'API\r\n */\r\n getData() {\r\n let dept = window.location.href.split('/')[7]\r\n let sem = window.location.href.split('/')[9]\r\n let BASE_URL = window.$api_url\r\n getJson(BASE_URL + dept + '/Scolarite/Notes/groups_view?with_codes=1&format=json&formsemestre_id=' + sem)\r\n .then(res => {\r\n // Gestion des données sous forme de tableau a deux colonnes\r\n const dat = res.data.map((x,i) => {\r\n return i % 2 === 0 ? res.data.slice(i, i+2) : null;\r\n }).filter(x => x != null);\r\n this.setState({ students: dat});\r\n })\r\n }\r\n\r\n render() {\r\n return (\r\n
\r\n

Liste des étudiants

\r\n
\r\n {this.state.students.length !== 0 ?\r\n this.state.students.map((students) => {\r\n // Creation du tableau de deux colonnes\r\n return (\r\n
\r\n {students.map((etud, index) => {\r\n return (\r\n
\r\n \r\n {/* Recuperation de la photo de l'etudiant */}\r\n {' '}
\r\n {etud.nom_disp} {etud.prenom}\r\n \r\n
\r\n )\r\n })}\r\n
\r\n )\r\n })\r\n :\r\n
\r\n \r\n
\r\n }\r\n
\r\n
\r\n )\r\n }\r\n}\r\n\r\nexport default Etudiants","import React, {Component} from \"react\";\r\nimport {Table, Button, Dropdown, Spinner} from \"react-bootstrap\"\r\nimport '../Style.css'\r\nimport {get, getJson} from \"../Request\";\r\n\r\n/** Page de présentation des bulletins étudiants */\r\nclass Bulletin extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n bltn: {},\r\n datue: {},\r\n loaded: false,\r\n loading: false\r\n };\r\n this.getData = this.getData.bind(this);\r\n }\r\n\r\n /**\r\n * Recupère les données de bulletin depuis l'API\r\n */\r\n getData() {\r\n let dept = window.location.href.split('/')[7]\r\n let sem = window.location.href.split('/')[9]\r\n let BASE_URL = window.$api_url\r\n getJson(BASE_URL + dept + '/Scolarite/Notes/formsemestre_bulletinetud?formsemestre_id=' + sem +'&etudid=' +\r\n this.props.id +'&format=json')\r\n .then(res => {\r\n // Recuperation des données du bulletin\r\n this.setState({ bltn: res.data }, () => {\r\n // Recuperation d'un tableau CodeUE | NomUE\r\n let ls = {}\r\n for (let elm in this.state.bltn.decision_ue) {\r\n elm = this.state.bltn.decision_ue[elm]\r\n ls[elm.acronyme] = elm.titre\r\n }\r\n this.setState({datue: ls}, () => {\r\n // Marquage du bulletin comme \"chargé\"\r\n this.setState({loaded: true, loading: false})\r\n })\r\n })\r\n })\r\n }\r\n\r\n /**\r\n * Recupère les données de bulletin en tant que \"blob\" pour un PDF depuis l'API\r\n */\r\n getPdf() {\r\n let BASE_URL = window.$api_url\r\n let dept = window.location.href.split('/')[7]\r\n let sem = window.location.href.split('/')[9]\r\n get(BASE_URL + dept + \"/Scolarite/Notes/formsemestre_bulletinetud?formsemestre_id=\" + sem +\r\n \"&etudid=\" + this.props.id + \"&format=pdf&version=selectedevals\")\r\n .then(res => res.blob())\r\n .then(blob => {\r\n let file = window.URL.createObjectURL(blob);\r\n window.location.assign(file);\r\n });\r\n }\r\n\r\n // Recuperation des données en cas de changement de props (dans notre cas, changement d'étudiant.e)\r\n componentDidUpdate(prevProps) {\r\n if (prevProps.id !== this.props.id) {\r\n this.setState({loading: true})\r\n this.getData();\r\n }\r\n }\r\n\r\n // Recuperation des données lors du chargement de la page si un étudiant est selectionné\r\n componentDidMount() {\r\n if (this.props.id !== \"\") {this.getData()}\r\n }\r\n\r\n render() {\r\n return (\r\n
\r\n
\r\n

Bulletins de notes

\r\n
\r\n {this.state.loading === true && this.state.loaded === false &&\r\n \r\n }\r\n {this.state.loaded === true &&\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.state.bltn.ue.map((ue) => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n {ue.module.map((mod) => {\r\n return (\r\n \r\n \r\n \r\n \r\n )\r\n })}\r\n \r\n )\r\n })}\r\n
\r\n Note/20
Moyenne générale\r\n \r\n \r\n {this.state.bltn.note.value}\r\n \r\n\r\n \r\n Min: {this.state.bltn.note.min}\r\n Max: {this.state.bltn.note.max}\r\n Classement: {this.state.bltn.rang.value}/{this.state.bltn.rang.ninscrits}\r\n \r\n \r\n
{ue.acronyme} - {this.state.datue[ue.acronyme]}\r\n \r\n \r\n {ue.note.value}\r\n \r\n\r\n \r\n Min: {ue.note.min}\r\n Max: {ue.note.max}\r\n Classement: {ue.rang}/{this.state.bltn.rang.ninscrits}\r\n \r\n \r\n
{mod.titre.replace(\"'\", \"'\")}\r\n \r\n \r\n {mod.note.value}\r\n \r\n\r\n \r\n Min: {mod.note.min}\r\n Max: {mod.note.max}\r\n Classement: {mod.rang.value}/{this.state.bltn.rang.ninscrits}\r\n Coefficient: {mod.coefficient}\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n }\r\n
\r\n )\r\n }\r\n}\r\n\r\nexport default Bulletin","import React, {Component} from \"react\";\r\nimport {Tabs, Tab} from \"react-bootstrap\"\r\nimport Accueil from \"./GestionSemestre/Accueil\";\r\nimport Absences from \"./GestionSemestre/Absences\";\r\nimport Etudiants from \"./GestionSemestre/Etudiants\";\r\nimport ScoNavBar from \"./ScoNavBar\";\r\nimport Bulletin from \"./GestionSemestre/Bulletin\";\r\nimport Select from \"react-select\";\r\nimport {getJson} from \"./Request\";\r\n\r\n/** Page de gestion du semestre */\r\nclass GestionSemestre extends Component {\r\n constructor(props){\r\n super(props)\r\n this.state = {\r\n selectOptions: [],\r\n id: \"\",\r\n name: '',\r\n defaulttab: \"Accueil\",\r\n defaultsel: \"\"\r\n }\r\n }\r\n\r\n componentWillMount() {\r\n this.getData()\r\n\r\n if (this.props.location.tab) {\r\n this.setState({defaulttab: this.props.location.tab, defaultsel: this.props.location.etudid,\r\n id: this.props.location.etudid, name: this.state.selectOptions.find(option => option.value === this.state.id)\r\n })\r\n }\r\n }\r\n\r\n /**\r\n * Recupère la liste des étudiants inscrits au semestre pour le Select depuis l'API\r\n */\r\n getData() {\r\n let dept = window.location.href.split('/')[7]\r\n let sem = window.location.href.split('/')[9]\r\n let BASE_URL = window.$api_url\r\n getJson(BASE_URL + dept + '/Scolarite/Notes/groups_view?with_codes=1&format=json&formsemestre_id=' + sem)\r\n .then(res => {\r\n this.setState({students: res.data})\r\n // Création d'une liste pour le select\r\n res.data.map((student) => {\r\n let joined = this.state.selectOptions.concat({label: student.nom_disp + \" \" + student.prenom, value: student.etudid});\r\n this.setState({selectOptions: joined})\r\n })\r\n })\r\n }\r\n\r\n handleSelectChange(e){\r\n this.setState({id:e.value, name:e.label})\r\n }\r\n\r\n render() {\r\n return (\r\n
\r\n \r\n
\r\n
\r\n {/* Selection de l'étudiant pour les sous-composants */}\r\n
\r\n Choix de l'étudiant\r\n