8. Minimum 4 char bei den Atributen Titel und zusätzliche Titel (server und clientseitig)

8.1. Minimum 4 Charactaer bei den Atributen Description und zusätzliche Beschreibungen (server und clientseitig)
9. einheitliches Löschsymbol bei (zusätliche Titel, zusätzliche Beschreibungen, Keywords, Files und Datas References
16. Reject note vom Editor und Reviewer maximal 500 Zeichen (client- und serverseitig)
 - Datenbankänderungen auch vorgenommen
18. Edit Button am Ende nachdem ein Datesatz angelegt wurde
23. Vue Component "PersonTable" auf TypeScript umgeschrieben
This commit is contained in:
Arno Kaimbacher 2019-11-25 14:41:25 +01:00
parent 4b8f2a63d8
commit faa68cc223
12 changed files with 160 additions and 136 deletions

View File

@ -331,7 +331,7 @@ class EditorController extends Controller
public function rejectUpdate(Request $request, $id)
{
$this->validate(request(), [
'reject_editor_note' => 'required|min:10|max:255',
'reject_editor_note' => 'required|min:10|max:500',
'server_state' => 'required'
]);
$dataset = Dataset::findOrFail($id);

View File

@ -491,7 +491,7 @@ class IndexController extends Controller
return response()->json(array(
'success' => true,
//'redirect' => route('settings.document.edit', ['id' => $dataset->server_state]),
'edit' => route('publish.workflow.submit.edit', ['id' => $dataset->id]),
'release' => route('publish.workflow.submit.release', ['id' => $dataset->id]),
'delete' => route('publish.workflow.submit.delete', ['id' => $dataset->id]),
));

View File

@ -145,7 +145,7 @@ class ReviewController extends Controller
public function rejectUpdate(Request $request, $id)
{
$this->validate(request(), [
'reject_reviewer_note' => 'required|min:10|max:255',
'reject_reviewer_note' => 'required|min:10|max:500',
'server_state' => 'required'
]);
$dataset = Dataset::findOrFail($id);

View File

@ -40,8 +40,8 @@ class CreateDocumentsTable extends Migration
$table->integer('reviewer_id')->unsigned()->nullable();
$table->string('preferred_reviewer', 25)->nullable();
$table->string('preferred_reviewer_email', 50)->nullable();
$table->string('reject_editor_note', 255)->nullable();
$table->string('reject_reviewer_note', 255)->nullable();
$table->string('reject_editor_note', 500)->nullable();
$table->string('reject_reviewer_note', 500)->nullable();
$table->boolean('reviewer_note_visible')->default(false);
});
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -12,7 +12,12 @@
<th></th>
</tr>
</thead>
<draggable v-bind:list="personlist" tag="tbody" v-on:start="isDragging=true" v-on:end="isDragging=false">
<draggable
v-bind:list="personlist"
tag="tbody"
v-on:start="isDragging=true"
v-on:end="isDragging=false"
>
<tr
v-for="(item, index) in personlist"
v-bind:key="item.id"
@ -63,7 +68,12 @@
/>
</td>
<td>
<button class="pure-button button-small is-warning" @click.prevent="removeAuthor(index)"> <i class="fa fa-trash"></i> </button>
<button
class="pure-button button-small is-warning"
@click.prevent="removeAuthor(index)"
>
<i class="fa fa-trash"></i>
</button>
</td>
</tr>
</draggable>
@ -71,55 +81,59 @@
</div>
</template>
<script>
<script lang="ts">
import draggable from "vuedraggable";
export default {
inject: {
$validator: "$validator"
},
name: "person-table",
components: {
draggable
},
data() {
return {
// list: [
// { id: 1, name: "Abby", sport: "basket" },
// { id: 2, name: "Brooke", sport: "foot" },
// { id: 3, name: "Courtenay", sport: "volley" },
// { id: 4, name: "David", sport: "rugby" }
// ],
editable: true,
isDragging: false,
delayedDragging: false
};
},
props: {
personlist: {
type: Array,
required: true
},
rowIndex: {
type: Number
},
heading: String
},
methods: {
import { Component, Inject, Vue, Prop, Watch } from "vue-property-decorator";
@Component({
components: { draggable }
})
export default class PersonTable extends Vue {
@Inject("$validator") readonly $validator!: string;
// inject: {
// $validator: "$validator"
// },
name: "person-table";
// components: {
// draggable
// },
editable = true;
isDragging = false;
delayedDragging = false;
@Prop({ default: true, type: Array })
personlist;
@Prop(Number)
rowIndex;
@Prop(String)
heading;
// props: {
// personlist: {
// type: Array,
// required: true
// },
// rowIndex: {
// type: Number
// },
// heading: String
// },
itemAction(action, data, index) {
console.log("custom-actions: " + action, data.full_name, index);
},
}
removeAuthor(key) {
this.personlist.splice(key, 1);
},
}
onMove({ relatedContext, draggedContext }) {
const relatedElement = relatedContext.element;
const draggedElement = draggedContext.element;
return (
(!relatedElement || !relatedElement.fixed) && !draggedElement.fixed
);
return (!relatedElement || !relatedElement.fixed) && !draggedElement.fixed;
}
}
};
}
</script>
<style>

View File

@ -85,6 +85,7 @@ const app = new Vue({
currentStatus: null,
uploadFieldName: 'photos',
fileCount: 0,
editLink: null,
releaseLink: null,
deleteLink: null,
@ -185,6 +186,9 @@ const app = new Vue({
// this.dataset.reset();//reset methods will trigger property changed.
// this.step = 1;
},
editNewDataset() {
window.location = this.editLink;
},
releaseNewDataset() {
window.location = this.releaseLink;
},
@ -316,6 +320,7 @@ const app = new Vue({
let keyword = this.dataset.keywords[i];
formData.append('keywords[' + i + '][value]', keyword.value);
formData.append('keywords[' + i + '][type]', keyword.type);
formData.append('keywords[' + i + '][language]', keyword.language);
}
for (var i = 0; i < this.dataset.titles.length; i++) {
@ -350,6 +355,7 @@ const app = new Vue({
// this.items = response.data;
//Vue.set(app.skills, 1, "test55");
_this.currentStatus = STATUS_SUCCESS;
_this.editLink = response.data.edit;
_this.releaseLink = response.data.release;
_this.deleteLink = response.data.delete;
if (response.data.redirect) {

View File

@ -83,7 +83,7 @@
<div class="pure-u-1 pure-u-md-1-2 pure-div">
{!! Form::label('TitleMain', 'Main Title ') !!}
{!! Form::text('TitleMain[Value]', null, ['class' => 'pure-u-23-24', 'v-model'
=> 'dataset.title_main.value', "v-validate" => "'required|min:3'", "data-vv-as" => "Main Title", 'data-vv-scope' => 'step-1']) !!}
=> 'dataset.title_main.value', "v-validate" => "'required|min:4'", "data-vv-as" => "Main Title", 'data-vv-scope' => 'step-1']) !!}
</div>
<div class="pure-u-1 pure-u-md-1-2 pure-div">
{!! Form::label('TitleLanguage', 'Title Language..') !!}
@ -110,7 +110,7 @@
<tbody>
<tr v-for="(item, index) in dataset.titles">
<td>
<input name="Title" class="form-control" placeholder="[TITLE]" v-model="item.value" v-validate="'required'" data-vv-scope="step-1" />
<input name="Title" class="form-control" placeholder="[TITLE]" v-model="item.value" data-vv-as="Additional Title" v-validate="'required|min:4'" data-vv-scope="step-1" />
</td>
<td>
{!! Form::select('Title[Type]', $titleTypes, null,
@ -118,12 +118,12 @@
</td>
<td>
{!! Form::select('Title[Language]', $languages, null,
['placeholder' => '[language]', 'v-model' => 'item.language', "data-vv-as" => "title",
['placeholder' => '[language]', 'v-model' => 'item.language', "data-vv-as" => "Additional Title Language",
"v-validate" => "{required: true, translatedLanguage: [dataset.language, item.type]}",
'data-vv-scope' => 'step-1']) !!}
</td>
<td>
<button class="pure-button button-small is-warning" @click.prevent="removeTitle(index)">-</button>
<button class="pure-button button-small is-warning" @click.prevent="removeTitle(index)"> <i class="fa fa-trash"></i> </button>
</td>
</tr>
</tbody>
@ -136,7 +136,7 @@
<div class="pure-u-1 pure-u-md-1-2 pure-div">
{!! Form::label('TitleAbstract', 'Main Abstract ') !!}
{{ Form::textarea('TitleAbstract[Value]', null, ['class' => 'pure-u-23-24',
'size' => '70x6', 'v-model' => 'dataset.abstract_main.value', "v-validate" => "'required|min:3'",
'size' => '70x6', 'v-model' => 'dataset.abstract_main.value', "v-validate" => "'required|min:4'",
"data-vv-as" => "Main Abstract", 'data-vv-scope' => 'step-1']) }}
</div>
<div class="pure-u-1 pure-u-md-1-2 pure-div">
@ -164,7 +164,7 @@
<tbody>
<tr v-for="(item, index) in dataset.descriptions">
<td>
<textarea rows="3" cols="40" name="Description[Value]" class="form-control" placeholder="[DESCRIPTION]" v-model="item.value" v-validate="'required'" data-vv-scope="step-1"></textarea>
<textarea rows="3" cols="40" name="Description[Value]" class="form-control" placeholder="[DESCRIPTION]" v-model="item.value" data-vv-as="Additional Description" v-validate="'required|min:4'" data-vv-scope="step-1"></textarea>
</td>
<td>
{!! Form::select('Description[Type]', $descriptionTypes, null,
@ -174,12 +174,12 @@
{!! Form::select('Description[Language]', $languages, null,
['placeholder' => '[language]',
'v-model' => 'item.language',
"data-vv-as" => "description",
"data-vv-as" => "Additional Description Language",
"v-validate" => "{required: true, translatedLanguage: [dataset.language, item.type]}",
'data-vv-scope' => 'step-1']) !!}
</td>
<td>
<button class="pure-button button-small is-warning" @click.prevent="removeDescription(index)">-</button>
<button class="pure-button button-small is-warning" @click.prevent="removeDescription(index)"> <i class="fa fa-trash"></i> </button>
</td>
</tr>
</tbody>
@ -502,7 +502,7 @@
<input name="Reference Label" class="form-control" v-model="item.label" v-validate="'required'" data-vv-scope="step-2" />
</td>
<td>
<button class="pure-button button-small is-warning" @click.prevent="removeReference(index)">Remove</button>
<button class="pure-button button-small is-warning" @click.prevent="removeReference(index)"> <i class="fa fa-trash"></i> </button>
</td>
</tr>
</tbody>
@ -540,7 +540,7 @@
data-vv-scope="step-2" />
</td>
<td>
<button class="pure-button button-small is-warning" @click.prevent="removeKeyword(index)">Remove</button>
<button class="pure-button button-small is-warning" @click.prevent="removeKeyword(index)"> <i class="fa fa-trash"></i> </button>
</td>
</tr>
</tbody>
@ -653,7 +653,7 @@
<input class="form-control" v-model="item.label" />
</td>
<td>
<button class="pure-button button-small is-warning" @click.prevent="removeFile(index)">Remove</button>
<button class="pure-button button-small is-warning" @click.prevent="removeFile(index)"> <i class="fa fa-trash"></i> </button>
</td>
</tr>
</tbody>
@ -681,6 +681,10 @@
</p> --}}
<p>
{{-- <a href="javascript:void(0)" @click="editNewDataset()" class="pure-button button-small">@{{ redirectLink }}</a> --}}
<a href="javascript:void(0)" @click="editNewDataset()" class="pure-button button-small">
<i class="fa fa-edit"></i>
<span>Edit</span>
</a>
<a href="javascript:void(0)" @click="releaseNewDataset()" class="pure-button button-small">
<i class="fa fa-share"></i>
<span>Release</span>

View File

@ -43,7 +43,7 @@
{!! Form::label('reject_editor_note', 'reject note:') !!}
{!! Form::textarea('reject_editor_note',null, ['id' => 'reject_editor_note', 'class'=>'pure-u-23-24',
'placeholder' => '-- reject note for submitter --', 'size' => '70x6',
'v-model' => 'dataset.reject_editor_note', "v-validate" => "'required|min:10|max:255'"]) !!}
'v-model' => 'dataset.reject_editor_note', "v-validate" => "'required|min:10|max:500'"]) !!}
<em>*</em>
<span class="help is-danger" v-if="errors.has('reject_editor_note')" v-text="errors.first('reject_editor_note')"></span>
</div>

View File

@ -44,7 +44,7 @@
{!! Form::label('reject_reviewer_note', 'reject note:') !!}
{!! Form::textarea('reject_reviewer_note',null, ['id' => 'reject_reviewer_note', 'class'=>'pure-u-23-24',
'placeholder' => '-- reject note for editor --', 'size' => '70x6',
'v-model' => 'dataset.reject_reviewer_note', "v-validate" => "'required|min:10|max:255'"]) !!}
'v-model' => 'dataset.reject_reviewer_note', "v-validate" => "'required|min:10|max:500'"]) !!}
<em>*</em>
<span class="help is-danger" v-if="errors.has('reject_reviewer_note')" v-text="errors.first('reject_reviewer_note')"></span>