Skip to content

Commit

Permalink
multiverse support
Browse files Browse the repository at this point in the history
  • Loading branch information
jin committed Sep 11, 2024
1 parent b20fb77 commit a755916
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
2 changes: 1 addition & 1 deletion meet/form/form.view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ namespace $.$$ {
return this.meet().responder_refs().map( person => this.Opinion( person ) ) ?? []
}

opinion( responder: $hyoo_crus_ref ) {
opinion( responder: string ) {
return this.meet().opinion( responder )?.Descr()?.text() ?? '...'
}

Expand Down
18 changes: 7 additions & 11 deletions meet/meet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,34 +13,30 @@ namespace $ {
const owner_key = this.Owner()?.remote()?.land().key()
if( !owner_key ) return null

const opinions = this.Opinions(null)?.ensure({ '': $hyoo_crus_rank.add })
const opinions = this.Opinions(null)?.ensure({ '': $hyoo_crus_rank.mod })

const opinion = opinions?.key( my_auth.peer(), null )?.ensure({
const opinion = opinions?.ensure_of( my_auth.peer(), {
[ owner_key.toString() ]: $hyoo_crus_rank.get,
[ my_auth.public().toString() ]: $hyoo_crus_rank.law,
}) ?? null
} ) ?? null

return opinion
}

@ $mol_mem
responder_refs() {
return this.Opinions()?.remote()?.keys()
.map( $hyoo_crus_vary_cast_ref )
.filter( $mol_guard_defined ) ?? []
return this.Opinions()?.remote()?.author_peers() ?? []
}

@ $mol_mem_key
opinion( responder: $hyoo_crus_ref ) {
opinion( responder: string ) {
const options = this.Opinions()?.remote()
return options?.key( responder.description! )?.remote() ?? null
return options?.remote_of( responder ) ?? null
}

}

export class $hyoo_survey_meet_opinions extends $hyoo_crus_dict_to(
$hyoo_crus_atom_ref_to( ()=> $hyoo_survey_meet_opinion )
) {}
export class $hyoo_survey_meet_opinions extends $hyoo_crus_atom_ref_to( ()=> $hyoo_survey_meet_opinion ) {}

export class $hyoo_survey_meet_opinion extends $hyoo_crus_dict.with({
Descr: $hyoo_crus_text,
Expand Down

0 comments on commit a755916

Please sign in to comment.