Skip to content

Commit

Permalink
Modify clinical document file permissions; remove parentheses display…
Browse files Browse the repository at this point in the history
…ed next to the alleged offense, arrest citation, and disposition date when a petitioner's date of birth is not supplied; and update storage based on the window focus.
  • Loading branch information
NathanWEdwards committed Jul 22, 2023
1 parent 9e75966 commit e1a9495
Show file tree
Hide file tree
Showing 18 changed files with 72 additions and 43 deletions.
Empty file modified clinicDocs/001_Notice of Appearance - pro se.pdf
100755 → 100644
Empty file.
Empty file.
Empty file modified clinicDocs/5119(g) Nonstipulated.pdf
100755 → 100644
Empty file.
Empty file modified clinicDocs/5119(g) Stipulated.pdf
100755 → 100644
Empty file.
Empty file modified clinicDocs/7602 NonStip.pdf
100755 → 100644
Empty file.
Empty file modified clinicDocs/7602 Stipulated.pdf
100755 → 100644
Empty file.
Empty file modified clinicDocs/7603 stipulated.pdf
100755 → 100644
Empty file.
58 changes: 32 additions & 26 deletions extensionDirectory/components/filings.vue
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,15 @@ const maxCountsOnNoA = 10;
function detectChangesInChromeStorage(app) {
chrome.storage.onChanged.addListener(function (changes, namespace) {
var countsChange = changes['counts'];
var responsesChange = changes['responses'];
var responsesChange = changes['responses']
if (countsChange === undefined && responsesChange === undefined) return;
// if (countsChange.newValue === undefined) {
// app.clearAll();
// return;
// }
app.loadAll(function () {});
if (countsChange.newValue === undefined) {
app.clearAll();
return;
}
if (!document.hasFocus()) {
app.loadAll(function () { });
}
});
}
Expand Down Expand Up @@ -169,19 +170,27 @@ export default {
saveSettings: function () {
// devLog("save settings", this.settings)
settingString = JSON.stringify(this.settings);
localStorage.setItem('localExpungeVTSettings', settingString);
if (document.hasFocus()) {
localStorage.setItem('localExpungeVTSettings', settingString);
}
},
saveResponses: function () {
devLog('save responses' + getError());
chrome.storage.local.set({
responses: this.responses,
});
devLog(
'save responses' + getError()
);
if (document.hasFocus()) {
chrome.storage.local.set({
responses: this.responses,
});
}
},
saveCounts: function () {
devLog('saving counts');
chrome.storage.local.set({
counts: toRaw(this.saved),
});
if (document.hasFocus()) {
chrome.storage.local.set({
counts: toRaw(this.saved),
});
}
},
handleNewDocketNums: function (sheetNum) {
if (sheetNum.toLowerCase().includes('-cr-')) {
Expand Down Expand Up @@ -224,13 +233,10 @@ export default {
}
callback();
// nextTick(function () {
// // call any vanilla js functions that need to run after vue is all done setting up.
// initAfterVue();
// });
// setTimeout(() => {
// initAfterVue();
// }, 0);
//this.$nextTick(function () {
//call any vanilla js functions that need to run after vue is all done setting up.
//initAfterVue();
//});
});
},
Expand Down Expand Up @@ -380,11 +386,11 @@ export default {
// when the county changes, insert a NOA
if (lastCounty != currCounty) {
const counts = filings
const docketCounts = filings
.filter((f) => f.county == currCounty)
.map((f) => f.counts)
.flat();
const noa = this.createNOAFiling(currCounty, counts);
const noa = this.createNOAFiling(currCounty, docketCounts);
filingsWithNOAs.push(noa);
if (this.responses[noa.id + '-feeForm'] === undefined) {
Expand Down Expand Up @@ -1273,9 +1279,9 @@ export default {
<!-- If there are filings to dispalay... -->
<div v-if="(numCountsToExpungeOrSeal + numCountsNoAction) > 0">
<!-- Page header & page actions -->
<div v-if="petitioner.name" class="header-bar-wrapper no-print">
<div class="header-bar-wrapper no-print">
<div class="header-bar">
<h1>Filings for {{petitioner.name}}</h1>
<h1 v-if="petitioner.name" >Filings for {{petitioner.name}}</h1>
<div class="header-bar__controls">
<div v-if="numDockets >= 1 && proSeFromRole(settings.role)">
<span
Expand Down
21 changes: 14 additions & 7 deletions extensionDirectory/components/manage-counts.vue
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ function detectChangesInChromeStorage(app) {
app.clearAll();
return;
}
app.loadAll(function () { });
if (!document.hasFocus()) {
app.loadAll(function () { });
}
});
}
Expand Down Expand Up @@ -135,18 +137,23 @@ export default {
saveSettings: function () {
// devLog("save settings", this.settings)
settingString = JSON.stringify(this.settings);
localStorage.setItem('localExpungeVTSettings', settingString);
if (document.hasFocus()) {
localStorage.setItem('localExpungeVTSettings', settingString);
}
},
saveResponses: function () {
devLog(
'save responses' + getError()
);
chrome.storage.local.set({
responses: this.responses,
});
if (document.hasFocus()) {
chrome.storage.local.set({
responses: this.responses,
});
}
},
saveCounts: function () {
devLog(`saving counts: ${JSON.stringify(this.saved)}`);
if (document.hasFocus())
chrome.storage.local.set({
counts: toRaw(this.saved),
});
Expand Down Expand Up @@ -373,9 +380,9 @@ export default {

<template>
<div>
<div v-if="petitioner.name" class="header-bar-wrapper no-print">
<div class="header-bar-wrapper no-print">
<div class="header-bar">
<h1>Counts for {{petitioner.name}}</h1>
<h1 v-if="petitioner.name">Counts for {{petitioner.name}}</h1>
<div class="header-bar__controls">
<button v-on:click="newCount" class="btn btn-primary">
Add Count <i class="fas fa-plus-circle"></i>
Expand Down
36 changes: 26 additions & 10 deletions extensionDirectory/components/popup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ function detectChangesInChromeStorage(app) {
app.clearAll();
return;
}
app.loadAll(function () {});
if (!document.hasFocus() || toRaw(app.saved.counts).length === 0 && Object.keys(toRaw(app.responses)).length === 0) {
app.loadAll(function () { });
}
});
}
Expand Down Expand Up @@ -91,7 +93,7 @@ export default {
handler() {
this.saveSettings();
//this.$nextTick(function () {
//vanilla js
//vanilla js
//});
},
deep: true,
Expand Down Expand Up @@ -139,19 +141,27 @@ export default {
saveSettings: function () {
// devLog("save settings", this.settings)
settingString = JSON.stringify(this.settings);
localStorage.setItem('localExpungeVTSettings', settingString);
if (document.hasFocus()) {
localStorage.setItem('localExpungeVTSettings', settingString);
}
},
saveResponses: function () {
devLog('save responses' + getError());
chrome.storage.local.set({
responses: this.responses,
});
devLog(
'save responses' + getError()
);
if (document.hasFocus()) {
chrome.storage.local.set({
responses: this.responses,
});
}
},
saveCounts: function () {
devLog('saving counts');
chrome.storage.local.set({
counts: toRaw(this.saved),
});
if (document.hasFocus()) {
chrome.storage.local.set({
counts: toRaw(this.saved),
});
}
},
loadAll: function (callback) {
var self = this;
Expand Down Expand Up @@ -667,6 +677,8 @@ export default {
<div class="col-4">
Offense Date:<br />
<span v-if="!count.allegedOffenseDate">&nbsp;Not Entered</span>
<span v-if="saved.defDOB.length === 0"
>{{ dateFormatSimple(count.allegedOffenseDate) }}</span>
<span v-else
>{{ dateFormatSimple(count.allegedOffenseDate) }} ({{
stringAgeInYearsAtDate(
Expand All @@ -679,6 +691,8 @@ export default {
<div class="col-4">
Arrest/Citation Date:<br />
<span v-if="!count.arrestCitationDate">&nbsp;Not Entered</span>
<span v-if="saved.defDOB.length === 0"
>{{ dateFormatSimple(count.arrestCitationDate) }}</span>
<span v-else
>{{ dateFormatSimple(count.arrestCitationDate) }} ({{
stringAgeInYearsAtDate(
Expand All @@ -691,6 +705,8 @@ export default {
<div class="col-4">
Disposition Date:<br />
<span v-if="!count.dispositionDate">&nbsp;Pending</span>
<span v-if="saved.defDOB.length === 0"
>{{ dateFormatSimple(count.dispositionDate) }}</span>
<span v-else
>{{ dateFormatSimple(count.dispositionDate) }} ({{
stringAgeInYearsAtDate(count.dispositionDate, saved.defDOB)
Expand Down
Empty file modified extensionDirectory/images/ACT_logo_color.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Empty file modified extensionDirectory/jsconfig.json
100755 → 100644
Empty file.
Empty file modified extensionDirectory/manage-counts.js
100755 → 100644
Empty file.
Empty file modified extensionDirectory/utils.js
100755 → 100644
Empty file.

0 comments on commit e1a9495

Please sign in to comment.