Merge pull request 'feat: added Remove Button for removing Privte Entity from PrivateList' (#46) from AddRemovePrivateEntityFromList into main
All checks were successful
Build Docker Linux ARM64 / build-docker-linux-arm64 (push) Successful in 1m35s
All checks were successful
Build Docker Linux ARM64 / build-docker-linux-arm64 (push) Successful in 1m35s
Reviewed-on: #46
This commit was merged in pull request #46.
This commit is contained in:
@@ -179,7 +179,9 @@
|
|||||||
<h5 class="modal-title">Optionen</h5>
|
<h5 class="modal-title">Optionen</h5>
|
||||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">Optionen...</div>
|
<div class="modal-body">
|
||||||
|
<button type="button" class="btn btn-danger" @onclick="@(e => RemoveEntityFromPrivateList(Entity))" data-bs-dismiss="modal">Aus PrivateList entfernen</button>
|
||||||
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Schließen</button>
|
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Schließen</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -189,6 +191,16 @@
|
|||||||
</div>
|
</div>
|
||||||
};
|
};
|
||||||
|
|
||||||
|
private async Task RemoveEntityFromPrivateList(PrivateEntity entity)
|
||||||
|
{
|
||||||
|
//Delete DB
|
||||||
|
CouchLogDB.PrivateEntities.Remove(entity);
|
||||||
|
await CouchLogDB.SaveChangesAsync();
|
||||||
|
|
||||||
|
//Delete Memory List
|
||||||
|
PrivateEntities.Remove(entity);
|
||||||
|
}
|
||||||
|
|
||||||
private async Task UpdateWatchStatus(PrivateEntity entity, object? newValue)
|
private async Task UpdateWatchStatus(PrivateEntity entity, object? newValue)
|
||||||
{
|
{
|
||||||
if (int.TryParse(newValue?.ToString(), out int newId))
|
if (int.TryParse(newValue?.ToString(), out int newId))
|
||||||
|
|||||||
Reference in New Issue
Block a user