|
|
@@ -774,14 +774,13 @@ public partial class MainWindow : IPanelHostControl
|
|
|
SetFrameworkItemVisibility(CompanyInformation, Security.CanView<CompanyInformation>());
|
|
|
|
|
|
SetVisibleIfAny(BackstageSeparator0, CompanyInformation);
|
|
|
- SetFrameworkItemVisibility(SecurityDefaultsButton,
|
|
|
- ClientFactory.IsSupported<GlobalSecurityToken>() && Security.IsAllowed<CanCustomiseSecurityDefaults>());
|
|
|
+ SetFrameworkItemVisibility(SecurityDefaultsButton, Security.IsAllowed<CanCustomiseSecurityDefaults>());
|
|
|
SetVisibleIfAny(BackstageSeparator1, SecurityDefaultsButton);
|
|
|
|
|
|
BackstageSeparator1a.Visibility = Visibility.Visible;
|
|
|
SystemLogsButton.Visibility = Visibility.Visible;
|
|
|
|
|
|
- SetFrameworkItemVisibility(DocumentTypeList, ClientFactory.IsSupported<DocumentType>() && Security.IsAllowed<CanViewDocumentTypes>());
|
|
|
+ SetFrameworkItemVisibility(DocumentTypeList, Security.IsAllowed<CanViewDocumentTypes>());
|
|
|
SetFrameworkItemVisibility(EventList, Security.IsAllowed<CanManageEvents>());
|
|
|
SetVisibleIfAny(BackstageSeparator2, DocumentTypeList, EventList);
|
|
|
|
|
|
@@ -808,12 +807,10 @@ public partial class MainWindow : IPanelHostControl
|
|
|
CreateTab<ViewDesktopDashboardsTab>("Dashboards", x => x
|
|
|
.NewGroup(x => x
|
|
|
.Add<DatabaseActivityDashboard>("Database Activity", SvgImages.kpi,
|
|
|
- ClientFactory.IsSupported<UserTracking>()
|
|
|
- && Security.IsAllowed<CanViewDatabaseActivity>()
|
|
|
+ Security.IsAllowed<CanViewDatabaseActivity>()
|
|
|
&& Security.IsAllowed<ViewDesktopDatabaseActivityDashboard>())
|
|
|
.Add<UserActivity>("User Activity", SvgImages.kpi,
|
|
|
- ClientFactory.IsSupported<ModuleTracking>()
|
|
|
- && Security.IsAllowed<CanViewUserActivity>()
|
|
|
+ Security.IsAllowed<CanViewUserActivity>()
|
|
|
&& Security.IsAllowed<ViewDesktopUserActivityDashboard>())
|
|
|
.Add<WidgetDashboard>("Quick Status", SvgImages.kpi,
|
|
|
Security.IsAllowed<CanViewQuickStatus>() && Security.IsAllowed<ViewDesktopQuickStatusDashboard>())));
|
|
|
@@ -822,9 +819,7 @@ public partial class MainWindow : IPanelHostControl
|
|
|
CreateTab<ViewDesktopDigitalFormsTab>("Digital Forms", x => x
|
|
|
.NewGroup(x => x
|
|
|
.Add<DigitalFormsLibrary>("Forms Library", SvgImages.formslibrary,
|
|
|
- ClientFactory.IsSupported<DigitalForm>()
|
|
|
- && Security.CanView<DigitalForm>()
|
|
|
- && Security.IsAllowed<CanAdministerDigitalFormsLibrary>())
|
|
|
+ Security.IsAllowed<CanAdministerDigitalFormsLibrary>())
|
|
|
.Add<CompletedFormsPanel>("Forms Dashboard", SvgImages.formsinstance,
|
|
|
Security.IsAllowed<CanViewDigitalFormsDashbaord>()
|
|
|
&& Security.IsAllowed<ViewDesktopDigitalFormsDashboard>())));
|
|
|
@@ -833,17 +828,13 @@ public partial class MainWindow : IPanelHostControl
|
|
|
CreateTab<ViewDesktopEquipmentTab>("Equipment", x => x
|
|
|
.NewGroup(x => x
|
|
|
.Add<EquipmentPanel>("Equipment List", PRSDesktop.Resources.specifications,
|
|
|
- ClientFactory.IsSupported<Equipment>()
|
|
|
- && Security.CanView<Equipment>()
|
|
|
+ Security.CanView<Equipment>()
|
|
|
&& Security.IsAllowed<ViewDesktopEquipmentListScreen>())
|
|
|
.Add<EquipmentMaintenancePanel>("Planned Maintenance", PRSDesktop.Resources.service,
|
|
|
- ClientFactory.IsSupported<Equipment>()
|
|
|
- && Security.CanView<Equipment>()
|
|
|
+ Security.CanView<Equipment>()
|
|
|
&& Security.IsAllowed<ViewDesktopEquipmentMaintenanceScreen>())
|
|
|
.Add<EquipmentPlannerPanel>("Equipment Planner", PRSDesktop.Resources.calendar,
|
|
|
- ClientFactory.IsSupported<Equipment>()
|
|
|
- && Security.CanView<Equipment>()
|
|
|
- && ClientFactory.IsSupported<Assignment>()
|
|
|
+ Security.CanView<Equipment>()
|
|
|
&& Security.CanView<Assignment>()
|
|
|
&& Security.IsAllowed<ViewDesktopEquipmentPlannerScreen>())
|
|
|
.Add<GPSTrackers>("GPS Trackers", PRSDesktop.Resources.milestone,
|
|
|
@@ -853,38 +844,31 @@ public partial class MainWindow : IPanelHostControl
|
|
|
CreateTab<ViewDesktopAccountsTab>("Accounts Receivable", x => x
|
|
|
.NewGroup(x => x
|
|
|
.Add<CustomerPanel>("Customers", PRSDesktop.Resources.customer,
|
|
|
- ClientFactory.IsSupported<Customer>()
|
|
|
- && Security.CanView<Customer>()
|
|
|
+ Security.CanView<Customer>()
|
|
|
&& Security.IsAllowed<ViewDesktopCustomersScreen>())
|
|
|
.Add<InvoicePanel>("Invoices", PRSDesktop.Resources.invoice,
|
|
|
- ClientFactory.IsSupported<Invoice>()
|
|
|
- && Security.CanView<Invoice>()
|
|
|
+ Security.CanView<Invoice>()
|
|
|
&& Security.IsAllowed<ViewDesktopInvoicesScreen>())
|
|
|
.Add<CustomerReceipts>("Receipts", PRSDesktop.Resources.receipt,
|
|
|
- ClientFactory.IsSupported<Receipt>()
|
|
|
- && Security.CanView<Receipt>()
|
|
|
+ Security.CanView<Receipt>()
|
|
|
&& Security.IsAllowed<ViewDesktopReceiptsScreen>())));
|
|
|
|
|
|
private Fluent.RibbonTabItem? SetupAccountsPayableTab() =>
|
|
|
CreateTab<ViewDesktopAccountsTab>("Accounts Payable", x => x
|
|
|
.NewGroup(x => x
|
|
|
.Add<SupplierPanel>("Suppliers", PRSDesktop.Resources.supplier,
|
|
|
- ClientFactory.IsSupported<Supplier>()
|
|
|
- && Security.CanView<Supplier>()
|
|
|
+ Security.CanView<Supplier>()
|
|
|
&& Security.IsAllowed<ViewDesktopSuppliersScreen>())
|
|
|
.Add<DataEntryPanel>("Data Entry", PRSDesktop.Resources.pencil,
|
|
|
Security.IsAllowed<CanViewDataEntryPanel>())
|
|
|
.Add<SupplierPurchaseOrderPanel>("Purchase Orders", PRSDesktop.Resources.purchase,
|
|
|
- ClientFactory.IsSupported<PurchaseOrder>()
|
|
|
- && Security.CanView<PurchaseOrder>()
|
|
|
+ Security.CanView<PurchaseOrder>()
|
|
|
&& Security.IsAllowed<ViewDesktopPurchaseOrdersScreen>())
|
|
|
.Add<SupplierBillPanel>("Bills", PRSDesktop.Resources.bill,
|
|
|
- ClientFactory.IsSupported<Bill>()
|
|
|
- && Security.CanView<Bill>()
|
|
|
+ Security.CanView<Bill>()
|
|
|
&& Security.IsAllowed<ViewDesktopBillsScreen>())
|
|
|
.Add<SupplierPayments>("Payments", PRSDesktop.Resources.payment,
|
|
|
- ClientFactory.IsSupported<Payment>()
|
|
|
- && Security.CanView<Payment>()
|
|
|
+ Security.CanView<Payment>()
|
|
|
&& Security.IsAllowed<ViewDesktopPaymentsScreen>())));
|
|
|
|
|
|
private Fluent.RibbonTabItem? SetupHumanResourcesTab() =>
|
|
|
@@ -906,7 +890,7 @@ public partial class MainWindow : IPanelHostControl
|
|
|
.Add<EmployeePanel>("Employee List", PRSDesktop.Resources.employee,
|
|
|
Security.CanView<Employee>() && Security.IsAllowed<ViewDesktopEmployeeListScreen>())
|
|
|
.Add<OrgChartPanel>("Org Chart", PRSDesktop.Resources.orgchart,
|
|
|
- ClientFactory.IsSupported<Employee>() && Security.IsAllowed<ViewDesktopOrgChartScreen>())));
|
|
|
+ Security.IsAllowed<ViewDesktopOrgChartScreen>())));
|
|
|
|
|
|
private Fluent.RibbonTabItem? SetupProductsTab() =>
|
|
|
CreateTab<ViewDesktopProductManagementTab>("Products", x => x
|
|
|
@@ -928,8 +912,7 @@ public partial class MainWindow : IPanelHostControl
|
|
|
CreateTab<ViewDesktopLogisticsTab>("Logistics", x => x
|
|
|
.NewGroup(x => x
|
|
|
.Add<ReadyToGoPanel>("Ready To Go", SvgImages.truck,
|
|
|
- ClientFactory.IsSupported<DeliveryItem>()
|
|
|
- && Security.IsAllowed<CanViewLogisticsReadyToGo>()
|
|
|
+ Security.IsAllowed<CanViewLogisticsReadyToGo>()
|
|
|
&& Security.IsAllowed<ViewDesktopReadyToGoScreen>())
|
|
|
.Add<DispatchPanel>("Rack List", PRSDesktop.Resources.barcode,
|
|
|
Security.CanView<Shipment>()
|
|
|
@@ -940,8 +923,7 @@ public partial class MainWindow : IPanelHostControl
|
|
|
.Add<DeliveryPanel>("Deliveries", SvgImages.truck,
|
|
|
Security.IsAllowed<CanViewDeliveriesModule>() && Security.IsAllowed<ViewDesktopDeliveriesScren>())
|
|
|
.Add<DeliveredOnSitePanel>("Delivered On Site", PRSDesktop.Resources.lifter,
|
|
|
- ClientFactory.IsSupported<DeliveryItem>()
|
|
|
- && Security.IsAllowed<CanViewDeliveredOnSite>()
|
|
|
+ Security.IsAllowed<CanViewDeliveredOnSite>()
|
|
|
&& Security.IsAllowed<ViewDesktopDeliveredOnSiteScreen>()))
|
|
|
.NewGroup(x => x
|
|
|
.Add<ConsignmentsPanel>("Incoming Consignments", PRSDesktop.Resources.consignment,
|
|
|
@@ -954,29 +936,23 @@ public partial class MainWindow : IPanelHostControl
|
|
|
Security.CanView<Job>() && Security.IsAllowed<ViewDesktopDesignManagementScreen>()))
|
|
|
.NewGroup(x => x
|
|
|
.Add<ManufacturingPanel>("Manufacturing Status", PRSDesktop.Resources.factory,
|
|
|
- ClientFactory.IsSupported<ManufacturingFactory, ManufacturingPacket>()
|
|
|
- && Security.IsAllowed<CanViewFactoryStatus>()
|
|
|
+ Security.IsAllowed<CanViewFactoryStatus>()
|
|
|
&& Security.IsAllowed<ViewDesktopManufacturingStatusScreen>())
|
|
|
.Add<ManufacturingAllocationPanel>("Factory Allocation", PRSDesktop.Resources.assignments,
|
|
|
- ClientFactory.IsSupported<ManufacturingFactory, ManufacturingPacket, ManufacturingPacketStage>()
|
|
|
- && Security.IsAllowed<CanViewFactoryAllocation>()
|
|
|
+ Security.IsAllowed<CanViewFactoryAllocation>()
|
|
|
&& Security.IsAllowed<ViewDesktopFactoryAllocationScreen>())
|
|
|
.Add<FactoryPanel>("Factory Floor", PRSDesktop.Resources.wrench,
|
|
|
- ClientFactory.IsSupported<ManufacturingPacket>()
|
|
|
- && Security.IsAllowed<CanViewFactoryFloor>()
|
|
|
+ Security.IsAllowed<CanViewFactoryFloor>()
|
|
|
&& Security.IsAllowed<ViewDesktopFactoryFloorScreen>()))
|
|
|
.NewGroup(x => x
|
|
|
.Add<FactoryProductivityDashboard>("Factory KPIs", SvgImages.kpi,
|
|
|
- ClientFactory.IsSupported<ManufacturingHistory>()
|
|
|
- && Security.IsAllowed<CanViewFactoryKPIs>()
|
|
|
+ Security.IsAllowed<CanViewFactoryKPIs>()
|
|
|
&& Security.IsAllowed<ViewDesktopFactoryKPIsDashboard>())
|
|
|
.Add<ManufacturingTemplateAnalysis>("Template Analysis", SvgImages.kpi,
|
|
|
- ClientFactory.IsSupported<ManufacturingTemplate, ManufacturingHistory>()
|
|
|
- && Security.IsAllowed<CanViewTemplateAnalysis>()
|
|
|
+ Security.IsAllowed<CanViewTemplateAnalysis>()
|
|
|
&& Security.IsAllowed<ViewDesktopTemplateAnalysisDashboard>())
|
|
|
.Add<FactoryFloorAnalysis>("Factory Analysis", SvgImages.kpi,
|
|
|
- ClientFactory.IsSupported<ManufacturingTemplate, ManufacturingHistory>()
|
|
|
- && Security.IsAllowed<CanViewFactoryAnalysis>()
|
|
|
+ Security.IsAllowed<CanViewFactoryAnalysis>()
|
|
|
&& Security.IsAllowed<ViewDesktopFactoryAnalysisDashboard>())));
|
|
|
|
|
|
private Fluent.RibbonTabItem? SetupProjectsTab() =>
|
|
|
@@ -1159,10 +1135,10 @@ public partial class MainWindow : IPanelHostControl
|
|
|
.NewGroup(x => x
|
|
|
.Add<UtilityDashboard>("Dashboards", SvgImages.kpi, Security.IsAllowed<CanViewUserDefinedDashboards>())
|
|
|
.Add<NotificationPanel>("Notification Centre", PRSDesktop.Resources.email, Security.CanView<Notification>())
|
|
|
- .Add<TaskPanel>("Task List", SvgImages.kanban, ClientFactory.IsSupported<Kanban>() && Security.IsAllowed<CanViewTasks>())
|
|
|
- .Add<AttendancePanel>("In/Out Board", PRSDesktop.Resources.attendance, ClientFactory.IsSupported<TimeSheet>() && Security.IsAllowed<CanViewInOutBoard>())
|
|
|
+ .Add<TaskPanel>("Task List", SvgImages.kanban, Security.IsAllowed<CanViewTasks>())
|
|
|
+ .Add<AttendancePanel>("In/Out Board", PRSDesktop.Resources.attendance, Security.IsAllowed<CanViewInOutBoard>())
|
|
|
.Add<LiveMapsPanel>("Live Maps", PRSDesktop.Resources.map, CanViewMaps)
|
|
|
- .Add<DailyReport>("Daily Report", PRSDesktop.Resources.report, ClientFactory.IsSupported<TimeSheet, Assignment>() && Security.IsAllowed<CanViewDailyReports>())
|
|
|
+ .Add<DailyReport>("Daily Report", PRSDesktop.Resources.report, Security.IsAllowed<CanViewDailyReports>())
|
|
|
.Lock());
|
|
|
foreach(var (_, groupList) in tab.Groups)
|
|
|
{
|
|
|
@@ -1882,9 +1858,6 @@ public partial class MainWindow : IPanelHostControl
|
|
|
}
|
|
|
private bool CheckTimesheetBypass(bool message)
|
|
|
{
|
|
|
- if (!ClientFactory.IsSupported<TimeSheet>())
|
|
|
- return true;
|
|
|
-
|
|
|
var isClockedOn = IsClockedOn();
|
|
|
|
|
|
if (!Security.IsAllowed<CanBypassTimeBench>())
|