|
@@ -699,6 +699,7 @@ namespace PRSDesktop
|
|
|
new ProgressSection("Configuring Human Resources", () => SetupHumanResourcesTab(bMaps)),
|
|
|
new ProgressSection("Configuring Accounts", () => SetupAccountsTab(bMaps)),
|
|
|
new ProgressSection("Configuring Equipment", () => SetupEquipmentTab(bMaps)),
|
|
|
+ new ProgressSection("Configuring DigitalForms", () => SetupDigitalFormsTab(bMaps)),
|
|
|
new ProgressSection("Configuring Dashboards", () => SetupDashboardsTab(bMaps)),
|
|
|
new ProgressSection("Configuring System Modules", SetupSystemModules)
|
|
|
);
|
|
@@ -760,9 +761,7 @@ namespace PRSDesktop
|
|
|
|
|
|
SetVisibility(DocumentTypeList, ClientFactory.IsSupported<DocumentType>() && Security.IsAllowed<CanViewDocumentTypes>());
|
|
|
SetVisibility(DocumentList, ClientFactory.IsSupported<Document>() && Security.IsAllowed<CanViewDocumentList>());
|
|
|
- SetVisibility(QAFormSetupButton,
|
|
|
- ClientFactory.IsSupported<DigitalForm>() && Security.IsAllowed<CanAdministerDigitalFormsLibrary>());
|
|
|
- SetVisibleIfAny(BackstageSeparator2, DocumentTypeList, DocumentList, QAFormSetupButton);
|
|
|
+ SetVisibleIfAny(BackstageSeparator2, DocumentTypeList, DocumentList);
|
|
|
|
|
|
SetVisibility(VideoRecordingButton, Security.IsAllowed<CanRecordScreen>());
|
|
|
|
|
@@ -819,7 +818,6 @@ namespace PRSDesktop
|
|
|
&& Security.IsAllowed<CanViewUserActivity>()
|
|
|
&& Security.IsAllowed<ViewDesktopUserActivityDashboard>());
|
|
|
|
|
|
- SetVisibility(DigitalFormsButton, Security.IsAllowed<CanViewDigitalFormsDashbaord>() && Security.IsAllowed<ViewDesktopDigitalFormsDashboard>());
|
|
|
SetVisibility(QuickStatusButton, Security.IsAllowed<CanViewQuickStatus>() && Security.IsAllowed<ViewDesktopQuickStatusDashboard>());
|
|
|
|
|
|
SetVisibleIfEither(DashboardsTaskSeparator,
|
|
@@ -831,12 +829,11 @@ namespace PRSDesktop
|
|
|
},
|
|
|
new FrameworkElement[]
|
|
|
{
|
|
|
- FactoryProductivityButton, TemplateAnalysisButton, FactoryAnalysisButton, DatabaseActivityButton, UserActivityButton,
|
|
|
- DigitalFormsButton, QuickStatusButton
|
|
|
+ FactoryProductivityButton, TemplateAnalysisButton, FactoryAnalysisButton, DatabaseActivityButton, UserActivityButton, QuickStatusButton
|
|
|
});
|
|
|
SetVisibleIfAny(DashboardsActions, DashboardsDashboardButton, DashboardMessagesButton, DashboardsTaskButton,
|
|
|
DashboardsAttendanceButton, DashboardsDailyReportButton, FactoryProductivityButton, TemplateAnalysisButton,
|
|
|
- FactoryAnalysisButton, DatabaseActivityButton, UserActivityButton, DigitalFormsButton, QuickStatusButton);
|
|
|
+ FactoryAnalysisButton, DatabaseActivityButton, UserActivityButton, QuickStatusButton);
|
|
|
|
|
|
//DashboardsActions.IsLauncherButtonVisible = Security.IsAllowed<CanCustomiseModules>();
|
|
|
//DashboardsReports.IsLauncherButtonVisible = Security.IsAllowed<CanDesignReports>();
|
|
@@ -845,8 +842,44 @@ namespace PRSDesktop
|
|
|
|
|
|
SetVisibleIfAny(DashboardsTab, FactoryProductivityButton, TemplateAnalysisButton, FactoryAnalysisButton,
|
|
|
DatabaseActivityButton,
|
|
|
- UserActivityButton, DigitalFormsButton, QuickStatusButton);
|
|
|
+ UserActivityButton, QuickStatusButton);
|
|
|
}
|
|
|
+ private void SetupDigitalFormsTab(bool bMaps)
|
|
|
+ {
|
|
|
+ if (!Security.IsAllowed<ViewDesktopDigitalFormsTab>())
|
|
|
+ return;
|
|
|
+
|
|
|
+ SetVisibility(DigitalFormsDashboardButton, Security.IsAllowed<CanViewUserDefinedDashboards>());
|
|
|
+
|
|
|
+ SetVisibility(DigitalFormsMessagesButton, Security.CanView<Notification>());
|
|
|
+ SetVisibility(DigitalFormsTaskButton, ClientFactory.IsSupported<Kanban>() && Security.IsAllowed<CanViewTasks>());
|
|
|
+ SetVisibility(DigitalFormsAttendanceButton, ClientFactory.IsSupported<TimeSheet>() && Security.IsAllowed<CanViewInOutBoard>());
|
|
|
+ SetVisibility(DigitalFormsMapButton, bMaps);
|
|
|
+ SetVisibility(DigitalFormsDailyReportButton,
|
|
|
+ ClientFactory.IsSupported<TimeSheet, Assignment>() && Security.IsAllowed<CanViewDailyReports>());
|
|
|
+
|
|
|
+ SetVisibility(DigitalFormsFormsLibraryButton, ClientFactory.IsSupported<DigitalForm>()
|
|
|
+ && Security.CanView<DigitalForm>()
|
|
|
+ && Security.IsAllowed<CanAdministerDigitalFormsLibrary>());
|
|
|
+
|
|
|
+ SetVisibility(DigitalFormsCompletedFormsButton, Security.IsAllowed<CanViewDigitalFormsDashbaord>() && Security.IsAllowed<ViewDesktopDigitalFormsDashboard>());
|
|
|
+
|
|
|
+ SetVisibleIfEither(DigitalFormsTaskSeparator,
|
|
|
+ new FrameworkElement[]
|
|
|
+ {
|
|
|
+ DigitalFormsDashboardButton, DigitalFormsMessagesButton, DigitalFormsTaskButton, DigitalFormsAttendanceButton, DigitalFormsMapButton,
|
|
|
+ DigitalFormsDailyReportButton
|
|
|
+ }, new FrameworkElement[] { DigitalFormsFormsLibraryButton, DigitalFormsCompletedFormsButton });
|
|
|
+
|
|
|
+ SetVisibleIfAny(DigitalFormsActions, DigitalFormsDashboardButton, DigitalFormsMessagesButton, DigitalFormsTaskButton,
|
|
|
+ DigitalFormsAttendanceButton, DigitalFormsDailyReportButton, DigitalFormsFormsLibraryButton, DigitalFormsCompletedFormsButton);
|
|
|
+
|
|
|
+ AddSetupModulesAndReports(DigitalFormsTab);
|
|
|
+
|
|
|
+ SetTabVisibleIfAny(DigitalFormsTab, DigitalFormsFormsLibraryButton, DigitalFormsCompletedFormsButton);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
private void SetupEquipmentTab(bool bMaps)
|
|
|
{
|
|
@@ -2162,27 +2195,38 @@ namespace PRSDesktop
|
|
|
|
|
|
#region Button Event Handlers
|
|
|
|
|
|
+ #region Common
|
|
|
+
|
|
|
+
|
|
|
+ private void Tasks_Checked(object sender, RoutedEventArgs e)
|
|
|
+ {
|
|
|
+ //LoadWindow<KanbanPanel>((RibbonButton)sender);
|
|
|
+ LoadWindow<TaskPanel>((Fluent.Button)sender);
|
|
|
+ }
|
|
|
+
|
|
|
private void DataEntry_Click(object sender, RoutedEventArgs e)
|
|
|
{
|
|
|
LoadWindow<DataEntryPanel>((Fluent.Button)sender);
|
|
|
}
|
|
|
|
|
|
- private void Console_Click(object sender, RoutedEventArgs a)
|
|
|
+ private void Attendance_Checked(object sender, RoutedEventArgs e)
|
|
|
{
|
|
|
- if (_console is null)
|
|
|
- {
|
|
|
- _console = new Console();
|
|
|
- _console.Closing += (o, args) => _console = null;
|
|
|
- }
|
|
|
-
|
|
|
- _console.Show();
|
|
|
+ LoadWindow<AttendancePanel>((Fluent.Button)sender);
|
|
|
}
|
|
|
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region Quotes
|
|
|
+
|
|
|
private void Quotes_Checked(object sender, RoutedEventArgs e)
|
|
|
{
|
|
|
LoadWindow<QuotePanel>((Fluent.Button)sender);
|
|
|
}
|
|
|
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region Projects
|
|
|
+
|
|
|
private void Jobs_Checked(object sender, RoutedEventArgs e)
|
|
|
{
|
|
|
LoadWindow<JobPanel>((Fluent.Button)sender);
|
|
@@ -2204,40 +2248,44 @@ namespace PRSDesktop
|
|
|
//LoadWindow<JobPanel>((RibbonButton)sender);
|
|
|
}
|
|
|
|
|
|
- private void Tasks_Checked(object sender, RoutedEventArgs e)
|
|
|
- {
|
|
|
- //LoadWindow<KanbanPanel>((RibbonButton)sender);
|
|
|
- LoadWindow<TaskPanel>((Fluent.Button)sender);
|
|
|
- }
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region Manufacturing
|
|
|
|
|
|
private void ManufacturingMenu_Checked(object sender, RoutedEventArgs e)
|
|
|
{
|
|
|
LoadWindow<ManufacturingPanel>((Fluent.Button)sender);
|
|
|
}
|
|
|
|
|
|
- // private void Schedule_Checked(object sender, RoutedEventArgs e)
|
|
|
- // {
|
|
|
- // LoadWindow<SchedulePanel>((RibbonButton)sender);
|
|
|
- // }
|
|
|
-
|
|
|
private void FactoryFloorButton_Click(object sender, RoutedEventArgs e)
|
|
|
{
|
|
|
LoadWindow<FactoryPanel>((Fluent.Button)sender);
|
|
|
}
|
|
|
|
|
|
- private void DispatchMenu_Checked(object sender, RoutedEventArgs e)
|
|
|
+ private void FactorySetup_Click()
|
|
|
{
|
|
|
- LoadWindow<DispatchPanel>((Fluent.Button)sender);
|
|
|
+ var list = new MasterList(typeof(ManufacturingFactory));
|
|
|
+ list.ShowDialog();
|
|
|
}
|
|
|
|
|
|
+ private void TemplateSetup_Click()
|
|
|
+ {
|
|
|
+ var list = new MasterList(typeof(ManufacturingTemplate), "Factory.Name", null, true);
|
|
|
+ list.ShowDialog();
|
|
|
+ }
|
|
|
+
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region Logistics
|
|
|
+
|
|
|
private void ReadyToGoMenu_Checked(object sender, RoutedEventArgs e)
|
|
|
{
|
|
|
LoadWindow<ReadyToGoPanel>((Fluent.Button)sender);
|
|
|
}
|
|
|
|
|
|
- private void Equipment_Checked(object sender, RoutedEventArgs e)
|
|
|
+ private void DispatchMenu_Checked(object sender, RoutedEventArgs e)
|
|
|
{
|
|
|
- LoadWindow<EquipmentPanel>((Fluent.Button)sender);
|
|
|
+ LoadWindow<DispatchPanel>((Fluent.Button)sender);
|
|
|
}
|
|
|
|
|
|
private void Requisitions_Checked(object sender, RoutedEventArgs e)
|
|
@@ -2245,36 +2293,57 @@ namespace PRSDesktop
|
|
|
LoadWindow<RequisitionPanel>((Fluent.Button)sender);
|
|
|
}
|
|
|
|
|
|
- //private void Purchases_Checked(object sender, RoutedEventArgs e)
|
|
|
- //{
|
|
|
- // LoadWindow(PurchasesMenu, new PurchasesPanel());
|
|
|
- //}
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region Products
|
|
|
+
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region Human Resources
|
|
|
|
|
|
private void Timesheets_Checked(object sender, RoutedEventArgs e)
|
|
|
{
|
|
|
LoadWindow<TimesheetPanel>((Fluent.Button)sender);
|
|
|
}
|
|
|
|
|
|
- private void Attendance_Checked(object sender, RoutedEventArgs e)
|
|
|
- {
|
|
|
- LoadWindow<AttendancePanel>((Fluent.Button)sender);
|
|
|
- }
|
|
|
+ #endregion
|
|
|
|
|
|
- private void Maps_Checked(object sender, RoutedEventArgs e)
|
|
|
+ #region Accounts
|
|
|
+
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region Equipment
|
|
|
+
|
|
|
+ private void Equipment_Checked(object sender, RoutedEventArgs e)
|
|
|
{
|
|
|
- LoadWindow<MapsPanel>((Fluent.Button)sender);
|
|
|
+ LoadWindow<EquipmentPanel>((Fluent.Button)sender);
|
|
|
}
|
|
|
|
|
|
- private void FactorySetup_Click()
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region Dashboards
|
|
|
+
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ private void Console_Click(object sender, RoutedEventArgs a)
|
|
|
{
|
|
|
- var list = new MasterList(typeof(ManufacturingFactory));
|
|
|
- list.ShowDialog();
|
|
|
+ if (_console is null)
|
|
|
+ {
|
|
|
+ _console = new Console();
|
|
|
+ _console.Closing += (o, args) => _console = null;
|
|
|
+ }
|
|
|
+
|
|
|
+ _console.Show();
|
|
|
}
|
|
|
|
|
|
- private void TemplateSetup_Click()
|
|
|
+ //private void Purchases_Checked(object sender, RoutedEventArgs e)
|
|
|
+ //{
|
|
|
+ // LoadWindow(PurchasesMenu, new PurchasesPanel());
|
|
|
+ //}
|
|
|
+
|
|
|
+ private void Maps_Checked(object sender, RoutedEventArgs e)
|
|
|
{
|
|
|
- var list = new MasterList(typeof(ManufacturingTemplate), "Factory.Name", null, true);
|
|
|
- list.ShowDialog();
|
|
|
+ LoadWindow<MapsPanel>((Fluent.Button)sender);
|
|
|
}
|
|
|
|
|
|
private void RefreshMenu_Click(object sender, RoutedEventArgs e)
|
|
@@ -2738,11 +2807,6 @@ namespace PRSDesktop
|
|
|
LoadWindow<UserActivity>((Fluent.Button)sender);
|
|
|
}
|
|
|
|
|
|
- private void DigitalFormsButton_Click(object sender, RoutedEventArgs e)
|
|
|
- {
|
|
|
- LoadWindow<QADashboard>((Fluent.Button)sender);
|
|
|
- }
|
|
|
-
|
|
|
private void QuickStatus_Click(object sender, RoutedEventArgs e)
|
|
|
{
|
|
|
LoadWindow<WidgetDashboard>((Fluent.Button)sender);
|
|
@@ -2837,6 +2901,25 @@ namespace PRSDesktop
|
|
|
list.ShowDialog();
|
|
|
}
|
|
|
|
|
|
+ #region Digital Forms
|
|
|
+
|
|
|
+ private void DigitalFormsFormsLibraryButton_Click(object sender, RoutedEventArgs e)
|
|
|
+ {
|
|
|
+ LoadWindow<DigitalFormsLibrary>((Fluent.Button)sender);
|
|
|
+ }
|
|
|
+
|
|
|
+ private void DigitalFormsRoleButton_Click(object sender, RoutedEventArgs e)
|
|
|
+ {
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ private void DigitalFormsCompletedFormsButton_Click(object sender, RoutedEventArgs e)
|
|
|
+ {
|
|
|
+ LoadWindow<QADashboard>((Fluent.Button)sender);
|
|
|
+ }
|
|
|
+
|
|
|
+ #endregion
|
|
|
+
|
|
|
private void Dashboards_Checked(object sender, RoutedEventArgs e)
|
|
|
{
|
|
|
LoadWindow<UtilityDashboard>((Fluent.Button)sender);
|
|
@@ -4396,14 +4479,6 @@ namespace PRSDesktop
|
|
|
list.ShowDialog();
|
|
|
}
|
|
|
|
|
|
- private void QAFormSetupButton_OnClick(object sender, RoutedEventArgs e)
|
|
|
- {
|
|
|
- var list = new MasterList(typeof(DigitalForm), "AppliesTo", null, true);
|
|
|
- list.ShowDialog();
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
private void EditDetailsButton_OnClick(object sender, RoutedEventArgs e)
|
|
|
{
|
|
|
var employee = new Client<Employee>().Query(
|
|
@@ -4470,8 +4545,7 @@ namespace PRSDesktop
|
|
|
}
|
|
|
|
|
|
|
|
|
- #endregion
|
|
|
-
|
|
|
|
|
|
+ #endregion
|
|
|
}
|
|
|
}
|