- improved vies and controllers for rejecting datasets with email for reviewer and editor role
Some checks failed
CI Pipeline / japa-tests (push) Failing after 1m8s
Some checks failed
CI Pipeline / japa-tests (push) Failing after 1m8s
- falsh also error via config/inertia.ts - npm updates
This commit is contained in:
parent
b06ccae603
commit
2235f3905a
12 changed files with 627 additions and 370 deletions
|
@ -94,15 +94,19 @@ const formatServerState = (state: string) => {
|
|||
<template>
|
||||
<LayoutAuthenticated>
|
||||
|
||||
<Head title="Dataset List" />
|
||||
<Head title="Editor Datasets" />
|
||||
<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>
|
||||
<NotificationBar v-if="flash.error" color="danger" :icon="mdiAlertBoxOutline">
|
||||
{{ flash.error }}
|
||||
</NotificationBar>
|
||||
|
||||
<!-- table -->
|
||||
<CardBox class="mb-6" has-table>
|
||||
|
|
|
@ -22,8 +22,12 @@ const props = defineProps({
|
|||
|
||||
// Define the computed property for the label
|
||||
const computedLabel = computed(() => {
|
||||
return `Reject to ${props.dataset.user?.login || 'Unknown User'}`;
|
||||
return `Reject to submitter: ${props.dataset.user?.login || 'Unknown User'}`;
|
||||
});
|
||||
const computedEmailLabel = computed(() => {
|
||||
return props.dataset.user?.email || '';
|
||||
});
|
||||
|
||||
|
||||
const flash: Ref<any> = computed(() => {
|
||||
return usePage().props.flash;
|
||||
|
@ -35,6 +39,7 @@ const errors: Ref<any> = computed(() => {
|
|||
const form = useForm({
|
||||
server_state: 'rejected_editor',
|
||||
reject_editor_note: '',
|
||||
send_email: false,
|
||||
});
|
||||
|
||||
const handleSubmit = async (e: SubmitEvent) => {
|
||||
|
@ -75,6 +80,24 @@ const handleSubmit = async (e: SubmitEvent) => {
|
|||
</FormControl>
|
||||
</FormField>
|
||||
|
||||
<!-- <FormControl
|
||||
type="checkbox"
|
||||
v-model="form.send_email"
|
||||
:error="form.errors.send_email">
|
||||
</FormControl> -->
|
||||
|
||||
<FormField label="Email Notification">
|
||||
<label for="send_email" class="flex items-center mr-6 mb-3">
|
||||
<input type="checkbox" id="send_email" v-model="form.send_email" class="mr-2" />
|
||||
<span class="check"></span>
|
||||
<a class="pl-2 " target="_blank">send email to
|
||||
<span class="text-blue-600 hover:underline">
|
||||
{{ computedEmailLabel }}
|
||||
</span>
|
||||
</a>
|
||||
</label>
|
||||
</FormField>
|
||||
|
||||
|
||||
<!-- <NotificationBar v-if="flash && flash.message" color="warning" :icon="mdiAlertBoxOutline">
|
||||
{{ flash.message }}
|
||||
|
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue