Initial commit
This commit is contained in:
15
api-wiaas/server/components/v2/utils/UtilsController.php
Normal file
15
api-wiaas/server/components/v2/utils/UtilsController.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
class UtilsController{
|
||||
private $model;
|
||||
|
||||
function __construct(){
|
||||
$this->model = new UtilsModel();
|
||||
}
|
||||
|
||||
public function downloadFile(){
|
||||
$fileName = isset($_REQUEST['fileName']) ? $_REQUEST['fileName'] : '';
|
||||
$idDocument = isset($_REQUEST['idDocument']) ? $_REQUEST['idDocument'] : 0;
|
||||
$fileType = isset($_REQUEST['fileType']) ? $_REQUEST['fileType'] : '';
|
||||
echo $this->model->downloadFile($idDocument, $fileName, $fileType);
|
||||
}
|
||||
}
|
||||
426
api-wiaas/server/components/v2/utils/UtilsModel.php
Normal file
426
api-wiaas/server/components/v2/utils/UtilsModel.php
Normal file
@@ -0,0 +1,426 @@
|
||||
<?php
|
||||
class UtilsModel{
|
||||
const ID_TYPE_CUSTOMER = 2;
|
||||
|
||||
public function downloadFile($idDocument, $fileName, $fileType){
|
||||
$fileManager = new FileManager();
|
||||
|
||||
return $fileManager->downloadFile($idDocument, $fileName, $fileType);
|
||||
}
|
||||
|
||||
public static function sendOrderUpdateMail($mailType, $params, $mailTitle, $mails) {
|
||||
global $user;
|
||||
$templateUrl = $mailType.'Template.php';
|
||||
|
||||
if(array_key_exists('customer', $mails) && count($mails['customer'])) {
|
||||
$response = Mail::sendMail($mails['customer'], $mailTitle, $templateUrl, $params);
|
||||
}
|
||||
|
||||
if($user->getUserType() !== USER_TYPES['BROKER']) {
|
||||
$usersMails = array_key_exists('other', $mails) ? (array) $mails['other'] : [];
|
||||
$brokerMails = (array) self::getBrokersMail();
|
||||
$mails['other'] = array_merge($usersMails, $brokerMails);
|
||||
$params['orderUrl'] = $params['apiOrderUrl'];
|
||||
|
||||
$response = Mail::sendMail($mails['other'], $mailTitle, $templateUrl, $params);
|
||||
}
|
||||
|
||||
if($response){
|
||||
return [
|
||||
'code' => 'success',
|
||||
'message' => 'ORDER_UPDATE_MAIL_SENT'
|
||||
];
|
||||
}
|
||||
|
||||
return [
|
||||
'code' => 'error',
|
||||
'message' => 'ERROR_MAIL_SENT'
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* send order confirmation email to user
|
||||
* @param Array $cartPackages contains the packages ordered
|
||||
* @param String $userType customer or broker
|
||||
* @param Array $orderInfo contains information about the order like id, order number and so on
|
||||
* @return Array confirmation message
|
||||
*/
|
||||
public static function sendOrderConfirmationMail($cartPackages, $userType, $orderInfo) {
|
||||
$mail = '';
|
||||
$orderUrl = WIAAS_URL.'/api-wiaas/orders?subModule=orders_steps&idOrder='.$orderInfo['idOrder'].'&orderNumber='.$orderInfo['orderNumber'];
|
||||
if($userType === USER_TYPES['CUSTOMER']) {
|
||||
$templateUrl = 'orderConfirmationTemplate.php';
|
||||
$mailTitle = 'Order successfully placed';
|
||||
$userData = self::getUserData();
|
||||
|
||||
if($userData && $userData[0]['mail']) {
|
||||
$mail = $userData[0]['mail'];
|
||||
}
|
||||
$message = 'MAIL_SENT';
|
||||
$orderUrl = WIAAS_URL.'/orders/'.$orderInfo['idOrder'];
|
||||
} else if($userType === USER_TYPES['BROKER']){
|
||||
$templateUrl = 'orderConfirmationBrokerTemplate.php';
|
||||
$mailTitle = 'New order placed';
|
||||
$brokerData = self::getBrokersMail();
|
||||
|
||||
if($brokerData) {
|
||||
$mail = $brokerData;
|
||||
}
|
||||
$message = 'BROKER_MAIL_SENT';
|
||||
}
|
||||
$currentDate = new DateTime();
|
||||
$currentDate = $currentDate->format('d-m-Y H:i');
|
||||
|
||||
$params = [
|
||||
'cartPackages' => $cartPackages,
|
||||
'currentDate' => $currentDate,
|
||||
'orderNumber' => $orderInfo['orderNumber'],
|
||||
'orderDate' => $orderInfo['orderDate'],
|
||||
'orderUrl' => $orderUrl
|
||||
];
|
||||
$response = Mail::sendMail($mail, $mailTitle, $templateUrl, $params);
|
||||
|
||||
if($response){
|
||||
return [
|
||||
'code' => 'success',
|
||||
'message' => $message
|
||||
];
|
||||
}
|
||||
|
||||
return [
|
||||
'code' => 'error',
|
||||
'message' => 'ERROR_MAIL_SENT'
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* fetches the username and the email for the broker
|
||||
* @return String mail of the broker
|
||||
*/
|
||||
public static function getBrokersMail() {
|
||||
global $database;
|
||||
|
||||
$sql="
|
||||
SELECT u.mail
|
||||
FROM ".TABLES['brokers']." b
|
||||
INNER JOIN ".TABLES['users']." u
|
||||
ON u.id = b.idUser";
|
||||
|
||||
$result = $database->query($sql);
|
||||
while($row = $database->fetchArray($result)) {
|
||||
if($row['mail'] !== '') {
|
||||
$mailArray[] = $row['mail'];
|
||||
}
|
||||
}
|
||||
return (count($mailArray) === 0 || count($mailArray) > 1) ? $mailArray : $mailArray[0];
|
||||
}
|
||||
|
||||
/**
|
||||
* fetches the username and the email for the user logged in
|
||||
* @return Array username and mail
|
||||
*/
|
||||
private static function getUserData($username = '') {
|
||||
global $database, $user;
|
||||
|
||||
$username = $username ? $username : $user->getUser();
|
||||
|
||||
$sql = "SELECT
|
||||
u.mail,
|
||||
u.username,
|
||||
ut.type,
|
||||
rut.idType AS idUserType
|
||||
FROM ".TABLES['users']." u
|
||||
INNER JOIN ".TABLES['rel_user_type']." rut
|
||||
ON rut.idUser=u.id
|
||||
INNER JOIN ".TABLES['user_types']." ut
|
||||
ON ut.id = rut.idType
|
||||
WHERE u.username='".$database->escapeValue($username)."'";
|
||||
|
||||
return $database->fetchResultArray($sql);
|
||||
}
|
||||
|
||||
/**
|
||||
* generate a filter condition on gadget filter
|
||||
* @param Array $filters array of filters
|
||||
* @return string sql filter condtion
|
||||
*/
|
||||
public static function setFilterSql($filters){
|
||||
$whereSql = "1=1";
|
||||
|
||||
if(!empty($filters)){
|
||||
foreach ($filters as $key => $filterValue) {
|
||||
$whereSql .= " AND $key like '%$filterValue%'";
|
||||
}
|
||||
}
|
||||
|
||||
return $whereSql;
|
||||
}
|
||||
|
||||
/**
|
||||
* add sorting for orders central
|
||||
* @param String $sortBy sql for order by
|
||||
*/
|
||||
public static function setOrderBySql($sortBy){
|
||||
$orderBySql = "";
|
||||
if(isset($sortBy->key) && isset($sortBy->direction) ){
|
||||
$orderBySql .= $sortBy->key." ".$sortBy->direction;
|
||||
}
|
||||
|
||||
return $orderBySql;
|
||||
}
|
||||
|
||||
/**
|
||||
* changes the password for the current user
|
||||
* @param String $password if empty, a random pass will be generated
|
||||
* @return Array confirmation message
|
||||
*/
|
||||
public static function changePassword($passwords, $username = '') {
|
||||
global $database, $user;
|
||||
$passwords = (array) json_decode($passwords);
|
||||
if($userInfo = self::getUserData($username)) {
|
||||
$userInfo = $userInfo[0];
|
||||
} else {
|
||||
$data['messages'][] = [
|
||||
'code' => 'error',
|
||||
'message' => 'WRONG_USERNAME'
|
||||
];
|
||||
|
||||
return $data;
|
||||
}
|
||||
$isForReset = $username ? true : false;
|
||||
|
||||
if($data = self::validatePassword($userInfo['username'], $passwords, $isForReset)) {
|
||||
return $data;
|
||||
}
|
||||
|
||||
$password = $passwords['newPassword'];
|
||||
$passwordHashed = $user->hashPassword($database->escapeValue($password));
|
||||
|
||||
$sql = "UPDATE
|
||||
".TABLES['users']." u
|
||||
SET
|
||||
u.password='".$passwordHashed."',
|
||||
u.token=null,
|
||||
u.tokenTS=null
|
||||
WHERE u.username='".$database->escapeValue($userInfo['username'])."'";
|
||||
|
||||
$result = $database->query($sql);
|
||||
if($database->affectedRows() == 1) {
|
||||
$data['messages'][] = [
|
||||
'code' => 'success',
|
||||
'message' => 'PASSWORD_GENERATED'
|
||||
];
|
||||
} else {
|
||||
$data['messages'][] = [
|
||||
'code' => 'error',
|
||||
'message' => 'ERROR_PASSWORD_GENERATED'
|
||||
];
|
||||
}
|
||||
$data['messages'][] = self::sendUserConfirmationMail($userInfo, $userInfo['mail'], 'change');
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
private static function validatePassword($username, $passwordData, $isForReset = false) {
|
||||
global $database, $user;
|
||||
$data = [];
|
||||
|
||||
if ((!array_key_exists('newPassword', $passwordData) || $passwordData['newPassword'] === '') ||
|
||||
(!array_key_exists('confirmPassword', $passwordData) || $passwordData['confirmPassword'] === '')) {
|
||||
$data['messages'][] = [
|
||||
'code' => 'error',
|
||||
'message' => 'PASSWORDS_MISSING'
|
||||
];
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
$newPassword = $database->escapeValue($passwordData['newPassword']);
|
||||
$confirmPassword = $database->escapeValue($passwordData['confirmPassword']);
|
||||
|
||||
if(!$isForReset) {
|
||||
if($data = self::validateOldPassword($passwordData, $username)) {
|
||||
return $data;
|
||||
}
|
||||
$oldPassword = $database->escapeValue($passwordData['oldPassword']);
|
||||
if($oldPassword === $newPassword) {
|
||||
$data['messages'][] = [
|
||||
'code' => 'error',
|
||||
'message' => 'PASSWORD_SAME'
|
||||
];
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
|
||||
if($newPassword !== $confirmPassword) {
|
||||
$data['messages'][] = [
|
||||
'code' => 'error',
|
||||
'message' => 'PASSWORD_MISMATCH'
|
||||
];
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
if((strlen($newPassword) < 8) ||
|
||||
!preg_match("/((?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%-_]).{8,20})/", $newPassword)
|
||||
) {
|
||||
$data['messages'][] = [
|
||||
'code' => 'error',
|
||||
'message' => 'PASSWORD_INCORRECT'
|
||||
];
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
private static function validateOldPassword($passwordData, $username) {
|
||||
global $database, $user;
|
||||
$data = [];
|
||||
|
||||
$oldPassword = $database->escapeValue($passwordData['oldPassword']);
|
||||
|
||||
if (!array_key_exists('oldPassword', $passwordData) || $passwordData['oldPassword'] === '') {
|
||||
$data['messages'][] = [
|
||||
'code' => 'error',
|
||||
'message' => 'PASSWORDS_MISSING'
|
||||
];
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
$sql = "SELECT u.password
|
||||
FROM ".TABLES['users']." u
|
||||
WHERE u.username='".$database->escapeValue($username)."'
|
||||
LIMIT 1";
|
||||
$row = $database->fetchResultArray($sql);
|
||||
|
||||
if($row[0] && $row[0]['password'] && !password_verify($oldPassword, $row[0]['password'])) {
|
||||
$data['messages'][] = [
|
||||
'code' => 'error',
|
||||
'message' => 'OLD_PASSWORD_MISMATCH'
|
||||
];
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* send confirmation mail to user for creation
|
||||
* @param Object $userInfo
|
||||
* @param String $password
|
||||
* @param String $mail
|
||||
* @return Array confirmation message
|
||||
*/
|
||||
public static function sendUserConfirmationMail($userInfo, $mail, $action, $token = '') {
|
||||
|
||||
switch($action) {
|
||||
case 'create':
|
||||
$mailTitle = APPLICATION_NAME.' user created';
|
||||
$templateUrl = 'createUserTemplate.php';
|
||||
break;
|
||||
case 'generate':
|
||||
$mailTitle = APPLICATION_NAME.' password generated';
|
||||
$templateUrl = 'generatePasswordUserTemplate.php';
|
||||
break;
|
||||
case 'change':
|
||||
$mailTitle = APPLICATION_NAME.' password changed';
|
||||
$templateUrl = 'changedPasswordTemplate.php';
|
||||
break;
|
||||
default:
|
||||
return [
|
||||
'code' => 'error',
|
||||
'message' => 'ACTION_NOT_SET'
|
||||
];
|
||||
}
|
||||
|
||||
$passwordValidationUrl = $userInfo['idUserType'] == self::ID_TYPE_CUSTOMER ? WIAAS_URL.'/changePassword/' . $token : WIAAS_URL.'/api-wiaas/login?token=' . $token;
|
||||
|
||||
$params = [
|
||||
'username' => $userInfo['username'],
|
||||
'wiaas' => $userInfo['type'] === USER_TYPES['CUSTOMER'] ? WIAAS_URL : WIAAS_URL.'/api-wiaas',
|
||||
'urlValidate' => $passwordValidationUrl
|
||||
];
|
||||
|
||||
$response = Mail::sendMail($mail, $mailTitle, $templateUrl, $params);
|
||||
|
||||
if($response){
|
||||
return [
|
||||
'code' => 'success',
|
||||
'message' => 'MAIL_SENT'
|
||||
];
|
||||
}
|
||||
|
||||
return [
|
||||
'code' => 'error',
|
||||
'message' => 'ERROR_MAIL_SENT'
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* return true or false if the user logged in is a company admin or not
|
||||
* @return Bool true if the user is company admin
|
||||
*/
|
||||
public static function checkIfUserIsCompanyAdmin() {
|
||||
global $database, $user;
|
||||
$idUser = $user->getUserId();
|
||||
|
||||
$sql = "
|
||||
SELECT
|
||||
u.isCompanyAdmin
|
||||
FROM
|
||||
".TABLES['users']." u
|
||||
WHERE u.id = $idUser";
|
||||
$data = $database->fetchResultArray($sql);
|
||||
|
||||
return count($data) && $data[0]['isCompanyAdmin'] ? true : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* returns the mail and order number for an order
|
||||
* @param Int $idOrder the id of the order
|
||||
* @return Array mail of the customer and the order number
|
||||
*/
|
||||
public static function getDataForMailToCustomer($idOrder) {
|
||||
global $database;
|
||||
|
||||
$sqlCustomerInfo = "
|
||||
SELECT u.mail,
|
||||
o.orderNumber
|
||||
FROM ".TABLES['customers']." c
|
||||
INNER JOIN ".TABLES['rel_commercial_lead_customers']." rclc
|
||||
ON c.id=rclc.idCustomer
|
||||
INNER JOIN ".TABLES['users']." u
|
||||
ON u.id = c.idUser
|
||||
INNER JOIN ".TABLES['orders']." o
|
||||
ON o.idCustomerInstance=rclc.id
|
||||
WHERE o.id=$idOrder
|
||||
LIMIT 1";
|
||||
$query = $database->query($sqlCustomerInfo);
|
||||
|
||||
return $database->fetchArray($query);
|
||||
}
|
||||
|
||||
/**
|
||||
* get the orderNumber based on the order id
|
||||
* @param Int $idOrder the id of the order
|
||||
* @return Int the order number of that order
|
||||
*/
|
||||
public static function getOrderNumberById($idOrder) {
|
||||
global $database;
|
||||
|
||||
$sql = "
|
||||
SELECT
|
||||
o.orderNumber
|
||||
FROM
|
||||
".TABLES['orders']." o
|
||||
WHERE o.id = $idOrder
|
||||
LIMIT 1
|
||||
";
|
||||
$orderNumberArray = $database->fetchResultArray($sql);
|
||||
if($orderNumberArray && $orderNumberArray[0]) {
|
||||
return array_key_exists('orderNumber', $orderNumberArray[0]) ? $orderNumberArray[0]['orderNumber'] : '';
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title></title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
Hello, <br/><br/>
|
||||
Welcome back to {APPLICATION_NAME}!<br/>
|
||||
The password was changed successfully for <b>{username}</b>!<br /><br />
|
||||
Please use this link to login: <a href="{wiaas}">{wiaas}</a>.
|
||||
<br/>
|
||||
<br/>
|
||||
Best regards,<br/>
|
||||
{APPLICATION_NAME} administrators
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,20 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title></title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
Hello, <br/><br/>
|
||||
Welcome to {APPLICATION_NAME}!<br/>
|
||||
Click on <a href="{urlValidate}">this link</a> to set your password.<br />
|
||||
This link will expire after 5 days.<br /><br />
|
||||
Please use this link to login: <a href="{wiaas}">{wiaas}</a>, after setting your password.<br/>
|
||||
Your username is: <b>{username}</b><br/>
|
||||
<br/>
|
||||
<br/>
|
||||
Best regards,<br/>
|
||||
{APPLICATION_NAME} administrators
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,26 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title></title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
Hello, <br/><br/>
|
||||
Welcome back to {APPLICATION_NAME}!<br/>
|
||||
The schedule installation function for order {orderNumber} for package {packageName} is now active.<br /><br />
|
||||
To propose a date for the installation, go to <a href="{ordersUrl}">this</a> link and click on <b>Schedule installation</b> button on the order details header. <br />
|
||||
There are displayed the earliest installation date (this is the date when all the products can be shipped in order to perform the installation), <br />
|
||||
the company which will perform the installation and the already proposed dates. <br />
|
||||
To propose a date, click on the <b>Add optional date</b> button and select a date which suites you to perform the installation.<br />
|
||||
Also the installation company user, <b>{supplierName}</b>, will propose a date/dates for its convenience.<br /><br />
|
||||
After you propose a date, the installation company is notified, and he will accept or decline that date.<br />
|
||||
And reversed, if there is already a date proposed, you can accept or decline it.<br /><br />
|
||||
Please note that there cannot be two dates accepted at the same time. If there is already an accepted date, and you accept another one, the first date accepted will be canceled and the last one will remain accepted.<br /><br />
|
||||
You can access the application <a href="{wiaas}">here</a>.<br />
|
||||
<br/>
|
||||
<br/>
|
||||
Best regards,<br/>
|
||||
{APPLICATION_NAME} administrators
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,11 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title></title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
{errorMessage}
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,20 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title></title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
Hello, <br/><br/>
|
||||
Welcome back to {APPLICATION_NAME}!<br/>
|
||||
You have requested a new password<br />
|
||||
Click on <a href="{urlValidate}">this link</a> to reset your password.
|
||||
<br/>
|
||||
Your username is: <b>{username}</b><br/>
|
||||
<br/>
|
||||
<br/>
|
||||
Best regards,<br/>
|
||||
{APPLICATION_NAME} administrators
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,17 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title></title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
Hello, <br/><br/>
|
||||
Installation date <b>{acceptedDate}</b> for order {orderNumber} was accepted by {actionDoneBy}.<br/>
|
||||
You can go to <a href="{ordersUrl}">{APPLICATION_NAME}</a> to view more details.<br />
|
||||
<br/>
|
||||
<br/>
|
||||
Best regards,<br/>
|
||||
{APPLICATION_NAME} administrators
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,17 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title></title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
Hello, <br/><br/>
|
||||
The installation date accepted by both parties, {acceptedDate}, for order {orderNumber}, was marked invalid due to the confirmed shipping dates.<br />
|
||||
You can go to <a href="{ordersUrl}">{APPLICATION_NAME}</a> to propose new dates for the installation.<br />
|
||||
<br/>
|
||||
<br/>
|
||||
Best regards,<br/>
|
||||
{APPLICATION_NAME} administrators
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,17 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title></title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
Hello, <br/><br/>
|
||||
All the proposed installation dates for order {orderNumber} were declined.<br/>
|
||||
You can go to <a href="{ordersUrl}">{APPLICATION_NAME}</a> to propose new dates for the installation.<br />
|
||||
<br/>
|
||||
<br/>
|
||||
Best regards,<br/>
|
||||
{APPLICATION_NAME} administrators
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,17 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title></title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
Hello, <br/><br/>
|
||||
{actionDoneBy} proposed a new installation date: <b>{proposedDate}</b> for order {orderNumber}.<br />
|
||||
Go to <a href="{ordersUrl}">{APPLICATION_NAME}</a> to plan the installation.<br />
|
||||
<br/>
|
||||
<br/>
|
||||
Best regards,<br/>
|
||||
{APPLICATION_NAME} administrators
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,18 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title></title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
Hello, <br/><br/>
|
||||
The schedule installation function for order {orderNumber} is now disabled.<br /><br />
|
||||
You will receive an email notification when this function will be re-actived.<br />
|
||||
Go to <a href="{ordersUrl}">this</a> link to see the status of your order. <br />
|
||||
<br/>
|
||||
<br/>
|
||||
Best regards,<br/>
|
||||
{APPLICATION_NAME} administrators
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,19 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title></title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
Hello,<br/></br/>
|
||||
The questionnaire you have uploaded for the order {orderNumber} need to be modified! Please see the comments on order.<br/>
|
||||
Reason:<br />
|
||||
{invalidQuestionaireReason}<br /><br />
|
||||
You can download the file using this <a href="{url}">link</a> and upload it again using this <a href="{ordersUrl}">link</a>.
|
||||
<br/>
|
||||
<br/>
|
||||
Best regards,<br/>
|
||||
{APPLICATION_NAME} administrators
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,22 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title></title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
Hello, <br/>
|
||||
<br/>
|
||||
The order <b>{orderNumber}</b> has been updated in {currentDate}.<br/>
|
||||
{prevStepMessage}
|
||||
The delivery is now completed for the package: <b>{packageName}</b>.
|
||||
<br />
|
||||
<br />
|
||||
Access {APPLICATION_NAME} <a href="{orderUrl}">here</a> to see more details.
|
||||
<br/>
|
||||
<br/>
|
||||
Best regards,<br/>
|
||||
{APPLICATION_NAME} administrators
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,21 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title></title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
Hello, <br/>
|
||||
<br/>
|
||||
A new comment has been added by <b>{userLoggedIn}</b> for order {orderNumber} at {currentDate}:<br />
|
||||
<br />
|
||||
<b>{commentMessage}</b><br />
|
||||
<br />
|
||||
You can access the order <a href="{orderUrl}">here</a> to see more details.
|
||||
<br/>
|
||||
<br/>
|
||||
Best regards,<br/>
|
||||
{APPLICATION_NAME} administrators
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,17 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title></title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
Hello, <br/><br/>
|
||||
An order has been placed successfully in {currentDate}.<br/>
|
||||
Please go to <a href="{orderUrl}">{APPLICATION_NAME}</a> to link a process to that package(s) from the order.
|
||||
<br/>
|
||||
<br/>
|
||||
Best regards,<br/>
|
||||
{APPLICATION_NAME} administrators
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,20 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title></title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
Hello, <br/><br/>
|
||||
Your order has been successfully submitted: {currentDate}.<br/>
|
||||
The order <b>{orderNumber}</b>, date: {orderDate} includes the following order rows:<br />
|
||||
{cartPackages}
|
||||
<br />
|
||||
Access {APPLICATION_NAME} <a href="{orderUrl}">here</a> to see the progress of your order.
|
||||
<br/>
|
||||
<br/>
|
||||
Best regards,<br/>
|
||||
{APPLICATION_NAME} administrators
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,20 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title></title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
Hello, <br/>
|
||||
<br/>
|
||||
Your order <b>{orderNumber}</b> has been set to: {status} in {currentDate}.<br />
|
||||
{deliveryEstimationDateMessage}
|
||||
<br />
|
||||
You can access {APPLICATION_NAME} <a href="{orderUrl}">here</a> to see more details.
|
||||
<br/>
|
||||
<br/>
|
||||
Best regards,<br/>
|
||||
{APPLICATION_NAME} administrators
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,21 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title></title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
Hello, <br/><br/>
|
||||
The order {orderNumber} has been updated {currentDate}.<br/>
|
||||
<br />
|
||||
{prevStepMessage}
|
||||
{currentStepMessage}
|
||||
<br />
|
||||
Access {APPLICATION_NAME} <a href="{orderUrl}">here</a> to check the progress of the order.
|
||||
<br/>
|
||||
<br/>
|
||||
Best regards,<br/>
|
||||
{APPLICATION_NAME} administrators
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,20 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title></title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
Hello, <br/>
|
||||
<br/>
|
||||
The order row "{packageName}", of order <b>{orderNumber}</b>, has been changed to: {status} in {currentDate}.<br />
|
||||
{deliveryEstimationDateMessage}
|
||||
<br />
|
||||
You can access {APPLICATION_NAME} <a href="{orderUrl}">here</a> to see more details.
|
||||
<br/>
|
||||
<br/>
|
||||
Best regards,<br/>
|
||||
{APPLICATION_NAME} administrators
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,19 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title></title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
Hello, <br/><br/>
|
||||
We have now started processing the order <b>{orderNumber}</b> ({currentDate}).<br/>
|
||||
<br />
|
||||
<br />
|
||||
Access {APPLICATION_NAME} <a href="{orderUrl}">here</a> to check the progress of the order.
|
||||
<br/>
|
||||
<br/>
|
||||
Best regards,<br/>
|
||||
{APPLICATION_NAME} administrators
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,16 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title></title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
Hello,<br/></br/>
|
||||
A new questionaire has been uploaded for the order <a href="{ordersUrl}">{orderNumber}</a> and needs validation!
|
||||
<br/>
|
||||
<br/>
|
||||
Best regards,<br/>
|
||||
{APPLICATION_NAME} administrators
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,21 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title></title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
Hello, <br/>
|
||||
<br/>
|
||||
The order's <b>{orderNumber}</b> follow-up meeting date has changed in {currentDate}.<br />
|
||||
{estimatedDateMessage}
|
||||
{confirmedDateMessage}
|
||||
<br />
|
||||
You can access {APPLICATION_NAME} <a href="{orderUrl}">here</a> to see more details.
|
||||
<br/>
|
||||
<br/>
|
||||
Best regards,<br/>
|
||||
{APPLICATION_NAME} team
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,59 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title></title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
Hello, <br/><br/>
|
||||
{customerName} has sent an email for support for order {orderNumber}.<br/>
|
||||
<br />
|
||||
<h4>Customer details</h4>
|
||||
<div class="row">
|
||||
<span class="col-md-3">Name:</span>
|
||||
<span class="col-md-3">{customerName}</span>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span class="col-md-3">Mail:</span>
|
||||
<span class="col-md-3">{customerMail}</span>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span class="col-md-3">Phone:</span>
|
||||
<span class="col-md-3">{customerPhone}</span>
|
||||
</div>
|
||||
<br/>
|
||||
<hr />
|
||||
<h4>Order details</h4>
|
||||
<div class="order-informations col-md-12">
|
||||
<div>
|
||||
<span class="order-number-icon">#</span>
|
||||
<b>Order number:</b> {orderNumber}
|
||||
</div>
|
||||
<div>
|
||||
<span class="glyphicon glyphicon-link"></span>
|
||||
<b>Reference: </b>{reference}
|
||||
</div>
|
||||
<div>
|
||||
<span class="glyphicon glyphicon-dashboard"></span>
|
||||
<b>Tender: </b>{tender}
|
||||
</div>
|
||||
<div>
|
||||
<span class="glyphicon glyphicon-user"></span>
|
||||
<b>Commercial lead: </b>{commercialLead}
|
||||
</div>
|
||||
<hr />
|
||||
</div>
|
||||
<div class="packages-info col-md-12">
|
||||
<h4>Order Items</h4>
|
||||
{orderItems}
|
||||
</div>
|
||||
<hr />
|
||||
<h4>Customer's comment</h4>
|
||||
{userText}
|
||||
<hr />
|
||||
<br/>
|
||||
Best regards,<br/>
|
||||
{APPLICATION_NAME} administrators
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user