Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F1262929
reverse-single-reference.ts
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
reverse-single-reference.ts
View Options
// import { FormControl } from "./form-control";
// import { FormFieldControl } from "./form-field-control";
// import { ReverseSingleReference as ReverseSingleReferenceField } from "../fields/field";
// import { Context } from "koa";
// import { Fields } from "../..";
// import { ArrayControl } from "./array";
// export class ReverseSingleReference extends ArrayControl {
// //
// //
// // this isn't finished yet
// //
// //
// constructor(
// public field: ReverseSingleReferenceField,
// public item_controls: Array<FormControl | UnboundControlStorage>
// ) {
// super(field, item_controls);
// }
// async getItems(ctx: Context) {
// const target_id = await this.getTargetItemID(ctx);
// const { items } = await this.field.sealious_field
// .getReferencingCollection()
// .list(ctx.$context)
// .filter({
// [this.field.sealious_field.referencing_field]: target_id,
// })
// .fetch();
// return items;
// }
// makeSubfield(fieldname: string) {
// const collection = this.field.sealious_field.getReferencingCollection();
// if (!collection.fields[fieldname]) {
// return null;
// }
// return new Fields.CollectionField(false, collection.fields[fieldname]);
// }
// async add(ctx: Context): Promise<void> {
// const collection = this.field.sealious_field.getReferencingCollection();
// await collection.create(ctx.$context, {
// [this.field.sealious_field.referencing_field]:
// await this.getTargetItemID(ctx),
// ...(await this.getDefaultItemBody()),
// });
// }
// }
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 24, 15:16 (17 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
601626
Default Alt Text
reverse-single-reference.ts (1 KB)
Attached To
Mode
rSGEN sealgen
Attached
Detach File
Event Timeline
Log In to Comment