mirror of
https://github.com/andwati/zitadel.git
synced 2026-10-29 18:42:15 +00:00
fix(console): update Twilio sms provider settings (#6732)
fix: update sms provider settings Co-authored-by: Elio Bischof <[email protected]>
This commit is contained in:
co-authored by
Elio Bischof
parent
b4fd566746
commit
36eeae1071
+1
-1
@@ -18,7 +18,7 @@
|
||||
<input cnslInput name="senderNumber" formControlName="senderNumber" />
|
||||
</cnsl-form-field>
|
||||
|
||||
<button *ngIf="twilio" type="button" mat-stroked-button (click)="changeToken()">
|
||||
<button *ngIf="twilio" type="button" mat-stroked-button (click)="changeToken()" data-e2e="edit-sms-token-button">
|
||||
{{ 'SETTING.SMS.TWILIO.CHANGETOKEN' | translate }}
|
||||
</button>
|
||||
</form>
|
||||
|
||||
+2
-3
@@ -61,15 +61,14 @@ export class DialogAddSMSProviderComponent {
|
||||
}
|
||||
|
||||
public closeDialogWithRequest(): void {
|
||||
if (!!this.twilio) {
|
||||
if (!!this.twilio && this.twilioProvider && this.twilioProvider.id) {
|
||||
this.req = new UpdateSMSProviderTwilioRequest();
|
||||
|
||||
this.req.setId(this.twilioProvider.id);
|
||||
this.req.setSid(this.sid?.value);
|
||||
this.req.setSenderNumber(this.senderNumber?.value);
|
||||
this.dialogRef.close(this.req);
|
||||
} else {
|
||||
this.req = new AddSMSProviderTwilioRequest();
|
||||
|
||||
this.req.setSid(this.sid?.value);
|
||||
this.req.setToken(this.token?.value);
|
||||
this.req.setSenderNumber(this.senderNumber?.value);
|
||||
|
||||
+1
@@ -24,6 +24,7 @@
|
||||
*ngIf="twilio && twilio.id"
|
||||
[disabled]="(['iam.write'] | hasRole | async) === false"
|
||||
mat-stroked-button
|
||||
data-e2e="activate-sms-provider-button"
|
||||
(click)="toggleSMSProviderState(twilio.id)"
|
||||
>
|
||||
<span *ngIf="twilio.state === SMSProviderConfigState.SMS_PROVIDER_CONFIG_ACTIVE">{{
|
||||
|
||||
+2
-1
@@ -33,6 +33,7 @@ export class NotificationSMSProviderComponent implements OnInit {
|
||||
ngOnInit(): void {
|
||||
this.fetchData();
|
||||
}
|
||||
|
||||
private fetchData(): void {
|
||||
this.smsProvidersLoading = true;
|
||||
this.service
|
||||
@@ -63,7 +64,7 @@ export class NotificationSMSProviderComponent implements OnInit {
|
||||
this.service
|
||||
.updateSMSProviderTwilio(req as UpdateSMSProviderTwilioRequest)
|
||||
.then(() => {
|
||||
this.toast.showInfo('SETTING.SMS.TWILIO.ADDED', true);
|
||||
this.toast.showInfo('SETTING.SMS.TWILIO.UPDATED', true);
|
||||
this.fetchData();
|
||||
})
|
||||
.catch((error) => {
|
||||
|
||||
Reference in New Issue
Block a user