Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changes to be seen on checkboxes in filter menu #101

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ <h4>
<button mat-raised-button class="btn btn-refresh" (click)="refreshData()">Refresh Data</button>
</div>
</div>
<!-- <div class="checkbox-filters">
<div class="checkbox-filters">
<div class="chbox-filter">
<mat-checkbox class="nplot_status_chbox" [checked]="hideMissingPlots" (change)="toggleNplotStatus()">
Only show sessions with behavior plots
Expand All @@ -235,7 +235,7 @@ <h4>
Only show sessions with ephys data
</mat-checkbox>
</div>
</div> -->
</div>
</div>
</form>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,22 @@ export class SessionListComponent implements OnInit, OnDestroy {
this.sort.direction = 'desc'
}
let filter = Object.assign({}, this.session_filter_form.getRawValue());
let newFilter = JSON.stringify(filter)

if(this.hideMissingPlots){
filter["nplot"] = 1
}

if(this.hideNG4BrainMap){
filter["good_enough_for_brainwide_map"] = 1
}

if(this.hideNotReady4Delay){
filter["training_status"] = "ready4delay"
}

if(this.hideMissingEphys){
filter["__json"] = '["nprobe>0"]'
}

for (const [key, value] of Object.entries(filter)) {
if(key == 'sex'){
Expand Down Expand Up @@ -1157,27 +1172,40 @@ export class SessionListComponent implements OnInit, OnDestroy {
}
toggleNplotStatus() {
// this.isLoading = true;
// hide or show sessions that have missing session plots
this.hideMissingPlots = !this.hideMissingPlots;
this.updateSelection();
// this.updateSelection();
this.isLoading = false;
this.paginator.pageIndex = 0;
this.ngAfterViewInit();
}
toggleNprobeStatus() {
// hide or show sessions that have missing ephys data (based on existence of probe insertion)
this.hideMissingEphys = !this.hideMissingEphys;
this.updateSelection();
// this.updateSelection();
this.isLoading = false;
this.paginator.pageIndex = 0;
this.ngAfterViewInit();
}

toggleG4BMviewStatus() {
// hide or show sessions that are not good enough for brain map
this.hideNG4BrainMap = !this.hideNG4BrainMap;
this.updateSelection();
// this.updateSelection();
this.isLoading = false;
this.paginator.pageIndex = 0;
this.ngAfterViewInit();
}

toggleR4DviewStatus() {
// hide or show session that are not ready for delay
this.hideNotReady4Delay = !this.hideNotReady4Delay;
this.updateSelection();
// this.updateSelection();
this.isLoading = false;
this.paginator.pageIndex = 0;
this.ngAfterViewInit();
}

//==**==**==**==**+=**+== [START] brain tree functions **==**==**==**==**==**==**==**==**==**+=//
Expand Down