Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- t.prototype.downloadXlsx = function () {
- var t = this, e = {
- date_from: this.helpers.formatDate(this.filter.date_from),
- date_to: this.helpers.formatDate(this.filter.date_to),
- download: "fees"
- };
- this.http.get("team-accounts/" + this.route.snapshot.params.id, e).subscribe(function (n) {
- var i = {type: 'application/octet-stream'},
- r = t.account.team.name + "_summary_" + e.date_from + "_" + e.date_to + ".xlsx";
- t.helpers.downloadXlsxFile(n._body, i, r);
- })
- t.prototype.downloadXlsxFile = function (t, e, n, i) {
- var r = new Blob(t], e);
- if (navigator.msSaveBlob) navigator.msSaveBlob(r, n); else {
- var a = document.createElement("a");
- if (void 0 !== a.download) {
- var o = i || document.body, s = URL.createObjectURL(r);
- a.setAttribute("href", s), a.setAttribute("download", n), a.style.visibility = "hidden", o.appendChild(a), a.click(), o.removeChild(a)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement