- small adaptions for AsideMenuItem.vue, AsideMenuLayer.vue
All checks were successful
CI Pipeline / japa-tests (push) Successful in 50s
All checks were successful
CI Pipeline / japa-tests (push) Successful in 50s
- new routes editor.dataset.list and editor.dataset.update - fir functionalities for editor role, suche as listing and receiving released datasets - npm updates
This commit is contained in:
parent
c1e056b9fc
commit
6fef581dd0
|
@ -1,11 +1,13 @@
|
||||||
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext';
|
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext';
|
||||||
import { Client } from '@opensearch-project/opensearch';
|
import { Client } from '@opensearch-project/opensearch';
|
||||||
|
import User from 'App/Models/User';
|
||||||
import Dataset from 'App/Models/Dataset';
|
import Dataset from 'App/Models/Dataset';
|
||||||
import XmlModel from 'App/Library/XmlModel';
|
import XmlModel from 'App/Library/XmlModel';
|
||||||
import { XMLBuilder } from 'xmlbuilder2/lib/interfaces';
|
import { XMLBuilder } from 'xmlbuilder2/lib/interfaces';
|
||||||
import { create } from 'xmlbuilder2';
|
import { create } from 'xmlbuilder2';
|
||||||
import { readFileSync } from 'fs';
|
import { readFileSync } from 'fs';
|
||||||
import { transform } from 'saxon-js';
|
import { transform } from 'saxon-js';
|
||||||
|
import type { ModelQueryBuilderContract } from '@ioc:Adonis/Lucid/Orm';
|
||||||
|
|
||||||
// Create a new instance of the client
|
// Create a new instance of the client
|
||||||
const client = new Client({ node: 'http://localhost:9200' }); // replace with your OpenSearch endpoint
|
const client = new Client({ node: 'http://localhost:9200' }); // replace with your OpenSearch endpoint
|
||||||
|
@ -19,7 +21,86 @@ export default class DatasetsController {
|
||||||
// this.proc = readFileSync('public/assets2/datasetxml2oai.sef.json');
|
// this.proc = readFileSync('public/assets2/datasetxml2oai.sef.json');
|
||||||
}
|
}
|
||||||
|
|
||||||
public async index({}: HttpContextContract) {}
|
// public async index({}: HttpContextContract) {}
|
||||||
|
public async index({ auth, request, inertia }: HttpContextContract) {
|
||||||
|
const user = (await User.find(auth.user?.id)) as User;
|
||||||
|
const page = request.input('page', 1);
|
||||||
|
let datasets: ModelQueryBuilderContract<typeof Dataset, Dataset> = Dataset.query();
|
||||||
|
|
||||||
|
// if (request.input('search')) {
|
||||||
|
// // users = users.whereRaw('name like %?%', [request.input('search')])
|
||||||
|
// const searchTerm = request.input('search');
|
||||||
|
// datasets.where('name', 'ilike', `%${searchTerm}%`);
|
||||||
|
// }
|
||||||
|
|
||||||
|
if (request.input('sort')) {
|
||||||
|
type SortOrder = 'asc' | 'desc' | undefined;
|
||||||
|
let attribute = request.input('sort');
|
||||||
|
let sortOrder: SortOrder = 'asc';
|
||||||
|
|
||||||
|
if (attribute.substr(0, 1) === '-') {
|
||||||
|
sortOrder = 'desc';
|
||||||
|
// attribute = substr(attribute, 1);
|
||||||
|
attribute = attribute.substr(1);
|
||||||
|
}
|
||||||
|
datasets.orderBy(attribute, sortOrder);
|
||||||
|
} else {
|
||||||
|
// users.orderBy('created_at', 'desc');
|
||||||
|
datasets.orderBy('id', 'asc');
|
||||||
|
}
|
||||||
|
|
||||||
|
// const users = await User.query().orderBy('login').paginate(page, limit);
|
||||||
|
const myDatasets = await datasets
|
||||||
|
.where('server_state', 'released')
|
||||||
|
.orWhere((dQuery) => {
|
||||||
|
dQuery
|
||||||
|
.whereIn('server_state', ['editor_accepted', 'rejected_reviewer', 'reviewed', 'published'])
|
||||||
|
.where('editor_id', user.id);
|
||||||
|
})
|
||||||
|
.preload('titles')
|
||||||
|
.preload('user', (query) => query.select('id', 'login'))
|
||||||
|
.paginate(page, 10);
|
||||||
|
|
||||||
|
return inertia.render('Editor/Dataset/Index', {
|
||||||
|
datasets: myDatasets.serialize(),
|
||||||
|
filters: request.all(),
|
||||||
|
can: {
|
||||||
|
// create: await auth.user?.can(['dataset-submit']),
|
||||||
|
receive: await auth.user?.can(['dataset-receive']),
|
||||||
|
edit: await auth.user?.can(['dataset-editor-edit']),
|
||||||
|
delete: await auth.user?.can(['dataset-editor-delete']),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public async receive({ request, inertia, response }: HttpContextContract) {
|
||||||
|
const id = request.param('id');
|
||||||
|
const dataset = await Dataset.query()
|
||||||
|
.where('id', id)
|
||||||
|
.preload('titles')
|
||||||
|
.preload('descriptions')
|
||||||
|
.preload('user', (builder) => {
|
||||||
|
builder.select('id', 'login');
|
||||||
|
})
|
||||||
|
|
||||||
|
.firstOrFail();
|
||||||
|
|
||||||
|
const validStates = ['released'];
|
||||||
|
if (!validStates.includes(dataset.server_state)) {
|
||||||
|
// session.flash('errors', 'Invalid server state!');
|
||||||
|
return response
|
||||||
|
.flash(
|
||||||
|
'warning',
|
||||||
|
`Invalid server state. Dataset with id ${id} cannot be received. Datset has server state ${dataset.server_state}.`,
|
||||||
|
)
|
||||||
|
.redirect()
|
||||||
|
.back();
|
||||||
|
}
|
||||||
|
|
||||||
|
return inertia.render('Editor/Dataset/Receive', {
|
||||||
|
dataset,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
public async create({}: HttpContextContract) {}
|
public async create({}: HttpContextContract) {}
|
||||||
|
|
|
@ -884,24 +884,23 @@ export default class DatasetController {
|
||||||
const uploadedFiles: MultipartFileContract[] = request.files('files');
|
const uploadedFiles: MultipartFileContract[] = request.files('files');
|
||||||
if (Array.isArray(uploadedFiles) && uploadedFiles.length > 0) {
|
if (Array.isArray(uploadedFiles) && uploadedFiles.length > 0) {
|
||||||
for (const [index, fileData] of uploadedFiles.entries()) {
|
for (const [index, fileData] of uploadedFiles.entries()) {
|
||||||
|
try {
|
||||||
|
await this.scanFileForViruses(fileData.tmpPath); //, 'gitea.lan', 3310);
|
||||||
|
// await this.scanFileForViruses("/tmp/testfile.txt");
|
||||||
|
} catch (error) {
|
||||||
|
// If the file is infected or there's an error scanning the file, throw a validation exception
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
|
||||||
|
// move to disk:
|
||||||
const fileName = `file-${cuid()}.${fileData.extname}`;
|
const fileName = `file-${cuid()}.${fileData.extname}`;
|
||||||
const datasetFolder = `files/${dataset.id}`;
|
const datasetFolder = `files/${dataset.id}`;
|
||||||
|
|
||||||
await fileData.moveToDisk(datasetFolder, { name: fileName, overwrite: true }, 'local');
|
await fileData.moveToDisk(datasetFolder, { name: fileName, overwrite: true }, 'local');
|
||||||
// let path = coverImage.filePath;
|
// let path = coverImage.filePath;
|
||||||
|
|
||||||
|
//save to db:
|
||||||
const { clientFileName, sortOrder } = this.extractVariableNameAndSortOrder(fileData.clientName);
|
const { clientFileName, sortOrder } = this.extractVariableNameAndSortOrder(fileData.clientName);
|
||||||
const mimeType = fileData.headers['content-type'] || 'application/octet-stream'; // Fallback to a default MIME type
|
const mimeType = fileData.headers['content-type'] || 'application/octet-stream'; // Fallback to a default MIME type
|
||||||
// save file metadata into db
|
|
||||||
// const newFile = new File();
|
|
||||||
// newFile.pathName = `${datasetFolder}/${fileName}`;
|
|
||||||
// newFile.fileSize = fileData.size;
|
|
||||||
// newFile.mimeType = mimeType;
|
|
||||||
// newFile.label = clientFileName;
|
|
||||||
// newFile.sortOrder = sortOrder ? sortOrder : index;
|
|
||||||
// newFile.visibleInFrontdoor = true;
|
|
||||||
// newFile.visibleInOai = true;
|
|
||||||
|
|
||||||
const newFile = await dataset
|
const newFile = await dataset
|
||||||
.useTransaction(trx)
|
.useTransaction(trx)
|
||||||
.related('files')
|
.related('files')
|
||||||
|
|
|
@ -95,7 +95,13 @@ export default class Dataset extends DatasetExtension {
|
||||||
})
|
})
|
||||||
public created_at: DateTime;
|
public created_at: DateTime;
|
||||||
|
|
||||||
@column.dateTime({ autoCreate: true, autoUpdate: true, columnName: 'server_date_modified' })
|
@column.dateTime({
|
||||||
|
serialize: (value: Date | null) => {
|
||||||
|
return value ? dayjs(value).format('MMMM D YYYY HH:mm a') : value;
|
||||||
|
},
|
||||||
|
autoCreate: true,
|
||||||
|
autoUpdate: true,
|
||||||
|
columnName: 'server_date_modified' })
|
||||||
public server_date_modified: DateTime;
|
public server_date_modified: DateTime;
|
||||||
|
|
||||||
@manyToMany(() => Person, {
|
@manyToMany(() => Person, {
|
||||||
|
@ -188,6 +194,15 @@ export default class Dataset extends DatasetExtension {
|
||||||
return mainTitle ? mainTitle.value : null;
|
return mainTitle ? mainTitle.value : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@computed({
|
||||||
|
serializeAs: 'main_abstract',
|
||||||
|
})
|
||||||
|
public get mainAbstract() {
|
||||||
|
// return `${this.firstName} ${this.lastName}`;
|
||||||
|
const mainTitle = this.descriptions?.find((desc) => desc.type === 'Abstract');
|
||||||
|
return mainTitle ? mainTitle.value : null;
|
||||||
|
}
|
||||||
|
|
||||||
@manyToMany(() => Person, {
|
@manyToMany(() => Person, {
|
||||||
pivotForeignKey: 'document_id',
|
pivotForeignKey: 'document_id',
|
||||||
pivotRelatedForeignKey: 'person_id',
|
pivotRelatedForeignKey: 'person_id',
|
||||||
|
|
18
package-lock.json
generated
18
package-lock.json
generated
|
@ -3978,9 +3978,9 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@types/eslint": {
|
"node_modules/@types/eslint": {
|
||||||
"version": "8.44.7",
|
"version": "8.44.8",
|
||||||
"resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.44.7.tgz",
|
"resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.44.8.tgz",
|
||||||
"integrity": "sha512-f5ORu2hcBbKei97U73mf+l9t4zTGl74IqZ0GQk4oVea/VS8tQZYkUveSYojk+frraAVYId0V2WC9O4PTNru2FQ==",
|
"integrity": "sha512-4K8GavROwhrYl2QXDXm0Rv9epkA8GBFu0EI+XrrnnuCl7u8CWBRusX7fXJfanhZTDWSAL24gDI/UqXyUM0Injw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"peer": true,
|
"peer": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -4166,9 +4166,9 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@types/node": {
|
"node_modules/@types/node": {
|
||||||
"version": "20.10.0",
|
"version": "20.10.1",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.0.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.1.tgz",
|
||||||
"integrity": "sha512-D0WfRmU9TQ8I9PFx9Yc+EBHw+vSpIub4IDvQivcp26PtPrdMGAq5SDcpXEo/epqa/DXotVpekHiLNTg3iaKXBQ==",
|
"integrity": "sha512-T2qwhjWwGH81vUEx4EXmBKsTJRXFXNZTL4v0gi01+zyBmCwzE6TyHszqX01m+QHTEq+EZNo13NeJIdEqf+Myrg==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"undici-types": "~5.26.4"
|
"undici-types": "~5.26.4"
|
||||||
}
|
}
|
||||||
|
@ -8194,9 +8194,9 @@
|
||||||
"integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="
|
"integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="
|
||||||
},
|
},
|
||||||
"node_modules/electron-to-chromium": {
|
"node_modules/electron-to-chromium": {
|
||||||
"version": "1.4.596",
|
"version": "1.4.597",
|
||||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.596.tgz",
|
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.597.tgz",
|
||||||
"integrity": "sha512-zW3zbZ40Icb2BCWjm47nxwcFGYlIgdXkAx85XDO7cyky9J4QQfq8t0W19/TLZqq3JPQXtlv8BPIGmfa9Jb4scg==",
|
"integrity": "sha512-0XOQNqHhg2YgRVRUrS4M4vWjFCFIP2ETXcXe/0KIQBjXE9Cpy+tgzzYfuq6HGai3hWq0YywtG+5XK8fyG08EjA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/emittery": {
|
"node_modules/emittery": {
|
||||||
|
|
|
@ -37,18 +37,13 @@ const styleService = StyleService();
|
||||||
|
|
||||||
const hasColor = computed(() => props.item && props.item.color);
|
const hasColor = computed(() => props.item && props.item.color);
|
||||||
|
|
||||||
const isDropdownOpen = ref(false);
|
// const isDropdownOpen = ref(false);
|
||||||
|
|
||||||
const isChildSelected = computed(() => {
|
// const isChildSelected = computed(() => {
|
||||||
if (props.item.children && props.item.children.length > 0) {
|
// if (props.item.children && props.item.children.length > 0) {
|
||||||
return children.value.some(childItem => stardust.isCurrent(childItem.route));
|
// return children.value.some(childItem => stardust.isCurrent(childItem.route));
|
||||||
}
|
// }
|
||||||
return false;
|
// return false;
|
||||||
});
|
|
||||||
|
|
||||||
// const value = computed({
|
|
||||||
// get: () => props.modelValue,
|
|
||||||
// set: (value) => emit('update:modelValue', value),
|
|
||||||
// });
|
// });
|
||||||
|
|
||||||
|
|
||||||
|
@ -154,7 +149,7 @@ const hasRoles = computed(() => {
|
||||||
<!-- <li v-for="( child, index ) in children " :key="index">
|
<!-- <li v-for="( child, index ) in children " :key="index">
|
||||||
<AsideMenuItem :item="child" :key="index"> </AsideMenuItem>
|
<AsideMenuItem :item="child" :key="index"> </AsideMenuItem>
|
||||||
</li> -->
|
</li> -->
|
||||||
<AsideMenuItem v-for="(childItem, index) in props.item.children" :key="index" :item="childItem" />
|
<AsideMenuItem v-for="(childItem, index) in children" :key="index" :item="childItem" />
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<!-- <AsideMenuList v-if="hasChildren" :items="item.children"
|
<!-- <AsideMenuList v-if="hasChildren" :items="item.children"
|
||||||
|
@ -171,17 +166,18 @@ const hasRoles = computed(() => {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* .menu-item-icon {
|
.menu-item-icon {
|
||||||
font-size: 1.5rem;
|
font-size: 2.5rem;
|
||||||
margin-right: 10px;
|
/* margin-right: 10px; */
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu-item-label {
|
/* .menu-item-label {
|
||||||
font-size: 1.2rem;
|
font-size: 1.2rem;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
} */
|
||||||
|
|
||||||
.menu-item-dropdown {
|
.menu-item-dropdown {
|
||||||
margin-left: 10px;
|
/* margin-left: 10px; */
|
||||||
} */
|
padding-left: 0.75rem;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -12,7 +12,7 @@ import BaseIcon from '@/Components/BaseIcon.vue';
|
||||||
|
|
||||||
defineProps({
|
defineProps({
|
||||||
menu: {
|
menu: {
|
||||||
type: Array,
|
type: Array<Object>,
|
||||||
default: () => [],
|
default: () => [],
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
189
resources/js/Pages/Editor/Dataset/Index.vue
Normal file
189
resources/js/Pages/Editor/Dataset/Index.vue
Normal file
|
@ -0,0 +1,189 @@
|
||||||
|
<script setup lang="ts">
|
||||||
|
// 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 { computed } from 'vue';
|
||||||
|
import LayoutAuthenticated from '@/Layouts/LayoutAuthenticated.vue';
|
||||||
|
import SectionMain from '@/Components/SectionMain.vue';
|
||||||
|
import BaseButton from '@/Components/BaseButton.vue';
|
||||||
|
import CardBox from '@/Components/CardBox.vue';
|
||||||
|
import BaseButtons from '@/Components/BaseButtons.vue';
|
||||||
|
import NotificationBar from '@/Components/NotificationBar.vue';
|
||||||
|
import Pagination from '@/Components/Admin/Pagination.vue';
|
||||||
|
import { stardust } from '@eidellev/adonis-stardust/client';
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
datasets: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
|
filters: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
|
can: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
|
// user: {
|
||||||
|
// type: Object,
|
||||||
|
// default: () => ({}),
|
||||||
|
// }
|
||||||
|
});
|
||||||
|
|
||||||
|
const flash: ComputedRef<any> = computed(() => {
|
||||||
|
// let test = usePage();
|
||||||
|
// console.log(test);
|
||||||
|
return usePage().props.flash;
|
||||||
|
});
|
||||||
|
|
||||||
|
const validStates = ['inprogress', 'rejected_editor'];
|
||||||
|
|
||||||
|
const getRowClass = (dataset) => {
|
||||||
|
// (props.options ? 'select' : props.type)
|
||||||
|
let rowclass = '';
|
||||||
|
if (dataset.server_state == 'editor_accepted') {
|
||||||
|
rowclass = 'editor_accepted';
|
||||||
|
} else if (dataset.server_state == 'rejected_reviewer') {
|
||||||
|
rowclass = 'rejected_reviewer';
|
||||||
|
} else if (dataset.server_state == 'reviewed') {
|
||||||
|
rowclass = 'reviewed';
|
||||||
|
} else if (dataset.server_state == 'released') {
|
||||||
|
rowclass = 'released';
|
||||||
|
} else if (dataset.server_state == 'published') {
|
||||||
|
rowclass = 'released';
|
||||||
|
} else {
|
||||||
|
rowclass = '';
|
||||||
|
}
|
||||||
|
return rowclass;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<LayoutAuthenticated>
|
||||||
|
|
||||||
|
<Head title="Dataset List" />
|
||||||
|
<SectionMain>
|
||||||
|
<!-- <FormValidationErrors v-bind:errors="errors" /> -->
|
||||||
|
<NotificationBar v-if="flash.message" color="success" :icon="mdiAlertBoxOutline">
|
||||||
|
{{ flash.message }}
|
||||||
|
</NotificationBar>
|
||||||
|
<NotificationBar v-if="flash.warning" color="warning" :icon="mdiAlertBoxOutline">
|
||||||
|
{{ flash.warning }}
|
||||||
|
</NotificationBar>
|
||||||
|
|
||||||
|
<!-- table -->
|
||||||
|
<CardBox class="mb-6" has-table>
|
||||||
|
<table class="pure-table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
<!-- <Sort label="Dataset Title" attribute="title" :search="form.search" /> -->
|
||||||
|
Dataset Title
|
||||||
|
</th>
|
||||||
|
<th>Submitter</th>
|
||||||
|
<th>
|
||||||
|
<!-- <Sort label="Email" attribute="email" :search="form.search" /> -->
|
||||||
|
<th>Server State</th>
|
||||||
|
</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">
|
||||||
|
<!-- <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 }}
|
||||||
|
</td>
|
||||||
|
<td> {{ dataset.user.login }} </td>
|
||||||
|
<td>
|
||||||
|
{{ dataset.server_state }}
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td v-if="dataset.server_state === 'released'">
|
||||||
|
<small class="text-gray-500 dark:text-slate-400" :title="dataset.server_date_modified">
|
||||||
|
Preferred reviewer: {{ dataset.preferred_reviewer }}
|
||||||
|
</small>
|
||||||
|
</td>
|
||||||
|
<td
|
||||||
|
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">
|
||||||
|
In approval by: {{ dataset.editor?.login }}
|
||||||
|
</small>
|
||||||
|
</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">
|
||||||
|
{{ dataset.server_date_modified }}
|
||||||
|
</small>
|
||||||
|
</td>
|
||||||
|
<td class="before:hidden lg:w-1 whitespace-nowrap">
|
||||||
|
<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 />
|
||||||
|
<!-- <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 /> -->
|
||||||
|
</BaseButtons>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<div class="py-4">
|
||||||
|
<Pagination v-bind:data="datasets.meta" />
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</CardBox>
|
||||||
|
</SectionMain>
|
||||||
|
</LayoutAuthenticated>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.pure-table tr.released {
|
||||||
|
background-color: greenyellow;
|
||||||
|
color: gray;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pure-table tr.editor_accepted {
|
||||||
|
padding: 0.8em;
|
||||||
|
background-color: lightblue;
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
</style>
|
105
resources/js/Pages/Editor/Dataset/Receive.vue
Normal file
105
resources/js/Pages/Editor/Dataset/Receive.vue
Normal file
|
@ -0,0 +1,105 @@
|
||||||
|
<script setup lang="ts">
|
||||||
|
import LayoutAuthenticated from '@/Layouts/LayoutAuthenticated.vue';
|
||||||
|
import SectionMain from '@/Components/SectionMain.vue';
|
||||||
|
import SectionTitleLineWithButton from '@/Components/SectionTitleLineWithButton.vue';
|
||||||
|
import { useForm, Head, usePage } from '@inertiajs/vue3';
|
||||||
|
import { computed, Ref } from 'vue';
|
||||||
|
import CardBox from '@/Components/CardBox.vue';
|
||||||
|
import BaseButton from '@/Components/BaseButton.vue';
|
||||||
|
import BaseButtons from '@/Components/BaseButtons.vue';
|
||||||
|
import { stardust } from '@eidellev/adonis-stardust/client';
|
||||||
|
import { mdiArrowLeftBoldOutline, mdiLockOpen } from '@mdi/js';
|
||||||
|
import FormValidationErrors from '@/Components/FormValidationErrors.vue';
|
||||||
|
|
||||||
|
defineProps({
|
||||||
|
dataset: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const flash: Ref<any> = computed(() => {
|
||||||
|
return usePage().props.flash;
|
||||||
|
});
|
||||||
|
const errors: Ref<any> = computed(() => {
|
||||||
|
return usePage().props.errors;
|
||||||
|
});
|
||||||
|
|
||||||
|
const form = useForm({
|
||||||
|
preferred_reviewer: '',
|
||||||
|
preferred_reviewer_email: '',
|
||||||
|
preferation: 'yes_preferation',
|
||||||
|
|
||||||
|
// preferation: '',
|
||||||
|
// isPreferationRequired: false,
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// const isPreferationRequired = computed(() => form.preferation === 'yes_preferation');
|
||||||
|
|
||||||
|
const handleSubmit = async (e) => {
|
||||||
|
e.preventDefault();
|
||||||
|
|
||||||
|
// await form.put(stardust.route('dataset.releaseUpdate', [props.dataset.id]));
|
||||||
|
// // await form.put(stardust.route('editor.dataset.update', [props.dataset.id]));
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<LayoutAuthenticated>
|
||||||
|
|
||||||
|
<Head title="Receive dataset" />
|
||||||
|
<SectionMain>
|
||||||
|
<SectionTitleLineWithButton :icon="mdiLockOpen" title="Receive released dataset" main>
|
||||||
|
<BaseButton :route-name="stardust.route('editor.dataset.list')" :icon="mdiArrowLeftBoldOutline" label="Back"
|
||||||
|
color="white" rounded-full small />
|
||||||
|
</SectionTitleLineWithButton>
|
||||||
|
<CardBox form @submit.prevent="handleSubmit">
|
||||||
|
<FormValidationErrors v-bind:errors="errors" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- <div class="flex flex-col md:flex-row items-center"> -->
|
||||||
|
<div class="w-full">
|
||||||
|
<label class="block font-bold mb-2" for="owner">Submitter:</label>
|
||||||
|
<div class="w-full p-2 rounded-md">{{ dataset.user.login }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="w-full">
|
||||||
|
<label class="block font-bold mb-2" for="title">Dataset title:</label>
|
||||||
|
<div class="w-full p-2 rounded-md" v-if="dataset.main_title">
|
||||||
|
{{ dataset.main_title }}
|
||||||
|
</div>
|
||||||
|
<div class="w-full p-2 rounded-md" v-else>
|
||||||
|
No title available
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="w-full">
|
||||||
|
<label class="block font-bold mb-2" for="title">Dataset abstract:</label>
|
||||||
|
<div class="w-full p-2 rounded-md" v-if="dataset.main_abstract">
|
||||||
|
{{ dataset.main_abstract }}
|
||||||
|
</div>
|
||||||
|
<div class="w-full p-2 rounded-md" v-else>
|
||||||
|
No abstract available
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- </div> -->
|
||||||
|
|
||||||
|
|
||||||
|
<div v-if="flash && flash.warning" class="flex flex-col mt-6 animate-fade-in">
|
||||||
|
<div class="bg-yellow-500 border-l-4 border-orange-400 text-white p-4" role="alert">
|
||||||
|
<p class="font-bold">Be Warned</p>
|
||||||
|
<p>{{ flash.warning }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<template #footer>
|
||||||
|
<BaseButtons>
|
||||||
|
<!-- <BaseButton type="submit" color="info" label="Receive"
|
||||||
|
:class="{ 'opacity-25': form.processing }" :disabled="form.processing" /> -->
|
||||||
|
</BaseButtons>
|
||||||
|
</template>
|
||||||
|
</CardBox>
|
||||||
|
</SectionMain>
|
||||||
|
</LayoutAuthenticated>
|
||||||
|
</template>
|
|
@ -6,13 +6,11 @@ import { mdiSquareEditOutline, mdiTrashCan, mdiAlertBoxOutline, mdiLockOpen } fr
|
||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
import LayoutAuthenticated from '@/Layouts/LayoutAuthenticated.vue';
|
import LayoutAuthenticated from '@/Layouts/LayoutAuthenticated.vue';
|
||||||
import SectionMain from '@/Components/SectionMain.vue';
|
import SectionMain from '@/Components/SectionMain.vue';
|
||||||
// import SectionTitleLineWithButton from '@/Components/SectionTitleLineWithButton.vue';
|
|
||||||
import BaseButton from '@/Components/BaseButton.vue';
|
import BaseButton from '@/Components/BaseButton.vue';
|
||||||
import CardBox from '@/Components/CardBox.vue';
|
import CardBox from '@/Components/CardBox.vue';
|
||||||
import BaseButtons from '@/Components/BaseButtons.vue';
|
import BaseButtons from '@/Components/BaseButtons.vue';
|
||||||
import NotificationBar from '@/Components/NotificationBar.vue';
|
import NotificationBar from '@/Components/NotificationBar.vue';
|
||||||
import Pagination from '@/Components/Admin/Pagination.vue';
|
import Pagination from '@/Components/Admin/Pagination.vue';
|
||||||
// import Sort from '@/Components/Admin/Sort.vue';
|
|
||||||
import { stardust } from '@eidellev/adonis-stardust/client';
|
import { stardust } from '@eidellev/adonis-stardust/client';
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
@ -34,38 +32,41 @@ const props = defineProps({
|
||||||
// }
|
// }
|
||||||
});
|
});
|
||||||
|
|
||||||
// const search = computed(() => {
|
|
||||||
// return props.filters.search;
|
|
||||||
// });
|
|
||||||
|
|
||||||
const flash: ComputedRef<any> = computed(() => {
|
const flash: ComputedRef<any> = computed(() => {
|
||||||
// let test = usePage();
|
// let test = usePage();
|
||||||
// console.log(test);
|
// console.log(test);
|
||||||
return usePage().props.flash;
|
return usePage().props.flash;
|
||||||
});
|
});
|
||||||
|
|
||||||
// const errors: ComputedRef<any> = computed(() => {
|
const validStates = ['inprogress', 'rejected_editor'];
|
||||||
// return usePage().props.errors;
|
|
||||||
// });
|
|
||||||
|
|
||||||
// const form = useForm({
|
const getRowClass = (dataset) => {
|
||||||
// search: props.filters.search,
|
// (props.options ? 'select' : props.type)
|
||||||
// });
|
let rowclass = '';
|
||||||
|
if (dataset.server_state == 'inprogress') {
|
||||||
|
rowclass = 'inprogress';
|
||||||
|
} else if (dataset.server_state == 'released') {
|
||||||
|
rowclass = 'released';
|
||||||
|
} else if (dataset.server_state == 'editor_accepted' || dataset.server_state == 'ejected_reviewer') {
|
||||||
|
rowclass = 'editor_accepted';
|
||||||
|
} else if (dataset.server_state == 'approved') {
|
||||||
|
rowclass = 'approved';
|
||||||
|
} else if (dataset.server_state == 'eviewed') {
|
||||||
|
rowclass = 'eviewed';
|
||||||
|
} else if (dataset.server_state == 'ejected_editor') {
|
||||||
|
rowclass = 'ejected_editor';
|
||||||
|
} else {
|
||||||
|
rowclass = '';
|
||||||
|
}
|
||||||
|
return rowclass;
|
||||||
|
};
|
||||||
|
|
||||||
// const formDelete = useForm({});
|
|
||||||
|
|
||||||
// async function destroy(id) {
|
|
||||||
// const destroy = async (id) => {
|
|
||||||
// // if (confirm('Are you sure you want to delete?')) {
|
|
||||||
// // await formDelete.delete(stardust.route('dataset.destroy', [id]));
|
|
||||||
// // }
|
|
||||||
// };
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<LayoutAuthenticated>
|
<LayoutAuthenticated>
|
||||||
|
|
||||||
<Head title="Submit Dataset" />
|
<Head title="Dataset List" />
|
||||||
<SectionMain>
|
<SectionMain>
|
||||||
<!-- <FormValidationErrors v-bind:errors="errors" /> -->
|
<!-- <FormValidationErrors v-bind:errors="errors" /> -->
|
||||||
<NotificationBar v-if="flash.message" color="success" :icon="mdiAlertBoxOutline">
|
<NotificationBar v-if="flash.message" color="success" :icon="mdiAlertBoxOutline">
|
||||||
|
@ -77,7 +78,7 @@ const flash: ComputedRef<any> = computed(() => {
|
||||||
|
|
||||||
<!-- table -->
|
<!-- table -->
|
||||||
<CardBox class="mb-6" has-table>
|
<CardBox class="mb-6" has-table>
|
||||||
<table>
|
<table class="pure-table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>
|
<th>
|
||||||
|
@ -94,7 +95,7 @@ const flash: ComputedRef<any> = computed(() => {
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr v-for="dataset in props.datasets.data" :key="dataset.id">
|
<tr v-for="dataset in props.datasets.data" :key="dataset.id" :class="getRowClass(dataset)">
|
||||||
<td data-label="Login">
|
<td data-label="Login">
|
||||||
<!-- <Link v-bind:href="stardust.route('user.show', [user.id])"
|
<!-- <Link v-bind:href="stardust.route('user.show', [user.id])"
|
||||||
class="no-underline hover:underline text-cyan-600 dark:text-cyan-400">
|
class="no-underline hover:underline text-cyan-600 dark:text-cyan-400">
|
||||||
|
@ -108,19 +109,19 @@ const flash: ComputedRef<any> = computed(() => {
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td data-label="Created" class="lg:w-1 whitespace-nowrap">
|
<td data-label="Created" class="lg:w-1 whitespace-nowrap">
|
||||||
<small class="text-gray-500 dark:text-slate-400" :title="dataset.server_date_modified">{{
|
<small class="text-gray-500 dark:text-slate-400" :title="dataset.server_date_modified">
|
||||||
dataset.updated_at }}</small>
|
{{ dataset.server_date_modified }}
|
||||||
|
</small>
|
||||||
</td>
|
</td>
|
||||||
<td v-if="can.edit || can.delete" class="before:hidden lg:w-1 whitespace-nowrap">
|
<td class="before:hidden lg:w-1 whitespace-nowrap">
|
||||||
<BaseButtons type="justify-start lg:justify-end" no-wrap>
|
<BaseButtons v-if="validStates.includes(dataset.server_state)"
|
||||||
|
type="justify-start lg:justify-end" no-wrap>
|
||||||
<!-- release created dataset -->
|
<!-- release created dataset -->
|
||||||
<BaseButton v-if="can.edit"
|
<BaseButton v-if="can.edit"
|
||||||
:route-name="stardust.route('dataset.release', [dataset.id])" color="info"
|
:route-name="stardust.route('dataset.release', [dataset.id])" color="info"
|
||||||
:icon="mdiLockOpen" :label="'Release'" small />
|
:icon="mdiLockOpen" :label="'Release'" small />
|
||||||
<!-- && (dataset.server_state === 'inprogress' || dataset.server_state === 'rejected_editor')" -->
|
<BaseButton v-if="can.edit" :route-name="stardust.route('dataset.edit', [dataset.id])"
|
||||||
<BaseButton :route-name="stardust.route('dataset.edit', [dataset.id])"
|
|
||||||
color="info" :icon="mdiSquareEditOutline" :label="'Edit'" small />
|
color="info" :icon="mdiSquareEditOutline" :label="'Edit'" small />
|
||||||
<!-- @click="destroy(dataset.id)" -->
|
|
||||||
<BaseButton v-if="can.delete" color="danger"
|
<BaseButton v-if="can.delete" color="danger"
|
||||||
:route-name="stardust.route('dataset.delete', [dataset.id])" :icon="mdiTrashCan"
|
:route-name="stardust.route('dataset.delete', [dataset.id])" :icon="mdiTrashCan"
|
||||||
small />
|
small />
|
||||||
|
@ -149,3 +150,51 @@ const flash: ComputedRef<any> = computed(() => {
|
||||||
</SectionMain>
|
</SectionMain>
|
||||||
</LayoutAuthenticated>
|
</LayoutAuthenticated>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.pure-table tr.inprogress {
|
||||||
|
padding: 0.8em;
|
||||||
|
background-color: paleturquoise;
|
||||||
|
color: gray;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pure-table tr.released {
|
||||||
|
background-color: greenyellow;
|
||||||
|
color: gray;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pure-table tr.editor_accepted {
|
||||||
|
padding: 0.8em;
|
||||||
|
background-color: lightblue;
|
||||||
|
color: gray;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pure-table tr.rejected_reviewer {
|
||||||
|
padding: 0.8em;
|
||||||
|
background-color: orange;
|
||||||
|
color: gray;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pure-table tr.rejected_editor {
|
||||||
|
/* padding: 0.8em; */
|
||||||
|
background-color: orange;
|
||||||
|
color: gray;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pure-table tr.reviewed {
|
||||||
|
/* padding: 0.8em; */
|
||||||
|
background-color: yellow;
|
||||||
|
color: gray;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pure-table tr.approved {
|
||||||
|
/* padding: 0.8em; */
|
||||||
|
background-color: rgb(86, 86, 241);
|
||||||
|
color: whitesmoke;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.pure-table tr.reviewed {
|
||||||
|
/* padding: 0.8em; */
|
||||||
|
background-color: #ffed4a;
|
||||||
|
}</style>
|
||||||
|
|
|
@ -1,4 +1,13 @@
|
||||||
import { mdiMonitor, mdiGithub, mdiAccountEye, mdiAccountGroup, mdiDatabasePlus } from '@mdi/js';
|
import {
|
||||||
|
mdiMonitor,
|
||||||
|
mdiGithub,
|
||||||
|
mdiAccountEye,
|
||||||
|
mdiAccountGroup,
|
||||||
|
mdiAccountEdit,
|
||||||
|
mdiPublish,
|
||||||
|
mdiAccountArrowUp,
|
||||||
|
mdiFormatListNumbered,
|
||||||
|
} from '@mdi/js';
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
{
|
{
|
||||||
|
@ -36,23 +45,42 @@ export default [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// route: 'dataset.create',
|
// route: 'dataset.create',
|
||||||
icon: mdiDatabasePlus,
|
icon: mdiAccountArrowUp,
|
||||||
label: 'Submitter',
|
label: 'Submitter',
|
||||||
roles: ['submitter'],
|
roles: ['submitter'],
|
||||||
isOpen: false,
|
isOpen: false,
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
route: 'dataset.list',
|
route: 'dataset.list',
|
||||||
icon: mdiDatabasePlus,
|
icon: mdiFormatListNumbered,
|
||||||
label: 'All my datasets',
|
label: 'All my datasets',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
route: 'dataset.create',
|
route: 'dataset.create',
|
||||||
icon: mdiDatabasePlus,
|
icon: mdiPublish,
|
||||||
label: 'Create Dataset',
|
label: 'Create Dataset',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
// route: 'dataset.create',
|
||||||
|
icon: mdiAccountEdit,
|
||||||
|
label: 'Editor',
|
||||||
|
roles: ['editor'],
|
||||||
|
isOpen: false,
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
route: 'editor.dataset.list',
|
||||||
|
icon: mdiFormatListNumbered,
|
||||||
|
label: 'All my datasets',
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// route: 'dataset.create',
|
||||||
|
// icon: mdiPublish,
|
||||||
|
// label: 'Create Dataset',
|
||||||
|
// },
|
||||||
|
],
|
||||||
|
},
|
||||||
// {
|
// {
|
||||||
// route: 'dataset.create',
|
// route: 'dataset.create',
|
||||||
// icon: mdiDatabasePlus,
|
// icon: mdiDatabasePlus,
|
||||||
|
|
|
@ -94,7 +94,6 @@ Route.post('/app/login', 'Auth/AuthController.login').as('login.store');
|
||||||
// Route.post("/signup", "AuthController.signup");
|
// Route.post("/signup", "AuthController.signup");
|
||||||
Route.post('/signout', 'Auth/AuthController.logout').as('logout');
|
Route.post('/signout', 'Auth/AuthController.logout').as('logout');
|
||||||
|
|
||||||
|
|
||||||
// administrator
|
// administrator
|
||||||
Route.group(() => {
|
Route.group(() => {
|
||||||
Route.get('/settings', async ({ inertia }) => {
|
Route.get('/settings', async ({ inertia }) => {
|
||||||
|
@ -135,10 +134,6 @@ Route.group(() => {
|
||||||
// .middleware(['auth', 'can:dataset-list,dataset-publish']);
|
// .middleware(['auth', 'can:dataset-list,dataset-publish']);
|
||||||
.middleware(['auth', 'is:administrator,moderator']);
|
.middleware(['auth', 'is:administrator,moderator']);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Route.get('/edit-account-info', 'UsersController.accountInfo')
|
Route.get('/edit-account-info', 'UsersController.accountInfo')
|
||||||
.as('admin.account.info')
|
.as('admin.account.info')
|
||||||
.namespace('App/Controllers/Http/Admin')
|
.namespace('App/Controllers/Http/Admin')
|
||||||
|
@ -199,8 +194,17 @@ Route.group(() => {
|
||||||
// .middleware(['auth', 'can:dataset-list,dataset-publish']);
|
// .middleware(['auth', 'can:dataset-list,dataset-publish']);
|
||||||
// .middleware(['auth', 'is:submitter']);
|
// .middleware(['auth', 'is:submitter']);
|
||||||
|
|
||||||
|
// editor:
|
||||||
Route.group(() => {
|
Route.group(() => {
|
||||||
Route.put('/dataset/:id/update', 'DatasetsController.update').as('editor.dataset.update').middleware(['auth', 'can:dataset-editor-edit']);
|
Route.get('/dataset', 'DatasetController.index').as('editor.dataset.list').middleware(['auth', 'can:dataset-editor-list']);
|
||||||
|
Route.get('dataset/:id/receive', 'DatasetController.receive')
|
||||||
|
.as('editor.dataset.receive')
|
||||||
|
.where('id', Route.matchers.number())
|
||||||
|
.middleware(['auth', 'can:dataset-receive']);
|
||||||
|
|
||||||
|
Route.put('/dataset/:id/update', 'DatasetController.update')
|
||||||
|
.as('editor.dataset.update')
|
||||||
|
.middleware(['auth', 'can:dataset-editor-edit']);
|
||||||
})
|
})
|
||||||
.namespace('App/Controllers/Http/Editor')
|
.namespace('App/Controllers/Http/Editor')
|
||||||
.prefix('editor');
|
.prefix('editor');
|
||||||
|
|
Loading…
Reference in New Issue
Block a user