Commit 74c6863e authored by Gladys Forte's avatar Gladys Forte

Merge branch 'RMSv2' of http://42.61.118.105:7990/scm/rms/api-main-service into gladys-dev2

parents c9b4e426 ccf35a71
......@@ -4,6 +4,7 @@ import ast
from django.contrib.auth.hashers import make_password, check_password
import re
from django.contrib.auth import authenticate
from django.forms.models import model_to_dict
class UserSerializer(serializers.ModelSerializer):
......@@ -19,8 +20,8 @@ class UserSerializer(serializers.ModelSerializer):
# ).values().first()
ret = super().to_representation(instance)
ret['department_name'] = instance.department.name
ret['company_name'] = instance.department.company.name
ret['department'] = model_to_dict(instance.department)
ret['company'] = model_to_dict(instance.department.company)
return ret
class Meta:
......@@ -29,7 +30,6 @@ class UserSerializer(serializers.ModelSerializer):
'id',
'code', 'name',
'username', 'contact_no',
'department',
'email', 'default_app',
'user_type', 'is_active',
'doa'
......
......@@ -40,4 +40,4 @@ VENDOR_ACCEPTANCE_MESSAGE = config['NOTIFICATION_EMAIL']['VENDOR_ACCEPTANCE_MESS
VENDOR_REJECT_MESSAGE = config['NOTIFICATION_EMAIL']['VENDOR_REJECT_MESSAGE']
#ADMIN PROFILE
CATCH_EMAIL = config['ADMIN']['CATCH_EMAIL']
CATCH_EMAIL = config['DEV']['CATCH_EMAIL']
......@@ -29,5 +29,15 @@ AUTH_ACCESSS_TOKEN_TIMEOUT = config['PRODUCTION']['AUTH_ACCESSS_TOKEN_TIMEOUT']
USER_DEFAULT_PASSWORD = config['PRODUCTION']['USER_DEFAULT_PASSWORD']
REALTIMESERVER_IP = config['NOTIFICATION']['REALTIMESERVER_IP']
# Notification Messages
APPROVER_MESSAGE = config['NOTIFICATION_EMAIL']['APPROVER_MESSAGE']
REQUESTOR_MESSAGE = config['NOTIFICATION_EMAIL']['REQUESTOR_MESSAGE']
REQUESTOR_REJECT_MESSAGE = config['NOTIFICATION_EMAIL']['REQUESTOR_REJECT_MESSAGE']
VENDOR_ACKNOWLEDGE_MESSAGE = config['NOTIFICATION_EMAIL']['VENDOR_ACKNOWLEDGE_MESSAGE']
REQUESTOR_ACKNOWLEDGE_MESSAGE = config['NOTIFICATION_EMAIL']['REQUESTOR_ACKNOWLEDGE_MESSAGE']
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']
#ADMIN PROFILE
CATCH_EMAIL = config['PRODUCTION']['CATCH_EMAIL']
\ No newline at end of file
CATCH_EMAIL = config['PRODUCTION']['CATCH_EMAIL']
......@@ -27,4 +27,18 @@ SESSION_TIMEOUT = config['UAT']['SESSION_TIMEOUT']
FRONT_END_URL = config['UAT']['FRONT_END_URL']
AUTH_ACCESSS_TOKEN_TIMEOUT = config['UAT']['AUTH_ACCESSS_TOKEN_TIMEOUT']
USER_DEFAULT_PASSWORD = config['UAT']['USER_DEFAULT_PASSWORD']
REALTIMESERVER_IP = config['NOTIFICATION']['REALTIMESERVER_IP']
\ No newline at end of file
REALTIMESERVER_IP = config['NOTIFICATION']['REALTIMESERVER_IP']
# Notification Messages
APPROVER_MESSAGE = config['NOTIFICATION_EMAIL']['APPROVER_MESSAGE']
REQUESTOR_MESSAGE = config['NOTIFICATION_EMAIL']['REQUESTOR_MESSAGE']
REQUESTOR_REJECT_MESSAGE = config['NOTIFICATION_EMAIL']['REQUESTOR_REJECT_MESSAGE']
VENDOR_ACKNOWLEDGE_MESSAGE = config['NOTIFICATION_EMAIL']['VENDOR_ACKNOWLEDGE_MESSAGE']
REQUESTOR_ACKNOWLEDGE_MESSAGE = config['NOTIFICATION_EMAIL']['REQUESTOR_ACKNOWLEDGE_MESSAGE']
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']
#ADMIN PROFILE
CATCH_EMAIL = config['UAT']['CATCH_EMAIL']
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