diff --git a/app.py b/app.py index ba80039..522ab62 100644 --- a/app.py +++ b/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, diff --git a/templates/dashboard.html b/templates/dashboard.html index 751c344..3ae4079 100644 --- a/templates/dashboard.html +++ b/templates/dashboard.html @@ -1,65 +1,64 @@ {% extends 'base.html' %} {% block content %}

Projects for {{ case_email }}

-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
+
Matter NumClient / PropertyMatter DescriptionDefendant 1Matter OpenPractice AreaNotice TypeCase NumberPremises AddressPremises CityClient Email (Primary)Responsible Attorney and best contactStaff person currently in charge of your case, with contact info2nd Staff person currently in charge of your case, with contact infoLink to Hona PortalMatter StageCompleted TasksPending TasksNotice Service DateNotice Expir. DateDate Case FiledDaily Rent DamagesDefault DateDefault Entered OnMotions:Demurrer Hearing DateMotion To Strike Hearing DateMotion to Quash Hearing DateOther Motion Hearing DateMSC DateMSC TimeMSC AddressMSC Div/ Dept/ RoomTrial DateTrial TimeTrial AddressTrial Div/ Dept/ RoomFinal Result of Trial/ MSCDate of SettlementFinal Obligation Under the StipDef's Comply with the Stip?Judgment DateWrit Issued DateScheduled LockoutOppose Stays?Premises Safety or Access IssuesMatter Gate or Entry CodeDate Possession RecoveredAttorney's FeesCostsService Attempt Date 1
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {% for r in rows %} @@ -120,7 +119,7 @@ - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + {% else %} {% endfor %} - - -
Matter NumClient / PropertyMatter DescriptionDefendant 1Matter OpenPractice AreaNotice TypeCase NumberPremises AddressPremises CityClient Email (Primary)Responsible Attorney and best contactStaff person currently in charge of your case, with contact info2nd Staff person currently in charge of your case, with contact infoLink to Hona PortalMatter StageCompleted TasksPending TasksNotice Service DateNotice Expir. DateDate Case FiledDaily Rent DamagesDefault DateDefault Entered OnMotions:Demurrer Hearing DateMotion To Strike Hearing DateMotion to Quash Hearing DateOther Motion Hearing DateMSC DateMSC TimeMSC AddressMSC Div/ Dept/ RoomTrial DateTrial TimeTrial AddressTrial Div/ Dept/ RoomFinal Result of Trial/ MSCDate of SettlementFinal Obligation Under the StipDef's Comply with the Stip?Judgment DateWrit Issued DateScheduled LockoutOppose Stays?Premises Safety or Access IssuesMatter Gate or Entry CodeDate Possession RecoveredAttorney's FeesCostsService Attempt Date 1
{{ r.phase_name }} + {% if r.completed_tasks %}
    @@ -192,48 +191,46 @@
{% endif %}
{{ r.notice_service_date }}{{ r.notice_expiration_date }} {{ r.daily_rent_damages }}{{ r.default_date }}{{ r.default_entered_on_date }} {{ r.service_attempt_date_1}}{{ r.demurrer_hearing_date }}{{ r.motion_to_strike_hearing_date }}{{ r.motion_to_quash_hearing_date }}{{ r.other_motion_hearing_date }}{{ r.msc_date }}{{ r.msc_time }}{{ r.msc_address }}{{ r.msc_div_dept_room }}{{ r.trial_date }}{{ r.trial_time }}{{ r.trial_address }}{{ r.trial_div_dept_room }}{{ r.final_result }}{{ r.date_of_settlement }}{{ r.final_obligation }}{{ r.def_comply_stip }}{{ r.judgment_date }}{{ r.writ_issued_date }}{{ r.scheduled_lockout }}{{ r.oppose_stays }}{{ r.premises_safety }}{{ r.matter_gate_code }}{{ r.date_possession_recovered }}{{ r.attorney_fees }}{{ r.costs }}{{ r.service_attempt_date_1 }}
No matching projects found.
-
+ +
{% endblock %} \ No newline at end of file