Bug 38201: Create a vendor type field
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> 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
7f62577453
commit
bbd8f1c490
|
|
@ -18,6 +18,9 @@ export default {
|
|||
if (attr.type === "date") {
|
||||
attr.componentPath = "./FlatPickrWrapper.vue";
|
||||
}
|
||||
if (attr.type === "vendor") {
|
||||
attr.componentPath = "./FormSelectVendors.vue";
|
||||
}
|
||||
if (attr.type === "relationshipWidget") {
|
||||
attr.componentPath = "./RelationshipWidget.vue";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ export default {
|
|||
},
|
||||
{
|
||||
name: "vendor_id",
|
||||
type: "component",
|
||||
type: "vendor",
|
||||
label: __("Vendor"),
|
||||
showElement: {
|
||||
type: "text",
|
||||
|
|
@ -82,14 +82,6 @@ export default {
|
|||
},
|
||||
},
|
||||
},
|
||||
componentPath: "./FormSelectVendors.vue",
|
||||
componentProps: {
|
||||
id: {
|
||||
type: "string",
|
||||
value: "agreement_id_",
|
||||
indexRequired: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "description",
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ export default {
|
|||
},
|
||||
{
|
||||
name: "vendor_id",
|
||||
type: "component",
|
||||
type: "vendor",
|
||||
label: __("Vendor"),
|
||||
showElement: {
|
||||
type: "text",
|
||||
|
|
@ -68,14 +68,6 @@ export default {
|
|||
slug: "vendor_id",
|
||||
},
|
||||
},
|
||||
componentPath: "./FormSelectVendors.vue",
|
||||
componentProps: {
|
||||
id: {
|
||||
type: "string",
|
||||
value: "package_id_",
|
||||
indexRequired: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "package_type",
|
||||
|
|
|
|||
|
|
@ -285,7 +285,7 @@ export default {
|
|||
},
|
||||
{
|
||||
name: "vendor_id",
|
||||
type: "component",
|
||||
type: "vendor",
|
||||
label: __("Vendor"),
|
||||
showElement: {
|
||||
type: "text",
|
||||
|
|
@ -297,14 +297,6 @@ export default {
|
|||
},
|
||||
},
|
||||
},
|
||||
componentPath: "./FormSelectVendors.vue",
|
||||
componentProps: {
|
||||
id: {
|
||||
type: "string",
|
||||
value: "resource_vendor_id_",
|
||||
indexRequired: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "started_on",
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ export default {
|
|||
},
|
||||
{
|
||||
name: "vendor_id",
|
||||
type: "component",
|
||||
type: "vendor",
|
||||
label: __("Vendor"),
|
||||
showElement: {
|
||||
type: "text",
|
||||
|
|
@ -67,14 +67,6 @@ export default {
|
|||
},
|
||||
},
|
||||
},
|
||||
componentPath: "./FormSelectVendors.vue",
|
||||
componentProps: {
|
||||
id: {
|
||||
type: "string",
|
||||
value: "license_id_",
|
||||
indexRequired: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "description",
|
||||
|
|
|
|||
|
|
@ -108,6 +108,22 @@
|
|||
</template>
|
||||
</v-select>
|
||||
</template>
|
||||
<template v-else-if="attr.type == 'vendor'">
|
||||
<label
|
||||
v-if="attr.label"
|
||||
:for="attr.name"
|
||||
:class="{ required: attr.required }"
|
||||
:style="{ ...attr.style }"
|
||||
>{{ attr.label }}:</label
|
||||
>
|
||||
<component
|
||||
:is="requiredComponent"
|
||||
:id="attr.name"
|
||||
v-bind="getComponentProps()"
|
||||
v-on="getEventHandlers()"
|
||||
v-model="resource[attr.name]"
|
||||
></component>
|
||||
</template>
|
||||
<template v-else-if="attr.type == 'date'">
|
||||
<label
|
||||
v-if="attr.label"
|
||||
|
|
|
|||
Loading…
Reference in New Issue