diff --git a/src/app/app.routes.ts b/src/app/app.routes.ts index ff379d1..51c630c 100644 --- a/src/app/app.routes.ts +++ b/src/app/app.routes.ts @@ -8,8 +8,8 @@ import { Mureg } from './pages/mureg/mureg'; import { Faturamento } from './pages/faturamento/faturamento'; import { authGuard } from './guards/auth.guard'; -import { adminGuard } from './guards/admin.guard'; -import { systemAdminGuard } from './guards/system-admin.guard'; +import { sysadminOrGestorGuard } from './guards/sysadmin-or-gestor.guard'; +import { sysadminOnlyGuard } from './guards/sysadmin-only.guard'; import { DadosUsuarios } from './pages/dados-usuarios/dados-usuarios'; import { VigenciaComponent } from './pages/vigencia/vigencia'; import { TrocaNumero } from './pages/troca-numero/troca-numero'; @@ -29,20 +29,20 @@ export const routes: Routes = [ { path: 'geral', component: Geral, canActivate: [authGuard], title: 'Geral' }, { path: 'mureg', component: Mureg, canActivate: [authGuard], title: 'Mureg' }, - { path: 'faturamento', component: Faturamento, canActivate: [authGuard, adminGuard], title: 'Faturamento' }, + { path: 'faturamento', component: Faturamento, canActivate: [authGuard, sysadminOrGestorGuard], title: 'Faturamento' }, { path: 'dadosusuarios', component: DadosUsuarios, canActivate: [authGuard], title: 'Dados dos Usuários' }, { path: 'vigencia', component: VigenciaComponent, canActivate: [authGuard], title: 'Vigência' }, { path: 'trocanumero', component: TrocaNumero, canActivate: [authGuard], title: 'Troca de Número' }, { path: 'notificacoes', component: Notificacoes, canActivate: [authGuard], title: 'Notificações' }, - { path: 'chips-controle-recebidos', component: ChipsControleRecebidos, canActivate: [authGuard, adminGuard], title: 'Chips Controle Recebidos' }, + { path: 'chips-controle-recebidos', component: ChipsControleRecebidos, canActivate: [authGuard, sysadminOrGestorGuard], title: 'Chips Controle Recebidos' }, { path: 'resumo', component: Resumo, canActivate: [authGuard], title: 'Resumo' }, - { path: 'parcelamentos', component: Parcelamentos, canActivate: [authGuard, adminGuard], title: 'Parcelamentos' }, - { path: 'historico', component: Historico, canActivate: [authGuard, adminGuard], title: 'Histórico' }, + { path: 'parcelamentos', component: Parcelamentos, canActivate: [authGuard, sysadminOrGestorGuard], title: 'Parcelamentos' }, + { path: 'historico', component: Historico, canActivate: [authGuard, sysadminOrGestorGuard], title: 'Histórico' }, { path: 'perfil', component: Perfil, canActivate: [authGuard], title: 'Perfil' }, { path: 'system/fornecer-usuario', component: SystemProvisionUserPage, - canActivate: [authGuard, systemAdminGuard], + canActivate: [authGuard, sysadminOnlyGuard], title: 'Fornecer Usuário', }, diff --git a/src/app/components/header/header.html b/src/app/components/header/header.html index 24a3875..4e0f288 100644 --- a/src/app/components/header/header.html +++ b/src/app/components/header/header.html @@ -185,13 +185,13 @@ Perfil
- - -
@@ -537,7 +537,7 @@ Troca de número - + Fornecer usuário diff --git a/src/app/components/header/header.ts b/src/app/components/header/header.ts index acb4fd4..1e0ad93 100644 --- a/src/app/components/header/header.ts +++ b/src/app/components/header/header.ts @@ -31,9 +31,8 @@ export class Header implements AfterViewInit, OnDestroy { manageUsersOpen = false; isLoggedHeader = false; isHome = false; - isAdmin = false; + isSysAdmin = false; canViewAll = false; - isSystemAdmin = false; notifications: NotificationDto[] = []; notificationsLoading = false; notificationsError = false; @@ -203,16 +202,14 @@ export class Header implements AfterViewInit, OnDestroy { private syncPermissions() { if (!isPlatformBrowser(this.platformId)) { - this.isAdmin = false; + this.isSysAdmin = false; this.canViewAll = false; - this.isSystemAdmin = false; return; } const isSysAdmin = this.authService.hasRole('sysadmin'); const isGestor = this.authService.hasRole('gestor'); - this.isAdmin = isSysAdmin; + this.isSysAdmin = isSysAdmin; this.canViewAll = isSysAdmin || isGestor; - this.isSystemAdmin = this.authService.hasRole('sysadmin'); } toggleMenu() { @@ -238,13 +235,13 @@ export class Header implements AfterViewInit, OnDestroy { } goToSystemProvisionUser() { - if (!this.isSystemAdmin) return; + if (!this.isSysAdmin) return; this.closeOptions(); this.router.navigate(['/system/fornecer-usuario']); } openCreateUserModal() { - if (!this.isAdmin) return; + if (!this.isSysAdmin) return; this.createUserOpen = true; this.closeOptions(); this.resetCreateUserState(); @@ -256,7 +253,7 @@ export class Header implements AfterViewInit, OnDestroy { } openManageUsersModal() { - if (!this.isAdmin) return; + if (!this.isSysAdmin) return; this.manageUsersOpen = true; this.closeOptions(); this.resetManageUsersState(); @@ -452,9 +449,8 @@ export class Header implements AfterViewInit, OnDestroy { this.authService.logout(); this.optionsOpen = false; this.notificationsOpen = false; - this.isAdmin = false; + this.isSysAdmin = false; this.canViewAll = false; - this.isSystemAdmin = false; this.router.navigate(['/']); } @@ -616,7 +612,7 @@ export class Header implements AfterViewInit, OnDestroy { this.createUserForm.markAllAsTouched(); return; } - if (!this.isAdmin) { + if (!this.isSysAdmin) { this.createUserForbidden = true; return; } diff --git a/src/app/guards/system-admin.guard.ts b/src/app/guards/sysadmin-only.guard.ts similarity index 80% rename from src/app/guards/system-admin.guard.ts rename to src/app/guards/sysadmin-only.guard.ts index b5fb227..6375a4a 100644 --- a/src/app/guards/system-admin.guard.ts +++ b/src/app/guards/sysadmin-only.guard.ts @@ -4,7 +4,7 @@ import { isPlatformBrowser } from '@angular/common'; import { AuthService } from '../services/auth.service'; -export const systemAdminGuard: CanActivateFn = () => { +export const sysadminOnlyGuard: CanActivateFn = () => { const router = inject(Router); const platformId = inject(PLATFORM_ID); const authService = inject(AuthService); @@ -18,8 +18,8 @@ export const systemAdminGuard: CanActivateFn = () => { return router.parseUrl('/login'); } - const isSystemAdmin = authService.hasRole('sysadmin'); - if (!isSystemAdmin) { + const isSysAdmin = authService.hasRole('sysadmin'); + if (!isSysAdmin) { return router.parseUrl('/dashboard'); } diff --git a/src/app/guards/admin.guard.ts b/src/app/guards/sysadmin-or-gestor.guard.ts similarity index 92% rename from src/app/guards/admin.guard.ts rename to src/app/guards/sysadmin-or-gestor.guard.ts index 276b26a..252bae1 100644 --- a/src/app/guards/admin.guard.ts +++ b/src/app/guards/sysadmin-or-gestor.guard.ts @@ -3,7 +3,7 @@ import { CanActivateFn, Router } from '@angular/router'; import { isPlatformBrowser } from '@angular/common'; import { AuthService } from '../services/auth.service'; -export const adminGuard: CanActivateFn = () => { +export const sysadminOrGestorGuard: CanActivateFn = () => { const router = inject(Router); const platformId = inject(PLATFORM_ID); const authService = inject(AuthService); diff --git a/src/app/pages/chips-controle-recebidos/chips-controle-recebidos.html b/src/app/pages/chips-controle-recebidos/chips-controle-recebidos.html index d65894f..513d6e6 100644 --- a/src/app/pages/chips-controle-recebidos/chips-controle-recebidos.html +++ b/src/app/pages/chips-controle-recebidos/chips-controle-recebidos.html @@ -36,14 +36,14 @@
- -
@@ -295,10 +295,10 @@ - - @@ -339,10 +339,10 @@ - - diff --git a/src/app/pages/chips-controle-recebidos/chips-controle-recebidos.ts b/src/app/pages/chips-controle-recebidos/chips-controle-recebidos.ts index 455911e..2885265 100644 --- a/src/app/pages/chips-controle-recebidos/chips-controle-recebidos.ts +++ b/src/app/pages/chips-controle-recebidos/chips-controle-recebidos.ts @@ -118,7 +118,7 @@ export class ChipsControleRecebidos implements OnInit, OnDestroy { controleDeleteOpen = false; controleDeleteTarget: ControleRecebidoListDto | null = null; - isAdmin = false; + isSysAdmin = false; constructor( @Inject(PLATFORM_ID) private platformId: object, @@ -129,7 +129,7 @@ export class ChipsControleRecebidos implements OnInit, OnDestroy { ngOnInit(): void { if (!isPlatformBrowser(this.platformId)) return; - this.isAdmin = this.authService.hasRole('sysadmin'); + this.isSysAdmin = this.authService.hasRole('sysadmin'); this.fetchChips(); this.fetchControle(); } @@ -236,7 +236,7 @@ export class ChipsControleRecebidos implements OnInit, OnDestroy { } openChipCreate() { - if (!this.isAdmin) return; + if (!this.isSysAdmin) return; this.chipCreateModel = { id: '', item: null, @@ -278,7 +278,7 @@ export class ChipsControleRecebidos implements OnInit, OnDestroy { } openChipEdit(row: ChipVirgemListDto) { - if (!this.isAdmin) return; + if (!this.isSysAdmin) return; this.service.getChipVirgemById(row.id).subscribe({ next: (data) => { this.chipEditingId = data.id; @@ -319,7 +319,7 @@ export class ChipsControleRecebidos implements OnInit, OnDestroy { } openChipDelete(row: ChipVirgemListDto) { - if (!this.isAdmin) return; + if (!this.isSysAdmin) return; this.chipDeleteTarget = row; this.chipDeleteOpen = true; } @@ -498,7 +498,7 @@ export class ChipsControleRecebidos implements OnInit, OnDestroy { } openControleCreate() { - if (!this.isAdmin) return; + if (!this.isSysAdmin) return; this.controleCreateModel = { id: '', ano: new Date().getFullYear(), @@ -603,7 +603,7 @@ export class ChipsControleRecebidos implements OnInit, OnDestroy { } openControleEdit(row: ControleRecebidoListDto) { - if (!this.isAdmin) return; + if (!this.isSysAdmin) return; this.service.getControleRecebidoById(row.id).subscribe({ next: (data) => { this.controleEditingId = data.id; @@ -659,7 +659,7 @@ export class ChipsControleRecebidos implements OnInit, OnDestroy { } openControleDelete(row: ControleRecebidoListDto) { - if (!this.isAdmin) return; + if (!this.isSysAdmin) return; this.controleDeleteTarget = row; this.controleDeleteOpen = true; } diff --git a/src/app/pages/dados-usuarios/dados-usuarios.html b/src/app/pages/dados-usuarios/dados-usuarios.html index 4e8cc2c..2e34ac1 100644 --- a/src/app/pages/dados-usuarios/dados-usuarios.html +++ b/src/app/pages/dados-usuarios/dados-usuarios.html @@ -32,7 +32,7 @@ - @@ -153,8 +153,8 @@
- - + +
diff --git a/src/app/pages/dados-usuarios/dados-usuarios.ts b/src/app/pages/dados-usuarios/dados-usuarios.ts index ca2a5c5..6ed40b2 100644 --- a/src/app/pages/dados-usuarios/dados-usuarios.ts +++ b/src/app/pages/dados-usuarios/dados-usuarios.ts @@ -103,7 +103,7 @@ export class DadosUsuarios implements OnInit { createClientsLoading = false; createLinesLoading = false; - isAdmin = false; + isSysAdmin = false; toastOpen = false; toastMessage = ''; toastType: 'success' | 'danger' = 'success'; @@ -117,7 +117,7 @@ export class DadosUsuarios implements OnInit { ) {} ngOnInit(): void { - this.isAdmin = this.authService.hasRole('sysadmin'); + this.isSysAdmin = this.authService.hasRole('sysadmin'); this.fetch(1); } @@ -283,7 +283,7 @@ export class DadosUsuarios implements OnInit { closeDetails() { this.detailsOpen = false; } openEdit(row: UserDataRow) { - if (!this.isAdmin) return; + if (!this.isSysAdmin) return; this.service.getById(row.id).subscribe({ next: (fullData: UserDataRow) => { this.editingId = fullData.id; @@ -366,7 +366,7 @@ export class DadosUsuarios implements OnInit { // CREATE // ========================== openCreate() { - if (!this.isAdmin) return; + if (!this.isSysAdmin) return; this.resetCreateModel(); this.createOpen = true; this.preloadGeralClients(); @@ -532,7 +532,7 @@ export class DadosUsuarios implements OnInit { } openDelete(row: UserDataRow) { - if (!this.isAdmin) return; + if (!this.isSysAdmin) return; this.deleteTarget = row; this.deleteOpen = true; } diff --git a/src/app/pages/faturamento/faturamento.html b/src/app/pages/faturamento/faturamento.html index 340d671..b8dc60b 100644 --- a/src/app/pages/faturamento/faturamento.html +++ b/src/app/pages/faturamento/faturamento.html @@ -286,8 +286,8 @@
- - + +
diff --git a/src/app/pages/faturamento/faturamento.ts b/src/app/pages/faturamento/faturamento.ts index d001fb7..0c46cbb 100644 --- a/src/app/pages/faturamento/faturamento.ts +++ b/src/app/pages/faturamento/faturamento.ts @@ -105,7 +105,7 @@ export class Faturamento implements AfterViewInit, OnDestroy { deleteOpen = false; deleteTarget: BillingItem | null = null; - isAdmin = false; + isSysAdmin = false; private searchTimer: any = null; private searchResolvedClients: string[] = []; @@ -164,7 +164,7 @@ export class Faturamento implements AfterViewInit, OnDestroy { if (!isPlatformBrowser(this.platformId)) return; this.initAnimations(); - this.isAdmin = this.authService.hasRole('sysadmin'); + this.isSysAdmin = this.authService.hasRole('sysadmin'); setTimeout(() => { this.refreshData(true); @@ -714,7 +714,7 @@ export class Faturamento implements AfterViewInit, OnDestroy { } onEditar(r: BillingItem) { - if (!this.isAdmin) return; + if (!this.isSysAdmin) return; this.editingId = r.id; this.editModel = { ...r }; this.editOpen = true; @@ -729,7 +729,7 @@ export class Faturamento implements AfterViewInit, OnDestroy { } onDelete(r: BillingItem) { - if (!this.isAdmin) return; + if (!this.isSysAdmin) return; this.deleteTarget = r; this.deleteOpen = true; this.cdr.detectChanges(); diff --git a/src/app/pages/geral/geral.html b/src/app/pages/geral/geral.html index 0c17394..c845975 100644 --- a/src/app/pages/geral/geral.html +++ b/src/app/pages/geral/geral.html @@ -35,7 +35,7 @@ +
+ + + + + + + + + + +
@@ -334,7 +362,7 @@ LINHA USUÁRIO STATUS - VENCIMENTO + VENCIMENTO AÇÕES @@ -351,23 +379,29 @@ [attr.aria-label]="'Selecionar linha ' + (r.linha || r.item)" /> + {{ r.item }} + {{ r.linha }}
ICCID: {{ r.chip }}
+ {{ r.usuario || '-' }} + {{ statusLabel(r.status) }} - {{ r.contrato }} + + {{ r.contrato }} +
- +
@@ -479,14 +513,14 @@ {{ statusLabel(r.status) }} {{ r.skil }} - {{ r.contrato }} + {{ r.contrato }}
- +
diff --git a/src/app/pages/geral/geral.ts b/src/app/pages/geral/geral.ts index 7ef3ceb..7ec7db1 100644 --- a/src/app/pages/geral/geral.ts +++ b/src/app/pages/geral/geral.ts @@ -274,7 +274,7 @@ export class Geral implements OnInit, AfterViewInit, OnDestroy { return `${apiBase}/templates`; })(); loading = false; - isAdmin = false; + isSysAdmin = false; isGestor = false; isClientRestricted = false; @@ -691,9 +691,9 @@ export class Geral implements OnInit, AfterViewInit, OnDestroy { ngOnInit(): void { if (!isPlatformBrowser(this.platformId)) return; - this.isAdmin = this.authService.hasRole('sysadmin'); + this.isSysAdmin = this.authService.hasRole('sysadmin'); this.isGestor = this.authService.hasRole('gestor'); - this.isClientRestricted = !(this.isAdmin || this.isGestor); + this.isClientRestricted = !(this.isSysAdmin || this.isGestor); if (this.isClientRestricted) { this.filterSkil = 'ALL'; @@ -1760,7 +1760,7 @@ export class Geral implements OnInit, AfterViewInit, OnDestroy { } async onImportExcel() { - if (!this.isAdmin) { + if (!this.isSysAdmin) { await this.showToast('Você não tem permissão para importar planilha.'); return; } @@ -1771,7 +1771,7 @@ export class Geral implements OnInit, AfterViewInit, OnDestroy { } onExcelSelected(ev: Event) { - if (!this.isAdmin) return; + if (!this.isSysAdmin) return; const file = (ev.target as HTMLInputElement).files?.[0]; if (!file) return; @@ -1961,7 +1961,7 @@ export class Geral implements OnInit, AfterViewInit, OnDestroy { } async onRemover(r: LineRow, fromGroup = false) { - if (!this.isAdmin) { + if (!this.isSysAdmin) { await this.showToast('Apenas sysadmin pode remover linhas.'); return; } diff --git a/src/app/pages/login/login.html b/src/app/pages/login/login.html index e66cde4..d3ae823 100644 --- a/src/app/pages/login/login.html +++ b/src/app/pages/login/login.html @@ -21,7 +21,7 @@ type="email" id="email" formControlName="username" - placeholder="admin@empresa.com" + placeholder="usuario@empresa.com" [class.error]="hasError('username')" >
E-mail obrigatório ou inválido.
diff --git a/src/app/pages/parcelamentos/components/parcelamentos-table/parcelamentos-table.html b/src/app/pages/parcelamentos/components/parcelamentos-table/parcelamentos-table.html index db3af8f..fb8c03c 100644 --- a/src/app/pages/parcelamentos/components/parcelamentos-table/parcelamentos-table.html +++ b/src/app/pages/parcelamentos/components/parcelamentos-table/parcelamentos-table.html @@ -113,7 +113,7 @@ type="button" title="Excluir" aria-label="Excluir" - *ngIf="isAdmin" + *ngIf="isSysAdmin" (click)="remove.emit(row)"> diff --git a/src/app/pages/parcelamentos/components/parcelamentos-table/parcelamentos-table.ts b/src/app/pages/parcelamentos/components/parcelamentos-table/parcelamentos-table.ts index fa8d84e..45a2629 100644 --- a/src/app/pages/parcelamentos/components/parcelamentos-table/parcelamentos-table.ts +++ b/src/app/pages/parcelamentos/components/parcelamentos-table/parcelamentos-table.ts @@ -26,7 +26,7 @@ export class ParcelamentosTableComponent { @Input() items: ParcelamentoViewItem[] = []; @Input() loading = false; @Input() errorMessage = ''; - @Input() isAdmin = false; + @Input() isSysAdmin = false; @Input() segment: ParcelamentoSegment = 'todos'; @Input() segmentCounts: Record = { diff --git a/src/app/pages/parcelamentos/parcelamentos.html b/src/app/pages/parcelamentos/parcelamentos.html index 619e398..1697b20 100644 --- a/src/app/pages/parcelamentos/parcelamentos.html +++ b/src/app/pages/parcelamentos/parcelamentos.html @@ -65,7 +65,7 @@ [total]="total" [pageSize]="pageSize" [pageSizeOptions]="pageSizeOptions" - [isAdmin]="isAdmin" + [isSysAdmin]="isSysAdmin" (segmentChange)="setSegment($event)" (detail)="openDetails($event)" (edit)="openEdit($event)" diff --git a/src/app/pages/parcelamentos/parcelamentos.ts b/src/app/pages/parcelamentos/parcelamentos.ts index c879fe2..0b2d3f1 100644 --- a/src/app/pages/parcelamentos/parcelamentos.ts +++ b/src/app/pages/parcelamentos/parcelamentos.ts @@ -87,7 +87,7 @@ export class Parcelamentos implements OnInit, OnDestroy { kpiCards: ParcelamentoKpi[] = []; activeChips: FilterChip[] = []; - isAdmin = false; + isSysAdmin = false; detailOpen = false; detailLoading = false; @@ -158,7 +158,7 @@ export class Parcelamentos implements OnInit, OnDestroy { } private syncPermissions(): void { - this.isAdmin = this.authService.hasRole('sysadmin'); + this.isSysAdmin = this.authService.hasRole('sysadmin'); } get totalPages(): number { @@ -440,7 +440,7 @@ export class Parcelamentos implements OnInit, OnDestroy { } openDelete(item: ParcelamentoViewItem): void { - if (!this.isAdmin) return; + if (!this.isSysAdmin) return; this.deleteTarget = item; this.deleteError = ''; this.deleteOpen = true; diff --git a/src/app/pages/system-provision-user/system-provision-user.html b/src/app/pages/system-provision-user/system-provision-user.html index 983d7d6..6608e61 100644 --- a/src/app/pages/system-provision-user/system-provision-user.html +++ b/src/app/pages/system-provision-user/system-provision-user.html @@ -7,7 +7,7 @@
- SYSTEM ADMIN + SYSADMIN

Fornecer Usuário para Cliente

Selecione um tenant-cliente e crie credenciais de acesso sem misturar tenants.

diff --git a/src/app/pages/system-provision-user/system-provision-user.ts b/src/app/pages/system-provision-user/system-provision-user.ts index 90ea561..bb60f0b 100644 --- a/src/app/pages/system-provision-user/system-provision-user.ts +++ b/src/app/pages/system-provision-user/system-provision-user.ts @@ -11,10 +11,10 @@ import { } from '@angular/forms'; import { - SystemAdminService, + SysadminService, SystemTenantDto, CreateSystemTenantUserResponse, -} from '../../services/system-admin.service'; +} from '../../services/sysadmin.service'; type RoleOption = { value: string; @@ -50,7 +50,7 @@ export class SystemProvisionUserPage implements OnInit { constructor( private fb: FormBuilder, - private systemAdminService: SystemAdminService + private sysadminService: SysadminService ) { this.provisionForm = this.fb.group( { @@ -75,7 +75,7 @@ export class SystemProvisionUserPage implements OnInit { this.tenantsLoading = true; this.tenantsError = ''; - this.systemAdminService + this.sysadminService .listTenants({ source: this.sourceType, active: true }) .subscribe({ next: (tenants) => { @@ -133,7 +133,7 @@ export class SystemProvisionUserPage implements OnInit { this.submitting = true; this.setFormDisabled(true); - this.systemAdminService + this.sysadminService .createTenantUser(tenantId, { name: nameRaw, email, diff --git a/src/app/pages/vigencia/vigencia.html b/src/app/pages/vigencia/vigencia.html index 499e57b..1ae2d25 100644 --- a/src/app/pages/vigencia/vigencia.html +++ b/src/app/pages/vigencia/vigencia.html @@ -24,7 +24,7 @@ Controle de contratos e fidelização
-
@@ -157,8 +157,8 @@ Renovar +2 anos - - + + diff --git a/src/app/pages/vigencia/vigencia.ts b/src/app/pages/vigencia/vigencia.ts index 725b26a..31d1148 100644 --- a/src/app/pages/vigencia/vigencia.ts +++ b/src/app/pages/vigencia/vigencia.ts @@ -100,7 +100,7 @@ export class VigenciaComponent implements OnInit, OnDestroy { clientsFromGeral: string[] = []; planOptions: string[] = []; - isAdmin = false; + isSysAdmin = false; toastOpen = false; toastMessage = ''; toastType: ToastType = 'success'; @@ -117,7 +117,7 @@ export class VigenciaComponent implements OnInit, OnDestroy { ) {} ngOnInit(): void { - this.isAdmin = this.authService.hasRole('sysadmin'); + this.isSysAdmin = this.authService.hasRole('sysadmin'); this.loadClients(); this.loadPlanRules(); this.fetch(1); @@ -314,7 +314,7 @@ export class VigenciaComponent implements OnInit, OnDestroy { closeDetails() { this.detailsOpen = false; } openEdit(r: VigenciaRow) { - if (!this.isAdmin) return; + if (!this.isSysAdmin) return; this.editingId = r.id; this.editModel = { ...r }; this.editEfetivacao = this.toDateInput(r.dtEfetivacaoServico); @@ -365,7 +365,7 @@ export class VigenciaComponent implements OnInit, OnDestroy { // CREATE // ========================== openCreate() { - if (!this.isAdmin) return; + if (!this.isSysAdmin) return; this.resetCreateModel(); this.createOpen = true; this.preloadGeralClients(); @@ -544,7 +544,7 @@ export class VigenciaComponent implements OnInit, OnDestroy { } openDelete(r: VigenciaRow) { - if (!this.isAdmin) return; + if (!this.isSysAdmin) return; this.deleteTarget = r; this.deleteOpen = true; } @@ -613,7 +613,7 @@ export class VigenciaComponent implements OnInit, OnDestroy { private openVigenciaLineById(lineId: string, openMode: string): void { this.vigenciaService.getById(lineId).subscribe({ next: (row) => { - if (this.isAdmin && openMode !== 'details') { + if (this.isSysAdmin && openMode !== 'details') { this.openEdit(row); return; } @@ -643,7 +643,7 @@ export class VigenciaComponent implements OnInit, OnDestroy { return; } - if (this.isAdmin && openMode !== 'details') { + if (this.isSysAdmin && openMode !== 'details') { this.openEdit(match); return; } diff --git a/src/app/services/system-admin.service.ts b/src/app/services/sysadmin.service.ts similarity index 97% rename from src/app/services/system-admin.service.ts rename to src/app/services/sysadmin.service.ts index 044183d..a43b9e9 100644 --- a/src/app/services/system-admin.service.ts +++ b/src/app/services/sysadmin.service.ts @@ -29,7 +29,7 @@ export type CreateSystemTenantUserResponse = { }; @Injectable({ providedIn: 'root' }) -export class SystemAdminService { +export class SysadminService { private readonly baseApi: string; constructor(private http: HttpClient) {