window.runMatching = async () => {
  const statusElement = document.getElementById('status');

  status.innerText = 'Awaiting response from server.';
  status.classList.add('alert-warning');

  const res = await fetch('/admin/run-matching');

  status.classList.remove('alert-warning');
  status.innerText = '';

  if (res.ok) {
    status.classList.add('alert-success');
    status.innerText = 'Matching Success!';
  } else {
    status.classList.add('alert-danger');
    status.innerText = 'Matching Failure!';
  }
};
@@ -88,32 +88,39 @@
 tus');%0A%0A  status
+Element
 .innerText = 'Aw
@@ -150,32 +150,39 @@
 rver.';%0A  status
+Element
 .classList.add('
@@ -250,32 +250,39 @@
 ing');%0A%0A  status
+Element
 .classList.remov
@@ -301,32 +301,39 @@
 ning');%0A  status
+Element
 .innerText = '';
@@ -352,32 +352,39 @@
 ok) %7B%0A    status
+Element
 .classList.add('
@@ -402,32 +402,39 @@
 ss');%0A    status
+Element
 .innerText = 'Ma
@@ -472,16 +472,23 @@
   status
+Element
 .classLi
@@ -521,16 +521,23 @@
   status
+Element
 .innerTe

refactor code for admin matching dashboard