Unterschriftenfeld füllt im quergehaltenen Handy nur noch 85% der Breite aus, sodass man mit den Rändern neben dem Feld scrollen kann.
Optimierung der Größenänderung des Unterschriftenfelds
This commit is contained in:
@@ -16,7 +16,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
protected readonly IValueListService ValueListService = new MobileSessionFacade().ValueListService;
|
||||
protected readonly IResourceService KalenderService = new MobileSessionFacade().ResourceService;
|
||||
protected readonly IUserService UserService = new MobileSessionFacade().UserService;
|
||||
protected const string _LeerzeichenFuerGetMethoden = " ";
|
||||
protected const string _LeerzeichenFuerGetMethoden = " ";
|
||||
|
||||
protected static readonly log4net.ILog Log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
if (!MobileSessionFacade.IsUserLoggedIn())
|
||||
{
|
||||
RedirectToActionPermanent("Index", "Login");
|
||||
Logout();
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
if (!MobileSessionFacade.IsUserLoggedIn() || Request.Browser.Browser.Equals("InternetExplorer"))
|
||||
{
|
||||
return RedirectToActionPermanent("Index", "Login");
|
||||
return Logout();
|
||||
}
|
||||
|
||||
InitViewModel();
|
||||
@@ -77,7 +77,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
if (!MobileSessionFacade.IsUserLoggedIn() || Request.Browser.Browser.Equals("InternetExplorer"))
|
||||
{
|
||||
return RedirectToActionPermanent("Index", "Login");
|
||||
return Logout();
|
||||
}
|
||||
|
||||
InitViewModel();
|
||||
@@ -99,7 +99,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
if (Model == null)
|
||||
{
|
||||
return RedirectToActionPermanent("Index", "Login");
|
||||
return Logout();
|
||||
}
|
||||
|
||||
var selectedCustomerOidString = formCollection[FormCollectionConstants.SelectedCustomerOidKey];
|
||||
|
||||
@@ -2,11 +2,9 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.UI.WebControls.WebParts;
|
||||
using System.Windows.Forms;
|
||||
using BeWo.Service.ServiceImplementations;
|
||||
|
||||
@@ -240,7 +238,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
if (Model == null)
|
||||
{
|
||||
return RedirectToActionPermanent("Index", "Login");
|
||||
return Logout();
|
||||
}
|
||||
|
||||
var newValue = "true,false" == collection[FormCollectionConstants.ShowOnlyOwnSupportConceptsKey];
|
||||
@@ -256,7 +254,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
if (Model == null)
|
||||
{
|
||||
return RedirectToActionPermanent("Index", "Login");
|
||||
return Logout();
|
||||
}
|
||||
|
||||
var newValue = "true,false" == pCollection[FormCollectionConstants.ShowExpiredSupportConceptsKey];
|
||||
@@ -271,7 +269,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
if (Model == null)
|
||||
{
|
||||
return RedirectToActionPermanent("Index", "Login");
|
||||
return Logout();
|
||||
}
|
||||
|
||||
var userSettings = GetUser().Settings;
|
||||
@@ -356,7 +354,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
if((!Model.CostBearer2SupportConceptOid.HasValue || Model.CostBearer2SupportConceptOid.Value > 0) && Model.SelectedSupportConcept == null)
|
||||
{
|
||||
RedirectToActionPermanent("Index", "Login");
|
||||
Logout();
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -457,7 +455,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
var settings = user?.SettingList.FirstOrDefault(f => f.Type.Equals(SettingsType.ApplicationSettings));
|
||||
|
||||
return settings != null ? MobileUtils.GetSettingValue(settings.Value, key) : null;
|
||||
return settings != null ? GetSettingValue(settings.Value, key) : null;
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
@@ -467,7 +465,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
if (Model == null)
|
||||
{
|
||||
RedirectToActionPermanent("Index", "Login");
|
||||
Logout();
|
||||
return _LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
|
||||
@@ -494,7 +492,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
if (Model == null)
|
||||
{
|
||||
RedirectToActionPermanent("Index", "Login");
|
||||
Logout();
|
||||
return _LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
|
||||
@@ -530,6 +528,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
if (Model == null || string.IsNullOrWhiteSpace(Model.SignatureImage))
|
||||
{
|
||||
Logout();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -572,8 +571,8 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
if (Model == null)
|
||||
{
|
||||
RedirectToActionPermanent("Index", "Login");
|
||||
return _LeerzeichenFuerGetMethoden;
|
||||
Logout();
|
||||
return _LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
|
||||
try
|
||||
@@ -599,7 +598,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
if (Model == null)
|
||||
{
|
||||
RedirectToActionPermanent("Index", "Login");
|
||||
Logout();
|
||||
return _LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
|
||||
@@ -613,7 +612,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
var textbausteine = OperationsService.GetAllTextModules();
|
||||
foreach (var tm in textbausteine)
|
||||
{
|
||||
if (String.IsNullOrWhiteSpace(tm.Text))
|
||||
if (string.IsNullOrWhiteSpace(tm.Text))
|
||||
{
|
||||
tm.Text = tm.Name;
|
||||
}
|
||||
@@ -667,7 +666,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
if (Model == null)
|
||||
{
|
||||
RedirectToActionPermanent("Index", "Login");
|
||||
Logout();
|
||||
return _LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
|
||||
@@ -684,7 +683,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
if(Model == null)
|
||||
{
|
||||
return RedirectToActionPermanent("Index", "Login");
|
||||
return Logout();
|
||||
}
|
||||
|
||||
string doku1;
|
||||
@@ -1304,7 +1303,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
if(Model == null)
|
||||
{
|
||||
return RedirectToActionPermanent("Index", "Login");
|
||||
return Logout();
|
||||
}
|
||||
|
||||
long? cb2ScOid = Convert.ToInt64(formCollection[FormCollectionConstants.CostBearer2SupportConceptOidKey]);
|
||||
@@ -1373,7 +1372,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
if (Model == null)
|
||||
{
|
||||
return RedirectToActionPermanent("Index", "Login");
|
||||
return Logout();
|
||||
}
|
||||
|
||||
Model.ServiceRecordOidToDelete = long.Parse(formCollection[FormCollectionConstants.ServiceRecordOidHolderKey]);
|
||||
@@ -1400,7 +1399,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
if (Model == null)
|
||||
{
|
||||
RedirectToActionPermanent("Index", "Login");
|
||||
Logout();
|
||||
return _LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
|
||||
@@ -1431,7 +1430,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
if (Model == null)
|
||||
{
|
||||
RedirectToActionPermanent("Index", "Login");
|
||||
Logout();
|
||||
return _LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
|
||||
@@ -1445,7 +1444,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
if (Model == null)
|
||||
{
|
||||
return RedirectToActionPermanent("Index", "Login");
|
||||
return Logout();
|
||||
}
|
||||
|
||||
var zeitraum = int.Parse(formCollection[FormCollectionConstants.RecordsKey]);
|
||||
@@ -1465,7 +1464,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
if (Model == null)
|
||||
{
|
||||
RedirectToActionPermanent("Index", "Login");
|
||||
Logout();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1498,7 +1497,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
if(Model == null)
|
||||
{
|
||||
return RedirectToActionPermanent("Index", "Login");
|
||||
return Logout();
|
||||
}
|
||||
|
||||
var oidString = formCollection[FormCollectionConstants.ServiceRecordOidHolder2Key];
|
||||
@@ -1547,7 +1546,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
if (Model == null)
|
||||
{
|
||||
RedirectToActionPermanent("Index", "Login");
|
||||
Logout();
|
||||
return _LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
|
||||
@@ -1565,7 +1564,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
if (Model == null)
|
||||
{
|
||||
RedirectToActionPermanent("Index", "Login");
|
||||
Logout();
|
||||
return _LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
|
||||
@@ -1579,7 +1578,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
if (Model == null)
|
||||
{
|
||||
RedirectToActionPermanent("Index", "Login");
|
||||
Logout();
|
||||
return _LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
|
||||
@@ -1869,7 +1868,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
if (Model == null)
|
||||
{
|
||||
RedirectToActionPermanent("Index", "Login");
|
||||
Logout();
|
||||
return _LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
|
||||
@@ -1960,7 +1959,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
if (Model == null)
|
||||
{
|
||||
return RedirectToActionPermanent("Index", "Login");
|
||||
return Logout();
|
||||
}
|
||||
|
||||
var isInGroupBookingMode = "true,false" == pFormCollection[FormCollectionConstants.IsInGroupBookingModeKey];
|
||||
@@ -1980,7 +1979,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
if (Model == null)
|
||||
{
|
||||
RedirectToActionPermanent("Index", "Login");
|
||||
Logout();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2038,7 +2037,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
if (Model == null)
|
||||
{
|
||||
return RedirectToActionPermanent("Index", "Login");
|
||||
return Logout();
|
||||
}
|
||||
|
||||
Model.NewServiceRecord = new ServiceRecordDC();
|
||||
@@ -2074,7 +2073,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
if(Model == null)
|
||||
{
|
||||
RedirectToActionPermanent("Index", "Login");
|
||||
Logout();
|
||||
return _LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
|
||||
@@ -2144,7 +2143,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
if(Model == null)
|
||||
{
|
||||
RedirectToActionPermanent("Index", "Login");
|
||||
Logout();
|
||||
return _LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
|
||||
@@ -2171,7 +2170,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
if(Model == null)
|
||||
{
|
||||
RedirectToActionPermanent("Index", "Login");
|
||||
Logout();
|
||||
return _LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
|
||||
@@ -2200,7 +2199,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
if(Model == null)
|
||||
{
|
||||
return RedirectToActionPermanent("Index", "Login");
|
||||
return Logout();
|
||||
}
|
||||
|
||||
var isParsingSuccessful2 = long.TryParse(pFormCollection[FormCollectionConstants.ServiceRecordOidHolder2Key], out var serviceRecordOid);
|
||||
@@ -2241,7 +2240,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
if(Model == null)
|
||||
{
|
||||
return RedirectToActionPermanent("Index", "Login");
|
||||
return Logout();
|
||||
}
|
||||
|
||||
if(Model.SelectedConceptCostBearerRelations.Count == 1)
|
||||
@@ -2464,7 +2463,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
if(Model == null)
|
||||
{
|
||||
return RedirectToActionPermanent("Index", "Login");
|
||||
return Logout();
|
||||
}
|
||||
try
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
using BeWo.Data.Entities;
|
||||
using System.Web.Razor.Parser.SyntaxTree;
|
||||
using BeWo.Report.ReportObjects;
|
||||
using BeWoPlanerMobil.Models;
|
||||
using BeWoPlanerMobil.Service;
|
||||
@@ -55,7 +55,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
if(!MobileSessionFacade.IsUserLoggedIn() || Request.Browser.Browser.Equals("InternetExplorer") || !AbstractModel.IsAllowedToSeeScheduler)
|
||||
{
|
||||
return RedirectToActionPermanent("Index", "Login");
|
||||
return Logout();
|
||||
}
|
||||
|
||||
var customers = EmployeeService.GetActiveCompactCustomersForEmployee(null);
|
||||
@@ -134,11 +134,36 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
[Authorize]
|
||||
[HttpPost]
|
||||
public ActionResult CreateEmployeeSignatureForServiceOverview(FormCollection formCollection)
|
||||
public string CreateEmployeeSignatureForServiceOverview(string base64SignatureString, string date)
|
||||
{
|
||||
if(Model == null)
|
||||
{
|
||||
Logout();
|
||||
}
|
||||
|
||||
var confirmationReceiptSignature = new ConfirmationReceiptSignatureDC();
|
||||
|
||||
return RedirectToActionPermanent("Report");
|
||||
var serviceRecordOids = Model.QuittierungsbelegItems.Select(item => item.ServiceRecordOid).ToList();
|
||||
var serviceRecords = OperationsService.GetServiceRecordsByIds(serviceRecordOids);
|
||||
|
||||
confirmationReceiptSignature.ServiceRecords = serviceRecords;
|
||||
confirmationReceiptSignature.EmployeeOid = Model.Employee.EmployeeOid;
|
||||
|
||||
using(var signatureBitmap = SignatureUtils.Base64StringToBitmap(base64SignatureString.Split(',')[1]))
|
||||
{
|
||||
var isValid = SignatureUtils.ValidateSignature(signatureBitmap);
|
||||
|
||||
if(!isValid)
|
||||
{
|
||||
return MobileUtils.SerializeObject("Das Unterschriftenfeld darf nicht leer sein.");
|
||||
}
|
||||
|
||||
confirmationReceiptSignature.SignatureImage = base64SignatureString;
|
||||
|
||||
OperationsService.InsertConfirmationReceiptSignature(confirmationReceiptSignature);
|
||||
}
|
||||
|
||||
return _LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -27,7 +27,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
if (!MobileSessionFacade.IsUserLoggedIn())
|
||||
{
|
||||
RedirectToActionPermanent("Index", "Login");
|
||||
Logout();
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
if (!MobileSessionFacade.IsUserLoggedIn() || Request.Browser.Browser.Equals("InternetExplorer") || !AbstractModel.IsAllowedToSeeScheduler)
|
||||
{
|
||||
return RedirectToActionPermanent("Index", "Login");
|
||||
return Logout();
|
||||
}
|
||||
|
||||
if(AbstractModel.HasRightToInsertRessourceAppointments)
|
||||
@@ -187,7 +187,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
if (Model == null)
|
||||
{
|
||||
RedirectToActionPermanent("Index", "Login");
|
||||
Logout();
|
||||
}
|
||||
|
||||
var rawStartDate = formCollection[FormCollectionConstants.AppointmentStartDateKey];
|
||||
@@ -258,7 +258,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
if (Model == null)
|
||||
{
|
||||
RedirectToActionPermanent("Index", "Login");
|
||||
Logout();
|
||||
}
|
||||
|
||||
Model.SelectedDate = Model.SelectedDate.AddDays(-1);
|
||||
@@ -278,7 +278,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
if(Model == null)
|
||||
{
|
||||
RedirectToActionPermanent("Index", "Login");
|
||||
Logout();
|
||||
}
|
||||
|
||||
Model.SelectedDate = Model.SelectedDate.AddDays(1);
|
||||
@@ -297,7 +297,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
public ActionResult SelectSchedulerDate(FormCollection formCollection) {
|
||||
if (Model == null)
|
||||
{
|
||||
RedirectToActionPermanent("Index", "Login");
|
||||
Logout();
|
||||
}
|
||||
|
||||
var rawSchedulerDate = formCollection[FormCollectionConstants.AppointmentSchedulerDateKey];
|
||||
@@ -349,6 +349,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
if (Model == null)
|
||||
{
|
||||
Logout();
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -394,6 +395,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
if(Model == null)
|
||||
{
|
||||
Logout();
|
||||
return _LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,15 +7,31 @@ function hideSignature() {
|
||||
$.get(url);
|
||||
}
|
||||
|
||||
function resizeCanvas() {
|
||||
if($("#sketch-pad").length !== 0) {
|
||||
var rowWidth = $("#canvas-row").innerWidth();
|
||||
var canvasWidth = $("#sketch-pad").innerWidth();
|
||||
function resizeCanvas(sketchPadId, canvasRoId) {
|
||||
if($(sketchPadId).length !== 0) {
|
||||
var rowWidth = $(canvasRoId).innerWidth();
|
||||
var canvasWidth = $(sketchPadId).innerWidth();
|
||||
|
||||
var newWidth = rowWidth;
|
||||
var h = $(window).height();
|
||||
var w = $(window).width();
|
||||
|
||||
if(newWidth !== canvasWidth) {
|
||||
$("#sketch-pad").prop("width", newWidth);
|
||||
var isInPortraitMode = h > w;
|
||||
|
||||
var newWidth = rowWidth * (isInPortraitMode === true ? 1.0 : 0.85);
|
||||
|
||||
var parsedNewWidth = parseInt(newWidth, 10);
|
||||
var parsedCanvasWidth = parseInt(canvasWidth, 10);
|
||||
|
||||
var isMinDifferenceMet = false;
|
||||
|
||||
if (parsedCanvasWidth > parsedNewWidth) {
|
||||
isMinDifferenceMet = parsedCanvasWidth - parsedNewWidth > 4;
|
||||
} else {
|
||||
isMinDifferenceMet = parsedNewWidth - parsedCanvasWidth > 4;
|
||||
}
|
||||
|
||||
if(isMinDifferenceMet) {
|
||||
$(sketchPadId).prop("width", newWidth);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -50,7 +66,7 @@ function initializeSignature(selectedServiceRecordOid) {
|
||||
$("#signature-employee").text(record.Employee.FirstName + " " + record.Employee.LastName);
|
||||
$("#signature-date-time").text(datum + " " + startDate + " - " + endDate);
|
||||
|
||||
resizeCanvas();
|
||||
resizeCanvas("#sketch-pad", "#canvas-row");
|
||||
|
||||
var canvas = document.getElementById("sketch-pad");
|
||||
|
||||
@@ -110,4 +126,4 @@ function initializeSignature(selectedServiceRecordOid) {
|
||||
}, false);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
function prepareReportSignature() {
|
||||
function initializeReportSignature() {
|
||||
$("#report-form-container").hide();
|
||||
$("#report-signature-container").addClass("d-block");
|
||||
|
||||
@@ -8,7 +8,46 @@
|
||||
|
||||
$("#report-info-column").html("Unterschrift für erbrachte Leistungen von " + customer + " im " + month + " " + year);
|
||||
|
||||
//resizeCanvas();
|
||||
resizeCanvas("#report-sketch-pad", "#report-canvas-row");
|
||||
|
||||
var canvas = document.getElementById("report-sketch-pad");
|
||||
|
||||
var signaturePad = new SignaturePad(canvas, { backgroundColor: "rgba(255, 255, 255, 0)" });
|
||||
|
||||
var saveButton = document.getElementById("save-report-signature-btn");
|
||||
var clearButton = document.getElementById("clear-report-canvas-btn");
|
||||
var cancelButton = document.getElementById("cancel-report-signature-btn");
|
||||
|
||||
saveButton.addEventListener("click", function(event) {
|
||||
var clonedCanvas = trimCanvas(cloneCanvas(document.getElementById("report-sketch-pad")));
|
||||
|
||||
var context = clonedCanvas.getContext("2d");
|
||||
context.globalCompositeOperation = "destination-over";
|
||||
context.fillStyle = "white";
|
||||
context.fillRect(0, 0, clonedCanvas.width, clonedCanvas.height);
|
||||
|
||||
var dataUrl = clonedCanvas.toDataURL("image/png");
|
||||
|
||||
var date = moment(new Date());
|
||||
var formattedDate = date.format("DD.MM.YYYY HH:mm:ss");
|
||||
});
|
||||
|
||||
clearButton.addEventListener("click", function(event) {
|
||||
signaturePad.clear();
|
||||
});
|
||||
|
||||
cancelButton.addEventListener("click", function(event) {
|
||||
showMessagePopupWithCallback("Unterschrift", "Sind Sie sicher, dass Sie die Unterschrift nicht speichern möchten?",
|
||||
function() {
|
||||
$("#report-signature-container").removeClass("d-block");
|
||||
$("#report-form-container").show();
|
||||
|
||||
signaturePad.clear();
|
||||
|
||||
//TODO: Notwendigkeit prüfen
|
||||
//$.get(getResetSignatureImageUrl());
|
||||
}, false);
|
||||
});
|
||||
}
|
||||
|
||||
function saveReportSignature() {
|
||||
|
||||
@@ -17,13 +17,15 @@ namespace BeWoPlanerMobil.Util
|
||||
|
||||
public string Employees { get; set; }
|
||||
|
||||
public long ServiceRecordOid { get; set; }
|
||||
|
||||
public QuittierungsbelegItem(ServicesOverviewRO.ServiceDetail serviceDetail)
|
||||
{
|
||||
Kontaktart = serviceDetail.IsGroup ? "GR" : "E";
|
||||
CustomersCount = serviceDetail.CustomerCount;
|
||||
Minutes = serviceDetail.Minutes;
|
||||
Employees = serviceDetail.EmployeeAbbr;
|
||||
Kontaktart = serviceDetail.IsGroup ? "GR" : "E";
|
||||
CustomersCount = serviceDetail.CustomerCount;
|
||||
Minutes = serviceDetail.Minutes;
|
||||
Employees = serviceDetail.EmployeeAbbr;
|
||||
ServiceRecordOid = serviceDetail.ServiceRecordOid;
|
||||
|
||||
DateTimeString = $"{serviceDetail.StartDate:dd.MM.yyyy HH:mm} - {serviceDetail.EndDate:HH:mm}";
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
}(jQuery));
|
||||
|
||||
$(window).resize(function() {
|
||||
resizeCanvas();
|
||||
resizeCanvas("#sketch-pad", "#canvas-row");
|
||||
});
|
||||
|
||||
function getSetServiceRecordEmployeeUrl() {
|
||||
@@ -1472,17 +1472,6 @@
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@if(Html.IsInDebugMode())
|
||||
{
|
||||
<div class="row">
|
||||
<div class="col text-secondary">
|
||||
Debuginfo:
|
||||
</div>
|
||||
<div class="col" id="debug-info">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
<div class="row">
|
||||
<div class="col text-secondary">
|
||||
Hilfeplan:
|
||||
|
||||
@@ -119,7 +119,7 @@ Info:
|
||||
<!-- Abstandshalter -->
|
||||
</div>
|
||||
<div class="ml-3 bd-highlight">
|
||||
<button type="button" class="btn btn-primary" id="signature-button" onclick="prepareReportSignature()">Unterschreiben</button>
|
||||
<button type="button" class="btn btn-primary" id="signature-button" onclick="initializeReportSignature()">Unterschreiben</button>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@@ -134,20 +134,20 @@ Info:
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<h4 class="d-inline" id="report-info-column">Unterschrift</h4>
|
||||
<button type="button" class="btn btn-primary float-right" onclick="confirmReportSignatureCancellation()">
|
||||
<button type="button" class="btn btn-primary float-right" id="cancel-report-signature-btn">
|
||||
<span class="fas fa-times-circle"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-3" id="canvas-row">
|
||||
<div class="row mt-3" id="report-canvas-row">
|
||||
<div class="canvas-container" id="canvas-container">
|
||||
<canvas id="sketch-pad" width="500" heigh="200" style="border: 1px solid #343A40" class="bg-white rounded"></canvas>
|
||||
<canvas id="report-sketch-pad" width="500" heigh="200" style="border: 1px solid #343A40" class="bg-white rounded"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<button type="button" class="btn btn-primary float-right" onclick="saveReportSignature()">Speichern</button>
|
||||
<button type="button" class="btn btn-secondary float-right mr-3" id="clear-canvas-btn">Neu</button>
|
||||
<button type="button" class="btn btn-primary float-right" id="save-report-signature-btn">Speichern</button>
|
||||
<button type="button" class="btn btn-secondary float-right mr-3" id="clear-report-canvas-btn">Neu</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ServiceModel;
|
||||
using BeWo.Data.Entities;
|
||||
using BS.Shared;
|
||||
using BS.Shared;
|
||||
using BS.Shared.Core;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
using BS.Shared.DataContracts.Reports;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ServiceModel;
|
||||
|
||||
namespace BeWo.Service.ServiceContracts
|
||||
{
|
||||
@@ -971,5 +970,9 @@ namespace BeWo.Service.ServiceContracts
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
List<AbsenceTimeDC> GetAbsenceTimeVacationByWohnheim(long wohnId, int year, int month);
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
List<ServiceRecordDC> GetServiceRecordsByIds(List<long> serviceRecordOids);
|
||||
}
|
||||
}
|
||||
@@ -6383,5 +6383,17 @@ namespace BeWo.Service.ServiceImplementations
|
||||
throw Utils.CreateBeWoFaultException(exception);
|
||||
}
|
||||
}
|
||||
|
||||
public List<ServiceRecordDC> GetServiceRecordsByIds(List<long> serviceRecordOids)
|
||||
{
|
||||
try
|
||||
{
|
||||
return MapperFactory.ServiceRecordDC_ServiceRecord.MapToNewDCs(DAOFactory.GenericDAO.LoadByIDs<ServiceRecord>(serviceRecordOids));
|
||||
}
|
||||
catch(Exception exception)
|
||||
{
|
||||
throw Utils.CreateBeWoFaultException(exception);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user