Skip to content

Commit

Permalink
Merge pull request #100 from codeforbtv/client-checkout-sheet
Browse files Browse the repository at this point in the history
Client checkout sheet
  • Loading branch information
jeremyvermont authored Nov 6, 2019
2 parents bb68a22 + 9a6b342 commit 39a5259
Show file tree
Hide file tree
Showing 8 changed files with 203 additions and 23 deletions.
33 changes: 32 additions & 1 deletion extensionDirectory/components.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ Vue.component('filing-nav', {
<a href="#extra-documents">Extra Documents</a>
<ol>
<li class="filing-nav__child-link">
<a href="#clinic-checkout">Clinic Summary Sheet</a>
<a href="#clinic-checkout">Clinic Record</a>
</li>
<li class="filing-nav__child-link">
<a href="#client-checkout">Client Summary Sheet</a>
</li>
</ol>
</li>
Expand Down Expand Up @@ -96,4 +99,32 @@ Vue.component('pills-row', {
return duration.asDays()/365.25
},
}
});

Vue.component('filing-type-heading', {
methods: {
getCheckoutPhrases(fType) {
checkoutPhrases=[
{type: "ExC", stipType: "StipExC", phrase: "The following are prior conviction(s) for which we prepared a petition to expunge:"},
{type: "ExNC", stipType: "StipExNC", phrase: "The following are cases that DID NOT result in a conviction and we prepared a petition to expunge:"},
{type: "ExNCrim", stipType: "StipExNCrim", phrase: "The following are counts that are no longer crimes and we prepared a petition to expunge:"},
{type: "SC", stipType: "StipSC", phrase: "The following are prior convictions and we prepared a petition to seal:"},
{type: "SDui", stipType: "StipSDui", phrase: "The following is a prior DUI conviction and we filed a petition to seal:"}
]

for (i = 0; i<checkoutPhrases.length; i++) {
if (checkoutPhrases[i]["type"] == fType || checkoutPhrases[i]["stipType"] == fType) {
return checkoutPhrases[i]["phrase"]
}
}
console.log(checkoutPhrases)
}},
template: (`
<div>
<p>
{{getCheckoutPhrases(heading)}}
</p>
</div>
`),
props: ['heading']
});
25 changes: 25 additions & 0 deletions extensionDirectory/disclaimer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html lang="en">

<head>
<title>Expunge VT Terms and Conditions</title>
<link href="filings.css" rel="stylesheet" type="text/css">


<!-- Bootstrap -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">

<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>



</head>

<body id="disclaimer">
<div class="disclaimer">
<h1>Expunge VT Terms and Conditions</h1>
<p>ExpungeVT is a tool created by Code for BTV in collaboration with Vermont Legal Aid (collectively the Contributors"). ExpungeVT, as referenced herein, is inclusive of, but is not limited to, the ExpungeVT Google Chrome extension, any associated or linked web page, any document generated through the extension or related page, and any other linked or otherwise related pages, documentation, materials or information.</p>
<p>ExpungeVT is intended only for attorney use and should only be used by, or under the supervision of, a licensed Vermont attorney. Any information provided through ExpungeVT, expressly or impliedly, does not, and is not intended to, constitute legal advice. Instead, ExpungeVT is provided for general informational purposes only. Information obtained through ExpungeVT does not constitute the most up-to-date legal or other information and should be verified with a more direct source of legal of legal or factual authority. ExpungeVT contains links to other third-party websites. Such links are only for the convenience of the user. The Contributors and their members do not recommend or endorse the contents of the third-party sites.</p>
<p>All liability with respect to actions taken or not taken based on information or materials obtained through ExpungeVT is hereby expressly disclaimed. ExpungeVT is provided "as is" and no representations are made that the content is error-free.</p>
</div>
</body>
52 changes: 52 additions & 0 deletions extensionDirectory/filings.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,28 @@ a.btn {
padding:4rem;
}

.disclaimer {
display: flex;
flex-direction: column;
justify-content: center;
text-align: left;
padding:4rem;
max-width:800px;
margin:auto;
}
.disclaimer-message {
max-width: 65rem;
width:70%;
min-width:50rem;
height: 100%;
margin-left:17rem;
margin-right:auto;
margin-top:2rem;
position: relative;
padding:1.5rem;
background-color:#eee;
}

/* reset page font sizes */
.page p, .page h1 {
margin-bottom:0;
Expand Down Expand Up @@ -304,9 +326,39 @@ p.filing-dated-city {
border-bottom: 1.5px solid #000;
}

/* CHeckout sheet */

.client-checkout-header-left {
width: 40%;
margin-right: 10px;
}
.client-checkout-header-right {
width: 55%;
}

.pro-se {
outline: 2px solid black;
font-size: 18px !important;
padding: 3px;
}

.county-header {
border-top: 3px solid black;
/*border-bottom: 1px solid black;*/
margin-bottom: 3px;
}

.atty-note-box {
border-bottom: 1px solid black;
}

.client-text {
width: 80% !important;
}

.summary-table td {
padding: 3px !important;
}

@media screen {
body {
Expand Down
65 changes: 63 additions & 2 deletions extensionDirectory/filings.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

<!-- Begin Vue App -->


<div id="filing-app">
<template v-if="saved.counts.length > 0 && (filings || ineligible)">
<div v-if="petitioner.name" class="header-bar-wrapper no-print">
Expand All @@ -55,6 +56,7 @@ <h1>Filings for {{petitioner.name}}</h1>
<tbody>
<tr>
<td>
<section class="no-print disclaimer-message">Verify documents below against docket sheet to confirm information is accurate and complete. <br><a href="disclaimer.html" target="_blank">Terms and Conditions.</a></section>
<section v-for="group in filings" v-bind:id="group.county">
<article class="page" v-for="filing in group.filings" v-bind:id="filing.id">

Expand Down Expand Up @@ -511,6 +513,67 @@ <h1>Filings for {{petitioner.name}} (DOB: {{petitioner.dob | dateFormatSimple}})

<!-- End Clinic Checkout Sheet -->

<!-- Client Checkout Sheet -->

<article class="page" id="client-checkout">
<div class="filing-document">
<div class="filing__title">Client Checkout Sheet</div>
<p v-if="settings.proSe" class="pro-se">You are asking the court to clear your record without any more help from an attorney. You will have to respond to the court and the State on your own when asked to do so.</p>
<div class="filing-body">
<div class="title petition__title"></div>
<div class="client-checkout-header filing-header">
<div class="client-checkout-header-left filing-header__half">
<h1>Filings for {{petitioner.name}} (DOB: {{petitioner.dob}})
</h1>
<p class="filing-closing__petitioner-address" v-html="petitioner.address"></p>
<p class="filing-closing__phone">Phone: <span class="no-visible">{{responses['phone']}}</span>
<input class="no-print" v-model="responses['phone']" placeholder="Petitioner Phone Number">
</p>
</div>
<div class="client-checkout-header-right filing-header__half">
The information describes our efforts to clear your record today. This includes information about records you can try to clear now and records that have to wait. We can't be sure that your entire criminal record is listed here. Contact Legal Aid at (800) 889-2047 if you have questions.
</div>
</div>
<div class="county-header" v-for="group in filings">
<b>{{group.county}} County<br>We found and reviewed {{group.filings[0].numCounts}} <template v-if="group.filings[0].numCounts > 1">counts</template><template v-else>count</template>:</b>
<div v-for="filing in group.filings" v-if="filing.type !='NoA'">
<filing-type-heading v-if="filing.numCounts > 0" v-bind:heading="filing.type"></filing-type-heading>
<ul>
<li v-for="count in filing.counts">
You were charged with {{count.description}}.
<p>
Docket note: "{{count.offenseDisposition}}" - {{count.dispositionDate}}. (Docket# {{count.docketNum}} {{count.docketCounty}})
</p>
</li>
</ul>
<div class="atty-note-box">
<span><textarea class="no-print client-text" v-model="responses[filing.id + 'summary']" v-bind:placeholder="'Type checkout notes for '+ group.county + ' here...'"></textarea></span>
<p class="no-visible">Notes: <span v-html="nl2br(responses[filing.id + 'summary']) || ' '"></span></p>
</div>
</div>
</div>
<div scope="col" Colspan="3" v-if="ineligible.length > 0">

<b>You had {{ineligible.length}} <template v-if="ineligible.length > 1">counts</template><template v-else>count</template> that we did not file anything for today:</b>
</p>
<ul>
<li v-for="(count, index) in ineligible">
In <b>{{count.county}}</b> county, you were charged with {{count.description}}. On {{count.dispositionDate}}, the docket notes "{{count.offenseDisposition}}." (Docket# {{count.docketNum}} {{count.docketCounty}})
<div>
<textarea class="no-print client-text" v-model="responses['ineligiblesummary' + index]" placeholder="Type checkout notes for this ineligible count here..."></textarea>
<p class="no-visible" v-html="nl2br(responses['ineligiblesummary' + index])"></p>

</div>
</li>
</ul>

</div>
</div>
</div>
</article>

<!-- End Client Checkout Sheet -->

</section>

<!-- End Extra Documents -->
Expand Down Expand Up @@ -545,5 +608,3 @@ <h1>Filings for {{petitioner.name}} (DOB: {{petitioner.dob | dateFormatSimple}})


</body>

</html>
11 changes: 10 additions & 1 deletion extensionDirectory/filings.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
const maxCountsOnNoA = 10;
Vue.config.devtools = true

$(document).on('keydown', function(e) {
if((e.ctrlKey || e.metaKey) && (e.key == "p" || e.charCode == 16 || e.charCode == 112 || e.keyCode == 80) ){
e.cancelBubble = true;
e.preventDefault();
e.stopImmediatePropagation();
app.printDocument();
}
});

function initAfterVue(){
//sets intital height of all text areas to show all text.
Expand Down Expand Up @@ -127,6 +135,8 @@ function countyCodeFromCounty(county) {
return countyCodes[county]
}



//Vue app
var app = new Vue({
el: '#filing-app',
Expand Down Expand Up @@ -305,7 +315,6 @@ var app = new Vue({
}
}
}

//add all filings for this county to the returned filing object.
groupedFilings.push(
{county:countyName,
Expand Down
6 changes: 3 additions & 3 deletions extensionDirectory/popup.css
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ p.pet-detail {
align-content: center;
text-align: center;
width: 100%;
margin-top: 70px;
margin-top: 40px;
}

#mainButtonDiv {
Expand Down Expand Up @@ -159,9 +159,9 @@ p.pet-detail {
white-space: nowrap;
}

#vtCourtsOnline {
.title-page__link {
margin-top: 10px;
margin-bottom: 20px;
margin-bottom: 10px;
width: 70%;
text-align: center;
margin-left: auto;
Expand Down
22 changes: 12 additions & 10 deletions extensionDirectory/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,12 @@
</div>
<p id="introText">To begin, navigate to a court docket page relating to your client, and click the "Add Counts" button.
</p>
<a id="vtCourtsOnlineA" target="_blank" href="https://secure.vermont.gov/vtcdas/user">
<a id="vtCourtsOnlineA" class="title-page__link" target="_blank" href="https://secure.vermont.gov/vtcdas/user">
<p id="vtCourtsOnline"><b>VT Courts Online <i class="fas fa-external-link-alt"></i></b></p>
</a>
<a target="_blank" href="disclaimer.html" class="title-page__link">
<p style="padding-bottom:30px;"><b>Terms &amp; Conditions <i class="fas fa-external-link-alt"></i></b></p>
</a>
</div>
<div class="active-state" v-else>
<div class="popTop">
Expand Down Expand Up @@ -86,8 +89,8 @@
<div class="card-header__title-row">
<div id="description-date" class="card-header__meta-data">
<div class="card-header__description btn btn-link btn-sm" >
<p v-if="count.docketNum">{{count.docketNum}} {{count.county | toCountyCode }}</p>
<p v-if="count.description">{{count.description}}</p>
<p v-if="count.docketNum"><b>{{count.docketNum}} {{count.county | toCountyCode }}</b></p>
<p v-if="count.description"><b>{{count.description}}</b></p>
</div>
<p class='card-header__disposition-date' v-if="count.dispositionDate">Est. Disposition: {{count.dispositionDate | dateFormatSimple}} ({{count.dispositionDate | sinceNow}} ago)</p>

Expand All @@ -111,21 +114,20 @@
</div>
<div class="card-header__bottom-row">
<pills-row v-bind:count="count" v-bind:dob="saved.defDOB"></pills-row>
<i class="fas fa-folder-minus" v-on:click="confirmDeleteCount($event,count.uid)"></i>
</div>
</div>
</div>

<div class="collapse-section">
<div class="card-body">
<p>County:&nbsp;<b>{{count.county}}</b></p>
<p>County:&nbsp;{{count.county}}</p>

<p v-if="count.titleNum || count.sectionNum">Statute:&nbsp;<b>{{count.titleNum}} V.S.A. <span v-if="count.sectionNum">&nbsp;&sect; {{count.sectionNum}}</span>&nbsp;({{count.offenseClass}})</b></p>
<p>Disposition:&nbsp;<b>{{count.offenseDisposition}} <span v-if="!count.offenseDisposition">Check Docket Sheet</span></b></p>
<p v-if="count.titleNum || count.sectionNum">Statute:&nbsp;{{count.titleNum}} V.S.A. <span v-if="count.sectionNum">&nbsp;&sect; {{count.sectionNum}}</span>&nbsp;({{count.offenseClass}})</p>
<p>Disposition:&nbsp;{{count.offenseDisposition}} <span v-if="!count.offenseDisposition">Check Docket Sheet</span></p>
<div class="row text-left">
<div class="col-4">Offense Date:<br> <b>{{count.allegedOffenseDate | dateFormatSimple}} <span v-if="!count.allegedOffenseDate">&nbsp;Not Entered</span></b></div>
<div class="col-4">Arrest/Citation Date:<br> <b>{{count.arrestCitationDate | dateFormatSimple}} <span v-if="!count.arrestCitationDate">&nbsp;Not Entered</span></b></div>
<div class="col-4">Disposition Date:<br><b>{{count.dispositionDate | dateFormatSimple}} <span v-if="!count.dispositionDate">&nbsp;Pending</span></b></div>
<div class="col-4">Offense Date:<br> {{count.allegedOffenseDate | dateFormatSimple}} <span v-if="!count.allegedOffenseDate">&nbsp;Not Entered</span></div>
<div class="col-4">Arrest/Citation Date:<br> {{count.arrestCitationDate | dateFormatSimple}} <span v-if="!count.arrestCitationDate">&nbsp;Not Entered</span></div>
<div class="col-4">Disposition Date:<br>{{count.dispositionDate | dateFormatSimple}} <span v-if="!count.dispositionDate">&nbsp;Pending</span></div>
</div>
</div>
</div>
Expand Down
12 changes: 6 additions & 6 deletions extensionDirectory/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function initListeners() {
chrome.storage.local.set({
counts: combinedData
});
\ });
});
});
$('body').on('click', 'select.petitionSelect', function(event) {
//prevents the select in the petition cards from opening the accordion.
Expand All @@ -36,18 +36,18 @@ function appendDataWithConfirmation(newData, oldData) {

var returnData = oldData
var newCounts = newData.counts

var totalNumMatchingExistingCounts = 0
for (count in newCounts) {
var currentCount = newCounts[count]
console.log(currentCount.uid)
if (oldData.counts.filter(count => count.uid === currentCount.uid).length = 0) {
var numMatchingExistingCounts = oldData.counts.filter(count => count.uid === currentCount.uid).length
if (numMatchingExistingCounts == 0) {
returnData.counts.push(currentCount)
totalNumMatchingExistingCounts += numMatchingExistingCounts
}
}

var totalMatchCount = (oldData.counts.length + newData.counts.length) - returnData.counts.length

if (totalMatchCount > 0) {
if (totalNumMatchingExistingCounts > 0) {
alert(`${totalMatchCount} counts matched existing counts and were not added.`)
}

Expand Down

0 comments on commit 39a5259

Please sign in to comment.