add hasStructuredID property isntead of throwing exception and filter it
This commit is contained in:
parent
4fad41bd0b
commit
7d85d59ace
@ -180,8 +180,9 @@ Namespace Jobs.FinalizeDocument
|
||||
Public ReadOnly Property AnnotationsByReceiver As IEnumerable(Of List(Of Annotation))
|
||||
Get
|
||||
Return annotations _
|
||||
.GroupBy(Function(a) a.receiverId) _
|
||||
.Select(Function(g) g.ToList())
|
||||
.Where(Function(annot) annot.hasStructuredID).ToList() _
|
||||
.GroupBy(Function(a) a.receiverId) _
|
||||
.Select(Function(g) g.ToList())
|
||||
End Get
|
||||
End Property
|
||||
|
||||
@ -191,15 +192,17 @@ Namespace Jobs.FinalizeDocument
|
||||
|
||||
Friend Class Annotation
|
||||
|
||||
Private _id As String
|
||||
Private _id As String = Nothing
|
||||
|
||||
Public envelopeId As Integer
|
||||
Public envelopeId As Integer = Nothing
|
||||
|
||||
Public receiverId As Integer
|
||||
Public receiverId As Integer = Nothing
|
||||
|
||||
Public index As Integer
|
||||
Public index As Integer = Nothing
|
||||
|
||||
Public internalType As String
|
||||
Public internalType As String = Nothing
|
||||
|
||||
Public hasStructuredID As Boolean = True
|
||||
|
||||
Public Property id As String
|
||||
Get
|
||||
@ -215,7 +218,9 @@ Namespace Jobs.FinalizeDocument
|
||||
Dim parts As String() = value.Split("#"c)
|
||||
|
||||
If (parts.Length <> 4) Then
|
||||
Throw New BurnAnnotationException($"The identifier of annotation has more or less than 4 sub-part. Id: {_id}")
|
||||
hasStructuredID = False
|
||||
Return
|
||||
'Throw New BurnAnnotationException($"The identifier of annotation has more or less than 4 sub-part. Id: {_id}")
|
||||
End If
|
||||
|
||||
If Not Integer.TryParse(parts(0), envelopeId) Then
|
||||
|
||||
@ -17,9 +17,8 @@
|
||||
const page = element.page - 1
|
||||
|
||||
//#region signatures
|
||||
const id = generateId('signature');
|
||||
const annotation = new PSPDFKit.Annotations.WidgetAnnotation({
|
||||
id: id,
|
||||
id: generateId('signature'),
|
||||
pageIndex: page,
|
||||
formFieldName: id,
|
||||
backgroundColor: PSPDFKit.Color.LIGHT_YELLOW,
|
||||
@ -34,9 +33,8 @@
|
||||
//#endregion
|
||||
|
||||
//#region position
|
||||
const id_position = generateId('position');
|
||||
const annotation_position = new PSPDFKit.Annotations.WidgetAnnotation({
|
||||
id: id_position,
|
||||
id: generateId('position'),
|
||||
pageIndex: page,
|
||||
formFieldName: id_position,
|
||||
backgroundColor: PSPDFKit.Color.DarkBlue,
|
||||
@ -54,9 +52,8 @@
|
||||
//#endregion
|
||||
|
||||
//#region city
|
||||
const id_city = generateId('city');
|
||||
const annotation_city = new PSPDFKit.Annotations.WidgetAnnotation({
|
||||
id: id_city,
|
||||
id: generateId('city'),
|
||||
pageIndex: page,
|
||||
formFieldName: id_city,
|
||||
backgroundColor: PSPDFKit.Color.DarkBlue,
|
||||
@ -74,9 +71,8 @@
|
||||
//#endregion
|
||||
|
||||
//#region date
|
||||
const id_date = generateId('date');
|
||||
const annotation_date = new PSPDFKit.Annotations.WidgetAnnotation({
|
||||
id: id_date,
|
||||
id: generateId('date'),
|
||||
pageIndex: page,
|
||||
formFieldName: id_date,
|
||||
backgroundColor: PSPDFKit.Color.DarkBlue,
|
||||
@ -102,9 +98,8 @@
|
||||
this.markFieldAsCity(formFieldCity);
|
||||
|
||||
//#region date label
|
||||
const id_date_label = generateId('date_label');
|
||||
const annotation_date_label = new PSPDFKit.Annotations.WidgetAnnotation({
|
||||
id: id_date_label,
|
||||
id: generateId('date_label'),
|
||||
pageIndex: page,
|
||||
formFieldName: id_date_label,
|
||||
blendMode: 'normal',
|
||||
@ -125,9 +120,8 @@
|
||||
//#endregion
|
||||
|
||||
//#region city label
|
||||
const id_city_label = generateId('city_label');
|
||||
const annotation_city_label = new PSPDFKit.Annotations.WidgetAnnotation({
|
||||
id: id_city_label,
|
||||
id: generateId('city_label'),
|
||||
pageIndex: page,
|
||||
formFieldName: id_city_label,
|
||||
blendMode: 'normal',
|
||||
@ -148,9 +142,8 @@
|
||||
//#endregion
|
||||
|
||||
//#region position label
|
||||
const id_position_label = generateId('position_label');
|
||||
const annotation_position_label = new PSPDFKit.Annotations.WidgetAnnotation({
|
||||
id: id_position_label,
|
||||
id: generateId('position_label'),
|
||||
pageIndex: page,
|
||||
formFieldName: id_position_label,
|
||||
blendMode: 'normal',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user