This commit is contained in:
2026-04-28 12:01:37 +02:00
parent f00ab79e9b
commit 63753087ea
31 changed files with 1173 additions and 280 deletions

View File

@@ -723,6 +723,9 @@
<Content Include="Views\DevExpressScheduler\AptFltCustomerPopupListPartial.cshtml" />
<Content Include="Views\DevExpressScheduler\AptFltResourcePopupListPartial.cshtml" />
<Content Include="Views\DevExpressScheduler\SchedulerNotificationPartial.cshtml" />
<Content Include="Views\DevExpressScheduler\NotificationPopupContent.cshtml" />
<Content Include="Views\DevExpressScheduler\NotificationsPopupContent.cshtml" />
<Content Include="Views\DevExpressScheduler\CustomEmployeeSelectPartial.cshtml" />
</ItemGroup>
<ItemGroup>
<Content Include="packages.config" />

View File

@@ -246,6 +246,9 @@ textarea {
--danger: #dc3545;
--light: #f8f9fa;
--dark: #343a40;
--bewo-apt-confirm: #48D44E;
--bewo-apt-maybe: #B927D9;
--bewo-apt-decline: #AB0030;
--bewo-archived-sc: #343A40;
--bewo-deleted-sc: #F87F7C;
--bewo-person: #B5662D;
@@ -1936,6 +1939,66 @@ pre code {
background-color: rgb(185.0216751269, 187.09, 189.1583248731);
}
.table-bewo-apt-confirm,
.table-bewo-apt-confirm > th,
.table-bewo-apt-confirm > td {
background-color: rgb(203.76, 242.96, 205.44);
}
.table-bewo-apt-confirm th,
.table-bewo-apt-confirm td,
.table-bewo-apt-confirm thead th,
.table-bewo-apt-confirm tbody + tbody {
border-color: rgb(159.84, 232.64, 162.96);
}
.table-hover .table-bewo-apt-confirm:hover {
background-color: rgb(183.1117699115, 238.1082300885, 185.4687610619);
}
.table-hover .table-bewo-apt-confirm:hover > td,
.table-hover .table-bewo-apt-confirm:hover > th {
background-color: rgb(183.1117699115, 238.1082300885, 185.4687610619);
}
.table-bewo-apt-maybe,
.table-bewo-apt-maybe > th,
.table-bewo-apt-maybe > td {
background-color: rgb(235.4, 194.52, 244.36);
}
.table-bewo-apt-maybe th,
.table-bewo-apt-maybe td,
.table-bewo-apt-maybe thead th,
.table-bewo-apt-maybe tbody + tbody {
border-color: rgb(218.6, 142.68, 235.24);
}
.table-hover .table-bewo-apt-maybe:hover {
background-color: rgb(228.3724409449, 172.8349606299, 240.5450393701);
}
.table-hover .table-bewo-apt-maybe:hover > td,
.table-hover .table-bewo-apt-maybe:hover > th {
background-color: rgb(228.3724409449, 172.8349606299, 240.5450393701);
}
.table-bewo-apt-decline,
.table-bewo-apt-decline > th,
.table-bewo-apt-decline > td {
background-color: rgb(231.48, 183.6, 197.04);
}
.table-bewo-apt-decline th,
.table-bewo-apt-decline td,
.table-bewo-apt-decline thead th,
.table-bewo-apt-decline tbody + tbody {
border-color: rgb(211.32, 122.4, 147.36);
}
.table-hover .table-bewo-apt-decline:hover {
background-color: rgb(225.1614159292, 164.4185840708, 181.4692035398);
}
.table-hover .table-bewo-apt-decline:hover > td,
.table-hover .table-bewo-apt-decline:hover > th {
background-color: rgb(225.1614159292, 164.4185840708, 181.4692035398);
}
.table-bewo-archived-sc,
.table-bewo-archived-sc > th,
.table-bewo-archived-sc > td {
@@ -3144,6 +3207,96 @@ fieldset:disabled a.btn {
box-shadow: 0 0 0 0.2rem rgba(82.45, 87.55, 92.65, 0.5);
}
.btn-bewo-apt-confirm {
color: #212529;
background-color: #48D44E;
border-color: #48D44E;
}
.btn-bewo-apt-confirm:hover {
color: #fff;
background-color: rgb(46.7577433628, 198.9922566372, 53.282079646);
border-color: rgb(44.3318584071, 188.6681415929, 50.517699115);
}
.btn-bewo-apt-confirm:focus, .btn-bewo-apt-confirm.focus {
color: #fff;
background-color: rgb(46.7577433628, 198.9922566372, 53.282079646);
border-color: rgb(44.3318584071, 188.6681415929, 50.517699115);
box-shadow: 0 0 0 0.2rem rgba(66.15, 185.75, 72.45, 0.5);
}
.btn-bewo-apt-confirm.disabled, .btn-bewo-apt-confirm:disabled {
color: #212529;
background-color: #48D44E;
border-color: #48D44E;
}
.btn-bewo-apt-confirm:not(:disabled):not(.disabled):active, .btn-bewo-apt-confirm:not(:disabled):not(.disabled).active, .show > .btn-bewo-apt-confirm.dropdown-toggle {
color: #fff;
background-color: rgb(44.3318584071, 188.6681415929, 50.517699115);
border-color: rgb(41.9059734513, 178.3440265487, 47.7533185841);
}
.btn-bewo-apt-confirm:not(:disabled):not(.disabled):active:focus, .btn-bewo-apt-confirm:not(:disabled):not(.disabled).active:focus, .show > .btn-bewo-apt-confirm.dropdown-toggle:focus {
box-shadow: 0 0 0 0.2rem rgba(66.15, 185.75, 72.45, 0.5);
}
.btn-bewo-apt-maybe {
color: #fff;
background-color: #B927D9;
border-color: #B927D9;
}
.btn-bewo-apt-maybe:hover {
color: #fff;
background-color: rgb(157.7401574803, 32.5767716535, 185.1732283465);
border-color: rgb(148.5039370079, 30.6692913386, 174.3307086614);
}
.btn-bewo-apt-maybe:focus, .btn-bewo-apt-maybe.focus {
color: #fff;
background-color: rgb(157.7401574803, 32.5767716535, 185.1732283465);
border-color: rgb(148.5039370079, 30.6692913386, 174.3307086614);
box-shadow: 0 0 0 0.2rem rgba(195.5, 71.4, 222.7, 0.5);
}
.btn-bewo-apt-maybe.disabled, .btn-bewo-apt-maybe:disabled {
color: #fff;
background-color: #B927D9;
border-color: #B927D9;
}
.btn-bewo-apt-maybe:not(:disabled):not(.disabled):active, .btn-bewo-apt-maybe:not(:disabled):not(.disabled).active, .show > .btn-bewo-apt-maybe.dropdown-toggle {
color: #fff;
background-color: rgb(148.5039370079, 30.6692913386, 174.3307086614);
border-color: rgb(139.2677165354, 28.7618110236, 163.4881889764);
}
.btn-bewo-apt-maybe:not(:disabled):not(.disabled):active:focus, .btn-bewo-apt-maybe:not(:disabled):not(.disabled).active:focus, .show > .btn-bewo-apt-maybe.dropdown-toggle:focus {
box-shadow: 0 0 0 0.2rem rgba(195.5, 71.4, 222.7, 0.5);
}
.btn-bewo-apt-decline {
color: #fff;
background-color: #AB0030;
border-color: #AB0030;
}
.btn-bewo-apt-decline:hover {
color: #fff;
background-color: rgb(132.75, 0, 37.2631578947);
border-color: rgb(120, 0, 33.6842105263);
}
.btn-bewo-apt-decline:focus, .btn-bewo-apt-decline.focus {
color: #fff;
background-color: rgb(132.75, 0, 37.2631578947);
border-color: rgb(120, 0, 33.6842105263);
box-shadow: 0 0 0 0.2rem rgba(183.6, 38.25, 79.05, 0.5);
}
.btn-bewo-apt-decline.disabled, .btn-bewo-apt-decline:disabled {
color: #fff;
background-color: #AB0030;
border-color: #AB0030;
}
.btn-bewo-apt-decline:not(:disabled):not(.disabled):active, .btn-bewo-apt-decline:not(:disabled):not(.disabled).active, .show > .btn-bewo-apt-decline.dropdown-toggle {
color: #fff;
background-color: rgb(120, 0, 33.6842105263);
border-color: rgb(107.25, 0, 30.1052631579);
}
.btn-bewo-apt-decline:not(:disabled):not(.disabled):active:focus, .btn-bewo-apt-decline:not(:disabled):not(.disabled).active:focus, .show > .btn-bewo-apt-decline.dropdown-toggle:focus {
box-shadow: 0 0 0 0.2rem rgba(183.6, 38.25, 79.05, 0.5);
}
.btn-bewo-archived-sc {
color: #fff;
background-color: #343A40;
@@ -3974,6 +4127,81 @@ fieldset:disabled a.btn {
box-shadow: 0 0 0 0.2rem rgba(52, 58, 64, 0.5);
}
.btn-outline-bewo-apt-confirm {
color: #48D44E;
border-color: #48D44E;
}
.btn-outline-bewo-apt-confirm:hover {
color: #212529;
background-color: #48D44E;
border-color: #48D44E;
}
.btn-outline-bewo-apt-confirm:focus, .btn-outline-bewo-apt-confirm.focus {
box-shadow: 0 0 0 0.2rem rgba(72, 212, 78, 0.5);
}
.btn-outline-bewo-apt-confirm.disabled, .btn-outline-bewo-apt-confirm:disabled {
color: #48D44E;
background-color: transparent;
}
.btn-outline-bewo-apt-confirm:not(:disabled):not(.disabled):active, .btn-outline-bewo-apt-confirm:not(:disabled):not(.disabled).active, .show > .btn-outline-bewo-apt-confirm.dropdown-toggle {
color: #212529;
background-color: #48D44E;
border-color: #48D44E;
}
.btn-outline-bewo-apt-confirm:not(:disabled):not(.disabled):active:focus, .btn-outline-bewo-apt-confirm:not(:disabled):not(.disabled).active:focus, .show > .btn-outline-bewo-apt-confirm.dropdown-toggle:focus {
box-shadow: 0 0 0 0.2rem rgba(72, 212, 78, 0.5);
}
.btn-outline-bewo-apt-maybe {
color: #B927D9;
border-color: #B927D9;
}
.btn-outline-bewo-apt-maybe:hover {
color: #fff;
background-color: #B927D9;
border-color: #B927D9;
}
.btn-outline-bewo-apt-maybe:focus, .btn-outline-bewo-apt-maybe.focus {
box-shadow: 0 0 0 0.2rem rgba(185, 39, 217, 0.5);
}
.btn-outline-bewo-apt-maybe.disabled, .btn-outline-bewo-apt-maybe:disabled {
color: #B927D9;
background-color: transparent;
}
.btn-outline-bewo-apt-maybe:not(:disabled):not(.disabled):active, .btn-outline-bewo-apt-maybe:not(:disabled):not(.disabled).active, .show > .btn-outline-bewo-apt-maybe.dropdown-toggle {
color: #fff;
background-color: #B927D9;
border-color: #B927D9;
}
.btn-outline-bewo-apt-maybe:not(:disabled):not(.disabled):active:focus, .btn-outline-bewo-apt-maybe:not(:disabled):not(.disabled).active:focus, .show > .btn-outline-bewo-apt-maybe.dropdown-toggle:focus {
box-shadow: 0 0 0 0.2rem rgba(185, 39, 217, 0.5);
}
.btn-outline-bewo-apt-decline {
color: #AB0030;
border-color: #AB0030;
}
.btn-outline-bewo-apt-decline:hover {
color: #fff;
background-color: #AB0030;
border-color: #AB0030;
}
.btn-outline-bewo-apt-decline:focus, .btn-outline-bewo-apt-decline.focus {
box-shadow: 0 0 0 0.2rem rgba(171, 0, 48, 0.5);
}
.btn-outline-bewo-apt-decline.disabled, .btn-outline-bewo-apt-decline:disabled {
color: #AB0030;
background-color: transparent;
}
.btn-outline-bewo-apt-decline:not(:disabled):not(.disabled):active, .btn-outline-bewo-apt-decline:not(:disabled):not(.disabled).active, .show > .btn-outline-bewo-apt-decline.dropdown-toggle {
color: #fff;
background-color: #AB0030;
border-color: #AB0030;
}
.btn-outline-bewo-apt-decline:not(:disabled):not(.disabled):active:focus, .btn-outline-bewo-apt-decline:not(:disabled):not(.disabled).active:focus, .show > .btn-outline-bewo-apt-decline.dropdown-toggle:focus {
box-shadow: 0 0 0 0.2rem rgba(171, 0, 48, 0.5);
}
.btn-outline-bewo-archived-sc {
color: #343A40;
border-color: #343A40;
@@ -6370,6 +6598,45 @@ a.badge-dark:focus, a.badge-dark.focus {
box-shadow: 0 0 0 0.2rem rgba(52, 58, 64, 0.5);
}
.badge-bewo-apt-confirm {
color: #212529;
background-color: #48D44E;
}
a.badge-bewo-apt-confirm:hover, a.badge-bewo-apt-confirm:focus {
color: #212529;
background-color: rgb(44.3318584071, 188.6681415929, 50.517699115);
}
a.badge-bewo-apt-confirm:focus, a.badge-bewo-apt-confirm.focus {
outline: 0;
box-shadow: 0 0 0 0.2rem rgba(72, 212, 78, 0.5);
}
.badge-bewo-apt-maybe {
color: #fff;
background-color: #B927D9;
}
a.badge-bewo-apt-maybe:hover, a.badge-bewo-apt-maybe:focus {
color: #fff;
background-color: rgb(148.5039370079, 30.6692913386, 174.3307086614);
}
a.badge-bewo-apt-maybe:focus, a.badge-bewo-apt-maybe.focus {
outline: 0;
box-shadow: 0 0 0 0.2rem rgba(185, 39, 217, 0.5);
}
.badge-bewo-apt-decline {
color: #fff;
background-color: #AB0030;
}
a.badge-bewo-apt-decline:hover, a.badge-bewo-apt-decline:focus {
color: #fff;
background-color: rgb(120, 0, 33.6842105263);
}
a.badge-bewo-apt-decline:focus, a.badge-bewo-apt-decline.focus {
outline: 0;
box-shadow: 0 0 0 0.2rem rgba(171, 0, 48, 0.5);
}
.badge-bewo-archived-sc {
color: #fff;
background-color: #343A40;
@@ -6784,6 +7051,42 @@ a.badge-bewo-report:focus, a.badge-bewo-report.focus {
color: rgb(4.1779310345, 4.66, 5.1420689655);
}
.alert-bewo-apt-confirm {
color: rgb(37.44, 110.24, 40.56);
background-color: rgb(218.4, 246.4, 219.6);
border-color: rgb(203.76, 242.96, 205.44);
}
.alert-bewo-apt-confirm hr {
border-top-color: rgb(183.1117699115, 238.1082300885, 185.4687610619);
}
.alert-bewo-apt-confirm .alert-link {
color: rgb(24.5104225352, 72.1695774648, 26.5529577465);
}
.alert-bewo-apt-maybe {
color: rgb(96.2, 20.28, 112.84);
background-color: rgb(241, 211.8, 247.4);
border-color: rgb(235.4, 194.52, 244.36);
}
.alert-bewo-apt-maybe hr {
border-top-color: rgb(228.3724409449, 172.8349606299, 240.5450393701);
}
.alert-bewo-apt-maybe .alert-link {
color: rgb(59.34453125, 12.51046875, 69.60953125);
}
.alert-bewo-apt-decline {
color: rgb(88.92, 0, 24.96);
background-color: rgb(238.2, 204, 213.6);
border-color: rgb(231.48, 183.6, 197.04);
}
.alert-bewo-apt-decline hr {
border-top-color: rgb(225.1614159292, 164.4185840708, 181.4692035398);
}
.alert-bewo-apt-decline .alert-link {
color: rgb(37.92, 0, 10.6442105263);
}
.alert-bewo-archived-sc {
color: rgb(27.04, 30.16, 33.28);
background-color: rgb(214.4, 215.6, 216.8);
@@ -7393,6 +7696,48 @@ a.badge-bewo-report:focus, a.badge-bewo-report.focus {
border-color: rgb(27.04, 30.16, 33.28);
}
.list-group-item-bewo-apt-confirm {
color: rgb(37.44, 110.24, 40.56);
background-color: rgb(203.76, 242.96, 205.44);
}
.list-group-item-bewo-apt-confirm.list-group-item-action:hover, .list-group-item-bewo-apt-confirm.list-group-item-action:focus {
color: rgb(37.44, 110.24, 40.56);
background-color: rgb(183.1117699115, 238.1082300885, 185.4687610619);
}
.list-group-item-bewo-apt-confirm.list-group-item-action.active {
color: #fff;
background-color: rgb(37.44, 110.24, 40.56);
border-color: rgb(37.44, 110.24, 40.56);
}
.list-group-item-bewo-apt-maybe {
color: rgb(96.2, 20.28, 112.84);
background-color: rgb(235.4, 194.52, 244.36);
}
.list-group-item-bewo-apt-maybe.list-group-item-action:hover, .list-group-item-bewo-apt-maybe.list-group-item-action:focus {
color: rgb(96.2, 20.28, 112.84);
background-color: rgb(228.3724409449, 172.8349606299, 240.5450393701);
}
.list-group-item-bewo-apt-maybe.list-group-item-action.active {
color: #fff;
background-color: rgb(96.2, 20.28, 112.84);
border-color: rgb(96.2, 20.28, 112.84);
}
.list-group-item-bewo-apt-decline {
color: rgb(88.92, 0, 24.96);
background-color: rgb(231.48, 183.6, 197.04);
}
.list-group-item-bewo-apt-decline.list-group-item-action:hover, .list-group-item-bewo-apt-decline.list-group-item-action:focus {
color: rgb(88.92, 0, 24.96);
background-color: rgb(225.1614159292, 164.4185840708, 181.4692035398);
}
.list-group-item-bewo-apt-decline.list-group-item-action.active {
color: #fff;
background-color: rgb(88.92, 0, 24.96);
border-color: rgb(88.92, 0, 24.96);
}
.list-group-item-bewo-archived-sc {
color: rgb(27.04, 30.16, 33.28);
background-color: rgb(198.16, 199.84, 201.52);
@@ -8516,6 +8861,36 @@ button.bg-dark:focus {
background-color: rgb(29.1379310345, 32.5, 35.8620689655) !important;
}
.bg-bewo-apt-confirm {
background-color: #48D44E !important;
}
a.bg-bewo-apt-confirm:hover, a.bg-bewo-apt-confirm:focus,
button.bg-bewo-apt-confirm:hover,
button.bg-bewo-apt-confirm:focus {
background-color: rgb(44.3318584071, 188.6681415929, 50.517699115) !important;
}
.bg-bewo-apt-maybe {
background-color: #B927D9 !important;
}
a.bg-bewo-apt-maybe:hover, a.bg-bewo-apt-maybe:focus,
button.bg-bewo-apt-maybe:hover,
button.bg-bewo-apt-maybe:focus {
background-color: rgb(148.5039370079, 30.6692913386, 174.3307086614) !important;
}
.bg-bewo-apt-decline {
background-color: #AB0030 !important;
}
a.bg-bewo-apt-decline:hover, a.bg-bewo-apt-decline:focus,
button.bg-bewo-apt-decline:hover,
button.bg-bewo-apt-decline:focus {
background-color: rgb(120, 0, 33.6842105263) !important;
}
.bg-bewo-archived-sc {
background-color: #343A40 !important;
}
@@ -8806,6 +9181,18 @@ button.bg-bewo-report:focus {
border-color: #343a40 !important;
}
.border-bewo-apt-confirm {
border-color: #48D44E !important;
}
.border-bewo-apt-maybe {
border-color: #B927D9 !important;
}
.border-bewo-apt-decline {
border-color: #AB0030 !important;
}
.border-bewo-archived-sc {
border-color: #343A40 !important;
}
@@ -11929,6 +12316,30 @@ a.text-dark:hover, a.text-dark:focus {
color: rgb(17.7068965517, 19.75, 21.7931034483) !important;
}
.text-bewo-apt-confirm {
color: #48D44E !important;
}
a.text-bewo-apt-confirm:hover, a.text-bewo-apt-confirm:focus {
color: rgb(39.4800884956, 168.0199115044, 44.9889380531) !important;
}
.text-bewo-apt-maybe {
color: #B927D9 !important;
}
a.text-bewo-apt-maybe:hover, a.text-bewo-apt-maybe:focus {
color: rgb(130.031496063, 26.8543307087, 152.6456692913) !important;
}
.text-bewo-apt-decline {
color: #AB0030 !important;
}
a.text-bewo-apt-decline:hover, a.text-bewo-apt-decline:focus {
color: rgb(94.5, 0, 26.5263157895) !important;
}
.text-bewo-archived-sc {
color: #343A40 !important;
}

File diff suppressed because one or more lines are too long

View File

@@ -1,28 +1,4 @@
$theme-colors:
(
"bewo-archived-sc": #343A40,
"bewo-deleted-sc": #F87F7C,
"bewo-person": #B5662D,
"bewo-organisation": #C8C000,
"bewo-custom-goal": #4682B4,
"service-record-marked": #c5e3ff,
"bewo-teams": #565999,
"bewo-goal-rating": #0000ff,
"bewo-dev": #00cf7c,
"primary": #FF5A00,
"bewo-customers": #3b7799,
"bewo-service-records": #c80000,
"bewo-calendar": #04b4d0,
"bewo-is-about-to-expire": #FF0000,
"bewo-expires-in-three-months": #FF9400,
"bewo-group-booking": #f9e79f,
"bewo-customer-card-header": #AB4A07,
"bewo-person-card-header": #AB4A07,
"bewo-employee": #45993B,
"bewo-resource": #04B4D0,
"bewo-task-red": #993B3B,
"bewo-report": #995E3B
);
$theme-colors: ( "bewo-apt-confirm": #48D44E, "bewo-apt-maybe": #B927D9, "bewo-apt-decline": #AB0030, "bewo-archived-sc": #343A40, "bewo-deleted-sc": #F87F7C, "bewo-person": #B5662D, "bewo-organisation": #C8C000, "bewo-custom-goal": #4682B4, "service-record-marked": #c5e3ff, "bewo-teams": #565999, "bewo-goal-rating": #0000ff, "bewo-dev": #00cf7c, "primary": #FF5A00, "bewo-customers": #3b7799, "bewo-service-records": #c80000, "bewo-calendar": #04b4d0, "bewo-is-about-to-expire": #FF0000, "bewo-expires-in-three-months": #FF9400, "bewo-group-booking": #f9e79f, "bewo-customer-card-header": #AB4A07, "bewo-person-card-header": #AB4A07, "bewo-employee": #45993B, "bewo-resource": #04B4D0, "bewo-task-red": #993B3B, "bewo-report": #995E3B );
a.disabled {
pointer-events: none;

View File

@@ -22,8 +22,8 @@ namespace BeWoPlanerMobil.Controllers
/*
* ToDo:
* 1. Filterung einbauen (Mitarbeiter, Klienten, Ressourcen, Privat, Aufgaben, Abwesenheiten)
* 2. "In die Zeiterfassung übertragen" und "Verfügbare Mitarbeiter prüfen" einbauen
* 3. Rechte implementieren!
* 2. Benachrichtigungen einbauen
* 3. Rechte implementieren
* 4. Übersetzungen
*/
@@ -93,19 +93,22 @@ namespace BeWoPlanerMobil.Controllers
private void InitViewModel()
{
if(false == MobileSessionFacade.IsUserLoggedIn() || Request.Browser.Browser.Equals("InternetExplorer") || Model?.LoggedInEmployee?.EmployeeOid is null)
if(false == MobileSessionFacade.IsUserLoggedIn() || Request.Browser.Browser.Equals("InternetExplorer") || Model?.LoggedInUser?.Employee is null)
{
Logout();
return;
}
var userSettings = LoggedInUser?.Settings.FirstOrDefault(f => f.Type.Equals(SettingsType.ApplicationSettings))?.Value;
var user = Model.LoggedInUser;
var compactEmployee = user.Employee;
var employeeOid = compactEmployee.EmployeeOid;
var userSettings = user.Settings.FirstOrDefault(f => f.Type.Equals(SettingsType.ApplicationSettings))?.Value;
Model.ShowOnlyMyOwnAppointments = UserSettingsUtils.GetSettingValueAsBool(userSettings, SettingsKeys.ZeigeNurMeineTermine);
if(Model.ShowOnlyMyOwnAppointments && LoggedInUser != null)
if(Model.ShowOnlyMyOwnAppointments)
{
Model.SelectedEmployeeOidsForFiltering = new List<long> { LoggedInUser.Employee.EmployeeOid };
Model.SelectedEmployeeOidsForFiltering = new List<long> { employeeOid };
}
Model.PossibleEmployees = EmployeeService.GetAllAuthorizedCompactEmployees();
@@ -123,26 +126,17 @@ namespace BeWoPlanerMobil.Controllers
categories2Resources.AddOrUpdateValueInDictionary(category, allResources.Where(resource => resource.ResourceCategory.Equals(category)).OrderBy(r => r.Name).ToList());
}
Model.ResourceCategories2Resources = categories2Resources.OrderBy(kvp => kvp.Key.DisplayName).ToDictionary(kvp => kvp.Key, kvp => kvp.Value);
Model.ResourceCategories2Resources = categories2Resources.OrderBy(category2Resources => category2Resources.Key.DisplayName).ToDictionary(kvp => kvp.Key, kvp => kvp.Value);
}
if(Model.LoggedInEmployee?.EmployeeOid.HasValue ?? false)
{
var compactEmployee = EmployeeService.GetActiveCompactEmployeeWithOid(Model.LoggedInEmployee.EmployeeOid.Value);
Model.MyTeamEmployees = EmployeeService.GetAllTeamMember(compactEmployee).OrderBy(employee => employee.LastName).ToList();
}
else
if(Model.HasRightToViewTeams)
{
Model.MyTeamEmployees = new List<CompactEmployeeDC>();
Model.MyTeams = EmployeeService.GetAllActiveCompactTeamsForEmployee(employeeOid).OrderBy(team => team.Name).ToList();
}
if(Model.HasRightToViewTeams && (Model?.LoggedInEmployee?.EmployeeOid.HasValue ?? false))
{
Model.MyTeams = EmployeeService.GetAllActiveCompactTeamsForEmployee(Model.LoggedInEmployee.EmployeeOid.Value).OrderBy(team => team.Name).ToList();
}
Model.TeamMemberCustomerOids = EmployeeService.LoadTeamsRelatedCustomerOids(LoggedInUser.Employee.EmployeeOid);
Model.TeamMemberCustomerOids = EmployeeService.LoadTeamsRelatedCustomerOids(employeeOid);
Model.SelectedEmployeesForFiltering = Model.PossibleEmployees.Where(possibleEmployee => Model.SelectedEmployeeOidsForFiltering?.Contains(possibleEmployee.EmployeeOid) ?? false).ToList();
Model.SelectedCustomersForFiltering = Model.PossibleCustomers.Where(possibleCustomer => Model.SelectedCustomerOidsForFiltering?.Contains(possibleCustomer.CustomerOid) ?? false).ToList();
@@ -160,10 +154,9 @@ namespace BeWoPlanerMobil.Controllers
UpdateSelectedObjects();
var employeeOid = Model.LoggedInEmployee.EmployeeOid.Value;
var user = LoggedInUser;
var userSettings = user?.Settings.FirstOrDefault(f => f.Type.Equals(SettingsType.ApplicationSettings))?.Value;
var employeeOid = user.Employee.EmployeeOid;
var userSettings = user.Settings.FirstOrDefault(f => f.Type.Equals(SettingsType.ApplicationSettings))?.Value;
Model.CurrentViewType = (SchedulerViewType) UserSettingsUtils.GetSettingValueAsInteger(userSettings, SettingsKeys.SchedulerViewType);
@@ -187,11 +180,11 @@ namespace BeWoPlanerMobil.Controllers
Model.ShowTasks
);
var selectedCustomerOids = Model.PossibleCustomers.Select(s => s.CustomerOid).ToList();
var selectedEmployeeOids = Model.PossibleEmployees.Select(s => s.EmployeeOid).ToList();
var allCustomerOids = Model.PossibleCustomers.Select(s => s.CustomerOid).ToList();
var allEmployeeOids = Model.PossibleEmployees.Select(s => s.EmployeeOid).ToList();
var customerAbsenceTimes = KalenderService.GetAllActiveCustomersAbsenceTimesInInterval(intervalStart, intervalEnd, employeeOid, selectedCustomerOids);
var employeeAbsenceTimes = KalenderService.GetAllActiveEmployeeAbsenceTimesInInterval(intervalStart, intervalEnd, employeeOid, selectedEmployeeOids);
var customerAbsenceTimes = KalenderService.GetAllActiveCustomersAbsenceTimesInInterval(intervalStart, intervalEnd, employeeOid, allCustomerOids);
var employeeAbsenceTimes = KalenderService.GetAllActiveEmployeeAbsenceTimesInInterval(intervalStart, intervalEnd, employeeOid, allEmployeeOids);
if(Model.ShowAbsenceTimes)
{
@@ -215,11 +208,25 @@ namespace BeWoPlanerMobil.Controllers
return PartialView("SchedulerNotificationPartial", Model);
}
private int LoadNotificationCount()
private void LoadNotificationCount()
{
Model.OpenAppointments = KalenderService.GetAllOpenAppointmentsForEmployee(LoggedInUser.Employee.EmployeeOid);
Model.OpenAppointments = KalenderService.GetAllOpenAppointmentsForEmployee(LoggedInUser.Employee.EmployeeOid).OrderByDescending(openAppointment => openAppointment.StartDate).ToList();
Model.OpenAppointmentOids = Model.OpenAppointments.Where(openAppointment => openAppointment.SchedulerAppointmentOid.HasValue).Select(openAppointment => openAppointment.SchedulerAppointmentOid.Value).ToList();
return Model.NotificationCount;
if(Model.AppointmentOid2Answer.HasValue)
{
Model.Appointment2Answer = Model.OpenAppointments.FirstOrDefault(openAppointment => openAppointment.SchedulerAppointmentOid?.Equals(Model.AppointmentOid2Answer.Value) ?? false);
}
else
{
var first = Model.OpenAppointments.FirstOrDefault();
if(first != null)
{
Model.Appointment2Answer = first;
Model.AppointmentOid2Answer = first.SchedulerAppointmentOid;
}
}
}
private List<SchedulerAppointmentDC> ConvertAbsenceTimesToAppointments(List<AbsenceTimeDC> absenceTimes, List<CompactCustomerDC> allCustomers, List<CompactEmployeeDC> allEmployees)
@@ -441,12 +448,12 @@ namespace BeWoPlanerMobil.Controllers
}
/// <summary>
/// Hier laufen Custom-Aufrufe drüber ab. Im JavaScript mit scheduler.PerformCallback(...) aufrufen.
/// Hierüber laufen Custom-Aufrufe des DevExpress-Schedulers ab. Im JavaScript mit scheduler.PerformCallback(...) aufrufen.
/// </summary>
/// <param name="apptID">Etwaige Id des Termin-Objekts</param>
/// <param name="actionId">Die Id der auszuführenden Methode</param>
/// <param name="args">Etwaige Parameter für die auszuführende Methode</param>
/// <returns>Entweder das Scheduler-Partial oder ein anderer Seitenaufruf.</returns>
/// <returns>Entweder das Scheduler-Partial oder einen anderen Seitenaufruf.</returns>
[Authorize]
public ActionResult CustomCallbackAction(string apptID, string actionId, string[] args)
{
@@ -455,7 +462,7 @@ namespace BeWoPlanerMobil.Controllers
case "ToServiceRecord":
return ToServiceRecord(apptID, actionId, args);
case "FilterAppointments":
return FilterAppointments(args.Length >= 1 ? args[0] : null);
return FilterAppointments(args?.Length >= 1 ? args[0] : null);
case "Reload":
ReloadAppointments();
break;
@@ -524,6 +531,7 @@ namespace BeWoPlanerMobil.Controllers
private void UpdateSelectedObjects()
{
var list = new List<ResourceDC>();
Model.ResourceCategories2Resources.Values.DoForEach(l => l.DoForEach(s => list.AddIfNotIn(s)));
Model.SelectedEmployees = Model.PossibleEmployees.Where(employee => Model.SelectedEmployeeOids.Contains(employee.EmployeeOid)).ToList();
@@ -533,10 +541,6 @@ namespace BeWoPlanerMobil.Controllers
Model.SelectedEmployeesForFiltering = Model.PossibleEmployees.Where(employee => Model.SelectedEmployeeOidsForFiltering.Contains(employee.EmployeeOid)).ToList();
Model.SelectedCustomersForFiltering = Model.PossibleCustomers.Where(customer => Model.SelectedCustomerOidsForFiltering.Contains(customer.CustomerOid)).ToList();
Model.SelectedResourcesForFiltering = list.Where(resource => resource.ResourceOid.HasValue && Model.SelectedResourceOidsForFiltering.Contains(resource.ResourceOid.Value)).ToList();
Model.SelectedEmployeesForIntervalFinder = Model.PossibleEmployees.Where(employee => Model.SelectedEmployeeOidsForIntervalFinder.Contains(employee.EmployeeOid)).ToList();
Model.SelectedCustomersForIntervalFinder = Model.PossibleCustomers.Where(customer => Model.SelectedCustomerOidsForIntervalFinder.Contains(customer.CustomerOid)).ToList();
Model.SelectedResourcesForIntervalFinder = list.Where(resource => resource.ResourceOid.HasValue && Model.SelectedResourceOidsForIntervalFinder.Contains(resource.ResourceOid.Value)).ToList();
}
[Authorize]
@@ -650,7 +654,7 @@ namespace BeWoPlanerMobil.Controllers
}
[Authorize]
public ActionResult UpdateEmployeeSelection(long[] selectedEmployeeOids)
public ActionResult UpdateEmployeeSelection(long[] selectedOids)
{
if(Model is null)
{
@@ -658,7 +662,12 @@ namespace BeWoPlanerMobil.Controllers
return PartialView("AptFltEmployeePopupListPartial");
}
var selectedEmployees = Model.PossibleEmployees.Where(possibleEmployee => selectedEmployeeOids.Contains(possibleEmployee.EmployeeOid)).ToList();
if(selectedOids is null)
{
selectedOids = Array.Empty<long>();
}
var selectedEmployees = Model.PossibleEmployees.Where(possibleEmployee => selectedOids.Contains(possibleEmployee.EmployeeOid)).ToList();
Model.SelectedEmployeesForFiltering = selectedEmployees;
Model.SelectedEmployeeOidsForFiltering = selectedEmployees.Select(employee => employee.EmployeeOid).ToList();
@@ -667,7 +676,7 @@ namespace BeWoPlanerMobil.Controllers
}
[Authorize]
public ActionResult UpdateCustomerSelection(long[] selectedCustomerOids)
public ActionResult UpdateCustomerSelection(long[] selectedOids)
{
if(Model is null)
{
@@ -675,7 +684,12 @@ namespace BeWoPlanerMobil.Controllers
return PartialView("AptFltCustomerPopupListPartial");
}
var selectedCustomers = Model.PossibleCustomers.Where(possibleCustomer => selectedCustomerOids.Contains(possibleCustomer.CustomerOid)).ToList();
if(selectedOids is null)
{
selectedOids = Array.Empty<long>();
}
var selectedCustomers = Model.PossibleCustomers.Where(possibleCustomer => selectedOids.Contains(possibleCustomer.CustomerOid)).ToList();
Model.SelectedCustomersForFiltering = selectedCustomers;
Model.SelectedCustomerOidsForFiltering = selectedCustomers.Select(customer => customer.CustomerOid).ToList();
@@ -684,7 +698,7 @@ namespace BeWoPlanerMobil.Controllers
}
[Authorize]
public ActionResult UpdateResourceSelection(long[] selectedResourceOids)
public ActionResult UpdateResourceSelection(long[] selectedOids)
{
if(Model is null)
{
@@ -692,7 +706,12 @@ namespace BeWoPlanerMobil.Controllers
return PartialView("AptFltResourcePopupListPartial");
}
var selectedResources = Model.PossibleResources.Where(possibleResource => possibleResource.ResourceOid.HasValue && selectedResourceOids.Contains(possibleResource.ResourceOid.Value)).ToList();
if(selectedOids is null)
{
selectedOids = Array.Empty<long>();
}
var selectedResources = Model.PossibleResources.Where(possibleResource => possibleResource.ResourceOid.HasValue && selectedOids.Contains(possibleResource.ResourceOid.Value)).ToList();
Model.SelectedResourcesForFiltering = selectedResources;
Model.SelectedResourceOidsForFiltering = selectedResources.Where(resource => resource.ResourceOid.HasValue).Select(resource => resource.ResourceOid.Value).ToList();
@@ -762,5 +781,84 @@ namespace BeWoPlanerMobil.Controllers
return PartialView("SchedulerPagePartial", Model);
}
[Authorize]
public ActionResult LoadAppointmentToAnswer(long oid)
{
Model.Appointment2Answer = Model.OpenAppointments.FirstOrDefault(openAppointment => openAppointment.SchedulerAppointmentOid?.Equals(oid) ?? false);
return PartialView("NotificationPopupContent", Model);
}
[Authorize]
public ActionResult AnswerOpenAppointment(int answer)
{
var appointment = Model.Appointment2Answer;
var employeeRelation = appointment.EmployeeList.FirstOrDefault(employee2Appointment => employee2Appointment.Employee.EmployeeOid == Model.LoggedInUser.Employee.EmployeeOid);
if(employeeRelation != null)
{
employeeRelation.ParticipationAnswer = (ParticipationAnswer) answer;
employeeRelation.IsPChanged = true;
employeeRelation.IsPC_CheckedTs = DateTime.Now;
}
KalenderService.UpdateSchedulerAppointments(new List<SchedulerAppointmentDC> { appointment });
Model.Appointment2Answer = null;
Model.AppointmentOid2Answer = null;
ReloadAppointments();
return PartialView("NotificationsPopupContent", Model);
}
[Authorize]
public ActionResult ConfirmAllOpenAppointments()
{
Model.OpenAppointments = KalenderService.GetAllOpenAppointmentsForEmployee(Model.LoggedInUser.Employee.EmployeeOid);
foreach(var openAppointment in Model.OpenAppointments)
{
var employee2Appointment = openAppointment.EmployeeList.First(first => first.Employee.Equals(Model.LoggedInUser.Employee));
employee2Appointment.ParticipationAnswer = openAppointment.EndDate is null || openAppointment.EndDate > DateTime.Now ? ParticipationAnswer.Zusage : ParticipationAnswer.Verstrichen;
employee2Appointment.IsPChanged = true;
employee2Appointment.IsPC_CheckedTs = DateTime.Now;
}
KalenderService.UpdateSchedulerAppointments(Model.OpenAppointments);
Model.Appointment2Answer = null;
Model.AppointmentOid2Answer = null;
ReloadAppointments();
return PartialView("NotificationsPopupContent", Model);
}
[Authorize]
public ActionResult RightClickConfirm(int answer, long id)
{
var appointments = (List<SchedulerAppointmentDC>) Model.Appointments;
var appointment2Answer = appointments.FirstOrDefault(appointment => appointment.SchedulerAppointmentOid?.Equals(id) ?? false);
var rel = appointment2Answer?.EmployeeList.FirstOrDefault(employee2Appointment => employee2Appointment.Employee.Equals(Model.LoggedInCompactEmployee));
if(rel != null)
{
rel.ParticipationAnswer = (ParticipationAnswer) answer;
rel.IsPChanged = true;
rel.IsPC_CheckedTs = DateTime.Now;
}
KalenderService.UpdateSchedulerAppointments(new List<SchedulerAppointmentDC> { appointment2Answer });
ReloadAppointments();
return PartialView("SchedulerPagePartial", Model);
}
}
}

View File

@@ -2583,7 +2583,7 @@ namespace BeWoPlanerMobil.Controllers
[Authorize]
public ActionResult SelectRecordToEdit(FormCollection formCollection)
{
if(!IsUserLoggedIn())
if(false == IsUserLoggedIn())
{
TempData[TempDataConstants.DoLogoutKey] = true;
return Logout();

View File

@@ -114,6 +114,10 @@ namespace BeWoPlanerMobil.Controllers
{
Model.SelectedServiceCategory = Model.ServiceCategories.FirstOrDefault(serviceCategory => serviceCategory.ServiceCategoryOid == Model.SelectedServiceCategoryOid.Value);
}
Model.QbEntryPageCount = Model.ReportSessionModel.QbEntryPageCount;
Model.QbEntryCount = Model.ReportSessionModel.QbEntryCount;
Model.CurrentQbEntryPage = Model.ReportSessionModel.CurrentQbEntryPage;
}
private static AbstractReportCreator GetReportCreator()

View File

@@ -715,38 +715,6 @@ namespace BeWoPlanerMobil.Controllers
return RedirectToActionPermanent("Scheduler");
}
[Authorize]
[HttpPost]
public ActionResult FindFreeIntervals(FormCollection formCollection)
{
if(Model is null)
{
TempData[TempDataConstants.DoLogoutKey] = true;
return Logout();
}
var durationString = formCollection["Duration"];
var intervalStartDateString = formCollection["IntervalStart"].Substring(0, 10);
var intervalStartTimeString = formCollection["IntervalStart"].Substring(11, 5);
var intervalEndDateString = formCollection["IntervalEnd"].Substring(0, 10);
var intervalEndTimeString = formCollection["IntervalEnd"].Substring(11, 5);
if(int.TryParse(durationString, out var intervalDuration) && DateTime.TryParse($"{intervalStartDateString} {intervalStartTimeString}", out var intervalStart) && DateTime.TryParse($"{intervalEndDateString} {intervalEndTimeString}", out var intervalEnd) && Model.LoggedInEmployee.EmployeeOid.HasValue)
{
var customerOids = Model.SelectedCustomerOidsForIntervalFinder.Clone();
var employeeOids = Model.SelectedEmployeeOidsForIntervalFinder.Clone();
var resourceOids = Model.SelectedResourceOidsForIntervalFinder.Clone();
Model.FreeIntervals = KalenderService.FindAppointmentsInRangeForIntervalFinder(intervalDuration, intervalStart, intervalEnd, resourceOids, customerOids, employeeOids, Model.LoggedInEmployee.EmployeeOid.Value);
Model.IntervalStartDate = intervalStart;
Model.IntervalEndDate = intervalEnd;
Model.IntervalDuration = intervalDuration;
}
return RedirectToActionPermanent("Scheduler", Model);
}
[Authorize]
public ActionResult FindFreeIntervalsGet(int duration, string startStr, string endStr)
{

View File

@@ -35,6 +35,8 @@ namespace BeWoPlanerMobil.Models
public BaseSessionModel SessionModel { get; internal set; }
public UserDC LoggedInUser { get; set; }
public long LoggedInUserOid => LoggedInUser.Employee.EmployeeOid;
public CompactEmployeeDC LoggedInCompactEmployee => LoggedInUser.Employee;
public MokMandator Mandator { get; set; }

View File

@@ -69,6 +69,13 @@ namespace BeWoPlanerMobil.Models
return null;
}
public long? AppointmentOid2Answer
{
get => DevExpressSchedulerSessionModel.AppointmentOid2Answer;
set => DevExpressSchedulerSessionModel.AppointmentOid2Answer = value;
}
public SchedulerAppointmentDC Appointment2Answer { get; set; }
public List<long> SelectedEmployeeOidsForFiltering
{
get => DevExpressSchedulerSessionModel.SelectedEmployeeOidsForFiltering;

View File

@@ -19,6 +19,7 @@ namespace BeWoPlanerMobil.Models
public List<long> SelectedResourceOidsForIntervalFinder { get; set; }
public List<long> OpenAppointmentOids { get; set; }
public long? AppointmentOid2Answer { get; set; }
public bool ShowTasks { get; set; }
public bool ShowOnlyPrivateAppointments { get; set; }
@@ -29,7 +30,7 @@ namespace BeWoPlanerMobil.Models
public bool ShowEmployeeColors { get; set; }
public bool ShowOnlyMyOwnAppointments { get; set; }
public int NotificationCount { get; set; }
public int NotificationCount => OpenAppointmentOids?.Count ?? 0;
public override void ResetValues()
{
@@ -57,8 +58,6 @@ namespace BeWoPlanerMobil.Models
ShowAbsenceTimes = false;
ShowEmployeeColors = false;
ShowOnlyMyOwnAppointments = false;
NotificationCount = 0;
}
}
}

View File

@@ -347,10 +347,24 @@ namespace BeWoPlanerMobil.Models
public XtraReport QuittierungsbelegsReport { get; set; }
public int QbEntryCount { get; set; }
public int QbEntryCount
{
get => ReportSessionModel.QbEntryCount;
set => ReportSessionModel.QbEntryCount = value;
}
public int MaxResults { get; set; } = 10;
public int QbEntryPageCount { get; set; }
public int CurrentQbEntryPage { get; set; }
public int QbEntryPageCount
{
get => ReportSessionModel.QbEntryPageCount;
set => ReportSessionModel.QbEntryPageCount = value;
}
public int CurrentQbEntryPage
{
get => ReportSessionModel.CurrentQbEntryPage;
set => ReportSessionModel.CurrentQbEntryPage = value;
}
public List<RatingTypeDC> GoalRatingTypes { get; set; } = new List<RatingTypeDC>();

View File

@@ -30,6 +30,9 @@ namespace BeWoPlanerMobil.Models
public QbSignatureIntervalSelection SelectedIntervalSelection { get; internal set; }
public List<ConfirmationReceiptSignatureDC> ConfirmationReceiptSignatures { get; internal set; }
public Dictionary<long, List<string>> ServiceRecordOids2GoalHeader { get; internal set; }
public int QbEntryPageCount { get; internal set; }
public int QbEntryCount { get; internal set; }
public int CurrentQbEntryPage { get; internal set; }
public override void ResetValues()
{

View File

@@ -53,10 +53,14 @@
showSpinner();
$("#customer-input-container").load(
"@Url.Action("UpdateCustomerSelection")",
{ selectedCustomerOids: selectedCustomerOids },
{ selectedOids: selectedCustomerOids },
() => {
scheduler.Refresh();
$.get("@Url.Action("GetSelectedCustomersForAptFlt")", function(numberOfSelectedCustomers) {
$("#sel-cus-bdg").text(numberOfSelectedCustomers);
hideSpinner();
});
}
);
}

View File

@@ -59,15 +59,31 @@
showSpinner();
logInfo3(`Es wurden ${selectedEmployeeOids.length} Mitarbeiter ausgewählt.`);
$("#employee-input-container").load(
"@Url.Action("UpdateEmployeeSelection", "DevExpressScheduler")",
{
selectedEmployeeOids: selectedEmployeeOids
selectedOids: selectedEmployeeOids
},
() => {
scheduler.Refresh();
$.get("@Url.Action("GetSelectedEmployeesForAptFlt")", function(numberOfSelectedEmployees) {
@if(Html.IsInDebugMode())
{
<text>
if($("#sel-emp-bdg").length === 0) {
alert("Das Mitarbeiter-Badge ist nicht erreichbar!");
}
</text>
}
$("#sel-emp-bdg").text(numberOfSelectedEmployees);
hideSpinner();
});
});
}
</script>

View File

@@ -29,11 +29,15 @@
$("#resource-input-container").load(
"@Url.Action("UpdateResourceSelection")",
{
selectedResourceOids: selectedResourceOids
selectedOids: selectedResourceOids
},
() => {
scheduler.Refresh();
$.get("@Url.Action("GetSelectedResourcesForAptFlt")", function(numberOfSelectedResources) {
$("#sel-res-bdg").text(numberOfSelectedResources);
hideSpinner();
});
}
);
}

View File

@@ -131,6 +131,24 @@
</td>
</tr>
<tr>
<td colspan="4">
<table>
<tr>
<td style="width: 33%; padding: .25em;">
@Html.Partial("CustomEmployeeSelectPartial", Model)
</td>
<td style="width: 33%; padding: .25em;">
</td>
<td style="width: 33%; padding: .25em;">
</td>
</tr>
</table>
</td>
</tr>
@* Betreff *@
<tr>
<td>

View File

@@ -0,0 +1,80 @@
@using BS.Shared
@model BeWoPlanerMobil.Models.AppointmentModel
<script type="text/javascript">
</script>
@functions
{
string GetParticipationColor(ParticipationAnswer participationAnswer)
{
var background = "";
switch(participationAnswer)
{
case ParticipationAnswer.Zusage:
background = "#48D44E";
break;
case ParticipationAnswer.Vorbehalt:
background = "#B927D9";
break;
case ParticipationAnswer.Absage:
background = "#AB0030";
break;
}
return background;
}
}
<div class="dropdown">
<button class="btn btn-bewo-employee dropdown-toggle" type="button" data-toggle="dropdown">
Mitarbeiter
</button>
<div class="dropdown-menu">
<a class="dropdown-item" href="#">Action</a>
<a class="dropdown-item" href="#">Another action</a>
<a class="dropdown-item" href="#">Something else here</a>
@foreach(var employee in Model.PossibleEmployees)
{
var isChecked = Model.SelectedEmployeeOids.Contains(employee.EmployeeOid) ? "checked" : string.Empty;
var employee2Appointment = Model.SelectedEmployee2SchedulerAppointments.FirstOrDefault(e2A => e2A.Employee.EmployeeOid.Equals(employee.EmployeeOid));
var background = "";
if(employee2Appointment != null)
{
background = GetParticipationColor(employee2Appointment.ParticipationAnswer);
}
<div class="input-group mb-3">
<div class="input-group-prepend">
<div class="input-group-text">
</div>
</div>
</div>
<a class="dropdown-item" href="#">@employee.DetailDescription</a>
<form class="form-inline">
<div class="form-group form-check">
<input type="checkbox" @isChecked id="apt-edit-emp-@employee.EmployeeOid" />
<label class="form-check-label" for="apt-edit-emp-@employee.EmployeeOid">@employee.DetailDescription</label>
</div>
</form>
/*
*<form class="form-inline">
<div class="form-group form-check">
<input type="checkbox" class="form-check-input" id="only-my-own-appointments-cb2" @isOnlyOwnAptsChecked onclick="filterAppointments()">
<label class="form-check-label" for="only-my-own-appointments-cb2">Nur meine Termine</label>
</div>
</form>
*/
}
</div>
</div>

View File

@@ -1,31 +1,10 @@
@using BeWoPlanerMobil.Util
@model BeWoPlanerMobil.Models.DevExpressSchedulerModel
@model BeWoPlanerMobil.Models.DevExpressSchedulerModel
@{
ViewBag.Title = "DevExpressScheduler";
}
<script type="text/javascript">
$(window).on("load", () => {
$("#employees-popup-apt-flt").on("hide.bs.modal", function(e) {
$.get("@Url.Action("GetSelectedEmployeesForAptFlt")", function(numberOfSelectedEmployees) {
$("#sel-emp-bdg").text(numberOfSelectedEmployees);
});
});
$("#customers-popup-apt-flt").on("hide.bs.modal", function(e) {
$.get("@Url.Action("GetSelectedCustomersForAptFlt")", function(numberOfSelectedCustomers) {
$("#sel-cus-bdg").text(numberOfSelectedCustomers);
});
});
$("#resources-popup-apt-flt").on("hide.bs.modal", function(e) {
$.get("@Url.Action("GetSelectedResourcesForAptFlt")", function(numberOfSelectedResources) {
$("#sel-res-bdg").text(numberOfSelectedResources);
});
});
});
function UpdateSchedulerHeight() {
scheduler.SetHeight(1);
@@ -141,23 +120,41 @@
const id = scheduler.GetSelectedAppointmentIds()[0];
const selectedAppointment = scheduler.GetAppointmentById(id);
const isAbsenceTime = selectedAppointment.IsAbsenceTime;
const isTask = selectedAppointment.IsTask;
for(let i = 0; i < e.item.items.length; i++) {
const currentItem = e.item.items[i];
switch(currentItem.name) {
case "ToServiceRecord":
if(isAbsenceTime || isTask) {
if(id === undefined || selectedAppointment.IsAbsenceTime || selectedAppointment.IsTask) {
currentItem.SetVisible(false);
}
break;
case "ConfirmApt":
if(id === undefined || selectedAppointment.CanConfirm === false) {
currentItem.SetVisible(false);
}
break;
case "MaybeApt":
if(id === undefined || selectedAppointment.CanConfirm === false) {
currentItem.SetVisible(false);
}
break;
case "CancelApt":
if(id === undefined || selectedAppointment.CanConfirm === false) {
currentItem.SetVisible(false);
}
break;
}
}
}
function rightClickConfirm(answer, id) {
showSpinner();
$("#scheduler-notification-container").load("@Url.Action("RightClickConfirm")", { answer: answer, id: id }, () => { reloadScheduler(); });
}
function filterAppointments() {
const checkedBoxes = $("#filter-menu input[type='checkbox']");
@@ -185,9 +182,49 @@
function updateNotificationInfo() {
$("#scheduler-notification-container").load("@Url.Action("GetNotifications")");
}
function resetFilterSelection(filterType) {
var url = "";
var getSelectedCountUrl = "";
switch(filterType) {
case "employee":
url = "@Url.Action("UpdateEmployeeSelection")";
getSelectedCountUrl = "@Url.Action("GetSelectedEmployeesForAptFlt")";
break;
case "customer":
url = "@Url.Action("UpdateCustomerSelection")";
getSelectedCountUrl = "@Url.Action("GetSelectedCustomersForAptFlt")";
break;
case "resource":
url = "@Url.Action("UpdateResourceSelection")";
getSelectedCountUrl = "@Url.Action("GetSelectedResourcesForAptFlt")";
break;
}
$(`#${filterType}-input-container`).load(url, {selectedOids: new Array()}, () => {
$.get(getSelectedCountUrl, function(numberOfSelectedObjects) {
$(`#sel-${filterType.substring(0, 3)}-bdg`).text(numberOfSelectedObjects);
scheduler.PerformCallback({
apptID: "",
actionId: "FilterAppointments",
args: new Array()
});
});
});
}
function performReload() {
$("#scheduler-notification-container").load("@Url.Action("GetNotifications")");
}
function reloadScheduler() {
scheduler.PerformCallback({ apptID: "", actionId: "Reload", args: null }, () => { performReload(); hideSpinner(); });
}
</script>
<div class="dropdown show">
<div class="dropdown">
@{
var isOnlyOwnAptsChecked = Model.ShowOnlyMyOwnAppointments ? "checked" : string.Empty;
var isOnlyPrivateAptsChecked = Model.ShowOnlyPrivateAppointments ? "checked" : string.Empty;
@@ -199,22 +236,11 @@
var isOnlyResourcesChecked = Model.ShowOnlyResources ? "checked" : string.Empty;
}
<div class="d-flex justify-content-center align-items-center">
<button class="btn btn-primary dropdown-toggle m-1" type="button" data-toggle="dropdown">
Filtern
</button>
<button class="btn btn-success m-1 ml-0" type="button" onclick="scheduler.PerformCallback({ apptID: '', actionId: 'Reload' })">
<i class="fas fa-sync-alt"></i>
</button>
@if(Model.NotificationCount == 0)
{
<a href="#" class="disabled" style="text-decoration: underline;">keine Benachrichtigungen</a>
}
<div id="scheduler-notification-container" class="m-1" style="margin: 0 auto;">
@Html.Partial("SchedulerNotificationPartial", Model);
</div>
<div class="dropdown-menu show" id="filter-menu">
<div class="dropdown-menu" id="filter-menu">
<div class="dropdown-item">
<form class="form-inline">
<div class="form-group form-check">
@@ -282,21 +308,48 @@
</form>
</div>
<div class="dropdown-divider"></div>
<a href="#" class="dropdown-item" onclick="$('#employees-popup-apt-flt').modal('show')">
<div class="btn-toolbar dropdown-item justify-content-between" role="toolbar">
<a href="#" class="text-dark" onclick="$('#employees-popup-apt-flt').modal('show')">
<i class="fas fa-user text-bewo-employee"></i>
Mitarbeiter
<span class="badge badge-bewo-employee" id="sel-emp-bdg">0</span>
<span class="badge badge-bewo-employee" id="sel-emp-bdg">@Model.SelectedEmployeeOidsForFiltering.Count</span>
</a>
<a href="#" class="dropdown-item" onclick="$('#customers-popup-apt-flt').modal('show')">
<button type="button" class="btn btn-sm btn-outline-danger" onclick="resetFilterSelection('employee')">
<i class="fas fa-times-circle"></i>
</button>
</div>
<div class="btn-toolbar dropdown-item justify-content-between" role="toolbar">
<a href="#" class="text-dark" onclick="$('#customers-popup-apt-flt').modal('show')">
<i class="fas fa-user text-bewo-customers"></i>
Klienten
<span class="badge badge-bewo-customers" id="sel-cus-bdg">0</span>
<span class="badge badge-bewo-customers" id="sel-cus-bdg">@Model.SelectedCustomerOidsForFiltering.Count</span>
</a>
<a href="#" class="dropdown-item">
<i class="fas fa-cubes text-bewo-resource" onclick="$('#resources-popup-apt-flt').modal('show')"></i>
<button type="button" class="btn btn-sm btn-outline-danger" onclick="resetFilterSelection('customer')">
<i class="fas fa-times-circle"></i>
</button>
</div>
<div class="btn-toolbar dropdown-item justify-content-between" role="toolbar">
<a href="#" class="text-dark" onclick="$('#resources-popup-apt-flt').modal('show')">
<i class="fas fa-cubes text-bewo-resource"></i>
Ressourcen
<span class="badge badge-bewo-resource" id="sel-res-bdg">0</span>
<span class="badge badge-bewo-resource" id="sel-res-bdg">@Model.SelectedResourceOidsForFiltering.Count</span>
</a>
<button type="button" class="btn btn-sm btn-outline-danger" onclick="resetFilterSelection('resource')">
<i class="fas fa-times-circle"></i>
</button>
</div>
</div>
<button class="btn btn-success m-1 ml-0" type="button" onclick="scheduler.PerformCallback({apptID: '', actionId: 'Reload'}); performReload();">
<i class="fas fa-sync-alt"></i>
</button>
<div id="scheduler-notification-container" class="align-middle">
@Html.Partial("SchedulerNotificationPartial", Model)
</div>
</div>
</div>

View File

@@ -20,7 +20,13 @@
settings.Columns.Add(c =>
{
c.FieldName = nameof(CompactEmployeeDC.DetailDescription);
c.Caption = nameof(CompactEmployeeDC.DetailDescription);
c.Caption = "Name";
});
settings.Columns.Add(c =>
{
c.Width = Unit.Pixel(8);
c.CellStyle.BackColor = Color.Crimson;
});
settings.Width = Unit.Percentage(100);

View File

@@ -0,0 +1,77 @@
@model BeWoPlanerMobil.Models.DevExpressSchedulerModel
@{
var betreff = Model.Appointment2Answer?.Subject ?? string.Empty;
var ort = Model.Appointment2Answer?.Location ?? string.Empty;
var organisator = Model.Appointment2Answer?.Originator?.SimpleDescription ?? string.Empty;
var start = Model.Appointment2Answer?.HtmlInputStartFormat ?? string.Empty;
var ende = Model.Appointment2Answer?.HtmlInputEndFormat ?? string.Empty;
var notiz = Model.Appointment2Answer?.Description ?? string.Empty;
}
@if(Model.Appointment2Answer?.StartDate < DateTime.Now)
{
<div class="alert alert-danger mb-1" role="alert">
Dieser Termin liegt in der Vergangenheit
</div>
}
<div class="input-group mb-1">
<div class="input-group-prepend">
<span class="input-group-text notifications-prepend-text">Betreff</span>
</div>
<input class="form-control" type="text" disabled value="@betreff" />
</div>
<div class="input-group mb-1">
<div class="input-group-prepend">
<span class="input-group-text notifications-prepend-text">Ort</span>
</div>
<input class="form-control" type="text" disabled value="@ort" />
</div>
<div class="input-group mb-1">
<div class="input-group-prepend">
<span class="input-group-text notifications-prepend-text">Organisator</span>
</div>
<input class="form-control" type="text" disabled value="@organisator" />
</div>
<div class="input-group mb-1">
<div class="input-group-prepend">
<span class="input-group-text notifications-prepend-text">Start</span>
</div>
<input class="form-control" type="datetime-local" disabled value="@start" />
</div>
<div class="input-group mb-1">
<div class="input-group-prepend">
<span class="input-group-text notifications-prepend-text">Ende</span>
</div>
<input class="form-control" type="datetime-local" disabled value="@ende" />
</div>
<div class="input-group mb-1">
<div class="input-group-prepend">
<span class="input-group-text">Notiz</span>
</div>
<textarea class="form-control" disabled>@notiz</textarea>
</div>
<div class="btn-toolbar justify-content-between" role="toolbar">
@if(Model.OpenAppointments?.Any(openAppointment => openAppointment.EndDate is null || openAppointment.EndDate.Value > DateTime.Now) ?? false)
{
<button type="button" class="btn btn-primary" onclick="confirmAllOpenAppointments()">Allen zusagen</button>
}
@if(Model.Appointment2Answer != null)
{
if(Model.Appointment2Answer.EndDate is null || Model.Appointment2Answer.EndDate > DateTime.Now)
{
<div class="btn-group" role="group">
<button type="button" class="btn btn-outline-bewo-apt-confirm" onclick="answerAppointment(1)">Zusagen</button>
<button type="button" class="btn btn-outline-bewo-apt-maybe" onclick="answerAppointment(3)">Mit Vorbehalt</button>
<button type="button" class="btn btn-outline-bewo-apt-decline" onclick="answerAppointment(2)">Absagen</button>
</div>
}
else
{
<button type="button" class="btn btn-primary" onclick="answerAppointment(4)">OK</button>
}
}
</div>

View File

@@ -0,0 +1,32 @@
@model BeWoPlanerMobil.Models.DevExpressSchedulerModel
<div class="row">
<div class="col-4">
<div class="list-group">
@if(Model.OpenAppointments != null)
{
foreach(var appointment in Model.OpenAppointments)
{
var active = string.Empty;
if(Model.Appointment2Answer?.SchedulerAppointmentOid != null && appointment.SchedulerAppointmentOid.HasValue)
{
if(Model.Appointment2Answer.SchedulerAppointmentOid.Value == appointment.SchedulerAppointmentOid.Value)
{
active = "active";
}
}
var text = $"{appointment.StartDate:dd.MM.yyyy}: {appointment.Subject}";
<a href="#" class="list-group-item list-group-item-action open-apt-list-group-item @active" id="open-apt-@appointment.SchedulerAppointmentOid" onclick="selectAppointmentToAnswer(@appointment.SchedulerAppointmentOid)">
@text
</a>
}
}
</div>
</div>
<div class="col-8" id="apt-answering-form">
@Html.Partial("NotificationPopupContent", Model)
</div>
</div>

View File

@@ -10,9 +10,85 @@
@if(Model.NotificationCount == 0)
{
<a href="#" class="disabled" style="text-decoration: underline;">keine Benachrichtigungen</a>
<a href="#" class="disabled h-100 align-middle" style="text-decoration: underline;">keine Benachrichtigungen</a>
}
else
{
<a href="#">@GetNotificationInfo()</a>
<a href="#" onclick="$('#notifications-popup').modal('show');">@GetNotificationInfo()</a>
}
<script type="text/javascript">
$(document).ready(function() {
$("#notifications-popup").on("shown.bs.modal", function(e) {
resizeNotificationsPrependElements();
});
resizeNotificationsPrependElements();
});
function resizeNotificationsPrependElements() {
const width = window.getMaxWidth("notifications-prepend-text");
if(width > 0) {
$(".notifications-prepend-text").width(width);
}
}
function selectAppointmentToAnswer(oid) {
showSpinner();
$(".open-apt-list-group-item").removeClass("active");
$(`#open-apt-${oid}`).addClass("active");
$("#apt-answering-form").load(
"@Url.Action("LoadAppointmentToAnswer")",
{oid: oid},
() => {
hideSpinner();
$("#notifications-popup").modal("show");
resizeNotificationsPrependElements();
});
}
function answerAppointment(answer) {
showSpinner();
$("#notifications-popup-modal-body").load("@Url.Action("AnswerOpenAppointment")", {answer: answer}, () => {
reloadScheduler();
});
}
function confirmAllOpenAppointments() {
showSpinner();
$("#notifications-popup-modal-body").load("@Url.Action("ConfirmAllOpenAppointments")", () => {
$("#notifications-popup").modal("hide");
reloadScheduler();
});
}
@if(Model.OpenAppointments.Count == 0)
{
<text>
$("#notifications-popup").modal("hide");
</text>
}
</script>
<div class="modal" tabindex="-1" role="dialog" id="notifications-popup">
<div class="modal-dialog modal-dialog-scrollable modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h6 class="modal-title text-center w-100 font-weight-bold">
@GetNotificationInfo()
</h6>
<button type="button" class="close" data-dismiss="modal">
<span>&times;</span>
</button>
</div>
<div class="modal-body" id="notifications-popup-modal-body">
@Html.Partial("NotificationsPopupContent", Model)
</div>
</div>
</div>
</div>

View File

@@ -51,6 +51,10 @@
if(menuId == SchedulerMenuItemId.AppointmentMenu)
{
e.Menu.Items.Add(new MenuItem("In die Zeiterfassung übertragen", "ToServiceRecord"));
e.Menu.Items.Add(new MenuItem("Zusagen", "ConfirmApt"));
e.Menu.Items.Add(new MenuItem("Mit Vorbehalt zusagen", "MaybeApt"));
e.Menu.Items.Add(new MenuItem("Absagen", "CancelApt"));
}
if(menuId == SchedulerMenuItemId.DefaultMenu)
@@ -167,6 +171,16 @@
{
evargs.Properties.Add("IsAbsenceTime", evargs.Appointment.CustomFields["IsAbsenceTime"]);
evargs.Properties.Add("IsTask", evargs.Appointment.CustomFields["IsTask"]);
var end = evargs.Appointment.End;
var originator = (CompactEmployeeDC) evargs.Appointment.CustomFields["Originator"];
var employeeList = (List<Employee2SchedulerAppointmentDC>) evargs.Appointment.CustomFields["Employees"];
var canConfirm = end > DateTime.Now &&
false == originator.EmployeeOid.Equals(Model.LoggedInUserOid) &&
employeeList.Any(employee2Appointment => employee2Appointment.Employee.EmployeeOid.Equals(Model.LoggedInUserOid));
evargs.Properties.Add("CanConfirm", canConfirm);
};
settings.PopupMenuShowing = PopupMenuShowing;

View File

@@ -115,6 +115,8 @@
}
function setIsOnlyForSelectedEmployee() {
showSpinner();
var isChecked = $("#selected-employee-cb").is(":checked");
$.get("@Url.Action("CheckForSelectedEmployee")", function(employeeName2Oid) {
@@ -126,11 +128,13 @@
$("#qb-employee-popup").parent().find(".dropdown-toggle").text(name);
$.get("@Url.Action("ChangeIsForSelectedEmployeesOnly")", {isForSelectedEmployeeOnly: isChecked, employeeOid: isChecked ? parseFloat(employeeOid) : null});
$.get("@Url.Action("ChangeIsForSelectedEmployeesOnly")", {isForSelectedEmployeeOnly: isChecked, employeeOid: isChecked ? parseFloat(employeeOid) : null}).done(() => {hideSpinner();});
});
}
function setIsOnlyForSelectedOrganisation() {
showSpinner();
var isChecked = $("#selected-organisation-cb").is(":checked");
var organizationOid = null;
@@ -164,37 +168,45 @@
dropdownToggleButton.text(organizationName);
}
$.get("@Url.Action("ChangeIsForSelectedOrganisationOnly")", {isForSelectedOrganisationOnly: isChecked, organisationOid: isChecked ? organizationOid : null});
$.get("@Url.Action("ChangeIsForSelectedOrganisationOnly")", {isForSelectedOrganisationOnly: isChecked, organisationOid: isChecked ? organizationOid : null}).done(() => {hideSpinner();});
});
}
function setIsOnlyForSelectedServiceCategory() {
showSpinner();
const isChecked = $("#selected-category-cb").is(":checked");
const serviceCategoryOid = isChecked ? parseFloat($("#category-select option:selected").val()) : null;
$.get("@Url.Action("ChangeIsForSelectedServiceCategoryOnly")", { isForSelectedServiceCategoryOnly: isChecked, serviceCategoryOid: serviceCategoryOid});
$.get("@Url.Action("ChangeIsForSelectedServiceCategoryOnly")", {isForSelectedServiceCategoryOnly: isChecked, serviceCategoryOid: serviceCategoryOid}).done(() => {hideSpinner();});
}
function setReportEmployee(selectedDropdownItem, employeeOid) {
showSpinner();
$.get("@Url.Action("SetEmployeeOid")", { employeeOid: employeeOid }, function(employeeName) {
$("#qb-employee-popup").parent().find(".dropdown-toggle").text(employeeName);
$("#qb-employee-popup").modal("hide");
});
}).done(() => {hideSpinner();});
}
function setReportOrganization(selectedDropdownItem, organisationOid) {
if(organisationOid !== null && $.isNumeric(organisationOid)) {
showSpinner();
$.get("@Url.Action("SetOrganisationOid")", { organisationOid: organisationOid }, function(organisationName) {
$("#qb-organization-popup").parent().find(".dropdown-toggle").text(organisationName);
$("#qb-organization-popup").modal("hide");
});
}).done(() => {hideSpinner();});
}
}
function setReportServiceCategory() {
const serviceCategoryOid = parseFloat($("#category-select option:selected").val());
if(serviceCategoryOid !== null && $.isNumeric(serviceCategoryOid)) {
$.get("@Url.Action("SetServiceCategoryOid")", { serviceCategoryOid: serviceCategoryOid });
showSpinner();
$.get("@Url.Action("SetServiceCategoryOid")", {serviceCategoryOid: serviceCategoryOid}).done(() => {hideSpinner();});
}
}
@@ -205,7 +217,8 @@
}
function resetQuittierungsbeleg() {
$.get("@Url.Action("ResetQuittierungsbeleg")");
showSpinner();
$.get("@Url.Action("ResetQuittierungsbeleg")").done(() => {hideSpinner();});
}
$(document).on("shown.bs.modal", "#qb-report-popup", function () {
@@ -238,24 +251,29 @@
window.calcPrependWidth();
$.get("@Url.Action("SetQbFilterEnum")", { filterEnumString: selectedOption });
showSpinner();
$.get("@Url.Action("SetQbFilterEnum")", {filterEnumString: selectedOption}).done(() => {hideSpinner();});
}
function onQBCustomerDropdownItemClick(selectedDropdownItem, customerOid) {
showSpinner();
$.get("@Url.Action("SetCustomer")", {customerOid: customerOid}).done(function(customerName) {
$("#qb-customer-popup").parent().find(".dropdown-toggle").text(customerName);
$("#qb-customer-popup").modal("hide");
checkForExistingSignature();
}
);
).done(() => {hideSpinner();});
}
function onQBTeamDropdownItemClick(selectedDropdownItem, teamOid) {
showSpinner();
$.get("@Url.Action("SetTeam")", {teamOid: teamOid}).done(function(teamName) {
$("#qb-team-popup").parent().find(".dropdown-toggle").text(teamName);
$("#qb-team-popup").modal("hide");
checkForExistingSignature();
});
}).done(() => {hideSpinner();});
}
function checkForExistingSignature() {
@@ -265,6 +283,7 @@
@if(Model.ShowDifferentQBInterval)
{
<text>
showSpinner();
const interval = $("#qb-interval-selection option:selected").val();
$.get("@Url.Action("ChangeIntervalSelection")",
@@ -273,12 +292,13 @@
month: parseInt(month),
year: parseInt(year)
}
);
).done(() => { hideSpinner(); });
</text>
}
else
{
<text>
showSpinner();
const startDay = $("#start-day-select option:selected").val();
const endDay = $("#end-day-select option:selected").val();
@@ -292,7 +312,7 @@
endDayString: endDay,
monthString: month,
yearString: year
});
}).done(() => {hideSpinner();});
</text>
}
}

View File

@@ -59,7 +59,7 @@
</logger>
<logger name="NHibernate.SQL">
<level value="DEBUG" />
<level value="WARN" />
</logger>
<logger name="NHibernate.Search">

View File

@@ -6292,7 +6292,7 @@ WHERE sc.Billable = 1 and sr.StartDate >= '{0:yyyy-MM-dd}' and sr.StartDate < '{
.List<Customer>();
}
public List<Customer> FindCustomersForPaginatedQb(int firstResult, int maxResults, bool checkTeamCustomerRights, DateTime start, DateTime end, out int rowCount)
public List<Customer> FindCustomersForPaginatedQb(int firstResult, int maxResults, bool checkTeamCustomerRights, DateTime start, DateTime end, out int rowCount, long? serviceCategoryOid = null, long? costbearerOid = null)
{
var user = LoggedInUserOperationContextExt.Current?.User ?? SessionFacade.LoggedInUser;
@@ -6327,7 +6327,7 @@ WHERE sc.Billable = 1 and sr.StartDate >= '{0:yyyy-MM-dd}' and sr.StartDate < '{
}
customerOidsWithQb = FilterCustomerOidsWithQuittierungsbeleg(criteria.List<Customer>().Select(c => c.Oid.Value).Distinct().ToArray(), start, end);
customerOidsWithQb = FilterCustomerOidsWithQuittierungsbeleg(criteria.List<Customer>().Select(c => c.Oid.Value).Distinct().ToArray(), start, end, serviceCategoryOid, costbearerOid);
var customers = criteria
.Add(Restrictions.In(nameof(BeWoEntityBase.Oid), customerOidsWithQb.ToArray()))
@@ -6342,10 +6342,10 @@ WHERE sc.Billable = 1 and sr.StartDate >= '{0:yyyy-MM-dd}' and sr.StartDate < '{
return customers;
}
public List<Customer> FindCustomersForPaginatedQbByOids(int firstResult, int maxResults, long[] customerOids, DateTime start, DateTime end, out int rowCount)
public List<Customer> FindCustomersForPaginatedQbByOids(int firstResult, int maxResults, long[] customerOids, DateTime start, DateTime end, out int rowCount, long? serviceCategoryOid = null, long? costbearerOid = null)
{
//rowCount = GetRowCountForQuittierungsbelegPagination(customerOids, start, end);
var list = FilterCustomerOidsWithQuittierungsbeleg(customerOids, start, end);
var list = FilterCustomerOidsWithQuittierungsbeleg(customerOids, start, end, serviceCategoryOid, costbearerOid);
rowCount = list.Count;
return CreateCriteriaIsActive<Customer>()
@@ -6358,7 +6358,7 @@ WHERE sc.Billable = 1 and sr.StartDate >= '{0:yyyy-MM-dd}' and sr.StartDate < '{
.ToList();
}
private IList<long> FilterCustomerOidsWithQuittierungsbeleg(long[] customerOids, DateTime start, DateTime end)
private IList<long> FilterCustomerOidsWithQuittierungsbeleg(long[] customerOids, DateTime start, DateTime end, long? serviceCategoryOid = null, long? costbearerOid = null)
{
if (customerOids.Length == 0)
{
@@ -6377,11 +6377,20 @@ WHERE sc.Billable = 1 and sr.StartDate >= '{0:yyyy-MM-dd}' and sr.StartDate < '{
oidList += customerOids[i];
}
var sql = $"select distinct c.oid from customer c inner join servicerecord sr on c.oid = sr.customeroid where c.IsActive = 1 and sr.StartDate >= ':Start' and sr.StartDate < ':End' and c.oid in (:OidList)";
sql = sql.Replace(":Start", String.Format("{0:yyyy-MM-dd}", start));
sql = sql.Replace(":End", String.Format("{0:yyyy-MM-dd}", end.Date.AddDays(1)));
sql = sql.Replace(":OidList", oidList);
var sql = "SELECT DISTINCT c.oid " +
"FROM customer c " +
"INNER JOIN servicerecord sr ON c.oid = sr.customeroid " +
$"{(serviceCategoryOid.HasValue ? " INNER JOIN servicedescription sd ON sr.ServiceDescriptionOid = sd.Oid " : Empty)}" +
$"{(costbearerOid.HasValue ? " INNER JOIN costbearer2supportconcept c2Sc ON sr.CostBearer2SupportConceptOid = c2Sc.Oid " : Empty)}" +
"WHERE c.IsActive = 1 AND " +
$"sr.StartDate >= '{start:yyyy-MM-dd}' AND " +
$"sr.StartDate < '{end:yyyy-MM-dd}' AND " +
$"{(serviceCategoryOid.HasValue ? " sd.ServiceCategoryOid = " + serviceCategoryOid.Value + " AND " : Empty)}" +
$"{(costbearerOid.HasValue ? "c2SC.CostBearerOid = " + costbearerOid.Value + " AND" : Empty)}" +
$"c.oid IN ({oidList})";
var q = Session.CreateSQLQuery(sql);
return q.List<long>();
//var customerCountWithQuittierungsbelegInSpan = CreateCriteriaIsActive<Customer>()

View File

@@ -17,6 +17,7 @@ using BS.Shared.DataContracts;
using BS.Shared.Services;
using BS.Shared.Extensions;
using System.Diagnostics;
using Customer = BeWo.Data.Entities.Customer;
namespace BeWo.Report.ReportObjects
{
@@ -290,7 +291,7 @@ namespace BeWo.Report.ReportObjects
return Create(lCustomer, pSpan, disableEmptySupportConcepts, orgaOid, empOid, searchServiceRecordsByEndDate, serviceCategoryOid, checkQbStatus);
}
public static List<ServicesOverviewRO> CreatePaginated(int firstResult, int maxResults, long[] customerOids, int month, int year, bool disableEmptySupportConcepts, long organizationOid, long employeeOid, int start, int end, out int rowCount, long? serviceCategoryOid = null, bool checkQbStatus = false)
public static List<ServicesOverviewRO> CreatePaginated(int firstResult, int maxResults, long[] customerOids, int month, int year, bool disableEmptySupportConcepts, long organizationOid, long employeeOid, int start, int end, out int rowCount, long? serviceCategoryOid = null, bool checkQbStatus = false, long? costbearerOid = null)
{
var reportObjects = new List<ServicesOverviewRO>();
@@ -303,7 +304,7 @@ namespace BeWo.Report.ReportObjects
dateTimeSpan.StartDateTime = new DateTime(year, month, start);
dateTimeSpan.EndDateTime = new DateTime(year, month, end).AddDays(1).AddSeconds(-1);
var customers = DAOFactory.SearchDAO.FindCustomersForPaginatedQbByOids(firstResult, maxResults, customerOids, dateTimeSpan.StartDate, dateTimeSpan.EndDateTime, out rowCount);
var customers = DAOFactory.SearchDAO.FindCustomersForPaginatedQbByOids(firstResult, maxResults, customerOids, dateTimeSpan.StartDate, dateTimeSpan.EndDateTime, out rowCount, serviceCategoryOid, costbearerOid);
foreach(var customer in customers)
{
@@ -320,7 +321,7 @@ namespace BeWo.Report.ReportObjects
return reportObjects;
}
public static List<ServicesOverviewRO> CreatePaginated(int firstResult, int maxCount, int month, int year, long organizationOid, long employeeOid, int startDay, int endDay, out int rowCount, long? serviceCategoryOid = null, bool disableEmptySupportConcepts = true, bool checkQbStatus = false)
public static List<ServicesOverviewRO> CreatePaginated(int firstResult, int maxCount, int month, int year, long organizationOid, long employeeOid, int startDay, int endDay, out int rowCount, long? serviceCategoryOid = null, bool disableEmptySupportConcepts = true, bool checkQbStatus = false, long? costbearerOid = null)
{
var reportObjects = new List<ServicesOverviewRO>();
@@ -336,10 +337,8 @@ namespace BeWo.Report.ReportObjects
dateTimeSpan.EndDateTime = dateTimeSpan.StartDateTime.AddDays(endDay - startDay + 1).AddTicks(-1);
var customers = DAOFactory.SearchDAO.FindCustomersForPaginatedQb(firstResult, maxCount, false, dateTimeSpan.StartDate, dateTimeSpan.EndDateTime, out rowCount);
foreach (var customer in customers)
var paginatedCustomers = DAOFactory.SearchDAO.FindCustomersForPaginatedQb(firstResult, maxCount, false, dateTimeSpan.StartDate, dateTimeSpan.EndDateTime, out rowCount, serviceCategoryOid, costbearerOid);
foreach(var customer in paginatedCustomers)
{
var servicesOverviewRO = Create(customer, dateTimeSpan, disableEmptySupportConcepts, organizationOid, employeeOid, false, serviceCategoryOid, checkQbStatus);
if(servicesOverviewRO != null)

View File

@@ -4,7 +4,6 @@ using System.IO;
using System.Linq;
using System.Reflection;
using System.Threading;
using BeWo.Data;
using BS.Shared.Core;
namespace BeWo.Service.Plugins
@@ -213,7 +212,7 @@ namespace BeWo.Service.Plugins
//t = "7185105541"; // Nous GmbH
//t = "5022131330"; // Tabula Rasa
//t = "4189934785"; // Landshuter Netzwerke
//t = "7584236951"; // Aachener Betreuungsbüro Kirschbaum und Manz GbR
t = "7584236951"; // Aachener Betreuungsbüro Kirschbaum und Manz GbR
//t = "3678599942"; // VKM Rietberg
//t = "4069072369"; // BeWo Dreilich&Pastor (Projekt TranskulturellesBBPastor)
//t = "4160851689"; // BeWo Dreilich&Pastor (Dreilich)

View File

@@ -1,7 +1,5 @@
using System;
using System.ComponentModel;
using System.Runtime.Serialization;
using DevExpress.Xpo;
namespace BS.Shared
{

View File

@@ -227,6 +227,9 @@ namespace BS.Shared.DataContracts
public override string ToString() => $"{SchedulerAppointmentOid} {StartDate:dd.MM.yyyy HH:mm}-{EndDate:dd.MM.yyyy HH:mm}: {Subject}";
public string HtmlInputStartFormat => StartDate.HasValue ? $"{StartDate:yyyy-MM-ddTHH:mm}" : string.Empty;
public string HtmlInputEndFormat => EndDate.HasValue ? $"{EndDate:yyyy-MM-ddTHH:mm}" : string.Empty;
public static SchedulerAppointmentDC RecurringExceptionFromDevExpressAppointment(Appointment appointment, SchedulerAppointmentDC baseAppointment, int recurrenceIndex, string recurrenceId)
{
return new SchedulerAppointmentDC