diff --git a/coverage/clover.xml b/coverage/clover.xml new file mode 100644 index 0000000..0979551 --- /dev/null +++ b/coverage/clover.xml @@ -0,0 +1,697 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/coverage/coverage-final.json b/coverage/coverage-final.json new file mode 100644 index 0000000..aa1db87 --- /dev/null +++ b/coverage/coverage-final.json @@ -0,0 +1,27 @@ +{"C:\\Users\\Hubert\\Desktop\\ELO\\frontend\\src\\customRender.jsx": {"path":"C:\\Users\\Hubert\\Desktop\\ELO\\frontend\\src\\customRender.jsx","statementMap":{"0":{"start":{"line":8,"column":28},"end":{"line":18,"column":1}},"1":{"start":{"line":9,"column":2},"end":{"line":17,"column":4}},"2":{"start":{"line":20,"column":31},"end":{"line":33,"column":1}},"3":{"start":{"line":22,"column":13},"end":{"line":22,"column":73}},"4":{"start":{"line":24,"column":2},"end":{"line":32,"column":4}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":8,"column":28},"end":{"line":8,"column":29}},"loc":{"start":{"line":8,"column":90},"end":{"line":18,"column":1}},"line":8},"1":{"name":"(anonymous_1)","decl":{"start":{"line":20,"column":31},"end":{"line":20,"column":32}},"loc":{"start":{"line":20,"column":93},"end":{"line":33,"column":1}},"line":20}},"branchMap":{"0":{"loc":{"start":{"line":8,"column":33},"end":{"line":8,"column":46}},"type":"default-arg","locations":[{"start":{"line":8,"column":44},"end":{"line":8,"column":46}}],"line":8},"1":{"loc":{"start":{"line":8,"column":48},"end":{"line":8,"column":66}},"type":"default-arg","locations":[{"start":{"line":8,"column":64},"end":{"line":8,"column":66}}],"line":8},"2":{"loc":{"start":{"line":8,"column":68},"end":{"line":8,"column":85}},"type":"default-arg","locations":[{"start":{"line":8,"column":83},"end":{"line":8,"column":85}}],"line":8},"3":{"loc":{"start":{"line":20,"column":36},"end":{"line":20,"column":49}},"type":"default-arg","locations":[{"start":{"line":20,"column":47},"end":{"line":20,"column":49}}],"line":20},"4":{"loc":{"start":{"line":20,"column":51},"end":{"line":20,"column":69}},"type":"default-arg","locations":[{"start":{"line":20,"column":67},"end":{"line":20,"column":69}}],"line":20},"5":{"loc":{"start":{"line":20,"column":71},"end":{"line":20,"column":88}},"type":"default-arg","locations":[{"start":{"line":20,"column":86},"end":{"line":20,"column":88}}],"line":20}},"s":{"0":5,"1":9,"2":5,"3":1,"4":1},"f":{"0":9,"1":1},"b":{"0":[9],"1":[9],"2":[9],"3":[1],"4":[1],"5":[1]},"_coverageSchema":"43e27e138ebf9cfc5966b082cf9a028302ed4184","hash":"1c5212ab26d1cc7b79d09b45e6ca145c07697657"} +,"C:\\Users\\Hubert\\Desktop\\ELO\\frontend\\src\\index.tsx": {"path":"C:\\Users\\Hubert\\Desktop\\ELO\\frontend\\src\\index.tsx","statementMap":{"0":{"start":{"line":10,"column":0},"end":{"line":30,"column":2}}},"fnMap":{},"branchMap":{},"s":{"0":0},"f":{},"b":{},"hash":"ab66a269e022a87b5b9afae11486ed8457c6bd31"} +,"C:\\Users\\Hubert\\Desktop\\ELO\\frontend\\src\\components\\Administrator.tsx": {"path":"C:\\Users\\Hubert\\Desktop\\ELO\\frontend\\src\\components\\Administrator.tsx","statementMap":{"0":{"start":{"line":9,"column":24},"end":{"line":15,"column":1}},"1":{"start":{"line":17,"column":19},"end":{"line":33,"column":1}},"2":{"start":{"line":34,"column":29},"end":{"line":39,"column":1}},"3":{"start":{"line":41,"column":13},"end":{"line":47,"column":1}},"4":{"start":{"line":49,"column":20},"end":{"line":55,"column":1}},"5":{"start":{"line":57,"column":13},"end":{"line":61,"column":1}},"6":{"start":{"line":63,"column":13},"end":{"line":66,"column":1}},"7":{"start":{"line":68,"column":13},"end":{"line":81,"column":1}},"8":{"start":{"line":83,"column":29},"end":{"line":203,"column":1}},"9":{"start":{"line":84,"column":30},"end":{"line":84,"column":43}},"10":{"start":{"line":85,"column":28},"end":{"line":85,"column":41}},"11":{"start":{"line":87,"column":16},"end":{"line":87,"column":26}},"12":{"start":{"line":88,"column":13},"end":{"line":88,"column":53}},"13":{"start":{"line":89,"column":13},"end":{"line":89,"column":58}},"14":{"start":{"line":90,"column":15},"end":{"line":90,"column":34}},"15":{"start":{"line":92,"column":15},"end":{"line":92,"column":41}},"16":{"start":{"line":94,"column":42},"end":{"line":94,"column":69}},"17":{"start":{"line":95,"column":46},"end":{"line":95,"column":73}},"18":{"start":{"line":96,"column":42},"end":{"line":96,"column":69}},"19":{"start":{"line":97,"column":48},"end":{"line":97,"column":75}},"20":{"start":{"line":98,"column":44},"end":{"line":98,"column":71}},"21":{"start":{"line":99,"column":32},"end":{"line":99,"column":47}},"22":{"start":{"line":102,"column":21},"end":{"line":153,"column":3}},"23":{"start":{"line":103,"column":19},"end":{"line":111,"column":5}},"24":{"start":{"line":104,"column":6},"end":{"line":110,"column":9}},"25":{"start":{"line":107,"column":12},"end":{"line":107,"column":31}},"26":{"start":{"line":112,"column":4},"end":{"line":112,"column":27}},"27":{"start":{"line":113,"column":21},"end":{"line":113,"column":35}},"28":{"start":{"line":114,"column":4},"end":{"line":114,"column":50}},"29":{"start":{"line":115,"column":4},"end":{"line":117,"column":5}},"30":{"start":{"line":116,"column":6},"end":{"line":116,"column":78}},"31":{"start":{"line":118,"column":4},"end":{"line":120,"column":5}},"32":{"start":{"line":119,"column":6},"end":{"line":119,"column":74}},"33":{"start":{"line":121,"column":4},"end":{"line":123,"column":5}},"34":{"start":{"line":122,"column":6},"end":{"line":122,"column":80}},"35":{"start":{"line":124,"column":4},"end":{"line":126,"column":5}},"36":{"start":{"line":125,"column":6},"end":{"line":125,"column":76}},"37":{"start":{"line":128,"column":19},"end":{"line":132,"column":5}},"38":{"start":{"line":134,"column":4},"end":{"line":151,"column":5}},"39":{"start":{"line":135,"column":6},"end":{"line":135,"column":23}},"40":{"start":{"line":136,"column":23},"end":{"line":140,"column":7}},"41":{"start":{"line":141,"column":6},"end":{"line":144,"column":9}},"42":{"start":{"line":146,"column":6},"end":{"line":149,"column":9}},"43":{"start":{"line":150,"column":6},"end":{"line":150,"column":21}},"44":{"start":{"line":152,"column":4},"end":{"line":152,"column":22}},"45":{"start":{"line":155,"column":2},"end":{"line":202,"column":4}},"46":{"start":{"line":166,"column":61},"end":{"line":166,"column":100}},"47":{"start":{"line":170,"column":61},"end":{"line":170,"column":98}},"48":{"start":{"line":176,"column":61},"end":{"line":176,"column":101}},"49":{"start":{"line":182,"column":61},"end":{"line":182,"column":99}},"50":{"start":{"line":189,"column":16},"end":{"line":192,"column":17}},"51":{"start":{"line":190,"column":31},"end":{"line":190,"column":48}},"52":{"start":{"line":191,"column":18},"end":{"line":191,"column":40}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":83,"column":29},"end":{"line":83,"column":30}},"loc":{"start":{"line":83,"column":35},"end":{"line":203,"column":1}},"line":83},"1":{"name":"(anonymous_1)","decl":{"start":{"line":102,"column":21},"end":{"line":102,"column":22}},"loc":{"start":{"line":102,"column":72},"end":{"line":153,"column":3}},"line":102},"2":{"name":"(anonymous_2)","decl":{"start":{"line":103,"column":19},"end":{"line":103,"column":20}},"loc":{"start":{"line":104,"column":6},"end":{"line":110,"column":9}},"line":104},"3":{"name":"(anonymous_3)","decl":{"start":{"line":106,"column":19},"end":{"line":106,"column":20}},"loc":{"start":{"line":106,"column":25},"end":{"line":108,"column":11}},"line":106},"4":{"name":"(anonymous_4)","decl":{"start":{"line":166,"column":54},"end":{"line":166,"column":55}},"loc":{"start":{"line":166,"column":61},"end":{"line":166,"column":100}},"line":166},"5":{"name":"(anonymous_5)","decl":{"start":{"line":170,"column":54},"end":{"line":170,"column":55}},"loc":{"start":{"line":170,"column":61},"end":{"line":170,"column":98}},"line":170},"6":{"name":"(anonymous_6)","decl":{"start":{"line":176,"column":54},"end":{"line":176,"column":55}},"loc":{"start":{"line":176,"column":61},"end":{"line":176,"column":101}},"line":176},"7":{"name":"(anonymous_7)","decl":{"start":{"line":182,"column":54},"end":{"line":182,"column":55}},"loc":{"start":{"line":182,"column":61},"end":{"line":182,"column":99}},"line":182},"8":{"name":"(anonymous_8)","decl":{"start":{"line":188,"column":24},"end":{"line":188,"column":25}},"loc":{"start":{"line":188,"column":31},"end":{"line":193,"column":15}},"line":188}},"branchMap":{"0":{"loc":{"start":{"line":115,"column":4},"end":{"line":117,"column":5}},"type":"if","locations":[{"start":{"line":115,"column":4},"end":{"line":117,"column":5}},{"start":{"line":115,"column":4},"end":{"line":117,"column":5}}],"line":115},"1":{"loc":{"start":{"line":118,"column":4},"end":{"line":120,"column":5}},"type":"if","locations":[{"start":{"line":118,"column":4},"end":{"line":120,"column":5}},{"start":{"line":118,"column":4},"end":{"line":120,"column":5}}],"line":118},"2":{"loc":{"start":{"line":121,"column":4},"end":{"line":123,"column":5}},"type":"if","locations":[{"start":{"line":121,"column":4},"end":{"line":123,"column":5}},{"start":{"line":121,"column":4},"end":{"line":123,"column":5}}],"line":121},"3":{"loc":{"start":{"line":124,"column":4},"end":{"line":126,"column":5}},"type":"if","locations":[{"start":{"line":124,"column":4},"end":{"line":126,"column":5}},{"start":{"line":124,"column":4},"end":{"line":126,"column":5}}],"line":124},"4":{"loc":{"start":{"line":189,"column":16},"end":{"line":192,"column":17}},"type":"if","locations":[{"start":{"line":189,"column":16},"end":{"line":192,"column":17}},{"start":{"line":189,"column":16},"end":{"line":192,"column":17}}],"line":189},"5":{"loc":{"start":{"line":189,"column":20},"end":{"line":189,"column":55}},"type":"binary-expr","locations":[{"start":{"line":189,"column":20},"end":{"line":189,"column":34}},{"start":{"line":189,"column":38},"end":{"line":189,"column":55}}],"line":189},"6":{"loc":{"start":{"line":197,"column":39},"end":{"line":197,"column":84}},"type":"cond-expr","locations":[{"start":{"line":197,"column":59},"end":{"line":197,"column":67}},{"start":{"line":197,"column":70},"end":{"line":197,"column":84}}],"line":197}},"s":{"0":1,"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0},"f":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0},"b":{"0":[0,0],"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0]},"_coverageSchema":"43e27e138ebf9cfc5966b082cf9a028302ed4184","hash":"d3a1d26e91fbaf51ee8bd58240a66366e3be783b"} +,"C:\\Users\\Hubert\\Desktop\\ELO\\frontend\\src\\components\\App.tsx": {"path":"C:\\Users\\Hubert\\Desktop\\ELO\\frontend\\src\\components\\App.tsx","statementMap":{"0":{"start":{"line":13,"column":16},"end":{"line":20,"column":1}},"1":{"start":{"line":22,"column":19},"end":{"line":58,"column":1}},"2":{"start":{"line":23,"column":19},"end":{"line":23,"column":42}},"3":{"start":{"line":24,"column":44},"end":{"line":24,"column":59}},"4":{"start":{"line":26,"column":36},"end":{"line":26,"column":63}},"5":{"start":{"line":27,"column":26},"end":{"line":27,"column":49}},"6":{"start":{"line":29,"column":25},"end":{"line":31,"column":3}},"7":{"start":{"line":30,"column":4},"end":{"line":30,"column":37}},"8":{"start":{"line":33,"column":24},"end":{"line":33,"column":61}},"9":{"start":{"line":34,"column":2},"end":{"line":57,"column":4}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":22,"column":19},"end":{"line":22,"column":20}},"loc":{"start":{"line":22,"column":25},"end":{"line":58,"column":1}},"line":22},"1":{"name":"(anonymous_1)","decl":{"start":{"line":29,"column":25},"end":{"line":29,"column":26}},"loc":{"start":{"line":29,"column":31},"end":{"line":31,"column":3}},"line":29}},"branchMap":{"0":{"loc":{"start":{"line":37,"column":9},"end":{"line":51,"column":11}},"type":"binary-expr","locations":[{"start":{"line":37,"column":9},"end":{"line":37,"column":34}},{"start":{"line":38,"column":12},"end":{"line":50,"column":15}}],"line":37},"1":{"loc":{"start":{"line":42,"column":17},"end":{"line":47,"column":17}},"type":"binary-expr","locations":[{"start":{"line":42,"column":17},"end":{"line":42,"column":44}},{"start":{"line":43,"column":18},"end":{"line":46,"column":21}}],"line":42},"2":{"loc":{"start":{"line":48,"column":17},"end":{"line":48,"column":98}},"type":"binary-expr","locations":[{"start":{"line":48,"column":17},"end":{"line":48,"column":44}},{"start":{"line":48,"column":48},"end":{"line":48,"column":98}}],"line":48},"3":{"loc":{"start":{"line":52,"column":9},"end":{"line":54,"column":9}},"type":"binary-expr","locations":[{"start":{"line":52,"column":9},"end":{"line":52,"column":34}},{"start":{"line":53,"column":12},"end":{"line":53,"column":43}}],"line":52}},"s":{"0":1,"1":1,"2":2,"3":2,"4":2,"5":2,"6":2,"7":0,"8":2,"9":2},"f":{"0":2,"1":0},"b":{"0":[2,2],"1":[2,0],"2":[2,0],"3":[2,0]},"_coverageSchema":"43e27e138ebf9cfc5966b082cf9a028302ed4184","hash":"a58648d48330c16ab56971eefe9feac0b1cdf892"} +,"C:\\Users\\Hubert\\Desktop\\ELO\\frontend\\src\\components\\CourseCard.tsx": {"path":"C:\\Users\\Hubert\\Desktop\\ELO\\frontend\\src\\components\\CourseCard.tsx","statementMap":{"0":{"start":{"line":12,"column":26},"end":{"line":25,"column":1}},"1":{"start":{"line":27,"column":21},"end":{"line":34,"column":1}},"2":{"start":{"line":36,"column":16},"end":{"line":43,"column":1}},"3":{"start":{"line":45,"column":19},"end":{"line":50,"column":1}},"4":{"start":{"line":56,"column":25},"end":{"line":77,"column":1}},"5":{"start":{"line":64,"column":6},"end":{"line":67,"column":7}},"6":{"start":{"line":73,"column":4},"end":{"line":76,"column":5}},"7":{"start":{"line":83,"column":26},"end":{"line":90,"column":1}},"8":{"start":{"line":89,"column":34},"end":{"line":89,"column":73}},"9":{"start":{"line":96,"column":24},"end":{"line":106,"column":1}},"10":{"start":{"line":100,"column":42},"end":{"line":100,"column":87}},"11":{"start":{"line":108,"column":23},"end":{"line":111,"column":1}},"12":{"start":{"line":117,"column":17},"end":{"line":126,"column":1}},"13":{"start":{"line":122,"column":4},"end":{"line":125,"column":5}},"14":{"start":{"line":128,"column":18},"end":{"line":144,"column":2}},"15":{"start":{"line":150,"column":26},"end":{"line":226,"column":1}},"16":{"start":{"line":151,"column":18},"end":{"line":151,"column":29}},"17":{"start":{"line":158,"column":6},"end":{"line":158,"column":33}},"18":{"start":{"line":159,"column":36},"end":{"line":159,"column":50}},"19":{"start":{"line":160,"column":17},"end":{"line":160,"column":58}},"20":{"start":{"line":161,"column":29},"end":{"line":161,"column":83}},"21":{"start":{"line":161,"column":43},"end":{"line":161,"column":78}},"22":{"start":{"line":162,"column":34},"end":{"line":162,"column":62}},"23":{"start":{"line":164,"column":23},"end":{"line":167,"column":3}},"24":{"start":{"line":165,"column":4},"end":{"line":165,"column":151}},"25":{"start":{"line":165,"column":27},"end":{"line":165,"column":148}},"26":{"start":{"line":166,"column":4},"end":{"line":166,"column":41}},"27":{"start":{"line":169,"column":2},"end":{"line":225,"column":4}},"28":{"start":{"line":171,"column":35},"end":{"line":171,"column":59}},"29":{"start":{"line":174,"column":12},"end":{"line":174,"column":32}},"30":{"start":{"line":175,"column":12},"end":{"line":175,"column":40}},"31":{"start":{"line":176,"column":12},"end":{"line":176,"column":31}},"32":{"start":{"line":179,"column":35},"end":{"line":179,"column":59}},"33":{"start":{"line":180,"column":35},"end":{"line":180,"column":59}},"34":{"start":{"line":184,"column":10},"end":{"line":221,"column":29}},"35":{"start":{"line":187,"column":27},"end":{"line":187,"column":57}},"36":{"start":{"line":189,"column":14},"end":{"line":191,"column":15}},"37":{"start":{"line":190,"column":16},"end":{"line":190,"column":90}},"38":{"start":{"line":192,"column":14},"end":{"line":194,"column":15}},"39":{"start":{"line":193,"column":16},"end":{"line":193,"column":90}},"40":{"start":{"line":197,"column":14},"end":{"line":199,"column":15}},"41":{"start":{"line":198,"column":16},"end":{"line":198,"column":57}},"42":{"start":{"line":200,"column":14},"end":{"line":200,"column":39}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":63,"column":6},"end":{"line":63,"column":7}},"loc":{"start":{"line":64,"column":6},"end":{"line":67,"column":7}},"line":64},"1":{"name":"(anonymous_1)","decl":{"start":{"line":72,"column":4},"end":{"line":72,"column":5}},"loc":{"start":{"line":73,"column":4},"end":{"line":76,"column":5}},"line":73},"2":{"name":"(anonymous_2)","decl":{"start":{"line":89,"column":15},"end":{"line":89,"column":16}},"loc":{"start":{"line":89,"column":34},"end":{"line":89,"column":73}},"line":89},"3":{"name":"(anonymous_3)","decl":{"start":{"line":100,"column":22},"end":{"line":100,"column":23}},"loc":{"start":{"line":100,"column":42},"end":{"line":100,"column":87}},"line":100},"4":{"name":"(anonymous_4)","decl":{"start":{"line":121,"column":4},"end":{"line":121,"column":5}},"loc":{"start":{"line":122,"column":4},"end":{"line":125,"column":5}},"line":122},"5":{"name":"(anonymous_5)","decl":{"start":{"line":150,"column":26},"end":{"line":150,"column":27}},"loc":{"start":{"line":150,"column":59},"end":{"line":226,"column":1}},"line":150},"6":{"name":"(anonymous_6)","decl":{"start":{"line":161,"column":37},"end":{"line":161,"column":38}},"loc":{"start":{"line":161,"column":43},"end":{"line":161,"column":78}},"line":161},"7":{"name":"(anonymous_7)","decl":{"start":{"line":164,"column":23},"end":{"line":164,"column":24}},"loc":{"start":{"line":164,"column":59},"end":{"line":167,"column":3}},"line":164},"8":{"name":"(anonymous_8)","decl":{"start":{"line":165,"column":16},"end":{"line":165,"column":17}},"loc":{"start":{"line":165,"column":27},"end":{"line":165,"column":148}},"line":165},"9":{"name":"(anonymous_9)","decl":{"start":{"line":171,"column":29},"end":{"line":171,"column":30}},"loc":{"start":{"line":171,"column":35},"end":{"line":171,"column":59}},"line":171},"10":{"name":"(anonymous_10)","decl":{"start":{"line":173,"column":19},"end":{"line":173,"column":20}},"loc":{"start":{"line":173,"column":26},"end":{"line":177,"column":11}},"line":173},"11":{"name":"(anonymous_11)","decl":{"start":{"line":179,"column":29},"end":{"line":179,"column":30}},"loc":{"start":{"line":179,"column":35},"end":{"line":179,"column":59}},"line":179},"12":{"name":"(anonymous_12)","decl":{"start":{"line":180,"column":29},"end":{"line":180,"column":30}},"loc":{"start":{"line":180,"column":35},"end":{"line":180,"column":59}},"line":180},"13":{"name":"(anonymous_13)","decl":{"start":{"line":183,"column":20},"end":{"line":183,"column":21}},"loc":{"start":{"line":184,"column":10},"end":{"line":221,"column":29}},"line":184},"14":{"name":"(anonymous_14)","decl":{"start":{"line":187,"column":21},"end":{"line":187,"column":22}},"loc":{"start":{"line":187,"column":27},"end":{"line":187,"column":57}},"line":187},"15":{"name":"(anonymous_15)","decl":{"start":{"line":188,"column":26},"end":{"line":188,"column":27}},"loc":{"start":{"line":188,"column":32},"end":{"line":195,"column":13}},"line":188},"16":{"name":"(anonymous_16)","decl":{"start":{"line":196,"column":26},"end":{"line":196,"column":27}},"loc":{"start":{"line":196,"column":32},"end":{"line":201,"column":13}},"line":196}},"branchMap":{"0":{"loc":{"start":{"line":64,"column":6},"end":{"line":67,"column":7}},"type":"binary-expr","locations":[{"start":{"line":64,"column":6},"end":{"line":64,"column":17}},{"start":{"line":65,"column":6},"end":{"line":67,"column":7}}],"line":64},"1":{"loc":{"start":{"line":73,"column":4},"end":{"line":76,"column":5}},"type":"binary-expr","locations":[{"start":{"line":73,"column":4},"end":{"line":73,"column":14}},{"start":{"line":74,"column":4},"end":{"line":76,"column":5}}],"line":73},"2":{"loc":{"start":{"line":89,"column":34},"end":{"line":89,"column":73}},"type":"cond-expr","locations":[{"start":{"line":89,"column":45},"end":{"line":89,"column":58}},{"start":{"line":89,"column":61},"end":{"line":89,"column":73}}],"line":89},"3":{"loc":{"start":{"line":100,"column":42},"end":{"line":100,"column":87}},"type":"cond-expr","locations":[{"start":{"line":100,"column":66},"end":{"line":100,"column":75}},{"start":{"line":100,"column":78},"end":{"line":100,"column":87}}],"line":100},"4":{"loc":{"start":{"line":122,"column":4},"end":{"line":125,"column":5}},"type":"binary-expr","locations":[{"start":{"line":122,"column":4},"end":{"line":122,"column":18}},{"start":{"line":123,"column":4},"end":{"line":125,"column":5}}],"line":122},"5":{"loc":{"start":{"line":165,"column":27},"end":{"line":165,"column":148}},"type":"cond-expr","locations":[{"start":{"line":165,"column":60},"end":{"line":165,"column":103}},{"start":{"line":165,"column":106},"end":{"line":165,"column":148}}],"line":165},"6":{"loc":{"start":{"line":185,"column":24},"end":{"line":185,"column":111}},"type":"cond-expr","locations":[{"start":{"line":185,"column":99},"end":{"line":185,"column":103}},{"start":{"line":185,"column":106},"end":{"line":185,"column":111}}],"line":185},"7":{"loc":{"start":{"line":185,"column":24},"end":{"line":185,"column":96}},"type":"binary-expr","locations":[{"start":{"line":185,"column":24},"end":{"line":185,"column":58}},{"start":{"line":185,"column":62},"end":{"line":185,"column":96}}],"line":185},"8":{"loc":{"start":{"line":189,"column":14},"end":{"line":191,"column":15}},"type":"if","locations":[{"start":{"line":189,"column":14},"end":{"line":191,"column":15}},{"start":{"line":189,"column":14},"end":{"line":191,"column":15}}],"line":189},"9":{"loc":{"start":{"line":192,"column":14},"end":{"line":194,"column":15}},"type":"if","locations":[{"start":{"line":192,"column":14},"end":{"line":194,"column":15}},{"start":{"line":192,"column":14},"end":{"line":194,"column":15}}],"line":192},"10":{"loc":{"start":{"line":197,"column":14},"end":{"line":199,"column":15}},"type":"if","locations":[{"start":{"line":197,"column":14},"end":{"line":199,"column":15}},{"start":{"line":197,"column":14},"end":{"line":199,"column":15}}],"line":197},"11":{"loc":{"start":{"line":203,"column":53},"end":{"line":203,"column":90}},"type":"cond-expr","locations":[{"start":{"line":203,"column":78},"end":{"line":203,"column":82}},{"start":{"line":203,"column":85},"end":{"line":203,"column":90}}],"line":203},"12":{"loc":{"start":{"line":205,"column":15},"end":{"line":213,"column":15}},"type":"cond-expr","locations":[{"start":{"line":206,"column":16},"end":{"line":208,"column":27}},{"start":{"line":210,"column":16},"end":{"line":212,"column":27}}],"line":205}},"s":{"0":5,"1":5,"2":5,"3":5,"4":5,"5":0,"6":0,"7":5,"8":10,"9":5,"10":0,"11":5,"12":5,"13":0,"14":5,"15":5,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0},"f":{"0":0,"1":0,"2":10,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0},"b":{"0":[0,0],"1":[0,0],"2":[0,10],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0]},"_coverageSchema":"43e27e138ebf9cfc5966b082cf9a028302ed4184","hash":"42e791ced03f09bbde3c3d433d139cd6c8acc2f2"} +,"C:\\Users\\Hubert\\Desktop\\ELO\\frontend\\src\\components\\DeaneryPanel.tsx": {"path":"C:\\Users\\Hubert\\Desktop\\ELO\\frontend\\src\\components\\DeaneryPanel.tsx","statementMap":{"0":{"start":{"line":13,"column":17},"end":{"line":21,"column":1}},"1":{"start":{"line":23,"column":13},"end":{"line":28,"column":1}},"2":{"start":{"line":30,"column":16},"end":{"line":35,"column":1}},"3":{"start":{"line":41,"column":25},"end":{"line":58,"column":1}},"4":{"start":{"line":50,"column":39},"end":{"line":50,"column":109}},"5":{"start":{"line":60,"column":19},"end":{"line":66,"column":1}},"6":{"start":{"line":68,"column":17},"end":{"line":74,"column":1}},"7":{"start":{"line":76,"column":20},"end":{"line":83,"column":1}},"8":{"start":{"line":85,"column":13},"end":{"line":89,"column":1}},"9":{"start":{"line":91,"column":13},"end":{"line":94,"column":1}},"10":{"start":{"line":96,"column":13},"end":{"line":99,"column":1}},"11":{"start":{"line":105,"column":28},"end":{"line":151,"column":1}},"12":{"start":{"line":106,"column":38},"end":{"line":106,"column":64}},"13":{"start":{"line":107,"column":47},"end":{"line":107,"column":74}},"14":{"start":{"line":108,"column":43},"end":{"line":108,"column":70}},"15":{"start":{"line":109,"column":33},"end":{"line":109,"column":63}},"16":{"start":{"line":111,"column":22},"end":{"line":114,"column":3}},"17":{"start":{"line":112,"column":4},"end":{"line":112,"column":46}},"18":{"start":{"line":113,"column":4},"end":{"line":113,"column":38}},"19":{"start":{"line":116,"column":2},"end":{"line":150,"column":4}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":50,"column":16},"end":{"line":50,"column":17}},"loc":{"start":{"line":50,"column":39},"end":{"line":50,"column":109}},"line":50},"1":{"name":"(anonymous_1)","decl":{"start":{"line":105,"column":28},"end":{"line":105,"column":29}},"loc":{"start":{"line":105,"column":62},"end":{"line":151,"column":1}},"line":105},"2":{"name":"(anonymous_2)","decl":{"start":{"line":111,"column":22},"end":{"line":111,"column":23}},"loc":{"start":{"line":111,"column":57},"end":{"line":114,"column":3}},"line":111}},"branchMap":{"0":{"loc":{"start":{"line":50,"column":39},"end":{"line":50,"column":109}},"type":"cond-expr","locations":[{"start":{"line":50,"column":63},"end":{"line":50,"column":104}},{"start":{"line":50,"column":107},"end":{"line":50,"column":109}}],"line":50},"1":{"loc":{"start":{"line":133,"column":9},"end":{"line":147,"column":9}},"type":"cond-expr","locations":[{"start":{"line":134,"column":10},"end":{"line":137,"column":13}},{"start":{"line":138,"column":12},"end":{"line":147,"column":9}}],"line":133},"2":{"loc":{"start":{"line":138,"column":12},"end":{"line":147,"column":9}},"type":"cond-expr","locations":[{"start":{"line":139,"column":10},"end":{"line":139,"column":77}},{"start":{"line":140,"column":12},"end":{"line":147,"column":9}}],"line":138},"3":{"loc":{"start":{"line":140,"column":12},"end":{"line":147,"column":9}},"type":"cond-expr","locations":[{"start":{"line":141,"column":10},"end":{"line":141,"column":45}},{"start":{"line":143,"column":10},"end":{"line":146,"column":24}}],"line":140}},"s":{"0":1,"1":1,"2":1,"3":1,"4":0,"5":1,"6":1,"7":1,"8":1,"9":1,"10":1,"11":1,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0},"f":{"0":0,"1":0,"2":0},"b":{"0":[0,0],"1":[0,0],"2":[0,0],"3":[0,0]},"_coverageSchema":"43e27e138ebf9cfc5966b082cf9a028302ed4184","hash":"e36ac8f1bdf78d1b23dbcfdfd677a2d0987ab1b2"} +,"C:\\Users\\Hubert\\Desktop\\ELO\\frontend\\src\\components\\Dropdown.tsx": {"path":"C:\\Users\\Hubert\\Desktop\\ELO\\frontend\\src\\components\\Dropdown.tsx","statementMap":{"0":{"start":{"line":7,"column":26},"end":{"line":30,"column":1}},"1":{"start":{"line":32,"column":24},"end":{"line":43,"column":1}},"2":{"start":{"line":52,"column":24},"end":{"line":141,"column":1}},"3":{"start":{"line":53,"column":104},"end":{"line":53,"column":131}},"4":{"start":{"line":54,"column":46},"end":{"line":54,"column":74}},"5":{"start":{"line":55,"column":22},"end":{"line":55,"column":77}},"6":{"start":{"line":55,"column":36},"end":{"line":55,"column":55}},"7":{"start":{"line":56,"column":48},"end":{"line":56,"column":75}},"8":{"start":{"line":57,"column":50},"end":{"line":57,"column":78}},"9":{"start":{"line":59,"column":24},"end":{"line":66,"column":3}},"10":{"start":{"line":60,"column":19},"end":{"line":60,"column":38}},"11":{"start":{"line":61,"column":4},"end":{"line":65,"column":5}},"12":{"start":{"line":62,"column":21},"end":{"line":62,"column":83}},"13":{"start":{"line":62,"column":54},"end":{"line":62,"column":81}},"14":{"start":{"line":63,"column":6},"end":{"line":63,"column":32}},"15":{"start":{"line":64,"column":6},"end":{"line":64,"column":28}},"16":{"start":{"line":68,"column":22},"end":{"line":75,"column":3}},"17":{"start":{"line":69,"column":19},"end":{"line":69,"column":38}},"18":{"start":{"line":71,"column":4},"end":{"line":71,"column":29}},"19":{"start":{"line":72,"column":4},"end":{"line":72,"column":45}},"20":{"start":{"line":74,"column":4},"end":{"line":74,"column":26}},"21":{"start":{"line":77,"column":2},"end":{"line":95,"column":36}},"22":{"start":{"line":78,"column":26},"end":{"line":93,"column":5}},"23":{"start":{"line":79,"column":30},"end":{"line":91,"column":7}},"24":{"start":{"line":81,"column":10},"end":{"line":90,"column":44}},"25":{"start":{"line":92,"column":6},"end":{"line":92,"column":42}},"26":{"start":{"line":94,"column":4},"end":{"line":94,"column":25}},"27":{"start":{"line":97,"column":2},"end":{"line":114,"column":24}},"28":{"start":{"line":98,"column":24},"end":{"line":112,"column":5}},"29":{"start":{"line":99,"column":28},"end":{"line":110,"column":7}},"30":{"start":{"line":100,"column":8},"end":{"line":109,"column":11}},"31":{"start":{"line":111,"column":6},"end":{"line":111,"column":41}},"32":{"start":{"line":113,"column":4},"end":{"line":113,"column":23}},"33":{"start":{"line":116,"column":2},"end":{"line":140,"column":4}},"34":{"start":{"line":123,"column":16},"end":{"line":125,"column":34}},"35":{"start":{"line":131,"column":16},"end":{"line":133,"column":34}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":52,"column":24},"end":{"line":52,"column":25}},"loc":{"start":{"line":52,"column":97},"end":{"line":141,"column":1}},"line":52},"1":{"name":"(anonymous_1)","decl":{"start":{"line":55,"column":30},"end":{"line":55,"column":31}},"loc":{"start":{"line":55,"column":36},"end":{"line":55,"column":55}},"line":55},"2":{"name":"(anonymous_2)","decl":{"start":{"line":59,"column":24},"end":{"line":59,"column":25}},"loc":{"start":{"line":59,"column":47},"end":{"line":66,"column":3}},"line":59},"3":{"name":"(anonymous_3)","decl":{"start":{"line":62,"column":42},"end":{"line":62,"column":43}},"loc":{"start":{"line":62,"column":54},"end":{"line":62,"column":81}},"line":62},"4":{"name":"(anonymous_4)","decl":{"start":{"line":68,"column":22},"end":{"line":68,"column":23}},"loc":{"start":{"line":68,"column":45},"end":{"line":75,"column":3}},"line":68},"5":{"name":"(anonymous_5)","decl":{"start":{"line":77,"column":12},"end":{"line":77,"column":13}},"loc":{"start":{"line":77,"column":18},"end":{"line":95,"column":3}},"line":77},"6":{"name":"(anonymous_6)","decl":{"start":{"line":78,"column":26},"end":{"line":78,"column":27}},"loc":{"start":{"line":78,"column":45},"end":{"line":93,"column":5}},"line":78},"7":{"name":"(anonymous_7)","decl":{"start":{"line":80,"column":8},"end":{"line":80,"column":9}},"loc":{"start":{"line":81,"column":10},"end":{"line":90,"column":44}},"line":81},"8":{"name":"(anonymous_8)","decl":{"start":{"line":97,"column":12},"end":{"line":97,"column":13}},"loc":{"start":{"line":97,"column":18},"end":{"line":114,"column":3}},"line":97},"9":{"name":"(anonymous_9)","decl":{"start":{"line":98,"column":24},"end":{"line":98,"column":25}},"loc":{"start":{"line":98,"column":43},"end":{"line":112,"column":5}},"line":98},"10":{"name":"(anonymous_10)","decl":{"start":{"line":99,"column":44},"end":{"line":99,"column":45}},"loc":{"start":{"line":100,"column":8},"end":{"line":109,"column":11}},"line":100},"11":{"name":"(anonymous_11)","decl":{"start":{"line":122,"column":36},"end":{"line":122,"column":37}},"loc":{"start":{"line":123,"column":16},"end":{"line":125,"column":34}},"line":123},"12":{"name":"(anonymous_12)","decl":{"start":{"line":130,"column":35},"end":{"line":130,"column":36}},"loc":{"start":{"line":131,"column":16},"end":{"line":133,"column":34}},"line":131}},"branchMap":{"0":{"loc":{"start":{"line":61,"column":4},"end":{"line":65,"column":5}},"type":"if","locations":[{"start":{"line":61,"column":4},"end":{"line":65,"column":5}},{"start":{"line":61,"column":4},"end":{"line":65,"column":5}}],"line":61},"1":{"loc":{"start":{"line":61,"column":8},"end":{"line":61,"column":39}},"type":"binary-expr","locations":[{"start":{"line":61,"column":8},"end":{"line":61,"column":17}},{"start":{"line":61,"column":21},"end":{"line":61,"column":39}}],"line":61},"2":{"loc":{"start":{"line":81,"column":10},"end":{"line":90,"column":44}},"type":"binary-expr","locations":[{"start":{"line":81,"column":10},"end":{"line":90,"column":13}},{"start":{"line":90,"column":17},"end":{"line":90,"column":44}}],"line":81},"3":{"loc":{"start":{"line":118,"column":7},"end":{"line":138,"column":7}},"type":"binary-expr","locations":[{"start":{"line":118,"column":7},"end":{"line":118,"column":11}},{"start":{"line":119,"column":8},"end":{"line":137,"column":11}}],"line":118},"4":{"loc":{"start":{"line":120,"column":11},"end":{"line":136,"column":11}},"type":"cond-expr","locations":[{"start":{"line":121,"column":12},"end":{"line":127,"column":18}},{"start":{"line":129,"column":12},"end":{"line":135,"column":18}}],"line":120}},"s":{"0":4,"1":4,"2":4,"3":12,"4":12,"5":12,"6":8,"7":12,"8":12,"9":12,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":12,"17":0,"18":0,"19":0,"20":0,"21":12,"22":8,"23":8,"24":0,"25":8,"26":8,"27":12,"28":4,"29":4,"30":0,"31":4,"32":4,"33":12,"34":0,"35":0},"f":{"0":12,"1":8,"2":0,"3":0,"4":0,"5":8,"6":8,"7":0,"8":4,"9":4,"10":0,"11":0,"12":0},"b":{"0":[0,0],"1":[0,0],"2":[0,0],"3":[12,0],"4":[0,0]},"_coverageSchema":"43e27e138ebf9cfc5966b082cf9a028302ed4184","hash":"d8bef433605ec7ee2fe1e4fbdc085e2cde305b3c"} +,"C:\\Users\\Hubert\\Desktop\\ELO\\frontend\\src\\components\\Profile.tsx": {"path":"C:\\Users\\Hubert\\Desktop\\ELO\\frontend\\src\\components\\Profile.tsx","statementMap":{"0":{"start":{"line":10,"column":23},"end":{"line":19,"column":1}},"1":{"start":{"line":11,"column":21},"end":{"line":11,"column":44}},"2":{"start":{"line":13,"column":2},"end":{"line":18,"column":4}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":10,"column":23},"end":{"line":10,"column":24}},"loc":{"start":{"line":10,"column":68},"end":{"line":19,"column":1}},"line":10}},"branchMap":{},"s":{"0":4,"1":8,"2":8},"f":{"0":8},"b":{},"_coverageSchema":"43e27e138ebf9cfc5966b082cf9a028302ed4184","hash":"ec66221cb04e9372912cba2b24ba595b7d6ed249"} +,"C:\\Users\\Hubert\\Desktop\\ELO\\frontend\\src\\components\\Rightbar.tsx": {"path":"C:\\Users\\Hubert\\Desktop\\ELO\\frontend\\src\\components\\Rightbar.tsx","statementMap":{"0":{"start":{"line":7,"column":24},"end":{"line":27,"column":1}},"1":{"start":{"line":28,"column":19},"end":{"line":48,"column":1}},"2":{"start":{"line":50,"column":24},"end":{"line":63,"column":1}},"3":{"start":{"line":51,"column":54},"end":{"line":51,"column":81}},"4":{"start":{"line":53,"column":24},"end":{"line":53,"column":45}},"5":{"start":{"line":54,"column":21},"end":{"line":54,"column":60}},"6":{"start":{"line":54,"column":36},"end":{"line":54,"column":54}},"7":{"start":{"line":55,"column":2},"end":{"line":62,"column":4}},"8":{"start":{"line":59,"column":8},"end":{"line":59,"column":54}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":50,"column":24},"end":{"line":50,"column":25}},"loc":{"start":{"line":50,"column":30},"end":{"line":63,"column":1}},"line":50},"1":{"name":"(anonymous_1)","decl":{"start":{"line":54,"column":30},"end":{"line":54,"column":31}},"loc":{"start":{"line":54,"column":36},"end":{"line":54,"column":54}},"line":54},"2":{"name":"(anonymous_2)","decl":{"start":{"line":58,"column":25},"end":{"line":58,"column":26}},"loc":{"start":{"line":59,"column":8},"end":{"line":59,"column":54}},"line":59}},"branchMap":{},"s":{"0":2,"1":2,"2":2,"3":4,"4":4,"5":4,"6":0,"7":4,"8":0},"f":{"0":4,"1":0,"2":0},"b":{},"_coverageSchema":"43e27e138ebf9cfc5966b082cf9a028302ed4184","hash":"191520d1b7a236ea68d1b699cc6412b7bf62103f"} +,"C:\\Users\\Hubert\\Desktop\\ELO\\frontend\\src\\components\\Scheduler.tsx": {"path":"C:\\Users\\Hubert\\Desktop\\ELO\\frontend\\src\\components\\Scheduler.tsx","statementMap":{"0":{"start":{"line":8,"column":25},"end":{"line":20,"column":1}},"1":{"start":{"line":22,"column":18},"end":{"line":28,"column":1}},"2":{"start":{"line":30,"column":17},"end":{"line":33,"column":1}},"3":{"start":{"line":35,"column":18},"end":{"line":39,"column":1}},"4":{"start":{"line":46,"column":18},"end":{"line":63,"column":1}},"5":{"start":{"line":47,"column":40},"end":{"line":47,"column":62}},"6":{"start":{"line":48,"column":40},"end":{"line":48,"column":81}},"7":{"start":{"line":52,"column":44},"end":{"line":52,"column":80}},"8":{"start":{"line":53,"column":33},"end":{"line":53,"column":57}},"9":{"start":{"line":54,"column":41},"end":{"line":54,"column":70}},"10":{"start":{"line":55,"column":51},"end":{"line":55,"column":92}},"11":{"start":{"line":69,"column":25},"end":{"line":135,"column":1}},"12":{"start":{"line":70,"column":18},"end":{"line":70,"column":46}},"13":{"start":{"line":71,"column":36},"end":{"line":71,"column":47}},"14":{"start":{"line":72,"column":38},"end":{"line":72,"column":49}},"15":{"start":{"line":74,"column":2},"end":{"line":84,"column":9}},"16":{"start":{"line":75,"column":25},"end":{"line":80,"column":5}},"17":{"start":{"line":76,"column":6},"end":{"line":79,"column":7}},"18":{"start":{"line":77,"column":8},"end":{"line":77,"column":68}},"19":{"start":{"line":78,"column":8},"end":{"line":78,"column":70}},"20":{"start":{"line":81,"column":4},"end":{"line":81,"column":19}},"21":{"start":{"line":82,"column":4},"end":{"line":82,"column":52}},"22":{"start":{"line":83,"column":4},"end":{"line":83,"column":68}},"23":{"start":{"line":83,"column":17},"end":{"line":83,"column":67}},"24":{"start":{"line":86,"column":2},"end":{"line":134,"column":4}},"25":{"start":{"line":90,"column":10},"end":{"line":98,"column":11}},"26":{"start":{"line":103,"column":10},"end":{"line":129,"column":21}},"27":{"start":{"line":105,"column":14},"end":{"line":127,"column":15}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":47,"column":18},"end":{"line":47,"column":19}},"loc":{"start":{"line":47,"column":40},"end":{"line":47,"column":62}},"line":47},"1":{"name":"(anonymous_1)","decl":{"start":{"line":48,"column":18},"end":{"line":48,"column":19}},"loc":{"start":{"line":48,"column":40},"end":{"line":48,"column":81}},"line":48},"2":{"name":"(anonymous_2)","decl":{"start":{"line":52,"column":21},"end":{"line":52,"column":22}},"loc":{"start":{"line":52,"column":44},"end":{"line":52,"column":80}},"line":52},"3":{"name":"(anonymous_3)","decl":{"start":{"line":53,"column":10},"end":{"line":53,"column":11}},"loc":{"start":{"line":53,"column":33},"end":{"line":53,"column":57}},"line":53},"4":{"name":"(anonymous_4)","decl":{"start":{"line":54,"column":18},"end":{"line":54,"column":19}},"loc":{"start":{"line":54,"column":41},"end":{"line":54,"column":70}},"line":54},"5":{"name":"(anonymous_5)","decl":{"start":{"line":55,"column":16},"end":{"line":55,"column":17}},"loc":{"start":{"line":55,"column":51},"end":{"line":55,"column":92}},"line":55},"6":{"name":"(anonymous_6)","decl":{"start":{"line":69,"column":25},"end":{"line":69,"column":26}},"loc":{"start":{"line":69,"column":66},"end":{"line":135,"column":1}},"line":69},"7":{"name":"(anonymous_7)","decl":{"start":{"line":74,"column":18},"end":{"line":74,"column":19}},"loc":{"start":{"line":74,"column":24},"end":{"line":84,"column":3}},"line":74},"8":{"name":"(anonymous_8)","decl":{"start":{"line":75,"column":25},"end":{"line":75,"column":26}},"loc":{"start":{"line":75,"column":31},"end":{"line":80,"column":5}},"line":75},"9":{"name":"(anonymous_9)","decl":{"start":{"line":83,"column":11},"end":{"line":83,"column":12}},"loc":{"start":{"line":83,"column":17},"end":{"line":83,"column":67}},"line":83},"10":{"name":"(anonymous_10)","decl":{"start":{"line":89,"column":18},"end":{"line":89,"column":19}},"loc":{"start":{"line":90,"column":10},"end":{"line":98,"column":11}},"line":90},"11":{"name":"(anonymous_11)","decl":{"start":{"line":102,"column":19},"end":{"line":102,"column":20}},"loc":{"start":{"line":103,"column":10},"end":{"line":129,"column":21}},"line":103},"12":{"name":"(anonymous_12)","decl":{"start":{"line":104,"column":44},"end":{"line":104,"column":45}},"loc":{"start":{"line":105,"column":14},"end":{"line":127,"column":15}},"line":105}},"branchMap":{"0":{"loc":{"start":{"line":47,"column":40},"end":{"line":47,"column":62}},"type":"binary-expr","locations":[{"start":{"line":47,"column":40},"end":{"line":47,"column":53}},{"start":{"line":47,"column":57},"end":{"line":47,"column":62}}],"line":47},"1":{"loc":{"start":{"line":48,"column":40},"end":{"line":48,"column":81}},"type":"binary-expr","locations":[{"start":{"line":48,"column":40},"end":{"line":48,"column":53}},{"start":{"line":48,"column":57},"end":{"line":48,"column":81}}],"line":48},"2":{"loc":{"start":{"line":52,"column":44},"end":{"line":52,"column":80}},"type":"cond-expr","locations":[{"start":{"line":52,"column":59},"end":{"line":52,"column":69}},{"start":{"line":52,"column":72},"end":{"line":52,"column":80}}],"line":52},"3":{"loc":{"start":{"line":53,"column":33},"end":{"line":53,"column":57}},"type":"cond-expr","locations":[{"start":{"line":53,"column":48},"end":{"line":53,"column":51}},{"start":{"line":53,"column":54},"end":{"line":53,"column":57}}],"line":53},"4":{"loc":{"start":{"line":54,"column":41},"end":{"line":54,"column":70}},"type":"cond-expr","locations":[{"start":{"line":54,"column":56},"end":{"line":54,"column":62}},{"start":{"line":54,"column":65},"end":{"line":54,"column":70}}],"line":54},"5":{"loc":{"start":{"line":55,"column":51},"end":{"line":55,"column":92}},"type":"cond-expr","locations":[{"start":{"line":55,"column":66},"end":{"line":55,"column":84}},{"start":{"line":55,"column":87},"end":{"line":55,"column":92}}],"line":55},"6":{"loc":{"start":{"line":76,"column":6},"end":{"line":79,"column":7}},"type":"if","locations":[{"start":{"line":76,"column":6},"end":{"line":79,"column":7}},{"start":{"line":76,"column":6},"end":{"line":79,"column":7}}],"line":76},"7":{"loc":{"start":{"line":90,"column":10},"end":{"line":98,"column":11}},"type":"cond-expr","locations":[{"start":{"line":91,"column":12},"end":{"line":93,"column":24}},{"start":{"line":95,"column":12},"end":{"line":97,"column":24}}],"line":90},"8":{"loc":{"start":{"line":105,"column":14},"end":{"line":127,"column":15}},"type":"cond-expr","locations":[{"start":{"line":106,"column":16},"end":{"line":108,"column":28}},{"start":{"line":109,"column":18},"end":{"line":127,"column":15}}],"line":105},"9":{"loc":{"start":{"line":109,"column":18},"end":{"line":127,"column":15}},"type":"cond-expr","locations":[{"start":{"line":110,"column":16},"end":{"line":112,"column":28}},{"start":{"line":113,"column":18},"end":{"line":127,"column":15}}],"line":109},"10":{"loc":{"start":{"line":109,"column":18},"end":{"line":109,"column":51}},"type":"binary-expr","locations":[{"start":{"line":109,"column":18},"end":{"line":109,"column":32}},{"start":{"line":109,"column":36},"end":{"line":109,"column":51}}],"line":109},"11":{"loc":{"start":{"line":113,"column":18},"end":{"line":127,"column":15}},"type":"cond-expr","locations":[{"start":{"line":114,"column":16},"end":{"line":116,"column":28}},{"start":{"line":117,"column":18},"end":{"line":127,"column":15}}],"line":113},"12":{"loc":{"start":{"line":117,"column":18},"end":{"line":127,"column":15}},"type":"cond-expr","locations":[{"start":{"line":118,"column":16},"end":{"line":120,"column":28}},{"start":{"line":121,"column":18},"end":{"line":127,"column":15}}],"line":117},"13":{"loc":{"start":{"line":121,"column":18},"end":{"line":127,"column":15}},"type":"cond-expr","locations":[{"start":{"line":122,"column":16},"end":{"line":124,"column":28}},{"start":{"line":126,"column":16},"end":{"line":126,"column":78}}],"line":121}},"s":{"0":1,"1":1,"2":1,"3":1,"4":1,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":1,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0},"f":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0},"b":{"0":[0,0],"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0],"13":[0,0]},"_coverageSchema":"43e27e138ebf9cfc5966b082cf9a028302ed4184","hash":"3d0e2c4ec4abad4a1f3ce09330e35b2305b2a4d6"} +,"C:\\Users\\Hubert\\Desktop\\ELO\\frontend\\src\\components\\SchedulerEvents.tsx": {"path":"C:\\Users\\Hubert\\Desktop\\ELO\\frontend\\src\\components\\SchedulerEvents.tsx","statementMap":{"0":{"start":{"line":14,"column":31},"end":{"line":44,"column":1}},"1":{"start":{"line":16,"column":2},"end":{"line":43,"column":4}},"2":{"start":{"line":19,"column":8},"end":{"line":40,"column":10}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":14,"column":31},"end":{"line":14,"column":32}},"loc":{"start":{"line":14,"column":100},"end":{"line":44,"column":1}},"line":14},"1":{"name":"(anonymous_1)","decl":{"start":{"line":18,"column":34},"end":{"line":18,"column":35}},"loc":{"start":{"line":19,"column":8},"end":{"line":40,"column":10}},"line":19}},"branchMap":{"0":{"loc":{"start":{"line":24,"column":12},"end":{"line":36,"column":17}},"type":"cond-expr","locations":[{"start":{"line":25,"column":16},"end":{"line":25,"column":30}},{"start":{"line":26,"column":16},"end":{"line":36,"column":17}}],"line":24},"1":{"loc":{"start":{"line":26,"column":16},"end":{"line":36,"column":17}},"type":"cond-expr","locations":[{"start":{"line":27,"column":16},"end":{"line":27,"column":30}},{"start":{"line":28,"column":16},"end":{"line":36,"column":17}}],"line":26},"2":{"loc":{"start":{"line":28,"column":16},"end":{"line":36,"column":17}},"type":"cond-expr","locations":[{"start":{"line":29,"column":16},"end":{"line":29,"column":32}},{"start":{"line":30,"column":16},"end":{"line":36,"column":17}}],"line":28},"3":{"loc":{"start":{"line":30,"column":16},"end":{"line":36,"column":17}},"type":"cond-expr","locations":[{"start":{"line":31,"column":16},"end":{"line":31,"column":33}},{"start":{"line":32,"column":16},"end":{"line":36,"column":17}}],"line":30},"4":{"loc":{"start":{"line":32,"column":16},"end":{"line":36,"column":17}},"type":"cond-expr","locations":[{"start":{"line":33,"column":16},"end":{"line":33,"column":31}},{"start":{"line":34,"column":16},"end":{"line":36,"column":17}}],"line":32},"5":{"loc":{"start":{"line":34,"column":16},"end":{"line":36,"column":17}},"type":"cond-expr","locations":[{"start":{"line":35,"column":16},"end":{"line":35,"column":33}},{"start":{"line":36,"column":16},"end":{"line":36,"column":17}}],"line":34}},"s":{"0":1,"1":0,"2":0},"f":{"0":0,"1":0},"b":{"0":[0,0],"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0]},"_coverageSchema":"43e27e138ebf9cfc5966b082cf9a028302ed4184","hash":"df37ecab9f336046476a53a7a51354480e9a3e60"} +,"C:\\Users\\Hubert\\Desktop\\ELO\\frontend\\src\\components\\SchedulerHistory.tsx": {"path":"C:\\Users\\Hubert\\Desktop\\ELO\\frontend\\src\\components\\SchedulerHistory.tsx","statementMap":{"0":{"start":{"line":8,"column":16},"end":{"line":12,"column":1}},"1":{"start":{"line":18,"column":32},"end":{"line":54,"column":1}},"2":{"start":{"line":19,"column":66},"end":{"line":19,"column":93}},"3":{"start":{"line":20,"column":50},"end":{"line":20,"column":121}},"4":{"start":{"line":21,"column":22},"end":{"line":21,"column":71}},"5":{"start":{"line":23,"column":36},"end":{"line":27,"column":3}},"6":{"start":{"line":24,"column":4},"end":{"line":26,"column":5}},"7":{"start":{"line":25,"column":6},"end":{"line":25,"column":74}},"8":{"start":{"line":25,"column":48},"end":{"line":25,"column":72}},"9":{"start":{"line":29,"column":30},"end":{"line":33,"column":3}},"10":{"start":{"line":30,"column":4},"end":{"line":32,"column":5}},"11":{"start":{"line":31,"column":6},"end":{"line":31,"column":74}},"12":{"start":{"line":31,"column":48},"end":{"line":31,"column":72}},"13":{"start":{"line":35,"column":2},"end":{"line":44,"column":42}},"14":{"start":{"line":36,"column":22},"end":{"line":36,"column":56}},"15":{"start":{"line":37,"column":4},"end":{"line":43,"column":5}},"16":{"start":{"line":38,"column":25},"end":{"line":38,"column":34}},"17":{"start":{"line":39,"column":6},"end":{"line":39,"column":48}},"18":{"start":{"line":42,"column":6},"end":{"line":42,"column":44}},"19":{"start":{"line":46,"column":2},"end":{"line":53,"column":4}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":18,"column":32},"end":{"line":18,"column":33}},"loc":{"start":{"line":18,"column":84},"end":{"line":54,"column":1}},"line":18},"1":{"name":"(anonymous_1)","decl":{"start":{"line":23,"column":36},"end":{"line":23,"column":37}},"loc":{"start":{"line":23,"column":55},"end":{"line":27,"column":3}},"line":23},"2":{"name":"(anonymous_2)","decl":{"start":{"line":25,"column":26},"end":{"line":25,"column":27}},"loc":{"start":{"line":25,"column":48},"end":{"line":25,"column":72}},"line":25},"3":{"name":"(anonymous_3)","decl":{"start":{"line":29,"column":30},"end":{"line":29,"column":31}},"loc":{"start":{"line":29,"column":49},"end":{"line":33,"column":3}},"line":29},"4":{"name":"(anonymous_4)","decl":{"start":{"line":31,"column":26},"end":{"line":31,"column":27}},"loc":{"start":{"line":31,"column":48},"end":{"line":31,"column":72}},"line":31},"5":{"name":"(anonymous_5)","decl":{"start":{"line":35,"column":12},"end":{"line":35,"column":13}},"loc":{"start":{"line":35,"column":18},"end":{"line":44,"column":3}},"line":35}},"branchMap":{"0":{"loc":{"start":{"line":20,"column":59},"end":{"line":20,"column":120}},"type":"cond-expr","locations":[{"start":{"line":20,"column":89},"end":{"line":20,"column":90}},{"start":{"line":20,"column":93},"end":{"line":20,"column":120}}],"line":20},"1":{"loc":{"start":{"line":24,"column":4},"end":{"line":26,"column":5}},"type":"if","locations":[{"start":{"line":24,"column":4},"end":{"line":26,"column":5}},{"start":{"line":24,"column":4},"end":{"line":26,"column":5}}],"line":24},"2":{"loc":{"start":{"line":30,"column":4},"end":{"line":32,"column":5}},"type":"if","locations":[{"start":{"line":30,"column":4},"end":{"line":32,"column":5}},{"start":{"line":30,"column":4},"end":{"line":32,"column":5}}],"line":30},"3":{"loc":{"start":{"line":37,"column":4},"end":{"line":43,"column":5}},"type":"if","locations":[{"start":{"line":37,"column":4},"end":{"line":43,"column":5}},{"start":{"line":37,"column":4},"end":{"line":43,"column":5}}],"line":37},"4":{"loc":{"start":{"line":48,"column":7},"end":{"line":50,"column":7}},"type":"binary-expr","locations":[{"start":{"line":48,"column":7},"end":{"line":48,"column":34}},{"start":{"line":49,"column":8},"end":{"line":49,"column":164}}],"line":48}},"s":{"0":1,"1":1,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0},"f":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0},"b":{"0":[0,0],"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0]},"_coverageSchema":"43e27e138ebf9cfc5966b082cf9a028302ed4184","hash":"3f5b82cd401708d20eb1e01cd5a52b19eac6fdc6"} +,"C:\\Users\\Hubert\\Desktop\\ELO\\frontend\\src\\components\\SchedulerHistoryNavigation.tsx": {"path":"C:\\Users\\Hubert\\Desktop\\ELO\\frontend\\src\\components\\SchedulerHistoryNavigation.tsx","statementMap":{"0":{"start":{"line":11,"column":16},"end":{"line":16,"column":1}},"1":{"start":{"line":18,"column":21},"end":{"line":36,"column":1}},"2":{"start":{"line":38,"column":20},"end":{"line":40,"column":1}},"3":{"start":{"line":43,"column":19},"end":{"line":54,"column":1}},"4":{"start":{"line":62,"column":42},"end":{"line":89,"column":1}},"5":{"start":{"line":68,"column":2},"end":{"line":88,"column":4}},"6":{"start":{"line":73,"column":10},"end":{"line":73,"column":40}},"7":{"start":{"line":82,"column":10},"end":{"line":82,"column":33}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":62,"column":42},"end":{"line":62,"column":43}},"loc":{"start":{"line":66,"column":39},"end":{"line":89,"column":1}},"line":66},"1":{"name":"(anonymous_1)","decl":{"start":{"line":72,"column":17},"end":{"line":72,"column":18}},"loc":{"start":{"line":72,"column":23},"end":{"line":74,"column":9}},"line":72},"2":{"name":"(anonymous_2)","decl":{"start":{"line":81,"column":17},"end":{"line":81,"column":18}},"loc":{"start":{"line":81,"column":23},"end":{"line":83,"column":9}},"line":81}},"branchMap":{},"s":{"0":1,"1":1,"2":1,"3":1,"4":1,"5":0,"6":0,"7":0},"f":{"0":0,"1":0,"2":0},"b":{},"_coverageSchema":"43e27e138ebf9cfc5966b082cf9a028302ed4184","hash":"677842448d2f63a90c4acab50c184ede5e4311b7"} +,"C:\\Users\\Hubert\\Desktop\\ELO\\frontend\\src\\components\\SchedulerRow.tsx": {"path":"C:\\Users\\Hubert\\Desktop\\ELO\\frontend\\src\\components\\SchedulerRow.tsx","statementMap":{"0":{"start":{"line":9,"column":18},"end":{"line":20,"column":1}},"1":{"start":{"line":10,"column":2},"end":{"line":19,"column":4}},"2":{"start":{"line":22,"column":20},"end":{"line":25,"column":1}},"3":{"start":{"line":34,"column":31},"end":{"line":43,"column":1}},"4":{"start":{"line":37,"column":25},"end":{"line":37,"column":31}},"5":{"start":{"line":38,"column":41},"end":{"line":38,"column":89}},"6":{"start":{"line":39,"column":30},"end":{"line":39,"column":44}},"7":{"start":{"line":40,"column":32},"end":{"line":40,"column":46}},"8":{"start":{"line":52,"column":29},"end":{"line":81,"column":1}},"9":{"start":{"line":61,"column":32},"end":{"line":61,"column":46}},"10":{"start":{"line":62,"column":30},"end":{"line":62,"column":49}},"11":{"start":{"line":67,"column":4},"end":{"line":71,"column":5}},"12":{"start":{"line":68,"column":6},"end":{"line":68,"column":59}},"13":{"start":{"line":70,"column":6},"end":{"line":70,"column":59}},"14":{"start":{"line":74,"column":4},"end":{"line":77,"column":5}},"15":{"start":{"line":83,"column":20},"end":{"line":89,"column":1}},"16":{"start":{"line":84,"column":2},"end":{"line":88,"column":4}},"17":{"start":{"line":95,"column":22},"end":{"line":99,"column":1}},"18":{"start":{"line":98,"column":21},"end":{"line":98,"column":43}},"19":{"start":{"line":101,"column":18},"end":{"line":110,"column":1}},"20":{"start":{"line":112,"column":20},"end":{"line":118,"column":1}},"21":{"start":{"line":128,"column":24},"end":{"line":134,"column":1}},"22":{"start":{"line":129,"column":28},"end":{"line":129,"column":60}},"23":{"start":{"line":130,"column":2},"end":{"line":132,"column":3}},"24":{"start":{"line":131,"column":4},"end":{"line":131,"column":30}},"25":{"start":{"line":133,"column":2},"end":{"line":133,"column":22}},"26":{"start":{"line":136,"column":28},"end":{"line":247,"column":1}},"27":{"start":{"line":137,"column":27},"end":{"line":137,"column":54}},"28":{"start":{"line":138,"column":18},"end":{"line":138,"column":29}},"29":{"start":{"line":139,"column":23},"end":{"line":139,"column":46}},"30":{"start":{"line":140,"column":34},"end":{"line":140,"column":77}},"31":{"start":{"line":141,"column":36},"end":{"line":141,"column":65}},"32":{"start":{"line":143,"column":28},"end":{"line":146,"column":3}},"33":{"start":{"line":144,"column":4},"end":{"line":144,"column":37}},"34":{"start":{"line":145,"column":4},"end":{"line":145,"column":41}},"35":{"start":{"line":148,"column":29},"end":{"line":151,"column":3}},"36":{"start":{"line":149,"column":4},"end":{"line":149,"column":23}},"37":{"start":{"line":150,"column":4},"end":{"line":150,"column":22}},"38":{"start":{"line":152,"column":2},"end":{"line":153,"column":17}},"39":{"start":{"line":154,"column":15},"end":{"line":154,"column":32}},"40":{"start":{"line":155,"column":13},"end":{"line":155,"column":48}},"41":{"start":{"line":157,"column":2},"end":{"line":246,"column":4}},"42":{"start":{"line":160,"column":8},"end":{"line":243,"column":33}},"43":{"start":{"line":170,"column":14},"end":{"line":241,"column":15}},"44":{"start":{"line":182,"column":36},"end":{"line":182,"column":56}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":9,"column":29},"end":{"line":9,"column":30}},"loc":{"start":{"line":10,"column":2},"end":{"line":19,"column":4}},"line":10},"1":{"name":"(anonymous_1)","decl":{"start":{"line":37,"column":9},"end":{"line":37,"column":10}},"loc":{"start":{"line":37,"column":25},"end":{"line":37,"column":31}},"line":37},"2":{"name":"(anonymous_2)","decl":{"start":{"line":38,"column":10},"end":{"line":38,"column":11}},"loc":{"start":{"line":38,"column":41},"end":{"line":38,"column":89}},"line":38},"3":{"name":"(anonymous_3)","decl":{"start":{"line":39,"column":11},"end":{"line":39,"column":12}},"loc":{"start":{"line":39,"column":30},"end":{"line":39,"column":44}},"line":39},"4":{"name":"(anonymous_4)","decl":{"start":{"line":40,"column":12},"end":{"line":40,"column":13}},"loc":{"start":{"line":40,"column":32},"end":{"line":40,"column":46}},"line":40},"5":{"name":"(anonymous_5)","decl":{"start":{"line":61,"column":12},"end":{"line":61,"column":13}},"loc":{"start":{"line":61,"column":32},"end":{"line":61,"column":46}},"line":61},"6":{"name":"(anonymous_6)","decl":{"start":{"line":62,"column":11},"end":{"line":62,"column":12}},"loc":{"start":{"line":62,"column":30},"end":{"line":62,"column":49}},"line":62},"7":{"name":"(anonymous_7)","decl":{"start":{"line":66,"column":22},"end":{"line":66,"column":23}},"loc":{"start":{"line":66,"column":52},"end":{"line":72,"column":3}},"line":66},"8":{"name":"(anonymous_8)","decl":{"start":{"line":73,"column":4},"end":{"line":73,"column":5}},"loc":{"start":{"line":74,"column":4},"end":{"line":77,"column":5}},"line":74},"9":{"name":"(anonymous_9)","decl":{"start":{"line":83,"column":20},"end":{"line":83,"column":21}},"loc":{"start":{"line":83,"column":26},"end":{"line":89,"column":1}},"line":83},"10":{"name":"(anonymous_10)","decl":{"start":{"line":98,"column":4},"end":{"line":98,"column":5}},"loc":{"start":{"line":98,"column":21},"end":{"line":98,"column":43}},"line":98},"11":{"name":"(anonymous_11)","decl":{"start":{"line":128,"column":24},"end":{"line":128,"column":25}},"loc":{"start":{"line":128,"column":59},"end":{"line":134,"column":1}},"line":128},"12":{"name":"(anonymous_12)","decl":{"start":{"line":136,"column":28},"end":{"line":136,"column":29}},"loc":{"start":{"line":136,"column":104},"end":{"line":247,"column":1}},"line":136},"13":{"name":"(anonymous_13)","decl":{"start":{"line":143,"column":28},"end":{"line":143,"column":29}},"loc":{"start":{"line":143,"column":90},"end":{"line":146,"column":3}},"line":143},"14":{"name":"(anonymous_14)","decl":{"start":{"line":148,"column":29},"end":{"line":148,"column":30}},"loc":{"start":{"line":148,"column":53},"end":{"line":151,"column":3}},"line":148},"15":{"name":"(anonymous_15)","decl":{"start":{"line":152,"column":12},"end":{"line":152,"column":13}},"loc":{"start":{"line":152,"column":18},"end":{"line":153,"column":3}},"line":152},"16":{"name":"(anonymous_16)","decl":{"start":{"line":159,"column":40},"end":{"line":159,"column":41}},"loc":{"start":{"line":160,"column":8},"end":{"line":243,"column":33}},"line":160},"17":{"name":"(anonymous_17)","decl":{"start":{"line":169,"column":12},"end":{"line":169,"column":13}},"loc":{"start":{"line":170,"column":14},"end":{"line":241,"column":15}},"line":170},"18":{"name":"(anonymous_18)","decl":{"start":{"line":182,"column":29},"end":{"line":182,"column":30}},"loc":{"start":{"line":182,"column":36},"end":{"line":182,"column":56}},"line":182},"19":{"name":"(anonymous_19)","decl":{"start":{"line":221,"column":102},"end":{"line":221,"column":103}},"loc":{"start":{"line":221,"column":108},"end":{"line":221,"column":110}},"line":221}},"branchMap":{"0":{"loc":{"start":{"line":67,"column":4},"end":{"line":71,"column":5}},"type":"if","locations":[{"start":{"line":67,"column":4},"end":{"line":71,"column":5}},{"start":{"line":67,"column":4},"end":{"line":71,"column":5}}],"line":67},"1":{"loc":{"start":{"line":68,"column":13},"end":{"line":68,"column":58}},"type":"cond-expr","locations":[{"start":{"line":68,"column":37},"end":{"line":68,"column":46}},{"start":{"line":68,"column":49},"end":{"line":68,"column":58}}],"line":68},"2":{"loc":{"start":{"line":70,"column":13},"end":{"line":70,"column":58}},"type":"cond-expr","locations":[{"start":{"line":70,"column":37},"end":{"line":70,"column":46}},{"start":{"line":70,"column":49},"end":{"line":70,"column":58}}],"line":70},"3":{"loc":{"start":{"line":74,"column":4},"end":{"line":77,"column":5}},"type":"binary-expr","locations":[{"start":{"line":74,"column":4},"end":{"line":74,"column":13}},{"start":{"line":75,"column":4},"end":{"line":77,"column":5}}],"line":74},"4":{"loc":{"start":{"line":98,"column":21},"end":{"line":98,"column":43}},"type":"binary-expr","locations":[{"start":{"line":98,"column":21},"end":{"line":98,"column":28}},{"start":{"line":98,"column":32},"end":{"line":98,"column":43}}],"line":98},"5":{"loc":{"start":{"line":155,"column":13},"end":{"line":155,"column":48}},"type":"cond-expr","locations":[{"start":{"line":155,"column":20},"end":{"line":155,"column":36}},{"start":{"line":155,"column":39},"end":{"line":155,"column":48}}],"line":155},"6":{"loc":{"start":{"line":170,"column":14},"end":{"line":241,"column":15}},"type":"binary-expr","locations":[{"start":{"line":170,"column":14},"end":{"line":170,"column":38}},{"start":{"line":171,"column":16},"end":{"line":240,"column":27}}],"line":170},"7":{"loc":{"start":{"line":180,"column":31},"end":{"line":180,"column":70}},"type":"cond-expr","locations":[{"start":{"line":180,"column":38},"end":{"line":180,"column":58}},{"start":{"line":180,"column":61},"end":{"line":180,"column":70}}],"line":180},"8":{"loc":{"start":{"line":186,"column":23},"end":{"line":199,"column":23}},"type":"cond-expr","locations":[{"start":{"line":187,"column":24},"end":{"line":192,"column":38}},{"start":{"line":194,"column":24},"end":{"line":198,"column":38}}],"line":186}},"s":{"0":1,"1":0,"2":1,"3":1,"4":0,"5":0,"6":0,"7":0,"8":1,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":1,"16":0,"17":1,"18":0,"19":1,"20":1,"21":1,"22":0,"23":0,"24":0,"25":0,"26":1,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0},"f":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0},"b":{"0":[0,0],"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0]},"_coverageSchema":"43e27e138ebf9cfc5966b082cf9a028302ed4184","hash":"05cc34b12b209c41239531bb9a48c465433b063e"} +,"C:\\Users\\Hubert\\Desktop\\ELO\\frontend\\src\\components\\SelectMenu.tsx": {"path":"C:\\Users\\Hubert\\Desktop\\ELO\\frontend\\src\\components\\SelectMenu.tsx","statementMap":{"0":{"start":{"line":6,"column":16},"end":{"line":27,"column":1}},"1":{"start":{"line":28,"column":15},"end":{"line":33,"column":1}},"2":{"start":{"line":34,"column":20},"end":{"line":38,"column":1}},"3":{"start":{"line":39,"column":13},"end":{"line":47,"column":1}},"4":{"start":{"line":48,"column":17},"end":{"line":63,"column":1}},"5":{"start":{"line":64,"column":25},"end":{"line":67,"column":1}},"6":{"start":{"line":75,"column":26},"end":{"line":117,"column":1}},"7":{"start":{"line":76,"column":30},"end":{"line":76,"column":45}},"8":{"start":{"line":78,"column":2},"end":{"line":116,"column":4}},"9":{"start":{"line":81,"column":8},"end":{"line":81,"column":25}},"10":{"start":{"line":84,"column":31},"end":{"line":84,"column":56}},"11":{"start":{"line":87,"column":12},"end":{"line":87,"column":35}},"12":{"start":{"line":88,"column":12},"end":{"line":88,"column":31}},"13":{"start":{"line":98,"column":16},"end":{"line":98,"column":51}},"14":{"start":{"line":99,"column":16},"end":{"line":99,"column":33}},"15":{"start":{"line":106,"column":16},"end":{"line":106,"column":49}},"16":{"start":{"line":107,"column":16},"end":{"line":107,"column":33}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":75,"column":26},"end":{"line":75,"column":27}},"loc":{"start":{"line":75,"column":105},"end":{"line":117,"column":1}},"line":75},"1":{"name":"(anonymous_1)","decl":{"start":{"line":80,"column":19},"end":{"line":80,"column":20}},"loc":{"start":{"line":80,"column":25},"end":{"line":82,"column":7}},"line":80},"2":{"name":"(anonymous_2)","decl":{"start":{"line":84,"column":24},"end":{"line":84,"column":25}},"loc":{"start":{"line":84,"column":30},"end":{"line":84,"column":57}},"line":84},"3":{"name":"(anonymous_3)","decl":{"start":{"line":86,"column":19},"end":{"line":86,"column":20}},"loc":{"start":{"line":86,"column":25},"end":{"line":89,"column":11}},"line":86},"4":{"name":"(anonymous_4)","decl":{"start":{"line":97,"column":23},"end":{"line":97,"column":24}},"loc":{"start":{"line":97,"column":29},"end":{"line":100,"column":15}},"line":97},"5":{"name":"(anonymous_5)","decl":{"start":{"line":105,"column":23},"end":{"line":105,"column":24}},"loc":{"start":{"line":105,"column":29},"end":{"line":108,"column":15}},"line":105}},"branchMap":{"0":{"loc":{"start":{"line":94,"column":9},"end":{"line":113,"column":9}},"type":"binary-expr","locations":[{"start":{"line":94,"column":9},"end":{"line":94,"column":15}},{"start":{"line":95,"column":10},"end":{"line":112,"column":17}}],"line":94}},"s":{"0":5,"1":5,"2":5,"3":5,"4":5,"5":5,"6":5,"7":10,"8":10,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0},"f":{"0":10,"1":0,"2":0,"3":0,"4":0,"5":0},"b":{"0":[10,0]},"_coverageSchema":"43e27e138ebf9cfc5966b082cf9a028302ed4184","hash":"d29217782b000e4aa48b4cf435e3e1fcbf58fbc9"} +,"C:\\Users\\Hubert\\Desktop\\ELO\\frontend\\src\\components\\Statistics.tsx": {"path":"C:\\Users\\Hubert\\Desktop\\ELO\\frontend\\src\\components\\Statistics.tsx","statementMap":{"0":{"start":{"line":12,"column":26},"end":{"line":18,"column":1}},"1":{"start":{"line":20,"column":12},"end":{"line":25,"column":1}},"2":{"start":{"line":27,"column":21},"end":{"line":41,"column":1}},"3":{"start":{"line":43,"column":24},"end":{"line":47,"column":1}},"4":{"start":{"line":49,"column":22},"end":{"line":54,"column":1}},"5":{"start":{"line":56,"column":26},"end":{"line":111,"column":1}},"6":{"start":{"line":57,"column":2},"end":{"line":110,"column":4}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":56,"column":26},"end":{"line":56,"column":27}},"loc":{"start":{"line":56,"column":32},"end":{"line":111,"column":1}},"line":56}},"branchMap":{},"s":{"0":2,"1":2,"2":2,"3":2,"4":2,"5":2,"6":2},"f":{"0":2},"b":{},"_coverageSchema":"43e27e138ebf9cfc5966b082cf9a028302ed4184","hash":"0d5e2c93abb82e0d49baeedd564aead91d714e6d"} +,"C:\\Users\\Hubert\\Desktop\\ELO\\frontend\\src\\components\\Topbar.tsx": {"path":"C:\\Users\\Hubert\\Desktop\\ELO\\frontend\\src\\components\\Topbar.tsx","statementMap":{"0":{"start":{"line":13,"column":15},"end":{"line":21,"column":1}},"1":{"start":{"line":23,"column":20},"end":{"line":29,"column":1}},"2":{"start":{"line":31,"column":13},"end":{"line":37,"column":1}},"3":{"start":{"line":39,"column":13},"end":{"line":50,"column":1}},"4":{"start":{"line":52,"column":22},"end":{"line":56,"column":1}},"5":{"start":{"line":62,"column":21},"end":{"line":76,"column":1}},"6":{"start":{"line":68,"column":39},"end":{"line":68,"column":90}},"7":{"start":{"line":78,"column":14},"end":{"line":90,"column":1}},"8":{"start":{"line":92,"column":18},"end":{"line":104,"column":1}},"9":{"start":{"line":106,"column":20},"end":{"line":112,"column":1}},"10":{"start":{"line":114,"column":13},"end":{"line":121,"column":1}},"11":{"start":{"line":123,"column":23},"end":{"line":125,"column":1}},"12":{"start":{"line":127,"column":31},"end":{"line":133,"column":1}},"13":{"start":{"line":140,"column":30},"end":{"line":140,"column":58}},"14":{"start":{"line":141,"column":19},"end":{"line":141,"column":42}},"15":{"start":{"line":142,"column":38},"end":{"line":142,"column":53}},"16":{"start":{"line":143,"column":34},"end":{"line":143,"column":49}},"17":{"start":{"line":144,"column":34},"end":{"line":144,"column":73}},"18":{"start":{"line":145,"column":26},"end":{"line":145,"column":41}},"19":{"start":{"line":146,"column":28},"end":{"line":146,"column":40}},"20":{"start":{"line":147,"column":46},"end":{"line":147,"column":102}},"21":{"start":{"line":149,"column":2},"end":{"line":151,"column":13}},"22":{"start":{"line":150,"column":4},"end":{"line":150,"column":78}},"23":{"start":{"line":153,"column":31},"end":{"line":153,"column":76}},"24":{"start":{"line":153,"column":51},"end":{"line":153,"column":76}},"25":{"start":{"line":155,"column":23},"end":{"line":155,"column":51}},"26":{"start":{"line":155,"column":29},"end":{"line":155,"column":51}},"27":{"start":{"line":157,"column":24},"end":{"line":157,"column":97}},"28":{"start":{"line":157,"column":65},"end":{"line":157,"column":97}},"29":{"start":{"line":159,"column":29},"end":{"line":159,"column":52}},"30":{"start":{"line":159,"column":35},"end":{"line":159,"column":52}},"31":{"start":{"line":161,"column":27},"end":{"line":161,"column":92}},"32":{"start":{"line":161,"column":45},"end":{"line":161,"column":87}},"33":{"start":{"line":161,"column":75},"end":{"line":161,"column":86}},"34":{"start":{"line":163,"column":23},"end":{"line":163,"column":93}},"35":{"start":{"line":163,"column":65},"end":{"line":163,"column":93}},"36":{"start":{"line":165,"column":29},"end":{"line":165,"column":48}},"37":{"start":{"line":165,"column":35},"end":{"line":165,"column":48}},"38":{"start":{"line":167,"column":30},"end":{"line":167,"column":50}},"39":{"start":{"line":167,"column":36},"end":{"line":167,"column":50}},"40":{"start":{"line":169,"column":2},"end":{"line":174,"column":37}},"41":{"start":{"line":170,"column":4},"end":{"line":173,"column":5}},"42":{"start":{"line":171,"column":6},"end":{"line":171,"column":19}},"43":{"start":{"line":172,"column":6},"end":{"line":172,"column":25}},"44":{"start":{"line":176,"column":2},"end":{"line":222,"column":4}},"45":{"start":{"line":198,"column":18},"end":{"line":198,"column":39}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":68,"column":19},"end":{"line":68,"column":20}},"loc":{"start":{"line":68,"column":39},"end":{"line":68,"column":90}},"line":68},"1":{"name":"(anonymous_1)","decl":{"start":{"line":139,"column":15},"end":{"line":139,"column":16}},"loc":{"start":{"line":139,"column":58},"end":{"line":223,"column":1}},"line":139},"2":{"name":"(anonymous_2)","decl":{"start":{"line":149,"column":12},"end":{"line":149,"column":13}},"loc":{"start":{"line":149,"column":18},"end":{"line":151,"column":3}},"line":149},"3":{"name":"(anonymous_3)","decl":{"start":{"line":153,"column":31},"end":{"line":153,"column":32}},"loc":{"start":{"line":153,"column":51},"end":{"line":153,"column":76}},"line":153},"4":{"name":"(anonymous_4)","decl":{"start":{"line":155,"column":23},"end":{"line":155,"column":24}},"loc":{"start":{"line":155,"column":29},"end":{"line":155,"column":51}},"line":155},"5":{"name":"(anonymous_5)","decl":{"start":{"line":157,"column":24},"end":{"line":157,"column":25}},"loc":{"start":{"line":157,"column":65},"end":{"line":157,"column":97}},"line":157},"6":{"name":"(anonymous_6)","decl":{"start":{"line":159,"column":29},"end":{"line":159,"column":30}},"loc":{"start":{"line":159,"column":35},"end":{"line":159,"column":52}},"line":159},"7":{"name":"(anonymous_7)","decl":{"start":{"line":161,"column":39},"end":{"line":161,"column":40}},"loc":{"start":{"line":161,"column":45},"end":{"line":161,"column":87}},"line":161},"8":{"name":"(anonymous_8)","decl":{"start":{"line":161,"column":59},"end":{"line":161,"column":60}},"loc":{"start":{"line":161,"column":75},"end":{"line":161,"column":86}},"line":161},"9":{"name":"(anonymous_9)","decl":{"start":{"line":163,"column":23},"end":{"line":163,"column":24}},"loc":{"start":{"line":163,"column":65},"end":{"line":163,"column":93}},"line":163},"10":{"name":"(anonymous_10)","decl":{"start":{"line":165,"column":29},"end":{"line":165,"column":30}},"loc":{"start":{"line":165,"column":35},"end":{"line":165,"column":48}},"line":165},"11":{"name":"(anonymous_11)","decl":{"start":{"line":167,"column":30},"end":{"line":167,"column":31}},"loc":{"start":{"line":167,"column":36},"end":{"line":167,"column":50}},"line":167},"12":{"name":"(anonymous_12)","decl":{"start":{"line":169,"column":12},"end":{"line":169,"column":13}},"loc":{"start":{"line":169,"column":18},"end":{"line":174,"column":3}},"line":169},"13":{"name":"(anonymous_13)","decl":{"start":{"line":197,"column":25},"end":{"line":197,"column":26}},"loc":{"start":{"line":197,"column":31},"end":{"line":199,"column":17}},"line":197}},"branchMap":{"0":{"loc":{"start":{"line":68,"column":39},"end":{"line":68,"column":90}},"type":"cond-expr","locations":[{"start":{"line":68,"column":51},"end":{"line":68,"column":69}},{"start":{"line":68,"column":72},"end":{"line":68,"column":90}}],"line":68},"1":{"loc":{"start":{"line":147,"column":55},"end":{"line":147,"column":101}},"type":"cond-expr","locations":[{"start":{"line":147,"column":76},"end":{"line":147,"column":88}},{"start":{"line":147,"column":91},"end":{"line":147,"column":101}}],"line":147},"2":{"loc":{"start":{"line":150,"column":4},"end":{"line":150,"column":77}},"type":"binary-expr","locations":[{"start":{"line":150,"column":4},"end":{"line":150,"column":8}},{"start":{"line":150,"column":12},"end":{"line":150,"column":77}}],"line":150},"3":{"loc":{"start":{"line":150,"column":30},"end":{"line":150,"column":76}},"type":"cond-expr","locations":[{"start":{"line":150,"column":51},"end":{"line":150,"column":63}},{"start":{"line":150,"column":66},"end":{"line":150,"column":76}}],"line":150},"4":{"loc":{"start":{"line":170,"column":4},"end":{"line":173,"column":5}},"type":"if","locations":[{"start":{"line":170,"column":4},"end":{"line":173,"column":5}},{"start":{"line":170,"column":4},"end":{"line":173,"column":5}}],"line":170},"5":{"loc":{"start":{"line":185,"column":13},"end":{"line":191,"column":13}},"type":"binary-expr","locations":[{"start":{"line":185,"column":13},"end":{"line":185,"column":31}},{"start":{"line":186,"column":14},"end":{"line":190,"column":16}}],"line":185},"6":{"loc":{"start":{"line":194,"column":41},"end":{"line":194,"column":105}},"type":"cond-expr","locations":[{"start":{"line":194,"column":73},"end":{"line":194,"column":87}},{"start":{"line":194,"column":90},"end":{"line":194,"column":105}}],"line":194}},"s":{"0":4,"1":4,"2":4,"3":4,"4":4,"5":4,"6":8,"7":4,"8":4,"9":4,"10":4,"11":4,"12":4,"13":8,"14":8,"15":8,"16":8,"17":8,"18":8,"19":8,"20":8,"21":8,"22":4,"23":8,"24":0,"25":8,"26":0,"27":8,"28":0,"29":8,"30":0,"31":8,"32":0,"33":0,"34":8,"35":0,"36":8,"37":0,"38":8,"39":0,"40":8,"41":4,"42":0,"43":0,"44":8,"45":0},"f":{"0":8,"1":8,"2":4,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":4,"13":0},"b":{"0":[0,8],"1":[0,8],"2":[4,0],"3":[0,0],"4":[0,4],"5":[8,8],"6":[8,0]},"_coverageSchema":"43e27e138ebf9cfc5966b082cf9a028302ed4184","hash":"842f4423b499091d1a01e0248a29973ce28bec6b"} +,"C:\\Users\\Hubert\\Desktop\\ELO\\frontend\\src\\components\\Transfer.tsx": {"path":"C:\\Users\\Hubert\\Desktop\\ELO\\frontend\\src\\components\\Transfer.tsx","statementMap":{"0":{"start":{"line":13,"column":18},"end":{"line":20,"column":2}},"1":{"start":{"line":22,"column":23},"end":{"line":39,"column":1}},"2":{"start":{"line":41,"column":27},"end":{"line":46,"column":1}},"3":{"start":{"line":48,"column":30},"end":{"line":53,"column":1}},"4":{"start":{"line":55,"column":27},"end":{"line":58,"column":1}},"5":{"start":{"line":60,"column":28},"end":{"line":71,"column":1}},"6":{"start":{"line":73,"column":24},"end":{"line":114,"column":1}},"7":{"start":{"line":74,"column":18},"end":{"line":74,"column":29}},"8":{"start":{"line":76,"column":2},"end":{"line":113,"column":4}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":73,"column":24},"end":{"line":73,"column":25}},"loc":{"start":{"line":73,"column":68},"end":{"line":114,"column":1}},"line":73}},"branchMap":{},"s":{"0":1,"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":2,"8":2},"f":{"0":2},"b":{},"_coverageSchema":"43e27e138ebf9cfc5966b082cf9a028302ed4184","hash":"6f03e22d698cafd16155ae128a9cd33db3700814"} +,"C:\\Users\\Hubert\\Desktop\\ELO\\frontend\\src\\constants\\index.ts": {"path":"C:\\Users\\Hubert\\Desktop\\ELO\\frontend\\src\\constants\\index.ts","statementMap":{"0":{"start":{"line":1,"column":20},"end":{"line":1,"column":81}},"1":{"start":{"line":2,"column":21},"end":{"line":27,"column":1}},"2":{"start":{"line":29,"column":32},"end":{"line":29,"column":33}},"3":{"start":{"line":32,"column":69},"end":{"line":41,"column":1}},"4":{"start":{"line":44,"column":26},"end":{"line":44,"column":27}},"5":{"start":{"line":45,"column":53},"end":{"line":53,"column":1}}},"fnMap":{},"branchMap":{},"s":{"0":5,"1":5,"2":5,"3":5,"4":5,"5":5},"f":{},"b":{},"_coverageSchema":"43e27e138ebf9cfc5966b082cf9a028302ed4184","hash":"3782d0cff508a073c24e5425f4f1aade939610c4"} +,"C:\\Users\\Hubert\\Desktop\\ELO\\frontend\\src\\contexts\\CASProvider.tsx": {"path":"C:\\Users\\Hubert\\Desktop\\ELO\\frontend\\src\\contexts\\CASProvider.tsx","statementMap":{"0":{"start":{"line":14,"column":26},"end":{"line":14,"column":74}},"1":{"start":{"line":20,"column":27},"end":{"line":78,"column":1}},"2":{"start":{"line":21,"column":26},"end":{"line":21,"column":48}},"3":{"start":{"line":22,"column":28},"end":{"line":22,"column":58}},"4":{"start":{"line":23,"column":42},"end":{"line":23,"column":72}},"5":{"start":{"line":24,"column":26},"end":{"line":24,"column":65}},"6":{"start":{"line":25,"column":48},"end":{"line":25,"column":63}},"7":{"start":{"line":26,"column":2},"end":{"line":56,"column":9}},"8":{"start":{"line":27,"column":18},"end":{"line":54,"column":5}},"9":{"start":{"line":28,"column":24},"end":{"line":28,"column":67}},"10":{"start":{"line":29,"column":21},"end":{"line":29,"column":44}},"11":{"start":{"line":30,"column":6},"end":{"line":32,"column":7}},"12":{"start":{"line":31,"column":8},"end":{"line":31,"column":36}},"13":{"start":{"line":33,"column":6},"end":{"line":53,"column":7}},"14":{"start":{"line":34,"column":8},"end":{"line":44,"column":9}},"15":{"start":{"line":35,"column":10},"end":{"line":35,"column":35}},"16":{"start":{"line":36,"column":33},"end":{"line":38,"column":11}},"17":{"start":{"line":39,"column":10},"end":{"line":39,"column":89}},"18":{"start":{"line":40,"column":10},"end":{"line":40,"column":56}},"19":{"start":{"line":41,"column":10},"end":{"line":41,"column":68}},"20":{"start":{"line":42,"column":10},"end":{"line":42,"column":66}},"21":{"start":{"line":43,"column":10},"end":{"line":43,"column":36}},"22":{"start":{"line":45,"column":22},"end":{"line":45,"column":55}},"23":{"start":{"line":46,"column":29},"end":{"line":46,"column":65}},"24":{"start":{"line":47,"column":21},"end":{"line":47,"column":58}},"25":{"start":{"line":48,"column":8},"end":{"line":48,"column":33}},"26":{"start":{"line":49,"column":8},"end":{"line":49,"column":54}},"27":{"start":{"line":50,"column":8},"end":{"line":50,"column":30}},"28":{"start":{"line":52,"column":8},"end":{"line":52,"column":23}},"29":{"start":{"line":55,"column":4},"end":{"line":55,"column":12}},"30":{"start":{"line":59,"column":4},"end":{"line":59,"column":41}},"31":{"start":{"line":60,"column":4},"end":{"line":60,"column":44}},"32":{"start":{"line":61,"column":4},"end":{"line":61,"column":45}},"33":{"start":{"line":62,"column":4},"end":{"line":62,"column":33}},"34":{"start":{"line":66,"column":4},"end":{"line":66,"column":90}},"35":{"start":{"line":70,"column":4},"end":{"line":70,"column":99}},"36":{"start":{"line":73,"column":2},"end":{"line":77,"column":4}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":20,"column":27},"end":{"line":20,"column":28}},"loc":{"start":{"line":20,"column":63},"end":{"line":78,"column":1}},"line":20},"1":{"name":"(anonymous_1)","decl":{"start":{"line":26,"column":12},"end":{"line":26,"column":13}},"loc":{"start":{"line":26,"column":18},"end":{"line":56,"column":3}},"line":26},"2":{"name":"(anonymous_2)","decl":{"start":{"line":27,"column":18},"end":{"line":27,"column":19}},"loc":{"start":{"line":27,"column":30},"end":{"line":54,"column":5}},"line":27},"3":{"name":"logout","decl":{"start":{"line":58,"column":11},"end":{"line":58,"column":17}},"loc":{"start":{"line":58,"column":20},"end":{"line":63,"column":3}},"line":58},"4":{"name":"redirectToCASLogoutService","decl":{"start":{"line":65,"column":11},"end":{"line":65,"column":37}},"loc":{"start":{"line":65,"column":40},"end":{"line":67,"column":3}},"line":65},"5":{"name":"redirectToCASLoginService","decl":{"start":{"line":69,"column":11},"end":{"line":69,"column":36}},"loc":{"start":{"line":69,"column":39},"end":{"line":71,"column":3}},"line":69}},"branchMap":{"0":{"loc":{"start":{"line":30,"column":6},"end":{"line":32,"column":7}},"type":"if","locations":[{"start":{"line":30,"column":6},"end":{"line":32,"column":7}},{"start":{"line":30,"column":6},"end":{"line":32,"column":7}}],"line":30},"1":{"loc":{"start":{"line":34,"column":8},"end":{"line":44,"column":9}},"type":"if","locations":[{"start":{"line":34,"column":8},"end":{"line":44,"column":9}},{"start":{"line":34,"column":8},"end":{"line":44,"column":9}}],"line":34},"2":{"loc":{"start":{"line":48,"column":8},"end":{"line":48,"column":32}},"type":"binary-expr","locations":[{"start":{"line":48,"column":8},"end":{"line":48,"column":13}},{"start":{"line":48,"column":17},"end":{"line":48,"column":32}}],"line":48},"3":{"loc":{"start":{"line":49,"column":8},"end":{"line":49,"column":53}},"type":"binary-expr","locations":[{"start":{"line":49,"column":8},"end":{"line":49,"column":20}},{"start":{"line":49,"column":24},"end":{"line":49,"column":53}}],"line":49},"4":{"loc":{"start":{"line":50,"column":8},"end":{"line":50,"column":29}},"type":"binary-expr","locations":[{"start":{"line":50,"column":8},"end":{"line":50,"column":12}},{"start":{"line":50,"column":16},"end":{"line":50,"column":29}}],"line":50}},"s":{"0":5,"1":5,"2":20,"3":20,"4":20,"5":20,"6":20,"7":20,"8":10,"9":10,"10":10,"11":10,"12":10,"13":10,"14":10,"15":10,"16":10,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":10,"30":0,"31":0,"32":0,"33":0,"34":0,"35":10,"36":20},"f":{"0":20,"1":10,"2":10,"3":0,"4":0,"5":10},"b":{"0":[10,0],"1":[10,0],"2":[0,0],"3":[0,0],"4":[0,0]},"_coverageSchema":"43e27e138ebf9cfc5966b082cf9a028302ed4184","hash":"c51279a5c2f7087e3e294147de6ccc17316ab536"} +,"C:\\Users\\Hubert\\Desktop\\ELO\\frontend\\src\\contexts\\CoursesProvider.tsx": {"path":"C:\\Users\\Hubert\\Desktop\\ELO\\frontend\\src\\contexts\\CoursesProvider.tsx","statementMap":{"0":{"start":{"line":8,"column":24},"end":{"line":14,"column":1}},"1":{"start":{"line":41,"column":30},"end":{"line":41,"column":81}},"2":{"start":{"line":47,"column":31},"end":{"line":309,"column":1}},"3":{"start":{"line":48,"column":30},"end":{"line":48,"column":43}},"4":{"start":{"line":49,"column":28},"end":{"line":49,"column":41}},"5":{"start":{"line":52,"column":32},"end":{"line":52,"column":59}},"6":{"start":{"line":53,"column":30},"end":{"line":53,"column":57}},"7":{"start":{"line":54,"column":44},"end":{"line":54,"column":71}},"8":{"start":{"line":55,"column":50},"end":{"line":55,"column":87}},"9":{"start":{"line":56,"column":30},"end":{"line":56,"column":42}},"10":{"start":{"line":57,"column":42},"end":{"line":57,"column":82}},"11":{"start":{"line":58,"column":44},"end":{"line":58,"column":59}},"12":{"start":{"line":60,"column":26},"end":{"line":64,"column":3}},"13":{"start":{"line":61,"column":23},"end":{"line":61,"column":107}},"14":{"start":{"line":61,"column":46},"end":{"line":61,"column":65}},"15":{"start":{"line":61,"column":86},"end":{"line":61,"column":106}},"16":{"start":{"line":62,"column":24},"end":{"line":62,"column":108}},"17":{"start":{"line":62,"column":47},"end":{"line":62,"column":66}},"18":{"start":{"line":62,"column":87},"end":{"line":62,"column":107}},"19":{"start":{"line":63,"column":4},"end":{"line":63,"column":43}},"20":{"start":{"line":66,"column":28},"end":{"line":66,"column":64}},"21":{"start":{"line":66,"column":34},"end":{"line":66,"column":64}},"22":{"start":{"line":66,"column":59},"end":{"line":66,"column":63}},"23":{"start":{"line":68,"column":30},"end":{"line":74,"column":3}},"24":{"start":{"line":69,"column":24},"end":{"line":69,"column":43}},"25":{"start":{"line":70,"column":4},"end":{"line":73,"column":28}},"26":{"start":{"line":71,"column":21},"end":{"line":71,"column":68}},"27":{"start":{"line":71,"column":48},"end":{"line":71,"column":67}},"28":{"start":{"line":72,"column":6},"end":{"line":72,"column":59}},"29":{"start":{"line":76,"column":32},"end":{"line":87,"column":3}},"30":{"start":{"line":77,"column":4},"end":{"line":86,"column":36}},"31":{"start":{"line":78,"column":23},"end":{"line":78,"column":25}},"32":{"start":{"line":79,"column":6},"end":{"line":81,"column":7}},"33":{"start":{"line":80,"column":8},"end":{"line":80,"column":42}},"34":{"start":{"line":82,"column":6},"end":{"line":84,"column":7}},"35":{"start":{"line":83,"column":8},"end":{"line":83,"column":42}},"36":{"start":{"line":85,"column":6},"end":{"line":85,"column":17}},"37":{"start":{"line":89,"column":39},"end":{"line":100,"column":3}},"38":{"start":{"line":90,"column":4},"end":{"line":99,"column":36}},"39":{"start":{"line":91,"column":23},"end":{"line":91,"column":25}},"40":{"start":{"line":92,"column":6},"end":{"line":94,"column":7}},"41":{"start":{"line":93,"column":8},"end":{"line":93,"column":42}},"42":{"start":{"line":95,"column":6},"end":{"line":97,"column":7}},"43":{"start":{"line":96,"column":8},"end":{"line":96,"column":42}},"44":{"start":{"line":98,"column":6},"end":{"line":98,"column":17}},"45":{"start":{"line":103,"column":35},"end":{"line":110,"column":3}},"46":{"start":{"line":104,"column":19},"end":{"line":104,"column":59}},"47":{"start":{"line":104,"column":43},"end":{"line":104,"column":58}},"48":{"start":{"line":105,"column":4},"end":{"line":109,"column":5}},"49":{"start":{"line":106,"column":6},"end":{"line":106,"column":66}},"50":{"start":{"line":108,"column":6},"end":{"line":108,"column":56}},"51":{"start":{"line":112,"column":29},"end":{"line":112,"column":76}},"52":{"start":{"line":112,"column":54},"end":{"line":112,"column":76}},"53":{"start":{"line":114,"column":28},"end":{"line":114,"column":79}},"54":{"start":{"line":114,"column":52},"end":{"line":114,"column":79}},"55":{"start":{"line":116,"column":28},"end":{"line":124,"column":3}},"56":{"start":{"line":117,"column":35},"end":{"line":122,"column":5}},"57":{"start":{"line":123,"column":4},"end":{"line":123,"column":43}},"58":{"start":{"line":126,"column":27},"end":{"line":126,"column":97}},"59":{"start":{"line":126,"column":43},"end":{"line":126,"column":97}},"60":{"start":{"line":126,"column":79},"end":{"line":126,"column":95}},"61":{"start":{"line":128,"column":24},"end":{"line":134,"column":3}},"62":{"start":{"line":129,"column":4},"end":{"line":129,"column":25}},"63":{"start":{"line":130,"column":4},"end":{"line":133,"column":12}},"64":{"start":{"line":131,"column":6},"end":{"line":131,"column":43}},"65":{"start":{"line":132,"column":6},"end":{"line":132,"column":45}},"66":{"start":{"line":136,"column":21},"end":{"line":165,"column":3}},"67":{"start":{"line":137,"column":22},"end":{"line":137,"column":39}},"68":{"start":{"line":138,"column":19},"end":{"line":146,"column":5}},"69":{"start":{"line":139,"column":6},"end":{"line":145,"column":9}},"70":{"start":{"line":142,"column":12},"end":{"line":142,"column":31}},"71":{"start":{"line":148,"column":4},"end":{"line":163,"column":5}},"72":{"start":{"line":149,"column":6},"end":{"line":152,"column":8}},"73":{"start":{"line":153,"column":6},"end":{"line":156,"column":9}},"74":{"start":{"line":158,"column":6},"end":{"line":158,"column":32}},"75":{"start":{"line":159,"column":6},"end":{"line":162,"column":9}},"76":{"start":{"line":164,"column":4},"end":{"line":164,"column":40}},"77":{"start":{"line":167,"column":30},"end":{"line":177,"column":3}},"78":{"start":{"line":168,"column":25},"end":{"line":168,"column":77}},"79":{"start":{"line":168,"column":51},"end":{"line":168,"column":73}},"80":{"start":{"line":169,"column":4},"end":{"line":176,"column":5}},"81":{"start":{"line":171,"column":19},"end":{"line":171,"column":92}},"82":{"start":{"line":172,"column":6},"end":{"line":174,"column":8}},"83":{"start":{"line":173,"column":32},"end":{"line":173,"column":147}},"84":{"start":{"line":175,"column":6},"end":{"line":175,"column":31}},"85":{"start":{"line":179,"column":31},"end":{"line":191,"column":3}},"86":{"start":{"line":180,"column":25},"end":{"line":180,"column":77}},"87":{"start":{"line":180,"column":51},"end":{"line":180,"column":73}},"88":{"start":{"line":181,"column":21},"end":{"line":181,"column":33}},"89":{"start":{"line":182,"column":4},"end":{"line":190,"column":5}},"90":{"start":{"line":183,"column":6},"end":{"line":185,"column":8}},"91":{"start":{"line":184,"column":32},"end":{"line":184,"column":109}},"92":{"start":{"line":186,"column":11},"end":{"line":190,"column":5}},"93":{"start":{"line":187,"column":6},"end":{"line":189,"column":8}},"94":{"start":{"line":188,"column":32},"end":{"line":188,"column":109}},"95":{"start":{"line":193,"column":29},"end":{"line":203,"column":3}},"96":{"start":{"line":194,"column":4},"end":{"line":202,"column":5}},"97":{"start":{"line":195,"column":23},"end":{"line":197,"column":7}},"98":{"start":{"line":198,"column":21},"end":{"line":198,"column":44}},"99":{"start":{"line":199,"column":6},"end":{"line":199,"column":24}},"100":{"start":{"line":201,"column":6},"end":{"line":201,"column":21}},"101":{"start":{"line":205,"column":36},"end":{"line":216,"column":3}},"102":{"start":{"line":206,"column":4},"end":{"line":215,"column":5}},"103":{"start":{"line":207,"column":23},"end":{"line":209,"column":7}},"104":{"start":{"line":210,"column":21},"end":{"line":210,"column":44}},"105":{"start":{"line":212,"column":6},"end":{"line":212,"column":24}},"106":{"start":{"line":214,"column":6},"end":{"line":214,"column":21}},"107":{"start":{"line":218,"column":38},"end":{"line":227,"column":3}},"108":{"start":{"line":219,"column":4},"end":{"line":226,"column":5}},"109":{"start":{"line":220,"column":23},"end":{"line":222,"column":7}},"110":{"start":{"line":223,"column":6},"end":{"line":223,"column":32}},"111":{"start":{"line":225,"column":6},"end":{"line":225,"column":21}},"112":{"start":{"line":229,"column":23},"end":{"line":239,"column":3}},"113":{"start":{"line":230,"column":4},"end":{"line":238,"column":5}},"114":{"start":{"line":231,"column":32},"end":{"line":233,"column":7}},"115":{"start":{"line":234,"column":28},"end":{"line":234,"column":78}},"116":{"start":{"line":234,"column":52},"end":{"line":234,"column":76}},"117":{"start":{"line":235,"column":6},"end":{"line":235,"column":32}},"118":{"start":{"line":237,"column":6},"end":{"line":237,"column":21}},"119":{"start":{"line":241,"column":44},"end":{"line":267,"column":3}},"120":{"start":{"line":242,"column":34},"end":{"line":242,"column":36}},"121":{"start":{"line":243,"column":4},"end":{"line":265,"column":5}},"122":{"start":{"line":244,"column":6},"end":{"line":264,"column":7}},"123":{"start":{"line":245,"column":48},"end":{"line":245,"column":54}},"124":{"start":{"line":246,"column":36},"end":{"line":246,"column":58}},"125":{"start":{"line":247,"column":8},"end":{"line":253,"column":9}},"126":{"start":{"line":248,"column":10},"end":{"line":252,"column":11}},"127":{"start":{"line":249,"column":12},"end":{"line":251,"column":13}},"128":{"start":{"line":250,"column":14},"end":{"line":250,"column":69}},"129":{"start":{"line":254,"column":8},"end":{"line":260,"column":9}},"130":{"start":{"line":255,"column":10},"end":{"line":259,"column":11}},"131":{"start":{"line":256,"column":12},"end":{"line":258,"column":13}},"132":{"start":{"line":257,"column":14},"end":{"line":257,"column":73}},"133":{"start":{"line":261,"column":8},"end":{"line":263,"column":9}},"134":{"start":{"line":262,"column":10},"end":{"line":262,"column":37}},"135":{"start":{"line":266,"column":4},"end":{"line":266,"column":29}},"136":{"start":{"line":269,"column":2},"end":{"line":276,"column":9}},"137":{"start":{"line":270,"column":4},"end":{"line":270,"column":27}},"138":{"start":{"line":271,"column":4},"end":{"line":275,"column":12}},"139":{"start":{"line":272,"column":6},"end":{"line":272,"column":21}},"140":{"start":{"line":273,"column":6},"end":{"line":273,"column":27}},"141":{"start":{"line":274,"column":6},"end":{"line":274,"column":30}},"142":{"start":{"line":278,"column":2},"end":{"line":308,"column":4}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":47,"column":31},"end":{"line":47,"column":32}},"loc":{"start":{"line":47,"column":71},"end":{"line":309,"column":1}},"line":47},"1":{"name":"(anonymous_1)","decl":{"start":{"line":60,"column":26},"end":{"line":60,"column":27}},"loc":{"start":{"line":60,"column":32},"end":{"line":64,"column":3}},"line":60},"2":{"name":"(anonymous_2)","decl":{"start":{"line":61,"column":34},"end":{"line":61,"column":35}},"loc":{"start":{"line":61,"column":46},"end":{"line":61,"column":65}},"line":61},"3":{"name":"(anonymous_3)","decl":{"start":{"line":61,"column":74},"end":{"line":61,"column":75}},"loc":{"start":{"line":61,"column":86},"end":{"line":61,"column":106}},"line":61},"4":{"name":"(anonymous_4)","decl":{"start":{"line":62,"column":35},"end":{"line":62,"column":36}},"loc":{"start":{"line":62,"column":47},"end":{"line":62,"column":66}},"line":62},"5":{"name":"(anonymous_5)","decl":{"start":{"line":62,"column":75},"end":{"line":62,"column":76}},"loc":{"start":{"line":62,"column":87},"end":{"line":62,"column":107}},"line":62},"6":{"name":"(anonymous_6)","decl":{"start":{"line":66,"column":28},"end":{"line":66,"column":29}},"loc":{"start":{"line":66,"column":34},"end":{"line":66,"column":64}},"line":66},"7":{"name":"(anonymous_7)","decl":{"start":{"line":66,"column":45},"end":{"line":66,"column":46}},"loc":{"start":{"line":66,"column":59},"end":{"line":66,"column":63}},"line":66},"8":{"name":"(anonymous_8)","decl":{"start":{"line":68,"column":30},"end":{"line":68,"column":31}},"loc":{"start":{"line":68,"column":36},"end":{"line":74,"column":3}},"line":68},"9":{"name":"(anonymous_9)","decl":{"start":{"line":70,"column":30},"end":{"line":70,"column":31}},"loc":{"start":{"line":70,"column":51},"end":{"line":73,"column":5}},"line":70},"10":{"name":"(anonymous_10)","decl":{"start":{"line":71,"column":34},"end":{"line":71,"column":35}},"loc":{"start":{"line":71,"column":48},"end":{"line":71,"column":67}},"line":71},"11":{"name":"(anonymous_11)","decl":{"start":{"line":76,"column":32},"end":{"line":76,"column":33}},"loc":{"start":{"line":76,"column":38},"end":{"line":87,"column":3}},"line":76},"12":{"name":"(anonymous_12)","decl":{"start":{"line":77,"column":25},"end":{"line":77,"column":26}},"loc":{"start":{"line":77,"column":38},"end":{"line":86,"column":5}},"line":77},"13":{"name":"(anonymous_13)","decl":{"start":{"line":89,"column":39},"end":{"line":89,"column":40}},"loc":{"start":{"line":89,"column":45},"end":{"line":100,"column":3}},"line":89},"14":{"name":"(anonymous_14)","decl":{"start":{"line":90,"column":32},"end":{"line":90,"column":33}},"loc":{"start":{"line":90,"column":45},"end":{"line":99,"column":5}},"line":90},"15":{"name":"(anonymous_15)","decl":{"start":{"line":103,"column":35},"end":{"line":103,"column":36}},"loc":{"start":{"line":103,"column":57},"end":{"line":110,"column":3}},"line":103},"16":{"name":"(anonymous_16)","decl":{"start":{"line":104,"column":31},"end":{"line":104,"column":32}},"loc":{"start":{"line":104,"column":43},"end":{"line":104,"column":58}},"line":104},"17":{"name":"(anonymous_17)","decl":{"start":{"line":112,"column":29},"end":{"line":112,"column":30}},"loc":{"start":{"line":112,"column":54},"end":{"line":112,"column":76}},"line":112},"18":{"name":"(anonymous_18)","decl":{"start":{"line":114,"column":28},"end":{"line":114,"column":29}},"loc":{"start":{"line":114,"column":52},"end":{"line":114,"column":79}},"line":114},"19":{"name":"(anonymous_19)","decl":{"start":{"line":116,"column":28},"end":{"line":116,"column":29}},"loc":{"start":{"line":116,"column":48},"end":{"line":124,"column":3}},"line":116},"20":{"name":"(anonymous_20)","decl":{"start":{"line":126,"column":27},"end":{"line":126,"column":28}},"loc":{"start":{"line":126,"column":43},"end":{"line":126,"column":97}},"line":126},"21":{"name":"(anonymous_21)","decl":{"start":{"line":126,"column":67},"end":{"line":126,"column":68}},"loc":{"start":{"line":126,"column":79},"end":{"line":126,"column":95}},"line":126},"22":{"name":"(anonymous_22)","decl":{"start":{"line":128,"column":24},"end":{"line":128,"column":25}},"loc":{"start":{"line":128,"column":53},"end":{"line":134,"column":3}},"line":128},"23":{"name":"(anonymous_23)","decl":{"start":{"line":130,"column":15},"end":{"line":130,"column":16}},"loc":{"start":{"line":130,"column":21},"end":{"line":133,"column":5}},"line":130},"24":{"name":"(anonymous_24)","decl":{"start":{"line":136,"column":21},"end":{"line":136,"column":22}},"loc":{"start":{"line":136,"column":47},"end":{"line":165,"column":3}},"line":136},"25":{"name":"(anonymous_25)","decl":{"start":{"line":138,"column":19},"end":{"line":138,"column":20}},"loc":{"start":{"line":139,"column":6},"end":{"line":145,"column":9}},"line":139},"26":{"name":"(anonymous_26)","decl":{"start":{"line":141,"column":19},"end":{"line":141,"column":20}},"loc":{"start":{"line":141,"column":25},"end":{"line":143,"column":11}},"line":141},"27":{"name":"(anonymous_27)","decl":{"start":{"line":167,"column":30},"end":{"line":167,"column":31}},"loc":{"start":{"line":167,"column":71},"end":{"line":177,"column":3}},"line":167},"28":{"name":"(anonymous_28)","decl":{"start":{"line":168,"column":39},"end":{"line":168,"column":40}},"loc":{"start":{"line":168,"column":51},"end":{"line":168,"column":73}},"line":168},"29":{"name":"(anonymous_29)","decl":{"start":{"line":173,"column":19},"end":{"line":173,"column":20}},"loc":{"start":{"line":173,"column":32},"end":{"line":173,"column":147}},"line":173},"30":{"name":"(anonymous_30)","decl":{"start":{"line":179,"column":31},"end":{"line":179,"column":32}},"loc":{"start":{"line":179,"column":74},"end":{"line":191,"column":3}},"line":179},"31":{"name":"(anonymous_31)","decl":{"start":{"line":180,"column":39},"end":{"line":180,"column":40}},"loc":{"start":{"line":180,"column":51},"end":{"line":180,"column":73}},"line":180},"32":{"name":"(anonymous_32)","decl":{"start":{"line":184,"column":19},"end":{"line":184,"column":20}},"loc":{"start":{"line":184,"column":32},"end":{"line":184,"column":109}},"line":184},"33":{"name":"(anonymous_33)","decl":{"start":{"line":188,"column":19},"end":{"line":188,"column":20}},"loc":{"start":{"line":188,"column":32},"end":{"line":188,"column":109}},"line":188},"34":{"name":"(anonymous_34)","decl":{"start":{"line":193,"column":29},"end":{"line":193,"column":30}},"loc":{"start":{"line":193,"column":41},"end":{"line":203,"column":3}},"line":193},"35":{"name":"(anonymous_35)","decl":{"start":{"line":205,"column":36},"end":{"line":205,"column":37}},"loc":{"start":{"line":205,"column":65},"end":{"line":216,"column":3}},"line":205},"36":{"name":"(anonymous_36)","decl":{"start":{"line":218,"column":38},"end":{"line":218,"column":39}},"loc":{"start":{"line":218,"column":67},"end":{"line":227,"column":3}},"line":218},"37":{"name":"(anonymous_37)","decl":{"start":{"line":229,"column":23},"end":{"line":229,"column":24}},"loc":{"start":{"line":229,"column":35},"end":{"line":239,"column":3}},"line":229},"38":{"name":"(anonymous_38)","decl":{"start":{"line":234,"column":41},"end":{"line":234,"column":42}},"loc":{"start":{"line":234,"column":52},"end":{"line":234,"column":76}},"line":234},"39":{"name":"(anonymous_39)","decl":{"start":{"line":241,"column":44},"end":{"line":241,"column":45}},"loc":{"start":{"line":241,"column":74},"end":{"line":267,"column":3}},"line":241},"40":{"name":"(anonymous_40)","decl":{"start":{"line":269,"column":12},"end":{"line":269,"column":13}},"loc":{"start":{"line":269,"column":18},"end":{"line":276,"column":3}},"line":269},"41":{"name":"(anonymous_41)","decl":{"start":{"line":271,"column":15},"end":{"line":271,"column":16}},"loc":{"start":{"line":271,"column":21},"end":{"line":275,"column":5}},"line":271}},"branchMap":{"0":{"loc":{"start":{"line":72,"column":13},"end":{"line":72,"column":58}},"type":"cond-expr","locations":[{"start":{"line":72,"column":36},"end":{"line":72,"column":39}},{"start":{"line":72,"column":42},"end":{"line":72,"column":58}}],"line":72},"1":{"loc":{"start":{"line":79,"column":6},"end":{"line":81,"column":7}},"type":"if","locations":[{"start":{"line":79,"column":6},"end":{"line":81,"column":7}},{"start":{"line":79,"column":6},"end":{"line":81,"column":7}}],"line":79},"2":{"loc":{"start":{"line":82,"column":6},"end":{"line":84,"column":7}},"type":"if","locations":[{"start":{"line":82,"column":6},"end":{"line":84,"column":7}},{"start":{"line":82,"column":6},"end":{"line":84,"column":7}}],"line":82},"3":{"loc":{"start":{"line":92,"column":6},"end":{"line":94,"column":7}},"type":"if","locations":[{"start":{"line":92,"column":6},"end":{"line":94,"column":7}},{"start":{"line":92,"column":6},"end":{"line":94,"column":7}}],"line":92},"4":{"loc":{"start":{"line":95,"column":6},"end":{"line":97,"column":7}},"type":"if","locations":[{"start":{"line":95,"column":6},"end":{"line":97,"column":7}},{"start":{"line":95,"column":6},"end":{"line":97,"column":7}}],"line":95},"5":{"loc":{"start":{"line":105,"column":4},"end":{"line":109,"column":5}},"type":"if","locations":[{"start":{"line":105,"column":4},"end":{"line":109,"column":5}},{"start":{"line":105,"column":4},"end":{"line":109,"column":5}}],"line":105},"6":{"loc":{"start":{"line":120,"column":15},"end":{"line":120,"column":75}},"type":"cond-expr","locations":[{"start":{"line":120,"column":46},"end":{"line":120,"column":63}},{"start":{"line":120,"column":66},"end":{"line":120,"column":75}}],"line":120},"7":{"loc":{"start":{"line":121,"column":15},"end":{"line":121,"column":77}},"type":"cond-expr","locations":[{"start":{"line":121,"column":47},"end":{"line":121,"column":65}},{"start":{"line":121,"column":68},"end":{"line":121,"column":77}}],"line":121},"8":{"loc":{"start":{"line":169,"column":4},"end":{"line":176,"column":5}},"type":"if","locations":[{"start":{"line":169,"column":4},"end":{"line":176,"column":5}},{"start":{"line":169,"column":4},"end":{"line":176,"column":5}}],"line":169},"9":{"loc":{"start":{"line":169,"column":8},"end":{"line":169,"column":52}},"type":"binary-expr","locations":[{"start":{"line":169,"column":8},"end":{"line":169,"column":28}},{"start":{"line":169,"column":32},"end":{"line":169,"column":52}}],"line":169},"10":{"loc":{"start":{"line":171,"column":19},"end":{"line":171,"column":92}},"type":"cond-expr","locations":[{"start":{"line":171,"column":49},"end":{"line":171,"column":69}},{"start":{"line":171,"column":72},"end":{"line":171,"column":92}}],"line":171},"11":{"loc":{"start":{"line":173,"column":32},"end":{"line":173,"column":147}},"type":"cond-expr","locations":[{"start":{"line":173,"column":64},"end":{"line":173,"column":138}},{"start":{"line":173,"column":141},"end":{"line":173,"column":147}}],"line":173},"12":{"loc":{"start":{"line":182,"column":4},"end":{"line":190,"column":5}},"type":"if","locations":[{"start":{"line":182,"column":4},"end":{"line":190,"column":5}},{"start":{"line":182,"column":4},"end":{"line":190,"column":5}}],"line":182},"13":{"loc":{"start":{"line":184,"column":32},"end":{"line":184,"column":109}},"type":"cond-expr","locations":[{"start":{"line":184,"column":64},"end":{"line":184,"column":100}},{"start":{"line":184,"column":103},"end":{"line":184,"column":109}}],"line":184},"14":{"loc":{"start":{"line":186,"column":11},"end":{"line":190,"column":5}},"type":"if","locations":[{"start":{"line":186,"column":11},"end":{"line":190,"column":5}},{"start":{"line":186,"column":11},"end":{"line":190,"column":5}}],"line":186},"15":{"loc":{"start":{"line":188,"column":32},"end":{"line":188,"column":109}},"type":"cond-expr","locations":[{"start":{"line":188,"column":64},"end":{"line":188,"column":100}},{"start":{"line":188,"column":103},"end":{"line":188,"column":109}}],"line":188},"16":{"loc":{"start":{"line":198,"column":21},"end":{"line":198,"column":44}},"type":"cond-expr","locations":[{"start":{"line":198,"column":35},"end":{"line":198,"column":37}},{"start":{"line":198,"column":40},"end":{"line":198,"column":44}}],"line":198},"17":{"loc":{"start":{"line":210,"column":21},"end":{"line":210,"column":44}},"type":"cond-expr","locations":[{"start":{"line":210,"column":35},"end":{"line":210,"column":37}},{"start":{"line":210,"column":40},"end":{"line":210,"column":44}}],"line":210},"18":{"loc":{"start":{"line":234,"column":52},"end":{"line":234,"column":76}},"type":"cond-expr","locations":[{"start":{"line":234,"column":70},"end":{"line":234,"column":71}},{"start":{"line":234,"column":74},"end":{"line":234,"column":76}}],"line":234},"19":{"loc":{"start":{"line":247,"column":8},"end":{"line":253,"column":9}},"type":"if","locations":[{"start":{"line":247,"column":8},"end":{"line":253,"column":9}},{"start":{"line":247,"column":8},"end":{"line":253,"column":9}}],"line":247},"20":{"loc":{"start":{"line":249,"column":12},"end":{"line":251,"column":13}},"type":"if","locations":[{"start":{"line":249,"column":12},"end":{"line":251,"column":13}},{"start":{"line":249,"column":12},"end":{"line":251,"column":13}}],"line":249},"21":{"loc":{"start":{"line":254,"column":8},"end":{"line":260,"column":9}},"type":"if","locations":[{"start":{"line":254,"column":8},"end":{"line":260,"column":9}},{"start":{"line":254,"column":8},"end":{"line":260,"column":9}}],"line":254},"22":{"loc":{"start":{"line":256,"column":12},"end":{"line":258,"column":13}},"type":"if","locations":[{"start":{"line":256,"column":12},"end":{"line":258,"column":13}},{"start":{"line":256,"column":12},"end":{"line":258,"column":13}}],"line":256},"23":{"loc":{"start":{"line":261,"column":8},"end":{"line":263,"column":9}},"type":"if","locations":[{"start":{"line":261,"column":8},"end":{"line":263,"column":9}},{"start":{"line":261,"column":8},"end":{"line":263,"column":9}}],"line":261},"24":{"loc":{"start":{"line":261,"column":12},"end":{"line":261,"column":86}},"type":"binary-expr","locations":[{"start":{"line":261,"column":12},"end":{"line":261,"column":47}},{"start":{"line":261,"column":51},"end":{"line":261,"column":86}}],"line":261}},"s":{"0":5,"1":5,"2":5,"3":20,"4":20,"5":20,"6":20,"7":20,"8":20,"9":20,"10":20,"11":20,"12":20,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":20,"21":12,"22":0,"23":20,"24":4,"25":4,"26":0,"27":0,"28":0,"29":20,"30":2,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":20,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":20,"46":0,"47":0,"48":0,"49":0,"50":0,"51":20,"52":0,"53":20,"54":0,"55":20,"56":0,"57":0,"58":20,"59":0,"60":0,"61":20,"62":0,"63":0,"64":0,"65":0,"66":20,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":20,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":20,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":20,"96":0,"97":0,"98":0,"99":0,"100":0,"101":20,"102":0,"103":0,"104":0,"105":0,"106":0,"107":20,"108":0,"109":0,"110":0,"111":0,"112":20,"113":0,"114":0,"115":0,"116":0,"117":0,"118":0,"119":20,"120":0,"121":0,"122":0,"123":0,"124":0,"125":0,"126":0,"127":0,"128":0,"129":0,"130":0,"131":0,"132":0,"133":0,"134":0,"135":0,"136":20,"137":10,"138":10,"139":0,"140":0,"141":0,"142":20},"f":{"0":20,"1":0,"2":0,"3":0,"4":0,"5":0,"6":12,"7":0,"8":4,"9":0,"10":0,"11":2,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":10,"41":0},"b":{"0":[0,0],"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0],"13":[0,0],"14":[0,0],"15":[0,0],"16":[0,0],"17":[0,0],"18":[0,0],"19":[0,0],"20":[0,0],"21":[0,0],"22":[0,0],"23":[0,0],"24":[0,0]},"_coverageSchema":"43e27e138ebf9cfc5966b082cf9a028302ed4184","hash":"e94b20e8d286e9821a23bc2940a2de87c17f695b"} +,"C:\\Users\\Hubert\\Desktop\\ELO\\frontend\\src\\contexts\\StudentsProvider.tsx": {"path":"C:\\Users\\Hubert\\Desktop\\ELO\\frontend\\src\\contexts\\StudentsProvider.tsx","statementMap":{"0":{"start":{"line":11,"column":31},"end":{"line":11,"column":83}},"1":{"start":{"line":17,"column":32},"end":{"line":54,"column":1}},"2":{"start":{"line":18,"column":34},"end":{"line":18,"column":62}},"3":{"start":{"line":19,"column":48},"end":{"line":19,"column":78}},"4":{"start":{"line":21,"column":22},"end":{"line":30,"column":3}},"5":{"start":{"line":22,"column":4},"end":{"line":29,"column":5}},"6":{"start":{"line":23,"column":23},"end":{"line":25,"column":7}},"7":{"start":{"line":26,"column":6},"end":{"line":26,"column":24}},"8":{"start":{"line":28,"column":6},"end":{"line":28,"column":21}},"9":{"start":{"line":32,"column":32},"end":{"line":34,"column":3}},"10":{"start":{"line":33,"column":4},"end":{"line":33,"column":78}},"11":{"start":{"line":33,"column":50},"end":{"line":33,"column":74}},"12":{"start":{"line":36,"column":2},"end":{"line":41,"column":9}},"13":{"start":{"line":37,"column":4},"end":{"line":40,"column":12}},"14":{"start":{"line":38,"column":28},"end":{"line":38,"column":65}},"15":{"start":{"line":39,"column":6},"end":{"line":39,"column":51}},"16":{"start":{"line":43,"column":2},"end":{"line":53,"column":4}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":17,"column":32},"end":{"line":17,"column":33}},"loc":{"start":{"line":17,"column":73},"end":{"line":54,"column":1}},"line":17},"1":{"name":"(anonymous_1)","decl":{"start":{"line":21,"column":22},"end":{"line":21,"column":23}},"loc":{"start":{"line":21,"column":34},"end":{"line":30,"column":3}},"line":21},"2":{"name":"(anonymous_2)","decl":{"start":{"line":32,"column":32},"end":{"line":32,"column":33}},"loc":{"start":{"line":32,"column":55},"end":{"line":34,"column":3}},"line":32},"3":{"name":"(anonymous_3)","decl":{"start":{"line":33,"column":37},"end":{"line":33,"column":38}},"loc":{"start":{"line":33,"column":50},"end":{"line":33,"column":74}},"line":33},"4":{"name":"(anonymous_4)","decl":{"start":{"line":36,"column":12},"end":{"line":36,"column":13}},"loc":{"start":{"line":36,"column":18},"end":{"line":41,"column":3}},"line":36},"5":{"name":"(anonymous_5)","decl":{"start":{"line":37,"column":15},"end":{"line":37,"column":16}},"loc":{"start":{"line":37,"column":21},"end":{"line":40,"column":5}},"line":37}},"branchMap":{"0":{"loc":{"start":{"line":39,"column":6},"end":{"line":39,"column":50}},"type":"binary-expr","locations":[{"start":{"line":39,"column":6},"end":{"line":39,"column":33}},{"start":{"line":39,"column":37},"end":{"line":39,"column":50}}],"line":39}},"s":{"0":5,"1":5,"2":10,"3":10,"4":10,"5":0,"6":0,"7":0,"8":0,"9":10,"10":0,"11":0,"12":10,"13":10,"14":0,"15":0,"16":10},"f":{"0":10,"1":0,"2":0,"3":0,"4":10,"5":0},"b":{"0":[0,0]},"_coverageSchema":"43e27e138ebf9cfc5966b082cf9a028302ed4184","hash":"0df9ee068c82278a7c74b8829e924526feb7b716"} +,"C:\\Users\\Hubert\\Desktop\\ELO\\frontend\\src\\styles\\GlobalStyles.ts": {"path":"C:\\Users\\Hubert\\Desktop\\ELO\\frontend\\src\\styles\\GlobalStyles.ts","statementMap":{"0":{"start":{"line":3,"column":28},"end":{"line":20,"column":1}}},"fnMap":{},"branchMap":{},"s":{"0":0},"f":{},"b":{},"hash":"24532e55872482c1b442853cc2c12e622dc78490"} +,"C:\\Users\\Hubert\\Desktop\\ELO\\frontend\\src\\types\\index.ts": {"path":"C:\\Users\\Hubert\\Desktop\\ELO\\frontend\\src\\types\\index.ts","statementMap":{},"fnMap":{},"branchMap":{},"s":{},"f":{},"b":{},"_coverageSchema":"43e27e138ebf9cfc5966b082cf9a028302ed4184","hash":"22a94df1d3408e68c73773aebfb4656937c0c1d1"} +,"C:\\Users\\Hubert\\Desktop\\ELO\\frontend\\src\\utils\\axiosInstance.ts": {"path":"C:\\Users\\Hubert\\Desktop\\ELO\\frontend\\src\\utils\\axiosInstance.ts","statementMap":{"0":{"start":{"line":3,"column":29},"end":{"line":3,"column":43}},"1":{"start":{"line":6,"column":21},"end":{"line":18,"column":1}},"2":{"start":{"line":7,"column":2},"end":{"line":17,"column":3}},"3":{"start":{"line":8,"column":25},"end":{"line":8,"column":61}},"4":{"start":{"line":9,"column":21},"end":{"line":11,"column":5}},"5":{"start":{"line":12,"column":4},"end":{"line":12,"column":50}},"6":{"start":{"line":13,"column":4},"end":{"line":13,"column":60}},"7":{"start":{"line":14,"column":4},"end":{"line":14,"column":22}},"8":{"start":{"line":16,"column":4},"end":{"line":16,"column":19}},"9":{"start":{"line":20,"column":0},"end":{"line":31,"column":2}},"10":{"start":{"line":22,"column":18},"end":{"line":22,"column":51}},"11":{"start":{"line":24,"column":4},"end":{"line":24,"column":57}},"12":{"start":{"line":25,"column":4},"end":{"line":25,"column":70}},"13":{"start":{"line":26,"column":4},"end":{"line":26,"column":19}},"14":{"start":{"line":29,"column":4},"end":{"line":29,"column":26}},"15":{"start":{"line":34,"column":0},"end":{"line":48,"column":2}},"16":{"start":{"line":36,"column":4},"end":{"line":36,"column":20}},"17":{"start":{"line":39,"column":28},"end":{"line":39,"column":40}},"18":{"start":{"line":40,"column":4},"end":{"line":45,"column":5}},"19":{"start":{"line":41,"column":6},"end":{"line":41,"column":36}},"20":{"start":{"line":42,"column":27},"end":{"line":42,"column":47}},"21":{"start":{"line":43,"column":6},"end":{"line":43,"column":80}},"22":{"start":{"line":44,"column":6},"end":{"line":44,"column":44}},"23":{"start":{"line":46,"column":4},"end":{"line":46,"column":33}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":6,"column":21},"end":{"line":6,"column":22}},"loc":{"start":{"line":6,"column":33},"end":{"line":18,"column":1}},"line":6},"1":{"name":"(anonymous_1)","decl":{"start":{"line":21,"column":2},"end":{"line":21,"column":3}},"loc":{"start":{"line":21,"column":15},"end":{"line":27,"column":3}},"line":21},"2":{"name":"(anonymous_2)","decl":{"start":{"line":28,"column":2},"end":{"line":28,"column":3}},"loc":{"start":{"line":28,"column":13},"end":{"line":30,"column":3}},"line":28},"3":{"name":"(anonymous_3)","decl":{"start":{"line":35,"column":2},"end":{"line":35,"column":3}},"loc":{"start":{"line":35,"column":16},"end":{"line":37,"column":3}},"line":35},"4":{"name":"(anonymous_4)","decl":{"start":{"line":38,"column":2},"end":{"line":38,"column":3}},"loc":{"start":{"line":38,"column":19},"end":{"line":47,"column":3}},"line":38}},"branchMap":{"0":{"loc":{"start":{"line":25,"column":39},"end":{"line":25,"column":69}},"type":"cond-expr","locations":[{"start":{"line":25,"column":47},"end":{"line":25,"column":64}},{"start":{"line":25,"column":67},"end":{"line":25,"column":69}}],"line":25},"1":{"loc":{"start":{"line":40,"column":4},"end":{"line":45,"column":5}},"type":"if","locations":[{"start":{"line":40,"column":4},"end":{"line":45,"column":5}},{"start":{"line":40,"column":4},"end":{"line":45,"column":5}}],"line":40},"2":{"loc":{"start":{"line":40,"column":8},"end":{"line":40,"column":64}},"type":"binary-expr","locations":[{"start":{"line":40,"column":8},"end":{"line":40,"column":37}},{"start":{"line":40,"column":41},"end":{"line":40,"column":64}}],"line":40}},"s":{"0":5,"1":5,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":5,"10":10,"11":10,"12":10,"13":10,"14":0,"15":5,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0},"f":{"0":0,"1":10,"2":0,"3":0,"4":0},"b":{"0":[0,10],"1":[0,0],"2":[0,0]},"_coverageSchema":"43e27e138ebf9cfc5966b082cf9a028302ed4184","hash":"a79ec83df9813f5c7c4dbab9915a007ef3e6e26e"} +,"C:\\Users\\Hubert\\Desktop\\ELO\\frontend\\src\\utils\\index.ts": {"path":"C:\\Users\\Hubert\\Desktop\\ELO\\frontend\\src\\utils\\index.ts","statementMap":{"0":{"start":{"line":6,"column":34},"end":{"line":8,"column":1}},"1":{"start":{"line":7,"column":2},"end":{"line":7,"column":110}},"2":{"start":{"line":7,"column":52},"end":{"line":7,"column":108}},"3":{"start":{"line":19,"column":24},"end":{"line":75,"column":1}},"4":{"start":{"line":25,"column":16},"end":{"line":31,"column":3}},"5":{"start":{"line":26,"column":4},"end":{"line":26,"column":19}},"6":{"start":{"line":27,"column":4},"end":{"line":30,"column":5}},"7":{"start":{"line":28,"column":6},"end":{"line":28,"column":41}},"8":{"start":{"line":29,"column":6},"end":{"line":29,"column":28}},"9":{"start":{"line":33,"column":35},"end":{"line":48,"column":3}},"10":{"start":{"line":34,"column":4},"end":{"line":34,"column":19}},"11":{"start":{"line":35,"column":4},"end":{"line":35,"column":21}},"12":{"start":{"line":36,"column":20},"end":{"line":36,"column":41}},"13":{"start":{"line":38,"column":4},"end":{"line":40,"column":5}},"14":{"start":{"line":39,"column":6},"end":{"line":39,"column":47}},"15":{"start":{"line":42,"column":4},"end":{"line":45,"column":5}},"16":{"start":{"line":43,"column":6},"end":{"line":43,"column":41}},"17":{"start":{"line":44,"column":6},"end":{"line":44,"column":28}},"18":{"start":{"line":47,"column":4},"end":{"line":47,"column":18}},"19":{"start":{"line":50,"column":16},"end":{"line":55,"column":3}},"20":{"start":{"line":51,"column":4},"end":{"line":54,"column":5}},"21":{"start":{"line":52,"column":6},"end":{"line":52,"column":28}},"22":{"start":{"line":53,"column":6},"end":{"line":53,"column":21}},"23":{"start":{"line":57,"column":16},"end":{"line":65,"column":3}},"24":{"start":{"line":58,"column":4},"end":{"line":64,"column":5}},"25":{"start":{"line":59,"column":6},"end":{"line":59,"column":41}},"26":{"start":{"line":60,"column":6},"end":{"line":60,"column":28}},"27":{"start":{"line":62,"column":6},"end":{"line":62,"column":28}},"28":{"start":{"line":63,"column":6},"end":{"line":63,"column":21}},"29":{"start":{"line":67,"column":30},"end":{"line":72,"column":6}},"30":{"start":{"line":68,"column":19},"end":{"line":68,"column":32}},"31":{"start":{"line":69,"column":4},"end":{"line":69,"column":20}},"32":{"start":{"line":70,"column":4},"end":{"line":70,"column":20}},"33":{"start":{"line":71,"column":4},"end":{"line":71,"column":13}},"34":{"start":{"line":74,"column":2},"end":{"line":74,"column":19}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":6,"column":34},"end":{"line":6,"column":35}},"loc":{"start":{"line":6,"column":93},"end":{"line":8,"column":1}},"line":6},"1":{"name":"(anonymous_1)","decl":{"start":{"line":7,"column":32},"end":{"line":7,"column":33}},"loc":{"start":{"line":7,"column":52},"end":{"line":7,"column":108}},"line":7},"2":{"name":"(anonymous_2)","decl":{"start":{"line":19,"column":24},"end":{"line":19,"column":25}},"loc":{"start":{"line":19,"column":87},"end":{"line":75,"column":1}},"line":19},"3":{"name":"(anonymous_3)","decl":{"start":{"line":25,"column":16},"end":{"line":25,"column":17}},"loc":{"start":{"line":25,"column":22},"end":{"line":31,"column":3}},"line":25},"4":{"name":"(anonymous_4)","decl":{"start":{"line":33,"column":35},"end":{"line":33,"column":36}},"loc":{"start":{"line":33,"column":56},"end":{"line":48,"column":3}},"line":33},"5":{"name":"(anonymous_5)","decl":{"start":{"line":50,"column":16},"end":{"line":50,"column":17}},"loc":{"start":{"line":50,"column":22},"end":{"line":55,"column":3}},"line":50},"6":{"name":"(anonymous_6)","decl":{"start":{"line":57,"column":16},"end":{"line":57,"column":17}},"loc":{"start":{"line":57,"column":22},"end":{"line":65,"column":3}},"line":57},"7":{"name":"(anonymous_7)","decl":{"start":{"line":67,"column":31},"end":{"line":67,"column":32}},"loc":{"start":{"line":67,"column":37},"end":{"line":72,"column":3}},"line":67}},"branchMap":{"0":{"loc":{"start":{"line":19,"column":56},"end":{"line":19,"column":82}},"type":"default-arg","locations":[{"start":{"line":19,"column":77},"end":{"line":19,"column":82}}],"line":19},"1":{"loc":{"start":{"line":27,"column":4},"end":{"line":30,"column":5}},"type":"if","locations":[{"start":{"line":27,"column":4},"end":{"line":30,"column":5}},{"start":{"line":27,"column":4},"end":{"line":30,"column":5}}],"line":27},"2":{"loc":{"start":{"line":36,"column":20},"end":{"line":36,"column":41}},"type":"binary-expr","locations":[{"start":{"line":36,"column":20},"end":{"line":36,"column":29}},{"start":{"line":36,"column":33},"end":{"line":36,"column":41}}],"line":36},"3":{"loc":{"start":{"line":38,"column":4},"end":{"line":40,"column":5}},"type":"if","locations":[{"start":{"line":38,"column":4},"end":{"line":40,"column":5}},{"start":{"line":38,"column":4},"end":{"line":40,"column":5}}],"line":38},"4":{"loc":{"start":{"line":42,"column":4},"end":{"line":45,"column":5}},"type":"if","locations":[{"start":{"line":42,"column":4},"end":{"line":45,"column":5}},{"start":{"line":42,"column":4},"end":{"line":45,"column":5}}],"line":42},"5":{"loc":{"start":{"line":51,"column":4},"end":{"line":54,"column":5}},"type":"if","locations":[{"start":{"line":51,"column":4},"end":{"line":54,"column":5}},{"start":{"line":51,"column":4},"end":{"line":54,"column":5}}],"line":51},"6":{"loc":{"start":{"line":58,"column":4},"end":{"line":64,"column":5}},"type":"if","locations":[{"start":{"line":58,"column":4},"end":{"line":64,"column":5}},{"start":{"line":58,"column":4},"end":{"line":64,"column":5}}],"line":58}},"s":{"0":2,"1":0,"2":0,"3":2,"4":4,"5":0,"6":0,"7":0,"8":0,"9":4,"10":1,"11":1,"12":1,"13":1,"14":1,"15":1,"16":0,"17":0,"18":1,"19":4,"20":0,"21":0,"22":0,"23":4,"24":0,"25":0,"26":0,"27":0,"28":0,"29":4,"30":4,"31":4,"32":4,"33":4,"34":4},"f":{"0":0,"1":0,"2":4,"3":0,"4":1,"5":0,"6":0,"7":4},"b":{"0":[4],"1":[0,0],"2":[1,0],"3":[1,0],"4":[0,1],"5":[0,0],"6":[0,0]},"_coverageSchema":"43e27e138ebf9cfc5966b082cf9a028302ed4184","hash":"9d15a071926a1878c6a893f5870f239593056720"} +} diff --git a/coverage/lcov-report/base.css b/coverage/lcov-report/base.css new file mode 100644 index 0000000..f418035 --- /dev/null +++ b/coverage/lcov-report/base.css @@ -0,0 +1,224 @@ +body, html { + margin:0; padding: 0; + height: 100%; +} +body { + font-family: Helvetica Neue, Helvetica, Arial; + font-size: 14px; + color:#333; +} +.small { font-size: 12px; } +*, *:after, *:before { + -webkit-box-sizing:border-box; + -moz-box-sizing:border-box; + box-sizing:border-box; + } +h1 { font-size: 20px; margin: 0;} +h2 { font-size: 14px; } +pre { + font: 12px/1.4 Consolas, "Liberation Mono", Menlo, Courier, monospace; + margin: 0; + padding: 0; + -moz-tab-size: 2; + -o-tab-size: 2; + tab-size: 2; +} +a { color:#0074D9; text-decoration:none; } +a:hover { text-decoration:underline; } +.strong { font-weight: bold; } +.space-top1 { padding: 10px 0 0 0; } +.pad2y { padding: 20px 0; } +.pad1y { padding: 10px 0; } +.pad2x { padding: 0 20px; } +.pad2 { padding: 20px; } +.pad1 { padding: 10px; } +.space-left2 { padding-left:55px; } +.space-right2 { padding-right:20px; } +.center { text-align:center; } +.clearfix { display:block; } +.clearfix:after { + content:''; + display:block; + height:0; + clear:both; + visibility:hidden; + } +.fl { float: left; } +@media only screen and (max-width:640px) { + .col3 { width:100%; max-width:100%; } + .hide-mobile { display:none!important; } +} + +.quiet { + color: #7f7f7f; + color: rgba(0,0,0,0.5); +} +.quiet a { opacity: 0.7; } + +.fraction { + font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; + font-size: 10px; + color: #555; + background: #E8E8E8; + padding: 4px 5px; + border-radius: 3px; + vertical-align: middle; +} + +div.path a:link, div.path a:visited { color: #333; } +table.coverage { + border-collapse: collapse; + margin: 10px 0 0 0; + padding: 0; +} + +table.coverage td { + margin: 0; + padding: 0; + vertical-align: top; +} +table.coverage td.line-count { + text-align: right; + padding: 0 5px 0 20px; +} +table.coverage td.line-coverage { + text-align: right; + padding-right: 10px; + min-width:20px; +} + +table.coverage td span.cline-any { + display: inline-block; + padding: 0 5px; + width: 100%; +} +.missing-if-branch { + display: inline-block; + margin-right: 5px; + border-radius: 3px; + position: relative; + padding: 0 4px; + background: #333; + color: yellow; +} + +.skip-if-branch { + display: none; + margin-right: 10px; + position: relative; + padding: 0 4px; + background: #ccc; + color: white; +} +.missing-if-branch .typ, .skip-if-branch .typ { + color: inherit !important; +} +.coverage-summary { + border-collapse: collapse; + width: 100%; +} +.coverage-summary tr { border-bottom: 1px solid #bbb; } +.keyline-all { border: 1px solid #ddd; } +.coverage-summary td, .coverage-summary th { padding: 10px; } +.coverage-summary tbody { border: 1px solid #bbb; } +.coverage-summary td { border-right: 1px solid #bbb; } +.coverage-summary td:last-child { border-right: none; } +.coverage-summary th { + text-align: left; + font-weight: normal; + white-space: nowrap; +} +.coverage-summary th.file { border-right: none !important; } +.coverage-summary th.pct { } +.coverage-summary th.pic, +.coverage-summary th.abs, +.coverage-summary td.pct, +.coverage-summary td.abs { text-align: right; } +.coverage-summary td.file { white-space: nowrap; } +.coverage-summary td.pic { min-width: 120px !important; } +.coverage-summary tfoot td { } + +.coverage-summary .sorter { + height: 10px; + width: 7px; + display: inline-block; + margin-left: 0.5em; + background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent; +} +.coverage-summary .sorted .sorter { + background-position: 0 -20px; +} +.coverage-summary .sorted-desc .sorter { + background-position: 0 -10px; +} +.status-line { height: 10px; } +/* yellow */ +.cbranch-no { background: yellow !important; color: #111; } +/* dark red */ +.red.solid, .status-line.low, .low .cover-fill { background:#C21F39 } +.low .chart { border:1px solid #C21F39 } +.highlighted, +.highlighted .cstat-no, .highlighted .fstat-no, .highlighted .cbranch-no{ + background: #C21F39 !important; +} +/* medium red */ +.cstat-no, .fstat-no, .cbranch-no, .cbranch-no { background:#F6C6CE } +/* light red */ +.low, .cline-no { background:#FCE1E5 } +/* light green */ +.high, .cline-yes { background:rgb(230,245,208) } +/* medium green */ +.cstat-yes { background:rgb(161,215,106) } +/* dark green */ +.status-line.high, .high .cover-fill { background:rgb(77,146,33) } +.high .chart { border:1px solid rgb(77,146,33) } +/* dark yellow (gold) */ +.status-line.medium, .medium .cover-fill { background: #f9cd0b; } +.medium .chart { border:1px solid #f9cd0b; } +/* light yellow */ +.medium { background: #fff4c2; } + +.cstat-skip { background: #ddd; color: #111; } +.fstat-skip { background: #ddd; color: #111 !important; } +.cbranch-skip { background: #ddd !important; color: #111; } + +span.cline-neutral { background: #eaeaea; } + +.coverage-summary td.empty { + opacity: .5; + padding-top: 4px; + padding-bottom: 4px; + line-height: 1; + color: #888; +} + +.cover-fill, .cover-empty { + display:inline-block; + height: 12px; +} +.chart { + line-height: 0; +} +.cover-empty { + background: white; +} +.cover-full { + border-right: none !important; +} +pre.prettyprint { + border: none !important; + padding: 0 !important; + margin: 0 !important; +} +.com { color: #999 !important; } +.ignore-none { color: #999; font-weight: normal; } + +.wrapper { + min-height: 100%; + height: auto !important; + height: 100%; + margin: 0 auto -48px; +} +.footer, .push { + height: 48px; +} diff --git a/coverage/lcov-report/block-navigation.js b/coverage/lcov-report/block-navigation.js new file mode 100644 index 0000000..c7ff5a5 --- /dev/null +++ b/coverage/lcov-report/block-navigation.js @@ -0,0 +1,79 @@ +/* eslint-disable */ +var jumpToCode = (function init() { + // Classes of code we would like to highlight in the file view + var missingCoverageClasses = ['.cbranch-no', '.cstat-no', '.fstat-no']; + + // Elements to highlight in the file listing view + var fileListingElements = ['td.pct.low']; + + // We don't want to select elements that are direct descendants of another match + var notSelector = ':not(' + missingCoverageClasses.join('):not(') + ') > '; // becomes `:not(a):not(b) > ` + + // Selecter that finds elements on the page to which we can jump + var selector = + fileListingElements.join(', ') + + ', ' + + notSelector + + missingCoverageClasses.join(', ' + notSelector); // becomes `:not(a):not(b) > a, :not(a):not(b) > b` + + // The NodeList of matching elements + var missingCoverageElements = document.querySelectorAll(selector); + + var currentIndex; + + function toggleClass(index) { + missingCoverageElements + .item(currentIndex) + .classList.remove('highlighted'); + missingCoverageElements.item(index).classList.add('highlighted'); + } + + function makeCurrent(index) { + toggleClass(index); + currentIndex = index; + missingCoverageElements.item(index).scrollIntoView({ + behavior: 'smooth', + block: 'center', + inline: 'center' + }); + } + + function goToPrevious() { + var nextIndex = 0; + if (typeof currentIndex !== 'number' || currentIndex === 0) { + nextIndex = missingCoverageElements.length - 1; + } else if (missingCoverageElements.length > 1) { + nextIndex = currentIndex - 1; + } + + makeCurrent(nextIndex); + } + + function goToNext() { + var nextIndex = 0; + + if ( + typeof currentIndex === 'number' && + currentIndex < missingCoverageElements.length - 1 + ) { + nextIndex = currentIndex + 1; + } + + makeCurrent(nextIndex); + } + + return function jump(event) { + switch (event.which) { + case 78: // n + case 74: // j + goToNext(); + break; + case 66: // b + case 75: // k + case 80: // p + goToPrevious(); + break; + } + }; +})(); +window.addEventListener('keydown', jumpToCode); diff --git a/coverage/lcov-report/components/Administrator.tsx.html b/coverage/lcov-report/components/Administrator.tsx.html new file mode 100644 index 0000000..35ebbb0 --- /dev/null +++ b/coverage/lcov-report/components/Administrator.tsx.html @@ -0,0 +1,688 @@ + + + + + + Code coverage report for components/Administrator.tsx + + + + + + + + +
+
+

All files / components Administrator.tsx

+
+ +
+ 16.98% + Statements + 9/53 +
+ + +
+ 0% + Branches + 0/14 +
+ + +
+ 0% + Functions + 0/9 +
+ + +
+ 16.98% + Lines + 9/53 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172 +173 +174 +175 +176 +177 +178 +179 +180 +181 +182 +183 +184 +185 +186 +187 +188 +189 +190 +191 +192 +193 +194 +195 +196 +197 +198 +199 +200 +201 +202 +203 +204  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +1x +  +  +  +  +  +1x +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
import { format } from 'date-fns';
+import React, { useEffect, useState } from 'react';
+import styled from 'styled-components/macro';
+import { axiosInstance } from '../utils/axiosInstance';
+import { useSnackbar } from 'notistack';
+import CloseIcon from '@material-ui/icons/Close';
+import { SyncLoader } from 'react-spinners';
+ 
+const StyledCloseIcon = styled(CloseIcon)`
+  color: #000000;
+  &:hover {
+    color: white;
+    cursor: pointer;
+  }
+`;
+ 
+const SaveButton = styled.button`
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  user-select: none;
+  background-color: #c7a424;
+  border: none;
+  font-weight: bold;
+  cursor: pointer;
+  height: 40px;
+  &:hover {
+    color: #ffffff;
+    box-shadow: 0px 5px 4px 0px rgba(0, 0, 0, 0.24);
+  }
+ 
+  width: 150px;
+`;
+const AdministratorWrapper = styled.div`
+  display: flex;
+  flex-direction: column;
+  margin: 0 auto;
+  height: 100vh;
+`;
+ 
+const Wrap = styled.div`
+  display: flex;
+  flex: 1;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+`;
+ 
+const LogoWrapper = styled.div`
+  display: flex;
+  flex: 1;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+`;
+ 
+const Text = styled.div`
+  font-family: 'Roboto', sans-serif;
+  font-size: 5rem;
+  user-select: none;
+`;
+ 
+const Logo = styled.img`
+  width: 400px;
+  height: 400px;
+`;
+ 
+const Form = styled.form`
+  flex: 1;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  flex-direction: column;
+ 
+  input {
+    padding: 5px;
+    margin-top: 10px;
+    margin-bottom: 10px;
+    width: 210px;
+  }
+`;
+ 
+export const Administrator = () => {
+  const { enqueueSnackbar } = useSnackbar();
+  const { closeSnackbar } = useSnackbar();
+ 
+  const today = new Date();
+  const dd = String(today.getDate()).padStart(2, '0');
+  const mm = String(today.getMonth() + 1).padStart(2, '0');
+  const yyyy = today.getFullYear();
+ 
+  const date = yyyy + '-' + mm + '-' + dd;
+ 
+  const [selectedFile, setSelectedFile] = useState<File | null>(null);
+  const [startFirstDate, setStartFirstDate] = useState<Date | null>(null);
+  const [endFirstDate, setEndFirstDate] = useState<Date | null>(null);
+  const [startSecondDate, setStartSecondDate] = useState<Date | null>(null);
+  const [endSecondDate, setEndSecondDate] = useState<Date | null>(null);
+  const [loading, setLoading] = useState(false);
+ 
+ 
+  const uploadFile = async (event: React.FormEvent<HTMLFormElement>) => {
+    const action = (key: any) => (
+      <>
+        <StyledCloseIcon
+          onClick={() => {
+            closeSnackbar(key);
+          }}
+        ></StyledCloseIcon>
+      </>
+    );
+    event.preventDefault();
+    const formData = new FormData();
+    formData.append('file', selectedFile as Blob);
+    if (startFirstDate !== null) {
+      formData.append('firstTourBegin', format(startFirstDate, 'dd.MM.yyyy'));
+    }
+    if (endFirstDate !== null) {
+      formData.append('firstTourEnd', format(endFirstDate, 'dd.MM.yyyy'));
+    }
+    if (startSecondDate !== null) {
+      formData.append('secondTourBegin', format(startSecondDate, 'dd.MM.yyyy'));
+    }
+    if (endSecondDate !== null) {
+      formData.append('secondTourEnd', format(endSecondDate, 'dd.MM.yyyy'));
+    }
+ 
+    const config = {
+      headers: {
+        'content-type': 'multipart/form-data',
+      },
+    };
+ 
+    try {
+      setLoading(true);
+      const response = await axiosInstance.post(
+        `${process.env.REACT_APP_API_URL}/api/v1/configurator/config/`,
+        formData,
+        config,
+      );
+      enqueueSnackbar('Ustawienia zostały zapisane', {
+        variant: 'success',
+        action,
+      });
+    } catch (e) {
+      enqueueSnackbar('Ustawienia nie zostały zapisane', {
+        variant: 'error',
+        action,
+      });
+      console.log(e);
+    }
+    setLoading(false);
+  };
+ 
+  return (
+    <AdministratorWrapper>
+      <Wrap>
+        <LogoWrapper>
+          <Logo alt="logo" src="https://plannaplan.pl/img/logo.svg" />
+          <Text> plan na plan </Text>
+        </LogoWrapper>
+        <Form onSubmit={uploadFile}>
+          <div>
+            <div>Start pierwszej tury:</div>{' '}
+            <div>
+              <input type="date" min={date} onChange={(e) => setStartFirstDate(e.target.valueAsDate)} />
+            </div>
+            <div>Koniec pierwszej tury:</div>{' '}
+            <div>
+              <input type="date" min={date} onChange={(e) => setEndFirstDate(e.target.valueAsDate)} />
+            </div>
+          </div>
+          <div>
+            <div>Start drugiej tury:</div>{' '}
+            <div>
+              <input type="date" min={date} onChange={(e) => setStartSecondDate(e.target.valueAsDate)} />
+            </div>
+          </div>
+          <div>
+            <div>Koniec drugiej tury:</div>{' '}
+            <div>
+              <input type="date" min={date} onChange={(e) => setEndSecondDate(e.target.valueAsDate)} />
+            </div>
+          </div>
+          <div>
+            <input
+              type="file"
+              onChange={(e) => {
+                if (e.target.files && e.target.files[0]) {
+                  const file = e.target.files[0];
+                  setSelectedFile(file);
+                }
+              }}
+            />
+          </div>
+          <div>
+            <SaveButton type="submit">{loading === false ? 'Zapisz' : <SyncLoader />} </SaveButton>
+          </div>
+        </Form>
+      </Wrap>
+    </AdministratorWrapper>
+  );
+};
+ 
+ +
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/lcov-report/components/App.tsx.html b/coverage/lcov-report/components/App.tsx.html new file mode 100644 index 0000000..a1876e1 --- /dev/null +++ b/coverage/lcov-report/components/App.tsx.html @@ -0,0 +1,253 @@ + + + + + + Code coverage report for components/App.tsx + + + + + + + + +
+
+

All files / components App.tsx

+
+ +
+ 90% + Statements + 9/10 +
+ + +
+ 62.5% + Branches + 5/8 +
+ + +
+ 50% + Functions + 1/2 +
+ + +
+ 90% + Lines + 9/10 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59  +  +  +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +1x +2x +2x +  +2x +2x +  +2x +  +  +  +2x +2x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
import React, { useContext, useState } from 'react';
+import Topbar from './Topbar';
+import { Transfer } from './Transfer';
+import { DeaneryPanel } from './DeaneryPanel';
+import { Scheduler } from './Scheduler';
+import { Rightbar } from './Rightbar';
+import { Administrator } from './Administrator';
+import styled from 'styled-components';
+import LoadingOverlay from 'react-loading-overlay';
+import { SyncLoader } from 'react-spinners';
+import { CASContext } from '../contexts/CASProvider';
+import { coursesContext } from '../contexts/CoursesProvider';
+const Wrapper = styled.div`
+  display: flex;
+  height: calc(100vh - 80px);
+  background-color: #eceef4;
+  padding-top: 20px;
+  padding-bottom: 20px;
+  padding-right: 20px;
+`;
+ 
+export const App = () => {
+  const { role } = useContext(CASContext)!;
+  const [isOpenTransfer, setOpenTransfer] = useState(false);
+ 
+  const { selectSchedulerEvents } = useContext(coursesContext)!;
+  const schedulerEvents = selectSchedulerEvents();
+ 
+  const handleTransfer = () => {
+    setOpenTransfer(!isOpenTransfer);
+  };
+ 
+  const userPrivilige = localStorage.getItem('userPrivilige');
+  return (
+    <>
+      <LoadingOverlay active={role === undefined} spinner={<SyncLoader />}>
+        {userPrivilige !== 'ADMIN' && (
+            <>
+              <Topbar handleTransfer={handleTransfer} />
+              <Transfer isOpen={isOpenTransfer} handleClose={handleTransfer} />
+              <Wrapper>
+                {userPrivilige === 'STUDENT' && (
+                  <>
+                    <Scheduler schedulerEvents={schedulerEvents} />
+                    <Rightbar />
+                  </>
+                )}
+                {userPrivilige === 'DEANERY' && <DeaneryPanel schedulerEvents={schedulerEvents} />}
+              </Wrapper>
+            </>
+          )}
+        {userPrivilige === 'ADMIN' && (
+            <Administrator></Administrator>
+        )}
+      </LoadingOverlay>
+    </>
+  );
+};
+ 
+ +
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/lcov-report/components/DeaneryPanel.tsx.html b/coverage/lcov-report/components/DeaneryPanel.tsx.html new file mode 100644 index 0000000..303ec54 --- /dev/null +++ b/coverage/lcov-report/components/DeaneryPanel.tsx.html @@ -0,0 +1,532 @@ + + + + + + Code coverage report for components/DeaneryPanel.tsx + + + + + + + + +
+
+

All files / components DeaneryPanel.tsx

+
+ +
+ 55% + Statements + 11/20 +
+ + +
+ 0% + Branches + 0/8 +
+ + +
+ 0% + Functions + 0/3 +
+ + +
+ 55% + Lines + 11/20 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152  +  +  +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +1x +  +  +  +  +1x +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
import React, { useState, MouseEvent,useContext } from 'react';
+import styled from 'styled-components/macro';
+import Plan from '../assets/plan.svg';
+import History from '../assets/history.svg';
+import StatisticsIcon from '../assets/statistics.svg';
+import {Statistics} from './Statistics';
+import { Scheduler } from './Scheduler';
+import { Rightbar } from './Rightbar';
+import { SchedulerHistory } from './SchedulerHistory';
+import { coursesContext } from '../contexts/CoursesProvider';
+import { SchedulerEvent } from '../types';
+ 
+const LeftSide = styled.div`
+  height: 100%;
+  display: flex;
+  flex: 1;
+  flex-direction: column;
+  background-color: white;
+  text-align: center;
+  border-radius: 5px;
+`;
+ 
+const Wrap = styled.div`
+  display: flex;
+  height: calc(100vh - 120px);
+  background-color: #eceef4;
+  width: 100%;
+`;
+ 
+const Wrapper = styled.div`
+  flex: 12;
+  display: flex;
+  height: calc(100vh - 120px);
+  background-color: #eceef4;
+`;
+ 
+interface LeftPanelElement {
+  isCurrentTab: boolean;
+}
+ 
+const LeftPanelElement = styled.div<LeftPanelElement>`
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+  flex: 1;
+  //box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.75);
+  padding: 20px;
+  cursor: pointer;
+  box-shadow: ${({ isCurrentTab }) => (isCurrentTab === true ? `inset 0px 0px 11px 0px rgba(0,0,0,0.30)` : '')};
+  border-bottom: 1px solid #979797;
+  :first-child {
+    border-radius: 0px 5px 0px 0px;
+  }
+  :last-child {
+    border-radius: 0px 0px 5px 0px;
+  }
+`;
+ 
+const HistoryDiv = styled.div`
+  flex: 1;
+  display: flex;
+  margin-left: 20px;
+  border-radius: 5px;
+  height: calc(100vh - 120px);
+`;
+ 
+const StatsDiv = styled.div`
+  flex: 1;
+  display: flex;
+  margin-left: 20px;
+  border-radius: 5px;
+  height: calc(100vh - 120px);
+`;
+ 
+const LogoWrapper = styled.div`
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+  flex: 2;
+  margin-left: 10px;
+`;
+ 
+const Text = styled.div`
+  font-family: 'Roboto', sans-serif;
+  font-size: 5rem;
+  user-select: none;
+`;
+ 
+const Logo = styled.img`
+  width: 500px;
+  height: 500px;
+`;
+ 
+const Icon = styled.img`
+  width: 40px;
+  margin: 5px;
+`;
+ 
+interface Deanery {
+  schedulerEvents: Array<SchedulerEvent>;
+}
+ 
+export const DeaneryPanel = ({ schedulerEvents }: Deanery) => {
+  const [currentTab, setCurrentTab] = useState<null | number>(1);
+  const { getNewestStudentTimetable,userID } = useContext(coursesContext)!;
+  const { selectHistorySchedulerEvents } = useContext(coursesContext)!;
+  const schedulerHistoryEvents = selectHistorySchedulerEvents();
+ 
+  const handleClick = (e: MouseEvent<HTMLDivElement>) => {
+    setCurrentTab(Number(e.currentTarget.id));
+    getNewestStudentTimetable(userID);
+  };
+ 
+  return (
+    <Wrap>
+      <LeftSide>
+        <LeftPanelElement id={'1'} isCurrentTab={currentTab === 1} onClick={handleClick}>
+          <Icon alt="profile" src={Plan} />
+          Pokaż plan
+        </LeftPanelElement>
+        <LeftPanelElement id={'2'} isCurrentTab={currentTab === 2} onClick={handleClick}>
+          <Icon alt="history" src={History} />
+          Historia Zmian
+        </LeftPanelElement>
+        <LeftPanelElement id={'3'} isCurrentTab={currentTab === 3} onClick={handleClick}>
+          <Icon alt="statistics" src={StatisticsIcon} />
+          Statystyki
+        </LeftPanelElement>
+      </LeftSide>
+      <Wrapper>
+        {currentTab === 1 ? (
+          <>
+            <Scheduler schedulerEvents={schedulerEvents}/>
+            <Rightbar />
+          </>
+        ) : currentTab === 2 ? (
+          <SchedulerHistory schedulerHistoryEvents={schedulerHistoryEvents}/>
+        ) : currentTab === 3 ? (
+          <StatsDiv><Statistics /></StatsDiv> 
+        ) : (
+          <LogoWrapper>
+            <Logo alt="logo" src="https://plannaplan.pl/img/logo.svg" />
+            <Text> plan na plan </Text>
+          </LogoWrapper>
+        )}
+      </Wrapper>
+    </Wrap>
+  );
+};
+ 
+ +
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/lcov-report/components/Statistics.tsx.html b/coverage/lcov-report/components/Statistics.tsx.html new file mode 100644 index 0000000..b9ea472 --- /dev/null +++ b/coverage/lcov-report/components/Statistics.tsx.html @@ -0,0 +1,412 @@ + + + + + + Code coverage report for components/Statistics.tsx + + + + + + + + +
+
+

All files / components Statistics.tsx

+
+ +
+ 100% + Statements + 7/7 +
+ + +
+ 100% + Branches + 0/0 +
+ + +
+ 100% + Functions + 1/1 +
+ + +
+ 100% + Lines + 7/7 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112  +  +  +  +  +  +  +  +  +  +  +2x +  +  +  +  +  +  +  +2x +  +  +  +  +  +  +2x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +2x +  +  +  +  +  +2x +  +  +  +  +  +  +2x +2x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
import React, { useState, useContext } from 'react';
+import Collapse from '@material-ui/core/Collapse';
+import { ReactComponent as Expand } from '../assets/expand.svg';
+import { Course, Group, GroupType } from '../types/index';
+import { coursesContext } from '../contexts/CoursesProvider';
+import styled, { css } from 'styled-components';
+import { makeStyles } from '@material-ui/core/styles';
+import DeleteIcon from '@material-ui/icons/Delete';
+import { useMemo } from 'react';
+import { dayMapping } from '../constants';
+ 
+const StatisticsWrapper = styled.div`
+  display: flex;
+  flex-direction: column;
+  width: 100%;
+  justify-content: center;
+  align-items: center;
+`;
+ 
+const Row = styled.div`
+  display: flex;
+  width: 100%;
+  justify-content: center;
+  align-items: center;
+`;
+ 
+const StatisticBox = styled.div`
+background-color:white;
+  width: 200px;
+  height: 200px;
+  margin: 10px;
+  border: 1px solid #000000;
+  border-radius: 38px;
+  display: flex;
+  flex-direction: column;
+  justify-content: space-around;
+  align-items: center;
+  font-size: 22px;
+  padding:2px;
+  box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.75);
+`;
+ 
+const StatisticNumber = styled.p`
+  font-size: 52px;
+  margin-top: 40px;
+  margin-bottom:0px;
+`;
+ 
+const StatisticText = styled.p`
+  font-size: 18px;
+  text-align:center;
+  align-items:center;
+  justify-content:center;
+`;
+ 
+export const Statistics = () => {
+  return (
+    <StatisticsWrapper>
+      <Row>
+        <StatisticBox>
+          <StatisticNumber>65</StatisticNumber>
+          <StatisticText>Utworzonych grup</StatisticText>
+        </StatisticBox>
+        <StatisticBox>
+          {' '}
+          <StatisticNumber>280</StatisticNumber>
+          <StatisticText>Zapisanych sutdentów do grup</StatisticText>
+        </StatisticBox>
+        <StatisticBox>
+          {' '}
+          <StatisticNumber>24</StatisticNumber>
+          <StatisticText>Studentów niezapisanych do żadnej grupy</StatisticText>
+        </StatisticBox>
+      </Row>
+      <Row>
+        <StatisticBox>
+          {' '}
+          <StatisticNumber>150</StatisticNumber>
+          <StatisticText>Studentów z zaakceptowanym planem</StatisticText>
+        </StatisticBox>
+        <StatisticBox>
+          {' '}
+          <StatisticNumber>130</StatisticNumber>
+          <StatisticText>Studentów bez zaakceptowanego pełengo planu</StatisticText>
+        </StatisticBox>
+        <StatisticBox>
+          {' '}
+          <StatisticNumber>65</StatisticNumber>
+          <StatisticText>Utworzonych grup</StatisticText>
+        </StatisticBox>
+      </Row>
+      <Row>
+        <StatisticBox>
+          {' '}
+          <StatisticNumber>65</StatisticNumber>
+          <StatisticText>Utworzonych grup</StatisticText>
+        </StatisticBox>
+        <StatisticBox>
+          {' '}
+          <StatisticNumber>65</StatisticNumber>
+          <StatisticText>Utworzonych grup</StatisticText>
+        </StatisticBox>
+        <StatisticBox>
+          {' '}
+          <StatisticNumber>65</StatisticNumber>
+          <StatisticText>Utworzonych grup</StatisticText>
+        </StatisticBox>
+      </Row>
+    </StatisticsWrapper>
+  );
+};
+ 
+ +
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/lcov-report/components/index.html b/coverage/lcov-report/components/index.html new file mode 100644 index 0000000..4960cf8 --- /dev/null +++ b/coverage/lcov-report/components/index.html @@ -0,0 +1,155 @@ + + + + + + Code coverage report for components + + + + + + + + +
+
+

All files components

+
+ +
+ 40% + Statements + 36/90 +
+ + +
+ 16.67% + Branches + 5/30 +
+ + +
+ 13.33% + Functions + 2/15 +
+ + +
+ 40% + Lines + 36/90 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
Administrator.tsx +
+
16.98%9/530%0/140%0/916.98%9/53
App.tsx +
+
90%9/1062.5%5/850%1/290%9/10
DeaneryPanel.tsx +
+
55%11/200%0/80%0/355%11/20
Statistics.tsx +
+
100%7/7100%0/0100%1/1100%7/7
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/lcov-report/contexts/CoursesProvider.tsx.html b/coverage/lcov-report/contexts/CoursesProvider.tsx.html new file mode 100644 index 0000000..c59c230 --- /dev/null +++ b/coverage/lcov-report/contexts/CoursesProvider.tsx.html @@ -0,0 +1,1006 @@ + + + + + + Code coverage report for contexts/CoursesProvider.tsx + + + + + + + + +
+
+

All files / contexts CoursesProvider.tsx

+
+ +
+ 27.27% + Statements + 39/143 +
+ + +
+ 0% + Branches + 0/50 +
+ + +
+ 11.9% + Functions + 5/42 +
+ + +
+ 29.69% + Lines + 38/128 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172 +173 +174 +175 +176 +177 +178 +179 +180 +181 +182 +183 +184 +185 +186 +187 +188 +189 +190 +191 +192 +193 +194 +195 +196 +197 +198 +199 +200 +201 +202 +203 +204 +205 +206 +207 +208 +209 +210 +211 +212 +213 +214 +215 +216 +217 +218 +219 +220 +221 +222 +223 +224 +225 +226 +227 +228 +229 +230 +231 +232 +233 +234 +235 +236 +237 +238 +239 +240 +241 +242 +243 +244 +245 +246 +247 +248 +249 +250 +251 +252 +253 +254 +255 +256 +257 +258 +259 +260 +261 +262 +263 +264 +265 +266 +267 +268 +269 +270 +271 +272 +273 +274 +275 +276 +277 +278 +279 +280 +281 +282 +283 +284 +285 +286 +287 +288 +289 +290 +291 +292 +293 +294 +295 +296 +297 +298 +299 +300 +301 +302 +303 +304 +305 +306 +307 +308 +309 +310  +  +  +  +  +  +  +5x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +5x +  +  +  +  +  +5x +20x +20x +  +  +20x +20x +20x +20x +20x +20x +20x +  +20x +  +  +  +  +  +20x +  +20x +4x +4x +  +  +  +  +  +20x +2x +  +  +  +  +  +  +  +  +  +  +  +20x +  +  +  +  +  +  +  +  +  +  +  +  +  +20x +  +  +  +  +  +  +  +  +20x +  +20x +  +20x +  +  +  +  +  +  +  +  +  +20x +  +20x +  +  +  +  +  +  +  +20x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +20x +  +  +  +  +  +  +  +  +  +  +  +20x +  +  +  +  +  +  +  +  +  +  +  +  +  +20x +  +  +  +  +  +  +  +  +  +  +  +20x +  +  +  +  +  +  +  +  +  +  +  +  +20x +  +  +  +  +  +  +  +  +  +  +20x +  +  +  +  +  +  +  +  +  +  +  +20x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +20x +10x +10x +  +  +  +  +  +  +20x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
import React, { useState, createContext, useEffect, ReactNode } from 'react';
+import { Course, Group, Basket, GroupType, SchedulerEvent, TimetableHistory } from '../types';
+import { useSnackbar } from 'notistack';
+import { axiosInstance } from '../utils/axiosInstance';
+import CloseIcon from '@material-ui/icons/Close';
+import styled from 'styled-components';
+ 
+const StyledCloseIcon = styled(CloseIcon)`
+  color: #000000;
+  &:hover {
+    color: white;
+    cursor: pointer;
+  }
+`;
+ 
+interface CourseContext {
+  courses: Array<Course>;
+  basket: Array<Basket>;
+  timetableHistory: Array<TimetableHistory>;
+  hoveredGroup: Group | undefined | null;
+  userID: string;
+  isDataLoading: boolean;
+  historyBasket: Array<Basket>;
+  addCourseToBasket: (courses: Course) => void;
+  changeHoveredGroup: (group: Group | null) => void;
+  changeGroupInBasket: (group: any, courseId: number) => void;
+  restoreGroupInBasket: (restoreGroup: Group, courseId: number) => void;
+  deleteFromBasket: (id: number) => void;
+  saveBasket: (userID: string) => Promise<void>;
+  changeStudent: (studentId: string) => void;
+  selectSchedulerEvents: () => Array<SchedulerEvent>;
+  selectHistorySchedulerEvents: () => Array<SchedulerEvent>;
+  selectBasketNames: () => Array<string>;
+  selectBasketCourses: () => Array<Course>;
+  selectBasketCourseGroups: (courseId: number) => { lecture: Group | undefined; classes: Group | undefined };
+  getNewestStudentTimetable: (studentId: string) => void;
+  getStudentTimetablesHistory: (studentId: string) => void;
+  changeDataLoading: (isLoading: boolean) => void;
+  setHistoryBasketFromHistoryGroups: (groupsIds: Array<number>) => void;
+}
+export const coursesContext = createContext<CourseContext | undefined>(undefined);
+ 
+interface CoursesProviderProps {
+  children: ReactNode;
+}
+ 
+export const CoursesProvider = ({ children }: CoursesProviderProps) => {
+  const { enqueueSnackbar } = useSnackbar();
+  const { closeSnackbar } = useSnackbar();
+ 
+  //fetch courses with groups
+  const [courses, setCourses] = useState<Array<Course>>([]);
+  const [basket, setBasket] = useState<Array<Basket>>([]);
+  const [historyBasket, setHistoryBasket] = useState<Array<Basket>>([]);
+  const [timetableHistory, setTimetableHistory] = useState<Array<TimetableHistory>>([]);
+  const [userID, setUserID] = useState('');
+  const [hoveredGroup, setHoveredGroup] = useState<Group | undefined | null>(null);
+  const [isDataLoading, setIsDataLoading] = useState(false);
+ 
+  const selectBasketIds = () => {
+    const classesIds = basket.map((course) => course?.classes?.id).filter((course) => course !== undefined);
+    const lecturesIds = basket.map((course) => course?.lecture?.id).filter((course) => course !== undefined);
+    return [...classesIds, ...lecturesIds];
+  };
+ 
+  const selectBasketNames = () => basket.map(({ name }) => name);
+ 
+  const selectBasketCourses = () => {
+    const basketNames = selectBasketNames();
+    return basketNames.reduce((sum, basketName) => {
+      const course = courses.find(({ name }) => basketName === name);
+      return course === undefined ? sum : [...sum, course];
+    }, [] as Array<Course>);
+  };
+ 
+  const selectSchedulerEvents = () => {
+    return basket.reduce((res, el) => {
+      const { name } = el;
+      if (el.classes) {
+        res.push({ ...el.classes, name });
+      }
+      if (el.lecture) {
+        res.push({ ...el.lecture, name });
+      }
+      return res;
+    }, [] as Array<SchedulerEvent>);
+  };
+ 
+  const selectHistorySchedulerEvents = () => {
+    return historyBasket.reduce((res, el) => {
+      const { name } = el;
+      if (el.classes) {
+        res.push({ ...el.classes, name });
+      }
+      if (el.lecture) {
+        res.push({ ...el.lecture, name });
+      }
+      return res;
+    }, [] as Array<SchedulerEvent>);
+  };
+ 
+ 
+  const selectBasketCourseGroups = (courseId: number) => {
+    const course = basket.find(({ id }) => id === courseId);
+    if (course !== undefined) {
+      return { lecture: course.lecture, classes: course.classes };
+    } else {
+      return { lecture: undefined, classes: undefined };
+    }
+  };
+ 
+  const changeHoveredGroup = (group: Group | null) => setHoveredGroup(group);
+ 
+  const changeDataLoading = (isLoading: boolean) => setIsDataLoading(isLoading);
+ 
+  const addCourseToBasket = (course: Course) => {
+    const courseToBasket: Basket = {
+      name: course.name,
+      id: course.id,
+      classes: course.classes !== undefined ? course.classes[0] : undefined,
+      lecture: course.lectures !== undefined ? course.lectures[0] : undefined,
+    };
+    setBasket([...basket, courseToBasket]);
+  };
+ 
+  const deleteFromBasket = (id: number) => setBasket(basket.filter((course) => course.id !== id));
+ 
+  const changeStudent = async (studentId: string) => {
+    setUserID(studentId);
+    setTimeout(() => {
+      getNewestStudentTimetable(studentId);
+      getStudentTimetablesHistory(studentId);
+    }, 100);
+  };
+ 
+  const saveBasket = async (userID: string) => {
+    const basketIds = selectBasketIds();
+    const action = (key: any) => (
+      <>
+        <StyledCloseIcon
+          onClick={() => {
+            closeSnackbar(key);
+          }}
+        ></StyledCloseIcon>
+      </>
+    );
+ 
+    try {
+      await axiosInstance.post(
+        `${process.env.REACT_APP_API_URL}/api/v1/commisions/user/${userID}`,
+        JSON.stringify(basketIds),
+      );
+      enqueueSnackbar('Plan został zapisany', {
+        variant: 'success',
+        action,
+      });
+    } catch (e) {
+      console.log('error: ', e);
+      enqueueSnackbar('Zapisywanie planu nie powiodło się', {
+        variant: 'error',
+        action,
+      });
+    }
+    getStudentTimetablesHistory(userID);
+  };
+ 
+  const changeGroupInBasket = (choosenGroup: any, courseId: number) => {
+    const basketCourse = basket.filter((course) => course.id === courseId)[0];
+    if (choosenGroup.lecture && choosenGroup.classes)
+    {
+      const prev = choosenGroup.prev==="lecture"?choosenGroup.lecture : choosenGroup.classes
+      setBasket(
+        basket.map((basket) => (basket.id === basketCourse.id ? { ...basket, lecture: choosenGroup.lecture, classes:choosenGroup.classes } : basket)),
+      );
+      changeHoveredGroup(prev);
+    }    
+  };
+ 
+  const restoreGroupInBasket = (restoreGroup: Group, courseId: number) => {
+    const basketCourse = basket.filter((course) => course.id === courseId)[0];
+    const { type } = restoreGroup;
+    if (type === GroupType.CLASS) {
+      setBasket(
+        basket.map((basket) => (basket.id === basketCourse.id ? { ...basket, classes: restoreGroup } : basket)),
+      );
+    } else if (type === GroupType.LECTURE) {
+      setBasket(
+        basket.map((basket) => (basket.id === basketCourse.id ? { ...basket, lecture: restoreGroup } : basket)),
+      );
+    }
+  };
+ 
+  const getNewestTimetable = async () => {
+    try {
+      const { data } = await axiosInstance.get<Array<Basket> | ''>(
+        `${process.env.REACT_APP_API_URL}/api/v1/commisions/user/schedule`,
+      );
+      const basket = data === '' ? [] : data;
+      setBasket(basket);
+    } catch (e) {
+      console.log(e);
+    }
+  };
+ 
+  const getNewestStudentTimetable = async (studentId: string) => {
+    try {
+      const { data } = await axiosInstance.get(
+        `${process.env.REACT_APP_API_URL}/api/v1/commisions/user/${studentId}/schedule`,
+      );
+      const basket = data === '' ? [] : data;
+ 
+      setBasket(basket);
+    } catch (e) {
+      console.log(e);
+    }
+  };
+ 
+  const getStudentTimetablesHistory = async (studentId: string) => {
+    try {
+      const { data } = await axiosInstance.get<Array<TimetableHistory> | []>(
+        `${process.env.REACT_APP_API_URL}/api/v1/commisions/user/${studentId}?groups=true`,
+      );
+      setTimetableHistory(data);
+    } catch (e) {
+      console.log(e);
+    }
+  };
+ 
+  const fetchCourses = async () => {
+    try {
+      const { data: courses } = await axiosInstance.get<Array<Course>>(
+        `${process.env.REACT_APP_API_URL}/api/v1/courses/all?groups=true&takenPlaces=true`,
+      );
+      const sortedCourses = courses.sort((a, b) => (a.name > b.name ? 1 : -1));
+      setCourses(sortedCourses);
+    } catch (e) {
+      console.log(e);
+    }
+  };
+ 
+  const setHistoryBasketFromHistoryGroups = (groupsIds: Array<number>) => {
+    const basket: Array<Basket> = [];
+    for (const groupId of groupsIds) {
+      for (const course of courses) {
+        const { lectures, classes, name, id } = course;
+        let basketElement: Basket = { name: name, id: id };
+        if (lectures) {
+          for (const lecture of lectures) {
+            if (groupId === lecture.id) {
+              basketElement = { ...basketElement, lecture: lecture };
+            }
+          }
+        }
+        if (classes) {
+          for (const singleClass of classes) {
+            if (groupId === singleClass.id) {
+              basketElement = { ...basketElement, classes: singleClass };
+            }
+          }
+        }
+        if (basketElement.classes !== undefined || basketElement.lecture !== undefined) {
+          basket.push(basketElement);
+        }
+      }
+    }
+    setHistoryBasket(basket);
+  };
+ 
+  useEffect(() => {
+    setIsDataLoading(true);
+    setTimeout(() => {
+      fetchCourses();
+      getNewestTimetable();
+      setIsDataLoading(false);
+    }, 600);
+  }, []);
+ 
+  return (
+    <coursesContext.Provider
+      value={{
+        userID,
+        courses,
+        basket,
+        hoveredGroup,
+        timetableHistory,
+        isDataLoading,
+        historyBasket,
+        addCourseToBasket,
+        changeHoveredGroup,
+        changeGroupInBasket,
+        deleteFromBasket,
+        restoreGroupInBasket,
+        saveBasket,
+        selectSchedulerEvents,
+        selectHistorySchedulerEvents,
+        selectBasketNames,
+        selectBasketCourses,
+        selectBasketCourseGroups,
+        getNewestStudentTimetable,
+        changeStudent,
+        getStudentTimetablesHistory,
+        setHistoryBasketFromHistoryGroups,
+        changeDataLoading,
+      }}
+    >
+      {children}
+    </coursesContext.Provider>
+  );
+};
+ 
+ +
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/lcov-report/contexts/index.html b/coverage/lcov-report/contexts/index.html new file mode 100644 index 0000000..fbb1aa4 --- /dev/null +++ b/coverage/lcov-report/contexts/index.html @@ -0,0 +1,110 @@ + + + + + + Code coverage report for contexts + + + + + + + + +
+
+

All files contexts

+
+ +
+ 27.27% + Statements + 39/143 +
+ + +
+ 0% + Branches + 0/50 +
+ + +
+ 11.9% + Functions + 5/42 +
+ + +
+ 29.69% + Lines + 38/128 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
CoursesProvider.tsx +
+
27.27%39/1430%0/5011.9%5/4229.69%38/128
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/lcov-report/index.html b/coverage/lcov-report/index.html new file mode 100644 index 0000000..2d2e4c6 --- /dev/null +++ b/coverage/lcov-report/index.html @@ -0,0 +1,200 @@ + + + + + + Code coverage report for All files + + + + + + + + +
+
+

All files

+
+ +
+ 41.85% + Statements + 262/626 +
+ + +
+ 11.81% + Branches + 28/237 +
+ + +
+ 18.58% + Functions + 34/183 +
+ + +
+ 43.92% + Lines + 260/592 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
src +
+
83.33%5/6100%6/6100%2/283.33%5/6
src/components +
+
43.7%156/35710%15/15014.91%17/11445.59%155/340
src/constants +
+
100%6/6100%0/0100%0/0100%6/6
src/contexts +
+
34.52%68/1973.23%2/6220.37%11/5437.02%67/181
src/styles +
+
0%0/1100%0/0100%0/00%0/1
src/types +
+
0%0/00%0/00%0/00%0/0
src/utils +
+
45.76%27/5926.32%5/1930.77%4/1346.55%27/58
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/lcov-report/prettify.css b/coverage/lcov-report/prettify.css new file mode 100644 index 0000000..b317a7c --- /dev/null +++ b/coverage/lcov-report/prettify.css @@ -0,0 +1 @@ +.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} diff --git a/coverage/lcov-report/prettify.js b/coverage/lcov-report/prettify.js new file mode 100644 index 0000000..b322523 --- /dev/null +++ b/coverage/lcov-report/prettify.js @@ -0,0 +1,2 @@ +/* eslint-disable */ +window.PR_SHOULD_USE_CONTINUATION=true;(function(){var h=["break,continue,do,else,for,if,return,while"];var u=[h,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"];var p=[u,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"];var l=[p,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"];var x=[p,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"];var R=[x,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"];var r="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes";var w=[p,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"];var s="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END";var I=[h,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"];var f=[h,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"];var H=[h,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"];var A=[l,R,w,s+I,f,H];var e=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/;var C="str";var z="kwd";var j="com";var O="typ";var G="lit";var L="pun";var F="pln";var m="tag";var E="dec";var J="src";var P="atn";var n="atv";var N="nocode";var M="(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|&&=|&=|\\(|\\*|\\*=|\\+=|\\,|\\-=|\\->|\\/|\\/=|:|::|\\;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\@|\\[|\\^|\\^=|\\^\\^|\\^\\^=|\\{|\\||\\|=|\\|\\||\\|\\|=|\\~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function k(Z){var ad=0;var S=false;var ac=false;for(var V=0,U=Z.length;V122)){if(!(al<65||ag>90)){af.push([Math.max(65,ag)|32,Math.min(al,90)|32])}if(!(al<97||ag>122)){af.push([Math.max(97,ag)&~32,Math.min(al,122)&~32])}}}}af.sort(function(av,au){return(av[0]-au[0])||(au[1]-av[1])});var ai=[];var ap=[NaN,NaN];for(var ar=0;arat[0]){if(at[1]+1>at[0]){an.push("-")}an.push(T(at[1]))}}an.push("]");return an.join("")}function W(al){var aj=al.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g"));var ah=aj.length;var an=[];for(var ak=0,am=0;ak=2&&ai==="["){aj[ak]=X(ag)}else{if(ai!=="\\"){aj[ak]=ag.replace(/[a-zA-Z]/g,function(ao){var ap=ao.charCodeAt(0);return"["+String.fromCharCode(ap&~32,ap|32)+"]"})}}}}return aj.join("")}var aa=[];for(var V=0,U=Z.length;V=0;){S[ac.charAt(ae)]=Y}}var af=Y[1];var aa=""+af;if(!ag.hasOwnProperty(aa)){ah.push(af);ag[aa]=null}}ah.push(/[\0-\uffff]/);V=k(ah)})();var X=T.length;var W=function(ah){var Z=ah.sourceCode,Y=ah.basePos;var ad=[Y,F];var af=0;var an=Z.match(V)||[];var aj={};for(var ae=0,aq=an.length;ae=5&&"lang-"===ap.substring(0,5);if(am&&!(ai&&typeof ai[1]==="string")){am=false;ap=J}if(!am){aj[ag]=ap}}var ab=af;af+=ag.length;if(!am){ad.push(Y+ab,ap)}else{var al=ai[1];var ak=ag.indexOf(al);var ac=ak+al.length;if(ai[2]){ac=ag.length-ai[2].length;ak=ac-al.length}var ar=ap.substring(5);B(Y+ab,ag.substring(0,ak),W,ad);B(Y+ab+ak,al,q(ar,al),ad);B(Y+ab+ac,ag.substring(ac),W,ad)}}ah.decorations=ad};return W}function i(T){var W=[],S=[];if(T.tripleQuotedStrings){W.push([C,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""])}else{if(T.multiLineStrings){W.push([C,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"])}else{W.push([C,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"])}}if(T.verbatimStrings){S.push([C,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null])}var Y=T.hashComments;if(Y){if(T.cStyleComments){if(Y>1){W.push([j,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"])}else{W.push([j,/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"])}S.push([C,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,null])}else{W.push([j,/^#[^\r\n]*/,null,"#"])}}if(T.cStyleComments){S.push([j,/^\/\/[^\r\n]*/,null]);S.push([j,/^\/\*[\s\S]*?(?:\*\/|$)/,null])}if(T.regexLiterals){var X=("/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/");S.push(["lang-regex",new RegExp("^"+M+"("+X+")")])}var V=T.types;if(V){S.push([O,V])}var U=(""+T.keywords).replace(/^ | $/g,"");if(U.length){S.push([z,new RegExp("^(?:"+U.replace(/[\s,]+/g,"|")+")\\b"),null])}W.push([F,/^\s+/,null," \r\n\t\xA0"]);S.push([G,/^@[a-z_$][a-z_$@0-9]*/i,null],[O,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[F,/^[a-z_$][a-z_$@0-9]*/i,null],[G,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[F,/^\\[\s\S]?/,null],[L,/^.[^\s\w\.$@\'\"\`\/\#\\]*/,null]);return g(W,S)}var K=i({keywords:A,hashComments:true,cStyleComments:true,multiLineStrings:true,regexLiterals:true});function Q(V,ag){var U=/(?:^|\s)nocode(?:\s|$)/;var ab=/\r\n?|\n/;var ac=V.ownerDocument;var S;if(V.currentStyle){S=V.currentStyle.whiteSpace}else{if(window.getComputedStyle){S=ac.defaultView.getComputedStyle(V,null).getPropertyValue("white-space")}}var Z=S&&"pre"===S.substring(0,3);var af=ac.createElement("LI");while(V.firstChild){af.appendChild(V.firstChild)}var W=[af];function ae(al){switch(al.nodeType){case 1:if(U.test(al.className)){break}if("BR"===al.nodeName){ad(al);if(al.parentNode){al.parentNode.removeChild(al)}}else{for(var an=al.firstChild;an;an=an.nextSibling){ae(an)}}break;case 3:case 4:if(Z){var am=al.nodeValue;var aj=am.match(ab);if(aj){var ai=am.substring(0,aj.index);al.nodeValue=ai;var ah=am.substring(aj.index+aj[0].length);if(ah){var ak=al.parentNode;ak.insertBefore(ac.createTextNode(ah),al.nextSibling)}ad(al);if(!ai){al.parentNode.removeChild(al)}}}break}}function ad(ak){while(!ak.nextSibling){ak=ak.parentNode;if(!ak){return}}function ai(al,ar){var aq=ar?al.cloneNode(false):al;var ao=al.parentNode;if(ao){var ap=ai(ao,1);var an=al.nextSibling;ap.appendChild(aq);for(var am=an;am;am=an){an=am.nextSibling;ap.appendChild(am)}}return aq}var ah=ai(ak.nextSibling,0);for(var aj;(aj=ah.parentNode)&&aj.nodeType===1;){ah=aj}W.push(ah)}for(var Y=0;Y=S){ah+=2}if(V>=ap){Z+=2}}}var t={};function c(U,V){for(var S=V.length;--S>=0;){var T=V[S];if(!t.hasOwnProperty(T)){t[T]=U}else{if(window.console){console.warn("cannot override language handler %s",T)}}}}function q(T,S){if(!(T&&t.hasOwnProperty(T))){T=/^\s*]*(?:>|$)/],[j,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[L,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);c(g([[F,/^[\s]+/,null," \t\r\n"],[n,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[[m,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[P,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[L,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]);c(g([],[[n,/^[\s\S]+/]]),["uq.val"]);c(i({keywords:l,hashComments:true,cStyleComments:true,types:e}),["c","cc","cpp","cxx","cyc","m"]);c(i({keywords:"null,true,false"}),["json"]);c(i({keywords:R,hashComments:true,cStyleComments:true,verbatimStrings:true,types:e}),["cs"]);c(i({keywords:x,cStyleComments:true}),["java"]);c(i({keywords:H,hashComments:true,multiLineStrings:true}),["bsh","csh","sh"]);c(i({keywords:I,hashComments:true,multiLineStrings:true,tripleQuotedStrings:true}),["cv","py"]);c(i({keywords:s,hashComments:true,multiLineStrings:true,regexLiterals:true}),["perl","pl","pm"]);c(i({keywords:f,hashComments:true,multiLineStrings:true,regexLiterals:true}),["rb"]);c(i({keywords:w,cStyleComments:true,regexLiterals:true}),["js"]);c(i({keywords:r,hashComments:3,cStyleComments:true,multilineStrings:true,tripleQuotedStrings:true,regexLiterals:true}),["coffee"]);c(g([],[[C,/^[\s\S]+/]]),["regex"]);function d(V){var U=V.langExtension;try{var S=a(V.sourceNode);var T=S.sourceCode;V.sourceCode=T;V.spans=S.spans;V.basePos=0;q(U,T)(V);D(V)}catch(W){if("console" in window){console.log(W&&W.stack?W.stack:W)}}}function y(W,V,U){var S=document.createElement("PRE");S.innerHTML=W;if(U){Q(S,U)}var T={langExtension:V,numberLines:U,sourceNode:S};d(T);return S.innerHTML}function b(ad){function Y(af){return document.getElementsByTagName(af)}var ac=[Y("pre"),Y("code"),Y("xmp")];var T=[];for(var aa=0;aa=0){var ah=ai.match(ab);var am;if(!ah&&(am=o(aj))&&"CODE"===am.tagName){ah=am.className.match(ab)}if(ah){ah=ah[1]}var al=false;for(var ak=aj.parentNode;ak;ak=ak.parentNode){if((ak.tagName==="pre"||ak.tagName==="code"||ak.tagName==="xmp")&&ak.className&&ak.className.indexOf("prettyprint")>=0){al=true;break}}if(!al){var af=aj.className.match(/\blinenums\b(?::(\d+))?/);af=af?af[1]&&af[1].length?+af[1]:true:false;if(af){Q(aj,af)}S={langExtension:ah,sourceNode:aj,numberLines:af};d(S)}}}if(X]*(?:>|$)/],[PR.PR_COMMENT,/^<\!--[\s\S]*?(?:-\->|$)/],[PR.PR_PUNCTUATION,/^(?:<[%?]|[%?]>)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-handlebars",/^]*type\s*=\s*['"]?text\/x-handlebars-template['"]?\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i],[PR.PR_DECLARATION,/^{{[#^>/]?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{&?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{{>?\s*[\w.][^}]*}}}/],[PR.PR_COMMENT,/^{{![^}]*}}/]]),["handlebars","hbs"]);PR.registerLangHandler(PR.createSimpleLexer([[PR.PR_PLAIN,/^[ \t\r\n\f]+/,null," \t\r\n\f"]],[[PR.PR_STRING,/^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/,null],[PR.PR_STRING,/^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/,null],["lang-css-str",/^url\(([^\)\"\']*)\)/i],[PR.PR_KEYWORD,/^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i],[PR.PR_COMMENT,/^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//],[PR.PR_COMMENT,/^(?:)/],[PR.PR_LITERAL,/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],[PR.PR_LITERAL,/^#(?:[0-9a-f]{3}){1,2}/i],[PR.PR_PLAIN,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i],[PR.PR_PUNCTUATION,/^[^\s\w\'\"]+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_KEYWORD,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_STRING,/^[^\)\"\']+/]]),["css-str"]); diff --git a/coverage/lcov-report/sort-arrow-sprite.png b/coverage/lcov-report/sort-arrow-sprite.png new file mode 100644 index 0000000..03f704a Binary files /dev/null and b/coverage/lcov-report/sort-arrow-sprite.png differ diff --git a/coverage/lcov-report/sorter.js b/coverage/lcov-report/sorter.js new file mode 100644 index 0000000..16de10c --- /dev/null +++ b/coverage/lcov-report/sorter.js @@ -0,0 +1,170 @@ +/* eslint-disable */ +var addSorting = (function() { + 'use strict'; + var cols, + currentSort = { + index: 0, + desc: false + }; + + // returns the summary table element + function getTable() { + return document.querySelector('.coverage-summary'); + } + // returns the thead element of the summary table + function getTableHeader() { + return getTable().querySelector('thead tr'); + } + // returns the tbody element of the summary table + function getTableBody() { + return getTable().querySelector('tbody'); + } + // returns the th element for nth column + function getNthColumn(n) { + return getTableHeader().querySelectorAll('th')[n]; + } + + // loads all columns + function loadColumns() { + var colNodes = getTableHeader().querySelectorAll('th'), + colNode, + cols = [], + col, + i; + + for (i = 0; i < colNodes.length; i += 1) { + colNode = colNodes[i]; + col = { + key: colNode.getAttribute('data-col'), + sortable: !colNode.getAttribute('data-nosort'), + type: colNode.getAttribute('data-type') || 'string' + }; + cols.push(col); + if (col.sortable) { + col.defaultDescSort = col.type === 'number'; + colNode.innerHTML = + colNode.innerHTML + ''; + } + } + return cols; + } + // attaches a data attribute to every tr element with an object + // of data values keyed by column name + function loadRowData(tableRow) { + var tableCols = tableRow.querySelectorAll('td'), + colNode, + col, + data = {}, + i, + val; + for (i = 0; i < tableCols.length; i += 1) { + colNode = tableCols[i]; + col = cols[i]; + val = colNode.getAttribute('data-value'); + if (col.type === 'number') { + val = Number(val); + } + data[col.key] = val; + } + return data; + } + // loads all row data + function loadData() { + var rows = getTableBody().querySelectorAll('tr'), + i; + + for (i = 0; i < rows.length; i += 1) { + rows[i].data = loadRowData(rows[i]); + } + } + // sorts the table using the data for the ith column + function sortByIndex(index, desc) { + var key = cols[index].key, + sorter = function(a, b) { + a = a.data[key]; + b = b.data[key]; + return a < b ? -1 : a > b ? 1 : 0; + }, + finalSorter = sorter, + tableBody = document.querySelector('.coverage-summary tbody'), + rowNodes = tableBody.querySelectorAll('tr'), + rows = [], + i; + + if (desc) { + finalSorter = function(a, b) { + return -1 * sorter(a, b); + }; + } + + for (i = 0; i < rowNodes.length; i += 1) { + rows.push(rowNodes[i]); + tableBody.removeChild(rowNodes[i]); + } + + rows.sort(finalSorter); + + for (i = 0; i < rows.length; i += 1) { + tableBody.appendChild(rows[i]); + } + } + // removes sort indicators for current column being sorted + function removeSortIndicators() { + var col = getNthColumn(currentSort.index), + cls = col.className; + + cls = cls.replace(/ sorted$/, '').replace(/ sorted-desc$/, ''); + col.className = cls; + } + // adds sort indicators for current column being sorted + function addSortIndicators() { + getNthColumn(currentSort.index).className += currentSort.desc + ? ' sorted-desc' + : ' sorted'; + } + // adds event listeners for all sorter widgets + function enableUI() { + var i, + el, + ithSorter = function ithSorter(i) { + var col = cols[i]; + + return function() { + var desc = col.defaultDescSort; + + if (currentSort.index === i) { + desc = !currentSort.desc; + } + sortByIndex(i, desc); + removeSortIndicators(); + currentSort.index = i; + currentSort.desc = desc; + addSortIndicators(); + }; + }; + for (i = 0; i < cols.length; i += 1) { + if (cols[i].sortable) { + // add the click event handler on the th so users + // dont have to click on those tiny arrows + el = getNthColumn(i).querySelector('.sorter').parentElement; + if (el.addEventListener) { + el.addEventListener('click', ithSorter(i)); + } else { + el.attachEvent('onclick', ithSorter(i)); + } + } + } + } + // adds sorting functionality to the UI + return function() { + if (!getTable()) { + return; + } + cols = loadColumns(); + loadData(); + addSortIndicators(); + enableUI(); + }; +})(); + +window.addEventListener('load', addSorting); diff --git a/coverage/lcov-report/src/components/Administrator.tsx.html b/coverage/lcov-report/src/components/Administrator.tsx.html new file mode 100644 index 0000000..db4ba90 --- /dev/null +++ b/coverage/lcov-report/src/components/Administrator.tsx.html @@ -0,0 +1,688 @@ + + + + + + Code coverage report for src/components/Administrator.tsx + + + + + + + + +
+
+

All files / src/components Administrator.tsx

+
+ +
+ 16.98% + Statements + 9/53 +
+ + +
+ 0% + Branches + 0/14 +
+ + +
+ 0% + Functions + 0/9 +
+ + +
+ 16.98% + Lines + 9/53 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172 +173 +174 +175 +176 +177 +178 +179 +180 +181 +182 +183 +184 +185 +186 +187 +188 +189 +190 +191 +192 +193 +194 +195 +196 +197 +198 +199 +200 +201 +202 +203 +204  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +1x +  +  +  +  +  +1x +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
import { format } from 'date-fns';
+import React, { useEffect, useState } from 'react';
+import styled from 'styled-components/macro';
+import { axiosInstance } from '../utils/axiosInstance';
+import { useSnackbar } from 'notistack';
+import CloseIcon from '@material-ui/icons/Close';
+import { SyncLoader } from 'react-spinners';
+ 
+const StyledCloseIcon = styled(CloseIcon)`
+  color: #000000;
+  &:hover {
+    color: white;
+    cursor: pointer;
+  }
+`;
+ 
+const SaveButton = styled.button`
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  user-select: none;
+  background-color: #c7a424;
+  border: none;
+  font-weight: bold;
+  cursor: pointer;
+  height: 40px;
+  &:hover {
+    color: #ffffff;
+    box-shadow: 0px 5px 4px 0px rgba(0, 0, 0, 0.24);
+  }
+ 
+  width: 150px;
+`;
+const AdministratorWrapper = styled.div`
+  display: flex;
+  flex-direction: column;
+  margin: 0 auto;
+  height: 100vh;
+`;
+ 
+const Wrap = styled.div`
+  display: flex;
+  flex: 1;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+`;
+ 
+const LogoWrapper = styled.div`
+  display: flex;
+  flex: 1;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+`;
+ 
+const Text = styled.div`
+  font-family: 'Roboto', sans-serif;
+  font-size: 5rem;
+  user-select: none;
+`;
+ 
+const Logo = styled.img`
+  width: 400px;
+  height: 400px;
+`;
+ 
+const Form = styled.form`
+  flex: 1;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  flex-direction: column;
+ 
+  input {
+    padding: 5px;
+    margin-top: 10px;
+    margin-bottom: 10px;
+    width: 210px;
+  }
+`;
+ 
+export const Administrator = () => {
+  const { enqueueSnackbar } = useSnackbar();
+  const { closeSnackbar } = useSnackbar();
+ 
+  const today = new Date();
+  const dd = String(today.getDate()).padStart(2, '0');
+  const mm = String(today.getMonth() + 1).padStart(2, '0');
+  const yyyy = today.getFullYear();
+ 
+  const date = yyyy + '-' + mm + '-' + dd;
+ 
+  const [selectedFile, setSelectedFile] = useState<File | null>(null);
+  const [startFirstDate, setStartFirstDate] = useState<Date | null>(null);
+  const [endFirstDate, setEndFirstDate] = useState<Date | null>(null);
+  const [startSecondDate, setStartSecondDate] = useState<Date | null>(null);
+  const [endSecondDate, setEndSecondDate] = useState<Date | null>(null);
+  const [loading, setLoading] = useState(false);
+ 
+ 
+  const uploadFile = async (event: React.FormEvent<HTMLFormElement>) => {
+    const action = (key: any) => (
+      <>
+        <StyledCloseIcon
+          onClick={() => {
+            closeSnackbar(key);
+          }}
+        ></StyledCloseIcon>
+      </>
+    );
+    event.preventDefault();
+    const formData = new FormData();
+    formData.append('file', selectedFile as Blob);
+    if (startFirstDate !== null) {
+      formData.append('firstTourBegin', format(startFirstDate, 'dd.MM.yyyy'));
+    }
+    if (endFirstDate !== null) {
+      formData.append('firstTourEnd', format(endFirstDate, 'dd.MM.yyyy'));
+    }
+    if (startSecondDate !== null) {
+      formData.append('secondTourBegin', format(startSecondDate, 'dd.MM.yyyy'));
+    }
+    if (endSecondDate !== null) {
+      formData.append('secondTourEnd', format(endSecondDate, 'dd.MM.yyyy'));
+    }
+ 
+    const config = {
+      headers: {
+        'content-type': 'multipart/form-data',
+      },
+    };
+ 
+    try {
+      setLoading(true);
+      const response = await axiosInstance.post(
+        `${process.env.REACT_APP_API_URL}/api/v1/configurator/config/`,
+        formData,
+        config,
+      );
+      enqueueSnackbar('Ustawienia zostały zapisane', {
+        variant: 'success',
+        action,
+      });
+    } catch (e) {
+      enqueueSnackbar('Ustawienia nie zostały zapisane', {
+        variant: 'error',
+        action,
+      });
+      console.log(e);
+    }
+    setLoading(false);
+  };
+ 
+  return (
+    <AdministratorWrapper>
+      <Wrap>
+        <LogoWrapper>
+          <Logo alt="logo" src="https://plannaplan.pl/img/logo.svg" />
+          <Text> plan na plan </Text>
+        </LogoWrapper>
+        <Form onSubmit={uploadFile}>
+          <div>
+            <div>Start pierwszej tury:</div>{' '}
+            <div>
+              <input type="date" min={date} onChange={(e) => setStartFirstDate(e.target.valueAsDate)} />
+            </div>
+            <div>Koniec pierwszej tury:</div>{' '}
+            <div>
+              <input type="date" min={date} onChange={(e) => setEndFirstDate(e.target.valueAsDate)} />
+            </div>
+          </div>
+          <div>
+            <div>Start drugiej tury:</div>{' '}
+            <div>
+              <input type="date" min={date} onChange={(e) => setStartSecondDate(e.target.valueAsDate)} />
+            </div>
+          </div>
+          <div>
+            <div>Koniec drugiej tury:</div>{' '}
+            <div>
+              <input type="date" min={date} onChange={(e) => setEndSecondDate(e.target.valueAsDate)} />
+            </div>
+          </div>
+          <div>
+            <input
+              type="file"
+              onChange={(e) => {
+                if (e.target.files && e.target.files[0]) {
+                  const file = e.target.files[0];
+                  setSelectedFile(file);
+                }
+              }}
+            />
+          </div>
+          <div>
+            <SaveButton type="submit">{loading === false ? 'Zapisz' : <SyncLoader />} </SaveButton>
+          </div>
+        </Form>
+      </Wrap>
+    </AdministratorWrapper>
+  );
+};
+ 
+ +
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/lcov-report/src/components/App.tsx.html b/coverage/lcov-report/src/components/App.tsx.html new file mode 100644 index 0000000..f4a51bc --- /dev/null +++ b/coverage/lcov-report/src/components/App.tsx.html @@ -0,0 +1,253 @@ + + + + + + Code coverage report for src/components/App.tsx + + + + + + + + +
+
+

All files / src/components App.tsx

+
+ +
+ 90% + Statements + 9/10 +
+ + +
+ 62.5% + Branches + 5/8 +
+ + +
+ 50% + Functions + 1/2 +
+ + +
+ 90% + Lines + 9/10 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59  +  +  +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +1x +2x +2x +  +2x +2x +  +2x +  +  +  +2x +2x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
import React, { useContext, useState } from 'react';
+import Topbar from './Topbar';
+import { Transfer } from './Transfer';
+import { DeaneryPanel } from './DeaneryPanel';
+import { Scheduler } from './Scheduler';
+import { Rightbar } from './Rightbar';
+import { Administrator } from './Administrator';
+import styled from 'styled-components';
+import LoadingOverlay from 'react-loading-overlay';
+import { SyncLoader } from 'react-spinners';
+import { CASContext } from '../contexts/CASProvider';
+import { coursesContext } from '../contexts/CoursesProvider';
+const Wrapper = styled.div`
+  display: flex;
+  height: calc(100vh - 80px);
+  background-color: #eceef4;
+  padding-top: 20px;
+  padding-bottom: 20px;
+  padding-right: 20px;
+`;
+ 
+export const App = () => {
+  const { role } = useContext(CASContext)!;
+  const [isOpenTransfer, setOpenTransfer] = useState(false);
+ 
+  const { selectSchedulerEvents } = useContext(coursesContext)!;
+  const schedulerEvents = selectSchedulerEvents();
+ 
+  const handleTransfer = () => {
+    setOpenTransfer(!isOpenTransfer);
+  };
+ 
+  const userPrivilige = localStorage.getItem('userPrivilige');
+  return (
+    <>
+      <LoadingOverlay active={role === undefined} spinner={<SyncLoader />}>
+        {userPrivilige !== 'ADMIN' && (
+            <>
+              <Topbar handleTransfer={handleTransfer} />
+              <Transfer isOpen={isOpenTransfer} handleClose={handleTransfer} />
+              <Wrapper>
+                {userPrivilige === 'STUDENT' && (
+                  <>
+                    <Scheduler schedulerEvents={schedulerEvents} />
+                    <Rightbar />
+                  </>
+                )}
+                {userPrivilige === 'DEANERY' && <DeaneryPanel schedulerEvents={schedulerEvents} />}
+              </Wrapper>
+            </>
+          )}
+        {userPrivilige === 'ADMIN' && (
+            <Administrator></Administrator>
+        )}
+      </LoadingOverlay>
+    </>
+  );
+};
+ 
+ +
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/lcov-report/src/components/CourseCard.tsx.html b/coverage/lcov-report/src/components/CourseCard.tsx.html new file mode 100644 index 0000000..7e140ff --- /dev/null +++ b/coverage/lcov-report/src/components/CourseCard.tsx.html @@ -0,0 +1,757 @@ + + + + + + Code coverage report for src/components/CourseCard.tsx + + + + + + + + +
+
+

All files / src/components CourseCard.tsx

+
+ +
+ 27.91% + Statements + 12/43 +
+ + +
+ 3.85% + Branches + 1/26 +
+ + +
+ 5.88% + Functions + 1/17 +
+ + +
+ 29.27% + Lines + 12/41 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172 +173 +174 +175 +176 +177 +178 +179 +180 +181 +182 +183 +184 +185 +186 +187 +188 +189 +190 +191 +192 +193 +194 +195 +196 +197 +198 +199 +200 +201 +202 +203 +204 +205 +206 +207 +208 +209 +210 +211 +212 +213 +214 +215 +216 +217 +218 +219 +220 +221 +222 +223 +224 +225 +226 +227  +  +  +  +  +  +  +  +  +  +  +5x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +5x +  +  +  +  +  +  +  +  +5x +  +  +  +  +  +  +  +  +5x +  +  +  +  +  +  +  +  +  +  +5x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +5x +  +  +  +  +  +10x +  +  +  +  +  +  +5x +  +  +  +  +  +  +  +  +  +  +  +5x +  +  +  +  +  +  +  +  +5x +  +  +  +  +  +  +  +  +  +  +5x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +5x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
import React, { useState, useContext } from 'react';
+import Collapse from '@material-ui/core/Collapse';
+import { ReactComponent as Expand } from '../assets/expand.svg';
+import { Course, Group, GroupType } from '../types/index';
+import { coursesContext } from '../contexts/CoursesProvider';
+import styled, { css } from 'styled-components';
+import { makeStyles } from '@material-ui/core/styles';
+import DeleteIcon from '@material-ui/icons/Delete';
+import { useMemo } from 'react';
+import { dayMapping } from '../constants';
+ 
+const CourseCardWrapper = styled.div`
+  position: relative;
+  display: flex;
+  min-height: 40px;
+  background-color: #b5d2e0;
+  align-items: center;
+  justify-content: center;
+  flex-direction: column;
+  margin-top: 10px;
+  border-radius: 10px;
+  cursor: pointer;
+  align-items: stretch;
+  box-shadow: 3px 3px 3px 0px rgba(0, 0, 0, 0.75);
+`;
+ 
+const TitleWrapper = styled.div`
+  font-size: 14px;
+  font-weight: 550;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  padding: 10px 10px 10px 2px;
+`;
+ 
+const BinIcon = styled(DeleteIcon)`
+  max-width: 30px;
+  min-width: 30px;
+  cursor: pointer;
+  &:hover {
+    fill: white;
+  }
+`;
+ 
+const CourseName = styled.div`
+  padding-left: 3px;
+  padding-right: 3px;
+  font-size: 16px;
+  user-select: none;
+`;
+ 
+type ClassGroupProps = {
+  isSelected: boolean;
+};
+ 
+const ClassGroupStyled = styled.div<ClassGroupProps>`
+  position: relative;
+  padding-top: 10px;
+  padding-bottom: 10px;
+  transition: color 0.3s, background-color 0.3s;
+  :hover {
+    cursor: pointer;
+    ${({ isSelected }) =>
+      !isSelected &&
+      css`
+        background-color: rgba(223, 238, 245, 0.308);
+      `}
+  }
+  :last-child {
+    border-radius: 0 0 10px 10px;
+  }
+  ${({ isSelected }) =>
+    isSelected &&
+    css`
+      background-color: #85aec2;
+    `}
+`;
+ 
+interface ExpandIconProps {
+  selected: boolean;
+}
+ 
+export const ExpandIcon = styled(Expand)<ExpandIconProps>`
+  width: 20px;
+  height: 20px;
+  max-width: 20px;
+  min-width: 20px;
+  transition: 0.2s;
+  transform: ${({ selected }) => (selected ? 'scaleY(-1);' : 'scaleY(1);')};
+`;
+ 
+type StyledGroupTypeProps = {
+  groupType: GroupType;
+};
+ 
+const StyledGroupType = styled.div<StyledGroupTypeProps>`
+  font-size: 12px;
+  position: absolute;
+  border-radius: 15px;
+  background-color: ${({ groupType }) => (groupType === 'CLASS' ? '#FFDC61' : '#9ed3ff')};
+  border: 2px solid white;
+  min-width: 45px;
+  top: 5px;
+  left: 5px;
+  color: black;
+`;
+ 
+const FlexboxWrapper = styled.div`
+  display: flex;
+  flex-direction: column;
+`;
+ 
+type FlexItemProps = {
+  justifyContent?: string;
+};
+ 
+const FlexItem = styled.div<FlexItemProps>`
+  display: flex;
+  font-size: 14px;
+  font-weight: 500;
+  ${({ justifyContent }) =>
+    justifyContent &&
+    css`
+      justify-content: ${justifyContent};
+    `}
+`;
+ 
+const useStyles = makeStyles({
+  expanded: {
+    maxHeight: '244px',
+    overflowY: 'auto',
+    '&::-webkit-scrollbar': {
+      width: '0.3em',
+      borderStyle: 'none',
+    },
+    '&::-webkit-scrollbar-track': {
+      borderRadius: '10px',
+    },
+    '&::-webkit-scrollbar-thumb': {
+      borderRadius: '10px',
+      backgroundColor: '#4b4b4b',
+    },
+  },
+});
+ 
+interface CourseCardProps {
+  course: Course;
+}
+ 
+export const CourseCard = ({ course }: CourseCardProps) => {
+  const classes = useStyles();
+  const {
+    hoveredGroup,
+    changeGroupInBasket,
+    deleteFromBasket,
+    selectBasketCourseGroups,
+    changeHoveredGroup,
+  } = useContext(coursesContext)!;
+  const [isSelected, setSelected] = useState(true);
+  const groups = [...course.lectures!, ...course.classes!];
+  const basketCourseGroups = useMemo(() => selectBasketCourseGroups(course.id), []);
+  const [previous, setPrevious] = useState(basketCourseGroups);
+ 
+  const onGroupClick = (group: Group, courseId: number) => {
+    setPrevious((prev) => (group.type === GroupType.CLASS ? { ...prev, classes: group, prev:"classes" } : { ...prev, lecture: group,prev:"lecture" }));
+    changeGroupInBasket(group, courseId);
+  };
+ 
+  return (
+    <CourseCardWrapper>
+      <TitleWrapper onClick={() => setSelected(!isSelected)}>
+        <BinIcon
+          onClick={(e) => {
+            e.stopPropagation();
+            deleteFromBasket(course.id);
+            setSelected(false);
+          }}
+        ></BinIcon>
+        <CourseName onClick={() => setSelected(!isSelected)}>{course.name}</CourseName>
+        <ExpandIcon onClick={() => setSelected(!isSelected)} selected={isSelected} />
+      </TitleWrapper>
+      <Collapse className={classes.expanded} in={isSelected} timeout="auto" unmountOnExit>
+        {groups.map((group: Group, index) => (
+          <ClassGroupStyled
+            isSelected={group.id === previous?.classes?.id || group.id === previous?.lecture?.id ? true : false}
+            key={index}
+            onClick={() => onGroupClick(group, course.id)}
+            onMouseEnter={() => {
+              if (group.type === GroupType.CLASS) {
+                changeGroupInBasket({classes: group,lecture:previous.lecture}, course.id);
+              }
+              if (group.type === GroupType.LECTURE) {
+                changeGroupInBasket({lecture: group,classes:previous.classes}, course.id);
+              }
+            }}
+            onMouseLeave={() => {
+              if (hoveredGroup) {
+                changeGroupInBasket(previous, course.id);            
+              }
+              changeHoveredGroup(null);
+            }}
+          >
+            <StyledGroupType groupType={group.type}>{group.type === 'CLASS' ? 'ĆW' : 'WYK'}</StyledGroupType>
+            <FlexboxWrapper>
+              {group.lecturer.replace('UAM', '').length >= 32 ? (
+                <FlexItem style={{ justifyContent: 'center', marginLeft: '40px' }}>
+                  {group.lecturer.replace('UAM', '')}
+                </FlexItem>
+              ) : (
+                <FlexItem style={{ justifyContent: 'center', marginLeft: '10px' }}>
+                  {group.lecturer.replace('UAM', '')}
+                </FlexItem>
+              )}
+              <FlexItem style={{ justifyContent: 'center', flexDirection: 'column' }}>
+                <div>{dayMapping[group.day]}</div>
+                <div>
+                  {group.time} - {group.endTime}
+                </div>
+              </FlexItem>
+            </FlexboxWrapper>
+          </ClassGroupStyled>
+        ))}
+      </Collapse>
+    </CourseCardWrapper>
+  );
+};
+ 
+ +
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/lcov-report/src/components/DeaneryPanel.tsx.html b/coverage/lcov-report/src/components/DeaneryPanel.tsx.html new file mode 100644 index 0000000..8a7627d --- /dev/null +++ b/coverage/lcov-report/src/components/DeaneryPanel.tsx.html @@ -0,0 +1,532 @@ + + + + + + Code coverage report for src/components/DeaneryPanel.tsx + + + + + + + + +
+
+

All files / src/components DeaneryPanel.tsx

+
+ +
+ 55% + Statements + 11/20 +
+ + +
+ 0% + Branches + 0/8 +
+ + +
+ 0% + Functions + 0/3 +
+ + +
+ 55% + Lines + 11/20 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152  +  +  +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +1x +  +  +  +  +1x +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
import React, { useState, MouseEvent,useContext } from 'react';
+import styled from 'styled-components/macro';
+import Plan from '../assets/plan.svg';
+import History from '../assets/history.svg';
+import StatisticsIcon from '../assets/statistics.svg';
+import {Statistics} from './Statistics';
+import { Scheduler } from './Scheduler';
+import { Rightbar } from './Rightbar';
+import { SchedulerHistory } from './SchedulerHistory';
+import { coursesContext } from '../contexts/CoursesProvider';
+import { SchedulerEvent } from '../types';
+ 
+const LeftSide = styled.div`
+  height: 100%;
+  display: flex;
+  flex: 1;
+  flex-direction: column;
+  background-color: white;
+  text-align: center;
+  border-radius: 5px;
+`;
+ 
+const Wrap = styled.div`
+  display: flex;
+  height: calc(100vh - 120px);
+  background-color: #eceef4;
+  width: 100%;
+`;
+ 
+const Wrapper = styled.div`
+  flex: 12;
+  display: flex;
+  height: calc(100vh - 120px);
+  background-color: #eceef4;
+`;
+ 
+interface LeftPanelElement {
+  isCurrentTab: boolean;
+}
+ 
+const LeftPanelElement = styled.div<LeftPanelElement>`
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+  flex: 1;
+  //box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.75);
+  padding: 20px;
+  cursor: pointer;
+  box-shadow: ${({ isCurrentTab }) => (isCurrentTab === true ? `inset 0px 0px 11px 0px rgba(0,0,0,0.30)` : '')};
+  border-bottom: 1px solid #979797;
+  :first-child {
+    border-radius: 0px 5px 0px 0px;
+  }
+  :last-child {
+    border-radius: 0px 0px 5px 0px;
+  }
+`;
+ 
+const HistoryDiv = styled.div`
+  flex: 1;
+  display: flex;
+  margin-left: 20px;
+  border-radius: 5px;
+  height: calc(100vh - 120px);
+`;
+ 
+const StatsDiv = styled.div`
+  flex: 1;
+  display: flex;
+  margin-left: 20px;
+  border-radius: 5px;
+  height: calc(100vh - 120px);
+`;
+ 
+const LogoWrapper = styled.div`
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+  flex: 2;
+  margin-left: 10px;
+`;
+ 
+const Text = styled.div`
+  font-family: 'Roboto', sans-serif;
+  font-size: 5rem;
+  user-select: none;
+`;
+ 
+const Logo = styled.img`
+  width: 500px;
+  height: 500px;
+`;
+ 
+const Icon = styled.img`
+  width: 40px;
+  margin: 5px;
+`;
+ 
+interface Deanery {
+  schedulerEvents: Array<SchedulerEvent>;
+}
+ 
+export const DeaneryPanel = ({ schedulerEvents }: Deanery) => {
+  const [currentTab, setCurrentTab] = useState<null | number>(1);
+  const { getNewestStudentTimetable,userID } = useContext(coursesContext)!;
+  const { selectHistorySchedulerEvents } = useContext(coursesContext)!;
+  const schedulerHistoryEvents = selectHistorySchedulerEvents();
+ 
+  const handleClick = (e: MouseEvent<HTMLDivElement>) => {
+    setCurrentTab(Number(e.currentTarget.id));
+    getNewestStudentTimetable(userID);
+  };
+ 
+  return (
+    <Wrap>
+      <LeftSide>
+        <LeftPanelElement id={'1'} isCurrentTab={currentTab === 1} onClick={handleClick}>
+          <Icon alt="profile" src={Plan} />
+          Pokaż plan
+        </LeftPanelElement>
+        <LeftPanelElement id={'2'} isCurrentTab={currentTab === 2} onClick={handleClick}>
+          <Icon alt="history" src={History} />
+          Historia Zmian
+        </LeftPanelElement>
+        <LeftPanelElement id={'3'} isCurrentTab={currentTab === 3} onClick={handleClick}>
+          <Icon alt="statistics" src={StatisticsIcon} />
+          Statystyki
+        </LeftPanelElement>
+      </LeftSide>
+      <Wrapper>
+        {currentTab === 1 ? (
+          <>
+            <Scheduler schedulerEvents={schedulerEvents}/>
+            <Rightbar />
+          </>
+        ) : currentTab === 2 ? (
+          <SchedulerHistory schedulerHistoryEvents={schedulerHistoryEvents}/>
+        ) : currentTab === 3 ? (
+          <StatsDiv><Statistics /></StatsDiv> 
+        ) : (
+          <LogoWrapper>
+            <Logo alt="logo" src="https://plannaplan.pl/img/logo.svg" />
+            <Text> plan na plan </Text>
+          </LogoWrapper>
+        )}
+      </Wrapper>
+    </Wrap>
+  );
+};
+ 
+ +
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/lcov-report/src/components/Dropdown.tsx.html b/coverage/lcov-report/src/components/Dropdown.tsx.html new file mode 100644 index 0000000..622c3ce --- /dev/null +++ b/coverage/lcov-report/src/components/Dropdown.tsx.html @@ -0,0 +1,502 @@ + + + + + + Code coverage report for src/components/Dropdown.tsx + + + + + + + + +
+
+

All files / src/components Dropdown.tsx

+
+ +
+ 61.11% + Statements + 22/36 +
+ + +
+ 10% + Branches + 1/10 +
+ + +
+ 46.15% + Functions + 6/13 +
+ + +
+ 61.76% + Lines + 21/34 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142  +  +  +  +  +  +4x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +4x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +4x +12x +12x +12x +12x +12x +  +12x +  +  +  +  +  +  +  +  +12x +  +  +  +  +  +  +  +  +12x +8x +8x +  +  +  +  +  +  +  +  +  +  +  +  +8x +  +8x +  +  +12x +4x +4x +  +  +  +  +  +  +  +  +  +  +  +4x +  +4x +  +  +12x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
import React, { useState, useContext, useEffect, MouseEvent, useMemo } from 'react';
+import { coursesContext } from '../contexts/CoursesProvider';
+import { studentsContext } from '../contexts/StudentsProvider';
+import { Course, Student } from '../types';
+import styled from 'styled-components';
+ 
+const DropdownContainer = styled.div`
+  position: relative;
+  z-index: 99999999;
+  max-height: 396px;
+  border-radius: 3px;
+  overflow-y: auto;
+  opacity: 0.97;
+  box-shadow: 0.05em 0.2em 0.6em rgba(0, 0, 0, 0.2);
+  scroll-snap-type: y mandatory;
+  scroll-behavior: smooth;
+  ::-webkit-scrollbar-track {
+    background-color: #f2f4f7;
+    border-radius: 10px;
+  }
+  ::-webkit-scrollbar {
+    background-color: #f2f4f7;
+    width: 5px;
+    border-style: none;
+  }
+  ::-webkit-scrollbar-thumb {
+    border-radius: 10px;
+    background-color: #4b4b4b;
+  }
+`;
+ 
+const CourseContainer = styled.div`
+  padding: 5px;
+  padding-left: 20px;
+  background-color: #f2f4f7;
+  font-size: 16px;
+  font-weight: 500;
+  scroll-snap-align: end;
+  :hover {
+    background-color: #eceef4;
+    cursor: pointer;
+  }
+`;
+ 
+interface DropdownProps {
+  open: boolean;
+  input: string;
+  handleCloseDropdown: () => void;
+  selectedOption: string;
+}
+ 
+export const Dropdown = ({ open, input, handleCloseDropdown, selectedOption }: DropdownProps) => {
+  const { courses, selectBasketNames, addCourseToBasket, changeStudent, getStudentTimetablesHistory } = useContext(coursesContext)!;
+  const { students, changeSelectedStudent } = useContext(studentsContext)!;
+  const basketNames = useMemo(() => selectBasketNames(), [selectBasketNames]);
+  const [filteredCourses, setFilteredCourses] = useState<Array<Course>>([]);
+  const [filteredStudents, setFilteredStudents] = useState<Array<Student>>([]);
+ 
+  const onCourseClick = (event: MouseEvent) => {
+    const target = event.currentTarget;
+    if (target.id && target.textContent) {
+      const course = filteredCourses.find(({ id }) => id.toString() === target.id)!;
+      addCourseToBasket(course);
+      handleCloseDropdown();
+    }
+  };
+ 
+  const onUserClick = (event: MouseEvent) => {
+    const target = event.currentTarget;
+    //to be moved to students provider
+    changeStudent(target.id);
+    changeSelectedStudent(Number(target.id));
+    
+    handleCloseDropdown();
+  };
+ 
+  useEffect(() => {
+    const filterCourses = (input: string) => {
+      const filteredCourses = courses.filter(
+        ({ name }) =>
+          name
+            .toLowerCase()
+            .normalize('NFD')
+            .replace(/[\u0300-\u036f]/g, '')
+            .includes(
+              input
+                .toLowerCase()
+                .normalize('NFD')
+                .replace(/[\u0300-\u036f]/g, ''),
+            ) && !basketNames.includes(name),
+      );
+      setFilteredCourses(filteredCourses);
+    };
+    filterCourses(input);
+  }, [basketNames, courses, input]);
+ 
+  useEffect(() => {
+    const filterUsers = (input: string) => {
+      const filteredUsers = students.filter(({ name, surname }) =>
+        (name + surname)
+          .toLowerCase()
+          .normalize('NFD')
+          .replace(/[\u0300-\u036f]/g, '')
+          .includes(
+            input
+              .toLowerCase()
+              .normalize('NFD')
+              .replace(/[\u0300-\u036f]/g, ''),
+          ),
+      );
+      setFilteredStudents(filteredUsers);
+    };
+    filterUsers(input);
+  }, [students, input]);
+ 
+  return (
+    <DropdownContainer>
+      {open && (
+        <>
+          {selectedOption === 'studenci' ? (
+            <div>
+              {filteredStudents.map(({ email, id }, index) => (
+                <CourseContainer key={index} id={id.toString()} onClick={onUserClick}>
+                  <p>{email}</p>
+                </CourseContainer>
+              ))}
+            </div>
+          ) : (
+            <div>
+              {filteredCourses.map(({ name, id }, index) => (
+                <CourseContainer key={index} id={id.toString()} onClick={onCourseClick}>
+                  <p>{name} </p>
+                </CourseContainer>
+              ))}
+            </div>
+          )}
+        </>
+      )}
+    </DropdownContainer>
+  );
+};
+ 
+ +
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/lcov-report/src/components/Profile.tsx.html b/coverage/lcov-report/src/components/Profile.tsx.html new file mode 100644 index 0000000..151491a --- /dev/null +++ b/coverage/lcov-report/src/components/Profile.tsx.html @@ -0,0 +1,136 @@ + + + + + + Code coverage report for src/components/Profile.tsx + + + + + + + + +
+
+

All files / src/components Profile.tsx

+
+ +
+ 100% + Statements + 3/3 +
+ + +
+ 100% + Branches + 0/0 +
+ + +
+ 100% + Functions + 1/1 +
+ + +
+ 100% + Lines + 3/3 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20  +  +  +  +  +  +  +  +  +4x +8x +  +8x +  +  +  +  +  +  + 
import { Menu, MenuItem } from '@material-ui/core';
+import React, { useContext } from 'react';
+import { CASContext } from '../contexts/CASProvider';
+ 
+interface ProfileProps {
+  anchorEl: HTMLElement | null;
+  handleClose: () => void;
+}
+ 
+export const Profile = ({ anchorEl, handleClose }: ProfileProps) => {
+  const { logout } = useContext(CASContext)!;
+ 
+  return (
+    <Menu anchorEl={anchorEl} keepMounted open={Boolean(anchorEl)} onClose={handleClose}>
+      {/* <MenuItem>Profil</MenuItem> */}
+      <MenuItem onClick={logout}>Wyloguj</MenuItem>
+    </Menu>
+  );
+};
+ 
+ +
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/lcov-report/src/components/Rightbar.tsx.html b/coverage/lcov-report/src/components/Rightbar.tsx.html new file mode 100644 index 0000000..20d5184 --- /dev/null +++ b/coverage/lcov-report/src/components/Rightbar.tsx.html @@ -0,0 +1,268 @@ + + + + + + Code coverage report for src/components/Rightbar.tsx + + + + + + + + +
+
+

All files / src/components Rightbar.tsx

+
+ +
+ 77.78% + Statements + 7/9 +
+ + +
+ 100% + Branches + 0/0 +
+ + +
+ 33.33% + Functions + 1/3 +
+ + +
+ 87.5% + Lines + 7/8 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64  +  +  +  +  +  +2x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +2x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +2x +4x +  +4x +4x +4x +  +  +  +  +  +  +  +  + 
import React, { useContext } from 'react';
+import { CourseCard } from './CourseCard';
+import { coursesContext } from '../contexts/CoursesProvider';
+import styled from 'styled-components';
+import { debounce } from '../utils/index';
+ 
+const RightbarWrapper = styled.div`
+  padding: 15px;
+  text-align: center;
+  height: 100%;
+  width: 350px;
+  overflow-y: scroll;
+  ::-webkit-scrollbar-track {
+    border-radius: 10px;
+  }
+  ::-webkit-scrollbar {
+    width: 5px;
+    border-style: none;
+  }
+  ::-webkit-scrollbar-thumb {
+    border-radius: 10px;
+    background-color: #4b4b4b;
+  }
+  background-color: white;
+  border-radius: 5px;
+  box-shadow: 3px 3px 3px -2px rgba(0, 0, 0, 0.59);
+`;
+const SaveButton = styled.div`
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  user-select: none;
+  background-color: #43a047;
+  border-radius: 10px;
+  cursor: pointer;
+  height: 40px;
+  margin-bottom: 10px;
+  &:hover {
+    color: #ffffff;
+    box-shadow: 0px 5px 4px 0px rgba(0, 0, 0, 0.24);
+  }
+ 
+  &:active {
+    background-color: #54c457;
+  }
+ 
+  box-shadow: 3px 3px 3px 0px rgba(0, 0, 0, 0.75);
+`;
+ 
+export const Rightbar = () => {
+  const { selectBasketCourses, saveBasket, userID } = useContext(coursesContext)!;
+ 
+  const basketCourses = selectBasketCourses();
+  const handleSave = debounce(() => saveBasket(userID), 500);
+  return (
+    <RightbarWrapper>
+      <SaveButton onClick={handleSave}>ZAPISZ</SaveButton>
+      {basketCourses.map((course) => (
+        <CourseCard course={course} key={course.id} />
+      ))}
+    </RightbarWrapper>
+  );
+};
+ 
+ +
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/lcov-report/src/components/Scheduler.tsx.html b/coverage/lcov-report/src/components/Scheduler.tsx.html new file mode 100644 index 0000000..db7dec5 --- /dev/null +++ b/coverage/lcov-report/src/components/Scheduler.tsx.html @@ -0,0 +1,484 @@ + + + + + + Code coverage report for src/components/Scheduler.tsx + + + + + + + + +
+
+

All files / src/components Scheduler.tsx

+
+ +
+ 21.43% + Statements + 6/28 +
+ + +
+ 0% + Branches + 0/28 +
+ + +
+ 0% + Functions + 0/13 +
+ + +
+ 22.22% + Lines + 6/27 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +1x +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
import React, { useLayoutEffect, useRef } from 'react';
+import { useState } from 'react';
+import { SchedulerEvents } from './SchedulerEvents';
+import { days, hours } from '../constants/index';
+import styled from 'styled-components/macro';
+import { SchedulerEvent } from '../types';
+ 
+const SchedulerWrapper = styled.div`
+  border-collapse: collapse;
+  flex: 1;
+  background-color: white;
+  padding: 10px 40px 25px 10px;
+  border-radius: 5px;
+  margin-right: 20px;
+  margin-left: 20px;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+  box-shadow: 3px 3px 3px -2px rgba(0, 0, 0, 0.59);
+`;
+ 
+const TableBody = styled.div`
+  position: relative;
+  width: 100%;
+  display: flex;
+  flex-direction: column;
+  height: calc(100% * 25 / 26);
+`;
+ 
+const TableRow = styled.div`
+  display: flex;
+  height: 100%;
+`;
+ 
+const TableHead = styled.div`
+  display: flex;
+  width: 100%;
+  height: calc(100% / 26);
+`;
+ 
+interface TableCellProps {
+  cellHeight?: number;
+  isHourColumn?: boolean;
+}
+ 
+const TableCell = styled.div<TableCellProps>`
+  border-width: ${({ isHourColumn }) => !isHourColumn && '1px'};
+  border-style: ${({ isHourColumn }) => !isHourColumn && 'none solid dotted none'};
+  border-color: rgb(235, 235, 235);
+  display: flex;
+  align-items: center;
+  justify-content: ${({ isHourColumn }) => (isHourColumn ? 'flex-end' : 'center')};
+  flex: ${({ isHourColumn }) => (isHourColumn ? '1' : '5')};
+  margin-right: ${({ isHourColumn }) => (isHourColumn ? '10px' : '0px')};
+  margin-top: ${({ isHourColumn, cellHeight }) => (isHourColumn ? `-${cellHeight}px` : '0px')};
+  font-size: 0.75vw;
+  user-select: none;
+  border-collapse: collapse;
+  :nth-child(2) {
+    border-left: 1px solid rgb(235, 235, 235);
+  }
+  font-weight: bold;
+`;
+ 
+interface SchedulerProps {
+  schedulerEvents: Array<SchedulerEvent>;
+}
+ 
+export const Scheduler = ({ schedulerEvents }: SchedulerProps) => {
+  const cellRef = useRef<HTMLDivElement>(null);
+  const [cellWidth, setCellWidth] = useState(0);
+  const [cellHeight, setCellHeight] = useState(0);
+ 
+  useLayoutEffect(() => {
+    const handleResize = () => {
+      if (cellRef.current) {
+        setCellWidth(cellRef.current.getBoundingClientRect().width);
+        setCellHeight(cellRef.current.getBoundingClientRect().height);
+      }
+    };
+    handleResize();
+    window.addEventListener('resize', handleResize);
+    return () => window.removeEventListener('resize', handleResize);
+  }, []);
+ 
+  return (
+    <SchedulerWrapper>
+      <TableHead>
+        {days.map((day, indexCell) =>
+          indexCell === 0 ? (
+            <TableCell isHourColumn={true} key={indexCell}>
+              {day}
+            </TableCell>
+          ) : (
+            <TableCell style={{ borderStyle: 'none none solid none' }} key={indexCell}>
+              {day}
+            </TableCell>
+          ),
+        )}
+      </TableHead>
+      <TableBody>
+        {hours.map((hour, indexRow) => (
+          <TableRow key={indexRow}>
+            {[hour, '', '', '', '', ''].map((value, indexCell) =>
+              indexCell === 0 ? (
+                <TableCell isHourColumn={true} cellHeight={cellHeight} key={`${indexRow}${indexCell}`}>
+                  {value}
+                </TableCell>
+              ) : indexRow === 0 && indexCell === 1 ? (
+                <TableCell ref={cellRef} key={`${indexRow}${indexCell}`}>
+                  {value}
+                </TableCell>
+              ) : indexRow === 23 ? (
+                <TableCell style={{ borderBottom: '1px solid   rgb(235, 235, 235)' }} key={`${indexRow}${indexCell}`}>
+                  {value}
+                </TableCell>
+              ) : indexRow === 5 ? (
+                <TableCell style={{ borderBottom: '1px solid  rgb(235, 235, 235)' }} key={`${indexRow}${indexCell}`}>
+                  {value}
+                </TableCell>
+              ) : indexRow % 2 !== 0 ? (
+                <TableCell style={{ borderBottom: '1px solid  rgb(235, 235, 235)' }} key={`${indexRow}${indexCell}`}>
+                  {value}
+                </TableCell>
+              ) : (
+                <TableCell key={`${indexRow}${indexCell}`}>{value}</TableCell>
+              ),
+            )}
+          </TableRow>
+        ))}
+        <SchedulerEvents cellWidth={cellWidth} cellHeight={cellHeight} schedulerEvents={schedulerEvents} />
+      </TableBody>
+    </SchedulerWrapper>
+  );
+};
+ 
+ +
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/lcov-report/src/components/SchedulerEvents.tsx.html b/coverage/lcov-report/src/components/SchedulerEvents.tsx.html new file mode 100644 index 0000000..f71f5d0 --- /dev/null +++ b/coverage/lcov-report/src/components/SchedulerEvents.tsx.html @@ -0,0 +1,211 @@ + + + + + + Code coverage report for src/components/SchedulerEvents.tsx + + + + + + + + +
+
+

All files / src/components SchedulerEvents.tsx

+
+ +
+ 33.33% + Statements + 1/3 +
+ + +
+ 0% + Branches + 0/12 +
+ + +
+ 0% + Functions + 0/2 +
+ + +
+ 33.33% + Lines + 1/3 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45  +  +  +  +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
import React, { useContext } from 'react';
+import { SchedulerRow } from './SchedulerRow';
+import { coursesContext } from '../contexts/CoursesProvider';
+import { selectGroupsToShow } from '../utils/index';
+import { ROWS_COUNT } from '../constants';
+import { SchedulerEvent } from '../types';
+ 
+interface SchedulerEventsProps {
+  cellWidth: number;
+  cellHeight: number;
+  schedulerEvents: Array<SchedulerEvent>;
+}
+ 
+export const SchedulerEvents = ({ cellWidth, cellHeight,schedulerEvents }: SchedulerEventsProps) => {
+ 
+  return (
+    <div>
+      {[...Array(ROWS_COUNT)].map((_, index) => (
+        <SchedulerRow
+          key={index}
+          groups={selectGroupsToShow(schedulerEvents, index)}
+          indexRow={index}
+          rowTop={
+            index === 0
+              ? cellHeight / 2
+              : index === 1
+              ? cellHeight * 4
+              : index === 2
+              ? cellHeight * 7.5
+              : index === 3
+              ? cellHeight * 11.5
+              : index === 4
+              ? cellHeight * 15
+              : index === 5
+              ? cellHeight * 18.5
+              : 0
+          }
+          cellWidth={cellWidth}
+          cellHeight={cellHeight}
+        />
+      ))}
+    </div>
+  );
+};
+ 
+ +
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/lcov-report/src/components/SchedulerHistory.tsx.html b/coverage/lcov-report/src/components/SchedulerHistory.tsx.html new file mode 100644 index 0000000..610415f --- /dev/null +++ b/coverage/lcov-report/src/components/SchedulerHistory.tsx.html @@ -0,0 +1,241 @@ + + + + + + Code coverage report for src/components/SchedulerHistory.tsx + + + + + + + + +
+
+

All files / src/components SchedulerHistory.tsx

+
+ +
+ 10% + Statements + 2/20 +
+ + +
+ 0% + Branches + 0/10 +
+ + +
+ 0% + Functions + 0/6 +
+ + +
+ 11.11% + Lines + 2/18 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
import React, { useContext, useEffect, useState } from 'react';
+import styled from 'styled-components';
+import { coursesContext } from '../contexts/CoursesProvider';
+import { SchedulerEvent } from '../types';
+import { Scheduler } from './Scheduler';
+import { SchedulerHistoryNavigation } from './SchedulerHistoryNavigation';
+ 
+const Wrapper = styled.div`
+  display: flex;
+  flex-direction: column;
+  width: 100%;
+`;
+ 
+interface SchedulerHistoryProps {
+  schedulerHistoryEvents: Array<SchedulerEvent>;
+}
+ 
+export const SchedulerHistory = ({schedulerHistoryEvents}:SchedulerHistoryProps) => {
+  const { timetableHistory, setHistoryBasketFromHistoryGroups } = useContext(coursesContext)!;
+  const [currentTimetable, setCurrentTimetable] = useState(timetableHistory.length===0 ? 0 : timetableHistory.length - 1);
+  let commisionDate = timetableHistory[currentTimetable]?.commisionDate;
+ 
+  const SubstractCurrentTimetable = (value: number) => {
+    if (currentTimetable > 0) {
+      setCurrentTimetable((currentTimetable) => currentTimetable + value);
+    }
+  };
+ 
+  const AddCurrentTimetable = (value: number) => {
+    if (currentTimetable < timetableHistory.length - 1) {
+      setCurrentTimetable((currentTimetable) => currentTimetable + value);
+    }
+  };
+ 
+  useEffect(() => {
+    const timetable = timetableHistory[currentTimetable];
+    if (timetable) {
+      const { groups } = timetable;
+      setHistoryBasketFromHistoryGroups(groups);
+    }
+    else{
+      setHistoryBasketFromHistoryGroups([]);
+    }
+  }, [currentTimetable,timetableHistory]);
+ 
+  return (
+    <Wrapper>
+      {timetableHistory.length > 0 && (
+        <SchedulerHistoryNavigation commisionDate={commisionDate} SubstractCurrentTimetable={SubstractCurrentTimetable} AddCurrentTimetable={AddCurrentTimetable} />
+      )}
+      <Scheduler schedulerEvents={schedulerHistoryEvents}/>
+    </Wrapper>
+  );
+};
+ 
+ +
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/lcov-report/src/components/SchedulerHistoryNavigation.tsx.html b/coverage/lcov-report/src/components/SchedulerHistoryNavigation.tsx.html new file mode 100644 index 0000000..44a3e5a --- /dev/null +++ b/coverage/lcov-report/src/components/SchedulerHistoryNavigation.tsx.html @@ -0,0 +1,346 @@ + + + + + + Code coverage report for src/components/SchedulerHistoryNavigation.tsx + + + + + + + + +
+
+

All files / src/components SchedulerHistoryNavigation.tsx

+
+ +
+ 62.5% + Statements + 5/8 +
+ + +
+ 100% + Branches + 0/0 +
+ + +
+ 0% + Functions + 0/3 +
+ + +
+ 62.5% + Lines + 5/8 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90  +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
import React, { useContext } from 'react';
+import styled from 'styled-components';
+import { coursesContext } from '../contexts/CoursesProvider';
+import RightArrow  from '../assets/right-arrow.svg';
+import LeftArrow  from '../assets/left-arrow.svg';
+ 
+type ButtonProps = {
+  direction: 'left' | 'right';
+};
+ 
+const Wrapper = styled.div`
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  margin-top:-15px;
+`;
+ 
+const StyledButton = styled.div<ButtonProps>`
+cursor:pointer;
+user-select: none;
+margin:10px;
+border-radius:5px;
+  border-radius: 15px;
+  background-color: #9ed3ff;
+  border: 2px solid white;
+  min-width: 45px;
+  color: black;
+  display:flex;
+  align-items:center;
+  justify-content:center;
+  padding: 12px;
+  :hover{
+  background-color:#85c8ff;
+}
+  transition: color 0.3s, background-color 0.3s;
+`;
+ 
+const StyledArrow = styled.img`
+width:20px;
+`;
+ 
+ 
+const StyledDate = styled.div`
+user-select: none;
+margin:10px;
+border-radius:5px;
+  border-radius: 15px;
+  background-color: #FFDC61;
+  border: 2px solid white;
+  min-width: 45px;
+  text-align:center;
+  color: black;
+  padding: 10px;
+`;
+ 
+type SchedulerHistoryNavigationProps = {
+  commisionDate?: Date;
+  SubstractCurrentTimetable: (value: number) => void;
+  AddCurrentTimetable: (value: number) => void;
+};
+ 
+export const SchedulerHistoryNavigation = ({
+  commisionDate,
+  SubstractCurrentTimetable,
+  AddCurrentTimetable,
+}: SchedulerHistoryNavigationProps) => {
+ 
+  return (
+    <Wrapper>
+      <StyledButton
+        direction="left"
+        onClick={() => {
+          SubstractCurrentTimetable(-1);
+        }}
+      >
+        <StyledArrow src={LeftArrow}></StyledArrow>
+      </StyledButton>
+      <StyledDate>{commisionDate}</StyledDate>
+      <StyledButton
+        direction="right"
+        onClick={() => {
+          AddCurrentTimetable(1);
+        }}
+      >
+        <StyledArrow src={RightArrow}></StyledArrow>
+      </StyledButton>
+    </Wrapper>
+  );
+};
+ 
+ +
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/lcov-report/src/components/SchedulerRow.tsx.html b/coverage/lcov-report/src/components/SchedulerRow.tsx.html new file mode 100644 index 0000000..52f4e01 --- /dev/null +++ b/coverage/lcov-report/src/components/SchedulerRow.tsx.html @@ -0,0 +1,820 @@ + + + + + + Code coverage report for src/components/SchedulerRow.tsx + + + + + + + + +
+
+

All files / src/components SchedulerRow.tsx

+
+ +
+ 22.22% + Statements + 10/45 +
+ + +
+ 0% + Branches + 0/18 +
+ + +
+ 0% + Functions + 0/20 +
+ + +
+ 22.22% + Lines + 10/45 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172 +173 +174 +175 +176 +177 +178 +179 +180 +181 +182 +183 +184 +185 +186 +187 +188 +189 +190 +191 +192 +193 +194 +195 +196 +197 +198 +199 +200 +201 +202 +203 +204 +205 +206 +207 +208 +209 +210 +211 +212 +213 +214 +215 +216 +217 +218 +219 +220 +221 +222 +223 +224 +225 +226 +227 +228 +229 +230 +231 +232 +233 +234 +235 +236 +237 +238 +239 +240 +241 +242 +243 +244 +245 +246 +247 +248  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
import React, { Fragment, MouseEvent, useState, useEffect, useContext } from 'react';
+import { GroupType, SchedulerEvent } from '../types';
+import styled, { css } from 'styled-components/macro';
+import Popover from '@material-ui/core/Popover';
+import { makeStyles, createStyles, Theme } from '@material-ui/core/styles';
+import { MONDAY_TO_FRIDAY } from '../constants';
+import { coursesContext } from '../contexts/CoursesProvider';
+ 
+const useStyles = makeStyles((theme: Theme) =>
+  createStyles({
+    popover: {
+      fontSize: '14px',
+    },
+    paper: {
+      padding: '15px 15px 15px 15px',
+      textAlign: 'left',
+      lineHeight: `1 !important`,
+    },
+  }),
+);
+ 
+const PopoverSpan = styled.span`
+  font-weight: bold;
+  margin-right: 2px;
+`;
+ 
+interface SchedulerEventsWrapperProps {
+  eventIndex: number;
+  rowTop: number;
+  cellWidth: number;
+  cellHeight: number;
+}
+ 
+const SchedulerEventsWrapper = styled.div<SchedulerEventsWrapperProps>`
+  position: absolute;
+  display: flex;
+  top: ${({ rowTop }) => rowTop}px;
+  left: ${({ cellWidth, eventIndex }) => (cellWidth * 1) / 5 + 4 + cellWidth * eventIndex}px;
+  width: ${({ cellWidth }) => cellWidth - 10}px;
+  height: ${({ cellHeight }) => cellHeight * 3}px;
+  z-index: 2;
+  padding-left: 10px;
+`;
+ 
+interface SchedulerEventProps {
+  cellWidth: number;
+  cellHeight: number;
+  groupType: GroupType;
+  isHovered: boolean;
+}
+ 
+const StyledSchedulerEvent = styled.div<SchedulerEventProps>`
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+  z-index: 20000;
+  font-size: 0.65vw;
+  line-height: normal;
+  border-radius: 10px;
+  height: ${({ cellHeight }) => cellHeight * 3}px;
+  width: ${({ cellWidth }) => (cellWidth * 3) / 4}px;
+  margin-right: 5px;
+  padding: 5px 5px 0 5px;
+  text-align: center;
+  background-color: ${({ groupType, isHovered }) => {
+    if (isHovered) {
+      return groupType === 'CLASS' ? '#FFE485' : '#D2EBFF';
+    } else {
+      return groupType === 'CLASS' ? '#FFDC61' : '#9ed3ff';
+    }
+  }};
+  ${({ isHovered }) =>
+    isHovered &&
+    css`
+      transition: background-color ease-in 0.4s;
+    `}
+  transition: background-color ease-out 0.4s;
+  box-shadow: 3px 3px 3px 0px rgba(0, 0, 0, 0.75);
+  cursor: pointer;
+`;
+ 
+const threeStyles = () => {
+  return css`
+    white-space: nowrap;
+    text-overflow: ellipsis;
+    max-width: 70px;
+  `;
+};
+ 
+type BoldParagraphProps = {
+  isThree?: boolean;
+};
+ 
+const BoldParagraph = styled.p<BoldParagraphProps>`
+  overflow: hidden;
+  flex: 3;
+  ${({ isThree }) => isThree && threeStyles}
+`;
+ 
+const ClassWrap = styled.div`
+  font-weight: 700;
+  height: 100%;
+  width: 100%;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+  line-height: normal;
+`;
+ 
+const TextWrapper = styled.div`
+  flex: 1;
+  width: inherit;
+  padding: 0 3px 5px 3px;
+  display: flex;
+  justify-content: space-between;
+`;
+ 
+interface SchedulerRowProps {
+  groups: Array<SchedulerEvent>;
+  indexRow: number;
+  rowTop: number;
+  cellWidth: number;
+  cellHeight: number;
+}
+ 
+const getGroupsPerDay = (groups: Array<SchedulerEvent>) => {
+  const groupsPerDay: any = { 0: 0, 1: 0, 2: 0, 3: 0, 4: 0 };
+  for (const group of groups) {
+    groupsPerDay[group.day]++;
+  }
+  return groupsPerDay;
+};
+ 
+export const SchedulerRow = ({ groups, indexRow, rowTop, cellWidth, cellHeight }: SchedulerRowProps) => {
+  const { hoveredGroup } = useContext(coursesContext)!;
+  const classes = useStyles();
+  const groupsPerDay = getGroupsPerDay(groups);
+  const [anchorEl, setAnchorEl] = React.useState<HTMLDivElement | null>(null);
+  const [popoverId, setPopoverId] = useState<string | null>(null);
+  //looks weird
+  const handlePopoverOpen = (event: MouseEvent<HTMLDivElement, globalThis.MouseEvent>) => {
+    setAnchorEl(event.currentTarget);
+    setPopoverId(event.currentTarget.id);
+  };
+ 
+  const handlePopoverClose = (e: MouseEvent<any>) => {
+    setPopoverId(null);
+    setAnchorEl(null);
+  };
+  useEffect(() => {
+  }, [anchorEl]);
+  const open = Boolean(anchorEl);
+  const id = open ? 'simple-popover' : undefined;
+ 
+  return (
+    <div>
+      {[...Array(MONDAY_TO_FRIDAY)].map((_, eventIndex) => (
+        <SchedulerEventsWrapper
+          eventIndex={eventIndex}
+          rowTop={rowTop}
+          cellWidth={cellWidth}
+          cellHeight={cellHeight}
+          key={eventIndex}
+          id={`eventRow${indexRow}eventCol${eventIndex}`}
+        >
+          {groups.map(
+            (group, index) =>
+              group.day === eventIndex && (
+                <Fragment key={index}>
+                  <StyledSchedulerEvent
+                    aria-describedby={id}
+                    isHovered={group.id === hoveredGroup?.id}
+                    groupType={group.type}
+                    cellWidth={cellWidth}
+                    cellHeight={cellHeight}
+                    id={`eventRow${indexRow}eventCol${eventIndex}${index}`}
+                    key={index}
+                    aria-owns={open ? `mouse-over-popover` : undefined}
+                    aria-haspopup="true"
+                    onClick={(e) => handlePopoverOpen(e)}
+                  >
+                    <ClassWrap>
+                      <BoldParagraph isThree={groupsPerDay[group.day] >= 3}>{groups[index].name}</BoldParagraph>
+                      {groupsPerDay[group.day] < 3 ? (
+                        <TextWrapper>
+                          <div>{`${groups[index].time}-${groups[index].endTime}`}</div>
+                          <div>
+                            {groups[index].takenPlaces}/{groups[index].capacity}
+                          </div>
+                        </TextWrapper>
+                      ) : (
+                        <TextWrapper style={{ flexDirection: 'column' }}>
+                          <div style={{ alignSelf: 'flex-end' }}>
+                            {groups[index].takenPlaces}/{groups[index].capacity}
+                          </div>
+                        </TextWrapper>
+                      )}
+                    </ClassWrap>
+                  </StyledSchedulerEvent>
+                  <Popover
+                    id={id}
+                    className={classes.popover}
+                    classes={{
+                      paper: classes.paper,
+                    }}
+                    open={popoverId === `eventRow${indexRow}eventCol${eventIndex}${index}`}
+                    anchorEl={anchorEl}
+                    anchorOrigin={{
+                      vertical: 'top',
+                      horizontal: 'right',
+                    }}
+                    transformOrigin={{
+                      vertical: 'center',
+                      horizontal: 'left',
+                    }}
+                    onClose={handlePopoverClose}
+                    disableRestoreFocus
+                  >
+                    <div style={{ display: 'flex', flexDirection: 'column', zIndex: 20000 }} onClick={() => {}}>
+                      <p style={{ margin: '7px 0 7px 0', fontWeight: 'bold' }}>{groups[index].name}</p>
+                      <p style={{ margin: '2px 0 2px 0' }}>
+                        <PopoverSpan>Prowadzący:</PopoverSpan> {groups[index].lecturer}
+                      </p>
+                      <p style={{ margin: '2px 0 2px 0' }}>
+                        <PopoverSpan>Sala zajęć</PopoverSpan>: {groups[index].room}
+                      </p>
+                      <p style={{ margin: '2px 0 2px 0' }}>
+                        <PopoverSpan>Kod przedmiotu: </PopoverSpan>ACB129
+                      </p>
+                      <p style={{ margin: '2px 0 2px 0' }}>
+                        <PopoverSpan>Kod grupy: </PopoverSpan>FVJ753
+                      </p>
+                      <p style={{ margin: '2px 0 2px 0' }}>
+                        <PopoverSpan>Punkty ECTS:</PopoverSpan> 2
+                      </p>
+                    </div>
+                  </Popover>
+                </Fragment>
+              ),
+          )}
+        </SchedulerEventsWrapper>
+      ))}
+    </div>
+  );
+};
+ 
+ +
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/lcov-report/src/components/SelectMenu.tsx.html b/coverage/lcov-report/src/components/SelectMenu.tsx.html new file mode 100644 index 0000000..907f6bc --- /dev/null +++ b/coverage/lcov-report/src/components/SelectMenu.tsx.html @@ -0,0 +1,430 @@ + + + + + + Code coverage report for src/components/SelectMenu.tsx + + + + + + + + +
+
+

All files / src/components SelectMenu.tsx

+
+ +
+ 52.94% + Statements + 9/17 +
+ + +
+ 50% + Branches + 1/2 +
+ + +
+ 16.67% + Functions + 1/6 +
+ + +
+ 52.94% + Lines + 9/17 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118  +  +  +  +  +5x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +5x +  +  +  +  +  +5x +  +  +  +  +5x +  +  +  +  +  +  +  +  +5x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +5x +  +  +  +  +  +  +  +  +  +  +5x +10x +  +10x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
import { ClickAwayListener } from '@material-ui/core';
+import React, { useState } from 'react';
+import styled from 'styled-components';
+import { ExpandIcon } from './CourseCard';
+ 
+const Wrapper = styled.div`
+  display: flex;
+  flex-direction: column;
+  align-items: flex-start;
+  justify-content: center;
+  margin-top: 15px;
+  min-width:130px;
+  font-family: 'Roboto', sans-serif;
+  background-color: #f1f2f5;
+  color: black;
+  border-top-left-radius: 6px;
+  border-bottom-left-radius: 6px;
+ 
+  &:focus {
+    outline: none;
+  }
+  padding-left: 15px;
+  cursor: pointer;
+  border-top-left-radius: 6px;
+  border-bottom-left-radius: 6px;
+  user-select: none;
+`;
+const Header = styled.div`
+  display: flex;
+  width:100%;
+  align-items: center;
+  justify-content: space-between;
+`;
+const HeaderTitle = styled.div`
+  font-family: 'Roboto', sans-serif;
+  font-size: 16px;
+  font-weight: 400;
+`;
+const List = styled.ul`
+  position: absolute;
+  top: 50px;
+  list-style-type: none;
+  margin: 0;
+  padding: 0;
+  margin-left: -15px;
+  background-color: #f2f4f7;
+`;
+const ListItem = styled.li`
+  font-family: 'Roboto', sans-serif;
+  font-size: 16px;
+  user-select: none;
+  padding-top: 10px;
+  padding-bottom: 10px;
+  padding-left: 15px;
+  padding-right: 37px;
+  font-weight: 400;
+  :hover {
+    background-color: #eceef4;
+  }
+  :first-child{
+    margin-top:10px;
+  }
+`;
+const ExpandIconSelect = styled(ExpandIcon)`
+  width: 10px;
+  height: 10px;
+`;
+ 
+interface SelectMenuProps {
+  changeSelectedOption: (option: string) => void;
+  changeDropdownOpen: (dropdownState: boolean) => void;
+  selectedOption:string;
+}
+ 
+export const SelectMenu = ({changeSelectedOption,changeDropdownOpen, selectedOption}:SelectMenuProps) => {
+  const [isOpen, setIsOpen] = useState(false);
+  
+  return (
+    <ClickAwayListener
+      onClickAway={() => {
+        setIsOpen(false);
+      }}
+    >
+      <Wrapper onClick={() => {changeDropdownOpen(false)}}>
+        <Header
+          onClick={() => {
+            console.log('clicked');
+            setIsOpen(!isOpen);
+          }}
+        >
+          <HeaderTitle>{selectedOption}</HeaderTitle>
+          <ExpandIconSelect selected={isOpen} />
+        </Header>
+        {isOpen && (
+          <List>
+            <ListItem
+              onClick={() => {
+                changeSelectedOption('przedmioty');
+                setIsOpen(false);
+              }}
+            >
+              przedmioty
+            </ListItem>
+            <ListItem
+              onClick={() => {
+                changeSelectedOption('studenci');
+                setIsOpen(false);
+              }}
+            >
+              studenci
+            </ListItem>
+          </List>
+        )}
+      </Wrapper>
+    </ClickAwayListener>
+  );
+};
+ 
+ +
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/lcov-report/src/components/Statistics.tsx.html b/coverage/lcov-report/src/components/Statistics.tsx.html new file mode 100644 index 0000000..01080f9 --- /dev/null +++ b/coverage/lcov-report/src/components/Statistics.tsx.html @@ -0,0 +1,412 @@ + + + + + + Code coverage report for src/components/Statistics.tsx + + + + + + + + +
+
+

All files / src/components Statistics.tsx

+
+ +
+ 100% + Statements + 7/7 +
+ + +
+ 100% + Branches + 0/0 +
+ + +
+ 100% + Functions + 1/1 +
+ + +
+ 100% + Lines + 7/7 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112  +  +  +  +  +  +  +  +  +  +  +2x +  +  +  +  +  +  +  +2x +  +  +  +  +  +  +2x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +2x +  +  +  +  +  +2x +  +  +  +  +  +  +2x +2x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
import React, { useState, useContext } from 'react';
+import Collapse from '@material-ui/core/Collapse';
+import { ReactComponent as Expand } from '../assets/expand.svg';
+import { Course, Group, GroupType } from '../types/index';
+import { coursesContext } from '../contexts/CoursesProvider';
+import styled, { css } from 'styled-components';
+import { makeStyles } from '@material-ui/core/styles';
+import DeleteIcon from '@material-ui/icons/Delete';
+import { useMemo } from 'react';
+import { dayMapping } from '../constants';
+ 
+const StatisticsWrapper = styled.div`
+  display: flex;
+  flex-direction: column;
+  width: 100%;
+  justify-content: center;
+  align-items: center;
+`;
+ 
+const Row = styled.div`
+  display: flex;
+  width: 100%;
+  justify-content: center;
+  align-items: center;
+`;
+ 
+const StatisticBox = styled.div`
+background-color:white;
+  width: 200px;
+  height: 200px;
+  margin: 10px;
+  border: 1px solid #000000;
+  border-radius: 38px;
+  display: flex;
+  flex-direction: column;
+  justify-content: space-around;
+  align-items: center;
+  font-size: 22px;
+  padding:2px;
+  box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.75);
+`;
+ 
+const StatisticNumber = styled.p`
+  font-size: 52px;
+  margin-top: 40px;
+  margin-bottom:0px;
+`;
+ 
+const StatisticText = styled.p`
+  font-size: 18px;
+  text-align:center;
+  align-items:center;
+  justify-content:center;
+`;
+ 
+export const Statistics = () => {
+  return (
+    <StatisticsWrapper>
+      <Row>
+        <StatisticBox>
+          <StatisticNumber>65</StatisticNumber>
+          <StatisticText>Utworzonych grup</StatisticText>
+        </StatisticBox>
+        <StatisticBox>
+          {' '}
+          <StatisticNumber>280</StatisticNumber>
+          <StatisticText>Zapisanych sutdentów do grup</StatisticText>
+        </StatisticBox>
+        <StatisticBox>
+          {' '}
+          <StatisticNumber>24</StatisticNumber>
+          <StatisticText>Studentów niezapisanych do żadnej grupy</StatisticText>
+        </StatisticBox>
+      </Row>
+      <Row>
+        <StatisticBox>
+          {' '}
+          <StatisticNumber>150</StatisticNumber>
+          <StatisticText>Studentów z zaakceptowanym planem</StatisticText>
+        </StatisticBox>
+        <StatisticBox>
+          {' '}
+          <StatisticNumber>130</StatisticNumber>
+          <StatisticText>Studentów bez zaakceptowanego pełengo planu</StatisticText>
+        </StatisticBox>
+        <StatisticBox>
+          {' '}
+          <StatisticNumber>65</StatisticNumber>
+          <StatisticText>Utworzonych grup</StatisticText>
+        </StatisticBox>
+      </Row>
+      <Row>
+        <StatisticBox>
+          {' '}
+          <StatisticNumber>65</StatisticNumber>
+          <StatisticText>Utworzonych grup</StatisticText>
+        </StatisticBox>
+        <StatisticBox>
+          {' '}
+          <StatisticNumber>65</StatisticNumber>
+          <StatisticText>Utworzonych grup</StatisticText>
+        </StatisticBox>
+        <StatisticBox>
+          {' '}
+          <StatisticNumber>65</StatisticNumber>
+          <StatisticText>Utworzonych grup</StatisticText>
+        </StatisticBox>
+      </Row>
+    </StatisticsWrapper>
+  );
+};
+ 
+ +
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/lcov-report/src/components/Topbar.tsx.html b/coverage/lcov-report/src/components/Topbar.tsx.html new file mode 100644 index 0000000..ec80f69 --- /dev/null +++ b/coverage/lcov-report/src/components/Topbar.tsx.html @@ -0,0 +1,748 @@ + + + + + + Code coverage report for src/components/Topbar.tsx + + + + + + + + +
+
+

All files / src/components Topbar.tsx

+
+ +
+ 73.91% + Statements + 34/46 +
+ + +
+ 50% + Branches + 7/14 +
+ + +
+ 28.57% + Functions + 4/14 +
+ + +
+ 91.89% + Lines + 34/37 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172 +173 +174 +175 +176 +177 +178 +179 +180 +181 +182 +183 +184 +185 +186 +187 +188 +189 +190 +191 +192 +193 +194 +195 +196 +197 +198 +199 +200 +201 +202 +203 +204 +205 +206 +207 +208 +209 +210 +211 +212 +213 +214 +215 +216 +217 +218 +219 +220 +221 +222 +223 +224  +  +  +  +  +  +  +  +  +  +  +  +4x +  +  +  +  +  +  +  +  +  +4x +  +  +  +  +  +  +  +4x +  +  +  +  +  +  +  +4x +  +  +  +  +  +  +  +  +  +  +  +  +4x +  +  +  +  +  +  +  +  +  +4x +  +  +  +  +  +8x +  +  +  +  +  +  +  +  +  +4x +  +  +  +  +  +  +  +  +  +  +  +  +  +4x +  +  +  +  +  +  +  +  +  +  +  +  +  +4x +  +  +  +  +  +  +  +4x +  +  +  +  +  +  +  +  +4x +  +  +  +4x +  +  +  +  +  +  +  +  +  +  +  +  +8x +8x +8x +8x +8x +8x +8x +8x +  +8x +4x +  +  +8x +  +8x +  +8x +  +8x +  +8x +  +8x +  +8x +  +8x +  +8x +4x +  +  +  +  +  +8x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
import React, { useState, MouseEvent, ChangeEvent, useEffect, useCallback, useContext, useRef } from 'react';
+import { ReactComponent as Close } from '../assets/close.svg';
+import ProfileIcon from '../assets/account.svg';
+import { Profile } from './Profile';
+import { Dropdown } from './Dropdown';
+import styled from 'styled-components/macro';
+import ClickAwayListener from 'react-click-away-listener';
+import { SelectMenu } from './SelectMenu';
+import { studentsContext } from '../contexts/StudentsProvider';
+import { CASContext } from '../contexts/CASProvider';
+import { render } from 'react-dom';
+ 
+const Topbar = styled.div`
+  background-color: #e3e5ed;
+  height: 80px;
+  padding: 5px;
+  font-size: 24px;
+  font-weight: bold;
+  display: flex;
+  justify-content: space-between;
+`;
+ 
+const LogoWrapper = styled.div`
+  display: flex;
+  justify-content: flex-start;
+  align-items: center;
+  flex: 2;
+  margin-left: 10px;
+`;
+ 
+const Logo = styled.img`
+  width: 70px;
+  height: 70px;
+  @media only screen and (max-width: 1533px) {
+    flex: auto;
+  }
+`;
+ 
+const Text = styled.div`
+  margin-left: 10px;
+  font-size: 1.4rem;
+  user-select: none;
+  @media only screen and (max-width: 1533px) {
+    display: none;
+  }
+  @media only screen and (max-width: 1828px) {
+    margin-right: 10px;
+    text-align: center;
+  }
+`;
+ 
+const FlexboxColumn = styled.div`
+  display: flex;
+  flex-direction: column;
+  flex: 12;
+`;
+ 
+type InputWrapperProps = {
+  isStudent: boolean;
+};
+ 
+const InputWrapper = styled.div<InputWrapperProps>`
+  width: 100%;
+  display: flex;
+  margin-top: 15px;
+  max-height: 40px;
+  background-color: #f2f4f7;
+  border-radius: ${({ isStudent }) => (isStudent ? ` 6px 6px 6px 6px` : ` 0px 6px 6px 0px`)};
+  padding-left: 6px;
+  &:hover {
+    background-color: #ffffff;
+  }
+  &:hover > input {
+    background-color: #ffffff;
+  }
+`;
+ 
+const Input = styled.input`
+  font-family: 'Roboto', sans-serif;
+  font-size: 18px;
+  background-color: #f1f2f5;
+  height: 40px;
+  max-height: 40px;
+  width: 100%;
+  border: none;
+  margin-left: 5px;
+  &:focus {
+    outline: none;
+  }
+`;
+ 
+const CloseIcon = styled(Close)`
+  align-self: center;
+  width: 30px;
+  height: 30px;
+  margin-right: 5px;
+  @media only screen and (max-width: 670px) {
+    width: 25px;
+  }
+  cursor: pointer;
+  :hover {
+    fill: grey;
+  }
+`;
+ 
+const IconWrapper = styled.div`
+  display: flex;
+  align-items: center;
+  justify-content: flex-end;
+  width: 335px;
+  margin-right: 10px;
+`;
+ 
+const Icon = styled.img`
+  width: 40px;
+  margin: 5px;
+  cursor: pointer;
+  @media only screen and (max-width: 670px) {
+    width: 35px;
+  }
+`;
+ 
+export const Flexbox = styled.div`
+  display: flex;
+`;
+ 
+export const SelectedStudent = styled.div`
+  width: 100%;
+  display: flex;
+  justify-content: center;
+  margin-right: 10px;
+  margin-left: 10px;
+`;
+ 
+interface TopbarProps {
+  handleTransfer: (e: MouseEvent) => void;
+}
+ 
+export default function ({ handleTransfer }: TopbarProps) {
+  const { selectedStudent } = useContext(studentsContext)!;
+  const { role } = useContext(CASContext)!;
+  const [clearInput, setClearInput] = useState(false);
+  const [isPolish, setIsPolish] = useState(false);
+  const [anchorEl, setAnchorEl] = useState<HTMLImageElement | null>(null);
+  const [open, setOpen] = useState(false);
+  const [input, setInput] = useState('');
+  const [selectedOption, setSelectedOption] = useState(role === 'STUDENT' ? 'przedmioty' : 'studenci');
+ 
+  useEffect(() => {
+    role && setSelectedOption(role === 'STUDENT' ? 'przedmioty' : 'studenci');
+  }, [role]);
+ 
+  const changeSelectedOption = (option: string) => setSelectedOption(option);
+ 
+  const onLangChange = () => setIsPolish(!isPolish);
+ 
+  const handleProfile = (event: MouseEvent<HTMLImageElement>) => setAnchorEl(event.currentTarget);
+ 
+  const handleCloseProfile = () => setAnchorEl(null);
+ 
+  const handleClearInput = useCallback(() => setClearInput((clearInput) => !clearInput), []);
+ 
+  const handleChange = (event: ChangeEvent<HTMLInputElement>) => setInput(event.target.value);
+ 
+  const handleShowDropdown = () => setOpen(true);
+ 
+  const handleCloseDropdown = () => setOpen(false);
+ 
+  useEffect(() => {
+    Iif (clearInput) {
+      setInput('');
+      handleClearInput();
+    }
+  }, [clearInput, handleClearInput]);
+ 
+  return (
+    <Topbar>
+      <LogoWrapper>
+        <Logo alt="logo" src="https://plannaplan.pl/img/logo.svg" />
+        <Text> plan na plan </Text>
+      </LogoWrapper>
+      <FlexboxColumn>
+        <ClickAwayListener onClickAway={handleCloseDropdown}>
+          <Flexbox>
+            {role !== 'STUDENT' && (
+              <SelectMenu
+                changeSelectedOption={changeSelectedOption}
+                selectedOption={selectedOption}
+                changeDropdownOpen={setOpen}
+              />
+            )}
+            <InputWrapper isStudent={role === 'STUDENT'}>
+              <Input
+                placeholder={`Wyszukaj ${selectedOption === 'studenci' ? 'studentów...' : 'przedmioty...'}`}
+                onChange={handleChange}
+                value={input}
+                onFocus={() => {
+                  handleShowDropdown();
+                }}
+              />
+              <CloseIcon onClick={handleClearInput} />
+            </InputWrapper>
+          </Flexbox>
+          <Dropdown
+            open={open}
+            input={input}
+            handleCloseDropdown={handleCloseDropdown}
+            selectedOption={selectedOption}
+          />
+        </ClickAwayListener>
+      </FlexboxColumn>
+      <IconWrapper>
+        <SelectedStudent>{selectedStudent?.email.replace(/@st.amu.edu.pl/, '')}</SelectedStudent>
+ 
+        {/* <Text>Maciej Głowacki</Text> */}
+        {/* <Icon alt="transfer" src={Transfer} onClick={handleTransfer} /> */}
+        {/* <Icon alt="change_language" src={isPolish ? EnglishIcon : PolishIcon} onClick={onLangChange} /> */}
+        <Icon alt="profile" src={ProfileIcon} onClick={handleProfile} />
+        <Profile anchorEl={anchorEl} handleClose={handleCloseProfile} />
+      </IconWrapper>
+    </Topbar>
+  );
+}
+ 
+ +
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/lcov-report/src/components/Transfer.tsx.html b/coverage/lcov-report/src/components/Transfer.tsx.html new file mode 100644 index 0000000..d604f25 --- /dev/null +++ b/coverage/lcov-report/src/components/Transfer.tsx.html @@ -0,0 +1,421 @@ + + + + + + Code coverage report for src/components/Transfer.tsx + + + + + + + + +
+
+

All files / src/components Transfer.tsx

+
+ +
+ 100% + Statements + 9/9 +
+ + +
+ 100% + Branches + 0/0 +
+ + +
+ 100% + Functions + 1/1 +
+ + +
+ 100% + Lines + 9/9 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115  +  +  +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +1x +  +  +  +  +  +  +1x +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +  +  +  +1x +2x +  +2x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
import React from 'react';
+import Modal from '@material-ui/core/Modal';
+import Fade from '@material-ui/core/Fade';
+import Input from '@material-ui/core/Input';
+import { makeStyles } from '@material-ui/core/styles';
+import styled from 'styled-components';
+ 
+interface TransferProps {
+  handleClose: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
+  isOpen: boolean;
+}
+ 
+const useStyles = makeStyles({
+  wrapper: {
+    display: 'flex',
+    justifyContent: 'center',
+    textAlign: 'center',
+    alignItems: 'center',
+  },
+});
+ 
+const TransferStyled = styled.div`
+  display: flex;
+ 
+  flex-direction: row;
+ 
+  outline: none;
+  min-width: 35%;
+  height: 70%;
+  padding-top: 40px;
+  background: #006b96;
+  box-shadow: 0px 0px 0px 4px #006b96;
+  border: 4px solid #ffc400;
+  margin: 0 auto;
+  border-top-left-radius: 5px;
+  border-bottom-right-radius: 5px;
+  text-transform: uppercase;
+  letter-spacing: 0.3ch;
+`;
+ 
+const TransferGiveStyled = styled.div`
+  flex-grow: 1;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+`;
+ 
+const TransferReceiveStyled = styled.div`
+  flex-grow: 1;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+`;
+ 
+const TransferTextStyled = styled.div`
+  font-size: 30px;
+  margin-bottom: 10px;
+`;
+ 
+const TransferInputStyled = styled.div`
+  width: 250px;
+  height: 25px;
+  padding: 10px;
+  font-size: 24px;
+  transition-duration: 0.3s;
+  input::placeholder {
+    color: black;
+    font-weight: bold;
+    text-align: center;
+  }
+`;
+ 
+export const Transfer = ({ handleClose, isOpen }: TransferProps) => {
+  const classes = useStyles();
+ 
+  return (
+    <div>
+      <Modal
+        className={classes.wrapper}
+        open={isOpen}
+        onClose={handleClose}
+        aria-labelledby="simple-modal-title"
+        aria-describedby="simple-modal-description"
+      >
+        <Fade in={isOpen}>
+          <TransferStyled>
+            <TransferGiveStyled>
+              <TransferTextStyled>Oddam</TransferTextStyled>
+              <TransferInputStyled>
+                {' '}
+                <Input
+                  placeholder="Wyszukaj..."
+                  inputProps={{ 'aria-label': 'description' }}
+                  className="top-bar__input-field"
+                />
+              </TransferInputStyled>
+            </TransferGiveStyled>
+            <TransferReceiveStyled>
+              <TransferTextStyled>Przyjmę</TransferTextStyled>
+              <TransferInputStyled>
+                {' '}
+                <Input
+                  placeholder="Wyszukaj..."
+                  inputProps={{ 'aria-label': 'description' }}
+                  className="top-bar__input-field"
+                />
+              </TransferInputStyled>
+            </TransferReceiveStyled>
+          </TransferStyled>
+        </Fade>
+      </Modal>
+    </div>
+  );
+};
+ 
+ +
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/lcov-report/src/components/index.html b/coverage/lcov-report/src/components/index.html new file mode 100644 index 0000000..b43909d --- /dev/null +++ b/coverage/lcov-report/src/components/index.html @@ -0,0 +1,335 @@ + + + + + + Code coverage report for src/components + + + + + + + + +
+
+

All files src/components

+
+ +
+ 43.7% + Statements + 156/357 +
+ + +
+ 10% + Branches + 15/150 +
+ + +
+ 14.91% + Functions + 17/114 +
+ + +
+ 45.59% + Lines + 155/340 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
Administrator.tsx +
+
16.98%9/530%0/140%0/916.98%9/53
App.tsx +
+
90%9/1062.5%5/850%1/290%9/10
CourseCard.tsx +
+
27.91%12/433.85%1/265.88%1/1729.27%12/41
DeaneryPanel.tsx +
+
55%11/200%0/80%0/355%11/20
Dropdown.tsx +
+
61.11%22/3610%1/1046.15%6/1361.76%21/34
Profile.tsx +
+
100%3/3100%0/0100%1/1100%3/3
Rightbar.tsx +
+
77.78%7/9100%0/033.33%1/387.5%7/8
Scheduler.tsx +
+
21.43%6/280%0/280%0/1322.22%6/27
SchedulerEvents.tsx +
+
33.33%1/30%0/120%0/233.33%1/3
SchedulerHistory.tsx +
+
10%2/200%0/100%0/611.11%2/18
SchedulerHistoryNavigation.tsx +
+
62.5%5/8100%0/00%0/362.5%5/8
SchedulerRow.tsx +
+
22.22%10/450%0/180%0/2022.22%10/45
SelectMenu.tsx +
+
52.94%9/1750%1/216.67%1/652.94%9/17
Statistics.tsx +
+
100%7/7100%0/0100%1/1100%7/7
Topbar.tsx +
+
73.91%34/4650%7/1428.57%4/1491.89%34/37
Transfer.tsx +
+
100%9/9100%0/0100%1/1100%9/9
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/lcov-report/src/constants/index.html b/coverage/lcov-report/src/constants/index.html new file mode 100644 index 0000000..77ae211 --- /dev/null +++ b/coverage/lcov-report/src/constants/index.html @@ -0,0 +1,110 @@ + + + + + + Code coverage report for src/constants + + + + + + + + +
+
+

All files src/constants

+
+ +
+ 100% + Statements + 6/6 +
+ + +
+ 100% + Branches + 0/0 +
+ + +
+ 100% + Functions + 0/0 +
+ + +
+ 100% + Lines + 6/6 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
index.ts +
+
100%6/6100%0/0100%0/0100%6/6
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/lcov-report/src/constants/index.ts.html b/coverage/lcov-report/src/constants/index.ts.html new file mode 100644 index 0000000..25f1e98 --- /dev/null +++ b/coverage/lcov-report/src/constants/index.ts.html @@ -0,0 +1,238 @@ + + + + + + Code coverage report for src/constants/index.ts + + + + + + + + +
+
+

All files / src/constants index.ts

+
+ +
+ 100% + Statements + 6/6 +
+ + +
+ 100% + Branches + 0/0 +
+ + +
+ 100% + Functions + 0/0 +
+ + +
+ 100% + Lines + 6/6 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +545x +5x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +5x +  +  +5x +  +  +  +  +  +  +  +  +  +  +  +5x +5x +  +  +  +  +  +  +  +  + 
export const days = ['', 'Poniedziałek', 'Wtorek', 'Środa', 'Czwartek', 'Piątek'];
+export const hours = [
+  '8:00',
+  '',
+  '9:00',
+  '',
+  '10:00',
+  '',
+  '11:00',
+  '',
+  '12:00',
+  '',
+  '13:00',
+  '',
+  '14:00',
+  '',
+  '15:00',
+  '',
+  '16:00',
+  '',
+  '17:00',
+  '',
+  '18:00',
+  '',
+  '19:00',
+  '',
+];
+ 
+export const MONDAY_TO_FRIDAY = 5;
+ 
+//added 12:00, one of lectures starts at that time
+export const courseStartTimeToEventRow: { [time: string]: number } = {
+  '8.15': 0,
+  '10.00': 1,
+  '11.45': 2,
+  '12.00': 2,
+  '13.45': 3,
+  '15.30': 4,
+  '17.15': 5,
+  '18.45': 6,
+};
+ 
+//groupTimeToEventRowMapping - 1;
+export const ROWS_COUNT = 6;
+export const dayMapping: { [key: number]: string } = {
+  0: 'poniedziałek',
+  1: 'wtorek',
+  2: 'środa',
+  3: 'czwartek',
+  4: 'piątek',
+  5: 'sobota',
+  6: 'niedziela',
+};
+ 
+ +
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/lcov-report/src/contexts/CASProvider.tsx.html b/coverage/lcov-report/src/contexts/CASProvider.tsx.html new file mode 100644 index 0000000..003c8b4 --- /dev/null +++ b/coverage/lcov-report/src/contexts/CASProvider.tsx.html @@ -0,0 +1,313 @@ + + + + + + Code coverage report for src/contexts/CASProvider.tsx + + + + + + + + +
+
+

All files / src/contexts CASProvider.tsx

+
+ +
+ 54.05% + Statements + 20/37 +
+ + +
+ 20% + Branches + 2/10 +
+ + +
+ 66.67% + Functions + 4/6 +
+ + +
+ 54.05% + Lines + 20/37 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79  +  +  +  +  +  +  +  +  +  +  +  +  +5x +  +  +  +  +  +5x +20x +20x +20x +20x +20x +20x +10x +10x +10x +10x +10x +  +10x +10x +10x +10x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +10x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +10x +  +  +20x +  +  +  +  +  + 
import React, { useState, useEffect, createContext, ReactNode } from 'react';
+import { LoggedUser } from '../types';
+import { axiosInstance } from '../utils/axiosInstance';
+ 
+export interface CASContext {
+  user: LoggedUser | undefined;
+  logout: () => void;
+  token: string | undefined;
+  refreshToken: string | undefined;
+  isFetchingToken: boolean;
+  role: string | undefined;
+}
+ 
+export const CASContext = createContext<CASContext | undefined>(undefined);
+ 
+export interface CASProviderProps {
+  children: ReactNode;
+}
+ 
+export const CASProvider = ({ children }: CASProviderProps) => {
+  const [user, setUser] = useState<LoggedUser>();
+  const [token, setToken] = useState<string | undefined>();
+  const [refreshToken, setRefreshToken] = useState<string | undefined>();
+  const [role, setRole] = useState<string | undefined>(undefined);
+  const [isFetchingToken, setIsFetchingToken] = useState(false);
+  useEffect(() => {
+    const login = async () => {
+      const urlParams = new URLSearchParams(window.location.search);
+      const ticket = urlParams.get('ticket');
+      Eif (!ticket) {
+        redirectToCASLoginService();
+      }
+      try {
+        Eif (!localStorage.getItem('userToken')) {
+          setIsFetchingToken(true);
+          const { data: user } = await axiosInstance.get<LoggedUser & { token: string; refreshToken: string }>(
+            `${process.env.REACT_APP_API_URL}/token?ticket=${ticket}`,
+          );
+          setUser({ authorityRole: user.authorityRole, email: user.email, id: user.id });
+          localStorage.setItem('userToken', user.token);
+          localStorage.setItem('userPrivilige', user.authorityRole);
+          localStorage.setItem('refreshToken', user.refreshToken);
+          setIsFetchingToken(false);
+        }
+        const token = localStorage.getItem('userToken');
+        const refreshToken = localStorage.getItem('refreshToken');
+        const role = localStorage.getItem('userPrivilige');
+        token && setToken(token);
+        refreshToken && setRefreshToken(refreshToken);
+        role && setRole(role);
+      } catch (e) {
+        console.log(e);
+      }
+    };
+    login();
+  }, []);
+ 
+  function logout() {
+    localStorage.removeItem('userToken');
+    localStorage.removeItem('refreshToken');
+    localStorage.removeItem('userPrivilige');
+    redirectToCASLogoutService();
+  }
+ 
+  function redirectToCASLogoutService() {
+    window.location.replace(`https://cas.amu.edu.pl/cas/logout?service=${window.origin}`);
+  }
+ 
+  function redirectToCASLoginService() {
+    window.location.replace(`https://cas.amu.edu.pl/cas/login?service=${window.origin}&locale=pl`);
+  }
+ 
+  return (
+    <CASContext.Provider value={{ user, token, refreshToken, logout, isFetchingToken, role }}>
+      {children}
+    </CASContext.Provider>
+  );
+};
+ 
+ +
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/lcov-report/src/contexts/CoursesProvider.tsx.html b/coverage/lcov-report/src/contexts/CoursesProvider.tsx.html new file mode 100644 index 0000000..4974871 --- /dev/null +++ b/coverage/lcov-report/src/contexts/CoursesProvider.tsx.html @@ -0,0 +1,1006 @@ + + + + + + Code coverage report for src/contexts/CoursesProvider.tsx + + + + + + + + +
+
+

All files / src/contexts CoursesProvider.tsx

+
+ +
+ 27.27% + Statements + 39/143 +
+ + +
+ 0% + Branches + 0/50 +
+ + +
+ 11.9% + Functions + 5/42 +
+ + +
+ 29.69% + Lines + 38/128 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172 +173 +174 +175 +176 +177 +178 +179 +180 +181 +182 +183 +184 +185 +186 +187 +188 +189 +190 +191 +192 +193 +194 +195 +196 +197 +198 +199 +200 +201 +202 +203 +204 +205 +206 +207 +208 +209 +210 +211 +212 +213 +214 +215 +216 +217 +218 +219 +220 +221 +222 +223 +224 +225 +226 +227 +228 +229 +230 +231 +232 +233 +234 +235 +236 +237 +238 +239 +240 +241 +242 +243 +244 +245 +246 +247 +248 +249 +250 +251 +252 +253 +254 +255 +256 +257 +258 +259 +260 +261 +262 +263 +264 +265 +266 +267 +268 +269 +270 +271 +272 +273 +274 +275 +276 +277 +278 +279 +280 +281 +282 +283 +284 +285 +286 +287 +288 +289 +290 +291 +292 +293 +294 +295 +296 +297 +298 +299 +300 +301 +302 +303 +304 +305 +306 +307 +308 +309 +310  +  +  +  +  +  +  +5x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +5x +  +  +  +  +  +5x +20x +20x +  +  +20x +20x +20x +20x +20x +20x +20x +  +20x +  +  +  +  +  +20x +  +20x +4x +4x +  +  +  +  +  +20x +2x +  +  +  +  +  +  +  +  +  +  +  +20x +  +  +  +  +  +  +  +  +  +  +  +  +  +20x +  +  +  +  +  +  +  +  +20x +  +20x +  +20x +  +  +  +  +  +  +  +  +  +20x +  +20x +  +  +  +  +  +  +  +20x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +20x +  +  +  +  +  +  +  +  +  +  +  +20x +  +  +  +  +  +  +  +  +  +  +  +  +  +20x +  +  +  +  +  +  +  +  +  +  +  +20x +  +  +  +  +  +  +  +  +  +  +  +  +20x +  +  +  +  +  +  +  +  +  +  +20x +  +  +  +  +  +  +  +  +  +  +  +20x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +20x +10x +10x +  +  +  +  +  +  +20x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
import React, { useState, createContext, useEffect, ReactNode } from 'react';
+import { Course, Group, Basket, GroupType, SchedulerEvent, TimetableHistory } from '../types';
+import { useSnackbar } from 'notistack';
+import { axiosInstance } from '../utils/axiosInstance';
+import CloseIcon from '@material-ui/icons/Close';
+import styled from 'styled-components';
+ 
+const StyledCloseIcon = styled(CloseIcon)`
+  color: #000000;
+  &:hover {
+    color: white;
+    cursor: pointer;
+  }
+`;
+ 
+interface CourseContext {
+  courses: Array<Course>;
+  basket: Array<Basket>;
+  timetableHistory: Array<TimetableHistory>;
+  hoveredGroup: Group | undefined | null;
+  userID: string;
+  isDataLoading: boolean;
+  historyBasket: Array<Basket>;
+  addCourseToBasket: (courses: Course) => void;
+  changeHoveredGroup: (group: Group | null) => void;
+  changeGroupInBasket: (group: any, courseId: number) => void;
+  restoreGroupInBasket: (restoreGroup: Group, courseId: number) => void;
+  deleteFromBasket: (id: number) => void;
+  saveBasket: (userID: string) => Promise<void>;
+  changeStudent: (studentId: string) => void;
+  selectSchedulerEvents: () => Array<SchedulerEvent>;
+  selectHistorySchedulerEvents: () => Array<SchedulerEvent>;
+  selectBasketNames: () => Array<string>;
+  selectBasketCourses: () => Array<Course>;
+  selectBasketCourseGroups: (courseId: number) => { lecture: Group | undefined; classes: Group | undefined };
+  getNewestStudentTimetable: (studentId: string) => void;
+  getStudentTimetablesHistory: (studentId: string) => void;
+  changeDataLoading: (isLoading: boolean) => void;
+  setHistoryBasketFromHistoryGroups: (groupsIds: Array<number>) => void;
+}
+export const coursesContext = createContext<CourseContext | undefined>(undefined);
+ 
+interface CoursesProviderProps {
+  children: ReactNode;
+}
+ 
+export const CoursesProvider = ({ children }: CoursesProviderProps) => {
+  const { enqueueSnackbar } = useSnackbar();
+  const { closeSnackbar } = useSnackbar();
+ 
+  //fetch courses with groups
+  const [courses, setCourses] = useState<Array<Course>>([]);
+  const [basket, setBasket] = useState<Array<Basket>>([]);
+  const [historyBasket, setHistoryBasket] = useState<Array<Basket>>([]);
+  const [timetableHistory, setTimetableHistory] = useState<Array<TimetableHistory>>([]);
+  const [userID, setUserID] = useState('');
+  const [hoveredGroup, setHoveredGroup] = useState<Group | undefined | null>(null);
+  const [isDataLoading, setIsDataLoading] = useState(false);
+ 
+  const selectBasketIds = () => {
+    const classesIds = basket.map((course) => course?.classes?.id).filter((course) => course !== undefined);
+    const lecturesIds = basket.map((course) => course?.lecture?.id).filter((course) => course !== undefined);
+    return [...classesIds, ...lecturesIds];
+  };
+ 
+  const selectBasketNames = () => basket.map(({ name }) => name);
+ 
+  const selectBasketCourses = () => {
+    const basketNames = selectBasketNames();
+    return basketNames.reduce((sum, basketName) => {
+      const course = courses.find(({ name }) => basketName === name);
+      return course === undefined ? sum : [...sum, course];
+    }, [] as Array<Course>);
+  };
+ 
+  const selectSchedulerEvents = () => {
+    return basket.reduce((res, el) => {
+      const { name } = el;
+      if (el.classes) {
+        res.push({ ...el.classes, name });
+      }
+      if (el.lecture) {
+        res.push({ ...el.lecture, name });
+      }
+      return res;
+    }, [] as Array<SchedulerEvent>);
+  };
+ 
+  const selectHistorySchedulerEvents = () => {
+    return historyBasket.reduce((res, el) => {
+      const { name } = el;
+      if (el.classes) {
+        res.push({ ...el.classes, name });
+      }
+      if (el.lecture) {
+        res.push({ ...el.lecture, name });
+      }
+      return res;
+    }, [] as Array<SchedulerEvent>);
+  };
+ 
+ 
+  const selectBasketCourseGroups = (courseId: number) => {
+    const course = basket.find(({ id }) => id === courseId);
+    if (course !== undefined) {
+      return { lecture: course.lecture, classes: course.classes };
+    } else {
+      return { lecture: undefined, classes: undefined };
+    }
+  };
+ 
+  const changeHoveredGroup = (group: Group | null) => setHoveredGroup(group);
+ 
+  const changeDataLoading = (isLoading: boolean) => setIsDataLoading(isLoading);
+ 
+  const addCourseToBasket = (course: Course) => {
+    const courseToBasket: Basket = {
+      name: course.name,
+      id: course.id,
+      classes: course.classes !== undefined ? course.classes[0] : undefined,
+      lecture: course.lectures !== undefined ? course.lectures[0] : undefined,
+    };
+    setBasket([...basket, courseToBasket]);
+  };
+ 
+  const deleteFromBasket = (id: number) => setBasket(basket.filter((course) => course.id !== id));
+ 
+  const changeStudent = async (studentId: string) => {
+    setUserID(studentId);
+    setTimeout(() => {
+      getNewestStudentTimetable(studentId);
+      getStudentTimetablesHistory(studentId);
+    }, 100);
+  };
+ 
+  const saveBasket = async (userID: string) => {
+    const basketIds = selectBasketIds();
+    const action = (key: any) => (
+      <>
+        <StyledCloseIcon
+          onClick={() => {
+            closeSnackbar(key);
+          }}
+        ></StyledCloseIcon>
+      </>
+    );
+ 
+    try {
+      await axiosInstance.post(
+        `${process.env.REACT_APP_API_URL}/api/v1/commisions/user/${userID}`,
+        JSON.stringify(basketIds),
+      );
+      enqueueSnackbar('Plan został zapisany', {
+        variant: 'success',
+        action,
+      });
+    } catch (e) {
+      console.log('error: ', e);
+      enqueueSnackbar('Zapisywanie planu nie powiodło się', {
+        variant: 'error',
+        action,
+      });
+    }
+    getStudentTimetablesHistory(userID);
+  };
+ 
+  const changeGroupInBasket = (choosenGroup: any, courseId: number) => {
+    const basketCourse = basket.filter((course) => course.id === courseId)[0];
+    if (choosenGroup.lecture && choosenGroup.classes)
+    {
+      const prev = choosenGroup.prev==="lecture"?choosenGroup.lecture : choosenGroup.classes
+      setBasket(
+        basket.map((basket) => (basket.id === basketCourse.id ? { ...basket, lecture: choosenGroup.lecture, classes:choosenGroup.classes } : basket)),
+      );
+      changeHoveredGroup(prev);
+    }    
+  };
+ 
+  const restoreGroupInBasket = (restoreGroup: Group, courseId: number) => {
+    const basketCourse = basket.filter((course) => course.id === courseId)[0];
+    const { type } = restoreGroup;
+    if (type === GroupType.CLASS) {
+      setBasket(
+        basket.map((basket) => (basket.id === basketCourse.id ? { ...basket, classes: restoreGroup } : basket)),
+      );
+    } else if (type === GroupType.LECTURE) {
+      setBasket(
+        basket.map((basket) => (basket.id === basketCourse.id ? { ...basket, lecture: restoreGroup } : basket)),
+      );
+    }
+  };
+ 
+  const getNewestTimetable = async () => {
+    try {
+      const { data } = await axiosInstance.get<Array<Basket> | ''>(
+        `${process.env.REACT_APP_API_URL}/api/v1/commisions/user/schedule`,
+      );
+      const basket = data === '' ? [] : data;
+      setBasket(basket);
+    } catch (e) {
+      console.log(e);
+    }
+  };
+ 
+  const getNewestStudentTimetable = async (studentId: string) => {
+    try {
+      const { data } = await axiosInstance.get(
+        `${process.env.REACT_APP_API_URL}/api/v1/commisions/user/${studentId}/schedule`,
+      );
+      const basket = data === '' ? [] : data;
+ 
+      setBasket(basket);
+    } catch (e) {
+      console.log(e);
+    }
+  };
+ 
+  const getStudentTimetablesHistory = async (studentId: string) => {
+    try {
+      const { data } = await axiosInstance.get<Array<TimetableHistory> | []>(
+        `${process.env.REACT_APP_API_URL}/api/v1/commisions/user/${studentId}?groups=true`,
+      );
+      setTimetableHistory(data);
+    } catch (e) {
+      console.log(e);
+    }
+  };
+ 
+  const fetchCourses = async () => {
+    try {
+      const { data: courses } = await axiosInstance.get<Array<Course>>(
+        `${process.env.REACT_APP_API_URL}/api/v1/courses/all?groups=true&takenPlaces=true`,
+      );
+      const sortedCourses = courses.sort((a, b) => (a.name > b.name ? 1 : -1));
+      setCourses(sortedCourses);
+    } catch (e) {
+      console.log(e);
+    }
+  };
+ 
+  const setHistoryBasketFromHistoryGroups = (groupsIds: Array<number>) => {
+    const basket: Array<Basket> = [];
+    for (const groupId of groupsIds) {
+      for (const course of courses) {
+        const { lectures, classes, name, id } = course;
+        let basketElement: Basket = { name: name, id: id };
+        if (lectures) {
+          for (const lecture of lectures) {
+            if (groupId === lecture.id) {
+              basketElement = { ...basketElement, lecture: lecture };
+            }
+          }
+        }
+        if (classes) {
+          for (const singleClass of classes) {
+            if (groupId === singleClass.id) {
+              basketElement = { ...basketElement, classes: singleClass };
+            }
+          }
+        }
+        if (basketElement.classes !== undefined || basketElement.lecture !== undefined) {
+          basket.push(basketElement);
+        }
+      }
+    }
+    setHistoryBasket(basket);
+  };
+ 
+  useEffect(() => {
+    setIsDataLoading(true);
+    setTimeout(() => {
+      fetchCourses();
+      getNewestTimetable();
+      setIsDataLoading(false);
+    }, 600);
+  }, []);
+ 
+  return (
+    <coursesContext.Provider
+      value={{
+        userID,
+        courses,
+        basket,
+        hoveredGroup,
+        timetableHistory,
+        isDataLoading,
+        historyBasket,
+        addCourseToBasket,
+        changeHoveredGroup,
+        changeGroupInBasket,
+        deleteFromBasket,
+        restoreGroupInBasket,
+        saveBasket,
+        selectSchedulerEvents,
+        selectHistorySchedulerEvents,
+        selectBasketNames,
+        selectBasketCourses,
+        selectBasketCourseGroups,
+        getNewestStudentTimetable,
+        changeStudent,
+        getStudentTimetablesHistory,
+        setHistoryBasketFromHistoryGroups,
+        changeDataLoading,
+      }}
+    >
+      {children}
+    </coursesContext.Provider>
+  );
+};
+ 
+ +
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/lcov-report/src/contexts/StudentsProvider.tsx.html b/coverage/lcov-report/src/contexts/StudentsProvider.tsx.html new file mode 100644 index 0000000..a8e79e4 --- /dev/null +++ b/coverage/lcov-report/src/contexts/StudentsProvider.tsx.html @@ -0,0 +1,241 @@ + + + + + + Code coverage report for src/contexts/StudentsProvider.tsx + + + + + + + + +
+
+

All files / src/contexts StudentsProvider.tsx

+
+ +
+ 52.94% + Statements + 9/17 +
+ + +
+ 0% + Branches + 0/2 +
+ + +
+ 33.33% + Functions + 2/6 +
+ + +
+ 56.25% + Lines + 9/16 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55  +  +  +  +  +  +  +  +  +  +5x +  +  +  +  +  +5x +10x +10x +  +10x +  +  +  +  +  +  +  +  +  +  +10x +  +  +  +10x +10x +  +  +  +  +  +10x +  +  +  +  +  +  +  +  +  +  +  + 
import React, { useState, createContext, useEffect, ReactNode, useRef, useContext } from 'react';
+import { Student } from '../types';
+import { axiosInstance } from '../utils/axiosInstance';
+ 
+interface StudentContext {
+  students: Array<Student>;
+  selectedStudent: Student | null;
+  changeSelectedStudent: (studentId: number) => void;
+}
+ 
+export const studentsContext = createContext<StudentContext | undefined>(undefined);
+ 
+interface StudentsProviderProps {
+  children: ReactNode;
+}
+ 
+export const StudentsProvider = ({ children }: StudentsProviderProps) => {
+  const [students, setStudents] = useState<Array<Student>>([]);
+  const [selectedStudent, setSelectedStudent] = useState<Student | null>(null);
+ 
+  const getStudents = async () => {
+    try {
+      const { data } = await axiosInstance.get<Array<Student>>(
+        `${process.env.REACT_APP_API_URL}/api/v1/users/students`,
+      );
+      setStudents(data);
+    } catch (e) {
+      console.log(e);
+    }
+  };
+ 
+  const changeSelectedStudent = (studentId: number) => {
+    setSelectedStudent(students.find((student) => student.id === studentId)!);
+  };
+ 
+  useEffect(() => {
+    setTimeout(() => {
+      const userPrivilige = localStorage.getItem('userPrivilige');
+      userPrivilige === 'DEANERY' && getStudents();
+    }, 500);
+  }, []);
+ 
+  return (
+    <studentsContext.Provider
+      value={{
+        selectedStudent,
+        students,
+        changeSelectedStudent,
+      }}
+    >
+      {children}
+    </studentsContext.Provider>
+  );
+};
+ 
+ +
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/lcov-report/src/contexts/index.html b/coverage/lcov-report/src/contexts/index.html new file mode 100644 index 0000000..a3ad478 --- /dev/null +++ b/coverage/lcov-report/src/contexts/index.html @@ -0,0 +1,140 @@ + + + + + + Code coverage report for src/contexts + + + + + + + + +
+
+

All files src/contexts

+
+ +
+ 34.52% + Statements + 68/197 +
+ + +
+ 3.23% + Branches + 2/62 +
+ + +
+ 20.37% + Functions + 11/54 +
+ + +
+ 37.02% + Lines + 67/181 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
CASProvider.tsx +
+
54.05%20/3720%2/1066.67%4/654.05%20/37
CoursesProvider.tsx +
+
27.27%39/1430%0/5011.9%5/4229.69%38/128
StudentsProvider.tsx +
+
52.94%9/170%0/233.33%2/656.25%9/16
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/lcov-report/src/customRender.jsx.html b/coverage/lcov-report/src/customRender.jsx.html new file mode 100644 index 0000000..134c72d --- /dev/null +++ b/coverage/lcov-report/src/customRender.jsx.html @@ -0,0 +1,175 @@ + + + + + + Code coverage report for src/customRender.jsx + + + + + + + + +
+
+

All files / src customRender.jsx

+
+ +
+ 100% + Statements + 5/5 +
+ + +
+ 100% + Branches + 6/6 +
+ + +
+ 100% + Functions + 2/2 +
+ + +
+ 100% + Lines + 5/5 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33  +  +  +  +  +  +  +5x +9x +  +  +  +  +  +  +  +  +  +  +5x +  +1x +  +1x +  +  +  +  +  +  +  +  + 
import React from 'react';
+import { render, screen } from '@testing-library/react';
+import { CASProvider } from './contexts/CASProvider';
+import { CoursesProvider } from './contexts/CoursesProvider';
+import { StudentsProvider } from './contexts/StudentsProvider';
+import { SnackbarProvider } from 'notistack';
+ 
+export const customRender = (ui, CASValue = {}, studentsValue = {}, coursesValue = {}) => {
+  return render(
+    <SnackbarProvider>
+      <CASProvider value={20}>
+        <StudentsProvider value={50}>
+          <CoursesProvider value={100}>{ui}</CoursesProvider>
+        </StudentsProvider>
+      </CASProvider>
+    </SnackbarProvider>,
+  );
+};
+ 
+export const customRenderCAS = (ui, CASValue = {}, studentsValue = {}, coursesValue = {}) => {
+ 
+  const user={authorityRole: "DEANERY", email: "test@test.pl", id: "123"}
+ 
+  return render(
+    <SnackbarProvider>
+      <CASProvider value={{user}}>
+        <StudentsProvider value={50}>
+          <CoursesProvider value={100}>{ui}</CoursesProvider>
+        </StudentsProvider>
+      </CASProvider>
+    </SnackbarProvider>,
+  );
+};
+ +
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/lcov-report/src/index.html b/coverage/lcov-report/src/index.html new file mode 100644 index 0000000..46da5df --- /dev/null +++ b/coverage/lcov-report/src/index.html @@ -0,0 +1,125 @@ + + + + + + Code coverage report for src + + + + + + + + +
+
+

All files src

+
+ +
+ 83.33% + Statements + 5/6 +
+ + +
+ 100% + Branches + 6/6 +
+ + +
+ 100% + Functions + 2/2 +
+ + +
+ 83.33% + Lines + 5/6 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
customRender.jsx +
+
100%5/5100%6/6100%2/2100%5/5
index.tsx +
+
0%0/1100%0/0100%0/00%0/1
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/lcov-report/src/index.tsx.html b/coverage/lcov-report/src/index.tsx.html new file mode 100644 index 0000000..05cd22e --- /dev/null +++ b/coverage/lcov-report/src/index.tsx.html @@ -0,0 +1,169 @@ + + + + + + Code coverage report for src/index.tsx + + + + + + + + +
+
+

All files / src index.tsx

+
+ +
+ 0% + Statements + 0/1 +
+ + +
+ 100% + Branches + 0/0 +
+ + +
+ 100% + Functions + 0/0 +
+ + +
+ 0% + Lines + 0/1 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
import React from 'react';
+import ReactDOM from 'react-dom';
+import { App } from './components/App';
+import { CASProvider } from './contexts/CASProvider';
+import { CoursesProvider } from './contexts/CoursesProvider';
+import { StudentsProvider } from './contexts/StudentsProvider';
+import { GlobalStyles } from './styles/GlobalStyles';
+import { SnackbarProvider } from 'notistack';
+ 
+ReactDOM.render(
+  <>
+    <SnackbarProvider
+      maxSnack={3}
+      anchorOrigin={{
+        vertical: 'bottom',
+        horizontal: 'center',
+      }}
+    >
+      <CASProvider>
+        <StudentsProvider>
+          <CoursesProvider>
+            <GlobalStyles />
+            <App />
+          </CoursesProvider>
+        </StudentsProvider>
+      </CASProvider>
+    </SnackbarProvider>
+  </>,
+  document.getElementById('root'),
+);
+ 
+ +
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/lcov-report/src/styles/GlobalStyles.ts.html b/coverage/lcov-report/src/styles/GlobalStyles.ts.html new file mode 100644 index 0000000..13819e0 --- /dev/null +++ b/coverage/lcov-report/src/styles/GlobalStyles.ts.html @@ -0,0 +1,139 @@ + + + + + + Code coverage report for src/styles/GlobalStyles.ts + + + + + + + + +
+
+

All files / src/styles GlobalStyles.ts

+
+ +
+ 0% + Statements + 0/1 +
+ + +
+ 100% + Branches + 0/0 +
+ + +
+ 100% + Functions + 0/0 +
+ + +
+ 0% + Lines + 0/1 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
import { createGlobalStyle } from 'styled-components';
+ 
+export const GlobalStyles = createGlobalStyle`
+  *, *::before, *::after {
+    box-sizing: border-box;
+    -webkit-font-smoothing: antialiased;
+    -moz-osx-font-smoothing: grayscale;
+  }
+ 
+  body {
+    margin: 0;
+    padding: 0;
+    line-height: 24px;
+    font-family: 'Roboto', sans-serif;
+  }
+ 
+  body::-webkit-scrollbar {
+    display: none;
+  }
+`;
+ 
+ +
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/lcov-report/src/styles/index.html b/coverage/lcov-report/src/styles/index.html new file mode 100644 index 0000000..93ea5e6 --- /dev/null +++ b/coverage/lcov-report/src/styles/index.html @@ -0,0 +1,110 @@ + + + + + + Code coverage report for src/styles + + + + + + + + +
+
+

All files src/styles

+
+ +
+ 0% + Statements + 0/1 +
+ + +
+ 100% + Branches + 0/0 +
+ + +
+ 100% + Functions + 0/0 +
+ + +
+ 0% + Lines + 0/1 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
GlobalStyles.ts +
+
0%0/1100%0/0100%0/00%0/1
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/lcov-report/src/types/index.html b/coverage/lcov-report/src/types/index.html new file mode 100644 index 0000000..8f228ba --- /dev/null +++ b/coverage/lcov-report/src/types/index.html @@ -0,0 +1,110 @@ + + + + + + Code coverage report for src/types + + + + + + + + +
+
+

All files src/types

+
+ +
+ 0% + Statements + 0/0 +
+ + +
+ 0% + Branches + 0/0 +
+ + +
+ 0% + Functions + 0/0 +
+ + +
+ 0% + Lines + 0/0 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
index.ts +
+
0%0/00%0/00%0/00%0/0
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/lcov-report/src/types/index.ts.html b/coverage/lcov-report/src/types/index.ts.html new file mode 100644 index 0000000..7d2af7e --- /dev/null +++ b/coverage/lcov-report/src/types/index.ts.html @@ -0,0 +1,298 @@ + + + + + + Code coverage report for src/types/index.ts + + + + + + + + +
+
+

All files / src/types index.ts

+
+ +
+ 0% + Statements + 0/0 +
+ + +
+ 0% + Branches + 0/0 +
+ + +
+ 0% + Functions + 0/0 +
+ + +
+ 0% + Lines + 0/0 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
export enum GroupType {
+  LECTURE = 'LECTURE',
+  CLASS = 'CLASS',
+}
+ 
+export interface Basket {
+  id: number;
+  name: string;
+  lecture?: Group;
+  classes?: Group;
+}
+ 
+export interface Group {
+  id: number;
+  day: number;
+  time: string;
+  endTime: string;
+  lecturer: string;
+  room: string;
+  type: GroupType;
+  capacity?: number;
+  takenPlaces: number;
+}
+ 
+export interface Course {
+  id: number;
+  name: string;
+  lectures?: Array<Group>;
+  classes?: Array<Group>;
+}
+ 
+export interface LoggedUser {
+  authorityRole: string;
+  email: string;
+  id: number;
+}
+ 
+export interface Student {
+  email: string;
+  id: number;
+  name: string;
+  surname: string;
+}
+ 
+export interface SchedulerEvent {
+  id: number;
+  day: number;
+  time: string;
+  endTime: string;
+  lecturer: string;
+  room: string;
+  type: GroupType;
+  capacity?: number;
+  takenPlaces: number;
+  name: string;
+}
+ 
+export interface TimetableHistory {
+  commisionDate: Date;
+  commiter: {
+    id: number;
+    name: string;
+    surname: string;
+    email: string;
+  };
+  groups: Array<number>;
+  owner: {
+    id: number;
+    name: string;
+    surname: string;
+    email: string;
+  };
+}
+ 
+ +
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/lcov-report/src/utils/axiosInstance.ts.html b/coverage/lcov-report/src/utils/axiosInstance.ts.html new file mode 100644 index 0000000..4ed33ac --- /dev/null +++ b/coverage/lcov-report/src/utils/axiosInstance.ts.html @@ -0,0 +1,223 @@ + + + + + + Code coverage report for src/utils/axiosInstance.ts + + + + + + + + +
+
+

All files / src/utils axiosInstance.ts

+
+ +
+ 33.33% + Statements + 8/24 +
+ + +
+ 16.67% + Branches + 1/6 +
+ + +
+ 20% + Functions + 1/5 +
+ + +
+ 33.33% + Lines + 8/24 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49  +  +5x +  +  +5x +  +  +  +  +  +  +  +  +  +  +  +  +  +5x +  +10x +  +10x +10x +10x +  +  +  +  +  +  +  +5x +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
import axios from 'axios';
+ 
+export const axiosInstance = axios.create();
+ 
+//getting new tokens
+const getNewTokens = async () => {
+  try {
+    const refreshToken = localStorage.getItem('refreshToken');
+    const { data } = await axiosInstance.get(
+      `${process.env.REACT_APP_API_URL}/token/refresh?refreshToken=${refreshToken}`,
+    );
+    localStorage.setItem('userToken', data.token);
+    localStorage.setItem('refreshToken', data.refreshToken);
+    return data.token;
+  } catch (e) {
+    console.log(e);
+  }
+};
+ 
+axiosInstance.interceptors.request.use(
+  (request) => {
+    const token = localStorage.getItem('userToken');
+ 
+    request.headers['Content-Type'] = 'application/json';
+    request.headers['Authorization'] = token ? `Bearer ${token}` : '';
+    return request;
+  },
+  (error) => {
+    Promise.reject(error);
+  },
+);
+ 
+// Response interceptor for API calls
+axiosInstance.interceptors.response.use(
+  (response) => {
+    return response;
+  },
+  async (error) => {
+    const originalRequest = error.config;
+    if (error.response.status === 403 && !originalRequest._retry) {
+      originalRequest._retry = true;
+      const access_token = await getNewTokens();
+      axios.defaults.headers.common['Authorization'] = `Bearer ${access_token}`;
+      return axiosInstance(originalRequest);
+    }
+    return Promise.reject(error);
+  },
+);
+ 
+ +
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/lcov-report/src/utils/index.html b/coverage/lcov-report/src/utils/index.html new file mode 100644 index 0000000..d630c96 --- /dev/null +++ b/coverage/lcov-report/src/utils/index.html @@ -0,0 +1,125 @@ + + + + + + Code coverage report for src/utils + + + + + + + + +
+
+

All files src/utils

+
+ +
+ 45.76% + Statements + 27/59 +
+ + +
+ 26.32% + Branches + 5/19 +
+ + +
+ 30.77% + Functions + 4/13 +
+ + +
+ 46.55% + Lines + 27/58 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
axiosInstance.ts +
+
33.33%8/2416.67%1/620%1/533.33%8/24
index.ts +
+
54.29%19/3530.77%4/1337.5%3/855.88%19/34
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/lcov-report/src/utils/index.ts.html b/coverage/lcov-report/src/utils/index.ts.html new file mode 100644 index 0000000..08b6669 --- /dev/null +++ b/coverage/lcov-report/src/utils/index.ts.html @@ -0,0 +1,304 @@ + + + + + + Code coverage report for src/utils/index.ts + + + + + + + + +
+
+

All files / src/utils index.ts

+
+ +
+ 54.29% + Statements + 19/35 +
+ + +
+ 30.77% + Branches + 4/13 +
+ + +
+ 37.5% + Functions + 3/8 +
+ + +
+ 55.88% + Lines + 19/34 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76  +  +  +  +  +2x +  +  +  +  +  +  +  +  +  +  +  +  +2x +  +  +  +  +  +4x +  +  +  +  +  +  +  +4x +1x +1x +1x +  +1x +1x +  +  +1x +  +  +  +  +1x +  +  +4x +  +  +  +  +  +  +4x +  +  +  +  +  +  +  +  +  +4x +4x +4x +4x +4x +  +  +4x +  + 
import { courseStartTimeToEventRow } from '../constants/index';
+import { SchedulerEvent } from '../types';
+ 
+ 
+ 
+export const selectGroupsToShow = (schedulerEvents: Array<SchedulerEvent>, index: number) => {
+  return schedulerEvents.filter((schedulerEvent) => courseStartTimeToEventRow[schedulerEvent.time] === index);
+};
+ 
+//debounce declaration and implementation
+type Procedure = (...args: any[]) => any;
+ 
+interface Debounce {
+  (...args: any[]): any;
+  clear: () => void;
+  flush: () => void;
+}
+ 
+export const debounce = (func: Procedure, wait: number, immediate: boolean = false) => {
+  let timeout: number | null;
+  let args: any;
+  let context: any;
+  let result: any;
+ 
+  const later = () => {
+    timeout = null;
+    if (!immediate) {
+      result = func.apply(context, args);
+      context = args = null;
+    }
+  };
+ 
+  const debouncedFunc: Procedure = function (this: any) {
+    context = this;
+    args = arguments;
+    const callNow = immediate && !timeout;
+ 
+    Eif (!timeout) {
+      timeout = window.setTimeout(later, wait);
+    }
+ 
+    Iif (callNow) {
+      result = func.apply(context, args);
+      context = args = null;
+    }
+ 
+    return result;
+  };
+ 
+  const clear = () => {
+    if (timeout) {
+      clearTimeout(timeout);
+      timeout = null;
+    }
+  };
+ 
+  const flush = () => {
+    if (timeout) {
+      result = func.apply(context, args);
+      context = args = null;
+ 
+      clearTimeout(timeout);
+      timeout = null;
+    }
+  };
+ 
+  const debounced: Debounce = (() => {
+    const f: any = debouncedFunc;
+    f.clear = clear;
+    f.flush = flush;
+    return f;
+  })();
+ 
+  return debounced;
+};
+ 
+ +
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/lcov.info b/coverage/lcov.info new file mode 100644 index 0000000..99a8e22 --- /dev/null +++ b/coverage/lcov.info @@ -0,0 +1,1429 @@ +TN: +SF:C:\Users\Hubert\Desktop\ELO\frontend\src\customRender.jsx +FN:8,(anonymous_0) +FN:20,(anonymous_1) +FNF:2 +FNH:2 +FNDA:9,(anonymous_0) +FNDA:1,(anonymous_1) +DA:8,5 +DA:9,9 +DA:20,5 +DA:22,1 +DA:24,1 +LF:5 +LH:5 +BRDA:8,0,0,9 +BRDA:8,1,0,9 +BRDA:8,2,0,9 +BRDA:20,3,0,1 +BRDA:20,4,0,1 +BRDA:20,5,0,1 +BRF:6 +BRH:6 +end_of_record +TN: +SF:C:\Users\Hubert\Desktop\ELO\frontend\src\index.tsx +FNF:0 +FNH:0 +DA:10,0 +LF:1 +LH:0 +BRF:0 +BRH:0 +end_of_record +TN: +SF:C:\Users\Hubert\Desktop\ELO\frontend\src\components\Administrator.tsx +FN:83,(anonymous_0) +FN:102,(anonymous_1) +FN:103,(anonymous_2) +FN:106,(anonymous_3) +FN:166,(anonymous_4) +FN:170,(anonymous_5) +FN:176,(anonymous_6) +FN:182,(anonymous_7) +FN:188,(anonymous_8) +FNF:9 +FNH:0 +FNDA:0,(anonymous_0) +FNDA:0,(anonymous_1) +FNDA:0,(anonymous_2) +FNDA:0,(anonymous_3) +FNDA:0,(anonymous_4) +FNDA:0,(anonymous_5) +FNDA:0,(anonymous_6) +FNDA:0,(anonymous_7) +FNDA:0,(anonymous_8) +DA:9,1 +DA:17,1 +DA:34,1 +DA:41,1 +DA:49,1 +DA:57,1 +DA:63,1 +DA:68,1 +DA:83,1 +DA:84,0 +DA:85,0 +DA:87,0 +DA:88,0 +DA:89,0 +DA:90,0 +DA:92,0 +DA:94,0 +DA:95,0 +DA:96,0 +DA:97,0 +DA:98,0 +DA:99,0 +DA:102,0 +DA:103,0 +DA:104,0 +DA:107,0 +DA:112,0 +DA:113,0 +DA:114,0 +DA:115,0 +DA:116,0 +DA:118,0 +DA:119,0 +DA:121,0 +DA:122,0 +DA:124,0 +DA:125,0 +DA:128,0 +DA:134,0 +DA:135,0 +DA:136,0 +DA:141,0 +DA:146,0 +DA:150,0 +DA:152,0 +DA:155,0 +DA:166,0 +DA:170,0 +DA:176,0 +DA:182,0 +DA:189,0 +DA:190,0 +DA:191,0 +LF:53 +LH:9 +BRDA:115,0,0,0 +BRDA:115,0,1,0 +BRDA:118,1,0,0 +BRDA:118,1,1,0 +BRDA:121,2,0,0 +BRDA:121,2,1,0 +BRDA:124,3,0,0 +BRDA:124,3,1,0 +BRDA:189,4,0,0 +BRDA:189,4,1,0 +BRDA:189,5,0,0 +BRDA:189,5,1,0 +BRDA:197,6,0,0 +BRDA:197,6,1,0 +BRF:14 +BRH:0 +end_of_record +TN: +SF:C:\Users\Hubert\Desktop\ELO\frontend\src\components\App.tsx +FN:22,(anonymous_0) +FN:29,(anonymous_1) +FNF:2 +FNH:1 +FNDA:2,(anonymous_0) +FNDA:0,(anonymous_1) +DA:13,1 +DA:22,1 +DA:23,2 +DA:24,2 +DA:26,2 +DA:27,2 +DA:29,2 +DA:30,0 +DA:33,2 +DA:34,2 +LF:10 +LH:9 +BRDA:37,0,0,2 +BRDA:37,0,1,2 +BRDA:42,1,0,2 +BRDA:42,1,1,0 +BRDA:48,2,0,2 +BRDA:48,2,1,0 +BRDA:52,3,0,2 +BRDA:52,3,1,0 +BRF:8 +BRH:5 +end_of_record +TN: +SF:C:\Users\Hubert\Desktop\ELO\frontend\src\components\CourseCard.tsx +FN:63,(anonymous_0) +FN:72,(anonymous_1) +FN:89,(anonymous_2) +FN:100,(anonymous_3) +FN:121,(anonymous_4) +FN:150,(anonymous_5) +FN:161,(anonymous_6) +FN:164,(anonymous_7) +FN:165,(anonymous_8) +FN:171,(anonymous_9) +FN:173,(anonymous_10) +FN:179,(anonymous_11) +FN:180,(anonymous_12) +FN:183,(anonymous_13) +FN:187,(anonymous_14) +FN:188,(anonymous_15) +FN:196,(anonymous_16) +FNF:17 +FNH:1 +FNDA:0,(anonymous_0) +FNDA:0,(anonymous_1) +FNDA:10,(anonymous_2) +FNDA:0,(anonymous_3) +FNDA:0,(anonymous_4) +FNDA:0,(anonymous_5) +FNDA:0,(anonymous_6) +FNDA:0,(anonymous_7) +FNDA:0,(anonymous_8) +FNDA:0,(anonymous_9) +FNDA:0,(anonymous_10) +FNDA:0,(anonymous_11) +FNDA:0,(anonymous_12) +FNDA:0,(anonymous_13) +FNDA:0,(anonymous_14) +FNDA:0,(anonymous_15) +FNDA:0,(anonymous_16) +DA:12,5 +DA:27,5 +DA:36,5 +DA:45,5 +DA:56,5 +DA:64,0 +DA:73,0 +DA:83,5 +DA:89,10 +DA:96,5 +DA:100,0 +DA:108,5 +DA:117,5 +DA:122,0 +DA:128,5 +DA:150,5 +DA:151,0 +DA:158,0 +DA:159,0 +DA:160,0 +DA:161,0 +DA:162,0 +DA:164,0 +DA:165,0 +DA:166,0 +DA:169,0 +DA:171,0 +DA:174,0 +DA:175,0 +DA:176,0 +DA:179,0 +DA:180,0 +DA:184,0 +DA:187,0 +DA:189,0 +DA:190,0 +DA:192,0 +DA:193,0 +DA:197,0 +DA:198,0 +DA:200,0 +LF:41 +LH:12 +BRDA:64,0,0,0 +BRDA:64,0,1,0 +BRDA:73,1,0,0 +BRDA:73,1,1,0 +BRDA:89,2,0,0 +BRDA:89,2,1,10 +BRDA:100,3,0,0 +BRDA:100,3,1,0 +BRDA:122,4,0,0 +BRDA:122,4,1,0 +BRDA:165,5,0,0 +BRDA:165,5,1,0 +BRDA:185,6,0,0 +BRDA:185,6,1,0 +BRDA:185,7,0,0 +BRDA:185,7,1,0 +BRDA:189,8,0,0 +BRDA:189,8,1,0 +BRDA:192,9,0,0 +BRDA:192,9,1,0 +BRDA:197,10,0,0 +BRDA:197,10,1,0 +BRDA:203,11,0,0 +BRDA:203,11,1,0 +BRDA:205,12,0,0 +BRDA:205,12,1,0 +BRF:26 +BRH:1 +end_of_record +TN: +SF:C:\Users\Hubert\Desktop\ELO\frontend\src\components\DeaneryPanel.tsx +FN:50,(anonymous_0) +FN:105,(anonymous_1) +FN:111,(anonymous_2) +FNF:3 +FNH:0 +FNDA:0,(anonymous_0) +FNDA:0,(anonymous_1) +FNDA:0,(anonymous_2) +DA:13,1 +DA:23,1 +DA:30,1 +DA:41,1 +DA:50,0 +DA:60,1 +DA:68,1 +DA:76,1 +DA:85,1 +DA:91,1 +DA:96,1 +DA:105,1 +DA:106,0 +DA:107,0 +DA:108,0 +DA:109,0 +DA:111,0 +DA:112,0 +DA:113,0 +DA:116,0 +LF:20 +LH:11 +BRDA:50,0,0,0 +BRDA:50,0,1,0 +BRDA:133,1,0,0 +BRDA:133,1,1,0 +BRDA:138,2,0,0 +BRDA:138,2,1,0 +BRDA:140,3,0,0 +BRDA:140,3,1,0 +BRF:8 +BRH:0 +end_of_record +TN: +SF:C:\Users\Hubert\Desktop\ELO\frontend\src\components\Dropdown.tsx +FN:52,(anonymous_0) +FN:55,(anonymous_1) +FN:59,(anonymous_2) +FN:62,(anonymous_3) +FN:68,(anonymous_4) +FN:77,(anonymous_5) +FN:78,(anonymous_6) +FN:80,(anonymous_7) +FN:97,(anonymous_8) +FN:98,(anonymous_9) +FN:99,(anonymous_10) +FN:122,(anonymous_11) +FN:130,(anonymous_12) +FNF:13 +FNH:6 +FNDA:12,(anonymous_0) +FNDA:8,(anonymous_1) +FNDA:0,(anonymous_2) +FNDA:0,(anonymous_3) +FNDA:0,(anonymous_4) +FNDA:8,(anonymous_5) +FNDA:8,(anonymous_6) +FNDA:0,(anonymous_7) +FNDA:4,(anonymous_8) +FNDA:4,(anonymous_9) +FNDA:0,(anonymous_10) +FNDA:0,(anonymous_11) +FNDA:0,(anonymous_12) +DA:7,4 +DA:32,4 +DA:52,4 +DA:53,12 +DA:54,12 +DA:55,12 +DA:56,12 +DA:57,12 +DA:59,12 +DA:60,0 +DA:61,0 +DA:62,0 +DA:63,0 +DA:64,0 +DA:68,12 +DA:69,0 +DA:71,0 +DA:72,0 +DA:74,0 +DA:77,12 +DA:78,8 +DA:79,8 +DA:81,0 +DA:92,8 +DA:94,8 +DA:97,12 +DA:98,4 +DA:99,4 +DA:100,0 +DA:111,4 +DA:113,4 +DA:116,12 +DA:123,0 +DA:131,0 +LF:34 +LH:21 +BRDA:61,0,0,0 +BRDA:61,0,1,0 +BRDA:61,1,0,0 +BRDA:61,1,1,0 +BRDA:81,2,0,0 +BRDA:81,2,1,0 +BRDA:118,3,0,12 +BRDA:118,3,1,0 +BRDA:120,4,0,0 +BRDA:120,4,1,0 +BRF:10 +BRH:1 +end_of_record +TN: +SF:C:\Users\Hubert\Desktop\ELO\frontend\src\components\Profile.tsx +FN:10,(anonymous_0) +FNF:1 +FNH:1 +FNDA:8,(anonymous_0) +DA:10,4 +DA:11,8 +DA:13,8 +LF:3 +LH:3 +BRF:0 +BRH:0 +end_of_record +TN: +SF:C:\Users\Hubert\Desktop\ELO\frontend\src\components\Rightbar.tsx +FN:50,(anonymous_0) +FN:54,(anonymous_1) +FN:58,(anonymous_2) +FNF:3 +FNH:1 +FNDA:4,(anonymous_0) +FNDA:0,(anonymous_1) +FNDA:0,(anonymous_2) +DA:7,2 +DA:28,2 +DA:50,2 +DA:51,4 +DA:53,4 +DA:54,4 +DA:55,4 +DA:59,0 +LF:8 +LH:7 +BRF:0 +BRH:0 +end_of_record +TN: +SF:C:\Users\Hubert\Desktop\ELO\frontend\src\components\Scheduler.tsx +FN:47,(anonymous_0) +FN:48,(anonymous_1) +FN:52,(anonymous_2) +FN:53,(anonymous_3) +FN:54,(anonymous_4) +FN:55,(anonymous_5) +FN:69,(anonymous_6) +FN:74,(anonymous_7) +FN:75,(anonymous_8) +FN:83,(anonymous_9) +FN:89,(anonymous_10) +FN:102,(anonymous_11) +FN:104,(anonymous_12) +FNF:13 +FNH:0 +FNDA:0,(anonymous_0) +FNDA:0,(anonymous_1) +FNDA:0,(anonymous_2) +FNDA:0,(anonymous_3) +FNDA:0,(anonymous_4) +FNDA:0,(anonymous_5) +FNDA:0,(anonymous_6) +FNDA:0,(anonymous_7) +FNDA:0,(anonymous_8) +FNDA:0,(anonymous_9) +FNDA:0,(anonymous_10) +FNDA:0,(anonymous_11) +FNDA:0,(anonymous_12) +DA:8,1 +DA:22,1 +DA:30,1 +DA:35,1 +DA:46,1 +DA:47,0 +DA:48,0 +DA:52,0 +DA:53,0 +DA:54,0 +DA:55,0 +DA:69,1 +DA:70,0 +DA:71,0 +DA:72,0 +DA:74,0 +DA:75,0 +DA:76,0 +DA:77,0 +DA:78,0 +DA:81,0 +DA:82,0 +DA:83,0 +DA:86,0 +DA:90,0 +DA:103,0 +DA:105,0 +LF:27 +LH:6 +BRDA:47,0,0,0 +BRDA:47,0,1,0 +BRDA:48,1,0,0 +BRDA:48,1,1,0 +BRDA:52,2,0,0 +BRDA:52,2,1,0 +BRDA:53,3,0,0 +BRDA:53,3,1,0 +BRDA:54,4,0,0 +BRDA:54,4,1,0 +BRDA:55,5,0,0 +BRDA:55,5,1,0 +BRDA:76,6,0,0 +BRDA:76,6,1,0 +BRDA:90,7,0,0 +BRDA:90,7,1,0 +BRDA:105,8,0,0 +BRDA:105,8,1,0 +BRDA:109,9,0,0 +BRDA:109,9,1,0 +BRDA:109,10,0,0 +BRDA:109,10,1,0 +BRDA:113,11,0,0 +BRDA:113,11,1,0 +BRDA:117,12,0,0 +BRDA:117,12,1,0 +BRDA:121,13,0,0 +BRDA:121,13,1,0 +BRF:28 +BRH:0 +end_of_record +TN: +SF:C:\Users\Hubert\Desktop\ELO\frontend\src\components\SchedulerEvents.tsx +FN:14,(anonymous_0) +FN:18,(anonymous_1) +FNF:2 +FNH:0 +FNDA:0,(anonymous_0) +FNDA:0,(anonymous_1) +DA:14,1 +DA:16,0 +DA:19,0 +LF:3 +LH:1 +BRDA:24,0,0,0 +BRDA:24,0,1,0 +BRDA:26,1,0,0 +BRDA:26,1,1,0 +BRDA:28,2,0,0 +BRDA:28,2,1,0 +BRDA:30,3,0,0 +BRDA:30,3,1,0 +BRDA:32,4,0,0 +BRDA:32,4,1,0 +BRDA:34,5,0,0 +BRDA:34,5,1,0 +BRF:12 +BRH:0 +end_of_record +TN: +SF:C:\Users\Hubert\Desktop\ELO\frontend\src\components\SchedulerHistory.tsx +FN:18,(anonymous_0) +FN:23,(anonymous_1) +FN:25,(anonymous_2) +FN:29,(anonymous_3) +FN:31,(anonymous_4) +FN:35,(anonymous_5) +FNF:6 +FNH:0 +FNDA:0,(anonymous_0) +FNDA:0,(anonymous_1) +FNDA:0,(anonymous_2) +FNDA:0,(anonymous_3) +FNDA:0,(anonymous_4) +FNDA:0,(anonymous_5) +DA:8,1 +DA:18,1 +DA:19,0 +DA:20,0 +DA:21,0 +DA:23,0 +DA:24,0 +DA:25,0 +DA:29,0 +DA:30,0 +DA:31,0 +DA:35,0 +DA:36,0 +DA:37,0 +DA:38,0 +DA:39,0 +DA:42,0 +DA:46,0 +LF:18 +LH:2 +BRDA:20,0,0,0 +BRDA:20,0,1,0 +BRDA:24,1,0,0 +BRDA:24,1,1,0 +BRDA:30,2,0,0 +BRDA:30,2,1,0 +BRDA:37,3,0,0 +BRDA:37,3,1,0 +BRDA:48,4,0,0 +BRDA:48,4,1,0 +BRF:10 +BRH:0 +end_of_record +TN: +SF:C:\Users\Hubert\Desktop\ELO\frontend\src\components\SchedulerHistoryNavigation.tsx +FN:62,(anonymous_0) +FN:72,(anonymous_1) +FN:81,(anonymous_2) +FNF:3 +FNH:0 +FNDA:0,(anonymous_0) +FNDA:0,(anonymous_1) +FNDA:0,(anonymous_2) +DA:11,1 +DA:18,1 +DA:38,1 +DA:43,1 +DA:62,1 +DA:68,0 +DA:73,0 +DA:82,0 +LF:8 +LH:5 +BRF:0 +BRH:0 +end_of_record +TN: +SF:C:\Users\Hubert\Desktop\ELO\frontend\src\components\SchedulerRow.tsx +FN:9,(anonymous_0) +FN:37,(anonymous_1) +FN:38,(anonymous_2) +FN:39,(anonymous_3) +FN:40,(anonymous_4) +FN:61,(anonymous_5) +FN:62,(anonymous_6) +FN:66,(anonymous_7) +FN:73,(anonymous_8) +FN:83,(anonymous_9) +FN:98,(anonymous_10) +FN:128,(anonymous_11) +FN:136,(anonymous_12) +FN:143,(anonymous_13) +FN:148,(anonymous_14) +FN:152,(anonymous_15) +FN:159,(anonymous_16) +FN:169,(anonymous_17) +FN:182,(anonymous_18) +FN:221,(anonymous_19) +FNF:20 +FNH:0 +FNDA:0,(anonymous_0) +FNDA:0,(anonymous_1) +FNDA:0,(anonymous_2) +FNDA:0,(anonymous_3) +FNDA:0,(anonymous_4) +FNDA:0,(anonymous_5) +FNDA:0,(anonymous_6) +FNDA:0,(anonymous_7) +FNDA:0,(anonymous_8) +FNDA:0,(anonymous_9) +FNDA:0,(anonymous_10) +FNDA:0,(anonymous_11) +FNDA:0,(anonymous_12) +FNDA:0,(anonymous_13) +FNDA:0,(anonymous_14) +FNDA:0,(anonymous_15) +FNDA:0,(anonymous_16) +FNDA:0,(anonymous_17) +FNDA:0,(anonymous_18) +FNDA:0,(anonymous_19) +DA:9,1 +DA:10,0 +DA:22,1 +DA:34,1 +DA:37,0 +DA:38,0 +DA:39,0 +DA:40,0 +DA:52,1 +DA:61,0 +DA:62,0 +DA:67,0 +DA:68,0 +DA:70,0 +DA:74,0 +DA:83,1 +DA:84,0 +DA:95,1 +DA:98,0 +DA:101,1 +DA:112,1 +DA:128,1 +DA:129,0 +DA:130,0 +DA:131,0 +DA:133,0 +DA:136,1 +DA:137,0 +DA:138,0 +DA:139,0 +DA:140,0 +DA:141,0 +DA:143,0 +DA:144,0 +DA:145,0 +DA:148,0 +DA:149,0 +DA:150,0 +DA:152,0 +DA:154,0 +DA:155,0 +DA:157,0 +DA:160,0 +DA:170,0 +DA:182,0 +LF:45 +LH:10 +BRDA:67,0,0,0 +BRDA:67,0,1,0 +BRDA:68,1,0,0 +BRDA:68,1,1,0 +BRDA:70,2,0,0 +BRDA:70,2,1,0 +BRDA:74,3,0,0 +BRDA:74,3,1,0 +BRDA:98,4,0,0 +BRDA:98,4,1,0 +BRDA:155,5,0,0 +BRDA:155,5,1,0 +BRDA:170,6,0,0 +BRDA:170,6,1,0 +BRDA:180,7,0,0 +BRDA:180,7,1,0 +BRDA:186,8,0,0 +BRDA:186,8,1,0 +BRF:18 +BRH:0 +end_of_record +TN: +SF:C:\Users\Hubert\Desktop\ELO\frontend\src\components\SelectMenu.tsx +FN:75,(anonymous_0) +FN:80,(anonymous_1) +FN:84,(anonymous_2) +FN:86,(anonymous_3) +FN:97,(anonymous_4) +FN:105,(anonymous_5) +FNF:6 +FNH:1 +FNDA:10,(anonymous_0) +FNDA:0,(anonymous_1) +FNDA:0,(anonymous_2) +FNDA:0,(anonymous_3) +FNDA:0,(anonymous_4) +FNDA:0,(anonymous_5) +DA:6,5 +DA:28,5 +DA:34,5 +DA:39,5 +DA:48,5 +DA:64,5 +DA:75,5 +DA:76,10 +DA:78,10 +DA:81,0 +DA:84,0 +DA:87,0 +DA:88,0 +DA:98,0 +DA:99,0 +DA:106,0 +DA:107,0 +LF:17 +LH:9 +BRDA:94,0,0,10 +BRDA:94,0,1,0 +BRF:2 +BRH:1 +end_of_record +TN: +SF:C:\Users\Hubert\Desktop\ELO\frontend\src\components\Statistics.tsx +FN:56,(anonymous_0) +FNF:1 +FNH:1 +FNDA:2,(anonymous_0) +DA:12,2 +DA:20,2 +DA:27,2 +DA:43,2 +DA:49,2 +DA:56,2 +DA:57,2 +LF:7 +LH:7 +BRF:0 +BRH:0 +end_of_record +TN: +SF:C:\Users\Hubert\Desktop\ELO\frontend\src\components\Topbar.tsx +FN:68,(anonymous_0) +FN:139,(anonymous_1) +FN:149,(anonymous_2) +FN:153,(anonymous_3) +FN:155,(anonymous_4) +FN:157,(anonymous_5) +FN:159,(anonymous_6) +FN:161,(anonymous_7) +FN:161,(anonymous_8) +FN:163,(anonymous_9) +FN:165,(anonymous_10) +FN:167,(anonymous_11) +FN:169,(anonymous_12) +FN:197,(anonymous_13) +FNF:14 +FNH:4 +FNDA:8,(anonymous_0) +FNDA:8,(anonymous_1) +FNDA:4,(anonymous_2) +FNDA:0,(anonymous_3) +FNDA:0,(anonymous_4) +FNDA:0,(anonymous_5) +FNDA:0,(anonymous_6) +FNDA:0,(anonymous_7) +FNDA:0,(anonymous_8) +FNDA:0,(anonymous_9) +FNDA:0,(anonymous_10) +FNDA:0,(anonymous_11) +FNDA:4,(anonymous_12) +FNDA:0,(anonymous_13) +DA:13,4 +DA:23,4 +DA:31,4 +DA:39,4 +DA:52,4 +DA:62,4 +DA:68,8 +DA:78,4 +DA:92,4 +DA:106,4 +DA:114,4 +DA:123,4 +DA:127,4 +DA:140,8 +DA:141,8 +DA:142,8 +DA:143,8 +DA:144,8 +DA:145,8 +DA:146,8 +DA:147,8 +DA:149,8 +DA:150,4 +DA:153,8 +DA:155,8 +DA:157,8 +DA:159,8 +DA:161,8 +DA:163,8 +DA:165,8 +DA:167,8 +DA:169,8 +DA:170,4 +DA:171,0 +DA:172,0 +DA:176,8 +DA:198,0 +LF:37 +LH:34 +BRDA:68,0,0,0 +BRDA:68,0,1,8 +BRDA:147,1,0,0 +BRDA:147,1,1,8 +BRDA:150,2,0,4 +BRDA:150,2,1,0 +BRDA:150,3,0,0 +BRDA:150,3,1,0 +BRDA:170,4,0,0 +BRDA:170,4,1,4 +BRDA:185,5,0,8 +BRDA:185,5,1,8 +BRDA:194,6,0,8 +BRDA:194,6,1,0 +BRF:14 +BRH:7 +end_of_record +TN: +SF:C:\Users\Hubert\Desktop\ELO\frontend\src\components\Transfer.tsx +FN:73,(anonymous_0) +FNF:1 +FNH:1 +FNDA:2,(anonymous_0) +DA:13,1 +DA:22,1 +DA:41,1 +DA:48,1 +DA:55,1 +DA:60,1 +DA:73,1 +DA:74,2 +DA:76,2 +LF:9 +LH:9 +BRF:0 +BRH:0 +end_of_record +TN: +SF:C:\Users\Hubert\Desktop\ELO\frontend\src\constants\index.ts +FNF:0 +FNH:0 +DA:1,5 +DA:2,5 +DA:29,5 +DA:32,5 +DA:44,5 +DA:45,5 +LF:6 +LH:6 +BRF:0 +BRH:0 +end_of_record +TN: +SF:C:\Users\Hubert\Desktop\ELO\frontend\src\contexts\CASProvider.tsx +FN:20,(anonymous_0) +FN:26,(anonymous_1) +FN:27,(anonymous_2) +FN:58,logout +FN:65,redirectToCASLogoutService +FN:69,redirectToCASLoginService +FNF:6 +FNH:4 +FNDA:20,(anonymous_0) +FNDA:10,(anonymous_1) +FNDA:10,(anonymous_2) +FNDA:0,logout +FNDA:0,redirectToCASLogoutService +FNDA:10,redirectToCASLoginService +DA:14,5 +DA:20,5 +DA:21,20 +DA:22,20 +DA:23,20 +DA:24,20 +DA:25,20 +DA:26,20 +DA:27,10 +DA:28,10 +DA:29,10 +DA:30,10 +DA:31,10 +DA:33,10 +DA:34,10 +DA:35,10 +DA:36,10 +DA:39,0 +DA:40,0 +DA:41,0 +DA:42,0 +DA:43,0 +DA:45,0 +DA:46,0 +DA:47,0 +DA:48,0 +DA:49,0 +DA:50,0 +DA:52,0 +DA:55,10 +DA:59,0 +DA:60,0 +DA:61,0 +DA:62,0 +DA:66,0 +DA:70,10 +DA:73,20 +LF:37 +LH:20 +BRDA:30,0,0,10 +BRDA:30,0,1,0 +BRDA:34,1,0,10 +BRDA:34,1,1,0 +BRDA:48,2,0,0 +BRDA:48,2,1,0 +BRDA:49,3,0,0 +BRDA:49,3,1,0 +BRDA:50,4,0,0 +BRDA:50,4,1,0 +BRF:10 +BRH:2 +end_of_record +TN: +SF:C:\Users\Hubert\Desktop\ELO\frontend\src\contexts\CoursesProvider.tsx +FN:47,(anonymous_0) +FN:60,(anonymous_1) +FN:61,(anonymous_2) +FN:61,(anonymous_3) +FN:62,(anonymous_4) +FN:62,(anonymous_5) +FN:66,(anonymous_6) +FN:66,(anonymous_7) +FN:68,(anonymous_8) +FN:70,(anonymous_9) +FN:71,(anonymous_10) +FN:76,(anonymous_11) +FN:77,(anonymous_12) +FN:89,(anonymous_13) +FN:90,(anonymous_14) +FN:103,(anonymous_15) +FN:104,(anonymous_16) +FN:112,(anonymous_17) +FN:114,(anonymous_18) +FN:116,(anonymous_19) +FN:126,(anonymous_20) +FN:126,(anonymous_21) +FN:128,(anonymous_22) +FN:130,(anonymous_23) +FN:136,(anonymous_24) +FN:138,(anonymous_25) +FN:141,(anonymous_26) +FN:167,(anonymous_27) +FN:168,(anonymous_28) +FN:173,(anonymous_29) +FN:179,(anonymous_30) +FN:180,(anonymous_31) +FN:184,(anonymous_32) +FN:188,(anonymous_33) +FN:193,(anonymous_34) +FN:205,(anonymous_35) +FN:218,(anonymous_36) +FN:229,(anonymous_37) +FN:234,(anonymous_38) +FN:241,(anonymous_39) +FN:269,(anonymous_40) +FN:271,(anonymous_41) +FNF:42 +FNH:5 +FNDA:20,(anonymous_0) +FNDA:0,(anonymous_1) +FNDA:0,(anonymous_2) +FNDA:0,(anonymous_3) +FNDA:0,(anonymous_4) +FNDA:0,(anonymous_5) +FNDA:12,(anonymous_6) +FNDA:0,(anonymous_7) +FNDA:4,(anonymous_8) +FNDA:0,(anonymous_9) +FNDA:0,(anonymous_10) +FNDA:2,(anonymous_11) +FNDA:0,(anonymous_12) +FNDA:0,(anonymous_13) +FNDA:0,(anonymous_14) +FNDA:0,(anonymous_15) +FNDA:0,(anonymous_16) +FNDA:0,(anonymous_17) +FNDA:0,(anonymous_18) +FNDA:0,(anonymous_19) +FNDA:0,(anonymous_20) +FNDA:0,(anonymous_21) +FNDA:0,(anonymous_22) +FNDA:0,(anonymous_23) +FNDA:0,(anonymous_24) +FNDA:0,(anonymous_25) +FNDA:0,(anonymous_26) +FNDA:0,(anonymous_27) +FNDA:0,(anonymous_28) +FNDA:0,(anonymous_29) +FNDA:0,(anonymous_30) +FNDA:0,(anonymous_31) +FNDA:0,(anonymous_32) +FNDA:0,(anonymous_33) +FNDA:0,(anonymous_34) +FNDA:0,(anonymous_35) +FNDA:0,(anonymous_36) +FNDA:0,(anonymous_37) +FNDA:0,(anonymous_38) +FNDA:0,(anonymous_39) +FNDA:10,(anonymous_40) +FNDA:0,(anonymous_41) +DA:8,5 +DA:41,5 +DA:47,5 +DA:48,20 +DA:49,20 +DA:52,20 +DA:53,20 +DA:54,20 +DA:55,20 +DA:56,20 +DA:57,20 +DA:58,20 +DA:60,20 +DA:61,0 +DA:62,0 +DA:63,0 +DA:66,20 +DA:68,20 +DA:69,4 +DA:70,4 +DA:71,0 +DA:72,0 +DA:76,20 +DA:77,2 +DA:78,0 +DA:79,0 +DA:80,0 +DA:82,0 +DA:83,0 +DA:85,0 +DA:89,20 +DA:90,0 +DA:91,0 +DA:92,0 +DA:93,0 +DA:95,0 +DA:96,0 +DA:98,0 +DA:103,20 +DA:104,0 +DA:105,0 +DA:106,0 +DA:108,0 +DA:112,20 +DA:114,20 +DA:116,20 +DA:117,0 +DA:123,0 +DA:126,20 +DA:128,20 +DA:129,0 +DA:130,0 +DA:131,0 +DA:132,0 +DA:136,20 +DA:137,0 +DA:138,0 +DA:139,0 +DA:142,0 +DA:148,0 +DA:149,0 +DA:153,0 +DA:158,0 +DA:159,0 +DA:164,0 +DA:167,20 +DA:168,0 +DA:169,0 +DA:171,0 +DA:172,0 +DA:173,0 +DA:175,0 +DA:179,20 +DA:180,0 +DA:181,0 +DA:182,0 +DA:183,0 +DA:184,0 +DA:186,0 +DA:187,0 +DA:188,0 +DA:193,20 +DA:194,0 +DA:195,0 +DA:198,0 +DA:199,0 +DA:201,0 +DA:205,20 +DA:206,0 +DA:207,0 +DA:210,0 +DA:212,0 +DA:214,0 +DA:218,20 +DA:219,0 +DA:220,0 +DA:223,0 +DA:225,0 +DA:229,20 +DA:230,0 +DA:231,0 +DA:234,0 +DA:235,0 +DA:237,0 +DA:241,20 +DA:242,0 +DA:243,0 +DA:244,0 +DA:245,0 +DA:246,0 +DA:247,0 +DA:248,0 +DA:249,0 +DA:250,0 +DA:254,0 +DA:255,0 +DA:256,0 +DA:257,0 +DA:261,0 +DA:262,0 +DA:266,0 +DA:269,20 +DA:270,10 +DA:271,10 +DA:272,0 +DA:273,0 +DA:274,0 +DA:278,20 +LF:128 +LH:38 +BRDA:72,0,0,0 +BRDA:72,0,1,0 +BRDA:79,1,0,0 +BRDA:79,1,1,0 +BRDA:82,2,0,0 +BRDA:82,2,1,0 +BRDA:92,3,0,0 +BRDA:92,3,1,0 +BRDA:95,4,0,0 +BRDA:95,4,1,0 +BRDA:105,5,0,0 +BRDA:105,5,1,0 +BRDA:120,6,0,0 +BRDA:120,6,1,0 +BRDA:121,7,0,0 +BRDA:121,7,1,0 +BRDA:169,8,0,0 +BRDA:169,8,1,0 +BRDA:169,9,0,0 +BRDA:169,9,1,0 +BRDA:171,10,0,0 +BRDA:171,10,1,0 +BRDA:173,11,0,0 +BRDA:173,11,1,0 +BRDA:182,12,0,0 +BRDA:182,12,1,0 +BRDA:184,13,0,0 +BRDA:184,13,1,0 +BRDA:186,14,0,0 +BRDA:186,14,1,0 +BRDA:188,15,0,0 +BRDA:188,15,1,0 +BRDA:198,16,0,0 +BRDA:198,16,1,0 +BRDA:210,17,0,0 +BRDA:210,17,1,0 +BRDA:234,18,0,0 +BRDA:234,18,1,0 +BRDA:247,19,0,0 +BRDA:247,19,1,0 +BRDA:249,20,0,0 +BRDA:249,20,1,0 +BRDA:254,21,0,0 +BRDA:254,21,1,0 +BRDA:256,22,0,0 +BRDA:256,22,1,0 +BRDA:261,23,0,0 +BRDA:261,23,1,0 +BRDA:261,24,0,0 +BRDA:261,24,1,0 +BRF:50 +BRH:0 +end_of_record +TN: +SF:C:\Users\Hubert\Desktop\ELO\frontend\src\contexts\StudentsProvider.tsx +FN:17,(anonymous_0) +FN:21,(anonymous_1) +FN:32,(anonymous_2) +FN:33,(anonymous_3) +FN:36,(anonymous_4) +FN:37,(anonymous_5) +FNF:6 +FNH:2 +FNDA:10,(anonymous_0) +FNDA:0,(anonymous_1) +FNDA:0,(anonymous_2) +FNDA:0,(anonymous_3) +FNDA:10,(anonymous_4) +FNDA:0,(anonymous_5) +DA:11,5 +DA:17,5 +DA:18,10 +DA:19,10 +DA:21,10 +DA:22,0 +DA:23,0 +DA:26,0 +DA:28,0 +DA:32,10 +DA:33,0 +DA:36,10 +DA:37,10 +DA:38,0 +DA:39,0 +DA:43,10 +LF:16 +LH:9 +BRDA:39,0,0,0 +BRDA:39,0,1,0 +BRF:2 +BRH:0 +end_of_record +TN: +SF:C:\Users\Hubert\Desktop\ELO\frontend\src\styles\GlobalStyles.ts +FNF:0 +FNH:0 +DA:3,0 +LF:1 +LH:0 +BRF:0 +BRH:0 +end_of_record +TN: +SF:C:\Users\Hubert\Desktop\ELO\frontend\src\types\index.ts +FNF:0 +FNH:0 +LF:0 +LH:0 +BRF:0 +BRH:0 +end_of_record +TN: +SF:C:\Users\Hubert\Desktop\ELO\frontend\src\utils\axiosInstance.ts +FN:6,(anonymous_0) +FN:21,(anonymous_1) +FN:28,(anonymous_2) +FN:35,(anonymous_3) +FN:38,(anonymous_4) +FNF:5 +FNH:1 +FNDA:0,(anonymous_0) +FNDA:10,(anonymous_1) +FNDA:0,(anonymous_2) +FNDA:0,(anonymous_3) +FNDA:0,(anonymous_4) +DA:3,5 +DA:6,5 +DA:7,0 +DA:8,0 +DA:9,0 +DA:12,0 +DA:13,0 +DA:14,0 +DA:16,0 +DA:20,5 +DA:22,10 +DA:24,10 +DA:25,10 +DA:26,10 +DA:29,0 +DA:34,5 +DA:36,0 +DA:39,0 +DA:40,0 +DA:41,0 +DA:42,0 +DA:43,0 +DA:44,0 +DA:46,0 +LF:24 +LH:8 +BRDA:25,0,0,0 +BRDA:25,0,1,10 +BRDA:40,1,0,0 +BRDA:40,1,1,0 +BRDA:40,2,0,0 +BRDA:40,2,1,0 +BRF:6 +BRH:1 +end_of_record +TN: +SF:C:\Users\Hubert\Desktop\ELO\frontend\src\utils\index.ts +FN:6,(anonymous_0) +FN:7,(anonymous_1) +FN:19,(anonymous_2) +FN:25,(anonymous_3) +FN:33,(anonymous_4) +FN:50,(anonymous_5) +FN:57,(anonymous_6) +FN:67,(anonymous_7) +FNF:8 +FNH:3 +FNDA:0,(anonymous_0) +FNDA:0,(anonymous_1) +FNDA:4,(anonymous_2) +FNDA:0,(anonymous_3) +FNDA:1,(anonymous_4) +FNDA:0,(anonymous_5) +FNDA:0,(anonymous_6) +FNDA:4,(anonymous_7) +DA:6,2 +DA:7,0 +DA:19,2 +DA:25,4 +DA:26,0 +DA:27,0 +DA:28,0 +DA:29,0 +DA:33,4 +DA:34,1 +DA:35,1 +DA:36,1 +DA:38,1 +DA:39,1 +DA:42,1 +DA:43,0 +DA:44,0 +DA:47,1 +DA:50,4 +DA:51,0 +DA:52,0 +DA:53,0 +DA:57,4 +DA:58,0 +DA:59,0 +DA:60,0 +DA:62,0 +DA:63,0 +DA:67,4 +DA:68,4 +DA:69,4 +DA:70,4 +DA:71,4 +DA:74,4 +LF:34 +LH:19 +BRDA:19,0,0,4 +BRDA:27,1,0,0 +BRDA:27,1,1,0 +BRDA:36,2,0,1 +BRDA:36,2,1,0 +BRDA:38,3,0,1 +BRDA:38,3,1,0 +BRDA:42,4,0,0 +BRDA:42,4,1,1 +BRDA:51,5,0,0 +BRDA:51,5,1,0 +BRDA:58,6,0,0 +BRDA:58,6,1,0 +BRF:13 +BRH:4 +end_of_record diff --git a/jest.config.json b/jest.config.json new file mode 100644 index 0000000..607c7a7 --- /dev/null +++ b/jest.config.json @@ -0,0 +1,3 @@ +{ + "reporters": [ "default", "jest-junit" ] + } \ No newline at end of file diff --git a/junit.xml b/junit.xml new file mode 100644 index 0000000..a587114 --- /dev/null +++ b/junit.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/components/DeaneryPanel.tsx b/src/components/DeaneryPanel.tsx index 56f193e..9bc33ea 100644 --- a/src/components/DeaneryPanel.tsx +++ b/src/components/DeaneryPanel.tsx @@ -2,7 +2,8 @@ import React, { useState, MouseEvent,useContext } from 'react'; import styled from 'styled-components/macro'; import Plan from '../assets/plan.svg'; import History from '../assets/history.svg'; -import Statistics from '../assets/statistics.svg'; +import StatisticsIcon from '../assets/statistics.svg'; +import { Statistics } from './Statistics'; import { Scheduler } from './Scheduler'; import { Rightbar } from './Rightbar'; import { SchedulerHistory } from './SchedulerHistory'; @@ -124,7 +125,7 @@ export const Deanery = ({ schedulerEvents }: Deanery) => { Historia Zmian - + Statystyki @@ -137,7 +138,7 @@ export const Deanery = ({ schedulerEvents }: Deanery) => { ) : currentTab === 2 ? ( ) : currentTab === 3 ? ( - + ) : ( diff --git a/src/components/Statistics.tsx b/src/components/Statistics.tsx new file mode 100644 index 0000000..ff4901a --- /dev/null +++ b/src/components/Statistics.tsx @@ -0,0 +1,94 @@ +import React, { useState, useContext } from 'react'; +import Collapse from '@material-ui/core/Collapse'; +import { ReactComponent as Expand } from '../assets/expand.svg'; +import { Course, Group, GroupType } from '../types/index'; +import { coursesContext } from '../contexts/CoursesProvider'; +import styled, { css } from 'styled-components'; +import { makeStyles } from '@material-ui/core/styles'; +import DeleteIcon from '@material-ui/icons/Delete'; +import { useMemo } from 'react'; +import { dayMapping } from '../constants'; + +const StatisticsWrapper = styled.div` + display: flex; + flex-direction: column; + width: 100%; + justify-content: center; + align-items: center; +`; + +const Row = styled.div` + display: flex; + width: 100%; + justify-content: center; + align-items: center; +`; + +const StatisticBox = styled.div` +background-color:white; + width: 200px; + height: 200px; + margin: 10px; + border: 1px solid #000000; + border-radius: 38px; + display: flex; + flex-direction: column; + justify-content: space-around; + align-items: center; + font-size: 22px; + padding:2px; + box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.75); +`; + +const StatisticNumber = styled.p` + font-size: 52px; + margin-top: 40px; + margin-bottom:0px; +`; + +const StatisticText = styled.p` + font-size: 18px; + text-align:center; + align-items:center; + justify-content:center; +`; + +export const Statistics = () => { + return ( + + + + 65 + Utworzonych grup + + + {' '} + 280 + Zapisanych studentów do grup + + + {' '} + 24 + Studentów niezapisanych do żadnej grupy + + + + + {' '} + 150 + Studentów z zaakceptowanym planem + + + {' '} + 130 + Studentów bez zaakceptowanego pełengo planu + + + {' '} + 0 + Zamkniętych grup + + + + ); +}; diff --git a/src/components/__tests__/Statistics.test.jsx b/src/components/__tests__/Statistics.test.jsx new file mode 100644 index 0000000..879d081 --- /dev/null +++ b/src/components/__tests__/Statistics.test.jsx @@ -0,0 +1,26 @@ +import React from 'react'; +import { cleanup, fireEvent, waitForElement, screen } from '@testing-library/react'; +import '@testing-library/jest-dom/extend-expect'; +import { customRender } from '../../customRender'; +import Topbar from '../Topbar'; +import { Statistics } from '../Statistics'; + +beforeAll(() => { + delete window.location; + window.location = { replace: jest.fn() }; +}); + +afterAll(() => { + window.location = location; +}); + +test('renders component', async () => { + customRender(); + expect(screen.getByText(/Studentów bez zaakceptowanego pełengo planu/i)).toBeInTheDocument(); + }); + + test('renders component', async () => { + customRender(); + expect(screen.getByText(/Zapisanych sutdentów do grup/i)).toBeInTheDocument(); + }); + \ No newline at end of file diff --git a/test-report.html b/test-report.html new file mode 100644 index 0000000..e04ea69 --- /dev/null +++ b/test-report.html @@ -0,0 +1,232 @@ +Test Report \ No newline at end of file