11import { html } from 'lit' ;
22import { BaseObject , BaseFormElement , BaseViewElement } from '../baseObject.js' ;
33import { getDocumentHit , getEntranceQualificationRecognition } from './schema.js' ;
4- import { DbpStringElement , DbpStringView } from '@dbp-toolkit/form-elements' ;
4+ import { DbpStringElement } from '@dbp-toolkit/form-elements' ;
55import { BaseDocumentHitElement } from './document.js' ;
6+ import { DbpPersonSelectElement } from '@dbp-toolkit/form-elements/src/elements/person-select.js' ;
7+ import { DbpPersonSelectView } from '@dbp-toolkit/form-elements/src/views/person-select.js' ;
68
79export default class extends BaseObject {
810 name = 'file-cabinet-entranceQualificationRecognition' ;
@@ -50,6 +52,7 @@ class CabinetFormElement extends BaseFormElement {
5052 return {
5153 ...super . scopedElements ,
5254 'dbp-form-string-element' : DbpStringElement ,
55+ 'dbp-form-person-select-element' : DbpPersonSelectElement ,
5356 } ;
5457 }
5558
@@ -64,12 +67,13 @@ class CabinetFormElement extends BaseFormElement {
6467 // Example: https://gitlab.tugraz.at/dbp/middleware/api/-/blob/main/config/packages/schemas/relay-blob-bundle/cabinet-bucket/examples/EntranceQualificationRecognition_example.json
6568 return html `
6669 < form >
67- < dbp-form-string -element
68- subscribe ="lang "
70+ < dbp-form-person-select -element
71+ subscribe ="lang,auth "
6972 name ="signedBy "
7073 label =${ this . _i18n . t ( 'doc-modal-signed-by' ) }
74+ entry-point-url ="${ this . entryPointUrl } "
7175 .value=${ recognition . signedBy }
72- required> </ dbp-form-string -element >
76+ required> </ dbp-form-person-select -element >
7377
7478 ${ this . getCommonFormElements ( ) }
7579 </ form >
@@ -92,7 +96,7 @@ class CabinetViewElement extends BaseViewElement {
9296 static get scopedElements ( ) {
9397 return {
9498 ...super . scopedElements ,
95- 'dbp-form-string- view' : DbpStringView ,
99+ 'dbp-form-person-select- view' : DbpPersonSelectView ,
96100 } ;
97101 }
98102
@@ -103,11 +107,12 @@ class CabinetViewElement extends BaseViewElement {
103107 const i18n = this . _i18n ;
104108
105109 return html `
106- < dbp-form-string -view
107- subscribe ="lang "
110+ < dbp-form-person-select -view
111+ subscribe ="lang,auth "
108112 label =${ i18n . t ( 'doc-modal-signed-by' ) }
113+ entry-point-url ="${ this . entryPointUrl } "
109114 .value=${ recognition . signedBy || '' }
110- required> </ dbp-form-string -view >
115+ required> </ dbp-form-person-select -view >
111116 ` ;
112117 }
113118}
0 commit comments