dcb-backoffice/src/app/modules/operators/config/config.ts

36 lines
1.1 KiB
TypeScript

import { Component } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { UiCard } from '@app/components/ui-card';
import { InputFields } from '@/app/modules/components/input-fields';
import { CheckboxesAndRadios } from '@/app/modules/components/checkboxes-and-radios';
import { InputTouchspin } from '@/app/modules/components/input-touchspin';
@Component({
selector: 'app-operator-config',
//imports: [FormsModule, UiCard, InputFields, CheckboxesAndRadios, InputTouchspin],
templateUrl: './config.html',
})
export class OperatorsConfig {
operatorConfig = {
name: '',
apiEndpoint: '',
apiKey: '',
secretKey: '',
timeout: 30,
retryAttempts: 3,
webhookUrl: '',
isActive: true,
supportedCountries: [] as string[],
supportedServices: ['DCB', 'SMS', 'USSD']
};
countries = ['CIV', 'SEN', 'CMR', 'COD', 'TUN', 'BFA', 'MLI', 'GIN'];
saveConfig() {
console.log('Saving operator config:', this.operatorConfig);
}
testConnection() {
console.log('Testing connection to:', this.operatorConfig.apiEndpoint);
}
}