- add name_type 'Personal' and 'Organizational' for persons table (change also user interfaces therefore)
- don't use node-sass anymore npm updates - composer updates - laravel-mix now produces licence files for compiled javascripts
This commit is contained in:
parent
c649af199c
commit
5bbb3c5876
56 changed files with 17143 additions and 4395 deletions
|
@ -114,6 +114,7 @@ export default class EditDataset extends Vue {
|
|||
this.titleTypes = window.Laravel.titleTypes;
|
||||
this.descriptionTypes = window.Laravel.descriptionTypes;
|
||||
this.contributorTypes = window.Laravel.contributorTypes;
|
||||
this.nameTypes = window.Laravel.nameTypes;
|
||||
this.languages = window.Laravel.languages;
|
||||
this.messages = window.Laravel.messages;
|
||||
this.projects = window.Laravel.projects;
|
||||
|
|
|
@ -6,6 +6,7 @@ import { Component, Inject, Vue, Prop, Watch } from "vue-property-decorator";
|
|||
import VueToast from "vue-toast-notification";
|
||||
// import "vue-toast-notification/dist/index.css";
|
||||
import 'vue-toast-notification/dist/theme-default.css';
|
||||
import { ToastOptions } from "vue-toast-notification";
|
||||
Vue.use(VueToast);
|
||||
|
||||
// import ToastedPlugin from 'vue-toasted';
|
||||
|
@ -21,10 +22,11 @@ export default class LocationsMap extends Vue {
|
|||
map = null;
|
||||
drawnItems = null;
|
||||
locationErrors: Array<any> = [];
|
||||
options = {
|
||||
theme: "bubble",
|
||||
options: ToastOptions = {
|
||||
// theme: "bubble",
|
||||
position: "top-right",
|
||||
duration: 3000
|
||||
duration: 3000,
|
||||
message: ""
|
||||
};
|
||||
|
||||
created() {
|
||||
|
@ -52,10 +54,12 @@ export default class LocationsMap extends Vue {
|
|||
|
||||
_this.drawnItems.addLayer(boundingBox);
|
||||
_this.map.fitBounds(bounds);
|
||||
this.options.message = "valid bounding box";
|
||||
this.$toast.success("valid bounding box", this.options);
|
||||
} catch (e) {
|
||||
this.options.message = e.message;
|
||||
// _this.errors.push(e);
|
||||
this.$toast.error(e, this.options);
|
||||
this.$toast.error(e.message, this.options);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -16,6 +16,9 @@
|
|||
class="far fa-lg fa-question-circle"></i>
|
||||
</span>
|
||||
</label>
|
||||
</th>
|
||||
<th scope="col" v-if="Object.keys(nametypes).length">
|
||||
<span>Name Type</span>
|
||||
</th>
|
||||
<th scope="col" v-if="Object.keys(contributortypes).length">
|
||||
<span>Type</span>
|
||||
|
@ -52,6 +55,16 @@
|
|||
placeholder="[ORCID]" v-model="item.identifier_orcid" v-bind:readonly="item.status==1"
|
||||
data-vv-scope="step-1" />
|
||||
</td>
|
||||
<td v-if="Object.keys(nametypes).length">
|
||||
<input v-if="item.status==1" readonly v-bind:name="heading+'['+index+'][name_type]'" class="form-control"
|
||||
placeholder="[NAME_TYPE]" v-model="item.name_type" data-vv-scope="step-1" />
|
||||
<select v-else type="text" v-bind:name="heading+'['+index+'][name_type]'" v-validate="{required: true}"
|
||||
data-vv-scope="step-1" v-model="item.name_type">
|
||||
<option v-for="(option, i) in nametypes" :value="option" :key="i">
|
||||
{{ option }}
|
||||
</option>
|
||||
</select>
|
||||
</td>
|
||||
<td v-if="Object.keys(contributortypes).length">
|
||||
<select type="text" v-bind:name="heading+'['+index+'][pivot][contributor_type]'" v-validate="{required: true}"
|
||||
data-vv-scope="step-1" v-model="item.pivot.contributor_type">
|
||||
|
@ -97,6 +110,8 @@
|
|||
|
||||
@Prop({ required: true, type: Array })
|
||||
personlist;
|
||||
@Prop({ default: {}, type: Object })
|
||||
nametypes;
|
||||
@Prop({ default: {}, type: Object })
|
||||
contributortypes;
|
||||
@Prop(Number)
|
||||
|
|
|
@ -93,6 +93,7 @@ const app = new Vue({
|
|||
editLink: null,
|
||||
releaseLink: null,
|
||||
deleteLink: null,
|
||||
nameTypes : [],
|
||||
contributorTypes : [],
|
||||
|
||||
isModalVisible: false,
|
||||
|
@ -154,7 +155,8 @@ const app = new Vue({
|
|||
this.reset();
|
||||
},
|
||||
beforeMount() {
|
||||
this.messages = window.Laravel.messages;
|
||||
this.messages = window.Laravel.messages;
|
||||
this.nameTypes = window.Laravel.nameTypes;
|
||||
this.contributorTypes = window.Laravel.contributorTypes;
|
||||
},
|
||||
computed: {
|
||||
|
@ -318,6 +320,7 @@ const app = new Vue({
|
|||
formData.append('authors[' + i + '][email]', person.email);
|
||||
formData.append('authors[' + i + '][identifier_orcid]', person.identifier_orcid);
|
||||
formData.append('authors[' + i + '][status]', person.status);
|
||||
formData.append('authors[' + i + '][name_type]', person.name_type);
|
||||
if (person.id !== undefined) {
|
||||
formData.append('authors[' + i + '][id]', person.id);
|
||||
}
|
||||
|
@ -334,6 +337,7 @@ const app = new Vue({
|
|||
formData.append('contributors[' + i + '][identifier_orcid]', contributor.identifier_orcid);
|
||||
formData.append('contributors[' + i + '][status]', contributor.status);
|
||||
formData.append('contributors[' + i + '][pivot][contributor_type]', contributor.pivot.contributor_type);
|
||||
formData.append('contributors[' + i + '][name_type]', contributor.name_type);
|
||||
if (contributor.id !== undefined) {
|
||||
formData.append('contributors[' + i + '][id]', contributor.id);
|
||||
}
|
||||
|
@ -517,7 +521,7 @@ const app = new Vue({
|
|||
|
||||
},
|
||||
addNewAuthor() {
|
||||
let newAuthor = { status: 0, first_name: '', last_name: '', email: '', academic_title: '', identifier_orcid: '' };
|
||||
let newAuthor = { status: 0, first_name: '', last_name: '', email: '', academic_title: '', identifier_orcid: '', name_type: 'Personal' };
|
||||
this.dataset.persons.push(newAuthor);
|
||||
},
|
||||
removeAuthor(key) {
|
||||
|
@ -531,6 +535,7 @@ const app = new Vue({
|
|||
} else if (this.dataset.contributors.filter(e => e.id === person.id).length > 0) {
|
||||
this.$toast.error("person is already defined as contributor");
|
||||
} else {
|
||||
// person.pivot = { name_type: '' };
|
||||
//person.sort_order = this.dataset.persons.length;
|
||||
this.dataset.persons.push(person);
|
||||
this.dataset.checkedAuthors.push(person.id);
|
||||
|
@ -538,7 +543,7 @@ const app = new Vue({
|
|||
}
|
||||
},
|
||||
addNewContributor() {
|
||||
let newContributor = { status: 0, first_name: '', last_name: '', email: '', academic_title: '', identifier_orcid: '', pivot: { contributor_type: ''} };
|
||||
let newContributor = { status: 0, first_name: '', last_name: '', email: '', academic_title: '', identifier_orcid: '', name_type: 'Personal', pivot: { contributor_type: ''} };
|
||||
this.dataset.contributors.push(newContributor);
|
||||
},
|
||||
onAddContributor(person) {
|
||||
|
@ -550,6 +555,7 @@ const app = new Vue({
|
|||
this.$toast.error("person is already defined as author");
|
||||
} else {
|
||||
person.pivot = { contributor_type: '' };
|
||||
// person.pivot = { name_type: '', contributor_type: '' };
|
||||
this.dataset.contributors.push(person);
|
||||
this.dataset.checkedContributors.push(person.id);
|
||||
this.$toast.success("person has been successfully added as contributor");
|
||||
|
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue