Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More batch fun #1512

Merged
merged 1 commit into from
Jul 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<v-container
fluid
class="fill-height px-0 mb-4"
class="px-0 mb-4"
>
<v-form v-model="isValidSearchForm">
<v-row
Expand All @@ -10,12 +10,11 @@
style="background-color:white;"
>
<v-col
cols="9"
xl="8"
cols="7"
class="pa-0"
>
<v-sheet
class="mx-0 px-2 py-1 d-flex align-end align-self-start"
class="mx-0 px-2 pb-1 pt-3 d-flex align-end align-self-start"
color="rgba(0, 0, 0, 0.06)"
outlined
rounded
Expand All @@ -36,7 +35,8 @@
color="#003366"
label="Submission #"
maxlength="8"
dense
density="compact"
variant="underlined"
autofocus
@keyup.enter="enterPushed()"
@input="searchHasValues"
Expand All @@ -54,7 +54,8 @@
label="Mincode"
maxlength="8"
:rules="validateField(searchInputParams.minCode, isValidMincode, minCodeHint)"
dense
density="compact"
variant="underlined"
autofocus
@keyup.enter="enterPushed()"
@input="searchHasValues"
Expand All @@ -69,8 +70,9 @@
v-model="searchInputParams.schoolName"
tabindex="3"
color="#003366"
variant="underlined"
label="School Name"
dense
density="compact"
@keyup.enter="enterPushed()"
@input="searchHasValues"
/>
Expand All @@ -89,6 +91,7 @@
:outlined="false"
:rules="[validateStartDate,validateEndDate]"
:tabindex="'4'"
variant="underlined"
maxlength="8"
@input="searchHasValues"
@keyup.enter="enterPushed()"
Expand All @@ -106,6 +109,7 @@
:format="formatDob"
:label="'Date To'"
:outlined="false"
variant="underlined"
:rules="[validateEndDate]"
:tabindex="'5'"
maxlength="8"
Expand All @@ -128,8 +132,9 @@
tabindex="6"
color="#003366"
label="Legal Surname"
variant="underlined"
maxlength="255"
dense
density="compact"
@keyup.enter="enterPushed()"
@input="[searchHasValues(), upperCaseInput(searchInputParams.prbStudent, 'legalLastName')]"
/>
Expand All @@ -145,7 +150,8 @@
color="#003366"
label="Legal Given"
maxlength="255"
dense
variant="underlined"
density="compact"
@keyup.enter="enterPushed()"
@input="[searchHasValues(), upperCaseInput(searchInputParams.prbStudent, 'legalFirstName')]"
/>
Expand All @@ -160,8 +166,9 @@
tabindex="8"
color="#003366"
label="Legal Middle"
variant="underlined"
maxlength="255"
dense
density="compact"
@keyup.enter="enterPushed()"
@input="[searchHasValues(), upperCaseInput(searchInputParams.prbStudent, 'legalMiddleNames')]"
/>
Expand All @@ -176,9 +183,10 @@
tabindex="9"
color="#003366"
label="Gender"
variant="underlined"
maxlength="1"
:rules="validateField(searchInputParams.prbStudent.genderCode, isValidGender, genderHint)"
dense
density="compact"
@keyup.enter="enterPushed()"
@input="[searchHasValues(), upperCaseInput(searchInputParams.prbStudent, 'genderCode')]"
/>
Expand All @@ -195,6 +203,7 @@
:format="formatDob"
:label="'Birth Date'"
:outlined="false"
variant="underlined"
:rules="[validateDOB]"
:tabindex="'10'"
maxlength="8"
Expand All @@ -212,9 +221,10 @@
tabindex="11"
color="#003366"
label="PEN"
variant="underlined"
maxlength="9"
:rules="validateField(searchInputParams.prbStudent.assignedPEN, isValidPEN, penHint)"
dense
density="compact"
@keyup.enter="enterPushed()"
@input="searchHasValues"
/>
Expand All @@ -241,17 +251,16 @@
</v-col>

<v-col
cols="3"
xl="4"
cols="5"
class="pa-0 d-flex justify-end align-end"
>
<v-menu offset-y>
<template #activator="{ on }">
<template #activator="{ props }">
<PrimaryButton
id="view-action"
:loading="loadingRequestIDs"
:disabled="!filesSelected"
:on="on"
:bind="props"
text="View"
icon="mdi-chevron-down"
large-icon
Expand All @@ -260,14 +269,14 @@
<v-list>
<v-list-item
id="view-list-action"
@click-action="clickViewList"
@click="clickViewList"
link
>
<v-list-item-title>View List</v-list-item-title>
</v-list-item>
<v-list-item
id="view-details-action"
@click-action="clickViewDetails"
@click="clickViewDetails"
link
>
<v-list-item-title>View Details</v-list-item-title>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,25 +46,27 @@ export default {
return {
itemsPerPage: 15,
headers: [
{ value: 'rowSelect', type: 'select', sortable: false },
{ text: 'Mincode', value: 'mincode', sortable: false, align: 'start', tooltip: 'Mincode' },
{ text: 'School Name', value: 'schoolName', sortable: false, tooltip: 'School Name' },
{ text: 'TOT', value: 'studentCount', sortable: false, countable: true, tooltip: 'Total Requests' },
{text: 'MCH', value: 'matchedCount', sortable: false, countable: true, tooltip: 'Matched Requests'},
{text: 'NEW', value: 'newPenCount', sortable: false, countable: true, tooltip: 'New PEN Issued'},
{text: 'ERR', value: 'errorCount', sortable: false, countable: true, tooltip: 'Requests with errors'},
{text: 'REP', value: 'repeatCount', sortable: false, countable: true, tooltip: 'Repeated Requests'},
{text: 'FIX', value: 'fixableCount', sortable: false, countable: true, tooltip: 'Fixed Requests'},
{text: 'SRCH', value: 'searchedCount', sortable: false, countable: true, tooltip: 'Searched Count'},
{ title: '', value: 'rowSelect', type: 'select', sortable: false, key: 'rowSelect' },
{ title: 'Mincode', text: 'Mincode', value: 'mincode', key: 'mincode', sortable: false, align: 'start', tooltip: 'Mincode' },
{ title: 'School Name', text: 'School Name', value: 'schoolName', key: 'schoolName', sortable: false, tooltip: 'School Name' },
{ title: 'TOT', text: 'TOT', value: 'studentCount', key: 'studentCount', sortable: false, countable: true, tooltip: 'Total Requests' },
{ title: 'MCH', text: 'MCH', value: 'matchedCount', key: 'matchedCount', sortable: false, countable: true, tooltip: 'Matched Requests'},
{ title: 'NEW', text: 'NEW', value: 'newPenCount', key: 'newPenCount', sortable: false, countable: true, tooltip: 'New PEN Issued'},
{ title: 'ERR', text: 'ERR', value: 'errorCount', key: 'errorCount', sortable: false, countable: true, tooltip: 'Requests with errors'},
{ title: 'REP', text: 'REP', value: 'repeatCount', key: 'repeatCount', sortable: false, countable: true, tooltip: 'Repeated Requests'},
{ title: 'FIX', text: 'FIX', value: 'fixableCount', key: 'fixableCount', sortable: false, countable: true, tooltip: 'Fixed Requests'},
{ title: 'SRCH', text: 'SRCH', value: 'searchedCount', key: 'searchedCount', sortable: false, countable: true, tooltip: 'Searched Count'},
{
title: 'Load Date',
text: 'Load Date',
value: 'extractDate',
sortable: false,
tooltip: 'Loaded Date',
key: 'extractDate',
format: partialRight(formatDateTime, 'uuuu-MM-dd\'T\'HH:mm:ss', 'uuuu/MM/dd')
},
{text: 'SUB #', value: 'submissionNumber', sortable: false, tooltip: 'Submission Number'},
{value: 'actions', sortable: false},
{title: 'SUB #', text: 'SUB #', value: 'submissionNumber', key: 'submissionNumber', sortable: false, tooltip: 'Submission Number'},
{title: '', value: 'actions', sortable: false, key: 'actions'},
],
loadingTable: false,
isFilterOperation: false,
Expand Down Expand Up @@ -133,16 +135,27 @@ export default {
));

const statusCodeList = [PEN_REQ_BATCH_STATUS_CODES.ARCHIVED, PEN_REQ_BATCH_STATUS_CODES.REARCHIVED].join();

if(searchCriteriaList.length > 0){
return [
{
searchCriteriaList: [
{key: 'penRequestBatchStatusCode', operation: 'in', value: statusCodeList, valueType: 'STRING'}
]
},
{
condition: 'AND',
searchCriteriaList
},
];
}

return [
{
searchCriteriaList: [
{key: 'penRequestBatchStatusCode', operation: 'in', value: statusCodeList, valueType: 'STRING'}
]
},
{
condition: 'AND',
searchCriteriaList
},
}
];
},
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<v-container
fluid
class="fill-height px-0 mb-4"
class="px-0 mb-4"
>
<v-row
no-gutters
Expand All @@ -11,10 +11,10 @@
<v-col cols="1">
<v-text-field
class="readonly-text-field"
outlined
variant="outlined"
value="PSI"
readonly
dense
density="compact"
/>
</v-col>
<v-sheet
Expand All @@ -25,14 +25,17 @@
rounded
>
<span class="mr-4"><strong>Filtered by</strong></span>
<FilterTag
v-for="(filter, index) in filters"
:id="index + 'tag'"
:key="index"
:text="filter"
class="mr-2"
@close-item="removeFilter(index)"
/>
<div
v-for="(filter) in filters"
:key="filter.value"
>
<FilterTag
class="mr-2"
:id="filter + 'tag'"
:text="filter"
@close-item="removeFilter(filter)"
/>
</div>
</v-sheet>
<v-spacer v-else />
<PrimaryButton
Expand Down Expand Up @@ -71,6 +74,7 @@
:school-group="schoolGroup"
:loading-files="loadingFiles"
@file-click="clickFile"
@update:selected-file="selectFile"
/>
</v-row>
<PrbFileModal
Expand Down Expand Up @@ -120,7 +124,7 @@ export default {
selectedFile: null,
isDeleting: false,
isProcessing: false,
operation:undefined,
operation: undefined,
openFileViewer: false,
submissionNumber: '',
isActioned: false,
Expand All @@ -136,8 +140,15 @@ export default {
},
},
methods: {
removeFilter(index) {
this.filters.splice(index, 1);
selectFile(file) {
if (file?.isSelected) {
this.selectedFile = file;
} else {
this.selectedFile = null;
}
},
removeFilter(filter) {
this.filters = this.filters.filter(tFilter => tFilter !== filter);
},
async deleteFile() {
const userConfirmed = await this.isConfirmedByUser('Delete');
Expand Down Expand Up @@ -165,7 +176,7 @@ export default {
});
}
},
async markRecordForProcessing(){
async markRecordForProcessing() {
const userConfirmed = await this.isConfirmedByUser('Process');
if (userConfirmed) {
const penRequestBatchIDs = [];
Expand All @@ -191,7 +202,7 @@ export default {
});
}
},
async isConfirmedByUser(operation){
async isConfirmedByUser(operation) {
this.operation = operation;
this.submissionNumber = this.selectedFile.submissionNumber;
return this.$refs.confirmationDialog.open(null, null,
Expand All @@ -213,7 +224,7 @@ export default {
</script>

<style scoped>
.readonly-text-field.v-text-field /deep/ .v-text-field__details {
.readonly-text-field.v-text-field /deep/ .v-text-field__details {
display: none;
}
}
</style>
Loading
Loading