progress
This commit is contained in:
91
app.py
91
app.py
@@ -102,7 +102,7 @@ def fetch_all_projects():
|
||||
# List projects (all pages)
|
||||
projects = list_all_projects(bearer)
|
||||
# todo, only 10 projects
|
||||
projects = projects[:10]
|
||||
projects = projects[:50]
|
||||
|
||||
# Fetch details for each
|
||||
detailed_rows = []
|
||||
@@ -129,8 +129,68 @@ def fetch_all_projects():
|
||||
property_info = fetch_form(bearer, pid, "propertyInfo")
|
||||
project_overview = fetch_form(bearer, pid, "projectOverview")
|
||||
matter_overview = fetch_form(bearer, pid, "matterOverview")
|
||||
fees_and_costs = fetch_form(bearer, pid, "feesAndCosts") or {}
|
||||
lease_info_np = fetch_form(bearer, pid, "leaseInfoNP") or {}
|
||||
|
||||
completed_tasks = [x.get("body") for x in fetch_project_tasks(bearer, pid).get("items") if x.get("isCompleted")]
|
||||
pending_tasks = [x.get("body") for x in fetch_project_tasks(bearer, pid).get("items") if not x.get("isCompleted")]
|
||||
|
||||
# Extract notice service and expiration dates
|
||||
notice_service_date = new_file_review.get("noticeServiceDate") or ''
|
||||
notice_expiration_date = new_file_review.get("noticeExpirationDate") or ''
|
||||
|
||||
# Extract daily rent damages
|
||||
daily_rent_damages = lease_info_np.get("dailyRentDamages") or dates_and_deadlines.get("dailyRentDamages") or ''
|
||||
|
||||
# Extract default date
|
||||
default_date = dates_and_deadlines.get("defaultDate") or ''
|
||||
|
||||
# Extract motion hearing dates
|
||||
demurrer_hearing_date = dates_and_deadlines.get("demurrerHearingDate") or ''
|
||||
motion_to_strike_hearing_date = dates_and_deadlines.get("mTSHearingDate") or ''
|
||||
motion_to_quash_hearing_date = dates_and_deadlines.get("mTQHearingDate") or ''
|
||||
other_motion_hearing_date = dates_and_deadlines.get("otherMotion1HearingDate") or ''
|
||||
|
||||
pprint(dates_and_deadlines)
|
||||
# Extract MSC details
|
||||
msc_date = dates_and_deadlines.get("mSCDate") or ''
|
||||
msc_time = dates_and_deadlines.get("mSCTime") or ''
|
||||
msc_address = dates_and_deadlines.get("mSCAddress") or ''
|
||||
msc_div_dept_room = dates_and_deadlines.get("mSCDeptDiv") or ''
|
||||
|
||||
# Extract trial details
|
||||
trial_date = dates_and_deadlines.get("trialDate") or ''
|
||||
trial_time = dates_and_deadlines.get("trialTime") or ''
|
||||
trial_address = dates_and_deadlines.get("trialAddress") or ''
|
||||
trial_div_dept_room = dates_and_deadlines.get("trialDeptDivRoom") or ''
|
||||
|
||||
# Extract final result of trial/MSC
|
||||
final_result = dates_and_deadlines.get("finalResultOfTrialMSCCa") or ''
|
||||
|
||||
# Extract settlement details
|
||||
date_of_settlement = dates_and_deadlines.get("dateOfStipulation") or ''
|
||||
final_obligation = dates_and_deadlines.get("finalObligationUnderTheStip") or ''
|
||||
def_comply_stip = dates_and_deadlines.get("defendantsComplyWithStip") or ''
|
||||
|
||||
# Extract judgment and writ details
|
||||
judgment_date = dates_and_deadlines.get("dateOfJudgment") or ''
|
||||
writ_issued_date = dates_and_deadlines.get("writIssuedDate") or ''
|
||||
|
||||
# Extract lockout and stay details
|
||||
scheduled_lockout = dates_and_deadlines.get("sheriffScheduledDate") or ''
|
||||
oppose_stays = dates_and_deadlines.get("opposeStays") or ''
|
||||
|
||||
# Extract premises safety and entry code
|
||||
premises_safety = new_file_review.get("lockoutSafetyIssuesOrSpecialCareIssues") or ''
|
||||
matter_gate_code = property_info.get("propertyEntryCodeOrInstructions") or ''
|
||||
|
||||
# Extract possession recovered date
|
||||
date_possession_recovered = dates_and_deadlines.get("datePossessionRecovered") or ''
|
||||
|
||||
# Extract attorney fees and costs
|
||||
attorney_fees = fees_and_costs.get("attorneyFeesTotal") or ''
|
||||
costs = fees_and_costs.get("costs") or ''
|
||||
|
||||
row = {
|
||||
"client": c.get("firstName"),
|
||||
"matter_description": p.get("projectName"),
|
||||
@@ -147,6 +207,35 @@ def fetch_all_projects():
|
||||
"phase_name": p.get("phaseName"),
|
||||
"completed_tasks": completed_tasks,
|
||||
"pending_tasks": pending_tasks,
|
||||
"notice_service_date": notice_service_date,
|
||||
"notice_expiration_date": notice_expiration_date,
|
||||
"daily_rent_damages": daily_rent_damages,
|
||||
"default_date": default_date,
|
||||
"demurrer_hearing_date": demurrer_hearing_date,
|
||||
"motion_to_strike_hearing_date": motion_to_strike_hearing_date,
|
||||
"motion_to_quash_hearing_date": motion_to_quash_hearing_date,
|
||||
"other_motion_hearing_date": other_motion_hearing_date,
|
||||
"msc_date": msc_date,
|
||||
"msc_time": msc_time,
|
||||
"msc_address": msc_address,
|
||||
"msc_div_dept_room": msc_div_dept_room,
|
||||
"trial_date": trial_date,
|
||||
"trial_time": trial_time,
|
||||
"trial_address": trial_address,
|
||||
"trial_div_dept_room": trial_div_dept_room,
|
||||
"final_result": final_result,
|
||||
"date_of_settlement": date_of_settlement,
|
||||
"final_obligation": final_obligation,
|
||||
"def_comply_stip": def_comply_stip,
|
||||
"judgment_date": judgment_date,
|
||||
"writ_issued_date": writ_issued_date,
|
||||
"scheduled_lockout": scheduled_lockout,
|
||||
"oppose_stays": oppose_stays,
|
||||
"premises_safety": premises_safety,
|
||||
"matter_gate_code": matter_gate_code,
|
||||
"date_possession_recovered": date_possession_recovered,
|
||||
"attorney_fees": attorney_fees,
|
||||
"costs": costs,
|
||||
|
||||
"service_attempt_date_1": next(iter(service_info), {}).get('serviceDate'),
|
||||
"contacts": cs,
|
||||
|
||||
@@ -1,62 +1,61 @@
|
||||
{% extends 'base.html' %}
|
||||
{% block content %}
|
||||
<h1 class="text-xl font-semibold mb-4">Projects for {{ case_email }}</h1>
|
||||
<div class="bg-white shadow rounded-2xl overflow-hidden">
|
||||
<div class="overflow-x-auto">
|
||||
<table class="w-full max-h-[70vh] overflow-y-auto">
|
||||
<thead class="bg-slate-100 text-left text-sm sticky top-0 z-10">
|
||||
<div class="bg-white shadow rounded-2xl overflow-scroll">
|
||||
<table class="w-full">
|
||||
<thead class="bg-slate-100 text-left text-sm">
|
||||
<tr>
|
||||
<th class="px-4 py-3 whitespace-nowrap">Matter Num</th>
|
||||
<th class="px-4 py-3 whitespace-nowrap">Client / Property</th>
|
||||
<th class="px-4 py-3 whitespace-nowrap">Matter Description</th>
|
||||
<th class="px-4 py-3 whitespace-nowrap">Defendant 1</th>
|
||||
<th class="px-4 py-3 whitespace-nowrap">Matter Open</th>
|
||||
<th class="px-4 py-3 whitespace-nowrap">Practice Area</th>
|
||||
<th class="px-4 py-3 whitespace-nowrap">Notice Type</th>
|
||||
<th class="px-4 py-3 whitespace-nowrap">Case Number</th>
|
||||
<th class="px-4 py-3 whitespace-nowrap">Premises Address</th>
|
||||
<th class="px-4 py-3 whitespace-nowrap">Premises City</th>
|
||||
<th class="px-4 py-3 whitespace-nowrap">Client Email (Primary)</th>
|
||||
<th class="px-4 py-3 whitespace-nowrap">Responsible Attorney and best contact</th>
|
||||
<th class="px-4 py-3 whitespace-nowrap">Staff person currently in charge of your case, with contact info</th>
|
||||
<th class="px-4 py-3 whitespace-nowrap">2nd Staff person currently in charge of your case, with contact info</th>
|
||||
<th class="px-4 py-3 whitespace-nowrap">Link to Hona Portal</th>
|
||||
<th class="px-4 py-3 whitespace-nowrap">Matter Stage</th>
|
||||
<th class="px-4 py-3 whitespace-nowrap w-[500px]">Completed Tasks</th>
|
||||
<th class="px-4 py-3 whitespace-nowrap">Pending Tasks</th>
|
||||
<th class="px-4 py-3 whitespace-nowrap">Notice Service Date</th>
|
||||
<th class="px-4 py-3 whitespace-nowrap">Notice Expir. Date</th>
|
||||
<th class="px-4 py-3 whitespace-nowrap">Date Case Filed</th>
|
||||
<th class="px-4 py-3 whitespace-nowrap">Daily Rent Damages</th>
|
||||
<th class="px-4 py-3 whitespace-nowrap">Default Date</th>
|
||||
<th class="px-4 py-3 whitespace-nowrap">Default Entered On</th>
|
||||
<th class="px-4 py-3 whitespace-nowrap">Motions:</th>
|
||||
<th class="px-4 py-3 whitespace-nowrap">Demurrer Hearing Date</th>
|
||||
<th class="px-4 py-3 whitespace-nowrap">Motion To Strike Hearing Date</th>
|
||||
<th class="px-4 py-3 whitespace-nowrap">Motion to Quash Hearing Date</th>
|
||||
<th class="px-4 py-3 whitespace-nowrap">Other Motion Hearing Date</th>
|
||||
<th class="px-4 py-3 whitespace-nowrap">MSC Date</th>
|
||||
<th class="px-4 py-3 whitespace-nowrap">MSC Time</th>
|
||||
<th class="px-4 py-3 whitespace-nowrap">MSC Address</th>
|
||||
<th class="px-4 py-3 whitespace-nowrap">MSC Div/ Dept/ Room</th>
|
||||
<th class="px-4 py-3 whitespace-nowrap">Trial Date</th>
|
||||
<th class="px-4 py-3 whitespace-nowrap">Trial Time</th>
|
||||
<th class="px-4 py-3 whitespace-nowrap">Trial Address</th>
|
||||
<th class="px-4 py-3 whitespace-nowrap">Trial Div/ Dept/ Room</th>
|
||||
<th class="px-4 py-3 whitespace-nowrap">Final Result of Trial/ MSC</th>
|
||||
<th class="px-4 py-3 whitespace-nowrap">Date of Settlement</th>
|
||||
<th class="px-4 py-3 whitespace-nowrap">Final Obligation Under the Stip</th>
|
||||
<th class="px-4 py-3 whitespace-nowrap">Def's Comply with the Stip?</th>
|
||||
<th class="px-4 py-3 whitespace-nowrap">Judgment Date</th>
|
||||
<th class="px-4 py-3 whitespace-nowrap">Writ Issued Date</th>
|
||||
<th class="px-4 py-3 whitespace-nowrap">Scheduled Lockout</th>
|
||||
<th class="px-4 py-3 whitespace-nowrap">Oppose Stays?</th>
|
||||
<th class="px-4 py-3 whitespace-nowrap">Premises Safety or Access Issues</th>
|
||||
<th class="px-4 py-3 whitespace-nowrap">Matter Gate or Entry Code</th>
|
||||
<th class="px-4 py-3 whitespace-nowrap">Date Possession Recovered</th>
|
||||
<th class="px-4 py-3 whitespace-nowrap">Attorney's Fees</th>
|
||||
<th class="px-4 py-3 whitespace-nowrap">Costs</th>
|
||||
<th class="px-4 py-3 whitespace-nowrap">Service Attempt Date 1</th>
|
||||
<th class="px-4 py-3">Matter Num</th>
|
||||
<th class="px-4 py-3">Client / Property</th>
|
||||
<th class="px-4 py-3">Matter Description</th>
|
||||
<th class="px-4 py-3">Defendant 1</th>
|
||||
<th class="px-4 py-3">Matter Open</th>
|
||||
<th class="px-4 py-3">Practice Area</th>
|
||||
<th class="px-4 py-3">Notice Type</th>
|
||||
<th class="px-4 py-3">Case Number</th>
|
||||
<th class="px-4 py-3">Premises Address</th>
|
||||
<th class="px-4 py-3">Premises City</th>
|
||||
<th class="px-4 py-3">Client Email (Primary)</th>
|
||||
<th class="px-4 py-3">Responsible Attorney and best contact</th>
|
||||
<th class="px-4 py-3">Staff person currently in charge of your case, with contact info</th>
|
||||
<th class="px-4 py-3">2nd Staff person currently in charge of your case, with contact info</th>
|
||||
<th class="px-4 py-3">Link to Hona Portal</th>
|
||||
<th class="px-4 py-3">Matter Stage</th>
|
||||
<th class="px-4 py-3">Completed Tasks</th>
|
||||
<th class="px-4 py-3">Pending Tasks</th>
|
||||
<th class="px-4 py-3">Notice Service Date</th>
|
||||
<th class="px-4 py-3">Notice Expir. Date</th>
|
||||
<th class="px-4 py-3">Date Case Filed</th>
|
||||
<th class="px-4 py-3">Daily Rent Damages</th>
|
||||
<th class="px-4 py-3">Default Date</th>
|
||||
<th class="px-4 py-3">Default Entered On</th>
|
||||
<th class="px-4 py-3">Motions:</th>
|
||||
<th class="px-4 py-3">Demurrer Hearing Date</th>
|
||||
<th class="px-4 py-3">Motion To Strike Hearing Date</th>
|
||||
<th class="px-4 py-3">Motion to Quash Hearing Date</th>
|
||||
<th class="px-4 py-3">Other Motion Hearing Date</th>
|
||||
<th class="px-4 py-3">MSC Date</th>
|
||||
<th class="px-4 py-3">MSC Time</th>
|
||||
<th class="px-4 py-3">MSC Address</th>
|
||||
<th class="px-4 py-3">MSC Div/ Dept/ Room</th>
|
||||
<th class="px-4 py-3">Trial Date</th>
|
||||
<th class="px-4 py-3">Trial Time</th>
|
||||
<th class="px-4 py-3">Trial Address</th>
|
||||
<th class="px-4 py-3">Trial Div/ Dept/ Room</th>
|
||||
<th class="px-4 py-3">Final Result of Trial/ MSC</th>
|
||||
<th class="px-4 py-3">Date of Settlement</th>
|
||||
<th class="px-4 py-3">Final Obligation Under the Stip</th>
|
||||
<th class="px-4 py-3">Def's Comply with the Stip?</th>
|
||||
<th class="px-4 py-3">Judgment Date</th>
|
||||
<th class="px-4 py-3">Writ Issued Date</th>
|
||||
<th class="px-4 py-3">Scheduled Lockout</th>
|
||||
<th class="px-4 py-3">Oppose Stays?</th>
|
||||
<th class="px-4 py-3">Premises Safety or Access Issues</th>
|
||||
<th class="px-4 py-3">Matter Gate or Entry Code</th>
|
||||
<th class="px-4 py-3">Date Possession Recovered</th>
|
||||
<th class="px-4 py-3">Attorney's Fees</th>
|
||||
<th class="px-4 py-3">Costs</th>
|
||||
<th class="px-4 py-3">Service Attempt Date 1</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y">
|
||||
@@ -120,7 +119,7 @@
|
||||
|
||||
</td>
|
||||
<td class="px-4 py-3 text-sm"> {{ r.phase_name }}</td>
|
||||
<td class="px-4 py-3 text-sm min-w-[500px] align-top" x-data="{ showCompletedModal: false }">
|
||||
<td class="px-4 py-3 text-sm align-top" x-data="{ showCompletedModal: false}">
|
||||
{% if r.completed_tasks %}
|
||||
<div>
|
||||
<ul class="list-disc list-inside align-top">
|
||||
@@ -192,39 +191,39 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="px-4 py-3 text-sm">{{ r.notice_service_date }}</td>
|
||||
<td class="px-4 py-3 text-sm">{{ r.notice_expiration_date }}</td>
|
||||
<td class="px-4 py-3 text-sm"></td>
|
||||
<td class="px-4 py-3 text-sm">{{ r.daily_rent_damages }}</td>
|
||||
<td class="px-4 py-3 text-sm">{{ r.default_date }}</td>
|
||||
<td class="px-4 py-3 text-sm">{{ r.default_entered_on_date }}</td>
|
||||
<td class="px-4 py-3 text-sm"></td>
|
||||
<td class="px-4 py-3 text-sm"></td>
|
||||
<td class="px-4 py-3 text-sm"></td>
|
||||
<td class="px-4 py-3 text-sm"></td>
|
||||
<td class="px-4 py-3 text-sm"></td>
|
||||
<td class="px-4 py-3 text-sm"></td>
|
||||
<td class="px-4 py-3 text-sm"></td>
|
||||
<td class="px-4 py-3 text-sm"></td>
|
||||
<td class="px-4 py-3 text-sm"></td>
|
||||
<td class="px-4 py-3 text-sm"></td>
|
||||
<td class="px-4 py-3 text-sm"></td>
|
||||
<td class="px-4 py-3 text-sm"></td>
|
||||
<td class="px-4 py-3 text-sm"></td>
|
||||
<td class="px-4 py-3 text-sm"></td>
|
||||
<td class="px-4 py-3 text-sm"></td>
|
||||
<td class="px-4 py-3 text-sm"></td>
|
||||
<td class="px-4 py-3 text-sm"></td>
|
||||
<td class="px-4 py-3 text-sm"></td>
|
||||
<td class="px-4 py-3 text-sm"></td>
|
||||
<td class="px-4 py-3 text-sm"></td>
|
||||
<td class="px-4 py-3 text-sm"></td>
|
||||
<td class="px-4 py-3 text-sm"></td>
|
||||
<td class="px-4 py-3 text-sm"></td>
|
||||
<td class="px-4 py-3 text-sm"></td>
|
||||
<td class="px-4 py-3 text-sm"></td>
|
||||
<td class="px-4 py-3 text-sm"></td>
|
||||
<td class="px-4 py-3 text-sm"></td>
|
||||
<td class="px-4 py-3 text-sm"></td>
|
||||
<td class="px-4 py-3 text-sm"></td>
|
||||
<td class="px-4 py-3 text-sm"></td>
|
||||
<td class="px-4 py-3 text-sm"></td>
|
||||
<td class="px-4 py-3 text-sm">{{ r.service_attempt_date_1}}</td>
|
||||
<td class="px-4 py-3 text-sm">{{ r.demurrer_hearing_date }}</td>
|
||||
<td class="px-4 py-3 text-sm">{{ r.motion_to_strike_hearing_date }}</td>
|
||||
<td class="px-4 py-3 text-sm">{{ r.motion_to_quash_hearing_date }}</td>
|
||||
<td class="px-4 py-3 text-sm">{{ r.other_motion_hearing_date }}</td>
|
||||
<td class="px-4 py-3 text-sm">{{ r.msc_date }}</td>
|
||||
<td class="px-4 py-3 text-sm">{{ r.msc_time }}</td>
|
||||
<td class="px-4 py-3 text-sm">{{ r.msc_address }}</td>
|
||||
<td class="px-4 py-3 text-sm">{{ r.msc_div_dept_room }}</td>
|
||||
<td class="px-4 py-3 text-sm">{{ r.trial_date }}</td>
|
||||
<td class="px-4 py-3 text-sm">{{ r.trial_time }}</td>
|
||||
<td class="px-4 py-3 text-sm">{{ r.trial_address }}</td>
|
||||
<td class="px-4 py-3 text-sm">{{ r.trial_div_dept_room }}</td>
|
||||
<td class="px-4 py-3 text-sm">{{ r.final_result }}</td>
|
||||
<td class="px-4 py-3 text-sm">{{ r.date_of_settlement }}</td>
|
||||
<td class="px-4 py-3 text-sm">{{ r.final_obligation }}</td>
|
||||
<td class="px-4 py-3 text-sm">{{ r.def_comply_stip }}</td>
|
||||
<td class="px-4 py-3 text-sm">{{ r.judgment_date }}</td>
|
||||
<td class="px-4 py-3 text-sm">{{ r.writ_issued_date }}</td>
|
||||
<td class="px-4 py-3 text-sm">{{ r.scheduled_lockout }}</td>
|
||||
<td class="px-4 py-3 text-sm">{{ r.oppose_stays }}</td>
|
||||
<td class="px-4 py-3 text-sm">{{ r.premises_safety }}</td>
|
||||
<td class="px-4 py-3 text-sm">{{ r.matter_gate_code }}</td>
|
||||
<td class="px-4 py-3 text-sm">{{ r.date_possession_recovered }}</td>
|
||||
<td class="px-4 py-3 text-sm">{{ r.attorney_fees }}</td>
|
||||
<td class="px-4 py-3 text-sm">{{ r.costs }}</td>
|
||||
<td class="px-4 py-3 text-sm">{{ r.service_attempt_date_1 }}</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
@@ -232,8 +231,6 @@
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</div>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user