remove functions to place in other js files
This commit is contained in:
parent
7f2f6aa749
commit
1b5ca4bd34
@ -4,32 +4,7 @@
|
||||
* This file will be included onto the page via the importmap() Twig function,
|
||||
* which should already be in your base.html.twig.
|
||||
*/
|
||||
import './bootstrap.js';
|
||||
import './vendor/bootstrap/bootstrap.index.js';
|
||||
import './vendor/bootstrap/dist/css/bootstrap.min.css';
|
||||
import './styles/app.css';
|
||||
|
||||
function filterCasesByUser(userId) {
|
||||
fetch('/index.php/api/filter-cases-by-user', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify({ userId: userId })
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
const caseList = document.getElementById('case-list');
|
||||
caseList.innerHTML = '';
|
||||
data.forEach(c => {
|
||||
caseList.innerHTML += `
|
||||
<tr>
|
||||
<td>${c.clientName}</td>
|
||||
<td>${c.caseNumber}</td>
|
||||
<td>${c.dcsCaseId}</td>
|
||||
<td>${c.referralType}/${c.referralSource.name}<br/><a href='mailto:${c.referralSource.email}'>${c.referralSource.email}</a></td>
|
||||
<td>${c.county.value}</td>
|
||||
<td>${c.referrals.length}</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>`;
|
||||
})
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user