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

This commit is contained in:
2024-10-25 16:42:13 +01:00
parent 002551c0a9
commit ea5b8e8ca1
121 changed files with 3835 additions and 865 deletions

View File

@@ -1,4 +1,5 @@
import Common from "../../../lib/common.js";
import Validation from "../../../lib/validation.js";
export default class TextArea {
@@ -27,15 +28,15 @@ export default class TextArea {
elTextarea.style.removeProperty('height');
textarea.getAttribute('rows', 1);
const paddingTop = parseCSSPropertyToFloat(textarea, 'padding-top');
const paddingBottom= parseCSSPropertyToFloat(textarea, 'padding-bottom');
const borderTop = parseCSSPropertyToFloat(textarea, 'border-top');
const borderBottom = parseCSSPropertyToFloat(textarea, 'border-bottom');
const paddingTop = Common.parseFloatWithDefault(textarea.style.paddingTop);
const paddingBottom = Common.parseFloatWithDefault(textarea.style.paddingBottom);
const borderTop = Common.parseFloatWithDefault(textarea.style.borderTop);
const borderBottom = Common.parseFloatWithDefault(textarea.style.borderBottom);
let heightDelta = paddingTop + paddingBottom + borderTop + borderBottom;
let heightNew = elTextarea.scrollHeight + heightDelta;
// If new height is less than 1 linem default to single line height
const heightSingleLine = parseCSSPropertyToFloat(textarea, 'line-height') + heightDelta;
const heightSingleLine = Common.parseFloatWithDefault(textarea.style.heightSingleLine) + heightDelta;
if (heightNew < heightSingleLine) heightNew = heightSingleLine;
elTextarea.style.height = heightNew + 'px';