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

Working batch and gmp fixes #1509

Merged
merged 3 commits into from
Jul 17, 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
4 changes: 4 additions & 0 deletions frontend/src/components/RequestDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
:dialog="imageRendererDialog"
:request-id="requestId"
:image-id="imageId"
@closeDialog="closeDialog"

Check warning on line 15 in frontend/src/components/RequestDetail.vue

View workflow job for this annotation

GitHub Actions / test

v-on event '@closeDialog' must be hyphenated

Check warning on line 15 in frontend/src/components/RequestDetail.vue

View workflow job for this annotation

GitHub Actions / test

v-on event '@closeDialog' must be hyphenated
/>
<v-row class="flex-grow-0 pb-5">
<v-card
Expand Down Expand Up @@ -764,7 +764,7 @@
},
watch: {
notification(val) {
if (val) {

Check warning on line 767 in frontend/src/components/RequestDetail.vue

View workflow job for this annotation

GitHub Actions / test

The "watch" property should be above the "mounted" property on line 591

Check warning on line 767 in frontend/src/components/RequestDetail.vue

View workflow job for this annotation

GitHub Actions / test

The "watch" property should be above the "mounted" property on line 591
let notificationData = val;
if (notificationData[`${this.requestType}ID`] && notificationData[`${this.requestType}ID`] === this.requestId && notificationData.sagaStatus === 'INITIATED') {
this.beforeSubmit();
Expand Down Expand Up @@ -832,5 +832,9 @@
h2 {
font-size: 1.25rem
}

:deep(.v-data-table-footer){
display: none;
}
</style>

1 change: 1 addition & 0 deletions frontend/src/components/RequestsDisplay.vue
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@
mounted() {
this.runInit();
},
computed: {

Check warning on line 251 in frontend/src/components/RequestsDisplay.vue

View workflow job for this annotation

GitHub Actions / test

The "computed" property should be above the "mounted" property on line 248

Check warning on line 251 in frontend/src/components/RequestsDisplay.vue

View workflow job for this annotation

GitHub Actions / test

The "computed" property should be above the "mounted" property on line 248
...mapState(notificationsStore, ['notification']),
filteredResults() {
if (
Expand Down Expand Up @@ -298,7 +298,7 @@
return `${this.requestType}ID`;
},
},
watch: {

Check warning on line 301 in frontend/src/components/RequestsDisplay.vue

View workflow job for this annotation

GitHub Actions / test

The "watch" property should be above the "mounted" property on line 248

Check warning on line 301 in frontend/src/components/RequestsDisplay.vue

View workflow job for this annotation

GitHub Actions / test

The "watch" property should be above the "mounted" property on line 248
requestType: {
handler() {
this.runInit();
Expand Down Expand Up @@ -402,6 +402,7 @@
getMomentDate,
getRequestStore,
runInit() {
this.selectedStatuses = this.getRequestStore(this.requestType).selectedStatuses;
this.requests = [];
this.initialLoad = true; //stop watch from sending multiple getRequests calls on initial page load
this.headerSearchParams = this.getRequestStore(this.requestType).headerSearchParams;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,71 +19,74 @@
>
<template
v-for="h in headers"
#[`header.${h.value}`]="{ header }"
#[`column.${h.value}`]="{ column }"
>
<v-checkbox
v-if="header.type === 'select'"
:key="h.id"
v-model="allSelected"
<v-checkbox
v-if="column.type === 'select'"
:key="h.id"
v-model="allSelected"
:class="['file-checkbox', {'header-checkbox': hasFilterHeader}]"
color="#606060"
:indeterminate="partialSelected"
color="#606060"
hide-details="auto"
:indeterminate="partialSelected"
@update:model-value="selectAllFiles"
/>
<span
v-else
:key="h.id"
:class="{'file-column' : !header.countable}"
:title="header.tooltip"
:class="{'file-column' : !column.countable}"
:title="column.tooltip"
>
{{ header.text }}
{{ column.text }}
</span>
<template v-if="hasFilterHeader">
<br :key="h.id">
<span
:key="h.id"
:class="header.countable ? 'countable-column-header' : 'file-column'"
:class="column.countable ? 'countable-column-header' : 'file-column'"
>
<v-checkbox
v-if="header.filterName"
v-model="header.isFiltered"
<v-checkbox
v-if="column.filterName"
v-model="column.isFiltered"
class="file-checkbox filter-checkbox"
color="#606060"
@update:model-value="selectFilter(header)"
hide-details="auto"
color="#606060"
@update:model-value="selectFilter(column)"
/>
</span>
</template>
</template>
<template #item="props">
<template #item="item">
<tr
:class="tableRowClass(props.item)"
@click="selectItem(props.item)"
@mouseover="enableActions(props.item)"
@mouseleave="disableActions(props.item)"
:class="tableRowClass(item.item.raw)"
@click="selectItem(item.item.raw)"
@mouseover="enableActions(item.item.raw)"
@mouseleave="disableActions(item.item.raw)"
>
<td
v-for="header in props.headers"
v-for="header in item.columns"
:key="header.id"
:class="{[header.value]: true, 'select-column': header.type}"
>
<div v-if="header.type === 'select'">
<v-row no-gutters>
<v-checkbox
v-model="props.item.isSelected"
v-model="item.item.raw.isSelected"
class="file-checkbox"
hide-details="auto"
color="#606060"
:disabled="props.item.sagaInProgress"
@click.stop="handleFileCheckBoxClicked(props.item)"
:disabled="item.item.raw.sagaInProgress"
@click.stop="handleFileCheckBoxClicked(item.item.raw)"
/>
<v-tooltip
v-if="props.item.sagaInProgress"
v-if="item.item.raw.sagaInProgress"
bottom
>
<template #activator="{ on, attrs }">
<template #activator="{ props }">
<v-icon
color="warning"
dark
v-bind="attrs"
v-bind="props"
class="pl-2"
>
info
Expand All @@ -100,30 +103,30 @@
<span
v-if="header.countable"
class="countable-column-data"
>{{ props.item[header.value] || '' }}</span>
>{{ item.item.raw[header.value] || '' }}</span>
<span v-else-if="header.value==='submissionNumber'">
<a
v-if="!props.item.sagaInProgress"
v-if="!item.item.raw.sagaInProgress"
class="submission"
@click.stop="handleSubmissionNumberClicked(props.item[header.value])"
>{{ props.item[header.value] }}</a>
@click.stop="handleSubmissionNumberClicked(item.item.raw[header.value])"
>{{ item.item.raw[header.value] }}</a>
<span
v-else
class="submission"
>{{ props.item[header.value] }}</span>
>{{ item.item.raw[header.value] }}</span>
</span>
<PrimaryButton
v-else-if="header.value === 'actions'"
:id="hoveredOveredRowBatchID === props.item.penRequestBatchID ? 'more-info-action': ''"
:class="{'file-action': hoveredOveredRowBatchID != props.item.penRequestBatchID}"
:id="hoveredOveredRowBatchID === item.item.raw.penRequestBatchID ? 'more-info-action': ''"
:class="{'file-action': hoveredOveredRowBatchID != item.item.raw.penRequestBatchID}"
short
text="More Info"
:disabled="props.item.sagaInProgress"
:disabled="item.item.raw.sagaInProgress"
@click-action="clickMoreInfo"
/>
<span v-else>{{ formatTableColumn(header.format, props.item[header.value]) }}</span>
<span v-else>{{ formatTableColumn(header.format, item.item.raw[header.value]) }}</span>
<v-tooltip
v-if="header.value==='mincode' && isUnarchived(props.item)"
v-if="header.value==='mincode' && isUnarchived(item.item.raw)"
right
>
<template #activator="{ on }">
Expand All @@ -132,13 +135,13 @@
color="#2E8540"
class="ml-1"
>
{{ isUnarchivedBatchChanged(props.item) ? 'fa-sync-alt' : 'fa-unlock' }}
{{ isUnarchivedBatchChanged(item.item.raw) ? 'fa-sync-alt' : 'fa-unlock' }}
</v-icon>
</template>
<span>{{ getUpdateUser(props.item) }}</span>
<span>{{ getUpdateUser(item.item.raw) }}</span>
</v-tooltip>
<v-tooltip
v-if="header.value==='mincode' && isRearchived(props.item)"
v-if="header.value==='mincode' && isRearchived(item.item.raw)"
right
>
<template #activator="{ on }">
Expand All @@ -149,7 +152,7 @@
{{ 'preview' }}
</v-icon>
</template>
<span>{{ getUpdateUser(props.item) }}</span>
<span>{{ getUpdateUser(item.item.raw) }}</span>
</v-tooltip>
</div>
</td>
Expand All @@ -158,6 +161,7 @@
</v-data-table>
<Pagination
v-model="pageNumber"
:value="pageNumber"
:data-response="penRequestBatchResponse"
:page-commands="pageCommands"
/>
Expand All @@ -172,20 +176,20 @@
<script>
import {uniqBy} from 'lodash';
import router from '../../../router';
import Pagination from '@/components/util/Pagination.vue';
import {PEN_REQ_BATCH_STATUS_CODES} from '@/utils/constants';
import PrimaryButton from '@/components/util/PrimaryButton.vue';
import PenRequestBatchHistoryModal from './PenRequestBatchHistoryModal.vue';
import {mapState} from 'pinia';
import alertMixin from '../../../mixins/alertMixin';
import {notificationsStore} from '@/store/modules/notifications';
import {penRequestBatchStore} from '@/store/modules/penRequestBatch';
import Pagination from '@/components/util/Pagination.vue';

export default {
name: 'PenRequestBatchDataTable',
components: {
Pagination,
PrimaryButton,
Pagination,
PenRequestBatchHistoryModal
},
mixins: [alertMixin],
Expand Down Expand Up @@ -384,4 +388,21 @@ export default {
.file-action {
visibility: hidden;
}

:deep(.v-data-table-footer){
display: none;
}

:deep(.v-data-table__th){
font-size: 0.75em !important;
font-weight: bold !important;
}

:deep(.batch-file){
font-size: 0.875em;
}

#dataTable /deep/ table th {
font-size: 0.875rem;
}
</style>
Loading
Loading