Commit bd79850f authored by Gladys Forte's avatar Gladys Forte

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

* commit '439a0f4f':
  requestor changes in actions
parents 6dd559fc 439a0f4f
...@@ -36,7 +36,7 @@ class ChangeRequestFormApproversSerializer( ...@@ -36,7 +36,7 @@ class ChangeRequestFormApproversSerializer(
if instance.form_code.status == 'Draft': if instance.form_code.status == 'Draft':
if instance.tmp_approver: if instance.tmp_approver:
print(instance.tmp_approver.delegation)
if instance.tmp_approver.user or instance.tmp_approver.delegation.name.lower() == 'requestor': if instance.tmp_approver.user or instance.tmp_approver.delegation.name.lower() == 'requestor':
ret['editable_user'] = False ret['editable_user'] = False
else: else:
...@@ -51,8 +51,8 @@ class ChangeRequestFormApproversSerializer( ...@@ -51,8 +51,8 @@ class ChangeRequestFormApproversSerializer(
ret['editable_dept'] = False ret['editable_dept'] = False
else: else:
ret['editable_dept'] = True ret['editable_dept'] = True
# not instance.tmp_approver.delegation.code or
# if instance.tmp_approver.delegation.code or instance.tmp_approver.delegation.name.lower() == 'requestor': # if instance.tmp_approver.delegation.name.lower() == 'requestor':
# ret['editable_deleg'] = False # ret['editable_deleg'] = False
# else: # else:
# ret['editable_deleg'] = True # ret['editable_deleg'] = True
...@@ -74,7 +74,7 @@ class ChangeRequestFormApproversSerializer( ...@@ -74,7 +74,7 @@ class ChangeRequestFormApproversSerializer(
if instance.form_code.status == 'Draft': if instance.form_code.status == 'Draft':
if instance.tmp_approver: if instance.tmp_approver:
print(instance.tmp_approver.delegation)
if instance.tmp_approver.user or instance.tmp_approver.delegation.name.lower() == 'requestor': if instance.tmp_approver.user or instance.tmp_approver.delegation.name.lower() == 'requestor':
ret['editable_user'] = False ret['editable_user'] = False
else: else:
...@@ -104,7 +104,7 @@ class ChangeRequestFormApproversSerializer( ...@@ -104,7 +104,7 @@ class ChangeRequestFormApproversSerializer(
ret['department'] = None ret['department'] = None
ret['editable_dept'] = True ret['editable_dept'] = True
# if instance.tmp_approver.delegation.code or instance.tmp_approver.delegation.name.lower() == 'requestor': # if instance.tmp_approver.delegation or instance.tmp_approver.delegation.name.lower() == 'requestor':
# ret['delegation'] = { # ret['delegation'] = {
# "id": instance.tmp_approver.delegation.id, # "id": instance.tmp_approver.delegation.id,
......
...@@ -27,6 +27,8 @@ REQUESTOR_ACKNOWLEDGE_MESSAGE = settings.REQUESTOR_ACKNOWLEDGE_MESSAGE ...@@ -27,6 +27,8 @@ REQUESTOR_ACKNOWLEDGE_MESSAGE = settings.REQUESTOR_ACKNOWLEDGE_MESSAGE
REQUESTOR_COMPLETION_MESSAGE = settings.REQUESTOR_COMPLETION_MESSAGE REQUESTOR_COMPLETION_MESSAGE = settings.REQUESTOR_COMPLETION_MESSAGE
VENDOR_ACCEPTANCE_MESSAGE = settings.VENDOR_ACCEPTANCE_MESSAGE VENDOR_ACCEPTANCE_MESSAGE = settings.VENDOR_ACCEPTANCE_MESSAGE
VENDOR_REJECT_MESSAGE = settings.VENDOR_REJECT_MESSAGE VENDOR_REJECT_MESSAGE = settings.VENDOR_REJECT_MESSAGE
REVISED_MESSAGE = settings.REVISED_MESSAGE
CANCEL_MESSAGE = settings.CANCEL_MESSAGE
def entity_log_bulk(queryset, entity, tbl): def entity_log_bulk(queryset, entity, tbl):
...@@ -652,3 +654,80 @@ def reset_autoemail_tables(form_code): ...@@ -652,3 +654,80 @@ def reset_autoemail_tables(form_code):
).delete() ).delete()
return True return True
def cancelled_user_trigger(form_code, next_level):
cr_link = f'{CR_FRONT_LINK}/{form_code}'
template_instance = get_template_instance(form_code)
cr_number = template_instance.requested_to_template_id
template_name = template_instance.requested_to_template_name
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
cr_status = template_instance.status
# requestor details --------------------------------------------------
sender_instance = get_account_details(requested_by_user)
sender_email = sender_instance.values_list('email', flat=True)[0]
sender_name = sender_instance.values_list('name', flat=True)[0]
sender_code = sender_instance.values_list('code', flat=True)[0]
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.values_list('name', flat=True)[0]
# get details of approvers received an email about the CR
received_approvers = models.ChangeRequestFormApprovers.objects.filter(
~Q(date_sent=None) &
Q(form_code=form_code)
)
# print(next_approver.values())
# LOOP on next approver for sending email
for n_approver in received_approvers:
# print(n_approver.delegation)
# NOTIF MSG FOR NEXT APPROVER
msg = CANCEL_MESSAGE.split(';')[0]
# if n_approver.delegation.name.lower() == 'vendor/implementor':
# msg = VENDOR_ACKNOWLEDGE_MESSAGE.split(';')[0]
# next approver details --------------------------------------------------
receiver_instance = get_account_details(n_approver.user.code)
receiver_name = receiver_instance.values_list('name', flat=True)[0]
receiver_email = receiver_instance.values_list('email', flat=True)[0]
receiver_code = receiver_instance.values_list('code', flat=True)[0]
# call sender email
name = receiver_name
cr_number = cr_number
cr_name = template_name
company_requestedto = company_name
department_requestedto = dept_name
priority_level = requested_to_priority
status = cr_status
url = cr_link
recipient = receiver_email
delegation_type = n_approver.delegation.name.lower()
admin = sender_email
args = [name, cr_number, cr_name,
company_requestedto, department_requestedto, priority_level,
status, url, recipient, delegation_type, admin]
main_threading(args, sender.routing_table_actions_required)
message = f"{sender_name} {msg} ({template_name})"
# create notification
notification_create(form_code, message, receiver_code,
sender_code, 'cms')
\ No newline at end of file
...@@ -41,6 +41,8 @@ REQUESTOR_ACKNOWLEDGE_MESSAGE = settings.REQUESTOR_ACKNOWLEDGE_MESSAGE ...@@ -41,6 +41,8 @@ REQUESTOR_ACKNOWLEDGE_MESSAGE = settings.REQUESTOR_ACKNOWLEDGE_MESSAGE
REQUESTOR_COMPLETION_MESSAGE = settings.REQUESTOR_COMPLETION_MESSAGE REQUESTOR_COMPLETION_MESSAGE = settings.REQUESTOR_COMPLETION_MESSAGE
VENDOR_ACCEPTANCE_MESSAGE = settings.VENDOR_ACCEPTANCE_MESSAGE VENDOR_ACCEPTANCE_MESSAGE = settings.VENDOR_ACCEPTANCE_MESSAGE
VENDOR_REJECT_MESSAGE = settings.VENDOR_REJECT_MESSAGE VENDOR_REJECT_MESSAGE = settings.VENDOR_REJECT_MESSAGE
REVISED_MESSAGE = settings.REVISED_MESSAGE
CANCEL_MESSAGE = settings.CANCEL_MESSAGE
def list_by_user(user_id_number): def list_by_user(user_id_number):
...@@ -563,29 +565,29 @@ def cr_routing_actions(approver_instance, current_user): ...@@ -563,29 +565,29 @@ def cr_routing_actions(approver_instance, current_user):
elif approver_instance['action'].lower() == 'revised': elif approver_instance['action'].lower() == 'revised':
# send email to vendor # send email to vendor
# if delegation.lower() == 'requestor': if delegation.lower() == 'requestor':
# notification_msg = VENDOR_REJECT_MESSAGE.split(';')[0] notification_msg = REVISED_MESSAGE.split(';')[0]
# # send reject email to vendor # send reject email to vendor
# send_mail_vendor( send_mail_vendor(
# current_user, form_code, delegation, current_user, form_code, delegation,
# notification_msg, action, notification_msg, action,
# remarks, level remarks, level
# ) )
# prev_level = int(level) - 1 prev_level = int(level) - 1
# # reset last vendor details # reset last vendor details
# models.ChangeRequestFormApprovers.objects.filter( models.ChangeRequestFormApprovers.objects.filter(
# Q(form_code=form_code) & Q(form_code=form_code) &
# Q(level=int(prev_level)) Q(level=int(prev_level))
# ).update( ).update(
# is_action=True, is_action=True,
# action='Acknowledged', action='Acknowledged',
# action_date=datetime.now(), action_date=datetime.now(),
# date_sent=datetime.now() date_sent=datetime.now()
# ) )
# else: else:
prev_vendor = check_vendor_level( prev_vendor = check_vendor_level(
'prev', level, form_code) 'prev', level, form_code)
...@@ -593,16 +595,16 @@ def cr_routing_actions(approver_instance, current_user): ...@@ -593,16 +595,16 @@ def cr_routing_actions(approver_instance, current_user):
if prev_vendor.count() > 0: if prev_vendor.count() > 0:
# EMAIL CODE FOR REQUESTOR # EMAIL CODE FOR REQUESTOR
requestor_notification_msg = REQUESTOR_REJECT_MESSAGE.split(';')[0] # requestor_notification_msg = REQUESTOR_REJECT_MESSAGE.split(';')[0]
# SEND EMAIL AND NOTIF TO REQUESTOR # SEND EMAIL AND NOTIF TO REQUESTOR
send_mail_requestor( # send_mail_requestor(
current_user, form_code, delegation, # current_user, form_code, delegation,
requestor_notification_msg, action, # requestor_notification_msg, action,
remarks, level # remarks, level
) # )
notification_msg = VENDOR_REJECT_MESSAGE.split(';')[0] notification_msg = REVISED_MESSAGE.split(';')[0]
send_mail_vendor( send_mail_vendor(
current_user, form_code, 'others', current_user, form_code, 'others',
...@@ -650,29 +652,29 @@ def cr_routing_actions(approver_instance, current_user): ...@@ -650,29 +652,29 @@ def cr_routing_actions(approver_instance, current_user):
elif approver_instance['action'].lower() == 'rejected': elif approver_instance['action'].lower() == 'rejected':
# send email to vendor # send email to vendor
if delegation.lower() == 'requestor': # if delegation.lower() == 'requestor':
notification_msg = VENDOR_REJECT_MESSAGE.split(';')[0] # notification_msg = VENDOR_REJECT_MESSAGE.split(';')[0]
# send reject email to vendor # # send reject email to vendor
send_mail_vendor( # send_mail_vendor(
current_user, form_code, delegation, # current_user, form_code, delegation,
notification_msg, action, # notification_msg, action,
remarks, level # remarks, level
) # )
prev_level = int(level) - 1 # prev_level = int(level) - 1
# reset last vendor details # # reset last vendor details
models.ChangeRequestFormApprovers.objects.filter( # models.ChangeRequestFormApprovers.objects.filter(
Q(form_code=form_code) & # Q(form_code=form_code) &
Q(level=int(prev_level)) # Q(level=int(prev_level))
).update( # ).update(
is_action=True, # is_action=True,
action='Acknowledged', # action='Acknowledged',
action_date=datetime.now(), # action_date=datetime.now(),
date_sent=datetime.now() # date_sent=datetime.now()
) # )
else: # else:
update_form_header_status(form_code, 'Rejected') update_form_header_status(form_code, 'Rejected')
# EMAIL CODE FOR REQUESTOR # EMAIL CODE FOR REQUESTOR
......
...@@ -208,7 +208,7 @@ def admin_changepassword(args): ...@@ -208,7 +208,7 @@ def admin_changepassword(args):
# RMS-CRAPPROVED ; RMS-CRACKNOWLEDGE ; RMS-CRCOMPLETED ; RMS-CRACCEPTED ; # RMS-CRAPPROVED ; RMS-CRACKNOWLEDGE ; RMS-CRCOMPLETED ; RMS-CRACCEPTED ;
# RMS-CRREJECTED ; RMS-CRREJECTED-VENDOR # RMS-CRREJECTED ; RMS-CRREJECTED-VENDOR ; RMS-CRREVISED ; RMS-CRCANCELLED-USERTRIGGER
def routing_table_actions(args): def routing_table_actions(args):
...@@ -250,11 +250,11 @@ def routing_table_actions(args): ...@@ -250,11 +250,11 @@ def routing_table_actions(args):
else: else:
email_template = 'RMS-CRREJECTED.html' email_template = 'RMS-CRREJECTED.html'
elif args[12].lower() == 'revised': elif args[12].lower() == 'revised':
subject = 'Resource Management System - Change Request Rejected' subject = 'Resource Management System - Action Required for Change Request'
if args[13].lower() == 'requestor' or args[13].lower() == 'others': email_template = 'RMS-CRREVISED.html'
email_template = 'RMS-CRREJECTED-VENDOR.html' elif args[12].lower() == 'cancelled':
else: subject = 'Resource Management System - Change Request Cancelled'
email_template = 'RMS-CRREJECTED.html' email_template = 'RMS-CRCANCELLED-USERTRIGGER.html'
F = open(os.path.join(settings.EMAIL_TEMPLATES_ROOT, email_template), 'r') F = open(os.path.join(settings.EMAIL_TEMPLATES_ROOT, email_template), 'r')
...@@ -271,8 +271,9 @@ def routing_table_actions(args): ...@@ -271,8 +271,9 @@ def routing_table_actions(args):
FC = FC.replace('{priority_level}', priority_level) FC = FC.replace('{priority_level}', priority_level)
FC = FC.replace('{url}', url) FC = FC.replace('{url}', url)
if args[12].lower() == 'rejected': if args[12].lower() == 'rejected' or args[12].lower() == 'revised':
FC = FC.replace('{remarks}', remarks) FC = FC.replace('{remarks}', remarks)
if email_template == 'RMS-CRREJECTED-VENDOR.html': if email_template == 'RMS-CRREJECTED-VENDOR.html':
if args[13].lower() == 'requestor': if args[13].lower() == 'requestor':
......
<!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 the change request below.</p><br>
<b>Cancelled 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://s3-ap-southeast-1.amazonaws.com/oneberry/img/logo_oneberry.png" class="img-responsive" style="width:150px;height:auto;" />
</body>
</html>
\ No newline at end of file
<!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 Revision</h3><br>
<p>Dear {name},</p><br>
<p>A change request has been submitted for your acknowledgement to revise. Please see the details of the 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://s3-ap-southeast-1.amazonaws.com/oneberry/img/logo_oneberry.png" class="img-responsive" style="width:150px;height:auto;" />
</body>
</html>
\ No newline at end of file
...@@ -48,6 +48,8 @@ REQUESTOR_ACKNOWLEDGE_MESSAGE = config['NOTIFICATION_EMAIL']['REQUESTOR_ACKNOWLE ...@@ -48,6 +48,8 @@ REQUESTOR_ACKNOWLEDGE_MESSAGE = config['NOTIFICATION_EMAIL']['REQUESTOR_ACKNOWLE
REQUESTOR_COMPLETION_MESSAGE = config['NOTIFICATION_EMAIL']['REQUESTOR_COMPLETION_MESSAGE'] REQUESTOR_COMPLETION_MESSAGE = config['NOTIFICATION_EMAIL']['REQUESTOR_COMPLETION_MESSAGE']
VENDOR_ACCEPTANCE_MESSAGE = config['NOTIFICATION_EMAIL']['VENDOR_ACCEPTANCE_MESSAGE'] VENDOR_ACCEPTANCE_MESSAGE = config['NOTIFICATION_EMAIL']['VENDOR_ACCEPTANCE_MESSAGE']
VENDOR_REJECT_MESSAGE = config['NOTIFICATION_EMAIL']['VENDOR_REJECT_MESSAGE'] VENDOR_REJECT_MESSAGE = config['NOTIFICATION_EMAIL']['VENDOR_REJECT_MESSAGE']
REVISED_MESSAGE = config['NOTIFICATION_EMAIL']['REVISED_MESSAGE']
CANCEL_MESSAGE = config['NOTIFICATION_EMAIL']['CANCEL_MESSAGE']
#ADMIN PROFILE #ADMIN PROFILE
CATCH_EMAIL = config['DEV']['CATCH_EMAIL'] CATCH_EMAIL = config['DEV']['CATCH_EMAIL']
......
...@@ -45,6 +45,8 @@ REQUESTOR_ACKNOWLEDGE_MESSAGE = config['NOTIFICATION_EMAIL']['REQUESTOR_ACKNOWLE ...@@ -45,6 +45,8 @@ REQUESTOR_ACKNOWLEDGE_MESSAGE = config['NOTIFICATION_EMAIL']['REQUESTOR_ACKNOWLE
REQUESTOR_COMPLETION_MESSAGE = config['NOTIFICATION_EMAIL']['REQUESTOR_COMPLETION_MESSAGE'] REQUESTOR_COMPLETION_MESSAGE = config['NOTIFICATION_EMAIL']['REQUESTOR_COMPLETION_MESSAGE']
VENDOR_ACCEPTANCE_MESSAGE = config['NOTIFICATION_EMAIL']['VENDOR_ACCEPTANCE_MESSAGE'] VENDOR_ACCEPTANCE_MESSAGE = config['NOTIFICATION_EMAIL']['VENDOR_ACCEPTANCE_MESSAGE']
VENDOR_REJECT_MESSAGE = config['NOTIFICATION_EMAIL']['VENDOR_REJECT_MESSAGE'] VENDOR_REJECT_MESSAGE = config['NOTIFICATION_EMAIL']['VENDOR_REJECT_MESSAGE']
REVISED_MESSAGE = config['NOTIFICATION_EMAIL']['REVISED_MESSAGE']
CANCEL_MESSAGE = config['NOTIFICATION_EMAIL']['CANCEL_MESSAGE']
#ADMIN PROFILE #ADMIN PROFILE
CATCH_EMAIL = config['LOCAL']['CATCH_EMAIL'] CATCH_EMAIL = config['LOCAL']['CATCH_EMAIL']
......
...@@ -48,6 +48,8 @@ REQUESTOR_ACKNOWLEDGE_MESSAGE = config['NOTIFICATION_EMAIL']['REQUESTOR_ACKNOWLE ...@@ -48,6 +48,8 @@ REQUESTOR_ACKNOWLEDGE_MESSAGE = config['NOTIFICATION_EMAIL']['REQUESTOR_ACKNOWLE
REQUESTOR_COMPLETION_MESSAGE = config['NOTIFICATION_EMAIL']['REQUESTOR_COMPLETION_MESSAGE'] REQUESTOR_COMPLETION_MESSAGE = config['NOTIFICATION_EMAIL']['REQUESTOR_COMPLETION_MESSAGE']
VENDOR_ACCEPTANCE_MESSAGE = config['NOTIFICATION_EMAIL']['VENDOR_ACCEPTANCE_MESSAGE'] VENDOR_ACCEPTANCE_MESSAGE = config['NOTIFICATION_EMAIL']['VENDOR_ACCEPTANCE_MESSAGE']
VENDOR_REJECT_MESSAGE = config['NOTIFICATION_EMAIL']['VENDOR_REJECT_MESSAGE'] VENDOR_REJECT_MESSAGE = config['NOTIFICATION_EMAIL']['VENDOR_REJECT_MESSAGE']
REVISED_MESSAGE = config['NOTIFICATION_EMAIL']['REVISED_MESSAGE']
CANCEL_MESSAGE = config['NOTIFICATION_EMAIL']['CANCEL_MESSAGE']
#ADMIN PROFILE #ADMIN PROFILE
CATCH_EMAIL = config['PRODUCTION']['CATCH_EMAIL'] CATCH_EMAIL = config['PRODUCTION']['CATCH_EMAIL']
......
...@@ -47,6 +47,8 @@ REQUESTOR_ACKNOWLEDGE_MESSAGE = config['NOTIFICATION_EMAIL']['REQUESTOR_ACKNOWLE ...@@ -47,6 +47,8 @@ REQUESTOR_ACKNOWLEDGE_MESSAGE = config['NOTIFICATION_EMAIL']['REQUESTOR_ACKNOWLE
REQUESTOR_COMPLETION_MESSAGE = config['NOTIFICATION_EMAIL']['REQUESTOR_COMPLETION_MESSAGE'] REQUESTOR_COMPLETION_MESSAGE = config['NOTIFICATION_EMAIL']['REQUESTOR_COMPLETION_MESSAGE']
VENDOR_ACCEPTANCE_MESSAGE = config['NOTIFICATION_EMAIL']['VENDOR_ACCEPTANCE_MESSAGE'] VENDOR_ACCEPTANCE_MESSAGE = config['NOTIFICATION_EMAIL']['VENDOR_ACCEPTANCE_MESSAGE']
VENDOR_REJECT_MESSAGE = config['NOTIFICATION_EMAIL']['VENDOR_REJECT_MESSAGE'] VENDOR_REJECT_MESSAGE = config['NOTIFICATION_EMAIL']['VENDOR_REJECT_MESSAGE']
REVISED_MESSAGE = config['NOTIFICATION_EMAIL']['REVISED_MESSAGE']
CANCEL_MESSAGE = config['NOTIFICATION_EMAIL']['CANCEL_MESSAGE']
#ADMIN PROFILE #ADMIN PROFILE
CATCH_EMAIL = config['STAGING']['CATCH_EMAIL'] CATCH_EMAIL = config['STAGING']['CATCH_EMAIL']
......
...@@ -48,6 +48,8 @@ REQUESTOR_ACKNOWLEDGE_MESSAGE = config['NOTIFICATION_EMAIL']['REQUESTOR_ACKNOWLE ...@@ -48,6 +48,8 @@ REQUESTOR_ACKNOWLEDGE_MESSAGE = config['NOTIFICATION_EMAIL']['REQUESTOR_ACKNOWLE
REQUESTOR_COMPLETION_MESSAGE = config['NOTIFICATION_EMAIL']['REQUESTOR_COMPLETION_MESSAGE'] REQUESTOR_COMPLETION_MESSAGE = config['NOTIFICATION_EMAIL']['REQUESTOR_COMPLETION_MESSAGE']
VENDOR_ACCEPTANCE_MESSAGE = config['NOTIFICATION_EMAIL']['VENDOR_ACCEPTANCE_MESSAGE'] VENDOR_ACCEPTANCE_MESSAGE = config['NOTIFICATION_EMAIL']['VENDOR_ACCEPTANCE_MESSAGE']
VENDOR_REJECT_MESSAGE = config['NOTIFICATION_EMAIL']['VENDOR_REJECT_MESSAGE'] VENDOR_REJECT_MESSAGE = config['NOTIFICATION_EMAIL']['VENDOR_REJECT_MESSAGE']
REVISED_MESSAGE = config['NOTIFICATION_EMAIL']['REVISED_MESSAGE']
CANCEL_MESSAGE = config['NOTIFICATION_EMAIL']['CANCEL_MESSAGE']
#ADMIN PROFILE #ADMIN PROFILE
CATCH_EMAIL = config['UAT']['CATCH_EMAIL'] CATCH_EMAIL = config['UAT']['CATCH_EMAIL']
......
...@@ -10,9 +10,8 @@ FRONT_END_URL = ...@@ -10,9 +10,8 @@ FRONT_END_URL =
AUTH_ACCESSS_TOKEN_TIMEOUT = AUTH_ACCESSS_TOKEN_TIMEOUT =
USER_DEFAULT_PASSWORD = USER_DEFAULT_PASSWORD =
CATCH_EMAIL = gladys@tirsolutions.com CATCH_EMAIL = gladys@tirsolutions.com
CR_LINK = http://stagingrms.oneberrysystem.com/cms/change-request/form/view CR_LINK = http://staging.rms.oneberrysystem.com/cms/change-request/form/view
REALTIMESERVER_IP = 127.0.0.1:8000 REALTIMESERVER_IP = 127.0.0.1:8000
CORS_ORIGIN_ALLOW_ALL = False
[UAT] [UAT]
DATABASE_ENGINE = django.db.backends.mysql DATABASE_ENGINE = django.db.backends.mysql
...@@ -22,13 +21,12 @@ DATABASE_PASSWORD = ...@@ -22,13 +21,12 @@ DATABASE_PASSWORD =
DATABASE_HOST = DATABASE_HOST =
DATABASE_PORT = DATABASE_PORT =
SESSION_TIMEOUT = SESSION_TIMEOUT =
FRONT_END_URL = http://stagingrms.oneberrysystem.com FRONT_END_URL = http://staging.rms.oneberrysystem.com
AUTH_ACCESSS_TOKEN_TIMEOUT = AUTH_ACCESSS_TOKEN_TIMEOUT =
USER_DEFAULT_PASSWORD = USER_DEFAULT_PASSWORD =
CATCH_EMAIL = gladys@tirsolutions.com CATCH_EMAIL = gladys@tirsolutions.com
CR_LINK = http://stagingrms.oneberrysystem.com/cms/change-request/form/view CR_LINK = http://staging.rms.oneberrysystem.com/cms/change-request/form/view
REALTIMESERVER_IP = 127.0.0.1:8000 REALTIMESERVER_IP = 127.0.0.1:8000
CORS_ORIGIN_ALLOW_ALL = False
[DEV] [DEV]
DATABASE_ENGINE = django.db.backends.mysql DATABASE_ENGINE = django.db.backends.mysql
...@@ -44,7 +42,6 @@ USER_DEFAULT_PASSWORD = ...@@ -44,7 +42,6 @@ USER_DEFAULT_PASSWORD =
CATCH_EMAIL = gladys@tirsolutions.com CATCH_EMAIL = gladys@tirsolutions.com
CR_LINK = http://devweb.rmsv2.oneberrysystem.com/cms/change-request/form/view CR_LINK = http://devweb.rmsv2.oneberrysystem.com/cms/change-request/form/view
REALTIMESERVER_IP = 127.0.0.1:8000 REALTIMESERVER_IP = 127.0.0.1:8000
CORS_ORIGIN_ALLOW_ALL = True
[STAGING] [STAGING]
...@@ -54,21 +51,20 @@ DATABASE_USER = ...@@ -54,21 +51,20 @@ DATABASE_USER =
DATABASE_PASSWORD = DATABASE_PASSWORD =
DATABASE_HOST = DATABASE_HOST =
DATABASE_PORT = DATABASE_PORT =
SESSION_TIMEOUT = 30 SESSION_TIMEOUT =
FRONT_END_URL = http://stagingrms.oneberrysystem.com FRONT_END_URL = http://staging.rms.oneberrysystem.com
AUTH_ACCESSS_TOKEN_TIMEOUT = 3600 AUTH_ACCESSS_TOKEN_TIMEOUT = 3600
USER_DEFAULT_PASSWORD = password USER_DEFAULT_PASSWORD = password
CATCH_EMAIL = gladys@tirsolutions.com CATCH_EMAIL =
CR_LINK = http://stagingrms.oneberrysystem.com/cms/change-request/form/view CR_LINK = http://staging.rms.oneberrysystem.com/cms/change-request/form/view
REALTIMESERVER_IP = 127.0.0.1:8000 REALTIMESERVER_IP = 127.0.0.1:8000
CORS_ORIGIN_ALLOW_ALL = False
[LOCAL] [LOCAL]
DATABASE_ENGINE = django.db.backends.mysql DATABASE_ENGINE = django.db.backends.mysql
DATABASE_NAME = rms_db DATABASE_NAME = rms_db
DATABASE_USER = root DATABASE_USER = root
DATABASE_PASSWORD = password DATABASE_PASSWORD = 123
DATABASE_HOST = localhost DATABASE_HOST = localhost
DATABASE_PORT = 3306 DATABASE_PORT = 3306
SESSION_TIMEOUT = 30 SESSION_TIMEOUT = 30
...@@ -78,10 +74,9 @@ USER_DEFAULT_PASSWORD = password ...@@ -78,10 +74,9 @@ USER_DEFAULT_PASSWORD = password
CATCH_EMAIL = gladys@tirsolutions.com CATCH_EMAIL = gladys@tirsolutions.com
CR_LINK = http://localhost:8000/cms/change-request/form/view CR_LINK = http://localhost:8000/cms/change-request/form/view
REALTIMESERVER_IP = 127.0.0.1:8000 REALTIMESERVER_IP = 127.0.0.1:8000
CORS_ORIGIN_ALLOW_ALL = True
[SETTINGS] [SETTINGS]
CONFIG = config.settings.staging CONFIG = config.settings.local
BATCH_UPLOAD_FORMAT_FILENAME = batch_uploadxxx.xlsx BATCH_UPLOAD_FORMAT_FILENAME = batch_uploadxxx.xlsx
[NOTIFICATION_EMAIL] [NOTIFICATION_EMAIL]
...@@ -93,3 +88,5 @@ REQUESTOR_ACKNOWLEDGE_MESSAGE = has ACKNOWLEDGED the change request;RMS-CRACKNOW ...@@ -93,3 +88,5 @@ REQUESTOR_ACKNOWLEDGE_MESSAGE = has ACKNOWLEDGED the change request;RMS-CRACKNOW
REQUESTOR_COMPLETION_MESSAGE = has COMPLETED the change request;RMS-CRCOMPLETED REQUESTOR_COMPLETION_MESSAGE = has COMPLETED the change request;RMS-CRCOMPLETED
VENDOR_ACCEPTANCE_MESSAGE = has ACCEPTED the change request;RMS-CRACCEPTED VENDOR_ACCEPTANCE_MESSAGE = has ACCEPTED the change request;RMS-CRACCEPTED
VENDOR_REJECT_MESSAGE = has REJECTED the change request;RMS-CRREJECTED-VENDOR VENDOR_REJECT_MESSAGE = has REJECTED the change request;RMS-CRREJECTED-VENDOR
REVISED_MESSAGE = has REJECTED the change request for your revision;RMS-CRREVISED
CANCEL_MESSAGE = has CANCELLED the change request;RMS-CRCANCELLED-USERTRIGGER
\ No newline at end of file
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