Requisito Toscano
This commit is contained in:
@@ -137,7 +137,18 @@
|
||||
placeholder="Search by File" />
|
||||
</template>
|
||||
</Column>
|
||||
|
||||
<Column field="executedByUsername" header="Executed By" sortable
|
||||
style="min-width: 12rem">
|
||||
<template #body="slotProps">
|
||||
<div class="flex items-center gap-2">
|
||||
{{ slotProps.data.executedByUsername || 'N/A' }}
|
||||
</div>
|
||||
</template>
|
||||
<template #filter="{ filterModel, filterCallback }">
|
||||
<InputText v-model="filterModel.value" type="text" @input="filterCallback()"
|
||||
placeholder="Search by File" />
|
||||
</template>
|
||||
</Column>
|
||||
<Column field="rating" header="Rating">
|
||||
<template #body="slotProps">
|
||||
<Rating :modelValue="slotProps.data.rating" :stars="5" :readonly="true" />
|
||||
@@ -171,10 +182,11 @@ import 'md-editor-v3/lib/style.css';
|
||||
import moment from 'moment';
|
||||
import ProgressSpinner from 'primevue/progressspinner';
|
||||
import { useToast } from 'primevue/usetoast';
|
||||
import { onMounted, ref } from 'vue';
|
||||
import { onMounted, ref, watch } from 'vue';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
import { ScenarioService } from '../../service/ScenarioService.js';
|
||||
import { ScenarioExecutionStore } from '../../stores/ScenarioExecutionStore.js';
|
||||
import { UserPrefStore } from '../../stores/UserPrefStore.js';
|
||||
|
||||
const first = ref(0);
|
||||
const router = useRouter();
|
||||
@@ -193,6 +205,7 @@ const execution_id = ref("");
|
||||
const listScenarios = ref([]);
|
||||
const scenario_execution_store = ScenarioExecutionStore();
|
||||
const toast = useToast();
|
||||
const userPrefStore = UserPrefStore();
|
||||
|
||||
|
||||
|
||||
@@ -225,6 +238,11 @@ const filters = ref({
|
||||
operator: FilterOperator.AND,
|
||||
constraints: [{ value: null, matchMode: FilterMatchMode.CONTAINS }]
|
||||
},
|
||||
|
||||
'executedByUsername': {
|
||||
operator: FilterOperator.AND,
|
||||
constraints: [{ value: null, matchMode: FilterMatchMode.CONTAINS }]
|
||||
},
|
||||
|
||||
'startDate': {
|
||||
operator: FilterOperator.AND,
|
||||
@@ -235,7 +253,20 @@ const filters = ref({
|
||||
|
||||
onMounted(() => {
|
||||
scenario_execution_store.fetchScenariosExecution()
|
||||
updateFilters();
|
||||
});
|
||||
watch(() => route.params.name, updateFilters);
|
||||
|
||||
function updateFilters() {
|
||||
const selectedScenario = userPrefStore.getSelScenario;
|
||||
|
||||
if (selectedScenario && route.params.name!=='all') {
|
||||
console.log('selectedScenario: im in');
|
||||
filters.value['scenario.name'].constraints[0].value = selectedScenario;
|
||||
}else{
|
||||
filters.value['scenario.name'].constraints[0].value = null;
|
||||
}
|
||||
}
|
||||
|
||||
async function updateRating(rowData, newRating) {
|
||||
|
||||
@@ -287,7 +318,10 @@ function onPage(event) {
|
||||
first.value = event.first;
|
||||
}
|
||||
|
||||
|
||||
// onBeforeRouteLeave((to, from, next) => {
|
||||
// userPrefStore.setSelectedScenario(null);
|
||||
// console.log('selectedScenario: im out');
|
||||
// });
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user