feat: Shop Supplier Purchase Order get, filter, and add new.

This commit is contained in:
2024-10-25 16:42:13 +01:00
parent 7b6266e2f6
commit 437e094776
125 changed files with 3913 additions and 966 deletions

View File

@@ -2,50 +2,11 @@
import Validation from "./validation.js";
export default class Common {
static parseCSSPropertyToFloat(element, propertyName) {
var propertyText = element.css(propertyName);
if (!Validation.isEmpty(propertyText)) {
propertyText = propertyText.replace('px', '');
if (!Validation.isValidNumber(propertyText, true)) return parseFloat(propertyText);
}
return 0.00;
}
static setPageToLoading(isLoading) {
if (isLoading) {
document.querySelectorAll(document.body).classList.add(_dataLoadingFlag);
}
else {
document.querySelectorAll(document.body).classList.remove(_dataLoadingFlag);
}
}
static setBackgroundToLoading(elId, isLoading) {
if (Validation.isEmpty(el)) {
var elObj = document.querySelectorAll(elId);
if (isLoading) {
setTimeout(function() {
elObj.innerHTML = "";
elObj.css({
"background-image": "url(" + urlImgLoading + ")",
"background-position": "center",
"background-repeat": "no-repeat"
});
}, 0);
}
else {
elObj.css("background-image", "");
}
static parseFloatWithDefault(value, defaultValue = 0.00) {
if (!Validation.isEmpty(value) && Validation.isValidNumber(value, true)) {
return parseFloat(value);
}
return defaultValue;
}
static allowClick() {