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
44477674
Commit
44477674
authored
Dec 03, 2019
by
John Red Medrano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updating my copy
parent
fb44f82b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
130 deletions
+8
-130
app/applicationlayer/cms/form/header/views.py
app/applicationlayer/cms/form/header/views.py
+5
-1
app/applicationlayer/cms/master/template/account/views.py
app/applicationlayer/cms/master/template/account/views.py
+2
-2
app/helper/decorators.py
app/helper/decorators.py
+1
-0
app/helper/email_service/templates/CHANGE_REQUEST_TEMPLATE.html
...lper/email_service/templates/CHANGE_REQUEST_TEMPLATE.html
+0
-127
No files found.
app/applicationlayer/cms/form/header/views.py
View file @
44477674
...
@@ -576,12 +576,16 @@ class ChangeRequestFormsViewset(viewsets.ModelViewSet):
...
@@ -576,12 +576,16 @@ class ChangeRequestFormsViewset(viewsets.ModelViewSet):
print
(
attch
)
print
(
attch
)
for
file_name
in
attch
:
for
file_name
in
attch
:
print
(
file_name
[
'file_upload__url'
])
a
=
os
.
path
.
join
(
settings
.
MEDIA_ROOT
,
file_name
[
'file_upload__url'
])
a
=
os
.
path
.
join
(
settings
.
MEDIA_ROOT
,
file_name
[
'file_upload__url'
])
# full_file_name = os.path.join(my_folder, file_name['file_upload__url'])
# full_file_name = os.path.join(my_folder, file_name['file_upload__url'])
# print(full_file_name)
# print(full_file_name)
if
os
.
path
.
isfile
(
a
):
if
os
.
path
.
isfile
(
a
):
print
(
'ddd'
)
print
(
'ddd'
)
shutil
.
copy
(
a
,
my_folder
)
print
(
a
)
# print(type(a))
b
=
open
(
a
,
'r'
)
shutil
.
copy
(
b
,
my_folder
)
else
:
else
:
print
(
'xxx'
)
print
(
'xxx'
)
...
...
app/applicationlayer/cms/master/template/account/views.py
View file @
44477674
...
@@ -4,9 +4,9 @@ from app.applicationlayer.utils import (CustomPagination,
...
@@ -4,9 +4,9 @@ from app.applicationlayer.utils import (CustomPagination,
from
app.applicationlayer.management.account.serializer
import
ChangeRequestList
from
app.applicationlayer.management.account.serializer
import
ChangeRequestList
from
app.entities
import
models
from
app.entities
import
models
from
rest_framework.response
import
Response
from
rest_framework.response
import
Response
from
django.db.models
import
Q
from
django.db.models
import
Q
,
F
from
rest_framework
import
status
from
rest_framework
import
status
from
django.db.models
import
F
#
from django.db.models import F
class
UserListTemplate
(
APIView
):
class
UserListTemplate
(
APIView
):
...
...
app/helper/decorators.py
View file @
44477674
...
@@ -146,6 +146,7 @@ class rms:
...
@@ -146,6 +146,7 @@ class rms:
def
wrapper
(
self
,
request
,
*
args
,
**
kwargs
):
def
wrapper
(
self
,
request
,
*
args
,
**
kwargs
):
if
rms
.
user_type
(
self
)
==
rms
.
enums_company
or
rms
.
user_type
(
self
)
==
rms
.
enums_department
:
if
rms
.
user_type
(
self
)
==
rms
.
enums_company
or
rms
.
user_type
(
self
)
==
rms
.
enums_department
:
id
=
rms
.
user
(
self
)
.
department
.
company
.
id
id
=
rms
.
user
(
self
)
.
department
.
company
.
id
self
.
queryset
=
self
.
queryset
.
filter
(
self
.
queryset
=
self
.
queryset
.
filter
(
...
...
app/helper/email_service/templates/CHANGE_REQUEST_TEMPLATE.html
View file @
44477674
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1_0"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"ie=edge"
>
<title>
Change Request Template
</title>
<link
rel=
"stylesheet"
href=
"./styles.css"
>
</head>
<body>
<h1>
Change Request Template
</h1>
<h2>
Requested To:
</h2>
<div
class=
"requested-to"
>
<div
class=
"input"
>
<label>
Company
</label>
<input
type=
"text"
value=
"{company_name}"
>
</div>
<div
class=
"input"
>
<label>
Department
</label>
<input
type=
"text"
value=
"{department_name}"
>
</div>
<div
class=
"input"
>
<label>
Template Name
</label>
<input
type=
"text"
value=
"{template}"
>
</div>
<div
class=
"input"
>
<label>
Point of Contact
</label>
<input
type=
"text"
value=
"{request_to_name_name}"
>
</div>
<div
class=
"input"
>
<label>
CR Number prefix
</label>
<input
type=
"text"
value=
"{id}"
>
</div>
<div
class=
"input"
>
<label>
Priority
</label>
<input
type=
"text"
value=
"{priority}"
>
</div>
<div
class=
"input"
>
<label>
Objective
</label>
<input
type=
"text"
value=
"{objective}"
>
</div>
<div
class=
"input"
>
<label>
Lead Time Required (Number of Days)
</label>
<input
type=
"text"
value=
"{target_date}"
>
</div>
<div
class=
"input"
>
<label>
Description
</label>
<input
type=
"text"
value=
"{description}"
>
</div>
</div>
<h2>
Created By:
</h2>
<div
class=
"input"
>
<label>
Name
</label>
<input
type=
"text"
value=
"{name}"
>
</div>
<div
class=
"input"
>
<label>
Department
</label>
<input
type=
"text"
value=
"{department_name}"
>
</div>
<div
class=
"input"
>
<label>
Contact Number
</label>
<input
type=
"text"
value=
"{contact_no}"
>
</div>
<div
class=
"table"
>
<h3>
Routing Table
</h3>
<table>
<thead>
<th>
Level
</th>
<th>
Company
</th>
<th>
Department
</th>
<th>
Name
</th>
<th>
Email
</th>
<th>
Contact
</th>
<th>
Delegation
</th>
<th>
Action
</th>
</thead>
<tbody>
<tr>
<td>
{approver_level}
</td>
<td>
{approver_company_name}
</td>
<td>
{approver_department_name}
</td>
<td>
{approver_name}
</td>
<td>
{approver_email}
</td>
<td>
{approver_contact_no}
</td>
<td>
{approver_delegation_name}
</td>
<td>
{approver_action}
</td>
</tr>
</tbody>
</table>
<h3>
Stakeholders
</h3>
<table>
<thead>
<th>
Company
</th>
<th>
Department
</th>
<th>
Name
</th>
<th>
Email
</th>
<th>
Contact
</th>
<th>
Delegation
</th>
<th>
Action
</th>
</thead>
<tbody>
<tr>
<td>
{stakeholder_company_name}
</td>
<td>
{stakeholder_department_name}
</td>
<td>
{stakeholder_name}
</td>
<td>
{stakeholder_email}
</td>
<td>
{stakeholder_contact_no}
</td>
<td>
{stakeholder_delegation_name}
</td>
<td>
{stakeholder_action}
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>
\ 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