Merge branch 'master' of ssh://float.beyondsoft.de/git/beyondSoft/BeWo

# Conflicts:
#	Service/ServiceImplementations/OperationsServiceImp.cs
This commit is contained in:
Christian
2020-11-12 13:01:02 +01:00
14 changed files with 154 additions and 76 deletions

View File

@@ -28,9 +28,10 @@ namespace BeWo.ViewModel
private bool _IsExpanded;
private TextModuleVM _Parent;
public TextModuleVM(TextModuleDC pDataContract) : base(pDataContract, pDataContract.TextModuleOid == null) {}
private ActivationTypeId _ActivationType;
public TextModuleVM(TextModuleDC pDataContract) : base(pDataContract, pDataContract.TextModuleOid == null) {}
public bool IsExpanded
@@ -78,6 +79,22 @@ namespace BeWo.ViewModel
}
}
public ActivationTypeId ActivationType
{
get => _ActivationType;
set
{
if(AreDifferent(_ActivationType, value))
{
_ActivationType = value;
StoreDirtyInformation(AreDifferent(DataContract.ActivationType, value), nameof(ActivationType));
FirePropertyChanged(nameof(ActivationType));
}
}
}
public int Position
{
get => _Position;
@@ -207,6 +224,7 @@ namespace BeWo.ViewModel
pDataContract.Name = _Name;
pDataContract.IsParent = _IsParent;
pDataContract.IsExpanded = _IsExpanded;
pDataContract.ActivationType = _ActivationType;
pDataContract.IsOnlyForEmployee = _IsOnlyForEmployee;

View File

@@ -8,7 +8,7 @@
<IISExpressWindowsAuthentication />
<IISExpressUseClassicPipelineMode />
<UseGlobalApplicationHostFile />
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
<ProjectView>ShowAllFiles</ProjectView>
<WebStackScaffolding_ViewDialogWidth>600</WebStackScaffolding_ViewDialogWidth>
<Controller_SelectedScaffolderID>MvcControllerEmptyScaffolder</Controller_SelectedScaffolderID>

View File

@@ -91,6 +91,7 @@ namespace BeWoPlanerMobil.Controllers
Model.ShowExpiredSupportConcepts = GetUserSettingValue("ShowExpiredSupportConcepts") == "1";
Model.ShowOnlyOwnSupportConcepts = GetUserSettingValue("ShowOnlyMySupportConcepts") == "1";
var mandator = GetMandator();
@@ -912,6 +913,11 @@ namespace BeWoPlanerMobil.Controllers
var oidList = OperationsService.InsertNewServiceRecords(new List<ServiceRecordDC> { Model.NewServiceRecord });
Model.ServiceRecordOid = oidList[0];
if(Model.NewServiceRecord.CostBearer != null)
{
TempData[FormCollectionConstants.ShowSignatureSuggestionPopup] = true;
}
}
else
{
@@ -2143,7 +2149,7 @@ namespace BeWoPlanerMobil.Controllers
Model.ServiceCategories = CreateServiceCategoryModels(OperationsService.GetAllServiceDescriptions());
Model.SelectedEmployees.Add(MobileSessionFacade.LoggedInCompactEmployee);
Model.SelectedEmployees.AddIfNotIn(MobileSessionFacade.LoggedInCompactEmployee);
Model.IsInEditingMode = false;
Model.SelectedServiceRecord = null;

View File

@@ -120,7 +120,7 @@ namespace BeWoPlanerMobil.Models
public List<SupportConceptDC> SupportConcepts { get; set; }
public List<ServiceCategoryModel> ServiceCategories { get; set; }
public List<TextModuleDC> Textbausteine { get; set; }
public List<TextModuleDC> Textbausteine { get; set; } = new List<TextModuleDC>();
private List<ServiceRecordDC> _ServiceRecords;

View File

@@ -40,7 +40,8 @@ function showMessagePopupWithCallback(title, message, callback, executeCallbackB
});
if (executeCallbackByBothButtons === true) {
$("#message-popup-close-btn").on("click", function() {
$("#message-popup-close-btn, #message-popup-esc-btn").on("click",
function() {
callback();
});
}

View File

@@ -62,6 +62,15 @@ function loadServiceDescriptions() {
return;
}
var test = $.parseJSON(result);
if(test.length === 0) {
$("#textmodule-container").hide();
return;
}
$("#textmodule-container").show();
$("#tree").treeview({
data: result,
onNodeSelected: function (event, data) {

View File

@@ -44,6 +44,8 @@
public static string SelectedMonthKey => "SelectedMonth";
public static string SelectedYearKey => "SelectedYear";
public static string SelectedTeamOidKey => "SelectedTeamOid";
public static string ShowSignatureSuggestionPopup => "ShowSignatureSuggestionPopup";
public static string ServiceRecordOidForSignature => "ServiceRecordOidForSignature";
}
public class ModelSessionConstants

View File

@@ -185,6 +185,23 @@
</div>
</div>
</div>
<!-- Kommentar, falls vorhanden -->
@if(Model.SelectedJsonCustomer.Kommentar != null)
{
<div class="col-12 my-3">
<div class="card w-100">
<div class="card-header">
<h5 class="text-bewo-customer-card-header">Kommentar</h5>
</div>
<div class="card-body">
<div class="container-fluid">
@Model.SelectedJsonCustomer.Kommentar
</div>
</div>
</div>
</div>
}
<!-- Aktenzeichen -->
@if(Model.SelectedJsonCustomer.ReferenceNumbers.Any())

View File

@@ -105,6 +105,22 @@
$("#create-button").prop("disabled", @Model.SelectedEmployees.Count === 0 ? true : false);
</text>
}
@{
var shouldShowSignaturePopup = TempData[FormCollectionConstants.ShowSignatureSuggestionPopup]?.GetType() == typeof(bool) && (bool) TempData[FormCollectionConstants.ShowSignatureSuggestionPopup];
if(Model.ServiceRecordOid > 0)
{
if(shouldShowSignaturePopup && Model.ShowSignature)
{
<text>
showMessagePopupWithCallback("Erfolgreich gespeichert", "Möchten Sie den Eintrag unterschreiben lassen?", function() {
initializeSignature(@Model.ServiceRecordOid);
}, false);
</text>
}
}
}
});
function setInputFilter() {
@@ -490,18 +506,21 @@
}
</div>
<!-- Einzelbuchung: Distanz -->
<div class="form-row">
<div class="col-md">
<div class="form-group mb-1">
<label for="distance">Gefahrene Kilometer</label>
<input class="form-control" id="distance" name="Distanz" onchange="validateDistanceInput()" value="@Model.DistanceToEdit">
@if(Model.ShowDistanceField)
{
<div class="form-row">
<div class="col-md">
<div class="form-group mb-1">
<label for="distance">Gefahrene Kilometer</label>
<input class="form-control" id="distance" name="Distanz" onchange="validateDistanceInput()" value="@Model.DistanceToEdit">
</div>
</div>
</div>
</div>
}
@if(AbstractModel.HasRightToSeeTextModules)
{
<!-- Einzelbuchung: Textbausteine -->
<div class="form-row">
<div class="form-row" id="textmodule-container">
<div class="col-md">
<button type="button" class="btn btn-primary form-control mt-3" data-toggle="modal" data-target="#textbausteine-popup" id="textbausteine-button">Textbausteine</button>
</div>
@@ -794,7 +813,6 @@
var header = $"Dokumentation { i + 1 }";
// TODO: 3 Notices bei 2 aktiven Dokufeldern führt zu Exception. Was ist mit der dritten Notice? Nicht anzeigen?
if(Model.NumberOfDokuTypes >= 2)
{
if(Model.NumberOfDokuTypes <= i)
@@ -1012,19 +1030,22 @@
</div>
<!-- Gruppenbuchung: Distanz -->
<div class="form-row">
<div class="col-md">
<div class="form-group mb-1">
<label for="distance">Gefahrene Kilometer</label>
<input type="text" class="form-control" id="distance" name="Distanz" onchange="validateDistanceInput()">
@if(Model.ShowDistanceField)
{
<div class="form-row">
<div class="col-md">
<div class="form-group mb-1">
<label for="distance">Gefahrene Kilometer</label>
<input type="text" class="form-control" id="distance" name="Distanz" onchange="validateDistanceInput()">
</div>
</div>
</div>
</div>
}
<!-- Gruppenbuchung: Textbausteine -->
@if(AbstractModel.HasRightToSeeTextModules)
{
<div class="form-row">
<div class="form-row" id="textmodule-container">
<div class="col-md">
<button type="button" class="btn btn-primary form-control mt-3" data-toggle="modal" data-target="#textbausteine-popup" id="textbausteine-button">Textbausteine</button>
</div>
@@ -1110,7 +1131,7 @@
</div>
</div>
<!-- Hilfepläne hinzufügen -->
<!-- Gruppenbuchung: Hilfepläne hinzufügen -->
<div class="form-row">
<div class="col-md">
<div class="form-group my-1">
@@ -1141,7 +1162,7 @@
</div>
</div>
<!-- Mitarbeiter hinzufügen -->
<!-- Gruppenbuchung: Mitarbeiter hinzufügen -->
<div class="form-row">
<div class="col-md">
<div class="form-group mb-1">
@@ -1152,7 +1173,7 @@
</div>
</div>
<!-- Leistungskategorien -->
<!-- Gruppenbuchung: Leistungskategorien -->
<div class="form-row">
<div class="col-md">
<div class="form-group mb-1">
@@ -1162,7 +1183,7 @@
</div>
</div>
<!-- Leistung -->
<!-- Gruppenbuchung: Leistung -->
<div class="form-row">
<div class="col-md">
<div class="form-group mb-1">
@@ -1172,7 +1193,7 @@
</div>
</div>
<!-- Datum -->
<!-- Gruppenbuchung: Datum -->
<div class="form-row">
<div class="col-md">
<div class="form-group mb-1">
@@ -1201,7 +1222,7 @@
}
</div>
<!-- Start- und Endzeit -->
<!-- Gruppenbuchung: Start- und Endzeit -->
<div class="form-row">
<div class="col-md">
<div class="form-group mb-1">
@@ -1227,7 +1248,7 @@
</div>
</div>
<!-- Dauer -->
<!-- Gruppenbuchung: Dauer -->
<div class="form-row">
<div class="col-md">
<div class="form-group mb-1">
@@ -1254,27 +1275,30 @@
}
</div>
<!-- Distanz -->
<div class="form-row">
<div class="col-md">
<div class="form-group mb-1">
<label for="distance">Gefahrene Kilometer</label>
<input type="text" class="form-control" id="distance" name="Distanz" value="@Model.SelectedServiceRecord.DistanceInMeter">
</div>
</div>
</div>
<!-- Textbausteine -->
@if(AbstractModel.HasRightToSeeTextModules)
<!-- Gruppenbuchung: Distanz -->
@if(Model.ShowDistanceField)
{
<div class="form-row">
<div class="col-md">
<div class="form-group mb-1">
<label for="distance">Gefahrene Kilometer</label>
<input type="text" class="form-control" id="distance" name="Distanz" value="@Model.SelectedServiceRecord.DistanceInMeter">
</div>
</div>
</div>
}
<!-- Gruppenbuchung: Textbausteine -->
@if(AbstractModel.HasRightToSeeTextModules)
{
<div class="form-row" id="textmodule-container">
<div class="col-md">
<button type="button" class="btn btn-primary form-control mt-3" data-toggle="modal" data-target="#textbausteine-popup" id="textbausteine-button">Textbausteine</button>
</div>
</div>
}
<!-- Dokufelder -->
<!-- Gruppenbuchung: Dokufelder -->
<div class="form-row">
<div class="col-md mt-3">
@if(Model.NumberOfDokuTypes == 0)

View File

@@ -19,23 +19,24 @@
<link rel="stylesheet" href="~/Content/style.css">
<script src="~/Scripts/modernizr-2.8.3.js"></script>
<script src="~/Scripts/mobileUtils.js?v=1.4"></script>
<script src="~/Scripts/mobileUtils.js?v=1.5"></script>
<script src="~/Scripts/moment.min.js"></script>
<script src="~/Scripts/locale/de.js?v=1.4"></script>
<script src="~/Scripts/group-booking.js?v=1.4"></script>
<script src="~/Scripts/view-scripts/main.js?v=1.4"></script>
<script src="~/Scripts/signature.js?v=1.4"></script>
<script src="~/Scripts/locale/de.js?v=1.5"></script>
<script src="~/Scripts/group-booking.js?v=1.5"></script>
<script src="~/Scripts/view-scripts/main.js?v=1.5"></script>
<script src="~/Scripts/signature.js?v=1.5"></script>
<script src="~/Scripts/tempusdominus-boostrap-4.min.js"></script>
<link rel="stylesheet" href="~/Content/tempusdominus-bootstrap-4.min.css" />
<script src="~/Scripts/Chart.min.js?v=1.4"></script>
<script src="~/Scripts/support-concept-statistics.js?v=1.4"></script>
<script src="~/Scripts/view-scripts/customer.js?v=1.4"></script>
<script src="~/Scripts/view-scripts/scheduler.js?v=1.4"></script>
<script src="~/Scripts/utils/dateUtils.js?v=1.4"></script>
<script src="~/Scripts/view-scripts/report.js?v=1.4"></script>
<script src="~/Scripts/Chart.min.js?v=1.5"></script>
<script src="~/Scripts/support-concept-statistics.js?v=1.5"></script>
<script src="~/Scripts/view-scripts/customer.js?v=1.5"></script>
<script src="~/Scripts/view-scripts/scheduler.js?v=1.5"></script>
<script src="~/Scripts/utils/dateUtils.js?v=1.5"></script>
<script src="~/Scripts/view-scripts/report.js?v=1.5"></script>
<script src="https://cdn.jsdelivr.net/npm/signature_pad@2.3.2/dist/signature_pad.min.js"></script>
<script src="~/Scripts/utils/trimCanvas.js?v=1.4"></script>
<script src="~/Scripts/utils/trimCanvas.js?v=1.5"></script>
<script>
$(document).ready(function() {
try {
@@ -207,7 +208,7 @@
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="popupTitle"></h5>
<button class="close" type="button" data-dismiss="modal" aria-label="close">
<button class="close" type="button" data-dismiss="modal" aria-label="close" id="message-popup-esc-btn">
<span aria-hidden="true">&times;</span>
</button>
</div>
@@ -216,7 +217,7 @@
</div>
<div class="modal-footer">
<button class="btn btn-primary" type="button" data-dismiss="modal" id="message-popup-ok-btn">OK</button>
<button class="btn btn-secondary" type="button" data-dismiss="modal">Schließen</button>
<button class="btn btn-secondary" type="button" data-dismiss="modal" id="message-popup-close-btn">Schließen</button>
</div>
</div>
</div>

View File

@@ -1560,7 +1560,7 @@ namespace BeWo.Data.Access
public IEnumerable<TextModule> GetActiveTextModuleByServiceCategory(long pServiceCategoryOid)
{
var c = CreateCriteriaIsActive<TextModule>();
var c = CreateCriteria<TextModule>();
c.Add(Restrictions.Or(Restrictions.Eq(TextModule.PropertyName_ServiceCategory + ".Oid", pServiceCategoryOid), Restrictions.IsNull(TextModule.PropertyName_ServiceCategory)));
@@ -2380,7 +2380,7 @@ namespace BeWo.Data.Access
public IEnumerable<TextModule> GetActiveTextModules(bool pShouldOnlyLoadOwnTextModules, bool pHasRightToSeeAll, bool pIsInAdministrationView, long pEmployeeOid)
{
var criteria = CreateCriteriaIsActive<TextModule>();
var criteria = CreateCriteria<TextModule>();
if(pIsInAdministrationView)
{
@@ -2406,7 +2406,7 @@ namespace BeWo.Data.Access
public IEnumerable<TextModule> GetChildTextModules(TextModule textModule)
{
var criteria = CreateCriteriaIsActive<TextModule>();
var criteria = CreateCriteria<TextModule>();
criteria.Add(Restrictions.Eq(nameof(TextModule.Parent), textModule));

View File

@@ -4,26 +4,26 @@ namespace BeWo.Data.Entities
{
public class Textbaustein : BeWoEntityBase
{
public static string PropertyName_Text = "Text";
public static string PropertyName_Position = "Position";
public static string PropertyName_ServiceCategory = "ServiceCategory";
public static string PropertyName_Name = "Name";
public static string PropertyName_Employee = "Employee";
public static string PropertyName_Text = "Text";
public static string PropertyName_Position = "Position";
public static string PropertyName_ServiceCategory = "ServiceCategory";
public static string PropertyName_Name = "Name";
public static string PropertyName_Employee = "Employee";
public static string PropertyName_IsOnlyForEmployee = "IsOnlyForEmployee";
public static string PropertyName_ParentOid = "ParentOid";
public static string PropertyName_IsParent = "IsParent";
public static string PropertyName_IsExpanded = "IsExpanded";
public static string PropertyName_ParentOid = "ParentOid";
public static string PropertyName_IsParent = "IsParent";
public static string PropertyName_IsExpanded = "IsExpanded";
private string _Text;
private string _Name;
private int _Position;
private string _Text;
private string _Name;
private int _Position;
private ServiceCategory _ServiceCategory;
private Employee _Employee;
private bool _IsOnlyForEmployee;
private TextModule _Parent;
private bool _IsParent;
private bool _IsExpanded;
private Employee _Employee;
private bool _IsOnlyForEmployee;
private TextModule _Parent;
private bool _IsParent;
private bool _IsExpanded;
public Textbaustein()

View File

@@ -17,7 +17,7 @@
<property name="connection.connection_string">
Server=localhost;Password=root;User ID=root; Initial Catalog=1111111111
Server=localhost;Password=root;User ID=root; Initial Catalog=lhfrankfurtoder
</property>
<property name="dialect">

View File

@@ -223,7 +223,7 @@ namespace BeWo.Service.Plugins
//t = "7817461089"; // FAB e.V. (Familienarbeit und Beratung e.V.)
//t = "5207911843"; // Pro Balance
//t = "8619663355"; // HSH Cologne
//t = "1652658918"; // LH Frankfurt Oder
t = "1652658918"; // LH Frankfurt Oder
//t = "7696927868"; // Kuhring Betreuung
//t = "6251348980"; // BeWo Gün
//t = "6782533512"; // LH Dorsten