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:
Matt Blenkinsop 2025-02-07 10:47:51 +00:00 committed by Lucas Gass
parent 7f62577453
commit bbd8f1c490
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
6 changed files with 23 additions and 36 deletions

View File

@ -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";
}

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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"