- default routing to "/app/dashboard"
Some checks failed
CI Pipeline / japa-tests (push) Failing after 53s

- default route after login "/app/dashboard" in AuthController.ts
- npm updates
- corrected route in menu.ts
- better styling for listing datasets for editor and submitter in Index.vue
- personal setting to route "/settings/user"
This commit is contained in:
Kaimbacher 2023-12-01 10:44:19 +01:00
parent 6fef581dd0
commit 0d51002903
10 changed files with 117 additions and 103 deletions

View file

@ -2,7 +2,7 @@
// import { Head, Link, useForm, usePage } from '@inertiajs/inertia-vue3';
import { Head, usePage } from '@inertiajs/vue3';
import { ComputedRef } from 'vue';
import { mdiSquareEditOutline, mdiTrashCan, mdiAlertBoxOutline, mdiLockOpen } from '@mdi/js';
import { mdiSquareEditOutline, mdiAlertBoxOutline } from '@mdi/js';
import { computed } from 'vue';
import LayoutAuthenticated from '@/Layouts/LayoutAuthenticated.vue';
import SectionMain from '@/Components/SectionMain.vue';
@ -38,7 +38,6 @@ const flash: ComputedRef<any> = computed(() => {
return usePage().props.flash;
});
const validStates = ['inprogress', 'rejected_editor'];
const getRowClass = (dataset) => {
// (props.options ? 'select' : props.type)
@ -80,80 +79,83 @@ const getRowClass = (dataset) => {
<table class="pure-table">
<thead>
<tr>
<th>
<th scope="col" class="py-3 text-left text-xs font-medium uppercase tracking-wider">
<!-- <Sort label="Dataset Title" attribute="title" :search="form.search" /> -->
Dataset Title
Title
</th>
<th>Submitter</th>
<th>
<th scope="col" class="py-3 text-left text-xs font-medium uppercase tracking-wider">
Submitter
</th>
<th scope="col" class="py-3 text-left text-xs font-medium uppercase tracking-wider">
<!-- <Sort label="Email" attribute="email" :search="form.search" /> -->
<th>Server State</th>
State
</th>
<th scope="col" class="py-3 text-left text-xs font-medium uppercase tracking-wider">
Editor
</th>
<th scope="col" class="py-3 text-left text-xs font-medium uppercase tracking-wider">
Date of last modification
</th>
<th scope="col" class="relative px-6 py-3" v-if="can.edit || can.delete">
<span class="sr-only">Actions</span>
</th>
<th>Editor</th>
<th>Date of last modification</th>
<th v-if="can.edit || can.delete">Actions</th>
</tr>
</thead>
<!-- <th>Dataset Title</th>
<th>ID</th>
<th>Server State</th>
<th>Editor</th>
<th>Date of last modification</th>
<th></th> -->
<tbody>
<tr v-for="dataset in props.datasets.data" :key="dataset.id" :class="getRowClass(dataset)">
<td data-label="Login">
<tbody class="bg-white divide-y divide-gray-200">
<tr v-for="dataset in props.datasets.data" :key="dataset.id"
:class="[getRowClass(dataset)]">
<td data-label="Login" class="py-4 whitespace-nowrap text-gray-700 dark:text-white">
<!-- <Link v-bind:href="stardust.route('user.show', [user.id])"
class="no-underline hover:underline text-cyan-600 dark:text-cyan-400">
{{ user.login }}
</Link> -->
<!-- {{ user.id }} -->
{{ dataset.main_title }}
<div class="text-sm font-medium">{{ dataset.main_title }}</div>
</td>
<td> {{ dataset.user.login }} </td>
<td>
{{ dataset.server_state }}
<td class="py-4 whitespace-nowrap text-gray-700 dark:text-white">
<div class="text-sm">{{ dataset.user.login }}</div>
</td>
<td class="py-4 whitespace-nowrap text-gray-700 dark:text-white">
<div class="text-sm">{{ dataset.server_state }}</div>
</td>
<td v-if="dataset.server_state === 'released'">
<small class="text-gray-500 dark:text-slate-400" :title="dataset.server_date_modified">
<td class="py-4 whitespace-nowrap text-gray-700 dark:text-white"
v-if="dataset.server_state === 'released'">
<div class="text-sm" :title="dataset.server_date_modified">
Preferred reviewer: {{ dataset.preferred_reviewer }}
</small>
</div>
</td>
<td
<td class="py-4 whitespace-nowrap text-gray-700 dark:text-white"
v-else-if="dataset.server_state === 'editor_accepted' || dataset.server_state === 'rejected_reviewer'">
<small class="text-gray-500 dark:text-slate-400" :title="dataset.server_date_modified">
<div class="text-sm" :title="dataset.server_date_modified">
In approval by: {{ dataset.editor?.login }}
</small>
</div>
</td>
<td class="py-4 whitespace-nowrap text-gray-700 dark:text-white" v-else>
<div class="text-sm">{{ dataset.editor?.login }}</div>
</td>
<td v-else>
{{ dataset.editor?.login }}
</td>
<td data-label="Created" class="lg:w-1 whitespace-nowrap">
<small class="text-gray-500 dark:text-slate-400" :title="dataset.server_date_modified">
<td data-label="modified" class="py-4 whitespace-nowrap text-gray-700 dark:text-white">
<div class="text-sm" :title="dataset.server_date_modified">
{{ dataset.server_date_modified }}
</small>
</div>
</td>
<td class="before:hidden lg:w-1 whitespace-nowrap">
<td class="py-4 whitespace-nowrap text-right text-sm font-medium text-gray-700 dark:text-white">
<BaseButtons type="justify-start lg:justify-end" no-wrap>
<BaseButton
v-if="can.receive && (dataset.server_state == 'released')"
<BaseButton v-if="can.receive && (dataset.server_state == 'released')"
:route-name="stardust.route('editor.dataset.receive', [dataset.id])" color="info"
:icon="mdiSquareEditOutline" :label="'Receive task'" small />
<!-- <BaseButton
v-if="can.edit && (dataset.server_state == 'editor_accepted' || dataset.server_state == 'rejected_reviewer')"
:route-name="stardust.route('editor.dataset.edit', [dataset.id])" color="info"
:icon="mdiSquareEditOutline" :label="'Edit'" small /> -->
:icon="mdiSquareEditOutline" :label="'Receive task'" small />
</BaseButtons>
</td>
</tr>
</tbody>
</table>
<!-- <BaseButton
v-if="can.edit && (dataset.server_state == 'editor_accepted' || dataset.server_state == 'rejected_reviewer')"
:route-name="stardust.route('editor.dataset.edit', [dataset.id])" color="info"
:icon="mdiSquareEditOutline" :label="'Edit'" small /> -->
<div class="py-4">
<Pagination v-bind:data="datasets.meta" />
@ -165,24 +167,23 @@ const getRowClass = (dataset) => {
<style scoped>
.pure-table tr.released {
background-color: greenyellow;
/* background-color: greenyellow; */
background-color: rgb(52 211 153);
color: gray;
}
.pure-table tr.editor_accepted {
padding: 0.8em;
background-color: lightblue;
/* background-color: lightblue; */
background-color: rgb(125 211 252);
color: gray;
}
.pure-table tr.rejected_reviewer {
padding: 0.8em;
background-color: orange;
color: gray;
}
.pure-table tr.reviewed {
/* padding: 0.8em; */
background-color: yellow;
color: gray;
}