awsss 2 years ago
parent
commit
18632b2bfd
  1. 67
      smart_service/add_ons/doctype/app_preference/app_preference.json
  2. 70
      smart_service/apis/addon_api.py
  3. 46
      smart_service/apis/app_user_login.py
  4. 18
      smart_service/apis/master_api.py
  5. 15
      smart_service/apis/publish_api.py
  6. 51
      smart_service/apis/transaction_api.py
  7. 32
      smart_service/apis/update_validation.py
  8. 340
      smart_service/fixtures/custom_docperm.json
  9. 68
      smart_service/fixtures/property_setter.json
  10. 4
      smart_service/masters/doctype/procedure_name/procedure_name.json
  11. 5
      smart_service/masters/doctype/procedure_step_name/procedure_step_name.json
  12. 0
      smart_service/transactions/doctype/procedure_name/__init__.py
  13. BIN
      smart_service/transactions/doctype/procedure_name/__pycache__/__init__.cpython-38.pyc
  14. BIN
      smart_service/transactions/doctype/procedure_name/__pycache__/procedure_name.cpython-38.pyc
  15. BIN
      smart_service/transactions/doctype/procedure_name/__pycache__/procedure_procedure_name.cpython-38.pyc
  16. BIN
      smart_service/transactions/doctype/procedure_name/__pycache__/procedure_procedure_names.cpython-38.pyc
  17. BIN
      smart_service/transactions/doctype/procedure_name/__pycache__/test_procedure_name.cpython-38.pyc
  18. 33
      smart_service/transactions/doctype/procedure_name/procedure_name.js
  19. 51
      smart_service/transactions/doctype/procedure_name/procedure_name.json
  20. 8
      smart_service/transactions/doctype/procedure_name/procedure_name.py
  21. 8
      smart_service/transactions/doctype/procedure_name/test_procedure_name.py
  22. 0
      smart_service/transactions/doctype/procedure_step_name/__init__.py
  23. BIN
      smart_service/transactions/doctype/procedure_step_name/__pycache__/__init__.cpython-38.pyc
  24. BIN
      smart_service/transactions/doctype/procedure_step_name/__pycache__/procedure_step_name.cpython-38.pyc
  25. BIN
      smart_service/transactions/doctype/procedure_step_name/__pycache__/procedure_step_names.cpython-38.pyc
  26. BIN
      smart_service/transactions/doctype/procedure_step_name/__pycache__/test_procedure_step_name.cpython-38.pyc
  27. 33
      smart_service/transactions/doctype/procedure_step_name/procedure_step_name.js
  28. 51
      smart_service/transactions/doctype/procedure_step_name/procedure_step_name.json
  29. 8
      smart_service/transactions/doctype/procedure_step_name/procedure_step_name.py
  30. 8
      smart_service/transactions/doctype/procedure_step_name/test_procedure_step_name.py

67
smart_service/add_ons/doctype/app_preference/app_preference.json

@ -1,7 +1,7 @@
{
"actions": [],
"autoname": "App Pref-.####",
"creation": "2022-01-07 14:00:34.119125",
"creation": "2022-07-06 13:59:24.139229",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
@ -22,6 +22,11 @@
"user_mail"
],
"fields": [
{
"fieldname": "application_server_url",
"fieldtype": "Data",
"label": "Application Server URL"
},
{
"fieldname": "update_server_url",
"fieldtype": "Data",
@ -32,33 +37,6 @@
"fieldtype": "Data",
"label": "Asset URL"
},
{
"fieldname": "column_break_4",
"fieldtype": "Column Break"
},
{
"default": "0",
"fieldname": "mahindra_login_api",
"fieldtype": "Check",
"label": "Mahindra Login API"
},
{
"default": "0",
"fieldname": "technician_login_api",
"fieldtype": "Check",
"label": "Technician Login API"
},
{
"fieldname": "remarks",
"fieldtype": "Small Text",
"label": "Remarks"
},
{
"fieldname": "active",
"fieldtype": "Select",
"label": "Active",
"options": "Active\nInactive"
},
{
"fieldname": "login_base_url",
"fieldtype": "Data",
@ -85,9 +63,31 @@
"label": "Auto Logout Time"
},
{
"fieldname": "application_server_url",
"fieldtype": "Data",
"label": "Application Server URL"
"fieldname": "column_break_4",
"fieldtype": "Column Break"
},
{
"default": "0",
"fieldname": "mahindra_login_api",
"fieldtype": "Check",
"label": "Mahindra Login API"
},
{
"default": "0",
"fieldname": "technician_login_api",
"fieldtype": "Check",
"label": "Technician Login API"
},
{
"fieldname": "remarks",
"fieldtype": "Small Text",
"label": "Remarks"
},
{
"fieldname": "active",
"fieldtype": "Select",
"label": "Active",
"options": "Active\nInactive"
},
{
"fieldname": "user_mail",
@ -96,8 +96,9 @@
}
],
"index_web_pages_for_search": 1,
"issingle": 1,
"links": [],
"modified": "2022-02-07 20:52:21.403876",
"modified": "2022-07-06 13:59:24.139229",
"modified_by": "Administrator",
"module": "Add Ons",
"name": "App Preference",
@ -107,10 +108,8 @@
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1

70
smart_service/apis/addon_api.py

@ -4,14 +4,18 @@ import json
import base64
import os
from frappe.utils import cstr
from smart_service.apis.app_user_login import input_validation
current_db_name = frappe.conf.get("db_name")
@frappe.whitelist()
def addon(args=None):
if args == None:
return {"status": 0, "error": "Parameter missing: args"}
# if args == None:
# return {"status": 0, "error": "Parameter missing: args"}
val=input_validation(args=args)
if val!='':
return {"status": 0, "error": "Input parameter Missing: " + val}
if args:
try:
if args == "circular":
@ -71,12 +75,15 @@ def addon(args=None):
@frappe.whitelist()
def bookmark(args=None, request=None):
if args == None and request == None:
return {"status": 0, "error": "Parameter's missing: args & request"}
if args == None:
return {"status": 0, "error": "Parameter missing: args"}
if request == None:
return {"status": 0, "error": "Parameter missing: request"}
val=input_validation(args=args,request=request)
if val!='':
return {"status": 0, "error": "Input parameter Missing: " + val}
# if args == None and request == None:
# return {"status": 0, "error": "Parameter's missing: args & request"}
# if args == None:
# return {"status": 0, "error": "Parameter missing: args"}
# if request == None:
# return {"status": 0, "error": "Parameter missing: request"}
if args and request:
try:
@ -127,12 +134,15 @@ def bookmark(args=None, request=None):
@frappe.whitelist()
def feedback(args=None, request=None):
if args == None and request == None:
return {"status": 0, "error": "Parameter's missing: args & request"}
if args == None:
return {"status": 0, "error": "Parameter missing: args"}
if request == None:
return {"status": 0, "error": "Parameter missing: request"}
val=input_validation(args=args,request=request)
if val!='':
return {"status": 0, "error": "Input parameter Missing: " + val}
# if args == None and request == None:
# return {"status": 0, "error": "Parameter's missing: args & request"}
# if args == None:
# return {"status": 0, "error": "Parameter missing: args"}
# if request == None:
# return {"status": 0, "error": "Parameter missing: request"}
api = None
if args and request:
if args == 'get_user_feedback':
@ -206,12 +216,15 @@ def feedback(args=None, request=None):
@frappe.whitelist()
def model_hit(args=None, request=None):
if args == None and request == None:
return {"status": 0, "error": "Parameter's missing: args & request"}
if args == None:
return {"status": 0, "error": "Parameter missing: args"}
if request == None:
return {"status": 0, "error": "Parameter missing: request"}
val=input_validation(args=args,request=request)
if val!='':
return {"status": 0, "error": "Input parameter Missing: " + val}
# if args == None and request == None:
# return {"status": 0, "error": "Parameter's missing: args & request"}
# if args == None:
# return {"status": 0, "error": "Parameter missing: args"}
# if request == None:
# return {"status": 0, "error": "Parameter missing: request"}
if args and request:
if args == "model_hit":
try:
@ -246,12 +259,15 @@ def model_hit(args=None, request=None):
@frappe.whitelist()
def model_usage(args=None, request=None):
if args == None and request == None:
return {"status": 0, "error": "Parameter's missing: args & request"}
if args == None:
return {"status": 0, "error": "Parameter missing: args"}
if request == None:
return {"status": 0, "error": "Parameter missing: request"}
val=input_validation(args=args,request=request)
if val!='':
return {"status": 0, "error": "Input parameter Missing: " + val}
# if args == None and request == None:
# return {"status": 0, "error": "Parameter's missing: args & request"}
# if args == None:
# return {"status": 0, "error": "Parameter missing: args"}
# if request == None:
# return {"status": 0, "error": "Parameter missing: request"}
if args and request:
if args == "model_usage":
try:

46
smart_service/apis/app_user_login.py

@ -24,13 +24,18 @@ def app_user_validation_test():
@frappe.whitelist(allow_guest=True)
def app_user_validation(usr=None, pwd=None):
if usr == None and pwd == None:
return {'status': 0, 'error': "Parameter's missing: Usr & pwd"}
if usr == None:
return {'status': 0, 'error': "Parameter missing: Usr"}
if pwd == None:
return {'status': 0, 'error': "Parameter missing: Pwd"}
val=input_validation(usr=usr,pwd=pwd)
if val!='':
return {'status': 0, 'error': "Parameter's missing: " + val}
# if usr == None and pwd == None:
# return {'status': 0, 'error': "Parameter's missing: Usr & pwd"}
# if usr == None:
# return {'status': 0, 'error': "Parameter missing: Usr"}
# if pwd == None:
# return {'status': 0, 'error': "Parameter missing: Pwd"}
preference = frappe.get_last_doc('App Preference')
mahindra_login = preference.mahindra_login_api
technician_login = preference.technician_login_api
@ -178,12 +183,15 @@ def xml_to_dict(node):
@frappe.whitelist()
def grant_user_access(userdata=None, iid=None):
if userdata == None and iid == None:
return {'status': 0, 'error': "Parameter's missing: userdata & iid"}
if userdata == None:
return {'status': 0, 'error': "Parameter missing: userdata"}
if iid == None:
return {'status': 0, 'error': "Parameter missing: iid"}
val = input_validation(userdata=userdata,iid=iid)
if val != '':
return {'status': 0, 'error': "Parameter's missing: " + val}
# if userdata == None and iid == None:
# return {'status': 0, 'error': "Parameter's missing: userdata & iid"}
# if userdata == None:
# return {'status': 0, 'error': "Parameter missing: userdata"}
# if iid == None:
# return {'status': 0, 'error': "Parameter missing: iid"}
try:
user_details = {}
@ -398,3 +406,15 @@ def login_generate_token(doc=None, method=None):
water.apple = new_tok
water.save()
return water.apple
def input_validation(**kwargs):
sts = ""
i = 0
for key, value in kwargs.items():
if value is None or value == "":
if i != 0:
sts += ','
sts += str(key) + ""
i += 1
return sts

18
smart_service/apis/master_api.py

@ -6,18 +6,22 @@ from frappe.model.document import Document
import json
from frappe.utils import cstr
import datetime
from smart_service.apis.app_user_login import input_validation
current_db_name = frappe.conf.get("db_name")
@frappe.whitelist()
def masters(args=None, LSD=None):
if args == None and LSD == None:
return {"status": 0, "error": "Parameter's missing: args & LSD"}
if args == None:
return {"status": 0, "error": "Parameter missing: args"}
if LSD == None:
return {"status": 0, "error": "Parameter missing: LSD"}
val=input_validation(args=args,LSD=LSD)
if val!='':
return {"status": 0, "error": "Parameter's missing:"+val}
# if args == None and LSD == None:
# return {"status": 0, "error": "Parameter's missing: args & LSD"}
# if args == None:
# return {"status": 0, "error": "Parameter missing: args"}
# if LSD == None:
# return {"status": 0, "error": "Parameter missing: LSD"}
date_format = "%Y-%m-%d %H:%M:%S.%f"

15
smart_service/apis/publish_api.py

@ -6,7 +6,7 @@ import json
import frappe.utils
import os
from frappe.utils import cstr
from smart_service.apis.app_user_login import input_validation
current_db_name = frappe.conf.get("db_name")
site_name = cstr(frappe.local.site)
@ -35,6 +35,10 @@ def get_parent_map(input_list, parameter):
@frappe.whitelist(allow_guest=True)
def api_procedure(args, publish_type, vehicle, language, version):
val=input_validation(args=args,publish_type=publish_type, vehicle=vehicle, language=language, version=version)
if val!='':
return {'status': 0, 'error': "Parameter missing :"+val}
try:
dir1 = base_url + "/files/json_files/"
if not os.path.exists(dir1):
@ -217,6 +221,9 @@ def print(sts):
""" New Publish """
@frappe.whitelist(allow_guest=True)
def new_publish(args, publish_type, vehicle, language, version):
val=input_validation(args=args,publish_type=publish_type, vehicle=vehicle, language=language, version=version)
if val!='':
return {'status': 0, 'error': "Parameter missing :"+val}
# Create Directory for internal,global and full_update publish
list1 = []
try:
@ -287,6 +294,9 @@ def new_publish(args, publish_type, vehicle, language, version):
@frappe.whitelist(allow_guest=True)
def new_update(vehicle_list=None):
val=input_validation(vehicle_list=vehicle_list)
if val!='':
return {'status': 0, 'error': "Parameter missing :"+val}
req_list = json.loads(vehicle_list)
vehicle = req_list['Vehicle']
iid = req_list['InstallationId']
@ -327,6 +337,9 @@ def new_update(vehicle_list=None):
@frappe.whitelist(allow_guest=True)
def merge_json_files(old_json_path,new_json_path,out_file_path):
val=input_validation(old_json_path=old_json_path,new_json_path=new_json_path, out_file_path=out_file_path)
if val!='':
return {'status': 0, 'error': "Parameter missing :"+val}
try:
with open(old_json_path) as json_file:
data_old = json.load(json_file)

51
smart_service/apis/transaction_api.py

@ -3,7 +3,7 @@ from frappe.model.document import Document
import json
import os
from frappe.utils import cstr
from smart_service.apis.app_user_login import input_validation
current_db_name = frappe.conf.get("db_name")
site_name = cstr(frappe.local.site)
@ -12,28 +12,29 @@ base_url = os.path.expanduser("~") + "/frappe-bench/sites/" + site_name + "/publ
@frappe.whitelist()
def get_technical_manual(args=None):
if args == None:
return {'status': 0, 'error': "Parameter missing : args"}
if args:
try:
manual_out = frappe.db.sql('''SELECT parent as variant, language, attach_file as file, active_status,idx as variant_asset_idx FROM {0}.`tabVariant Mapping_Assets` where parent='{1}' and category='Technical Manual'
and parentfield = 'assets';'''.format(current_db_name, args), as_dict=True)
if manual_out:
for i in manual_out:
try:
file_size = os.path.getsize(base_url + i['file'])
i['file_size'] = file_size
except:
i['file_size'] = 0
if i["active_status"] == "Active":
i["active_status"] = True
else:
i["active_status"] = False
return manual_out
else:
return {"status": 1, "error": "Data Not available"}
# if args == None:
# return {'status': 0, 'error': "Parameter missing : args"}
val=input_validation(args=args)
if val!='':
return {'status': 0, 'error': "Parameter missing :"+val}
try:
manual_out = frappe.db.sql('''SELECT parent as variant, language, attach_file as file, active_status,idx as variant_asset_idx FROM {0}.`tabVariant Mapping_Assets` where parent='{1}' and category='Technical Manual'
and parentfield = 'assets';'''.format(current_db_name, args), as_dict=True)
if manual_out:
for i in manual_out:
try:
file_size = os.path.getsize(base_url + i['file'])
i['file_size'] = file_size
except:
i['file_size'] = 0
if i["active_status"] == "Active":
i["active_status"] = True
else:
i["active_status"] = False
return manual_out
else:
return {"status": 1, "error": "Data Not available"}
except Exception as e:
return {"status": 0, "error": e}
except Exception as e:
return {"status": 0, "error": e}
else:
return {"status": 0, "error": "Check argument: args"}

32
smart_service/apis/update_validation.py

@ -4,7 +4,7 @@ import json
import os
from frappe.utils import cstr
import time
from smart_service.apis.app_user_login import input_validation
current_db_name = frappe.conf.get("db_name")
site_name = cstr(frappe.local.site)
base_url = os.path.expanduser("~") + "/frappe-bench/sites/" + site_name + "/public"
@ -29,8 +29,12 @@ def get_parent_map(input_list, parameter):
@frappe.whitelist()
def check_all_vehicle_updates(vehicle_list=None):
if vehicle_list == None:
return {"status": 0, "error": "Parameter missing: Vehicle List"}
# if vehicle_list == None:
# return {"status": 0, "error": "Parameter missing: Vehicle List"}
val=input_validation(vehicle_list=vehicle_list)
if val!='':
return {"status": 0, "error": "Parameter missing:"+val}
if vehicle_list:
try:
Vehicle_req_list = []
@ -100,8 +104,12 @@ def check_all_vehicle_updates(vehicle_list=None):
@frappe.whitelist()
def check_vehicle_update(vehicle_list=None):
if vehicle_list == None:
return {"status": 0, "error": "Parameter missing: Vehicle List"}
# if vehicle_list == None:
# return {"status": 0, "error": "Parameter missing: Vehicle List"}
val=input_validation(vehicle_list=vehicle_list)
if val!='':
return {"status": 0, "error": "Parameter missing:"+val}
if vehicle_list:
try:
response = {}
@ -377,8 +385,11 @@ def calculate_step(data):
@frappe.whitelist()
def check_vehicle_update11(vehicle_list=None):
if vehicle_list == None:
return {"status": 0, "error": "Parameter missing: Vehicle List"}
val=input_validation(vehicle_list=vehicle_list)
if val!='':
return {"status": 0, "error": "Parameter missing:"+val}
# if vehicle_list == None:
# return {"status": 0, "error": "Parameter missing: Vehicle List"}
Vehicle_req_list = []
if vehicle_list:
@ -713,8 +724,11 @@ def get_publish_ver(vehicle,l_id):
@frappe.whitelist()
def update_completed(FileName=None):
if FileName == None:
return {'status': 0, 'error': "Parameter missing: FileName"}
val=input_validation(vehicle_list=vehicle_list)
if val!='':
return {"status": 0, "error": "Parameter missing:"+val}
# if FileName == None:
# return {'status': 0, 'error': "Parameter missing: FileName"}
if FileName:
try:

340
smart_service/fixtures/custom_docperm.json

@ -161,60 +161,6 @@
"submit": 0,
"write": 1
},
{
"amend": 0,
"cancel": 0,
"create": 1,
"delete": 0,
"docstatus": 0,
"doctype": "Custom DocPerm",
"email": 1,
"export": 1,
"if_owner": 0,
"import": 1,
"modified": "2022-01-18 10:36:46.676149",
"name": "d2afb66263",
"parent": "Procedure Name",
"parentfield": "permissions",
"parenttype": "DocType",
"permlevel": 0,
"print": 0,
"read": 1,
"report": 1,
"role": "_Author",
"select": 1,
"set_user_permissions": 0,
"share": 1,
"submit": 0,
"write": 1
},
{
"amend": 0,
"cancel": 0,
"create": 1,
"delete": 0,
"docstatus": 0,
"doctype": "Custom DocPerm",
"email": 0,
"export": 1,
"if_owner": 0,
"import": 1,
"modified": "2022-01-18 10:37:18.491573",
"name": "68670513b5",
"parent": "Procedure Step Name",
"parentfield": "permissions",
"parenttype": "DocType",
"permlevel": 0,
"print": 0,
"read": 1,
"report": 1,
"role": "_Author",
"select": 1,
"set_user_permissions": 0,
"share": 1,
"submit": 0,
"write": 1
},
{
"amend": 0,
"cancel": 0,
@ -1835,33 +1781,6 @@
"submit": 0,
"write": 0
},
{
"amend": 0,
"cancel": 0,
"create": 1,
"delete": 0,
"docstatus": 0,
"doctype": "Custom DocPerm",
"email": 0,
"export": 1,
"if_owner": 0,
"import": 0,
"modified": "2022-01-28 12:43:39.219800",
"name": "a136fe85a1",
"parent": "App Preference",
"parentfield": "permissions",
"parenttype": "DocType",
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "_Publisher",
"select": 1,
"set_user_permissions": 0,
"share": 0,
"submit": 0,
"write": 1
},
{
"amend": 0,
"cancel": 0,
@ -2429,33 +2348,6 @@
"submit": 0,
"write": 1
},
{
"amend": 0,
"cancel": 0,
"create": 0,
"delete": 0,
"docstatus": 0,
"doctype": "Custom DocPerm",
"email": 0,
"export": 1,
"if_owner": 0,
"import": 0,
"modified": "2022-01-28 18:32:42.392406",
"name": "9562ebcea5",
"parent": "App Preference",
"parentfield": "permissions",
"parenttype": "DocType",
"permlevel": 0,
"print": 0,
"read": 1,
"report": 0,
"role": "_AppUser",
"select": 1,
"set_user_permissions": 0,
"share": 0,
"submit": 0,
"write": 0
},
{
"amend": 0,
"cancel": 0,
@ -2780,60 +2672,6 @@
"submit": 0,
"write": 0
},
{
"amend": 0,
"cancel": 0,
"create": 0,
"delete": 0,
"docstatus": 0,
"doctype": "Custom DocPerm",
"email": 0,
"export": 1,
"if_owner": 0,
"import": 0,
"modified": "2022-01-28 18:32:42.392406",
"name": "bcc1cb922a",
"parent": "Procedure Name",
"parentfield": "permissions",
"parenttype": "DocType",
"permlevel": 0,
"print": 0,
"read": 1,
"report": 0,
"role": "_AppUser",
"select": 1,
"set_user_permissions": 0,
"share": 0,
"submit": 0,
"write": 0
},
{
"amend": 0,
"cancel": 0,
"create": 0,
"delete": 0,
"docstatus": 0,
"doctype": "Custom DocPerm",
"email": 0,
"export": 1,
"if_owner": 0,
"import": 0,
"modified": "2022-01-28 18:32:42.392406",
"name": "8f95988c5e",
"parent": "Procedure Step Name",
"parentfield": "permissions",
"parenttype": "DocType",
"permlevel": 0,
"print": 0,
"read": 1,
"report": 0,
"role": "_AppUser",
"select": 1,
"set_user_permissions": 0,
"share": 0,
"submit": 0,
"write": 0
},
{
"amend": 0,
"cancel": 0,
@ -4265,6 +4103,87 @@
"submit": 0,
"write": 1
},
{
"amend": 0,
"cancel": 0,
"create": 1,
"delete": 0,
"docstatus": 0,
"doctype": "Custom DocPerm",
"email": 1,
"export": 1,
"if_owner": 0,
"import": 1,
"modified": "2022-01-18 10:36:46.676149",
"name": "d2afb66263",
"parent": "Procedure Name",
"parentfield": "permissions",
"parenttype": "DocType",
"permlevel": 0,
"print": 0,
"read": 1,
"report": 1,
"role": "_Author",
"select": 1,
"set_user_permissions": 0,
"share": 1,
"submit": 0,
"write": 1
},
{
"amend": 0,
"cancel": 0,
"create": 0,
"delete": 0,
"docstatus": 0,
"doctype": "Custom DocPerm",
"email": 0,
"export": 1,
"if_owner": 0,
"import": 0,
"modified": "2022-01-28 18:32:42.392406",
"name": "bcc1cb922a",
"parent": "Procedure Name",
"parentfield": "permissions",
"parenttype": "DocType",
"permlevel": 0,
"print": 0,
"read": 1,
"report": 0,
"role": "_AppUser",
"select": 1,
"set_user_permissions": 0,
"share": 0,
"submit": 0,
"write": 0
},
{
"amend": 0,
"cancel": 0,
"create": 1,
"delete": 1,
"docstatus": 0,
"doctype": "Custom DocPerm",
"email": 1,
"export": 1,
"if_owner": 0,
"import": 0,
"modified": "2022-01-18 10:36:28.747690",
"name": "713e1f31b7",
"parent": "Procedure Name",
"parentfield": "permissions",
"parenttype": "DocType",
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"select": 0,
"set_user_permissions": 0,
"share": 1,
"submit": 0,
"write": 1
},
{
"amend": 0,
"cancel": 0,
@ -4302,10 +4221,10 @@
"email": 1,
"export": 0,
"if_owner": 0,
"import": 1,
"modified": "2022-05-16 14:37:30.785448",
"name": "decdead5f2",
"parent": "Workflow Action Master",
"import": 0,
"modified": "2022-05-17 11:58:49.209418",
"name": "6493e1ca13",
"parent": "Workflow State",
"parentfield": "permissions",
"parenttype": "DocType",
"permlevel": 0,
@ -4329,10 +4248,10 @@
"email": 1,
"export": 0,
"if_owner": 0,
"import": 0,
"modified": "2022-05-17 11:58:49.209418",
"name": "6493e1ca13",
"parent": "Workflow State",
"import": 1,
"modified": "2022-05-16 14:37:30.785448",
"name": "decdead5f2",
"parent": "Workflow Action Master",
"parentfield": "permissions",
"parenttype": "DocType",
"permlevel": 0,
@ -5264,60 +5183,6 @@
"submit": 0,
"write": 1
},
{
"amend": 0,
"cancel": 0,
"create": 1,
"delete": 1,
"docstatus": 0,
"doctype": "Custom DocPerm",
"email": 1,
"export": 1,
"if_owner": 0,
"import": 0,
"modified": "2022-01-18 10:36:28.747690",
"name": "713e1f31b7",
"parent": "Procedure Name",
"parentfield": "permissions",
"parenttype": "DocType",
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"select": 0,
"set_user_permissions": 0,
"share": 1,
"submit": 0,
"write": 1
},
{
"amend": 0,
"cancel": 0,
"create": 1,
"delete": 1,
"docstatus": 0,
"doctype": "Custom DocPerm",
"email": 1,
"export": 1,
"if_owner": 0,
"import": 0,
"modified": "2022-01-18 10:37:02.769339",
"name": "20aa798cd5",
"parent": "Procedure Step Name",
"parentfield": "permissions",
"parenttype": "DocType",
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"select": 0,
"set_user_permissions": 0,
"share": 1,
"submit": 0,
"write": 1
},
{
"amend": 0,
"cancel": 0,
@ -5480,33 +5345,6 @@
"submit": 0,
"write": 1
},
{
"amend": 0,
"cancel": 0,
"create": 1,
"delete": 1,
"docstatus": 0,
"doctype": "Custom DocPerm",
"email": 1,
"export": 1,
"if_owner": 0,
"import": 0,
"modified": "2022-01-28 12:43:13.286741",
"name": "3862e4ba6e",
"parent": "App Preference",
"parentfield": "permissions",
"parenttype": "DocType",
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"select": 1,
"set_user_permissions": 0,
"share": 1,
"submit": 0,
"write": 1
},
{
"amend": 0,
"cancel": 0,

68
smart_service/fixtures/property_setter.json

@ -2242,5 +2242,73 @@
"property_type": "Check",
"row_name": null,
"value": "1"
},
{
"default_value": null,
"doc_type": "Report",
"docstatus": 0,
"doctype": "Property Setter",
"doctype_or_field": "DocField",
"field_name": "ref_doctype",
"modified": "2022-05-17 14:52:06.272839",
"name": "Report-ref_doctype-in_list_view",
"parent": null,
"parentfield": null,
"parenttype": null,
"property": "in_list_view",
"property_type": "Check",
"row_name": null,
"value": "1"
},
{
"default_value": null,
"doc_type": "Report",
"docstatus": 0,
"doctype": "Property Setter",
"doctype_or_field": "DocField",
"field_name": "is_standard",
"modified": "2022-05-17 14:52:06.344189",
"name": "Report-is_standard-in_list_view",
"parent": null,
"parentfield": null,
"parenttype": null,
"property": "in_list_view",
"property_type": "Check",
"row_name": null,
"value": "1"
},
{
"default_value": null,
"doc_type": "Report",
"docstatus": 0,
"doctype": "Property Setter",
"doctype_or_field": "DocField",
"field_name": "module",
"modified": "2022-05-17 14:52:06.383416",
"name": "Report-module-in_list_view",
"parent": null,
"parentfield": null,
"parenttype": null,
"property": "in_list_view",
"property_type": "Check",
"row_name": null,
"value": "1"
},
{
"default_value": null,
"doc_type": "Translation",
"docstatus": 0,
"doctype": "Property Setter",
"doctype_or_field": "DocField",
"field_name": "language",
"modified": "2022-07-06 12:39:54.489733",
"name": "Translation-language-options",
"parent": null,
"parentfield": null,
"parenttype": null,
"property": "options",
"property_type": "Link",
"row_name": null,
"value": "Custom Languages"
}
]

4
smart_service/masters/doctype/procedure_name/procedure_name.json

@ -3,7 +3,7 @@
"allow_import": 1,
"allow_rename": 1,
"autoname": "format:{procedure_name}",
"creation": "2021-12-03 09:33:15.477982",
"creation": "2022-07-06 12:53:36.916465",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
@ -24,7 +24,7 @@
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2022-04-09 16:02:41.716744",
"modified": "2022-07-06 12:53:36.916465",
"modified_by": "Administrator",
"module": "Masters",
"name": "Procedure Name",

5
smart_service/masters/doctype/procedure_step_name/procedure_step_name.json

@ -1,8 +1,9 @@
{
"actions": [],
"allow_import": 1,
"allow_rename": 1,
"autoname": "format:{step_name}",
"creation": "2021-12-03 09:42:59.565222",
"creation": "2022-07-06 12:56:39.780095",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
@ -23,7 +24,7 @@
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2022-04-09 16:15:58.462864",
"modified": "2022-07-06 12:56:39.780095",
"modified_by": "Administrator",
"module": "Masters",
"name": "Procedure Step Name",

0
smart_service/transactions/doctype/procedure_name/__init__.py

BIN
smart_service/transactions/doctype/procedure_name/__pycache__/__init__.cpython-38.pyc

Binary file not shown.

BIN
smart_service/transactions/doctype/procedure_name/__pycache__/procedure_name.cpython-38.pyc

Binary file not shown.

BIN
smart_service/transactions/doctype/procedure_name/__pycache__/procedure_procedure_name.cpython-38.pyc

Binary file not shown.

BIN
smart_service/transactions/doctype/procedure_name/__pycache__/procedure_procedure_names.cpython-38.pyc

Binary file not shown.

BIN
smart_service/transactions/doctype/procedure_name/__pycache__/test_procedure_name.cpython-38.pyc

Binary file not shown.

33
smart_service/transactions/doctype/procedure_name/procedure_name.js

@ -1,33 +0,0 @@
// Copyright (c) 2021, Hard n Soft Technologies Pvt Ltd and contributors
// For license information, please see license.txt
frappe.ui.form.on('Procedure Name', {
validate: function (frm) {
if (frm.doc.procedure_name) {
if (frm.doc.procedure_name.length > 50) {
frappe.msgprint("<b>Procedure Name:</b> Only <b> 50 </b> characters allowed")
validated = false;
}
if (frm.doc.procedure_name.length == 1) {
frappe.msgprint("<b>Procedure Name:</b> Single character not allowed")
validated = false;
}
}
if (frm.doc.procedure_name == ".") {
frappe.throw(__("Just a <b>.</b> is not prescribed!"));
frappe.validated = false;
}
var regex = /[!@#$%^&*()_+\=\[\]{};`~':"\\|.<>\/?]+/;
if (frm.doc.procedure_name) {
if (regex.test(frm.doc.procedure_name) === true) {
frappe.throw(__("<b>Procedure Name:</b> Only letters, numbers and <b> -,</b> are allowed."));
frappe.validated = false;
} else if (frm.doc.procedure_name) {
if (frm.doc.procedure_name.includes("'")) {
frappe.throw(__("<b>Procedure Name:</b> Only letters, numbers and <b> -,</b> are allowed."));
frappe.validated = false;
}
}
}
}
});

51
smart_service/transactions/doctype/procedure_name/procedure_name.json

@ -1,51 +0,0 @@
{
"actions": [],
"allow_import": 1,
"allow_rename": 1,
"autoname": "format:{procedure_name}",
"creation": "2021-12-03 09:33:15.477982",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"procedure_name"
],
"fields": [
{
"allow_in_quick_entry": 1,
"fieldname": "procedure_name",
"fieldtype": "Data",
"in_list_view": 1,
"in_preview": 1,
"label": "Procedure Name",
"reqd": 1,
"unique": 1
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2021-12-03 12:23:39.999238",
"modified_by": "Administrator",
"module": "Transactions",
"name": "Procedure Name",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
}
],
"quick_entry": 1,
"search_fields": "procedure_name",
"sort_field": "procedure_name",
"sort_order": "ASC",
"title_field": "procedure_name"
}

8
smart_service/transactions/doctype/procedure_name/procedure_name.py

@ -1,8 +0,0 @@
# Copyright (c) 2021, Hard n Soft Technologies Pvt Ltd and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class ProcedureName(Document):
pass

8
smart_service/transactions/doctype/procedure_name/test_procedure_name.py

@ -1,8 +0,0 @@
# Copyright (c) 2021, Hard n Soft Technologies Pvt Ltd and Contributors
# See license.txt
# import frappe
import unittest
class TestProcedureName(unittest.TestCase):
pass

0
smart_service/transactions/doctype/procedure_step_name/__init__.py

BIN
smart_service/transactions/doctype/procedure_step_name/__pycache__/__init__.cpython-38.pyc

Binary file not shown.

BIN
smart_service/transactions/doctype/procedure_step_name/__pycache__/procedure_step_name.cpython-38.pyc

Binary file not shown.

BIN
smart_service/transactions/doctype/procedure_step_name/__pycache__/procedure_step_names.cpython-38.pyc

Binary file not shown.

BIN
smart_service/transactions/doctype/procedure_step_name/__pycache__/test_procedure_step_name.cpython-38.pyc

Binary file not shown.

33
smart_service/transactions/doctype/procedure_step_name/procedure_step_name.js

@ -1,33 +0,0 @@
// Copyright (c) 2021, Hard n Soft Technologies Pvt Ltd and contributors
// For license information, please see license.txt
frappe.ui.form.on('Procedure Step Name', {
validate: function (frm) {
if (frm.doc.step_name) {
if (frm.doc.step_name.length > 50) {
frappe.msgprint("<b>Step Name :</b> Only <b> 50 </b> characters allowed")
validated = false;
}
if (frm.doc.step_name.length == 1) {
frappe.msgprint("<b>Step Name :</b> Single character not allowed")
validated = false;
}
}
if (frm.doc.step_name == ".") {
frappe.throw(__("Just a <b>.</b> is not prescribed!"));
frappe.validated = false;
}
var regex = /[!@#$%^&*()_+\=\[\]{};`~':"\\|.<>\/?]+/;
if (frm.doc.step_name) {
if (regex.test(frm.doc.step_name) === true) {
frappe.throw(__("<b>Step Name :</b> Only letters, numbers and <b> -,</b> are allowed."));
frappe.validated = false;
} else if (frm.doc.step_name) {
if (frm.doc.step_name.includes("'")) {
frappe.throw(__("<b>Step Name :</b> Only letters, numbers and <b> -,</b> are allowed."));
frappe.validated = false;
}
}
}
}
});

51
smart_service/transactions/doctype/procedure_step_name/procedure_step_name.json

@ -1,51 +0,0 @@
{
"actions": [],
"allow_import": 1,
"allow_rename": 1,
"autoname": "format:{step_name}",
"creation": "2021-12-03 09:42:59.565222",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"step_name"
],
"fields": [
{
"allow_in_quick_entry": 1,
"fieldname": "step_name",
"fieldtype": "Data",
"in_list_view": 1,
"in_preview": 1,
"label": "Step Name",
"reqd": 1,
"unique": 1
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2022-04-05 16:11:23.912047",
"modified_by": "Administrator",
"module": "Transactions",
"name": "Procedure Step Name",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
}
],
"quick_entry": 1,
"search_fields": "step_name",
"sort_field": "step_name",
"sort_order": "ASC",
"title_field": "step_name"
}

8
smart_service/transactions/doctype/procedure_step_name/procedure_step_name.py

@ -1,8 +0,0 @@
# Copyright (c) 2021, Hard n Soft Technologies Pvt Ltd and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class ProcedureStepName(Document):
pass

8
smart_service/transactions/doctype/procedure_step_name/test_procedure_step_name.py

@ -1,8 +0,0 @@
# Copyright (c) 2021, Hard n Soft Technologies Pvt Ltd and Contributors
# See license.txt
# import frappe
import unittest
class TestProcedureStepName(unittest.TestCase):
pass
Loading…
Cancel
Save