Browse Source

Client feedback bugfix

master
hns 3 years ago
parent
commit
3e313d21f8
  1. 11
      smart_service/add_ons/doctype/app_device/app_device.json
  2. 30
      smart_service/add_ons/report/feedback_report/feedback_report.py
  3. 2
      smart_service/add_ons/report/model_download_report/model_download_report.py
  4. 2
      smart_service/add_ons/report/model_hit_report/model_hit_report.py
  5. 1
      smart_service/apis/app_user_login.py
  6. 9
      smart_service/apis/publish_api.py
  7. 4
      smart_service/apis/update_validation.py
  8. 12
      smart_service/fixtures/client_script.json
  9. 5240
      smart_service/fixtures/custom_docperm.json
  10. 88
      smart_service/fixtures/notification.json
  11. 88
      smart_service/fixtures/property_setter.json
  12. 818
      smart_service/fixtures/role.json
  13. 704
      smart_service/fixtures/workflow.json
  14. 52
      smart_service/fixtures/workflow_action_master.json
  15. 134
      smart_service/fixtures/workflow_state.json
  16. 4652
      smart_service/fixtures/workspace.json
  17. 25
      smart_service/hooks.py
  18. 29
      smart_service/mahindra_smart_service/report/installation_report/installation_report.py
  19. 27
      smart_service/mahindra_smart_service/report/login_report/login_report.py
  20. 37
      smart_service/masters/doctype/variant/variant.json
  21. 2
      smart_service/masters/doctype/vehicle/vehicle.json
  22. 13
      smart_service/public/css/smart_service.css
  23. BIN
      smart_service/public/images/Mahindra_NewSplash.png
  24. BIN
      smart_service/public/images/Smart_service_logo.png
  25. 5
      smart_service/transactions/doctype/kilometer_mapping_items/kilometer_mapping_items.json
  26. 23
      smart_service/transactions/doctype/procedure/procedure.json
  27. 21
      smart_service/transactions/doctype/procedure_details/procedure_details.json
  28. 5
      smart_service/transactions/doctype/publish/publish.json
  29. 5
      smart_service/transactions/doctype/system_mapping/system_mapping.json
  30. 28
      smart_service/transactions/doctype/system_mapping/system_mapping.py
  31. 2
      smart_service/transactions/report/audit_report/audit_report.js
  32. 20
      smart_service/transactions/report/audit_report/audit_report.py
  33. 6
      smart_service/transactions/report/kilometer_mapping/kilometer_mapping.py

11
smart_service/add_ons/doctype/app_device/app_device.json

@ -14,7 +14,8 @@
"column_break_5",
"app_current_version",
"last_login",
"last_sync"
"last_sync",
"active_status"
],
"fields": [
{
@ -66,11 +67,17 @@
"in_standard_filter": 1,
"label": "Publish Type",
"options": "Global\nInternal"
},
{
"fieldname": "active_status",
"fieldtype": "Select",
"label": "Active Status",
"options": "Active\nInactive"
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2022-02-03 13:10:00.963263",
"modified": "2022-03-01 12:51:54.027555",
"modified_by": "Administrator",
"module": "Add Ons",
"name": "App Device",

30
smart_service/add_ons/report/feedback_report/feedback_report.py

@ -26,21 +26,21 @@ def get_data(filters):
def get_columns():
columns = [
{"label": _("Date"), "fieldname": "date", "fieldtype": "Date", "width": 100},
{"label": _("Feedback ID"), "fieldname": "name", "fieldtype": "Link", "options":"User Feedback","width": 120},
{"label": _("Feedback Type"), "fieldname": "feedback_type", "fieldtype": "Data", "width": 120},
{"label": _("Feedback Title"), "fieldname": "subject", "fieldtype": "Data", "width": 120},
{"label": _("Feedback Description"), "fieldname": "description", "fieldtype": "Text Editor", "width": 250},
{"label": _("Attachments"), "fieldname": "attachments", "fieldtype": "Data", "width": 100},
{"label": _("Feedback Status"), "fieldname": "status", "fieldtype": "Data", "width": 100},
{"label": _("User ID"), "fieldname": "user_id", "fieldtype":"Data","width": 100},
{"label": _("User Name"), "fieldname": "user_name", "fieldtype": "Data", "width": 150},
{"label": _("Zone"), "fieldname": "zone", "fieldtype": "Data", "width": 100},
{"label": _("Dealer Location"), "fieldname": "area", "fieldtype": "Data", "width": 140},
{"label": _("Dealer Code"), "fieldname": "dealer_code", "fieldtype": "Data", "width": 120},
{"label": _("Dealer Name"), "fieldname": "dealer_name", "fieldtype": "Data", "width": 150},
{"label": _("Closure Date"), "fieldname": "closure_date", "fieldtype": "Data", "width": 150},
{"label": _("Closed By"), "fieldname": "closed_by", "fieldtype": "Data", "width": 120}
{"label": _("<b>Date</b>"), "fieldname": "date", "fieldtype": "Date", "width": 100},
{"label": _("<b>Feedback ID</b>"), "fieldname": "name", "fieldtype": "Link", "options":"User Feedback","width": 120},
{"label": _("<b>Feedback Type</b>"), "fieldname": "feedback_type", "fieldtype": "Data", "width": 120},
{"label": _("<b>Feedback Title</b>"), "fieldname": "subject", "fieldtype": "Data", "width": 120},
{"label": _("<b>Feedback Description</b>"), "fieldname": "description", "fieldtype": "Text Editor", "width": 250},
{"label": _("<b>Attachments</b>"), "fieldname": "attachments", "fieldtype": "Data", "width": 100},
{"label": _("<b>Feedback Status</b>"), "fieldname": "status", "fieldtype": "Data", "width": 100},
{"label": _("<b>User ID</b>"), "fieldname": "user_id", "fieldtype":"Data","width": 100},
{"label": _("<b>User Name</b>"), "fieldname": "user_name", "fieldtype": "Data", "width": 150},
{"label": _("<b>Zone</b>"), "fieldname": "zone", "fieldtype": "Data", "width": 100},
{"label": _("<b>Area Office</b>"), "fieldname": "area", "fieldtype": "Data", "width": 140},
{"label": _("<b>Dealer Code</b>"), "fieldname": "dealer_code", "fieldtype": "Data", "width": 120},
{"label": _("<b>Dealer Name</b>"), "fieldname": "dealer_name", "fieldtype": "Data", "width": 150},
{"label": _("<b>Closure Date</b>"), "fieldname": "closure_date", "fieldtype": "Data", "width": 150},
{"label": _("<b>Closed By</b>"), "fieldname": "closed_by", "fieldtype": "Data", "width": 120}
]
return columns

2
smart_service/add_ons/report/model_download_report/model_download_report.py

@ -54,7 +54,7 @@ def get_columns():
columns = [
{"label": _("<b>Date</b>"), "fieldname": "date", "fieldtype": "Date", "width": 100},
{"label": _("<b>Zone</b>"), "fieldname": "zone", "fieldtype": "Data", "width": 100},
{"label": _("<b>Dealer Location</b>"), "fieldname": "area", "fieldtype": "Data", "width": 150},
{"label": _("<b>Area Office</b>"), "fieldname": "area", "fieldtype": "Data", "width": 150},
{"label": _("<b>Dealer Code</b>"), "fieldname": "dealer_code", "fieldtype": "Data", "width": 150},
{"label": _("<b>Dealer Name</b>"), "fieldname": "dealer_name", "fieldtype": "Data", "width": 150},
{"label": _("<b>Device</b>"), "fieldname": "device_id", "fieldtype": "Data", "width": 100},

2
smart_service/add_ons/report/model_hit_report/model_hit_report.py

@ -112,7 +112,7 @@ def get_columns():
columns = [
{"label": _("<b>Date</b>"), "fieldname": "date", "fieldtype": "Date", "width": 150},
{"label": _("<b>Zone</b>"), "fieldname": "zone", "fieldtype": "Data", "width": 150},
{"label": _("<b>Dealer Location</b>"), "fieldname": "area", "fieldtype": "Data", "width": 150},
{"label": _("<b>Area Office</b>"), "fieldname": "area", "fieldtype": "Data", "width": 150},
{"label": _("<b>Dealer Code</b>"), "fieldname": "dealer_code", "fieldtype": "Data", "width": 150},
{"label": _("<b>Dealer Name</b>"), "fieldname": "dealer_name", "fieldtype": "Data", "width": 150},
{"label": _("<b>Device</b>"), "fieldname": "device_id", "fieldtype": "Data", "width": 150},

1
smart_service/apis/app_user_login.py

@ -30,7 +30,6 @@ def app_user_validation(usr, pwd):
tok = doc.apple
dicData['token'] = tok
dicData['status']=1
# return decoded1
return dicData
else:
message_to_send={'status':0,'error':'Invalid Credentials'}

9
smart_service/apis/publish_api.py

@ -1,4 +1,5 @@
from traceback import FrameSummary
from unicodedata import name
import frappe
from frappe.model.document import Document
import json
@ -93,6 +94,7 @@ def json_grouping(args, language):
active_status_case, current_db_name, d, lang['language']), as_dict=True)
vari = vari[0]
if vari['active_status'] == 'Active':
vari['active_status'] = True
else:
@ -103,7 +105,7 @@ def json_grouping(args, language):
system_out = []
for i in system[d]:
sys = frappe.db.sql('''SELECT min(`tabSystem Mapping_Sub System`.idx) as systemdisplayorder,tabSystems.system_name,tabSystems.icon_file,tabSystems.myid,tabSystems.active_status
FROM %s.tabSystems
FROM %s.tabSystems
inner join %s.`tabSystem Mapping_Sub System` on tabSystems.system_name = `tabSystem Mapping_Sub System`.systems where system_name = '%s' group by system_name ;''' % (
current_db_name, current_db_name, i), as_dict=True)
@ -133,9 +135,10 @@ def json_grouping(args, language):
else:
subsys['active_status'] = False
varKMS = vari['name']+'-'+lang['language']+"%"
kms = frappe.db.sql(
'''SELECT kilometer as kilometer_name, idx as kilometer_IDX, applicable as kilometers_applicable FROM %s.`tabKilometer Mapping_Items` where sub_systems='%s' order by kilometer_IDX;''' % (
current_db_name, j), as_dict=True)
'''SELECT kilometer as kilometer_name, idx as kilometer_IDX, applicable as kilometers_applicable FROM %s.`tabKilometer Mapping_Items` where sub_systems='%s' and parent LIKE '%s' order by kilometer_IDX;''' % (
current_db_name, j,varKMS), as_dict=True)
subsys['Config Kilometer'] = kms
for k in docs_child:

4
smart_service/apis/update_validation.py

@ -105,7 +105,7 @@ def check_vehicle_update(vehicle_list):
publish_docs = frappe.db.get_list('Publish_Docs', filters={'parent': d['name']},
fields=['variant_mapping', 'system', 'sub_system',
'procedure_link', 'procedure_status'])
if publish_docs != None:
list1.append(publish_docs)
for d in list1:
@ -214,7 +214,7 @@ def check_vehicle_update(vehicle_list):
'''SELECT kilometer as kilometer_name, idx as kilometer_IDX, applicable as kilometers_applicable FROM {}.`tabKilometer Mapping_Items` where sub_systems='{}'
and parent Like '{}' and substring(parent,-5,2) = '{}' order by kilometer_IDX;'''.format(current_db_name, j, d+"%",l_id), as_dict=True)
subsys['Config Kilometer'] = kms
for k in appendDict[d][i][j]:

12
smart_service/fixtures/client_script.json

File diff suppressed because one or more lines are too long

5240
smart_service/fixtures/custom_docperm.json

File diff suppressed because it is too large

88
smart_service/fixtures/notification.json

@ -0,0 +1,88 @@
[
{
"attach_print": 0,
"channel": "Email",
"condition": "doc.enabled==0 and doc.location==\"Mahindra\"",
"date_changed": null,
"days_in_advance": 0,
"docstatus": 0,
"doctype": "Notification",
"document_type": "User",
"enabled": 1,
"event": "New",
"is_standard": 0,
"message": "Hello {{ doc.full_name }}\r\n<br>A new account has been created with the below details.</br>\r\n<br>Login ID: {{ doc.username }} </br>\r\n<br>Email ID: {{ doc.name }}</br>\r\n\r\n<br>Complete the registration by setting the desired role and enable the user account.</br>\r\n<br>On completion a welcome mail will be sent to the user.</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r\n\r\n\r\n\r\n<br>Thanks,</br>\r\n<br>Smart Service CMS.</br>\r\n",
"method": null,
"modified": "2022-02-21 18:38:45.340933",
"module": null,
"name": "Mahindra User Creation",
"parent": null,
"parentfield": null,
"parenttype": null,
"print_format": null,
"property_value": null,
"recipients": [
{
"bcc": "venkataakhiln@hnsonline.com",
"cc": "jecinthamarym@hnsonline.com",
"condition": null,
"parent": "Mahindra User Creation",
"parentfield": "recipients",
"parenttype": "Notification",
"receiver_by_document_field": "email_id,user_emails",
"receiver_by_role": ""
}
],
"send_system_notification": 0,
"send_to_all_assignees": 0,
"sender": "GSS-CMS",
"sender_email": "cms@guidedsmartservice.com",
"set_property_after_alert": null,
"slack_webhook_url": null,
"subject": "New User Notification : {{ doc.full_name }}",
"value_changed": null
},
{
"attach_print": 0,
"channel": "Email",
"condition": "doc.enabled==1 and doc.location==\"Mahindra\"",
"date_changed": null,
"days_in_advance": 0,
"docstatus": 0,
"doctype": "Notification",
"document_type": "User",
"enabled": 1,
"event": "Value Change",
"is_standard": 0,
"message": "Welcome to Smart Service CMS !!! \r\n<br>Hello {{ doc.full_name }},</br> \r\n<br>A new account has been created for you at {{ doc.creation }}.</br>\r\n<br>Your login id is: {{ doc.username }} </br>\r\n<br>Role: CMS User</br>\r\n\r\n<br>Please use Mahindra credentials for accessing your account.</br>\r\n\r\n<br>Click on the link below to access the CMS Portal.</br>\r\n<br>http://192.168.1.58:81/</br>\r\n\r\n<br>Thanks,</br>\r\n<br>Smart Service CMS Admin. </br>\r\n",
"method": null,
"modified": "2022-02-22 10:40:15.721507",
"module": null,
"name": "Mahindra User Enabled",
"parent": null,
"parentfield": null,
"parenttype": null,
"print_format": null,
"property_value": null,
"recipients": [
{
"bcc": null,
"cc": "jecinthamarym@hnsonline.com",
"condition": null,
"parent": "Mahindra User Enabled",
"parentfield": "recipients",
"parenttype": "Notification",
"receiver_by_document_field": "email",
"receiver_by_role": ""
}
],
"send_system_notification": 0,
"send_to_all_assignees": 0,
"sender": "GSS-CMS",
"sender_email": "cms@guidedsmartservice.com",
"set_property_after_alert": null,
"slack_webhook_url": null,
"subject": "Welcome to Smart Service CMS !!! ",
"value_changed": "enabled"
}
]

88
smart_service/fixtures/property_setter.json

@ -210,7 +210,7 @@
"doctype": "Property Setter",
"doctype_or_field": "DocField",
"field_name": "active_status",
"modified": "2021-11-05 16:04:52.851814",
"modified": "2022-02-24 12:54:45.182415",
"name": "Procedure-active_status-in_list_view",
"parent": null,
"parentfield": null,
@ -227,7 +227,7 @@
"doctype": "Property Setter",
"doctype_or_field": "DocField",
"field_name": "fuel",
"modified": "2021-11-05 16:04:52.940927",
"modified": "2022-02-24 12:54:45.127510",
"name": "Procedure-fuel-in_list_view",
"parent": null,
"parentfield": null,
@ -244,7 +244,7 @@
"doctype": "Property Setter",
"doctype_or_field": "DocField",
"field_name": "workflow_state",
"modified": "2021-11-05 16:04:52.913371",
"modified": "2022-02-24 12:54:45.154777",
"name": "Procedure-workflow_state-in_list_view",
"parent": null,
"parentfield": null,
@ -261,7 +261,7 @@
"doctype": "Property Setter",
"doctype_or_field": "DocField",
"field_name": "transmission",
"modified": "2021-11-05 16:04:52.954414",
"modified": "2022-02-24 12:54:45.141034",
"name": "Procedure-transmission-in_list_view",
"parent": null,
"parentfield": null,
@ -278,7 +278,7 @@
"doctype": "Property Setter",
"doctype_or_field": "DocField",
"field_name": "drive",
"modified": "2021-11-05 16:04:52.966624",
"modified": "2022-02-24 12:54:45.168719",
"name": "Procedure-drive-in_list_view",
"parent": null,
"parentfield": null,
@ -312,7 +312,7 @@
"doctype": "Property Setter",
"doctype_or_field": "DocField",
"field_name": "family_code",
"modified": "2021-11-05 16:04:52.928480",
"modified": "2022-02-24 12:54:45.274563",
"name": "Procedure-family_code-in_list_view",
"parent": null,
"parentfield": null,
@ -329,7 +329,7 @@
"doctype": "Property Setter",
"doctype_or_field": "DocField",
"field_name": "file_name",
"modified": "2021-12-11 10:58:19.049062",
"modified": "2022-02-22 11:42:04.839566",
"name": "File-file_name-in_list_view",
"parent": null,
"parentfield": null,
@ -363,7 +363,7 @@
"doctype": "Property Setter",
"doctype_or_field": "DocField",
"field_name": "is_private",
"modified": "2021-12-11 10:58:19.063194",
"modified": "2022-02-22 11:42:04.863011",
"name": "File-is_private-in_list_view",
"parent": null,
"parentfield": null,
@ -397,7 +397,7 @@
"doctype": "Property Setter",
"doctype_or_field": "DocField",
"field_name": "is_folder",
"modified": "2021-12-11 10:58:19.078168",
"modified": "2022-02-22 11:42:04.875790",
"name": "File-is_folder-in_list_view",
"parent": null,
"parentfield": null,
@ -414,7 +414,7 @@
"doctype": "Property Setter",
"doctype_or_field": "DocField",
"field_name": "attached_to_doctype",
"modified": "2021-12-11 10:58:19.091291",
"modified": "2022-02-22 11:42:04.890768",
"name": "File-attached_to_doctype-in_list_view",
"parent": null,
"parentfield": null,
@ -1613,5 +1613,73 @@
"property_type": "Check",
"row_name": null,
"value": "1"
},
{
"default_value": null,
"doc_type": "Procedure",
"docstatus": 0,
"doctype": "Property Setter",
"doctype_or_field": "DocField",
"field_name": "language",
"modified": "2022-02-24 12:54:45.289188",
"name": "Procedure-language-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": "System Mapping",
"docstatus": 0,
"doctype": "Property Setter",
"doctype_or_field": "DocField",
"field_name": "variant_mapping",
"modified": "2022-02-25 12:24:54.437585",
"name": "System Mapping-variant_mapping-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": "System Mapping",
"docstatus": 0,
"doctype": "Property Setter",
"doctype_or_field": "DocField",
"field_name": "language",
"modified": "2022-02-25 12:24:54.467152",
"name": "System Mapping-language-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": "System Mapping",
"docstatus": 0,
"doctype": "Property Setter",
"doctype_or_field": "DocField",
"field_name": "workflow_state",
"modified": "2022-02-25 12:24:54.481342",
"name": "System Mapping-workflow_state-in_list_view",
"parent": null,
"parentfield": null,
"parenttype": null,
"property": "in_list_view",
"property_type": "Check",
"row_name": null,
"value": "1"
}
]

818
smart_service/fixtures/role.json

@ -0,0 +1,818 @@
[
{
"bulk_actions": 0,
"dashboard": 0,
"desk_access": 1,
"disabled": 0,
"docstatus": 0,
"doctype": "Role",
"form_sidebar": 0,
"home_page": null,
"is_custom": 0,
"list_sidebar": 0,
"modified": "2021-10-28 10:04:14.605904",
"name": "System Manager",
"notifications": 0,
"parent": null,
"parentfield": null,
"parenttype": null,
"restrict_to_domain": null,
"role_name": "System Manager",
"search_bar": 0,
"timeline": 0,
"two_factor_auth": 0,
"view_switcher": 0
},
{
"bulk_actions": 0,
"dashboard": 0,
"desk_access": 0,
"disabled": 0,
"docstatus": 0,
"doctype": "Role",
"form_sidebar": 0,
"home_page": null,
"is_custom": 0,
"list_sidebar": 0,
"modified": "2021-10-28 10:04:14.608515",
"name": "Guest",
"notifications": 0,
"parent": null,
"parentfield": null,
"parenttype": null,
"restrict_to_domain": null,
"role_name": "Guest",
"search_bar": 0,
"timeline": 0,
"two_factor_auth": 0,
"view_switcher": 0
},
{
"bulk_actions": 0,
"dashboard": 0,
"desk_access": 1,
"disabled": 0,
"docstatus": 0,
"doctype": "Role",
"form_sidebar": 0,
"home_page": null,
"is_custom": 0,
"list_sidebar": 0,
"modified": "2021-11-03 14:16:00.977805",
"name": "All",
"notifications": 0,
"parent": null,
"parentfield": null,
"parenttype": null,
"restrict_to_domain": null,
"role_name": "All",
"search_bar": 0,
"timeline": 0,
"two_factor_auth": 1,
"view_switcher": 0
},
{
"bulk_actions": 0,
"dashboard": 0,
"desk_access": 1,
"disabled": 0,
"docstatus": 0,
"doctype": "Role",
"form_sidebar": 0,
"home_page": null,
"is_custom": 0,
"list_sidebar": 0,
"modified": "2021-10-28 10:04:14.682594",
"name": "Administrator",
"notifications": 0,
"parent": null,
"parentfield": null,
"parenttype": null,
"restrict_to_domain": null,
"role_name": "Administrator",
"search_bar": 0,
"timeline": 0,
"two_factor_auth": 0,
"view_switcher": 0
},
{
"bulk_actions": 0,
"dashboard": 0,
"desk_access": 1,
"disabled": 0,
"docstatus": 0,
"doctype": "Role",
"form_sidebar": 0,
"home_page": null,
"is_custom": 0,
"list_sidebar": 0,
"modified": "2021-10-28 10:04:16.452178",
"name": "Website Manager",
"notifications": 0,
"parent": null,
"parentfield": null,
"parenttype": null,
"restrict_to_domain": null,
"role_name": "Website Manager",
"search_bar": 0,
"timeline": 0,
"two_factor_auth": 0,
"view_switcher": 0
},
{
"bulk_actions": 0,
"dashboard": 0,
"desk_access": 1,
"disabled": 0,
"docstatus": 0,
"doctype": "Role",
"form_sidebar": 0,
"home_page": null,
"is_custom": 0,
"list_sidebar": 0,
"modified": "2021-10-28 10:04:18.436472",
"name": "Dashboard Manager",
"notifications": 0,
"parent": null,
"parentfield": null,
"parenttype": null,
"restrict_to_domain": null,
"role_name": "Dashboard Manager",
"search_bar": 0,
"timeline": 0,
"two_factor_auth": 0,
"view_switcher": 0
},
{
"bulk_actions": 0,
"dashboard": 0,
"desk_access": 1,
"disabled": 0,
"docstatus": 0,
"doctype": "Role",
"form_sidebar": 0,
"home_page": null,
"is_custom": 0,
"list_sidebar": 0,
"modified": "2021-10-28 10:04:21.420899",
"name": "Prepared Report User",
"notifications": 0,
"parent": null,
"parentfield": null,
"parenttype": null,
"restrict_to_domain": null,
"role_name": "Prepared Report User",
"search_bar": 0,
"timeline": 0,
"two_factor_auth": 0,
"view_switcher": 0
},
{
"bulk_actions": 0,
"dashboard": 0,
"desk_access": 1,
"disabled": 0,
"docstatus": 0,
"doctype": "Role",
"form_sidebar": 0,
"home_page": null,
"is_custom": 0,
"list_sidebar": 0,
"modified": "2021-10-28 10:04:30.353595",
"name": "Script Manager",
"notifications": 0,
"parent": null,
"parentfield": null,
"parenttype": null,
"restrict_to_domain": null,
"role_name": "Script Manager",
"search_bar": 0,
"timeline": 0,
"two_factor_auth": 0,
"view_switcher": 0
},
{
"bulk_actions": 0,
"dashboard": 0,
"desk_access": 1,
"disabled": 0,
"docstatus": 0,
"doctype": "Role",
"form_sidebar": 0,
"home_page": null,
"is_custom": 0,
"list_sidebar": 0,
"modified": "2021-10-28 10:04:36.241950",
"name": "Report Manager",
"notifications": 0,
"parent": null,
"parentfield": null,
"parenttype": null,
"restrict_to_domain": null,
"role_name": "Report Manager",
"search_bar": 0,
"timeline": 0,
"two_factor_auth": 0,
"view_switcher": 0
},
{
"bulk_actions": 1,
"dashboard": 1,
"desk_access": 1,
"disabled": 0,
"docstatus": 0,
"doctype": "Role",
"form_sidebar": 1,
"home_page": null,
"is_custom": 0,
"list_sidebar": 1,
"modified": "2021-10-28 10:05:30.659486",
"name": "Translator",
"notifications": 1,
"parent": null,
"parentfield": null,
"parenttype": null,
"restrict_to_domain": null,
"role_name": "Translator",
"search_bar": 1,
"timeline": 1,
"two_factor_auth": 0,
"view_switcher": 1
},
{
"bulk_actions": 1,
"dashboard": 1,
"desk_access": 1,
"disabled": 0,
"docstatus": 0,
"doctype": "Role",
"form_sidebar": 1,
"home_page": null,
"is_custom": 0,
"list_sidebar": 1,
"modified": "2021-10-28 11:55:20.975010",
"name": "_Author",
"notifications": 1,
"parent": null,
"parentfield": null,
"parenttype": null,
"restrict_to_domain": null,
"role_name": "_Author",
"search_bar": 1,
"timeline": 1,
"two_factor_auth": 0,
"view_switcher": 1
},
{
"bulk_actions": 1,
"dashboard": 1,
"desk_access": 1,
"disabled": 0,
"docstatus": 0,
"doctype": "Role",
"form_sidebar": 1,
"home_page": null,
"is_custom": 0,
"list_sidebar": 1,
"modified": "2021-10-28 11:56:35.051909",
"name": "_Reviewer",
"notifications": 1,
"parent": null,
"parentfield": null,
"parenttype": null,
"restrict_to_domain": null,
"role_name": "_Reviewer",
"search_bar": 1,
"timeline": 1,
"two_factor_auth": 0,
"view_switcher": 1
},
{
"bulk_actions": 1,
"dashboard": 1,
"desk_access": 1,
"disabled": 0,
"docstatus": 0,
"doctype": "Role",
"form_sidebar": 1,
"home_page": null,
"is_custom": 0,
"list_sidebar": 1,
"modified": "2021-10-28 11:56:49.848317",
"name": "_Approver",
"notifications": 1,
"parent": null,
"parentfield": null,
"parenttype": null,
"restrict_to_domain": null,
"role_name": "_Approver",
"search_bar": 1,
"timeline": 1,
"two_factor_auth": 0,
"view_switcher": 1
},
{
"bulk_actions": 1,
"dashboard": 1,
"desk_access": 1,
"disabled": 0,
"docstatus": 0,
"doctype": "Role",
"form_sidebar": 1,
"home_page": null,
"is_custom": 0,
"list_sidebar": 1,
"modified": "2021-10-28 11:56:57.354933",
"name": "_Publisher",
"notifications": 1,
"parent": null,
"parentfield": null,
"parenttype": null,
"restrict_to_domain": null,
"role_name": "_Publisher",
"search_bar": 1,
"timeline": 1,
"two_factor_auth": 0,
"view_switcher": 1
},
{
"bulk_actions": 1,
"dashboard": 1,
"desk_access": 1,
"disabled": 0,
"docstatus": 0,
"doctype": "Role",
"form_sidebar": 1,
"home_page": null,
"is_custom": 0,
"list_sidebar": 1,
"modified": "2021-12-29 09:32:09.095126",
"name": "CMS Admin",
"notifications": 1,
"parent": null,
"parentfield": null,
"parenttype": null,
"restrict_to_domain": null,
"role_name": "CMS Admin",
"search_bar": 1,
"timeline": 1,
"two_factor_auth": 0,
"view_switcher": 1
},
{
"bulk_actions": 0,
"dashboard": 0,
"desk_access": 0,
"disabled": 0,
"docstatus": 0,
"doctype": "Role",
"form_sidebar": 0,
"home_page": null,
"is_custom": 0,
"list_sidebar": 0,
"modified": "2022-01-28 18:05:06.707011",
"name": "_AppUser",
"notifications": 0,
"parent": null,
"parentfield": null,
"parenttype": null,
"restrict_to_domain": null,
"role_name": "_AppUser",
"search_bar": 0,
"timeline": 0,
"two_factor_auth": 0,
"view_switcher": 0
},
{
"bulk_actions": 0,
"dashboard": 0,
"desk_access": 1,
"disabled": 0,
"docstatus": 0,
"doctype": "Role",
"form_sidebar": 0,
"home_page": null,
"is_custom": 0,
"list_sidebar": 0,
"modified": "2022-02-01 17:17:33.430575",
"name": "Blogger",
"notifications": 0,
"parent": null,
"parentfield": null,
"parenttype": null,
"restrict_to_domain": null,
"role_name": "Blogger",
"search_bar": 0,
"timeline": 0,
"two_factor_auth": 0,
"view_switcher": 0
},
{
"bulk_actions": 1,
"dashboard": 1,
"desk_access": 1,
"disabled": 0,
"docstatus": 0,
"doctype": "Role",
"form_sidebar": 1,
"home_page": null,
"is_custom": 0,
"list_sidebar": 1,
"modified": "2022-02-07 13:11:48.057238",
"name": "CMS User",
"notifications": 1,
"parent": null,
"parentfield": null,
"parenttype": null,
"restrict_to_domain": null,
"role_name": "CMS User",
"search_bar": 1,
"timeline": 1,
"two_factor_auth": 0,
"view_switcher": 1
},
{
"bulk_actions": 0,
"dashboard": 0,
"desk_access": 1,
"disabled": 0,
"docstatus": 0,
"doctype": "Role",
"form_sidebar": 0,
"home_page": null,
"is_custom": 0,
"list_sidebar": 0,
"modified": "2022-02-11 10:40:44.382256",
"name": "Inbox User",
"notifications": 0,
"parent": null,
"parentfield": null,
"parenttype": null,
"restrict_to_domain": null,
"role_name": "Inbox User",
"search_bar": 0,
"timeline": 0,
"two_factor_auth": 0,
"view_switcher": 0
},
{
"bulk_actions": 0,
"dashboard": 0,
"desk_access": 1,
"disabled": 0,
"docstatus": 0,
"doctype": "Role",
"form_sidebar": 0,
"home_page": null,
"is_custom": 0,
"list_sidebar": 0,
"modified": "2022-02-11 10:40:45.372226",
"name": "Knowledge Base Editor",
"notifications": 0,
"parent": null,
"parentfield": null,
"parenttype": null,
"restrict_to_domain": null,
"role_name": "Knowledge Base Editor",
"search_bar": 0,
"timeline": 0,
"two_factor_auth": 0,
"view_switcher": 0
},
{
"bulk_actions": 0,
"dashboard": 0,
"desk_access": 1,
"disabled": 0,
"docstatus": 0,
"doctype": "Role",
"form_sidebar": 0,
"home_page": null,
"is_custom": 0,
"list_sidebar": 0,
"modified": "2022-02-11 10:40:45.377507",
"name": "Knowledge Base Contributor",
"notifications": 0,
"parent": null,
"parentfield": null,
"parenttype": null,
"restrict_to_domain": null,
"role_name": "Knowledge Base Contributor",
"search_bar": 0,
"timeline": 0,
"two_factor_auth": 0,
"view_switcher": 0
},
{
"bulk_actions": 0,
"dashboard": 0,
"desk_access": 1,
"disabled": 0,
"docstatus": 0,
"doctype": "Role",
"form_sidebar": 0,
"home_page": null,
"is_custom": 0,
"list_sidebar": 0,
"modified": "2022-02-11 10:40:45.828780",
"name": "Newsletter Manager",
"notifications": 0,
"parent": null,
"parentfield": null,
"parenttype": null,
"restrict_to_domain": null,
"role_name": "Newsletter Manager",
"search_bar": 0,
"timeline": 0,
"two_factor_auth": 0,
"view_switcher": 0
},
{
"bulk_actions": 0,
"dashboard": 0,
"desk_access": 1,
"disabled": 0,
"docstatus": 0,
"doctype": "Role",
"form_sidebar": 0,
"home_page": null,
"is_custom": 0,
"list_sidebar": 0,
"modified": "2022-02-11 10:40:47.131499",
"name": "Purchase User",
"notifications": 0,
"parent": null,
"parentfield": null,
"parenttype": null,
"restrict_to_domain": null,
"role_name": "Purchase User",
"search_bar": 0,
"timeline": 0,
"two_factor_auth": 0,
"view_switcher": 0
},
{
"bulk_actions": 0,
"dashboard": 0,
"desk_access": 1,
"disabled": 0,
"docstatus": 0,
"doctype": "Role",
"form_sidebar": 0,
"home_page": null,
"is_custom": 0,
"list_sidebar": 0,
"modified": "2022-02-11 10:40:47.140070",
"name": "Sales User",
"notifications": 0,
"parent": null,
"parentfield": null,
"parenttype": null,
"restrict_to_domain": null,
"role_name": "Sales User",
"search_bar": 0,
"timeline": 0,
"two_factor_auth": 0,
"view_switcher": 0
},
{
"bulk_actions": 0,
"dashboard": 0,
"desk_access": 1,
"disabled": 0,
"docstatus": 0,
"doctype": "Role",
"form_sidebar": 0,
"home_page": null,
"is_custom": 0,
"list_sidebar": 0,
"modified": "2022-02-11 10:40:47.144898",
"name": "Accounts User",
"notifications": 0,
"parent": null,
"parentfield": null,
"parenttype": null,
"restrict_to_domain": null,
"role_name": "Accounts User",
"search_bar": 0,
"timeline": 0,
"two_factor_auth": 0,
"view_switcher": 0
},
{
"bulk_actions": 0,
"dashboard": 0,
"desk_access": 1,
"disabled": 0,
"docstatus": 0,
"doctype": "Role",
"form_sidebar": 0,
"home_page": null,
"is_custom": 0,
"list_sidebar": 0,
"modified": "2022-02-11 10:40:47.514063",
"name": "Sales Master Manager",
"notifications": 0,
"parent": null,
"parentfield": null,
"parenttype": null,
"restrict_to_domain": null,
"role_name": "Sales Master Manager",
"search_bar": 0,
"timeline": 0,
"two_factor_auth": 0,
"view_switcher": 0
},
{
"bulk_actions": 0,
"dashboard": 0,
"desk_access": 1,
"disabled": 0,
"docstatus": 0,
"doctype": "Role",
"form_sidebar": 0,
"home_page": null,
"is_custom": 0,
"list_sidebar": 0,
"modified": "2022-02-11 10:40:47.519036",
"name": "Purchase Master Manager",
"notifications": 0,
"parent": null,
"parentfield": null,
"parenttype": null,
"restrict_to_domain": null,
"role_name": "Purchase Master Manager",
"search_bar": 0,
"timeline": 0,
"two_factor_auth": 0,
"view_switcher": 0
},
{
"bulk_actions": 0,
"dashboard": 0,
"desk_access": 1,
"disabled": 0,
"docstatus": 0,
"doctype": "Role",
"form_sidebar": 0,
"home_page": null,
"is_custom": 0,
"list_sidebar": 0,
"modified": "2022-02-11 10:40:47.532826",
"name": "Sales Manager",
"notifications": 0,
"parent": null,
"parentfield": null,
"parenttype": null,
"restrict_to_domain": null,
"role_name": "Sales Manager",
"search_bar": 0,
"timeline": 0,
"two_factor_auth": 0,
"view_switcher": 0
},
{
"bulk_actions": 0,
"dashboard": 0,
"desk_access": 1,
"disabled": 0,
"docstatus": 0,
"doctype": "Role",
"form_sidebar": 0,
"home_page": null,
"is_custom": 0,
"list_sidebar": 0,
"modified": "2022-02-11 10:40:47.539067",
"name": "Accounts Manager",
"notifications": 0,
"parent": null,
"parentfield": null,
"parenttype": null,
"restrict_to_domain": null,
"role_name": "Accounts Manager",
"search_bar": 0,
"timeline": 0,
"two_factor_auth": 0,
"view_switcher": 0
},
{
"bulk_actions": 0,
"dashboard": 0,
"desk_access": 1,
"disabled": 0,
"docstatus": 0,
"doctype": "Role",
"form_sidebar": 0,
"home_page": null,
"is_custom": 0,
"list_sidebar": 0,
"modified": "2022-02-11 10:40:47.544062",
"name": "Maintenance Manager",
"notifications": 0,
"parent": null,
"parentfield": null,
"parenttype": null,
"restrict_to_domain": null,
"role_name": "Maintenance Manager",
"search_bar": 0,
"timeline": 0,
"two_factor_auth": 0,
"view_switcher": 0
},
{
"bulk_actions": 0,
"dashboard": 0,
"desk_access": 1,
"disabled": 0,
"docstatus": 0,
"doctype": "Role",
"form_sidebar": 0,
"home_page": null,
"is_custom": 0,
"list_sidebar": 0,
"modified": "2022-02-11 10:40:47.548971",
"name": "Maintenance User",
"notifications": 0,
"parent": null,
"parentfield": null,
"parenttype": null,
"restrict_to_domain": null,
"role_name": "Maintenance User",
"search_bar": 0,
"timeline": 0,
"two_factor_auth": 0,
"view_switcher": 0
},
{
"bulk_actions": 0,
"dashboard": 0,
"desk_access": 1,
"disabled": 0,
"docstatus": 0,
"doctype": "Role",
"form_sidebar": 0,
"home_page": null,
"is_custom": 0,
"list_sidebar": 0,
"modified": "2022-02-11 10:40:47.554124",
"name": "Purchase Manager",
"notifications": 0,
"parent": null,
"parentfield": null,
"parenttype": null,
"restrict_to_domain": null,
"role_name": "Purchase Manager",
"search_bar": 0,
"timeline": 0,
"two_factor_auth": 0,
"view_switcher": 0
},
{
"bulk_actions": 1,
"dashboard": 1,
"desk_access": 1,
"disabled": 0,
"docstatus": 0,
"doctype": "Role",
"form_sidebar": 1,
"home_page": null,
"is_custom": 0,
"list_sidebar": 1,
"modified": "2022-02-21 16:49:26.740814",
"name": "GSS User Manual Editor",
"notifications": 1,
"parent": null,
"parentfield": null,
"parenttype": null,
"restrict_to_domain": null,
"role_name": "GSS User Manual Editor",
"search_bar": 1,
"timeline": 1,
"two_factor_auth": 0,
"view_switcher": 1
},
{
"bulk_actions": 1,
"dashboard": 1,
"desk_access": 1,
"disabled": 0,
"docstatus": 0,
"doctype": "Role",
"form_sidebar": 1,
"home_page": null,
"is_custom": 0,
"list_sidebar": 1,
"modified": "2022-02-25 10:48:10.932318",
"name": "User_Account_Manager",
"notifications": 1,
"parent": null,
"parentfield": null,
"parenttype": null,
"restrict_to_domain": null,
"role_name": "User_Account_Manager",
"search_bar": 1,
"timeline": 1,
"two_factor_auth": 0,
"view_switcher": 1
}
]

704
smart_service/fixtures/workflow.json

@ -0,0 +1,704 @@
[
{
"docstatus": 0,
"doctype": "Workflow",
"document_type": "Procedure",
"is_active": 1,
"modified": "2022-02-18 15:42:02.086978",
"name": "Procedures_WF",
"override_status": 0,
"parent": null,
"parentfield": null,
"parenttype": null,
"send_email_alert": 1,
"states": [
{
"allow_edit": "_Author",
"doc_status": "0",
"is_optional_state": 0,
"message": null,
"next_action_email_template": null,
"parent": "Procedures_WF",
"parentfield": "states",
"parenttype": "Workflow",
"state": "Draft",
"update_field": null,
"update_value": null
},
{
"allow_edit": "_Author",
"doc_status": "0",
"is_optional_state": 0,
"message": null,
"next_action_email_template": null,
"parent": "Procedures_WF",
"parentfield": "states",
"parenttype": "Workflow",
"state": "Revoked",
"update_field": null,
"update_value": null
},
{
"allow_edit": "_Reviewer",
"doc_status": "0",
"is_optional_state": 0,
"message": null,
"next_action_email_template": null,
"parent": "Procedures_WF",
"parentfield": "states",
"parenttype": "Workflow",
"state": "Review Pending",
"update_field": null,
"update_value": null
},
{
"allow_edit": "_Approver",
"doc_status": "0",
"is_optional_state": 0,
"message": null,
"next_action_email_template": null,
"parent": "Procedures_WF",
"parentfield": "states",
"parenttype": "Workflow",
"state": "Approval Pending",
"update_field": null,
"update_value": null
},
{
"allow_edit": "System Manager",
"doc_status": "0",
"is_optional_state": 0,
"message": null,
"next_action_email_template": null,
"parent": "Procedures_WF",
"parentfield": "states",
"parenttype": "Workflow",
"state": "Publish Ready",
"update_field": null,
"update_value": null
},
{
"allow_edit": "System Manager",
"doc_status": "0",
"is_optional_state": 0,
"message": null,
"next_action_email_template": null,
"parent": "Procedures_WF",
"parentfield": "states",
"parenttype": "Workflow",
"state": "Published",
"update_field": null,
"update_value": null
}
],
"transitions": [
{
"action": "Submit",
"allow_self_approval": 1,
"allowed": "_Author",
"condition": null,
"next_state": "Review Pending",
"parent": "Procedures_WF",
"parentfield": "transitions",
"parenttype": "Workflow",
"state": "Draft"
},
{
"action": "Approve",
"allow_self_approval": 1,
"allowed": "_Reviewer",
"condition": null,
"next_state": "Approval Pending",
"parent": "Procedures_WF",
"parentfield": "transitions",
"parenttype": "Workflow",
"state": "Review Pending"
},
{
"action": "Reject",
"allow_self_approval": 1,
"allowed": "_Reviewer",
"condition": null,
"next_state": "Draft",
"parent": "Procedures_WF",
"parentfield": "transitions",
"parenttype": "Workflow",
"state": "Review Pending"
},
{
"action": "Revoke",
"allow_self_approval": 1,
"allowed": "_Author",
"condition": null,
"next_state": "Draft",
"parent": "Procedures_WF",
"parentfield": "transitions",
"parenttype": "Workflow",
"state": "Review Pending"
},
{
"action": "Submit",
"allow_self_approval": 1,
"allowed": "_Author",
"condition": null,
"next_state": "Review Pending",
"parent": "Procedures_WF",
"parentfield": "transitions",
"parenttype": "Workflow",
"state": "Revoked"
},
{
"action": "Approve",
"allow_self_approval": 1,
"allowed": "_Approver",
"condition": null,
"next_state": "Publish Ready",
"parent": "Procedures_WF",
"parentfield": "transitions",
"parenttype": "Workflow",
"state": "Approval Pending"
},
{
"action": "Reject",
"allow_self_approval": 1,
"allowed": "_Approver",
"condition": null,
"next_state": "Draft",
"parent": "Procedures_WF",
"parentfield": "transitions",
"parenttype": "Workflow",
"state": "Approval Pending"
},
{
"action": "Revoke",
"allow_self_approval": 1,
"allowed": "_Reviewer",
"condition": null,
"next_state": "Review Pending",
"parent": "Procedures_WF",
"parentfield": "transitions",
"parenttype": "Workflow",
"state": "Approval Pending"
},
{
"action": "Revoke",
"allow_self_approval": 1,
"allowed": "System Manager",
"condition": null,
"next_state": "Draft",
"parent": "Procedures_WF",
"parentfield": "transitions",
"parenttype": "Workflow",
"state": "Publish Ready"
},
{
"action": "Reject",
"allow_self_approval": 1,
"allowed": "System Manager",
"condition": null,
"next_state": "Draft",
"parent": "Procedures_WF",
"parentfield": "transitions",
"parenttype": "Workflow",
"state": "Published"
}
],
"workflow_name": "Procedures_WF",
"workflow_state_field": "workflow_state"
},
{
"docstatus": 0,
"doctype": "Workflow",
"document_type": "Kilometer Mapping",
"is_active": 1,
"modified": "2022-01-28 15:25:51.865496",
"name": "Kilometer Mapping_WF",
"override_status": 0,
"parent": null,
"parentfield": null,
"parenttype": null,
"send_email_alert": 0,
"states": [
{
"allow_edit": "_Author",
"doc_status": "0",
"is_optional_state": 0,
"message": null,
"next_action_email_template": null,
"parent": "Kilometer Mapping_WF",
"parentfield": "states",
"parenttype": "Workflow",
"state": "Draft",
"update_field": null,
"update_value": null
},
{
"allow_edit": "_Author",
"doc_status": "0",
"is_optional_state": 0,
"message": null,
"next_action_email_template": null,
"parent": "Kilometer Mapping_WF",
"parentfield": "states",
"parenttype": "Workflow",
"state": "Revoked",
"update_field": null,
"update_value": null
},
{
"allow_edit": "_Reviewer",
"doc_status": "0",
"is_optional_state": 0,
"message": null,
"next_action_email_template": null,
"parent": "Kilometer Mapping_WF",
"parentfield": "states",
"parenttype": "Workflow",
"state": "Review Pending",
"update_field": null,
"update_value": null
},
{
"allow_edit": "_Approver",
"doc_status": "0",
"is_optional_state": 0,
"message": null,
"next_action_email_template": null,
"parent": "Kilometer Mapping_WF",
"parentfield": "states",
"parenttype": "Workflow",
"state": "Approval Pending",
"update_field": null,
"update_value": null
},
{
"allow_edit": "_Publisher",
"doc_status": "0",
"is_optional_state": 0,
"message": null,
"next_action_email_template": null,
"parent": "Kilometer Mapping_WF",
"parentfield": "states",
"parenttype": "Workflow",
"state": "Publish Approval Pending",
"update_field": null,
"update_value": null
},
{
"allow_edit": "System Manager",
"doc_status": "0",
"is_optional_state": 0,
"message": null,
"next_action_email_template": null,
"parent": "Kilometer Mapping_WF",
"parentfield": "states",
"parenttype": "Workflow",
"state": "Publish Ready",
"update_field": null,
"update_value": null
},
{
"allow_edit": "System Manager",
"doc_status": "0",
"is_optional_state": 0,
"message": null,
"next_action_email_template": null,
"parent": "Kilometer Mapping_WF",
"parentfield": "states",
"parenttype": "Workflow",
"state": "Published",
"update_field": null,
"update_value": null
}
],
"transitions": [
{
"action": "Submit",
"allow_self_approval": 1,
"allowed": "_Author",
"condition": null,
"next_state": "Review Pending",
"parent": "Kilometer Mapping_WF",
"parentfield": "transitions",
"parenttype": "Workflow",
"state": "Draft"
},
{
"action": "Approve",
"allow_self_approval": 1,
"allowed": "_Reviewer",
"condition": null,
"next_state": "Approval Pending",
"parent": "Kilometer Mapping_WF",
"parentfield": "transitions",
"parenttype": "Workflow",
"state": "Review Pending"
},
{
"action": "Reject",
"allow_self_approval": 1,
"allowed": "_Reviewer",
"condition": null,
"next_state": "Draft",
"parent": "Kilometer Mapping_WF",
"parentfield": "transitions",
"parenttype": "Workflow",
"state": "Review Pending"
},
{
"action": "Revoke",
"allow_self_approval": 1,
"allowed": "_Author",
"condition": null,
"next_state": "Draft",
"parent": "Kilometer Mapping_WF",
"parentfield": "transitions",
"parenttype": "Workflow",
"state": "Review Pending"
},
{
"action": "Submit",
"allow_self_approval": 1,
"allowed": "_Author",
"condition": null,
"next_state": "Review Pending",
"parent": "Kilometer Mapping_WF",
"parentfield": "transitions",
"parenttype": "Workflow",
"state": "Revoked"
},
{
"action": "Approve",
"allow_self_approval": 1,
"allowed": "_Approver",
"condition": null,
"next_state": "Publish Approval Pending",
"parent": "Kilometer Mapping_WF",
"parentfield": "transitions",
"parenttype": "Workflow",
"state": "Approval Pending"
},
{
"action": "Reject",
"allow_self_approval": 1,
"allowed": "_Approver",
"condition": null,
"next_state": "Draft",
"parent": "Kilometer Mapping_WF",
"parentfield": "transitions",
"parenttype": "Workflow",
"state": "Approval Pending"
},
{
"action": "Revoke",
"allow_self_approval": 1,
"allowed": "_Reviewer",
"condition": null,
"next_state": "Review Pending",
"parent": "Kilometer Mapping_WF",
"parentfield": "transitions",
"parenttype": "Workflow",
"state": "Approval Pending"
},
{
"action": "Approve",
"allow_self_approval": 1,
"allowed": "_Publisher",
"condition": null,
"next_state": "Publish Ready",
"parent": "Kilometer Mapping_WF",
"parentfield": "transitions",
"parenttype": "Workflow",
"state": "Publish Approval Pending"
},
{
"action": "Reject",
"allow_self_approval": 1,
"allowed": "_Publisher",
"condition": null,
"next_state": "Draft",
"parent": "Kilometer Mapping_WF",
"parentfield": "transitions",
"parenttype": "Workflow",
"state": "Publish Approval Pending"
},
{
"action": "Revoke",
"allow_self_approval": 1,
"allowed": "_Approver",
"condition": null,
"next_state": "Approval Pending",
"parent": "Kilometer Mapping_WF",
"parentfield": "transitions",
"parenttype": "Workflow",
"state": "Publish Approval Pending"
},
{
"action": "Revoke",
"allow_self_approval": 1,
"allowed": "_Publisher",
"condition": null,
"next_state": "Publish Approval Pending",
"parent": "Kilometer Mapping_WF",
"parentfield": "transitions",
"parenttype": "Workflow",
"state": "Publish Ready"
},
{
"action": "Reject",
"allow_self_approval": 1,
"allowed": "System Manager",
"condition": null,
"next_state": "Draft",
"parent": "Kilometer Mapping_WF",
"parentfield": "transitions",
"parenttype": "Workflow",
"state": "Published"
}
],
"workflow_name": "Kilometer Mapping_WF",
"workflow_state_field": "workflow_state"
},
{
"docstatus": 0,
"doctype": "Workflow",
"document_type": "Variant Mapping",
"is_active": 0,
"modified": "2022-03-01 11:33:46.101265",
"name": "Variant Mapping_WF",
"override_status": 0,
"parent": null,
"parentfield": null,
"parenttype": null,
"send_email_alert": 0,
"states": [
{
"allow_edit": "_Author",
"doc_status": "0",
"is_optional_state": 0,
"message": null,
"next_action_email_template": null,
"parent": "Variant Mapping_WF",
"parentfield": "states",
"parenttype": "Workflow",
"state": "Draft",
"update_field": null,
"update_value": null
},
{
"allow_edit": "_Author",
"doc_status": "0",
"is_optional_state": 0,
"message": null,
"next_action_email_template": null,
"parent": "Variant Mapping_WF",
"parentfield": "states",
"parenttype": "Workflow",
"state": "Revoked",
"update_field": null,
"update_value": null
},
{
"allow_edit": "_Reviewer",
"doc_status": "0",
"is_optional_state": 0,
"message": null,
"next_action_email_template": null,
"parent": "Variant Mapping_WF",
"parentfield": "states",
"parenttype": "Workflow",
"state": "Review Pending",
"update_field": null,
"update_value": null
},
{
"allow_edit": "_Approver",
"doc_status": "0",
"is_optional_state": 0,
"message": null,
"next_action_email_template": null,
"parent": "Variant Mapping_WF",
"parentfield": "states",
"parenttype": "Workflow",
"state": "Approval Pending",
"update_field": null,
"update_value": null
},
{
"allow_edit": "_Publisher",
"doc_status": "0",
"is_optional_state": 0,
"message": null,
"next_action_email_template": null,
"parent": "Variant Mapping_WF",
"parentfield": "states",
"parenttype": "Workflow",
"state": "Publish Approval Pending",
"update_field": null,
"update_value": null
},
{
"allow_edit": "System Manager",
"doc_status": "0",
"is_optional_state": 0,
"message": null,
"next_action_email_template": null,
"parent": "Variant Mapping_WF",
"parentfield": "states",
"parenttype": "Workflow",
"state": "Publish Ready",
"update_field": null,
"update_value": null
},
{
"allow_edit": "System Manager",
"doc_status": "0",
"is_optional_state": 0,
"message": null,
"next_action_email_template": null,
"parent": "Variant Mapping_WF",
"parentfield": "states",
"parenttype": "Workflow",
"state": "Published",
"update_field": null,
"update_value": null
}
],
"transitions": [
{
"action": "Submit",
"allow_self_approval": 1,
"allowed": "_Author",
"condition": null,
"next_state": "Review Pending",
"parent": "Variant Mapping_WF",
"parentfield": "transitions",
"parenttype": "Workflow",
"state": "Draft"
},
{
"action": "Approve",
"allow_self_approval": 1,
"allowed": "_Reviewer",
"condition": null,
"next_state": "Approval Pending",
"parent": "Variant Mapping_WF",
"parentfield": "transitions",
"parenttype": "Workflow",
"state": "Review Pending"
},
{
"action": "Reject",
"allow_self_approval": 1,
"allowed": "_Reviewer",
"condition": null,
"next_state": "Draft",
"parent": "Variant Mapping_WF",
"parentfield": "transitions",
"parenttype": "Workflow",
"state": "Review Pending"
},
{
"action": "Revoke",
"allow_self_approval": 1,
"allowed": "_Author",
"condition": null,
"next_state": "Draft",
"parent": "Variant Mapping_WF",
"parentfield": "transitions",
"parenttype": "Workflow",
"state": "Review Pending"
},
{
"action": "Submit",
"allow_self_approval": 1,
"allowed": "_Author",
"condition": null,
"next_state": "Review Pending",
"parent": "Variant Mapping_WF",
"parentfield": "transitions",
"parenttype": "Workflow",
"state": "Revoked"
},
{
"action": "Approve",
"allow_self_approval": 1,
"allowed": "_Approver",
"condition": null,
"next_state": "Publish Approval Pending",
"parent": "Variant Mapping_WF",
"parentfield": "transitions",
"parenttype": "Workflow",
"state": "Approval Pending"
},
{
"action": "Reject",
"allow_self_approval": 1,
"allowed": "_Approver",
"condition": null,
"next_state": "Draft",
"parent": "Variant Mapping_WF",
"parentfield": "transitions",
"parenttype": "Workflow",
"state": "Approval Pending"
},
{
"action": "Revoke",
"allow_self_approval": 1,
"allowed": "_Reviewer",
"condition": null,
"next_state": "Review Pending",
"parent": "Variant Mapping_WF",
"parentfield": "transitions",
"parenttype": "Workflow",
"state": "Approval Pending"
},
{
"action": "Approve",
"allow_self_approval": 1,
"allowed": "_Publisher",
"condition": null,
"next_state": "Publish Ready",
"parent": "Variant Mapping_WF",
"parentfield": "transitions",
"parenttype": "Workflow",
"state": "Publish Approval Pending"
},
{
"action": "Reject",
"allow_self_approval": 1,
"allowed": "_Publisher",
"condition": null,
"next_state": "Draft",
"parent": "Variant Mapping_WF",
"parentfield": "transitions",
"parenttype": "Workflow",
"state": "Publish Approval Pending"
},
{
"action": "Revoke",
"allow_self_approval": 1,
"allowed": "_Approver",
"condition": null,
"next_state": "Approval Pending",
"parent": "Variant Mapping_WF",
"parentfield": "transitions",
"parenttype": "Workflow",
"state": "Publish Approval Pending"
},
{
"action": "Revoke",
"allow_self_approval": 1,
"allowed": "System Manager",
"condition": null,
"next_state": "Draft",
"parent": "Variant Mapping_WF",
"parentfield": "transitions",
"parenttype": "Workflow",
"state": "Publish Ready"
}
],
"workflow_name": "Variant Mapping_WF",
"workflow_state_field": "workflow_state"
}
]

52
smart_service/fixtures/workflow_action_master.json

@ -0,0 +1,52 @@
[
{
"docstatus": 0,
"doctype": "Workflow Action Master",
"modified": "2021-10-28 10:05:30.859488",
"name": "Approve",
"parent": null,
"parentfield": null,
"parenttype": null,
"workflow_action_name": "Approve"
},
{
"docstatus": 0,
"doctype": "Workflow Action Master",
"modified": "2021-10-28 10:05:30.861967",
"name": "Reject",
"parent": null,
"parentfield": null,
"parenttype": null,
"workflow_action_name": "Reject"
},
{
"docstatus": 0,
"doctype": "Workflow Action Master",
"modified": "2021-10-28 10:05:30.864039",
"name": "Review",
"parent": null,
"parentfield": null,
"parenttype": null,
"workflow_action_name": "Review"
},
{
"docstatus": 0,
"doctype": "Workflow Action Master",
"modified": "2021-10-29 13:10:43.535241",
"name": "Submit",
"parent": null,
"parentfield": null,
"parenttype": null,
"workflow_action_name": "Submit"
},
{
"docstatus": 0,
"doctype": "Workflow Action Master",
"modified": "2021-11-25 14:27:51.550869",
"name": "Revoke",
"parent": null,
"parentfield": null,
"parenttype": null,
"workflow_action_name": "Revoke"
}
]

134
smart_service/fixtures/workflow_state.json

@ -0,0 +1,134 @@
[
{
"docstatus": 0,
"doctype": "Workflow State",
"icon": "question-sign",
"modified": "2021-10-28 10:05:30.766665",
"name": "Pending",
"parent": null,
"parentfield": null,
"parenttype": null,
"style": "",
"workflow_state_name": "Pending"
},
{
"docstatus": 0,
"doctype": "Workflow State",
"icon": "ok-sign",
"modified": "2021-10-28 10:05:30.769376",
"name": "Approved",
"parent": null,
"parentfield": null,
"parenttype": null,
"style": "Success",
"workflow_state_name": "Approved"
},
{
"docstatus": 0,
"doctype": "Workflow State",
"icon": "remove",
"modified": "2021-10-28 10:05:30.771963",
"name": "Rejected",
"parent": null,
"parentfield": null,
"parenttype": null,
"style": "Danger",
"workflow_state_name": "Rejected"
},
{
"docstatus": 0,
"doctype": "Workflow State",
"icon": "",
"modified": "2021-11-25 14:45:42.891534",
"name": "Draft",
"parent": null,
"parentfield": null,
"parenttype": null,
"style": "Inverse",
"workflow_state_name": "Draft"
},
{
"docstatus": 0,
"doctype": "Workflow State",
"icon": "",
"modified": "2021-11-25 14:44:30.661892",
"name": "Review Pending",
"parent": null,
"parentfield": null,
"parenttype": null,
"style": "Primary",
"workflow_state_name": "Review Pending"
},
{
"docstatus": 0,
"doctype": "Workflow State",
"icon": "",
"modified": "2021-11-25 14:44:43.916341",
"name": "Approval Pending",
"parent": null,
"parentfield": null,
"parenttype": null,
"style": "Warning",
"workflow_state_name": "Approval Pending"
},
{
"docstatus": 0,
"doctype": "Workflow State",
"icon": "",
"modified": "2021-11-25 14:45:03.296772",
"name": "Publish Pending",
"parent": null,
"parentfield": null,
"parenttype": null,
"style": "Info",
"workflow_state_name": "Publish Pending"
},
{
"docstatus": 0,
"doctype": "Workflow State",
"icon": "",
"modified": "2021-10-29 13:08:39.080853",
"name": "Published",
"parent": null,
"parentfield": null,
"parenttype": null,
"style": "Success",
"workflow_state_name": "Published"
},
{
"docstatus": 0,
"doctype": "Workflow State",
"icon": "",
"modified": "2021-11-25 14:38:19.430698",
"name": "Revoked",
"parent": null,
"parentfield": null,
"parenttype": null,
"style": "Danger",
"workflow_state_name": "Revoked"
},
{
"docstatus": 0,
"doctype": "Workflow State",
"icon": "",
"modified": "2021-11-25 15:32:39.015128",
"name": "Publish Approval Pending",
"parent": null,
"parentfield": null,
"parenttype": null,
"style": "Primary",
"workflow_state_name": "Publish Approval Pending"
},
{
"docstatus": 0,
"doctype": "Workflow State",
"icon": "",
"modified": "2021-11-26 15:26:56.857786",
"name": "Publish Ready",
"parent": null,
"parentfield": null,
"parenttype": null,
"style": "Info",
"workflow_state_name": "Publish Ready"
}
]

4652
smart_service/fixtures/workspace.json

File diff suppressed because it is too large

25
smart_service/hooks.py

@ -8,7 +8,9 @@ app_icon = ""
app_color = "#E31A37"
app_email = "siva@hnsonline.com"
app_license = "MIT"
app_logo_url = "/assets/smart_service/images/Mahindra_Newlogo.png"
app_logo_url = "/assets/smart_service/images/Mahindra_NewSplash.png"
# app_logo_url = "/assets/smart_service/images/ic_app_icon1.png"
# ic_app_icon.png
# for desk css
app_include_css = ["/assets/css/smart_service.min.css"]
@ -17,8 +19,9 @@ web_include_css = ["/assets/css/smart_service.min.css"]
# Icons
website_context = {
"favicon": "/assets/smart_service/images/Mahindra_title.png",
"splash_image": "/assets/smart_service/images/Mahindra_Newlogo.png",
"favicon": "/assets/smart_service/images/Smart_service_logo.png",
"splash_image": "/assets/smart_service/images/Mahindra_NewSplash.png",
# "splash_image": "/assets/smart_service/images/ic_app_icon1.png",
"app_name" : "smart service"
}
# Includes in <head>
@ -189,10 +192,18 @@ user_data_fields = [
# "smart_service.auth.validate"
# ]
fixtures = [
#"Custom Field",
#"Property Setter",
#"Client Script"
"Server Script"
#"doctype": "Notification",
#"filters": [{"is_standard":0}]
"Custom Field",
"Property Setter",
"Client Script",
"Server Script",
"Workflow",
"Workflow Action Master",
"Workflow State",
"Role",
"Workspace",
"Custom DocPerm"
]

29
smart_service/mahindra_smart_service/report/installation_report/installation_report.py

@ -31,20 +31,21 @@ def get_data(filters):
def get_columns():
columns = [
{"label": _("Zone"), "fieldname": "zone", "fieldtype": "Data", "width": 100},
{"label": _("Dealer Location"), "fieldname": "area", "fieldtype":"Data","width": 150},
{"label": _("Dealer Code"), "fieldname": "dealer_code", "fieldtype": "Data", "width": 100},
{"label": _("Dealer Name"), "fieldname": "dealer_name", "fieldtype":"Data","width": 150},
{"label": _("Device"), "fieldname": "device_type", "fieldtype": "Data","width": 100},
{"label": _("Device ID"), "fieldname": "device_id", "fieldtype": "Data", "width": 100},
{"label": _("Device OS"), "fieldname": "os", "fieldtype": "Data", "width": 100},
{"label": _("OS Version"), "fieldname": "os_version", "fieldtype": "Data", "width": 100},
{"label": _("User ID"), "fieldname": "user_id", "fieldtype": "Data", "width": 100},
{"label": _("User Name"), "fieldname": "user_name", "fieldtype": "Data", "width": 100},
{"label": _("Activity Type"), "fieldname": "type", "fieldtype": "Data","width": 100},
{"label": _("App Installation Date"), "fieldname": "date_time_stamp", "fieldtype": "DateTime","width": 200},
{"label": _("App Last Accessed Date"), "fieldname": "date", "fieldtype": "DateTime","width": 200},
{"label": _("App Version No"), "fieldname": "app_current_version", "fieldtype": "Data", "width": 150},
{"label": _("<b>Zone</b>"), "fieldname": "zone", "fieldtype": "Data", "width": 100},
{"label": _("<b>Area Office</b>"), "fieldname": "area", "fieldtype":"Data","width": 150},
{"label": _("<b>Dealer Code</b>"), "fieldname": "dealer_code", "fieldtype": "Data", "width": 100},
{"label": _("<b>Dealer Name</b>"), "fieldname": "dealer_name", "fieldtype":"Data","width": 150},
{"label": _("<b>Installation</b>"), "fieldname": "device", "fieldtype": "Data","width": 100},
{"label": _("<b>Device</b>"), "fieldname": "device_type", "fieldtype": "Data","width": 100},
{"label": _("<b>Device ID</b>"), "fieldname": "device_id", "fieldtype": "Data", "width": 100},
{"label": _("<b>Device OS</b>"), "fieldname": "os", "fieldtype": "Data", "width": 100},
{"label": _("<b>OS Version</b>"), "fieldname": "os_version", "fieldtype": "Data", "width": 100},
{"label": _("<b>User ID</b>"), "fieldname": "user_id", "fieldtype": "Data", "width": 100},
{"label": _("<b>User Name</b>"), "fieldname": "user_name", "fieldtype": "Data", "width": 100},
{"label": _("<b>Activity Type</b>"), "fieldname": "type", "fieldtype": "Data","width": 100},
{"label": _("<b>App Installation Date</b>"), "fieldname": "date_time_stamp", "fieldtype": "DateTime","width": 200},
{"label": _("<b>App Last Accessed Date</b>"), "fieldname": "date", "fieldtype": "DateTime","width": 200},
{"label": _("<b>App Version No</b>"), "fieldname": "app_current_version", "fieldtype": "Data", "width": 150},
]
return columns

27
smart_service/mahindra_smart_service/report/login_report/login_report.py

@ -32,23 +32,22 @@ def get_data(filters):
return data
else:
frappe.msgprint('No Data for Selected Filters.')
def get_columns():
columns = [
{"label": _("Date"), "fieldname": "date", "fieldtype": "Date", "width": 100},
{"label": _("Time"), "fieldname": "time", "fieldtype": "DateTime", "width": 130},
{"label": _("Zone"), "fieldname": "zone", "fieldtype": "Data", "width": 100},
{"label": _("Dealer Location"), "fieldname": "area", "fieldtype": "Data", "width": 100},
{"label": _("Dealer Code"), "fieldname": "dealer_code", "fieldtype": "Data", "width": 150},
{"label": _("Dealer Name"), "fieldname": "dealer_name", "fieldtype":"Data","width": 150},
{"label": _("Device"), "fieldname": "device_type", "fieldtype": "Data", "width": 100},
{"label": _("Device ID"), "fieldname": "device_id", "fieldtype": "Data", "width": 150},
{"label": _("User ID"), "fieldname": "user_id", "fieldtype": "Data", "width": 150},
{"label": _("User Name"), "fieldname": "user_name", "fieldtype": "Data", "width": 100},
{"label": _("Latitude"), "fieldname": "latitude", "fieldtype": "Data", "width": 100},
{"label": _("Longitude"), "fieldname": "longitude", "fieldtype": "Data", "width": 100},
{"label": _("Count"), "fieldname": "count", "fieldtype": "Data", "width": 100},
{"label": _("<b>Date</b>"), "fieldname": "date", "fieldtype": "Date", "width": 100},
{"label": _("<b>Time</b>"), "fieldname": "time", "fieldtype": "DateTime", "width": 130},
{"label": _("<b>Zone</b>"), "fieldname": "zone", "fieldtype": "Data", "width": 100},
{"label": _("<b>Area Office</b>"), "fieldname": "area", "fieldtype": "Data", "width": 100},
{"label": _("<b>Dealer Code</b>"), "fieldname": "dealer_code", "fieldtype": "Data", "width": 150},
{"label": _("<b>Dealer Name</b>"), "fieldname": "dealer_name", "fieldtype":"Data","width": 150},
{"label": _("<b>Device</b>"), "fieldname": "device_type", "fieldtype": "Data", "width": 100},
{"label": _("<b>Device ID</b>"), "fieldname": "device_id", "fieldtype": "Data", "width": 150},
{"label": _("<b>User ID</b>"), "fieldname": "user_id", "fieldtype": "Data", "width": 150},
{"label": _("<b>User Name</b>"), "fieldname": "user_name", "fieldtype": "Data", "width": 100},
{"label": _("<b>Latitude</b>"), "fieldname": "latitude", "fieldtype": "Data", "width": 100},
{"label": _("<b>Longitude</b>"), "fieldname": "longitude", "fieldtype": "Data", "width": 100},
{"label": _("<b>Count</b>"), "fieldname": "count", "fieldtype": "Data", "width": 100},
]
return columns

37
smart_service/masters/doctype/variant/variant.json

@ -60,23 +60,6 @@
"fieldname": "column_break_4",
"fieldtype": "Column Break"
},
{
"fetch_from": "vehicle.vehicle_segment",
"fieldname": "vehicle_segment",
"fieldtype": "Data",
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Vehicle Segment",
"read_only": 1
},
{
"fetch_from": "vehicle.vehicle_segment_id",
"fieldname": "vehicle_segment_id",
"fieldtype": "Data",
"hidden": 1,
"label": "Vehicle Segment ID",
"read_only": 1
},
{
"fieldname": "variant_image",
"fieldtype": "Attach Image",
@ -96,11 +79,29 @@
"in_standard_filter": 1,
"label": "myID",
"set_only_once": 1
},
{
"fetch_from": "vehicle.vehicle_segment",
"fieldname": "vehicle_segment",
"fieldtype": "Link",
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Vehicle Segment",
"options": "Vehicle Segment",
"read_only": 1
},
{
"fetch_from": "vehicle.vehicle_segment_id",
"fieldname": "vehicle_segment_id",
"fieldtype": "Data",
"hidden": 1,
"label": "Vehicle Segment ID",
"read_only": 1
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2022-02-18 11:44:36.707430",
"modified": "2022-03-01 15:06:32.534454",
"modified_by": "Administrator",
"module": "Masters",
"name": "Variant",

2
smart_service/masters/doctype/vehicle/vehicle.json

@ -118,7 +118,7 @@
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2022-02-18 11:47:20.522687",
"modified": "2022-02-22 18:11:19.333346",
"modified_by": "Administrator",
"module": "Masters",
"name": "Vehicle",

13
smart_service/public/css/smart_service.css

@ -20,12 +20,21 @@
.app-logo {
width: 100px !important;
width: 200px !important;
height: 50px !important;
image-rendering: -webkit-optimize-contrast !important;
filter: none !important;
}
.page-card-head img {
max-height: 50px !important;
}
.navbar{
box-shadow: 7px -2px 11px #E31A37;
}
.navbar-home img {
max-height: 50px !important;
width: auto;
}
.a.nav-link.btn-login-area.active,.navbar-light .navbar-nav .nav-link.active, .navbar-light .navbar-nav .nav-link:focus, .navbar-light .navbar-nav .nav-link:hover {
color: #E31A37!important;

BIN
smart_service/public/images/Mahindra_NewSplash.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

BIN
smart_service/public/images/Smart_service_logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

5
smart_service/transactions/doctype/kilometer_mapping_items/kilometer_mapping_items.json

@ -13,9 +13,10 @@
"fields": [
{
"fieldname": "kilometer",
"fieldtype": "Data",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Kilometer",
"options": "Service Kilometers",
"read_only": 1
},
{
@ -43,7 +44,7 @@
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2022-02-17 12:30:17.047442",
"modified": "2022-03-01 12:45:05.104388",
"modified_by": "Administrator",
"module": "Transactions",
"name": "Kilometer Mapping_Items",

23
smart_service/transactions/doctype/procedure/procedure.json

@ -29,6 +29,8 @@
"estimated_time",
"section_break_12",
"procedure_filter",
"column_break_20",
"step_filter",
"section_break_18",
"procedure_details",
"html_reference_section",
@ -139,7 +141,8 @@
"fieldname": "procedure_details",
"fieldtype": "Table",
"label": "Procedure_Details",
"options": "Procedure_Details"
"options": "Procedure_Details",
"read_only_depends_on": "eval:doc.workflow_state == \"Publish Ready\""
},
{
"fetch_from": "variant_mapping.vehicle",
@ -152,13 +155,13 @@
},
{
"fieldname": "section_break_18",
"fieldtype": "Section Break"
"fieldtype": "Section Break",
"read_only_depends_on": "eval:doc.workflow_state == \"Publish Ready\""
},
{
"fieldname": "procedure_filter",
"fieldtype": "Select",
"label": "Title",
"options": "All"
"label": "Title"
},
{
"fetch_from": "sub_systems.myid",
@ -210,11 +213,21 @@
"hidden": 1,
"label": "Procedure HTML Ref",
"options": "Procedure HTML Ref"
},
{
"fieldname": "column_break_20",
"fieldtype": "Column Break"
},
{
"fieldname": "step_filter",
"fieldtype": "Select",
"label": "Step Name",
"read_only_depends_on": "eval:doc.procedure_filter == \"All\""
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2022-02-18 15:42:51.656023",
"modified": "2022-03-01 17:31:37.064021",
"modified_by": "Administrator",
"module": "Transactions",
"name": "Procedure",

21
smart_service/transactions/doctype/procedure_details/procedure_details.json

@ -9,7 +9,7 @@
"step_name",
"content_type",
"content",
"content1",
"temp_cnt",
"file",
"preview"
],
@ -49,18 +49,10 @@
"label": "Content",
"read_only_depends_on": "eval:doc.content_type == \"Link\""
},
{
"fieldname": "content1",
"fieldtype": "Small Text",
"hidden": 1,
"label": "Content1",
"options": "URL",
"print_hide": 1,
"read_only_depends_on": "eval:doc.content_type == \"Link\""
},
{
"fieldname": "file",
"fieldtype": "Attach",
"in_list_view": 1,
"label": "File",
"read_only_depends_on": "eval: doc.content_type != \"File\""
},
@ -70,12 +62,19 @@
"fieldtype": "Image",
"label": "Preview",
"options": "file"
},
{
"fieldname": "temp_cnt",
"fieldtype": "Small Text",
"hidden": 1,
"label": "Temp Cnt",
"options": "URL"
}
],
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2022-02-21 10:20:11.732503",
"modified": "2022-02-25 12:35:29.270218",
"modified_by": "Administrator",
"module": "Transactions",
"name": "Procedure_Details",

5
smart_service/transactions/doctype/publish/publish.json

@ -55,8 +55,7 @@
"fieldtype": "Date",
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Planned Publish Date",
"reqd": 1
"label": "Planned Publish Date"
},
{
"allow_on_submit": 1,
@ -225,7 +224,7 @@
"index_web_pages_for_search": 1,
"is_submittable": 1,
"links": [],
"modified": "2022-02-18 19:28:34.325727",
"modified": "2022-02-24 13:02:28.906452",
"modified_by": "Administrator",
"module": "Transactions",
"name": "Publish",

5
smart_service/transactions/doctype/system_mapping/system_mapping.json

@ -133,8 +133,7 @@
{
"fieldname": "system_filter",
"fieldtype": "Select",
"label": "System Filter",
"options": "All"
"label": "System Filter"
},
{
"fieldname": "kilometer_mapping_section",
@ -170,7 +169,7 @@
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2022-02-11 12:44:57.772943",
"modified": "2022-02-25 14:58:53.744459",
"modified_by": "Administrator",
"module": "Transactions",
"name": "System Mapping",

28
smart_service/transactions/doctype/system_mapping/system_mapping.py

@ -3,15 +3,22 @@
import frappe
from frappe.model.document import Document
current_db_name = frappe.conf.get("db_name")
class SystemMapping(Document):
def validate(self):
if self.systems_assets:
for x in self.get("systems_assets"):
if not x.system_asset:
frappe.throw("Please choose the system asset file in row no " + str(x.idx))
if not x.language:
frappe.throw("Please choose the language in row no " + str(x.idx))
values = self.get('system_sub_systems')
for i in range(0, len(values)):
if values[i].systems:
for x in range(i + 1, len(values)):
if values[i].systems == values[x].systems and values[i].sub_systems == values[x].sub_systems and values[i].procedure == values[x].procedure:
frappe.throw(("Warning: Same systems (with similar sub systems and procedure) has been entered multiple times."))
if self.systems_assets:
for x in self.get("systems_assets"):
if not x.system_asset:
frappe.throw("Please choose the system asset file in row no " + str(x.idx))
if not x.language:
frappe.throw("Please choose the language in row no " + str(x.idx))
@frappe.whitelist()
def update_mat(doc,km,vehicle,type,sub_systems,mat_initial,mat_update,km_applicable):
@ -37,16 +44,25 @@ def update_mat(doc,km,vehicle,type,sub_systems,mat_initial,mat_update,km_applica
if type == "Deleted":
frappe.db.sql("""delete from `tabKilometer Mapping_Items` where parent = %s and sub_systems=%s and mat=%s""",(kilometer_mapping.name,str(sub_systems),str(mat_initial)),as_dict=True)
def variant(doctype, txt, searchfield, start, page_len, filters):
current_db_name = frappe.conf.get("db_name")
return frappe.db.sql(""" select name,variant,vehicle,vehicle_segment,active_status
FROM {0}.tabVariant where
(active_status like "%%%(txt)s%%" or vehicle_segment like "%%%(txt)s%%" or name like "%%%(txt)s%%" or variant like "%%%(txt)s%%") order by modified desc limit %(start)s, %(page_len)s """.format(current_db_name)%{'txt': txt, 'start': start, 'page_len': page_len})
@frappe.whitelist()
def systems(doctype, txt, searchfield, start, page_len, filters):
current_db_name = frappe.conf.get("db_name")
return frappe.db.sql(""" select name FROM {0}.tabSystems where
(name like "%%%(txt)s%%") order by modified desc limit %(start)s, %(page_len)s """.format(current_db_name)%{'txt': txt, 'start': start, 'page_len': page_len})
@frappe.whitelist()
def sub_systems(doctype, txt, searchfield, start, page_len, filters):
current_db_name = frappe.conf.get("db_name")
return frappe.db.sql(""" select name FROM {0}.`tabSub Systems` where
(name like "%%%(txt)s%%") order by modified desc limit %(start)s, %(page_len)s """.format(current_db_name)%{'txt': txt, 'start': start, 'page_len': page_len})
@frappe.whitelist()
def procedure(doctype, txt, searchfield, start, page_len, filters):
current_db_name = frappe.conf.get("db_name")

2
smart_service/transactions/report/audit_report/audit_report.js

@ -224,7 +224,7 @@ frappe.query_reports["Audit Report"] = {
// console.log(val)
// <a onclick="window.open(this.href,'_blank');return false;" href="http://www.foracure.org.au">Some Other Site</a>
value=val
value = val
console.log(value)
// <a href="http://192.168.1.58:81/app/procedure/THAR.AX-0100-Air Filter Element Clean-hi">
}

20
smart_service/transactions/report/audit_report/audit_report.py

@ -212,7 +212,7 @@ def appendToDic3(mapData, procSize, j, indent, header, procedure):
'indent': indent,
'header': header,
'active_status': stepLength,
'type': 'Procedure',
'type': 'Title',
'modified': dateList[-1]
}
@ -300,39 +300,39 @@ def getColumns():
columns = [
{
"fieldname": "procedure_name",
"label": _("Mapping"),
"label": _("<b>Mapping</b>"),
"fieldtype": "Data",
"width": 400
},
{
"fieldname": "type",
"label": _("Type"),
"label": _("<b>Type</b>"),
"fieldtype": "Data",
"width": 90
},
{
"fieldname": "description",
"label": _("Description"),
"label": _("<b>Description</b>"),
"fieldtype": "Data",
"width": 200
},
{
"fieldname": "modified",
"label": _("Last Modified date"),
"label": _("<b>Last Modified date</b>"),
"fieldtype": "Data",
"width": 200
},
{
"fieldname": "active_status",
"label": _("Status"),
"label": _("<b>Status</b>"),
"fieldtype": "Data",
"options": "",
"width": 150
},
{
"fieldname": "en_workflow_state",
"label": _("Workflow State"),
"label": _("<b>Workflow State</b>"),
"fieldtype": "Link",
"options": "Procedure",
"width": 150
@ -344,21 +344,21 @@ def getColumns():
for i in custom_lang:
lang_status = {
"fieldname": "{}_active_status".format(i['lang_code']),
"label": _("{} Status".format(i['lang_code'].upper())),
"label": _("<b>{} Status</b>".format(i['lang_code'].upper())),
"fieldtype": "Data",
"options": "",
"width": 200
}
lang_modified = {
"fieldname": "{}_modified".format(i['lang_code']),
"label": _("{} Last Modified".format(i['lang_code'].upper())),
"label": _("<b>{} Last Modified</b>".format(i['lang_code'].upper())),
"fieldtype": "Data",
"options": "",
"width": 200
}
lang_workflow = {
"fieldname": "{}_workflow_state".format(i['lang_code']),
"label": _("{} Workflow State".format(i['lang_code'].upper())),
"label": _("<b>{} Workflow State</b>".format(i['lang_code'].upper())),
"fieldtype": "Link",
"options": "Procedure",
"width": 150

6
smart_service/transactions/report/kilometer_mapping/kilometer_mapping.py

@ -37,12 +37,12 @@ def get_columns(filters,kilometer_mapping):
columns = [
{
"fieldname": "sub_systems",
"label": _("Sub System"),
"label": _("<b>Sub System</b>"),
"fieldtype": "Data",
"width": 300
},{
"fieldname": "mat",
"label": _("MAT"),
"label": _("<b>MAT</b>"),
"fieldtype": "Data",
"width": 100
}]
@ -52,7 +52,7 @@ def get_columns(filters,kilometer_mapping):
for d in kilometer_mapping:
kilometers = {
"fieldname": "{}".format(d[0]),
"label": _("{}".format(d[0])),
"label": _("<b>{}</b>".format(d[0])),
"fieldtype": "Data",
"options": "",
"width": 70

Loading…
Cancel
Save