Merge branch 'develop' into feature/unit-conversion

# Conflicts:
#	vue/src/components/Modals/GenericModalForm.vue
This commit is contained in:
vabene1111
2023-05-24 08:53:49 +02:00
11 changed files with 177 additions and 12 deletions

View File

@ -109,6 +109,10 @@ export default {
mounted() {
this.id = Math.random()
this.$root.$on("change", this.storeValue) // bootstrap modal placed at document so have to listen at root of component
if (this.models !== null){
this.Models = this.models // override models definition file with prop
}
},
computed: {
advancedForm() {
@ -179,6 +183,7 @@ export default {
if (this.dirty) {
this.dirty = false
this.$emit("finish-action", "cancel")
this.$emit("hidden")
}
},
storeValue: function (field, value) {

View File

View File

@ -50,7 +50,7 @@ export class StandardToasts {
static FAIL_MOVE = "FAIL_MOVE"
static FAIL_MERGE = "FAIL_MERGE"
static makeStandardToast(context, toast, err) {
static makeStandardToast(context, toast, err = undefined, always_show_errors = false) {
let title = ''
let msg = ''
let variant = ''
@ -124,7 +124,7 @@ export class StandardToasts {
}
let DEBUG = localStorage.getItem("DEBUG") === "True" || false
let DEBUG = localStorage.getItem("DEBUG") === "True" || always_show_errors
if (err !== undefined && 'response' in err && 'headers' in err.response) {
if (DEBUG && err.response.headers['content-type'] === 'application/json' && err.response.status < 500) {
@ -311,7 +311,7 @@ export function calculateHourMinuteSplit(amount) {
let minutes = amount - hours * 60
let output_text = hours + " h"
if (minutes > 0){
if (minutes > 0) {
output_text += " " + minutes + " min"
}
@ -368,6 +368,9 @@ export const ApiMixin = {
let func = setup.function
let parameters = buildParams(options, setup)
let apiClient = new ApiApiFactory()
if (model.apiClient !== undefined) {
apiClient = model.apiClient
}
return apiClient[func](...parameters)
},
genericGetAPI: function (url, options) {