Commit 14d3580e authored by Gladys Forte's avatar Gladys Forte

Merge pull request #97 in RMS/api-main-service from gladys-dev2 to RMSv2

* commit 'b735a127':
  postman update
  form action and email initial
parents 3a35976d b735a127
......@@ -22,7 +22,9 @@ from rest_framework.exceptions import ValidationError
from django.db import transaction, IntegrityError, connection
from app.applicationlayer.utils import QuerySetHelper
from app.businesslayer.changerequest import change_request
from app.applicationlayer.cms.utils_cr import number_generator
from app.applicationlayer.cms.utils_cr import (number_generator,
send_mail_requestor,
next_appover_email)
from app.entities import enums
from django.forms.models import model_to_dict
......@@ -276,10 +278,10 @@ class ChangeRequestFormsViewset(meviewsets.ModelViewSet):
models.ChangeRequestFormHeader.objects.filter(
form_code=form_code).update(status='Pending')
models.ChangeRequestFormApprovers.objects.filter(
form_code=form_code).update(action=None, remarks=None,
date_sent=None)
date_sent=None, created=None)
return Response(
"Change request form successfully re routed",
......@@ -312,7 +314,7 @@ class ChangeRequestFormsViewset(meviewsets.ModelViewSet):
models.ChangeRequestFormApprovers.objects.filter(
form_code=form_code).update(action=None, remarks=None,
date_sent=None)
date_sent=None, created=None)
return Response(
"Change request form successfully resubmitted",
......@@ -325,11 +327,8 @@ class ChangeRequestFormsViewset(meviewsets.ModelViewSet):
url_path='actions', url_name='actions'
)
def actions(self, request, *args, **kwargs):
form_code = kwargs['form_code']
print(form_code)
id = serializer.data['id']
id = request.data['id']
current_user = request.data['user']
form_code = request.data['form_code']
......@@ -338,12 +337,12 @@ class ChangeRequestFormsViewset(meviewsets.ModelViewSet):
level = request.data['level']
next_level = int(request.data['level']) + 1
remarks = request.data['remarks']
print("level 1")
next_approver = models.ChangeRequestFormApprovers.objects.filter(
level=str(next_level),
form_code=form_code
)
print("level 2")
if action.lower() == 'approved':
models.ChangeRequestFormApprovers.objects.filter(
......@@ -365,7 +364,7 @@ class ChangeRequestFormsViewset(meviewsets.ModelViewSet):
requestor_notification_msg, action, requestor_email_code,
remarks, level
)
print("level 3")
for n_approver in next_approver:
print(n_approver.user)
......@@ -598,9 +597,9 @@ class ChangeRequestFormApproversViewset(meviewsets.ModelViewSet):
if n_approver.delegation.lower() == 'vendor/implementor':
notification_msg = VENDOR_ACKNOWLEDGE_MESSAGE.split(';')[0]
email_code = VENDOR_ACKNOWLEDGE_MESSAGE.split(';')[1]
next_appover_email(
n_approver.user, form_code, delegation,
n_approver.user.code, form_code, delegation,
notification_msg, action, email_code
)
......
......@@ -6,29 +6,28 @@ import requests
from app.entities import models
from datetime import timedelta
from django.db.models import Q
# from dateutil import parser
# EMAIL = settings.EMAIL
# ACCOUNTS = settings.ACCOUNTS
# GROUPS = settings.GROUPS
# COMPANIES = settings.COMPANIES
# ALLOWED_COMPANY = settings.ALLOWED_COMPANY
# CR_FRONT_LINK = settings.CR_FRONT_LINK
from app.applicationlayer.utils import main_threading
from app.helper.email_service import sender
CR_FRONT_LINK = settings.CR_FRONT_LINK
# NOTIFICATION = settings.NOTIFICATION
def get_group_details(group_no):
return requests.get(f'{GROUPS}?group_no={group_no}').json()['results'][0]
def get_dept_details(dept_no):
dept_instance = models.Department.objects.filter(code=dept_no)
return dept_instance
def get_companies_details(slug):
return requests.get(f'{COMPANIES}?slug={slug}').json()['results'][0]
company_instance = models.Company.objects.filter(code=slug)
return company_instance
def get_account_details(id_number):
return requests.get(f'{ACCOUNTS}?id_number={id_number}').json()['results'][0]
account_instance = models.User.objects.filter(code=id_number)
return account_instance
def get_allowed_company(id_number):
......@@ -152,8 +151,7 @@ def receiver_body(
def get_template_instance(form_code):
template_instance = models.ChangeRequestFormHeader.objects.filter(
Q(form_code=form_code) &
Q(archived_at=None)
Q(form_code=form_code)
).first()
return template_instance
......@@ -219,7 +217,7 @@ def send_mail_vendor(receiver,
sender_account_id = sender_instance['id_number']
sender_name = sender_instance['name']
group = get_group_details(requested_to_department)
group = get_dept_details(requested_to_department)
group_name = group['name']
company = get_companies_details(requested_to_company)
......@@ -251,74 +249,85 @@ def send_mail_vendor(receiver,
)
def send_mail_requestor(receiver,
form_code,
delegation,
msg,
action,
code,
def send_mail_requestor(receiver,
form_code,
delegation,
msg,
action,
code,
remarks,
routing_level):
cr_link = f'{CR_FRONT_LINK}/{form_code}'
template_instance = get_template_instance(form_code)
app = 'cms'
cr_number = template_instance.requested_to_template_id
template_name = template_instance.requested_to_template_name
requested_to_company = template_instance.requested_to_company
requested_to_department = template_instance.requested_to_department
requested_by_user = template_instance.requested_by_user
created = template_instance.created
requested_to_company = template_instance.requested_to_company.code
requested_to_department = template_instance.requested_to_department.code
requested_by_user = template_instance.requested_by_user.code
requested_to_priority = template_instance.requested_to_priority
# receiver details --------------------------------------------------
requestor_instance = get_account_details(requested_by_user)
requestor_name = requestor_instance['name']
requestor_email = requestor_instance['email']
requestor_account_id = requestor_instance['id_number']
requestor_name = requestor_instance.values_list('name', flat=True)[0]
requestor_email = requestor_instance.values_list('email', flat=True)[0]
# sender details --------------------------------------------------
sender_instance = get_account_details(receiver)
sender_account_username = sender_instance['username']
sender_account_id = sender_instance['id_number']
sender_name = sender_instance['name']
sender_email = sender_instance.values_list('email', flat=True)[0]
sender_name = sender_instance.values_list('name', flat=True)[0]
group = get_group_details(requested_to_department)
group_name = group['name']
department = get_dept_details(requested_to_department)
dept_name = department.values_list('name', flat=True)[0]
company = get_companies_details(requested_to_company)
company_name = company['name']
data = receiver_body(
sender_account_id, requestor_account_id, code,
requestor_email, app, "False", requestor_name, routing_level,
action, cr_number, template_name, company_name, group_name,
requested_to_priority, cr_link
)
company_name = company.values_list('name', flat=True)[0]
# call sender email
name = requestor_name
action_by = sender_name
routing_level = routing_level
status = action
cr_number = cr_number
cr_name = template_name
company_requestedto = company_name
department_requestedto = dept_name
priority_level = requested_to_priority
url = cr_link
if action.lower() == 'approved':
new_body = {"approved_by": sender_name}
elif action.lower() == 'rejected':
new_body = {"rejected_by": sender_name,
"remarks": remarks}
elif action.lower() == 'completed':
new_body = {"completed_by": sender_name}
elif action.lower() == 'acknowledged':
new_body = {"acknowledge_by": sender_name}
recipient = requestor_email
action_type = action
admin = sender_email
data = {**data, **new_body}
args = [name, action_by, routing_level, status, cr_number, cr_name,
company_requestedto, department_requestedto, priority_level,
url, recipient, action_type, admin]
email_status = requests.post(EMAIL, data=data)
main_threading(args, sender.routing_table_actions)
# if action.lower() == 'approved':
# new_body = {"approved_by": sender_name}
# elif action.lower() == 'rejected':
# new_body = {"rejected_by": sender_name,
# "remarks": remarks}
# elif action.lower() == 'completed':
# new_body = {"completed_by": sender_name}
# elif action.lower() == 'acknowledged':
# new_body = {"acknowledge_by": sender_name}
message = f"{sender_name} {msg} ({template_name})"
# data = {**data, **new_body}
notif = send_notification(
form_code, cr_number,
requestor_account_id, requestor_name,
message, app,
sender_account_id, sender_account_username
)
# message = f"{sender_name} {msg} ({template_name})"
# notif = send_notification(
# form_code, cr_number,
# requestor_account_id, requestor_name,
# message, app,
# sender_account_id, sender_account_username
# )
def next_appover_email(receiver, form_code, delegation, msg, action, code):
......@@ -331,7 +340,6 @@ def next_appover_email(receiver, form_code, delegation, msg, action, code):
requested_to_company = template_instance.requested_to_company
requested_to_department = template_instance.requested_to_department
requested_by_user = template_instance.requested_by_user
created = template_instance.created
requested_to_priority = template_instance.requested_to_priority
# for rec in receiver:
......@@ -351,7 +359,7 @@ def next_appover_email(receiver, form_code, delegation, msg, action, code):
sender_account_id = sender_instance['id_number']
sender_name = sender_instance['name']
group = get_group_details(requested_to_department)
group = get_dept_details(requested_to_department)
group_name = group['name']
company = get_companies_details(requested_to_company)
......@@ -366,6 +374,8 @@ def next_appover_email(receiver, form_code, delegation, msg, action, code):
email_status = requests.post(EMAIL, data=data)
message = f"{sender_name} {msg} ({template_name})"
notif = send_notification(
......
This diff is collapsed.
<!DOCTYPE html>
<html>
<head>
<title>RMS: Acknowledgement Notification</title>
</head>
<body style="font-family: arial;">
<img src="https://s18.directupload.net/images/190807/wjwrxx5i.jpg" width="100px" />
<h3>Resource Management System &#40;RMS&#41;</h3>
<h3 style="color:#888888;">Change Request Acknowledgement Notification</h3><br>
<p>Dear {name},</p><br>
<p>A change request has been submitted for your acknowledgement. Please see the details of the change request below.</p><br>
<b>CR Number</b><br>{cr_number}<br><br>
<b>CR Name</b><br>{cr_name}<br><br>
<b>Company Requested To</b><br>{company_requestedto}<br><br>
<b>Department Requested To</b><br>{department_requestedto}<br><br>
<b>Priority Level</b><br>{priority_level}<br><br>
<b>Status</b><br>{status}<br><br>
<p>Please click <u><a href="{url}" style="text-decoration:underline;color:#007bff;" target="_blank">here</a></u> to access the change request.</p><br>
<p>Sincerely,</p>
<p>RMS Team</p><br><br>
<p>Powered by</p>
<img src="https://s18.directupload.net/images/190807/jaewp4nx.png" width="120px"/>
</body>
<!DOCTYPE html>
<html>
<head>
<title>RMS: Acknowledgement Notification</title>
</head>
<body style="font-family: arial;">
<h3>Resource Management System &#40;RMS&#41;</h3>
<h3 style="color:#888888;">Change Request Acknowledgement Notification</h3><br>
<p>Dear {name},</p><br>
<p>A change request has been submitted for your acknowledgement. Please see the details of the change request below.</p><br>
<b>CR Number</b><br>{cr_number}<br><br>
<b>CR Name</b><br>{cr_name}<br><br>
<b>Company Requested To</b><br>{company_requestedto}<br><br>
<b>Department Requested To</b><br>{department_requestedto}<br><br>
<b>Priority Level</b><br>{priority_level}<br><br>
<b>Status</b><br>{status}<br><br>
<p>Please click <u><a href="{url}" style="text-decoration:underline;color:#007bff;" target="_blank">here</a></u> to access the change request.</p><br>
<p>Sincerely,</p>
<p>RMS Team</p><br><br>
<p>Powered by</p>
<img src="https://s18.directupload.net/images/190807/jaewp4nx.png" width="120px"/>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<title>RMS: Approval Notification</title>
</head>
<body style="font-family: arial;">
<img src="https://s18.directupload.net/images/190807/wjwrxx5i.jpg" width="100px" />
<h3>Resource Management System &#40;RMS&#41;</h3>
<h3 style="color:#888888;">Change Request Approval Notification</h3><br>
<p>Dear {name},</p><br>
<p>A change request has been submitted for your approval. Please see the details of the change request below.</p><br>
<b>CR Number</b><br>{cr_number}<br><br>
<b>CR Name</b><br>{cr_name}<br><br>
<b>Company Requested To</b><br>{company_requestedto}<br><br>
<b>Department Requested To</b><br>{department_requestedto}<br><br>
<b>Priority Level</b><br>{priority_level}<br><br>
<b>Status</b><br>{status}<br><br>
<p>Please click <u><a href="{url}" style="text-decoration:underline;color:#007bff;" target="_blank">here</a></u> to access the change request.</p><br>
<p>Sincerely,</p>
<p>RMS Team</p><br><br>
<p>Powered by</p>
<img src="https://s18.directupload.net/images/190807/jaewp4nx.png" width="120px"/>
</body>
<!DOCTYPE html>
<html>
<head>
<title>RMS: Approval Notification</title>
</head>
<body style="font-family: arial;">
<h3>Resource Management System &#40;RMS&#41;</h3>
<h3 style="color:#888888;">Change Request Approval Notification</h3><br>
<p>Dear {name},</p><br>
<p>A change request has been submitted for your approval. Please see the details of the change request below.</p><br>
<b>CR Number</b><br>{cr_number}<br><br>
<b>CR Name</b><br>{cr_name}<br><br>
<b>Company Requested To</b><br>{company_requestedto}<br><br>
<b>Department Requested To</b><br>{department_requestedto}<br><br>
<b>Priority Level</b><br>{priority_level}<br><br>
<b>Status</b><br>{status}<br><br>
<p>Please click <u><a href="{url}" style="text-decoration:underline;color:#007bff;" target="_blank">here</a></u> to access the change request.</p><br>
<p>Sincerely,</p>
<p>RMS Team</p><br><br>
<p>Powered by</p>
<img src="https://s18.directupload.net/images/190807/jaewp4nx.png" width="120px"/>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<title>RMS: Change Request Accepted</title>
</head>
<body style="font-family: arial;">
<img src="https://s18.directupload.net/images/190807/wjwrxx5i.jpg" width="100px"/>
<h3>Resource Management System &#40;RMS&#41;</h3>
<h3 style="color:#888888;">Change Request Accepted</h3><br>
<p>Dear {name},</p><br>
<p>A change request you have completed has been accepted by the requestor. Please see the details of your change request below.</p><br>
<b>Accepted By</b><br>{accepted_by}<br><br>
<b>Routing Level</b><br>{routing_level}<br><br>
<b>Status</b><br>{status}<br><br><br>
<b>CR Number</b><br>{cr_number}<br><br>
<b>CR Name</b><br>{cr_name}<br><br>
<b>Company Requested To</b><br>{company_requestedto}<br><br>
<b>Department Requested To</b><br>{department_requestedto}<br><br>
<b>Priority Level</b><br>{priority_level}<br><br>
<p>Please click <u><a href="{url}" style="text-decoration:underline;color:#007bff;" target="_blank">here</a></u> to access your change request.</p><br>
<p>Sincerely,</p>
<p>RMS Team</p><br><br>
<p>Powered by</p>
<img src="https://s18.directupload.net/images/190807/jaewp4nx.png" width="120px"/>
</body>
<!DOCTYPE html>
<html>
<head>
<title>RMS: Change Request Accepted</title>
</head>
<body style="font-family: arial;">
<h3>Resource Management System &#40;RMS&#41;</h3>
<h3 style="color:#888888;">Change Request Accepted</h3><br>
<p>Dear {name},</p><br>
<p>A change request you have completed has been accepted by the requestor. Please see the details of your change request below.</p><br>
<b>Accepted By</b><br>{action_by}<br><br>
<b>Routing Level</b><br>{routing_level}<br><br>
<b>Status</b><br>{status}<br><br><br>
<b>CR Number</b><br>{cr_number}<br><br>
<b>CR Name</b><br>{cr_name}<br><br>
<b>Company Requested To</b><br>{company_requestedto}<br><br>
<b>Department Requested To</b><br>{department_requestedto}<br><br>
<b>Priority Level</b><br>{priority_level}<br><br>
<p>Please click <u><a href="{url}" style="text-decoration:underline;color:#007bff;" target="_blank">here</a></u> to access your change request.</p><br>
<p>Sincerely,</p>
<p>RMS Team</p><br><br>
<p>Powered by</p>
<img src="https://s18.directupload.net/images/190807/jaewp4nx.png" width="120px"/>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<title>RMS: Change Request Acknowledged</title>
</head>
<body style="font-family: arial;">
<img src="https://s18.directupload.net/images/190807/wjwrxx5i.jpg" width="100px"/>
<h3>Resource Management System &#40;RMS&#41;</h3>
<h3 style="color:#888888;">Change Request Acknowledged</h3><br>
<p>Dear {name},</p><br>
<p>Your change request has been acknowledged. Please see the details of your change request below.</p><br>
<b>Acknowledged By</b><br>{acknowledge_by}<br><br>
<b>Routing Level</b><br>{routing_level}<br><br>
<b>Status</b><br>{status}<br><br><br>
<b>CR Number</b><br>{cr_number}<br><br>
<b>CR Name</b><br>{cr_name}<br><br>
<b>Company Requested To</b><br>{company_requestedto}<br><br>
<b>Department Requested To</b><br>{department_requestedto}<br><br>
<b>Priority Level</b><br>{priority_level}<br><br>
<p>Please click <u><a href="{url}" style="text-decoration:underline;color:#007bff;" target="_blank">here</a></u> to access the change request.</p><br>
<p>Sincerely,</p>
<p>RMS Team</p><br><br>
<p>Powered by</p>
<img src="https://s18.directupload.net/images/190807/jaewp4nx.png" width="120px"/>
</body>
<!DOCTYPE html>
<html>
<head>
<title>RMS: Change Request Acknowledged</title>
</head>
<body style="font-family: arial;">
<h3>Resource Management System &#40;RMS&#41;</h3>
<h3 style="color:#888888;">Change Request Acknowledged</h3><br>
<p>Dear {name},</p><br>
<p>Your change request has been acknowledged. Please see the details of your change request below.</p><br>
<b>Acknowledged By</b><br>{action_by}<br><br>
<b>Routing Level</b><br>{routing_level}<br><br>
<b>Status</b><br>{status}<br><br><br>
<b>CR Number</b><br>{cr_number}<br><br>
<b>CR Name</b><br>{cr_name}<br><br>
<b>Company Requested To</b><br>{company_requestedto}<br><br>
<b>Department Requested To</b><br>{department_requestedto}<br><br>
<b>Priority Level</b><br>{priority_level}<br><br>
<p>Please click <u><a href="{url}" style="text-decoration:underline;color:#007bff;" target="_blank">here</a></u> to access the change request.</p><br>
<p>Sincerely,</p>
<p>RMS Team</p><br><br>
<p>Powered by</p>
<img src="https://s18.directupload.net/images/190807/jaewp4nx.png" width="120px"/>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<title>RMS: Change Request Approved</title>
</head>
<body style="font-family: arial;">
<img src="https://s18.directupload.net/images/190807/wjwrxx5i.jpg" width="100px"/>
<h3>Resource Management System &#40;RMS&#41;</h3>
<h3 style="color:#888888;">Change Request Approved</h3><br>
<p>Dear {name},</p><br>
<p>Your change request has been approved. Please see the details of your change request below.</p><br>
<b>Approved By</b><br>{approved_by}<br><br>
<b>Routing Level</b><br>{routing_level}<br><br>
<b>Status</b><br>{status}<br><br><br>
<b>CR Number</b><br>{cr_number}<br><br>
<b>CR Name</b><br>{cr_name}<br><br>
<b>Company Requested To</b><br>{company_requestedto}<br><br>
<b>Department Requested To</b><br>{department_requestedto}<br><br>
<b>Priority Level</b><br>{priority_level}<br><br>
<p>Please click <u><a href="{url}" style="text-decoration:underline;color:#007bff;" target="_blank">here</a></u> to access your change request.</p><br>
<p>Sincerely,</p>
<p>RMS Team</p><br><br>
<p>Powered by</p>
<img src="https://s18.directupload.net/images/190807/jaewp4nx.png" width="120px"/>
</body>
<!DOCTYPE html>
<html>
<head>
<title>RMS: Change Request Approved</title>
</head>
<body style="font-family: arial;">
<h3>Resource Management System &#40;RMS&#41;</h3>
<h3 style="color:#888888;">Change Request Approved</h3><br>
<p>Dear {name},</p><br>
<p>Your change request has been approved. Please see the details of your change request below.</p><br>
<b>Approved By</b><br>{action_by}<br><br>
<b>Routing Level</b><br>{routing_level}<br><br>
<b>Status</b><br>{status}<br><br><br>
<b>CR Number</b><br>{cr_number}<br><br>
<b>CR Name</b><br>{cr_name}<br><br>
<b>Company Requested To</b><br>{company_requestedto}<br><br>
<b>Department Requested To</b><br>{department_requestedto}<br><br>
<b>Priority Level</b><br>{priority_level}<br><br>
<p>Please click <u><a href="{url}" style="text-decoration:underline;color:#007bff;" target="_blank">here</a></u> to access your change request.</p><br>
<p>Sincerely,</p>
<p>RMS Team</p><br><br>
<p>Powered by</p>
<img src="https://s18.directupload.net/images/190807/jaewp4nx.png" width="120px"/>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<title>RMS: Change Request Cancelled</title>
</head>
<body style="font-family: arial;">
<img src="https://s18.directupload.net/images/190807/wjwrxx5i.jpg" width="100px"/>
<h3>Resource Management System &#40;RMS&#41;</h3>
<h3 style="color:#888888;">Change Request Cancelled</h3><br>
<p>Dear {name},</p><br>
<p>Your change request has been cancelled. Please see the details of your change request below.</p><br>
<b>Auto-Cancel Date</b><br>{auto_cancel_date}<br><br>
<b>Date Submitted to Last Approver</b><br>{date_submitted_last_approver}<br><br>
<b>Approver Pending Action</b><br>{approver_pending_action}<br><br><br>
<b>CR Number</b><br>{cr_number}<br><br>
<b>CR Name</b><br>{cr_name}<br><br>
<b>Company Requested To</b><br>{company_requestedto}<br><br>
<b>Department Requested To</b><br>{department_requestedto}<br><br>
<b>Priority Level</b><br>{priority_level}<br><br>
<b>Status</b><br>{status}<br><br>
<p>Please click <u><a href="{url}" style="text-decoration:underline;color:#007bff;" target="_blank">here</a></u> to access your change request.</p><br>
<p>Sincerely,</p>
<p>RMS Team</p><br><br>
<p>Powered by</p>
<img src="https://s18.directupload.net/images/190807/jaewp4nx.png" width="120px"/>
</body>
<!DOCTYPE html>
<html>
<head>
<title>RMS: Change Request Cancelled</title>
</head>
<body style="font-family: arial;">
<h3>Resource Management System &#40;RMS&#41;</h3>
<h3 style="color:#888888;">Change Request Cancelled</h3><br>
<p>Dear {name},</p><br>
<p>Your change request has been cancelled. Please see the details of your change request below.</p><br>
<b>Auto-Cancel Date</b><br>{auto_cancel_date}<br><br>
<b>Date Submitted to Last Approver</b><br>{date_submitted_last_approver}<br><br>
<b>Approver Pending Action</b><br>{approver_pending_action}<br><br><br>
<b>CR Number</b><br>{cr_number}<br><br>
<b>CR Name</b><br>{cr_name}<br><br>
<b>Company Requested To</b><br>{company_requestedto}<br><br>
<b>Department Requested To</b><br>{department_requestedto}<br><br>
<b>Priority Level</b><br>{priority_level}<br><br>
<b>Status</b><br>{status}<br><br>
<p>Please click <u><a href="{url}" style="text-decoration:underline;color:#007bff;" target="_blank">here</a></u> to access your change request.</p><br>
<p>Sincerely,</p>
<p>RMS Team</p><br><br>
<p>Powered by</p>
<img src="https://s18.directupload.net/images/190807/jaewp4nx.png" width="120px"/>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<title>RMS: Change Request Completed</title>
</head>
<body style="font-family: arial;">
<img src="https://s18.directupload.net/images/190807/wjwrxx5i.jpg" width="100px"/>
<h3>Resource Management System &#40;RMS&#41;</h3>
<h3 style="color:#888888;">Change Request Completed</h3><br>
<p>Dear {name},</p><br>
<p>Your change request has been completed. Please see the details of your change request below.</p><br>
<b>Completed By</b><br>{completed_by}<br><br>
<b>Routing Level</b><br>{routing_level}<br><br>
<b>Status</b><br>{status}<br><br><br>
<b>CR Number</b><br>{cr_number}<br><br>
<b>CR Name</b><br>{cr_name}<br><br>
<b>Company Requested To</b><br>{company_requestedto}<br><br>
<b>Department Requested To</b><br>{department_requestedto}<br><br>
<b>Priority Level</b><br>{priority_level}<br><br>
<p>Please click <u><a href="{url}" style="text-decoration:underline;color:#007bff;" target="_blank">here</a></u> to access your change request.</p><br>
<p>Sincerely,</p>
<p>RMS Team</p><br><br>
<p>Powered by</p>
<img src="https://s18.directupload.net/images/190807/jaewp4nx.png" width="120px"/>
</body>
<!DOCTYPE html>
<html>
<head>
<title>RMS: Change Request Completed</title>
</head>
<body style="font-family: arial;">
<h3>Resource Management System &#40;RMS&#41;</h3>
<h3 style="color:#888888;">Change Request Completed</h3><br>
<p>Dear {name},</p><br>
<p>Your change request has been completed. Please see the details of your change request below.</p><br>
<b>Completed By</b><br>{action_by}<br><br>
<b>Routing Level</b><br>{routing_level}<br><br>
<b>Status</b><br>{status}<br><br><br>
<b>CR Number</b><br>{cr_number}<br><br>
<b>CR Name</b><br>{cr_name}<br><br>
<b>Company Requested To</b><br>{company_requestedto}<br><br>
<b>Department Requested To</b><br>{department_requestedto}<br><br>
<b>Priority Level</b><br>{priority_level}<br><br>
<p>Please click <u><a href="{url}" style="text-decoration:underline;color:#007bff;" target="_blank">here</a></u> to access your change request.</p><br>
<p>Sincerely,</p>
<p>RMS Team</p><br><br>
<p>Powered by</p>
<img src="https://s18.directupload.net/images/190807/jaewp4nx.png" width="120px"/>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<title>RMS: Target Date Overdue</title>
</head>
<body style="font-family: arial;">
<img src="https://s18.directupload.net/images/190807/wjwrxx5i.jpg" width="100px"/>
<h3>Resource Management System &#40;RMS&#41;</h3>
<h3 style="color:#888888;">Change Request Target Date Overdue</h3><br>
<p>Dear {name},</p><br>
<p>Please be informed that the change request&apos;s target date is overdue. Please see the details of your change request below.</p><br>
<b>Target Date</b><br>{target_date}<br><br><br>
<b>CR Number</b><br>{cr_number}<br><br>
<b>CR Name</b><br>{cr_name}<br><br>
<b>Company Requested To</b><br>{company_requestedto}<br><br>
<b>Department Requested To</b><br>{department_requestedto}<br><br>
<b>Priority Level</b><br>{priority_level}<br><br>
<b>Status</b><br>{status}<br><br>
<p>Please click <u><a href="{url}" style="text-decoration:underline;color:#007bff;" target="_blank">here</a></u> to access your change request.</p><br>
<p>Sincerely,</p>
<p>RMS Team</p><br><br>
<p>Powered by</p>
<img src="https://s18.directupload.net/images/190807/jaewp4nx.png" width="120px"/>
</body>
<!DOCTYPE html>
<html>
<head>
<title>RMS: Target Date Overdue</title>
</head>
<body style="font-family: arial;">
<h3>Resource Management System &#40;RMS&#41;</h3>
<h3 style="color:#888888;">Change Request Target Date Overdue</h3><br>
<p>Dear {name},</p><br>
<p>Please be informed that the change request&apos;s target date is overdue. Please see the details of your change request below.</p><br>
<b>Target Date</b><br>{target_date}<br><br><br>
<b>CR Number</b><br>{cr_number}<br><br>
<b>CR Name</b><br>{cr_name}<br><br>
<b>Company Requested To</b><br>{company_requestedto}<br><br>
<b>Department Requested To</b><br>{department_requestedto}<br><br>
<b>Priority Level</b><br>{priority_level}<br><br>
<b>Status</b><br>{status}<br><br>
<p>Please click <u><a href="{url}" style="text-decoration:underline;color:#007bff;" target="_blank">here</a></u> to access your change request.</p><br>
<p>Sincerely,</p>
<p>RMS Team</p><br><br>
<p>Powered by</p>
<img src="https://s18.directupload.net/images/190807/jaewp4nx.png" width="120px"/>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<title>RMS: Change Request Rejected</title>
</head>
<body style="font-family: arial;">
<img src="https://s18.directupload.net/images/190807/wjwrxx5i.jpg" width="100px"/>
<h3>Resource Management System &#40;RMS&#41;</h3>
<h3 style="color:#888888;">Change Request Rejected</h3><br>
<p>Dear {name},</p><br>
<p>A change request you have completed has been rejected by the requestor.Please see the details of your change request below.</p><br>
<b>Rejected By</b><br>{rejected_by}<br><br>
<b>Routing Level</b><br>{routing_level}<br><br>
<b>Status</b><br>{status}<br><br><br>
<b>CR Number</b><br>{cr_number}<br><br>
<b>CR Name</b><br>{cr_name}<br><br>
<b>Company Requested To</b><br>{company_requestedto}<br><br>
<b>Department Requested To</b><br>{department_requestedto}<br><br>
<b>Priority Level</b><br>{priority_level}<br><br>
<b>Remarks</b><br>{remarks}<br><br>
<p>Please click <u><a href="{url}" style="text-decoration:underline;color:#007bff;" target="_blank">here</a></u> to access your change request.</p><br>
<p>Sincerely,</p>
<p>RMS Team</p><br><br>
<p>Powered by</p>
<img src="https://s18.directupload.net/images/190807/jaewp4nx.png" width="120px"/>
</body>
<!DOCTYPE html>
<html>
<head>
<title>RMS: Change Request Rejected</title>
</head>
<body style="font-family: arial;">
<h3>Resource Management System &#40;RMS&#41;</h3>
<h3 style="color:#888888;">Change Request Rejected</h3><br>
<p>Dear {name},</p><br>
<p>A change request you have completed has been rejected by the requestor.Please see the details of your change request below.</p><br>
<b>Rejected By</b><br>{action_by}<br><br>
<b>Routing Level</b><br>{routing_level}<br><br>
<b>Status</b><br>{status}<br><br><br>
<b>CR Number</b><br>{cr_number}<br><br>
<b>CR Name</b><br>{cr_name}<br><br>
<b>Company Requested To</b><br>{company_requestedto}<br><br>
<b>Department Requested To</b><br>{department_requestedto}<br><br>
<b>Priority Level</b><br>{priority_level}<br><br>
<b>Remarks</b><br>{remarks}<br><br>
<p>Please click <u><a href="{url}" style="text-decoration:underline;color:#007bff;" target="_blank">here</a></u> to access your change request.</p><br>
<p>Sincerely,</p>
<p>RMS Team</p><br><br>
<p>Powered by</p>
<img src="https://s18.directupload.net/images/190807/jaewp4nx.png" width="120px"/>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<title>RMS: Change Request Rejected</title>
</head>
<body style="font-family: arial;">
<img src="https://s18.directupload.net/images/190807/wjwrxx5i.jpg" width="100px"/>
<h3>Resource Management System &#40;RMS&#41;</h3>
<h3 style="color:#888888;">Change Request Rejected</h3><br>
<p>Dear {name},</p><br>
<p>Your change request has been rejected. Please see the details of your change request below.</p><br>
<b>Rejected By</b><br>{rejected_by}<br><br>
<b>Routing Level</b><br>{routing_level}<br><br>
<b>Status</b><br>{status}<br><br><br>
<b>CR Number</b><br>{cr_number}<br><br>
<b>CR Name</b><br>{cr_name}<br><br>
<b>Company Requested To</b><br>{company_requestedto}<br><br>
<b>Department Requested To</b><br>{department_requestedto}<br><br>
<b>Priority Level</b><br>{priority_level}<br><br>
<b>Remarks</b><br>{remarks}<br><br>
<p>Please click <u><a href="{url}" style="text-decoration:underline;color:#007bff;" target="_blank">here</a></u> to access your change request.</p><br>
<p>Sincerely,</p>
<p>RMS Team</p><br><br>
<p>Powered by</p>
<img src="https://s18.directupload.net/images/190807/jaewp4nx.png" width="120px"/>
</body>
<!DOCTYPE html>
<html>
<head>
<title>RMS: Change Request Rejected</title>
</head>
<body style="font-family: arial;">
<h3>Resource Management System &#40;RMS&#41;</h3>
<h3 style="color:#888888;">Change Request Rejected</h3><br>
<p>Dear {name},</p><br>
<p>Your change request has been rejected. Please see the details of your change request below.</p><br>
<b>Rejected By</b><br>{action_by}<br><br>
<b>Routing Level</b><br>{routing_level}<br><br>
<b>Status</b><br>{status}<br><br><br>
<b>CR Number</b><br>{cr_number}<br><br>
<b>CR Name</b><br>{cr_name}<br><br>
<b>Company Requested To</b><br>{company_requestedto}<br><br>
<b>Department Requested To</b><br>{department_requestedto}<br><br>
<b>Priority Level</b><br>{priority_level}<br><br>
<b>Remarks</b><br>{remarks}<br><br>
<p>Please click <u><a href="{url}" style="text-decoration:underline;color:#007bff;" target="_blank">here</a></u> to access your change request.</p><br>
<p>Sincerely,</p>
<p>RMS Team</p><br><br>
<p>Powered by</p>
<img src="https://s18.directupload.net/images/190807/jaewp4nx.png" width="120px"/>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<title>RMS: New User Created</title>
</head>
<body style="font-family: arial;">
<div style="max-width:100px!important;">
<img src="https://s18.directupload.net/images/190807/wjwrxx5i.jpg"/>
</div>
<h3>Resource Management System &#40;RMS&#41;</h3>
<h3 style="color:#888888;">New User Created</h3><br>
<p>Dear {name},</p><br>
<p>You have been created as a new user of RMS. Please see your default login details below.</p><br>
<b>Username</b><br>{username}<br><br>
<b>Password</b><br>password123<br><br>
<p>You may change your password through the <u><a href="http://staging.rms.oneberrysystem.com/cms/profile/" style="text-decoration:underline;color:#007bff;" target="_blank">my profile</a></u> section of RMS any time.</p><br>
<p>Sincerely,</p>
<p>RMS Team</p><br><br>
<p>Powered by</p>
<img src="https://s18.directupload.net/images/190807/jaewp4nx.png" width="120px"/>
</body>
<!DOCTYPE html>
<html>
<head>
<title>RMS: New User Created</title>
</head>
<body style="font-family: arial;">
<h3>Resource Management System &#40;RMS&#41;</h3>
<h3 style="color:#888888;">New User Created</h3><br>
<p>Dear {name},</p><br>
<p>You have been created as a new user of RMS. Please see your default login details below.</p><br>
<b>Username</b><br>{username}<br><br>
<b>Password</b><br>password123<br><br>
<p>You may change your password through the <u><a href="http://staging.rms.oneberrysystem.com/cms/profile/" style="text-decoration:underline;color:#007bff;" target="_blank">my profile</a></u> section of RMS any time.</p><br>
<p>Sincerely,</p>
<p>RMS Team</p><br><br>
<p>Powered by</p>
<img src="https://s18.directupload.net/images/190807/jaewp4nx.png" width="120px"/>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<title>RMS: Reset Password</title>
</head>
<body style="font-family: arial;">
<img src="https://s18.directupload.net/images/190807/wjwrxx5i.jpg" width="100px"/>
<h3>Resource Management System &#40;RMS&#41;</h3>
<h3 style="color:#888888;">Reset Password</h3><br>
<p>Dear {name},</p><br>
<p>To reset your password click this <u><a href="{url}" style="text-decoration:underline;color:#007bff;" target="_blank">link</a></u> and enter code <strong>{code}</strong>.</p><br>
<p>Sincerely,</p>
<p>RMS Team</p><br><br>
<p>Powered by</p>
<img src="https://s18.directupload.net/images/190807/jaewp4nx.png" width="120px"/>
</body>
<!DOCTYPE html>
<html>
<head>
<title>RMS: Reset Password</title>
</head>
<body style="font-family: arial;">
<h3>Resource Management System &#40;RMS&#41;</h3>
<h3 style="color:#888888;">Reset Password</h3><br>
<p>Dear {name},</p><br>
<p>To reset your password click this <u><a href="{url}" style="text-decoration:underline;color:#007bff;" target="_blank">link</a></u> and enter code <strong>{code}</strong>.</p><br>
<p>Sincerely,</p>
<p>RMS Team</p><br><br>
<p>Powered by</p>
<img src="https://s18.directupload.net/images/190807/jaewp4nx.png" width="120px"/>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<title>RMS: Approval Reminder</title>
</head>
<body style="font-family: arial;">
<img src="https://s18.directupload.net/images/190807/wjwrxx5i.jpg" width="100px"/>
<h3>Resource Management System &#40;RMS&#41;</h3>
<h3 style="color:#888888;">Change Request Approval Reminder</h3><br>
<p>Dear {name},</p><br>
<p>Please be reminded that a change request is pending your approval. Please note that it will automatically be cancelled by the system if no action is taken within 30 days from the date it was submitted for your approval.</p><br>
<b>Auto-Cancel Date</b><br>{auto_cancel_date}<br><br>
<b>Date Submitted to Last Approver</b><br>{date_submitted_last_approver}<br><br><br>
<b>CR Number</b><br>{cr_number}<br><br>
<b>CR Name</b><br>{cr_name}<br><br>
<b>Company Requested To</b><br>{company_requestedto}<br><br>
<b>Department Requested To</b><br>{department_requestedto}<br><br>
<b>Priority Level</b><br>{priority_level}<br><br>
<b>Status</b><br>{status}<br><br>
<p>Please click <u><a href="{url}" style="text-decoration:underline;color:#007bff;" target="_blank">here</a></u> to access the change request.</p><br>
<p>Sincerely,</p>
<p>RMS Team</p><br><br>
<p>Powered by</p>
<img src="https://s18.directupload.net/images/190807/jaewp4nx.png" width="120px"/>
</body>
<!DOCTYPE html>
<html>
<head>
<title>RMS: Approval Reminder</title>
</head>
<body style="font-family: arial;">
<h3>Resource Management System &#40;RMS&#41;</h3>
<h3 style="color:#888888;">Change Request Approval Reminder</h3><br>
<p>Dear {name},</p><br>
<p>Please be reminded that a change request is pending your approval. Please note that it will automatically be cancelled by the system if no action is taken within 30 days from the date it was submitted for your approval.</p><br>
<b>Auto-Cancel Date</b><br>{auto_cancel_date}<br><br>
<b>Date Submitted to Last Approver</b><br>{date_submitted_last_approver}<br><br><br>
<b>CR Number</b><br>{cr_number}<br><br>
<b>CR Name</b><br>{cr_name}<br><br>
<b>Company Requested To</b><br>{company_requestedto}<br><br>
<b>Department Requested To</b><br>{department_requestedto}<br><br>
<b>Priority Level</b><br>{priority_level}<br><br>
<b>Status</b><br>{status}<br><br>
<p>Please click <u><a href="{url}" style="text-decoration:underline;color:#007bff;" target="_blank">here</a></u> to access the change request.</p><br>
<p>Sincerely,</p>
<p>RMS Team</p><br><br>
<p>Powered by</p>
<img src="https://s18.directupload.net/images/190807/jaewp4nx.png" width="120px"/>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<title>RMS: Approval Reminder</title>
</head>
<body style="font-family: arial;">
<img src="https://s18.directupload.net/images/190807/wjwrxx5i.jpg" width="100px"/>
<h3>Resource Management System &#40;RMS&#41;</h3>
<h3 style="color:#888888;">Change Request Approval Reminder</h3><br>
<p>Dear {name},</p><br>
<p>Please be informed that a reminder has been sent to approve your change request. Please note that it will automatically be cancelled by the system if no action is taken within 30 days from the date it was submitted to the last approving officer.</p><br>
<b>Auto-Cancel Date</b><br>{auto_cancel_date}<br><br>
<b>Date Submitted to Last Approver</b><br>{date_submitted_last_approver}<br><br>
<b>Approver Pending Action</b><br>{approver_pending_action}<br><br><br>
<b>CR Number</b><br>{cr_number}<br><br>
<b>CR Name</b><br>{cr_name}<br><br>
<b>Company Requested To</b><br>{company_requestedto}<br><br>
<b>Department Requested To</b><br>{department_requestedto}<br><br>
<b>Priority Level</b><br>{priority_level}<br><br>
<b>Status</b><br>{status}<br><br>
<p>Please click <u><a href="{url}" style="text-decoration:underline;color:#007bff;" target="_blank">here</a></u> to access the change request.</p><br>
<p>Sincerely,</p>
<p>RMS Team</p><br><br>
<p>Powered by</p>
<img src="https://s18.directupload.net/images/190807/jaewp4nx.png" width="120px"/>
</body>
<!DOCTYPE html>
<html>
<head>
<title>RMS: Approval Reminder</title>
</head>
<body style="font-family: arial;">
<h3>Resource Management System &#40;RMS&#41;</h3>
<h3 style="color:#888888;">Change Request Approval Reminder</h3><br>
<p>Dear {name},</p><br>
<p>Please be informed that a reminder has been sent to approve your change request. Please note that it will automatically be cancelled by the system if no action is taken within 30 days from the date it was submitted to the last approving officer.</p><br>
<b>Auto-Cancel Date</b><br>{auto_cancel_date}<br><br>
<b>Date Submitted to Last Approver</b><br>{date_submitted_last_approver}<br><br>
<b>Approver Pending Action</b><br>{approver_pending_action}<br><br><br>
<b>CR Number</b><br>{cr_number}<br><br>
<b>CR Name</b><br>{cr_name}<br><br>
<b>Company Requested To</b><br>{company_requestedto}<br><br>
<b>Department Requested To</b><br>{department_requestedto}<br><br>
<b>Priority Level</b><br>{priority_level}<br><br>
<b>Status</b><br>{status}<br><br>
<p>Please click <u><a href="{url}" style="text-decoration:underline;color:#007bff;" target="_blank">here</a></u> to access the change request.</p><br>
<p>Sincerely,</p>
<p>RMS Team</p><br><br>
<p>Powered by</p>
<img src="https://s18.directupload.net/images/190807/jaewp4nx.png" width="120px"/>
</body>
</html>
\ No newline at end of file
......@@ -41,3 +41,5 @@ VENDOR_REJECT_MESSAGE = config['NOTIFICATION_EMAIL']['VENDOR_REJECT_MESSAGE']
#ADMIN PROFILE
CATCH_EMAIL = config['DEV']['CATCH_EMAIL']
CR_FRONT_LINK = config['CR_FRONT_LINK']['CR_LINK']
......@@ -39,3 +39,5 @@ VENDOR_REJECT_MESSAGE = config['NOTIFICATION_EMAIL']['VENDOR_REJECT_MESSAGE']
#ADMIN PROFILE
CATCH_EMAIL = config['LOCAL']['CATCH_EMAIL']
CR_FRONT_LINK = config['CR_FRONT_LINK']['CR_LINK']
......@@ -41,3 +41,5 @@ VENDOR_REJECT_MESSAGE = config['NOTIFICATION_EMAIL']['VENDOR_REJECT_MESSAGE']
#ADMIN PROFILE
CATCH_EMAIL = config['PRODUCTION']['CATCH_EMAIL']
CR_FRONT_LINK = config['CR_FRONT_LINK']['CR_LINK']
......@@ -42,3 +42,5 @@ VENDOR_REJECT_MESSAGE = config['NOTIFICATION_EMAIL']['VENDOR_REJECT_MESSAGE']
#ADMIN PROFILE
CATCH_EMAIL = config['UAT']['CATCH_EMAIL']
CR_FRONT_LINK = config['CR_FRONT_LINK']['CR_LINK']
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment