add simulation opetion
This commit is contained in:
@@ -2,7 +2,20 @@
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="h-full flex flex-col" x-data="columnConfig()">
|
<div class="h-full flex flex-col" x-data="columnConfig()">
|
||||||
<h1 class="text-xl font-semibold mb-4">Projects for {{ case_email }}</h1>
|
<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 -->
|
<!-- Configure Visible Columns Link -->
|
||||||
<div class="mb-4">
|
<div class="mb-4">
|
||||||
<button @click="showColumnModal = true"
|
<button @click="showColumnModal = true"
|
||||||
@@ -308,6 +321,7 @@
|
|||||||
function columnConfig() {
|
function columnConfig() {
|
||||||
return {
|
return {
|
||||||
showColumnModal: false,
|
showColumnModal: false,
|
||||||
|
case_email_sim: '',
|
||||||
columns: [
|
columns: [
|
||||||
'Matter Num',
|
'Matter Num',
|
||||||
'Client / Property',
|
'Client / Property',
|
||||||
@@ -364,6 +378,13 @@ function columnConfig() {
|
|||||||
|
|
||||||
init() {
|
init() {
|
||||||
this.loadColumnSettings();
|
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) {
|
isColumnVisible(columnName) {
|
||||||
|
|||||||
Reference in New Issue
Block a user