Skip to content

ProcessApprovallService

reference
1 min readUpdated

Kind: Class

Source: Frontend/src/app/services/configurations/process-approvall/process-approvall.service.ts (line 57)

Part of: Frontend

ProcessApprovallService manages process-approval and two-way-authentication configuration requests in the frontend. Components call it to save settings and retrieve approval-process and authentication-setting data from the configuration layer.

Methods

MethodSignatureReturns
saveProcessApprovallSettingssaveProcessApprovallSettings(company: Company)void
getApprovalProsseslistgetApprovalProsseslist()void
save2wayAuthenticationsSettingssave2wayAuthenticationsSettings(doubleFactor: undefined)void
get2wayAuthenticationsSettingsget2wayAuthenticationsSettings()void

Diagram

mermaid
graph LR
  Component --> ProcessApprovallService
  ProcessApprovallService --> SaveApproval[saveProcessApprovallSettings]
  ProcessApprovallService --> GetApprovals[getApprovalProsseslist]
  ProcessApprovallService --> SaveAuthentication[save2wayAuthenticationsSettings]
  ProcessApprovallService --> GetAuthentication[get2wayAuthenticationsSettings]
  SaveApproval --> ConfigurationAPI
  GetApprovals --> ConfigurationAPI
  SaveAuthentication --> ConfigurationAPI
  GetAuthentication --> ConfigurationAPI

Usage

ts
import { Component, OnInit } from '@angular/core';
import { ProcessApprovallService } from './services/configurations/process-approvall/process-approvall.service';

@Component({
  selector: 'app-process-approval-settings',
  template: `<!-- settings form -->`,
})
export class ProcessApprovalSettingsComponent implements OnInit {
  constructor(
    private readonly processApprovallService: ProcessApprovallService,
  ) {}

  ngOnInit(): void {
    this.processApprovallService.getApprovalProsseslist().subscribe((processes) => {
      console.log('Approval processes:', processes);
    });

    this.processApprovallService.get2wayAuthenticationsSettings().subscribe((settings) => {
      console.log('Authentication settings:', settings);
    });
  }

  save(): void {
    this.processApprovallService.saveProcessApprovallSettings().subscribe();
    this.processApprovallService.save2wayAuthenticationsSettings().subscribe();
  }
}

AI Coding Instructions

  • Inject ProcessApprovallService into configuration components instead of calling configuration endpoints directly.
  • Keep the existing method names unchanged, including ProcessApprovall and getApprovalProsseslist.
  • Subscribe to service results in the calling component and handle loading and error states there.
  • Keep process-approval settings separate from two-way-authentication settings when wiring forms and save actions.

Used by

3 references from 3 files. Each is a place in this repository where the symbol is actually used — go read one rather than trusting an example.

Imported by (3)

  • DoubleWayAuthenticationComponentFrontend/src/app/components/configuration/double-way-authentication/double-way-authentication.component.ts:1
  • ProcessApprovallComponentFrontend/src/app/components/configuration/process-approvall/process-approvall.component.ts:1
  • PamsServicesModuleFrontend/src/app/services/pams-services.module.ts:1

Was this page helpful?

Download as PDF