Bug 38201: (follow-up) Fix JS warning for deliverytime on the Vendor edit for
Happened again with discount [Vue warn]: Invalid prop: type check failed for prop "modelValue". Expected String with value "1.75", got Number with value 1.75. at <InputNumber key=1 id="discount" modelValue=1.75 ... > (cherry picked from commit e44d7ceda0369a44964dd1cb715d53f8740a9556) Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
09b64a9d84
commit
91db3f7786
|
|
@ -14,7 +14,7 @@ import { computed } from "vue";
|
|||
export default {
|
||||
props: {
|
||||
id: String,
|
||||
modelValue: String | Number,
|
||||
modelValue: Number | String,
|
||||
placeholder: String,
|
||||
required: Boolean,
|
||||
size: Number | null,
|
||||
|
|
@ -23,7 +23,7 @@ export default {
|
|||
setup(props, { emit }) {
|
||||
const model = computed({
|
||||
get() {
|
||||
return props.modelValue.toString();
|
||||
return parseFloat(props.modelValue);
|
||||
},
|
||||
set(value) {
|
||||
emit("update:modelValue", value);
|
||||
|
|
|
|||
|
|
@ -832,8 +832,6 @@ export default {
|
|||
componentData.resource.value.discount =
|
||||
componentData.resource.value.discount.toFixed(1);
|
||||
}
|
||||
componentData.resource.value.deliverytime =
|
||||
resource.deliverytime.toString();
|
||||
}
|
||||
if (caller === "show") {
|
||||
let physicalAddress = "";
|
||||
|
|
|
|||
Loading…
Reference in New Issue