diff --git a/public/css/custom.css b/public/css/custom.css index dcd01d726..ccac9da24 100644 --- a/public/css/custom.css +++ b/public/css/custom.css @@ -1740,12 +1740,22 @@ table .align-items-center td span.badge { .input-number-disabled::-webkit-inner-spin-button, .input-number-disabled::-webkit-outer-spin-button { - -webkit-appearance: none; - margin: 0; + -webkit-appearance: none; + margin: 0; } .input-number-disabled { -moz-appearance: textfield; } -/* Disable default html styling for input[type="number] Finish */ \ No newline at end of file +/* Disable default html styling for input[type="number] Finish */ + +.remove-arrow-select .el-input__inner { + -webkit-appearance: none; + -moz-appearance: none; + cursor: auto !important; +} + +.remove-arrow-select .el-select__caret { + display: none; +} diff --git a/resources/assets/js/mixins/global.js b/resources/assets/js/mixins/global.js index b5260dc77..4bfc17773 100644 --- a/resources/assets/js/mixins/global.js +++ b/resources/assets/js/mixins/global.js @@ -364,6 +364,33 @@ export default { }); }, + onDynamicFormParams(path, params) { + let data = {}; + + for (const [key, value] of Object.entries(params)) { + data[key] = eval(value); + } + + axios.get(path, { + params: data + }).then(response => { + if (response.data.data) { + let rows = response.data.data; + + if (!Array.isArray(rows)) { + for (const [key, value] of Object.entries(rows)) { + this.form[key] = value; + } + } else { + rows.forEach(function (key, index) { + this.form[index] = key; + }, this); + } + } + }).catch(error => { + }); + }, + // Delete attachment file onDeleteFile(file_id, url, title, message, button_cancel, button_delete) { let file_data = { @@ -450,6 +477,6 @@ export default { let currency_code = (contact.currency_code) ? contact.currency_code : this.form.currency_code; this.onChangeCurrency(currency_code); - } + }, } }