This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sendToOtherNodeService = (url, bodyReq, timeout, callback) => { | |
try { | |
request({ | |
url: url, | |
method: 'POST', | |
json: true, | |
body: bodyReq, | |
timeout: timeOut, | |
}, (error, response, body) => { | |
if (error != null) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// If we have a token, try to login. | |
if (window.name) { | |
$.post("/login", { | |
token: window.name | |
}); | |
} | |
/* | |
* The function to be called when clicking on a username from the Admin Panel. | |
* The second parameter of `window.open` is the new window's name. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('app') | |
.run(function ($locale) { | |
var currencyPatterns = $locale.NUMBER_FORMATS.PATTERNS[1]; | |
patterns.negPre = '-\u00a4'; | |
patterns.negSuf = ''; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.filter('customCurrency', function ($filter) { | |
return function(amount, currencySymbol){ | |
var currency = $filter('currency'); | |
if(amount.charAt(0) === "-"){ | |
return currency(amount, currencySymbol) | |
.replace("(", "-") | |
.replace(")", ""); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('app') | |
.config(function ($provide) { | |
$provide.decorator('$locale', function ($delegate) { | |
if ($delegate.id == 'en-us') { | |
$delegate.NUMBER_FORMATS.PATTERNS[1].negPre = '-\u00A4'; | |
$delegate.NUMBER_FORMATS.PATTERNS[1].negSuf = ''; | |
} | |
return $delegate; | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"compilerOptions": { | |
"allowJs": true, | |
"checkJs": true, | |
"lib": [ | |
"es2017" | |
] | |
}, | |
"include": [ | |
"src/**/*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This service connects to our REST API | |
app.factory("Data", function ($http) { | |
var serviceBase = 'https://shekel.click/api/v1.2/'; | |
var obj = {}; | |
obj.file = function (q, file, fileName) { | |
var fd = new FormData(); | |
fd.append('fileToUpload', file); | |
fd.append('fn', fileName); | |
fd.append('submit', 'ok'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This service connects to our REST API | |
app.factory("Data", function ($http) { | |
var serviceBase = 'https://shekel.click/api/v1.2/'; | |
var obj = {}; | |
obj.file = function (q, file, fileName) { | |
var fd = new FormData(); | |
fd.append('fileToUpload', file); | |
fd.append('fn', fileName); | |
fd.append('submit', 'ok'); |