|
@@ -4,70 +4,11 @@
|
|
|
ViewData["Title"] = "Gewerk bearbeiten";
|
|
ViewData["Title"] = "Gewerk bearbeiten";
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-<script type="text/javascript">
|
|
|
|
|
-
|
|
|
|
|
- function calculateEmployeeAggregation() {
|
|
|
|
|
- var count = $("input[data-aggregation='employeeAmount']").length;
|
|
|
|
|
-
|
|
|
|
|
- var avgAmount = $("input[data-aggregation='employeeAmount']").map(function () {
|
|
|
|
|
- return parseFloat($(this).val());
|
|
|
|
|
- }).get().avg();
|
|
|
|
|
-
|
|
|
|
|
- var sumValues = $("input[data-aggregation='employeeValue']").map(function () {
|
|
|
|
|
- return parseFloat($(this).val());
|
|
|
|
|
- }).get().sum();
|
|
|
|
|
-
|
|
|
|
|
- $("#aggEmployeeCount").text(count);
|
|
|
|
|
- $("#aggEmployeeAmountAvg").text(isNaN(avgAmount) ? " -" : avgAmount + " Std.");
|
|
|
|
|
- $("#aggEmployeeValueSum").text(isNaN(sumValues) ? " -" : sumValues + " €");
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- function calculateMaterialAggregation() {
|
|
|
|
|
- var count = $("input[data-aggregation='materialCalculationFactor']").length;
|
|
|
|
|
-
|
|
|
|
|
- var avgCalculationFactor = $("input[data-aggregation='materialCalculationFactor']").map(function () {
|
|
|
|
|
- return parseFloat($(this).val());
|
|
|
|
|
- }).get().avg();
|
|
|
|
|
-
|
|
|
|
|
- var sumValues = $("input[data-aggregation='materialValue']").map(function () {
|
|
|
|
|
- return parseFloat($(this).val());
|
|
|
|
|
- }).get().sum();
|
|
|
|
|
-
|
|
|
|
|
- $("#aggMaterialCount").text(count);
|
|
|
|
|
- $("#aggMaterialCalculationFactorAvg").text(isNaN(avgCalculationFactor) ? " -" : avgCalculationFactor + " %");
|
|
|
|
|
- $("#aggMaterialValueSum").text(isNaN(sumValues) ? " -" : sumValues + " €");
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- function addCraftEmployeePartial() {
|
|
|
|
|
- $.ajax({
|
|
|
|
|
- type: "GET",
|
|
|
|
|
- url: '@Url.Action("AddCraftEmployeePartial")',
|
|
|
|
|
- data: {
|
|
|
|
|
- Index: $("#craftemployeelist").children(".row").length
|
|
|
|
|
- },
|
|
|
|
|
- success: function (data) {
|
|
|
|
|
- $("#craftemployeelist").append(data);
|
|
|
|
|
- calculateEmployeeAggregation();
|
|
|
|
|
- },
|
|
|
|
|
- error: function (errorData) { console.error(errorData); }
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- function addCraftMaterialPartial() {
|
|
|
|
|
- $.ajax({
|
|
|
|
|
- type: "GET",
|
|
|
|
|
- url: '@Url.Action("AddCraftMaterialPartial")',
|
|
|
|
|
- data: {
|
|
|
|
|
- Index: $("#craftmateriallist").children(".row").length
|
|
|
|
|
- },
|
|
|
|
|
- success: function (data) {
|
|
|
|
|
- $("#craftmateriallist").append(data);
|
|
|
|
|
- },
|
|
|
|
|
- error: function (errorData) { console.error(errorData); }
|
|
|
|
|
- });
|
|
|
|
|
|
|
+@section Scripts {
|
|
|
|
|
+ @{
|
|
|
|
|
+ await Html.RenderPartialAsync("_CraftScriptPartial");
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
-</script>
|
|
|
|
|
|
|
+}
|
|
|
|
|
|
|
|
<h1>Gewerk bearbeiten</h1>
|
|
<h1>Gewerk bearbeiten</h1>
|
|
|
|
|
|