Advertisement
Guest User

Untitled

a guest
Jun 25th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. public getEsami() {
  2. if (this.iunica.libretto)
  3. return new Promise(resolve => resolve(this.iunica.libretto))
  4. else {
  5. return new Promise(resolve => {
  6. this.storage.get('esse3response').then(res => {
  7. var esamiRaw = res.carrieraCompleta
  8. for (var i = 0; i < esamiRaw.length; i++) {
  9. this.esami.push(new Esame(esamiRaw[i]))
  10. }
  11. this.ordinaEsamiPerAnno();
  12. this.libretto = {};
  13. this.libretto.esami = this.esami;
  14. this.libretto.esamiZeroAnno = this.esamiZeroAnno;
  15. this.libretto.esamiPrimoAnno = this.esamiPrimoAnno;
  16. this.libretto.esamiSecondoAnno = this.esamiSecondoAnno;
  17. this.libretto.esamiTerzoAnno = this.esamiTerzoAnno;
  18. this.libretto.esamiQuartoAnno = this.esamiQuartoAnno;
  19. this.libretto.esamiQuintoAnno = this.esamiQuintoAnno;
  20. this.libretto.esamiSestoAnno = this.esamiSestoAnno;
  21. this.iunica.libretto = this.libretto;
  22. resolve(this.iunica.libretto);
  23. });
  24. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement