From f5d2330c3f08cbbeaa19e6e776017aff7545bc3b Mon Sep 17 00:00:00 2001 From: Lyndon Jetten Date: Mon, 22 May 2023 12:43:13 +0200 Subject: [PATCH 1/2] Server: Auch von Team betreute Klienten werden jetzt geladen und unter anderem im Kalender angezeigt. (CustomerServiceImp GetAllActiveCompactCustomers Z. 718ff. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit MoK: Dateien von signature_pad hinzugefügt. --- BeWo/Scheduler/View/NewSchedulerView.xaml.cs | 46 -- BeWoPlanerMobil/BeWoPlanerMobil.csproj | 12 + .../node_modules/signature_pad/src/bezier.js | 70 +++ .../signature_pad/src/bezier.js.map | 1 + .../node_modules/signature_pad/src/point.js | 31 ++ .../signature_pad/src/point.js.map | 1 + .../src/signature_event_target.js | 28 + .../src/signature_event_target.js.map | 1 + .../signature_pad/src/signature_pad.js | 489 ++++++++++++++++++ .../signature_pad/src/signature_pad.js.map | 1 + .../signature_pad/src/throttle.js | 50 ++ .../signature_pad/src/throttle.js.map | 1 + .../CustomerServiceImp.cs | 19 +- 13 files changed, 697 insertions(+), 53 deletions(-) create mode 100644 BeWoPlanerMobil/node_modules/signature_pad/src/bezier.js create mode 100644 BeWoPlanerMobil/node_modules/signature_pad/src/bezier.js.map create mode 100644 BeWoPlanerMobil/node_modules/signature_pad/src/point.js create mode 100644 BeWoPlanerMobil/node_modules/signature_pad/src/point.js.map create mode 100644 BeWoPlanerMobil/node_modules/signature_pad/src/signature_event_target.js create mode 100644 BeWoPlanerMobil/node_modules/signature_pad/src/signature_event_target.js.map create mode 100644 BeWoPlanerMobil/node_modules/signature_pad/src/signature_pad.js create mode 100644 BeWoPlanerMobil/node_modules/signature_pad/src/signature_pad.js.map create mode 100644 BeWoPlanerMobil/node_modules/signature_pad/src/throttle.js create mode 100644 BeWoPlanerMobil/node_modules/signature_pad/src/throttle.js.map diff --git a/BeWo/Scheduler/View/NewSchedulerView.xaml.cs b/BeWo/Scheduler/View/NewSchedulerView.xaml.cs index 8eb0d05c0..669c43cc9 100644 --- a/BeWo/Scheduler/View/NewSchedulerView.xaml.cs +++ b/BeWo/Scheduler/View/NewSchedulerView.xaml.cs @@ -432,54 +432,8 @@ namespace BeWo.Scheduler.View ConstructObject(); } - // ToDo: In den Cache verschieben private static void GetCacheObjects(Action, List, Dictionary>> callback) { - //Cache.GetInstance().GetAllActiveEmployeesCompact(allEmployees => - //{ - // this.Dispatch(() => - // { - // Cache.GetInstance().GetAllActiveCustomersCompact(allCustomers => - // { - // this.Dispatch(() => - // { - // Cache.GetInstance().GetCategories2ResourcesDictionary(resourceDictionary => - // { - // this.Dispatch(() => - // { - // if(!BeWoApp.LoggedOnUser.HasRight(UserRightType.KalenderMitarbeitertermineAnsehen)) - // { - // allEmployees = new List {BeWoApp.CompactLoggedOnEmployee}; - // } - - // var darfKlientenAnsichtSehen = BeWoApp.LoggedOnUser.HasRight(UserRightType.Customer_ViewMyTeams) || BeWoApp.LoggedOnUser.HasRight(UserRightType.Customer_ViewMyCustomers) || BeWoApp.LoggedOnUser.HasRight(UserRightType.CustomerView_View); - // var darfTermineAllerKlientenSehen = BeWoApp.LoggedOnUser.HasRight(UserRightType.KalenderKliententermineAlleAnsehen); - - // if(darfKlientenAnsichtSehen) - // { - // if(!darfTermineAllerKlientenSehen || !BeWoApp.LoggedOnUser.HasRight(UserRightType.CustomerView_View)) - // { - // allCustomers = allCustomers.Where(w => w.IsRelatedToEmployee).ToList(); - // } - // } - // else - // { - // allCustomers.Clear(); - // } - - // if(!BeWoApp.LoggedOnUser.HasRight(UserRightType.KalenderRessourcentermineAnsehen)) - // { - // resourceDictionary.Clear(); - // } - - // callback(allCustomers, allEmployees, resourceDictionary); - // }); - // }); - // }); - // }); - // }); - //}); - Cache.GetInstance().GetSchedulerObjects(callback); } diff --git a/BeWoPlanerMobil/BeWoPlanerMobil.csproj b/BeWoPlanerMobil/BeWoPlanerMobil.csproj index cb3036a75..25635f6a3 100644 --- a/BeWoPlanerMobil/BeWoPlanerMobil.csproj +++ b/BeWoPlanerMobil/BeWoPlanerMobil.csproj @@ -4387,6 +4387,11 @@ + + + + + @@ -5036,6 +5041,13 @@ + + + + + + + 10.0 $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) diff --git a/BeWoPlanerMobil/node_modules/signature_pad/src/bezier.js b/BeWoPlanerMobil/node_modules/signature_pad/src/bezier.js new file mode 100644 index 000000000..f64aaf1ba --- /dev/null +++ b/BeWoPlanerMobil/node_modules/signature_pad/src/bezier.js @@ -0,0 +1,70 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Bezier = void 0; +var point_1 = require("./point"); +var Bezier = /** @class */ (function () { + function Bezier(startPoint, control2, control1, endPoint, startWidth, endWidth) { + this.startPoint = startPoint; + this.control2 = control2; + this.control1 = control1; + this.endPoint = endPoint; + this.startWidth = startWidth; + this.endWidth = endWidth; + } + Bezier.fromPoints = function (points, widths) { + var c2 = this.calculateControlPoints(points[0], points[1], points[2]).c2; + var c3 = this.calculateControlPoints(points[1], points[2], points[3]).c1; + return new Bezier(points[1], c2, c3, points[2], widths.start, widths.end); + }; + Bezier.calculateControlPoints = function (s1, s2, s3) { + var dx1 = s1.x - s2.x; + var dy1 = s1.y - s2.y; + var dx2 = s2.x - s3.x; + var dy2 = s2.y - s3.y; + var m1 = { x: (s1.x + s2.x) / 2.0, y: (s1.y + s2.y) / 2.0 }; + var m2 = { x: (s2.x + s3.x) / 2.0, y: (s2.y + s3.y) / 2.0 }; + var l1 = Math.sqrt(dx1 * dx1 + dy1 * dy1); + var l2 = Math.sqrt(dx2 * dx2 + dy2 * dy2); + var dxm = m1.x - m2.x; + var dym = m1.y - m2.y; + var k = l2 / (l1 + l2); + var cm = { x: m2.x + dxm * k, y: m2.y + dym * k }; + var tx = s2.x - cm.x; + var ty = s2.y - cm.y; + return { + c1: new point_1.Point(m1.x + tx, m1.y + ty), + c2: new point_1.Point(m2.x + tx, m2.y + ty), + }; + }; + // Returns approximated length. Code taken from https://www.lemoda.net/maths/bezier-length/index.html. + Bezier.prototype.length = function () { + var steps = 10; + var length = 0; + var px; + var py; + for (var i = 0; i <= steps; i += 1) { + var t = i / steps; + var cx = this.point(t, this.startPoint.x, this.control1.x, this.control2.x, this.endPoint.x); + var cy = this.point(t, this.startPoint.y, this.control1.y, this.control2.y, this.endPoint.y); + if (i > 0) { + var xdiff = cx - px; + var ydiff = cy - py; + length += Math.sqrt(xdiff * xdiff + ydiff * ydiff); + } + px = cx; + py = cy; + } + return length; + }; + // Calculate parametric value of x or y given t and the four point coordinates of a cubic bezier curve. + Bezier.prototype.point = function (t, start, c1, c2, end) { + // prettier-ignore + return (start * (1.0 - t) * (1.0 - t) * (1.0 - t)) + + (3.0 * c1 * (1.0 - t) * (1.0 - t) * t) + + (3.0 * c2 * (1.0 - t) * t * t) + + (end * t * t * t); + }; + return Bezier; +}()); +exports.Bezier = Bezier; +//# sourceMappingURL=bezier.js.map \ No newline at end of file diff --git a/BeWoPlanerMobil/node_modules/signature_pad/src/bezier.js.map b/BeWoPlanerMobil/node_modules/signature_pad/src/bezier.js.map new file mode 100644 index 000000000..e3cf9e7b9 --- /dev/null +++ b/BeWoPlanerMobil/node_modules/signature_pad/src/bezier.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bezier.js","sourceRoot":"","sources":["bezier.ts"],"names":[],"mappings":";;;AAAA,iCAA4C;AAE5C;IA6CE,gBACS,UAAiB,EACjB,QAAoB,EACpB,QAAoB,EACpB,QAAe,EACf,UAAkB,EAClB,QAAgB;QALhB,eAAU,GAAV,UAAU,CAAO;QACjB,aAAQ,GAAR,QAAQ,CAAY;QACpB,aAAQ,GAAR,QAAQ,CAAY;QACpB,aAAQ,GAAR,QAAQ,CAAO;QACf,eAAU,GAAV,UAAU,CAAQ;QAClB,aAAQ,GAAR,QAAQ,CAAQ;IACtB,CAAC;IAnDU,iBAAU,GAAxB,UACE,MAAe,EACf,MAAsC;QAEtC,IAAM,EAAE,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AAC,GAAY,CAAC,CAAC;cAC3C,CAAQ,GAAG,GAAK,CAAC,GAAW,CAAC,GAAY,CAAC,CAAC,CAAC;IACrD,CAAC;IACH,aAAC;AAAD,CAAC,AA1GD,IA0GC;AA1GY,wBAAM"} \ No newline at end of file diff --git a/BeWoPlanerMobil/node_modules/signature_pad/src/point.js b/BeWoPlanerMobil/node_modules/signature_pad/src/point.js new file mode 100644 index 000000000..da113f13c --- /dev/null +++ b/BeWoPlanerMobil/node_modules/signature_pad/src/point.js @@ -0,0 +1,31 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Point = void 0; +var Point = /** @class */ (function () { + function Point(x, y, pressure, time) { + if (isNaN(x) || isNaN(y)) { + throw new Error("Point is invalid: (" + x + ", " + y + ")"); + } + this.x = +x; + this.y = +y; + this.pressure = pressure || 0; + this.time = time || Date.now(); + } + Point.prototype.distanceTo = function (start) { + return Math.sqrt(Math.pow(this.x - start.x, 2) + Math.pow(this.y - start.y, 2)); + }; + Point.prototype.equals = function (other) { + return (this.x === other.x && + this.y === other.y && + this.pressure === other.pressure && + this.time === other.time); + }; + Point.prototype.velocityFrom = function (start) { + return this.time !== start.time + ? this.distanceTo(start) / (this.time - start.time) + : 0; + }; + return Point; +}()); +exports.Point = Point; +//# sourceMappingURL=point.js.map \ No newline at end of file diff --git a/BeWoPlanerMobil/node_modules/signature_pad/src/point.js.map b/BeWoPlanerMobil/node_modules/signature_pad/src/point.js.map new file mode 100644 index 000000000..4cc665484 --- /dev/null +++ b/BeWoPlanerMobil/node_modules/signature_pad/src/point.js.map @@ -0,0 +1 @@ +{"version":3,"file":"point.js","sourceRoot":"","sources":["point.ts"],"names":[],"mappings":";;;AAQA;IAME,eAAY,CAAS,EAAE,CAAS,EAAE,QAAiB,EAAE,IAAa;QAChE,IAAI,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE;YACxB,MAAM,IAAI,KAAK,CAAC,wBAAsB,CAAC,UAAK,CAAC,MAAG,CAAC,CAAC;SACnD;QACD,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;QACZ,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;QACZ,IAAI,CAAC,QAAQ,GAAG,QAAQ,IAAI,CAAC,CAAC;QAC9B,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;IACjC,CAAC;IAEM,0BAAU,GAAjB,UAAkB,KAAiB;QACjC,OAAO,IAAI,CAAC,IAAI,CACd,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAC9D,CAAC;IACJ,CAAC;IAEM,sBAAM,GAAb,UAAc,KAAiB;QAC7B,OAAO,CACL,IAAI,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC;YAClB,IAAI,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC;YAClB,IAAI,CAAC,QAAQ,KAAK,KAAK,CAAC,QAAQ;YAChC,IAAI,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,CACzB,CAAC;IACJ,CAAC;IAEM,4BAAY,GAAnB,UAAoB,KAAiB;QACnC,OAAO,IAAI,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI;YAC7B,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;YACnD,CAAC,CAAC,CAAC,CAAC;IACR,CAAC;IACH,YAAC;AAAD,CAAC,AApCD,IAoCC;AApCY,sBAAK"} \ No newline at end of file diff --git a/BeWoPlanerMobil/node_modules/signature_pad/src/signature_event_target.js b/BeWoPlanerMobil/node_modules/signature_pad/src/signature_event_target.js new file mode 100644 index 000000000..fe5ebd064 --- /dev/null +++ b/BeWoPlanerMobil/node_modules/signature_pad/src/signature_event_target.js @@ -0,0 +1,28 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SignatureEventTarget = void 0; +var SignatureEventTarget = /** @class */ (function () { + /* tslint:enable: variable-name */ + function SignatureEventTarget() { + try { + this._et = new EventTarget(); + } + catch (error) { + // Using document as EventTarget to support iOS 13 and older. + // Because EventTarget constructor just exists at iOS 14 and later. + this._et = document; + } + } + SignatureEventTarget.prototype.addEventListener = function (type, listener, options) { + this._et.addEventListener(type, listener, options); + }; + SignatureEventTarget.prototype.dispatchEvent = function (event) { + return this._et.dispatchEvent(event); + }; + SignatureEventTarget.prototype.removeEventListener = function (type, callback, options) { + this._et.removeEventListener(type, callback, options); + }; + return SignatureEventTarget; +}()); +exports.SignatureEventTarget = SignatureEventTarget; +//# sourceMappingURL=signature_event_target.js.map \ No newline at end of file diff --git a/BeWoPlanerMobil/node_modules/signature_pad/src/signature_event_target.js.map b/BeWoPlanerMobil/node_modules/signature_pad/src/signature_event_target.js.map new file mode 100644 index 000000000..8998b157a --- /dev/null +++ b/BeWoPlanerMobil/node_modules/signature_pad/src/signature_event_target.js.map @@ -0,0 +1 @@ +{"version":3,"file":"signature_event_target.js","sourceRoot":"","sources":["signature_event_target.ts"],"names":[],"mappings":";;;AAAA;IAGE,kCAAkC;IAElC;QACE,IAAI;YACF,IAAI,CAAC,GAAG,GAAG,IAAI,WAAW,EAAE,CAAC;SAC9B;QAAC,OAAO,KAAK,EAAE;YACd,6DAA6D;YAC7D,mEAAmE;YACnE,IAAI,CAAC,GAAG,GAAG,QAAQ,CAAC;SACrB;IACH,CAAC;IAED,+CAAgB,GAAhB,UACE,IAAY,EACZ,QAAmD,EACnD,OAA2C;QAE3C,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;IACrD,CAAC;IAED,4CAAa,GAAb,UAAc,KAAY;QACxB,OAAO,IAAI,CAAC,GAAG,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IACvC,CAAC;IAED,kDAAmB,GAAnB,UACE,IAAY,EACZ,QAAmD,EACnD,OAAwC;QAExC,IAAI,CAAC,GAAG,CAAC,mBAAmB,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;IACxD,CAAC;IACH,2BAAC;AAAD,CAAC,AAlCD,IAkCC;AAlCY,oDAAoB"} \ No newline at end of file diff --git a/BeWoPlanerMobil/node_modules/signature_pad/src/signature_pad.js b/BeWoPlanerMobil/node_modules/signature_pad/src/signature_pad.js new file mode 100644 index 000000000..de3dac586 --- /dev/null +++ b/BeWoPlanerMobil/node_modules/signature_pad/src/signature_pad.js @@ -0,0 +1,489 @@ +"use strict"; +/** + * The main idea and some parts of the code (e.g. drawing variable width Bézier curve) are taken from: + * http://corner.squareup.com/2012/07/smoother-signatures.html + * + * Implementation of interpolation using cubic Bézier curves is taken from: + * https://web.archive.org/web/20160323213433/http://www.benknowscode.com/2012/09/path-interpolation-using-cubic-bezier_9742.html + * + * Algorithm for approximated length of a Bézier curve is taken from: + * http://www.lemoda.net/maths/bezier-length/index.html + */ +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var bezier_1 = require("./bezier"); +var point_1 = require("./point"); +var signature_event_target_1 = require("./signature_event_target"); +var throttle_1 = require("./throttle"); +var SignaturePad = /** @class */ (function (_super) { + __extends(SignaturePad, _super); + /* tslint:enable: variable-name */ + function SignaturePad(canvas, options) { + if (options === void 0) { options = {}; } + var _this = _super.call(this) || this; + _this.canvas = canvas; + _this._drawningStroke = false; + _this._isEmpty = true; + _this._lastPoints = []; // Stores up to 4 most recent points; used to generate a new curve + _this._data = []; // Stores all points in groups (one group per line or dot) + _this._lastVelocity = 0; + _this._lastWidth = 0; + // Event handlers + _this._handleMouseDown = function (event) { + if (event.buttons === 1) { + _this._drawningStroke = true; + _this._strokeBegin(event); + } + }; + _this._handleMouseMove = function (event) { + if (_this._drawningStroke) { + _this._strokeMoveUpdate(event); + } + }; + _this._handleMouseUp = function (event) { + if (event.buttons === 1 && _this._drawningStroke) { + _this._drawningStroke = false; + _this._strokeEnd(event); + } + }; + _this._handleTouchStart = function (event) { + // Prevent scrolling. + if (event.cancelable) { + event.preventDefault(); + } + if (event.targetTouches.length === 1) { + var touch = event.changedTouches[0]; + _this._strokeBegin(touch); + } + }; + _this._handleTouchMove = function (event) { + // Prevent scrolling. + if (event.cancelable) { + event.preventDefault(); + } + var touch = event.targetTouches[0]; + _this._strokeMoveUpdate(touch); + }; + _this._handleTouchEnd = function (event) { + var wasCanvasTouched = event.target === _this.canvas; + if (wasCanvasTouched) { + if (event.cancelable) { + event.preventDefault(); + } + var touch = event.changedTouches[0]; + _this._strokeEnd(touch); + } + }; + _this._handlePointerStart = function (event) { + _this._drawningStroke = true; + event.preventDefault(); + _this._strokeBegin(event); + }; + _this._handlePointerMove = function (event) { + if (_this._drawningStroke) { + event.preventDefault(); + _this._strokeMoveUpdate(event); + } + }; + _this._handlePointerEnd = function (event) { + if (_this._drawningStroke) { + event.preventDefault(); + _this._drawningStroke = false; + _this._strokeEnd(event); + } + }; + _this.velocityFilterWeight = options.velocityFilterWeight || 0.7; + _this.minWidth = options.minWidth || 0.5; + _this.maxWidth = options.maxWidth || 2.5; + _this.throttle = ('throttle' in options ? options.throttle : 16); // in milisecondss + _this.minDistance = ('minDistance' in options ? options.minDistance : 5); // in pixels + _this.dotSize = options.dotSize || 0; + _this.penColor = options.penColor || 'black'; + _this.backgroundColor = options.backgroundColor || 'rgba(0,0,0,0)'; + _this._strokeMoveUpdate = _this.throttle + ? throttle_1.throttle(SignaturePad.prototype._strokeUpdate, _this.throttle) + : SignaturePad.prototype._strokeUpdate; + _this._ctx = canvas.getContext('2d'); + _this.clear(); + // Enable mouse and touch event handlers + _this.on(); + return _this; + } + SignaturePad.prototype.clear = function () { + var _a = this, ctx = _a._ctx, canvas = _a.canvas; + // Clear canvas using background color + ctx.fillStyle = this.backgroundColor; + ctx.clearRect(0, 0, canvas.width, canvas.height); + ctx.fillRect(0, 0, canvas.width, canvas.height); + this._data = []; + this._reset(this._getPointGroupOptions()); + this._isEmpty = true; + }; + SignaturePad.prototype.fromDataURL = function (dataUrl, options) { + var _this = this; + if (options === void 0) { options = {}; } + return new Promise(function (resolve, reject) { + var image = new Image(); + var ratio = options.ratio || window.devicePixelRatio || 1; + var width = options.width || _this.canvas.width / ratio; + var height = options.height || _this.canvas.height / ratio; + var xOffset = options.xOffset || 0; + var yOffset = options.yOffset || 0; + _this._reset(_this._getPointGroupOptions()); + image.onload = function () { + _this._ctx.drawImage(image, xOffset, yOffset, width, height); + resolve(); + }; + image.onerror = function (error) { + reject(error); + }; + image.crossOrigin = 'anonymous'; + image.src = dataUrl; + _this._isEmpty = false; + }); + }; + SignaturePad.prototype.toDataURL = function (type, encoderOptions) { + if (type === void 0) { type = 'image/png'; } + switch (type) { + case 'image/svg+xml': + if (typeof encoderOptions !== 'object') { + encoderOptions = undefined; + } + return "data:image/svg+xml;base64," + btoa(this.toSVG(encoderOptions)); + default: + if (typeof encoderOptions !== 'number') { + encoderOptions = undefined; + } + return this.canvas.toDataURL(type, encoderOptions); + } + }; + SignaturePad.prototype.on = function () { + // Disable panning/zooming when touching canvas element + this.canvas.style.touchAction = 'none'; + this.canvas.style.msTouchAction = 'none'; + this.canvas.style.userSelect = 'none'; + var isIOS = /Macintosh/.test(navigator.userAgent) && 'ontouchstart' in document; + // The "Scribble" feature of iOS intercepts point events. So that we can lose some of them when tapping rapidly. + // Use touch events for iOS platforms to prevent it. See https://developer.apple.com/forums/thread/664108 for more information. + if (window.PointerEvent && !isIOS) { + this._handlePointerEvents(); + } + else { + this._handleMouseEvents(); + if ('ontouchstart' in window) { + this._handleTouchEvents(); + } + } + }; + SignaturePad.prototype.off = function () { + // Enable panning/zooming when touching canvas element + this.canvas.style.touchAction = 'auto'; + this.canvas.style.msTouchAction = 'auto'; + this.canvas.style.userSelect = 'auto'; + this.canvas.removeEventListener('pointerdown', this._handlePointerStart); + this.canvas.removeEventListener('pointermove', this._handlePointerMove); + this.canvas.ownerDocument.removeEventListener('pointerup', this._handlePointerEnd); + this.canvas.removeEventListener('mousedown', this._handleMouseDown); + this.canvas.removeEventListener('mousemove', this._handleMouseMove); + this.canvas.ownerDocument.removeEventListener('mouseup', this._handleMouseUp); + this.canvas.removeEventListener('touchstart', this._handleTouchStart); + this.canvas.removeEventListener('touchmove', this._handleTouchMove); + this.canvas.removeEventListener('touchend', this._handleTouchEnd); + }; + SignaturePad.prototype.isEmpty = function () { + return this._isEmpty; + }; + SignaturePad.prototype.fromData = function (pointGroups, _a) { + var _b = _a === void 0 ? {} : _a, _c = _b.clear, clear = _c === void 0 ? true : _c; + if (clear) { + this.clear(); + } + this._fromData(pointGroups, this._drawCurve.bind(this), this._drawDot.bind(this)); + this._data = this._data.concat(pointGroups); + }; + SignaturePad.prototype.toData = function () { + return this._data; + }; + SignaturePad.prototype._getPointGroupOptions = function (group) { + return { + penColor: group && 'penColor' in group ? group.penColor : this.penColor, + dotSize: group && 'dotSize' in group ? group.dotSize : this.dotSize, + minWidth: group && 'minWidth' in group ? group.minWidth : this.minWidth, + maxWidth: group && 'maxWidth' in group ? group.maxWidth : this.maxWidth, + velocityFilterWeight: group && 'velocityFilterWeight' in group + ? group.velocityFilterWeight + : this.velocityFilterWeight, + }; + }; + // Private methods + SignaturePad.prototype._strokeBegin = function (event) { + this.dispatchEvent(new CustomEvent('beginStroke', { detail: event })); + var pointGroupOptions = this._getPointGroupOptions(); + var newPointGroup = __assign(__assign({}, pointGroupOptions), { points: [] }); + this._data.push(newPointGroup); + this._reset(pointGroupOptions); + this._strokeUpdate(event); + }; + SignaturePad.prototype._strokeUpdate = function (event) { + if (this._data.length === 0) { + // This can happen if clear() was called while a signature is still in progress, + // or if there is a race condition between start/update events. + this._strokeBegin(event); + return; + } + this.dispatchEvent(new CustomEvent('beforeUpdateStroke', { detail: event })); + var x = event.clientX; + var y = event.clientY; + var pressure = event.pressure !== undefined + ? event.pressure + : event.force !== undefined + ? event.force + : 0; + var point = this._createPoint(x, y, pressure); + var lastPointGroup = this._data[this._data.length - 1]; + var lastPoints = lastPointGroup.points; + var lastPoint = lastPoints.length > 0 && lastPoints[lastPoints.length - 1]; + var isLastPointTooClose = lastPoint + ? point.distanceTo(lastPoint) <= this.minDistance + : false; + var pointGroupOptions = this._getPointGroupOptions(lastPointGroup); + // Skip this point if it's too close to the previous one + if (!lastPoint || !(lastPoint && isLastPointTooClose)) { + var curve = this._addPoint(point, pointGroupOptions); + if (!lastPoint) { + this._drawDot(point, pointGroupOptions); + } + else if (curve) { + this._drawCurve(curve, pointGroupOptions); + } + lastPoints.push({ + time: point.time, + x: point.x, + y: point.y, + pressure: point.pressure, + }); + } + this.dispatchEvent(new CustomEvent('afterUpdateStroke', { detail: event })); + }; + SignaturePad.prototype._strokeEnd = function (event) { + this._strokeUpdate(event); + this.dispatchEvent(new CustomEvent('endStroke', { detail: event })); + }; + SignaturePad.prototype._handlePointerEvents = function () { + this._drawningStroke = false; + this.canvas.addEventListener('pointerdown', this._handlePointerStart); + this.canvas.addEventListener('pointermove', this._handlePointerMove); + this.canvas.ownerDocument.addEventListener('pointerup', this._handlePointerEnd); + }; + SignaturePad.prototype._handleMouseEvents = function () { + this._drawningStroke = false; + this.canvas.addEventListener('mousedown', this._handleMouseDown); + this.canvas.addEventListener('mousemove', this._handleMouseMove); + this.canvas.ownerDocument.addEventListener('mouseup', this._handleMouseUp); + }; + SignaturePad.prototype._handleTouchEvents = function () { + this.canvas.addEventListener('touchstart', this._handleTouchStart); + this.canvas.addEventListener('touchmove', this._handleTouchMove); + this.canvas.addEventListener('touchend', this._handleTouchEnd); + }; + // Called when a new line is started + SignaturePad.prototype._reset = function (options) { + this._lastPoints = []; + this._lastVelocity = 0; + this._lastWidth = (options.minWidth + options.maxWidth) / 2; + this._ctx.fillStyle = options.penColor; + }; + SignaturePad.prototype._createPoint = function (x, y, pressure) { + var rect = this.canvas.getBoundingClientRect(); + return new point_1.Point(x - rect.left, y - rect.top, pressure, new Date().getTime()); + }; + // Add point to _lastPoints array and generate a new curve if there are enough points (i.e. 3) + SignaturePad.prototype._addPoint = function (point, options) { + var _lastPoints = this._lastPoints; + _lastPoints.push(point); + if (_lastPoints.length > 2) { + // To reduce the initial lag make it work with 3 points + // by copying the first point to the beginning. + if (_lastPoints.length === 3) { + _lastPoints.unshift(_lastPoints[0]); + } + // _points array will always have 4 points here. + var widths = this._calculateCurveWidths(_lastPoints[1], _lastPoints[2], options); + var curve = bezier_1.Bezier.fromPoints(_lastPoints, widths); + // Remove the first element from the list, so that there are no more than 4 points at any time. + _lastPoints.shift(); + return curve; + } + return null; + }; + SignaturePad.prototype._calculateCurveWidths = function (startPoint, endPoint, options) { + var velocity = options.velocityFilterWeight * endPoint.velocityFrom(startPoint) + + (1 - options.velocityFilterWeight) * this._lastVelocity; + var newWidth = this._strokeWidth(velocity, options); + var widths = { + end: newWidth, + start: this._lastWidth, + }; + this._lastVelocity = velocity; + this._lastWidth = newWidth; + return widths; + }; + SignaturePad.prototype._strokeWidth = function (velocity, options) { + return Math.max(options.maxWidth / (velocity + 1), options.minWidth); + }; + SignaturePad.prototype._drawCurveSegment = function (x, y, width) { + var ctx = this._ctx; + ctx.moveTo(x, y); + ctx.arc(x, y, width, 0, 2 * Math.PI, false); + this._isEmpty = false; + }; + SignaturePad.prototype._drawCurve = function (curve, options) { + var ctx = this._ctx; + var widthDelta = curve.endWidth - curve.startWidth; + // '2' is just an arbitrary number here. If only length is used, then + // there are gaps between curve segments :/ + var drawSteps = Math.ceil(curve.length()) * 2; + ctx.beginPath(); + ctx.fillStyle = options.penColor; + for (var i = 0; i < drawSteps; i += 1) { + // Calculate the Bezier (x, y) coordinate for this step. + var t = i / drawSteps; + var tt = t * t; + var ttt = tt * t; + var u = 1 - t; + var uu = u * u; + var uuu = uu * u; + var x = uuu * curve.startPoint.x; + x += 3 * uu * t * curve.control1.x; + x += 3 * u * tt * curve.control2.x; + x += ttt * curve.endPoint.x; + var y = uuu * curve.startPoint.y; + y += 3 * uu * t * curve.control1.y; + y += 3 * u * tt * curve.control2.y; + y += ttt * curve.endPoint.y; + var width = Math.min(curve.startWidth + ttt * widthDelta, options.maxWidth); + this._drawCurveSegment(x, y, width); + } + ctx.closePath(); + ctx.fill(); + }; + SignaturePad.prototype._drawDot = function (point, options) { + var ctx = this._ctx; + var width = options.dotSize > 0 + ? options.dotSize + : (options.minWidth + options.maxWidth) / 2; + ctx.beginPath(); + this._drawCurveSegment(point.x, point.y, width); + ctx.closePath(); + ctx.fillStyle = options.penColor; + ctx.fill(); + }; + SignaturePad.prototype._fromData = function (pointGroups, drawCurve, drawDot) { + for (var _i = 0, pointGroups_1 = pointGroups; _i < pointGroups_1.length; _i++) { + var group = pointGroups_1[_i]; + var points = group.points; + var pointGroupOptions = this._getPointGroupOptions(group); + if (points.length > 1) { + for (var j = 0; j < points.length; j += 1) { + var basicPoint = points[j]; + var point = new point_1.Point(basicPoint.x, basicPoint.y, basicPoint.pressure, basicPoint.time); + if (j === 0) { + this._reset(pointGroupOptions); + } + var curve = this._addPoint(point, pointGroupOptions); + if (curve) { + drawCurve(curve, pointGroupOptions); + } + } + } + else { + this._reset(pointGroupOptions); + drawDot(points[0], pointGroupOptions); + } + } + }; + SignaturePad.prototype.toSVG = function (_a) { + var _b = _a === void 0 ? {} : _a, _c = _b.includeBackgroundColor, includeBackgroundColor = _c === void 0 ? false : _c; + var pointGroups = this._data; + var ratio = Math.max(window.devicePixelRatio || 1, 1); + var minX = 0; + var minY = 0; + var maxX = this.canvas.width / ratio; + var maxY = this.canvas.height / ratio; + var svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg'); + svg.setAttribute('xmlns', 'http://www.w3.org/2000/svg'); + svg.setAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink'); + svg.setAttribute('viewBox', minX + " " + minY + " " + maxX + " " + maxY); + svg.setAttribute('width', maxX.toString()); + svg.setAttribute('height', maxY.toString()); + if (includeBackgroundColor && this.backgroundColor) { + var rect = document.createElement('rect'); + rect.setAttribute('width', '100%'); + rect.setAttribute('height', '100%'); + rect.setAttribute('fill', this.backgroundColor); + svg.appendChild(rect); + } + this._fromData(pointGroups, function (curve, _a) { + var penColor = _a.penColor; + var path = document.createElement('path'); + // Need to check curve for NaN values, these pop up when drawing + // lines on the canvas that are not continuous. E.g. Sharp corners + // or stopping mid-stroke and than continuing without lifting mouse. + /* eslint-disable no-restricted-globals */ + if (!isNaN(curve.control1.x) && + !isNaN(curve.control1.y) && + !isNaN(curve.control2.x) && + !isNaN(curve.control2.y)) { + var attr = "M " + curve.startPoint.x.toFixed(3) + "," + curve.startPoint.y.toFixed(3) + " " + + ("C " + curve.control1.x.toFixed(3) + "," + curve.control1.y.toFixed(3) + " ") + + (curve.control2.x.toFixed(3) + "," + curve.control2.y.toFixed(3) + " ") + + (curve.endPoint.x.toFixed(3) + "," + curve.endPoint.y.toFixed(3)); + path.setAttribute('d', attr); + path.setAttribute('stroke-width', (curve.endWidth * 2.25).toFixed(3)); + path.setAttribute('stroke', penColor); + path.setAttribute('fill', 'none'); + path.setAttribute('stroke-linecap', 'round'); + svg.appendChild(path); + } + /* eslint-enable no-restricted-globals */ + }, function (point, _a) { + var penColor = _a.penColor, dotSize = _a.dotSize, minWidth = _a.minWidth, maxWidth = _a.maxWidth; + var circle = document.createElement('circle'); + var size = dotSize > 0 ? dotSize : (minWidth + maxWidth) / 2; + circle.setAttribute('r', size.toString()); + circle.setAttribute('cx', point.x.toString()); + circle.setAttribute('cy', point.y.toString()); + circle.setAttribute('fill', penColor); + svg.appendChild(circle); + }); + return svg.outerHTML; + }; + return SignaturePad; +}(signature_event_target_1.SignatureEventTarget)); +exports.default = SignaturePad; +//# sourceMappingURL=signature_pad.js.map \ No newline at end of file diff --git a/BeWoPlanerMobil/node_modules/signature_pad/src/signature_pad.js.map b/BeWoPlanerMobil/node_modules/signature_pad/src/signature_pad.js.map new file mode 100644 index 000000000..982f4ffee --- /dev/null +++ b/BeWoPlanerMobil/node_modules/signature_pad/src/signature_pad.js.map @@ -0,0 +1 @@ +{"version":3,"file":"signature_pad.js","sourceRoot":"","sources":["signature_pad.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,mCAAkC;AAClC,iCAA4C;AAC5C,mEAAgE;AAChE,uCAAsC;AAoCtC;IAA0C,gCAAoB;IAqB5D,kCAAkC;IAElC,sBAAoB,MAAyB,EAAE,OAAqB;QAArB,wBAAA,EAAA,YAAqB;QAApE,YACE,iBAAO,SAqBR;QAtBmB,YAAM,GAAN,MAAM,CAAmB;QATrC,qBAAe,GAAG,KAAK,CAAC;QACxB,cAAQ,GAAG,IAAI,CAAC;QAChB,iBAAW,GAAY,EAAE,CAAC,CAAC,kEAAkE;QAC7F,WAAK,GAAiB,EAAE,CAAC,CAAC,0DAA0D;QACpF,mBAAa,GAAG,CAAC,CAAC;QAClB,gBAAU,GAAG,CAAC,CAAC;QA4KvB,iBAAiB;QACT,sBAAgB,GAAG,UAAC,KAAiB;YAC3C,IAAI,KAAK,CAAC,OAAO,KAAK,C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,CAAC,CACF,CAAC;QAEF,OAAO,GAAG,CAAC,SAAS,CAAC;IACvB,CAAC;IACH,mBAAC;AAAD,CAAC,AAhnBD,CAA0C,6CAAoB,GAgnB7D"} \ No newline at end of file diff --git a/BeWoPlanerMobil/node_modules/signature_pad/src/throttle.js b/BeWoPlanerMobil/node_modules/signature_pad/src/throttle.js new file mode 100644 index 000000000..e9c7cfc66 --- /dev/null +++ b/BeWoPlanerMobil/node_modules/signature_pad/src/throttle.js @@ -0,0 +1,50 @@ +"use strict"; +/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-this-alias */ +// Slightly simplified version of http://stackoverflow.com/a/27078401/815507 +Object.defineProperty(exports, "__esModule", { value: true }); +exports.throttle = void 0; +function throttle(fn, wait) { + if (wait === void 0) { wait = 250; } + var previous = 0; + var timeout = null; + var result; + var storedContext; + var storedArgs; + var later = function () { + previous = Date.now(); + timeout = null; + result = fn.apply(storedContext, storedArgs); + if (!timeout) { + storedContext = null; + storedArgs = []; + } + }; + return function wrapper() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var now = Date.now(); + var remaining = wait - (now - previous); + storedContext = this; + storedArgs = args; + if (remaining <= 0 || remaining > wait) { + if (timeout) { + clearTimeout(timeout); + timeout = null; + } + previous = now; + result = fn.apply(storedContext, storedArgs); + if (!timeout) { + storedContext = null; + storedArgs = []; + } + } + else if (!timeout) { + timeout = window.setTimeout(later, remaining); + } + return result; + }; +} +exports.throttle = throttle; +//# sourceMappingURL=throttle.js.map \ No newline at end of file diff --git a/BeWoPlanerMobil/node_modules/signature_pad/src/throttle.js.map b/BeWoPlanerMobil/node_modules/signature_pad/src/throttle.js.map new file mode 100644 index 000000000..3ce0212f9 --- /dev/null +++ b/BeWoPlanerMobil/node_modules/signature_pad/src/throttle.js.map @@ -0,0 +1 @@ +{"version":3,"file":"throttle.js","sourceRoot":"","sources":["throttle.ts"],"names":[],"mappings":";AAAA,yFAAyF;AACzF,4E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C,KAAK,EAAE,SAAS,CAAC,CAAC;SAC/C;QAED,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC;AACJ,CAAC;AA/CD,4BA+CC"} \ No newline at end of file diff --git a/Service/ServiceImplementations/CustomerServiceImp.cs b/Service/ServiceImplementations/CustomerServiceImp.cs index a1a11b0f1..41ebc3106 100644 --- a/Service/ServiceImplementations/CustomerServiceImp.cs +++ b/Service/ServiceImplementations/CustomerServiceImp.cs @@ -723,7 +723,7 @@ namespace BeWo.Service.ServiceImplementations var result = customers.Select(customer => MapperFactory.CompactCustomerDC_Customer.MapToNewDC(customer)).ToList(); ApplicationUser user; - if (LoggedInUserOperationContextExt.Current != null && LoggedInUserOperationContextExt.Current.User != null) + if(LoggedInUserOperationContextExt.Current != null && LoggedInUserOperationContextExt.Current.User != null) { user = LoggedInUserOperationContextExt.Current.User; } @@ -733,20 +733,25 @@ namespace BeWo.Service.ServiceImplementations } var relatedCustomerOids = new List(); - foreach (var customer in customers) + foreach(var customer in customers) { - foreach (var rel in customer.Employee2CustomerList) - { - if (rel.Employee.Equals(user.Employee) && rel.CustomerOid.HasValue) + if(customer.Team2CustomerList.Any(t2c => t2c.Team.Leader.Equals(user.Employee) || t2c.Team.MemberList.Contains(user.Employee)) && customer.Oid.HasValue) + { + relatedCustomerOids.AddIfNotIn(customer.Oid.Value); + } + + foreach(var rel in customer.Employee2CustomerList) + { + if(rel.Employee.Equals(user.Employee) && rel.CustomerOid.HasValue) { relatedCustomerOids.AddIfNotIn(rel.CustomerOid.Value); } } } - foreach (var customer in result) + foreach(var customer in result) { - if (relatedCustomerOids.Contains(customer.CustomerOid)) + if(relatedCustomerOids.Contains(customer.CustomerOid)) { customer.IsRelatedToEmployee = true; } From 2fd05fef1fd998b87a267a1539b25d06ea410ca4 Mon Sep 17 00:00:00 2001 From: Lyndon Jetten Date: Mon, 22 May 2023 14:05:32 +0200 Subject: [PATCH 2/2] MoK-Auswertungen: Ansicht verbessert. --- .../Controllers/ReportViewerController.cs | 4 ---- .../Views/ReportViewer/ReportViewer.cshtml | 22 +------------------ BeWoPlanerMobil/Views/Shared/_Layout.cshtml | 17 ++++++++------ 3 files changed, 11 insertions(+), 32 deletions(-) diff --git a/BeWoPlanerMobil/Controllers/ReportViewerController.cs b/BeWoPlanerMobil/Controllers/ReportViewerController.cs index a399a9e20..d81c8ad76 100644 --- a/BeWoPlanerMobil/Controllers/ReportViewerController.cs +++ b/BeWoPlanerMobil/Controllers/ReportViewerController.cs @@ -47,8 +47,6 @@ namespace BeWoPlanerMobil.Controllers public ActionResult ReportViewer() { - TempData["ErrorTest"] = "Das ist nur ein Test."; - Model.Report = null; var month = DateTime.Today.Month; @@ -217,8 +215,6 @@ namespace BeWoPlanerMobil.Controllers [Authorize] public ActionResult LoadMitarbeiterstundenkonto(string parameters) { - TempData["PartialViewErrorTest"] = "Das ist nur ein Test."; - if(Model?.Employee?.EmployeeOid is null) { return Logout(); diff --git a/BeWoPlanerMobil/Views/ReportViewer/ReportViewer.cshtml b/BeWoPlanerMobil/Views/ReportViewer/ReportViewer.cshtml index 3f90114e2..4df97d389 100644 --- a/BeWoPlanerMobil/Views/ReportViewer/ReportViewer.cshtml +++ b/BeWoPlanerMobil/Views/ReportViewer/ReportViewer.cshtml @@ -1,12 +1,6 @@ @using BeWoPlanerMobil.Util @model BeWoPlanerMobil.Models.ReportViewerModel - -