From c257ed7e6f79ffdc511f058fe65bb83d0d08bba6 Mon Sep 17 00:00:00 2001 From: Mazdak Gibran <141390141+mazdakgibran@users.noreply.github.com> Date: Thu, 18 Dec 2025 09:55:05 +0500 Subject: [PATCH 1/2] SMS Gateway design implementation of SMS Gateway --- .../sms-gateway/sms-gateway.component.html | 280 +++++++++++++++++- src/app/sms-gateway/sms-gateway.component.ts | 7 +- src/assets/i18n/Arabic.json | 8 +- src/assets/i18n/English.json | 10 +- 4 files changed, 298 insertions(+), 7 deletions(-) diff --git a/src/app/sms-gateway/sms-gateway.component.html b/src/app/sms-gateway/sms-gateway.component.html index fbff712..de3346f 100644 --- a/src/app/sms-gateway/sms-gateway.component.html +++ b/src/app/sms-gateway/sms-gateway.component.html @@ -1 +1,279 @@ -

sms-gateway works!

+
+
+
+
+
+ +
+
+ +
+
+
+
+
+
+
+
+
+
+ {{selectedGateway || 'smsGateway' | translate}} + +
+
+
+
+
+
+ +
+
+ + + +
+ +
+
+ +
+
+
+ +
+ + + + + +
+
+
+ +
+
+
+
+ +
+ + + + +
+
+
+
+ +
+
+ +
+
+
+ +
+
+ + +
+
+ + +
+
+
+
+
+
+ +
+
+ + +
+
+ + +
+
+
+
+
+ +
+
+ + + +
+
+ + +
+
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+ +
+
+
+
+ +
+
+
+ +
+ +
+
+
+
+ +
+
+ +
+
+
+ +
+
+ + +
+
+ + +
+
+
+
+
+
+ +
+
+ + +
+
+ + +
+
+
+
+
+ +
+
+ +
+
+
+ +
+
+
+
+
+
+
+
+
+
+ +
+
+
\ No newline at end of file diff --git a/src/app/sms-gateway/sms-gateway.component.ts b/src/app/sms-gateway/sms-gateway.component.ts index 88205c2..48c153f 100644 --- a/src/app/sms-gateway/sms-gateway.component.ts +++ b/src/app/sms-gateway/sms-gateway.component.ts @@ -1,11 +1,16 @@ +import { CommonModule } from '@angular/common'; import { Component } from '@angular/core'; +import { FormsModule } from '@angular/forms'; +import { NgSelectComponent } from '@ng-select/ng-select'; +import { TranslateModule } from '@ngx-translate/core'; @Component({ selector: 'app-sms-gateway', - imports: [], + imports: [TranslateModule, FormsModule, CommonModule], templateUrl: './sms-gateway.component.html', styleUrl: './sms-gateway.component.scss' }) export class SmsGatewayComponent { +selectedGateway: string = ''; } diff --git a/src/assets/i18n/Arabic.json b/src/assets/i18n/Arabic.json index 5130ffc..204f834 100644 --- a/src/assets/i18n/Arabic.json +++ b/src/assets/i18n/Arabic.json @@ -116,9 +116,13 @@ "SyriatelCredentials":"أوراق اعتماد سيريتل", "TwilioCredentials":"أوراق اعتماد تويليو", "JazzCredentials":"أوراق اعتماد جاز", - "AccountSID":"الحساب SID", - "AuthToken":"رمز المصادقة", + "accountSID":"الحساب SID", + "authToken":"رمز المصادقة", "fromNumber":"من الرقم", + "message": "رسالة", + "template": "قالب", + "language":"اللغة", + "notificationType": "نوع الإشعار", "sinceLastDay":"منذ اليوم الماضي", "TodayTotalErrorRequest":"طلب إجمالي الخطأ اليوم", "TodayTotalPendingSms":"مجموع الرسائل القصيرة المعلقة اليوم", diff --git a/src/assets/i18n/English.json b/src/assets/i18n/English.json index e435561..cdf4512 100644 --- a/src/assets/i18n/English.json +++ b/src/assets/i18n/English.json @@ -71,10 +71,13 @@ "smsBankingChildTitle":"SMS Logger", "smsTrackingID":"Tracking ID", "smsMessage":"Message", + "message": "Message", + "template": "Template", "smsNo":"Phone Number", "smsOrgaCode":"Organization Code", "smsDate":"Date", "smsStatus":"Status", + "language":"Language", "viewThirdPartyAccounts":"View Accounts", "ThirdPartyID":"Third Party ID", "name":"Name", @@ -115,9 +118,10 @@ "SyriatelCredentials":"Syriatel Credentials", "TwilioCredentials":"Twilio Credentials", "JazzCredentials":"Jazz Credentials", - "AccountSID":"Account SID", - "AuthToken":"Auth Token", + "accountSID":"Account SID", + "authToken":"Auth Token", "fromNumber":"From Number", + "notificationType":"Notification Type", "sinceLastDay":"Since last day", "TodayTotalErrorRequest":"Today Total Error Request", "TodayTotalPendingSms":"Today Total Pending Sms", @@ -159,7 +163,7 @@ "feedbackSetup": "Feedback Setup", "credentials": "Credentials", "credentialsTitle": "Feedback Credentials Setup", - "passwordPlaceholder": "Enter password", + "passwordPlaceholder": "Enter Password", "confirmPasswordPlaceholder": "Enter confirm password", "newPasswordPlaceholder": "Enter new password", "confirmPassword": "Confirm Password", -- 2.32.0 From a6a38d068e14b1009d14897a8088038434ad9115 Mon Sep 17 00:00:00 2001 From: Mazdak Gibran <141390141+mazdakgibran@users.noreply.github.com> Date: Thu, 18 Dec 2025 11:38:32 +0500 Subject: [PATCH 2/2] sms gateway screen sms gateway screen dynamically renders different forms --- src/app/sms-gateway/sms-gateway.component.html | 11 ++++++----- src/app/sms-gateway/sms-gateway.component.ts | 2 ++ src/app/utils/enums.ts | 6 ++++++ src/assets/i18n/Arabic.json | 8 +++++--- src/assets/i18n/English.json | 6 +++--- 5 files changed, 22 insertions(+), 11 deletions(-) diff --git a/src/app/sms-gateway/sms-gateway.component.html b/src/app/sms-gateway/sms-gateway.component.html index de3346f..c9abc50 100644 --- a/src/app/sms-gateway/sms-gateway.component.html +++ b/src/app/sms-gateway/sms-gateway.component.html @@ -20,12 +20,13 @@
- {{selectedGateway || 'smsGateway' | translate}} + + {{(selectedGateway === selectedGatewayType.SYRIATEL ? 'syriatelCredentials' : (selectedGateway === selectedGatewayType.TWILIO ? 'twilioCredentials' : (selectedGateway === selectedGatewayType.JAZZ ? 'jazzCredentials' : ''))) | translate}}
diff --git a/src/app/sms-gateway/sms-gateway.component.ts b/src/app/sms-gateway/sms-gateway.component.ts index 48c153f..0b3e169 100644 --- a/src/app/sms-gateway/sms-gateway.component.ts +++ b/src/app/sms-gateway/sms-gateway.component.ts @@ -3,6 +3,7 @@ import { Component } from '@angular/core'; import { FormsModule } from '@angular/forms'; import { NgSelectComponent } from '@ng-select/ng-select'; import { TranslateModule } from '@ngx-translate/core'; +import { selectedGatewayType } from '../utils/enums'; @Component({ selector: 'app-sms-gateway', @@ -12,5 +13,6 @@ import { TranslateModule } from '@ngx-translate/core'; }) export class SmsGatewayComponent { selectedGateway: string = ''; +selectedGatewayType = selectedGatewayType } diff --git a/src/app/utils/enums.ts b/src/app/utils/enums.ts index 73cc2c1..076b4cc 100644 --- a/src/app/utils/enums.ts +++ b/src/app/utils/enums.ts @@ -18,4 +18,10 @@ export enum directions{ export enum APP_URL_KEY{ API_PATH = 'API_PATH' +} + +export enum selectedGatewayType{ + SYRIATEL = 'Syriatel', + TWILIO = 'Twilio', + JAZZ = 'Jazz' } \ No newline at end of file diff --git a/src/assets/i18n/Arabic.json b/src/assets/i18n/Arabic.json index 204f834..24865ce 100644 --- a/src/assets/i18n/Arabic.json +++ b/src/assets/i18n/Arabic.json @@ -113,12 +113,14 @@ "SMSGatewaySyriatel":"سيريتل", "SMSGatewayTwillio":"تويليو", "SMSGatewayJazz":"جاز", - "SyriatelCredentials":"أوراق اعتماد سيريتل", - "TwilioCredentials":"أوراق اعتماد تويليو", - "JazzCredentials":"أوراق اعتماد جاز", + "syriatelCredentials":"أوراق اعتماد سيريتل", + "twilioCredentials":"أوراق اعتماد تويليو", + "jazzCredentials":"أوراق اعتماد جاز", "accountSID":"الحساب SID", "authToken":"رمز المصادقة", "fromNumber":"من الرقم", + "senderName":"اسم المرسل", + "senderNamePlaceHolder":"أدخل اسم المرسل", "message": "رسالة", "template": "قالب", "language":"اللغة", diff --git a/src/assets/i18n/English.json b/src/assets/i18n/English.json index cdf4512..318aaf3 100644 --- a/src/assets/i18n/English.json +++ b/src/assets/i18n/English.json @@ -115,9 +115,9 @@ "SMSGatewaySyriatel":"Syriatel", "SMSGatewayTwillio":"Twilio", "SMSGatewayJazz":"Jazz", - "SyriatelCredentials":"Syriatel Credentials", - "TwilioCredentials":"Twilio Credentials", - "JazzCredentials":"Jazz Credentials", + "syriatelCredentials":"Syriatel Credentials", + "twilioCredentials":"Twilio Credentials", + "jazzCredentials":"Jazz Credentials", "accountSID":"Account SID", "authToken":"Auth Token", "fromNumber":"From Number", -- 2.32.0