<field reporter:label="Email Address" name="email" reporter:datatype="text"/>
<field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
<field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
+ <field reporter:label="Staff Visible" name="staff_visible" reporter:datatype="bool"/>
<field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link" oils_obj:required="true"/>
<field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
<field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
canHaveUsers?: boolean;
canHaveVolumes?: boolean;
opacVisible?: boolean;
+ staffVisible?: boolean;
inList?: number[];
notInList?: number[];
}
if (ov && !this.opacVisible(org)) { return; }
if (ov === false && this.opacVisible(org)) { return; }
+ const sv = filter.staffVisible;
+ if (sv && !this.staffVisible(org)) { return; }
+ if (sv === false && this.staffVisible(org)) { return; }
+
if (filter.inList && !filter.inList.includes(org.id())) {
return;
}
return this.get(nodeOrId).opac_visible() === 't';
}
+ staffVisible(nodeOrId): boolean {
+ return this.get(nodeOrId).staff_visible() === 't';
+ }
+
// list of org_unit objects or IDs for me + descendants
descendants(nodeOrId: OrgNodeOrId, asId?: boolean): any[] {
const node = this.get(nodeOrId);
[record]="currentOrg().isnew() ? currentOrg() : null"
[recordId]="currentOrg().isnew() ? null : currentOrg().id()"
[showDelete]="!orgHasChildren()"
- fieldOrder="parent_ou,ou_type,name,shortname,phone,email,opac_visible,fiscal_calendar"
+ fieldOrder="parent_ou,ou_type,name,shortname,phone,email,opac_visible,staff_visible,fiscal_calendar"
hiddenFields="id,billing_address,mailing_address,holds_address,ill_address">
<eg-fm-record-editor-action label="Add Child" i18n-label
[disabled]="orgChildTypes().length === 0 || currentOrg().isnew()"
__PACKAGE__->table( 'actor_org_unit' );
__PACKAGE__->columns( Primary => qw/id/);
__PACKAGE__->columns( Essential => qw/parent_ou ou_type mailing_address billing_address
- ill_address holds_address shortname name email phone opac_visible fiscal_calendar/);
+ ill_address holds_address shortname name email phone opac_visible staff_visible
+ fiscal_calendar/);
#-------------------------------------------------------------------------------
package actor::org_unit::hours_of_operation;
email TEXT,
phone TEXT,
opac_visible BOOL NOT NULL DEFAULT TRUE,
+ staff_visible BOOL NOT NULL DEFAULT TRUE,
fiscal_calendar INT NOT NULL DEFAULT 1 -- foreign key constraint to be added later
);
CREATE INDEX actor_org_unit_parent_ou_idx ON actor.org_unit (parent_ou);
--- /dev/null
+BEGIN;
+
+-- check whether patch can be applied
+SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+ALTER TABLE actor.org_unit ADD COLUMN staff_visible BOOLEAN NOT NULL DEFAULT TRUE;
+
+COMMIT;