- now authenticated user can change password with check of old password and password confirmination
Some checks failed
CI Pipeline / japa-tests (push) Failing after 52s
Some checks failed
CI Pipeline / japa-tests (push) Failing after 52s
- cchanged route app.dashboard to apps.dashboard - add editor and reviewer relation to Dataset.ts - added personal menu in asideMenu - added Approve.vue for editor - show warning in Index.vue (editor), if no dataset is loaded - user Receive.vue without inertia helper form - npm updates - added routes in routes.ts
This commit is contained in:
parent
0d51002903
commit
ae0c471e93
14 changed files with 733 additions and 408 deletions
|
@ -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, mdiAlertBoxOutline } from '@mdi/js';
|
||||
import { mdiSquareEditOutline, mdiAlertBoxOutline, mdiShareVariant } from '@mdi/js';
|
||||
import { computed } from 'vue';
|
||||
import LayoutAuthenticated from '@/Layouts/LayoutAuthenticated.vue';
|
||||
import SectionMain from '@/Components/SectionMain.vue';
|
||||
|
@ -76,81 +76,96 @@ const getRowClass = (dataset) => {
|
|||
|
||||
<!-- table -->
|
||||
<CardBox class="mb-6" has-table>
|
||||
<table class="pure-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="py-3 text-left text-xs font-medium uppercase tracking-wider">
|
||||
<!-- <Sort label="Dataset Title" attribute="title" :search="form.search" /> -->
|
||||
Title
|
||||
</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" /> -->
|
||||
State
|
||||
</th>
|
||||
<div v-if="props.datasets && props.datasets.length > 0">
|
||||
<table class="pure-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="py-3 text-left text-xs font-medium uppercase tracking-wider">
|
||||
<!-- <Sort label="Dataset Title" attribute="title" :search="form.search" /> -->
|
||||
Title
|
||||
</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" /> -->
|
||||
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>
|
||||
</tr>
|
||||
</thead>
|
||||
<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>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<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])"
|
||||
<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> -->
|
||||
<div class="text-sm font-medium">{{ dataset.main_title }}</div>
|
||||
</td>
|
||||
<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>
|
||||
<div class="text-sm font-medium">{{ dataset.main_title }}</div>
|
||||
</td>
|
||||
<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 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 }}
|
||||
</div>
|
||||
</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'">
|
||||
<div class="text-sm" :title="dataset.server_date_modified">
|
||||
In approval by: {{ dataset.editor?.login }}
|
||||
</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 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 }}
|
||||
</div>
|
||||
</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'">
|
||||
<div class="text-sm" :title="dataset.server_date_modified">
|
||||
In approval by: {{ dataset.editor?.login }}
|
||||
</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 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 }}
|
||||
</div>
|
||||
</td>
|
||||
<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')"
|
||||
:route-name="stardust.route('editor.dataset.receive', [dataset.id])"
|
||||
color="info" :icon="mdiSquareEditOutline" :label="'Receive edit task'" small />
|
||||
|
||||
<BaseButton
|
||||
v-if="can.approve && (dataset.server_state == 'editor_accepted' || dataset.server_state == 'rejected_reviewer')"
|
||||
:route-name="stardust.route('editor.dataset.approve', [dataset.id])"
|
||||
color="info" :icon="mdiShareVariant" :label="'Approve'" small />
|
||||
</BaseButtons>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div v-else>
|
||||
<!-- Show warning message if datasets are not defined or empty -->
|
||||
<div class="bg-yellow-200 text-yellow-800 rounded-md p-4">
|
||||
<p>No datasets defined.</p>
|
||||
<!-- You can add more descriptive text here -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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 }}
|
||||
</div>
|
||||
</td>
|
||||
<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')"
|
||||
:route-name="stardust.route('editor.dataset.receive', [dataset.id])" color="info"
|
||||
: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')"
|
||||
|
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue