Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,26 @@
"labels": {
"is-active": "Aktiv",
"name": "Benachrichtigungsname",
"number": "Telefonnummer"
"number": "Telefonnummer",
"add-optional-email-fields": "Optionale E-Mail-Felder hinzufügen",
"add-optional-fields": "CC, BCC oder Antwort an hinzufügen",
"add-cc": "CC hinzufügen",
"add-bcc": "BCC hinzufügen",
"add-reply-to": "Antwort an hinzufügen",
"system-from": "System - Von",
"system-to": "System - An",
"add-system-from": "System Von hinzufügen",
"add-system-to": "System An hinzufügen"
},
"placeholders": {
"number": "Telefonnummer für Textnachricht"
"number": "Telefonnummer für Textnachricht",
"system-from": "Absender-E-Mail-Adresse eingeben",
"system-to": "Empfänger-E-Mail-Adresse eingeben"
},
"descriptions": {
"number": "Telefonnummer, die die Textnachricht (SMS) Benachrichtigung erhält"
"number": "Telefonnummer, die die Textnachricht (SMS) Benachrichtigung erhält",
"system-from": "Hinweis: Normalerweise leer lassen. Der Geschäftscode ersetzt dies in der Regel durch die tatsächliche Shop-Absenderadresse. Nur für benutzerdefinierte Systembenachrichtigungen verwenden.",
"system-to": "Hinweis: Normalerweise leer lassen. Der Geschäftscode ersetzt dies in der Regel durch die echte Kunden-E-Mail-Adresse. Nur für benutzerdefinierte Systembenachrichtigungen verwenden."
}
},
"filter-detail": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,26 @@
"labels": {
"is-active": "Active",
"name": "Notification name",
"number": "Phone number"
"number": "Phone number",
"add-optional-email-fields": "Add optional email fields",
"add-optional-fields": "Add CC, BCC or Reply-To",
"add-cc": "Add CC",
"add-bcc": "Add BCC",
"add-reply-to": "Add Reply-To",
"system-from": "System - From",
"system-to": "System - To",
"add-system-from": "Add System From",
"add-system-to": "Add System To"
},
"placeholders": {
"number": "Text message phone number"
"number": "Text message phone number",
"system-from": "Enter sender email address",
"system-to": "Enter recipient email address"
},
"descriptions": {
"number": "Phone number that will get the text message (SMS) notification"
"number": "Phone number that will get the text message (SMS) notification",
"system-from": "Note: Usually left blank. Business code will typically replace this with the actual store sender address. Use only for custom system notifications.",
"system-to": "Note: Usually left blank. Business code will typically replace this with the real customer email address. Use only for custom system notifications."
}
},
"filter-detail": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,26 @@
"labels": {
"is-active": "Activo",
"name": "Nombre de la notificación",
"number": "Número de teléfono"
"number": "Número de teléfono",
"add-optional-email-fields": "Agregar campos de correo opcionales",
"add-optional-fields": "Agregar CC, CCO o Responder a",
"add-cc": "Agregar CC",
"add-bcc": "Agregar CCO",
"add-reply-to": "Agregar Responder a",
"system-from": "Sistema - De",
"system-to": "Sistema - Para",
"add-system-from": "Agregar Sistema De",
"add-system-to": "Agregar Sistema Para"
},
"placeholders": {
"number": "Número de teléfono para el mensaje de texto"
"number": "Número de teléfono para el mensaje de texto",
"system-from": "Ingrese la dirección de correo del remitente",
"system-to": "Ingrese la dirección de correo del destinatario"
},
"descriptions": {
"number": "Número de teléfono que recibirá la notificación (SMS)"
"number": "Número de teléfono que recibirá la notificación (SMS)",
"system-from": "Nota: Normalmente se deja en blanco. El código de negocio reemplazará esto con la dirección de remitente real de la tienda. Úselo solo para notificaciones personalizadas del sistema.",
"system-to": "Nota: Normalmente se deja en blanco. El código de negocio reemplazará esto con la dirección de correo real del cliente. Úselo solo para notificaciones personalizadas del sistema."
}
},
"filter-detail": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,26 @@
"labels": {
"is-active": "Actif",
"name": "Nom de la notification",
"number": "Numéro de téléphone"
"number": "Numéro de téléphone",
"add-optional-email-fields": "Ajouter des champs d'e-mail facultatifs",
"add-optional-fields": "Ajouter CC, CCI ou Répondre à",
"add-cc": "Ajouter CC",
"add-bcc": "Ajouter CCI",
"add-reply-to": "Ajouter Répondre à",
"system-from": "Système - De",
"system-to": "Système - À",
"add-system-from": "Ajouter Système De",
"add-system-to": "Ajouter Système À"
},
"placeholders": {
"number": "Numéro de téléphone pour les messages texte"
"number": "Numéro de téléphone pour les messages texte",
"system-from": "Entrez l'adresse e-mail de l'expéditeur",
"system-to": "Entrez l'adresse e-mail du destinataire"
},
"descriptions": {
"number": "Numéro de téléphone qui recevra la notification par message texte (SMS)"
"number": "Numéro de téléphone qui recevra la notification par message texte (SMS)",
"system-from": "Note: Généralement laissé vide. Le code métier remplacera ceci par l'adresse d'expéditeur réelle du magasin. À utiliser uniquement pour les notifications système personnalisées.",
"system-to": "Note: Généralement laissé vide. Le code métier remplacera ceci par l'adresse e-mail réelle du client. À utiliser uniquement pour les notifications système personnalisées."
}
},
"filter-detail": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,26 @@
"labels": {
"is-active": "Attivo",
"name": "Nome della notifica",
"number": "Numero di telefono"
"number": "Numero di telefono",
"add-optional-email-fields": "Aggiungi campi email facoltativi",
"add-optional-fields": "Aggiungi CC, CCN o Rispondi a",
"add-cc": "Aggiungi CC",
"add-bcc": "Aggiungi CCN",
"add-reply-to": "Aggiungi Rispondi a",
"system-from": "Sistema - Da",
"system-to": "Sistema - A",
"add-system-from": "Aggiungi Sistema Da",
"add-system-to": "Aggiungi Sistema A"
},
"placeholders": {
"number": "Numero di telefono per il messaggio di testo"
"number": "Numero di telefono per il messaggio di testo",
"system-from": "Inserisci indirizzo email del mittente",
"system-to": "Inserisci indirizzo email del destinatario"
},
"descriptions": {
"number": "Numero di telefono che riceverà la notifica (SMS)"
"number": "Numero di telefono che riceverà la notifica (SMS)",
"system-from": "Nota: Generalmente lasciato vuoto. Il codice aziendale sostituirà questo con l'indirizzo del mittente effettivo del negozio. Usare solo per notifiche di sistema personalizzate.",
"system-to": "Nota: Generalmente lasciato vuoto. Il codice aziendale sostituirà questo con l'indirizzo email reale del cliente. Usare solo per notifiche di sistema personalizzate."
}
},
"filter-detail": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,26 @@
"labels": {
"is-active": "アクティブ",
"name": "通知名",
"number": "電話番号"
"number": "電話番号",
"add-optional-email-fields": "オプションのメールフィールドを追加",
"add-optional-fields": "CC、BCC、または返信先を追加",
"add-cc": "CCを追加",
"add-bcc": "BCCを追加",
"add-reply-to": "返信先を追加",
"system-from": "システム - 送信元",
"system-to": "システム - 宛先",
"add-system-from": "システム送信元を追加",
"add-system-to": "システム宛先を追加"
},
"placeholders": {
"number": "テキストメッセージの電話番号"
"number": "テキストメッセージの電話番号",
"system-from": "送信者のメールアドレスを入力",
"system-to": "受信者のメールアドレスを入力"
},
"descriptions": {
"number": "テキストメッセージ(SMS)通知を受け取る電話番号"
"number": "テキストメッセージ(SMS)通知を受け取る電話番号",
"system-from": "注意:通常は空白のままにします。ビジネスコードは通常、これを実際のストアの送信者アドレスに置き換えます。カスタムシステム通知にのみ使用してください。",
"system-to": "注意:通常は空白のままにします。ビジネスコードは通常、これを実際の顧客のメールアドレスに置き換えます。カスタムシステム通知にのみ使用してください。"
}
},
"filter-detail": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,26 @@
"labels": {
"is-active": "Aktywne",
"name": "Nazwa powiadomienia",
"number": "Numer telefonu"
"number": "Numer telefonu",
"add-optional-email-fields": "Dodaj opcjonalne pola e-mail",
"add-optional-fields": "Dodaj DW, UDW lub Odpowiedz do",
"add-cc": "Dodaj DW",
"add-bcc": "Dodaj UDW",
"add-reply-to": "Dodaj Odpowiedz do",
"system-from": "System - Od",
"system-to": "System - Do",
"add-system-from": "Dodaj System Od",
"add-system-to": "Dodaj System Do"
},
"placeholders": {
"number": "Numer telefonu do wiadomości tekstowej"
"number": "Numer telefonu do wiadomości tekstowej",
"system-from": "Wprowadź adres e-mail nadawcy",
"system-to": "Wprowadź adres e-mail odbiorcy"
},
"descriptions": {
"number": "Numer telefonu, który otrzyma powiadomienie SMS"
"number": "Numer telefonu, który otrzyma powiadomienie SMS",
"system-from": "Uwaga: Zazwyczaj pozostawia się puste. Kod biznesowy zazwyczaj zastąpi to rzeczywistym adresem nadawcy sklepu. Używaj tylko dla niestandardowych powiadomień systemowych.",
"system-to": "Uwaga: Zazwyczaj pozostawia się puste. Kod biznesowy zazwyczaj zastąpi to rzeczywistym adresem e-mail klienta. Używaj tylko dla niestandardowych powiadomień systemowych."
}
},
"filter-detail": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,26 @@
"labels": {
"is-active": "Ativo",
"name": "Nome da notificação",
"number": "Número de telefone"
"number": "Número de telefone",
"add-optional-email-fields": "Adicionar campos de e-mail opcionais",
"add-optional-fields": "Adicionar CC, CCO ou Responder para",
"add-cc": "Adicionar CC",
"add-bcc": "Adicionar CCO",
"add-reply-to": "Adicionar Responder para",
"system-from": "Sistema - De",
"system-to": "Sistema - Para",
"add-system-from": "Adicionar Sistema De",
"add-system-to": "Adicionar Sistema Para"
},
"placeholders": {
"number": "Número de telefone para mensagem de texto"
"number": "Número de telefone para mensagem de texto",
"system-from": "Inserir endereço de e-mail do remetente",
"system-to": "Inserir endereço de e-mail do destinatário"
},
"descriptions": {
"number": "Número de telefone que receberá a notificação por mensagem de texto (SMS)"
"number": "Número de telefone que receberá a notificação por mensagem de texto (SMS)",
"system-from": "Nota: Normalmente deixado em branco. O código de negócio normalmente substituirá isso pelo endereço do remetente real da loja. Use apenas para notificações de sistema personalizadas.",
"system-to": "Nota: Normalmente deixado em branco. O código de negócio normalmente substituirá isso pelo endereço de e-mail real do cliente. Use apenas para notificações de sistema personalizadas."
}
},
"filter-detail": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,26 @@
"labels": {
"is-active": "Активно",
"name": "Имя уведомления",
"number": "Номер телефона"
"number": "Номер телефона",
"add-optional-email-fields": "Добавить дополнительные поля электронной почты",
"add-optional-fields": "Добавить Копия, Скрытая копия или Ответить",
"add-cc": "Добавить Копия",
"add-bcc": "Добавить Скрытая копия",
"add-reply-to": "Добавить Ответить",
"system-from": "Система - От",
"system-to": "Система - Кому",
"add-system-from": "Добавить Система От",
"add-system-to": "Добавить Система Кому"
},
"placeholders": {
"number": "Номер телефона для текстового сообщения"
"number": "Номер телефона для текстового сообщения",
"system-from": "Введите адрес электронной почты отправителя",
"system-to": "Введите адрес электронной почты получателя"
},
"descriptions": {
"number": "Номер телефона, который получит уведомление (SMS)"
"number": "Номер телефона, который получит уведомление (SMS)",
"system-from": "Примечание: Обычно оставляется пустым. Бизнес-код обычно заменяет это фактическим адресом отправителя магазина. Используйте только для пользовательских системных уведомлений.",
"system-to": "Примечание: Обычно оставляется пустым. Бизнес-код обычно заменяет это реальным адресом электронной почты клиента. Используйте только для пользовательских системных уведомлений."
}
},
"filter-detail": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,26 @@
"labels": {
"is-active": "激活",
"name": "通知名称",
"number": "电话号码"
"number": "电话号码",
"add-optional-email-fields": "添加可选的电子邮件字段",
"add-optional-fields": "添加抄送、密送或回复地址",
"add-cc": "添加抄送",
"add-bcc": "添加密送",
"add-reply-to": "添加回复地址",
"system-from": "系统 - 发件人",
"system-to": "系统 - 收件人",
"add-system-from": "添加系统发件人",
"add-system-to": "添加系统收件人"
},
"placeholders": {
"number": "短信电话号码"
"number": "短信电话号码",
"system-from": "输入发件人邮箱地址",
"system-to": "输入收件人邮箱地址"
},
"descriptions": {
"number": "将接收短信通知的电话号码"
"number": "将接收短信通知的电话号码",
"system-from": "注意:通常留空。业务代码通常会将其替换为实际的商店发件人地址。仅用于自定义系统通知。",
"system-to": "注意:通常留空。业务代码通常会将其替换为真实的客户电子邮件地址。仅用于自定义系统通知。"
}
},
"filter-detail": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,28 @@ angular.module('virtoCommerce.notificationsModule')
blade.parametersForTemplate = [];
$scope.isValid = false;

// Initialize visibility state for optional fields
blade.showOptionalFields = {
from: false,
to: false,
cc: false,
bcc: false,
replyTo: false
};

// Toggle functions for optional fields
$scope.toggleOptionalField = function(fieldName) {
blade.showOptionalFields[fieldName] = !blade.showOptionalFields[fieldName];
};

$scope.hasOptionalFields = function() {
return blade.showOptionalFields.from || blade.showOptionalFields.to || blade.showOptionalFields.cc || blade.showOptionalFields.bcc || blade.showOptionalFields.replyTo;
};

$scope.shouldShowAddOptionsLink = function() {
return !blade.showOptionalFields.from && !blade.showOptionalFields.to && !blade.showOptionalFields.cc && !blade.showOptionalFields.bcc && !blade.showOptionalFields.replyTo;
};

blade.initialize = function () {
blade.isLoading = true;
notifications.getNotificationByType({ type: blade.type, tenantId: blade.tenantId, tenantType: blade.tenantType }, function (data) {
Expand All @@ -32,6 +54,10 @@ angular.module('virtoCommerce.notificationsModule')

blade.currentEntity.cc = modifyEmailAddress(blade.currentEntity.cc);
blade.currentEntity.bcc = modifyEmailAddress(blade.currentEntity.bcc);

// Auto-expand fields that have values
expandOptionalFields();

_.map(blade.currentEntity.templates, function (template) {
template.createdDateAsString = $filter('date')(template.createdDate, "yyyy-MM-dd");
template.modifiedDateAsString = $filter('date')(template.modifiedDate, "yyyy-MM-dd");
Expand All @@ -43,6 +69,14 @@ angular.module('virtoCommerce.notificationsModule')
$scope.isValid = false;
};

function expandOptionalFields() {
blade.showOptionalFields.from = !!blade.currentEntity.from;
blade.showOptionalFields.to = !!blade.currentEntity.to;
blade.showOptionalFields.cc = blade.currentEntity.cc && blade.currentEntity.cc.length > 0;
blade.showOptionalFields.bcc = blade.currentEntity.bcc && blade.currentEntity.bcc.length > 0;
blade.showOptionalFields.replyTo = !!blade.currentEntity.replyTo;
}

function isTransient(data) {
return data.tenantIdentity.isEmpty && blade.tenantId && blade.tenantType;
}
Expand Down Expand Up @@ -87,6 +121,7 @@ angular.module('virtoCommerce.notificationsModule')
name: "platform.commands.undo", icon: 'fa fa-undo',
executeMethod: function () {
blade.currentEntity = angular.copy(blade.origEntity);
expandOptionalFields();
},
canExecuteMethod: isDirty,
permission: blade.updatePermission
Expand Down Expand Up @@ -126,3 +161,5 @@ angular.module('virtoCommerce.notificationsModule')

blade.initialize();
}]);


Loading