- @_checkedAnnotations.Count von @_annotations.Count @(_annotations.Count == 1 ? "Feld" : "Felder") markiert
+ @if (_annotations.Count > 0 && !SignatureApplied) {
+
+
+ @_annotations.Count @(_annotations.Count == 1 ? "Unterschriftsfeld" : "Unterschriftsfelder")
+ ·
+ Seite@(AnnotationPages.Count() == 1 ? "" : "n"): @string.Join(", ", AnnotationPages)
-
- } else if (!SignatureApplied) {
-
- Bitte zuerst eine Unterschrift erstellen, dann die Felder im Dokument markieren.
-
- }
+ @if (_capturedSignature is not null) {
+
+
+
+ @_checkedAnnotations.Count / @_annotations.Count @(_annotations.Count == 1 ? "Feld" : "Felder") markiert
+
+
+ @if (_checkedAnnotations.Count == _annotations.Count) {
+
✓ Alle Felder markiert – Unterschriften werden angewendet…
+ }
+ } else {
+
+ Bitte zuerst eine Unterschrift erstellen, dann die Felder im Dokument markieren.
+
+ }
+
}
@if (!string.IsNullOrWhiteSpace(EnvelopeKey)) {
@@ -210,6 +224,7 @@ Shown="OnPopupShownAsync">
bool IsLoggingOut;
IReadOnlyList _annotations = [];
+ IEnumerable AnnotationPages => _annotations.Select(a => a.Page).Distinct().OrderBy(p => p);
record SignatureCapture(string DataUrl, string FullName, string Position, string Place);
SignatureCapture? _capturedSignature;
byte[]? _basePdfBytes;
@@ -277,6 +292,15 @@ Shown="OnPopupShownAsync">
else
_checkedAnnotations.Remove(annotationId);
await InvokeAsync(StateHasChanged);
+
+ if (_capturedSignature is not null
+ && !SignatureApplied
+ && _annotations.Count > 0
+ && _checkedAnnotations.Count == _annotations.Count) {
+ // K?sa bekleme: kullan?c? son tick'in görsel feedback'ini görsün
+ await Task.Delay(400);
+ await SubmitSignaturesAsync();
+ }
}
void OpenSignaturePopupAsync() {