|
|
@@ -48,6 +48,8 @@ public interface IDigitalFormsHostViewModel : INotifyPropertyChanged
|
|
|
|
|
|
int SelectedTab { get; set; }
|
|
|
|
|
|
+ bool HasDocuments { get; }
|
|
|
+
|
|
|
DigitalFormDocumentModel Documents { get; }
|
|
|
|
|
|
Action<DFLoadStorage> LoadValues { set; }
|
|
|
@@ -110,6 +112,9 @@ public partial class DigitalFormsHostViewModel<TModel, TShell, TParent, TParentL
|
|
|
[ObservableProperty]
|
|
|
private int _selectedTab;
|
|
|
|
|
|
+ [ObservableProperty]
|
|
|
+ private bool _hasDocuments;
|
|
|
+
|
|
|
[ObservableProperty]
|
|
|
private Action<DFLoadStorage> _loadValues = null!;
|
|
|
|
|
|
@@ -187,6 +192,7 @@ public partial class DigitalFormsHostViewModel<TModel, TShell, TParent, TParentL
|
|
|
await Task.WhenAll(
|
|
|
Model.RefreshAsync(DataAccess.Status == ConnectionStatus.Connected),
|
|
|
Documents.RefreshAsync(DataAccess.Status == ConnectionStatus.Connected));
|
|
|
+ HasDocuments = Documents.Any();
|
|
|
|
|
|
DigitalForm = Model.FirstOrDefault(x => x.ID == FormID)!.Entity;
|
|
|
Variables = Model.Variables.Where(x => x.FormID == FormID).Select(x => x.Entity).ToArray();
|