LP#1857910: (follow-up) enhance IDL for field doc
authorGalen Charlton <gmc@equinoxOLI.org>
Fri, 20 May 2022 14:27:04 +0000 (10:27 -0400)
committerGalen Charlton <gmc@equinoxOLI.org>
Fri, 20 May 2022 15:09:02 +0000 (11:09 -0400)
This patch adds human-readable labels to the IDL for
field doc. It also marks required fields in the IDL, removing
the need for the Angular code to explicitly specify
the set of required fields.

Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Open-ILS/examples/fm_IDL.xml
Open-ILS/src/eg2/src/app/staff/admin/local/field-documentation/field-documentation.component.html

index 92abe15..d036e9d 100644 (file)
@@ -9084,11 +9084,11 @@ SELECT  usr,
        </class>
        <class id="fdoc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::idl_field_doc" oils_persist:tablename="config.idl_field_doc" oils_persist:field_safe="true" reporter:label="IDL Field Doc">
                <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
-                       <field name="id" reporter:datatype="id" />
-                       <field name="fm_class" reporter:datatype="text"/>
-                       <field name="field" reporter:datatype="text"/>
-                       <field name="owner" reporter:datatype="org_unit"/>
-                       <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
+                       <field name="id"       reporter:label="ID" reporter:datatype="id" />
+                       <field name="fm_class" reporter:label="Class" reporter:datatype="text" oils_obj:required="true"/>
+                       <field name="field"    reporter:label="Field" reporter:datatype="text" oils_obj:required="true"/>
+                       <field name="owner"    reporter:label="Field Documentation Owner" reporter:datatype="org_unit" oils_obj:required="true"/>
+                       <field name="string"   reporter:label="Field Documentation" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
                </fields>
                <links>
                        <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
index 2227625..ebaafff 100644 (file)
@@ -35,7 +35,7 @@
 </div>
 
 <eg-fm-record-editor #editDialog hiddenFields="id" idlClass="fdoc"
-  requiredFields="fm_class,field,owner,string" [(fieldOptions)]="fieldOptions">
+  [(fieldOptions)]="fieldOptions">
 </eg-fm-record-editor>
 
 <ng-template #fieldClassSelector let-fieldentries="fieldentries" let-selected="selectedEntry">