Commit 49086274 authored by Gladys Forte's avatar Gladys Forte

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

* commit 'f202d4d7':
  udate template serialiazer
parents 8b880fa8 f202d4d7
......@@ -2,6 +2,9 @@ from app.entities import models
from rest_framework import serializers
from django.db.models import Q
from drf_writable_nested import WritableNestedModelSerializer
from app.applicationlayer.cms.utils_cr import (get_account_details,
get_dept_details,
get_companies_details)
class ChangeRequestTemplateApproversSerializer(
......@@ -52,6 +55,39 @@ class ChangeRequestTemplatesSerializer(
tmp_details = ChangeRequestTemplateDetailsSerializer(
many=True, read_only=True)
def to_representation(self, instance):
ret = super().to_representation(instance)
try:
company = instance.requested_to_company.code
department = instance.requested_to_department.code
point_of_contact = instance.requested_to_user.code
created_by = instance.created_by_user.code
company = get_companies_details(company)
company = company.values_list('name', flat=True)[0]
department = get_dept_details(department)
department = department.values_list('name', flat=True)[0]
point_of_contact = get_account_details(point_of_contact)
point_of_contact = point_of_contact.values_list('name', flat=True)[0]
created_by = get_account_details(created_by)
created_by = created_by.values_list('name', flat=True)[0]
ret['company'] = company
ret['department'] = department
ret['point_of_contact'] = point_of_contact
ret['created_by'] = created_by
return ret
except Exception as e:
ret['company'] = "none"
ret['department'] = "none"
ret['point_of_contact'] = "none"
ret['created_by'] = "none"
return ret
class Meta:
model = models.ChangeRequestTemplateHeader
# fields = '__all__'
......@@ -60,7 +96,8 @@ class ChangeRequestTemplatesSerializer(
'requested_to_priority', 'description', 'created',
'requested_to_template_id', 'requested_to_company',
'requested_to_department', 'requested_to_user',
'created_by_user', 'created_by_department', 'tmp_approvers',
'tmp_stakes', 'tmp_attachments', 'tmp_details')
'created_by_user', 'created_by_department',
'tmp_approvers', 'tmp_stakes', 'tmp_attachments',
'tmp_details')
read_only_fields = ['created', 'template_no']
\ No newline at end of file
......@@ -126,7 +126,7 @@ class ChangeRequestTemplatesViewset(meviewsets.ModelViewSet):
message = status_message_response(
200,
'success',
'list of Templates found',
'List of Templates found',
serializer.data
)
......
......@@ -14,7 +14,8 @@ from django.http import Http404
from django.db.models import Q
from app.applicationlayer.cms.utils_cr import (
number_generator, crhistory_save, entity_log_bulk, crhistory_log_bulk_delete
number_generator, crhistory_save, entity_log_bulk,
crhistory_log_bulk_delete
)
from django.forms.models import model_to_dict
from app.entities import enums, models
......
{
"info": {
"_postman_id": "733e6f05-1f26-4ab8-bcfb-a379c0263a73",
"_postman_id": "2bf303e7-1321-4d01-bc03-3f94211d4712",
"name": "RMSv2 copy",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
......@@ -16,10 +16,6 @@
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "{{baseurl}}/master/companies/",
"host": [
......@@ -39,10 +35,6 @@
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "{{baseurl}}/master/departments/?company=COMPANY-20190917-0000001",
"host": [
......@@ -68,10 +60,6 @@
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "{{baseurl}}/master/user-types/",
"host": [
......@@ -91,10 +79,6 @@
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "{{baseurl}}/master/users/",
"host": [
......@@ -110,6 +94,7 @@
"response": []
}
],
"protocolProfileBehavior": {},
"_postman_isSubFolder": true
},
{
......@@ -123,10 +108,6 @@
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "{{baseurl}}/management/applications/",
"host": [
......@@ -146,10 +127,6 @@
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "{{baseurl}}/management/applications/APP-20190917-0000001/",
"host": [
......@@ -258,6 +235,7 @@
"response": []
}
],
"protocolProfileBehavior": {},
"_postman_isSubFolder": true
},
{
......@@ -268,10 +246,6 @@
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "{{baseurl}}/management/companies/",
"host": [
......@@ -291,10 +265,6 @@
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "{{baseurl}}/management/companies/COMPANY-20190909-0000001/",
"host": [
......@@ -403,6 +373,7 @@
"response": []
}
],
"protocolProfileBehavior": {},
"_postman_isSubFolder": true
},
{
......@@ -413,10 +384,6 @@
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "{{baseurl}}/management/departments/",
"host": [
......@@ -436,10 +403,6 @@
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "{{baseurl}}/management/departments/DEPARTMENT-20190919-0000001/",
"host": [
......@@ -548,6 +511,7 @@
"response": []
}
],
"protocolProfileBehavior": {},
"_postman_isSubFolder": true
},
{
......@@ -558,10 +522,6 @@
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "{{baseurl}}/management/modules/?page=2",
"host": [
......@@ -587,10 +547,6 @@
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "{{baseurl}}/management/modules/MODULE-20190919-0000007/",
"host": [
......@@ -703,6 +659,7 @@
"response": []
}
],
"protocolProfileBehavior": {},
"_postman_isSubFolder": true
},
{
......@@ -713,10 +670,6 @@
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "{{baseurl}}/management/users/",
"host": [
......@@ -736,10 +689,6 @@
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "{{baseurl}}/management/users/USER-20190919-0000028/",
"host": [
......@@ -942,9 +891,11 @@
"response": []
}
],
"protocolProfileBehavior": {},
"_postman_isSubFolder": true
}
],
"protocolProfileBehavior": {},
"_postman_isSubFolder": true
},
{
......@@ -955,10 +906,6 @@
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "{{baseurl}}/auth/current-user/",
"host": [
......@@ -1123,43 +1070,49 @@
"response": []
}
],
"protocolProfileBehavior": {},
"_postman_isSubFolder": true
}
]
],
"protocolProfileBehavior": {}
},
{
"name": "Change Request",
"item": [
{
"name": "CR Templates",
"name": "CR Forms",
"item": [
{
"name": "CR Template Header",
"name": "CR Form Header",
"item": [
{
"name": "Template Header Post",
"name": "Create Form Header",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
"type": "text",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\r\n\t\"requested_to_template_name\": \"Sample Template\",\r\n\t\"requested_to_template_id\": \"JTC21\",\r\n\t\"requested_to_objective\": \"Sample Objective\",\r\n\t\"requested_to_target_date\": \"10\",\r\n\t\"requested_to_priority\": \"High\",\r\n\t\"description\": \"sample description\",\r\n\t\"created_by_department\": \"admin\",\r\n\t\"created_by_user\": \"USER-20190913-0000006\",\r\n\t\"requested_to_company\": \"COMPANY-20190909-0000002\",\r\n\t\"requested_to_department\": \"DEPARTMENT-20190909-0000002\",\r\n\t\"requested_to_user\": \"USER-20190913-0000007\",\r\n\t\r\n\t\r\n\t\"tmp_approvers\": [{\r\n\t\t\t\"level\": \"1\",\r\n\t\t\t\"delegation\": \"HOD\",\r\n\t\t\t\"user\": \"\"\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"level\": \"2\",\r\n\t\t\t\"delegation\": \"Approver\",\r\n\t\t\t\"user\": \"USER-20190913-0000009\"\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"level\": \"3\",\r\n\t\t\t\"delegation\": \"Approver\",\r\n\t\t\t\"user\": \"USER-20190913-0000008\"\r\n\t\t}\r\n\t],\r\n\t\r\n\t\"tmp_stakes\": [{\r\n\t\t\t\"delegation\": \"Mandatory Stakeholder\",\r\n\t\t\t\"user\": \"USER-20190913-0000009\"\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"delegation\": \"Stake Approver\",\r\n\t\t\t\"user\": \"USER-20190913-0000008\"\r\n\t\t}\r\n\t],\r\n\t\r\n\t\"tmp_attachments\": [{\r\n\t\t\t\"attachment_type\": \"Hello\",\r\n\t\t\t\"attachment_name\": \"heyu\",\r\n\t\t\t\"file_name\": \"Sample\",\r\n\t\t\t\"description\": \"Sameple Desc\",\r\n\t\t\t\"uploaded_by\": \"USER-20190913-0000006\"\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"attachment_type\": \"Hello\",\r\n\t\t\t\"attachment_name\": \"heyu\",\r\n\t\t\t\"file_name\": \"Sample\",\r\n\t\t\t\"description\": \"Sameple Desc\",\r\n\t\t\t\"uploaded_by\": \"USER-20190913-0000006\"\r\n\t\t}\r\n\t],\r\n\t\r\n\t\"tmp_details\": [{\r\n\t\t\t\"field_idx\": \"Hello\",\r\n\t\t\t\"field_ref\": \"heyu\",\r\n\t\t\t\"field_val\": \"Sample\",\r\n\t\t\t\"field_props\": \"Sameple Desc\"\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"field_idx\": \"Hello\",\r\n\t\t\t\"field_ref\": \"heyu\",\r\n\t\t\t\"field_val\": \"Sample\",\r\n\t\t\t\"field_props\": \"Sameple Desc\"\r\n\t\t}\r\n\t]\r\n}"
"raw": "{\r\n \"requested_to_template_name\": \"Security Project\",\r\n \"requested_to_objective\": \"Sample Objective\",\r\n \"requested_to_target_date\": \"2019-09-03T13:59:29.694560\",\r\n \"requested_to_priority\": \"Normal\",\r\n \"description\": \"Lorem Ipsum\",\r\n \"company_desc\": \"Oneberry\",\r\n \"status\": \"Pending\",\r\n \"requested_to_template_id\": \"JTC\",\r\n \"department_desc\": \"Oneberry Superuser\",\r\n \"requested_desc\": \"Super User\",\r\n \"requested_to_company\": \"COMPANY-20190909-0000002\",\r\n \"requested_to_department\": \"DEPARTMENT-20190909-0000002\",\r\n \"requested_to_user\": \"USER-20190913-0000007\",\r\n \"requested_by_user\": \"USER-20190913-0000006\",\r\n \"requested_by_department\": \"admin\",\r\n \"template_no\": \"TMP-20190924-0000001\",\r\n \"frm_approvers\": [\r\n {\r\n \"level\": \"1\",\r\n \"delegation\": \"HOD\",\r\n \"user\": \"USER-20190913-0000009\",\r\n \"tmp_approver\": \"TMPAPR-20190924-0000001\"\r\n },\r\n {\r\n \"level\": \"2\",\r\n \"delegation\": \"Approver\",\r\n \"user\": \"USER-20190913-0000009\",\r\n \"tmp_approver\": \"TMPAPR-20190924-0000002\"\r\n },\r\n {\r\n \"level\": \"3\",\r\n \"delegation\": \"Approver\",\r\n \"user\": \"USER-20190913-0000008\",\r\n \"tmp_approver\": \"TMPAPR-20190924-0000003\"\r\n }\r\n ],\r\n \"frm_stakes\": [\r\n\t{\r\n \"delegation\": \"Mandatory Stakeholder\",\r\n \"user\": \"USER-20190913-0000009\",\r\n \"tmp_stake\": \"TMPSTK-20190924-0000001\"\r\n },\r\n {\r\n \"delegation\": \"Stake Approver\",\r\n \"user\": \"USER-20190913-0000008\",\r\n \"tmp_stake\": \"TMPSTK-20190924-0000002\"\r\n }\r\n\t\r\n ],\r\n \r\n \"frm_attachments\": [\r\n {\r\n \"attachment_type\": \"Hello\",\r\n \"attachment_name\": \"heyu\",\r\n \"file_name\": \"Sample\",\r\n \"description\": \"Sameple Desc\",\r\n \"file_upload\": null,\r\n \"uploaded_by\": \"USER-20190913-0000006\",\r\n \"tmp_attach\": \"TMPATCH-20190924-0000001\"\r\n },\r\n {\r\n \"attachment_type\": \"Hello\",\r\n \"attachment_name\": \"heyu\",\r\n \"file_name\": \"Sample\",\r\n \"description\": \"Sameple Desc\",\r\n \"file_upload\": null,\r\n \"uploaded_by\": \"USER-20190913-0000006\",\r\n \"tmp_attach\": \"TMPATCH-20190924-0000002\"\r\n }\r\n ],\r\n \"frm_details\": [\r\n {\r\n \"field_idx\": \"Hello\",\r\n \"field_ref\": \"heyu\",\r\n \"field_val\": \"Sample\",\r\n \"field_props\": \"Sameple Desc\",\r\n \"tmp_detail\": \"TMPDETAIL-20190924-0000001\"\r\n },\r\n {\r\n \"field_idx\": \"Hello\",\r\n \"field_ref\": \"heyu\",\r\n \"field_val\": \"Sample\",\r\n \"field_props\": \"Sameple Desc\",\r\n \"tmp_detail\": \"TMPDETAIL-20190924-0000002\"\r\n }\r\n ]\r\n}"
},
"url": {
"raw": "{{baseurl}}/change-request/template-post/",
"raw": "http://localhost:8000/api/v1/change-request/form-post/",
"protocol": "http",
"host": [
"{{baseurl}}"
"localhost"
],
"port": "8000",
"path": [
"api",
"v1",
"change-request",
"template-post",
"form-post",
""
]
}
......@@ -1167,16 +1120,12 @@
"response": []
},
{
"name": "List of Templates",
"name": "List of Forms",
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "http://localhost:8000/api/v1/change-request/template/",
"raw": "http://localhost:8000/api/v1/change-request/form/",
"protocol": "http",
"host": [
"localhost"
......@@ -1186,7 +1135,7 @@
"api",
"v1",
"change-request",
"template",
"form",
""
]
}
......@@ -1194,16 +1143,12 @@
"response": []
},
{
"name": "View Template",
"name": "View Form",
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "http://localhost:8000/api/v1/change-request/template/TMP-20190916-0000002/",
"raw": "http://localhost:8000/api/v1/change-request/form/FRM-20190924-0000001/",
"protocol": "http",
"host": [
"localhost"
......@@ -1213,8 +1158,8 @@
"api",
"v1",
"change-request",
"template",
"TMP-20190916-0000002",
"form",
"FRM-20190924-0000001",
""
]
}
......@@ -1222,23 +1167,12 @@
"response": []
},
{
"name": "Edit Template",
"name": "Delete Form",
"request": {
"method": "PATCH",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\r\n \"template_no\": \"TMP-20190911-0000001\",\r\n \"requested_to_template_name\": \"Sample Template\",\r\n \"requested_to_objective\": \"hello objective\",\r\n \"requested_to_target_date\": \"2019-09-03T13:59:29.694560\",\r\n \"requested_to_priority\": \"High\",\r\n \"description\": \"sample description\",\r\n \"archived_at\": \"2019-09-11T18:59:09.296883\",\r\n \"requested_to_template_id\": \"temp\",\r\n \"requested_to_company\": \"COMPANY-20190909-0000002\",\r\n \"requested_to_department\": \"DEPARTMENT-20190909-0000002\",\r\n \"requested_to_user\": \"USER-20190909-0000005\",\r\n \"created_by_user\": \"USER-20190909-0000005\",\r\n \"created_by_department\": \"admin\",\r\n \r\n \"tmp_approvers\": [\r\n {\r\n \"id\": 1,\r\n \"level\": \"1\",\r\n \"delegation\": \"Approver\",\r\n \"created\": \"2019-09-11T18:59:09.509901\",\r\n \"archived_at\": null,\r\n \"code\": \"TMPAPR-20190911-0000001\",\r\n \"user\": \"USER-20190909-0000005\",\r\n \"template_no\": \"TMP-20190911-0000001\"\r\n },\r\n {\r\n \"id\": 2,\r\n \"level\": \"2\",\r\n \"delegation\": \"Approver\",\r\n \"created\": \"2019-09-11T18:59:09.607909\",\r\n \"archived_at\": null,\r\n \"code\": \"TMPAPR-20190911-0000002\",\r\n \"user\": \"USER-20190909-0000005\",\r\n \"template_no\": \"TMP-20190911-0000001\"\r\n }\r\n ],\r\n \"tmp_stakes\": [\r\n {\r\n \"id\": 1,\r\n \"delegation\": \"Mandatory Approver\",\r\n \"created\": \"2019-09-11T18:59:09.618924\",\r\n \"archived_at\": null,\r\n \"code\": \"TMPSTK-20190911-0000001\",\r\n \"user\": \"USER-20190909-0000005\",\r\n \"template_no\": \"TMP-20190911-0000001\"\r\n },\r\n {\r\n \"id\": 2,\r\n \"delegation\": \"Stake Approver\",\r\n \"created\": \"2019-09-11T18:59:09.619886\",\r\n \"archived_at\": null,\r\n \"code\": \"TMPSTK-20190911-0000002\",\r\n \"user\": \"USER-20190909-0000005\",\r\n \"template_no\": \"TMP-20190911-0000001\"\r\n }\r\n ],\r\n \"tmp_attachments\": [\r\n {\r\n \"id\": 1,\r\n \"attachment_type\": \"Hello\",\r\n \"attachment_name\": \"heyu\",\r\n \"file_name\": \"Sample\",\r\n \"description\": \"Sameple Desc\",\r\n \"file_upload\": null,\r\n \"created\": \"2019-09-11T18:59:09.631923\",\r\n \"archived_at\": null,\r\n \"code\": \"TMPATCH-20190911-0000001\",\r\n \"uploaded_by\": \"USER-20190909-0000005\",\r\n \"template_no\": \"TMP-20190911-0000001\"\r\n },\r\n {\r\n \"id\": 2,\r\n \"attachment_type\": \"Hello\",\r\n \"attachment_name\": \"heyu\",\r\n \"file_name\": \"Sample\",\r\n \"description\": \"Sameple Desc\",\r\n \"file_upload\": null,\r\n \"created\": \"2019-09-11T18:59:09.674881\",\r\n \"archived_at\": null,\r\n \"code\": \"TMPATCH-20190911-0000002\",\r\n \"uploaded_by\": \"USER-20190909-0000005\",\r\n \"template_no\": \"TMP-20190911-0000001\"\r\n }\r\n ],\r\n \"tmp_details\": [\r\n {\r\n \"id\": 1,\r\n \"field_idx\": \"Hello\",\r\n \"field_ref\": \"heyu\",\r\n \"field_val\": \"Sample\",\r\n \"field_props\": \"Sameple Desc\",\r\n \"created\": \"2019-09-11T18:59:09.684922\",\r\n \"archived_at\": null,\r\n \"code\": \"TMPDETAIL-20190911-0000001\",\r\n \"template_no\": \"TMP-20190911-0000001\"\r\n },\r\n {\r\n \"id\": 2,\r\n \"field_idx\": \"Hello\",\r\n \"field_ref\": \"heyu\",\r\n \"field_val\": \"Sample\",\r\n \"field_props\": \"Sameple Desc\",\r\n \"created\": \"2019-09-11T18:59:09.685887\",\r\n \"archived_at\": null,\r\n \"code\": \"TMPDETAIL-20190911-0000002\",\r\n \"template_no\": \"TMP-20190911-0000001\"\r\n }\r\n ]\r\n}"
},
"method": "DELETE",
"header": [],
"url": {
"raw": "http://localhost:8000/api/v1/change-request/template/TMP-20190911-0000001/",
"raw": "http://localhost:8000/api/v1/change-request/form/FRM-20190909-0000006/",
"protocol": "http",
"host": [
"localhost"
......@@ -1248,8 +1182,8 @@
"api",
"v1",
"change-request",
"template",
"TMP-20190911-0000001",
"form",
"FRM-20190909-0000006",
""
]
}
......@@ -1257,16 +1191,12 @@
"response": []
},
{
"name": "Archive Template",
"name": "Re Route for Approval",
"request": {
"method": "PATCH",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "http://localhost:8000/api/v1/change-request/template/archived/",
"raw": "http://localhost:8000/api/v1/change-request/form/FRM-20190913-0000002/re_route/",
"protocol": "http",
"host": [
"localhost"
......@@ -1276,8 +1206,9 @@
"api",
"v1",
"change-request",
"template",
"archived",
"form",
"FRM-20190913-0000002",
"re_route",
""
]
}
......@@ -1285,16 +1216,12 @@
"response": []
},
{
"name": "Retrieve Template",
"name": "Resubmit",
"request": {
"method": "PATCH",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "http://localhost:8000/api/v1/change-request/template/TMP-20190909-0000002/",
"raw": "http://localhost:8000/api/v1/change-request/form/FRM-20190913-0000002/re_submit/",
"protocol": "http",
"host": [
"localhost"
......@@ -1304,8 +1231,9 @@
"api",
"v1",
"change-request",
"template",
"TMP-20190909-0000002",
"form",
"FRM-20190913-0000002",
"re_submit",
""
]
}
......@@ -1313,46 +1241,68 @@
"response": []
},
{
"name": "Delete Template",
"name": "CR Action",
"request": {
"method": "DELETE",
"header": [],
"method": "PATCH",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": ""
"raw": "{\r\n \"id\": 1,\r\n \"form_code\": \"FRM-20190913-0000001\",\r\n \"delegation\": \"Requestor\",\r\n \"action\": \"Rejected\",\r\n \"level\": \"1\",\r\n \"remarks\": \"\",\r\n \"form_status\": \"Pending\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{baseurl}}/change-request/template/TMP-20190916-0000003/",
"raw": "http://localhost:8000/api/v1/change-request/form/actions/",
"protocol": "http",
"host": [
"{{baseurl}}"
"localhost"
],
"port": "8000",
"path": [
"api",
"v1",
"change-request",
"template",
"TMP-20190916-0000003",
"form",
"actions",
""
]
}
},
"response": []
}
],
"_postman_isSubFolder": true
},
{
"name": "CR Template Approver",
"item": [
{
"name": "List of Approvers",
"name": "Submit",
"request": {
"method": "GET",
"header": [],
"method": "PATCH",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": ""
"raw": "{\r\n \"requested_to_template_name\": \"Security Projects\",\r\n \"requested_to_objective\": \"Sample Objective\",\r\n \"requested_to_target_date\": \"2019-09-03T13:59:29.694560\",\r\n \"requested_to_priority\": \"Normal\",\r\n \"description\": \"Lorem Ipsum\",\r\n \"cancel_date\": null,\r\n \"status\": \"Pending\",\r\n \"company_desc\": \"Oneberry\",\r\n \"department_desc\": \"Oneberry Superuser\",\r\n \"requested_desc\": \"Super User\",\r\n \"requested_to_template_id\": \"JTC-20190924-0000001\",\r\n \"requested_to_company\": \"COMPANY-20190909-0000002\",\r\n \"requested_to_department\": \"DEPARTMENT-20190909-0000002\",\r\n \"requested_to_user\": \"USER-20190913-0000007\",\r\n \"requested_by_user\": \"USER-20190913-0000006\",\r\n \"requested_by_department\": \"admin\",\r\n \"template_no\": \"TMP-20190924-0000001\",\r\n \"frm_approvers\": [\r\n {\r\n \"id\": 1,\r\n \"level\": \"1\",\r\n \"delegation\": \"HOD\",\r\n \"created\": \"2019-09-24T19:08:26.539805\",\r\n \"code\": \"FRMAPR-20190924-0000001\",\r\n \"remarks\": null,\r\n \"action\": null,\r\n \"action_date\": null,\r\n \"date_sent\": null,\r\n \"user\": \"USER-20190913-0000009\",\r\n \"form_code\": \"FRM-20190924-0000001\",\r\n \"tmp_approver\": \"TMPAPR-20190924-0000001\",\r\n \"name\": \"Kath\",\r\n \"department\": \"Superuser\",\r\n \"company\": \"Total Integrated Resources\"\r\n },\r\n {\r\n \"id\": 2,\r\n \"level\": \"2\",\r\n \"delegation\": \"Approver\",\r\n \"created\": \"2019-09-24T19:08:26.582803\",\r\n \"code\": \"FRMAPR-20190924-0000002\",\r\n \"remarks\": null,\r\n \"action\": null,\r\n \"action_date\": null,\r\n \"date_sent\": null,\r\n \"user\": \"USER-20190913-0000009\",\r\n \"form_code\": \"FRM-20190924-0000001\",\r\n \"tmp_approver\": \"TMPAPR-20190924-0000002\",\r\n \"name\": \"Kath\",\r\n \"department\": \"Superuser\",\r\n \"company\": \"Total Integrated Resources\"\r\n },\r\n {\r\n \"level\": \"3\",\r\n \"delegation\": \"Approver\",\r\n \"remarks\": null,\r\n \"action\": null,\r\n \"action_date\": null,\r\n \"date_sent\": null,\r\n \"user\": \"USER-20190913-0000008\",\r\n \"form_code\": \"FRM-20190924-0000001\"\r\n }\r\n ],\r\n \"frm_stakes\": [\r\n {\r\n \"id\": 2,\r\n \"delegation\": \"Stake Approver\",\r\n \"created\": \"2019-09-24T19:08:26.607806\",\r\n \"code\": \"FRMSTK-20190924-0000002\",\r\n \"date_added\": null,\r\n \"user\": \"USER-20190913-0000008\",\r\n \"form_code\": \"FRM-20190924-0000001\",\r\n \"tmp_stake\": \"TMPSTK-20190924-0000002\"\r\n }\r\n ],\r\n \"frm_attachments\": [\r\n {\r\n \"id\": 2,\r\n \"attachment_type\": \"Hello\",\r\n \"attachment_name\": \"heyu\",\r\n \"file_name\": \"Sample\",\r\n \"description\": \"Sameple Desc\",\r\n \"file_upload\": null,\r\n \"created\": \"2019-09-24T19:08:26.657804\",\r\n \"code\": \"FRMATCH-20190924-0000002\",\r\n \"uploaded_by\": \"USER-20190913-0000006\",\r\n \"form_code\": \"FRM-20190924-0000001\",\r\n \"tmp_attach\": \"TMPATCH-20190924-0000002\"\r\n }\r\n ],\r\n \"frm_details\": [\r\n {\r\n \"id\": 2,\r\n \"field_idx\": \"Hello\",\r\n \"field_ref\": \"heyu\",\r\n \"field_val\": \"Sample\",\r\n \"field_props\": \"Sameple Desc\",\r\n \"created\": \"2019-09-24T19:08:26.672805\",\r\n \"code\": \"FRMDETAIL-20190924-0000002\",\r\n \"form_code\": \"FRM-20190924-0000001\",\r\n \"tmp_detail\": \"TMPDETAIL-20190924-0000002\"\r\n }\r\n ],\r\n \"action\": \"No\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "http://localhost:8000/api/v1/change-request/template-approvers/",
"raw": "http://localhost:8000/api/v1/change-request/form/FRM-20190924-0000001/submit/",
"protocol": "http",
"host": [
"localhost"
......@@ -1362,7 +1312,9 @@
"api",
"v1",
"change-request",
"template-approvers",
"form",
"FRM-20190924-0000001",
"submit",
""
]
}
......@@ -1370,16 +1322,28 @@
"response": []
},
{
"name": "View Approver",
"name": "Save",
"request": {
"method": "GET",
"header": [],
"method": "PATCH",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": ""
"raw": "{\r\n \"requested_to_template_name\": \"Security Projects\",\r\n \"requested_to_objective\": \"Sample Objective\",\r\n \"requested_to_target_date\": \"2019-09-03T13:59:29.694560\",\r\n \"requested_to_priority\": \"Normal\",\r\n \"description\": \"Lorem Ipsum\",\r\n \"cancel_date\": null,\r\n \"status\": \"Draft\",\r\n \"company_desc\": \"Oneberry\",\r\n \"department_desc\": \"Oneberry Superuser\",\r\n \"requested_desc\": \"Super User\",\r\n \"requested_to_template_id\": \"JTC-20190924-0000001\",\r\n \"requested_to_company\": \"COMPANY-20190909-0000002\",\r\n \"requested_to_department\": \"DEPARTMENT-20190909-0000002\",\r\n \"requested_to_user\": \"USER-20190913-0000007\",\r\n \"requested_by_user\": \"USER-20190913-0000006\",\r\n \"requested_by_department\": \"admin\",\r\n \"template_no\": \"TMP-20190924-0000001\",\r\n \"frm_approvers\": [\r\n {\r\n \"id\": 1,\r\n \"level\": \"1\",\r\n \"delegation\": \"HOD\",\r\n \"created\": \"2019-09-24T19:08:26.539805\",\r\n \"code\": \"FRMAPR-20190924-0000001\",\r\n \"remarks\": null,\r\n \"action\": null,\r\n \"action_date\": null,\r\n \"date_sent\": null,\r\n \"user\": \"USER-20190913-0000009\",\r\n \"form_code\": \"FRM-20190924-0000001\",\r\n \"tmp_approver\": \"TMPAPR-20190924-0000001\",\r\n \"name\": \"Kath\",\r\n \"department\": \"Superuser\",\r\n \"company\": \"Total Integrated Resources\"\r\n },\r\n {\r\n \"id\": 2,\r\n \"level\": \"2\",\r\n \"delegation\": \"Approver\",\r\n \"created\": \"2019-09-24T19:08:26.582803\",\r\n \"code\": \"FRMAPR-20190924-0000002\",\r\n \"remarks\": null,\r\n \"action\": null,\r\n \"action_date\": null,\r\n \"date_sent\": null,\r\n \"user\": \"USER-20190913-0000009\",\r\n \"form_code\": \"FRM-20190924-0000001\",\r\n \"tmp_approver\": \"TMPAPR-20190924-0000002\",\r\n \"name\": \"Kath\",\r\n \"department\": \"Superuser\",\r\n \"company\": \"Total Integrated Resources\"\r\n },\r\n {\r\n \"level\": \"3\",\r\n \"delegation\": \"Approver\",\r\n \"remarks\": null,\r\n \"action\": null,\r\n \"action_date\": null,\r\n \"date_sent\": null,\r\n \"user\": \"USER-20190913-0000008\",\r\n \"form_code\": \"FRM-20190924-0000001\"\r\n }\r\n ],\r\n \"frm_stakes\": [\r\n {\r\n \"id\": 2,\r\n \"delegation\": \"Stake Approver\",\r\n \"created\": \"2019-09-24T19:08:26.607806\",\r\n \"code\": \"FRMSTK-20190924-0000002\",\r\n \"date_added\": null,\r\n \"user\": \"USER-20190913-0000008\",\r\n \"form_code\": \"FRM-20190924-0000001\",\r\n \"tmp_stake\": \"TMPSTK-20190924-0000002\"\r\n }\r\n ],\r\n \"frm_attachments\": [\r\n {\r\n \"id\": 2,\r\n \"attachment_type\": \"Hello\",\r\n \"attachment_name\": \"heyu\",\r\n \"file_name\": \"Sample\",\r\n \"description\": \"Sameple Desc\",\r\n \"file_upload\": null,\r\n \"created\": \"2019-09-24T19:08:26.657804\",\r\n \"code\": \"FRMATCH-20190924-0000002\",\r\n \"uploaded_by\": \"USER-20190913-0000006\",\r\n \"form_code\": \"FRM-20190924-0000001\",\r\n \"tmp_attach\": \"TMPATCH-20190924-0000002\"\r\n }\r\n ],\r\n \"frm_details\": [\r\n {\r\n \"id\": 2,\r\n \"field_idx\": \"Hello\",\r\n \"field_ref\": \"heyu\",\r\n \"field_val\": \"Sample\",\r\n \"field_props\": \"Sameple Desc\",\r\n \"created\": \"2019-09-24T19:08:26.672805\",\r\n \"code\": \"FRMDETAIL-20190924-0000002\",\r\n \"form_code\": \"FRM-20190924-0000001\",\r\n \"tmp_detail\": \"TMPDETAIL-20190924-0000002\"\r\n }\r\n ],\r\n \"action\": \"No\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "http://localhost:8000/api/v1/change-request/template-approvers/TMPAPR-20190911-0000001/",
"raw": "http://localhost:8000/api/v1/change-request/form/FRM-20190924-0000001/save/",
"protocol": "http",
"host": [
"localhost"
......@@ -1389,8 +1353,9 @@
"api",
"v1",
"change-request",
"template-approvers",
"TMPAPR-20190911-0000001",
"form",
"FRM-20190924-0000001",
"save",
""
]
}
......@@ -1398,22 +1363,19 @@
"response": []
}
],
"protocolProfileBehavior": {},
"_postman_isSubFolder": true
},
{
"name": "CR Template Stakeholder",
"name": "CR Form Approver",
"item": [
{
"name": "List of Stakeholders",
"name": "List of Approvers",
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "http://localhost:8000/api/v1/change-request/template-stakeholders/",
"raw": "http://localhost:8000/api/v1/change-request/form-approvers/",
"protocol": "http",
"host": [
"localhost"
......@@ -1423,7 +1385,7 @@
"api",
"v1",
"change-request",
"template-stakeholders",
"form-approvers",
""
]
}
......@@ -1431,16 +1393,12 @@
"response": []
},
{
"name": "View Stakeholder",
"name": "View Approver",
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "http://localhost:8000/api/v1/change-request/template-stakeholders/TMPSTK-20190909-0000001/",
"raw": "http://localhost:8000/api/v1/change-request/form-approvers/TMPAPR-20190909-0000001/",
"protocol": "http",
"host": [
"localhost"
......@@ -1450,8 +1408,8 @@
"api",
"v1",
"change-request",
"template-stakeholders",
"TMPSTK-20190909-0000001",
"form-approvers",
"TMPAPR-20190909-0000001",
""
]
}
......@@ -1459,22 +1417,19 @@
"response": []
}
],
"protocolProfileBehavior": {},
"_postman_isSubFolder": true
},
{
"name": "CR Template Attachment",
"name": "CR Form Stakeholder",
"item": [
{
"name": "List of Attachments",
"name": "List of Stakeholders",
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "http://localhost:8000/api/v1/change-request/template-attachments/",
"raw": "http://localhost:8000/api/v1/change-request/form-stakeholders/",
"protocol": "http",
"host": [
"localhost"
......@@ -1484,7 +1439,7 @@
"api",
"v1",
"change-request",
"template-attachments",
"form-stakeholders",
""
]
}
......@@ -1492,16 +1447,12 @@
"response": []
},
{
"name": "View Attachment",
"name": "View Stakeholder",
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "http://localhost:8000/api/v1/change-request/template-attachments/TMPATCH-20190909-0000001/",
"raw": "http://localhost:8000/api/v1/change-request/form-stakeholders/TMPSTK-20190909-0000001/",
"protocol": "http",
"host": [
"localhost"
......@@ -1511,8 +1462,8 @@
"api",
"v1",
"change-request",
"template-attachments",
"TMPATCH-20190909-0000001",
"form-stakeholders",
"TMPSTK-20190909-0000001",
""
]
}
......@@ -1520,22 +1471,19 @@
"response": []
}
],
"protocolProfileBehavior": {},
"_postman_isSubFolder": true
},
{
"name": "CR Template Detail",
"name": "CR Form Attachment",
"item": [
{
"name": "List of Details",
"name": "List of Attachments",
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "http://localhost:8000/api/v1/change-request/template-details/",
"raw": "http://localhost:8000/api/v1/change-request/form-attachments/",
"protocol": "http",
"host": [
"localhost"
......@@ -1545,7 +1493,7 @@
"api",
"v1",
"change-request",
"template-details",
"form-attachments",
""
]
}
......@@ -1553,63 +1501,26 @@
"response": []
},
{
"name": "View Detail",
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "http://localhost:8000/api/v1/change-request/template-details/TMPDETAIL-20190909-0000001/",
"protocol": "http",
"host": [
"localhost"
],
"port": "8000",
"path": [
"api",
"v1",
"change-request",
"template-details",
"TMPDETAIL-20190909-0000001",
""
]
}
},
"response": []
}
],
"_postman_isSubFolder": true
}
],
"_postman_isSubFolder": true
"name": "View Attachment",
"protocolProfileBehavior": {
"disableBodyPruning": true
},
{
"name": "CR Forms",
"item": [
{
"name": "CR Form Header",
"item": [
{
"name": "Create Form Header",
"request": {
"method": "POST",
"method": "GET",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"type": "text",
"value": "application/json"
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\r\n\t\"requested_to_template_name\": \"Sample Template\",\r\n\t\"requested_to_template_id\": \"JTC\",\r\n\t\"requested_to_objective\": \"Sample Objective\",\r\n\t\"requested_to_target_date\": \"2019-09-03 13:59:29.694560\",\r\n\t\"requested_to_priority\": \"High\",\r\n\t\"description\": \"sample description\",\r\n\t\"status\": \"Pending\",\r\n\t\"company_desc\": \"Oneberry\",\r\n\t\"department_desc\": \"Oneberry Superuser\",\r\n\t\"requested_desc\": \"Super User\",\r\n\t\"requested_by_department\": \"admin\",\r\n\t\"requested_by_user\": \"USER-20190913-0000006\",\r\n\t\"requested_to_company\": \"COMPANY-20190909-0000002\",\r\n\t\"requested_to_department\": \"DEPARTMENT-20190909-0000002\",\r\n\t\"requested_to_user\": \"USER-20190913-0000007\",\r\n\t\"template_no\": \"TMP-20190916-0000002\",\r\n\t\r\n\t\"frm_approvers\": [{\r\n\t\t\t\"level\": \"1\",\r\n\t\t\t\"delegation\": \"HOD\",\r\n\t\t\t\"user\": \"USER-20190913-0000008\",\r\n\t\t\t\"tmp_approver\": \"TMPAPR-20190916-0000004\"\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"level\": \"2\",\r\n\t\t\t\"delegation\": \"Approver\",\r\n\t\t\t\"user\": \"USER-20190913-0000009\",\r\n\t\t\t\"tmp_approver\": \"TMPAPR-20190913-0000002\"\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"level\": \"3\",\r\n\t\t\t\"delegation\": \"Approver\",\r\n\t\t\t\"user\": \"USER-20190913-0000008\",\r\n\t\t\t\"tmp_approver\": \"TMPAPR-20190913-0000003\"\r\n\t\t}\r\n\t],\r\n\t\r\n\t\"frm_stakes\": [{\r\n\t\t\t\"date_added\": \"2019-09-03 13:59:29.694560\",\r\n\t\t\t\"delegation\": \"Mandatory Stakeholder\",\r\n\t\t\t\"user\": \"USER-20190913-0000009\",\r\n\t\t\t\"tmp_stake\": \"TMPSTK-20190913-0000001\"\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"date_added\": \"2019-09-03 13:59:29.694560\",\r\n\t\t\t\"delegation\": \"Stake Approver\",\r\n\t\t\t\"user\": \"USER-20190913-0000008\",\r\n\t\t\t\"tmp_stake\": \"TMPSTK-20190913-0000002\"\r\n\t\t}\r\n\t],\r\n\t\r\n\t\"frm_attachments\": [{\r\n\t\t\t\"attachment_type\": \"Hello\",\r\n\t\t\t\"attachment_name\": \"heyu\",\r\n\t\t\t\"file_name\": \"Sample\",\r\n\t\t\t\"description\": \"Sameple Desc\",\r\n\t\t\t\"uploaded_by\": \"USER-20190913-0000006\",\r\n\t\t\t\"tmp_attach\": \"TMPATCH-20190913-0000001\"\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"attachment_type\": \"Hello\",\r\n\t\t\t\"attachment_name\": \"heyu\",\r\n\t\t\t\"file_name\": \"Sample\",\r\n\t\t\t\"description\": \"Sameple Desc\",\r\n\t\t\t\"uploaded_by\": \"USER-20190913-0000006\",\r\n\t\t\t\"tmp_attach\": \"TMPATCH-20190913-0000002\"\r\n\t\t}\r\n\t],\r\n\t\r\n\t\"frm_details\": [{\r\n\t\t\t\"field_idx\": \"Hello\",\r\n\t\t\t\"field_ref\": \"heyu\",\r\n\t\t\t\"field_val\": \"Sample\",\r\n\t\t\t\"field_props\": \"Sameple Desc\",\r\n\t\t\t\"tmp_detail\": \"TMPDETAIL-20190913-0000001\"\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"field_idx\": \"Hello\",\r\n\t\t\t\"field_ref\": \"heyu\",\r\n\t\t\t\"field_val\": \"Sample\",\r\n\t\t\t\"field_props\": \"Sameple Desc\",\r\n\t\t\t\"tmp_detail\": \"TMPDETAIL-20190913-0000002\"\r\n\t\t}\r\n\t]\r\n}"
"raw": "{\r\n \"attachment_type\": \"Mandatory Attached\",\r\n \"attachment_name\": \"Mandatory Stakeholder\",\r\n \"file_name\": \"USER-20190909-0000005\",\r\n \"description\": \"Sample Desc 1\",\r\n \"file_upload\": null,\r\n \"code\": \"FRMATCH-20190909-0000001\",\r\n \"uploaded_by\": \"USER-20190909-0000005\",\r\n \"form_code\": \"FRM-20190909-0000005\",\r\n \"tmp_attach\": \"TMPATCH-20190909-0000001\"\r\n}"
},
"url": {
"raw": "http://localhost:8000/api/v1/change-request/form-post/",
"raw": "http://localhost:8000/api/v1/change-request/form-attachments/FRMATCH-20190909-0000001/",
"protocol": "http",
"host": [
"localhost"
......@@ -1619,24 +1530,28 @@
"api",
"v1",
"change-request",
"form-post",
"form-attachments",
"FRMATCH-20190909-0000001",
""
]
}
},
"response": []
}
],
"protocolProfileBehavior": {},
"_postman_isSubFolder": true
},
{
"name": "List of Forms",
"name": "CR Form Detail",
"item": [
{
"name": "List of Details",
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "http://localhost:8000/api/v1/change-request/form/",
"raw": "http://localhost:8000/api/v1/change-request/form-details/",
"protocol": "http",
"host": [
"localhost"
......@@ -1646,7 +1561,7 @@
"api",
"v1",
"change-request",
"form",
"form-details",
""
]
}
......@@ -1654,16 +1569,12 @@
"response": []
},
{
"name": "View Form",
"name": "View Detail",
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "http://localhost:8000/api/v1/change-request/form/FRM-20190912-0000002/",
"raw": "http://localhost:8000/api/v1/change-request/form-details/FRMDETAIL-20190909-0000001/",
"protocol": "http",
"host": [
"localhost"
......@@ -1673,18 +1584,32 @@
"api",
"v1",
"change-request",
"form",
"FRM-20190912-0000002",
"form-details",
"FRMDETAIL-20190909-0000001",
""
]
}
},
"response": []
}
],
"protocolProfileBehavior": {},
"_postman_isSubFolder": true
}
],
"protocolProfileBehavior": {},
"_postman_isSubFolder": true
},
{
"name": "Edit Form",
"name": "CR Templates",
"item": [
{
"name": "CR Template Header",
"item": [
{
"name": "Template Header Post",
"request": {
"method": "PUT",
"method": "POST",
"header": [
{
"key": "Content-Type",
......@@ -1695,59 +1620,16 @@
],
"body": {
"mode": "raw",
"raw": "{\r\n \"requested_to_template_name\": \"Sample Templates\",\r\n \"requested_to_template_id\": \"Samp\",\r\n \"requested_to_objective\": \"hello objective\",\r\n \"requested_to_target_date\": \"2019-09-03T13:59:29.694560\",\r\n \"requested_to_priority\": \"High\",\r\n \"description\": \"sample description\",\r\n \"form_code\": \"FRM-20190909-0000006\",\r\n \"cancel_date\": null,\r\n \"status\": \"Pending\",\r\n \"company_desc\": \"Oneberry\",\r\n \"department_desc\": \"Oneberry Superuser\",\r\n \"requested_desc\": \"Super User\",\r\n \"old_form_code\": \"\",\r\n \"requested_to_company\": \"COMPANY-20190909-0000002\",\r\n \"requested_to_department\": \"DEPARTMENT-20190909-0000002\",\r\n \"requested_to_user\": \"USER-20190909-0000005\",\r\n \"requested_by_user\": \"USER-20190909-0000005\",\r\n \"requested_by_department\": \"admin\",\r\n \"template_no\": \"TMP-20190909-0000001\",\r\n \"action\": \"No\"\r\n}"
"raw": "{\r\n\t\"requested_to_template_name\": \"Security Project\",\r\n\t\"requested_to_template_id\": \"JTC\",\r\n\t\"requested_to_objective\": \"Sample Objective\",\r\n\t\"requested_to_target_date\": \"10\",\r\n\t\"requested_to_priority\": \"Normal\",\r\n\t\"description\": \"Lorem Ipsum\",\r\n\t\"created_by_department\": \"DEPARTMENT-20190923-0000002\",\r\n\t\"created_by_user\": \"USER-20190924-0000043\",\r\n\t\"requested_to_company\": \"COMPANY-20190923-0000001\",\r\n\t\"requested_to_department\": \"DEPARTMENT-20190923-0000001\",\r\n\t\"requested_to_user\": \"USER-20190925-0000045\",\r\n\t\r\n\t\"tmp_approvers\": [{\r\n\t\t\t\"level\": \"1\",\r\n\t\t\t\"delegation\": \"Head of Department\"\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"level\": \"2\",\r\n\t\t\t\"delegation\": \"Approver\",\r\n\t\t\t\"user\": \"USER-20190924-0000042\"\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"level\": \"3\",\r\n\t\t\t\"delegation\": \"SD/OD\",\r\n\t\t\t\"user\": \"USER-20190924-0000041\"\r\n\t\t}\r\n\t],\r\n\t\r\n\t\"tmp_stakes\": [{\r\n\t\t\t\"delegation\": \"Mandatory Stakeholder\",\r\n\t\t\t\"user\": \"USER-20190924-0000042\"\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"delegation\": \"Mandatory Stakeholder\",\r\n\t\t\t\"user\": \"USER-20190924-0000041\"\r\n\t\t}\r\n\t],\r\n\t\r\n\t\"tmp_attachments\": [{\r\n\t\t\t\"attachment_type\": \"Hello\",\r\n\t\t\t\"attachment_name\": \"Attachment 1\",\r\n\t\t\t\"file_name\": \"Sample Attachment 1\",\r\n\t\t\t\"file_upload\": null,\r\n\t\t\t\"description\": \"Sameple Description\",\r\n\t\t\t\"uploaded_by\": \"USER-20190924-0000043\"\r\n\t\t}\r\n\t],\r\n\t\r\n\t\"tmp_details\": [{\r\n\t\t\t\"field_idx\": \"Hello\",\r\n\t\t\t\"field_ref\": \"heyu\",\r\n\t\t\t\"field_val\": \"Sample\",\r\n\t\t\t\"field_props\": \"Sample Desc\"\r\n\t\t}\r\n\t]\r\n}"
},
"url": {
"raw": "http://localhost:8000/api/v1/change-request/form/FRM-20190909-0000006/",
"protocol": "http",
"host": [
"localhost"
],
"port": "8000",
"path": [
"api",
"v1",
"change-request",
"form",
"FRM-20190909-0000006",
""
]
}
},
"response": []
},
{
"name": "Delete Form",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "951574546a6d45af34dfef101840bba27f1ab574",
"type": "string"
}
]
},
"method": "DELETE",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "http://localhost:8000/api/v1/change-request/form/FRM-20190909-0000006/",
"protocol": "http",
"raw": "{{baseurl}}/change-request/template-post/",
"host": [
"localhost"
"{{baseurl}}"
],
"port": "8000",
"path": [
"api",
"v1",
"change-request",
"form",
"FRM-20190909-0000006",
"template-post",
""
]
}
......@@ -1755,28 +1637,18 @@
"response": []
},
{
"name": "Re Route for Approval",
"name": "List of Templates",
"request": {
"method": "PATCH",
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "http://localhost:8000/api/v1/change-request/form/FRM-20190913-0000002/re_route/",
"protocol": "http",
"raw": "{{baseurl}}/change-request/template/",
"host": [
"localhost"
"{{baseurl}}"
],
"port": "8000",
"path": [
"api",
"v1",
"change-request",
"form",
"FRM-20190913-0000002",
"re_route",
"template",
""
]
}
......@@ -1784,63 +1656,19 @@
"response": []
},
{
"name": "Resubmit",
"name": "View Template",
"request": {
"method": "PATCH",
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "http://localhost:8000/api/v1/change-request/form/FRM-20190913-0000001/re_submit/",
"protocol": "http",
"host": [
"localhost"
],
"port": "8000",
"path": [
"api",
"v1",
"change-request",
"form",
"FRM-20190913-0000001",
"re_submit",
""
]
}
},
"response": []
},
{
"name": "CR Action",
"request": {
"method": "PATCH",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\r\n \"id\": 1,\r\n \"user\": \"\",\r\n \"form_code\": \"\",\r\n \"delegation\": \"\",\r\n \"action\": \"Approved\",\r\n \"level\": \"\",\r\n \"remarks\": \"Approver\"\r\n}"
},
"url": {
"raw": "http://localhost:8000/api/v1/change-request/form/actions/",
"protocol": "http",
"raw": "{{baseurl}}/change-request/template/TMP-20190925-0000002/",
"host": [
"localhost"
"{{baseurl}}"
],
"port": "8000",
"path": [
"api",
"v1",
"change-request",
"form",
"actions",
"template",
"TMP-20190925-0000002",
""
]
}
......@@ -1848,7 +1676,7 @@
"response": []
},
{
"name": "Submit",
"name": "Edit Template",
"request": {
"method": "PATCH",
"header": [
......@@ -1861,22 +1689,17 @@
],
"body": {
"mode": "raw",
"raw": "{\r\n \"id\": 1,\r\n \"created\": \"2019-09-10T17:21:10.794834\",\r\n \"remarks\": \"Approver\",\r\n \"action\": \"Approved\",\r\n \"date_sent\": \"2019-09-03T13:59:29.694560\",\r\n \"user\": \"USER-20190909-0000005\",\r\n \"form_code\": \"FRM-20190910-0000001\",\r\n \"tmp_approver\": \"TMPAPR-20190910-0000001\"\r\n}"
"raw": "{\r\n \"requested_to_template_name\": \"Security Project\",\r\n \"requested_to_objective\": \"Sample Objective\",\r\n \"requested_to_target_date\": \"10\",\r\n \"requested_to_priority\": \"Normal\",\r\n \"description\": \"Lorem Ipsum\",\r\n \"requested_to_template_id\": \"JTC\",\r\n \"requested_to_company\": \"COMPANY-20190923-0000001\",\r\n \"requested_to_department\": \"DEPARTMENT-20190923-0000001\",\r\n \"requested_to_user\": \"USER-20190925-0000045\",\r\n \"created_by_user\": \"USER-20190924-0000043\",\r\n \"created_by_department\": \"DEPARTMENT-20190923-0000002\",\r\n \"tmp_approvers\": [\r\n {\r\n \"id\": 4,\r\n \"level\": \"1\",\r\n \"delegation\": \"Head of Department\",\r\n \"user\": null,\r\n \"template_no\": \"TMP-20190925-0000002\"\r\n },\r\n {\r\n \"id\": 5,\r\n \"level\": \"2\",\r\n \"delegation\": \"Approver\",\r\n \"user\": \"USER-20190924-0000042\",\r\n \"template_no\": \"TMP-20190925-0000002\"\r\n },\r\n {\r\n \"id\": 6,\r\n \"level\": \"3\",\r\n \"delegation\": \"SD/OD\",\r\n \"user\": \"USER-20190924-0000041\",\r\n \"template_no\": \"TMP-20190925-0000002\"\r\n }\r\n ],\r\n \"tmp_stakes\": [\r\n {\r\n \"id\": 1,\r\n \"delegation\": \"Mandatory Stakeholder\",\r\n \"user\": \"USER-20190924-0000042\",\r\n \"template_no\": \"TMP-20190925-0000002\"\r\n },\r\n {\r\n \"id\": 2,\r\n \"delegation\": \"Mandatory Stakeholder\",\r\n \"user\": \"USER-20190924-0000041\",\r\n \"template_no\": \"TMP-20190925-0000002\"\r\n }\r\n ],\r\n \"tmp_attachments\": [\r\n {\r\n \"id\": 1,\r\n \"attachment_type\": \"Hellos\",\r\n \"attachment_name\": \"Attachment 1\",\r\n \"file_name\": \"Sample Attachment 1\",\r\n \"description\": \"Sameple Description\",\r\n \"file_upload\": null,\r\n \"uploaded_by\": \"USER-20190924-0000043\",\r\n \"template_no\": \"TMP-20190925-0000002\"\r\n }\r\n ],\r\n \"tmp_details\": [\r\n {\r\n \"id\": 1,\r\n \"field_idx\": \"Hellos\",\r\n \"field_ref\": \"heyu\",\r\n \"field_val\": \"Sample\",\r\n \"field_props\": \"Sample Desc\",\r\n \"template_no\": \"TMP-20190925-0000002\"\r\n }\r\n ]\r\n}"
},
"url": {
"raw": "http://localhost:8000/api/v1/change-request/form/FRM-20190912-0000002/actions/",
"protocol": "http",
"raw": "{{baseurl}}/change-request/template/TMP-20190925-0000002/",
"host": [
"localhost"
"{{baseurl}}"
],
"port": "8000",
"path": [
"api",
"v1",
"change-request",
"form",
"FRM-20190912-0000002",
"actions",
"template",
"TMP-20190925-0000002",
""
]
}
......@@ -1884,35 +1707,19 @@
"response": []
},
{
"name": "Save",
"name": "Delete Template",
"request": {
"method": "PATCH",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\r\n \"id\": 1,\r\n \"created\": \"2019-09-10T17:21:10.794834\",\r\n \"remarks\": \"Approver\",\r\n \"action\": \"Approved\",\r\n \"date_sent\": \"2019-09-03T13:59:29.694560\",\r\n \"user\": \"USER-20190909-0000005\",\r\n \"form_code\": \"FRM-20190910-0000001\",\r\n \"tmp_approver\": \"TMPAPR-20190910-0000001\"\r\n}"
},
"method": "DELETE",
"header": [],
"url": {
"raw": "http://localhost:8000/api/v1/change-request/form/FRM-20190912-0000002/actions/",
"protocol": "http",
"raw": "{{baseurl}}/change-request/template/TMP-20190925-0000002/",
"host": [
"localhost"
"{{baseurl}}"
],
"port": "8000",
"path": [
"api",
"v1",
"change-request",
"form",
"FRM-20190912-0000002",
"actions",
"template",
"TMP-20190925-0000002",
""
]
}
......@@ -1920,22 +1727,19 @@
"response": []
}
],
"protocolProfileBehavior": {},
"_postman_isSubFolder": true
},
{
"name": "CR Form Approver",
"name": "CR Template Approver",
"item": [
{
"name": "List of Approvers",
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "http://localhost:8000/api/v1/change-request/form-approvers/",
"raw": "http://localhost:8000/api/v1/change-request/template-approvers/",
"protocol": "http",
"host": [
"localhost"
......@@ -1945,7 +1749,7 @@
"api",
"v1",
"change-request",
"form-approvers",
"template-approvers",
""
]
}
......@@ -1957,12 +1761,8 @@
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "http://localhost:8000/api/v1/change-request/form-approvers/TMPAPR-20190909-0000001/",
"raw": "http://localhost:8000/api/v1/change-request/template-approvers/TMPAPR-20190924-0000015/",
"protocol": "http",
"host": [
"localhost"
......@@ -1972,8 +1772,8 @@
"api",
"v1",
"change-request",
"form-approvers",
"TMPAPR-20190909-0000001",
"template-approvers",
"TMPAPR-20190924-0000015",
""
]
}
......@@ -1981,22 +1781,19 @@
"response": []
}
],
"protocolProfileBehavior": {},
"_postman_isSubFolder": true
},
{
"name": "CR Form Stakeholder",
"name": "CR Template Stakeholder",
"item": [
{
"name": "List of Stakeholders",
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "http://localhost:8000/api/v1/change-request/form-stakeholders/",
"raw": "http://localhost:8000/api/v1/change-request/template-stakeholders/",
"protocol": "http",
"host": [
"localhost"
......@@ -2006,7 +1803,7 @@
"api",
"v1",
"change-request",
"form-stakeholders",
"template-stakeholders",
""
]
}
......@@ -2018,12 +1815,8 @@
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "http://localhost:8000/api/v1/change-request/form-stakeholders/TMPSTK-20190909-0000001/",
"raw": "http://localhost:8000/api/v1/change-request/template-stakeholders/TMPSTK-20190909-0000001/",
"protocol": "http",
"host": [
"localhost"
......@@ -2033,7 +1826,7 @@
"api",
"v1",
"change-request",
"form-stakeholders",
"template-stakeholders",
"TMPSTK-20190909-0000001",
""
]
......@@ -2042,22 +1835,19 @@
"response": []
}
],
"protocolProfileBehavior": {},
"_postman_isSubFolder": true
},
{
"name": "CR Form Attachment",
"name": "CR Template Attachment",
"item": [
{
"name": "List of Attachments",
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "http://localhost:8000/api/v1/change-request/form-attachments/",
"raw": "http://localhost:8000/api/v1/change-request/template-attachments/",
"protocol": "http",
"host": [
"localhost"
......@@ -2067,7 +1857,7 @@
"api",
"v1",
"change-request",
"form-attachments",
"template-attachments",
""
]
}
......@@ -2076,25 +1866,11 @@
},
{
"name": "View Attachment",
"protocolProfileBehavior": {
"disableBodyPruning": true
},
"request": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\r\n \"attachment_type\": \"Mandatory Attached\",\r\n \"attachment_name\": \"Mandatory Stakeholder\",\r\n \"file_name\": \"USER-20190909-0000005\",\r\n \"description\": \"Sample Desc 1\",\r\n \"file_upload\": null,\r\n \"code\": \"FRMATCH-20190909-0000001\",\r\n \"uploaded_by\": \"USER-20190909-0000005\",\r\n \"form_code\": \"FRM-20190909-0000005\",\r\n \"tmp_attach\": \"TMPATCH-20190909-0000001\"\r\n}"
},
"header": [],
"url": {
"raw": "http://localhost:8000/api/v1/change-request/form-attachments/FRMATCH-20190909-0000001/",
"raw": "http://localhost:8000/api/v1/change-request/template-attachments/TMPATCH-20190909-0000001/",
"protocol": "http",
"host": [
"localhost"
......@@ -2104,8 +1880,8 @@
"api",
"v1",
"change-request",
"form-attachments",
"FRMATCH-20190909-0000001",
"template-attachments",
"TMPATCH-20190909-0000001",
""
]
}
......@@ -2113,22 +1889,19 @@
"response": []
}
],
"protocolProfileBehavior": {},
"_postman_isSubFolder": true
},
{
"name": "CR Form Detail",
"name": "CR Template Detail",
"item": [
{
"name": "List of Details",
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "http://localhost:8000/api/v1/change-request/form-details/",
"raw": "http://localhost:8000/api/v1/change-request/template-details/",
"protocol": "http",
"host": [
"localhost"
......@@ -2138,7 +1911,7 @@
"api",
"v1",
"change-request",
"form-details",
"template-details",
""
]
}
......@@ -2150,12 +1923,8 @@
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "http://localhost:8000/api/v1/change-request/form-details/FRMDETAIL-20190909-0000001/",
"raw": "http://localhost:8000/api/v1/change-request/template-details/TMPDETAIL-20190909-0000001/",
"protocol": "http",
"host": [
"localhost"
......@@ -2165,8 +1934,8 @@
"api",
"v1",
"change-request",
"form-details",
"FRMDETAIL-20190909-0000001",
"template-details",
"TMPDETAIL-20190909-0000001",
""
]
}
......@@ -2174,9 +1943,11 @@
"response": []
}
],
"protocolProfileBehavior": {},
"_postman_isSubFolder": true
}
],
"protocolProfileBehavior": {},
"_postman_isSubFolder": true
},
{
......@@ -2187,10 +1958,6 @@
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "{{baseurl}}/change-request/allowed-companies/",
"host": [
......@@ -2236,6 +2003,7 @@
"response": []
}
],
"protocolProfileBehavior": {},
"_postman_isSubFolder": true
},
{
......@@ -2246,10 +2014,6 @@
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "{{baseurl}}/change-request/companies/",
"host": [
......@@ -2269,10 +2033,6 @@
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "{{baseurl}}/change-request/departments/?company_code=COMPANY-20190917-0000001",
"host": [
......@@ -2298,10 +2058,6 @@
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "{{baseurl}}/change-request/user-list/?department_code=DEPARTMENT-20190917-0000001&company_code=COMPANY-20190917-0000001",
"host": [
......@@ -2327,9 +2083,11 @@
"response": []
}
],
"protocolProfileBehavior": {},
"_postman_isSubFolder": true
}
]
],
"protocolProfileBehavior": {}
},
{
"name": "Notifications",
......@@ -2524,7 +2282,8 @@
},
"response": []
}
]
],
"protocolProfileBehavior": {}
}
],
"auth": {
......@@ -2532,7 +2291,7 @@
"bearer": [
{
"key": "token",
"value": "777c6ebeb20e99c4f329708490528b68ee56002f",
"value": "ba9a275c67036d872f5cfd6862488fc115569fd3",
"type": "string"
}
]
......@@ -2558,5 +2317,6 @@
]
}
}
]
],
"protocolProfileBehavior": {}
}
\ 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