@@ -224,6 +224,9 @@ <h6><b>Properties</b></h6>
224224 < tr >
225225 < td class ="col-md-4 ">
226226 < ul class ="index-list ">
227+ < li >
228+ < a href ="#has_ai_access " > has_ai_access</ a >
229+ </ li >
227230 < li >
228231 < a href ="#isMenuOpen " > isMenuOpen</ a >
229232 </ li >
@@ -284,12 +287,12 @@ <h3 id="constructor">Constructor</h3>
284287 < tbody >
285288 < tr >
286289 < td class ="col-md-4 ">
287- < code > constructor(sectionService: < a href ="../injectables/SectionService.html " target ="_self "> SectionService</ a > )</ code >
290+ < code > constructor(sectionService: < a href ="../injectables/SectionService.html " target ="_self "> SectionService</ a > , userService: < a href =" ../injectables/UserService.html " target =" _self " > UserService </ a > )</ code >
288291 </ td >
289292 </ tr >
290293 < tr >
291294 < td class ="col-md-4 ">
292- < div class ="io-line "> Defined in < a href ="" data-line ="31 " class ="link-to-prism "> src/app/shared/hamburger-menu/hamburger-menu.component.ts:31 </ a > </ div >
295+ < div class ="io-line "> Defined in < a href ="" data-line ="35 " class ="link-to-prism "> src/app/shared/hamburger-menu/hamburger-menu.component.ts:35 </ a > </ div >
293296 </ td >
294297 </ tr >
295298
@@ -327,6 +330,22 @@ <h3 id="constructor">Constructor</h3>
327330
328331 </ td >
329332 </ tr >
333+ < tr >
334+ < td > userService</ td >
335+
336+ < td >
337+ < code > < a href ="../injectables/UserService.html " target ="_self " > UserService</ a > </ code >
338+ </ td >
339+
340+ < td >
341+ No
342+ </ td >
343+
344+ < td >
345+ < p > Service for managing user preferences</ p >
346+
347+ </ td >
348+ </ tr >
330349 </ tbody >
331350 </ table >
332351 </ div >
@@ -365,8 +384,8 @@ <h3>HostListeners</h3> <table class="table table-sm table-bordered">
365384
366385 < tr >
367386 < td class ="col-md-4 ">
368- < div class ="io-line "> Defined in < a href ="" data-line ="61 "
369- class ="link-to-prism "> src/app/shared/hamburger-menu/hamburger-menu.component.ts:61 </ a > </ div >
387+ < div class ="io-line "> Defined in < a href ="" data-line ="67 "
388+ class ="link-to-prism "> src/app/shared/hamburger-menu/hamburger-menu.component.ts:67 </ a > </ div >
370389 </ td >
371390 </ tr >
372391
@@ -435,8 +454,8 @@ <h3 id="methods">
435454
436455 < tr >
437456 < td class ="col-md-4 ">
438- < div class ="io-line "> Defined in < a href ="" data-line ="75 "
439- class ="link-to-prism "> src/app/shared/hamburger-menu/hamburger-menu.component.ts:75 </ a > </ div >
457+ < div class ="io-line "> Defined in < a href ="" data-line ="81 "
458+ class ="link-to-prism "> src/app/shared/hamburger-menu/hamburger-menu.component.ts:81 </ a > </ div >
440459 </ td >
441460 </ tr >
442461
@@ -534,8 +553,8 @@ <h3 id="methods">
534553
535554 < tr >
536555 < td class ="col-md-4 ">
537- < div class ="io-line "> Defined in < a href ="" data-line ="61 "
538- class ="link-to-prism "> src/app/shared/hamburger-menu/hamburger-menu.component.ts:61 </ a > </ div >
556+ < div class ="io-line "> Defined in < a href ="" data-line ="67 "
557+ class ="link-to-prism "> src/app/shared/hamburger-menu/hamburger-menu.component.ts:67 </ a > </ div >
539558 </ td >
540559 </ tr >
541560
@@ -609,8 +628,8 @@ <h3 id="methods">
609628
610629 < tr >
611630 < td class ="col-md-4 ">
612- < div class ="io-line "> Defined in < a href ="" data-line ="50 "
613- class ="link-to-prism "> src/app/shared/hamburger-menu/hamburger-menu.component.ts:50 </ a > </ div >
631+ < div class ="io-line "> Defined in < a href ="" data-line ="56 "
632+ class ="link-to-prism "> src/app/shared/hamburger-menu/hamburger-menu.component.ts:56 </ a > </ div >
614633 </ td >
615634 </ tr >
616635
@@ -634,6 +653,43 @@ <h3 id="methods">
634653 < h3 id ="inputs ">
635654 Properties
636655 </ h3 >
656+ < table class ="table table-sm table-bordered ">
657+ < tbody >
658+ < tr >
659+ < td class ="col-md-4 ">
660+ < a name ="has_ai_access "> </ a >
661+ < span class ="name ">
662+ < span > < b > has_ai_access</ b > </ span >
663+ < a href ="#has_ai_access "> < span class ="icon ion-ios-link "> </ span > </ a >
664+ </ span >
665+ </ td >
666+ </ tr >
667+ < tr >
668+ < td class ="col-md-4 ">
669+ < i > Type : </ i > < code > < a href ="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/boolean " target ="_blank " > boolean</ a > </ code >
670+
671+ </ td >
672+ </ tr >
673+ < tr >
674+ < td class ="col-md-4 ">
675+ < i > Default value : </ i > < code > false</ code >
676+ </ td >
677+ </ tr >
678+ < tr >
679+ < td class ="col-md-4 ">
680+ < div class ="io-line "> Defined in < a href ="" data-line ="35 " class ="link-to-prism "> src/app/shared/hamburger-menu/hamburger-menu.component.ts:35</ a > </ div >
681+ </ td >
682+ </ tr >
683+
684+ < tr >
685+ < td class ="col-md-4 ">
686+ < div class ="io-description "> < p > Flag to determine if the user can access ai ssection for analysis data</ p >
687+ </ div >
688+ </ td >
689+ </ tr >
690+
691+ </ tbody >
692+ </ table >
637693 < table class ="table table-sm table-bordered ">
638694 < tbody >
639695 < tr >
@@ -652,7 +708,7 @@ <h3 id="inputs">
652708 </ tr >
653709 < tr >
654710 < td class ="col-md-4 ">
655- < div class ="io-line "> Defined in < a href ="" data-line ="31 " class ="link-to-prism "> src/app/shared/hamburger-menu/hamburger-menu.component.ts:31 </ a > </ div >
711+ < div class ="io-line "> Defined in < a href ="" data-line ="32 " class ="link-to-prism "> src/app/shared/hamburger-menu/hamburger-menu.component.ts:32 </ a > </ div >
656712 </ td >
657713 </ tr >
658714
@@ -683,7 +739,7 @@ <h3 id="inputs">
683739 </ tr >
684740 < tr >
685741 < td class ="col-md-4 ">
686- < div class ="io-line "> Defined in < a href ="" data-line ="26 " class ="link-to-prism "> src/app/shared/hamburger-menu/hamburger-menu.component.ts:26 </ a > </ div >
742+ < div class ="io-line "> Defined in < a href ="" data-line ="27 " class ="link-to-prism "> src/app/shared/hamburger-menu/hamburger-menu.component.ts:27 </ a > </ div >
687743 </ td >
688744 </ tr >
689745
@@ -706,6 +762,7 @@ <h3 id="inputs">
706762 < pre class ="line-numbers compodoc-sourcecode "> < code class ="language-typescript "> import { Component, HostListener } from '@angular/core';
707763import { CommonModule } from '@angular/common';
708764import { SectionService } from '../../service/section/section.service';
765+ import { UserService } from '../../service/localStorage/user.service';
709766
710767/**
711768 * Hamburger menu component for mobile or compact navigation.
@@ -735,18 +792,23 @@ <h3 id="inputs">
735792 */
736793 isMenuOpen = false;
737794
795+ /** Flag to determine if the user can access ai ssection for analysis data*/
796+ has_ai_access: boolean = false;
797+
738798 /**
739799 * Creates an instance of HamburgerMenuComponent.
740800 *
741801 * Subscribes to {@link SectionService.currentSection$} to manage the
742802 * visibility of the AI button based on the current section.
743803 *
744804 * @param sectionService Service for managing and broadcasting the active section.
805+ * @param userService Service for managing user preferences
745806 */
746- constructor(private sectionService: SectionService) {
807+ constructor(private sectionService: SectionService, private userService: UserService ) {
747808 this.sectionService.currentSection$.subscribe(section => {
748809 this.showAIButton = section !== 'ai';
749810 });
811+ this.has_ai_access = this.userService.getValue<boolean>('has_ai_access') ?? false;
750812 }
751813
752814 /**
@@ -809,7 +871,7 @@ <h3 id="inputs">
809871 </div>
810872</div> -->
811873
812- <div class="md:hidden fixed top-[0.1rem] right-3 z-50 hamburger-menu-container">
874+ <div *ngIf="has_ai_access" class="md:hidden fixed top-[0.1rem] right-3 z-50 hamburger-menu-container">
813875 <button *ngIf="showAIButton" (click)="navigateAndClose('ai', $event)"
814876 class="text-lg text-[var(--color-white)] py-[0.65rem]">
815877 <img src="assets/img/icon/icons8-ai-96.png" alt="Menu" class="w-[24px] h-[24px]"
@@ -850,7 +912,7 @@ <h3 id="inputs">
850912< script src ="../js/libs/htmlparser.js "> </ script >
851913< script src ="../js/libs/deep-iterator.js "> </ script >
852914< script >
853- var COMPONENT_TEMPLATE = '<div><!-- <div class="md:hidden fixed top-1 right-4 z-50 hamburger-menu-container"> <button (click)="toggleMenu()" class="text-lg text-[var(--color-white)] py-2"> <img src="assets/img/icon/icons8-menu-vertical-50.png" alt="Menu" class="w-[24px] h-[24px]" style="filter: invert(100%); transition: filter 0.3s ease;"> </button> <div *ngIf="isMenuOpen" class="fixed top-[3rem] right-[0.2rem] bg-[--color-surface] rounded-lg shadow-lg mt-2 w-[10rem]"> <ul class="flex flex-col"> <li> <a href="#" (click)="navigateAndClose(\'search\', $event)" class="block px-4 py-2 hover:bg-[--list-hover]">🔍 Search</a> </li> <li> <a href="#" (click)="navigateAndClose(\'settings\', $event)" class="block px-4 py-2 hover:bg-[--list-hover]">⚙️ Settings</a> </li> </ul> </div></div> --><div class="md:hidden fixed top-[0.1rem] right-3 z-50 hamburger-menu-container"> <button *ngIf="showAIButton" (click)="navigateAndClose(\'ai\', $event)" class="text-lg text-[var(--color-white)] py-[0.65rem]"> <img src="assets/img/icon/icons8-ai-96.png" alt="Menu" class="w-[24px] h-[24px]" style="filter: invert(100%); transition: filter 0.3s ease;"> </button></div></div>'
915+ var COMPONENT_TEMPLATE = '<div><!-- <div class="md:hidden fixed top-1 right-4 z-50 hamburger-menu-container"> <button (click)="toggleMenu()" class="text-lg text-[var(--color-white)] py-2"> <img src="assets/img/icon/icons8-menu-vertical-50.png" alt="Menu" class="w-[24px] h-[24px]" style="filter: invert(100%); transition: filter 0.3s ease;"> </button> <div *ngIf="isMenuOpen" class="fixed top-[3rem] right-[0.2rem] bg-[--color-surface] rounded-lg shadow-lg mt-2 w-[10rem]"> <ul class="flex flex-col"> <li> <a href="#" (click)="navigateAndClose(\'search\', $event)" class="block px-4 py-2 hover:bg-[--list-hover]">🔍 Search</a> </li> <li> <a href="#" (click)="navigateAndClose(\'settings\', $event)" class="block px-4 py-2 hover:bg-[--list-hover]">⚙️ Settings</a> </li> </ul> </div></div> --><div *ngIf="has_ai_access" class="md:hidden fixed top-[0.1rem] right-3 z-50 hamburger-menu-container"> <button *ngIf="showAIButton" (click)="navigateAndClose(\'ai\', $event)" class="text-lg text-[var(--color-white)] py-[0.65rem]"> <img src="assets/img/icon/icons8-ai-96.png" alt="Menu" class="w-[24px] h-[24px]" style="filter: invert(100%); transition: filter 0.3s ease;"> </button></div></div>'
854916 var COMPONENTS = [ { 'name' : 'AddExpenseComponent' , 'selector' : 'app-add-expense' } , { 'name' : 'AiComponent' , 'selector' : 'app-ai' } , { 'name' : 'AppComponent' , 'selector' : 'app-root' } , { 'name' : 'BudgetComponent' , 'selector' : 'app-budget' } , { 'name' : 'CalendarComponent' , 'selector' : 'app-calendar' } , { 'name' : 'CategoryDropdownComponent' , 'selector' : 'app-category-dropdown' } , { 'name' : 'DownloadComponentComponent' , 'selector' : 'app-download-component' } , { 'name' : 'ExpenseDetailsModalComponent' , 'selector' : 'app-expense-details-modal' } , { 'name' : 'ExpenseListComponent' , 'selector' : 'app-expense-list' } , { 'name' : 'ExpenseWiseComponent' , 'selector' : 'app-expense-wise' } , { 'name' : 'FooterComponent' , 'selector' : 'app-footer' } , { 'name' : 'FormModelComponent' , 'selector' : 'app-form-model' } , { 'name' : 'GlobalLoaderComponent' , 'selector' : 'app-global-loader' } , { 'name' : 'GraphsComponent' , 'selector' : 'app-graphs' } , { 'name' : 'HamburgerMenuComponent' , 'selector' : 'app-hamburger-menu' } , { 'name' : 'HomeComponent' , 'selector' : 'app-home' } , { 'name' : 'InstallAppPopupComponentComponent' , 'selector' : 'app-install-app-popup-component' } , { 'name' : 'ListExpensesComponent' , 'selector' : 'app-list-expenses' } , { 'name' : 'MusicComponent' , 'selector' : 'app-music' } , { 'name' : 'NavbarComponent' , 'selector' : 'app-navbar' } , { 'name' : 'PieChartComponent' , 'selector' : 'app-pie-chart' } , { 'name' : 'PlaylistMusicComponent' , 'selector' : 'app-playlist-music' } , { 'name' : 'SearchButtonComponent' , 'selector' : 'app-search-button' } , { 'name' : 'SearchMusicComponent' , 'selector' : 'app-search-music' } , { 'name' : 'SettingItemComponent' , 'selector' : 'app-setting-item' } , { 'name' : 'SettingsComponent' , 'selector' : 'app-settings' } , { 'name' : 'SidebarComponent' , 'selector' : 'app-sidebar' } , { 'name' : 'TemplatePlaygroundComponent' , 'selector' : 'template-playground-root' } , { 'name' : 'ToastComponent' , 'selector' : 'app-toast' } ] ;
855917 var DIRECTIVES = [ ] ;
856918 var ACTUAL_COMPONENT = { 'name' : 'HamburgerMenuComponent' } ;
0 commit comments