Commit 78400ef5 authored by Gladys Forte's avatar Gladys Forte

form action and email initial

parent 3a35976d
...@@ -22,7 +22,9 @@ from rest_framework.exceptions import ValidationError ...@@ -22,7 +22,9 @@ from rest_framework.exceptions import ValidationError
from django.db import transaction, IntegrityError, connection from django.db import transaction, IntegrityError, connection
from app.applicationlayer.utils import QuerySetHelper from app.applicationlayer.utils import QuerySetHelper
from app.businesslayer.changerequest import change_request 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 app.entities import enums
from django.forms.models import model_to_dict from django.forms.models import model_to_dict
...@@ -276,10 +278,10 @@ class ChangeRequestFormsViewset(meviewsets.ModelViewSet): ...@@ -276,10 +278,10 @@ class ChangeRequestFormsViewset(meviewsets.ModelViewSet):
models.ChangeRequestFormHeader.objects.filter( models.ChangeRequestFormHeader.objects.filter(
form_code=form_code).update(status='Pending') form_code=form_code).update(status='Pending')
models.ChangeRequestFormApprovers.objects.filter( models.ChangeRequestFormApprovers.objects.filter(
form_code=form_code).update(action=None, remarks=None, form_code=form_code).update(action=None, remarks=None,
date_sent=None) date_sent=None, created=None)
return Response( return Response(
"Change request form successfully re routed", "Change request form successfully re routed",
...@@ -312,7 +314,7 @@ class ChangeRequestFormsViewset(meviewsets.ModelViewSet): ...@@ -312,7 +314,7 @@ class ChangeRequestFormsViewset(meviewsets.ModelViewSet):
models.ChangeRequestFormApprovers.objects.filter( models.ChangeRequestFormApprovers.objects.filter(
form_code=form_code).update(action=None, remarks=None, form_code=form_code).update(action=None, remarks=None,
date_sent=None) date_sent=None, created=None)
return Response( return Response(
"Change request form successfully resubmitted", "Change request form successfully resubmitted",
...@@ -325,11 +327,8 @@ class ChangeRequestFormsViewset(meviewsets.ModelViewSet): ...@@ -325,11 +327,8 @@ class ChangeRequestFormsViewset(meviewsets.ModelViewSet):
url_path='actions', url_name='actions' url_path='actions', url_name='actions'
) )
def actions(self, request, *args, **kwargs): def actions(self, request, *args, **kwargs):
form_code = kwargs['form_code'] id = request.data['id']
print(form_code)
id = serializer.data['id']
current_user = request.data['user'] current_user = request.data['user']
form_code = request.data['form_code'] form_code = request.data['form_code']
...@@ -338,12 +337,12 @@ class ChangeRequestFormsViewset(meviewsets.ModelViewSet): ...@@ -338,12 +337,12 @@ class ChangeRequestFormsViewset(meviewsets.ModelViewSet):
level = request.data['level'] level = request.data['level']
next_level = int(request.data['level']) + 1 next_level = int(request.data['level']) + 1
remarks = request.data['remarks'] remarks = request.data['remarks']
print("level 1")
next_approver = models.ChangeRequestFormApprovers.objects.filter( next_approver = models.ChangeRequestFormApprovers.objects.filter(
level=str(next_level), level=str(next_level),
form_code=form_code form_code=form_code
) )
print("level 2")
if action.lower() == 'approved': if action.lower() == 'approved':
models.ChangeRequestFormApprovers.objects.filter( models.ChangeRequestFormApprovers.objects.filter(
...@@ -365,7 +364,7 @@ class ChangeRequestFormsViewset(meviewsets.ModelViewSet): ...@@ -365,7 +364,7 @@ class ChangeRequestFormsViewset(meviewsets.ModelViewSet):
requestor_notification_msg, action, requestor_email_code, requestor_notification_msg, action, requestor_email_code,
remarks, level remarks, level
) )
print("level 3")
for n_approver in next_approver: for n_approver in next_approver:
print(n_approver.user) print(n_approver.user)
...@@ -598,9 +597,9 @@ class ChangeRequestFormApproversViewset(meviewsets.ModelViewSet): ...@@ -598,9 +597,9 @@ class ChangeRequestFormApproversViewset(meviewsets.ModelViewSet):
if n_approver.delegation.lower() == 'vendor/implementor': if n_approver.delegation.lower() == 'vendor/implementor':
notification_msg = VENDOR_ACKNOWLEDGE_MESSAGE.split(';')[0] notification_msg = VENDOR_ACKNOWLEDGE_MESSAGE.split(';')[0]
email_code = VENDOR_ACKNOWLEDGE_MESSAGE.split(';')[1] email_code = VENDOR_ACKNOWLEDGE_MESSAGE.split(';')[1]
next_appover_email( next_appover_email(
n_approver.user, form_code, delegation, n_approver.user.code, form_code, delegation,
notification_msg, action, email_code notification_msg, action, email_code
) )
......
...@@ -6,29 +6,28 @@ import requests ...@@ -6,29 +6,28 @@ import requests
from app.entities import models from app.entities import models
from datetime import timedelta from datetime import timedelta
from django.db.models import Q from django.db.models import Q
# from dateutil import parser from app.applicationlayer.utils import main_threading
from app.helper.email_service import sender
# EMAIL = settings.EMAIL
# ACCOUNTS = settings.ACCOUNTS
# GROUPS = settings.GROUPS
# COMPANIES = settings.COMPANIES
# ALLOWED_COMPANY = settings.ALLOWED_COMPANY
# CR_FRONT_LINK = settings.CR_FRONT_LINK
CR_FRONT_LINK = settings.CR_FRONT_LINK
# NOTIFICATION = settings.NOTIFICATION # NOTIFICATION = settings.NOTIFICATION
def get_group_details(group_no): def get_dept_details(dept_no):
return requests.get(f'{GROUPS}?group_no={group_no}').json()['results'][0] dept_instance = models.Department.objects.filter(code=dept_no)
return dept_instance
def get_companies_details(slug): 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): 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): def get_allowed_company(id_number):
...@@ -152,8 +151,7 @@ def receiver_body( ...@@ -152,8 +151,7 @@ def receiver_body(
def get_template_instance(form_code): def get_template_instance(form_code):
template_instance = models.ChangeRequestFormHeader.objects.filter( template_instance = models.ChangeRequestFormHeader.objects.filter(
Q(form_code=form_code) & Q(form_code=form_code)
Q(archived_at=None)
).first() ).first()
return template_instance return template_instance
...@@ -219,7 +217,7 @@ def send_mail_vendor(receiver, ...@@ -219,7 +217,7 @@ def send_mail_vendor(receiver,
sender_account_id = sender_instance['id_number'] sender_account_id = sender_instance['id_number']
sender_name = sender_instance['name'] sender_name = sender_instance['name']
group = get_group_details(requested_to_department) group = get_dept_details(requested_to_department)
group_name = group['name'] group_name = group['name']
company = get_companies_details(requested_to_company) company = get_companies_details(requested_to_company)
...@@ -251,74 +249,85 @@ def send_mail_vendor(receiver, ...@@ -251,74 +249,85 @@ def send_mail_vendor(receiver,
) )
def send_mail_requestor(receiver, def send_mail_requestor(receiver,
form_code, form_code,
delegation, delegation,
msg, msg,
action, action,
code, code,
remarks, remarks,
routing_level): routing_level):
cr_link = f'{CR_FRONT_LINK}/{form_code}' cr_link = f'{CR_FRONT_LINK}/{form_code}'
template_instance = get_template_instance(form_code) template_instance = get_template_instance(form_code)
app = 'cms'
cr_number = template_instance.requested_to_template_id cr_number = template_instance.requested_to_template_id
template_name = template_instance.requested_to_template_name template_name = template_instance.requested_to_template_name
requested_to_company = template_instance.requested_to_company requested_to_company = template_instance.requested_to_company.code
requested_to_department = template_instance.requested_to_department requested_to_department = template_instance.requested_to_department.code
requested_by_user = template_instance.requested_by_user requested_by_user = template_instance.requested_by_user.code
created = template_instance.created
requested_to_priority = template_instance.requested_to_priority requested_to_priority = template_instance.requested_to_priority
# receiver details -------------------------------------------------- # receiver details --------------------------------------------------
requestor_instance = get_account_details(requested_by_user) requestor_instance = get_account_details(requested_by_user)
requestor_name = requestor_instance['name'] requestor_name = requestor_instance.values_list('name', flat=True)[0]
requestor_email = requestor_instance['email'] requestor_email = requestor_instance.values_list('email', flat=True)[0]
requestor_account_id = requestor_instance['id_number']
# sender details -------------------------------------------------- # sender details --------------------------------------------------
sender_instance = get_account_details(receiver) sender_instance = get_account_details(receiver)
sender_account_username = sender_instance['username'] sender_email = sender_instance.values_list('email', flat=True)[0]
sender_account_id = sender_instance['id_number'] sender_name = sender_instance.values_list('name', flat=True)[0]
sender_name = sender_instance['name']
group = get_group_details(requested_to_department) department = get_dept_details(requested_to_department)
group_name = group['name'] dept_name = department.values_list('name', flat=True)[0]
company = get_companies_details(requested_to_company) company = get_companies_details(requested_to_company)
company_name = company['name'] company_name = company.values_list('name', flat=True)[0]
data = receiver_body( # call sender email
sender_account_id, requestor_account_id, code,
requestor_email, app, "False", requestor_name, routing_level, name = requestor_name
action, cr_number, template_name, company_name, group_name, action_by = sender_name
requested_to_priority, cr_link 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': recipient = requestor_email
new_body = {"approved_by": sender_name} action_type = action
elif action.lower() == 'rejected': admin = sender_email
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}
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( # message = f"{sender_name} {msg} ({template_name})"
form_code, cr_number,
requestor_account_id, requestor_name, # notif = send_notification(
message, app, # form_code, cr_number,
sender_account_id, sender_account_username # requestor_account_id, requestor_name,
) # message, app,
# sender_account_id, sender_account_username
# )
def next_appover_email(receiver, form_code, delegation, msg, action, code): 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): ...@@ -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_company = template_instance.requested_to_company
requested_to_department = template_instance.requested_to_department requested_to_department = template_instance.requested_to_department
requested_by_user = template_instance.requested_by_user requested_by_user = template_instance.requested_by_user
created = template_instance.created
requested_to_priority = template_instance.requested_to_priority requested_to_priority = template_instance.requested_to_priority
# for rec in receiver: # for rec in receiver:
...@@ -351,7 +359,7 @@ def next_appover_email(receiver, form_code, delegation, msg, action, code): ...@@ -351,7 +359,7 @@ def next_appover_email(receiver, form_code, delegation, msg, action, code):
sender_account_id = sender_instance['id_number'] sender_account_id = sender_instance['id_number']
sender_name = sender_instance['name'] sender_name = sender_instance['name']
group = get_group_details(requested_to_department) group = get_dept_details(requested_to_department)
group_name = group['name'] group_name = group['name']
company = get_companies_details(requested_to_company) company = get_companies_details(requested_to_company)
...@@ -366,6 +374,8 @@ def next_appover_email(receiver, form_code, delegation, msg, action, code): ...@@ -366,6 +374,8 @@ def next_appover_email(receiver, form_code, delegation, msg, action, code):
email_status = requests.post(EMAIL, data=data) email_status = requests.post(EMAIL, data=data)
message = f"{sender_name} {msg} ({template_name})" message = f"{sender_name} {msg} ({template_name})"
notif = send_notification( notif = send_notification(
......
...@@ -477,3 +477,452 @@ def admin_changepassword(args): ...@@ -477,3 +477,452 @@ def admin_changepassword(args):
# # recipient_list=[receiver,], # # recipient_list=[receiver,],
# # html_message=FC # # html_message=FC
# # ) # # )
# RMS-CRAPPROVED ; RMS-CRACKNOWLEDGE ; RMS-CRCOMPLETED ; RMS-CRACCEPTED
def routing_table_actions(args):
name = args[0]
action_by = args[1]
routing_level = args[2]
status = args[3]
cr_number = args[4]
cr_name = args[5]
company_requestedto = args[6]
department_requestedto = args[7]
priority_level = args[8]
url = args[9]
recipient = args[10]
action_type = args[11]
admin = args[12]
if action_type.lower() == 'approved':
email_template = 'RMS-CRAPPROVED.html'
subject = 'Resource Management System - Change Request Approved'
elif action_type == 'acknowledged':
email_template = 'RMS-CRACKNOWLEDGE.html'
subject = 'Resource Management System - Change Request Acknowledged'
elif action_by == 'completed':
email_template = 'RMS-CRCOMPLETED.html'
subject = 'Resource Management System - Change Request Completed'
elif action_type == 'accepted':
email_template = 'RMS-CRACCEPTED.html'
subject = 'Resource Management System - Change Request Accepted'
F = open(os.path.join(settings.EMAIL_TEMPLATES_ROOT, email_template), 'r')
FC = F.read()
FC = FC.replace('{name}', name)
FC = FC.replace('{action_by}', action_by)
FC = FC.replace('{routing_level}', routing_level)
FC = FC.replace('{status}', status)
FC = FC.replace('{cr_number}', cr_number)
FC = FC.replace('{cr_name}', cr_name)
FC = FC.replace('{company_requestedto}', company_requestedto)
FC = FC.replace('{department_requestedto}', department_requestedto)
FC = FC.replace('{priority_level}', priority_level)
FC = FC.replace('{url}', url)
try:
send_mail(
subject=subject,
message='',
from_email=settings.EMAIL_DEFAULT_SENDER,
recipient_list=(recipient,),
html_message=FC,
fail_silently=False
)
models.EmailLogs.objects.create(
template=email_template,
recipients=recipient,
content=FC,
is_sent=True,
createdby=admin,
modifiedby=admin
)
except Exception as e:
models.EmailLogs.objects.create(
template=email_template,
recipients=recipient,
content=FC,
is_sent=False,
createdby=admin,
modifiedby=admin
)
return True
# RMS-CRREJECTED ; RMS-CRREJECTED-VENDOR
def routing_table_actions_rejected(args):
name = args[0]
action_by = args[1]
routing_level = args[2]
status = args[3]
cr_number = args[4]
cr_name = args[5]
company_requestedto = args[6]
department_requestedto = args[7]
priority_level = args[8]
url = args[9]
remarks = args[10]
recipient = args[11]
rejected_type = args[12]
admin = args[13]
if rejected_type == 'requestor':
email_template = 'RMS-CRREJECTED.html'
subject = 'Resource Management System - Change Request Rejected'
elif rejected_type == 'vendor':
email_template = 'RMS-CRREJECTED-VENDOR.html'
subject = 'Resource Management System - Change Request Rejected'
F = open(os.path.join(settings.EMAIL_TEMPLATES_ROOT, email_template), 'r')
FC = F.read()
FC = FC.replace('{name}', name)
FC = FC.replace('{action_by}', action_by)
FC = FC.replace('{routing_level}', routing_level)
FC = FC.replace('{status}', status)
FC = FC.replace('{cr_number}', cr_number)
FC = FC.replace('{cr_name}', cr_name)
FC = FC.replace('{company_requestedto}', company_requestedto)
FC = FC.replace('{department_requestedto}', department_requestedto)
FC = FC.replace('{priority_level}', priority_level)
FC = FC.replace('{url}', url)
FC = FC.replace('{remarks}', remarks)
try:
send_mail(
subject=subject,
message='',
from_email=settings.EMAIL_DEFAULT_SENDER,
recipient_list=(recipient,),
html_message=FC,
fail_silently=False
)
models.EmailLogs.objects.create(
template=email_template,
recipients=recipient,
content=FC,
is_sent=True,
createdby=admin,
modifiedby=admin
)
except Exception as e:
models.EmailLogs.objects.create(
template=email_template,
recipients=recipient,
content=FC,
is_sent=False,
createdby=admin,
modifiedby=admin
)
return True
# RMS-ACTIONREQUIRED ; RMS-ACTIONREQUIRED-VENDOR
def routing_table_actions_required(args):
name = args[0]
cr_number = args[1]
cr_name = args[2]
company_requestedto = args[3]
department_requestedto = args[4]
priority_level = args[5]
status = args[6]
url = args[7]
recipient = args[8]
action_type = args[9]
admin = args[10]
if action_type == 'requestor':
email_template = 'RMS-ACTIONREQUIRED.html'
subject = 'Resource Management System - Action Required for Change Request'
elif action_type == 'vendor':
email_template = 'RMS-ACTIONREQUIRED-VENDOR.html'
subject = 'Resource Management System - Action Required for Change Request'
F = open(os.path.join(settings.EMAIL_TEMPLATES_ROOT, email_template), 'r')
FC = F.read()
FC = FC.replace('{name}', name)
FC = FC.replace('{cr_number}', cr_number)
FC = FC.replace('{cr_name}', cr_name)
FC = FC.replace('{company_requestedto}', company_requestedto)
FC = FC.replace('{department_requestedto}', department_requestedto)
FC = FC.replace('{priority_level}', priority_level)
FC = FC.replace('{status}', status)
FC = FC.replace('{url}', url)
try:
send_mail(
subject=subject,
message='',
from_email=settings.EMAIL_DEFAULT_SENDER,
recipient_list=(recipient,),
html_message=FC,
fail_silently=False
)
models.EmailLogs.objects.create(
template=email_template,
recipients=recipient,
content=FC,
is_sent=True,
createdby=admin,
modifiedby=admin
)
except Exception as e:
models.EmailLogs.objects.create(
template=email_template,
recipients=recipient,
content=FC,
is_sent=False,
createdby=admin,
modifiedby=admin
)
return True
# RMS-REMINDER-APPROVER
def routing_table_reminder_approver(args):
name = args[0]
auto_cancel_date = args[1]
date_submitted_last_approver = args[2]
cr_number = args[3]
cr_name = args[4]
company_requestedto = args[5]
department_requestedto = args[6]
priority_level = args[7]
status = args[8]
url = args[9]
recipient = args[10]
admin = args[11]
F = open(os.path.join(settings.EMAIL_TEMPLATES_ROOT, 'RMS-REMINDER-APPROVER.html'), 'r')
FC = F.read()
FC = FC.replace('{name}', name)
FC = FC.replace('{auto_cancel_date}', auto_cancel_date)
FC = FC.replace('{date_submitted_last_approver}', date_submitted_last_approver)
FC = FC.replace('{cr_number}', cr_number)
FC = FC.replace('{cr_name}', cr_name)
FC = FC.replace('{company_requestedto}', company_requestedto)
FC = FC.replace('{department_requestedto}', department_requestedto)
FC = FC.replace('{priority_level}', priority_level)
FC = FC.replace('{status}', status)
FC = FC.replace('{url}', url)
try:
send_mail(
subject='Resource Management System - Awaiting Approval for Change Request',
message='',
from_email=settings.EMAIL_DEFAULT_SENDER,
recipient_list=(recipient,),
html_message=FC,
fail_silently=False
)
models.EmailLogs.objects.create(
template='RMS-REMINDER-APPROVER.html',
recipients=recipient,
content=FC,
is_sent=True,
createdby=admin,
modifiedby=admin
)
except Exception as e:
models.EmailLogs.objects.create(
template='RMS-REMINDER-APPROVER.html',
recipients=recipient,
content=FC,
is_sent=False,
createdby=admin,
modifiedby=admin
)
return True
# RMS-REMINDER-REQUESTOR
def routing_table_reminder_requestor(args):
name = args[0]
auto_cancel_date = args[1]
date_submitted_last_approver = args[2]
approver_pending_action = args[3]
cr_number = args[4]
cr_name = args[5]
company_requestedto = args[6]
department_requestedto = args[7]
priority_level = args[8]
status = args[9]
url = args[10]
recipient = args[11]
admin = args[12]
F = open(os.path.join(settings.EMAIL_TEMPLATES_ROOT, 'RMS-REMINDER-REQUESTOR.html'), 'r')
FC = F.read()
FC = FC.replace('{name}', name)
FC = FC.replace('{auto_cancel_date}', auto_cancel_date)
FC = FC.replace('{date_submitted_last_approver}', date_submitted_last_approver)
FC = FC.replace('{approver_pending_action}', approver_pending_action)
FC = FC.replace('{cr_number}', cr_number)
FC = FC.replace('{cr_name}', cr_name)
FC = FC.replace('{company_requestedto}', company_requestedto)
FC = FC.replace('{department_requestedto}', department_requestedto)
FC = FC.replace('{priority_level}', priority_level)
FC = FC.replace('{status}', status)
FC = FC.replace('{url}', url)
try:
send_mail(
subject='Resource Management System - Awaiting Approval for Change Request',
message='',
from_email=settings.EMAIL_DEFAULT_SENDER,
recipient_list=(recipient,),
html_message=FC,
fail_silently=False
)
models.EmailLogs.objects.create(
template='RMS-REMINDER-REQUESTOR.html',
recipients=recipient,
content=FC,
is_sent=True,
createdby=admin,
modifiedby=admin
)
except Exception as e:
models.EmailLogs.objects.create(
template='RMS-REMINDER-REQUESTOR.html',
recipients=recipient,
content=FC,
is_sent=False,
createdby=admin,
modifiedby=admin
)
return True
# RMS-CRCANCELLED
def routing_table_cancelled(args):
name = args[0]
auto_cancel_date = args[1]
date_submitted_last_approver = args[2]
approver_pending_action = args[3]
cr_number = args[4]
cr_name = args[5]
company_requestedto = args[6]
department_requestedto = args[7]
priority_level = args[8]
status = args[9]
url = args[10]
recipient = args[11]
admin = args[12]
F = open(os.path.join(settings.EMAIL_TEMPLATES_ROOT, 'RMS-CRCANCELLED.html'), 'r')
FC = F.read()
FC = FC.replace('{name}', name)
FC = FC.replace('{auto_cancel_date}', auto_cancel_date)
FC = FC.replace('{date_submitted_last_approver}', date_submitted_last_approver)
FC = FC.replace('{approver_pending_action}', approver_pending_action)
FC = FC.replace('{cr_number}', cr_number)
FC = FC.replace('{cr_name}', cr_name)
FC = FC.replace('{company_requestedto}', company_requestedto)
FC = FC.replace('{department_requestedto}', department_requestedto)
FC = FC.replace('{priority_level}', priority_level)
FC = FC.replace('{status}', status)
FC = FC.replace('{url}', url)
try:
send_mail(
subject='Resource Management System - Change Request Cancelled',
message='',
from_email=settings.EMAIL_DEFAULT_SENDER,
recipient_list=(recipient,),
html_message=FC,
fail_silently=False
)
models.EmailLogs.objects.create(
template='RMS-CRCANCELLED.html',
recipients=recipient,
content=FC,
is_sent=True,
createdby=admin,
modifiedby=admin
)
except Exception as e:
models.EmailLogs.objects.create(
template='RMS-CRCANCELLED.html',
recipients=recipient,
content=FC,
is_sent=False,
createdby=admin,
modifiedby=admin
)
return True
# RMS-CROVERDUE
def routing_table_overdue(args):
name = args[0]
target_date = args[1]
cr_number = args[2]
cr_name = args[3]
company_requestedto = args[4]
department_requestedto = args[5]
priority_level = args[6]
status = args[7]
url = args[8]
recipient = args[9]
admin = args[10]
F = open(os.path.join(settings.EMAIL_TEMPLATES_ROOT, 'RMS-CROVERDUE.html'), 'r')
FC = F.read()
FC = FC.replace('{name}', name)
FC = FC.replace('{target_date}', target_date)
FC = FC.replace('{cr_number}', cr_number)
FC = FC.replace('{cr_name}', cr_name)
FC = FC.replace('{company_requestedto}', company_requestedto)
FC = FC.replace('{department_requestedto}', department_requestedto)
FC = FC.replace('{priority_level}', priority_level)
FC = FC.replace('{status}', status)
FC = FC.replace('{url}', url)
try:
send_mail(
subject='Resource Management System - Change Request Overdue',
message='',
from_email=settings.EMAIL_DEFAULT_SENDER,
recipient_list=(recipient,),
html_message=FC,
fail_silently=False
)
models.EmailLogs.objects.create(
template='RMS-CROVERDUE.html',
recipients=recipient,
content=FC,
is_sent=True,
createdby=admin,
modifiedby=admin
)
except Exception as e:
models.EmailLogs.objects.create(
template='RMS-CROVERDUE.html',
recipients=recipient,
content=FC,
is_sent=False,
createdby=admin,
modifiedby=admin
)
return True
\ No newline at end of file
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>RMS: Acknowledgement Notification</title> <title>RMS: Acknowledgement Notification</title>
</head> </head>
<body style="font-family: arial;"> <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>
<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>
<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>CR Number</b><br>{cr_number}<br><br> <b>Company Requested To</b><br>{company_requestedto}<br><br>
<b>CR Name</b><br>{cr_name}<br><br> <b>Department Requested To</b><br>{department_requestedto}<br><br>
<b>Company Requested To</b><br>{company_requestedto}<br><br> <b>Priority Level</b><br>{priority_level}<br><br>
<b>Department Requested To</b><br>{department_requestedto}<br><br> <b>Status</b><br>{status}<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>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>Sincerely,</p>
<p>RMS Team</p><br><br> <p>Powered by</p>
<img src="https://s18.directupload.net/images/190807/jaewp4nx.png" width="120px"/>
<p>Powered by</p>
<img src="https://s18.directupload.net/images/190807/jaewp4nx.png" width="120px"/> </body>
</body>
</html> </html>
\ No newline at end of file
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>RMS: Approval Notification</title> <title>RMS: Approval Notification</title>
</head> </head>
<body style="font-family: arial;"> <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>
<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>
<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>CR Number</b><br>{cr_number}<br><br> <b>Company Requested To</b><br>{company_requestedto}<br><br>
<b>CR Name</b><br>{cr_name}<br><br> <b>Department Requested To</b><br>{department_requestedto}<br><br>
<b>Company Requested To</b><br>{company_requestedto}<br><br> <b>Priority Level</b><br>{priority_level}<br><br>
<b>Department Requested To</b><br>{department_requestedto}<br><br> <b>Status</b><br>{status}<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>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>Sincerely,</p>
<p>RMS Team</p><br><br> <p>Powered by</p>
<img src="https://s18.directupload.net/images/190807/jaewp4nx.png" width="120px"/>
<p>Powered by</p>
<img src="https://s18.directupload.net/images/190807/jaewp4nx.png" width="120px"/> </body>
</body>
</html> </html>
\ No newline at end of file
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>RMS: Change Request Accepted</title> <title>RMS: Change Request Accepted</title>
</head> </head>
<body style="font-family: arial;"> <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>
<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>
<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>Accepted By</b><br>{accepted_by}<br><br> <b>Status</b><br>{status}<br><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>CR Number</b><br>{cr_number}<br><br> <b>Company Requested To</b><br>{company_requestedto}<br><br>
<b>CR Name</b><br>{cr_name}<br><br> <b>Department Requested To</b><br>{department_requestedto}<br><br>
<b>Company Requested To</b><br>{company_requestedto}<br><br> <b>Priority Level</b><br>{priority_level}<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>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>Sincerely,</p>
<p>RMS Team</p><br><br> <p>Powered by</p>
<img src="https://s18.directupload.net/images/190807/jaewp4nx.png" width="120px"/>
<p>Powered by</p>
<img src="https://s18.directupload.net/images/190807/jaewp4nx.png" width="120px"/> </body>
</body>
</html> </html>
\ No newline at end of file
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>RMS: Change Request Acknowledged</title> <title>RMS: Change Request Acknowledged</title>
</head> </head>
<body style="font-family: arial;"> <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>
<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>
<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>Acknowledged By</b><br>{acknowledge_by}<br><br> <b>Status</b><br>{status}<br><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>CR Number</b><br>{cr_number}<br><br> <b>Company Requested To</b><br>{company_requestedto}<br><br>
<b>CR Name</b><br>{cr_name}<br><br> <b>Department Requested To</b><br>{department_requestedto}<br><br>
<b>Company Requested To</b><br>{company_requestedto}<br><br> <b>Priority Level</b><br>{priority_level}<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>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>Sincerely,</p>
<p>RMS Team</p><br><br> <p>Powered by</p>
<img src="https://s18.directupload.net/images/190807/jaewp4nx.png" width="120px"/>
<p>Powered by</p>
<img src="https://s18.directupload.net/images/190807/jaewp4nx.png" width="120px"/> </body>
</body>
</html> </html>
\ No newline at end of file
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>RMS: Change Request Approved</title> <title>RMS: Change Request Approved</title>
</head> </head>
<body style="font-family: arial;"> <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>
<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>
<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>Approved By</b><br>{approved_by}<br><br> <b>Status</b><br>{status}<br><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>CR Number</b><br>{cr_number}<br><br> <b>Company Requested To</b><br>{company_requestedto}<br><br>
<b>CR Name</b><br>{cr_name}<br><br> <b>Department Requested To</b><br>{department_requestedto}<br><br>
<b>Company Requested To</b><br>{company_requestedto}<br><br> <b>Priority Level</b><br>{priority_level}<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>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>Sincerely,</p>
<p>RMS Team</p><br><br> <p>Powered by</p>
<img src="https://s18.directupload.net/images/190807/jaewp4nx.png" width="120px"/>
<p>Powered by</p>
<img src="https://s18.directupload.net/images/190807/jaewp4nx.png" width="120px"/> </body>
</body>
</html> </html>
\ No newline at end of file
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>RMS: Change Request Cancelled</title> <title>RMS: Change Request Cancelled</title>
</head> </head>
<body style="font-family: arial;"> <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>
<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>
<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>Auto-Cancel Date</b><br>{auto_cancel_date}<br><br> <b>Approver Pending Action</b><br>{approver_pending_action}<br><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>CR Number</b><br>{cr_number}<br><br> <b>Company Requested To</b><br>{company_requestedto}<br><br>
<b>CR Name</b><br>{cr_name}<br><br> <b>Department Requested To</b><br>{department_requestedto}<br><br>
<b>Company Requested To</b><br>{company_requestedto}<br><br> <b>Priority Level</b><br>{priority_level}<br><br>
<b>Department Requested To</b><br>{department_requestedto}<br><br> <b>Status</b><br>{status}<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>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>Sincerely,</p>
<p>RMS Team</p><br><br> <p>Powered by</p>
<img src="https://s18.directupload.net/images/190807/jaewp4nx.png" width="120px"/>
<p>Powered by</p>
<img src="https://s18.directupload.net/images/190807/jaewp4nx.png" width="120px"/> </body>
</body>
</html> </html>
\ No newline at end of file
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>RMS: Change Request Completed</title> <title>RMS: Change Request Completed</title>
</head> </head>
<body style="font-family: arial;"> <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>
<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>
<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>Completed By</b><br>{completed_by}<br><br> <b>Status</b><br>{status}<br><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>CR Number</b><br>{cr_number}<br><br> <b>Company Requested To</b><br>{company_requestedto}<br><br>
<b>CR Name</b><br>{cr_name}<br><br> <b>Department Requested To</b><br>{department_requestedto}<br><br>
<b>Company Requested To</b><br>{company_requestedto}<br><br> <b>Priority Level</b><br>{priority_level}<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>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>Sincerely,</p>
<p>RMS Team</p><br><br> <p>Powered by</p>
<img src="https://s18.directupload.net/images/190807/jaewp4nx.png" width="120px"/>
<p>Powered by</p>
<img src="https://s18.directupload.net/images/190807/jaewp4nx.png" width="120px"/> </body>
</body>
</html> </html>
\ No newline at end of file
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>RMS: Target Date Overdue</title> <title>RMS: Target Date Overdue</title>
</head> </head>
<body style="font-family: arial;"> <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>
<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>
<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>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>CR Number</b><br>{cr_number}<br><br> <b>Company Requested To</b><br>{company_requestedto}<br><br>
<b>CR Name</b><br>{cr_name}<br><br> <b>Department Requested To</b><br>{department_requestedto}<br><br>
<b>Company Requested To</b><br>{company_requestedto}<br><br> <b>Priority Level</b><br>{priority_level}<br><br>
<b>Department Requested To</b><br>{department_requestedto}<br><br> <b>Status</b><br>{status}<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>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>Sincerely,</p>
<p>RMS Team</p><br><br> <p>Powered by</p>
<img src="https://s18.directupload.net/images/190807/jaewp4nx.png" width="120px"/>
<p>Powered by</p>
<img src="https://s18.directupload.net/images/190807/jaewp4nx.png" width="120px"/> </body>
</body>
</html> </html>
\ No newline at end of file
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>RMS: Change Request Rejected</title> <title>RMS: Change Request Rejected</title>
</head> </head>
<body style="font-family: arial;"> <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>
<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>
<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>Rejected By</b><br>{rejected_by}<br><br> <b>Status</b><br>{status}<br><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>CR Number</b><br>{cr_number}<br><br> <b>Company Requested To</b><br>{company_requestedto}<br><br>
<b>CR Name</b><br>{cr_name}<br><br> <b>Department Requested To</b><br>{department_requestedto}<br><br>
<b>Company Requested To</b><br>{company_requestedto}<br><br> <b>Priority Level</b><br>{priority_level}<br><br>
<b>Department Requested To</b><br>{department_requestedto}<br><br> <b>Remarks</b><br>{remarks}<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>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>Sincerely,</p>
<p>RMS Team</p><br><br> <p>Powered by</p>
<img src="https://s18.directupload.net/images/190807/jaewp4nx.png" width="120px"/>
<p>Powered by</p>
<img src="https://s18.directupload.net/images/190807/jaewp4nx.png" width="120px"/> </body>
</body>
</html> </html>
\ No newline at end of file
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>RMS: Change Request Rejected</title> <title>RMS: Change Request Rejected</title>
</head> </head>
<body style="font-family: arial;"> <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>
<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>
<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>Rejected By</b><br>{rejected_by}<br><br> <b>Status</b><br>{status}<br><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>CR Number</b><br>{cr_number}<br><br> <b>Company Requested To</b><br>{company_requestedto}<br><br>
<b>CR Name</b><br>{cr_name}<br><br> <b>Department Requested To</b><br>{department_requestedto}<br><br>
<b>Company Requested To</b><br>{company_requestedto}<br><br> <b>Priority Level</b><br>{priority_level}<br><br>
<b>Department Requested To</b><br>{department_requestedto}<br><br> <b>Remarks</b><br>{remarks}<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>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>Sincerely,</p>
<p>RMS Team</p><br><br> <p>Powered by</p>
<img src="https://s18.directupload.net/images/190807/jaewp4nx.png" width="120px"/>
<p>Powered by</p>
<img src="https://s18.directupload.net/images/190807/jaewp4nx.png" width="120px"/> </body>
</body>
</html> </html>
\ No newline at end of file
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>RMS: New User Created</title> <title>RMS: New User Created</title>
</head> </head>
<body style="font-family: arial;"> <body style="font-family: arial;">
<div style="max-width:100px!important;"> <h3>Resource Management System &#40;RMS&#41;</h3>
<img src="https://s18.directupload.net/images/190807/wjwrxx5i.jpg"/> <h3 style="color:#888888;">New User Created</h3><br>
</div>
<p>Dear {name},</p><br>
<h3>Resource Management System &#40;RMS&#41;</h3> <p>You have been created as a new user of RMS. Please see your default login details below.</p><br>
<h3 style="color:#888888;">New User Created</h3><br>
<b>Username</b><br>{username}<br><br>
<p>Dear {name},</p><br> <b>Password</b><br>password123<br><br>
<p>You have been created as a new user of RMS. Please see your default login details below.</p><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>
<b>Username</b><br>{username}<br><br>
<b>Password</b><br>password123<br><br> <p>Sincerely,</p>
<p>RMS Team</p><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>Powered by</p>
<p>Sincerely,</p> <img src="https://s18.directupload.net/images/190807/jaewp4nx.png" width="120px"/>
<p>RMS Team</p><br><br>
</body>
<p>Powered by</p>
<img src="https://s18.directupload.net/images/190807/jaewp4nx.png" width="120px"/>
</body>
</html> </html>
\ No newline at end of file
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>RMS: Reset Password</title> <title>RMS: Reset Password</title>
</head> </head>
<body style="font-family: arial;"> <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>
<h3>Resource Management System &#40;RMS&#41;</h3>
<h3 style="color:#888888;">Reset Password</h3><br> <p>Dear {name},</p><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>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>Sincerely,</p>
<p>RMS Team</p><br><br> <p>Powered by</p>
<img src="https://s18.directupload.net/images/190807/jaewp4nx.png" width="120px"/>
<p>Powered by</p>
<img src="https://s18.directupload.net/images/190807/jaewp4nx.png" width="120px"/> </body>
</body>
</html> </html>
\ No newline at end of file
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>RMS: Approval Reminder</title> <title>RMS: Approval Reminder</title>
</head> </head>
<body style="font-family: arial;"> <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>
<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>
<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>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>CR Number</b><br>{cr_number}<br><br> <b>Company Requested To</b><br>{company_requestedto}<br><br>
<b>CR Name</b><br>{cr_name}<br><br> <b>Department Requested To</b><br>{department_requestedto}<br><br>
<b>Company Requested To</b><br>{company_requestedto}<br><br> <b>Priority Level</b><br>{priority_level}<br><br>
<b>Department Requested To</b><br>{department_requestedto}<br><br> <b>Status</b><br>{status}<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>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>Sincerely,</p>
<p>RMS Team</p><br><br> <p>Powered by</p>
<img src="https://s18.directupload.net/images/190807/jaewp4nx.png" width="120px"/>
<p>Powered by</p>
<img src="https://s18.directupload.net/images/190807/jaewp4nx.png" width="120px"/> </body>
</body>
</html> </html>
\ No newline at end of file
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>RMS: Approval Reminder</title> <title>RMS: Approval Reminder</title>
</head> </head>
<body style="font-family: arial;"> <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>
<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>
<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>Auto-Cancel Date</b><br>{auto_cancel_date}<br><br> <b>Approver Pending Action</b><br>{approver_pending_action}<br><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>CR Number</b><br>{cr_number}<br><br> <b>Company Requested To</b><br>{company_requestedto}<br><br>
<b>CR Name</b><br>{cr_name}<br><br> <b>Department Requested To</b><br>{department_requestedto}<br><br>
<b>Company Requested To</b><br>{company_requestedto}<br><br> <b>Priority Level</b><br>{priority_level}<br><br>
<b>Department Requested To</b><br>{department_requestedto}<br><br> <b>Status</b><br>{status}<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>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>Sincerely,</p>
<p>RMS Team</p><br><br> <p>Powered by</p>
<img src="https://s18.directupload.net/images/190807/jaewp4nx.png" width="120px"/>
<p>Powered by</p>
<img src="https://s18.directupload.net/images/190807/jaewp4nx.png" width="120px"/> </body>
</body>
</html> </html>
\ No newline at end of file
...@@ -41,3 +41,5 @@ VENDOR_REJECT_MESSAGE = config['NOTIFICATION_EMAIL']['VENDOR_REJECT_MESSAGE'] ...@@ -41,3 +41,5 @@ VENDOR_REJECT_MESSAGE = config['NOTIFICATION_EMAIL']['VENDOR_REJECT_MESSAGE']
#ADMIN PROFILE #ADMIN PROFILE
CATCH_EMAIL = config['DEV']['CATCH_EMAIL'] 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'] ...@@ -39,3 +39,5 @@ VENDOR_REJECT_MESSAGE = config['NOTIFICATION_EMAIL']['VENDOR_REJECT_MESSAGE']
#ADMIN PROFILE #ADMIN PROFILE
CATCH_EMAIL = config['LOCAL']['CATCH_EMAIL'] 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'] ...@@ -41,3 +41,5 @@ VENDOR_REJECT_MESSAGE = config['NOTIFICATION_EMAIL']['VENDOR_REJECT_MESSAGE']
#ADMIN PROFILE #ADMIN PROFILE
CATCH_EMAIL = config['PRODUCTION']['CATCH_EMAIL'] 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'] ...@@ -42,3 +42,5 @@ VENDOR_REJECT_MESSAGE = config['NOTIFICATION_EMAIL']['VENDOR_REJECT_MESSAGE']
#ADMIN PROFILE #ADMIN PROFILE
CATCH_EMAIL = config['UAT']['CATCH_EMAIL'] 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