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) public function rejectUpdate(Request $request, $id)
{ {
$this->validate(request(), [ $this->validate(request(), [
'reject_editor_note' => 'required|min:10|max:255', 'reject_editor_note' => 'required|min:10|max:500',
'server_state' => 'required' 'server_state' => 'required'
]); ]);
$dataset = Dataset::findOrFail($id); $dataset = Dataset::findOrFail($id);

View File

@ -491,7 +491,7 @@ class IndexController extends Controller
return response()->json(array( return response()->json(array(
'success' => true, '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]), 'release' => route('publish.workflow.submit.release', ['id' => $dataset->id]),
'delete' => route('publish.workflow.submit.delete', ['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) public function rejectUpdate(Request $request, $id)
{ {
$this->validate(request(), [ $this->validate(request(), [
'reject_reviewer_note' => 'required|min:10|max:255', 'reject_reviewer_note' => 'required|min:10|max:500',
'server_state' => 'required' 'server_state' => 'required'
]); ]);
$dataset = Dataset::findOrFail($id); $dataset = Dataset::findOrFail($id);

View File

@ -40,8 +40,8 @@ class CreateDocumentsTable extends Migration
$table->integer('reviewer_id')->unsigned()->nullable(); $table->integer('reviewer_id')->unsigned()->nullable();
$table->string('preferred_reviewer', 25)->nullable(); $table->string('preferred_reviewer', 25)->nullable();
$table->string('preferred_reviewer_email', 50)->nullable(); $table->string('preferred_reviewer_email', 50)->nullable();
$table->string('reject_editor_note', 255)->nullable(); $table->string('reject_editor_note', 500)->nullable();
$table->string('reject_reviewer_note', 255)->nullable(); $table->string('reject_reviewer_note', 500)->nullable();
$table->boolean('reviewer_note_visible')->default(false); $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> <th></th>
</tr> </tr>
</thead> </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 <tr
v-for="(item, index) in personlist" v-for="(item, index) in personlist"
v-bind:key="item.id" v-bind:key="item.id"
@ -63,7 +68,12 @@
/> />
</td> </td>
<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> </td>
</tr> </tr>
</draggable> </draggable>
@ -71,55 +81,59 @@
</div> </div>
</template> </template>
<script> <script lang="ts">
import draggable from "vuedraggable"; import draggable from "vuedraggable";
export default { import { Component, Inject, Vue, Prop, Watch } from "vue-property-decorator";
inject: {
$validator: "$validator" @Component({
}, components: { draggable }
name: "person-table", })
components: { export default class PersonTable extends Vue {
draggable @Inject("$validator") readonly $validator!: string;
}, // inject: {
data() { // $validator: "$validator"
return { // },
// list: [ name: "person-table";
// { id: 1, name: "Abby", sport: "basket" }, // components: {
// { id: 2, name: "Brooke", sport: "foot" }, // draggable
// { id: 3, name: "Courtenay", sport: "volley" }, // },
// { id: 4, name: "David", sport: "rugby" }
// ], editable = true;
editable: true, isDragging = false;
isDragging: false, delayedDragging = false;
delayedDragging: false
}; @Prop({ default: true, type: Array })
}, personlist;
props: { @Prop(Number)
personlist: { rowIndex;
type: Array, @Prop(String)
required: true heading;
},
rowIndex: { // props: {
type: Number // personlist: {
}, // type: Array,
heading: String // required: true
}, // },
methods: { // rowIndex: {
// type: Number
// },
// heading: String
// },
itemAction(action, data, index) { itemAction(action, data, index) {
console.log("custom-actions: " + action, data.full_name, index); console.log("custom-actions: " + action, data.full_name, index);
}, }
removeAuthor(key) { removeAuthor(key) {
this.personlist.splice(key, 1); this.personlist.splice(key, 1);
}, }
onMove({ relatedContext, draggedContext }) { onMove({ relatedContext, draggedContext }) {
const relatedElement = relatedContext.element; const relatedElement = relatedContext.element;
const draggedElement = draggedContext.element; const draggedElement = draggedContext.element;
return ( return (!relatedElement || !relatedElement.fixed) && !draggedElement.fixed;
(!relatedElement || !relatedElement.fixed) && !draggedElement.fixed
);
} }
} }
};
</script> </script>
<style> <style>

View File

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

View File

@ -83,7 +83,7 @@
<div class="pure-u-1 pure-u-md-1-2 pure-div"> <div class="pure-u-1 pure-u-md-1-2 pure-div">
{!! Form::label('TitleMain', 'Main Title ') !!} {!! Form::label('TitleMain', 'Main Title ') !!}
{!! Form::text('TitleMain[Value]', null, ['class' => 'pure-u-23-24', 'v-model' {!! 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>
<div class="pure-u-1 pure-u-md-1-2 pure-div"> <div class="pure-u-1 pure-u-md-1-2 pure-div">
{!! Form::label('TitleLanguage', 'Title Language..') !!} {!! Form::label('TitleLanguage', 'Title Language..') !!}
@ -110,7 +110,7 @@
<tbody> <tbody>
<tr v-for="(item, index) in dataset.titles"> <tr v-for="(item, index) in dataset.titles">
<td> <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>
<td> <td>
{!! Form::select('Title[Type]', $titleTypes, null, {!! Form::select('Title[Type]', $titleTypes, null,
@ -118,12 +118,12 @@
</td> </td>
<td> <td>
{!! Form::select('Title[Language]', $languages, null, {!! 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]}", "v-validate" => "{required: true, translatedLanguage: [dataset.language, item.type]}",
'data-vv-scope' => 'step-1']) !!} 'data-vv-scope' => 'step-1']) !!}
</td> </td>
<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> </td>
</tr> </tr>
</tbody> </tbody>
@ -136,7 +136,7 @@
<div class="pure-u-1 pure-u-md-1-2 pure-div"> <div class="pure-u-1 pure-u-md-1-2 pure-div">
{!! Form::label('TitleAbstract', 'Main Abstract ') !!} {!! Form::label('TitleAbstract', 'Main Abstract ') !!}
{{ Form::textarea('TitleAbstract[Value]', null, ['class' => 'pure-u-23-24', {{ 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']) }} "data-vv-as" => "Main Abstract", 'data-vv-scope' => 'step-1']) }}
</div> </div>
<div class="pure-u-1 pure-u-md-1-2 pure-div"> <div class="pure-u-1 pure-u-md-1-2 pure-div">
@ -164,7 +164,7 @@
<tbody> <tbody>
<tr v-for="(item, index) in dataset.descriptions"> <tr v-for="(item, index) in dataset.descriptions">
<td> <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>
<td> <td>
{!! Form::select('Description[Type]', $descriptionTypes, null, {!! Form::select('Description[Type]', $descriptionTypes, null,
@ -174,12 +174,12 @@
{!! Form::select('Description[Language]', $languages, null, {!! Form::select('Description[Language]', $languages, null,
['placeholder' => '[language]', ['placeholder' => '[language]',
'v-model' => 'item.language', 'v-model' => 'item.language',
"data-vv-as" => "description", "data-vv-as" => "Additional Description Language",
"v-validate" => "{required: true, translatedLanguage: [dataset.language, item.type]}", "v-validate" => "{required: true, translatedLanguage: [dataset.language, item.type]}",
'data-vv-scope' => 'step-1']) !!} 'data-vv-scope' => 'step-1']) !!}
</td> </td>
<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> </td>
</tr> </tr>
</tbody> </tbody>
@ -502,7 +502,7 @@
<input name="Reference Label" class="form-control" v-model="item.label" v-validate="'required'" data-vv-scope="step-2" /> <input name="Reference Label" class="form-control" v-model="item.label" v-validate="'required'" data-vv-scope="step-2" />
</td> </td>
<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> </td>
</tr> </tr>
</tbody> </tbody>
@ -540,7 +540,7 @@
data-vv-scope="step-2" /> data-vv-scope="step-2" />
</td> </td>
<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> </td>
</tr> </tr>
</tbody> </tbody>
@ -653,7 +653,7 @@
<input class="form-control" v-model="item.label" /> <input class="form-control" v-model="item.label" />
</td> </td>
<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> </td>
</tr> </tr>
</tbody> </tbody>
@ -681,6 +681,10 @@
</p> --}} </p> --}}
<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">@{{ 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"> <a href="javascript:void(0)" @click="releaseNewDataset()" class="pure-button button-small">
<i class="fa fa-share"></i> <i class="fa fa-share"></i>
<span>Release</span> <span>Release</span>

View File

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

View File

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