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
2d3352db
Commit
2d3352db
authored
Sep 17, 2019
by
Gladys Forte
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #107 in RMS/api-main-service from gladys-dev2 to RMSv2
* commit '
b2ac4549
': migrations
parents
bd38fdb9
b2ac4549
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
59 additions
and
3 deletions
+59
-3
app/applicationlayer/cms/form/views.py
app/applicationlayer/cms/form/views.py
+7
-2
app/applicationlayer/cms/utils_cr.py
app/applicationlayer/cms/utils_cr.py
+1
-1
app/entities/migrations/0002_auto_20190917_1716.py
app/entities/migrations/0002_auto_20190917_1716.py
+48
-0
app/entities/models.py
app/entities/models.py
+3
-0
No files found.
app/applicationlayer/cms/form/views.py
View file @
2d3352db
...
...
@@ -440,6 +440,11 @@ class ChangeRequestFormsViewset(meviewsets.ModelViewSet):
level
=
request
.
data
[
'level'
]
next_level
=
int
(
request
.
data
[
'level'
])
+
1
remarks
=
request
.
data
[
'remarks'
]
models
.
ChangeRequestFormApprovers
.
objects
.
filter
(
pk
=
id
)
.
update
(
action
=
action
,
remarks
=
remarks
,
action_date
=
datetime
.
now
())
next_approver
=
models
.
ChangeRequestFormApprovers
.
objects
.
filter
(
level
=
str
(
next_level
),
...
...
@@ -450,16 +455,16 @@ class ChangeRequestFormsViewset(meviewsets.ModelViewSet):
# NOTIF MSG FOR REQUESTOR
requestor_notification_msg
=
REQUESTOR_MESSAGE
.
split
(
';'
)[
0
]
# NOTIF MSG FOR APPROVER
# NOTIF MSG FOR
NEXT
APPROVER
notification_msg
=
APPROVER_MESSAGE
.
split
(
';'
)[
0
]
# SEND EMAIL AND NOTIF TO REQUESTOR
send_mail_requestor
(
current_user
,
form_code
,
delegation
,
requestor_notification_msg
,
action
,
remarks
,
level
)
print
(
"level 3"
)
for
n_approver
in
next_approver
:
print
(
n_approver
.
user
)
...
...
app/applicationlayer/cms/utils_cr.py
View file @
2d3352db
...
...
@@ -316,7 +316,7 @@ def send_mail_requestor(current_user,
current_user
)
def
next_approver_email
(
receiver
,
form_code
,
delegation
,
msg
,
action
,
code
):
def
next_approver_email
(
receiver
,
form_code
,
delegation
,
msg
,
action
):
cr_link
=
f
'{CR_FRONT_LINK}/{form_code}'
template_instance
=
get_template_instance
(
form_code
)
app
=
'cms'
...
...
app/entities/migrations/0002_auto_20190917_1716.py
0 → 100644
View file @
2d3352db
# Generated by Django 2.2 on 2019-09-17 17:16
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'entities'
,
'0001_initial'
),
]
operations
=
[
migrations
.
AddField
(
model_name
=
'changerequestformapprovers'
,
name
=
'action_date'
,
field
=
models
.
DateTimeField
(
blank
=
True
,
null
=
True
),
),
migrations
.
AlterField
(
model_name
=
'changerequesthistory'
,
name
=
'action'
,
field
=
models
.
CharField
(
max_length
=
50
),
),
migrations
.
AlterField
(
model_name
=
'changerequesthistory'
,
name
=
'entity'
,
field
=
models
.
CharField
(
max_length
=
50
),
),
migrations
.
AlterField
(
model_name
=
'notification'
,
name
=
'account_no'
,
field
=
models
.
CharField
(
blank
=
True
,
max_length
=
255
,
null
=
True
),
),
migrations
.
AlterField
(
model_name
=
'notification'
,
name
=
'app'
,
field
=
models
.
CharField
(
blank
=
True
,
max_length
=
255
,
null
=
True
),
),
migrations
.
AlterField
(
model_name
=
'notification'
,
name
=
'form_code'
,
field
=
models
.
CharField
(
blank
=
True
,
max_length
=
255
,
null
=
True
),
),
migrations
.
AlterField
(
model_name
=
'notification'
,
name
=
'sender_account_no'
,
field
=
models
.
CharField
(
blank
=
True
,
max_length
=
255
,
null
=
True
),
),
]
app/entities/models.py
View file @
2d3352db
...
...
@@ -741,6 +741,9 @@ class ChangeRequestFormApprovers(BaseApprover):
max_length
=
50
,
blank
=
True
,
null
=
True
)
action_date
=
models
.
DateTimeField
(
blank
=
True
,
null
=
True
)
date_sent
=
models
.
DateTimeField
(
blank
=
True
,
null
=
True
)
...
...
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