Skip to content

Commit

Permalink
update to agencies in components and modules
Browse files Browse the repository at this point in the history
  • Loading branch information
davidclaveau committed Sep 25, 2023
1 parent 9ab27bb commit c6528bf
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import { IssuingAgencyService } from '../services/issuingagency.service';
import { LoggerService } from 'nrpti-angular-components';
import { Constants } from '../utils/constants/misc';
import { ToastService } from '../services/toast.service';
import { FactoryService } from '../../../../admin-nrpti/src/app/services/factory.service';
import { FactoryService } from '../services/factory.service';

@Component({
selector: 'app-update-issuing-agency',
templateUrl: './update-issuing-agency.component.html',
styleUrls: ['./update-issuing-agency.component.scss']
selector: 'app-agencies',
templateUrl: './agencies.component.html',
styleUrls: ['./agencies.component.scss']
})
export class UpdateIssuingAgencyComponent implements OnInit {
export class AgenciesComponent implements OnInit {
public loading = false;
selectedAgency: string = ''; // Initialize the selectedAgency
choiceMade = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import { EditorModule } from '@tinymce/tinymce-angular';
import { GlobalModule } from 'nrpti-angular-components';

import { CommonModule as NrptiCommonModule } from '../../../../common/src/app/common.module';
import { UpdateIssuingAgencyComponent } from './update-issuing-agency.component';
import { UpdateIssuingAgencyResolver } from './update-issuing-agency.resolver';
import { AgenciesComponent } from './agencies.component';
import { AgenciesResolver } from './agencies.resolver';


@NgModule({
Expand All @@ -26,14 +26,14 @@ import { UpdateIssuingAgencyResolver } from './update-issuing-agency.resolver';
NgbModule,
],
declarations: [
UpdateIssuingAgencyComponent
AgenciesComponent
],
providers: [
UpdateIssuingAgencyResolver
AgenciesResolver
],
entryComponents: [
UpdateIssuingAgencyComponent
AgenciesComponent
],
exports: []
})
export class UpdateIssuingAgencyModule {}
export class AgenciesModule {}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Observable } from 'rxjs/Observable';


@Injectable()
export class UpdateIssuingAgencyResolver implements Resolve<Observable<object>> {
export class AgenciesResolver implements Resolve<Observable<object>> {
resolve(route: ActivatedRouteSnapshot): Observable<object> {
return null;
}
Expand Down
10 changes: 5 additions & 5 deletions angular/projects/admin-nrpti/src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import { NewsResolver } from './news/news-resolver';
import { NewsListComponent } from './news/news-list.component';
import { CommunicationsComponent } from './communications/communications.component';
import { LngMapInfoResolver } from './communications/lng-map-info/lng-map-info-resolver';
import { UpdateIssuingAgencyComponent } from './update-issuing-agency/update-issuing-agency.component';
import { UpdateIssuingAgencyResolver } from './update-issuing-agency/update-issuing-agency.resolver';
import { AgenciesComponent } from './agencies/agencies.component';
import { AgenciesResolver } from './agencies/agencies.resolver';

const routes: Routes = [
{
Expand Down Expand Up @@ -63,11 +63,11 @@ const routes: Routes = [
]
},
{
path: 'update-issuing-agency',
path: 'agencies',
pathMatch: 'full',
component: UpdateIssuingAgencyComponent,
component: AgenciesComponent,
resolve: {
records: UpdateIssuingAgencyResolver
records: AgenciesResolver
},
data: {
breadcrumb: 'Agencies'
Expand Down
4 changes: 2 additions & 2 deletions angular/projects/admin-nrpti/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { RecordsModule } from './records/records.module';
import { NewsModule } from './news/news.module';
import { MinesModule } from './mines/mines.module';
import { CommunicationsModule } from './communications/communications.module';
import { UpdateIssuingAgencyModule } from './update-issuing-agency/update-issuing-agency.module';
import { AgenciesModule } from './agencies/agencies.module';
import { ToastrModule } from 'ngx-toastr';

// components
Expand Down Expand Up @@ -101,7 +101,7 @@ export function overlayScrollFactory(overlay: Overlay): () => CloseScrollStrateg
NewsModule,
MinesModule,
CommunicationsModule,
UpdateIssuingAgencyModule,
AgenciesModule,
AppRoutingModule, // <-- module import order matters - https://angular.io/guide/router#module-import-order-matters
NgbModule.forRoot(),
NgxPaginationModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,11 @@
<em class="material-icons mr-3">chat</em>
Communications
</a>
<a id="update-issuing-agency"
<a id="agencies"
*ngIf='keycloakService.isMenuEnabled("Agencies")'
[ngClass]="{ active: mainRoute === 'update-issuing-agency' }"
id="update-issuing-agency"
[routerLink]="['/update-issuing-agency']">
[ngClass]="{ active: mainRoute === 'agencies' }"
id="agencies"
[routerLink]="['/agencies']">
<i class="material-icons mr-3">edit</i>
Agencies
</a>
Expand Down

0 comments on commit c6528bf

Please sign in to comment.