|
|
@@ -670,27 +670,6 @@ public partial class MainWindow : IPanelHostControl
|
|
|
}
|
|
|
|
|
|
#region Configuration
|
|
|
- /*
|
|
|
- protected override void OnSourceInitialized(EventArgs e)
|
|
|
- {
|
|
|
- base.OnSourceInitialized(e);
|
|
|
- var source = PresentationSource.FromVisual(this) as HwndSource;
|
|
|
- source?.AddHook(WndProc);
|
|
|
- }
|
|
|
-
|
|
|
- private IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled)
|
|
|
- {
|
|
|
- var message = (App.Message)msg;
|
|
|
- switch (message)
|
|
|
- {
|
|
|
- case App.Message.Maximise:
|
|
|
- WindowState = WindowState.Maximized;
|
|
|
- break;
|
|
|
- }
|
|
|
-
|
|
|
- return IntPtr.Zero;
|
|
|
- }*/
|
|
|
-
|
|
|
|
|
|
private void ConfigureMainScreen(IProgress<string>? progress)
|
|
|
{
|
|
|
@@ -707,7 +686,8 @@ public partial class MainWindow : IPanelHostControl
|
|
|
new ProgressSection("Configuring Logistics", () => SetupLogisticsTab(bMaps)),
|
|
|
new ProgressSection("Configuring Products", () => SetupProductsTab(bMaps)),
|
|
|
new ProgressSection("Configuring Human Resources", () => SetupHumanResourcesTab(bMaps)),
|
|
|
- new ProgressSection("Configuring Accounts", () => SetupAccountsTab(bMaps)),
|
|
|
+ new ProgressSection("Configuring Accounts Receivable", () => SetupAccountsReceivableTab(bMaps)),
|
|
|
+ new ProgressSection("Configuring Accounts Payable", () => SetupAccountsPayableTab(bMaps)),
|
|
|
new ProgressSection("Configuring Equipment", () => SetupEquipmentTab(bMaps)),
|
|
|
new ProgressSection("Configuring DigitalForms", () => SetupDigitalFormsTab(bMaps)),
|
|
|
new ProgressSection("Configuring Dashboards", () => SetupDashboardsTab(bMaps)),
|
|
|
@@ -928,18 +908,18 @@ public partial class MainWindow : IPanelHostControl
|
|
|
SetTabVisibleIfAny(EquipmentTab, EquipmentButton, TrackersMasterList);
|
|
|
}
|
|
|
|
|
|
- private void SetupAccountsTab(bool bMaps)
|
|
|
+ private void SetupAccountsReceivableTab(bool bMaps)
|
|
|
{
|
|
|
if (!Security.IsAllowed<ViewDesktopAccountsTab>())
|
|
|
return;
|
|
|
|
|
|
- SetModuleVisibility<UtilityDashboard>(AccountsDashboardButton, Security.IsAllowed<CanViewUserDefinedDashboards>());
|
|
|
+ SetModuleVisibility<UtilityDashboard>(AccountsReceivableDashboardButton, Security.IsAllowed<CanViewUserDefinedDashboards>());
|
|
|
|
|
|
- SetModuleVisibility<NotificationPanel>(AccountsMessagesButton, Security.CanView<Notification>());
|
|
|
- SetModuleVisibility<TaskPanel>(AccountsTaskButton, ClientFactory.IsSupported<Kanban>() && Security.IsAllowed<CanViewTasks>());
|
|
|
- SetModuleVisibility<AttendancePanel>(AccountsAttendanceButton, ClientFactory.IsSupported<TimeSheet>() && Security.IsAllowed<CanViewInOutBoard>());
|
|
|
- SetModuleVisibility<LiveMapsPanel>(AccountsMapButton, bMaps);
|
|
|
- SetModuleVisibility<DailyReport>(AccountsDailyReportButton,
|
|
|
+ SetModuleVisibility<NotificationPanel>(AccountsReceivableMessagesButton, Security.CanView<Notification>());
|
|
|
+ SetModuleVisibility<TaskPanel>(AccountsReceivableTaskButton, ClientFactory.IsSupported<Kanban>() && Security.IsAllowed<CanViewTasks>());
|
|
|
+ SetModuleVisibility<AttendancePanel>(AccountsReceivableAttendanceButton, ClientFactory.IsSupported<TimeSheet>() && Security.IsAllowed<CanViewInOutBoard>());
|
|
|
+ SetModuleVisibility<LiveMapsPanel>(AccountsReceivableMapButton, bMaps);
|
|
|
+ SetModuleVisibility<DailyReport>(AccountsReceivableDailyReportButton,
|
|
|
ClientFactory.IsSupported<TimeSheet, Assignment>() && Security.IsAllowed<CanViewDailyReports>());
|
|
|
|
|
|
SetModuleVisibility<CustomerPanel>(CustomerList, ClientFactory.IsSupported<Customer>()
|
|
|
@@ -953,6 +933,32 @@ public partial class MainWindow : IPanelHostControl
|
|
|
SetModuleVisibility<CustomerReceipts>(ReceiptList, ClientFactory.IsSupported<Receipt>()
|
|
|
&& Security.CanView<Receipt>()
|
|
|
&& Security.IsAllowed<ViewDesktopReceiptsScreen>());
|
|
|
+ SetVisibleIfEither(AccountsReceivableTaskSeparator1,
|
|
|
+ new FrameworkElement[]
|
|
|
+ {
|
|
|
+ AccountsReceivableDashboardButton, AccountsReceivableMessagesButton, AccountsReceivableTaskButton, AccountsReceivableAttendanceButton, AccountsReceivableMapButton,
|
|
|
+ AccountsReceivableDailyReportButton
|
|
|
+ }, new FrameworkElement[] { CustomerList, InvoiceList, ReceiptList });
|
|
|
+ SetVisibleIfAny(AccountsReceivableActions, AccountsReceivableDashboardButton, AccountsReceivableMessagesButton, AccountsReceivableTaskButton,
|
|
|
+ AccountsReceivableAttendanceButton,
|
|
|
+ AccountsReceivableDailyReportButton, CustomerList, InvoiceList, ReceiptList);
|
|
|
+
|
|
|
+ SetTabVisibleIfAny(AccountsReceivableTab, CustomerList, InvoiceList, ReceiptList);
|
|
|
+ }
|
|
|
+
|
|
|
+ private void SetupAccountsPayableTab(bool bMaps)
|
|
|
+ {
|
|
|
+ if (!Security.IsAllowed<ViewDesktopAccountsTab>())
|
|
|
+ return;
|
|
|
+
|
|
|
+ SetModuleVisibility<UtilityDashboard>(AccountsPayableDashboardButton, Security.IsAllowed<CanViewUserDefinedDashboards>());
|
|
|
+
|
|
|
+ SetModuleVisibility<NotificationPanel>(AccountsPayableMessagesButton, Security.CanView<Notification>());
|
|
|
+ SetModuleVisibility<TaskPanel>(AccountsPayableTaskButton, ClientFactory.IsSupported<Kanban>() && Security.IsAllowed<CanViewTasks>());
|
|
|
+ SetModuleVisibility<AttendancePanel>(AccountsPayableAttendanceButton, ClientFactory.IsSupported<TimeSheet>() && Security.IsAllowed<CanViewInOutBoard>());
|
|
|
+ SetModuleVisibility<LiveMapsPanel>(AccountsPayableMapButton, bMaps);
|
|
|
+ SetModuleVisibility<DailyReport>(AccountsPayableDailyReportButton,
|
|
|
+ ClientFactory.IsSupported<TimeSheet, Assignment>() && Security.IsAllowed<CanViewDailyReports>());
|
|
|
|
|
|
SetModuleVisibility<SupplierPanel>(SupplierList, ClientFactory.IsSupported<Supplier>()
|
|
|
&& Security.CanView<Supplier>()
|
|
|
@@ -972,19 +978,17 @@ public partial class MainWindow : IPanelHostControl
|
|
|
&& Security.CanView<Payment>()
|
|
|
&& Security.IsAllowed<ViewDesktopPaymentsScreen>());
|
|
|
|
|
|
- SetVisibleIfEither(AccountsTaskSeparator1,
|
|
|
+ SetVisibleIfEither(AccountsPayableTaskSeparator1,
|
|
|
new FrameworkElement[]
|
|
|
{
|
|
|
- AccountsDashboardButton, AccountsMessagesButton, AccountsTaskButton, AccountsAttendanceButton, AccountsMapButton,
|
|
|
- AccountsDailyReportButton
|
|
|
- }, new FrameworkElement[] { CustomerList, InvoiceList, ReceiptList });
|
|
|
- SetVisibleIfEither(AccountsTaskSeparator2, new FrameworkElement[] { CustomerList, InvoiceList, ReceiptList },
|
|
|
- new FrameworkElement[] { SupplierList, AccountsDataButton, PurchasesList, BillsList, PaymentsList });
|
|
|
- SetVisibleIfAny(AccountsActions, AccountsDashboardButton, AccountsMessagesButton, AccountsTaskButton,
|
|
|
- AccountsAttendanceButton,
|
|
|
- AccountsDailyReportButton, CustomerList, InvoiceList, ReceiptList, SupplierList, PurchasesList, BillsList, PaymentsList);
|
|
|
+ AccountsPayableDashboardButton, AccountsPayableMessagesButton, AccountsPayableTaskButton, AccountsPayableAttendanceButton, AccountsPayableMapButton,
|
|
|
+ AccountsPayableDailyReportButton
|
|
|
+ }, new FrameworkElement[] { SupplierList, AccountsDataButton, PurchasesList, BillsList, PaymentsList });
|
|
|
+ SetVisibleIfAny(AccountsPayableActions, AccountsPayableDashboardButton, AccountsPayableMessagesButton, AccountsPayableTaskButton,
|
|
|
+ AccountsPayableAttendanceButton,
|
|
|
+ AccountsPayableDailyReportButton, SupplierList, PurchasesList, BillsList, PaymentsList);
|
|
|
|
|
|
- SetTabVisibleIfAny(AccountsTab, CustomerList, InvoiceList, ReceiptList, SupplierList, AccountsDataButton, PurchasesList, BillsList, PaymentsList);
|
|
|
+ SetTabVisibleIfAny(AccountsPayableTab, SupplierList, AccountsDataButton, PurchasesList, BillsList, PaymentsList);
|
|
|
}
|
|
|
|
|
|
private void SetupHumanResourcesTab(bool bMaps)
|