feat(repository): ReadReceiverByEnvelope Methode zum EnvelopeReceiverRepository hinzugefügt

- Neue Methode ReadReceiverByEnvelope hinzugefügt, um Empfänger zu ermitteln, die mit einem bestimmten Umschlag (identifiziert durch UUID) verknüpft sind.
This commit is contained in:
Developer 02 2024-09-06 12:08:42 +02:00
parent 97f07bc72d
commit a9ca1b71eb
3 changed files with 8 additions and 0 deletions

View File

@ -52,6 +52,7 @@ export class EnvelopeTableComponent implements AfterViewInit {
@ViewChild(ReceiverStatusTableComponent) rsTable!: ReceiverStatusTableComponent
onToggleExpandedRow(element: any, event: Event) {
console.log(element)
}
private eService: EnvelopeService = inject(EnvelopeService);

View File

@ -22,5 +22,7 @@ namespace EnvelopeGenerator.Infrastructure.Contracts
Task<IEnumerable<EnvelopeReceiver>> ReadByUsernameAsync(string username, int? min_status = null, int? max_status = null, params int[] ignore_statuses);
Task<EnvelopeReceiver?> ReadLastByReceiver(string email);
Task<IEnumerable<Receiver>> ReadReceiverByEnvelope(string uuid);
}
}

View File

@ -80,5 +80,10 @@ namespace EnvelopeGenerator.Infrastructure.Repositories
{
return await _dbSet.Where(er => er.Receiver!.EmailAddress == email).OrderBy(er => er.EnvelopeId).LastOrDefaultAsync();
}
public async Task<IEnumerable<Receiver>> ReadReceiverByEnvelope(string uuid)
=> await ReadWhere(uuid: uuid, withEnvelope: false, withReceiver: true)
.Select(er => er.Receiver!)
.ToListAsync();
}
}