{{ selectedSideBar }}
-Case Notes and Comments
-+
+
Documents ({{ NumberOfDocuments }})
-
+
Download Selected
+
-
+
- Open Selected
+
+ Open Selected
-
+
Civil
-Civil
++
{{ data.label }}
-- {{ data.value | beautify_date }} + {{ beautifyDate(data.value) }}
-
+
Next Three Future Appearances
-+
+ Next Three Future Appearances +
+
-
-
-
- Loading ...
-
+
+
+
+ Loading ...
++
-
+
\ No newline at end of file
+ const getFileDescription = () => {
+ const data = civilFileStore.civilFileInformation.detailsData;
+ courtClassDescription.value = data.courtClassDescription;
+ courtLevelDescription.value = data.courtLevelDescription;
+ isMounted.value = true;
+ };
+
+ return {
+ isMounted,
+ courtClassDescription,
+ courtLevelDescription,
+ };
+ },
+ });
+
diff --git a/web/src/components/civil/CivilParties.vue b/web/src/components/civil/CivilParties.vue
index 86e70f6a..79ed9ae0 100644
--- a/web/src/components/civil/CivilParties.vue
+++ b/web/src/components/civil/CivilParties.vue
@@ -1,142 +1,210 @@
-
+
-
- {{courtClassDescription}}
- {{courtLevelDescription}}
-
+
+ {{
+ courtClassDescription
+ }}
+ {{
+ courtLevelDescription
+ }}
+
-
+
-
-
+ {{leftRole}} ({{numberOfLeftParties}})
--
+
+
- + {{ leftRole }} ({{ numberOfLeftParties }}) +
++
-
-
+ {{rightRole}} ({{numberOfRightParties}})
--
+
+
- + {{ rightRole }} ({{ numberOfRightParties }}) +
++
- - - - -
+ + + +
-
+
Last Three Past Appearances
-+
+ Last Three Past Appearances +
+
-
-
-
- Loading ...
-
+
+
+
+ Loading ...
+
+
Provided Documents ({{ NumberOfDocuments }})
-
+
Download Selected
+
- {{ data.value | truncate(45) }}
+
\ No newline at end of file
+ return {
+ panelItems,
+ SelectPanelItem,
+ };
+ },
+ });
+
diff --git a/web/src/components/courtfilesearch/CourtFileSearchResult.vue b/web/src/components/courtfilesearch/CourtFileSearchResult.vue
index 528df0fb..43e3b512 100644
--- a/web/src/components/courtfilesearch/CourtFileSearchResult.vue
+++ b/web/src/components/courtfilesearch/CourtFileSearchResult.vue
@@ -2,7 +2,7 @@
+ {{ truncate(data.value, 45) }}
@@ -151,268 +171,312 @@
diff --git a/web/src/components/civil/CivilSidePanel.vue b/web/src/components/civil/CivilSidePanel.vue
index c5b3f9dd..0dfb1120 100644
--- a/web/src/components/civil/CivilSidePanel.vue
+++ b/web/src/components/civil/CivilSidePanel.vue
@@ -1,64 +1,61 @@
-
-
-
+ -
-
- ON THIS FILE
-
- {{panelItem}}
-
-
-
-
-
- More than 100 records match the search criteria, only the first 100 are returned.
+ More than 100 records match the search criteria, only the first 100
+ are returned.
Search Results
-
- handleCaseClick(data.item[idSelector])">Add
- File
- handleAddFileAndViewClick(data.item[idSelector])">Add File and
- View
+ handleCaseClick(data.item[idSelector])"
+ >Add File
+ handleAddFileAndViewClick(data.item[idSelector])"
+ >Add File and View
Files to View
-
- handleDeleteClick(data.item[idSelector])">
+ handleDeleteClick(data.item[idSelector])"
+ >
Remove
@@ -98,8 +151,15 @@
- View File(s)
- Remove All Files and Start Over
+ View File(s)
+ Remove All Files and Start Over
Court File Search
-
-
-
-
-
-
-
-
-
-
-
-
-
- Criminal
-
-
- Family
-
-
- Small Claims
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -76,401 +109,518 @@
-
+
-
+
-
+
-
+
Search
- handleReset(true)">
+ handleReset(true)"
+ >
Reset search
+ v-if="
+ (searchCriteria.isCriminal &&
+ searchCriteria.searchBy === 'fileNumber') ||
+ searchCriteria.searchBy === 'lastName'
+ "
+ >
Optional...
-
+
+
-
-
+
+
-
-
+
+
-
+
-
-
+
-
+
@@ -12,12 +15,18 @@
-
-
+
+
- You are not authorized to access this page.
+
+ You are not authorized to access this page.
+
- Server is not responding. ({{ errorText }} "{{ errorCode }}")({{ errorText }} "{{ errorCode }}")
No Court Location Found.
@@ -31,13 +40,13 @@
-
+
@@ -60,7 +69,9 @@
-
+
-
+
-
+
@@ -118,7 +133,12 @@
-
+
Search
@@ -127,29 +147,35 @@
-
+
-
+
-
+
-
+
-
+
Total Cases ({{ totalCases }})
-
+
{{ totalTime }} {{ totalTimeUnit }}
@@ -172,7 +198,7 @@
-
+
@@ -183,9 +209,10 @@
-
+
- Server is not responding. ({{ errorText }} "{{ errorCode }}")
+ Server is not responding.
+ ({{ errorText }} "{{ errorCode }}")
No appearances.
@@ -193,7 +220,7 @@
-
+
@@ -210,379 +237,483 @@
diff --git a/web/src/components/courtlist/CourtListLayout.vue b/web/src/components/courtlist/CourtListLayout.vue
index 757c6d6c..a77a8f49 100644
--- a/web/src/components/courtlist/CourtListLayout.vue
+++ b/web/src/components/courtlist/CourtListLayout.vue
@@ -2,7 +2,7 @@
-
+
@@ -12,8 +12,20 @@
-
-
+
+
{{ data.label }}
@@ -31,10 +43,14 @@
:id="data.item.listClass + 'case-' + data.item.tag"
:href="'#' + data.item.listClass + 'case-' + data.item.tag"
@click="
- data.item.listClass == 'criminal' ? OpenCriminalDetails(data) : OpenCivilDetails(data);
+ data.item.listClass == 'criminal'
+ ? OpenCriminalDetails(data)
+ : OpenCivilDetails(data);
data.toggleDetails();
"
- :variant="'outline-primary border-white text-' + data.item.listClass"
+ :variant="
+ 'outline-primary border-white text-' + data.item.listClass
+ "
class="mr-2"
>
-
-
+
+
-
+
@@ -76,7 +100,9 @@
size="sm"
@click="OpenCriminalFilePage(data)"
v-b-tooltip.hover.right
- :title="data.item['accusedTruncApplied'] ? data.item['accusedDesc'] : null"
+ :title="
+ data.item['accusedTruncApplied'] ? data.item['accusedDesc'] : null
+ "
variant="outline-primary border-white text-criminal"
class="mr-2"
>
@@ -91,20 +117,30 @@
size="sm"
@click="OpenCivilFilePage(data, 'All Documents')"
v-b-tooltip.hover.right
- :title="data.item.partiesTruncApplied ? data.item.partiesDesc : null"
- :variant="'outline-primary border-white text-' + data.item.listClass"
+ :title="
+ data.item.partiesTruncApplied ? data.item.partiesDesc : null
+ "
+ :variant="
+ 'outline-primary border-white text-' + data.item.listClass
+ "
class="mr-2"
>
{{ data.value }}
File
@@ -113,19 +149,19 @@
Court List
{{ fullSelectedDate }}
{{ courtListLocation }}
({{ courtListLocationID }})
CourtRoom: {{ courtListRoom }}
- {{ data.value | convert_time }}
+ {{ convertTime(data.value) }}
-
+
@@ -137,19 +173,22 @@
v-else-if="countReferenceDocs(data) > 1"
:style="data.field.cellStyle"
size="sm"
- :variant="'outline-primary border-white text-' + data.item.listClass"
+ :variant="
+ 'outline-primary border-white text-' + data.item.listClass
+ "
class="mr-2"
@click="OpenCivilFilePage(data, 'Provided Documents')"
>
-
+
-
+
@@ -180,7 +221,9 @@
{{ data.value }}
@@ -231,23 +274,44 @@
-
+
+
{{ notes.trialNotes }}
-
+
{{ notes.fileComment }}
-
+
{{ notes.commentToJudge }}
-
+
{{ notes.sheriffComment }}
@@ -271,339 +335,391 @@
-->
- Close
+
diff --git a/web/src/components/criminal/CriminalAdjudicatorRestrictions.vue b/web/src/components/criminal/CriminalAdjudicatorRestrictions.vue
index db3255e9..9e6b8c99 100644
--- a/web/src/components/criminal/CriminalAdjudicatorRestrictions.vue
+++ b/web/src/components/criminal/CriminalAdjudicatorRestrictions.vue
@@ -1,82 +1,111 @@
-
-
+
- No adjudicator restrictions.
-
+
+ No adjudicator restrictions.
+
-
-
-
- {{ data.label }}
-
-
-
- {{ data.value }}
-
-
-
-
-
+
+
+
+ {{ data.label }}
+
+
+
+ {{ data.value }}
+
+
+
+
+
\ No newline at end of file
+ .card {
+ border: white;
+ }
+
diff --git a/web/src/components/criminal/CriminalAppearanceDetails.vue b/web/src/components/criminal/CriminalAppearanceDetails.vue
index 34cef7b5..32c1d1c2 100644
--- a/web/src/components/criminal/CriminalAppearanceDetails.vue
+++ b/web/src/components/criminal/CriminalAppearanceDetails.vue
@@ -2,7 +2,7 @@
-
+
@@ -14,30 +14,41 @@
-
+
-
+
-
+
-
+
No charges.
-
+
-
-
+
-
+
No additional information.
+
-
+
- {{ data.item.role }} is appearing by {{ data.item.method }}
+ {{ data.item.role }} is appearing by + {{ data.item.method }}
Phone number: {{ data.item.phoneNumber }}.
- {{ data.item.instruction }} - No instructions. @@ -151,11 +182,13 @@
-
-
+
-
+
No appearance information.
{{ data.label }}
-
+
{{ data.value }}
-
{{ data.item.partyAppearance }} +
{{ + data.item.partyAppearance + }}
@@ -197,282 +237,449 @@
-
+
{{ notes.judgeRec }}
- {{ notes.appNote }}
- Close
+
diff --git a/web/src/components/criminal/CriminalCaseDetails.vue b/web/src/components/criminal/CriminalCaseDetails.vue
index ec0ffbb5..72e3d980 100644
--- a/web/src/components/criminal/CriminalCaseDetails.vue
+++ b/web/src/components/criminal/CriminalCaseDetails.vue
@@ -1,8 +1,8 @@
-
{{ data.value }}
Notes
-
-
-
+ Adjudicator Restrictions
--
+
+
- Adjudicator Restrictions
++
Charges
+ >+ Charges +
+
Additional Info
++ Additional Info +
+
Appearance Methods
-+
+ {{ data.item.role }} is appearing by + {{ data.item.method }}
Phone number: {{ data.item.phoneNumber }}.
- {{ data.item.instruction }} - No instructions. @@ -151,11 +182,13 @@
Appearance Information
++ Appearance Information +
+
{{ data.item.partyAppearance }} +
{{ + data.item.partyAppearance + }}
Notes
-
+
-
+
@@ -13,35 +13,43 @@
-
- This File-Number '{{ this.criminalFileInformation.fileNumber }}' doesn't
- exist
- in the
- criminal records.
+
+ This
+ File-Number '{{ criminalFileInformation.fileNumber }}'
+ doesn't exist in the criminal records.
- Bad Data in File-Number '{{ this.criminalFileInformation.fileNumber }}' !
+ Bad Data in
+ File-Number '{{ criminalFileInformation.fileNumber }}'
+ !
+
+
+ You are not authorized to access this file.
- You are not authorized to access this file.
Server is not responding. ({{ errorText }})
-
+ -->
+
-
-
+
+
-
+
@@ -49,10 +57,18 @@
-
+
+
Download All Documents
@@ -75,426 +91,547 @@
-
+
- A Ban has been ordered on at least one participant in this case. Please check Ban Details before giving out
- sensitive details.
+ A Ban has been ordered on at least one participant in this case. Please
+ check Ban Details before giving out sensitive details.
- Continue
+
diff --git a/web/src/components/criminal/CriminalCrownInformation.vue b/web/src/components/criminal/CriminalCrownInformation.vue
index 493b0f24..e08b6055 100644
--- a/web/src/components/criminal/CriminalCrownInformation.vue
+++ b/web/src/components/criminal/CriminalCrownInformation.vue
@@ -2,10 +2,18 @@
+
-
+
diff --git a/web/src/components/criminal/CriminalCrownNotes.vue b/web/src/components/criminal/CriminalCrownNotes.vue
index c9949cac..0dc17b1c 100644
--- a/web/src/components/criminal/CriminalCrownNotes.vue
+++ b/web/src/components/criminal/CriminalCrownNotes.vue
@@ -1,72 +1,82 @@
-
-
- No crown notes to JCM.
-
+
+
+ No crown notes to JCM.
+
-
-
-
- {{ data.value }}
-
-
-
+
+
+
+
+ {{ data.value }}
+
+
+
\ No newline at end of file
+ .card {
+ border: white;
+ }
+
diff --git a/web/src/components/criminal/CriminalDocumentsView.vue b/web/src/components/criminal/CriminalDocumentsView.vue
index e4307130..db5efe4c 100644
--- a/web/src/components/criminal/CriminalDocumentsView.vue
+++ b/web/src/components/criminal/CriminalDocumentsView.vue
@@ -2,23 +2,32 @@
-
+
Download Selected
-
+
-
+
-
+
-
- {{ data.label }}
+
+
+ {{ data.label }}
@@ -65,10 +83,15 @@
-
+
-
+
-
- {{ data.value | beautify_date }}
+
+ {{ beautifyDate(data.value) }}
-
+
@@ -98,7 +121,7 @@
- {{ data.value | beautify_date }}
+ {{ beautifyDate(data.value) }}
@@ -117,469 +140,657 @@
diff --git a/web/src/components/criminal/CriminalFileSearchResultsView.vue b/web/src/components/criminal/CriminalFileSearchResultsView.vue
index 72245ae0..f7a749ec 100644
--- a/web/src/components/criminal/CriminalFileSearchResultsView.vue
+++ b/web/src/components/criminal/CriminalFileSearchResultsView.vue
@@ -1,28 +1,46 @@
-
+
This File-Number '{{ this.$route.query.fileNumber }}' at
- location '{{ this.$route.query.location }}' doesn't exist in the criminal records.
+ >This File-Number '{{ route.query.fileNumber }}' at
+ location '{{ this.$route.query.location }}' doesn't exist in
+ the criminal records.
+
+
+ Bad Data in search results!
+
+
+ You are not authorized to access this file.
- Bad Data in search results!
- You are not authorized to access this file.
Server is not responding. ({{ errorText }})
@@ -37,7 +55,7 @@
-
+
@@ -47,18 +65,44 @@
-
-
-
+
+
+
+
-
+
@@ -85,7 +129,7 @@
- {{ data.value | beautify_date }}
+ {{ beautifyDate(data.value) }}
@@ -101,189 +145,259 @@
diff --git a/web/src/components/criminal/CriminalFutureAppearances.vue b/web/src/components/criminal/CriminalFutureAppearances.vue
index 6da07b84..ae5d2bfa 100644
--- a/web/src/components/criminal/CriminalFutureAppearances.vue
+++ b/web/src/components/criminal/CriminalFutureAppearances.vue
@@ -1,8 +1,13 @@
@@ -11,7 +16,7 @@
-
+
@@ -21,7 +26,13 @@
-
+
-
+
{{ data.label }}
-
+
{{ data.value }}
-
+
-
-
+
+
{{ data.item.formattedDate }}
@@ -80,11 +101,15 @@
- {{ data.value }}
+
+ {{ data.value }}
+
- {{ data.value }}
+
+ {{ data.value }}
+
@@ -92,219 +117,245 @@
diff --git a/web/src/components/criminal/CriminalHeader.vue b/web/src/components/criminal/CriminalHeader.vue
index 5a81f0a5..d9ec422a 100644
--- a/web/src/components/criminal/CriminalHeader.vue
+++ b/web/src/components/criminal/CriminalHeader.vue
@@ -1,18 +1,26 @@
-
-
- {{courtClassDescription}}
- {{indictable}}
- {{courtLevelDescription}}
- {{assignmentTypeDescription}}
- Crown Notes to JCM
-
-
-
-
+
+
+
+ {{
+ courtClassDescription
+ }}
+ {{ indictable }}
+ {{
+ courtLevelDescription
+ }}
+ {{
+ assignmentTypeDescription
+ }}
+ Crown Notes to JCM
+
+
+
\ No newline at end of file
+ return {
+ isMounted,
+ courtClassDescription,
+ courtLevelDescription,
+ indictable,
+ assignmentTypeDescription,
+ hasCrownNotesToJCM,
+ hasAssignmentTypeDsc,
+ };
+ },
+ });
+
diff --git a/web/src/components/criminal/CriminalParticipants.vue b/web/src/components/criminal/CriminalParticipants.vue
index 4ca130b7..59fd0ba9 100644
--- a/web/src/components/criminal/CriminalParticipants.vue
+++ b/web/src/components/criminal/CriminalParticipants.vue
@@ -1,8 +1,10 @@
@@ -17,32 +19,63 @@
small
responsive="sm"
>
-
+
{{ data.label }}
-
-
+
+
{{ data.value }}
-
+
{{ data.value }}
-
+
- Charges
+ Charges
-
+
{{ file.code }} — {{ file.description }}
@@ -66,90 +99,90 @@
diff --git a/web/src/components/criminal/CriminalPastAppearances.vue b/web/src/components/criminal/CriminalPastAppearances.vue
index 56d41026..a5b520a0 100644
--- a/web/src/components/criminal/CriminalPastAppearances.vue
+++ b/web/src/components/criminal/CriminalPastAppearances.vue
@@ -1,8 +1,13 @@
@@ -11,7 +16,7 @@
-
+
@@ -21,7 +26,13 @@
-
+
-
+
{{ data.label }}
@@ -45,7 +59,7 @@
-
+
-
-
+
+
{{ data.item.formattedDate }}
@@ -92,11 +110,15 @@
- {{ data.value }}
+
+ {{ data.value }}
+
- {{ data.value }}
+
+ {{ data.value }}
+
@@ -104,257 +126,258 @@
diff --git a/web/src/components/criminal/CriminalSentence.vue b/web/src/components/criminal/CriminalSentence.vue
index 1ee7a852..1141b59e 100644
--- a/web/src/components/criminal/CriminalSentence.vue
+++ b/web/src/components/criminal/CriminalSentence.vue
@@ -1,11 +1,18 @@
-
+
-
-
+
+
{{ data.value }}
@@ -28,9 +43,13 @@
size="sm"
:style="data.field.cellStyle"
@click="OpenOrderMadeDetails(data)"
- :variant="!data.item.orderMadeDisable ? 'outline-primary border-white text-info' : 'text-muted'"
+ :variant="
+ !data.item.orderMadeDisable
+ ? 'outline-primary border-white text-info'
+ : 'text-muted'
+ "
:disabled="data.item.orderMadeDisable"
- class=" mr-2"
+ class="mr-2"
>
Order Made Details
@@ -38,9 +57,13 @@
size="sm"
:style="data.field.cellStyle"
@click="OpenJudgeRecommendation(data)"
- :variant="!data.item.recommendationDisable ? 'outline-primary border-white text-info' : 'text-muted'"
+ :variant="
+ !data.item.recommendationDisable
+ ? 'outline-primary border-white text-info'
+ : 'text-muted'
+ "
:disabled="data.item.recommendationDisable"
- class=" mr-2"
+ class="mr-2"
>
Judge's Recommendations
@@ -60,11 +83,20 @@
-
+
+
-
-
+
+
{{ data.item.formattedDate }}
-
+
{{ recommendation }}
- Close
+
+
-
-
+
+
{{ data.item.formattedDate }}
-
+
{{ order }}
- Close
+
diff --git a/web/src/components/criminal/CriminalSentenceDetails.vue b/web/src/components/criminal/CriminalSentenceDetails.vue
index 6670d40f..b1f3f0c0 100644
--- a/web/src/components/criminal/CriminalSentenceDetails.vue
+++ b/web/src/components/criminal/CriminalSentenceDetails.vue
@@ -1,141 +1,240 @@
-
-
-
-
-
-
-
-
- {{head.key}}
-
-
-
-
-
-
-
- {{counts.date | beautify_date}}
- {{counts.count}}
-
-
- {{counts.chargeIssueCd[index]}}
-
- —
-
- {{counts.chargeIssueDsc[index]}}
-
-
-
-
-
-
- {{counts.finding}}
-
-
-
-
-
- {{sentence}}
-
-
-
- {{counts.term[index]}}
- {{counts.amount[index]}}
- {{counts.dueDateUntil[index] | beautify_date }}
- {{counts.effectiveDate[index] | beautify_date }}
-
-
-
-
-
+
+
+
+
+
+
+
+
+ {{ head.key }}
+
+
+
+
+
+
+ {{
+ beautifyDate(counts.date)
+ }}
+ {{
+ counts.count
+ }}
+
+
+ {{ counts.chargeIssueCd[index] }}
+
+ —
+
+ {{ counts.chargeIssueDsc[index] }}
+
+
+
+
+
+
+ {{ counts.finding }}
+
+
+
+
+
+ {{ sentence }}
+
+
+
+ {{ counts.term[index] }}
+ {{ counts.amount[index] }}
+ {{ beautifyDate(counts.dueDateUntil[index]) }}
+ {{ beautifyDate(counts.effectiveDate[index]) }}
+
+
+
+
\ No newline at end of file
+ .card {
+ border: white;
+ }
+
diff --git a/web/src/components/criminal/CriminalSidePanel.vue b/web/src/components/criminal/CriminalSidePanel.vue
index b0cc3260..4de8562b 100644
--- a/web/src/components/criminal/CriminalSidePanel.vue
+++ b/web/src/components/criminal/CriminalSidePanel.vue
@@ -1,66 +1,68 @@
-
-
-
+
+
-
- No witnesses.
-
+
+
+ No witnesses.
+
+
No witnesses in this category.
-
+
-
- {{ data.label }}
+
+
+ {{ data.label }}
{{ data.value }}
@@ -41,13 +67,16 @@
-
+
{{ data.value }}
-
+
diff --git a/web/src/components/shared/CourtFilesSelector.vue b/web/src/components/shared/CourtFilesSelector.vue
index 5fb1bc5c..319004df 100644
--- a/web/src/components/shared/CourtFilesSelector.vue
+++ b/web/src/components/shared/CourtFilesSelector.vue
@@ -1,61 +1,92 @@
-
\ No newline at end of file
+ return {
+ fileId,
+ currentFileId,
+ selectedFiles: props.files,
+ handleChange,
+ handleRemove,
+ handleAdd,
+ };
+ },
+ });
+
diff --git a/web/src/filters/index.ts b/web/src/filters/index.ts
index 8e6023f2..dcb56ea2 100644
--- a/web/src/filters/index.ts
+++ b/web/src/filters/index.ts
@@ -1,32 +1,54 @@
-import Vue from 'vue'
+export enum MonthList {
+ 'Jan' = 1,
+ 'Feb',
+ 'Mar',
+ 'Apr',
+ 'May',
+ 'Jun',
+ 'Jul',
+ 'Aug',
+ 'Sep',
+ 'Oct',
+ 'Nov',
+ 'Dec',
+}
-//Using underscore, instead of dash because it works with prettier
-Vue.filter('beautify_date', function(date){
- enum MonthList {'Jan' = 1, 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'}
- if(date)
- return date.substr(8,2) + ' ' + MonthList[Number(date.substr(5,2))] + ' ' + date.substr(0,4);
- else
- return ''
-})
+export function beautifyDate(date) {
+ if (date)
+ return (
+ date.substr(8, 2) +
+ ' ' +
+ MonthList[Number(date.substr(5, 2))] +
+ ' ' +
+ date.substr(0, 4)
+ );
+ else return '';
+}
-Vue.filter('beautify_date_time', function(date){
- enum MonthList {'Jan' = 1, 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'}
- if(date)
- return date.substr(8,2) + ' ' + MonthList[Number(date.substr(5,2))] + ' ' + date.substr(0,4)+ ' ' + date.substr(11,5);
- else
- return ''
-})
+export function beautifyDateTime(date) {
+ if (date)
+ return (
+ date.substr(8, 2) +
+ ' ' +
+ MonthList[Number(date.substr(5, 2))] +
+ ' ' +
+ date.substr(0, 4) +
+ ' ' +
+ date.substr(11, 5)
+ );
+ else return '';
+}
-Vue.filter('truncate', function (text: string, stop: number) {
- return (stop+3 < text.length) ? text.slice(0, stop)+'...' : text
-})
+export function truncate(text: string, stop: number) {
+ return stop + 3 < text.length ? text.slice(0, stop) + '...' : text;
+}
-Vue.filter('convert_time', function(time) {
- const time12 = (Number(time.substr(0,2)) % 12 || 12 ) + time.substr(2,3)
-
- if (Number(time.substr(0,2))<12) {
- return time12 +' AM'
- } else {
- return time12 +' PM'
- }
-})
\ No newline at end of file
+export function convertTime(time) {
+ const time12 = (Number(time.substr(0, 2)) % 12 || 12) + time.substr(2, 3);
+
+ if (Number(time.substr(0, 2)) < 12) {
+ return time12 + ' AM';
+ } else {
+ return time12 + ' PM';
+ }
+}
diff --git a/web/src/main.ts b/web/src/main.ts
index 8088d39c..b7fcec80 100644
--- a/web/src/main.ts
+++ b/web/src/main.ts
@@ -1,46 +1,28 @@
-import LoadingSpinner from "@components/LoadingSpinner.vue"
-import "@styles/index.scss"
-import { BootstrapVue, BootstrapVueIcons } from "bootstrap-vue"
-import "intersection-observer"
-import Vue from "vue"
-import VueResource from "vue-resource"
-import VueRouter from "vue-router"
-import App from "./App.vue"
-import "./filters"
-import ServicePlugin from "./plugins/ServicePlugin"
-import routes from "./router/index"
-import store from "./store/index"
+import LoadingSpinner from '@components/LoadingSpinner.vue';
+import '@styles/index.scss';
+import { createApp } from '@vue/compat';
+import { BootstrapVue, BootstrapVueIcons } from 'bootstrap-vue';
+import 'intersection-observer';
+import App from './App.vue';
+import './filters';
+import router from './router/index';
+import { registerRouter } from './services';
+import { registerPinia } from './stores';
-Vue.use(VueResource)
-Vue.use(VueRouter)
-Vue.use(BootstrapVue)
-Vue.use(BootstrapVueIcons)
-Vue.use(ServicePlugin)
-Vue.config.productionTip = true
-Vue.component("loading-spinner", LoadingSpinner)
+const app = createApp(App);
-Vue.http.interceptors.push(function() {
- return function(response) {
- if (response.status == 401) {
- location.replace(`${import.meta.env.BASE_URL}api/auth/login?redirectUri=${window.location}`)
- }
- }
-})
+registerPinia(app);
+app.use(router);
+app.use(BootstrapVue);
+app.use(BootstrapVueIcons);
+//Vue.config.productionTip = true
+app.component('loading-spinner', LoadingSpinner);
-Vue.http.options.root = import.meta.env.BASE_URL
+registerRouter(app);
-// Redirect from / to /jasper/
-if (location.pathname == "/")
- history.pushState({ page: "home" }, "", import.meta.env.BASE_URL)
-
-const router = new VueRouter({
- mode: "history",
- base: import.meta.env.BASE_URL,
- routes: routes
-})
+app.mount('#app');
-new Vue({
- router,
- store,
- render: (h) => h(App)
-}).$mount("#app")
+// Redirect from / to /jasper/
+if (location.pathname == '/') {
+ history.pushState({ page: 'home' }, '', import.meta.env.BASE_URL);
+}
diff --git a/web/src/plugins/ServicePlugin.ts b/web/src/plugins/ServicePlugin.ts
deleted file mode 100644
index 352ef057..00000000
--- a/web/src/plugins/ServicePlugin.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-import { FilesService } from "../services/FilesService";
-import { HttpService } from "../services/HttpService";
-import { LocationService } from "../services/LocationService";
-import { LookupService } from "../services/LookupService";
-
-declare module 'vue/types/vue' {
- interface Vue {
- $lookupService: LookupService;
- $locationService: LocationService;
- $filesService: FilesService;
- }
-}
-
-export default {
- install(Vue: any) {
- const httpService = new HttpService();
- const lookupService = new LookupService(httpService);
- const locationService = new LocationService(httpService);
- const filesService = new FilesService(httpService);
-
- // Inject into Vue's prototype so it can be accessed from any component
- Vue.prototype.$lookupService = lookupService;
- Vue.prototype.$locationService = locationService;
- Vue.prototype.$filesService = filesService;
- }
-};
\ No newline at end of file
diff --git a/web/src/router/index.ts b/web/src/router/index.ts
index 44421e7d..91dad691 100644
--- a/web/src/router/index.ts
+++ b/web/src/router/index.ts
@@ -1,85 +1,93 @@
-import store from "@/store/index";
-import { SessionManager } from "@/utils/utils";
-import Home from '@components/Home.vue';
-import CivilCaseDetails from "@components/civil/CivilCaseDetails.vue";
-import CivilFileSearchResultsView from "@components/civil/CivilFileSearchResultsView.vue";
-import CourtFileSearchView from "@components/courtfilesearch/CourtFileSearchView.vue";
-import CourtList from "@components/courtlist/CourtList.vue";
-import CriminalCaseDetails from "@components/criminal/CriminalCaseDetails.vue";
-import CriminalFileSearchResultsView from "@components/criminal/CriminalFileSearchResultsView.vue";
-import Dashboard from "@components/dashboard/Dashboard.vue";
-import { RouteConfig } from 'vue-router';
+// import CivilFileSearchResultsView from "@/components/civil/CivilFileSearchResultsView.vue"
+// import CourtList from "@/components/courtlist/CourtList.vue"
+// import CriminalFileSearchResultsView from "@/components/criminal/CriminalFileSearchResultsView.vue"
+// import Dashboard from "@/components/dashboard/Dashboard.vue"
+import CivilCaseDetails from '@/components/civil/CivilCaseDetails.vue';
+import CivilFileSearchResultsView from '@/components/civil/CivilFileSearchResultsView.vue';
+import CourtFileSearchView from '@/components/CourtFileSearch/CourtFileSearchView.vue';
+import CourtList from '@/components/courtlist/CourtList.vue';
+import CriminalCaseDetails from '@/components/criminal/CriminalCaseDetails.vue';
+import CriminalFileSearchResultsView from '@/components/criminal/CriminalFileSearchResultsView.vue';
+import { SessionManager } from '@/utils/utils';
+import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router';
async function authGuard(to: any, from: any, next: any) {
- const results = await SessionManager.getSettings(store);
+ const results = await SessionManager.getSettings();
if (results) {
next();
}
}
-const routes: Array = [
+const HomeView = () => import('../components/Home.vue');
+
+const routes: RouteRecordRaw[] = [
{
path: '/',
- name: 'Home',
- component: Home
+ name: 'HomeView',
+ component: HomeView,
},
{
path: '/court-list',
name: 'CourtList',
component: CourtList,
- beforeEnter: authGuard,
props: true,
children: [
{
path: 'location/:location/room/:room/date/:date',
name: 'CourtListResult',
component: CourtList,
- props: true
- }
- ]
+ props: true,
+ },
+ ],
},
{
path: '/civil-file/:fileNumber/:section?',
name: 'CivilCaseDetails',
component: CivilCaseDetails,
- beforeEnter: authGuard,
- props: true
+ props: true,
},
{
path: '/criminal-file/:fileNumber',
name: 'CriminalCaseDetails',
component: CriminalCaseDetails,
- beforeEnter: authGuard,
- props: true
+ props: true,
},
{
path: '/civil-file-search',
name: 'CivilFileSearchResultsView',
component: CivilFileSearchResultsView,
- beforeEnter: authGuard,
- props: true
+ props: true,
},
{
path: '/criminal-file-search',
name: 'CriminalFileSearchResultsView',
component: CriminalFileSearchResultsView,
- beforeEnter: authGuard,
- props: true
- },
- {
- path: '/dashboard',
- name: 'Dashboard',
- component: Dashboard,
- beforeEnter: authGuard,
- props: true
+ props: true,
},
+ // {
+ // path: "/dashboard",
+ // name: "DashboardView",
+ // component: Dashboard,
+ // props: true
+ // },
{
path: '/court-file-search',
name: 'CourtFileSearchView',
component: CourtFileSearchView,
- beforeEnter: authGuard,
- props: true
+ },
+];
+
+const router = createRouter({
+ history: createWebHistory(import.meta.env.BASE_URL),
+ routes,
+});
+
+router.beforeEach((to, from, next) => {
+ if (to.path === '/') {
+ next();
+ } else {
+ authGuard(to, from, next);
}
-]
+});
-export default routes
\ No newline at end of file
+export default router;
diff --git a/web/src/services/AuthService.ts b/web/src/services/AuthService.ts
new file mode 100644
index 00000000..279980f3
--- /dev/null
+++ b/web/src/services/AuthService.ts
@@ -0,0 +1,14 @@
+import { UserInfo } from '@/types/common';
+import { HttpService } from './HttpService';
+
+export class AuthService {
+ private httpService: HttpService;
+
+ constructor(httpService: HttpService) {
+ this.httpService = httpService;
+ }
+
+ async getUserInfo(): Promise {
+ return await this.httpService.get(`api/auth/info`);
+ }
+}
diff --git a/web/src/services/FilesService.ts b/web/src/services/FilesService.ts
index 92c6592f..1be29874 100644
--- a/web/src/services/FilesService.ts
+++ b/web/src/services/FilesService.ts
@@ -1,5 +1,5 @@
-import { CourtFileSearchResponse } from "@/types/courtFileSearch";
-import { HttpService } from "./HttpService";
+import { CourtFileSearchResponse } from '@/types/courtFileSearch';
+import { HttpService } from './HttpService';
export class FilesService {
private httpService: HttpService;
@@ -8,11 +8,19 @@ export class FilesService {
this.httpService = httpService;
}
- async searchCriminalFiles(queryParams: any): Promise {
- return await this.httpService.get(`api/files/criminal/search`, queryParams);
+ async searchCriminalFiles(
+ queryParams: any
+ ): Promise {
+ return await this.httpService.get(
+ `api/files/criminal/search`,
+ queryParams
+ );
}
async searchCivilFiles(queryParams: any): Promise {
- return await this.httpService.get(`api/files/civil/search?`, queryParams);
+ return await this.httpService.get(
+ `api/files/civil/search?`,
+ queryParams
+ );
}
-}
\ No newline at end of file
+}
diff --git a/web/src/services/HttpService.ts b/web/src/services/HttpService.ts
index d43e6d37..71f2c8cb 100644
--- a/web/src/services/HttpService.ts
+++ b/web/src/services/HttpService.ts
@@ -1,34 +1,89 @@
-import Vue from 'vue';
+import axios, {
+ AxiosInstance,
+ AxiosRequestConfig,
+ InternalAxiosRequestConfig,
+} from 'axios';
+import redirectHandlerService from './RedirectHandlerService';
-export class HttpService {
- private handleResponse(response): any {
- if (!response.ok) {
- console.error('Error response:', response);
- throw new Error(`API error: ${response.statusText}`);
+export interface IHttpService {
+ get(resource: string, queryParams?: Record): Promise;
+ post(
+ resource: string,
+ data: any,
+ headers: Record,
+ responseType: 'json' | 'blob'
+ ): Promise;
+}
+
+export class HttpService implements IHttpService {
+ private client: AxiosInstance;
+
+ constructor(baseURL: string) {
+ this.client = axios.create({
+ baseURL,
+ timeout: 10000,
+ headers: {
+ 'Content-Type': 'application/json',
+ },
+ });
+
+ this.client.interceptors.request.use(
+ (config) => this.handleAuthSuccess(config),
+ (error) => Promise.reject(error)
+ );
+
+ this.client.interceptors.response.use(
+ (response) => response,
+ (error) => this.handleAuthError(error)
+ );
+ }
+
+ private handleAuthSuccess(
+ config: InternalAxiosRequestConfig
+ ): InternalAxiosRequestConfig {
+ return config;
+ }
+
+ private handleAuthError(error: any) {
+ console.error(error);
+ console.log('User unauthenticated.');
+ if (error.response && error.response.status === 401) {
+ redirectHandlerService.handleUnauthorized(window.location.href);
}
- return response.body;
+ return Promise.reject(error);
}
- public async get(resource: string, queryParams = null): Promise {
+ public async get(
+ resource: string,
+ queryParams: Record = {}
+ ): Promise {
try {
- const response = await Vue.http.get(resource, { params: queryParams });
- return this.handleResponse(response);
- } catch (error: any) {
- if (error.status === 401) {
- return this.get(resource);
- }
+ const response = await this.client.get(resource, {
+ params: queryParams,
+ });
+ return response.data;
+ } catch (error) {
+ console.error('Error in GET request: ', error);
throw error;
}
}
- public async post(resource: string, data: any): Promise {
+ public async post(
+ resource: string,
+ data: any,
+ headers: Record = {},
+ responseType: 'json' | 'blob' = 'json'
+ ): Promise {
+ const config: AxiosRequestConfig = {
+ headers,
+ responseType,
+ };
+
try {
- const response = await Vue.http.post(resource, data);
- return this.handleResponse(response);
- } catch (error: any) {
- if (error.status === 401) {
- return this.post(resource, data);
- }
+ const response = await this.client.post(resource, data, config);
+ return response.data;
+ } catch (error) {
+ console.error('Error in POST request: ', error);
throw error;
}
}
diff --git a/web/src/services/LocationService.ts b/web/src/services/LocationService.ts
index d9fe21ca..112dd320 100644
--- a/web/src/services/LocationService.ts
+++ b/web/src/services/LocationService.ts
@@ -1,6 +1,6 @@
-import { CourtRoomsJsonInfoType } from "../types/common";
-import { roomsInfoType } from "../types/courtlist";
-import { HttpService } from "./HttpService";
+import { CourtRoomsJsonInfoType } from '../types/common';
+import { roomsInfoType } from '../types/courtlist';
+import { HttpService } from './HttpService';
export class LocationService {
private httpService: HttpService;
@@ -10,18 +10,22 @@ export class LocationService {
}
async getCourtRooms(): Promise {
- const courtRoomsJson = await this.httpService.get('api/location/court-rooms');
+ const courtRoomsJson = await this.httpService.get(
+ 'api/location/court-rooms'
+ );
- courtRoomsJson.sort((a, b) => a.name.toLocaleLowerCase().localeCompare(b.name.toLowerCase()))
- const courtRooms: roomsInfoType[] = []
+ courtRoomsJson.sort((a, b) =>
+ a.name.toLocaleLowerCase().localeCompare(b.name.toLowerCase())
+ );
+ const courtRooms: roomsInfoType[] = [];
- courtRoomsJson.map(cr => {
+ courtRoomsJson.map((cr) => {
courtRooms.push({
text: cr.name,
- value: cr.code
- })
+ value: cr.code,
+ });
});
return courtRooms;
}
-}
\ No newline at end of file
+}
diff --git a/web/src/services/LookupService.ts b/web/src/services/LookupService.ts
index b28b286f..61f61f0a 100644
--- a/web/src/services/LookupService.ts
+++ b/web/src/services/LookupService.ts
@@ -1,5 +1,5 @@
-import { LookupCode } from "../types/common";
-import { HttpService } from "./HttpService";
+import { LookupCode } from '../types/common';
+import { HttpService } from './HttpService';
export class LookupService {
private httpService: HttpService;
@@ -8,7 +8,7 @@ export class LookupService {
this.httpService = httpService;
}
- async getCourtClasses(): Promise{
+ async getCourtClasses(): Promise {
return await this.httpService.get('api/codes/court/classes');
}
-}
\ No newline at end of file
+}
diff --git a/web/src/services/RedirectHandlerService.ts b/web/src/services/RedirectHandlerService.ts
new file mode 100644
index 00000000..8f2adfcb
--- /dev/null
+++ b/web/src/services/RedirectHandlerService.ts
@@ -0,0 +1,8 @@
+class RedirectHandler {
+ handleUnauthorized(redirectUri: string) {
+ const loginUrl = `${import.meta.env.BASE_URL}api/auth/login?redirectUri=${encodeURIComponent(redirectUri)}`;
+ window.location.replace(loginUrl);
+ }
+}
+
+export default new RedirectHandler();
diff --git a/web/src/services/index.ts b/web/src/services/index.ts
new file mode 100644
index 00000000..7e406376
--- /dev/null
+++ b/web/src/services/index.ts
@@ -0,0 +1,22 @@
+import { App } from 'vue';
+import { AuthService } from './AuthService';
+import { FilesService } from './FilesService';
+import { HttpService } from './HttpService';
+import { LocationService } from './LocationService';
+import { LookupService } from './LookupService';
+
+export function registerRouter(app: App) {
+ console.log(import.meta.env);
+
+ const httpService = new HttpService(import.meta.env.BASE_URL);
+ const authService = new AuthService(httpService);
+ const lookupService = new LookupService(httpService);
+ const locationService = new LocationService(httpService);
+ const filesService = new FilesService(httpService);
+
+ app.provide('httpService', httpService);
+ app.provide('authService', authService);
+ app.provide('lookupService', lookupService);
+ app.provide('locationService', locationService);
+ app.provide('filesService', filesService);
+}
diff --git a/web/src/shims-vue.d.ts b/web/src/shims-vue.d.ts
index ad17f798..868d89ec 100644
--- a/web/src/shims-vue.d.ts
+++ b/web/src/shims-vue.d.ts
@@ -1,4 +1,21 @@
-declare module "*.vue" {
- import Vue from "vue";
- export default Vue;
-}
\ No newline at end of file
+declare module '*.vue' {
+ import { DefineComponent } from 'vue';
+ const component: DefineComponent<{}, {}, any>;
+ export default component;
+}
+
+declare module 'vue' {
+ import { CompatVue } from '@vue/runtime-dom';
+ import 'vite/client';
+
+ // Declare a `Vue` constant of type `CompatVue`, which simulates Vue 2 behavior
+ const Vue: CompatVue;
+ export default Vue;
+
+ // Re-export all the original exports from '@vue/runtime-dom'
+ export * from '@vue/runtime-dom';
+ export { configureCompat };
+
+ // Add `configureCompat` explicitly, as it is commonly needed for the compatibility layer
+ const { configureCompat } = Vue;
+}
diff --git a/web/src/store/index.ts b/web/src/store/index.ts
deleted file mode 100644
index 2937bbb5..00000000
--- a/web/src/store/index.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-import CivilFileInformation from '@/store/modules/CivilFileInformation'
-import CommonInformation from '@/store/modules/CommonInformation'
-import CourtListInformation from '@/store/modules/CourtListInformation'
-import CriminalFileInformation from '@/store/modules/CriminalFileInformation'
-import Vue from 'vue'
-import Vuex from 'vuex'
-import CourtFileSearchInformation from './modules/CourtFileSearchInformation'
-
-Vue.use(Vuex)
-
-const store = new Vuex.Store({
- modules: {
- CivilFileInformation,
- CriminalFileInformation,
- CommonInformation,
- CourtListInformation,
- CourtFileSearchInformation
- }
-})
-
-export default store
diff --git a/web/src/store/modules/CivilFileInformation.ts b/web/src/store/modules/CivilFileInformation.ts
deleted file mode 100644
index 08d3688a..00000000
--- a/web/src/store/modules/CivilFileInformation.ts
+++ /dev/null
@@ -1,73 +0,0 @@
-import { VuexModule, Module, Mutation, Action } from 'vuex-module-decorators'
-
-@Module({
- namespaced: true
-})
-class CivilFileInformation extends VuexModule {
- public civilFileInformation = { }
- public civilFileInfoLoaded = false;
- public hasNonParty = false;
-
- public showSections = {
- 'Case Details': true,
- 'Future Appearances': false,
- 'Past Appearances': false,
- 'All Documents': false,
- 'Documents': false,
- 'Provided Documents': false
- }
-
- public civilAppearanceInfo = {}
-
- @Mutation
- public setCivilFile(civilFileInformation): void {
- this.civilFileInformation = civilFileInformation
- }
-
- @Action
- public UpdateCivilFile(newCivilFileInformation): void {
- this.context.commit('setCivilFile', newCivilFileInformation)
- }
-
- @Mutation
- public setCivilFileInfoLoaded(civilFileInfoLoaded): void {
- this.civilFileInfoLoaded = civilFileInfoLoaded
- }
-
- @Action
- public UpdateCivilFileInfoLoaded(newCivilFileInfoLoaded): void {
- this.context.commit('setCivilFileInfoLoaded', newCivilFileInfoLoaded)
- }
-
- @Mutation
- public setHasNonParty(hasNonParty: boolean): void {
- this.hasNonParty = hasNonParty
- }
-
- @Action
- public UpdateHasNonParty(newHasNonParty: boolean): void {
- this.context.commit('setHasNonParty', newHasNonParty)
- }
-
- @Mutation
- public setShowSections(showSections): void {
- this.showSections = showSections
- }
-
- @Action
- public UpdateShowSections(newShowSections): void {
- this.context.commit('setShowSections', newShowSections)
- }
-
- @Mutation
- public setCivilAppearanceInfo(civilAppearanceInfo): void {
- this.civilAppearanceInfo = civilAppearanceInfo
- }
-
- @Action
- public UpdateCivilAppearanceInfo(newCivilAppearanceInfo): void {
- this.context.commit('setCivilAppearanceInfo', newCivilAppearanceInfo)
- }
-
-}
-export default CivilFileInformation
\ No newline at end of file
diff --git a/web/src/store/modules/CommonInformation.ts b/web/src/store/modules/CommonInformation.ts
deleted file mode 100644
index b2ae2a1b..00000000
--- a/web/src/store/modules/CommonInformation.ts
+++ /dev/null
@@ -1,161 +0,0 @@
-import { VuexModule, Module, Mutation, Action } from 'vuex-module-decorators';
-import {CourtRoomsJsonInfoType, IconStyleType} from '@/types/common';
-
-enum appearanceStatus {UNCF='Unconfirmed', CNCL='Canceled', SCHD='Scheduled' }
-
-@Module({
- namespaced: true
-})
-class CommonInformation extends VuexModule {
-
- public userInfo = {};
- public displayName = ''
- public time = ''
- public duration = ''
- public statusStyle = ''
- public iconStyles: IconStyleType[] = [];
- public courtRoomsAndLocations: CourtRoomsJsonInfoType[] = [];
- public enableArchive = false;
-
- @Mutation
- public setUserInfo(userInfo): void {
- this.userInfo = userInfo;
- }
- @Action
- public UpdateUserInfo(newUserInfo): void {
- this.context.commit('setUserInfo', newUserInfo)
- }
-
- @Mutation
- public setCourtRoomsAndLocations(courtRoomsAndLocations): void {
- this.courtRoomsAndLocations = courtRoomsAndLocations
- }
- @Action
- public UpdateCourtRoomsAndLocations(newCourtRoomsAndLocations) {
- this.context.commit('setCourtRoomsAndLocations', newCourtRoomsAndLocations)
- }
-
- @Mutation
- public setDisplayName(displayName): void {
- this.displayName = displayName
- }
-
- @Action({rawError: true})
- public UpdateDisplayName(inputNames): void {
- let newDisplayName = ''
- if(inputNames.lastName.length==0) {
- newDisplayName = inputNames.givenName;
- } else if(inputNames.givenName.length==0) {
- newDisplayName = inputNames.lastName;
- } else if(inputNames.givenName.length==0 && inputNames.lastName.length==0) {
- newDisplayName = '';
- } else {
- newDisplayName = inputNames.lastName.charAt(0).toUpperCase() + inputNames.lastName.slice(1).toLowerCase() + ", "
- + inputNames.givenName.charAt(0).toUpperCase() + inputNames.givenName.slice(1).toLowerCase();
- }
- this.context.commit('setDisplayName', newDisplayName)
- }
-
- @Action
- public FormatDisplayName(newDisplayName): void {
- this.context.commit('setDisplayName', newDisplayName.charAt(0).toUpperCase() + newDisplayName.slice(1).toLowerCase())
- }
-
- @Mutation
- public setTime(time): void {
- this.time = time
- }
-
- @Action
- public UpdateTime(time) {
- const time12 = (Number(time.substr(0,2)) % 12 || 12 ) + time.substr(2,3)
-
- if (Number(time.substr(0,2))<12) {
- this.context.commit('setTime', time12 +' AM')
- } else {
- this.context.commit('setTime', time12 +' PM')
- }
- }
-
- @Mutation
- public setDuration(duration): void {
- this.duration = duration
- }
-
- @Action
- public UpdateDuration(newDuration) {
- let duration = '';
- if(newDuration.hr) {
- if(Number(newDuration.hr)==1)
- duration += '1 Hr ';
- else if(Number(newDuration.hr)>1)
- duration += Number(newDuration.hr)+' Hrs ';
- }
-
- if(newDuration.min) {
- if(Number(newDuration.min)==1)
- duration += '1 Min ';
- else if(Number(newDuration.min)>1)
- duration += Number(newDuration.min)+' Mins ';
- }
-
- this.context.commit('setDuration', duration)
- }
-
- @Mutation
- public setStatusStyle(statusStyle): void {
- this.statusStyle = statusStyle
- }
-
- @Action
- public UpdateStatusStyle(status) {
-
- let style = '';
- if(status == appearanceStatus.UNCF) {
- style = "badge badge-danger mt-2";
- } else if(status == appearanceStatus.CNCL) {
- style = "badge badge-warning mt-2";
- } else if(status == appearanceStatus.SCHD) {
- style = "badge badge-primary mt-2";
- }
-
- this.context.commit('setStatusStyle', style)
- }
-
- @Mutation
- public setIconStyle(iconStyles): void {
- this.iconStyles = iconStyles
- }
-
- @Action
- public UpdateIconStyle(newIconsInfo) {
- const iconStyles: IconStyleType[] = [];
- for (const iconInfo of newIconsInfo) {
- if(iconInfo["info"] == "UNCF") {
- iconStyles.push({"icon":'circle-half', "desc":appearanceStatus.UNCF});
- } else if(iconInfo["info"] == "CNCL") {
- iconStyles.push({"icon":'trash', "desc":appearanceStatus.CNCL});
- } else if(iconInfo["info"] == "SCHD") {
- iconStyles.push({"icon":'calendar', "desc":appearanceStatus.SCHD})
- } else if(iconInfo["info"] == "Video") {
- iconStyles.push({"icon":'camera-video-fill', "desc": "video"})
- } else if(iconInfo["info"] == "Home") {
- iconStyles.push({"icon":'house-door-fill', "desc": iconInfo["desc"]})
- }
- }
- this.context.commit('setIconStyle', iconStyles)
- }
-
- @Mutation
- public setEnableArchive(newEnableArchive): void {
- this.enableArchive = newEnableArchive;
- }
-
- @Action
- public UpdateEnableArchive(newEnableArchive): void {
- this.context.commit('setEnableArchive', newEnableArchive)
- }
-
-}
-
-export default CommonInformation
\ No newline at end of file
diff --git a/web/src/store/modules/CourtFileSearchInformation.ts b/web/src/store/modules/CourtFileSearchInformation.ts
deleted file mode 100644
index 08505a77..00000000
--- a/web/src/store/modules/CourtFileSearchInformation.ts
+++ /dev/null
@@ -1,67 +0,0 @@
-import { KeyValueInfo } from '@/types/common';
-import { CourtFileSearchCriteria, FileDetail } from '@/types/courtFileSearch';
-import { Module, Mutation, VuexModule } from 'vuex-module-decorators';
-
-const NAMESPACE = 'CourtFileSearchInformation';
-
-export const ADD_FILES_FOR_VIEWING = `${NAMESPACE}/addFilesForViewing`;
-export const CLEAR_SELECTED_FILES = `${NAMESPACE}/clearSelectedFiles`;
-export const UPDATE_CURRENT_VIEWED_FILE_ID = `${NAMESPACE}/updateCurrentViewedFileId`;
-export const REMOVE_CURRENT_VIEWED_FILE_ID = `${NAMESPACE}/removeCurrentViewedFileId`;
-export const GET_SELECTED_FILES = `${NAMESPACE}/selectedFiles`;
-export const GET_CURRENT_SEARCH_CRITERIA = `${NAMESPACE}/currentSearchCriteria`;
-export const GET_CURRENT_SEARCH_RESULTS = `${NAMESPACE}/currentSearchResults`;
-
-@Module({
- namespaced: true,
- name: NAMESPACE
-})
-export default class CourtFileSearchInformation extends VuexModule {
- public filesForViewing: KeyValueInfo[] = [];
- public currentViewedFileId = "";
- public searchCriteria?: CourtFileSearchCriteria;
- public searchResults?: FileDetail[];
-
- get selectedFiles(): KeyValueInfo[] {
- return this.filesForViewing;
- }
-
- get currentFileId(): string {
- return this.currentViewedFileId;
- }
-
- get currentSearchCriteria(): CourtFileSearchCriteria | undefined {
- return this.searchCriteria;
- }
-
- get currentSearchResults(): FileDetail[] | undefined {
- return this.searchResults;
- }
-
- @Mutation
- public updateCurrentViewedFileId(fileId: string): void {
- this.currentViewedFileId = fileId;
- }
-
- @Mutation
- public addFilesForViewing({ searchCriteria, searchResults, files }) {
- this.searchCriteria = searchCriteria;
- this.searchResults = [...searchResults];
- this.filesForViewing = [...files];
- this.currentViewedFileId = this.filesForViewing[0].key;
- }
-
- @Mutation
- public clearSelectedFiles() {
- this.filesForViewing.length = 0;
- this.searchCriteria = undefined;
- this.searchResults = undefined;
- this.currentViewedFileId = "";
- }
-
- @Mutation
- public removeCurrentViewedFileId(fileId: string): void {
- this.filesForViewing = this.filesForViewing.filter(c => c.key !== fileId);
- this.currentViewedFileId = this.filesForViewing.length > 0 ? this.filesForViewing[this.filesForViewing.length - 1].key : "";
- }
-}
\ No newline at end of file
diff --git a/web/src/store/modules/CourtListInformation.ts b/web/src/store/modules/CourtListInformation.ts
deleted file mode 100644
index 8f1addd8..00000000
--- a/web/src/store/modules/CourtListInformation.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import { VuexModule, Module, Mutation, Action } from 'vuex-module-decorators'
-
-@Module({
- namespaced: true
-})
-class CourtListInformation extends VuexModule {
- public courtListInformation = { }
-
- @Mutation
- public setCourtList(courtListInformation): void {
- this.courtListInformation = courtListInformation
- }
-
- @Action
- public UpdateCourtList(newCourtListInformation): void {
- this.context.commit('setCourtList', newCourtListInformation)
- }
-
-}
-export default CourtListInformation
\ No newline at end of file
diff --git a/web/src/store/modules/CriminalFileInformation.ts b/web/src/store/modules/CriminalFileInformation.ts
deleted file mode 100644
index 6f3cba2c..00000000
--- a/web/src/store/modules/CriminalFileInformation.ts
+++ /dev/null
@@ -1,88 +0,0 @@
-import { participantSentencesDetailsInfoType } from '@/types/criminal';
-import { VuexModule, Module, Mutation, Action } from 'vuex-module-decorators'
-
-@Module({
- namespaced: true
-})
-class CriminalFileInformation extends VuexModule {
- public criminalFileInformation = { }
- public criminalFileInfoLoaded = false
- public activeCriminalParticipantIndex = 0
-
- public criminalParticipantSentenceInformation = {} as participantSentencesDetailsInfoType;
-
- public showSections = {
- 'Case Details': true,
- 'Future Appearances': false,
- 'Past Appearances': false,
- 'Witnesses': false,
- 'Documents': false,
- 'Sentence/Order Details': false
- }
-
- public criminalAppearanceInfo = {}
-
- @Mutation
- public setCriminalFile(criminalFileInformation): void {
- this.criminalFileInformation = criminalFileInformation
- }
-
- @Action
- public UpdateCriminalFile(newCriminalFileInformation): void {
- this.context.commit('setCriminalFile', newCriminalFileInformation)
- }
-
- @Mutation
- public setCriminalParticipantSentenceInformation(criminalParticipantSentenceInformation): void {
- this.criminalParticipantSentenceInformation = criminalParticipantSentenceInformation
- }
-
- @Action
- public UpdateCriminalParticipantSentenceInformation(newCriminalParticipantSentenceInformation): void {
- this.context.commit('setCriminalParticipantSentenceInformation', newCriminalParticipantSentenceInformation)
- }
-
-
- @Mutation
- public setCriminalFileInfoLoaded(criminalFileInfoLoaded): void {
- this.criminalFileInfoLoaded = criminalFileInfoLoaded
- }
-
- @Action
- public UpdateCriminalFileInfoLoaded(newCriminalFileInfoLoaded): void {
- this.context.commit('setCriminalFileInfoLoaded', newCriminalFileInfoLoaded)
- }
-
- @Mutation
- public setActiveCriminalParticipantIndex(activeCriminalParticipantIndex): void {
- this.activeCriminalParticipantIndex = activeCriminalParticipantIndex
- }
-
- @Action
- public UpdateActiveCriminalParticipantIndex(newActiveCriminalParticipantIndex): void {
- this.context.commit('setActiveCriminalParticipantIndex', newActiveCriminalParticipantIndex)
- }
-
- @Mutation
- public setShowSections(showSections): void {
- this.showSections = showSections
- }
-
- @Action
- public UpdateShowSections(newShowSections): void {
- this.context.commit('setShowSections', newShowSections)
- }
-
- @Mutation
- public setCriminalAppearanceInfo(criminalAppearanceInfo): void {
- this.criminalAppearanceInfo = criminalAppearanceInfo
- }
-
- @Action
- public UpdateCriminalAppearanceInfo(newCriminalAppearanceInfo): void {
- this.context.commit('setCriminalAppearanceInfo', newCriminalAppearanceInfo)
- }
-
-
-}
-export default CriminalFileInformation
\ No newline at end of file
diff --git a/web/src/stores/CivilFileStore.ts b/web/src/stores/CivilFileStore.ts
new file mode 100644
index 00000000..54effd13
--- /dev/null
+++ b/web/src/stores/CivilFileStore.ts
@@ -0,0 +1,58 @@
+import { civilFileInformationType } from '@/types/civil';
+import { defineStore } from 'pinia';
+
+export const useCivilFileStore = defineStore('CivilFileStore', {
+ state: () => ({
+ civilFileInformation: {} as civilFileInformationType,
+ civilFileInfoLoaded: false,
+ hasNonParty: false,
+ showSections: {
+ 'Case Details': true,
+ 'Future Appearances': false,
+ 'Past Appearances': false,
+ 'All Documents': false,
+ Documents: false,
+ 'Provided Documents': false,
+ },
+ civilAppearanceInfo: {
+ supplementalEquipmentTxt: '',
+ securityRestrictionTxt: '',
+ outOfTownJudgeTxt: '',
+ fileNo: '',
+ appearanceId: '',
+ date: '',
+ },
+ }),
+ actions: {
+ setCivilFile(civilFileInformation): void {
+ this.civilFileInformation = civilFileInformation;
+ },
+ updateCivilFile(newCivilFileInformation): void {
+ this.setCivilFile(newCivilFileInformation);
+ },
+ setCivilFileInfoLoaded(civilFileInfoLoaded): void {
+ this.civilFileInfoLoaded = civilFileInfoLoaded;
+ },
+ updateCivilFileInfoLoaded(newCivilFileInfoLoaded): void {
+ this.setCivilFileInfoLoaded(newCivilFileInfoLoaded);
+ },
+ setHasNonParty(hasNonParty: boolean): void {
+ this.hasNonParty = hasNonParty;
+ },
+ updateHasNonParty(newHasNonParty: boolean): void {
+ this.setHasNonParty(newHasNonParty);
+ },
+ setShowSections(showSections): void {
+ this.showSections = showSections;
+ },
+ updateShowSections(newShowSections): void {
+ this.setShowSections(newShowSections);
+ },
+ setCivilAppearanceInfo(civilAppearanceInfo): void {
+ this.civilAppearanceInfo = civilAppearanceInfo;
+ },
+ updateCivilAppearanceInfo(newCivilAppearanceInfo): void {
+ this.setCivilAppearanceInfo(newCivilAppearanceInfo);
+ },
+ },
+});
diff --git a/web/src/stores/CommonStore.ts b/web/src/stores/CommonStore.ts
new file mode 100644
index 00000000..356f3bc3
--- /dev/null
+++ b/web/src/stores/CommonStore.ts
@@ -0,0 +1,136 @@
+import {
+ CourtRoomsJsonInfoType,
+ IconStyleType,
+ UserInfo,
+} from '@/types/common';
+import { defineStore } from 'pinia';
+
+enum appearanceStatus {
+ UNCF = 'Unconfirmed',
+ CNCL = 'Canceled',
+ SCHD = 'Scheduled',
+}
+
+export const useCommonStore = defineStore('CommonStore', {
+ state: () => ({
+ displayName: '',
+ userInfo: null as UserInfo | null,
+ time: '',
+ duration: '',
+ statusStyle: '',
+ iconStyles: [] as IconStyleType[],
+ courtRoomsAndLocations: [] as CourtRoomsJsonInfoType[],
+ enableArchive: false,
+ }),
+ actions: {
+ setUserInfo(userInfo): void {
+ this.userInfo = userInfo;
+ },
+ updateUserInfo(newUserInfo): void {
+ this.setUserInfo(newUserInfo);
+ },
+ setCourtRoomsAndLocations(courtRoomsAndLocations): void {
+ this.courtRoomsAndLocations = courtRoomsAndLocations;
+ },
+ updateCourtRoomsAndLocations(newCourtRoomsAndLocations) {
+ this.setCourtRoomsAndLocations(newCourtRoomsAndLocations);
+ },
+ setDisplayName(displayName): void {
+ this.displayName = displayName;
+ },
+ updateDisplayName(inputNames): void {
+ let newDisplayName = '';
+ if (inputNames.lastName.length == 0) {
+ newDisplayName = inputNames.givenName;
+ } else if (inputNames.givenName.length == 0) {
+ newDisplayName = inputNames.lastName;
+ } else {
+ newDisplayName =
+ inputNames.lastName.charAt(0).toUpperCase() +
+ inputNames.lastName.slice(1).toLowerCase() +
+ ', ' +
+ inputNames.givenName.charAt(0).toUpperCase() +
+ inputNames.givenName.slice(1).toLowerCase();
+ }
+ this.setDisplayName(newDisplayName);
+ },
+ formatDisplayName(newDisplayName): void {
+ this.setDisplayName(
+ newDisplayName.charAt(0).toUpperCase() +
+ newDisplayName.slice(1).toLowerCase()
+ );
+ },
+ setTime(time): void {
+ this.time = time;
+ },
+ updateTime(time) {
+ const time12 = (Number(time.substr(0, 2)) % 12 || 12) + time.substr(2, 3);
+
+ if (Number(time.substr(0, 2)) < 12) {
+ this.setTime(time12 + ' AM');
+ } else {
+ this.setTime(time12 + ' PM');
+ }
+ },
+ setDuration(duration): void {
+ this.duration = duration;
+ },
+ updateDuration(newDuration) {
+ let duration = '';
+ if (newDuration.hr) {
+ if (Number(newDuration.hr) == 1) duration += '1 Hr ';
+ else if (Number(newDuration.hr) > 1)
+ duration += Number(newDuration.hr) + ' Hrs ';
+ }
+
+ if (newDuration.min) {
+ if (Number(newDuration.min) == 1) duration += '1 Min ';
+ else if (Number(newDuration.min) > 1)
+ duration += Number(newDuration.min) + ' Mins ';
+ }
+
+ this.setDuration(duration);
+ },
+ setStatusStyle(statusStyle): void {
+ this.statusStyle = statusStyle;
+ },
+ updateStatusStyle(status) {
+ let style = '';
+ if (status == appearanceStatus.UNCF) {
+ style = 'badge badge-danger mt-2';
+ } else if (status == appearanceStatus.CNCL) {
+ style = 'badge badge-warning mt-2';
+ } else if (status == appearanceStatus.SCHD) {
+ style = 'badge badge-primary mt-2';
+ }
+
+ this.setStatusStyle(style);
+ },
+ setIconStyle(iconStyles): void {
+ this.iconStyles = iconStyles;
+ },
+ updateIconStyle(newIconsInfo) {
+ const iconStyles: IconStyleType[] = [];
+ for (const iconInfo of newIconsInfo) {
+ if (iconInfo['info'] == 'UNCF') {
+ iconStyles.push({ icon: 'circle-half', desc: appearanceStatus.UNCF });
+ } else if (iconInfo['info'] == 'CNCL') {
+ iconStyles.push({ icon: 'trash', desc: appearanceStatus.CNCL });
+ } else if (iconInfo['info'] == 'SCHD') {
+ iconStyles.push({ icon: 'calendar', desc: appearanceStatus.SCHD });
+ } else if (iconInfo['info'] == 'Video') {
+ iconStyles.push({ icon: 'camera-video-fill', desc: 'video' });
+ } else if (iconInfo['info'] == 'Home') {
+ iconStyles.push({ icon: 'house-door-fill', desc: iconInfo['desc'] });
+ }
+ }
+ this.setIconStyle(iconStyles);
+ },
+ setEnableArchive(newEnableArchive): void {
+ this.enableArchive = newEnableArchive;
+ },
+ UpdateEnableArchive(newEnableArchive): void {
+ this.setEnableArchive(newEnableArchive);
+ },
+ },
+});
diff --git a/web/src/stores/CourtFileSearchStore.ts b/web/src/stores/CourtFileSearchStore.ts
new file mode 100644
index 00000000..586d6c55
--- /dev/null
+++ b/web/src/stores/CourtFileSearchStore.ts
@@ -0,0 +1,44 @@
+import { KeyValueInfo } from '@/types/common';
+import { CourtFileSearchCriteria, FileDetail } from '@/types/courtFileSearch';
+import { defineStore } from 'pinia';
+
+export const useCourtFileSearchStore = defineStore('CourtFileSearchStore', {
+ state: () => ({
+ filesForViewing: [] as KeyValueInfo[],
+ currentViewedFileId: '',
+ searchCriteria: {} as CourtFileSearchCriteria,
+ searchResults: [] as FileDetail[],
+ }),
+ getters: {
+ selectedFiles: (state) => state.filesForViewing,
+ currentFileId: (state) => state.currentViewedFileId,
+ currentSearchCriteria: (state) => state.searchCriteria,
+ currentSearchResults: (state) => state.searchResults,
+ },
+ actions: {
+ updateCurrentViewedFileId(fileId: string): void {
+ this.currentViewedFileId = fileId;
+ },
+ addFilesForViewing({ searchCriteria, searchResults, files }): void {
+ this.searchCriteria = searchCriteria;
+ this.searchResults = [...searchResults];
+ this.filesForViewing = [...files];
+ this.currentViewedFileId = this.filesForViewing[0].key;
+ },
+ clearSelectedFiles(): void {
+ this.filesForViewing.length = 0;
+ this.searchCriteria = {} as CourtFileSearchCriteria;
+ this.searchResults = [];
+ this.currentViewedFileId = '';
+ },
+ removeCurrentViewedFileId(fileId: string): void {
+ this.filesForViewing = this.filesForViewing.filter(
+ (c) => c.key !== fileId
+ );
+ this.currentViewedFileId =
+ this.filesForViewing.length > 0
+ ? this.filesForViewing[this.filesForViewing.length - 1].key
+ : '';
+ },
+ },
+});
diff --git a/web/src/stores/CourtListStore.ts b/web/src/stores/CourtListStore.ts
new file mode 100644
index 00000000..72b57fb5
--- /dev/null
+++ b/web/src/stores/CourtListStore.ts
@@ -0,0 +1,17 @@
+import { courtListInformationInfoType } from '@/types/courtlist';
+import { defineStore } from 'pinia';
+
+export const useCourtListStore = defineStore('CourtListStore', {
+ state: () => ({
+ courtListInformation: {} as courtListInformationInfoType,
+ }),
+
+ actions: {
+ setCourtList(courtListInformation): void {
+ this.courtListInformation = courtListInformation;
+ },
+ updateCourtList(newCourtListInformation): void {
+ this.setCourtList(newCourtListInformation);
+ },
+ },
+});
diff --git a/web/src/stores/CriminalFileStore.ts b/web/src/stores/CriminalFileStore.ts
new file mode 100644
index 00000000..db515e57
--- /dev/null
+++ b/web/src/stores/CriminalFileStore.ts
@@ -0,0 +1,74 @@
+import {
+ criminalAppearanceInfoType,
+ criminalFileInformationType,
+ participantSentencesDetailsInfoType,
+} from '@/types/criminal';
+import { defineStore } from 'pinia';
+
+export const useCriminalFileStore = defineStore('CriminalFileStore', {
+ state: () => ({
+ criminalFileInformation: {} as criminalFileInformationType,
+ criminalFileInfoLoaded: false,
+ activeCriminalParticipantIndex: 0,
+
+ criminalParticipantSentenceInformation:
+ {} as participantSentencesDetailsInfoType,
+
+ showSections: {
+ 'Case Details': true,
+ 'Future Appearances': false,
+ 'Past Appearances': false,
+ Witnesses: false,
+ Documents: false,
+ 'Sentence/Order Details': false,
+ },
+ criminalAppearanceInfo: {} as criminalAppearanceInfoType,
+ }),
+ actions: {
+ setCriminalFile(criminalFileInformation): void {
+ this.criminalFileInformation = criminalFileInformation;
+ },
+ updateCriminalFile(newCriminalFileInformation): void {
+ this.setCriminalFile(newCriminalFileInformation);
+ },
+ setCriminalParticipantSentenceInformation(
+ criminalParticipantSentenceInformation
+ ): void {
+ this.criminalParticipantSentenceInformation =
+ criminalParticipantSentenceInformation;
+ },
+ updateCriminalParticipantSentenceInformation(
+ newCriminalParticipantSentenceInformation
+ ): void {
+ this.setCriminalParticipantSentenceInformation(
+ newCriminalParticipantSentenceInformation
+ );
+ },
+ setCriminalFileInfoLoaded(criminalFileInfoLoaded): void {
+ this.criminalFileInfoLoaded = criminalFileInfoLoaded;
+ },
+ updateCriminalFileInfoLoaded(newCriminalFileInfoLoaded): void {
+ this.setCriminalFileInfoLoaded(newCriminalFileInfoLoaded);
+ },
+ setActiveCriminalParticipantIndex(activeCriminalParticipantIndex): void {
+ this.activeCriminalParticipantIndex = activeCriminalParticipantIndex;
+ },
+ updateActiveCriminalParticipantIndex(
+ newActiveCriminalParticipantIndex
+ ): void {
+ this.setActiveCriminalParticipantIndex(newActiveCriminalParticipantIndex);
+ },
+ setShowSections(showSections): void {
+ this.showSections = showSections;
+ },
+ updateShowSections(newShowSections): void {
+ this.setShowSections(newShowSections);
+ },
+ setCriminalAppearanceInfo(criminalAppearanceInfo): void {
+ this.criminalAppearanceInfo = criminalAppearanceInfo;
+ },
+ updateCriminalAppearanceInfo(newCriminalAppearanceInfo): void {
+ this.setCriminalAppearanceInfo(newCriminalAppearanceInfo);
+ },
+ },
+});
diff --git a/web/src/stores/index.ts b/web/src/stores/index.ts
new file mode 100644
index 00000000..79dd7b44
--- /dev/null
+++ b/web/src/stores/index.ts
@@ -0,0 +1,16 @@
+import { createPinia } from 'pinia';
+import { App } from 'vue';
+
+const pinia = createPinia();
+
+export function registerPinia(app: App) {
+ app.use(pinia);
+}
+
+export default pinia;
+
+export { useCivilFileStore } from './CivilFileStore';
+export { useCommonStore } from './CommonStore';
+export { useCourtFileSearchStore } from './CourtFileSearchStore';
+export { useCourtListStore } from './CourtListStore';
+export { useCriminalFileStore } from './CriminalFileStore';
diff --git a/web/src/types/common/index.ts b/web/src/types/common/index.ts
index d5d2d743..50c812fe 100644
--- a/web/src/types/common/index.ts
+++ b/web/src/types/common/index.ts
@@ -1,84 +1,86 @@
-import { csrRequestsInfoType } from "../civil";
-import { ropRequestsInfoType } from "../criminal";
+import { csrRequestsInfoType } from '../civil';
+import { ropRequestsInfoType } from '../criminal';
export interface InputNamesType {
- lastName: string;
- givenName: string;
+ lastName: string;
+ givenName: string;
}
export interface DurationType {
- hr: string;
- min: string;
+ hr: string;
+ min: string;
}
export interface IconStyleType {
- icon: string;
- desc: string;
+ icon: string;
+ desc: string;
}
export interface IconInfoType {
- info: string;
- desc: string;
+ info: string;
+ desc: string;
}
export interface AdditionalProperties {
- additionalProp1: {};
- additionalProp2: {};
- additionalProp3: {};
+ additionalProp1: {};
+ additionalProp2: {};
+ additionalProp3: {};
}
export interface AdjudicatorRestrictionsInfoType {
- adjRestriction: string;
- adjudicator: string;
- fullName: string;
- status: string;
- appliesTo: string;
+ adjRestriction: string;
+ adjudicator: string;
+ fullName: string;
+ status: string;
+ appliesTo: string;
}
export interface DocumentRequestsInfoType {
- isCriminal: boolean;
- pdfFileName: string;
- base64UrlEncodedDocumentId: string;
- fileId: string;
+ isCriminal: boolean;
+ pdfFileName: string;
+ base64UrlEncodedDocumentId: string;
+ fileId: string;
}
export interface ArchiveInfoType {
- zipName: string;
- vcCivilFileId?: string;
- csrRequests: csrRequestsInfoType[];
- documentRequests: DocumentRequestsInfoType[];
- ropRequests: ropRequestsInfoType[];
+ zipName: string;
+ vcCivilFileId?: string;
+ csrRequests: csrRequestsInfoType[];
+ documentRequests: DocumentRequestsInfoType[];
+ ropRequests: ropRequestsInfoType[];
}
export interface CourtRoomsJsonInfoType {
- name: string;
- code: string;
- locationId: string;
- active: boolean;
- courtRooms: CourtRoomsInfo[];
+ name: string;
+ code: string;
+ locationId: string;
+ active: boolean;
+ courtRooms: CourtRoomsInfo[];
}
export interface CourtRoomsInfo {
- room: string;
- locationId: string;
- type: string;
+ room: string;
+ locationId: string;
+ type: string;
}
export interface UserInfo {
- userType: string;
- role: string;
- subRole: string;
- isSupremeUser: string;
+ userType: string;
+ enableArchive: boolean;
+ role: string;
+ subRole: string;
+ isSupremeUser: string;
+ agencyCode: string;
}
export interface LookupCode {
- codeType: string;
- code: string;
- shortDesc: string;
- longDesc: string;
+ codeType: string;
+ code: string;
+ shortDesc: string;
+ longDesc: string;
}
export interface KeyValueInfo {
- key: string;
- value: string;
-}
\ No newline at end of file
+ key: string;
+ value: string;
+}
diff --git a/web/src/utils/utils.ts b/web/src/utils/utils.ts
index 8e6aa1d9..c7659de0 100644
--- a/web/src/utils/utils.ts
+++ b/web/src/utils/utils.ts
@@ -1,26 +1,34 @@
-import Vue from "vue"
+import { AuthService } from '@/services/AuthService';
+import { useCommonStore } from '@/stores';
+import { inject } from 'vue';
export const SessionManager = {
- getSettings: async function(store) {
+ getSettings: async function () {
+ const commonStore = useCommonStore();
+ const authService = inject('authService');
+
+ if (commonStore.userInfo) {
+ return true;
+ }
+
try {
- if (!store.state.userInfo) {
- const response = await Vue.http.get("api/auth/info")
- store.commit(
- "CommonInformation/setEnableArchive",
- response.body.enableArchive
- )
- store.commit("CommonInformation/setUserInfo", response.body)
+ const userInfo = await authService?.getUserInfo();
+ if (!userInfo) {
+ console.error('User info not available.');
+ return false;
}
- return true
+ commonStore.userInfo = userInfo;
+ return true;
} catch (error) {
- console.log(error)
- return false
+ console.log(error);
+ return false;
}
- }
-}
+ },
+};
export const splunkLog = (message) => {
- console.log(message)
+ // TODO: This has to be refactored to use a better way to call Splunk via REST API
+ console.log(message);
// const token = import.meta.env["SPLUNK_TOKEN"] || ""
// const url = import.meta.env["SPLUNK_COLLECTOR_URL"] || ""
@@ -39,4 +47,8 @@ export const splunkLog = (message) => {
// console.log("Response from Splunk", body)
// })
// }
-}
+};
+
+export const getSingleValue = (value: string | string[]): string => {
+ return Array.isArray(value) ? value[0] : value;
+};
diff --git a/web/tsconfig.json b/web/tsconfig.json
index 467439dd..27cb22e5 100644
--- a/web/tsconfig.json
+++ b/web/tsconfig.json
@@ -15,7 +15,6 @@
"allowSyntheticDefaultImports": true,
"sourceMap": true,
"baseUrl": ".",
- "types": ["webpack-env", "underscore"],
"paths": {
"@/*": ["src/*"]
},
diff --git a/web/vite.config.js b/web/vite.config.js
index 78784caf..26cdd766 100644
--- a/web/vite.config.js
+++ b/web/vite.config.js
@@ -1,44 +1,57 @@
-import basicSsl from "@vitejs/plugin-basic-ssl"
-import vue from "@vitejs/plugin-vue2"
-import { defineConfig } from "vite"
+import basicSsl from '@vitejs/plugin-basic-ssl';
+import vue from '@vitejs/plugin-vue';
+import { defineConfig } from 'vite';
-const path = require("path")
-const vueSrc = "src"
+const path = require('path');
+const vueSrc = 'src';
export default defineConfig({
base:
- process.env.NODE_ENV === "production" ? "/S2I_INJECT_PUBLIC_PATH/" : "/",
- plugins: [vue(), basicSsl()],
+ process.env.NODE_ENV === 'production' ? '/S2I_INJECT_PUBLIC_PATH/' : '/',
+ plugins: [
+ vue({
+ template: {
+ compilerOptions: {
+ compatConfig: {
+ MODE: 2,
+ },
+ },
+ },
+ }),
+ basicSsl(),
+ ],
resolve: {
alias: {
- "@": path.resolve(__dirname, vueSrc),
- "@assets": path.resolve(__dirname, vueSrc.concat("/assets")),
- "@components": path.resolve(__dirname, vueSrc.concat("/components")),
- "@router": path.resolve(__dirname, vueSrc.concat("/router")),
- "@store": path.resolve(__dirname, vueSrc.concat("/store")),
- "@styles": path.resolve(__dirname, vueSrc.concat("/styles")),
- "~@bcgov": path.resolve(__dirname, "node_modules/@bcgov"),
- "~bootstrap": path.resolve(__dirname, "node_modules/bootstrap"),
- "~bootstrap-vue": path.resolve(__dirname, "node_modules/bootstrap-vue")
+ vue: '@vue/compat',
+ '@': path.resolve(__dirname, vueSrc),
+ '@assets': path.resolve(__dirname, vueSrc.concat('/assets')),
+ '@components': path.resolve(__dirname, vueSrc.concat('/components')),
+ '@router': path.resolve(__dirname, vueSrc.concat('/router')),
+ '@services': path.resolve(__dirname, vueSrc.concat('/services')),
+ '@store': path.resolve(__dirname, vueSrc.concat('/store')),
+ '@styles': path.resolve(__dirname, vueSrc.concat('/styles')),
+ '~@bcgov': path.resolve(__dirname, 'node_modules/@bcgov'),
+ '~bootstrap': path.resolve(__dirname, 'node_modules/bootstrap'),
+ '~bootstrap-vue': path.resolve(__dirname, 'node_modules/bootstrap-vue'),
},
- extensions: [".ts", ".vue", ".json", ".scss", ".svg", ".png", ".jpg"]
+ extensions: ['.ts', '.vue', '.json', '.scss', '.svg', '.png', '.jpg'],
},
modules: [vueSrc],
server: {
- host: "0.0.0.0",
+ host: '0.0.0.0',
port: 1339,
https: true,
proxy: {
- "^/api": {
- target: "http://api:5000",
+ '^/api': {
+ target: 'http://api:5000',
changeOrigin: true,
headers: {
- Connection: "keep-alive",
- "X-Forwarded-Host": "localhost",
- "X-Forwarded-Port": "8080",
- "X-Base-Href": "/"
- }
- }
- }
- }
-})
+ Connection: 'keep-alive',
+ 'X-Forwarded-Host': 'localhost',
+ 'X-Forwarded-Port': '8080',
+ 'X-Base-Href': '/',
+ },
+ },
+ },
+ },
+});
{{ selectedSideBar }}
-Crown Information
-+
-
-
- Crown Notes to JCM
--
+
+
+ Crown Notes to JCM
++
Documents ({{ NumberOfDocuments }})
-+ Documents ({{ NumberOfDocuments }}) +
++
-
+
- Open
- Selected
+
+ Open Selected
-
+
Criminal
-Criminal
++
{{ data.label }}
-
-
+
Next Three Future Appearances
-+
+ Next Three Future Appearances +
+
-
+
-
+
{{ fileNumberText }}
-
+
{{ agencyLocation.name }}
({{ agencyLocation.code }})
-
+
{{ agencyLocation.region }}
@@ -20,12 +28,21 @@
- {{ getNameOfParticipantTrunc() }} and {{ participantList.length - 1 }} other(s)
-
+ {{ getNameOfParticipantTrunc }} and
+ {{ participantList.length - 1 }} other(s)
+
-
- {{ adjudicatorRestrictions.length }}
+
+ {{
+ adjudicatorRestrictions.length
+ }}
-
+
Adjudicator Restrictions
@@ -58,9 +90,12 @@
-
+
-
+
{{ bans.length }}
@@ -78,24 +117,43 @@
Ban Details
-
+
-
+
- {{ data.value }}
-
-
- {{
+ {{
data.value
}}
+
+
+ {{ data.value }}
-
+
diff --git a/web/src/components/criminal/CriminalHeaderTop.vue b/web/src/components/criminal/CriminalHeaderTop.vue
index 4e7d0be4..f8518e0f 100644
--- a/web/src/components/criminal/CriminalHeaderTop.vue
+++ b/web/src/components/criminal/CriminalHeaderTop.vue
@@ -1,56 +1,69 @@
-
- +
-
+
Participants ({{ numberOfParticipants }})
-+
+ Participants ({{ numberOfParticipants }}) +
+
-
+
Last Three Past Appearances
-+
+ Last Three Past Appearances +
+
-
+
+
Recommendations
-Order Made Details
-
-
-
+ -
-
- ON THIS FILE
-
- {{panelItem}}
-
-
-
-
-
-
+
+
\ No newline at end of file
+ return {
+ panelItems,
+ SelectPanelItem,
+ };
+ },
+ });
+
diff --git a/web/src/components/criminal/CriminalWitnesses.vue b/web/src/components/criminal/CriminalWitnesses.vue
index 753e0f44..f00b8a5e 100644
--- a/web/src/components/criminal/CriminalWitnesses.vue
+++ b/web/src/components/criminal/CriminalWitnesses.vue
@@ -1,7 +1,11 @@
+
+
+ ON THIS FILE
+
+ {{ panelItem }}
+
+
+
+
+
+
+