Browse Source

final upload from frappesserv01

master
hns 3 years ago
parent
commit
4992a109fb
  1. BIN
      smart_service/__pycache__/hooks.cpython-38.pyc
  2. 4
      smart_service/add_ons/doctype/app_device/app_device.json
  3. 10
      smart_service/add_ons/doctype/circular/circular.json
  4. 10
      smart_service/add_ons/doctype/model_hit/model_hit.json
  5. 10
      smart_service/add_ons/doctype/model_usage/model_usage.json
  6. 10
      smart_service/add_ons/doctype/teknet_module/teknet_module.json
  7. BIN
      smart_service/add_ons/report/feedback_report/__pycache__/feedback_report.cpython-38.pyc
  8. 6
      smart_service/add_ons/report/feedback_report/feedback_report.py
  9. BIN
      smart_service/add_ons/report/model_download_report/__pycache__/model_download_report.cpython-38.pyc
  10. 37
      smart_service/add_ons/report/model_download_report/model_download_report.py
  11. BIN
      smart_service/add_ons/report/model_hit_report/__pycache__/model_hit_report.cpython-38.pyc
  12. 15
      smart_service/add_ons/report/model_hit_report/model_hit_report.js
  13. 43
      smart_service/add_ons/report/model_hit_report/model_hit_report.py
  14. BIN
      smart_service/apis/__pycache__/addon_api.cpython-38.pyc
  15. BIN
      smart_service/apis/__pycache__/app_user_login.cpython-38.pyc
  16. BIN
      smart_service/apis/__pycache__/publish_api.cpython-38.pyc
  17. BIN
      smart_service/apis/__pycache__/transaction_api.cpython-38.pyc
  18. BIN
      smart_service/apis/__pycache__/update_validation.cpython-38.pyc
  19. 16
      smart_service/apis/addon_api.py
  20. 25
      smart_service/apis/app_user_login.py
  21. 27
      smart_service/apis/transaction_api.py
  22. 29
      smart_service/apis/update_validation.py
  23. 29
      smart_service/hooks.py
  24. BIN
      smart_service/mahindra_smart_service/doctype/release/__pycache__/release.cpython-38.pyc
  25. BIN
      smart_service/mahindra_smart_service/doctype/release_docs/__pycache__/release_docs.cpython-38.pyc
  26. BIN
      smart_service/mahindra_smart_service/report/_applog_translation/__pycache__/_applog_translation.cpython-38.pyc
  27. 27
      smart_service/mahindra_smart_service/report/_applog_translation/_applog_translation.py
  28. BIN
      smart_service/mahindra_smart_service/report/_drive_translation/__pycache__/_drive_translation.cpython-38.pyc
  29. 4
      smart_service/mahindra_smart_service/report/_drive_translation/_drive_translation.py
  30. 212
      smart_service/mahindra_smart_service/report/_file_structure/_file_structure.js
  31. BIN
      smart_service/mahindra_smart_service/report/_fuel_translation/__pycache__/_fuel_translation.cpython-38.pyc
  32. 10
      smart_service/mahindra_smart_service/report/_fuel_translation/_fuel_translation.js
  33. 4
      smart_service/mahindra_smart_service/report/_fuel_translation/_fuel_translation.py
  34. BIN
      smart_service/mahindra_smart_service/report/_sub_systems_translation/__pycache__/_sub_systems_translation.cpython-38.pyc
  35. 4
      smart_service/mahindra_smart_service/report/_sub_systems_translation/_sub_systems_translation.py
  36. BIN
      smart_service/mahindra_smart_service/report/_systems_translation/__pycache__/_systems_translation.cpython-38.pyc
  37. 4
      smart_service/mahindra_smart_service/report/_systems_translation/_systems_translation.py
  38. BIN
      smart_service/mahindra_smart_service/report/_transmission_translation/__pycache__/_transmission_translation.cpython-38.pyc
  39. 4
      smart_service/mahindra_smart_service/report/_transmission_translation/_transmission_translation.py
  40. BIN
      smart_service/mahindra_smart_service/report/_variant_translation/__pycache__/_variant_translation.cpython-38.pyc
  41. 4
      smart_service/mahindra_smart_service/report/_variant_translation/_variant_translation.py
  42. BIN
      smart_service/mahindra_smart_service/report/_vehicle_segment_translation/__pycache__/_vehicle_segment_translation.cpython-38.pyc
  43. 4
      smart_service/mahindra_smart_service/report/_vehicle_segment_translation/_vehicle_segment_translation.py
  44. BIN
      smart_service/mahindra_smart_service/report/_vehicle_translation/__pycache__/_vehicle_translation.cpython-38.pyc
  45. 4
      smart_service/mahindra_smart_service/report/_vehicle_translation/_vehicle_translation.py
  46. BIN
      smart_service/mahindra_smart_service/report/installation_report/__pycache__/installation_report.cpython-38.pyc
  47. 12
      smart_service/mahindra_smart_service/report/installation_report/installation_report.py
  48. BIN
      smart_service/mahindra_smart_service/report/login_report/__pycache__/login_report.cpython-38.pyc
  49. 13
      smart_service/mahindra_smart_service/report/login_report/login_report.py
  50. BIN
      smart_service/masters/doctype/vehicle/__pycache__/vehicle.cpython-38.pyc
  51. 11
      smart_service/masters/doctype/vehicle/vehicle.py
  52. 172
      smart_service/public/css/smart_service.css
  53. 2
      smart_service/templates/includes/login/_login.js
  54. 10
      smart_service/transactions/doctype/procedure_details/procedure_details.json
  55. BIN
      smart_service/transactions/report/audit_report/__pycache__/audit_report.cpython-38.pyc
  56. 265
      smart_service/transactions/report/audit_report/audit_report.js
  57. 75
      smart_service/transactions/report/audit_report/audit_report.py

BIN
smart_service/__pycache__/hooks.cpython-38.pyc

Binary file not shown.

4
smart_service/add_ons/doctype/app_device/app_device.json

@ -1,6 +1,6 @@
{
"actions": [],
"autoname": "I-.####",
"autoname": "AppDev-.####",
"creation": "2021-11-08 17:49:56.262550",
"doctype": "DocType",
"editable_grid": 1,
@ -70,7 +70,7 @@
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2022-01-28 12:56:52.746692",
"modified": "2022-02-03 13:10:00.963263",
"modified_by": "Administrator",
"module": "Add Ons",
"name": "App Device",

10
smart_service/add_ons/doctype/circular/circular.json

@ -11,6 +11,7 @@
"status",
"valid_till",
"section_break_4",
"circular_image",
"description",
"amended_from"
],
@ -24,7 +25,7 @@
},
{
"fieldname": "description",
"fieldtype": "Text Editor",
"fieldtype": "Small Text",
"in_list_view": 1,
"label": "Description",
"reqd": 1
@ -58,12 +59,17 @@
"fieldname": "valid_till",
"fieldtype": "Date",
"label": "Valid Till"
},
{
"fieldname": "circular_image",
"fieldtype": "Attach",
"label": "Circular Image"
}
],
"index_web_pages_for_search": 1,
"is_submittable": 1,
"links": [],
"modified": "2022-01-28 12:44:24.971752",
"modified": "2022-02-04 10:27:12.813102",
"modified_by": "Administrator",
"module": "Add Ons",
"name": "Circular",

10
smart_service/add_ons/doctype/model_hit/model_hit.json

@ -14,7 +14,8 @@
"download_vehicle_version",
"download_vehicle_date",
"download_vehicle_language_id",
"download_vehicle_current_version"
"download_vehicle_current_version",
"device_type"
],
"fields": [
{
@ -61,11 +62,16 @@
"fieldname": "download_vehicle_current_version",
"fieldtype": "Data",
"label": "Download Vehicle Current Version"
},
{
"fieldname": "device_type",
"fieldtype": "Data",
"label": "Device Type"
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2022-01-28 12:58:06.556118",
"modified": "2022-02-01 13:00:12.216340",
"modified_by": "Administrator",
"module": "Add Ons",
"name": "Model Hit",

10
smart_service/add_ons/doctype/model_usage/model_usage.json

@ -19,7 +19,8 @@
"procedure_id",
"steps_id",
"menu_id",
"language"
"language",
"device_type"
],
"fields": [
{
@ -91,11 +92,16 @@
"fieldname": "language",
"fieldtype": "Data",
"label": "Language"
},
{
"fieldname": "device_type",
"fieldtype": "Data",
"label": "Device Type"
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2022-01-28 12:58:08.631540",
"modified": "2022-02-01 12:59:57.225198",
"modified_by": "Administrator",
"module": "Add Ons",
"name": "Model Usage",

10
smart_service/add_ons/doctype/teknet_module/teknet_module.json

@ -7,7 +7,8 @@
"engine": "InnoDB",
"field_order": [
"teknet_module_name",
"active_status"
"active_status",
"flvl_id"
],
"fields": [
{
@ -20,11 +21,16 @@
"fieldtype": "Select",
"label": "Active Status",
"options": "Active\nInactive"
},
{
"fieldname": "flvl_id",
"fieldtype": "Int",
"label": "Flvl ID"
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2022-01-28 12:56:14.758742",
"modified": "2022-02-02 11:27:22.812375",
"modified_by": "Administrator",
"module": "Add Ons",
"name": "Teknet Module",

BIN
smart_service/add_ons/report/feedback_report/__pycache__/feedback_report.cpython-38.pyc

Binary file not shown.

6
smart_service/add_ons/report/feedback_report/feedback_report.py

@ -13,12 +13,12 @@ def execute(filters=None):
return columns, data
def get_data(filters):
current_db_name = frappe.conf.get("db_name")
data = frappe.db.sql("""select uf.name,uf.date,uf.subject,uf.user_name,uf.status,uf.attachments,uf.closure_date,uf.closed_by,
uf.description,uf.feedback_type,dealer.dealer_code,dealer.zone,dealer.dealer_name,uf.closure_date,uf.closed_by,
dealer.area,au.user_id,au.first_name from `tabUser Feedback` uf,`tabApp Dealer` dealer,`tabApp Users` au
dealer.area,au.user_id,au.first_name from {0}.`tabUser Feedback` uf,{0}.`tabApp Dealer` dealer,{0}.`tabApp Users` au
where uf.user_name = au.name and
(uf.modified between %s and %s) group by uf.name""",(filters.get('from_date'), filters.get('to_date')), as_dict=1)
#frappe.throw("DATA" + str(data))
(date(uf.modified) between '{1}' and '{2}') group by uf.name""".format(current_db_name,filters.get('from_date'), filters.get('to_date')), as_dict=1)
if data:
return data
else:

BIN
smart_service/add_ons/report/model_download_report/__pycache__/model_download_report.cpython-38.pyc

Binary file not shown.

37
smart_service/add_ons/report/model_download_report/model_download_report.py

@ -21,14 +21,14 @@ def get_data(filters):
from_date=filters['from_date']
to_date=filters['to_date']
modelfilter=filters['model']
try:
vId=frappe.db.sql("""SELECT myid FROM _d6463952657fa86c.tabVehicle where vehicle='{0}';""".format(modelfilter), as_dict=1)
vId=vId[-1]
vId=vId['myid']
except:
frappe.msgprint('Vehicle ID Mismatching.')
data = frappe.db.sql("""SELECT date(date) as date, device_id, app_version, download_vehicle_id, download_vehicle_version, download_vehicle_date, download_vehicle_language_id, download_vehicle_current_version, user_id
FROM {0}.`tabModel Hit` WHERE download_vehicle_id='{1}' and (date(date) between '{2}' and '{3}');""".format(current_db_name, vId, from_date, to_date), as_dict=1)
# try:
# vId=frappe.db.sql("""SELECT myid FROM _d6463952657fa86c.tabVehicle where vehicle='{0}';""".format(modelfilter), as_dict=1)
# vId=vId[-1]
# vId=vId['myid']
# except:
# frappe.msgprint('Vehicle ID Mismatching.')
data = frappe.db.sql("""SELECT date(date) as date, device_id, device_type, app_version, download_vehicle_id, download_vehicle_version, download_vehicle_date, download_vehicle_language_id, download_vehicle_current_version, user_id
FROM {0}.`tabModel Hit` WHERE download_vehicle_id='{1}' and (date(date) between '{2}' and '{3}');""".format(current_db_name, modelfilter, from_date, to_date), as_dict=1)
for d in data:
d['download_vehicle_id']=modelfilter
if d['user_id']:
@ -52,16 +52,17 @@ def get_data(filters):
def get_columns():
columns = [
{"label": _("Date"), "fieldname": "date", "fieldtype": "Date", "width": 100},
{"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": 150},
{"label": _("Dealer Name"), "fieldname": "dealer_name", "fieldtype": "Data", "width": 150},
{"label": _("Device"), "fieldname": "device_id", "fieldtype": "Data", "width": 100},
{"label": _("Downloaded Vehicle"), "fieldname": "download_vehicle_id", "fieldtype": "Data", "width": 170},
{"label": _("Downloaded Version"), "fieldname": "download_vehicle_current_version", "fieldtype": "Data", "width": 250},
{"label": _("Downloaded Language"), "fieldname": "download_vehicle_language_id", "fieldtype": "Data", "width": 250},
{"label": _("App Version"), "fieldname": "app_version", "fieldtype": "Data", "width": 150}
{"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>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},
{"label": _("<b>Device Type</b>"), "fieldname": "device_type", "fieldtype": "Data", "width": 130},
{"label": _("<b>Downloaded Vehicle</b>"), "fieldname": "download_vehicle_id", "fieldtype": "Data", "width": 170},
{"label": _("<b>Downloaded Version</b>"), "fieldname": "download_vehicle_current_version", "fieldtype": "Data", "width": 250},
{"label": _("<b>Downloaded Language</b>"), "fieldname": "download_vehicle_language_id", "fieldtype": "Data", "width": 250},
{"label": _("<b>App Version</b>"), "fieldname": "app_version", "fieldtype": "Data", "width": 150}
]
return columns

BIN
smart_service/add_ons/report/model_hit_report/__pycache__/model_hit_report.cpython-38.pyc

Binary file not shown.

15
smart_service/add_ons/report/model_hit_report/model_hit_report.js

@ -43,5 +43,18 @@ frappe.query_reports["Model Hit Report"] = {
}
}
]
],
"formatter": function (value, row, column, data, default_formatter) {
if (value === undefined || value === 0 || value === '' || value===null || value==='0' || value==='null' || value==='None'){
value = "-"
}
if (data && column.fieldname !== undefined){
column.align = 'center';
}
value = default_formatter(value, row, column, data);
return value;
}
};

43
smart_service/add_ons/report/model_hit_report/model_hit_report.py

@ -27,9 +27,9 @@ def get_data(filters):
variantfilter=filters['variant']
variantfilter=variantfilter.split(".")
data = frappe.db.sql("""SELECT date as date, device_id, module_id, vehicle_id, variant_id, system_id, sub_system_id, procedure_id, steps_id, count(*) as count, user_id, language
data = frappe.db.sql("""SELECT date as date, device_id, device_type, module_id, vehicle_id, variant_id, system_id, sub_system_id, procedure_id, steps_id, count(*) as count, user_id, language
FROM {0}.`tabModel Usage` WHERE vehicle_id='{1}' and variant_id='{2}' and (date(date) between '{3}' and '{4}')
GROUP BY date, user_id, module_id, device_id, vehicle_id, variant_id, variant_mapping_id, system_id, sub_system_id, procedure_id, steps_id, language;""".format(current_db_name, modelfilter, variantfilter[1], from_date, to_date), as_dict=1)
GROUP BY date(date), user_id, module_id, device_id, vehicle_id, variant_id, variant_mapping_id, system_id, sub_system_id, procedure_id, steps_id, language;""".format(current_db_name, modelfilter, variantfilter[1], from_date, to_date), as_dict=1)
for d in data:
if d['user_id']:
@ -55,9 +55,9 @@ def get_data(filters):
to_date=filters['to_date']
modelfilter=filters['model']
data = frappe.db.sql("""SELECT date as date, device_id, module_id, vehicle_id, variant_id, system_id, sub_system_id, procedure_id, steps_id, count(*) as count, user_id, language
data = frappe.db.sql("""SELECT date as date, device_id, device_type, module_id, vehicle_id, variant_id, system_id, sub_system_id, procedure_id, steps_id, count(*) as count, user_id, language
FROM {0}.`tabModel Usage` WHERE vehicle_id='{1}' and (date(date) between '{2}' and '{3}')
GROUP BY date, user_id, module_id, device_id, vehicle_id, variant_id, variant_mapping_id, system_id, sub_system_id, procedure_id, steps_id, language;""".format(current_db_name, modelfilter, from_date, to_date), as_dict=1)
GROUP BY date(date), user_id, module_id, device_id, vehicle_id, variant_id, variant_mapping_id, system_id, sub_system_id, procedure_id, steps_id, language;""".format(current_db_name, modelfilter, from_date, to_date), as_dict=1)
for d in data:
if d['user_id']:
@ -84,9 +84,9 @@ def get_data(filters):
to_date=filters['to_date']
variantfilter=filters['variant']
variantfilter=variantfilter.split(".")
data = frappe.db.sql("""SELECT date as date, device_id, module_id, vehicle_id, variant_id, system_id, sub_system_id, procedure_id, steps_id, count(*) as count, user_id, language
data = frappe.db.sql("""SELECT date as date, device_id, device_type, module_id, vehicle_id, variant_id, system_id, sub_system_id, procedure_id, steps_id, count(*) as count, user_id, language
FROM {0}.`tabModel Usage` WHERE vehicle_id='{1}' and variant_id='{2}' and (date(date) between '{3}' and '{4}')
GROUP BY date, user_id, module_id, device_id, vehicle_id, variant_id, variant_mapping_id, system_id, sub_system_id, procedure_id, steps_id, language;""".format(current_db_name, variantfilter[0], variantfilter[1], from_date, to_date), as_dict=1)
GROUP BY date(date), user_id, module_id, device_id, vehicle_id, variant_id, variant_mapping_id, system_id, sub_system_id, procedure_id, steps_id, language;""".format(current_db_name, variantfilter[0], variantfilter[1], from_date, to_date), as_dict=1)
for d in data:
if d['user_id']:
@ -110,21 +110,22 @@ def get_data(filters):
def get_columns():
columns = [
{"label": _("Date"), "fieldname": "date", "fieldtype": "Date", "width": 100},
{"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": 100},
{"label": _("Dealer Name"), "fieldname": "dealer_name", "fieldtype": "Data", "width": 100},
{"label": _("Device"), "fieldname": "device_id", "fieldtype": "Data", "width": 100},
{"label": _("Module"), "fieldname": "module_id", "fieldtype": "Data", "width": 150},
{"label": _("Model"), "fieldname": "vehicle_id", "fieldtype": "Data", "width": 100},
{"label": _("Variant"), "fieldname": "variant_id", "fieldtype": "Data", "width": 100},
{"label": _("System"), "fieldname": "system_id", "fieldtype": "Data", "width": 100},
{"label": _("Sub System"), "fieldname": "sub_system_id", "fieldtype": "Data", "width": 100},
{"label": _("Procedure"), "fieldname": "procedure_id", "fieldtype": "Data", "width": 100},
{"label": _("Steps"), "fieldname": "steps_id", "fieldtype": "Data", "width": 100},
{"label": _("Language"), "fieldname": "language", "fieldtype": "Data", "width": 100},
{"label": _("Count"), "fieldname": "count", "fieldtype": "Data", "width": 100}
{"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>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},
{"label": _("<b>Device Type</b>"), "fieldname": "device_type", "fieldtype": "Data", "width": 150},
{"label": _("<b>Module</b>"), "fieldname": "module_id", "fieldtype": "Data", "width": 150},
{"label": _("<b>Model</b>"), "fieldname": "vehicle_id", "fieldtype": "Data", "width": 150},
{"label": _("<b>Variant</b>"), "fieldname": "variant_id", "fieldtype": "Data", "width": 150},
{"label": _("<b>System</b>"), "fieldname": "system_id", "fieldtype": "Data", "width": 150},
{"label": _("<b>Sub System</b>"), "fieldname": "sub_system_id", "fieldtype": "Data", "width": 150},
{"label": _("<b>Procedure</b>"), "fieldname": "procedure_id", "fieldtype": "Data", "width": 150},
{"label": _("<b>Steps</b>"), "fieldname": "steps_id", "fieldtype": "Data", "width": 150},
{"label": _("<b>Language</b>"), "fieldname": "language", "fieldtype": "Data", "width": 150},
{"label": _("<b>Count</b>"), "fieldname": "count", "fieldtype": "Data", "width": 150}
]
return columns

BIN
smart_service/apis/__pycache__/addon_api.cpython-38.pyc

Binary file not shown.

BIN
smart_service/apis/__pycache__/app_user_login.cpython-38.pyc

Binary file not shown.

BIN
smart_service/apis/__pycache__/publish_api.cpython-38.pyc

Binary file not shown.

BIN
smart_service/apis/__pycache__/transaction_api.cpython-38.pyc

Binary file not shown.

BIN
smart_service/apis/__pycache__/update_validation.cpython-38.pyc

Binary file not shown.

16
smart_service/apis/addon_api.py

@ -9,8 +9,8 @@ current_db_name = frappe.conf.get("db_name")
def addon(args):
if args == "circular":
api = frappe.db.get_list(
"Circular", fields=["name", "title", "status", "description", "valid_till"]
)
"Circular", fields=["name", "title", "status", "description","circular_image", "valid_till"])
for i in api:
if i["status"] == "Active":
i["status"] = True
@ -27,11 +27,7 @@ def addon(args):
i["status"] = False
elif args == "teknet_group":
api = frappe.db.get_list(
"Teknet Group",
fields=["name", "teknet_group_code",
"teknet_group_description", "active_status"],
)
api = frappe.db.sql('''SELECT name,teknet_group_code,teknet_group_description,active_status FROM {}.`tabTeknet Group` order by teknet_group_description asc;'''.format(current_db_name),as_dict = True)
for i in api:
if i["active_status"] == "Active":
i["active_status"] = True
@ -146,18 +142,20 @@ def model_hit(args, request):
UserID = request["UserID"]
AppVersion = request["AppVersion"]
DeviceID = request["DeviceID"]
DeviceType = request["DeviceType"]
for i in request['VehicleDownloadhits']:
model_hit = frappe.new_doc('Model Hit')
model_hit.user_id = UserID
model_hit.app_version = AppVersion
model_hit.device_id = DeviceID
model_hit.device_type = DeviceType
model_hit.date = i['Date']
model_hit.download_vehicle_id = i['DownloadVehicleID']
model_hit.download_vehicle_version = i['DownloadVehicleVersion']
model_hit.download_vehicle_date = i['DownloadVehicleDate']
model_hit.download_vehicle_language_id = i['DownloadVehicleLanguageID']
model_hit.download_vehicle_current_version = i['DownloadVehicleCurrentVersion']
model_hit.save()
model_hit.insert(ignore_if_duplicate=True, ignore_mandatory=True)
return {"isSuccessful": True}
except:
return {"isSuccessful": False}
@ -171,11 +169,13 @@ def model_usage(args, request):
UserID = request["UserID"]
AppVersion = request["AppVersion"]
DeviceID = request["DeviceID"]
DeviceType = request["DeviceType"]
for i in request['ModuleUsagehits']:
model_usage = frappe.new_doc('Model Usage')
model_usage.user_id = UserID
model_usage.app_version = AppVersion
model_usage.device_id = DeviceID
model_usage.device_type = DeviceType
model_usage.date = i['Date']
model_usage.module_id = i['ModuleID']
model_usage.vehicle_id = i['VehicleID']

25
smart_service/apis/app_user_login.py

@ -35,6 +35,7 @@ def app_user_validation(usr, pwd):
else:
message_to_send={'status':0,'error':'Invalid Credentials'}
return message_to_send
elif technician_login==0 and mahindra_login==1:
response1 = requests.post("http://www.mahindramile.com/WindowAuth/Service.asmx/ValidateCredential", data=data, headers=headers)
decoded1 = response1.content.decode('utf-8')
@ -97,19 +98,19 @@ def app_user_validation(usr, pwd):
"FirstName": usr,
"LastName": "",
"IsActive": "True",
"UserType": "Mahindra User",
"UserType": "",
"SkillID": "",
"SkillName": "",
"UserTypeDesc": "",
"UserTypeDesc": "Mahindra User",
"PasswordChanged": "",
"AreaName": "Mahindra",
"Zone": "MAhindra",
"Zone": "Mahindra",
"LocationName": "Mahindra",
"ChannelNo": "",
"ServerDate": "",
"ServerTime": "",
"DealerName": "Mahindra",
"EmailId": "{}@mahindraemail.com".format(usr),
"EmailId": "{}@mahindra.com".format(usr),
"isLDAPAuthenticated": ""}
success_msg = None
@ -223,7 +224,7 @@ def grant_user_access(userdata,iid):
app_device.os_version = os_version
app_device.app_current_version = app_current_version
app_device.last_login = now()
app_device.insert(ignore_if_duplicate=True)
app_device.insert()
if frappe.db.exists({'doctype':'App Device','device_id' : device_id}):
app_user1=frappe.get_last_doc('App Users', filters={"email_id": email})
@ -251,7 +252,6 @@ def grant_user_access(userdata,iid):
else :
frappe.db.sql('''UPDATE {4}.`tabApp Device` set last_logged_in= '{0}', user_name = '{2}', device_type = '{3}' where name = "{1}";'''.format(now(),iid,email,user_type_desc,current_db_name))
frappe.db.commit()
app_user2=frappe.get_last_doc('App Users', filters={"email_id": email})
@ -270,11 +270,12 @@ def grant_user_access(userdata,iid):
docu = frappe.get_doc("Fish", None)
token = docu.apple
user_details['token'] = token
lst= frappe.db.sql('''SELECT name FROM {}.`tabApp Device` where device_id = "{}";'''.format(current_db_name,device_id), as_list=True)
lst1= frappe.db.sql('''SELECT name FROM {}.`tabApp Users` where email_id = "{}";'''.format(current_db_name,email), as_list=True)
lst= frappe.db.sql('''SELECT name FROM {}.`tabApp Device` where device_id = "{}" order by name desc limit 1;'''.format(current_db_name,device_id), as_list=True)
lst1= frappe.db.sql('''SELECT name FROM {}.`tabApp Users` where email_id = "{}" order by name desc limit 1;'''.format(current_db_name,email), as_list=True)
try:
user_details['Installation ID'] = lst[-1][0]
user_details['User ID'] = lst1[-1][0]
user_details['Installation ID'] = lst[0][0]
user_details['User ID'] = lst1[0][0]
return user_details
except:
return "Login Failure"
@ -291,8 +292,8 @@ def grant_user_access(userdata,iid):
docu = frappe.get_doc("Fish", None)
token = docu.apple
user_details['token'] = token
lst= frappe.db.sql('''SELECT name FROM {}.`tabApp Device` where device_id = "{}";'''.format(current_db_name,device_id), as_list=True)
lst1= frappe.db.sql('''SELECT name FROM {}.`tabApp Users` where email_id = "{}";'''.format(current_db_name,email), as_list=True)
lst= frappe.db.sql('''SELECT name FROM {}.`tabApp Device` where device_id = "{}" order by creation asc;'''.format(current_db_name,device_id), as_list=True)
lst1= frappe.db.sql('''SELECT name FROM {}.`tabApp Users` where email_id = "{}" order by creation asc;'''.format(current_db_name,email), as_list=True)
try:
user_details['Installation ID'] = lst[-1][0]
user_details['User ID'] = lst1[-1][0]

27
smart_service/apis/transaction_api.py

@ -12,13 +12,20 @@ base_url = os.path.expanduser("~") + "/frappe-bench/sites/"+site_name+"/public"
@frappe.whitelist()
def get_technical_manual(args):
manual_out=frappe.db.sql('''SELECT parent as variant, language, attach_file as file, active_status FROM {1}.`tabVariant Mapping_Assets` where parent='{0}' and category='Technical Manual' and parentfield = 'assets';'''.format(args,current_db_name), as_dict=True)
for i in manual_out:
file_size = os.path.getsize(base_url+i['file'])
i['file_size']=file_size
if i["active_status"] == "Active":
i["active_status"] = True
else:
i["active_status"] = False
return manual_out
try:
manual_out=frappe.db.sql('''SELECT parent as variant, language, attach_file as file, active_status FROM {1}.`tabVariant Mapping_Assets` where parent='{0}' and category='Technical Manual'
and parentfield = 'assets';'''.format(args,current_db_name), as_dict=True)
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
except:
return {"error":"File Not Found"}

29
smart_service/apis/update_validation.py

@ -93,10 +93,10 @@ def check_vehicle_update(vehicle_list):
l_id = v['LanguageID']
current_version = v['CurrentVersion']
if publish_type == 'Internal':
publish_data = frappe.db.sql('''select name,CAST(version AS DECIMAL(10,2)) as version from {}.tabPublish where vehicle= '{}' and language='{}' and publish_type= '{}' and version > {} and vehicle_status = 'Active';
publish_data = frappe.db.sql('''select name,CAST(version AS DECIMAL(10,2)) as version from {}.tabPublish where vehicle= '{}' and language='{}' and publish_type= '{}' and version > {} and vehicle_status = 'Active' and variant_mapping_status= 'Active';
'''.format(current_db_name, vehicle, l_id, publish_type, current_version), as_dict=True)
else:
publish_data = frappe.db.sql('''select name,version from {}.tabPublish where vehicle= '{}' and language='{}' and publish_type= '{}' and version > {} and vehicle_status = 'Active';
publish_data = frappe.db.sql('''select name,version from {}.tabPublish where vehicle= '{}' and language='{}' and publish_type= '{}' and version > {} and vehicle_status = 'Active' and variant_mapping_status= 'Active' ;
'''.format(current_db_name, vehicle, l_id, publish_type, current_version), as_dict=True)
@ -201,7 +201,7 @@ def check_vehicle_update(vehicle_list):
subsys = frappe.db.sql('''select `tabSystem Mapping_Sub System`.idx as subSystemdisplayorder, systems,sub_systems, symptom, component, estimated_time, rts, mat, cover_image, `tabSub Systems`.myid,
`tabSystem Mapping_Sub System`.active_status,`tabSystem Mapping_Sub System`.cover_image
from {4}.`tabSystem Mapping_Sub System` inner join {4}.`tabSub Systems` on `tabSystem Mapping_Sub System`.sub_systems = `tabSub Systems`.name
where `tabSystem Mapping_Sub System`.parent like '{0}-{3}%' and systems='{1}' and sub_systems='{2}';'''.format(
where `tabSystem Mapping_Sub System`.parent like '{0}-{3}%' and systems='{1}' and sub_systems='{2}' and `tabSystem Mapping_Sub System`.active_status = 'Active';'''.format(
d, i, j, l_id, current_db_name), as_dict=True)
if len(subsys) > 0:
@ -215,6 +215,13 @@ def check_vehicle_update(vehicle_list):
'''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)
# kms = frappe.db.sql(
# '''SELECT kilometer as kilometer_name, idx as kilometer_IDX, applicable as kilometers_applicable,mat FROM {}.`tabKilometer Mapping_Items` where sub_systems='{}'
# and substring(parent,-5,2) = '{}' order by kilometer_IDX;'''.format(current_db_name, j,l_id), as_dict=True)
# % (
# current_db_name, j,l_id), as_dict=True)
subsys['Config Kilometer'] = kms
for k in appendDict[d][i][j]:
@ -283,4 +290,18 @@ def update_completed(FileName):
os.remove(base_url+ FileName)
return {'isSuccessful':True}
except:
return {'isSuccessful':True}
return {'isSuccessful':True}
@frappe.whitelist()
def delete_complete(doc=None,method=None):
site_name = cstr(frappe.local.site)
base_url = os.path.expanduser("~") + "/frappe-bench/sites/"+site_name+"/public"
path = base_url+'/files/json_files/temp1/'
path_file = os.listdir(path)
if path_file:
for file in path_file:
os.remove(str(path) + str(file))

29
smart_service/hooks.py

@ -94,24 +94,21 @@ website_context = {
# ---------------
# Override standard doctype classes
override_doctype_class = {
#override_doctype_class = {
# "ToDo": "custom_app.overrides.CustomToDo"
}
#}
# Document Events
# ---------------
# Hook on document methods and events
doc_events = {
"User":{
# "onload":"smart_service.masters.doctype.vehicle.vehicle.test"
}
#doc_events = {
# "*": {
# "on_update": "method",
# "on_cancel": "method",
# "on_trash": "method"
# }
}
#}
# Scheduled Tasks
# ---------------
@ -120,18 +117,18 @@ scheduler_events = {
# "all": [
# "smart_service.tasks.all"
# ],
# "daily": [
"daily": [
"smart_service.apis.app_user_login.login_generate_token"
# "smart_service.tasks.daily"
# ],
"hourly": [
],
# "hourly": [
#"smart_service.tasks.hourly"
"smart_service.masters.doctype.vehicle.vehicle.test"
#"smart_service.apis.app_user_login.login_generate_token"
#"frappe.website.doctype.web_page.web_page.login"
]
# "weekly": [
# "smart_service.apis.app_user_login.login_generate_token",
# ],
"weekly": [
# "smart_service.tasks.weekly"
# ]
"smart_service.apis.update_validation.delete_complete"
]
# "monthly": [
# "smart_service.tasks.monthly"
# ]

BIN
smart_service/mahindra_smart_service/doctype/release/__pycache__/release.cpython-38.pyc

Binary file not shown.

BIN
smart_service/mahindra_smart_service/doctype/release_docs/__pycache__/release_docs.cpython-38.pyc

Binary file not shown.

BIN
smart_service/mahindra_smart_service/report/_applog_translation/__pycache__/_applog_translation.cpython-38.pyc

Binary file not shown.

27
smart_service/mahindra_smart_service/report/_applog_translation/_applog_translation.py

@ -15,7 +15,7 @@ def execute(filters=None):
return columns, data
def get_data(filters):
data = frappe.db.sql("""select dealer.zone,au.user_id,au.first_name,dealer.dealer_code,dealer.dealer_name,ad.os,ad.os_version,
data = frappe.db.sql("""select dealer.zone,au.user_id,au.first_name,dealer.dealer_code,dealer.area,dealer.dealer_name,ad.os,ad.os_version,
al.device,ad.device_id,ad.app_current_version,al.type,al.date_time_stamp,al.creation
from `tabApp Log` al,`tabApp Device` ad,`tabApp Users` au,`tabApp Dealer` dealer
where
@ -26,18 +26,19 @@ def get_data(filters):
def get_columns():
columns = [
{"label": _("Zone"), "fieldname": "zone", "fieldtype": "Data", "width": 100},
{"label": _("User ID"), "fieldname": "user_id", "fieldtype": "Data", "width": 100},
{"label": _("User Name"), "fieldname": "first_name", "fieldtype": "Data", "width": 100},
{"label": _("Dealer code"), "fieldname": "dealer_code", "fieldtype": "Data", "width": 100},
{"label": _("Dealer Name"), "fieldname": "dealer_name", "fieldtype":"Data","width": 100},
{"label": _("Device OS"), "fieldname": "os", "fieldtype": "Data", "width": 100},
{"label": _("OS Version"), "fieldname": "os_version", "fieldtype": "Data", "width": 100},
{"label": _("Activity Type"), "fieldname": "type", "fieldtype": "Data","width": 100},
{"label": _("Device ID"), "fieldname": "device_id", "fieldtype": "Data", "width": 100},
{"label": _("Activity Date"), "fieldname": "date_time_stamp", "fieldtype": "DateTime","width": 100},
{"label": _("App Version No"), "fieldname": "app_current_version", "fieldtype": "Data", "width": 100},
{"label": _("Installation"), "fieldname": "device", "fieldtype": "Data", "width": 100},
{"label": _("<b>Zone</b>"), "fieldname": "zone", "fieldtype": "Data", "width": 150},
{"label": _("<b>Dealer Location</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": 300},
{"label": _("<b>User ID</b>"), "fieldname": "user_id", "fieldtype": "Data", "width": 150},
{"label": _("<b>User Name</b>"), "fieldname": "first_name", "fieldtype": "Data", "width": 150},
{"label": _("<b>Device ID</b>"), "fieldname": "device_id", "fieldtype": "Data", "width": 150},
{"label": _("<b>Device OS</b>"), "fieldname": "os", "fieldtype": "Data", "width": 150},
{"label": _("<b>OS Version</b>"), "fieldname": "os_version", "fieldtype": "Data", "width": 150},
{"label": _("<b>Activity Type</b>"), "fieldname": "type", "fieldtype": "Data","width": 150},
{"label": _("<b>Activity Date</b>"), "fieldname": "date_time_stamp", "fieldtype": "DateTime","width": 150},
{"label": _("<b>App Version No</b>"), "fieldname": "app_current_version", "fieldtype": "Data", "width": 150},
{"label": _("<b>Installation</b>"), "fieldname": "device", "fieldtype": "Data", "width": 150},
]
return columns

BIN
smart_service/mahindra_smart_service/report/_drive_translation/__pycache__/_drive_translation.cpython-38.pyc

Binary file not shown.

4
smart_service/mahindra_smart_service/report/_drive_translation/_drive_translation.py

@ -56,11 +56,11 @@ def get_data():
def get_columns():
columns = []
columns += [
_("Modified On") + ":Datetime/:200", _("Status") + ":Data/:100",_("Drive") + ":Data/:220",
_("<b>Modified On</b>") + ":Datetime/:200", _("<b>Status</b>") + ":Data/:100",_("<b>Drive</b>") + ":Data/:220",
]
lang = []
custom_lang = frappe.db.sql("""SELECT lang_code,lang_name,active_status FROM %s.`tabCustom Languages` where lang_code <> "en" order by lang_name"""%(current_db_name),as_dict=1)
for d in custom_lang:
lang.append(cstr(d["lang_name"])+ "::220")
lang.append("<b>"+cstr(d["lang_name"])+"</b>"+ "::220")
columns += lang
return columns,lang

212
smart_service/mahindra_smart_service/report/_file_structure/_file_structure.js

@ -5,8 +5,8 @@ const pictures = ['jpg','jpeg','png','tif','tiff','ico','bmp','gif','eps','raw']
const videos = ['avi','mp4','mov','wmv','webm','mkv','3gp'];
const pdfs = ['pdf'];
const documents =['doc','docx','txt','odt','ppt','pptx'];
const spreadsheets=['ods','xls','xlsx'];
const spreadsheets=['ods','xls','xlsx','csv'];
const zip=['zip','zipx','rar']
frappe.query_reports["_File Structure"] = {
"filters": [
@ -17,72 +17,83 @@ frappe.query_reports["_File Structure"] = {
if(data && column.fieldname=="filename" && data.folder==0){
if(data.private==1){
if(pictures.includes(data.fileformat)){
value = `<p><svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 40 40">
<g id="Image" transform="translate(-2584 -2277)">
<rect id="Rectangle_1711" data-name="Rectangle 1711" width="40" height="40" transform="translate(2584 2277)" fill="none"/>
<path id="folder_icon" data-name="folder icon" d="M95.845,122.5H81.811a3.856,3.856,0,0,1-3.837-3.144,4.1,4.1,0,0,1-.074-.792V99.036A3.853,3.853,0,0,1,81.836,95.1h9.133a3.855,3.855,0,0,1,2.723,1.064c.594.569,1.213,1.114,1.807,1.683a2.238,2.238,0,0,0,1.683.668h12.7a3.853,3.853,0,0,1,3.886,3.292,5.215,5.215,0,0,1,.049.619v16.188a3.857,3.857,0,0,1-3.911,3.911C105.2,122.5,100.523,122.5,95.845,122.5Zm0-2h13.935a1.887,1.887,0,0,0,2.054-2.054c0-5.3-.025-10.594.025-15.891a1.988,1.988,0,0,0-2.079-2.079c-4.233.025-8.44.025-12.673.025a3.872,3.872,0,0,1-2.747-1.064L92.4,97.625a1.993,1.993,0,0,0-1.361-.52H81.885a2.266,2.266,0,0,0-.421.025,1.862,1.862,0,0,0-1.485,1.931v19.653a1.856,1.856,0,0,0,.817,1.46,1.984,1.984,0,0,0,1.238.322Z" transform="translate(2508.143 2188.188)" fill="#aaaaaa"/>
<path id="Path_2926" data-name="Path 2926" d="M112.744,139.881H102.513c-.453,0-.638-.1-.576-.576a3.73,3.73,0,0,0,0-1.07c-.226-1.132.494-1.77,1.215-2.45,1.132-1.07,2.223-2.182,3.314-3.294.329-.329.515-.371.844,0,.515.576,1.091,1.091,1.626,1.647.288.329.494.288.782,0,2.347-2.367,4.694-4.694,7.04-7.061.309-.309.453-.329.782,0,1.853,1.873,3.747,3.726,5.641,5.579a1.175,1.175,0,0,1,.391.947c-.021,1.894-.021,3.767,0,5.661,0,.473-.1.638-.618.638C119.538,139.881,116.141,139.881,112.744,139.881Z" transform="translate(2490.793 2165.386)" fill="#606060"/>
<path id="Path_2927" data-name="Path 2927" d="M105,114.71a2.759,2.759,0,0,1,2.882,2.944,2.914,2.914,0,0,1-2.964,2.841A3.025,3.025,0,0,1,102,117.531,2.9,2.9,0,0,1,105,114.71Z" transform="translate(2490.71 2175.035)" fill="#606060"/>
value = `<p><svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 28.24 35.667">
<g id="image" transform="translate(-1556 -3572)">
<path id="Path_25" data-name="Path 25" d="M314.128,26.861h-9.14c-.4,0-.57-.089-.515-.515a3.327,3.327,0,0,0,0-.956c-.2-1.011.441-1.581,1.086-2.188,1.011-.956,1.986-1.95,2.96-2.943.294-.294.46-.332.754,0,.46.514.975.974,1.453,1.471.257.294.441.258.7,0,2.1-2.114,4.193-4.193,6.289-6.308.276-.276.4-.294.7,0,1.655,1.673,3.347,3.329,5.039,4.984a1.051,1.051,0,0,1,.35.846c-.019,1.692-.019,3.366,0,5.058,0,.422-.09.57-.552.57-3.052-.019-6.087-.019-9.122-.019" transform="translate(1256 3572)" fill="#bababa"/>
<path id="Path_26" data-name="Path 26" d="M307.136,12.994a2.465,2.465,0,0,1,2.578,2.347,2.669,2.669,0,0,1,0,.283,2.6,2.6,0,0,1-2.648,2.538,2.7,2.7,0,0,1-2.607-2.648,2.591,2.591,0,0,1,2.659-2.521h.021" transform="translate(1256 3572)" fill="#bababa"/>
<path id="Path_27" data-name="Path 27" d="M325.745,34.667h-23.25A1.5,1.5,0,0,1,301,33.172V2.495A1.5,1.5,0,0,1,302.495,1h19.56l5.185,5.186V33.172A1.5,1.5,0,0,1,325.745,34.667Z" transform="translate(1256 3572)" fill="none" stroke="#bababa" stroke-miterlimit="10" stroke-width="2"/>
</g>
</svg>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;${value}</p>`
column.link_onclick = "frappe.query_reports['_File Structure'].set_route_to_file(" + JSON.stringify(data.filename) + ")"
}else if(pdfs.includes(data.fileformat)){
value = `<p><svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 40 40">
<g id="Pdf" transform="translate(-2581 -2115)">
<rect id="Rectangle_1708" data-name="Rectangle 1708" width="40" height="40" transform="translate(2581 2115)" fill="none"/>
<path id="folder_icon" data-name="folder icon" d="M95.845,122.5H81.811a3.856,3.856,0,0,1-3.837-3.144,4.1,4.1,0,0,1-.074-.792V99.036A3.853,3.853,0,0,1,81.836,95.1h9.133a3.855,3.855,0,0,1,2.723,1.064c.594.569,1.213,1.114,1.807,1.683a2.238,2.238,0,0,0,1.683.668h12.7a3.853,3.853,0,0,1,3.886,3.292,5.215,5.215,0,0,1,.049.619v16.188a3.857,3.857,0,0,1-3.911,3.911C105.2,122.5,100.523,122.5,95.845,122.5Zm0-2h13.935a1.887,1.887,0,0,0,2.054-2.054c0-5.3-.025-10.594.025-15.891a1.988,1.988,0,0,0-2.079-2.079c-4.233.025-8.44.025-12.673.025a3.872,3.872,0,0,1-2.747-1.064L92.4,97.625a1.993,1.993,0,0,0-1.361-.52H81.885a2.266,2.266,0,0,0-.421.025,1.862,1.862,0,0,0-1.485,1.931v19.653a1.856,1.856,0,0,0,.817,1.46,1.984,1.984,0,0,0,1.238.322Z" transform="translate(2505.1 2025.9)" fill="#aaaaaa"/>
<path id="Path_2419" d="M195.339,89.256a1.526,1.526,0,0,0,.069,2.057c.6-1.34-.046-2.057-.069-2.057m.393,5.431A44.493,44.493,0,0,1,194,99.517a32.789,32.789,0,0,1,4.206-1.294,23.631,23.631,0,0,1-2.473-3.536m4.853,4.206c.532.393.647.6.994.6a.82.82,0,0,0,.924-.555c-.069-.046-.185-.116-.763-.116a9.987,9.987,0,0,0-1.156.069m-8.851,2.843c-1.387.763-1.941,1.41-1.988,1.756,0,.069-.023.208.277.439.116-.023.67-.277,1.71-2.2m-1.71,3.282a1.014,1.014,0,0,1-.624-.208,1.539,1.539,0,0,1-.716-1.433c.116-1.04,1.433-2.126,3.883-3.236a42.827,42.827,0,0,0,2.45-6.887c-.647-1.387-1.271-3.189-.809-4.252a1.307,1.307,0,0,1,.74-.786,3.174,3.174,0,0,1,.647-.116c.347,0,.67.416.832.67a2.622,2.622,0,0,1,.254,1.618c-.046.532-.139,1.063-.231,1.595-.069.393-.162.763-.254,1.156a19.686,19.686,0,0,0,3.3,4.83,13.865,13.865,0,0,1,2.172-.231c1.017,0,1.641.231,1.872.716a1.284,1.284,0,0,1-.254,1.387,1.706,1.706,0,0,1-1.433.763,4.3,4.3,0,0,1-2.727-1.456,31.135,31.135,0,0,0-5.731,1.8,18.771,18.771,0,0,1-1.548,2.727c-.693.9-1.271,1.34-1.826,1.34" transform="translate(2404.322 2039.9)" fill="#606060"/>
value = `<p><svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 28.24 35.667">
<g id="pdf" transform="translate(-1496 -3572)">
<path id="Path_23" data-name="Path 23" d="M253.244,12.639a1.527,1.527,0,0,0,.069,2.057c.6-1.34-.046-2.057-.069-2.057m.393,5.431A44.428,44.428,0,0,1,251.9,22.9a32.847,32.847,0,0,1,4.206-1.294,23.672,23.672,0,0,1-2.473-3.536m4.853,4.206c.532.393.647.6.994.6a.82.82,0,0,0,.924-.555c-.069-.046-.185-.116-.763-.116a10.159,10.159,0,0,0-1.156.069m-8.851,2.843c-1.387.763-1.941,1.41-1.988,1.756,0,.069-.023.208.277.439.116-.023.67-.277,1.71-2.2m-1.71,3.282a1.012,1.012,0,0,1-.624-.208,1.54,1.54,0,0,1-.716-1.433c.116-1.04,1.433-2.126,3.883-3.236a42.9,42.9,0,0,0,2.45-6.887c-.647-1.387-1.271-3.189-.809-4.252a1.309,1.309,0,0,1,.74-.786,3.16,3.16,0,0,1,.647-.116c.347,0,.67.416.832.67a2.625,2.625,0,0,1,.254,1.618c-.046.532-.139,1.063-.231,1.6-.069.393-.162.763-.254,1.156a19.7,19.7,0,0,0,3.3,4.83,13.9,13.9,0,0,1,2.172-.231c1.017,0,1.641.231,1.872.716a1.284,1.284,0,0,1-.254,1.387,1.7,1.7,0,0,1-1.433.763,4.3,4.3,0,0,1-2.727-1.456,31.169,31.169,0,0,0-5.731,1.8,18.748,18.748,0,0,1-1.548,2.727c-.693.9-1.271,1.34-1.826,1.34" transform="translate(1256 3572)" fill="#bababa"/>
<path id="Path_24" data-name="Path 24" d="M265.745,34.667h-23.25A1.5,1.5,0,0,1,241,33.172V2.495A1.5,1.5,0,0,1,242.495,1h19.56l5.185,5.186V33.172A1.5,1.5,0,0,1,265.745,34.667Z" transform="translate(1256 3572)" fill="none" stroke="#bababa" stroke-miterlimit="10" stroke-width="2"/>
</g>
</svg>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;${value}</p>`
column.link_onclick = "frappe.query_reports['_File Structure'].set_route_to_file(" + JSON.stringify(data.filename) + ")"
}else if(spreadsheets.includes(data.fileformat)){
value = `<p><svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 40 40">
<g id="Other" transform="translate(-2581 -2384)">
<rect id="Rectangle_1713" data-name="Rectangle 1713" width="40" height="40" transform="translate(2581 2384)" fill="none"/>
<path id="folder_icon" data-name="folder icon" d="M95.845,122.5H81.811a3.856,3.856,0,0,1-3.837-3.144,4.1,4.1,0,0,1-.074-.792V99.036A3.853,3.853,0,0,1,81.836,95.1h9.133a3.855,3.855,0,0,1,2.723,1.064c.594.569,1.213,1.114,1.807,1.683a2.238,2.238,0,0,0,1.683.668h12.7a3.853,3.853,0,0,1,3.886,3.292,5.215,5.215,0,0,1,.049.619v16.188a3.857,3.857,0,0,1-3.911,3.911C105.2,122.5,100.523,122.5,95.845,122.5Zm0-2h13.935a1.887,1.887,0,0,0,2.054-2.054c0-5.3-.025-10.594.025-15.891a1.988,1.988,0,0,0-2.079-2.079c-4.233.025-8.44.025-12.673.025a3.872,3.872,0,0,1-2.747-1.064L92.4,97.625a1.993,1.993,0,0,0-1.361-.52H81.885a2.266,2.266,0,0,0-.421.025,1.862,1.862,0,0,0-1.485,1.931v19.653a1.856,1.856,0,0,0,.817,1.46,1.984,1.984,0,0,0,1.238.322Z" transform="translate(2505.143 2296.188)" fill="#aaaaaa"/>
<g id="apps_black_24dp_1_" data-name="apps_black_24dp (1)" transform="translate(2590.12 2395.12)">
<path id="Path_2930" data-name="Path 2930" d="M0,0H21.76V21.76H0Z" fill="none"/>
<path id="Path_2931" data-name="Path 2931" d="M4,7.627H7.627V4H4Zm5.44,10.88h3.627V14.88H9.44Zm-5.44,0H7.627V14.88H4Zm0-5.44H7.627V9.44H4Zm5.44,0h3.627V9.44H9.44ZM14.88,4V7.627h3.627V4ZM9.44,7.627h3.627V4H9.44Zm5.44,5.44h3.627V9.44H14.88Zm0,5.44h3.627V14.88H14.88Z" transform="translate(-0.373 -0.373)" fill="#606060"/>
</g>
value = `<p><svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 28.24 35.667">
<g id="spreadsheet" transform="translate(-1316 -3572)">
<path id="Path_14" data-name="Path 14" d="M85.745,34.667H62.495A1.5,1.5,0,0,1,61,33.172V2.495A1.5,1.5,0,0,1,62.495,1h19.56L87.24,6.186V33.172A1.5,1.5,0,0,1,85.745,34.667Z" transform="translate(1256 3572)" fill="none" stroke="#bababa" stroke-miterlimit="10" stroke-width="2"/>
<rect id="Rectangle_9" data-name="Rectangle 9" width="18.008" height="13.323" transform="translate(1321.116 3585.274)" fill="none" stroke="#bababa" stroke-miterlimit="10" stroke-width="1.5"/>
<line id="Line_4" data-name="Line 4" x2="18.008" transform="translate(1321.116 3594.156)" fill="none" stroke="#bababa" stroke-miterlimit="10" stroke-width="1.5"/>
<line id="Line_5" data-name="Line 5" x2="18.008" transform="translate(1321.116 3589.715)" fill="none" stroke="#bababa" stroke-miterlimit="10" stroke-width="1.5"/>
<line id="Line_6" data-name="Line 6" y2="13.323" transform="translate(1333.121 3585.274)" fill="none" stroke="#bababa" stroke-miterlimit="10" stroke-width="1.5"/>
<line id="Line_7" data-name="Line 7" y2="13.323" transform="translate(1327.119 3585.274)" fill="none" stroke="#bababa" stroke-miterlimit="10" stroke-width="1.5"/>
</g>
</svg>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;${value}</p>`
column.link_onclick = "frappe.query_reports['_File Structure'].set_route_to_file(" + JSON.stringify(data.filename) + ")"
}else if(documents.includes(data.fileformat)){
value = `<p><svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 40 40">
<g id="Text" transform="translate(-2584 -2223)">
<rect id="Rectangle_1710" data-name="Rectangle 1710" width="40" height="40" transform="translate(2584 2223)" fill="none"/>
<g id="txt_icon" data-name="txt icon" transform="translate(2545.684 2180.6)">
<path id="Path_2917" data-name="Path 2917" d="M90.22,80.216a15.563,15.563,0,0,0-1.588.009,2.535,2.535,0,0,0-2.159,2.293c-.054.259-.107.473-.473.321V79.6H97.447v3.256c-.036.036-.071.062-.107.1-.116-.116-.25-.223-.357-.348a.7.7,0,0,1-.08-.205c-.669-2.114-1.8-2.355-3.64-2.177-.009.134-.027.277-.027.419v9.5c0,.161.009.33.009.491.036.9.41,1.285,1.312,1.32a.626.626,0,0,1,.223.009,1.949,1.949,0,0,1,.259.152,1.475,1.475,0,0,1-.232.125c-.036.018-.089,0-.134,0q-2.944,0-5.888-.009a1.236,1.236,0,0,1-.375-.125,1.407,1.407,0,0,1,.384-.161c.981-.054,1.32-.366,1.41-1.347.018-.205.018-.419.018-.625v-9.76Z" transform="translate(-33.881 -21.586)" fill="#aaaaaa"/>
<path id="Path_2918" data-name="Path 2918" d="M49.6,58.677H49V56h2.65v.562H49.6Z" transform="translate(-0.182 -0.091)" fill="#606060"/>
<path id="Path_2919" data-name="Path 2919" d="M48.8,217.777V215.1h.58v2.07h2.079v.6C50.584,217.777,49.71,217.777,48.8,217.777Z" transform="translate(0 -144.996)" fill="#606060"/>
<path id="Path_2920" data-name="Path 2920" d="M224.441,58.594H223.9V56.489h-2.1V55.9h2.65C224.441,56.81,224.441,57.693,224.441,58.594Z" transform="translate(-157.565)" fill="#606060"/>
<path id="Path_2921" data-name="Path 2921" d="M223.87,215.1h.58v2.677H221.8v-.58h2.07Z" transform="translate(-157.565 -144.996)" fill="#606060"/>
</g>
<path id="folder_icon" data-name="folder icon" d="M95.845,122.5H81.811a3.856,3.856,0,0,1-3.837-3.144,4.1,4.1,0,0,1-.074-.792V99.036A3.853,3.853,0,0,1,81.836,95.1h9.133a3.855,3.855,0,0,1,2.723,1.064c.594.569,1.213,1.114,1.807,1.683a2.238,2.238,0,0,0,1.683.668h12.7a3.853,3.853,0,0,1,3.886,3.292,5.215,5.215,0,0,1,.049.619v16.188a3.857,3.857,0,0,1-3.911,3.911C105.2,122.5,100.523,122.5,95.845,122.5Zm0-2h13.935a1.887,1.887,0,0,0,2.054-2.054c0-5.3-.025-10.594.025-15.891a1.988,1.988,0,0,0-2.079-2.079c-4.233.025-8.44.025-12.673.025a3.872,3.872,0,0,1-2.747-1.064L92.4,97.625a1.993,1.993,0,0,0-1.361-.52H81.885a2.266,2.266,0,0,0-.421.025,1.862,1.862,0,0,0-1.485,1.931v19.653a1.856,1.856,0,0,0,.817,1.46,1.984,1.984,0,0,0,1.238.322Z" transform="translate(2508.143 2134.188)" fill="#aaaaaa"/>
value = `<p><svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 28.24 35.667">
<g id="text" transform="translate(-1256 -3572)">
<path id="Path_8" data-name="Path 8" d="M12.616,14.225a15.577,15.577,0,0,0-1.588.009,2.534,2.534,0,0,0-2.159,2.293c-.054.259-.107.473-.473.321V13.609H19.843v3.256c-.036.036-.071.062-.107.1-.116-.116-.25-.223-.357-.348a.723.723,0,0,1-.08-.2c-.669-2.114-1.8-2.355-3.64-2.177-.009.134-.027.277-.027.419v9.5c0,.161.009.33.009.491.036.9.41,1.285,1.312,1.32a.643.643,0,0,1,.223.009,1.973,1.973,0,0,1,.259.152,1.522,1.522,0,0,1-.232.125c-.036.018-.089,0-.134,0q-2.945,0-5.888-.009a1.21,1.21,0,0,1-.375-.125,1.409,1.409,0,0,1,.384-.161c.981-.054,1.32-.366,1.41-1.347.018-.2.018-.419.018-.625v-9.76Z" transform="translate(1256 3572)" fill="#bababa"/>
<path id="Path_9" data-name="Path 9" d="M5.7,14.181H5.1V11.5h2.65v.562H5.7Z" transform="translate(1256 3572)" fill="#bababa"/>
<path id="Path_10" data-name="Path 10" d="M5.077,28.376V25.7h.58v2.07H7.736v.6c-.875.007-1.749.007-2.659.007" transform="translate(1256 3572)" fill="#bababa"/>
<path id="Path_11" data-name="Path 11" d="M23.153,14.189h-.541V12.084h-2.1v-.589h2.65c-.009.91-.009,1.793-.009,2.694" transform="translate(1256 3572)" fill="#bababa"/>
<path id="Path_12" data-name="Path 12" d="M22.582,25.7h.58v2.677h-2.65V27.8h2.07Z" transform="translate(1256 3572)" fill="#bababa"/>
<path id="Path_13" data-name="Path 13" d="M25.745,34.667H2.495A1.5,1.5,0,0,1,1,33.172V2.495A1.5,1.5,0,0,1,2.495,1h19.56L27.24,6.186V33.172A1.5,1.5,0,0,1,25.745,34.667Z" transform="translate(1256 3572)" fill="none" stroke="#bababa" stroke-miterlimit="10" stroke-width="2"/>
</g>
</svg>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;${value}</p>`
column.link_onclick = "frappe.query_reports['_File Structure'].set_route_to_file(" + JSON.stringify(data.filename) + ")"
}else if(videos.includes(data.fileformat)){
value = `<p><svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 40 40">
<g id="Video" transform="translate(-2584 -2330)">
<rect id="Rectangle_1712" data-name="Rectangle 1712" width="40" height="40" transform="translate(2584 2330)" fill="none"/>
<g id="vid_icon" data-name="vid icon" transform="translate(2502.8 2244.175)">
<path id="Path_2922" data-name="Path 2922" d="M98.513,112.588h-4.84A2.211,2.211,0,0,1,91.2,110.13v-7.835a2.2,2.2,0,0,1,2.474-2.458q4.84-.023,9.679,0a2.153,2.153,0,0,1,2.443,2.443v7.835a2.158,2.158,0,0,1-2.443,2.458C101.739,112.6,100.126,112.588,98.513,112.588Zm-3-6.391c0,1.029-.015,2.043.015,3.073a1,1,0,0,0,.246.737c.154.092.522-.061.722-.2,1.49-1,2.965-2.013,4.44-3.027.707-.492.722-.691.015-1.152-1.506-1.029-3-2.043-4.517-3.042-.184-.123-.522-.261-.661-.184a.893.893,0,0,0-.246.661C95.5,104.108,95.517,105.152,95.517,106.2Z" fill="#606060"/>
<path id="Path_2923" data-name="Path 2923" d="M193.007,116.21c0,1.26.015,2.5-.015,3.764a1,1,0,0,1-.307.784.955.955,0,0,1-.814-.154c-1.029-.676-2.059-1.352-3.027-2.1a1.61,1.61,0,0,1-.507-1c-.077-.676.031-1.383-.031-2.074a1.7,1.7,0,0,1,.922-1.828c.922-.553,1.767-1.214,2.673-1.8a1.16,1.16,0,0,1,.83-.154c.169.061.261.461.277.722Z" transform="translate(-82.172 -9.982)" fill="#606060"/>
</g>
<path id="folder_icon" data-name="folder icon" d="M95.845,122.5H81.811a3.856,3.856,0,0,1-3.837-3.144,4.1,4.1,0,0,1-.074-.792V99.036A3.853,3.853,0,0,1,81.836,95.1h9.133a3.855,3.855,0,0,1,2.723,1.064c.594.569,1.213,1.114,1.807,1.683a2.238,2.238,0,0,0,1.683.668h12.7a3.853,3.853,0,0,1,3.886,3.292,5.215,5.215,0,0,1,.049.619v16.188a3.857,3.857,0,0,1-3.911,3.911C105.2,122.5,100.523,122.5,95.845,122.5Zm0-2h13.935a1.887,1.887,0,0,0,2.054-2.054c0-5.3-.025-10.594.025-15.891a1.988,1.988,0,0,0-2.079-2.079c-4.233.025-8.44.025-12.673.025a3.872,3.872,0,0,1-2.747-1.064L92.4,97.625a1.993,1.993,0,0,0-1.361-.52H81.885a2.266,2.266,0,0,0-.421.025,1.862,1.862,0,0,0-1.485,1.931v19.653a1.856,1.856,0,0,0,.817,1.46,1.984,1.984,0,0,0,1.238.322Z" transform="translate(2508.1 2240.9)" fill="#aaaaaa"/>
value = `<p><svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 28.24 35.667">
<g id="video" transform="translate(-1436 -3572)">
<path id="Path_20" data-name="Path 20" d="M205.745,34.667h-23.25A1.5,1.5,0,0,1,181,33.172V2.495A1.5,1.5,0,0,1,182.495,1h19.56l5.185,5.186V33.172A1.5,1.5,0,0,1,205.745,34.667Z" transform="translate(1256 3572)" fill="none" stroke="#bababa" stroke-miterlimit="10" stroke-width="2"/>
<path id="Path_21" data-name="Path 21" d="M191.622,26.043h-4.84a2.211,2.211,0,0,1-2.471-1.916,2.184,2.184,0,0,1,0-.542V15.75a2.2,2.2,0,0,1,2.474-2.458q4.84-.022,9.679,0a2.153,2.153,0,0,1,2.443,1.817,2.188,2.188,0,0,1,0,.626V23.57a2.158,2.158,0,0,1-2.443,2.458c-1.614.027-3.227.015-4.84.015m-3-6.391c0,1.029-.015,2.043.015,3.073a1,1,0,0,0,.246.737c.154.092.522-.061.722-.2,1.49-1,2.965-2.013,4.44-3.027.707-.492.722-.691.015-1.152-1.506-1.029-3-2.043-4.517-3.042-.184-.123-.522-.261-.661-.184a.894.894,0,0,0-.246.661c-.027,1.045-.01,2.089-.01,3.137Z" transform="translate(1256 3572)" fill="#bababa"/>
<path id="Path_22" data-name="Path 22" d="M203.944,19.683c0,1.26.015,2.5-.015,3.764a1,1,0,0,1-.307.784.957.957,0,0,1-.814-.154c-1.029-.676-2.059-1.352-3.027-2.1a1.614,1.614,0,0,1-.507-1c-.077-.676.031-1.383-.031-2.074a1.7,1.7,0,0,1,.922-1.828c.922-.553,1.767-1.214,2.673-1.8a1.158,1.158,0,0,1,.83-.154c.169.061.261.461.277.722Z" transform="translate(1256 3572)" fill="#bababa"/>
</g>
</svg>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;${value}</p>`
column.link_onclick = "frappe.query_reports['_File Structure'].set_route_to_file(" + JSON.stringify(data.filename) + ")"
}else if(zip.includes(data.fileformat)){
value = `<p><svg xmlns="http://www.w3.org/2000/svg" width="28.24" height="35.667" viewBox="0 0 28.24 35.667">
<g id="zip" transform="translate(-1616 -3572)">
<path id="Path_28" data-name="Path 28" d="M385.745,34.667h-23.25A1.5,1.5,0,0,1,361,33.172V2.495A1.5,1.5,0,0,1,362.495,1h19.56l5.185,5.186V33.172A1.5,1.5,0,0,1,385.745,34.667Z" transform="translate(1256 3572)" fill="none" stroke="#bababa" stroke-miterlimit="10" stroke-width="2"/>
<rect id="Rectangle_15" data-name="Rectangle 15" width="2.917" height="1.944" transform="translate(1628.175 3601.806)" fill="#bababa"/>
<rect id="Rectangle_16" data-name="Rectangle 16" width="2.917" height="1.944" transform="translate(1628.175 3597.806)" fill="#bababa"/>
<rect id="Rectangle_17" data-name="Rectangle 17" width="2.917" height="1.944" transform="translate(1628.175 3593.806)" fill="#bababa"/>
<rect id="Rectangle_18" data-name="Rectangle 18" width="2.917" height="1.944" transform="translate(1628.175 3589.806)" fill="#bababa"/>
<rect id="Rectangle_19" data-name="Rectangle 19" width="2.917" height="1.944" transform="translate(1628.175 3585.806)" fill="#bababa"/>
<rect id="Rectangle_20" data-name="Rectangle 20" width="2.917" height="1.944" transform="translate(1628.175 3581.806)" fill="#bababa"/>
<rect id="Rectangle_21" data-name="Rectangle 21" width="2.917" height="1.944" transform="translate(1628.175 3577.806)" fill="#bababa"/>
<rect id="Rectangle_22" data-name="Rectangle 22" width="2.917" height="1.944" transform="translate(1628.175 3573.806)" fill="#bababa"/>
<rect id="Rectangle_23" data-name="Rectangle 23" width="2.917" height="1.944" transform="translate(1631.092 3603.751)" fill="#bababa"/>
<rect id="Rectangle_24" data-name="Rectangle 24" width="2.917" height="1.944" transform="translate(1631.092 3599.751)" fill="#bababa"/>
<rect id="Rectangle_25" data-name="Rectangle 25" width="2.917" height="1.944" transform="translate(1631.092 3595.751)" fill="#bababa"/>
<rect id="Rectangle_26" data-name="Rectangle 26" width="2.917" height="1.944" transform="translate(1631.092 3591.751)" fill="#bababa"/>
<rect id="Rectangle_27" data-name="Rectangle 27" width="2.917" height="1.944" transform="translate(1631.092 3587.751)" fill="#bababa"/>
<rect id="Rectangle_28" data-name="Rectangle 28" width="2.917" height="1.944" transform="translate(1631.092 3583.751)" fill="#bababa"/>
<rect id="Rectangle_29" data-name="Rectangle 29" width="2.917" height="1.944" transform="translate(1631.092 3579.751)" fill="#bababa"/>
<rect id="Rectangle_30" data-name="Rectangle 30" width="2.917" height="1.944" transform="translate(1631.092 3575.751)" fill="#bababa"/>
</g>
</svg>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;${value}</p>`
column.link_onclick = "frappe.query_reports['_File Structure'].set_route_to_file(" + JSON.stringify(data.filename) + ")"
}else{
value = `<p><svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 40 40">
<g id="Spreadsheet" transform="translate(-2581 -2169)">
<rect id="Rectangle_1709" data-name="Rectangle 1709" width="40" height="40" transform="translate(2581 2169)" fill="none"/>
<path id="folder_icon" data-name="folder icon" d="M95.845,122.5H81.811a3.856,3.856,0,0,1-3.837-3.144,4.1,4.1,0,0,1-.074-.792V99.036A3.853,3.853,0,0,1,81.836,95.1h9.133a3.855,3.855,0,0,1,2.723,1.064c.594.569,1.213,1.114,1.807,1.683a2.238,2.238,0,0,0,1.683.668h12.7a3.853,3.853,0,0,1,3.886,3.292,5.215,5.215,0,0,1,.049.619v16.188a3.857,3.857,0,0,1-3.911,3.911C105.2,122.5,100.523,122.5,95.845,122.5Zm0-2h13.935a1.887,1.887,0,0,0,2.054-2.054c0-5.3-.025-10.594.025-15.891a1.988,1.988,0,0,0-2.079-2.079c-4.233.025-8.44.025-12.673.025a3.872,3.872,0,0,1-2.747-1.064L92.4,97.625a1.993,1.993,0,0,0-1.361-.52H81.885a2.266,2.266,0,0,0-.421.025,1.862,1.862,0,0,0-1.485,1.931v19.653a1.856,1.856,0,0,0,.817,1.46,1.984,1.984,0,0,0,1.238.322Z" transform="translate(2505.1 2079.9)" fill="#aaaaaa"/>
<g id="format_list_bulleted_black_24dp" transform="translate(2591.152 2180.683)">
<path id="Path_2928" data-name="Path 2928" d="M0,0H19.7V19.7H0Z" fill="none"/>
<path id="Path_2929" data-name="Path 2929" d="M3.731,9.424a1.231,1.231,0,1,0,1.231,1.231A1.229,1.229,0,0,0,3.731,9.424Zm0-4.924A1.231,1.231,0,1,0,4.962,5.731,1.229,1.229,0,0,0,3.731,4.5Zm0,9.848a1.231,1.231,0,1,0,1.231,1.231A1.235,1.235,0,0,0,3.731,14.348ZM6.193,16.4h11.49V14.759H6.193Zm0-4.924h11.49V9.835H6.193Zm0-6.566V6.552h11.49V4.91Z" transform="translate(-0.448 -0.807)" fill="#606060"/>
</g>
value = `<p><svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 28.24 35.667">
<g id="othersupport" transform="translate(-1796 -3572)">
<path id="Path_37" data-name="Path 37" d="M565.745,34.667h-23.25A1.5,1.5,0,0,1,541,33.172V2.495A1.5,1.5,0,0,1,542.495,1h19.56l5.185,5.186V33.172A1.5,1.5,0,0,1,565.745,34.667Z" transform="translate(1256 3572)" fill="none" stroke="#bababa" stroke-miterlimit="10" stroke-width="2"/>
<path id="Path_38" data-name="Path 38" d="M546.866,16.309h3.627V12.682h-3.627Zm5.44,10.88h3.627V23.562h-3.627Zm-5.44,0h3.627V23.562h-3.627Zm0-5.44h3.627V18.122h-3.627Zm5.44,0h3.627V18.122h-3.627Zm5.44-5.44h3.627V12.682h-3.627Zm-5.44,0h3.627V12.682h-3.627Zm5.44,5.44h3.627V18.122h-3.627Zm0,5.44h3.627V23.562h-3.627Z" transform="translate(1256 3572)" fill="#bababa"/>
</g>
</svg>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;${value}</p>`
column.link_onclick = "frappe.query_reports['_File Structure'].set_route_to_file(" + JSON.stringify(data.filename) + ")"
@ -90,72 +101,83 @@ frappe.query_reports["_File Structure"] = {
} else if(data.private==0){
if(pictures.includes(data.fileformat)){
value = `<p><svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 40 40">
<g id="Image" transform="translate(-2584 -2277)">
<rect id="Rectangle_1711" data-name="Rectangle 1711" width="40" height="40" transform="translate(2584 2277)" fill="none"/>
<path id="folder_icon" data-name="folder icon" d="M95.845,122.5H81.811a3.856,3.856,0,0,1-3.837-3.144,4.1,4.1,0,0,1-.074-.792V99.036A3.853,3.853,0,0,1,81.836,95.1h9.133a3.855,3.855,0,0,1,2.723,1.064c.594.569,1.213,1.114,1.807,1.683a2.238,2.238,0,0,0,1.683.668h12.7a3.853,3.853,0,0,1,3.886,3.292,5.215,5.215,0,0,1,.049.619v16.188a3.857,3.857,0,0,1-3.911,3.911C105.2,122.5,100.523,122.5,95.845,122.5Zm0-2h13.935a1.887,1.887,0,0,0,2.054-2.054c0-5.3-.025-10.594.025-15.891a1.988,1.988,0,0,0-2.079-2.079c-4.233.025-8.44.025-12.673.025a3.872,3.872,0,0,1-2.747-1.064L92.4,97.625a1.993,1.993,0,0,0-1.361-.52H81.885a2.266,2.266,0,0,0-.421.025,1.862,1.862,0,0,0-1.485,1.931v19.653a1.856,1.856,0,0,0,.817,1.46,1.984,1.984,0,0,0,1.238.322Z" transform="translate(2508.143 2188.188)" fill="#000000"/>
<path id="Path_2926" data-name="Path 2926" d="M112.744,139.881H102.513c-.453,0-.638-.1-.576-.576a3.73,3.73,0,0,0,0-1.07c-.226-1.132.494-1.77,1.215-2.45,1.132-1.07,2.223-2.182,3.314-3.294.329-.329.515-.371.844,0,.515.576,1.091,1.091,1.626,1.647.288.329.494.288.782,0,2.347-2.367,4.694-4.694,7.04-7.061.309-.309.453-.329.782,0,1.853,1.873,3.747,3.726,5.641,5.579a1.175,1.175,0,0,1,.391.947c-.021,1.894-.021,3.767,0,5.661,0,.473-.1.638-.618.638C119.538,139.881,116.141,139.881,112.744,139.881Z" transform="translate(2490.793 2165.386)" fill="#606060"/>
<path id="Path_2927" data-name="Path 2927" d="M105,114.71a2.759,2.759,0,0,1,2.882,2.944,2.914,2.914,0,0,1-2.964,2.841A3.025,3.025,0,0,1,102,117.531,2.9,2.9,0,0,1,105,114.71Z" transform="translate(2490.71 2175.035)" fill="#606060"/>
value = `<p><svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 28.24 35.667">
<g id="image" transform="translate(-1556 -3572)">
<path id="Path_25" data-name="Path 25" d="M314.128,26.861h-9.14c-.4,0-.57-.089-.515-.515a3.327,3.327,0,0,0,0-.956c-.2-1.011.441-1.581,1.086-2.188,1.011-.956,1.986-1.95,2.96-2.943.294-.294.46-.332.754,0,.46.514.975.974,1.453,1.471.257.294.441.258.7,0,2.1-2.114,4.193-4.193,6.289-6.308.276-.276.4-.294.7,0,1.655,1.673,3.347,3.329,5.039,4.984a1.051,1.051,0,0,1,.35.846c-.019,1.692-.019,3.366,0,5.058,0,.422-.09.57-.552.57-3.052-.019-6.087-.019-9.122-.019" transform="translate(1256 3572)" fill="#606060"/>
<path id="Path_26" data-name="Path 26" d="M307.136,12.994a2.465,2.465,0,0,1,2.578,2.347,2.669,2.669,0,0,1,0,.283,2.6,2.6,0,0,1-2.648,2.538,2.7,2.7,0,0,1-2.607-2.648,2.591,2.591,0,0,1,2.659-2.521h.021" transform="translate(1256 3572)" fill="#606060"/>
<path id="Path_27" data-name="Path 27" d="M325.745,34.667h-23.25A1.5,1.5,0,0,1,301,33.172V2.495A1.5,1.5,0,0,1,302.495,1h19.56l5.185,5.186V33.172A1.5,1.5,0,0,1,325.745,34.667Z" transform="translate(1256 3572)" fill="none" stroke="#606060" stroke-miterlimit="10" stroke-width="2"/>
</g>
</svg>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;${value}</p>`
column.link_onclick = "frappe.query_reports['_File Structure'].set_route_to_file(" + JSON.stringify(data.filename) + ")"
}else if(pdfs.includes(data.fileformat)){
value = `<p><svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 40 40">
<g id="Pdf" transform="translate(-2581 -2115)">
<rect id="Rectangle_1708" data-name="Rectangle 1708" width="40" height="40" transform="translate(2581 2115)" fill="none"/>
<path id="folder_icon" data-name="folder icon" d="M95.845,122.5H81.811a3.856,3.856,0,0,1-3.837-3.144,4.1,4.1,0,0,1-.074-.792V99.036A3.853,3.853,0,0,1,81.836,95.1h9.133a3.855,3.855,0,0,1,2.723,1.064c.594.569,1.213,1.114,1.807,1.683a2.238,2.238,0,0,0,1.683.668h12.7a3.853,3.853,0,0,1,3.886,3.292,5.215,5.215,0,0,1,.049.619v16.188a3.857,3.857,0,0,1-3.911,3.911C105.2,122.5,100.523,122.5,95.845,122.5Zm0-2h13.935a1.887,1.887,0,0,0,2.054-2.054c0-5.3-.025-10.594.025-15.891a1.988,1.988,0,0,0-2.079-2.079c-4.233.025-8.44.025-12.673.025a3.872,3.872,0,0,1-2.747-1.064L92.4,97.625a1.993,1.993,0,0,0-1.361-.52H81.885a2.266,2.266,0,0,0-.421.025,1.862,1.862,0,0,0-1.485,1.931v19.653a1.856,1.856,0,0,0,.817,1.46,1.984,1.984,0,0,0,1.238.322Z" transform="translate(2505.1 2025.9)" fill="#000000"/>
<path id="Path_2419" d="M195.339,89.256a1.526,1.526,0,0,0,.069,2.057c.6-1.34-.046-2.057-.069-2.057m.393,5.431A44.493,44.493,0,0,1,194,99.517a32.789,32.789,0,0,1,4.206-1.294,23.631,23.631,0,0,1-2.473-3.536m4.853,4.206c.532.393.647.6.994.6a.82.82,0,0,0,.924-.555c-.069-.046-.185-.116-.763-.116a9.987,9.987,0,0,0-1.156.069m-8.851,2.843c-1.387.763-1.941,1.41-1.988,1.756,0,.069-.023.208.277.439.116-.023.67-.277,1.71-2.2m-1.71,3.282a1.014,1.014,0,0,1-.624-.208,1.539,1.539,0,0,1-.716-1.433c.116-1.04,1.433-2.126,3.883-3.236a42.827,42.827,0,0,0,2.45-6.887c-.647-1.387-1.271-3.189-.809-4.252a1.307,1.307,0,0,1,.74-.786,3.174,3.174,0,0,1,.647-.116c.347,0,.67.416.832.67a2.622,2.622,0,0,1,.254,1.618c-.046.532-.139,1.063-.231,1.595-.069.393-.162.763-.254,1.156a19.686,19.686,0,0,0,3.3,4.83,13.865,13.865,0,0,1,2.172-.231c1.017,0,1.641.231,1.872.716a1.284,1.284,0,0,1-.254,1.387,1.706,1.706,0,0,1-1.433.763,4.3,4.3,0,0,1-2.727-1.456,31.135,31.135,0,0,0-5.731,1.8,18.771,18.771,0,0,1-1.548,2.727c-.693.9-1.271,1.34-1.826,1.34" transform="translate(2404.322 2039.9)" fill="#606060"/>
value = `<p><svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 28.24 35.667">
<g id="pdf" transform="translate(-1496 -3572)">
<path id="Path_23" data-name="Path 23" d="M253.244,12.639a1.527,1.527,0,0,0,.069,2.057c.6-1.34-.046-2.057-.069-2.057m.393,5.431A44.428,44.428,0,0,1,251.9,22.9a32.847,32.847,0,0,1,4.206-1.294,23.672,23.672,0,0,1-2.473-3.536m4.853,4.206c.532.393.647.6.994.6a.82.82,0,0,0,.924-.555c-.069-.046-.185-.116-.763-.116a10.159,10.159,0,0,0-1.156.069m-8.851,2.843c-1.387.763-1.941,1.41-1.988,1.756,0,.069-.023.208.277.439.116-.023.67-.277,1.71-2.2m-1.71,3.282a1.012,1.012,0,0,1-.624-.208,1.54,1.54,0,0,1-.716-1.433c.116-1.04,1.433-2.126,3.883-3.236a42.9,42.9,0,0,0,2.45-6.887c-.647-1.387-1.271-3.189-.809-4.252a1.309,1.309,0,0,1,.74-.786,3.16,3.16,0,0,1,.647-.116c.347,0,.67.416.832.67a2.625,2.625,0,0,1,.254,1.618c-.046.532-.139,1.063-.231,1.6-.069.393-.162.763-.254,1.156a19.7,19.7,0,0,0,3.3,4.83,13.9,13.9,0,0,1,2.172-.231c1.017,0,1.641.231,1.872.716a1.284,1.284,0,0,1-.254,1.387,1.7,1.7,0,0,1-1.433.763,4.3,4.3,0,0,1-2.727-1.456,31.169,31.169,0,0,0-5.731,1.8,18.748,18.748,0,0,1-1.548,2.727c-.693.9-1.271,1.34-1.826,1.34" transform="translate(1256 3572)" fill="#606060"/>
<path id="Path_24" data-name="Path 24" d="M265.745,34.667h-23.25A1.5,1.5,0,0,1,241,33.172V2.495A1.5,1.5,0,0,1,242.495,1h19.56l5.185,5.186V33.172A1.5,1.5,0,0,1,265.745,34.667Z" transform="translate(1256 3572)" fill="none" stroke="#606060" stroke-miterlimit="10" stroke-width="2"/>
</g>
</svg>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;${value}</p>`
column.link_onclick = "frappe.query_reports['_File Structure'].set_route_to_file(" + JSON.stringify(data.filename) + ")"
}else if(spreadsheets.includes(data.fileformat)){
value = `<p><svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 40 40">
<g id="Other" transform="translate(-2581 -2384)">
<rect id="Rectangle_1713" data-name="Rectangle 1713" width="40" height="40" transform="translate(2581 2384)" fill="none"/>
<path id="folder_icon" data-name="folder icon" d="M95.845,122.5H81.811a3.856,3.856,0,0,1-3.837-3.144,4.1,4.1,0,0,1-.074-.792V99.036A3.853,3.853,0,0,1,81.836,95.1h9.133a3.855,3.855,0,0,1,2.723,1.064c.594.569,1.213,1.114,1.807,1.683a2.238,2.238,0,0,0,1.683.668h12.7a3.853,3.853,0,0,1,3.886,3.292,5.215,5.215,0,0,1,.049.619v16.188a3.857,3.857,0,0,1-3.911,3.911C105.2,122.5,100.523,122.5,95.845,122.5Zm0-2h13.935a1.887,1.887,0,0,0,2.054-2.054c0-5.3-.025-10.594.025-15.891a1.988,1.988,0,0,0-2.079-2.079c-4.233.025-8.44.025-12.673.025a3.872,3.872,0,0,1-2.747-1.064L92.4,97.625a1.993,1.993,0,0,0-1.361-.52H81.885a2.266,2.266,0,0,0-.421.025,1.862,1.862,0,0,0-1.485,1.931v19.653a1.856,1.856,0,0,0,.817,1.46,1.984,1.984,0,0,0,1.238.322Z" transform="translate(2505.143 2296.188)" fill="#000000"/>
<g id="apps_black_24dp_1_" data-name="apps_black_24dp (1)" transform="translate(2590.12 2395.12)">
<path id="Path_2930" data-name="Path 2930" d="M0,0H21.76V21.76H0Z" fill="none"/>
<path id="Path_2931" data-name="Path 2931" d="M4,7.627H7.627V4H4Zm5.44,10.88h3.627V14.88H9.44Zm-5.44,0H7.627V14.88H4Zm0-5.44H7.627V9.44H4Zm5.44,0h3.627V9.44H9.44ZM14.88,4V7.627h3.627V4ZM9.44,7.627h3.627V4H9.44Zm5.44,5.44h3.627V9.44H14.88Zm0,5.44h3.627V14.88H14.88Z" transform="translate(-0.373 -0.373)" fill="#606060"/>
</g>
value = `<p><svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 28.24 35.667">
<g id="spreadsheet" transform="translate(-1316 -3572)">
<path id="Path_14" data-name="Path 14" d="M85.745,34.667H62.495A1.5,1.5,0,0,1,61,33.172V2.495A1.5,1.5,0,0,1,62.495,1h19.56L87.24,6.186V33.172A1.5,1.5,0,0,1,85.745,34.667Z" transform="translate(1256 3572)" fill="none" stroke="#606060" stroke-miterlimit="10" stroke-width="2"/>
<rect id="Rectangle_9" data-name="Rectangle 9" width="18.008" height="13.323" transform="translate(1321.116 3585.274)" fill="none" stroke="#606060" stroke-miterlimit="10" stroke-width="1.5"/>
<line id="Line_4" data-name="Line 4" x2="18.008" transform="translate(1321.116 3594.156)" fill="none" stroke="#606060" stroke-miterlimit="10" stroke-width="1.5"/>
<line id="Line_5" data-name="Line 5" x2="18.008" transform="translate(1321.116 3589.715)" fill="none" stroke="#606060" stroke-miterlimit="10" stroke-width="1.5"/>
<line id="Line_6" data-name="Line 6" y2="13.323" transform="translate(1333.121 3585.274)" fill="none" stroke="#606060" stroke-miterlimit="10" stroke-width="1.5"/>
<line id="Line_7" data-name="Line 7" y2="13.323" transform="translate(1327.119 3585.274)" fill="none" stroke="#606060" stroke-miterlimit="10" stroke-width="1.5"/>
</g>
</svg>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;${value}</p>`
column.link_onclick = "frappe.query_reports['_File Structure'].set_route_to_file(" + JSON.stringify(data.filename) + ")"
}else if(documents.includes(data.fileformat)){
value = `<p><svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 40 40">
<g id="Text" transform="translate(-2584 -2223)">
<rect id="Rectangle_1710" data-name="Rectangle 1710" width="40" height="40" transform="translate(2584 2223)" fill="none"/>
<g id="txt_icon" data-name="txt icon" transform="translate(2545.684 2180.6)">
<path id="Path_2917" data-name="Path 2917" d="M90.22,80.216a15.563,15.563,0,0,0-1.588.009,2.535,2.535,0,0,0-2.159,2.293c-.054.259-.107.473-.473.321V79.6H97.447v3.256c-.036.036-.071.062-.107.1-.116-.116-.25-.223-.357-.348a.7.7,0,0,1-.08-.205c-.669-2.114-1.8-2.355-3.64-2.177-.009.134-.027.277-.027.419v9.5c0,.161.009.33.009.491.036.9.41,1.285,1.312,1.32a.626.626,0,0,1,.223.009,1.949,1.949,0,0,1,.259.152,1.475,1.475,0,0,1-.232.125c-.036.018-.089,0-.134,0q-2.944,0-5.888-.009a1.236,1.236,0,0,1-.375-.125,1.407,1.407,0,0,1,.384-.161c.981-.054,1.32-.366,1.41-1.347.018-.205.018-.419.018-.625v-9.76Z" transform="translate(-33.881 -21.586)" fill="#606060"/>
<path id="Path_2918" data-name="Path 2918" d="M49.6,58.677H49V56h2.65v.562H49.6Z" transform="translate(-0.182 -0.091)" fill="#606060"/>
<path id="Path_2919" data-name="Path 2919" d="M48.8,217.777V215.1h.58v2.07h2.079v.6C50.584,217.777,49.71,217.777,48.8,217.777Z" transform="translate(0 -144.996)" fill="#606060"/>
<path id="Path_2920" data-name="Path 2920" d="M224.441,58.594H223.9V56.489h-2.1V55.9h2.65C224.441,56.81,224.441,57.693,224.441,58.594Z" transform="translate(-157.565)" fill="#606060"/>
<path id="Path_2921" data-name="Path 2921" d="M223.87,215.1h.58v2.677H221.8v-.58h2.07Z" transform="translate(-157.565 -144.996)" fill="#606060"/>
</g>
<path id="folder_icon" data-name="folder icon" d="M95.845,122.5H81.811a3.856,3.856,0,0,1-3.837-3.144,4.1,4.1,0,0,1-.074-.792V99.036A3.853,3.853,0,0,1,81.836,95.1h9.133a3.855,3.855,0,0,1,2.723,1.064c.594.569,1.213,1.114,1.807,1.683a2.238,2.238,0,0,0,1.683.668h12.7a3.853,3.853,0,0,1,3.886,3.292,5.215,5.215,0,0,1,.049.619v16.188a3.857,3.857,0,0,1-3.911,3.911C105.2,122.5,100.523,122.5,95.845,122.5Zm0-2h13.935a1.887,1.887,0,0,0,2.054-2.054c0-5.3-.025-10.594.025-15.891a1.988,1.988,0,0,0-2.079-2.079c-4.233.025-8.44.025-12.673.025a3.872,3.872,0,0,1-2.747-1.064L92.4,97.625a1.993,1.993,0,0,0-1.361-.52H81.885a2.266,2.266,0,0,0-.421.025,1.862,1.862,0,0,0-1.485,1.931v19.653a1.856,1.856,0,0,0,.817,1.46,1.984,1.984,0,0,0,1.238.322Z" transform="translate(2508.143 2134.188)" fill="#000000"/>
value = `<p><svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 28.24 35.667">
<g id="text" transform="translate(-1256 -3572)">
<path id="Path_8" data-name="Path 8" d="M12.616,14.225a15.577,15.577,0,0,0-1.588.009,2.534,2.534,0,0,0-2.159,2.293c-.054.259-.107.473-.473.321V13.609H19.843v3.256c-.036.036-.071.062-.107.1-.116-.116-.25-.223-.357-.348a.723.723,0,0,1-.08-.2c-.669-2.114-1.8-2.355-3.64-2.177-.009.134-.027.277-.027.419v9.5c0,.161.009.33.009.491.036.9.41,1.285,1.312,1.32a.643.643,0,0,1,.223.009,1.973,1.973,0,0,1,.259.152,1.522,1.522,0,0,1-.232.125c-.036.018-.089,0-.134,0q-2.945,0-5.888-.009a1.21,1.21,0,0,1-.375-.125,1.409,1.409,0,0,1,.384-.161c.981-.054,1.32-.366,1.41-1.347.018-.2.018-.419.018-.625v-9.76Z" transform="translate(1256 3572)" fill="#606060"/>
<path id="Path_9" data-name="Path 9" d="M5.7,14.181H5.1V11.5h2.65v.562H5.7Z" transform="translate(1256 3572)" fill="#606060"/>
<path id="Path_10" data-name="Path 10" d="M5.077,28.376V25.7h.58v2.07H7.736v.6c-.875.007-1.749.007-2.659.007" transform="translate(1256 3572)" fill="#606060"/>
<path id="Path_11" data-name="Path 11" d="M23.153,14.189h-.541V12.084h-2.1v-.589h2.65c-.009.91-.009,1.793-.009,2.694" transform="translate(1256 3572)" fill="#606060"/>
<path id="Path_12" data-name="Path 12" d="M22.582,25.7h.58v2.677h-2.65V27.8h2.07Z" transform="translate(1256 3572)" fill="#606060"/>
<path id="Path_13" data-name="Path 13" d="M25.745,34.667H2.495A1.5,1.5,0,0,1,1,33.172V2.495A1.5,1.5,0,0,1,2.495,1h19.56L27.24,6.186V33.172A1.5,1.5,0,0,1,25.745,34.667Z" transform="translate(1256 3572)" fill="none" stroke="#606060" stroke-miterlimit="10" stroke-width="2"/>
</g>
</svg>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;${value}</p>`
column.link_onclick = "frappe.query_reports['_File Structure'].set_route_to_file(" + JSON.stringify(data.filename) + ")"
}else if(videos.includes(data.fileformat)){
value = `<p><svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 40 40">
<g id="Video" transform="translate(-2584 -2330)">
<rect id="Rectangle_1712" data-name="Rectangle 1712" width="40" height="40" transform="translate(2584 2330)" fill="none"/>
<g id="vid_icon" data-name="vid icon" transform="translate(2502.8 2244.175)">
<path id="Path_2922" data-name="Path 2922" d="M98.513,112.588h-4.84A2.211,2.211,0,0,1,91.2,110.13v-7.835a2.2,2.2,0,0,1,2.474-2.458q4.84-.023,9.679,0a2.153,2.153,0,0,1,2.443,2.443v7.835a2.158,2.158,0,0,1-2.443,2.458C101.739,112.6,100.126,112.588,98.513,112.588Zm-3-6.391c0,1.029-.015,2.043.015,3.073a1,1,0,0,0,.246.737c.154.092.522-.061.722-.2,1.49-1,2.965-2.013,4.44-3.027.707-.492.722-.691.015-1.152-1.506-1.029-3-2.043-4.517-3.042-.184-.123-.522-.261-.661-.184a.893.893,0,0,0-.246.661C95.5,104.108,95.517,105.152,95.517,106.2Z" fill="#606060"/>
<path id="Path_2923" data-name="Path 2923" d="M193.007,116.21c0,1.26.015,2.5-.015,3.764a1,1,0,0,1-.307.784.955.955,0,0,1-.814-.154c-1.029-.676-2.059-1.352-3.027-2.1a1.61,1.61,0,0,1-.507-1c-.077-.676.031-1.383-.031-2.074a1.7,1.7,0,0,1,.922-1.828c.922-.553,1.767-1.214,2.673-1.8a1.16,1.16,0,0,1,.83-.154c.169.061.261.461.277.722Z" transform="translate(-82.172 -9.982)" fill="#606060"/>
</g>
<path id="folder_icon" data-name="folder icon" d="M95.845,122.5H81.811a3.856,3.856,0,0,1-3.837-3.144,4.1,4.1,0,0,1-.074-.792V99.036A3.853,3.853,0,0,1,81.836,95.1h9.133a3.855,3.855,0,0,1,2.723,1.064c.594.569,1.213,1.114,1.807,1.683a2.238,2.238,0,0,0,1.683.668h12.7a3.853,3.853,0,0,1,3.886,3.292,5.215,5.215,0,0,1,.049.619v16.188a3.857,3.857,0,0,1-3.911,3.911C105.2,122.5,100.523,122.5,95.845,122.5Zm0-2h13.935a1.887,1.887,0,0,0,2.054-2.054c0-5.3-.025-10.594.025-15.891a1.988,1.988,0,0,0-2.079-2.079c-4.233.025-8.44.025-12.673.025a3.872,3.872,0,0,1-2.747-1.064L92.4,97.625a1.993,1.993,0,0,0-1.361-.52H81.885a2.266,2.266,0,0,0-.421.025,1.862,1.862,0,0,0-1.485,1.931v19.653a1.856,1.856,0,0,0,.817,1.46,1.984,1.984,0,0,0,1.238.322Z" transform="translate(2508.1 2240.9)" fill="#000000"/>
value = `<p><svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 28.24 35.667">
<g id="video" transform="translate(-1436 -3572)">
<path id="Path_20" data-name="Path 20" d="M205.745,34.667h-23.25A1.5,1.5,0,0,1,181,33.172V2.495A1.5,1.5,0,0,1,182.495,1h19.56l5.185,5.186V33.172A1.5,1.5,0,0,1,205.745,34.667Z" transform="translate(1256 3572)" fill="none" stroke="#606060" stroke-miterlimit="10" stroke-width="2"/>
<path id="Path_21" data-name="Path 21" d="M191.622,26.043h-4.84a2.211,2.211,0,0,1-2.471-1.916,2.184,2.184,0,0,1,0-.542V15.75a2.2,2.2,0,0,1,2.474-2.458q4.84-.022,9.679,0a2.153,2.153,0,0,1,2.443,1.817,2.188,2.188,0,0,1,0,.626V23.57a2.158,2.158,0,0,1-2.443,2.458c-1.614.027-3.227.015-4.84.015m-3-6.391c0,1.029-.015,2.043.015,3.073a1,1,0,0,0,.246.737c.154.092.522-.061.722-.2,1.49-1,2.965-2.013,4.44-3.027.707-.492.722-.691.015-1.152-1.506-1.029-3-2.043-4.517-3.042-.184-.123-.522-.261-.661-.184a.894.894,0,0,0-.246.661c-.027,1.045-.01,2.089-.01,3.137Z" transform="translate(1256 3572)" fill="#606060"/>
<path id="Path_22" data-name="Path 22" d="M203.944,19.683c0,1.26.015,2.5-.015,3.764a1,1,0,0,1-.307.784.957.957,0,0,1-.814-.154c-1.029-.676-2.059-1.352-3.027-2.1a1.614,1.614,0,0,1-.507-1c-.077-.676.031-1.383-.031-2.074a1.7,1.7,0,0,1,.922-1.828c.922-.553,1.767-1.214,2.673-1.8a1.158,1.158,0,0,1,.83-.154c.169.061.261.461.277.722Z" transform="translate(1256 3572)" fill="#606060"/>
</g>
</svg>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;${value}</p>`
column.link_onclick = "frappe.query_reports['_File Structure'].set_route_to_file(" + JSON.stringify(data.filename) + ")"
}else if(zip.includes(data.fileformat)){
value = `<p><svg xmlns="http://www.w3.org/2000/svg" width="28.24" height="35.667" viewBox="0 0 28.24 35.667">
<g id="zip" transform="translate(-1616 -3572)">
<path id="Path_28" data-name="Path 28" d="M385.745,34.667h-23.25A1.5,1.5,0,0,1,361,33.172V2.495A1.5,1.5,0,0,1,362.495,1h19.56l5.185,5.186V33.172A1.5,1.5,0,0,1,385.745,34.667Z" transform="translate(1256 3572)" fill="none" stroke="#606060" stroke-miterlimit="10" stroke-width="2"/>
<rect id="Rectangle_15" data-name="Rectangle 15" width="2.917" height="1.944" transform="translate(1628.175 3601.806)" fill="#606060"/>
<rect id="Rectangle_16" data-name="Rectangle 16" width="2.917" height="1.944" transform="translate(1628.175 3597.806)" fill="#606060"/>
<rect id="Rectangle_17" data-name="Rectangle 17" width="2.917" height="1.944" transform="translate(1628.175 3593.806)" fill="#606060"/>
<rect id="Rectangle_18" data-name="Rectangle 18" width="2.917" height="1.944" transform="translate(1628.175 3589.806)" fill="#606060"/>
<rect id="Rectangle_19" data-name="Rectangle 19" width="2.917" height="1.944" transform="translate(1628.175 3585.806)" fill="#606060"/>
<rect id="Rectangle_20" data-name="Rectangle 20" width="2.917" height="1.944" transform="translate(1628.175 3581.806)" fill="#606060"/>
<rect id="Rectangle_21" data-name="Rectangle 21" width="2.917" height="1.944" transform="translate(1628.175 3577.806)" fill="#606060"/>
<rect id="Rectangle_22" data-name="Rectangle 22" width="2.917" height="1.944" transform="translate(1628.175 3573.806)" fill="#606060"/>
<rect id="Rectangle_23" data-name="Rectangle 23" width="2.917" height="1.944" transform="translate(1631.092 3603.751)" fill="#606060"/>
<rect id="Rectangle_24" data-name="Rectangle 24" width="2.917" height="1.944" transform="translate(1631.092 3599.751)" fill="#606060"/>
<rect id="Rectangle_25" data-name="Rectangle 25" width="2.917" height="1.944" transform="translate(1631.092 3595.751)" fill="#606060"/>
<rect id="Rectangle_26" data-name="Rectangle 26" width="2.917" height="1.944" transform="translate(1631.092 3591.751)" fill="#606060"/>
<rect id="Rectangle_27" data-name="Rectangle 27" width="2.917" height="1.944" transform="translate(1631.092 3587.751)" fill="#606060"/>
<rect id="Rectangle_28" data-name="Rectangle 28" width="2.917" height="1.944" transform="translate(1631.092 3583.751)" fill="#606060"/>
<rect id="Rectangle_29" data-name="Rectangle 29" width="2.917" height="1.944" transform="translate(1631.092 3579.751)" fill="#606060"/>
<rect id="Rectangle_30" data-name="Rectangle 30" width="2.917" height="1.944" transform="translate(1631.092 3575.751)" fill="#606060"/>
</g>
</svg>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;${value}</p>`
column.link_onclick = "frappe.query_reports['_File Structure'].set_route_to_file(" + JSON.stringify(data.filename) + ")"
}else{
value = `<p><svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 40 40">
<g id="Spreadsheet" transform="translate(-2581 -2169)">
<rect id="Rectangle_1709" data-name="Rectangle 1709" width="40" height="40" transform="translate(2581 2169)" fill="none"/>
<path id="folder_icon" data-name="folder icon" d="M95.845,122.5H81.811a3.856,3.856,0,0,1-3.837-3.144,4.1,4.1,0,0,1-.074-.792V99.036A3.853,3.853,0,0,1,81.836,95.1h9.133a3.855,3.855,0,0,1,2.723,1.064c.594.569,1.213,1.114,1.807,1.683a2.238,2.238,0,0,0,1.683.668h12.7a3.853,3.853,0,0,1,3.886,3.292,5.215,5.215,0,0,1,.049.619v16.188a3.857,3.857,0,0,1-3.911,3.911C105.2,122.5,100.523,122.5,95.845,122.5Zm0-2h13.935a1.887,1.887,0,0,0,2.054-2.054c0-5.3-.025-10.594.025-15.891a1.988,1.988,0,0,0-2.079-2.079c-4.233.025-8.44.025-12.673.025a3.872,3.872,0,0,1-2.747-1.064L92.4,97.625a1.993,1.993,0,0,0-1.361-.52H81.885a2.266,2.266,0,0,0-.421.025,1.862,1.862,0,0,0-1.485,1.931v19.653a1.856,1.856,0,0,0,.817,1.46,1.984,1.984,0,0,0,1.238.322Z" transform="translate(2505.1 2079.9)" fill="#000000"/>
<g id="format_list_bulleted_black_24dp" transform="translate(2591.152 2180.683)">
<path id="Path_2928" data-name="Path 2928" d="M0,0H19.7V19.7H0Z" fill="none"/>
<path id="Path_2929" data-name="Path 2929" d="M3.731,9.424a1.231,1.231,0,1,0,1.231,1.231A1.229,1.229,0,0,0,3.731,9.424Zm0-4.924A1.231,1.231,0,1,0,4.962,5.731,1.229,1.229,0,0,0,3.731,4.5Zm0,9.848a1.231,1.231,0,1,0,1.231,1.231A1.235,1.235,0,0,0,3.731,14.348ZM6.193,16.4h11.49V14.759H6.193Zm0-4.924h11.49V9.835H6.193Zm0-6.566V6.552h11.49V4.91Z" transform="translate(-0.448 -0.807)" fill="#606060"/>
</g>
value = `<p><svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 28.24 35.667">
<g id="othersupport" transform="translate(-1796 -3572)">
<path id="Path_37" data-name="Path 37" d="M565.745,34.667h-23.25A1.5,1.5,0,0,1,541,33.172V2.495A1.5,1.5,0,0,1,542.495,1h19.56l5.185,5.186V33.172A1.5,1.5,0,0,1,565.745,34.667Z" transform="translate(1256 3572)" fill="none" stroke="#606060" stroke-miterlimit="10" stroke-width="2"/>
<path id="Path_38" data-name="Path 38" d="M546.866,16.309h3.627V12.682h-3.627Zm5.44,10.88h3.627V23.562h-3.627Zm-5.44,0h3.627V23.562h-3.627Zm0-5.44h3.627V18.122h-3.627Zm5.44,0h3.627V18.122h-3.627Zm5.44-5.44h3.627V12.682h-3.627Zm-5.44,0h3.627V12.682h-3.627Zm5.44,5.44h3.627V18.122h-3.627Zm0,5.44h3.627V23.562h-3.627Z" transform="translate(1256 3572)" fill="#606060"/>
</g>
</svg>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;${value}</p>`
column.link_onclick = "frappe.query_reports['_File Structure'].set_route_to_file(" + JSON.stringify(data.filename) + ")"
@ -217,5 +239,5 @@ frappe.query_reports["_File Structure"] = {
"tree": true,
"name_field": "filename",
"parent_field": "",
"initial_depth": 0
"initial_depth": 4
};

BIN
smart_service/mahindra_smart_service/report/_fuel_translation/__pycache__/_fuel_translation.cpython-38.pyc

Binary file not shown.

10
smart_service/mahindra_smart_service/report/_fuel_translation/_fuel_translation.js

@ -5,13 +5,5 @@
frappe.query_reports["_Fuel Translation"] = {
"filters": [
],
"formatter": function (value, row, column, data, default_formatter) {
if(value==null){
value=' '
column.align='left';
}
value = default_formatter(value, row, column, data);
return value;
}
]
};

4
smart_service/mahindra_smart_service/report/_fuel_translation/_fuel_translation.py

@ -59,11 +59,11 @@ def get_columns():
columns = []
columns += [
_("Modified On") + ":Datetime/:200", _("Status") + ":Data/:100",_("Fuel") + ":Data/:220",
_("<b>Modified On</b>") + ":Datetime/:200", _("<b>Status</b>") + ":Data/:100",_("<b>Fuel</b>") + ":Data/:220",
]
lang = []
custom_lang = frappe.db.sql("""SELECT lang_code,lang_name,active_status FROM {}.`tabCustom Languages` where lang_code <> "en" order by lang_name """.format(current_db_name),as_dict=1)
for d in custom_lang:
lang.append(cstr(d["lang_name"])+ "::220")
lang.append("<b>"+cstr(d["lang_name"])+"</b>"+ "::220")
columns += lang
return columns,lang

BIN
smart_service/mahindra_smart_service/report/_sub_systems_translation/__pycache__/_sub_systems_translation.cpython-38.pyc

Binary file not shown.

4
smart_service/mahindra_smart_service/report/_sub_systems_translation/_sub_systems_translation.py

@ -60,11 +60,11 @@ def get_columns():
columns = []
columns += [
_("Modified On") + ":Datetime/:200", _("Status") + ":Data/:100",_("Sub Systems") + ":Data/:300",
_("<b>Modified On</b>") + ":Datetime/:200", _("<b>Status</b>") + ":Data/:100",_("<b>Sub Systems</b>") + ":Data/:300",
]
lang = []
custom_lang = frappe.db.sql("""SELECT lang_code,lang_name,active_status FROM {0}.`tabCustom Languages` where lang_code <> "en" order by lang_name""".format(current_db_name),as_dict=1)
for d in custom_lang:
lang.append(cstr(d["lang_name"])+ "::300")
lang.append("<b>"+cstr(d["lang_name"])+"</b>"+ "::300")
columns += lang
return columns,lang

BIN
smart_service/mahindra_smart_service/report/_systems_translation/__pycache__/_systems_translation.cpython-38.pyc

Binary file not shown.

4
smart_service/mahindra_smart_service/report/_systems_translation/_systems_translation.py

@ -57,11 +57,11 @@ def get_columns():
columns = []
columns += [
_("Modified On") + ":Datetime/:200", _("Status") + ":Data/:100",_("Systems") + ":Data/:300",
_("<b>Modified On</b>") + ":Datetime/:200", _("<b>Status</b>") + ":Data/:100",_("<b>Systems</b>") + ":Data/:300",
]
lang = []
custom_lang = frappe.db.sql("""SELECT lang_code,lang_name,active_status FROM %s.`tabCustom Languages` where lang_code <> "en" order by lang_name"""%(current_db_name),as_dict=1)
for d in custom_lang:
lang.append(cstr(d["lang_name"])+ "::300")
lang.append("<b>"+cstr(d["lang_name"])+"</b>"+ "::300")
columns += lang
return columns,lang

BIN
smart_service/mahindra_smart_service/report/_transmission_translation/__pycache__/_transmission_translation.cpython-38.pyc

Binary file not shown.

4
smart_service/mahindra_smart_service/report/_transmission_translation/_transmission_translation.py

@ -55,11 +55,11 @@ def get_columns():
columns = []
columns += [
_("Modified On") + ":Datetime/:200", _("Status") + ":Data/:100",_("Transmission") + ":Data/:220",
_("<b>Modified On</b>") + ":Datetime/:200", _("<b>Status</b>") + ":Data/:100",_("<b>Transmission</b>") + ":Data/:220",
]
lang = []
custom_lang = frappe.db.sql("""SELECT lang_code,lang_name,active_status FROM %s.`tabCustom Languages` where lang_code <> "en" order by lang_name"""%(current_db_name),as_dict=1)
for d in custom_lang:
lang.append(cstr(d["lang_name"])+ "::220")
lang.append("<b>"+cstr(d["lang_name"])+"</b>"+ "::220")
columns += lang
return columns,lang

BIN
smart_service/mahindra_smart_service/report/_variant_translation/__pycache__/_variant_translation.cpython-38.pyc

Binary file not shown.

4
smart_service/mahindra_smart_service/report/_variant_translation/_variant_translation.py

@ -57,11 +57,11 @@ def get_columns():
columns = []
columns += [
_("Modified On") + ":Data/:240", _("Status") + ":Data/:100", _("Vehicle") + ":Data/:200",_("Variant") + ":Data/:220",
_("<b>Modified On</b>") + ":Data/:240", _("<b>Status</b>") + ":Data/:100", _("<b>Vehicle</b>") + ":Data/:200",_("<b>Variant</b>") + ":Data/:220",
]
lang = []
custom_lang = frappe.db.sql("""SELECT lang_code,lang_name,active_status FROM %s.`tabCustom Languages` where lang_code <> "en" order by lang_name"""%(current_db_name),as_dict=1)
for d in custom_lang:
lang.append(cstr(d["lang_name"])+ "::220")
lang.append("<b>"+cstr(d["lang_name"])+"</b>"+ "::220")
columns += lang
return columns,lang

BIN
smart_service/mahindra_smart_service/report/_vehicle_segment_translation/__pycache__/_vehicle_segment_translation.cpython-38.pyc

Binary file not shown.

4
smart_service/mahindra_smart_service/report/_vehicle_segment_translation/_vehicle_segment_translation.py

@ -61,11 +61,11 @@ def get_columns():
columns = []
columns += [
_("Modified On") + ":Datetime/:200", _("Status") + ":Data/:100",_("Vehicle Segment") + ":Data/:220",
_("<b>Modified On</b>") + ":Datetime/:200", _("<b>Status</b>") + ":Data/:100",_("<b>Vehicle Segment</b>") + ":Data/:220",
]
lang = []
custom_lang = frappe.db.sql("""SELECT lang_code,lang_name,active_status FROM %s.`tabCustom Languages` where lang_code <> "en" order by lang_name"""%(current_db_name),as_dict=1)
for d in custom_lang:
lang.append(cstr(d["lang_name"])+ "::220")
lang.append("<b>"+cstr(d["lang_name"])+"</b>"+ "::220")
columns += lang
return columns,lang

BIN
smart_service/mahindra_smart_service/report/_vehicle_translation/__pycache__/_vehicle_translation.cpython-38.pyc

Binary file not shown.

4
smart_service/mahindra_smart_service/report/_vehicle_translation/_vehicle_translation.py

@ -55,11 +55,11 @@ def get_columns():
columns = []
columns += [
_("Modified On") + ":Datetime/:200", _("Status") + ":Data/:100",_("Vehicle") + ":Data/:220",
_("<b>Modified On</b>") + ":Datetime/:200", _("<b>Status</b>") + ":Data/:100",_("<b>Vehicle</b>") + ":Data/:220",
]
lang = []
custom_lang = frappe.db.sql("""SELECT lang_code,lang_name,active_status FROM %s.`tabCustom Languages` where lang_code <> "en" order by lang_name"""%(current_db_name),as_dict=1)
for d in custom_lang:
lang.append(cstr(d["lang_name"])+ "::220")
lang.append("<b>"+cstr(d["lang_name"])+"</b>"+ "::220")
columns += lang
return columns,lang

BIN
smart_service/mahindra_smart_service/report/installation_report/__pycache__/installation_report.cpython-38.pyc

Binary file not shown.

12
smart_service/mahindra_smart_service/report/installation_report/installation_report.py

@ -15,12 +15,13 @@ def execute(filters=None):
return columns, data
def get_data(filters):
current_db_name = frappe.conf.get("db_name")
data = frappe.db.sql("""select dealer.zone,au.user_id,au.first_name,dealer.dealer_code,dealer.dealer_name,dealer.area,ad.os,ad.os_version,
al.device,ad.device_id,ad.app_current_version,al.type,al.date_time_stamp,al.creation,al.date_time_stamp as date,al.date_time_stamp as time,time(al.date_time_stamp) as last_time
from `tabApp Log` al,`tabApp Device` ad,`tabApp Users` au,`tabApp Dealer` dealer
al.device,ad.device_id,ad.app_current_version,al.type as type,ad.device_type,al.date_time_stamp,al.creation,al.date_time_stamp as date,al.date_time_stamp as time,time(al.date_time_stamp) as last_time
from {0}.`tabApp Log` al, {0}.`tabApp Device` ad, {0}.`tabApp Users` au, {0}.`tabApp Dealer` dealer
where
al.device = ad.name and al.user = au.name and au.dealer = dealer.name and al.type = 'Installed' and
(al.modified between %s and %s)""",(filters.get('from_date'), filters.get('to_date')), as_dict=1)
al.device = ad.name and al.user = au.name and au.dealer = dealer.name and (al.type = 'Installed' or al.type = 'Reinstalled') and
(date(al.modified) between '{1}' and '{2}')""".format(current_db_name,filters.get('from_date'), filters.get('to_date')), as_dict=1)
if data:
return data
@ -34,12 +35,13 @@ def get_columns():
{"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 Type"), "fieldname": "type", "fieldtype": "Data","width": 100},
{"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": "first_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},

BIN
smart_service/mahindra_smart_service/report/login_report/__pycache__/login_report.cpython-38.pyc

Binary file not shown.

13
smart_service/mahindra_smart_service/report/login_report/login_report.py

@ -5,6 +5,10 @@ from __future__ import unicode_literals
import frappe
from frappe.utils import cstr, cint, getdate
from frappe import msgprint, _
from frappe.utils import cstr, flt, cint,TIME_FORMAT,DATE_FORMAT,DATETIME_FORMAT, now_datetime
from datetime import date, time, datetime, timedelta
from frappe.utils import now
import datetime
def execute(filters=None):
columns, data = [], []
@ -13,13 +17,16 @@ def execute(filters=None):
return columns, data
def get_data(filters):
current_db_name = frappe.conf.get("db_name")
from_date = filters.get('from_date')
to_date = filters.get('to_date')
data = frappe.db.sql("""select count(al.name) as count,dealer.zone,au.user_id,au.first_name,dealer.dealer_code,dealer.dealer_name,dealer.area,ad.os,ad.os_version,
ad.device_type,ad.device_id,ad.app_current_version,al.type,al.latitude,al.longitude,al.date_time_stamp,al.creation,
date(al.date_time_stamp) as date,time(al.date_time_stamp) as time
from `tabApp Log` al,`tabApp Device` ad,`tabApp Users` au,`tabApp Dealer` dealer
from {0}.`tabApp Log` al,{0}.`tabApp Device` ad,{0}.`tabApp Users` au,{0}.`tabApp Dealer` dealer
where
al.device = ad.name and al.user = au.name and au.dealer = dealer.name and al.type = 'Logged in' and
(al.modified between %s and %s) group by al.user,ad.device_id,date(al.date_time_stamp)""",(filters.get('from_date'), filters.get('to_date')), as_dict=1)
(date(al.modified) between '{1}' and '{2}') group by al.user,ad.device_id,date(al.date_time_stamp)""".format(current_db_name,from_date,to_date), as_dict=1)
if data:
return data
else:
@ -34,8 +41,8 @@ def get_columns():
{"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 ID"), "fieldname": "device_id", "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": "first_name", "fieldtype": "Data", "width": 100},
{"label": _("Latitude"), "fieldname": "latitude", "fieldtype": "Data", "width": 100},

BIN
smart_service/masters/doctype/vehicle/__pycache__/vehicle.cpython-38.pyc

Binary file not shown.

11
smart_service/masters/doctype/vehicle/vehicle.py

@ -45,6 +45,11 @@ def login_user(login,pwd):
num.id = login
num.pwd = pwd
num.save()
@frappe.whitelist()
def test(doc=None,method=None):
frappe.msgprint("called")
###This method called from templates/includes/login/_login.js
@frappe.whitelist(allow_guest=True)
def login_user(login):
user = frappe.db.sql("""select username from `tabUser` where username=%s or email=%s or mobile_no=%s""",(login,login,login),as_list=True)
if user:
return user
else:
return 'None'

172
smart_service/public/css/smart_service.css

@ -1,86 +1,86 @@
.btn.btn-primary {
background-color: #E31A37;
border-color: #E31A37;
outline: 0!important;
box-shadow: none!important;
color: var(--white);
white-space: nowrap;
--icon-stroke: #E31A37!important;
--icon-fill-bg: #E31A37!important;
}
.btn.btn-primary:active{
background-color: #c50000!important;
border-color: #E31A37!important;
outline: 0!important;
box-shadow: 0 0 2px 2px #E31A37!important;
/* h-offset v-offset blur spread colour */
}
.app-logo {
width: 100px !important;
}
.navbar{
box-shadow: 7px -2px 11px #E31A37;
}
.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;
}
.btn-primary-light.active {
background-color: #E31A37;
border-color: #E31A37;
outline: 0!important;
box-shadow: 0 0 2px 2px #E31A37!important;
}
.login-captcha-refresh{
right: 9px;
top: 9px;
position: absolute;
z-index: 2;
cursor: pointer;
font-size: 12px;
}
.txt-input-captcha{
margin-left: 60px;
width: 81%;
}
.captcha-txt{
font-size: 15px;
color: #E31A37;
font-weight: bold;
}
.loadingBlock{ top: 65%;
left: 48%;position: absolute;z-index:9999; }
.gear{width: 80px; height: 80px; border-radius:10%; margin:80px auto; border:5px solid #E31A37 ; position:relative;
}
.gear:after{content:"";width: 100px; height: 100px;border-radius:100%; display:block; border:5px dashed #E31A37 ;position:absolute; top:-24px; left: -24px; box-shadow: inset 0px 0 0 20px #E31A37; transform:scale(.5) rotate(0deg);
animation:gear 8s linear infinite;}
.gear:before{content:"";width: 58px; height: 58px;border-radius:100%;
display:block; border:5px dashed #E31A37 ; position:absolute; top:26px; right: -14px; box-shadow: inset 0px 0 0 10px #E31A37; transform:scale(.5) rotate(0deg);
animation:gear2 3s linear infinite;}
@keyframes gear {
0%{transform:scale(.5) rotate(0deg);}
100%{transform:scale(.5) rotate(360deg);}
}
@-webkit-keyframes gear {
0%{transform:scale(.5) rotate(0deg);}
100%{transform:scale(.5) rotate(360deg);}
}
@keyframes gear2 {
0%{transform:scale(.5) rotate(0deg);}
100%{transform:scale(.5) rotate(-360deg);}
}
.btn.btn-primary {
background-color: #E31A37;
border-color: #E31A37;
outline: 0!important;
box-shadow: none!important;
color: var(--white);
white-space: nowrap;
--icon-stroke: #FFFFFF!important;
--icon-fill-bg: #FFFFFF!important;
}
.btn.btn-primary:active{
background-color: #c50000!important;
border-color: #E31A37!important;
outline: 0!important;
box-shadow: 0 0 2px 2px #E31A37!important;
/* h-offset v-offset blur spread colour */
}
.app-logo {
width: 100px !important;
}
.navbar{
box-shadow: 7px -2px 11px #E31A37;
}
.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;
}
.btn-primary-light.active {
background-color: #E31A37;
border-color: #E31A37;
outline: 0!important;
box-shadow: 0 0 2px 2px #E31A37!important;
}
.login-captcha-refresh{
right: 9px;
top: 9px;
position: absolute;
z-index: 2;
cursor: pointer;
font-size: 12px;
}
.txt-input-captcha{
margin-left: 60px;
width: 81%;
}
.captcha-txt{
font-size: 15px;
color: #E31A37;
font-weight: bold;
}
.loadingBlock{ top: 65%;
left: 48%;position: absolute;z-index:9999; }
.gear{width: 80px; height: 80px; border-radius:10%; margin:80px auto; border:5px solid #E31A37 ; position:relative;
}
.gear:after{content:"";width: 100px; height: 100px;border-radius:100%; display:block; border:5px dashed #E31A37 ;position:absolute; top:-24px; left: -24px; box-shadow: inset 0px 0 0 20px #E31A37; transform:scale(.5) rotate(0deg);
animation:gear 8s linear infinite;}
.gear:before{content:"";width: 58px; height: 58px;border-radius:100%;
display:block; border:5px dashed #E31A37 ; position:absolute; top:26px; right: -14px; box-shadow: inset 0px 0 0 10px #E31A37; transform:scale(.5) rotate(0deg);
animation:gear2 3s linear infinite;}
@keyframes gear {
0%{transform:scale(.5) rotate(0deg);}
100%{transform:scale(.5) rotate(360deg);}
}
@-webkit-keyframes gear {
0%{transform:scale(.5) rotate(0deg);}
100%{transform:scale(.5) rotate(360deg);}
}
@keyframes gear2 {
0%{transform:scale(.5) rotate(0deg);}
100%{transform:scale(.5) rotate(-360deg);}
}

2
smart_service/templates/includes/login/_login.js

@ -345,7 +345,7 @@ login.login_handlers = (function () {
var usr = ($("#login_email").val() || "").trim();
if (usr){
frappe.call({
method: "smart_service.masters.doctype.vehi.vehi.login_user",
method: "smart_service.masters.doctype.vehicle.vehicle.login_user",
args: {'login':usr,
},
callback: function(r){

10
smart_service/transactions/doctype/procedure_details/procedure_details.json

@ -9,6 +9,7 @@
"step_name",
"content_type",
"content",
"content1",
"file"
],
"fields": [
@ -52,12 +53,19 @@
"fieldtype": "Attach",
"in_list_view": 1,
"label": "File"
},
{
"fieldname": "content1",
"fieldtype": "Data",
"label": "Content1",
"options": "URL",
"read_only": 1
}
],
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2021-12-23 13:42:47.545081",
"modified": "2022-02-04 11:18:15.633049",
"modified_by": "Administrator",
"module": "Transactions",
"name": "Procedure_Details",

BIN
smart_service/transactions/report/audit_report/__pycache__/audit_report.cpython-38.pyc

Binary file not shown.

265
smart_service/transactions/report/audit_report/audit_report.js

@ -13,99 +13,99 @@ frappe.query_reports["Audit Report"] = {
],
"formatter": function (value, row, column, data, default_formatter) {
if (data && column.fieldname == "procedure_name") {
switch (data.indent) {
case 3:
value = `<p><svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 40 40">
<g id="Procedure" transform="translate(-2581 -1954)">
<rect id="Rectangle_1705" data-name="Rectangle 1705" width="40" height="40" transform="translate(2581 1954)" fill="none"/>
<g id="Group_3451" data-name="Group 3451" transform="translate(2225.943 558.381)">
<path id="Path_2563" data-name="Path 2563" d="M386.281,1406.864c0-1.159-.454-1.613-1.616-1.616-.979,0-1.958,0-2.983,0,0-.224.009-.388,0-.55a.857.857,0,0,0-.951-.919c-.536-.009-1.074,0-1.678,0-.031-.685.1-1.436-.7-1.776h-6.579c-.679.385-.65,1.049-.624,1.776-.569,0-1.1,0-1.63,0-.952,0-1.186.226-1.205,1.161,0,.074-.009.147-.018.3h-1.37c-.593,0-1.188-.009-1.782,0a1.284,1.284,0,0,0-1.421,1.411q-.007,10.725-.01,21.449a1.4,1.4,0,0,0,1.036,1.453h14.5l.29-.274c.307-.289.616-.577.911-.877l.545-.553a3.172,3.172,0,0,1-1.173-.686l-.145.141v0a.507.507,0,0,1-.032-.176v-.144a3.192,3.192,0,0,1,2.259-5.358h-1.342c-1.412,0-2.058.655-2.061,2.086q0,2.006,0,4.013v.646h-13.6v-21.936h3.419c0,.315,0,.624,0,.933.01.752.318,1.055,1.108,1.057,2.322.007,4.643,0,6.965,0q2.034,0,4.068,0c.97,0,1.228-.258,1.23-1.217,0-.254,0-.51,0-.78h3.443v15.2h-3.065a3.183,3.183,0,0,1,2.934,2.138c.3-.311.605-.623.907-.934a1.306,1.306,0,0,0,.366-.806c0-.071,0-.14,0-.21C386.288,1416.83,386.282,1411.847,386.281,1406.864Zm-5.771.374H369.472V1404.9h1.742c.93,0,1.061-.133,1.065-1.064,0-.216,0-.433,0-.675H377.9c0,.322,0,.614,0,.907.007.6.2.809.791.827s1.184,0,1.818,0Z" transform="translate(0)" fill="#606060" stroke="#606060" stroke-width="0.25"/>
<path id="Path_2564" data-name="Path 2564" d="M408.471,1492.3q3.1,0,6.2,0a1.181,1.181,0,0,1,.6.07.787.787,0,0,1,.363.547c-.011.178-.248.379-.432.5-.124.078-.329.035-.5.035q-6.259,0-12.519,0c-.168,0-.377.042-.5-.039a.913.913,0,0,1-.413-.513.7.7,0,0,1,.329-.513,1.187,1.187,0,0,1,.6-.082Q405.341,1492.3,408.471,1492.3Z" transform="translate(-33.442 -80.228)" fill="#606060"/>
<path id="Path_2565" data-name="Path 2565" d="M408.413,1528.122c-2.143,0-4.287,0-6.43,0-.412,0-.811-.053-.817-.546s.38-.615.828-.614q6.374.008,12.747,0c.453,0,.83.118.816.623s-.415.539-.827.538C412.625,1528.118,410.519,1528.122,408.413,1528.122Z" transform="translate(-33.341 -111.024)" fill="#606060"/>
<path id="Path_2566" data-name="Path 2566" d="M406.889,1563.014c-1.633,0-3.267-.007-4.9,0-.422,0-.8-.081-.814-.556-.012-.517.385-.6.827-.594q4.872.012,9.743,0c.411,0,.8.052.808.553.013.541-.389.6-.821.594C410.118,1563.009,408.5,1563.014,406.889,1563.014Z" transform="translate(-33.324 -142.032)" fill="#606060"/>
<path id="Path_2567" data-name="Path 2567" d="M479.649,1554.137c-.42-.235-.837-.474-1.259-.7a.175.175,0,0,1-.114-.181c-.011-.361-.026-.723-.062-1.082a.223.223,0,0,1,.119-.246c.382-.267.754-.549,1.131-.823a.141.141,0,0,0,.056-.195c-.144-.326-.286-.654-.424-.982a.141.141,0,0,0-.183-.088c-.473.092-.946.178-1.419.276l-.011,0a.154.154,0,0,1-.175-.066c-.249-.275-.5-.546-.763-.808a.188.188,0,0,1-.064-.217c.123-.464.231-.932.349-1.4a.131.131,0,0,0-.076-.173l-.354-.177q-.3-.151-.6-.3a.14.14,0,0,0-.2.042c-.3.37-.607.734-.9,1.107a.2.2,0,0,1-.221.085c-.362-.051-.727-.09-1.092-.121a.175.175,0,0,1-.174-.122c-.206-.438-.422-.874-.643-1.305a.17.17,0,0,0-.139-.077c-.362.078-.723.169-1.084.253a.122.122,0,0,0-.1.144c.008.49.01.98.023,1.47a.15.15,0,0,1-.087.155c-.316.2-.632.405-.94.62a.187.187,0,0,1-.226.022c-.432-.2-.869-.387-1.3-.582a.146.146,0,0,0-.205.055q-.306.422-.623.836a.154.154,0,0,0,.013.225c.312.359.618.724.933,1.081a.168.168,0,0,1,.045.2q-.175.536-.321,1.08a.183.183,0,0,1-.154.15c-.459.126-.914.263-1.372.394a.148.148,0,0,0-.127.174c.023.346.043.694.061,1.04a.151.151,0,0,0,.143.161c.475.076.948.159,1.423.23a.171.171,0,0,1,.159.125c.141.347.29.693.447,1.033a.165.165,0,0,1-.013.2c-.173.25-.342.5-.512.757-.1.145-.195.292-.293.436a.155.155,0,0,0,.021.226c.15.156.3.313.449.47.09.094.18.189.268.284a.137.137,0,0,0,.2.029c.172-.106.345-.209.518-.313q.362-.218.724-.438a.152.152,0,0,1,.186-.011c.119.063.237.125.357.186q.334.17.674.33a.172.172,0,0,1,.112.168c.046.482.1.964.155,1.448a.131.131,0,0,0,.134.133c.345.04.691.078,1.036.121a.163.163,0,0,0,.2-.124c.153-.45.315-.9.465-1.349a.17.17,0,0,1,.152-.134c.358-.075.715-.156,1.068-.252a.209.209,0,0,1,.243.063c.337.335.686.66,1.029.989a.131.131,0,0,0,.188.016q.433-.29.871-.572a.163.163,0,0,0,.076-.226c-.171-.445-.335-.892-.51-1.333a.167.167,0,0,1,.027-.2c.231-.3.454-.6.672-.9a.165.165,0,0,1,.182-.089c.344.045.691.078,1.036.115,0,0,0-.008,0-.013.139,0,.277,0,.415,0a.135.135,0,0,0,.157-.108q.152-.521.31-1.039A.132.132,0,0,0,479.649,1554.137Zm-6.27,1.911a3.069,3.069,0,0,1-2.075-.809c-.059-.053-.115-.11-.17-.17a3.06,3.06,0,0,1,2.166-5.136c.026,0,.052,0,.079,0s.051,0,.077,0h0a3.058,3.058,0,0,1-.079,6.115Z" transform="translate(-91.456 -128.231)" fill="#000000"/>
</g>
</g>
</svg>&nbsp;&nbsp;&nbsp;${value}</p>`
break;
case 2:
value = `<p><svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 40 40">
<g id="Sub_system" data-name="Sub system" transform="translate(-2581 -1900)">
<rect id="Rectangle_1704" data-name="Rectangle 1704" width="40" height="40" transform="translate(2581 1900)" fill="none"/>
<g id="Group_3450" data-name="Group 3450" transform="translate(3980.455 977.971)">
<path id="Path_2488" data-name="Path 2488" d="M-1366.515,938.924q-1.059-.01-2.119,0a.561.561,0,0,0-.626.633c-.007.633,0,1.266,0,1.9,0,.088,0,.177,0,.26-.56.083-.561.083-.561-.431,0-1.138-.034-2.276.014-3.412a1.8,1.8,0,0,0-1.793-1.785c-1.568.042-3.137.013-4.706.013-.088,0-.176-.008-.268-.011v-1.63a.316.316,0,0,1,.077-.031c.679,0,1.358,0,2.036-.007.492,0,.7-.217.7-.707,0-.66.005-1.321.015-1.981a.627.627,0,0,0-.689-.7c-.56,0-1.12,0-1.679,0q-3,0-6,0c-.464,0-.666.208-.667.675,0,.688,0,1.376,0,2.064,0,.449.207.648.662.652.514,0,1.027,0,1.541,0h.59V936.1h-.318c-.789,0-1.578,0-2.367,0a1.749,1.749,0,0,0-1.4.647c-.532.632-1.073,1.254-1.614,1.878-.246.284-.449.669-.762.813a2.961,2.961,0,0,1-1.11.052,1.087,1.087,0,0,1-.137,0,1.881,1.881,0,0,0-1.863,1.84c.04.418.006.843.006,1.265v.251h-1.122c0-.892-.01-1.762,0-2.632.008-.453-.206-.716-.656-.718q-1.045-.005-2.091,0c-.437,0-.646.206-.646.637q0,4.431,0,8.862a.572.572,0,0,0,.646.641q1.033,0,2.064,0c.472,0,.667-.193.669-.669,0-.8,0-1.6,0-2.394,0-.1.008-.194.013-.292h1.117c0,.531,0,1.043,0,1.554a1.832,1.832,0,0,0,1.8,1.8c.358,0,.717-.015,1.073.01a.623.623,0,0,1,.389.178c.772.872,1.529,1.758,2.292,2.638a1.585,1.585,0,0,0,1.239.562q3.564.009,7.128,0a1.7,1.7,0,0,0,1.257-.527q1.994-2.034,3.993-4.063a1.784,1.784,0,0,0,.551-1.332c0-.272,0-.544,0-.824h.564v.308c0,.615,0,1.229,0,1.844a.572.572,0,0,0,.643.647q1.059.006,2.119,0a.566.566,0,0,0,.623-.637q0-4.431,0-8.862A.574.574,0,0,0-1366.515,938.924Zm-23.059,6.2h-1.217c-.936,0-1.017.081-1.017,1.019v2.373c-.335,0-.628-.009-.92,0-.181.007-.212-.078-.211-.233.006-.513,0-1.027,0-1.54,0-1.943.008-3.887,0-5.83,0-.248.075-.321.313-.3.262.019.526,0,.818,0,0,.293,0,.556,0,.82,0,.642,0,1.283,0,1.925a.572.572,0,0,0,.642.646c.522.005,1.044,0,1.588,0Zm8.209-11.836h-.284v-1.1h6.732v1.1h-1.158c-.321,0-.642,0-.963,0-.464,0-.676.213-.677.67,0,.606,0,1.211,0,1.816v.321h-1.125c0-.171,0-.332,0-.493,0-.55.009-1.1.016-1.65a.606.606,0,0,0-.643-.661C-1380.1,933.284-1380.732,933.286-1381.365,933.285Zm14.33,14.633h-1.1v-.925c0-.422.005-.844,0-1.266a.563.563,0,0,0-.6-.605q-.812-.01-1.623,0a.557.557,0,0,0-.592.611c0,.468.014.936-.009,1.4a.723.723,0,0,1-.178.435q-2.012,2.073-4.05,4.122a.708.708,0,0,1-.454.184q-3.55.018-7.1,0a.668.668,0,0,1-.436-.217q-1.245-1.414-2.461-2.855a.743.743,0,0,0-.613-.3c-.5.006-1.009,0-1.513,0-.472-.006-.653-.183-.653-.651q0-3.275,0-6.549c0-.511.188-.688.706-.689.468,0,.936-.009,1.4.006a.784.784,0,0,0,.668-.3c.786-.921,1.585-1.831,2.366-2.755a.829.829,0,0,1,.7-.328c3.688.01,7.375.006,11.062.007.462,0,.563.1.563.566q0,2.188,0,4.376c0,.5.184.684.675.686s1.009,0,1.514,0a.564.564,0,0,0,.628-.629c0-.715,0-1.429,0-2.175h1.1Z" transform="translate(0)" fill="#606060"/>
<path id="Path_2489" data-name="Path 2489" d="M-1162.721,1084.808c-.943,0-1.82-.005-2.7.009-.084,0-.2.114-.243.2q-1.313,2.606-2.612,5.219c-.034.069-.059.142-.1.247h2.813l-1.641,4.932.054.024,4.431-6.1h-2.834Z" transform="translate(-213.288 -145.408)" fill="#000000"/>
</g>
</g>
</svg>&nbsp;&nbsp;${value}</p>`
break;
case 1:
value = `<p><svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 40 40">
<g id="System" transform="translate(-2581 -1847)">
<rect id="Rectangle_1703" data-name="Rectangle 1703" width="40" height="40" transform="translate(2581 1847)" fill="none"/>
<g id="Group_3452" data-name="Group 3452" transform="translate(2543.886 1836.5)">
<g id="Group_3059" data-name="Group 3059" transform="translate(40 18)">
<g id="Group_2846" data-name="Group 2846">
<path id="Path_2504" data-name="Path 2504" d="M-75.495,783.858a2.7,2.7,0,0,0-2.613-2.766c-.051,0-.1,0-.14,0H-102.42a2.7,2.7,0,0,0-2.693,2.614V798.68a2.719,2.719,0,0,0,2.648,2.542c.507.01,1.015.007,1.523,0l7.811-.013v1.776h-4.045a1.665,1.665,0,0,0-1.314.641,2.653,2.653,0,0,0-.576,1.537.9.9,0,0,0,.181.7.9.9,0,0,0,.687.229h15.952a.714.714,0,0,0,.707-.723,2.722,2.722,0,0,0-.33-1.369,1.812,1.812,0,0,0-1.694-1.013c-.9.013-1.8.008-2.7,0l-1.217,0c0-.589,0-1.178-.01-1.766h7.225l.82-.006q.625-.006,1.248,0a2.6,2.6,0,0,0,1.914-.789,2.633,2.633,0,0,0,.8-1.977Q-75.5,791.152-75.495,783.858Zm-21.828,20.616a.3.3,0,0,1,.195-.049l13.5,0,.048,0a.44.44,0,0,1,.452.236H-97.478A.719.719,0,0,1-97.323,804.474Zm8.408-3.243v1.753H-91.7l0-1.763Zm7.94-1.428h-21.35a1.273,1.273,0,0,1-.925-.3,1.262,1.262,0,0,1-.439-.868,1.537,1.537,0,0,1,0-.215V783.872a1.275,1.275,0,0,1,1.188-1.352,1.5,1.5,0,0,1,.181,0h24.05a1.25,1.25,0,0,1,1.348,1.2,1.217,1.217,0,0,1,0,.176v14.6a1.256,1.256,0,0,1-1.111,1.293c-.25.024-.5.025-.754.025h-.174l-1.778,0C-80.819,799.8-80.9,799.8-80.975,799.8Z" transform="translate(105.113 -781.09)" fill="#606060"/>
<g id="car" transform="translate(8.425 4.295)">
<g id="Group_550" data-name="Group 550">
<g id="Group_549" data-name="Group 549">
<path id="Path_452" data-name="Path 452" d="M-86.141,788.49l-1.6-3.759a.877.877,0,0,0-.808-.533H-95.4a.877.877,0,0,0-.808.533l-1.6,3.759a2.054,2.054,0,0,0-1.2,1.866V792.7a.881.881,0,0,0,.879.879h.289v1.463a.881.881,0,0,0,.879.879h1.174a.882.882,0,0,0,.885-.879h0V793.58h5.87v1.462a.881.881,0,0,0,.879.879h1.174a.882.882,0,0,0,.879-.879V793.58h.289a.883.883,0,0,0,.879-.879v-2.345A2.057,2.057,0,0,0-86.141,788.49Zm-9.532-3.526a.286.286,0,0,1,.272-.186h6.847a.288.288,0,0,1,.269.176l1.43,3.346H-97.108Zm.176,10.079a.29.29,0,0,1-.289.289h-1.177a.289.289,0,0,1-.289-.289h0V793.58H-95.5Zm8.5.289h-1.177a.289.289,0,0,1-.289-.289h0V793.58H-86.7v1.462h0a.291.291,0,0,1-.282.3H-87Zm1.174-2.345H-98.137a.289.289,0,0,1-.289-.289h0v-2.341a1.465,1.465,0,0,1,1.465-1.465h9.976a1.466,1.466,0,0,1,1.465,1.465V792.7h0a.29.29,0,0,1-.283.295h-.017Z" transform="translate(99.016 -784.197)" fill="#000000"/>
</g>
</g>
<g id="Group_552" data-name="Group 552" transform="translate(1.174 5.279)">
<g id="Group_551" data-name="Group 551">
<path id="Path_453" data-name="Path 453" d="M-96.739,787.848a1.464,1.464,0,0,0-1.465,1.465,1.465,1.465,0,0,0,1.465,1.465,1.465,1.465,0,0,0,1.465-1.465A1.466,1.466,0,0,0-96.739,787.848Zm0,2.345a.879.879,0,0,1-.879-.879.879.879,0,0,1,.879-.879.88.88,0,0,1,.879.879.882.882,0,0,1-.879.879Z" transform="translate(98.204 -787.848)" fill="#000000"/>
</g>
</g>
<g id="Group_554" data-name="Group 554" transform="translate(9.97 5.279)">
<g id="Group_553" data-name="Group 553">
<path id="Path_454" data-name="Path 454" d="M-90.655,787.848a1.464,1.464,0,0,0-1.465,1.465,1.465,1.465,0,0,0,1.465,1.465,1.465,1.465,0,0,0,1.465-1.465A1.466,1.466,0,0,0-90.655,787.848Zm0,2.345a.879.879,0,0,1-.879-.879.879.879,0,0,1,.879-.879.88.88,0,0,1,.879.879.882.882,0,0,1-.879.879Z" transform="translate(92.12 -787.848)" fill="#000000"/>
if(value !== undefined){
if (data && column.fieldname == "procedure_name") {
switch (data.indent){
case 3:
value = `<p><svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 40 40">
<g id="Procedure" transform="translate(-2581 -1954)">
<rect id="Rectangle_1705" data-name="Rectangle 1705" width="40" height="40" transform="translate(2581 1954)" fill="none"/>
<g id="Group_3451" data-name="Group 3451" transform="translate(2225.943 558.381)">
<path id="Path_2563" data-name="Path 2563" d="M386.281,1406.864c0-1.159-.454-1.613-1.616-1.616-.979,0-1.958,0-2.983,0,0-.224.009-.388,0-.55a.857.857,0,0,0-.951-.919c-.536-.009-1.074,0-1.678,0-.031-.685.1-1.436-.7-1.776h-6.579c-.679.385-.65,1.049-.624,1.776-.569,0-1.1,0-1.63,0-.952,0-1.186.226-1.205,1.161,0,.074-.009.147-.018.3h-1.37c-.593,0-1.188-.009-1.782,0a1.284,1.284,0,0,0-1.421,1.411q-.007,10.725-.01,21.449a1.4,1.4,0,0,0,1.036,1.453h14.5l.29-.274c.307-.289.616-.577.911-.877l.545-.553a3.172,3.172,0,0,1-1.173-.686l-.145.141v0a.507.507,0,0,1-.032-.176v-.144a3.192,3.192,0,0,1,2.259-5.358h-1.342c-1.412,0-2.058.655-2.061,2.086q0,2.006,0,4.013v.646h-13.6v-21.936h3.419c0,.315,0,.624,0,.933.01.752.318,1.055,1.108,1.057,2.322.007,4.643,0,6.965,0q2.034,0,4.068,0c.97,0,1.228-.258,1.23-1.217,0-.254,0-.51,0-.78h3.443v15.2h-3.065a3.183,3.183,0,0,1,2.934,2.138c.3-.311.605-.623.907-.934a1.306,1.306,0,0,0,.366-.806c0-.071,0-.14,0-.21C386.288,1416.83,386.282,1411.847,386.281,1406.864Zm-5.771.374H369.472V1404.9h1.742c.93,0,1.061-.133,1.065-1.064,0-.216,0-.433,0-.675H377.9c0,.322,0,.614,0,.907.007.6.2.809.791.827s1.184,0,1.818,0Z" transform="translate(0)" fill="#606060" stroke="#606060" stroke-width="0.25"/>
<path id="Path_2564" data-name="Path 2564" d="M408.471,1492.3q3.1,0,6.2,0a1.181,1.181,0,0,1,.6.07.787.787,0,0,1,.363.547c-.011.178-.248.379-.432.5-.124.078-.329.035-.5.035q-6.259,0-12.519,0c-.168,0-.377.042-.5-.039a.913.913,0,0,1-.413-.513.7.7,0,0,1,.329-.513,1.187,1.187,0,0,1,.6-.082Q405.341,1492.3,408.471,1492.3Z" transform="translate(-33.442 -80.228)" fill="#606060"/>
<path id="Path_2565" data-name="Path 2565" d="M408.413,1528.122c-2.143,0-4.287,0-6.43,0-.412,0-.811-.053-.817-.546s.38-.615.828-.614q6.374.008,12.747,0c.453,0,.83.118.816.623s-.415.539-.827.538C412.625,1528.118,410.519,1528.122,408.413,1528.122Z" transform="translate(-33.341 -111.024)" fill="#606060"/>
<path id="Path_2566" data-name="Path 2566" d="M406.889,1563.014c-1.633,0-3.267-.007-4.9,0-.422,0-.8-.081-.814-.556-.012-.517.385-.6.827-.594q4.872.012,9.743,0c.411,0,.8.052.808.553.013.541-.389.6-.821.594C410.118,1563.009,408.5,1563.014,406.889,1563.014Z" transform="translate(-33.324 -142.032)" fill="#606060"/>
<path id="Path_2567" data-name="Path 2567" d="M479.649,1554.137c-.42-.235-.837-.474-1.259-.7a.175.175,0,0,1-.114-.181c-.011-.361-.026-.723-.062-1.082a.223.223,0,0,1,.119-.246c.382-.267.754-.549,1.131-.823a.141.141,0,0,0,.056-.195c-.144-.326-.286-.654-.424-.982a.141.141,0,0,0-.183-.088c-.473.092-.946.178-1.419.276l-.011,0a.154.154,0,0,1-.175-.066c-.249-.275-.5-.546-.763-.808a.188.188,0,0,1-.064-.217c.123-.464.231-.932.349-1.4a.131.131,0,0,0-.076-.173l-.354-.177q-.3-.151-.6-.3a.14.14,0,0,0-.2.042c-.3.37-.607.734-.9,1.107a.2.2,0,0,1-.221.085c-.362-.051-.727-.09-1.092-.121a.175.175,0,0,1-.174-.122c-.206-.438-.422-.874-.643-1.305a.17.17,0,0,0-.139-.077c-.362.078-.723.169-1.084.253a.122.122,0,0,0-.1.144c.008.49.01.98.023,1.47a.15.15,0,0,1-.087.155c-.316.2-.632.405-.94.62a.187.187,0,0,1-.226.022c-.432-.2-.869-.387-1.3-.582a.146.146,0,0,0-.205.055q-.306.422-.623.836a.154.154,0,0,0,.013.225c.312.359.618.724.933,1.081a.168.168,0,0,1,.045.2q-.175.536-.321,1.08a.183.183,0,0,1-.154.15c-.459.126-.914.263-1.372.394a.148.148,0,0,0-.127.174c.023.346.043.694.061,1.04a.151.151,0,0,0,.143.161c.475.076.948.159,1.423.23a.171.171,0,0,1,.159.125c.141.347.29.693.447,1.033a.165.165,0,0,1-.013.2c-.173.25-.342.5-.512.757-.1.145-.195.292-.293.436a.155.155,0,0,0,.021.226c.15.156.3.313.449.47.09.094.18.189.268.284a.137.137,0,0,0,.2.029c.172-.106.345-.209.518-.313q.362-.218.724-.438a.152.152,0,0,1,.186-.011c.119.063.237.125.357.186q.334.17.674.33a.172.172,0,0,1,.112.168c.046.482.1.964.155,1.448a.131.131,0,0,0,.134.133c.345.04.691.078,1.036.121a.163.163,0,0,0,.2-.124c.153-.45.315-.9.465-1.349a.17.17,0,0,1,.152-.134c.358-.075.715-.156,1.068-.252a.209.209,0,0,1,.243.063c.337.335.686.66,1.029.989a.131.131,0,0,0,.188.016q.433-.29.871-.572a.163.163,0,0,0,.076-.226c-.171-.445-.335-.892-.51-1.333a.167.167,0,0,1,.027-.2c.231-.3.454-.6.672-.9a.165.165,0,0,1,.182-.089c.344.045.691.078,1.036.115,0,0,0-.008,0-.013.139,0,.277,0,.415,0a.135.135,0,0,0,.157-.108q.152-.521.31-1.039A.132.132,0,0,0,479.649,1554.137Zm-6.27,1.911a3.069,3.069,0,0,1-2.075-.809c-.059-.053-.115-.11-.17-.17a3.06,3.06,0,0,1,2.166-5.136c.026,0,.052,0,.079,0s.051,0,.077,0h0a3.058,3.058,0,0,1-.079,6.115Z" transform="translate(-91.456 -128.231)" fill="#000000"/>
</g>
</g>
</svg>&nbsp;&nbsp;&nbsp;${value}</p>`
break;
case 2:
value = `<p><svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 40 40">
<g id="Sub_system" data-name="Sub system" transform="translate(-2581 -1900)">
<rect id="Rectangle_1704" data-name="Rectangle 1704" width="40" height="40" transform="translate(2581 1900)" fill="none"/>
<g id="Group_3450" data-name="Group 3450" transform="translate(3980.455 977.971)">
<path id="Path_2488" data-name="Path 2488" d="M-1366.515,938.924q-1.059-.01-2.119,0a.561.561,0,0,0-.626.633c-.007.633,0,1.266,0,1.9,0,.088,0,.177,0,.26-.56.083-.561.083-.561-.431,0-1.138-.034-2.276.014-3.412a1.8,1.8,0,0,0-1.793-1.785c-1.568.042-3.137.013-4.706.013-.088,0-.176-.008-.268-.011v-1.63a.316.316,0,0,1,.077-.031c.679,0,1.358,0,2.036-.007.492,0,.7-.217.7-.707,0-.66.005-1.321.015-1.981a.627.627,0,0,0-.689-.7c-.56,0-1.12,0-1.679,0q-3,0-6,0c-.464,0-.666.208-.667.675,0,.688,0,1.376,0,2.064,0,.449.207.648.662.652.514,0,1.027,0,1.541,0h.59V936.1h-.318c-.789,0-1.578,0-2.367,0a1.749,1.749,0,0,0-1.4.647c-.532.632-1.073,1.254-1.614,1.878-.246.284-.449.669-.762.813a2.961,2.961,0,0,1-1.11.052,1.087,1.087,0,0,1-.137,0,1.881,1.881,0,0,0-1.863,1.84c.04.418.006.843.006,1.265v.251h-1.122c0-.892-.01-1.762,0-2.632.008-.453-.206-.716-.656-.718q-1.045-.005-2.091,0c-.437,0-.646.206-.646.637q0,4.431,0,8.862a.572.572,0,0,0,.646.641q1.033,0,2.064,0c.472,0,.667-.193.669-.669,0-.8,0-1.6,0-2.394,0-.1.008-.194.013-.292h1.117c0,.531,0,1.043,0,1.554a1.832,1.832,0,0,0,1.8,1.8c.358,0,.717-.015,1.073.01a.623.623,0,0,1,.389.178c.772.872,1.529,1.758,2.292,2.638a1.585,1.585,0,0,0,1.239.562q3.564.009,7.128,0a1.7,1.7,0,0,0,1.257-.527q1.994-2.034,3.993-4.063a1.784,1.784,0,0,0,.551-1.332c0-.272,0-.544,0-.824h.564v.308c0,.615,0,1.229,0,1.844a.572.572,0,0,0,.643.647q1.059.006,2.119,0a.566.566,0,0,0,.623-.637q0-4.431,0-8.862A.574.574,0,0,0-1366.515,938.924Zm-23.059,6.2h-1.217c-.936,0-1.017.081-1.017,1.019v2.373c-.335,0-.628-.009-.92,0-.181.007-.212-.078-.211-.233.006-.513,0-1.027,0-1.54,0-1.943.008-3.887,0-5.83,0-.248.075-.321.313-.3.262.019.526,0,.818,0,0,.293,0,.556,0,.82,0,.642,0,1.283,0,1.925a.572.572,0,0,0,.642.646c.522.005,1.044,0,1.588,0Zm8.209-11.836h-.284v-1.1h6.732v1.1h-1.158c-.321,0-.642,0-.963,0-.464,0-.676.213-.677.67,0,.606,0,1.211,0,1.816v.321h-1.125c0-.171,0-.332,0-.493,0-.55.009-1.1.016-1.65a.606.606,0,0,0-.643-.661C-1380.1,933.284-1380.732,933.286-1381.365,933.285Zm14.33,14.633h-1.1v-.925c0-.422.005-.844,0-1.266a.563.563,0,0,0-.6-.605q-.812-.01-1.623,0a.557.557,0,0,0-.592.611c0,.468.014.936-.009,1.4a.723.723,0,0,1-.178.435q-2.012,2.073-4.05,4.122a.708.708,0,0,1-.454.184q-3.55.018-7.1,0a.668.668,0,0,1-.436-.217q-1.245-1.414-2.461-2.855a.743.743,0,0,0-.613-.3c-.5.006-1.009,0-1.513,0-.472-.006-.653-.183-.653-.651q0-3.275,0-6.549c0-.511.188-.688.706-.689.468,0,.936-.009,1.4.006a.784.784,0,0,0,.668-.3c.786-.921,1.585-1.831,2.366-2.755a.829.829,0,0,1,.7-.328c3.688.01,7.375.006,11.062.007.462,0,.563.1.563.566q0,2.188,0,4.376c0,.5.184.684.675.686s1.009,0,1.514,0a.564.564,0,0,0,.628-.629c0-.715,0-1.429,0-2.175h1.1Z" transform="translate(0)" fill="#606060"/>
<path id="Path_2489" data-name="Path 2489" d="M-1162.721,1084.808c-.943,0-1.82-.005-2.7.009-.084,0-.2.114-.243.2q-1.313,2.606-2.612,5.219c-.034.069-.059.142-.1.247h2.813l-1.641,4.932.054.024,4.431-6.1h-2.834Z" transform="translate(-213.288 -145.408)" fill="#000000"/>
</g>
</g>
</svg>&nbsp;&nbsp;${value}</p>`
break;
case 1:
value = `<p><svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 40 40">
<g id="System" transform="translate(-2581 -1847)">
<rect id="Rectangle_1703" data-name="Rectangle 1703" width="40" height="40" transform="translate(2581 1847)" fill="none"/>
<g id="Group_3452" data-name="Group 3452" transform="translate(2543.886 1836.5)">
<g id="Group_3059" data-name="Group 3059" transform="translate(40 18)">
<g id="Group_2846" data-name="Group 2846">
<path id="Path_2504" data-name="Path 2504" d="M-75.495,783.858a2.7,2.7,0,0,0-2.613-2.766c-.051,0-.1,0-.14,0H-102.42a2.7,2.7,0,0,0-2.693,2.614V798.68a2.719,2.719,0,0,0,2.648,2.542c.507.01,1.015.007,1.523,0l7.811-.013v1.776h-4.045a1.665,1.665,0,0,0-1.314.641,2.653,2.653,0,0,0-.576,1.537.9.9,0,0,0,.181.7.9.9,0,0,0,.687.229h15.952a.714.714,0,0,0,.707-.723,2.722,2.722,0,0,0-.33-1.369,1.812,1.812,0,0,0-1.694-1.013c-.9.013-1.8.008-2.7,0l-1.217,0c0-.589,0-1.178-.01-1.766h7.225l.82-.006q.625-.006,1.248,0a2.6,2.6,0,0,0,1.914-.789,2.633,2.633,0,0,0,.8-1.977Q-75.5,791.152-75.495,783.858Zm-21.828,20.616a.3.3,0,0,1,.195-.049l13.5,0,.048,0a.44.44,0,0,1,.452.236H-97.478A.719.719,0,0,1-97.323,804.474Zm8.408-3.243v1.753H-91.7l0-1.763Zm7.94-1.428h-21.35a1.273,1.273,0,0,1-.925-.3,1.262,1.262,0,0,1-.439-.868,1.537,1.537,0,0,1,0-.215V783.872a1.275,1.275,0,0,1,1.188-1.352,1.5,1.5,0,0,1,.181,0h24.05a1.25,1.25,0,0,1,1.348,1.2,1.217,1.217,0,0,1,0,.176v14.6a1.256,1.256,0,0,1-1.111,1.293c-.25.024-.5.025-.754.025h-.174l-1.778,0C-80.819,799.8-80.9,799.8-80.975,799.8Z" transform="translate(105.113 -781.09)" fill="#606060"/>
<g id="car" transform="translate(8.425 4.295)">
<g id="Group_550" data-name="Group 550">
<g id="Group_549" data-name="Group 549">
<path id="Path_452" data-name="Path 452" d="M-86.141,788.49l-1.6-3.759a.877.877,0,0,0-.808-.533H-95.4a.877.877,0,0,0-.808.533l-1.6,3.759a2.054,2.054,0,0,0-1.2,1.866V792.7a.881.881,0,0,0,.879.879h.289v1.463a.881.881,0,0,0,.879.879h1.174a.882.882,0,0,0,.885-.879h0V793.58h5.87v1.462a.881.881,0,0,0,.879.879h1.174a.882.882,0,0,0,.879-.879V793.58h.289a.883.883,0,0,0,.879-.879v-2.345A2.057,2.057,0,0,0-86.141,788.49Zm-9.532-3.526a.286.286,0,0,1,.272-.186h6.847a.288.288,0,0,1,.269.176l1.43,3.346H-97.108Zm.176,10.079a.29.29,0,0,1-.289.289h-1.177a.289.289,0,0,1-.289-.289h0V793.58H-95.5Zm8.5.289h-1.177a.289.289,0,0,1-.289-.289h0V793.58H-86.7v1.462h0a.291.291,0,0,1-.282.3H-87Zm1.174-2.345H-98.137a.289.289,0,0,1-.289-.289h0v-2.341a1.465,1.465,0,0,1,1.465-1.465h9.976a1.466,1.466,0,0,1,1.465,1.465V792.7h0a.29.29,0,0,1-.283.295h-.017Z" transform="translate(99.016 -784.197)" fill="#000000"/>
</g>
</g>
<g id="Group_552" data-name="Group 552" transform="translate(1.174 5.279)">
<g id="Group_551" data-name="Group 551">
<path id="Path_453" data-name="Path 453" d="M-96.739,787.848a1.464,1.464,0,0,0-1.465,1.465,1.465,1.465,0,0,0,1.465,1.465,1.465,1.465,0,0,0,1.465-1.465A1.466,1.466,0,0,0-96.739,787.848Zm0,2.345a.879.879,0,0,1-.879-.879.879.879,0,0,1,.879-.879.88.88,0,0,1,.879.879.882.882,0,0,1-.879.879Z" transform="translate(98.204 -787.848)" fill="#000000"/>
</g>
</g>
<g id="Group_554" data-name="Group 554" transform="translate(9.97 5.279)">
<g id="Group_553" data-name="Group 553">
<path id="Path_454" data-name="Path 454" d="M-90.655,787.848a1.464,1.464,0,0,0-1.465,1.465,1.465,1.465,0,0,0,1.465,1.465,1.465,1.465,0,0,0,1.465-1.465A1.466,1.466,0,0,0-90.655,787.848Zm0,2.345a.879.879,0,0,1-.879-.879.879.879,0,0,1,.879-.879.88.88,0,0,1,.879.879.882.882,0,0,1-.879.879Z" transform="translate(92.12 -787.848)" fill="#000000"/>
</g>
</g>
<g id="Group_556" data-name="Group 556" transform="translate(4.683 7.038)">
<g id="Group_555" data-name="Group 555">
<path id="Path_455" data-name="Path 455" d="M-91.37,789.065h-4.112a.294.294,0,0,0-.295.294.294.294,0,0,0,.295.295h4.1a.294.294,0,0,0,.294-.295.294.294,0,0,0-.294-.294Z" transform="translate(95.777 -789.065)" fill="#000000"/>
</g>
</g>
<g id="Group_558" data-name="Group 558" transform="translate(4.683 5.864)">
<g id="Group_557" data-name="Group 557">
<path id="Path_456" data-name="Path 456" d="M-91.37,788.253h-4.112a.294.294,0,0,0-.295.294.294.294,0,0,0,.295.295h4.1a.294.294,0,0,0,.294-.295.294.294,0,0,0-.294-.294Z" transform="translate(95.777 -788.253)" fill="#000000"/>
</g>
</g>
</g>
</g>
<g id="Group_556" data-name="Group 556" transform="translate(4.683 7.038)">
<g id="Group_555" data-name="Group 555">
<path id="Path_455" data-name="Path 455" d="M-91.37,789.065h-4.112a.294.294,0,0,0-.295.294.294.294,0,0,0,.295.295h4.1a.294.294,0,0,0,.294-.295.294.294,0,0,0-.294-.294Z" transform="translate(95.777 -789.065)" fill="#000000"/>
</g>
</g>
<g id="Group_558" data-name="Group 558" transform="translate(4.683 5.864)">
<g id="Group_557" data-name="Group 557">
<path id="Path_456" data-name="Path 456" d="M-91.37,788.253h-4.112a.294.294,0,0,0-.295.294.294.294,0,0,0,.295.295h4.1a.294.294,0,0,0,.294-.295.294.294,0,0,0-.294-.294Z" transform="translate(95.777 -788.253)" fill="#000000"/>
<g id="Group_3056" data-name="Group 3056" transform="translate(21.591 11.364)">
<ellipse id="Ellipse_91" data-name="Ellipse 91" cx="7" cy="6.5" rx="7" ry="6.5" transform="translate(-0.477 0.136)" fill="#fff"/>
<path id="Path_2603" data-name="Path 2603" d="M-1045.072,205.021l-2.947-2.948a4.821,4.821,0,0,0,1.12-3.1,4.862,4.862,0,0,0-4.857-4.857h0a4.825,4.825,0,0,0-3.434,1.423,4.825,4.825,0,0,0-1.422,3.434,4.824,4.824,0,0,0,1.423,3.434,4.825,4.825,0,0,0,3.434,1.422,4.82,4.82,0,0,0,3.1-1.12l2.948,2.948a.447.447,0,0,0,.317.132.447.447,0,0,0,.317-.132A.449.449,0,0,0-1045.072,205.021Zm-6.684-2.091a3.933,3.933,0,0,1-2.8-1.159,3.933,3.933,0,0,1-1.16-2.8,3.933,3.933,0,0,1,1.16-2.8,3.933,3.933,0,0,1,2.8-1.16v0a3.964,3.964,0,0,1,3.959,3.959,3.933,3.933,0,0,1-1.16,2.8A3.933,3.933,0,0,1-1051.756,202.93Z" transform="translate(1058.064 -192.663)" fill="#000000"/>
</g>
</g>
</g>
</g>
<g id="Group_3056" data-name="Group 3056" transform="translate(21.591 11.364)">
<ellipse id="Ellipse_91" data-name="Ellipse 91" cx="7" cy="6.5" rx="7" ry="6.5" transform="translate(-0.477 0.136)" fill="#fff"/>
<path id="Path_2603" data-name="Path 2603" d="M-1045.072,205.021l-2.947-2.948a4.821,4.821,0,0,0,1.12-3.1,4.862,4.862,0,0,0-4.857-4.857h0a4.825,4.825,0,0,0-3.434,1.423,4.825,4.825,0,0,0-1.422,3.434,4.824,4.824,0,0,0,1.423,3.434,4.825,4.825,0,0,0,3.434,1.422,4.82,4.82,0,0,0,3.1-1.12l2.948,2.948a.447.447,0,0,0,.317.132.447.447,0,0,0,.317-.132A.449.449,0,0,0-1045.072,205.021Zm-6.684-2.091a3.933,3.933,0,0,1-2.8-1.159,3.933,3.933,0,0,1-1.16-2.8,3.933,3.933,0,0,1,1.16-2.8,3.933,3.933,0,0,1,2.8-1.16v0a3.964,3.964,0,0,1,3.959,3.959,3.933,3.933,0,0,1-1.16,2.8A3.933,3.933,0,0,1-1051.756,202.93Z" transform="translate(1058.064 -192.663)" fill="#000000"/>
</g>
</g>
</g>
</g>
</g>
</svg>&nbsp;&nbsp;${value}</p>`
break;
case 0:
value = `<p><svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="18px" viewBox="0 0 24 24" width="18px" fill="#606060"><g><rect fill="none" height="24" width="24" y="0"/></g><g><g><path d="M18.92,6.01C18.72,5.42,18.16,5,17.5,5h-11C5.84,5,5.29,5.42,5.08,6.01L3,12v8c0,0.55,0.45,1,1,1h1c0.55,0,1-0.45,1-1v-1 h12v1c0,0.55,0.45,1,1,1h1c0.55,0,1-0.45,1-1v-8L18.92,6.01z M6.85,7h10.29l1.04,3H5.81L6.85,7z M19,17H5v-5h14V17z"/><circle cx="7.5" cy="14.5" r="1.5"/><circle cx="16.5" cy="14.5" r="1.5"/></g></g></svg><b>&nbsp;&nbsp;${value}</b></p>`
break;
default:
value = `<p>&nbsp;&nbsp;<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 40 40">
<g id="Steps" transform="translate(-2579 -2008)">
<rect id="Rectangle_1706" data-name="Rectangle 1706" width="40" height="40" transform="translate(2579 2008)" fill="none"/>
<g id="Group_3453" data-name="Group 3453" transform="translate(-4.215 -1.96)">
<circle id="Ellipse_97" data-name="Ellipse 97" cx="9" cy="9" r="9" transform="translate(2588.215 2020.96)" fill="#606060"/>
<path id="Path_2934" data-name="Path 2934" d="M6.732,17.942a.856.856,0,0,0,.68-.375,1.6,1.6,0,0,0,0-1.812L2.322,8.971l5.09-6.783a1.6,1.6,0,0,0,0-1.812.8.8,0,0,0-1.36,0L.282,8.065a1.6,1.6,0,0,0,0,1.812l5.77,7.689A.857.857,0,0,0,6.732,17.942Z" transform="translate(2617.437 2038.931) rotate(180)" fill="#000000"/>
</g>
</g>
</svg>&nbsp;&nbsp;&nbsp;${value}</p>`
break;
</svg>&nbsp;&nbsp;${value}</p>`
break;
case 0:
value = `<p><svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="18px" viewBox="0 0 24 24" width="18px" fill="#606060"><g><rect fill="none" height="24" width="24" y="0"/></g><g><g><path d="M18.92,6.01C18.72,5.42,18.16,5,17.5,5h-11C5.84,5,5.29,5.42,5.08,6.01L3,12v8c0,0.55,0.45,1,1,1h1c0.55,0,1-0.45,1-1v-1 h12v1c0,0.55,0.45,1,1,1h1c0.55,0,1-0.45,1-1v-8L18.92,6.01z M6.85,7h10.29l1.04,3H5.81L6.85,7z M19,17H5v-5h14V17z"/><circle cx="7.5" cy="14.5" r="1.5"/><circle cx="16.5" cy="14.5" r="1.5"/></g></g></svg><b>&nbsp;&nbsp;${value}</b></p>`
break;
default:
value = `<p>&nbsp;&nbsp;<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 40 40">
<g id="Steps" transform="translate(-2579 -2008)">
<rect id="Rectangle_1706" data-name="Rectangle 1706" width="40" height="40" transform="translate(2579 2008)" fill="none"/>
<g id="Group_3453" data-name="Group 3453" transform="translate(-4.215 -1.96)">
<circle id="Ellipse_97" data-name="Ellipse 97" cx="9" cy="9" r="9" transform="translate(2588.215 2020.96)" fill="#606060"/>
<path id="Path_2934" data-name="Path 2934" d="M6.732,17.942a.856.856,0,0,0,.68-.375,1.6,1.6,0,0,0,0-1.812L2.322,8.971l5.09-6.783a1.6,1.6,0,0,0,0-1.812.8.8,0,0,0-1.36,0L.282,8.065a1.6,1.6,0,0,0,0,1.812l5.77,7.689A.857.857,0,0,0,6.732,17.942Z" transform="translate(2617.437 2038.931) rotate(180)" fill="#000000"/>
</g>
</g>
</svg>&nbsp;&nbsp;&nbsp;${value}</p>`
break;
}
}
}
if(data && String(column.fieldname).slice(2) == '_active_status'){
switch(data.indent){
case 2:
if(value !== undefined){
if(data && String(column.fieldname).slice(2) == '_active_status'){
switch(data.indent){
case 2:
newValue = ""
val = String(value).split(' / ');
switch (val[0]) {
@ -117,22 +117,21 @@ frappe.query_reports["Audit Report"] = {
break;
}
value = newValue +" / "+ `<span class="filterable indicator-pill red ellipsis"> ${val[1]} </span>`
}
break;
case 3:
column.align= 'center'
if (value !==undefined){
value = `<span class="filterable indicator-pill orange ellipsis"> ${value}</span>`
}
break;
break;
case 3:
column.align= 'center'
if (value !==undefined){
value = `<span class="filterable indicator-pill orange ellipsis"> ${value}</span>`
}
break;
}
}
}
if (data && column.fieldname == "active_status") {
column.align = 'center';
switch(data.indent){
case 2:
if(value !== undefined){
if (data && column.fieldname == "active_status") {
column.align = 'center';
switch(data.indent){
case 2:
newValue = ""
val = String(value).split(' / ');
switch (val[0]) {
@ -148,32 +147,33 @@ frappe.query_reports["Audit Report"] = {
}else{
value = newValue +" / "+ `<span class="filterable indicator-pill red ellipsis"> ${val[1]} Procedures </span>`
}
}
break;
break;
case 3:
switch (value) {
case 1:
value = `<span class="filterable indicator-pill orange ellipsis"> ${value} Step</span>`
break;
default:
value = `<span class="filterable indicator-pill orange ellipsis"> ${value} Steps</span>`
break;
}
break;
case 3:
switch (value) {
case 1:
value = `<span class="filterable indicator-pill orange ellipsis"> ${value} Step</span>`
break;
default:
value = `<span class="filterable indicator-pill orange ellipsis"> ${value} Steps</span>`
break;
}
break;
case 1:
if(value == 1){
value = `<span class="filterable indicator-pill red ellipsis"> ${value} Sub System</span>`}
else{
value = `<span class="filterable indicator-pill red ellipsis"> ${value} Sub Systems</span>`}
break;
}
}
case 1:
if(value == 1){
value = `<span class="filterable indicator-pill red ellipsis"> ${value} Sub System</span>`}
else{
value = `<span class="filterable indicator-pill red ellipsis"> ${value} Sub Systems</span>`}
break;
case 0:
value = `<span class="filterable indicator-pill red ellipsis"> ${value} </span>`
break;
}
}
if(data && String(column.fieldname).slice(2) === '_workflow_state'){
if (value !== undefined){
if(data && String(column.fieldname).slice(2) === '_workflow_state'){
column.align = 'center';
value = `<span>
<svg xmlns="http://www.w3.org/2000/svg" height="18px" viewBox="0 0 24 24" width="18px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M17 7h-4v2h4c1.65 0 3 1.35 3 3s-1.35 3-3 3h-4v2h4c2.76 0 5-2.24 5-5s-2.24-5-5-5zm-6 8H7c-1.65 0-3-1.35-3-3s1.35-3 3-3h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-2zm-3-4h8v2H8z"/></svg>
&nbsp&nbsp ${value} </span>`
@ -181,11 +181,22 @@ frappe.query_reports["Audit Report"] = {
var proc = String(data.procedure).slice(0,-2)
column.link_onclick = "frappe.query_reports['Audit Report'].set_route(" + JSON.stringify(proc+langCode) + ")"
}
if(data && column.fieldname === 'modified' || String(column.fieldname).slice(2) === '_modified'){
column.align = 'center';
var options = { year: 'numeric', month: 'short', day: 'numeric',day: "numeric", hour: "2-digit", minute: "2-digit",second:'2-digit'};
var date = new Date(value);
value = date.toLocaleDateString("en-US", options);
}
}
if(data && String(column.fieldname).slice(2) == '_active_status'){
column.align = 'center';
if(value === undefined && data.indent === 2){
value = "-"
}
}
// if(data && column.fieldname === 'modified'){
// value = new Date(value);
// }
value = default_formatter(value, row, column, data);
return value;
},

75
smart_service/transactions/report/audit_report/audit_report.py

@ -4,24 +4,19 @@ from __future__ import unicode_literals
import functools
import frappe
from frappe import _
from datetime import datetime
current_db_name = frappe.conf.get("db_name")
custom_lang = frappe.db.sql('''SELECT lang_code,lang_name FROM {}.`tabCustom Languages` where lang_code <> 'en'; '''.format(
current_db_name), as_dict=True)
def execute(filters=None):
validate_filters(filters)
data = get_data(filters)
columns = get_columns()
data = getData(filters)
columns = getColumns()
return columns, data
def validate_filters(filters):
return
def get_data(filters):
def getData(filters):
fil = None
if filters.variant_mapping != None:
fil = filters.variant_mapping + "%"
@ -52,9 +47,16 @@ def modifyData(dataInput, filterParent):
list1 = []
inputData = modifyChildData(dataInput, indent=4, header=0)
parentAppend = addParent(filterParent, indent=0, header=1)
list1.insert(0, parentAppend[0])
sMap, sSize = getParentMap(inputData, 'systems')
systemSize=""
if len(sSize)==1:
systemSize = str(len(sMap)) + " System"
else:
systemSize = str(len(sMap)) + " Systems"
parentAppend[0]['active_status'] = systemSize
list1.insert(0, parentAppend[0])
for i in sMap:
sMap1, sSize1 = getParentMap(sMap[i], 'systems')
@ -83,7 +85,6 @@ def modifyData(dataInput, filterParent):
appendData = addDuplicateData(list1)
appendData = removeDuplicateAndHeader(appendData)
return appendData
@ -100,7 +101,6 @@ def appendToDic1(mapData, indent, header):
'indent': indent,
'header': header,
'Type' : 'System'
}
mapDataAppend.append(keyDict)
return mapDataAppend
@ -154,17 +154,22 @@ def appendToDic3(mapData, procSize, j, indent, header, procedure):
i = 0
dic1 = {}
list1 = []
for c in custom_lang:
list2 = []
procedure = procedure[:-2]+c['lang_code']
colmodified = c['lang_code'] + '_modified'
other_step_count = frappe.db.sql(
'''select count(distinct(step_name)) as count from _d6463952657fa86c.tabProcedure_Details where parent= '{}' group by(procedure_name) order by idx;'''.format(procedure), as_list=True)
'''select count(distinct(step_name)) as count, modified as {} from _d6463952657fa86c.tabProcedure_Details where parent= '{}' group by(procedure_name) order by idx;'''.format(colmodified,procedure), as_list=True)
for l in other_step_count:
list2.append(l[0])
list2.append(l)
list1.append(list2)
for u in mapData:
for u in mapData:
dateList = []
for k in mapData[u]:
dateList.append(str(k['modified']))
dateList.sort(key=lambda date: datetime.strptime(date, "%Y-%m-%d %H:%M:%S.%f"))
procDict = {
'systems': mapData[u][0]['systems'],
'sub_systems': mapData[u][0]['sub_systems'],
@ -173,19 +178,23 @@ def appendToDic3(mapData, procSize, j, indent, header, procedure):
'indent': indent,
'header': header,
'active_status': procSize[i],
'Type' : 'Procedure'
'Type' : 'Procedure',
'modified': dateList[-1]
}
dic2 = {}
for cus in range(len(custom_lang)):
if len(list1[cus]) > 0:
if list1[cus][i] == 1:
if list1[cus][i][0] == 1:
dic1['{}_active_status'.format(custom_lang[cus]['lang_code'])] = str(
list1[cus][i]) + " Step"
list1[cus][i][0]) + " Step"
else:
dic1['{}_active_status'.format(custom_lang[cus]['lang_code'])] = str(
list1[cus][i]) + " Steps"
list1[cus][i][0]) + " Steps"
# Append modified date
dic1['{}_modified'.format(custom_lang[cus]['lang_code'])] = list1[cus][i][1]
dic2.update(dic1)
procDict.update(dic1)
i += 1
@ -193,6 +202,7 @@ def appendToDic3(mapData, procSize, j, indent, header, procedure):
return mapDataAppend
def modifyChildData(childData, indent, header):
for a in childData:
a.update({'indent': indent})
@ -240,10 +250,11 @@ def removeDuplicateAndHeader(data1):
k['workflow_state'] = ""
if k['indent'] == 4:
k.pop('active_status')
k.pop('modified')
return data1
def get_columns():
def getColumns():
columns = [
{
"fieldname": "procedure_name",
@ -261,7 +272,7 @@ def get_columns():
"fieldname": "modified",
"label": _("Last Modified date"),
"fieldtype": "Data",
"width": 165
"width": 200
},
{
"fieldname": "active_status",
@ -272,7 +283,7 @@ def get_columns():
},
{
"fieldname": "en_workflow_state",
"label": _("English"),
"label": _("Workflow State"),
"fieldtype": "Link",
"options": "Procedure",
"width": 150
@ -284,19 +295,27 @@ def get_columns():
for i in custom_lang:
lang_status = {
"fieldname": "{}_active_status".format(i['lang_code']),
"label": _("{}_Status".format(i['lang_code'].upper())),
"label": _("{} Status".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())),
"fieldtype": "Data",
"options": "",
"width": 200
}
lang_workflow = {
"fieldname": "{}_workflow_state".format(i['lang_code']),
"label": _("{}_workflow_state".format(i['lang_code'].upper())),
"label": _("{} Workflow State".format(i['lang_code'].upper())),
"fieldtype": "Link",
"options": "Procedure",
"width": 150
}
lang.append(lang_status)
lang.append(lang_workflow)
lang.append(lang_modified)
columns += lang
return columns

Loading…
Cancel
Save