diff --git a/biometric/cbv/biometric.py b/biometric/cbv/biometric.py index f1f5cc979..dcc3c6e8d 100644 --- a/biometric/cbv/biometric.py +++ b/biometric/cbv/biometric.py @@ -85,6 +85,16 @@ class BiometricCardView(HorillaCardView): data-target="#genericModal" """, }, + { + "action": "Fetch Logs", + "attrs": """ + hx-get="{get_fetch_url}" + class="oh-dropdown__link" + data-toggle="oh-modal-toggle" + data-target="#BiometricDeviceTestModal" + hx-target="#BiometricDeviceTestFormTarget" + """, + }, { "action": "archive_status", "attrs": """ diff --git a/biometric/models.py b/biometric/models.py index 41476695f..28f4d5e59 100644 --- a/biometric/models.py +++ b/biometric/models.py @@ -225,6 +225,13 @@ class BiometricDevices(HorillaModel): url = reverse_lazy("biometric-device-archive", kwargs={"device_id": self.pk}) return url + def get_fetch_url(self): + """ + This method to get Fetch Logs url + """ + url = reverse_lazy("biometric-device-fetch-logs", kwargs={"device_id": self.pk}) + return url + def get_delete_url(self): """ This method to get delete url