Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
R
red-ci-cd
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
red-group-test
red-ci-cd
Commits
b6735429
Commit
b6735429
authored
Nov 25, 2019
by
John Red Medrano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pull latest changes on RMSv2
parent
77b5f8ec
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
353 additions
and
133 deletions
+353
-133
app/applicationlayer/cms/form/approver/serializers.py
app/applicationlayer/cms/form/approver/serializers.py
+18
-15
app/applicationlayer/cms/utils_cr.py
app/applicationlayer/cms/utils_cr.py
+119
-1
app/applicationlayer/management/batchupload/views.py
app/applicationlayer/management/batchupload/views.py
+11
-2
app/businesslayer/changerequest/change_request.py
app/businesslayer/changerequest/change_request.py
+96
-93
app/entities/models.py
app/entities/models.py
+11
-0
app/helper/email_service/sender.py
app/helper/email_service/sender.py
+9
-8
app/helper/email_service/templates/RMS-CRCANCELLED-USERTRIGGER.html
.../email_service/templates/RMS-CRCANCELLED-USERTRIGGER.html
+33
-0
app/helper/email_service/templates/RMS-CRREVISED.html
app/helper/email_service/templates/RMS-CRREVISED.html
+35
-0
config/settings/dev.py
config/settings/dev.py
+2
-0
config/settings/local.py
config/settings/local.py
+2
-0
config/settings/production.py
config/settings/production.py
+2
-0
config/settings/staging.py
config/settings/staging.py
+2
-0
config/settings/uat.py
config/settings/uat.py
+2
-0
env.template.ini
env.template.ini
+11
-14
No files found.
app/applicationlayer/cms/form/approver/serializers.py
View file @
b6735429
...
...
@@ -36,6 +36,7 @@ class ChangeRequestFormApproversSerializer(
if
instance
.
form_code
.
status
==
'Draft'
:
if
instance
.
tmp_approver
:
if
instance
.
tmp_approver
.
user
or
instance
.
tmp_approver
.
delegation
.
name
.
lower
()
==
'requestor'
:
ret
[
'editable_user'
]
=
False
else
:
...
...
@@ -50,11 +51,11 @@ class ChangeRequestFormApproversSerializer(
ret
[
'editable_dept'
]
=
False
else
:
ret
[
'editable_dept'
]
=
True
if
instance
.
tmp_approver
.
delegation
or
instance
.
tmp_approver
.
delegation
.
name
.
lower
()
==
'requestor'
:
ret
[
'editable_deleg'
]
=
False
else
:
ret
[
'editable_deleg'
]
=
True
# not instance.tmp_approver.delegation.code or
# if
instance.tmp_approver.delegation.name.lower() == 'requestor':
#
ret['editable_deleg'] = False
#
else:
#
ret['editable_deleg'] = True
else
:
ret
[
'editable_user'
]
=
True
...
...
@@ -73,6 +74,7 @@ class ChangeRequestFormApproversSerializer(
if
instance
.
form_code
.
status
==
'Draft'
:
if
instance
.
tmp_approver
:
if
instance
.
tmp_approver
.
user
or
instance
.
tmp_approver
.
delegation
.
name
.
lower
()
==
'requestor'
:
ret
[
'editable_user'
]
=
False
else
:
...
...
@@ -102,16 +104,17 @@ class ChangeRequestFormApproversSerializer(
ret
[
'department'
]
=
None
ret
[
'editable_dept'
]
=
True
if
instance
.
tmp_approver
.
delegation
or
instance
.
tmp_approver
.
delegation
.
name
.
lower
()
==
'requestor'
:
ret
[
'delegation'
]
=
{
"id"
:
instance
.
tmp_approver
.
delegation
.
id
,
"code"
:
instance
.
tmp_approver
.
delegation
.
code
,
"name"
:
instance
.
tmp_approver
.
delegation
.
name
}
ret
[
'editable_deleg'
]
=
False
else
:
ret
[
'delegation'
]
=
None
ret
[
'editable_deleg'
]
=
True
# if instance.tmp_approver.delegation or instance.tmp_approver.delegation.name.lower() == 'requestor':
# ret['delegation'] = {
# "id": instance.tmp_approver.delegation.id,
# "code": instance.tmp_approver.delegation.code,
# "name": instance.tmp_approver.delegation.name
# }
# ret['editable_deleg'] = False
# else:
# ret['delegation'] = None
# ret['editable_deleg'] = True
else
:
ret
[
'editable_user'
]
=
True
...
...
app/applicationlayer/cms/utils_cr.py
View file @
b6735429
...
...
@@ -15,6 +15,7 @@ from rest_framework.exceptions import ParseError
from
django.db
import
IntegrityError
from
rest_framework.exceptions
import
APIException
from
django.db.models
import
Max
import
os
CR_FRONT_LINK
=
settings
.
CR_FRONT_LINK
...
...
@@ -26,6 +27,8 @@ REQUESTOR_ACKNOWLEDGE_MESSAGE = settings.REQUESTOR_ACKNOWLEDGE_MESSAGE
REQUESTOR_COMPLETION_MESSAGE
=
settings
.
REQUESTOR_COMPLETION_MESSAGE
VENDOR_ACCEPTANCE_MESSAGE
=
settings
.
VENDOR_ACCEPTANCE_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
):
...
...
@@ -473,6 +476,44 @@ def crhistory_log_bulk_delete(queryset, entity, tbl, form_code,
''
)
tbl
.
objects
.
filter
(
id
=
test
[
'id'
])
.
delete
()
return
True
except
IntegrityError
as
exc
:
raise
APIException
(
detail
=
exc
)
def
crhistory_log_bulk_delete_masterattach
(
queryset
,
entity
,
tbl
,
form_code
,
batch_no
,
main_action
):
try
:
for
data
in
queryset
:
test
=
model_to_dict
(
data
)
# print(test)
crhistory_save
(
batch_no
,
main_action
,
enums
.
CREnum
.
DELETED
.
value
,
entity
,
form_code
,
test
,
''
)
tbl
.
objects
.
filter
(
id
=
test
[
'id'
])
.
delete
()
# url = models.MasterAttachment.objects.get(id=test['file_upload'])
# models.MasterAttachment.objects.filter(
# id=test['file_upload']).delete()
# r = model_to_dict(url)
# print(r['url'])
# print(settings.MEDIA_ROOT)
# # os.remove(r['url'])
# x = os.path.join(settings.MEDIA_ROOT, r['url'])
# print(x)
# if os.path.exists(os.path.join(settings.MEDIA_ROOT, r['url'])):
# print("file exists")
# # os.remove(r['url'])
# else:
# print("The file does not exist")
return
True
except
IntegrityError
as
exc
:
raise
APIException
(
detail
=
exc
)
...
...
@@ -612,4 +653,81 @@ def reset_autoemail_tables(form_code):
form_code
=
form_code
)
.
delete
()
return
True
\ No newline at end of file
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
app/applicationlayer/management/batchupload/views.py
View file @
b6735429
...
...
@@ -140,8 +140,6 @@ class BatchUploadViewSet(viewsets.ModelViewSet):
'Privilege_Department'
,
'Privilege_Department_Code'
)
print
(
departments
)
data
=
{
'Username'
:
[
"ob-john"
],
...
...
@@ -258,8 +256,19 @@ class BatchUploadViewSet(viewsets.ModelViewSet):
raise
ParseError
(
department_error
)
<<<<<<<
HEAD
# user type authorization and user type per user
=======
else
:
user_department
=
Department
.
objects
.
get
(
name__icontains
=
keys
[
'department'
]
)
default_app
=
Application
.
objects
.
filter
(
excel_code
=
keys
[
'default_app'
]
)
.
first
()
>>>>>>>
bd79850f02d697447131ae812adc4b42cf78960a
dept_code
=
Department
.
objects
.
get
(
code
=
keys
[
'Department_Code'
]
...
...
app/businesslayer/changerequest/change_request.py
View file @
b6735429
...
...
@@ -17,6 +17,7 @@ from app.applicationlayer.cms.utils_cr import (
crhistory_save
,
entity_log_bulk
,
crhistory_log_bulk_delete
,
crhistory_log_bulk_delete_masterattach
,
send_mail_requestor
,
next_approver_email
,
send_mail_vendor
,
...
...
@@ -40,6 +41,8 @@ REQUESTOR_ACKNOWLEDGE_MESSAGE = settings.REQUESTOR_ACKNOWLEDGE_MESSAGE
REQUESTOR_COMPLETION_MESSAGE
=
settings
.
REQUESTOR_COMPLETION_MESSAGE
VENDOR_ACCEPTANCE_MESSAGE
=
settings
.
VENDOR_ACCEPTANCE_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
):
...
...
@@ -360,14 +363,14 @@ def attachment_add_edit_delete(form_request_body,
)
.
exclude
(
id__in
=
request_ids
)
if
delete_query
.
count
()
>
0
:
crhistory_log_bulk_delete
(
delete_query
,
entity
,
queryset
,
form_code
,
batch_no
,
main_action
crhistory_log_bulk_delete
_masterattach
(
delete_query
,
entity
,
queryset
,
form_code
,
batch_no
,
main_action
)
# update or create
...
...
@@ -407,7 +410,7 @@ def attachment_add_edit_delete(form_request_body,
serializer
=
serializer_data
(
frm_instance
,
data
=
data
,
partial
=
partial
,
context
=
{
"request"
:
self
.
request
})
context
=
{
"request"
:
self
.
request
})
serializer
.
is_valid
(
raise_exception
=
True
)
...
...
@@ -562,75 +565,75 @@ def cr_routing_actions(approver_instance, current_user):
elif
approver_instance
[
'action'
]
.
lower
()
==
'revised'
:
# send email to vendor
# if delegation.lower() == 'requestor':
# notification_msg = VENDOR_REJECT_MESSAGE.split(';')[0]
# # send reject email to vendor
# send_mail_vendor(
# current_user, form_code, delegation,
# notification_msg, action,
# remarks, level
# )
# prev_level = int(level) - 1
# # reset last vendor details
# models.ChangeRequestFormApprovers.objects.filter(
# Q(form_code=form_code) &
# Q(level=int(prev_level))
# ).update(
# is_action=True,
# action='Acknowledged',
# action_date=datetime.now(),
# date_sent=datetime.now()
# )
# else:
prev_vendor
=
check_vendor_level
(
'prev'
,
level
,
form_code
)
if
prev_vendor
.
count
()
>
0
:
# EMAIL CODE FOR REQUESTOR
requestor_notification_msg
=
REQUESTOR_REJECT_MESSAGE
.
split
(
';'
)[
0
]
# SEND EMAIL AND NOTIF TO REQUESTOR
send_mail_requestor
(
current_user
,
form_code
,
delegation
,
requestor_notification_msg
,
action
,
remarks
,
level
)
if
delegation
.
lower
()
==
'requestor'
:
notification_msg
=
REVISED_MESSAGE
.
split
(
';'
)[
0
]
notification_msg
=
VENDOR_REJECT_MESSAGE
.
split
(
';'
)[
0
]
# send reject email to vendor
send_mail_vendor
(
current_user
,
form_code
,
'others'
,
current_user
,
form_code
,
delegation
,
notification_msg
,
action
,
remarks
,
level
)
last_action_vendor
=
prev_vendor
.
last
()
prev_level
=
int
(
level
)
-
1
# reset last vendor details
models
.
ChangeRequestFormApprovers
.
objects
.
filter
(
code
=
last_action_vendor
Q
(
form_code
=
form_code
)
&
Q
(
level
=
int
(
prev_level
))
)
.
update
(
is_action
=
True
,
action
=
'Acknowledged'
,
action_date
=
datetime
.
now
(),
date_sent
=
datetime
.
now
()
)
else
:
prev_vendor
=
check_vendor_level
(
'prev'
,
level
,
form_code
)
if
prev_vendor
.
count
()
>
0
:
# EMAIL CODE FOR REQUESTOR
# requestor_notification_msg = REQUESTOR_REJECT_MESSAGE.split(';')[0]
# SEND EMAIL AND NOTIF TO REQUESTOR
# send_mail_requestor(
# current_user, form_code, delegation,
# requestor_notification_msg, action,
# remarks, level
# )
notification_msg
=
REVISED_MESSAGE
.
split
(
';'
)[
0
]
send_mail_vendor
(
current_user
,
form_code
,
'others'
,
notification_msg
,
action
,
remarks
,
level
)
last_action_vendor
=
prev_vendor
.
last
()
models
.
ChangeRequestFormApprovers
.
objects
.
filter
(
code
=
last_action_vendor
)
.
update
(
is_action
=
True
,
action
=
'Acknowledged'
,
action_date
=
datetime
.
now
(),
date_sent
=
datetime
.
now
()
)
level
=
last_action_vendor
.
level
level
=
last_action_vendor
.
level
models
.
ChangeRequestFormApprovers
.
objects
.
filter
(
Q
(
form_code
=
form_code
)
&
Q
(
level__gt
=
int
(
level
))
)
.
update
(
is_action
=
False
,
action
=
None
,
remarks
=
None
,
action_date
=
None
,
date_sent
=
None
)
models
.
ChangeRequestFormApprovers
.
objects
.
filter
(
Q
(
form_code
=
form_code
)
&
Q
(
level__gt
=
int
(
level
))
)
.
update
(
is_action
=
False
,
action
=
None
,
remarks
=
None
,
action_date
=
None
,
date_sent
=
None
)
# else:
...
...
@@ -649,40 +652,40 @@ def cr_routing_actions(approver_instance, current_user):
elif
approver_instance
[
'action'
]
.
lower
()
==
'rejected'
:
# send email to vendor
if
delegation
.
lower
()
==
'requestor'
:
notification_msg
=
VENDOR_REJECT_MESSAGE
.
split
(
';'
)[
0
]
#
if delegation.lower() == 'requestor':
#
notification_msg = VENDOR_REJECT_MESSAGE.split(';')[0]
# send reject email to vendor
send_mail_vendor
(
current_user
,
form_code
,
delegation
,
notification_msg
,
action
,
remarks
,
level
)
#
# send reject email to vendor
#
send_mail_vendor(
#
current_user, form_code, delegation,
#
notification_msg, action,
#
remarks, level
#
)
prev_level
=
int
(
level
)
-
1
# reset last vendor details
models
.
ChangeRequestFormApprovers
.
objects
.
filter
(
Q
(
form_code
=
form_code
)
&
Q
(
level
=
int
(
prev_level
))
)
.
update
(
is_action
=
True
,
action
=
'Acknowledged'
,
action_date
=
datetime
.
now
(),
date_sent
=
datetime
.
now
()
)
#
prev_level = int(level) - 1
#
# reset last vendor details
#
models.ChangeRequestFormApprovers.objects.filter(
#
Q(form_code=form_code) &
#
Q(level=int(prev_level))
#
).update(
#
is_action=True,
#
action='Acknowledged',
#
action_date=datetime.now(),
#
date_sent=datetime.now()
#
)
else
:
update_form_header_status
(
form_code
,
'Rejected'
)
#
else:
update_form_header_status
(
form_code
,
'Rejected'
)
# EMAIL CODE FOR REQUESTOR
requestor_notification_msg
=
REQUESTOR_REJECT_MESSAGE
.
split
(
';'
)[
0
]
# SEND EMAIL AND NOTIF TO REQUESTOR
send_mail_requestor
(
current_user
,
form_code
,
delegation
,
requestor_notification_msg
,
action
,
remarks
,
level
)
# EMAIL CODE FOR REQUESTOR
requestor_notification_msg
=
REQUESTOR_REJECT_MESSAGE
.
split
(
';'
)[
0
]
# SEND EMAIL AND NOTIF TO REQUESTOR
send_mail_requestor
(
current_user
,
form_code
,
delegation
,
requestor_notification_msg
,
action
,
remarks
,
level
)
elif
approver_instance
[
'action'
]
.
lower
()
==
'completed'
:
...
...
@@ -759,7 +762,7 @@ def cr_routing_actions(approver_instance, current_user):
date_now
=
datetime
.
now
()
# update is_action for current level
update_form_approver
(
form_code
,
level
,
'current'
,
date_now
)
reset_autoemail_tables
(
form_code
)
return
True
...
...
app/entities/models.py
View file @
b6735429
...
...
@@ -9,6 +9,10 @@ from . import enums
from
django.utils.text
import
slugify
from
datetime
import
timedelta
import
os
<<<<<<<
HEAD
=======
from
django.conf
import
settings
>>>>>>>
bd79850f02d697447131ae812adc4b42cf78960a
# ********************* AUTH TABLES *********************
...
...
@@ -535,6 +539,13 @@ class MasterAttachment(models.Model):
class
Meta
:
db_table
=
'master_attachments'
def
delete
(
self
,
*
args
,
**
kwargs
):
# self.url.delete()
# super().delete(*args, **kwargs)
os
.
remove
(
os
.
path
.
join
(
settings
.
MEDIA_ROOT
,
self
.
url
.
name
))
super
(
MasterAttachment
,
self
)
.
delete
(
*
args
,
**
kwargs
)
class
BaseAttachment
(
models
.
Model
):
attachment_type
=
models
.
CharField
(
max_length
=
255
)
...
...
app/helper/email_service/sender.py
View file @
b6735429
...
...
@@ -208,7 +208,7 @@ def admin_changepassword(args):
# 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
):
...
...
@@ -250,12 +250,12 @@ def routing_table_actions(args):
else
:
email_template
=
'RMS-CRREJECTED.html'
elif
args
[
12
]
.
lower
()
==
'revised'
:
subject
=
'Resource Management System -
Change Request Rejected
'
if
args
[
13
]
.
lower
()
==
'requestor'
or
args
[
13
]
.
lower
()
==
'others'
:
email_template
=
'RMS-CRREJECTED-VENDOR.html'
else
:
email_template
=
'RMS-CRREJECTED
.html'
subject
=
'Resource Management System -
Action Required for Change Request
'
email_template
=
'RMS-CRREVISED.html'
elif
args
[
12
]
.
lower
()
==
'cancelled'
:
subject
=
'Resource Management System - Change Request Cancelled'
email_template
=
'RMS-CRCANCELLED-USERTRIGGER
.html'
F
=
open
(
os
.
path
.
join
(
settings
.
EMAIL_TEMPLATES_ROOT
,
email_template
),
'r'
)
FC
=
F
.
read
()
...
...
@@ -271,8 +271,9 @@ def routing_table_actions(args):
FC
=
FC
.
replace
(
'{priority_level}'
,
priority_level
)
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
)
if
email_template
==
'RMS-CRREJECTED-VENDOR.html'
:
if
args
[
13
]
.
lower
()
==
'requestor'
:
...
...
app/helper/email_service/templates/RMS-CRCANCELLED-USERTRIGGER.html
0 → 100644
View file @
b6735429
<!DOCTYPE html>
<html>
<head>
<title>
RMS: Change Request Cancelled
</title>
</head>
<body
style=
"font-family: arial;"
>
<h3>
Resource Management System
(
RMS
)
</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
app/helper/email_service/templates/RMS-CRREVISED.html
0 → 100644
View file @
b6735429
<!DOCTYPE html>
<html>
<head>
<title>
RMS: Change Request Rejected
</title>
</head>
<body
style=
"font-family: arial;"
>
<h3>
Resource Management System
(
RMS
)
</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
config/settings/dev.py
View file @
b6735429
...
...
@@ -48,6 +48,8 @@ REQUESTOR_ACKNOWLEDGE_MESSAGE = config['NOTIFICATION_EMAIL']['REQUESTOR_ACKNOWLE
REQUESTOR_COMPLETION_MESSAGE
=
config
[
'NOTIFICATION_EMAIL'
][
'REQUESTOR_COMPLETION_MESSAGE'
]
VENDOR_ACCEPTANCE_MESSAGE
=
config
[
'NOTIFICATION_EMAIL'
][
'VENDOR_ACCEPTANCE_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
CATCH_EMAIL
=
config
[
'DEV'
][
'CATCH_EMAIL'
]
...
...
config/settings/local.py
View file @
b6735429
...
...
@@ -45,6 +45,8 @@ REQUESTOR_ACKNOWLEDGE_MESSAGE = config['NOTIFICATION_EMAIL']['REQUESTOR_ACKNOWLE
REQUESTOR_COMPLETION_MESSAGE
=
config
[
'NOTIFICATION_EMAIL'
][
'REQUESTOR_COMPLETION_MESSAGE'
]
VENDOR_ACCEPTANCE_MESSAGE
=
config
[
'NOTIFICATION_EMAIL'
][
'VENDOR_ACCEPTANCE_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
CATCH_EMAIL
=
config
[
'LOCAL'
][
'CATCH_EMAIL'
]
...
...
config/settings/production.py
View file @
b6735429
...
...
@@ -48,6 +48,8 @@ REQUESTOR_ACKNOWLEDGE_MESSAGE = config['NOTIFICATION_EMAIL']['REQUESTOR_ACKNOWLE
REQUESTOR_COMPLETION_MESSAGE
=
config
[
'NOTIFICATION_EMAIL'
][
'REQUESTOR_COMPLETION_MESSAGE'
]
VENDOR_ACCEPTANCE_MESSAGE
=
config
[
'NOTIFICATION_EMAIL'
][
'VENDOR_ACCEPTANCE_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
CATCH_EMAIL
=
config
[
'PRODUCTION'
][
'CATCH_EMAIL'
]
...
...
config/settings/staging.py
View file @
b6735429
...
...
@@ -47,6 +47,8 @@ REQUESTOR_ACKNOWLEDGE_MESSAGE = config['NOTIFICATION_EMAIL']['REQUESTOR_ACKNOWLE
REQUESTOR_COMPLETION_MESSAGE
=
config
[
'NOTIFICATION_EMAIL'
][
'REQUESTOR_COMPLETION_MESSAGE'
]
VENDOR_ACCEPTANCE_MESSAGE
=
config
[
'NOTIFICATION_EMAIL'
][
'VENDOR_ACCEPTANCE_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
CATCH_EMAIL
=
config
[
'STAGING'
][
'CATCH_EMAIL'
]
...
...
config/settings/uat.py
View file @
b6735429
...
...
@@ -48,6 +48,8 @@ REQUESTOR_ACKNOWLEDGE_MESSAGE = config['NOTIFICATION_EMAIL']['REQUESTOR_ACKNOWLE
REQUESTOR_COMPLETION_MESSAGE
=
config
[
'NOTIFICATION_EMAIL'
][
'REQUESTOR_COMPLETION_MESSAGE'
]
VENDOR_ACCEPTANCE_MESSAGE
=
config
[
'NOTIFICATION_EMAIL'
][
'VENDOR_ACCEPTANCE_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
CATCH_EMAIL
=
config
[
'UAT'
][
'CATCH_EMAIL'
]
...
...
env.template.ini
View file @
b6735429
...
...
@@ -10,9 +10,8 @@ FRONT_END_URL =
AUTH_ACCESSS_TOKEN_TIMEOUT =
USER_DEFAULT_PASSWORD
=
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
CORS_ORIGIN_ALLOW_ALL
=
False
[UAT]
DATABASE_ENGINE
=
django.db.backends.mysql
...
...
@@ -22,13 +21,12 @@ DATABASE_PASSWORD =
DATABASE_HOST =
DATABASE_PORT
=
SESSION_TIMEOUT =
FRONT_END_URL
=
http://stagingrms.oneberrysystem.com
FRONT_END_URL
=
http://staging
.
rms.oneberrysystem.com
AUTH_ACCESSS_TOKEN_TIMEOUT
=
USER_DEFAULT_PASSWORD =
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
CORS_ORIGIN_ALLOW_ALL
=
False
[DEV]
DATABASE_ENGINE
=
django.db.backends.mysql
...
...
@@ -44,7 +42,6 @@ USER_DEFAULT_PASSWORD =
CATCH_EMAIL
=
gladys@tirsolutions.com
CR_LINK
=
http://devweb.rmsv2.oneberrysystem.com/cms/change-request/form/view
REALTIMESERVER_IP
=
127.0.0.1:8000
CORS_ORIGIN_ALLOW_ALL
=
True
[STAGING]
...
...
@@ -54,21 +51,20 @@ DATABASE_USER =
DATABASE_PASSWORD =
DATABASE_HOST
=
DATABASE_PORT =
SESSION_TIMEOUT
=
30
FRONT_END_URL
=
http://stagingrms.oneberrysystem.com
SESSION_TIMEOUT
=
FRONT_END_URL
=
http://staging
.
rms.oneberrysystem.com
AUTH_ACCESSS_TOKEN_TIMEOUT
=
3600
USER_DEFAULT_PASSWORD
=
password
CATCH_EMAIL
=
gladys@tirsolutions.com
CR_LINK
=
http://stagingrms.oneberrysystem.com/cms/change-request/form/view
CATCH_EMAIL
=
CR_LINK = http://staging
.
rms.oneberrysystem.com/cms/change-request/form/view
REALTIMESERVER_IP
=
127.0.0.1:8000
CORS_ORIGIN_ALLOW_ALL
=
False
[LOCAL]
DATABASE_ENGINE
=
django.db.backends.mysql
DATABASE_NAME
=
rms_db
DATABASE_USER
=
root
DATABASE_PASSWORD
=
password
DATABASE_PASSWORD
=
123
DATABASE_HOST
=
localhost
DATABASE_PORT
=
3306
SESSION_TIMEOUT
=
30
...
...
@@ -78,10 +74,9 @@ USER_DEFAULT_PASSWORD = password
CATCH_EMAIL
=
gladys@tirsolutions.com
CR_LINK
=
http://localhost:8000/cms/change-request/form/view
REALTIMESERVER_IP
=
127.0.0.1:8000
CORS_ORIGIN_ALLOW_ALL
=
True
[SETTINGS]
CONFIG
=
config.settings.
staging
CONFIG
=
config.settings.
local
BATCH_UPLOAD_FORMAT_FILENAME
=
batch_uploadxxx.xlsx
[NOTIFICATION_EMAIL]
...
...
@@ -93,3 +88,5 @@ REQUESTOR_ACKNOWLEDGE_MESSAGE = has ACKNOWLEDGED the change request;RMS-CRACKNOW
REQUESTOR_COMPLETION_MESSAGE
=
has COMPLETED the change request;RMS-CRCOMPLETED
VENDOR_ACCEPTANCE_MESSAGE
=
has ACCEPTED the change request;RMS-CRACCEPTED
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment