add simulation opetion
This commit is contained in:
@@ -2,7 +2,20 @@
|
||||
{% block content %}
|
||||
<div class="h-full flex flex-col" x-data="columnConfig()">
|
||||
<h1 class="text-xl font-semibold mb-4">Projects for {{ case_email }}</h1>
|
||||
|
||||
|
||||
{% set profile = get_user_profile(session.uid) %}
|
||||
{% if profile.is_admin %}
|
||||
<div class="mb-4 flex w-[400px]">
|
||||
<label for="simulateCaseEmail" class=" text-sm font-medium text-slate-700 mb-1">Simulate case email:</label>
|
||||
<input type="text"
|
||||
id="simulateCaseEmail"
|
||||
x-model="case_email_sim"
|
||||
@keyup.debounce.1000ms="window.location.href=`/dashboard/1?case_email=${encodeURIComponent($data.case_email_sim)}`"
|
||||
class="w-full px-3 py-2 border w-64 border-slate-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"
|
||||
placeholder="Enter case email to simulate">
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- Configure Visible Columns Link -->
|
||||
<div class="mb-4">
|
||||
<button @click="showColumnModal = true"
|
||||
@@ -308,6 +321,7 @@
|
||||
function columnConfig() {
|
||||
return {
|
||||
showColumnModal: false,
|
||||
case_email_sim: '',
|
||||
columns: [
|
||||
'Matter Num',
|
||||
'Client / Property',
|
||||
@@ -364,6 +378,13 @@ function columnConfig() {
|
||||
|
||||
init() {
|
||||
this.loadColumnSettings();
|
||||
|
||||
// Extract case_email from URL query parameter
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
const caseEmail = urlParams.get('case_email');
|
||||
if (caseEmail) {
|
||||
this.case_email_sim = caseEmail;
|
||||
}
|
||||
},
|
||||
|
||||
isColumnVisible(columnName) {
|
||||
|
||||
Reference in New Issue
Block a user