fix: reactivity force reverse relation on hubl-reactivity

This commit is contained in:
Jean-Baptiste Pasquier 2020-06-23 20:29:12 +02:00
parent 9136b26331
commit 50de1734c8
No known key found for this signature in database
GPG Key ID: F2702E6D22ED4D62
2 changed files with 8 additions and 5 deletions

View File

@ -32,6 +32,7 @@ export const HublReactivity = {
subscribe() {
if (this.resourceId && this.targetSrc) {
store.subscribeVirtualContainerTo(this.resourceId, this.targetSrc);
store.subscribeVirtualContainerTo(this.targetSrc, this.resourceId);
}
}
}

View File

@ -37,22 +37,24 @@ html(lang="en")
#job-offers(hidden).no-sidebar.with-padding
hubl-reactivity(data-src=`${endpoints.joboffers || endpoints.get.joboffers}current/` target-src=`${endpoints.joboffers || endpoints.get.joboffers}`)
hubl-reactivity(data-src=`${endpoints.joboffers || endpoints.get.joboffers}current/` target-src=`${endpoints.joboffers || endpoints.get.joboffers}expired/`)
hubl-reactivity(data-src=`${endpoints.joboffers || endpoints.get.joboffers}` target-src=`${endpoints.joboffers || endpoints.get.joboffers}current/`)
hubl-reactivity(data-src=`${endpoints.joboffers || endpoints.get.joboffers}` target-src=`${endpoints.joboffers || endpoints.get.joboffers}expired/`)
hubl-reactivity(data-src=`${endpoints.joboffers || endpoints.get.joboffers}expired/` target-src=`${endpoints.joboffers || endpoints.get.joboffers}`)
hubl-reactivity(data-src=`${endpoints.joboffers || endpoints.get.joboffers}` target-src=`${endpoints.joboffers || endpoints.get.joboffers}current/`)
hubl-reactivity(bind-user nested-field="joboffers" target-src=`${endpoints.joboffers || endpoints.get.joboffers}expired/`)
hubl-reactivity(bind-user nested-field="joboffers" target-src=`${endpoints.joboffers || endpoints.get.joboffers}`)
hubl-reactivity(bind-user nested-field="joboffers" target-src=`${endpoints.joboffers || endpoints.get.joboffers}current/`)
include page-job-offers.pug
if endpoints.projects || (endpoints.get && endpoints.get.projects)
#project(hidden).with-sidebar
hubl-reactivity(data-src=`${endpoints.projects || endpoints.get.projects}joinable/` target-src=`${endpoints.projects || endpoints.get.projects}`)
hubl-reactivity(data-src=`${endpoints.projects || endpoints.get.projects}` target-src=`${endpoints.projects || endpoints.get.projects}joinable/`)
hubl-reactivity(bind-user nested-field="projects" target-src=`${endpoints.projects || endpoints.get.projects}`)
hubl-reactivity(bind-user nested-field="projects" target-src=`${endpoints.projects || endpoints.get.projects}joinable/`)
include page-project.pug
if endpoints.circles || (endpoints.get && endpoints.get.circles)
#circle(hidden).with-sidebar
hubl-reactivity(data-src=`${endpoints.circles || endpoints.get.circles}joinable/` target-src=`${endpoints.circles || endpoints.get.circles}`)
hubl-reactivity(data-src=`${endpoints.circles || endpoints.get.circles}` target-src=`${endpoints.circles || endpoints.get.circles}joinable/`)
hubl-reactivity(bind-user nested-field="circles" target-src=`${endpoints.circles || endpoints.get.circles}`)
hubl-reactivity(bind-user nested-field="circles" target-src=`${endpoints.circles || endpoints.get.circles}joinable/`)
include page-circle.pug
if endpoints.users || (endpoints.get && endpoints.get.users)