Skip to content

Commit

Permalink
less logs
Browse files Browse the repository at this point in the history
  • Loading branch information
akariv committed Dec 6, 2023
1 parent 0d33998 commit eebbfee
Show file tree
Hide file tree
Showing 10 changed files with 3 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ export class ChartPlotlyComponent implements OnChanges, AfterViewInit {
}

el.innerHTML = '';
console.log('plotly new plot', this.data, layout, this.config);
this.plotly.newPlot(el, this.data, layout, Object.assign({responsive: true}, this.config));
el.querySelectorAll('svg').forEach((svg) => {
svg.setAttribute('alt', this.data.title || 'diagram');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@ export class ListsService {
filter((token) => token !== null),
first(),
switchMap((token) => {
console.log('PUTTING ITEM', item);
const params = {list};
return this.http.put<ListItem>('https://next.obudget.org/lists/', item, {params, headers: this.headers(token)});
}),
Expand Down Expand Up @@ -237,7 +236,6 @@ export class ListsService {
filter((token) => token !== null),
first(),
switchMap((token) => {
console.log('PUTTING LIST', listName, list);
const params: any = {self: true};
if (listName) {
params['list'] = listName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ export class ItemSocialServiceComponent implements OnInit {
];
this.item.breadcrumbs = [this.item.office, this.item.unit, this.item.subunit, this.item.subsubunit].filter(x => !!x).join(' / ');
this.item.catalog_number = parseInt(this.item.catalog_number, 10) || null;
// console.log('ITEM=', this.item);
const budget = this.item.manualBudget.sort((a: any, b: any) => a.year - b.year).filter((x: any) => x.year <= 2021);
const beneficiaries = this.item.beneficiaries.sort((a: any, b: any) => a.year - b.year);
this.budget_chart = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ export class ItemDataTableComponent implements OnInit {

private onDataReady(ev: any) {
const {headers, data, err, total, graphData, graphLayout} = ev;
// console.log('DATA READY', ev);
this.headers = headers;
this.data = data;
this.err = err;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ export class QuestionsManager {
getGraphFormatter(formatter: any) {
if (formatter.type === 'bars') {
return (items: any[]) => {
// console.log('DATA', items);
const graphLayout = {barmode: 'stack'};
const graphData = formatter.series.map((s: any) => {
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,6 @@ export class AddToListIconComponent implements OnChanges {
switchMap((list: ListContents) => {
return this.lists.addDocToList(list.name, this.doc).pipe(
map(() => list),
tap((list) => {
console.log('NEW-LIST', list);
})
);
}),
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ export class AppContainerComponent {

maxWidth = signal<number>(0);
hasListView = computed(() => {
console.log('SHOW LIST VIEW', this.layout.desktop, this.listSideView, this.lists.currentList(), this.listKey());
const list = this.lists.currentList();
if (!list) {
return false;
Expand All @@ -49,13 +48,11 @@ export class AppContainerComponent {
this.configured = true;
});
this.globalSettings.init(this, this.route);
// console.log('CCC', this.route.);
this.route.queryParams.pipe(
untilDestroyed(this),
map((params) => params['list']),
distinctUntilChanged(),
).subscribe((list) => {
console.log('SET LIST', list);
this.listKey.set(list);
this.lists.currentListId.set(this.listKey());
});
Expand All @@ -74,7 +71,7 @@ export class AppContainerComponent {
showListView() {
return this.layout.desktop && this.listSideView && this.hasListView();
}

onDeleted() {
this.router.navigate(['.'], { relativeTo: this.route, queryParams: { list: null }, queryParamsHandling: 'merge', replaceUrl: true});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export class EditedContentDirective implements AfterViewInit {
el.style.display = 'inline';
el.style.whiteSpace = 'pre-wrap';

console.log('LIST CONTENT DIRECTIVE', el);
fromEvent(el, 'click').pipe(
untilDestroyed(this),
).subscribe(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,12 @@ export class ListViewComponent implements OnChanges {

save() {
if (this.editable()) {
console.log('SAVING LIST', this.list);
this.lists.updateList(this.list.name, this.list).subscribe((list) => {
console.log('SAVED LIST', list);
});
}
}

set title(title: string) {
console.log('TITLE', title);
this.list.title = title.trim();
this.save();
(this.titleEl.nativeElement as HTMLElement).innerHTML = this.title;
Expand All @@ -73,12 +70,11 @@ export class ListViewComponent implements OnChanges {
if (this.list?.title?.trim().length) {
return this.list?.title.trim();
} else {
return 'רשימה ללא שם';
return this.lists.emptyList.title || '';
}
}

set description(description: string) {
console.log('DESCRIPTION', description);
this.list.properties.description = description;
this.save();
(this.descriptionEl.nativeElement as HTMLElement).innerHTML = this.description;
Expand All @@ -90,9 +86,7 @@ export class ListViewComponent implements OnChanges {

updateNotes(item: any, notes: string) {
item.properties.__notes = notes;
this.lists.addDocToList(this.list.name, item.properties).subscribe((item) => {
console.log('UPDATED ITEM', item);
});
this.lists.addDocToList(this.list.name, item.properties).subscribe((item) => {});
}

share() {
Expand All @@ -111,7 +105,6 @@ export class ListViewComponent implements OnChanges {

deleteSelf() {
this.lists.delete(this.list.name, null).subscribe((success) => {
console.log('DELETED LIST', success);
this.deleted.emit();
this.deleteDialog.set(false);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export class PageNotFoundComponent {
@Optional() @Inject(REQUEST) private request: Request
) {
this.globalSettings.ready.subscribe(() => {
// console.log('NOT FOUND', this.route.snapshot.url);
if (this.ps.server()) {
this.request?.res?.status(404);
}
Expand Down

0 comments on commit eebbfee

Please sign in to comment.