From bad319be297759ca00ffa29efd248d0d269c2f79 Mon Sep 17 00:00:00 2001 From: hns Date: Mon, 17 Jan 2022 14:02:50 +0530 Subject: [PATCH] update for restore to aws --- smart_service.egg-info/SOURCES.txt | 51 + .../add_ons/doctype/app_dealer/__init__.py | 0 .../__pycache__/__init__.cpython-38.pyc | Bin 0 -> 195 bytes .../__pycache__/app_dealer.cpython-38.pyc | Bin 0 -> 409 bytes .../test_app_dealer.cpython-38.pyc | Bin 0 -> 396 bytes .../add_ons/doctype/app_dealer/app_dealer.js | 8 + .../doctype/app_dealer/app_dealer.json | 78 ++ .../add_ons/doctype/app_dealer/app_dealer.py | 8 + .../doctype/app_dealer/test_app_dealer.py | 8 + .../add_ons/doctype/app_device/__init__.py | 0 .../__pycache__/__init__.cpython-38.pyc | Bin 0 -> 194 bytes .../__pycache__/app_device.cpython-38.pyc | Bin 0 -> 409 bytes .../__pycache__/app_users.cpython-38.pyc | Bin 0 -> 406 bytes .../test_app_device.cpython-38.pyc | Bin 0 -> 396 bytes .../__pycache__/test_app_users.cpython-38.pyc | Bin 0 -> 393 bytes .../add_ons/doctype/app_device/app_device.js | 8 + .../doctype/app_device/app_device.json | 106 +++ .../add_ons/doctype/app_device/app_device.py | 8 + .../doctype/app_device/test_app_device.py | 8 + .../add_ons/doctype/app_log/__init__.py | 0 .../__pycache__/__init__.cpython-38.pyc | Bin 0 -> 192 bytes .../__pycache__/app_log.cpython-38.pyc | Bin 0 -> 400 bytes .../__pycache__/test_app_log.cpython-38.pyc | Bin 0 -> 387 bytes .../add_ons/doctype/app_log/app_log.js | 8 + .../add_ons/doctype/app_log/app_log.json | 92 ++ .../add_ons/doctype/app_log/app_log.py | 8 + .../add_ons/doctype/app_log/test_app_log.py | 8 + .../doctype/app_preference/__init__.py | 0 .../__pycache__/__init__.cpython-38.pyc | Bin 0 -> 199 bytes .../__pycache__/app_preference.cpython-38.pyc | Bin 0 -> 421 bytes .../test_app_preference.cpython-38.pyc | Bin 0 -> 408 bytes .../doctype/app_preference/app_preference.js | 8 + .../app_preference/app_preference.json | 126 +++ .../doctype/app_preference/app_preference.py | 8 + .../app_preference/test_app_preference.py | 8 + .../__pycache__/__init__.cpython-38.pyc | Bin 194 -> 194 bytes .../__pycache__/app_users.cpython-38.pyc | Bin 406 -> 406 bytes .../__pycache__/test_app_users.cpython-38.pyc | Bin 393 -> 393 bytes .../add_ons/doctype/app_users/app_users.json | 98 +- .../doctype/application_menu/__init__.py | 0 .../__pycache__/__init__.cpython-38.pyc | Bin 0 -> 201 bytes .../application_menu.cpython-38.pyc | Bin 0 -> 427 bytes .../test_application_menu.cpython-38.pyc | Bin 0 -> 414 bytes .../application_menu/application_menu.js | 8 + .../application_menu/application_menu.json | 75 ++ .../application_menu/application_menu.py | 8 + .../application_menu/test_application_menu.py | 8 + .../add_ons/doctype/bookmark/__init__.py | 0 .../__pycache__/__init__.cpython-38.pyc | Bin 0 -> 193 bytes .../__pycache__/bookmark.cpython-38.pyc | Bin 0 -> 404 bytes .../__pycache__/test_bookmark.cpython-38.pyc | Bin 0 -> 391 bytes .../add_ons/doctype/bookmark/bookmark.js | 8 + .../add_ons/doctype/bookmark/bookmark.json | 103 +++ .../add_ons/doctype/bookmark/bookmark.py | 8 + .../add_ons/doctype/bookmark/test_bookmark.py | 8 + .../add_ons/doctype/model_hit/__init__.py | 0 .../__pycache__/__init__.cpython-38.pyc | Bin 0 -> 194 bytes .../__pycache__/model_hit.cpython-38.pyc | Bin 0 -> 406 bytes .../add_ons/doctype/model_hit/model_hit.js | 8 + .../add_ons/doctype/model_hit/model_hit.json | 101 ++ .../add_ons/doctype/model_hit/model_hit.py | 8 + .../doctype/model_hit/test_model_hit.py | 8 + .../add_ons/doctype/model_usage/__init__.py | 0 .../__pycache__/__init__.cpython-38.pyc | Bin 0 -> 196 bytes .../__pycache__/model_usage.cpython-38.pyc | Bin 0 -> 412 bytes .../doctype/model_usage/model_usage.js | 8 + .../doctype/model_usage/model_usage.json | 119 +++ .../doctype/model_usage/model_usage.py | 8 + .../doctype/model_usage/test_model_usage.py | 8 + .../add_ons/doctype/teknet_group/__init__.py | 0 .../__pycache__/__init__.cpython-38.pyc | Bin 0 -> 197 bytes .../__pycache__/teknet_group.cpython-38.pyc | Bin 0 -> 415 bytes .../test_teknet_group.cpython-38.pyc | Bin 0 -> 402 bytes .../doctype/teknet_group/teknet_group.js | 8 + .../doctype/teknet_group/teknet_group.json | 72 ++ .../doctype/teknet_group/teknet_group.py | 8 + .../doctype/teknet_group/test_teknet_group.py | 8 + .../add_ons/doctype/teknet_module/__init__.py | 0 .../__pycache__/__init__.cpython-38.pyc | Bin 0 -> 198 bytes .../__pycache__/teknet_module.cpython-38.pyc | Bin 0 -> 418 bytes .../test_teknet_module.cpython-38.pyc | Bin 0 -> 405 bytes .../doctype/teknet_module/teknet_module.js | 8 + .../doctype/teknet_module/teknet_module.json | 60 ++ .../doctype/teknet_module/teknet_module.py | 8 + .../teknet_module/test_teknet_module.py | 8 + .../doctype/user_feedback/user_feedback.json | 4 +- .../doctype/user_manual/user_manual.json | 5 +- smart_service/add_ons/report/__init__.py | 0 .../add_ons/report/_test/__init__.py | 0 smart_service/add_ons/report/_test/_test.js | 9 + smart_service/add_ons/report/_test/_test.json | 29 + smart_service/add_ons/report/_test/_test.py | 8 + .../report/installation_report/__init__.py | 0 .../installation_report.js | 9 + .../installation_report.json | 29 + .../installation_report.py | 8 + .../add_ons/report/login_report/__init__.py | 0 .../report/login_report/login_report.js | 9 + .../report/login_report/login_report.json | 29 + .../report/login_report/login_report.py | 8 + .../apis/__pycache__/addon_api.cpython-38.pyc | Bin 695 -> 4249 bytes .../__pycache__/app_user_login.cpython-38.pyc | Bin 0 -> 6094 bytes .../__pycache__/master_api.cpython-38.pyc | Bin 2151 -> 3504 bytes .../__pycache__/publish_api.cpython-38.pyc | Bin 5155 -> 5336 bytes .../apis/__pycache__/readkey.cpython-38.pyc | Bin 0 -> 437 bytes .../__pycache__/testaccess.cpython-38.pyc | Bin 0 -> 1701 bytes .../__pycache__/testaccess1.cpython-38.pyc | Bin 0 -> 1845 bytes .../transaction_api.cpython-38.pyc | Bin 990 -> 751 bytes .../update_validate.cpython-38.pyc | Bin 0 -> 1714 bytes .../update_validation.cpython-38.pyc | Bin 0 -> 3963 bytes smart_service/apis/addon_api.py | 186 +++- smart_service/apis/app_user_login.py | 333 +++++++ smart_service/apis/master_api.py | 284 ++++-- smart_service/apis/publish_api.py | 172 ++-- smart_service/apis/transaction_api.py | 22 +- smart_service/apis/update_validation.py | 122 +++ .../Thar-en -2022-01-10 15:02:15.309338'.json | 870 +++++++++++++++++ .../json_files/procedurePublish.json | 871 +++++++++++++++++- .../report/_applog_translation/__init__.py | 0 .../__pycache__/__init__.cpython-38.pyc | Bin 0 -> 218 bytes .../_applog_translation.cpython-38.pyc | Bin 0 -> 1853 bytes .../_applog_translation.js | 29 + .../_applog_translation.json | 29 + .../_applog_translation.py | 43 + .../report/installation_report/__init__.py | 0 .../__pycache__/__init__.cpython-38.pyc | Bin 0 -> 218 bytes .../installation_report.cpython-38.pyc | Bin 0 -> 4198 bytes .../installation_report.js | 39 + .../installation_report.json | 29 + .../installation_report.py | 88 ++ .../report/login_report/__init__.py | 0 .../__pycache__/__init__.cpython-38.pyc | Bin 0 -> 211 bytes .../__pycache__/login_report.cpython-38.pyc | Bin 0 -> 4085 bytes .../report/login_report/login_report.js | 41 + .../report/login_report/login_report.json | 29 + .../report/login_report/login_report.py | 85 ++ .../doctype/app_labels/app_labels.json | 2 +- .../custom_languages/custom_languages.json | 4 +- .../masters/doctype/drive/drive.json | 4 +- smart_service/masters/doctype/fuel/fuel.json | 4 +- .../service_kilometers.json | 4 +- .../doctype/sub_systems/sub_systems.json | 4 +- .../masters/doctype/systems/systems.json | 4 +- .../doctype/transmission/transmission.json | 4 +- .../masters/doctype/variant/variant.json | 4 +- smart_service/masters/doctype/vehi/vehi.js | 376 ++++---- smart_service/masters/doctype/vehi/vehi.json | 10 +- .../__pycache__/vehi_master.cpython-38.pyc | Bin 413 -> 431 bytes .../doctype/vehi_master/vehi_master.js | 259 +++++- .../doctype/vehi_master/vehi_master.json | 25 +- .../doctype/vehi_master/vehi_master.py | 4 +- .../doctype/vehi_master_item/__init__.py | 0 .../__pycache__/__init__.cpython-38.pyc | Bin 0 -> 201 bytes .../test_vehi_master_item.cpython-38.pyc | Bin 0 -> 413 bytes .../vehi_master_item.cpython-38.pyc | Bin 0 -> 426 bytes .../vehi_master_item/test_vehi_master_item.py | 8 + .../vehi_master_item/vehi_master_item.js | 8 + .../vehi_master_item/vehi_master_item.json | 52 ++ .../vehi_master_item/vehi_master_item.py | 8 + .../__pycache__/vehicle.cpython-38.pyc | Bin 401 -> 1322 bytes .../masters/doctype/vehicle/vehicle.json | 6 +- .../masters/doctype/vehicle/vehicle.py | 25 +- .../vehicle_segment/vehicle_segment.json | 4 +- .../public/__pycache__/api.cpython-38.pyc | Bin 1178 -> 989 bytes .../__pycache__/oauthtest.cpython-38.pyc | Bin 902 -> 902 bytes smart_service/public/api.py | 25 +- .../templates/includes/login/_login.js | 9 +- .../kilometer_mapping.cpython-38.pyc | Bin 435 -> 575 bytes .../kilometer_mapping/kilometer_mapping.json | 19 +- .../kilometer_mapping/kilometer_mapping.py | 5 +- .../kilometer_mapping_items.json | 2 +- .../__pycache__/procedure.cpython-38.pyc | Bin 412 -> 620 bytes .../doctype/procedure/procedure.py | 8 +- .../__pycache__/publish.cpython-38.pyc | Bin 898 -> 1170 bytes .../transactions/doctype/publish/publish.json | 10 +- .../transactions/doctype/publish/publish.py | 74 +- .../__pycache__/system_mapping.cpython-38.pyc | Bin 1090 -> 1430 bytes .../system_mapping/system_mapping.json | 11 +- .../doctype/system_mapping/system_mapping.py | 33 +- 179 files changed, 5279 insertions(+), 476 deletions(-) create mode 100644 smart_service/add_ons/doctype/app_dealer/__init__.py create mode 100644 smart_service/add_ons/doctype/app_dealer/__pycache__/__init__.cpython-38.pyc create mode 100644 smart_service/add_ons/doctype/app_dealer/__pycache__/app_dealer.cpython-38.pyc create mode 100644 smart_service/add_ons/doctype/app_dealer/__pycache__/test_app_dealer.cpython-38.pyc create mode 100644 smart_service/add_ons/doctype/app_dealer/app_dealer.js create mode 100644 smart_service/add_ons/doctype/app_dealer/app_dealer.json create mode 100644 smart_service/add_ons/doctype/app_dealer/app_dealer.py create mode 100644 smart_service/add_ons/doctype/app_dealer/test_app_dealer.py create mode 100644 smart_service/add_ons/doctype/app_device/__init__.py create mode 100644 smart_service/add_ons/doctype/app_device/__pycache__/__init__.cpython-38.pyc create mode 100644 smart_service/add_ons/doctype/app_device/__pycache__/app_device.cpython-38.pyc create mode 100644 smart_service/add_ons/doctype/app_device/__pycache__/app_users.cpython-38.pyc create mode 100644 smart_service/add_ons/doctype/app_device/__pycache__/test_app_device.cpython-38.pyc create mode 100644 smart_service/add_ons/doctype/app_device/__pycache__/test_app_users.cpython-38.pyc create mode 100644 smart_service/add_ons/doctype/app_device/app_device.js create mode 100644 smart_service/add_ons/doctype/app_device/app_device.json create mode 100644 smart_service/add_ons/doctype/app_device/app_device.py create mode 100644 smart_service/add_ons/doctype/app_device/test_app_device.py create mode 100644 smart_service/add_ons/doctype/app_log/__init__.py create mode 100644 smart_service/add_ons/doctype/app_log/__pycache__/__init__.cpython-38.pyc create mode 100644 smart_service/add_ons/doctype/app_log/__pycache__/app_log.cpython-38.pyc create mode 100644 smart_service/add_ons/doctype/app_log/__pycache__/test_app_log.cpython-38.pyc create mode 100644 smart_service/add_ons/doctype/app_log/app_log.js create mode 100644 smart_service/add_ons/doctype/app_log/app_log.json create mode 100644 smart_service/add_ons/doctype/app_log/app_log.py create mode 100644 smart_service/add_ons/doctype/app_log/test_app_log.py create mode 100644 smart_service/add_ons/doctype/app_preference/__init__.py create mode 100644 smart_service/add_ons/doctype/app_preference/__pycache__/__init__.cpython-38.pyc create mode 100644 smart_service/add_ons/doctype/app_preference/__pycache__/app_preference.cpython-38.pyc create mode 100644 smart_service/add_ons/doctype/app_preference/__pycache__/test_app_preference.cpython-38.pyc create mode 100644 smart_service/add_ons/doctype/app_preference/app_preference.js create mode 100644 smart_service/add_ons/doctype/app_preference/app_preference.json create mode 100644 smart_service/add_ons/doctype/app_preference/app_preference.py create mode 100644 smart_service/add_ons/doctype/app_preference/test_app_preference.py create mode 100644 smart_service/add_ons/doctype/application_menu/__init__.py create mode 100644 smart_service/add_ons/doctype/application_menu/__pycache__/__init__.cpython-38.pyc create mode 100644 smart_service/add_ons/doctype/application_menu/__pycache__/application_menu.cpython-38.pyc create mode 100644 smart_service/add_ons/doctype/application_menu/__pycache__/test_application_menu.cpython-38.pyc create mode 100644 smart_service/add_ons/doctype/application_menu/application_menu.js create mode 100644 smart_service/add_ons/doctype/application_menu/application_menu.json create mode 100644 smart_service/add_ons/doctype/application_menu/application_menu.py create mode 100644 smart_service/add_ons/doctype/application_menu/test_application_menu.py create mode 100644 smart_service/add_ons/doctype/bookmark/__init__.py create mode 100644 smart_service/add_ons/doctype/bookmark/__pycache__/__init__.cpython-38.pyc create mode 100644 smart_service/add_ons/doctype/bookmark/__pycache__/bookmark.cpython-38.pyc create mode 100644 smart_service/add_ons/doctype/bookmark/__pycache__/test_bookmark.cpython-38.pyc create mode 100644 smart_service/add_ons/doctype/bookmark/bookmark.js create mode 100644 smart_service/add_ons/doctype/bookmark/bookmark.json create mode 100644 smart_service/add_ons/doctype/bookmark/bookmark.py create mode 100644 smart_service/add_ons/doctype/bookmark/test_bookmark.py create mode 100644 smart_service/add_ons/doctype/model_hit/__init__.py create mode 100644 smart_service/add_ons/doctype/model_hit/__pycache__/__init__.cpython-38.pyc create mode 100644 smart_service/add_ons/doctype/model_hit/__pycache__/model_hit.cpython-38.pyc create mode 100644 smart_service/add_ons/doctype/model_hit/model_hit.js create mode 100644 smart_service/add_ons/doctype/model_hit/model_hit.json create mode 100644 smart_service/add_ons/doctype/model_hit/model_hit.py create mode 100644 smart_service/add_ons/doctype/model_hit/test_model_hit.py create mode 100644 smart_service/add_ons/doctype/model_usage/__init__.py create mode 100644 smart_service/add_ons/doctype/model_usage/__pycache__/__init__.cpython-38.pyc create mode 100644 smart_service/add_ons/doctype/model_usage/__pycache__/model_usage.cpython-38.pyc create mode 100644 smart_service/add_ons/doctype/model_usage/model_usage.js create mode 100644 smart_service/add_ons/doctype/model_usage/model_usage.json create mode 100644 smart_service/add_ons/doctype/model_usage/model_usage.py create mode 100644 smart_service/add_ons/doctype/model_usage/test_model_usage.py create mode 100644 smart_service/add_ons/doctype/teknet_group/__init__.py create mode 100644 smart_service/add_ons/doctype/teknet_group/__pycache__/__init__.cpython-38.pyc create mode 100644 smart_service/add_ons/doctype/teknet_group/__pycache__/teknet_group.cpython-38.pyc create mode 100644 smart_service/add_ons/doctype/teknet_group/__pycache__/test_teknet_group.cpython-38.pyc create mode 100644 smart_service/add_ons/doctype/teknet_group/teknet_group.js create mode 100644 smart_service/add_ons/doctype/teknet_group/teknet_group.json create mode 100644 smart_service/add_ons/doctype/teknet_group/teknet_group.py create mode 100644 smart_service/add_ons/doctype/teknet_group/test_teknet_group.py create mode 100644 smart_service/add_ons/doctype/teknet_module/__init__.py create mode 100644 smart_service/add_ons/doctype/teknet_module/__pycache__/__init__.cpython-38.pyc create mode 100644 smart_service/add_ons/doctype/teknet_module/__pycache__/teknet_module.cpython-38.pyc create mode 100644 smart_service/add_ons/doctype/teknet_module/__pycache__/test_teknet_module.cpython-38.pyc create mode 100644 smart_service/add_ons/doctype/teknet_module/teknet_module.js create mode 100644 smart_service/add_ons/doctype/teknet_module/teknet_module.json create mode 100644 smart_service/add_ons/doctype/teknet_module/teknet_module.py create mode 100644 smart_service/add_ons/doctype/teknet_module/test_teknet_module.py create mode 100644 smart_service/add_ons/report/__init__.py create mode 100644 smart_service/add_ons/report/_test/__init__.py create mode 100644 smart_service/add_ons/report/_test/_test.js create mode 100644 smart_service/add_ons/report/_test/_test.json create mode 100644 smart_service/add_ons/report/_test/_test.py create mode 100644 smart_service/add_ons/report/installation_report/__init__.py create mode 100644 smart_service/add_ons/report/installation_report/installation_report.js create mode 100644 smart_service/add_ons/report/installation_report/installation_report.json create mode 100644 smart_service/add_ons/report/installation_report/installation_report.py create mode 100644 smart_service/add_ons/report/login_report/__init__.py create mode 100644 smart_service/add_ons/report/login_report/login_report.js create mode 100644 smart_service/add_ons/report/login_report/login_report.json create mode 100644 smart_service/add_ons/report/login_report/login_report.py create mode 100644 smart_service/apis/__pycache__/app_user_login.cpython-38.pyc create mode 100644 smart_service/apis/__pycache__/readkey.cpython-38.pyc create mode 100644 smart_service/apis/__pycache__/testaccess.cpython-38.pyc create mode 100644 smart_service/apis/__pycache__/testaccess1.cpython-38.pyc create mode 100644 smart_service/apis/__pycache__/update_validate.cpython-38.pyc create mode 100644 smart_service/apis/__pycache__/update_validation.cpython-38.pyc create mode 100644 smart_service/apis/app_user_login.py create mode 100644 smart_service/apis/update_validation.py create mode 100644 smart_service/json_files/Thar-en -2022-01-10 15:02:15.309338'.json create mode 100644 smart_service/mahindra_smart_service/report/_applog_translation/__init__.py create mode 100644 smart_service/mahindra_smart_service/report/_applog_translation/__pycache__/__init__.cpython-38.pyc create mode 100644 smart_service/mahindra_smart_service/report/_applog_translation/__pycache__/_applog_translation.cpython-38.pyc create mode 100644 smart_service/mahindra_smart_service/report/_applog_translation/_applog_translation.js create mode 100644 smart_service/mahindra_smart_service/report/_applog_translation/_applog_translation.json create mode 100644 smart_service/mahindra_smart_service/report/_applog_translation/_applog_translation.py create mode 100644 smart_service/mahindra_smart_service/report/installation_report/__init__.py create mode 100644 smart_service/mahindra_smart_service/report/installation_report/__pycache__/__init__.cpython-38.pyc create mode 100644 smart_service/mahindra_smart_service/report/installation_report/__pycache__/installation_report.cpython-38.pyc create mode 100644 smart_service/mahindra_smart_service/report/installation_report/installation_report.js create mode 100644 smart_service/mahindra_smart_service/report/installation_report/installation_report.json create mode 100644 smart_service/mahindra_smart_service/report/installation_report/installation_report.py create mode 100644 smart_service/mahindra_smart_service/report/login_report/__init__.py create mode 100644 smart_service/mahindra_smart_service/report/login_report/__pycache__/__init__.cpython-38.pyc create mode 100644 smart_service/mahindra_smart_service/report/login_report/__pycache__/login_report.cpython-38.pyc create mode 100644 smart_service/mahindra_smart_service/report/login_report/login_report.js create mode 100644 smart_service/mahindra_smart_service/report/login_report/login_report.json create mode 100644 smart_service/mahindra_smart_service/report/login_report/login_report.py create mode 100644 smart_service/masters/doctype/vehi_master_item/__init__.py create mode 100644 smart_service/masters/doctype/vehi_master_item/__pycache__/__init__.cpython-38.pyc create mode 100644 smart_service/masters/doctype/vehi_master_item/__pycache__/test_vehi_master_item.cpython-38.pyc create mode 100644 smart_service/masters/doctype/vehi_master_item/__pycache__/vehi_master_item.cpython-38.pyc create mode 100644 smart_service/masters/doctype/vehi_master_item/test_vehi_master_item.py create mode 100644 smart_service/masters/doctype/vehi_master_item/vehi_master_item.js create mode 100644 smart_service/masters/doctype/vehi_master_item/vehi_master_item.json create mode 100644 smart_service/masters/doctype/vehi_master_item/vehi_master_item.py diff --git a/smart_service.egg-info/SOURCES.txt b/smart_service.egg-info/SOURCES.txt index cb92419..4baead4 100644 --- a/smart_service.egg-info/SOURCES.txt +++ b/smart_service.egg-info/SOURCES.txt @@ -14,16 +14,56 @@ smart_service.egg-info/not-zip-safe smart_service.egg-info/top_level.txt smart_service/add_ons/__init__.py smart_service/add_ons/doctype/__init__.py +smart_service/add_ons/doctype/app_dealer/__init__.py +smart_service/add_ons/doctype/app_dealer/app_dealer.js +smart_service/add_ons/doctype/app_dealer/app_dealer.json +smart_service/add_ons/doctype/app_dealer/app_dealer.py +smart_service/add_ons/doctype/app_dealer/test_app_dealer.py +smart_service/add_ons/doctype/app_device/__init__.py +smart_service/add_ons/doctype/app_device/app_device.js +smart_service/add_ons/doctype/app_device/app_device.json +smart_service/add_ons/doctype/app_device/app_device.py +smart_service/add_ons/doctype/app_device/test_app_device.py +smart_service/add_ons/doctype/app_log/__init__.py +smart_service/add_ons/doctype/app_log/app_log.js +smart_service/add_ons/doctype/app_log/app_log.json +smart_service/add_ons/doctype/app_log/app_log.py +smart_service/add_ons/doctype/app_log/test_app_log.py +smart_service/add_ons/doctype/app_preference/__init__.py +smart_service/add_ons/doctype/app_preference/app_preference.js +smart_service/add_ons/doctype/app_preference/app_preference.json +smart_service/add_ons/doctype/app_preference/app_preference.py +smart_service/add_ons/doctype/app_preference/test_app_preference.py smart_service/add_ons/doctype/app_users/__init__.py smart_service/add_ons/doctype/app_users/app_users.js smart_service/add_ons/doctype/app_users/app_users.json smart_service/add_ons/doctype/app_users/app_users.py smart_service/add_ons/doctype/app_users/test_app_users.py +smart_service/add_ons/doctype/application_menu/__init__.py +smart_service/add_ons/doctype/application_menu/application_menu.js +smart_service/add_ons/doctype/application_menu/application_menu.json +smart_service/add_ons/doctype/application_menu/application_menu.py +smart_service/add_ons/doctype/application_menu/test_application_menu.py +smart_service/add_ons/doctype/bookmark/__init__.py +smart_service/add_ons/doctype/bookmark/bookmark.js +smart_service/add_ons/doctype/bookmark/bookmark.json +smart_service/add_ons/doctype/bookmark/bookmark.py +smart_service/add_ons/doctype/bookmark/test_bookmark.py smart_service/add_ons/doctype/circular/__init__.py smart_service/add_ons/doctype/circular/circular.js smart_service/add_ons/doctype/circular/circular.json smart_service/add_ons/doctype/circular/circular.py smart_service/add_ons/doctype/circular/test_circular.py +smart_service/add_ons/doctype/teknet_group/__init__.py +smart_service/add_ons/doctype/teknet_group/teknet_group.js +smart_service/add_ons/doctype/teknet_group/teknet_group.json +smart_service/add_ons/doctype/teknet_group/teknet_group.py +smart_service/add_ons/doctype/teknet_group/test_teknet_group.py +smart_service/add_ons/doctype/teknet_module/__init__.py +smart_service/add_ons/doctype/teknet_module/teknet_module.js +smart_service/add_ons/doctype/teknet_module/teknet_module.json +smart_service/add_ons/doctype/teknet_module/teknet_module.py +smart_service/add_ons/doctype/teknet_module/test_teknet_module.py smart_service/add_ons/doctype/user_feedback/__init__.py smart_service/add_ons/doctype/user_feedback/test_user_feedback.py smart_service/add_ons/doctype/user_feedback/user_feedback.js @@ -40,8 +80,11 @@ smart_service/add_ons/doctype/user_manual/user_manual.js smart_service/add_ons/doctype/user_manual/user_manual.json smart_service/add_ons/doctype/user_manual/user_manual.py smart_service/apis/addon_api.py +smart_service/apis/app_user_login.py smart_service/apis/master_api.py smart_service/apis/publish_api.py +smart_service/apis/transaction_api.py +smart_service/apis/update_validation.py smart_service/config/__init__.py smart_service/config/desktop.py smart_service/config/docs.py @@ -149,6 +192,7 @@ smart_service/masters/doctype/variant/variant.json smart_service/masters/doctype/variant/variant.py smart_service/masters/doctype/vehi/__init__.py smart_service/masters/doctype/vehi/test_vehi.py +smart_service/masters/doctype/vehi/vehi.html smart_service/masters/doctype/vehi/vehi.js smart_service/masters/doctype/vehi/vehi.json smart_service/masters/doctype/vehi/vehi.py @@ -157,6 +201,11 @@ smart_service/masters/doctype/vehi_master/test_vehi_master.py smart_service/masters/doctype/vehi_master/vehi_master.js smart_service/masters/doctype/vehi_master/vehi_master.json smart_service/masters/doctype/vehi_master/vehi_master.py +smart_service/masters/doctype/vehi_master_item/__init__.py +smart_service/masters/doctype/vehi_master_item/test_vehi_master_item.py +smart_service/masters/doctype/vehi_master_item/vehi_master_item.js +smart_service/masters/doctype/vehi_master_item/vehi_master_item.json +smart_service/masters/doctype/vehi_master_item/vehi_master_item.py smart_service/masters/doctype/vehicle/__init__.py smart_service/masters/doctype/vehicle/test_vehicle.py smart_service/masters/doctype/vehicle/vehicle.js @@ -177,6 +226,8 @@ smart_service/masters/report/_fuel_translation/_fuel_translation.json smart_service/masters/report/_fuel_translation/_fuel_translation.py smart_service/public/api.py smart_service/public/build.json +smart_service/public/oauthtest.py +smart_service/public/sess.py smart_service/public/css/smart_service.css smart_service/public/icons/dot.png smart_service/public/icons/outline_description_black_24dp.png diff --git a/smart_service/add_ons/doctype/app_dealer/__init__.py b/smart_service/add_ons/doctype/app_dealer/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/smart_service/add_ons/doctype/app_dealer/__pycache__/__init__.cpython-38.pyc b/smart_service/add_ons/doctype/app_dealer/__pycache__/__init__.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f4090d7142e43269b023d740cb51c77d054a224e GIT binary patch literal 195 zcmWIL<>g`kf@;&Vi6Hthh(HF6K#l_t7qb9~6oz01O-8?!3`HPe1o10FKO;XkRX?pL zv7jI|zPP9?-oOyb(@jdvOU}>-N)+oC=Oz}F#22R)m1QQUqVW<_QsVRTiuF_SlS?WK qQb8KxQ&JOiQj7HC<1_OzOXB183My}L*yQG?l;)(`fn4wzh#3Hc6g5Nu literal 0 HcmV?d00001 diff --git a/smart_service/add_ons/doctype/app_dealer/__pycache__/app_dealer.cpython-38.pyc b/smart_service/add_ons/doctype/app_dealer/__pycache__/app_dealer.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..62c9c6cc3d3893f77cc88613d23ce3e163ecf8c8 GIT binary patch literal 409 zcmZ8dJx{|h5Vez5geo1`Su>Epz=lwfDzUL3mMkZeJ5*4d7(1y{F~XnW$FQTUO#B5V z&JKu(lkWMR@9Wt&%jH6_J)OR(cRoKnnc9rWirpPDpg>s*ElVlIrN9W|7lAR!=eUe; zb}h2`Cs&C~4#~Q$dQDAN`HQJZCM$NAGLR@G3T~F%91Z&y#;i%zWUsP#NB|n831CWh-QHL9 zk10fG8&_akbvr}80Wb)fgt^(-n78`PE@DVz;9m2=xIJgNROdVFJ)H% literal 0 HcmV?d00001 diff --git a/smart_service/add_ons/doctype/app_dealer/__pycache__/test_app_dealer.cpython-38.pyc b/smart_service/add_ons/doctype/app_dealer/__pycache__/test_app_dealer.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f82e739d8770f3b753524a6dc5a438951e4d50ea GIT binary patch literal 396 zcmZ9HJ5Iwu5Qb;%09KS-f!+ly6m$p$fkc-EXxxkz&!7bPvFzHBBGJKR;4WOiEfrUw zV%CmG#7Oh+eA;>5Pp4xLdpY|wAM$<$*tLAg`kf;Xa_i6Hthh(HF6K#l_t7qb9~6oz01O-8?!3`HPe1o10fKO;XkRX?pL zv7jI|zPP9?-oOyb(@jdvOU}>-N)+oC=Oz}F#22R)m1QQUqVW<_QsVRTiuF_SlS?WK oQb8KxOMyy@_2c6+^D;}~5=BVGluy#$``;xA*xK99TZ3v)W z0GI~5D#R(kW2dVz^CH|Hj~U?WL2VjC>dt9v3B23F@yQQ6x~00@C{B3gjdm?~a$(Ou zrV*j3y~3t!ca}l};2>xc=62^|-WoRhh#`>!51J3g?K#V(D(5l7C%8~G)cnaEql6QE OayGv1eEvHzjlKambY+zQ literal 0 HcmV?d00001 diff --git a/smart_service/add_ons/doctype/app_device/__pycache__/app_users.cpython-38.pyc b/smart_service/add_ons/doctype/app_device/__pycache__/app_users.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ceaef36bc0667e50468a85fe13ef82884b98b747 GIT binary patch literal 406 zcmZ8dJx{|h5IrZYu&Q+I&YFP)c7%$A#KwZUWI4I7$(4a*PMifH8E$B$cFQ8)*&v6my z**&E5Pp*Pg4DzNedqYiEhKpkpOxEl^VIU}k25uJI91Zf?+KngY@6vdXh>bFYI4lrN ztNS{{3F1?)>M8RE?u4g|@LlCqYbbwk%34D2c6fgA%g(mclvU0NpL?TRhrDF>SkgbH zw8pmaxo*pDZz(ijAM_le%m+egMvzWUl}K literal 0 HcmV?d00001 diff --git a/smart_service/add_ons/doctype/app_device/__pycache__/test_app_device.cpython-38.pyc b/smart_service/add_ons/doctype/app_device/__pycache__/test_app_device.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..bd49f7171e9bac5a982309fee020bb0c32fc0357 GIT binary patch literal 396 zcmZ9HJ5Iwu5Qb;%09KS-f!+lyNR$W#fkc-EXxxkz&!PnRvFzHBQp07S;~-qXEfrUw zV#bb0#7Oh+eA;>5Pp4yG`#AeF@BDrV?AnN7#vTq?2uKx>!3|JE@hebl;Yq#3Sw!j< z($P2Pz&sb-HN`Mv4-*y(nIhO!MBVhxhUU__Yr9(JcAmyvf>@c-B6efMvZl6>c!K!c znqv5Q1HaF$dikmKqAsm|^u{@h!LRV-bVElEw#pZpKY|XW@eKy+WzIh`L|9irQ=KH)IR z7x%!d5Ii)+WXc{=1`D|&*eRkueYByyb#5N453?-p6U5q77O@{ARtPQqFWlNky!b?Zkt9)Dp2d06)yr18^F$uHGc1>mze9&iqg`kf~>=r5<&E15P=LBfgA@QE@lA|DGb33nv8xc8Hzx{2;x_&enx(7s(xBg zVnIP_d~s1(yn!KlIYq;;_lhPbtkwwF6oI8HgDGINvmw literal 0 HcmV?d00001 diff --git a/smart_service/add_ons/doctype/app_log/__pycache__/app_log.cpython-38.pyc b/smart_service/add_ons/doctype/app_log/__pycache__/app_log.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..adb851f2839d12de0d205a59b5349028714fc99f GIT binary patch literal 400 zcmZ8cy-veG48BWRh^lmCXU#wYJ3>W5VnHm3C5v^$rUm74$6ZpXGrSDX!5bj4WM$$N znD8Z3R9Nz7fByIFd_EH_k8khlgY9P^yE0+2VD*O#C{Wfy%Th{lDKNtLMPN+wIW8ld z+=y)Y#Z@AceR5%{PE*rXA+Rfw$%56V3?xd4f}15bNB!QpwO3|&oyC0u&?rp+{R}`G z?CRjB08gE&$IPp6`#fWSZ!A_uQ*rNKoZ?DP>sA_pF>Js9`qd??j94;X%Tp=zl4J9P9CPV~v? M_}AHVJ28!Z09+(uOaK4? literal 0 HcmV?d00001 diff --git a/smart_service/add_ons/doctype/app_log/__pycache__/test_app_log.cpython-38.pyc b/smart_service/add_ons/doctype/app_log/__pycache__/test_app_log.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..94d40733048716766b1d71431b06b403f8e30b45 GIT binary patch literal 387 zcmZ9Hy-ve05Xa9+fhcNUfxQD5c7%!;SWp*W$#OC|)22#dV<(k5!@D4!gEwHz%ET)$ z_1r{Iank*LKlwf%CX*D{Rv(}0jo+^T`!-^jvHN2d0um);a03)k{0bCnSc#W7i%8tT zbo9+RFwcYTn_!r+`!S1#Ob`qeQJ3Cp-&|RHYZmiq+$D&$sx)GkB36dlGQ?xV=T?>d z&pWt7?z5AhLM~0E<&#s^YV>Z6XXgW*JnA}MO8)TDSIRZ$wObdt{zr-kP3g`k01BwWS$3gmW700{S%1ba5{frZ{=%M| zw5u*VFfVzTnU|M5CCN;1obNu=C$C?g9L9vng43Nbpg>s(Eek2doxlLYH-RC^*RTk1 z@+i{jH+P9t_R(!qcADz8^aqC_nJhS6%s`@$D0o=%aL^|=#ynVBlBK$&`!wt$fLdt+ z=w|@B!LIWA7~rK-)mV8K_JpMd*x7v5Xv&vX8AIUg2IiN0cJa)jtDFlicUsvN9NEpf zq$8#fp{ZStP1$Y@`2jG0rjBT4wl?J3y#p68L~`KX`|0Q+W7||^EH`|J^<6{HzwL1s QaiNc{##dfXe--242ihfS`v3p{ literal 0 HcmV?d00001 diff --git a/smart_service/add_ons/doctype/app_preference/__pycache__/test_app_preference.cpython-38.pyc b/smart_service/add_ons/doctype/app_preference/__pycache__/test_app_preference.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f276f3dabeef43b4aeaed370c5b3015612273792 GIT binary patch literal 408 zcmZ8cJx>EM40Y}boT_%<53m;r0y{!Q3~Ut=u-syWv#S=}M@a69I>Vn~;qM^b%EVvj zgwv}^!BSrQVn65kVL0rA#PRCWe8~M3$Zqt6jOF+v0RmDvq;LZiQTzrJGd!u+IE_f% z!Kn8wJut}v?uHUFmg5Hk45=d6D5Cc8o_&2~?XBY}J1#SxjN&#yEKR|PZ6C3ysL4Y< zKzwdY-c{bg?aR0|tX}l2Dp*gQv6j)h1)iO6*vX>|ooOj}?F-{-^z0V%jQ=r1gjMM^ zRaw2X90X{$rgSYf@$cKIUAjmt9E8IYYq`sUv`sF$ K4KMe$gQ6c_SZCw_ literal 0 HcmV?d00001 diff --git a/smart_service/add_ons/doctype/app_preference/app_preference.js b/smart_service/add_ons/doctype/app_preference/app_preference.js new file mode 100644 index 0000000..63d1f04 --- /dev/null +++ b/smart_service/add_ons/doctype/app_preference/app_preference.js @@ -0,0 +1,8 @@ +// Copyright (c) 2022, Hard n Soft Technologies Pvt Ltd and contributors +// For license information, please see license.txt + +frappe.ui.form.on('App Preference', { + // refresh: function(frm) { + + // } +}); diff --git a/smart_service/add_ons/doctype/app_preference/app_preference.json b/smart_service/add_ons/doctype/app_preference/app_preference.json new file mode 100644 index 0000000..ddcc739 --- /dev/null +++ b/smart_service/add_ons/doctype/app_preference/app_preference.json @@ -0,0 +1,126 @@ +{ + "actions": [], + "autoname": "App Pref-.####", + "creation": "2022-01-07 14:00:34.119125", + "doctype": "DocType", + "editable_grid": 1, + "engine": "InnoDB", + "field_order": [ + "application_server_url", + "update_server_url", + "asset_url", + "login_base_url", + "masters_base_url", + "transactions_base_url", + "addons_base_url", + "auto_logout_time", + "column_break_4", + "mahindra_login_api", + "technician_login_api", + "remarks", + "active" + ], + "fields": [ + { + "fieldname": "update_server_url", + "fieldtype": "Data", + "label": "Update Server URL" + }, + { + "fieldname": "asset_url", + "fieldtype": "Data", + "label": "Asset URL" + }, + { + "fieldname": "column_break_4", + "fieldtype": "Column Break" + }, + { + "default": "0", + "fieldname": "mahindra_login_api", + "fieldtype": "Check", + "label": "Mahindra Login API" + }, + { + "default": "0", + "fieldname": "technician_login_api", + "fieldtype": "Check", + "label": "Technician Login API" + }, + { + "fieldname": "remarks", + "fieldtype": "Small Text", + "label": "Remarks" + }, + { + "fieldname": "active", + "fieldtype": "Select", + "label": "Active", + "options": "Active\nInactive" + }, + { + "fieldname": "login_base_url", + "fieldtype": "Data", + "label": "Login Base URL" + }, + { + "fieldname": "masters_base_url", + "fieldtype": "Data", + "label": "Masters Base URL" + }, + { + "fieldname": "transactions_base_url", + "fieldtype": "Data", + "label": "Transactions Base URL" + }, + { + "fieldname": "addons_base_url", + "fieldtype": "Data", + "label": "Addons Base URL" + }, + { + "fieldname": "auto_logout_time", + "fieldtype": "Time", + "label": "Auto Logout Time" + }, + { + "fieldname": "application_server_url", + "fieldtype": "Data", + "label": "Application Server URL" + } + ], + "index_web_pages_for_search": 1, + "links": [], + "modified": "2022-01-11 11:57:35.291012", + "modified_by": "Administrator", + "module": "Add Ons", + "name": "App Preference", + "owner": "Administrator", + "permissions": [ + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "share": 1, + "write": 1 + }, + { + "create": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "_Admin", + "share": 1, + "write": 1 + } + ], + "sort_field": "modified", + "sort_order": "DESC" +} \ No newline at end of file diff --git a/smart_service/add_ons/doctype/app_preference/app_preference.py b/smart_service/add_ons/doctype/app_preference/app_preference.py new file mode 100644 index 0000000..ef8f5c3 --- /dev/null +++ b/smart_service/add_ons/doctype/app_preference/app_preference.py @@ -0,0 +1,8 @@ +# Copyright (c) 2022, Hard n Soft Technologies Pvt Ltd and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + +class AppPreference(Document): + pass diff --git a/smart_service/add_ons/doctype/app_preference/test_app_preference.py b/smart_service/add_ons/doctype/app_preference/test_app_preference.py new file mode 100644 index 0000000..3321fd4 --- /dev/null +++ b/smart_service/add_ons/doctype/app_preference/test_app_preference.py @@ -0,0 +1,8 @@ +# Copyright (c) 2022, Hard n Soft Technologies Pvt Ltd and Contributors +# See license.txt + +# import frappe +import unittest + +class TestAppPreference(unittest.TestCase): + pass diff --git a/smart_service/add_ons/doctype/app_users/__pycache__/__init__.cpython-38.pyc b/smart_service/add_ons/doctype/app_users/__pycache__/__init__.cpython-38.pyc index 27c333245252d46a6e6f49d64d89bb27c1900f95..59e0703a43888e943de42e18a16e24be23c086ce 100644 GIT binary patch delta 19 ZcmX@ac!-fZl$V!_0SMI0&Q9ds4ge}41cv|s delta 19 ZcmX@ac!-fZl$V!_0SMlRc24Bp4gf6>1n2+& diff --git a/smart_service/add_ons/doctype/app_users/__pycache__/app_users.cpython-38.pyc b/smart_service/add_ons/doctype/app_users/__pycache__/app_users.cpython-38.pyc index ceaef36bc0667e50468a85fe13ef82884b98b747..d52407bdff84f9c9f602abe8f51bdc64aa6b7916 100644 GIT binary patch delta 20 acmbQnJdK$lpK00K3$vm3eV7y%}U1OWg5 delta 20 ZcmeBV?quc;<>lpK0D?E7og2C97y&8S1Y!UH diff --git a/smart_service/add_ons/doctype/app_users/app_users.json b/smart_service/add_ons/doctype/app_users/app_users.json index bfddd03..c53b61c 100644 --- a/smart_service/add_ons/doctype/app_users/app_users.json +++ b/smart_service/add_ons/doctype/app_users/app_users.json @@ -1,56 +1,84 @@ { "actions": [], - "autoname": "I-.####", - "creation": "2021-11-08 17:49:56.262550", + "allow_rename": 1, + "autoname": "U-#####", + "creation": "2021-12-30 10:01:33.937306", "doctype": "DocType", "editable_grid": 1, "engine": "InnoDB", "field_order": [ - "device_id", - "user_name", + "dealer", + "user_id", + "login_name", "user_type", - "last_login", - "last_sync" + "column_break_5", + "first_name", + "last_name", + "skill_id", + "skill_name", + "email_id", + "active_status" ], "fields": [ { - "fieldname": "user_name", + "fieldname": "dealer", + "fieldtype": "Link", + "label": "Dealer", + "options": "App Dealer" + }, + { + "fieldname": "user_id", + "fieldtype": "Data", + "label": "User ID" + }, + { + "fieldname": "login_name", "fieldtype": "Data", - "in_list_view": 1, - "label": "User Name", - "reqd": 1 + "label": "Login Name" }, { "fieldname": "user_type", - "fieldtype": "Select", - "in_list_view": 1, - "label": "User Type", - "options": "Global\nInternal\nBoth", - "reqd": 1 + "fieldtype": "Data", + "label": "User Type" + }, + { + "fieldname": "column_break_5", + "fieldtype": "Column Break" }, { - "fieldname": "device_id", + "fieldname": "first_name", "fieldtype": "Data", - "in_list_view": 1, - "label": "Device ID", - "reqd": 1 + "label": "First Name" }, { - "fieldname": "last_login", - "fieldtype": "Datetime", - "in_list_view": 1, - "label": "Last Login", - "reqd": 1 + "fieldname": "last_name", + "fieldtype": "Data", + "label": "Last Name" + }, + { + "fieldname": "skill_id", + "fieldtype": "Data", + "label": "Skill ID" + }, + { + "fieldname": "skill_name", + "fieldtype": "Data", + "label": "Skill Name" }, { - "fieldname": "last_sync", - "fieldtype": "Datetime", - "label": "Last Sync" + "fieldname": "email_id", + "fieldtype": "Data", + "label": "email ID" + }, + { + "fieldname": "active_status", + "fieldtype": "Data", + "label": "Active Status" } ], "index_web_pages_for_search": 1, "links": [], - "modified": "2021-12-23 12:24:01.677576", + "modified": "2022-01-07 15:21:14.132692", "modified_by": "Administrator", "module": "Add Ons", "name": "App Users", @@ -67,9 +95,19 @@ "role": "System Manager", "share": 1, "write": 1 + }, + { + "create": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "_Admin", + "share": 1, + "write": 1 } ], "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 1 + "sort_order": "DESC" } \ No newline at end of file diff --git a/smart_service/add_ons/doctype/application_menu/__init__.py b/smart_service/add_ons/doctype/application_menu/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/smart_service/add_ons/doctype/application_menu/__pycache__/__init__.cpython-38.pyc b/smart_service/add_ons/doctype/application_menu/__pycache__/__init__.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6cc4e9f3bca110c2a92d04bd896aabe4755e6502 GIT binary patch literal 201 zcmWIL<>g`kf_*=(CxYn5AOaaM0yz#qT+9L_QW%06G#UL?G8BP?5yY=N{fzwFRQ}^w+XfJYtV5N=Nq#4%Tkqcxu>uwUbT3^PO@HK=KHdelY zSUH<`c<8`UW<*xx{*XX1#cQT{$vL}ZDpK(iQ!(<# zxQx{7hGp{)>S7rml8Z)m8ci!hV%Ip46}e9dkd<698s;<{4g2TT)|C`()tDJ!{sPGX%!bcwTA52Pel8$vwE5~nf Xp=<2Nb1-R*ch1d8|NhkT>+Gm_015SdW=0|Et#Rgl9aD6WzhP>F^I_MGHg zv1`Z%Uo->LBI0H+A`?nKBG8aC1#1QG_HVQg=hjwbAw$`iD{b0omUJnik+nwbhKO~e z+A7u~#K%@vediV2E7rvG*px16*7J7?G zrLZwxsHO-DtE1r871m@+1hR_Tw?}s2IN8{X3&tX4E1o5J+L|&%QJ%&vFC_gNC;n~s QRg`w=X}{&!&fi1)2Yq8}IRF3v literal 0 HcmV?d00001 diff --git a/smart_service/add_ons/doctype/application_menu/application_menu.js b/smart_service/add_ons/doctype/application_menu/application_menu.js new file mode 100644 index 0000000..c039f91 --- /dev/null +++ b/smart_service/add_ons/doctype/application_menu/application_menu.js @@ -0,0 +1,8 @@ +// Copyright (c) 2022, Hard n Soft Technologies Pvt Ltd and contributors +// For license information, please see license.txt + +frappe.ui.form.on('Application Menu', { + // refresh: function(frm) { + + // } +}); diff --git a/smart_service/add_ons/doctype/application_menu/application_menu.json b/smart_service/add_ons/doctype/application_menu/application_menu.json new file mode 100644 index 0000000..70a8b61 --- /dev/null +++ b/smart_service/add_ons/doctype/application_menu/application_menu.json @@ -0,0 +1,75 @@ +{ + "actions": [], + "autoname": "App Menu-.####", + "creation": "2022-01-07 13:54:30.540139", + "doctype": "DocType", + "editable_grid": 1, + "engine": "InnoDB", + "field_order": [ + "title", + "active_status", + "myid" + ], + "fields": [ + { + "fieldname": "title", + "fieldtype": "Data", + "in_list_view": 1, + "in_standard_filter": 1, + "label": "Title", + "translatable": 1 + }, + { + "fieldname": "active_status", + "fieldtype": "Select", + "in_list_view": 1, + "in_standard_filter": 1, + "label": "Active Status", + "options": "Active\nInactive" + }, + { + "fieldname": "myid", + "fieldtype": "Int", + "hidden": 1, + "in_list_view": 1, + "label": "myID", + "set_only_once": 1 + } + ], + "index_web_pages_for_search": 1, + "links": [], + "modified": "2022-01-10 17:17:13.447747", + "modified_by": "Administrator", + "module": "Add Ons", + "name": "Application Menu", + "owner": "Administrator", + "permissions": [ + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "share": 1, + "write": 1 + }, + { + "create": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "_Admin", + "share": 1, + "write": 1 + } + ], + "sort_field": "modified", + "sort_order": "DESC", + "title_field": "title", + "track_changes": 1 +} \ No newline at end of file diff --git a/smart_service/add_ons/doctype/application_menu/application_menu.py b/smart_service/add_ons/doctype/application_menu/application_menu.py new file mode 100644 index 0000000..5f7129c --- /dev/null +++ b/smart_service/add_ons/doctype/application_menu/application_menu.py @@ -0,0 +1,8 @@ +# Copyright (c) 2022, Hard n Soft Technologies Pvt Ltd and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + +class ApplicationMenu(Document): + pass diff --git a/smart_service/add_ons/doctype/application_menu/test_application_menu.py b/smart_service/add_ons/doctype/application_menu/test_application_menu.py new file mode 100644 index 0000000..1001341 --- /dev/null +++ b/smart_service/add_ons/doctype/application_menu/test_application_menu.py @@ -0,0 +1,8 @@ +# Copyright (c) 2022, Hard n Soft Technologies Pvt Ltd and Contributors +# See license.txt + +# import frappe +import unittest + +class TestApplicationMenu(unittest.TestCase): + pass diff --git a/smart_service/add_ons/doctype/bookmark/__init__.py b/smart_service/add_ons/doctype/bookmark/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/smart_service/add_ons/doctype/bookmark/__pycache__/__init__.cpython-38.pyc b/smart_service/add_ons/doctype/bookmark/__pycache__/__init__.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b38378900351ddb9a8f81ed06c9e376e92ae79b6 GIT binary patch literal 193 zcmWIL<>g`k0=B=`6G8N25P=LBfgA@QE@lA|DGb33nv8xc8Hzx{2;x_oenx(7s(xBg zVnIP_d~s1(yn!K)J3EXs#r@(c85aKWNw77?YRE=8GikBE(9S8nK%qmWJBG$1&ndtBU?- z2X@Sz_VSg>l_|A+vZ}5%I=jJ(%Yn|8y2@6PKb&;jzd@(%W}WFHQbcGfC&^^Zw$^ev ztRoxV4S(sp-r9i2PW&Z4h{T?gFpb)3-T34*^5@(tp5rtA*X$!-+C^9WRo5qfje;K% Cg`kf-N)+oC=Oz}F#22R)m1QQUqVW<_QsVRTiuF_SlS?WK qQuTB5Q&Mx{Gcrr``|oiZ>|!l?A49SJ45=BQWq4yn2;+lMsn6+mq)0rU$1 z>#(baI04vnrkXPE!k_Sz5q=6?I7|A)o2DTMehU|uf9(93>b%gL2s&8fTL|R0WlsN? zK?GL^jV^C@4QW=T3W~BlL|L=*F>4OGA!1N+g`k0mcW3AnGxQKn9FJjsp-EvjB+{hF}IwM!%H|MId1W@hek5BR@A)KdmUS zpddBAxTq}Nz!1vQO-jv6&d>)+6zdn~CKi>%7pE4LWhSSh@e)%~;`8&0^;7bbODYRe r^>g!6Qgh-6Z*+V_F@pv1HMu__P)u>n46iw7*GwfUePJp^{+!l{THLX6 z`AJ!<k7X-*^t{4?_Do)1y#wyesFCXx>OvenMl?DOE9KcvL z=)enrr$Oo|^2*#1^@;GM#m*WO_fB>lf_Hm3JO5FqTWp)1pnwg`k0_*SB6G8N25P=LBfgA@QE@lA|DGb33nv8xc8Hzx{2;x_kenx(7s(xBg zVnIP_d~s1(yn!K1G(Wd5HkP(W?VMh literal 0 HcmV?d00001 diff --git a/smart_service/add_ons/doctype/teknet_group/__pycache__/teknet_group.cpython-38.pyc b/smart_service/add_ons/doctype/teknet_group/__pycache__/teknet_group.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7e366fe05adc05e1ce6aa1e37ab5cb279e3af0b6 GIT binary patch literal 415 zcmZ8dJx{|h5Vez5L?s>BSu+sB3_=}{y0HLDmXnDOiiquCCzU$GpWzoFd1c}kATjlv zfGC`F&-Z*^&%T+@XN>Ih^Gyai-y_+z36TZ4KO|60@rG$$an6=ZB`SSkDn<{9 literal 0 HcmV?d00001 diff --git a/smart_service/add_ons/doctype/teknet_group/__pycache__/test_teknet_group.cpython-38.pyc b/smart_service/add_ons/doctype/teknet_group/__pycache__/test_teknet_group.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3072471b2cbe47c3fa915a98f18bc661b9dee736 GIT binary patch literal 402 zcmZ8cy-ve05I!dbqN){dz@7mNGYC~;=+=d@WI37mpoPQ$jv8;4cgm{AZ z)TpA*yn@~5VI6!sxvEN%cUILkp|cx2J=?M4TQd1da>7YhD(lga-K=x^$CTDs87Fm> z`)y6qcZ%>nNMhnV4u4MSt&Mp7K{zS|iRgG5XGvq$J~U)Wxa>;tzEJTew~s<=n_TqQ KUGDu3ihcmbl4bG$ literal 0 HcmV?d00001 diff --git a/smart_service/add_ons/doctype/teknet_group/teknet_group.js b/smart_service/add_ons/doctype/teknet_group/teknet_group.js new file mode 100644 index 0000000..476aea6 --- /dev/null +++ b/smart_service/add_ons/doctype/teknet_group/teknet_group.js @@ -0,0 +1,8 @@ +// Copyright (c) 2022, Hard n Soft Technologies Pvt Ltd and contributors +// For license information, please see license.txt + +frappe.ui.form.on('Teknet Group', { + // refresh: function(frm) { + + // } +}); diff --git a/smart_service/add_ons/doctype/teknet_group/teknet_group.json b/smart_service/add_ons/doctype/teknet_group/teknet_group.json new file mode 100644 index 0000000..8455263 --- /dev/null +++ b/smart_service/add_ons/doctype/teknet_group/teknet_group.json @@ -0,0 +1,72 @@ +{ + "actions": [], + "autoname": "TKGroup-.####", + "creation": "2022-01-07 13:48:03.157314", + "doctype": "DocType", + "editable_grid": 1, + "engine": "InnoDB", + "field_order": [ + "teknet_group_code", + "teknet_group_description", + "active_status" + ], + "fields": [ + { + "fieldname": "teknet_group_code", + "fieldtype": "Data", + "in_list_view": 1, + "in_standard_filter": 1, + "label": "Teknet Group Code" + }, + { + "fieldname": "teknet_group_description", + "fieldtype": "Data", + "in_list_view": 1, + "label": "Teknet Group Description" + }, + { + "fieldname": "active_status", + "fieldtype": "Select", + "in_list_view": 1, + "in_standard_filter": 1, + "label": "Active Status", + "options": "Active\nInactive" + } + ], + "index_web_pages_for_search": 1, + "links": [], + "modified": "2022-01-07 14:16:08.204900", + "modified_by": "Administrator", + "module": "Add Ons", + "name": "Teknet Group", + "owner": "Administrator", + "permissions": [ + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "share": 1, + "write": 1 + }, + { + "create": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "_Admin", + "share": 1, + "write": 1 + } + ], + "sort_field": "modified", + "sort_order": "DESC", + "title_field": "teknet_group_code", + "track_changes": 1 +} \ No newline at end of file diff --git a/smart_service/add_ons/doctype/teknet_group/teknet_group.py b/smart_service/add_ons/doctype/teknet_group/teknet_group.py new file mode 100644 index 0000000..d2e9d6f --- /dev/null +++ b/smart_service/add_ons/doctype/teknet_group/teknet_group.py @@ -0,0 +1,8 @@ +# Copyright (c) 2022, Hard n Soft Technologies Pvt Ltd and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + +class TeknetGroup(Document): + pass diff --git a/smart_service/add_ons/doctype/teknet_group/test_teknet_group.py b/smart_service/add_ons/doctype/teknet_group/test_teknet_group.py new file mode 100644 index 0000000..e49a545 --- /dev/null +++ b/smart_service/add_ons/doctype/teknet_group/test_teknet_group.py @@ -0,0 +1,8 @@ +# Copyright (c) 2022, Hard n Soft Technologies Pvt Ltd and Contributors +# See license.txt + +# import frappe +import unittest + +class TestTeknetGroup(unittest.TestCase): + pass diff --git a/smart_service/add_ons/doctype/teknet_module/__init__.py b/smart_service/add_ons/doctype/teknet_module/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/smart_service/add_ons/doctype/teknet_module/__pycache__/__init__.cpython-38.pyc b/smart_service/add_ons/doctype/teknet_module/__pycache__/__init__.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..359d3ff26cdfed3f83423243d17538602b7e1732 GIT binary patch literal 198 zcmWIL<>g`kf|Gx*CxYn5AOaaM0yz#qT+9L_QW%06G#UL?G8BP?5yY=-{fzwFRQ^ZkAH&3rx+Y_H#M`kl{@f$Z9Z$%5Su1AyII%an7I-+)eLC!Dez9fHHnI@-s61Nhu)CD27W5l8hvp+$6 zXms9Zp26<&v<^NSwX6zKw^r9Rp|fi|J{j2I4VBqaal$EAXzS6DU9U3w$Fwn6l}?!| z^P8HK?@k()GjksQgpTTsjrf4Q@Kh($ literal 0 HcmV?d00001 diff --git a/smart_service/add_ons/doctype/teknet_module/teknet_module.js b/smart_service/add_ons/doctype/teknet_module/teknet_module.js new file mode 100644 index 0000000..d4df98a --- /dev/null +++ b/smart_service/add_ons/doctype/teknet_module/teknet_module.js @@ -0,0 +1,8 @@ +// Copyright (c) 2022, Hard n Soft Technologies Pvt Ltd and contributors +// For license information, please see license.txt + +frappe.ui.form.on('Teknet Module', { + // refresh: function(frm) { + + // } +}); diff --git a/smart_service/add_ons/doctype/teknet_module/teknet_module.json b/smart_service/add_ons/doctype/teknet_module/teknet_module.json new file mode 100644 index 0000000..0b409eb --- /dev/null +++ b/smart_service/add_ons/doctype/teknet_module/teknet_module.json @@ -0,0 +1,60 @@ +{ + "actions": [], + "autoname": "TKModule-.####", + "creation": "2022-01-07 14:16:01.110723", + "doctype": "DocType", + "editable_grid": 1, + "engine": "InnoDB", + "field_order": [ + "teknet_module_name", + "active_status" + ], + "fields": [ + { + "fieldname": "teknet_module_name", + "fieldtype": "Data", + "label": "Teknet Module Name" + }, + { + "fieldname": "active_status", + "fieldtype": "Select", + "label": "Active Status", + "options": "Active\nInactive" + } + ], + "index_web_pages_for_search": 1, + "links": [], + "modified": "2022-01-07 14:16:01.110723", + "modified_by": "Administrator", + "module": "Add Ons", + "name": "Teknet Module", + "owner": "Administrator", + "permissions": [ + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "share": 1, + "write": 1 + }, + { + "create": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "_Admin", + "share": 1, + "write": 1 + } + ], + "sort_field": "modified", + "sort_order": "DESC", + "track_changes": 1 +} \ No newline at end of file diff --git a/smart_service/add_ons/doctype/teknet_module/teknet_module.py b/smart_service/add_ons/doctype/teknet_module/teknet_module.py new file mode 100644 index 0000000..b603033 --- /dev/null +++ b/smart_service/add_ons/doctype/teknet_module/teknet_module.py @@ -0,0 +1,8 @@ +# Copyright (c) 2022, Hard n Soft Technologies Pvt Ltd and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + +class TeknetModule(Document): + pass diff --git a/smart_service/add_ons/doctype/teknet_module/test_teknet_module.py b/smart_service/add_ons/doctype/teknet_module/test_teknet_module.py new file mode 100644 index 0000000..7337d12 --- /dev/null +++ b/smart_service/add_ons/doctype/teknet_module/test_teknet_module.py @@ -0,0 +1,8 @@ +# Copyright (c) 2022, Hard n Soft Technologies Pvt Ltd and Contributors +# See license.txt + +# import frappe +import unittest + +class TestTeknetModule(unittest.TestCase): + pass diff --git a/smart_service/add_ons/doctype/user_feedback/user_feedback.json b/smart_service/add_ons/doctype/user_feedback/user_feedback.json index 9d9a33c..ada05f3 100644 --- a/smart_service/add_ons/doctype/user_feedback/user_feedback.json +++ b/smart_service/add_ons/doctype/user_feedback/user_feedback.json @@ -1,6 +1,6 @@ { "actions": [], - "autoname": "format:{subject}", + "autoname": "format:{subject}-{creation}", "creation": "2021-11-08 16:59:12.277597", "doctype": "DocType", "editable_grid": 1, @@ -78,7 +78,7 @@ ], "index_web_pages_for_search": 1, "links": [], - "modified": "2021-11-30 10:52:58.715538", + "modified": "2022-01-11 18:40:02.666060", "modified_by": "Administrator", "module": "Add Ons", "name": "User Feedback", diff --git a/smart_service/add_ons/doctype/user_manual/user_manual.json b/smart_service/add_ons/doctype/user_manual/user_manual.json index 486668f..1f69a57 100644 --- a/smart_service/add_ons/doctype/user_manual/user_manual.json +++ b/smart_service/add_ons/doctype/user_manual/user_manual.json @@ -34,7 +34,7 @@ "index_web_pages_for_search": 1, "issingle": 1, "links": [], - "modified": "2021-11-08 17:09:22.249843", + "modified": "2022-01-07 15:25:49.893509", "modified_by": "Administrator", "module": "Add Ons", "name": "User Manual", @@ -51,10 +51,11 @@ "write": 1 }, { + "create": 1, "email": 1, "print": 1, "read": 1, - "role": "_Author", + "role": "_Admin", "share": 1, "write": 1 } diff --git a/smart_service/add_ons/report/__init__.py b/smart_service/add_ons/report/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/smart_service/add_ons/report/_test/__init__.py b/smart_service/add_ons/report/_test/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/smart_service/add_ons/report/_test/_test.js b/smart_service/add_ons/report/_test/_test.js new file mode 100644 index 0000000..2ee79ba --- /dev/null +++ b/smart_service/add_ons/report/_test/_test.js @@ -0,0 +1,9 @@ +// Copyright (c) 2022, Hard n Soft Technologies Pvt Ltd and contributors +// For license information, please see license.txt +/* eslint-disable */ + +frappe.query_reports["_Test"] = { + "filters": [ + + ] +}; diff --git a/smart_service/add_ons/report/_test/_test.json b/smart_service/add_ons/report/_test/_test.json new file mode 100644 index 0000000..777b179 --- /dev/null +++ b/smart_service/add_ons/report/_test/_test.json @@ -0,0 +1,29 @@ +{ + "add_total_row": 0, + "columns": [], + "creation": "2022-01-11 21:25:08.833206", + "disable_prepared_report": 0, + "disabled": 0, + "docstatus": 0, + "doctype": "Report", + "filters": [], + "idx": 0, + "is_standard": "Yes", + "modified": "2022-01-11 21:25:08.833206", + "modified_by": "Administrator", + "module": "Add Ons", + "name": "_Test", + "owner": "Administrator", + "prepared_report": 0, + "ref_doctype": "App Log", + "report_name": "_Test", + "report_type": "Script Report", + "roles": [ + { + "role": "System Manager" + }, + { + "role": "_Admin" + } + ] +} \ No newline at end of file diff --git a/smart_service/add_ons/report/_test/_test.py b/smart_service/add_ons/report/_test/_test.py new file mode 100644 index 0000000..72efd5c --- /dev/null +++ b/smart_service/add_ons/report/_test/_test.py @@ -0,0 +1,8 @@ +# Copyright (c) 2022, Hard n Soft Technologies Pvt Ltd and contributors +# For license information, please see license.txt + +# import frappe + +def execute(filters=None): + columns, data = [], [] + return columns, data diff --git a/smart_service/add_ons/report/installation_report/__init__.py b/smart_service/add_ons/report/installation_report/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/smart_service/add_ons/report/installation_report/installation_report.js b/smart_service/add_ons/report/installation_report/installation_report.js new file mode 100644 index 0000000..53ed65a --- /dev/null +++ b/smart_service/add_ons/report/installation_report/installation_report.js @@ -0,0 +1,9 @@ +// Copyright (c) 2022, Hard n Soft Technologies Pvt Ltd and contributors +// For license information, please see license.txt +/* eslint-disable */ + +frappe.query_reports["Installation Report"] = { + "filters": [ + + ] +}; diff --git a/smart_service/add_ons/report/installation_report/installation_report.json b/smart_service/add_ons/report/installation_report/installation_report.json new file mode 100644 index 0000000..9a62e27 --- /dev/null +++ b/smart_service/add_ons/report/installation_report/installation_report.json @@ -0,0 +1,29 @@ +{ + "add_total_row": 0, + "columns": [], + "creation": "2022-01-11 21:21:21.835448", + "disable_prepared_report": 0, + "disabled": 0, + "docstatus": 0, + "doctype": "Report", + "filters": [], + "idx": 0, + "is_standard": "Yes", + "modified": "2022-01-11 21:21:21.835448", + "modified_by": "Administrator", + "module": "Add Ons", + "name": "Installation Report", + "owner": "Administrator", + "prepared_report": 0, + "ref_doctype": "App Log", + "report_name": "Installation Report", + "report_type": "Script Report", + "roles": [ + { + "role": "System Manager" + }, + { + "role": "_Admin" + } + ] +} \ No newline at end of file diff --git a/smart_service/add_ons/report/installation_report/installation_report.py b/smart_service/add_ons/report/installation_report/installation_report.py new file mode 100644 index 0000000..72efd5c --- /dev/null +++ b/smart_service/add_ons/report/installation_report/installation_report.py @@ -0,0 +1,8 @@ +# Copyright (c) 2022, Hard n Soft Technologies Pvt Ltd and contributors +# For license information, please see license.txt + +# import frappe + +def execute(filters=None): + columns, data = [], [] + return columns, data diff --git a/smart_service/add_ons/report/login_report/__init__.py b/smart_service/add_ons/report/login_report/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/smart_service/add_ons/report/login_report/login_report.js b/smart_service/add_ons/report/login_report/login_report.js new file mode 100644 index 0000000..3de2d43 --- /dev/null +++ b/smart_service/add_ons/report/login_report/login_report.js @@ -0,0 +1,9 @@ +// Copyright (c) 2022, Hard n Soft Technologies Pvt Ltd and contributors +// For license information, please see license.txt +/* eslint-disable */ + +frappe.query_reports["Login Report"] = { + "filters": [ + + ] +}; diff --git a/smart_service/add_ons/report/login_report/login_report.json b/smart_service/add_ons/report/login_report/login_report.json new file mode 100644 index 0000000..6cb7622 --- /dev/null +++ b/smart_service/add_ons/report/login_report/login_report.json @@ -0,0 +1,29 @@ +{ + "add_total_row": 0, + "columns": [], + "creation": "2022-01-11 21:40:49.798235", + "disable_prepared_report": 0, + "disabled": 0, + "docstatus": 0, + "doctype": "Report", + "filters": [], + "idx": 0, + "is_standard": "Yes", + "modified": "2022-01-11 21:40:49.798235", + "modified_by": "Administrator", + "module": "Add Ons", + "name": "Login Report", + "owner": "Administrator", + "prepared_report": 0, + "ref_doctype": "App Log", + "report_name": "Login Report", + "report_type": "Script Report", + "roles": [ + { + "role": "System Manager" + }, + { + "role": "_Admin" + } + ] +} \ No newline at end of file diff --git a/smart_service/add_ons/report/login_report/login_report.py b/smart_service/add_ons/report/login_report/login_report.py new file mode 100644 index 0000000..72efd5c --- /dev/null +++ b/smart_service/add_ons/report/login_report/login_report.py @@ -0,0 +1,8 @@ +# Copyright (c) 2022, Hard n Soft Technologies Pvt Ltd and contributors +# For license information, please see license.txt + +# import frappe + +def execute(filters=None): + columns, data = [], [] + return columns, data diff --git a/smart_service/apis/__pycache__/addon_api.cpython-38.pyc b/smart_service/apis/__pycache__/addon_api.cpython-38.pyc index 7887e4c6f18a64d706880a0619c4a87d5a55357f..d3071584496fa8473a6d8e34bc644a9bf0e9bdcc 100644 GIT binary patch literal 4249 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 nLa}iP{=@d}_`OlOwBaLGCOgZ*12hd1{ literal 0 HcmV?d00001 diff --git a/smart_service/apis/__pycache__/master_api.cpython-38.pyc b/smart_service/apis/__pycache__/master_api.cpython-38.pyc index 2426b7b9229c9b894cb31a0684ce589ca01b320e..c6d950e6cdcdec3f64f523a212c35a3d3a062d88 100644 GIT binary patch literal 3504 zcma)<&u`qu6~{Rwm&@f!+O;gnu@a|S$4#@2BRM~;IH_wSu;WV=HHg$8AR5qI&S*uM z%U#XPs?kD54+(-^0ti7bEef>mtw8^PB8MP1|^B%tE-uij_I3Z zD6@Qv8Nadb8PuZoyT&`jFVPZp-ZgxOmZ^(tnUYnbS@{$cW2H$l_hvWhcUUSTQ;G6l z3D+vh4HWUFZ5X?l@s7!FOJkF4n$)C3&7jzdi&AMyEic_*~AOhUd!b(;%0|k}n+e86({h`?C@IGqA6NJ)_w?XV20Zu;)Ow$C4jELT(l0 z)Gf$+Wb4+Rnf?vzGn)OUoc$0z1NPYyvp*Wk{w>(=fjtkl$uH*Yhv_`nkDQQg^7*ms z2Vh?W`7qU(`19(t5|ZYo;$k@;xnClQ?M%iC-tjuPgV-^d%aToMS@R%eqxeMAt%G%LlOu+99*Fp}{$3xo`1U-*+W7QH0g z3A&szKA7(8#IzBL#x{#K;)JPzZl_D*^_bE70jW-r!6z?x2lc zBIQ_`U%II-gL+}6r3z}V_gUiGw@?pig;vRwvMhFlWF6s`SMx@7C<)TA!~9Adb<+TA zW`k43&|HtfRncz+Ibcv-?Y9~Qq_(fopuy~D^k|5hep)cT9Y-v<6DQpcQ;{7^uMTC6 zAB<#vWuzaR8O~MvSgg>R)J9*rEXoZ65e!UZ7dvLKYnbmHobn2!D#I=yp zLxOtPm)!ukZeIp6?y%-0l8D1AmYKAbxou3D#6o7(;hKU?(M_`nEykn)?M8eW@#m*i zHKVFoRn4jDjH(_|)mc={Qf7y|EqrTv^=4*;y*MMW?_yu~0(5?7@bj>`zqYu6J+?S> zA`pB#xcqe9d#Z&nZY;t(u_!trmpVS!m`8e`iN#?|6nUYyla=!jRWOCPO;B4dafoS} z{KqVNUpQ5lOzF{wwEs07?@PxU>gq)6 zP<#J#O5Z5k_w&#UIi=8!o8crn6@&ZcgOT6n5x*Zem3&1*4e=hhwntp_Y-0Z3wryMw z{J(Un`~qSep^Sbi=y?4czKE)wl0TXVUO_E9GVx-HhlsrrJ_5_tSC(J7vDUaP!?EYuMY$ekX$bPU4MHn#M}FiVv!OPG2z9k(oUUKy$O zI16O@P>sfMeJ@1nOYFkpP*Ao*VdK{8KYXM><@4%J^!g#JoV z+n3&rEq zl1DtqO4{z9APW7ZLik0ro336)HakrH1w7hWvVa3df75Vfnc4dIsr+OkmP{Q>dY5U> lHR8ZT>MY@Ey_tIrq<+G#tIa2-P^sK?Er)nNHCEjDuK&Hs>1#=sMFodDyhGYkjU{GVCA!;HLLrk#plv3!*eA^KvkR^IH zL0{v+aPjEPL@!?OWMVvd@YI7h;@OKw@oDWEpv(L0efs}3NG(8l5GyiI#0)ZZjG$*K!67UQXql^GDwyT%5#2)>=Jhs z%`}>~V>2C@DwR zfNtbH3IB<_i2O&)i*O2gDdGFb%gFykyv;)yDk${A>CO=D9x8q7{4SxDIHV8y(K(ZZ zY@sm_8B?(_0E1{$6XPBlLy_?yHiqCV45K5#Nas6oFU+AB7d6IpV>)9=Jw%M%C84pdz(^KrTGF;I4AZ1X?3k0KSzvF0`T})f;H{lOW zRER=&?#Sy<; z<6{u;N_;$N+ikY|dGqnfoIs4c>tRy(f8+?QV$~H|VAGlL*>J?@UeW0zLnM;~%5-A` VT8=prPU2};6rvGDkcg@)rGJ6+?0x_M diff --git a/smart_service/apis/__pycache__/publish_api.cpython-38.pyc b/smart_service/apis/__pycache__/publish_api.cpython-38.pyc index 99b614e74521ff1ea8ef53975d03fa581dcdf9ae..67f34ebbe112e5a08b9e61ed8e5588f5024927db 100644 GIT binary patch literal 5336 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 literal 5155 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 K+2qw}%lHqos;bxk diff --git a/smart_service/apis/__pycache__/readkey.cpython-38.pyc b/smart_service/apis/__pycache__/readkey.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8bddfd0007198a4e5662c1d56ec9345ed18738b2 GIT binary patch literal 437 zcmZ8du};G<5cSzfnijgjM?``Kc7%{XjFk|uWQjs-nzT+6*>0;!?F1|T03*M^%*+RP zW#Si@IHw?0oOJK*Nq+avciZpx2uA+?k-cI4bYwdik~2(wfWQd{NfKA7go-8vrqW^JU6#6tm<{e#)-=L)M#7}L&J!Q06cM!ynPsM)yb=}Sr0=V^ zs4Ed~1gTc@^yv7P9o~s)Uc@NXv92;@QZ3ZH%*8*JHKmS~$oNDo2hGw3=!&iHwha&n z?Lh#_T{H5PhsEx1{03Fcg&g2c?GcpwsO>I_(g;~<(@NSkx1j6ZgeRz+NpT9uT9XiV HSr2{y>ZEKT literal 0 HcmV?d00001 diff --git a/smart_service/apis/__pycache__/testaccess.cpython-38.pyc b/smart_service/apis/__pycache__/testaccess.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1f696026d51f67427b471bbdb9cd5557c2f3df7e GIT binary patch literal 1701 zcmaJ>OK%)S5bnpkc6RNcSYTPa5)>h=#Cj9K0a+0uaug{NvLZPFX)dGoblW@Y*_oxg z*K3>EQv#fP+zr@cm zA%COs=EK4G8ea1Rgd~zyBwNiiquyp2^E1!5BI7_Z$uFo3WcY$Sr&*}TGPoo%lCifV znaIuylEsqllYV*yQOVxZK6PDDRn0s=U^TFM%`N*z2<_ z{-!x9>&FjW@eEzIO}_^qf)DXiMn zN94s&tM3segJW8`$S9$UkqgXJ)GipCrgmY~2x(k& zsG$VP#Yf8KvMI66$7e=6KAlS)z>YLxk15TxsSWtAa!ALd$hZ{uvc&3H{SZzF zq$&$k9EX68!y*14`Xl)N<jYZH2hm^&Z{OKCy_$_R{qBG#j;@c~Uii*SwUTj2K=$?=eQT2Jzy zKq<+BA+488(iSMEcPs%)dmRWLw9s5g^cI=`2*_dPFtdFEexam5SPqTC^QfgDV`vYa zCo%-tY56k6=Ah*N;&?L0doFke_0V`rWXTLvEU+icdG9-QU`nfQp+^?w59Fk*`(6Dm z_yRl!E>fo@&_ut7AJ&dktu#QTvfny zm9N%2m^-)7JFX+7%ym;K(+~Bh7&|=l|Mk3&R2BjPInnYP_Z(P>kI_9Xw1SP``ukv; zPe2eBuysHv@gv|VV6_^ECl0+0UIli^f6rT};ROk`hpP$kT2MgGUr-lx!CE@z=I$F` zI3PxIKn-Nj(q(u_C|qk}E`v=#ag!jnaG8XA`ZmP9x&Z<%$p{+j$c|ppoqpuYe7&?I z0o@w|Rk6q}Ma3vMt%Vj8CkpB{fJpi?6knkD90h`VtwtKTjEm+b2;xZ`c>*Ja*QsCc zC#y|tfQNnuMHhtY%tyeA3ZVBy_jU9BZ{)zP)E*X~ zSZp2`KfurrK?ovfK?d`g4yd!)fVtTlc#<6Yf(h@O3SR`z$WuB9L@1(XWDts2v|x@z zBHA#=g6@!B=MqjO+mCwGws}$1lk{LLwaFMRU$rHe0~nhy^m7mmX{eyj*_7d3Ih}fj z9KwwaYdjI0dsDyh582EU;RT%r#&3eBR76L<`rQOG@S_PX*fex{%jr=QG~q0|AR<{I zP2{xp3i*|-kZEkLm05dqI+AC%_-It*88>-d^-tC&lgZkCt;)5rDrA+_LW;8o zLt{pF`+eA3FZnR9gyLmh$n~r)`&&CDSLWW>4EsA$9p{-`=ej)UKjuX)xRIMm3b-ui zMUPn@R=ACZk_)NySui&HYj-Z60FsveV(C;-P%lvoq90417h7V`dXOt^ws|SxfI#A^ z4fZRv+csA6XH1i}{;1Z*M%g?z8w!ceTMweJOi3GR$yGMAz8>+)`iHu%Y*5r(Xq#k8 zf~R9GRd309W38+=nh52C9}4r0*XU7QX=$VRxxzBR2cF;?gV?BXbsypaLgg7M3VE#B z_+wz|BU$}H)CXX_*zFJNQug;1U@lXwj?>#4SJv7dpgruvhVE-bGzD)E&Hq_^l~gN;1(AmRdpeC&s%`g#~e8<=i)=~5pu2!uD=h4?tmZ= zVu+n3Onm|NYe8aGakwBKgMuYHV}ds1f~i#q*_-QA1_cWb$JA@Q9fTrSfFg8IL=K8r zcmPNX07-=Z5|H3*wL2$P7rpCFax?5=NL_uZjV!w*ulNCMs4h6+U_0wPk$XBfvg?q% z1?#=G!fXQF_G~Cma-@26APqukmkwkl6;L-llBZgIg6BByeTv#=_+Ja}P7PGLS_Ql3 zzd}=ej$hqGf$V&RsCo}f{9B_!*fpRIP|3SO6_8Cl_f3YC`d`CBd5J4N(R1=3s#6LW zyC?D-sYDMweS2XA@NH-c7=rX0ItwlckP5yM{tY144T8@oP%PMXP+eY!!{M0@p|lUo z@CCiw3mr)6E7({7Wytl=Mo=*bk4;d~5>jH|5#YzN7dQlL$3Y~dftN+AZ{ZB}4T?7* z^EGVTfuWZ{5LZ$mNMu_~uTh2jz1G~DcR^Qgqd-#H)?^5oEg*xg@EkE6iteX{6u4wK dX2;)^wHO!jd&F741p+G(-Ai1+GLbJeg%QMs0%jo10>sWhT~%LlA4^6mzfNdfhb@Fd5#B2FmQ`8axn5Raxrl+PA+851pwSyPlW&g delta 513 zcmYjOzfZzI6mG9AZBQ^SCJvfg3~3}m{4p6PLZXRr0SCL(lO9r}1@B6YSVF??Kp0(Q z^iOcqf56!e{tNC-zLq25F7MvGFYkTtyL-RdkDkBG<+2j2myb_UQYLvi(vnat1AJl? zFn$V0AhqQ-a^zPfk|H@mkrJsh%|VXxjD}jIIqIgAdJTL=WM?2dGm}M@9_cm7)Gr2K zwd#4bQpY~=C?*_-gt^2o2Y2+bh(p?P8yyOl6b*{F*{7W%4jA#d=W_0L{UUal8`9~P zygRza4=u{*qVA;dv^OkZ;yVihK*|D1m>}F2;W8z_2LevHAwC=yj_alz>xA2m+X$Ep z{}5+|E)Y9-uT>}CM<8Q7GSxWKWTe-lF>-EVh2M7o=rWH4reW#gRk1FrEj7_%tu9N5 zwY0Nk0QJ0~3JtBSNBlnN*xi2cCb1QO{;o=`u18Drel};JJzYa*JL|VJuo>+Um)Y~8 SWTZSDGuoC7*c)g%M&3VTKb&*` diff --git a/smart_service/apis/__pycache__/update_validate.cpython-38.pyc b/smart_service/apis/__pycache__/update_validate.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..32bfeb1d2b3b626766be9135f2660230d8bd6981 GIT binary patch literal 1714 zcmd5-&2Jk;6rY)0uh;93Bo!YDTvl9+r4qM=22elLC@vx*l&WbXu~M}idnWOw>-A=4 z?2@n+hj2yWPl!*5Gyet$P8{~i0deJoxRf`$w7HjWKIt~{$=K7E^`4_Qx1%3>)_+e zGaMdp)H3@5JGX$Z4t({jUT`&l6Zph_<^leN?hHRA;%C-0n$}H};qz)%pJR-U_YM2X z%j}sqw+(*-;%#OP@bH~ki>+oY1{})GyfX~r8t^rNuT}8;Zt#{ctoPIY!PtT^ z*+Xm%J_MP+bT9CBX>vHBhkU0Ow007yXdF`&jguV~wD$Qh8pQkoKi-X`I{j?#?(W^~ zhkiQg$B`U{>Llg)m=vVJfOGC$} z(l_JFu?ghgJOYRAmyR1}re$=6KR!*EzhJn~EFy)psENGQHUyltea~NN8ogMnvvR>; zHVGFDTLTqMdD|Zg#)aQMS-9_S?QP#MIbqR2HgLDUBoMFHW?_6=X$rYPo$R$4Op^ z$CSz3IS@2Wc}`eAx8!jQim@0`1xbYkDtELsVPI3Dvl28Gr=_bhSTzM13VvMFY3>Rx z({Tc);Y>@7t!pN?qKI99;gD$FST2VgPXl`zMl4?$l$9NtVBrab)mL*{i=eLi(D;Pe zk4UV;&G`Gv?r=Qf-7=O?ifMS|s+qml=gDB$1&Hj*5fv(wT<9D3(u}5&>`sdM35(1@ zA#J25`5Ihz@I_zqurycnD|;V0L~Lwh54-wD-oTfNQGn-*zg`BjF&Z--Z!q)h3j#Kw-}=1vY#1qCybc;yBx0$1 XORsTn0(=tl+xq>G8m4!2iG%+Eh$8Xg literal 0 HcmV?d00001 diff --git a/smart_service/apis/__pycache__/update_validation.cpython-38.pyc b/smart_service/apis/__pycache__/update_validation.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8caf9049439bec70a410ee0b83e251588fe275b7 GIT binary patch literal 3963 zcmdT{O>-kh8Sb7LjYgv{TmFi}CYfy3cm=!mIcp2824AkxR@1LagnGWd1k(( zVn4Gt$!~Sr>gzO~5MyUO6i(tO{TPo_L(O(Er?b zOrIIz_pGWtwfiKaC&jFMN+~&dtkLUN(KGkd()blvZ#ApH46l!CY$~fUz(}3UJ*JQ^ z0bUjGY6|b~3cH$P!)y&kp=~Ln$CMS-T6Z(ZEfT0Pp{KD&*z_KWE!Kb>f!&zdmF`Xu zKN$p1`1Yo(ZO2I(L{X52y?C3++GE}c+Yx`rk9NW&J^TLN*3Q<(zSkcdL}AkL(-(d2 zefQyqA9y~y_sx6X`1akm@7?{@Vernq_R2?TaIoI*dz*Y1w)sci^9~o>i-RtIZ}}JF z<#+c#p|ThxJ^-ZxPk=1y(PV97AOswY$6O>Zk+VPRVX^bAZt(M)!@Q#D1&OEgw<5ia ze>ESN&JXfw>!}R$wW-;7LCm}f!i8tDP6$dmNZwo40Gus*u6OB!y(eukCKm{L5PyQO z-cG|IU-o)}ap4`jm`vYW-`jXsM}&p#R2KERWZ^J~5-z8=lSh3PqwEi?&;XvdxwWzV!TQe4wL7=oZhmQEH3{2)A2aNsqvAdA@DTm;FiI;G13p^V z?Rok{C0-bNZ4stigu!TGJ01p6$h^sU*yJh1G-I)W$tUJM&*4|9)& z#||(;cF`I3IgpjhCrZ*`%NqL7sNT*mhkt%Ru=Sd>Flm+1`g&rNeL_SNuGZO4Ry(~e zU(FZfCt~Q|S<|K42Rv?fR-sF>nsft^`Uw|!Wv`TieweHd)DiSm_|zk@(tjZr+a2D1 z=EJ)Ib5iexpSMej_=vZ_5W}Jtb*ZDiHg$;cscke=sRDk37{vY5py-{Vv$R4hhW0|s z+;8dDP)8lJ2G%lcLwp_3Kf@pk;6P?m4Dwq8xQmV{ys8GUh=APTPi zU(?MOPdlTt%VhjzkR_8fPtq@raz_vTw^KWs&W|n9ub*en=xymtBw5Swhoi!ZVrT39 zy$^RsH}pZj)Fb8H{_0Y4dnxgklDsW_K5`}=Y3;)Kmd=hAieefMJ%~;vGF!#>VeCf_ zcVuBph@KcVCh9u3L5w?ML;j4LRzRJq}2nJAdOxk zt$vVpKx6bm&=}8Aj>rNVbo)tjL0rRL&OwlHe;^|98X~=p<_$1F{XneZO)OtW^A?&L zswM(aAeONFRW!@!ETH;WYZXvQu8EuAk|rETS;Elzc+FcS6*wg{>_g>}#oi#r2GRtP zqI5%UzJ~p0bCUlo!QX+J)rR&=9$Pcok|U+F}+|Lj}sHJWy3&YJqwXC=Z&B+D18- z3!{~8kMU@Q>Hnnyv;)a^{2j>2((?{%nfkwiqC+8E3KI$~p4b1Rqo! N8%8#5>fW^JKLE$xJ){5t literal 0 HcmV?d00001 diff --git a/smart_service/apis/addon_api.py b/smart_service/apis/addon_api.py index a29fc77..f52bbc3 100644 --- a/smart_service/apis/addon_api.py +++ b/smart_service/apis/addon_api.py @@ -1,15 +1,185 @@ import frappe from frappe.model.document import Document -import json +import json + @frappe.whitelist() def addon(args): - if args == "Circular": - api = frappe.db.get_list('Circular',fields=['name','title','status','description','valid_till']) - elif args == "user feedback types": - api = frappe.db.get_list('User Feedback_Types',fields=['name','feedback_type','status']) - elif args == "User Feedback": - api = frappe.db.get_list('User Feedback',fields=['name','status','feedback_type','date','user_name']) + if args == "circular": + api = frappe.db.get_list( + "Circular", fields=["name", "title", "status", "description", "valid_till"] + ) + for i in api: + if i["status"] == "Active": + i["status"] = True + else: + i["status"] = False + elif args == "user_feedback_types": + api = frappe.db.get_list( + "User Feedback_Types", fields=["name", "feedback_type", "status"] + ) + for i in api: + if i["status"] == "Active": + i["status"] = True + else: + i["status"] = False + + + elif args == "teknet_group": + api = frappe.db.get_list( + "Teknet Group", + fields=["name","teknet_group_code", "teknet_group_description", "active_status"], + ) + for i in api: + if i["active_status"] == "Active": + i["active_status"] = True + else: + i["active_status"] = False + + elif args == "teknet_module": + api = frappe.db.get_list( + "Teknet Module", + fields=["name","teknet_module_name", "active_status"], + ) + for i in api: + if i["active_status"] == "Active": + i["active_status"] = True + else: + i["active_status"] = False + + elif args == "user_manual": + api = frappe.get_doc('User Manual') + else: api = "Not found" - return api \ No newline at end of file + + return api + +@frappe.whitelist() +def bookmark(args,request): + if args == "get_bookmark": + request = json.loads(request) + usrid = request["UserID"] + lsd = request["LSD"] + api = frappe.db.get_list( + "Bookmark", + fields=["name","vehicle_segment_id", "vehicle_id","system_id","sub_system_id","menu_id","km_details","variant_mapping_id"], + filters={"modified": [">", lsd],"user_id":["=",usrid]} + ) + # + return api + + if args == "update_bookmark": + request = json.loads(request) + usrid = request["UserID"] + req = request["Bookmarkdetails"] + # bookmark_count=0 + for i in req: + vehicle_seg_id = i["VehicleSegmentID"] + vehicle_id = i["VehicleID"] + variant_mapping_id = i["VariantMappingID"] + system_id = i["SystemID"] + sub_system_id = i["SubSystemID"] + menu_id = i["MenuID"] + kilometer_details = i["KmDetails"] + is_deleted = i["IsDeleted"] + if is_deleted == False: + data = frappe.new_doc('Bookmark') + data.user_id=usrid + data.active_status='Active' + data.vehicle_segment_id=vehicle_seg_id + data.vehicle_id=vehicle_id + data.system_id=system_id + data.sub_system_id=sub_system_id + data.menu_id=menu_id + data.km_details=kilometer_details + data.variant_mapping_id=variant_mapping_id + data.insert(ignore_if_duplicate=True) + + # bookmark_count=bookmark_count+1 + return "Updated" + + + + +@frappe.whitelist() +def feedback(args,request): + + if args == "get_user_feedback": + api = frappe.db.get_list( + "User Feedback", + fields=["name", "status", "feedback_type", "date", "user_name","attachment","description","date"], + ) + for i in api: + if i["status"] == "Active": + i["status"] = True + else: + i["status"] = False + + elif args == "post_user_feedback": + request = json.loads(request) + usr_fdbk = frappe.new_doc('User Feedback') + usr_fdbk.subject = request["Subject"] + usr_fdbk.feedback_type= request["FeedbackType"] + user_name = request["UserName"] + usr_id = frappe.db.get_value('App Users', {'user_id': user_name }, ['name']) + usr_fdbk.user_name = usr_id + usr_fdbk.status = "Open" + usr_fdbk.description = request["Description"] + usr_fdbk.date = request["Date"] + usr_fdbk.save() + + return usr_fdbk.name + +@frappe.whitelist() +def model_hit(args,request): + if args == "model_hit": + try: + request=json.loads(request) + UserID=request["UserID"] + AppVersion=request["AppVersion"] + DeviceID=request["DeviceID"] + 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.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() + return {"isSuccessful":True} + except: + return {"isSuccessful":False} + +@frappe.whitelist() +def model_usage(args,request): + if args == "model_usage": + try: + request=json.loads(request) + UserID=request["UserID"] + AppVersion=request["AppVersion"] + DeviceID=request["DeviceID"] + 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.date=i['Date'] + model_usage.module_id=i['ModuleID'] + model_usage.vehicle_id=i['VehicleID'] + model_usage.variant_id=i['VariantID'] + model_usage.variant_mapping_id=i['VariantMappingID'] + model_usage.system_id=i['SystemID'] + model_usage.sub_system_id=i['SubSystemID'] + model_usage.procedure_id=i['ProcedureID'] + model_usage.steps_id=i['StepsID'] + model_usage.save() + return {"isSuccessful":True} + except: + return {"isSuccessful":False} + # return request + diff --git a/smart_service/apis/app_user_login.py b/smart_service/apis/app_user_login.py new file mode 100644 index 0000000..b8b780f --- /dev/null +++ b/smart_service/apis/app_user_login.py @@ -0,0 +1,333 @@ +import frappe +from frappe.model.document import Document +import json +import requests +import re +from frappe.utils import now +import xml.etree.ElementTree as ET +from copy import copy + + +@frappe.whitelist(allow_guest=True) +def app_user_validation(usr, pwd): + preference=frappe.get_last_doc('App Preference') + mahindra_login=preference.mahindra_login_api + technician_login=preference.technician_login_api + # return preference + data = {'LoginID': usr, 'Password': pwd} + headers = {"Content-Type": "application/x-www-form-urlencoded"} + if technician_login==1 and mahindra_login==0: + response = requests.post( + "http://www.mahindramile.com/ISmartAuth/Service.asmx/ValidateCredential", data=data, headers=headers) + decoded = response.content.decode('utf-8') + + if len(decoded) > 155: + da = re.search("{", decoded) + da1 = re.search("}", decoded) + trunData = decoded[da.span()[0]:da1.span()[1]] + dicData = json.loads(trunData) + doc = frappe.get_doc("Fish", None) + tok = doc.apple + dicData['token'] = tok + # return decoded1 + return dicData + else: + return "Invalid Credentials" + 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') + node = ET.fromstring(decoded1) + dictValue = xml_to_dict(node) + + dicData={ + "ID": "", + "LoginName": usr, + "FirstName": "", + "LastName": "", + "IsActive": "True", + "UserType": "", + "SkillID": "", + "SkillName": "", + "UserTypeDesc": "", + "PasswordChanged": "", + "AreaName": "", + "Zone": "", + "Code": "", + "LocationName": "", + "ChannelNo": "", + "ServerDate": "", + "ServerTime": "", + "DealerName": "", + "EmailId": "{}@email.com".format(usr), + "isLDAPAuthenticated": ""} + + success_msg = None + user_name = None + msgDic = {} + + # try: + # success_msg = dictValue['children']['IsSuccessfull']['text'] + # user_name = dictValue['children']['UserName']['text'] + # except: + # success_msg = node.text + + # if success_msg == 1: + # msgDic.update({'UserName': user_name}) + # dicdata['FirstName']= user_name + # msgDic.update({'IsSuccessfull': success_msg}) + # doc = frappe.get_doc("Fish", None) + # tok = doc.apple + # dicData['token'] = tok + # return dicData + # else: + # msgDic.update({'IsSuccessfull': success_msg}) + # return "Invalid Credentials" + + # data = {'LoginID': 'klincy-cont', 'Password': 'SmFuIU1haGlAMjI='} + # msgDic = {} + + try: + msgDic['UserName'] = dictValue['children']['UserName']['text'] + msgDic['IsSuccessfull'] = dictValue['children']['IsSuccessfull']['text'] + doc = frappe.get_doc("Fish", None) + tok = doc.apple + dicData['token'] = tok + return dicData + + except: + msgDic['IsSuccessfull'] = node.text + return "Invalid Credentials" + + elif technician_login==1 and mahindra_login==1: + response = requests.post( + "http://www.mahindramile.com/ISmartAuth/Service.asmx/ValidateCredential", data=data, headers=headers) + decoded = response.content.decode('utf-8') + + response1 = requests.post("http://www.mahindramile.com/WindowAuth/Service.asmx/ValidateCredential", data=data, headers=headers) + decoded1 = response1.content.decode('utf-8') + node = ET.fromstring(decoded1) + dictValue = xml_to_dict(node) + + dicData={ + "ID": "", + "LoginName": usr, + "FirstName": "", + "LastName": "", + "IsActive": "True", + "UserType": "", + "SkillID": "", + "SkillName": "", + "UserTypeDesc": "", + "PasswordChanged": "", + "AreaName": "", + "Zone": "", + "Code": "", + "LocationName": "", + "ChannelNo": "", + "ServerDate": "", + "ServerTime": "", + "DealerName": "", + "EmailId": "{}@email.com".format(usr), + "isLDAPAuthenticated": ""} + + success_msg = None + user_name = None + msgDic = {} + + if len(decoded) > 155: + da = re.search("{", decoded) + da1 = re.search("}", decoded) + trunData = decoded[da.span()[0]:da1.span()[1]] + dicData = json.loads(trunData) + doc = frappe.get_doc("Fish", None) + tok = doc.apple + dicData['token'] = tok + return dicData + + else: + try: + msgDic['UserName'] = dictValue['children']['UserName']['text'] + msgDic['IsSuccessfull'] = dictValue['children']['IsSuccessfull']['text'] + doc = frappe.get_doc("Fish", None) + tok = doc.apple + dicData['token'] = tok + return dicData + except: + return "Invalid Credentials" + else: + return "Login Blocked" + + +def xml_to_dict(node): + return {'tag': node.tag, 'text': node.text, 'attrib': node.attrib, + 'children': {child.tag: xml_to_dict(child) for child in node}} + + +@frappe.whitelist() +def grant_user_access(userdata,iid): + + # app_preference=frappe.db.get_last_doc("App Preference", filters={'active':'Active'}) + # app_preference=frappe.db.get_list("App Preference", filters={'active':'Active'},fields=['name','application_server_url','update_server_url','asset_url','mahindra_login_api','technician_login_api','remarks','active']) + + + user_details = {} + userdata = json.loads(userdata) + user_id=userdata['ID'] + email = userdata['EmailId'] + first_name = userdata['FirstName'] + last_name = userdata['LastName'] + login_name = userdata['LoginName'] + user_active_status = userdata['IsActive'] + + latitude=userdata['latitude'] + longitude=userdata['longitude'] + + user_type = userdata['UserType'] + user_type_desc = userdata['UserTypeDesc'] + + skill_id = userdata['SkillID'] + skill_name = userdata['SkillName'] + + area_name = userdata['AreaName'] + zone = userdata['Zone'] + dealer_code = userdata['Code'] + location_name = userdata['LocationName'] + dealer_name = userdata['DealerName'] + + app_current_version = userdata['AppCurrentVersion'] + device_id = userdata['DeviceID'] + device_type = userdata['DeviceType'] + os = userdata['Os'] + os_version = userdata['OsVersion'] + + '''Inserting Dealer Data''' + if frappe.db.exists({'doctype':'App Dealer', 'dealer_code':dealer_code}): + dealer = frappe.get_doc({'doctype':'App Dealer', 'dealer_code':dealer_code}) + else: + dealer = frappe.new_doc('App Dealer') + dealer.dealer_code = dealer_code + dealer.dealer_name = dealer_name + dealer.zone = zone + dealer.area = area_name + dealer.active_status = user_active_status + dealer.save() + dealer = frappe.get_doc({'doctype':'App Dealer', 'dealer_code':dealer_code}) + + '''Inserting User data''' + app_dealer1=frappe.get_last_doc('App Dealer', filters={"dealer_code": dealer_code}) + if frappe.db.exists({'doctype':'App Users', 'email_id':email}): + app_user=frappe.get_doc({'doctype':'App Users', 'email_id':email}) + else: + app_user = frappe.new_doc('App Users') + app_user.email_id = email + app_user.user_id = user_id + app_user.dealer = app_dealer1.name + app_user.login_name = login_name + app_user.user_type = user_type_desc + app_user.first_name = first_name + app_user.last_name = last_name + app_user.skill_id = skill_id + app_user.skill_name = skill_name + app_user.active_status = user_active_status + app_user.save() + + '''Inserting Device data''' + # if frappe.db.exists({'doctype':'App Device','device_id' : device_id}): + if iid=='None' or iid=='null': + app_device = frappe.new_doc('App Device') + app_device.device_id = device_id + app_device.publish_type="Global" + # app_device.user_name = email + # app_device.user_type = user_type_desc + app_device.device_type = device_type + app_device.os = os + app_device.os_version = os_version + app_device.app_current_version = app_current_version + app_device.last_login = now() + app_device.insert(ignore_mandatory=True) + + if frappe.db.exists({'doctype':'App Device','device_id' : device_id}): + app_user1=frappe.get_last_doc('App Users', filters={"email_id": email}) + app_device1=frappe.get_last_doc('App Device', filters={"device_id": device_id}) + app_logs = frappe.new_doc('App Log') + app_logs.user = app_user1.name + app_logs.device = app_device.name + app_logs.type = 'Reinstalled' + app_logs.latitude = latitude + app_logs.longitude = longitude + app_logs.date_time_stamp = now() + app_logs.save() + # return app_user1.name + else: + app_user1=frappe.get_last_doc('App Users', filters={"email_id": email}) + app_device1=frappe.get_last_doc('App Device', filters={"device_id": device_id}) + app_logs = frappe.new_doc('App Log') + app_logs.user = app_user1.name + app_logs.device = app_device.name + app_logs.type = 'Installed' + app_logs.latitude = latitude + app_logs.longitude = longitude + app_logs.date_time_stamp = now() + app_logs.save() + # return app_user1.name + + + else : + + # app_device = frappe.get_doc('App Device', iid) + frappe.db.sql('''UPDATE _d6463952657fa86c.`tabApp Device` set last_logged_in= '{0}', user_name = '{2}', device_type = '{3}' where name = "{1}";'''.format(now(),iid,email,user_type_desc)) + frappe.db.commit() + app_logs = frappe.new_doc('App Log') + app_logs.user = app_user.name + app_logs.device = iid + app_logs.type = 'Logged in' + app_logs.latitude = latitude + app_logs.longitude = longitude + app_logs.date_time_stamp = now() + app_logs.save() + + ''' create user with role system manager ''' + if frappe.db.exists('User', email): + user = frappe.get_doc('User', email) + token = generate_keys(email) + user_details['token'] = token + # user_details['Installation ID'] = frappe.get_doc({'doctype':'App Device','device_id' : device_id}).name + lst= frappe.db.sql('''SELECT name FROM _d6463952657fa86c.`tabApp Device` where device_id = "{}";'''.format(device_id), as_list=True) + lst1= frappe.db.sql('''SELECT name FROM _d6463952657fa86c.`tabApp Users` where email_id = "{}";'''.format(email), as_list=True) + try: + user_details['Installation ID'] = lst[-1][0] + user_details['User ID'] = lst1[-1][0] + return user_details + except: + return "Login Failure" + + else: + user = frappe.new_doc('User') + user.email = email + user.first_name = first_name + user.send_welcome_email = 0 + user.user_type = 'Website User' + user.add_roles('_Admin') + user.save() + + token = generate_keys(email) + user_details['token'] = token + lst= frappe.db.sql('''SELECT name FROM _d6463952657fa86c.`tabApp Device` where device_id = "{}";'''.format(device_id), as_list=True) + lst1= frappe.db.sql('''SELECT name FROM _d6463952657fa86c.`tabApp Users` where email_id = "{}";'''.format(email), as_list=True) + try: + user_details['Installation ID'] = lst[-1][0] + user_details['User ID'] = lst1[-1][0] + return user_details + except: + return "Login Failure" + +def generate_keys(user): + user_details = frappe.get_doc('User', user) + api_secret = frappe.generate_hash(length=15) + if not user_details.api_key: + api_key = frappe.generate_hash(length=15) + user_details.api_key = api_key + user_details.api_secret = api_secret + user_details.save() + token = user_details.api_key+':'+api_secret + return token diff --git a/smart_service/apis/master_api.py b/smart_service/apis/master_api.py index a537ad2..525e926 100644 --- a/smart_service/apis/master_api.py +++ b/smart_service/apis/master_api.py @@ -7,68 +7,236 @@ import json @frappe.whitelist() -def masters(args): +def masters(args, LSD): - + if args == "vehicle": + api = frappe.db.get_list( + "Vehicle", + fields=[ + "vehicle", + "vehicle_segment", + "vehicle_segment_id", + "image", + "active_status", + "display_order", + "myid as vechile_id", + "display_order", + "modified", + ], + filters={"modified": [">", LSD]}, + ) + for i in api: + if i["active_status"] == "Active": + i["active_status"] = True + else: + i["active_status"] = False + elif args == "variant": + api = frappe.db.get_list( + "Variant", + fields=[ + "vehicle", + "vehicle_segment", + "variant", + "active_status", + "vehicle_id", + "modified", + ], + filters={"modified": [">", LSD]}, + ) + for i in api: + if i["active_status"] == "Active": + i["active_status"] = True + else: + i["active_status"] = False + elif args == "vehicle_segment": + api = frappe.db.get_list( + "Vehicle Segment", + fields=[ + "vehicle_segment", + "active_status", + "display_order", + "myid as vehicle_segment_id", + "modified", + ], + filters={"modified": [">", LSD]}, + ) + for i in api: + if i["active_status"] == "Active": + i["active_status"] = True + else: + i["active_status"] = False + elif args == "transmission": + api = frappe.db.get_list( + "Transmission", + fields=[ + "transmission", + "active_status", + "myid as transmission_id", + "modified", + ], + filters={"modified": [">", LSD]}, + ) + for i in api: + if i["active_status"] == "Active": + i["active_status"] = True + else: + i["active_status"] = False + elif args == "drive": + api = frappe.db.get_list( + "Drive", + fields=["drive", "active_status", "myid as drive_id", "modified"], + filters={"modified": [">", LSD]}, + ) + for i in api: + if i["active_status"] == "Active": + i["active_status"] = True + else: + i["active_status"] = False + elif args == "fuel": + api = frappe.db.get_list( + "Fuel", + fields=["fuel", "active_status", "myid as fuel_id", "modified"], + filters={"modified": [">", LSD]}, + ) + for i in api: + if i["active_status"] == "Active": + i["active_status"] = True + else: + i["active_status"] = False + elif args == "systems": + api = frappe.db.get_list( + "Systems", + fields=[ + "system_name", + "active_status", + "icon_file", + "myid as system_id", + "modified", + ], + filters={"modified": [">", LSD]}, + ) + for i in api: + if i["active_status"] == "Active": + i["active_status"] = True + else: + i["active_status"] = False + elif args == "sub_systems": + api = frappe.db.get_list( + "Sub Systems", + fields=[ + "sub_system_name", + "active_status", + "myid as sub_system_id", + "modified", + ], + filters={"modified": [">", LSD]}, + ) + for i in api: + if i["active_status"] == "Active": + i["active_status"] = True + else: + i["active_status"] = False + elif args == "service_kilometers": + api = frappe.db.get_list( + "Service Kilometers", + fields=[ + "kilometer", + "active_status", + "myid as service_kilometers_id", + "modified", + ], + filters={"modified": [">", LSD]}, + ) + for i in api: + if i["active_status"] == "Active": + i["active_status"] = True + else: + i["active_status"] = False + elif args == "custom_languages": + api = frappe.db.get_list( + "Custom Languages", + fields=[ + "lang_name", + "lang_code", + "active_status", + "display_order", + "myid as lang_id", + "modified", + ], + ) + for i in api: + if i["active_status"] == "Active": + i["active_status"] = True + else: + i["active_status"] = False + + elif args == "application_menu": + api = frappe.db.get_list( + "Application Menu", + fields=[ + "name", + "myid as app_menu_id", + "title", + "active_status", + ], + ) + for i in api: + if i["active_status"] == "Active": + i["active_status"] = True + else: + i["active_status"] = False + + elif args == "translation": + api = frappe.db.get_list( + "Translation", + fields=["language", "source_text", "translated_text", "modified"], + ) + elif args == "app_labels": + api = labels_json() + + elif args =="app_preference": + temp_api = frappe.get_last_doc( + "App Preference", + ) + api={ + "application_server_url":temp_api.application_server_url, + "update_server_url":temp_api.update_server_url, + "asset_url":temp_api.asset_url, + "login_base_url":temp_api.login_base_url, + "masters_base_url":temp_api.masters_base_url, + "transactions_base_url":temp_api.transactions_base_url, + "addons_base_url":temp_api.addons_base_url, + "auto_logout_time":temp_api.auto_logout_time + } + + return api - if args == "Vehicle": - api = frappe.db.get_list('Vehicle', fields=[ - 'vehicle', 'vehicle_segment', 'vehicle_segment_id', 'active_status', 'display_order', 'myid as vechile_id', 'display_order']) - elif args == "Variant": - api = frappe.db.get_list('Variant', fields=[ - 'vehicle', 'vehicle_segment', 'variant', 'active_status', 'vehicle_id']) - elif args == "Vehicle Segment": - api = frappe.db.get_list('Vehicle Segment', fields=[ - 'vehicle_segment', 'active_status', 'display_order', 'myid as vehicle_segment_id']) - elif args == "Transmission": - api = frappe.db.get_list('Transmission', fields=[ - 'transmission', 'active_status', 'myid as transmission_id']) - elif args == "Drive": - api = frappe.db.get_list( - 'Drive', fields=['drive', 'active_status', 'myid as drive_id']) - elif args == "Fuel": - api = frappe.db.get_list( - 'Fuel', fields=['fuel', 'active_status', 'myid as fuel_id']) - elif args == "Systems": - api = frappe.db.get_list('Systems', fields=[ - 'system_name', 'active_status', 'icon_file', 'myid as system_id']) - elif args == "Sub Systems": - api = frappe.db.get_list('Sub Systems', fields=[ - 'sub_system_name', 'active_status', 'myid as sub_system_id']) - elif args == "Service Kilometers": - api = frappe.db.get_list('Service Kilometers', fields=[ - 'kilometer', 'active_status', 'myid as service_kilometers_id']) - elif args == "Custom Languages": - api = frappe.db.get_list('Custom Languages', fields=[ - 'lang_name', 'lang_code', 'active_status', 'display_order','myid as lang_id']) - elif args == "Translation": - api = frappe.db.get_list('Translation', fields=[ - 'language', 'source_text', 'translated_text']) - elif args == "App Labels": - api = labels_json() - return api def labels_json(): - labels_lst = frappe.db.sql("""SELECT `tabApp Labels`.name as name,`tabApp Labels`.page_name as menu_type, `tabApp Labels`.english_label as element, `tabApp Labels`.language as lang, `tabApp Labels`.label as label, `tabApp Labels`.parent_app_labels as parent FROM _d6463952657fa86c.`tabApp Labels` order by name asc""", as_dict=1) - # final = [] - # labels = set() - # for i in labels_lst: - # if i['name'] != None: - # labels.add(i['element']) - # for j in labels: - # temp_lst = [] - # temp_dict = [] - # for k in labels_lst: - # if j == k['element'] and k['lang'] == 'en': - # temp = k - # elif j == k['element'] and k['lang'] != 'en': - # temp_lst.append(k) - # temp['Translations'] = temp_lst - # temp_dict.append(temp) - # final.append(temp) - # # x = json.dumps(final) - # # frappe.msgprint(str(final)) - return labels_lst + labels_lst = frappe.db.sql( + """SELECT `tabApp Labels`.name as name,`tabApp Labels`.page_name as menu_type, `tabApp Labels`.english_label as element, `tabApp Labels`.language as lang, `tabApp Labels`.label as label, `tabApp Labels`.parent_app_labels as parent FROM _d6463952657fa86c.`tabApp Labels` order by name asc""", + as_dict=1, + ) + # final = [] + # labels = set() + # for i in labels_lst: + # if i['name'] != None: + # labels.add(i['element']) + # for j in labels: + # temp_lst = [] + # temp_dict = [] + # for k in labels_lst: + # if j == k['element'] and k['lang'] == 'en': + # temp = k + # elif j == k['element'] and k['lang'] != 'en': + # temp_lst.append(k) + # temp['Translations'] = temp_lst + # temp_dict.append(temp) + # final.append(temp) + # # x = json.dumps(final) + # # frappe.msgprint(str(final)) + return labels_lst + def print(inputText): frappe.msgprint(str(inputText)) diff --git a/smart_service/apis/publish_api.py b/smart_service/apis/publish_api.py index f371370..682dc6e 100644 --- a/smart_service/apis/publish_api.py +++ b/smart_service/apis/publish_api.py @@ -13,55 +13,52 @@ class Publish(Document): list1 = [] -def getParentMapData(input_list, parameter): +def get_parent_map(input_list, parameter): parentChildMap = {} for b in input_list: parentChildMap.setdefault(b[parameter] or None, []).append(b) - return parentChildMap + list1 = [] + for p in parentChildMap: + da = {"procedure_name": p, 'steps': parentChildMap[p]} + list1.append(da) + for i in parentChildMap[p]: + del i['procedure_name'] + del i['idx'] + # if i['content_type'] == 'File': + # i['content'] = list(i['content'].split(',')) + # i['file'] = [f for f in i['file'].split(',')] + # i['display_order'] = [int(n) for n in i['display_order'].split(',')] + + return list1 @frappe.whitelist() -def api_procedure(args): - x = jsonGrouping(args) - docs_child = frappe.db.get_list('Publish_Docs', filters={'parent': args}, fields=[ - 'variant_mapping', 'system', 'sub_system', 'procedure_status', 'procedure_link']) - for d in docs_child: - if d['procedure_link'] != None: - docs_children = frappe.db.get_list('Procedure_Details', filters={'parent': d['procedure_link']}, fields=[ - 'procedure_name', 'step_name', 'content_type', 'content', 'file', 'idx as display_order'], order_by='idx') - daa = getParentMapData(docs_children, 'procedure_name') - d['ProcedureDetails'] = daa - list1.append(d) - # print(list1) - - with open("/home/frappe_srv_01/frappe-bench/apps/smart_service/smart_service/json_files/procedurePublish.json", 'w') as f: +def api_procedure(args, vehicle, language, version): + x = json_grouping(args, language) + base_url = '/home/frappe_srv_01/frappe-bench/sites/ss.hnsonline.com/public/files/' + with open(base_url + "json_files/%s-%s_v%s.json" % (vehicle, language, version), 'w') as f: json.dump(x, f) return json.dumps(x) -def print(inputText): - frappe.msgprint(str(inputText)) - - -def jsonGrouping(args): - docs_child = frappe.db.get_list('Publish_Docs', filters={'parent': args,'procedure_status': 'Publish Ready'}, fields=[ +def json_grouping(args, language): + docs_child = frappe.db.get_list('Publish_Docs', filters={'parent': args, 'procedure_status': 'Publish Ready'}, fields=[ 'variant_mapping', 'system', 'sub_system', 'procedure_status', 'procedure_link']) - lang = frappe.db.get_list('Publish', filters={'name': args}, fields=[ - 'language']) - lang = lang[0] - # print(docs_child) - # print(docs_child) + + # lang = frappe.db.get_list('Publish', filters={'name': args}, fields=['language']) + lang = {'language': language} variant = set() system = {} subsystem = {} + for i in docs_child: variant.add(i['variant_mapping']) for i in variant: temp = set() for j in docs_child: - if j['variant_mapping'] == i: - temp.add(j['system']) + if j['variant_mapping'] == i: + temp.add(j['system']) system[i] = temp for i in variant: @@ -74,77 +71,88 @@ def jsonGrouping(args): temp_set[j] = temp subsystem[i] = temp_set - print(variant) - print(system) - print(subsystem) final = [] - final_count={} - count=0 + final_count = {} + count = 0 + + active_status_case = "CASE WHEN active_status = 'Active' THEN 1 ELSE 0 END AS active_status" + for d in variant: variant_out = {} - # print(d) - - - vari = frappe.db.get_list('Variant Mapping', filters={'name': d}, fields=[ - 'name', 'variant', 'vehicle', 'family_code', 'vehicle_segment', 'active_status', 'fuel', 'transmission', 'drive']) - sk = frappe.db.get_list('Variant Mapping_SK', filters={'parent': d}, fields=[ - 'service_kilometers', 'idx'], order_by='service_kilometers asc') - var_asset = frappe.db.sql('''SELECT category, attach_file as file, active_status FROM _d6463952657fa86c.`tabVariant Mapping_Assets` where category<>'Technical Manual' and parent='%s' and language='%s';''' %(d, lang['language']), as_dict=True) + # vari = frappe.db.get_list('Variant Mapping', filters={'name': d}, fields=[ + # 'name', 'variant', 'vehicle', 'family_code', 'vehicle_segment', 'active_status', 'fuel', 'transmission', 'drive']) + vari = frappe.db.sql('''SELECT name,variant, vehicle,family_code,vehicle_segment,fuel,transmission,drive, %s + FROM _d6463952657fa86c.`tabVariant Mapping` WHERE name ='%s' ; ''' % (active_status_case, d), as_dict=True) + + var_asset = frappe.db.sql('''SELECT category, attach_file as file, %s FROM _d6463952657fa86c.`tabVariant Mapping_Assets` where category<>'Technical Manual' and parent='%s' and language='%s';''' % ( + active_status_case, d, lang['language']), as_dict=True) + vari = vari[0] + if vari['active_status'] == 1: + vari['active_status'] = True + else: + vari['active_status'] = False + vari['Assets'] = var_asset - vari['Service Kilometres'] = sk variant_out['Variant'] = vari - system_out = [] for i in system[d]: + sys = frappe.db.sql('''SELECT min(`tabSystem Mapping_Sub System`.idx) as systemdisplayorder,tabSystems.system_name,tabSystems.icon_file,tabSystems.myid,CASE WHEN tabSystems.active_status = 'Active' THEN 1 ELSE 0 END AS active_status + FROM _d6463952657fa86c.tabSystems + inner join _d6463952657fa86c.`tabSystem Mapping_Sub System` on tabSystems.system_name = `tabSystem Mapping_Sub System`.systems where system_name = '%s' group by system_name ;''' % i, as_dict=True) - sys = frappe.db.sql('''SELECT min(`tabSystem Mapping_Sub System`.idx) as systemdisplayorder,tabSystems.system_name,tabSystems.active_status,tabSystems.icon_file,tabSystems.myid FROM _d6463952657fa86c.tabSystems - inner join _d6463952657fa86c.`tabSystem Mapping_Sub System` on tabSystems.system_name = `tabSystem Mapping_Sub System`.systems where system_name = '%s' group by system_name ;''' %i, as_dict=True) sys = sys[0] - sysassets = frappe.db.sql('''SELECT idx as systemdisplayorder, system_asset FROM _d6463952657fa86c.`tabSystem Mapping_System Assets` where parent like '{0}%' and language='{1}' and systems='{2}';''' .format(d, lang['language'], i), as_dict=True) - # print(sysassets) - sys['Assets']=sysassets + if sys['active_status'] == 1: + sys['active_status'] = True + else: + sys['active_status'] = False + + sysassets = frappe.db.sql('''SELECT idx as systemdisplayorder, system_asset FROM _d6463952657fa86c.`tabSystem Mapping_System Assets` where parent like '{0}%' and language='{1}' and systems='{2}';''' .format( + d, lang['language'], i), as_dict=True) + sys['Assets'] = sysassets + subsystem_out = [] - # print(sys) - subsystem_out=[] for j in subsystem[d][i]: - # subsys = frappe.db.get_list('Sub Systems', filters={'name': j}, fields=[ - # 'name','active_status']) - subsys=frappe.db.sql('''select `tabSystem Mapping_Sub System`.idx as subSystemdisplayorder, systems,sub_systems, symptom, component, estimated_time, rts, mat, cover_image, `tabSystem Mapping_Sub System`.active_status + 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, + CASE WHEN `tabSystem Mapping_Sub System`.active_status = 'Active' THEN 1 ELSE 0 END AS active_status from _d6463952657fa86c.`tabSystem Mapping_Sub System` inner join _d6463952657fa86c.`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(d, i, j,lang['language']), as_dict=True) - subsys=subsys[0] - kms=frappe.db.sql( - '''SELECT kilometer as kilometer_name, idx as kilometer_IDX, applicable as kilometers_applicable FROM _d6463952657fa86c.`tabKilometer Mapping_Items` where sub_systems='%s';''' %j, as_dict=True) - subsys['Config Kilometer']=kms + where `tabSystem Mapping_Sub System`.parent like '{0}-{3}%' and systems='{1}' and sub_systems='{2}';'''.format(d, i, j, lang['language']), as_dict=True) + subsys = subsys[0] + + if subsys['active_status'] == 1: + subsys['active_status'] = True + else: + subsys['active_status'] = False + + kms = frappe.db.sql( + '''SELECT kilometer as kilometer_name, idx as kilometer_IDX, applicable as kilometers_applicable FROM _d6463952657fa86c.`tabKilometer Mapping_Items` where sub_systems='%s';''' % j, as_dict=True) + subsys['Config Kilometer'] = kms for k in docs_child: if k['variant_mapping'] == d and k['system'] == i and k['sub_system'] == j: - proc_details=frappe.db.get_list('Procedure_Details', filters={'parent': k['procedure_link']}, fields=[ - 'procedure_name', 'step_name', 'content_type', 'content', 'file', 'idx as display_order'], order_by='idx') - temp_data=getParentMapData(proc_details, 'procedure_name') - k['ProcedureDetails']=temp_data - subsys['procedure_status']=k['procedure_status'] - subsys['procedure_link']=k['procedure_link'] - subsys['ProcedureDetails']=k['ProcedureDetails'] - stepcount=frappe.db.sql('''SELECT count(*) as Stepcount FROM _d6463952657fa86c.tabProcedure_Details where parent='{0}';'''.format(k['procedure_link']), as_dict=True) - stepcount=stepcount[0] - count=count+int(stepcount['Stepcount']) - - subsystem_out.append(subsys) - sys['Subsystems']=subsystem_out - system_out.append(sys) + proc_details = frappe.db.sql('''select procedure_name, step_name, content_type, GROUP_CONCAT(content) as content, GROUP_CONCAT(file) as file,GROUP_CONCAT(DISTINCT idx order by idx) as display_order, idx from _d6463952657fa86c.tabProcedure_Details + where parent ='{}' group by procedure_name,step_name,content_type,content order by idx asc; '''.format(k['procedure_link']), as_dict=True) + temp_data = get_parent_map( + proc_details, 'procedure_name') - # print(subsys) + k['Procedure_details'] = temp_data + subsys['procedure_status'] = k['procedure_status'] + subsys['procedure_link'] = k['procedure_link'] + subsys['Procedure_details'] = k['Procedure_details'] - variant_out['Variant']['Systems']=system_out - - + stepcount = frappe.db.sql( + '''SELECT count(*) as Stepcount FROM _d6463952657fa86c.tabProcedure_Details where parent='{0}';'''.format(k['procedure_link']), as_dict=True) + stepcount = stepcount[0] + count = count+int(stepcount['Stepcount']) + subsystem_out.append(subsys) + sys['Subsystems'] = subsystem_out + system_out.append(sys) + variant_out['Stepcount'] = count + variant_out['Variant']['Systems'] = system_out final.append(variant_out) - final_count['StepCount'] = count - final.append(final_count) - - frappe.db.sql(""" UPDATE _d6463952657fa86c.tabPublish SET publish_status = '%s' where name = '%s' """%('Published',args)) + # final_count['StepCount'] = count + # final.append(final_count) + frappe.db.sql(""" UPDATE _d6463952657fa86c.tabPublish SET publish_status = '%s' where name = '%s' """ % ( + 'Published', args)) frappe.db.commit() - return final diff --git a/smart_service/apis/transaction_api.py b/smart_service/apis/transaction_api.py index 291e934..3a62226 100644 --- a/smart_service/apis/transaction_api.py +++ b/smart_service/apis/transaction_api.py @@ -3,10 +3,20 @@ from frappe.model.document import Document import json @frappe.whitelist() -def get_repair_manual(vehicle,variant,fuel,transmission,drive): - key_dict = frappe.db.sql('''SELECT name as variantkey, vehicle, variant, fuel, transmission, drive FROM _d6463952657fa86c.`tabVariant Mapping` where vehicle='{0}' and variant='{1}' and fuel='{2}' and transmission='{3}' and drive='{4}';'''.format(vehicle,variant,fuel,transmission,drive), as_dict=True) - key_dict=key_dict[0] - variantkey=key_dict['variantkey'] - manual_out=frappe.db.sql('''SELECT parent as variant, language, attach_file as file FROM _d6463952657fa86c.`tabVariant Mapping_Assets` where parent='{0}' and category='Technical Manual' and parentfield = 'assets';'''.format(variantkey), as_dict=True) - +def get_technical_manual(args): + # request = json.loads(args) + # vehicle=request["Vehicle"] + # variant = request["Variant"] + # fuel = request["Fuel"] + # transmission = request["Transmission"] + # drive = request["Drive"] + # key_dict = frappe.db.sql('''SELECT name as variantkey, vehicle, variant, fuel, transmission, drive FROM _d6463952657fa86c.`tabVariant Mapping` where vehicle='{0}' and variant='{1}' and fuel='{2}' and transmission='{3}' and drive='{4}';'''.format(vehicle,variant,fuel,transmission,drive), as_dict=True) + # key_dict=key_dict[0] + # variantkey=key_dict['variantkey'] + manual_out=frappe.db.sql('''SELECT parent as variant, language, attach_file as file, active_status FROM _d6463952657fa86c.`tabVariant Mapping_Assets` where parent='{0}' and category='Technical Manual' and parentfield = 'assets';'''.format(args), as_dict=True) + for i in manual_out: + if i["active_status"] == "Active": + i["active_status"] = True + else: + i["active_status"] = False return manual_out \ No newline at end of file diff --git a/smart_service/apis/update_validation.py b/smart_service/apis/update_validation.py new file mode 100644 index 0000000..14112bc --- /dev/null +++ b/smart_service/apis/update_validation.py @@ -0,0 +1,122 @@ +import frappe +from frappe.model.document import Document +import json +import os + + +@frappe.whitelist() +def check_all_vehicle_updates(vehicle_list): + Vehicle_req_list = [] + response = {} + v_list = json.loads(vehicle_list) + lang = v_list['LanguageID'] + iid = v_list['InstallationId'] + vehicle_data = v_list['VehicleReqList'] + publish_type = frappe.db.sql( + '''SELECT publish_type FROM _d6463952657fa86c.`tabApp Device` where name='{}';'''.format(iid), as_list=True) + if publish_type[0][0] != None: + for v in vehicle_data: + v_id = v['Vehicle'] + current_version = float(v['CurrentVersion']) + data1 = frappe.db.sql('''SELECT name,max(version) as version,language FROM _d6463952657fa86c.tabPublish where vehicle='{}' and language='{}' and publish_status='Published' + and publish_type='{}' and vehicle_status='Active' order by version ASC;'''.format(v_id, lang, publish_type[0][0]), as_dict=True) + if data1[0]['version'] != None: + if current_version == float(data1[0]['version']): + data1[0]['IsUpdateAvailable'] = "false" + Vehicle_req_list.append(data1) + else: + data = frappe.db.sql('''SELECT name,CAST(version AS DECIMAL(10,2)) as version,language FROM _d6463952657fa86c.tabPublish where vehicle='{}' and language='{}' and publish_status='Published' + and publish_type='{}' and vehicle_status='Active' and version > '{}' order by version ASC;'''.format(v_id, lang, publish_type[0][0], current_version), as_dict=True) + data_append = [] + for d in data: + d['IsUpdateAvailable'] = 'true' + d['CurrentVersion'] = int(current_version) + data_append.append(d) + Vehicle_req_list.append(data_append) + response['LanguageID'] = lang + # response['VehicleReqList'] = Vehicle_req_list[0] + # return response + if len(Vehicle_req_list) != 0: + response['VehicleReqList'] = Vehicle_req_list[0] + return response + else: + return 'No Vehicles in criteria' + else: + return 'Invalid Publish Details' + + +@frappe.whitelist() +def check_vehicle_update(vehicle_list): + base_url = '/home/frappe_srv_01/frappe-bench/sites/ss.hnsonline.com/public/files/' + Vehicle_req_list = [] + response = {} + v_list = json.loads(vehicle_list) + vehi = v_list['Vehicle'] + iid = v_list['InstallationId'] + vehicle_data = v_list['VehicleReqList'] + publish_type = frappe.db.sql( + '''SELECT publish_type FROM _d6463952657fa86c.`tabApp Device` where name='{}';'''.format(iid), as_list=True) + + if publish_type[0][0] != None: + for v in vehicle_data: + l_id = v['LanguageID'] + current_version = float(v['CurrentVersion']) + data1 = frappe.db.sql('''SELECT name,max(version) as version,language FROM _d6463952657fa86c.tabPublish where vehicle='{}' and language='{}' and publish_status='Published' + and publish_type='{}' and vehicle_status='Active' order by version ASC;'''.format(vehi, l_id, publish_type[0][0]), as_dict=True) + + if data1[0]['name'] != None: + if data1[0]['version'] != None: + if current_version == float(data1[0]['version']): + data1[0]['IsUpdateAvailable'] = "false" + Vehicle_req_list.append(data1) + + else: + if publish_type[0][0] == 'Internal': + data = frappe.db.sql('''SELECT name,CAST(version AS DECIMAL(10,2)) as version,language FROM _d6463952657fa86c.tabPublish where vehicle='{}' and language='{}' and publish_status='Published' + and publish_type='{}' and vehicle_status='Active' and version > '{}' order by version ASC;'''.format(vehi, l_id, publish_type[0][0], current_version), as_dict=True) + else: + data = frappe.db.sql('''SELECT name,version,language FROM _d6463952657fa86c.tabPublish where vehicle='{}' and language='{}' and publish_status='Published' + and publish_type='{}' and vehicle_status='Active' and version > '{}' order by version ASC;'''.format(vehi, l_id, publish_type[0][0], current_version), as_dict=True) + + list1 = [] + dict1 = {} + base_url = '/home/frappe_srv_01/frappe-bench/sites/ss.hnsonline.com/public' + + for d in data: + ver = str(d['version']) + file_name = 'files/json_files/'+vehi + "-" + \ + d['language'] + '_v' + ver + '.json' + json_data = json.load( + open(os.path.join(base_url, file_name))) + json_data[0]['version'] = ver + list1.append(json_data[0]) + + dict1['JSON'] = list1 + + f_name = "/files/json_files/temp/%s-%s_%s.json" % ( + iid, vehi, l_id) + with open(base_url+f_name, 'w') as outfile: + outfile.write(json.dumps(dict1)) + + res = {} + res['Name'] = '%s-%s_%s' % (iid, vehi, l_id) + res['Language'] = l_id + res['IsUpdateAvailable'] = 'true' + res['CurrentVersion'] = float(current_version) + res['Version'] = float(data1[0]['version']) + res['JsonURL'] = f_name + Vehicle_req_list.append(res) + else: + res = {} + res['Language'] = l_id + res['IsUpdateAvailable'] = 'false' + res['CurrentVersion'] = float(current_version) + Vehicle_req_list.append(res) + + response['Vehicle'] = vehi + response['VehicleReqList'] = Vehicle_req_list + return response + + else: + Vehicle_req_list.append({'Error': 'Publish type error'}) + return Vehicle_req_list diff --git a/smart_service/json_files/Thar-en -2022-01-10 15:02:15.309338'.json b/smart_service/json_files/Thar-en -2022-01-10 15:02:15.309338'.json new file mode 100644 index 0000000..70c636a --- /dev/null +++ b/smart_service/json_files/Thar-en -2022-01-10 15:02:15.309338'.json @@ -0,0 +1,870 @@ +[ + { + "Variant": { + "name": "Thar.AX-0432", + "variant": "Thar.AX", + "vehicle": "Thar", + "family_code": "J08", + "vehicle_segment": "Personal", + "fuel": "DSL", + "transmission": "MT", + "drive": "4WD", + "active_status": true, + "Assets": [], + "Systems": [ + { + "systemdisplayorder": 4, + "system_name": "Exhaust & Emission Control", + "icon_file": null, + "myid": 1001, + "active_status": true, + "Assets": [ + { + "systemdisplayorder": 2, + "system_asset": "/private/files/ECU IP & OP (D)_v2.mp4" + } + ], + "Subsystems": [ + { + "subSystemdisplayorder": 4, + "systems": "Exhaust & Emission Control", + "sub_systems": "Precautions & Handling Of Dosing Module (DM) & Supply Module SM", + "symptom": 0, + "component": 0, + "estimated_time": null, + "rts": null, + "mat": null, + "cover_image": null, + "active_status": true, + "Config Kilometer": [], + "procedure_status": "Publish Ready", + "procedure_link": "Thar.AX-0432-Precautions & Handling Of Dosing Module (DM) & Supply Module SM-en", + "Procedure_details": [ + { + "procedure_name": "Overview", + "steps": [ + { + "step_name": "Step-1", + "content_type": "File", + "content": "", + "file": "/files/Rear Fog Lamp.jpg", + "display_order": "1" + }, + { + "step_name": "Step-1", + "content_type": "Heading", + "content": "Do\u2019s & Don\u2019ts", + "file": null, + "display_order": "2" + }, + { + "step_name": "Step-1", + "content_type": "Description", + "content": "
  • Do not hold the Supply Module while carry DEF tank.
", + "file": null, + "display_order": "3" + }, + { + "step_name": "Step-2", + "content_type": "File", + "content": "", + "file": "/files/W4A080026.jpg", + "display_order": "4" + }, + { + "step_name": "Step-2", + "content_type": "Description", + "content": "
  • Do not handle Supply Module using connectors, complete housing to be held to avoid any type of damages.
", + "file": null, + "display_order": "5" + }, + { + "step_name": "Step-3", + "content_type": "File", + "content": "", + "file": "/files/W4A130187.jpg", + "display_order": "6" + }, + { + "step_name": "Step-3", + "content_type": "Description", + "content": "
  • Handle Dosing Module using housing and not on connectors to avoid any type of damages.
", + "file": null, + "display_order": "7" + }, + { + "step_name": "Step-4", + "content_type": "Description", + "content": "
  • Structural changes of the Dosing Module is not permitted.
  • Dismounting of dosing valve out of the cooling body is not allowed.
", + "file": null, + "display_order": "8" + }, + { + "step_name": "Step-4", + "content_type": "Description", + "content": "
  1. Avoid painting or application of other coatings on Dosing Module (DM) & Supply Module (SM) to ensure lifetime & functionality.
  2. Always remove (manually) protection caps of DM & SM just before assembly of its mating pipes/cables, to avoid contamination of the system.
  3. Only use recommended tools for remove & Installation of DM & SM. After removing, cover the openings with protective caps to prevent the entry of contaminants.
  4. The entry of contaminants in the interfaces of the DM must be prevented during Installation & removing of DM.
", + "file": null, + "display_order": "9" + }, + { + "step_name": "Step-5", + "content_type": "Heading", + "content": "Storage Guidelines", + "file": null, + "display_order": "10" + }, + { + "step_name": "Step-5", + "content_type": "Description", + "content": "
  1. Dosing Module (DM) & Supply Module (SM) should not be handled as bulk goods, as it can damage the parts. If a part falls down, it must be scrapped, even if it looks visually ok, to avoid any latent damages leading emission issues.
  2. Parts have to be stored in original M&M packaging.
  3. Parts needs to be protected against rain, snow, heat sources and dust.
  4. Max. storage period of DM & SM should be not more than 4 years.
  5. Avoid any damages to Supply Module while storing DEF tank.
", + "file": null, + "display_order": "11" + } + ] + } + ] + } + ] + }, + { + "systemdisplayorder": 1, + "system_name": "Air Intake", + "icon_file": null, + "myid": 1000, + "active_status": true, + "Assets": [ + { + "systemdisplayorder": 1, + "system_asset": "/private/files/CAN Communication (D)_v3.mp4" + } + ], + "Subsystems": [ + { + "subSystemdisplayorder": 1, + "systems": "Air Intake", + "sub_systems": "Air Filter Element Clean", + "symptom": 0, + "component": 0, + "estimated_time": null, + "rts": null, + "mat": null, + "cover_image": null, + "active_status": true, + "Config Kilometer": [], + "procedure_status": "Publish Ready", + "procedure_link": "Thar.AX-0432-Air Filter Element Clean-en", + "Procedure_details": [ + { + "procedure_name": "Overview", + "steps": [ + { + "step_name": "Overview", + "content_type": "File", + "content": null, + "file": "/files/ESP OFF.jpg,/files/W4A160067.jpg,/files/W4A130334.jpg", + "display_order": "1,2,3" + }, + { + "step_name": "Overview", + "content_type": "Description", + "content": "The air cleaner element is Non woven +Pleated Media type (Dry Type). Filtration happens in two stages. Coarser particles are filtered in first stage by foam media and fine particles are filtered by Paper media in second stage. The dust and other fine particles which are sucked inside along with air gets trapped in the air cleaner while passing through the filter element.", + "file": null, + "display_order": "4" + }, + { + "step_name": "Overview", + "content_type": "Notice", + "content": "Don\u2019t tap or hit the filter element.", + "file": null, + "display_order": "5" + }, + { + "step_name": "Preliminary Activities", + "content_type": "Description", + "content": "Park the vehicle on flat work bay.Open the bonnet and lock it in open position using bonnet stay rod.", + "file": null, + "display_order": "6" + }, + { + "step_name": "Tools Required", + "content_type": "File", + "content": null, + "file": "/files/W4A120270.jpg", + "display_order": "7" + } + ] + }, + { + "procedure_name": "Removal", + "steps": [ + { + "step_name": "Step-1", + "content_type": "File", + "content": null, + "file": "/files/Hill Hold.jpg", + "display_order": "8" + }, + { + "step_name": "Step-1", + "content_type": "Caution", + "content": "The air filter element should be inspected and replaced from time to time, when driving under the following conditions:Unpaved road.Dusty air-polluted road.Long-term driving in rainy weather.", + "file": null, + "display_order": "9" + }, + { + "step_name": "Step-1", + "content_type": "Description", + "content": "Using a 5 mm allen key, Unscrew air cleaner top housing mounting allen screws and lift the top housing.", + "file": null, + "display_order": "10" + }, + { + "step_name": "Step-2", + "content_type": "File", + "content": null, + "file": "/files/W4A150059.jpg", + "display_order": "11" + }, + { + "step_name": "Step-2", + "content_type": "Description", + "content": "Gently take out the air cleaner element from the housing.", + "file": null, + "display_order": "12" + } + ] + }, + { + "procedure_name": "Cleaning", + "steps": [ + { + "step_name": "Step-1", + "content_type": "File", + "content": null, + "file": "/files/W4A020124.jpg", + "display_order": "13" + }, + { + "step_name": "Step-1", + "content_type": "Description", + "content": "Clean the inner side of the air cleaner housing using a lint free cloth.", + "file": null, + "display_order": "14" + }, + { + "step_name": "Step-2", + "content_type": "File", + "content": null, + "file": "/files/W4A020013.jpg,/files/W4A020011.jpg,/files/W4A020012.jpg", + "display_order": "15,16,17" + }, + { + "step_name": "Step-2", + "content_type": "Description", + "content": "Blow the compressed air from the top clean side of filter element.", + "file": null, + "display_order": "18" + }, + { + "step_name": "Step-2", + "content_type": "Caution", + "content": "Blow the compress air from the top clean side of filter element (From Paper side).Do not blow the air from bottom dirty side (Foam side).While cleaning, ensure the air pressure should be less than 2 bar.", + "file": null, + "display_order": "19" + } + ] + }, + { + "procedure_name": "Installation", + "steps": [ + { + "step_name": "Step-1", + "content_type": "File", + "content": null, + "file": "/files/W4A020124.jpg", + "display_order": "20" + }, + { + "step_name": "Step-1", + "content_type": "Description", + "content": "Clean the inner side of the air cleaner housing using a lint free cloth.", + "file": null, + "display_order": "21" + }, + { + "step_name": "Step-2", + "content_type": "File", + "content": null, + "file": "/files/W4A020017.jpg", + "display_order": "22" + }, + { + "step_name": "Step-2", + "content_type": "Description", + "content": "Gently insert the air cleaner element inside the air cleaner housing.", + "file": null, + "display_order": "23" + }, + { + "step_name": "Step-2", + "content_type": "Caution", + "content": "During Installation ensure to keep foam side of the filter element in the bottom side.Ensure dust should not fall inside the clean hose area while fitting.Ensure dust should not fall inside the clean hose area while fitting.", + "file": null, + "display_order": "24" + }, + { + "step_name": "Step-2", + "content_type": "Caution", + "content": "Always use recommended genuine air filter element.Do not tap or hit the new filter element.", + "file": null, + "display_order": "25" + }, + { + "step_name": "Step-3", + "content_type": "File", + "content": null, + "file": "/files/W4A020123.jpg", + "display_order": "26" + }, + { + "step_name": "Step-3", + "content_type": "Description", + "content": "Refit the air cleaner top housing and install the mounting allen screws.", + "file": null, + "display_order": "27" + }, + { + "step_name": "Step-3", + "content_type": "Torque Value", + "content": "Torque : 10 Nm", + "file": null, + "display_order": "28" + } + ] + } + ] + } + ] + }, + { + "systemdisplayorder": 2, + "system_name": "Fuel System", + "icon_file": null, + "myid": 1002, + "active_status": true, + "Assets": [ + { + "systemdisplayorder": 3, + "system_asset": "/private/files/ECU IP & OP (D)_v2.mp4" + } + ], + "Subsystems": [ + { + "subSystemdisplayorder": 6, + "systems": "Fuel System", + "sub_systems": "Fuel Filter Element - Replace", + "symptom": 0, + "component": 0, + "estimated_time": null, + "rts": null, + "mat": null, + "cover_image": null, + "active_status": true, + "Config Kilometer": [], + "procedure_status": "Publish Ready", + "procedure_link": "Thar.AX-0432-Fuel Filter Element - Replace-en", + "Procedure_details": [ + { + "procedure_name": "Overview", + "steps": [ + { + "step_name": "Overview", + "content_type": "File", + "content": ",,", + "file": "/files/W4A120027.jpg,/files/W4A150068.jpg,/files/W4A190115.jpg", + "display_order": "1,2,3" + }, + { + "step_name": "Overview", + "content_type": "Description", + "content": "
  • The fuel filter filters impurities that may be present in the fuel. The fuel system operates under high pressure which makes it absolutely essential for the fuel to be dust free and moisture free. The fuel filter also has the water separator which filters the moisture that may have crept into the fuel. The high pressure pump in the fuel system operates at high speeds and fine clearance which needs the diesel to be dust free and also be free of moisture at the same time. Since the diesel itself lubricates the PF Pump, If water content is present in fuel, the fuel looses its lubrication property and thus PF Pump and injectors will get damaged. Also the moisture content may lead to formation of rust on the pump elements. This makes it advisable not to use diesel with additives which may cause damage to the PF Pump.
", + "file": "", + "display_order": "4" + }, + { + "step_name": "Preliminary Activities", + "content_type": "Description", + "content": "
  1. Park the vehicle on level work bay
  2. Open the bonnet and lock it in open position using bonnet stay rod.
", + "file": "", + "display_order": "5" + }, + { + "step_name": "Tools Required", + "content_type": "File", + "content": "", + "file": "/files/W4A020122.jpg", + "display_order": "6" + } + ] + }, + { + "procedure_name": "Removal", + "steps": [ + { + "step_name": "Step-1", + "content_type": "File", + "content": "", + "file": "/files/W4A150076.jpg", + "display_order": "7" + }, + { + "step_name": "Step-1", + "content_type": "Warning", + "content": "
  • Ensure that the fuel is drained from filter assembly before the fuel filter element is removed.
  • Do not hold fuel filter body part and avoid damage to the fuel filter body.
", + "file": "", + "display_order": "8" + }, + { + "step_name": "Step-1", + "content_type": "Description", + "content": "
  • Press the lock and disconnect the electrical connector from the fuel filter.
", + "file": "", + "display_order": "9" + }, + { + "step_name": "Step-2", + "content_type": "File", + "content": "", + "file": "/files/W4A200104.jpg", + "display_order": "10" + }, + { + "step_name": "Step-2", + "content_type": "Description", + "content": "
  • Disconnect the fuel supply pipe by disconnecting the quick coupler.
", + "file": "", + "display_order": "11" + }, + { + "step_name": "Step-2", + "content_type": "Notice", + "content": "
  • All are quick fix connectors, press gently and remove it carefully; avoid seal damages.
", + "file": "", + "display_order": "12" + }, + { + "step_name": "Step-3", + "content_type": "File", + "content": "", + "file": "/files/W4A130055.jpg", + "display_order": "13" + }, + { + "step_name": "Step-3", + "content_type": "Description", + "content": "
  • Disconnect the fuel return pipe by disconnecting the quick coupler.
", + "file": "", + "display_order": "14" + }, + { + "step_name": "Step-3", + "content_type": "Notice", + "content": "
  • All are quick fix connectors, press gently and remove it carefully; avoid seal damages.
", + "file": "", + "display_order": "15" + }, + { + "step_name": "Step-4", + "content_type": "File", + "content": "", + "file": "/files/W4A130123.jpg", + "display_order": "16" + }, + { + "step_name": "Step-4", + "content_type": "Description", + "content": "
  • Using a 12 mm socket spanner, loosen and remove the fuel filter assembly mounting bolts.
", + "file": "", + "display_order": "17" + }, + { + "step_name": "Step-5", + "content_type": "File", + "content": ",", + "file": "/files/W4A100097.jpg,/files/W4A150229.jpg", + "display_order": "18,19" + }, + { + "step_name": "Step-5", + "content_type": "Description", + "content": "
  • Remove the filter from the vehicle.
", + "file": "", + "display_order": "20" + }, + { + "step_name": "Step-6", + "content_type": "File", + "content": "", + "file": "/files/W4A140041.jpg", + "display_order": "21" + }, + { + "step_name": "Step-6", + "content_type": "Description", + "content": "
  • Use two approx. 2\u0096 3 inches long size \u00a0M12 bolts and nuts to hold fuel filter \u00a0assembly in a bench vice as shown in illustration.
", + "file": "", + "display_order": "22" + }, + { + "step_name": "Step-7", + "content_type": "File", + "content": "", + "file": "/files/W4A050117.jpg", + "display_order": "23" + }, + { + "step_name": "Step-7", + "content_type": "Description", + "content": "
  • Using a 36 mm ring/socket spanner, rotate the fuel filter bottom cover in anticlockwise direction and loosen.
", + "file": "", + "display_order": "24" + }, + { + "step_name": "Step-8", + "content_type": "File", + "content": "", + "file": "/files/W4A120130.jpg", + "display_order": "25" + }, + { + "step_name": "Step-8", + "content_type": "Description", + "content": "
  • Remove the fuel filter body.
", + "file": "", + "display_order": "26" + }, + { + "step_name": "Step-9", + "content_type": "File", + "content": "", + "file": "/files/W4A150065.jpg", + "display_order": "27" + }, + { + "step_name": "Step-9", + "content_type": "Description", + "content": "
  • Take out the filter element from the fuel filter housing.
", + "file": "", + "display_order": "28" + }, + { + "step_name": "Step-10", + "content_type": "File", + "content": "", + "file": "/files/W4A120204.jpg", + "display_order": "29" + }, + { + "step_name": "Step-10", + "content_type": "Description", + "content": "
  • Remove the O-ring from the fuel filter housing.
", + "file": "", + "display_order": "30" + } + ] + }, + { + "procedure_name": "Installation", + "steps": [ + { + "step_name": "Step-1", + "content_type": "File", + "content": "", + "file": "/files/W4A120302.jpg", + "display_order": "31" + }, + { + "step_name": "Step-1", + "content_type": "Description", + "content": "
  • Assemble the new O-ring back on to filter housing, which is supplied along with new filter element. Ensure little oil is smeared on to the surface of O-ring before assembly on to head.
", + "file": "", + "display_order": "32" + }, + { + "step_name": "Step-2", + "content_type": "File", + "content": "", + "file": "/files/W4A040162.jpg", + "display_order": "33" + }, + { + "step_name": "Step-2", + "content_type": "Description", + "content": "
  • Insert the filter element correctly into housing as shown in illustration.
", + "file": "", + "display_order": "34" + }, + { + "step_name": "Step-2", + "content_type": "Caution", + "content": "
  • Press the filter element by gentle push into the head.
", + "file": "", + "display_order": "35" + }, + { + "step_name": "Step-3", + "content_type": "File", + "content": "", + "file": "/files/W4A120103.jpg", + "display_order": "36" + }, + { + "step_name": "Step-3", + "content_type": "Description", + "content": "
  • Refit the fuel filter element into the fuel filter housing.
", + "file": "", + "display_order": "37" + }, + { + "step_name": "Step-3", + "content_type": "Caution", + "content": "
  • Assemble filter element on to head in the direction shown. Ensure open end of filter element goes inside first.
", + "file": "", + "display_order": "38" + }, + { + "step_name": "Step-4", + "content_type": "File", + "content": "", + "file": "/files/W4A130205.jpg", + "display_order": "39" + }, + { + "step_name": "Step-4", + "content_type": "Description", + "content": "
  • Tighten the filter body using 36 mm size \u00a0socket spanner to specified torque value.
", + "file": "", + "display_order": "40" + }, + { + "step_name": "Step-4", + "content_type": "Caution", + "content": "
  • Do not over tighten beyond 25\u00b15 Nm. This may cause damage to the bowl and Head.
  • Is it recommended to tight the fuel filter using torque wrench.
", + "file": "", + "display_order": "41" + }, + { + "step_name": "Step-5", + "content_type": "File", + "content": "", + "file": "/files/W4A140217.jpg", + "display_order": "42" + }, + { + "step_name": "Step-5", + "content_type": "Description", + "content": "
  • Remove the filter assembly from the wise.
", + "file": "", + "display_order": "43" + }, + { + "step_name": "Step-6", + "content_type": "File", + "content": "", + "file": "/files/W4A150159.jpg", + "display_order": "44" + }, + { + "step_name": "Step-6", + "content_type": "Description", + "content": "
  • Refit the fuel filter assembly and install the mounting bolts.
", + "file": "", + "display_order": "45" + }, + { + "step_name": "Step-6", + "content_type": "Torque Value", + "content": "Torque : 25 \u00b1 5 Nm", + "file": "", + "display_order": "46" + }, + { + "step_name": "Step-7", + "content_type": "File", + "content": "", + "file": "/files/W4A170025_0000346813.jpg", + "display_order": "47" + }, + { + "step_name": "Step-7", + "content_type": "Description", + "content": "
  • Reconnect the fuel filter fuel return line quick coupler.
", + "file": "", + "display_order": "48" + }, + { + "step_name": "Step-7", + "content_type": "Notice", + "content": "
  • All are quick fix connectors, press gently and refit it carefully; avoid seal damages.
  • Check and ensure proper fitment of \u00a0fuel lines, any leakage can lead to fire.
", + "file": "", + "display_order": "49" + }, + { + "step_name": "Step-8", + "content_type": "File", + "content": "", + "file": "/files/W4A150260.jpg", + "display_order": "50" + }, + { + "step_name": "Step-8", + "content_type": "Description", + "content": "
  • Reconnect the fuel filter fuel supply pipe quick coupler.
", + "file": "", + "display_order": "51" + }, + { + "step_name": "Step-8", + "content_type": "Notice", + "content": "
  • All are quick fix connectors, press gently and refit it carefully; avoid seal damages.
  • Check and ensure proper fitment of fuel lines, any leakage can lead to fire.
", + "file": "", + "display_order": "52" + }, + { + "step_name": "Step-9", + "content_type": "File", + "content": "", + "file": "", + "display_order": "53" + }, + { + "step_name": "Step-9", + "content_type": "Description", + "content": "
  • Reconnect the fuel filter electrical connector.
", + "file": "", + "display_order": "54" + }, + { + "step_name": "Step-9", + "content_type": "Caution", + "content": "
  • Always use recommended filter element only.
  • Before removing the fuel filter, open the fuel tank cap to release the pressure from the tank and fuel lines.
  • Fuel filter cartridge needs to be replaced earlier in case of repeat water in fuel warning in cluster even after the water is drained from the system.
", + "file": "", + "display_order": "55" + } + ] + } + ] + }, + { + "subSystemdisplayorder": 5, + "systems": "Fuel System", + "sub_systems": "Water In Fuel Filter - Clean", + "symptom": 0, + "component": 0, + "estimated_time": null, + "rts": null, + "mat": null, + "cover_image": null, + "active_status": true, + "Config Kilometer": [], + "procedure_status": "Publish Ready", + "procedure_link": "Thar.AX-0432-Water In Fuel Filter - Clean-en", + "Procedure_details": [ + { + "procedure_name": "Overview", + "steps": [ + { + "step_name": "Overview", + "content_type": "File", + "content": ",", + "file": "/files/W4A130307.jpg,/files/W4A170267.jpg", + "display_order": "1,2" + }, + { + "step_name": "Preliminary Activities", + "content_type": "Description", + "content": "
  1. Park the vehicle on level work bay.
  2. Open the bonnet and lock it in open position using bonnet stay rod.
", + "file": "", + "display_order": "3" + }, + { + "step_name": "Tools Required", + "content_type": "File", + "content": "", + "file": "/files/W4A090056.jpg", + "display_order": "4" + } + ] + }, + { + "procedure_name": "Sediment Draining", + "steps": [ + { + "step_name": "Step-1", + "content_type": "File", + "content": "", + "file": "/files/W4A120024.jpg", + "display_order": "5" + }, + { + "step_name": "Step-1", + "content_type": "Description", + "content": "
  • Connect the transparent pipe to the drain \u00a0plug outlet of the fuel filter assembly
", + "file": "", + "display_order": "6" + }, + { + "step_name": "Step-2", + "content_type": "File", + "content": "", + "file": "/files/W4A100016.jpg", + "display_order": "7" + }, + { + "step_name": "Step-2", + "content_type": "Description", + "content": "
  • Using a Nose plier, rotate drain plug anticlockwise till the water starts flowing from the tube.
", + "file": "", + "display_order": "8" + }, + { + "step_name": "Step-2", + "content_type": "Caution", + "content": "
  • Drain plug requires hand tight only; do not use any tool and avoid over tightening.
  • Do not over tight the drain plug
", + "file": "", + "display_order": "9" + }, + { + "step_name": "Step-3", + "content_type": "File", + "content": "", + "file": "/files/W4A100061.jpg", + "display_order": "10" + }, + { + "step_name": "Step-3", + "content_type": "Description", + "content": "
  • Rotate drain plug in clockwise directio \u00a0to stop the flow as soon as water gets over and fuel flow starts. Tighten the drain plug.
", + "file": "", + "display_order": "11" + }, + { + "step_name": "Step-4", + "content_type": "Description", + "content": "
  • Start the engine and check for any leaks.
", + "file": "", + "display_order": "12" + } + ] + } + ] + } + ] + } + ] + } + }, + { + "StepCount": 106 + } +] \ No newline at end of file diff --git a/smart_service/json_files/procedurePublish.json b/smart_service/json_files/procedurePublish.json index 854cf67..29f7440 100644 --- a/smart_service/json_files/procedurePublish.json +++ b/smart_service/json_files/procedurePublish.json @@ -1 +1,870 @@ -[{"Variant": {"name": "Thar.AX-0311", "variant": "Thar.AX", "vehicle": "Thar", "family_code": "J08", "vehicle_segment": "Personal", "active_status": "Active", "fuel": "DSL", "transmission": "MT", "drive": "4WD", "Assets": [{"category": "TSB", "file": "/files/Mahindra.jpg", "active_status": "Active"}, {"category": "Tekalert", "file": "/files/Air-Filter-Element-Clean_ico.jpg", "active_status": "Active"}, {"category": "FSA", "file": "/files/Air-Filter-Element-Clean_ico.jpg", "active_status": "Active"}], "Service Kilometres": [{"service_kilometers": "1000", "idx": 1}, {"service_kilometers": "10000", "idx": 2}, {"service_kilometers": "100000", "idx": 11}, {"service_kilometers": "20000", "idx": 3}, {"service_kilometers": "30000", "idx": 4}, {"service_kilometers": "40000", "idx": 5}, {"service_kilometers": "50000", "idx": 6}, {"service_kilometers": "60000", "idx": 7}, {"service_kilometers": "70000", "idx": 8}, {"service_kilometers": "80000", "idx": 9}, {"service_kilometers": "90000", "idx": 10}], "Systems": [{"systemdisplayorder": 1, "system_name": "Air Intake", "active_status": "Active", "icon_file": null, "myid": "1000", "Assets": [], "Subsystems": [{"subSystemdisplayorder": 2, "systems": "Air Intake", "sub_systems": "Air Filter Element Replace", "symptom": 0, "component": 0, "estimated_time": null, "rts": null, "mat": "Show", "cover_image": "", "active_status": "Active", "Config Kilometer": [{"kilometer_name": "90000", "kilometer_IDX": 29, "kilometers_applicable": 1}, {"kilometer_name": "30000", "kilometer_IDX": 11, "kilometers_applicable": 1}, {"kilometer_name": "20000", "kilometer_IDX": 8, "kilometers_applicable": 1}, {"kilometer_name": "80000", "kilometer_IDX": 26, "kilometers_applicable": 1}, {"kilometer_name": "50000", "kilometer_IDX": 17, "kilometers_applicable": 1}, {"kilometer_name": "100000", "kilometer_IDX": 32, "kilometers_applicable": 1}, {"kilometer_name": "10000", "kilometer_IDX": 5, "kilometers_applicable": 1}, {"kilometer_name": "40000", "kilometer_IDX": 14, "kilometers_applicable": 1}, {"kilometer_name": "1000", "kilometer_IDX": 2, "kilometers_applicable": 1}, {"kilometer_name": "60000", "kilometer_IDX": 20, "kilometers_applicable": 1}, {"kilometer_name": "70000", "kilometer_IDX": 23, "kilometers_applicable": 1}], "procedure_status": "Publish Ready", "procedure_link": "Thar.AX-0311-Air Filter Element Replace-en", "ProcedureDetails": {"Overview": [{"procedure_name": "Overview", "step_name": "Overview", "content_type": "File", "content": "", "file": "", "display_order": 1}, {"procedure_name": "Overview", "step_name": "Overview", "content_type": "File", "content": "", "file": "", "display_order": 2}, {"procedure_name": "Overview", "step_name": "Overview", "content_type": "File", "content": "", "file": "", "display_order": 3}, {"procedure_name": "Overview", "step_name": "Overview", "content_type": "Description", "content": "
  • The air cleaner element is Non woven +Pleated Media type (Dry Type). Filtration happens in two stages. Coarser particles are filtered in first stage by foam media and fine particles are filtered by Paper media in second stage. The dust and other fine particles which are sucked inside along with air gets trapped in the air cleaner while passing through the filter element.
", "file": "", "display_order": 4}, {"procedure_name": "Overview", "step_name": "Overview", "content_type": "Notice", "content": "
  • Don\u2019t tap or hit the filter element.
", "file": "", "display_order": 5}, {"procedure_name": "Overview", "step_name": "Preliminary Activities", "content_type": "Description", "content": "
  1. Park the vehicle on flat work bay.
  2. Open the bonnet and lock it in open position using bonnet stay rod.
", "file": "", "display_order": 6}, {"procedure_name": "Overview", "step_name": "Tools Required", "content_type": "File", "content": "", "file": "", "display_order": 7}], "Removal": [{"procedure_name": "Removal", "step_name": "Step-1", "content_type": "File", "content": "", "file": "", "display_order": 8}, {"procedure_name": "Removal", "step_name": "Step-1", "content_type": "File", "content": "", "file": "", "display_order": 9}, {"procedure_name": "Removal", "step_name": "Step-1", "content_type": "Caution", "content": "
  • The air filter element should be inspected and replaced from time to time, when driving under the following conditions:
    • Unpaved road.
    • Dusty air-polluted road.
    • Long-term driving in rainy weather.
", "file": "", "display_order": 10}, {"procedure_name": "Removal", "step_name": "Step-1", "content_type": "Description", "content": "
  • Using 5 mm allen key, Unscrew air cleaner dirty duct mounting screws and lift the top housing.
", "file": "", "display_order": 11}, {"procedure_name": "Removal", "step_name": "Step-2", "content_type": "File", "content": "", "file": "", "display_order": 12}, {"procedure_name": "Removal", "step_name": "Step-2", "content_type": "File", "content": "", "file": "", "display_order": 13}, {"procedure_name": "Removal", "step_name": "Step-2", "content_type": "Description", "content": "
  • Gently take out the air cleaner element from the housing.
", "file": "", "display_order": 14}], "Installation": [{"procedure_name": "Installation", "step_name": "Step-1", "content_type": "File", "content": "", "file": "", "display_order": 15}, {"procedure_name": "Installation", "step_name": "Step-1", "content_type": "Description", "content": "
  • Clean the inner side of the air cleaner housing using a lint free cloth.
", "file": "", "display_order": 16}, {"procedure_name": "Installation", "step_name": "Step-2", "content_type": "File", "content": "", "file": "", "display_order": 17}, {"procedure_name": "Installation", "step_name": "Step-2", "content_type": "Description", "content": "
  • Refit the New air filter element gently inside the air cleaner housing.
", "file": "", "display_order": 18}, {"procedure_name": "Installation", "step_name": "Step-2", "content_type": "Caution", "content": "
  • During Installation ensure to keep foam side of the filter element in the bottom side.
  • Ensure dust should not fall inside the clean hose area while fitting.
", "file": "", "display_order": 19}, {"procedure_name": "Installation", "step_name": "Step-2", "content_type": "Caution", "content": "
  • Always use recommended genuine air filter element.
  • Do not tap or hit the filter element.
", "file": "", "display_order": 20}, {"procedure_name": "Installation", "step_name": "Step-3", "content_type": "File", "content": "", "file": "", "display_order": 21}, {"procedure_name": "Installation", "step_name": "Step-3", "content_type": "Description", "content": "
  • Position the air cleaner assembly top cover and refit the mounting screws.
", "file": "", "display_order": 22}]}}]}, {"systemdisplayorder": 6, "system_name": "Fuel System", "active_status": "Active", "icon_file": null, "myid": "1002", "Assets": [], "Subsystems": [{"subSystemdisplayorder": 7, "systems": "Fuel System", "sub_systems": "Water In Fuel Filter - Clean", "symptom": 0, "component": 0, "estimated_time": null, "rts": null, "mat": "Show", "cover_image": null, "active_status": "Active", "Config Kilometer": [{"kilometer_name": "60000", "kilometer_IDX": 14, "kilometers_applicable": 1}, {"kilometer_name": "30000", "kilometer_IDX": 12, "kilometers_applicable": 1}, {"kilometer_name": "90000", "kilometer_IDX": 20, "kilometers_applicable": 1}, {"kilometer_name": "100000", "kilometer_IDX": 33, "kilometers_applicable": 1}, {"kilometer_name": "10000", "kilometer_IDX": 4, "kilometers_applicable": 1}, {"kilometer_name": "10000", "kilometer_IDX": 6, "kilometers_applicable": 1}, {"kilometer_name": "1000", "kilometer_IDX": 2, "kilometers_applicable": 1}, {"kilometer_name": "20000", "kilometer_IDX": 6, "kilometers_applicable": 1}, {"kilometer_name": "40000", "kilometer_IDX": 15, "kilometers_applicable": 1}, {"kilometer_name": "70000", "kilometer_IDX": 16, "kilometers_applicable": 1}, {"kilometer_name": "90000", "kilometer_IDX": 30, "kilometers_applicable": 1}, {"kilometer_name": "30000", "kilometer_IDX": 8, "kilometers_applicable": 1}, {"kilometer_name": "60000", "kilometer_IDX": 21, "kilometers_applicable": 1}, {"kilometer_name": "1000", "kilometer_IDX": 3, "kilometers_applicable": 1}, {"kilometer_name": "50000", "kilometer_IDX": 12, "kilometers_applicable": 1}, {"kilometer_name": "80000", "kilometer_IDX": 27, "kilometers_applicable": 1}, {"kilometer_name": "70000", "kilometer_IDX": 24, "kilometers_applicable": 1}, {"kilometer_name": "80000", "kilometer_IDX": 18, "kilometers_applicable": 1}, {"kilometer_name": "50000", "kilometer_IDX": 18, "kilometers_applicable": 1}, {"kilometer_name": "40000", "kilometer_IDX": 10, "kilometers_applicable": 1}, {"kilometer_name": "100000", "kilometer_IDX": 22, "kilometers_applicable": 1}, {"kilometer_name": "20000", "kilometer_IDX": 9, "kilometers_applicable": 1}], "procedure_status": "Publish Ready", "procedure_link": "Thar.AX-0311-Water In Fuel Filter - Clean-en", "ProcedureDetails": {"Overview": [{"procedure_name": "Overview", "step_name": "Overview", "content_type": "File", "content": "", "file": "", "display_order": 1}, {"procedure_name": "Overview", "step_name": "Overview", "content_type": "File", "content": "", "file": "", "display_order": 2}, {"procedure_name": "Overview", "step_name": "Preliminary Activities", "content_type": "Description", "content": "
  1. Park the vehicle on level work bay.
  2. Open the bonnet and lock it in open position using bonnet stay rod.
", "file": "", "display_order": 3}, {"procedure_name": "Overview", "step_name": "Tools Required", "content_type": "File", "content": "", "file": "", "display_order": 4}], "Sediment Draining": [{"procedure_name": "Sediment Draining", "step_name": "Step-1", "content_type": "File", "content": "", "file": "", "display_order": 5}, {"procedure_name": "Sediment Draining", "step_name": "Step-1", "content_type": "Description", "content": "
Connect the transparent pipe to the drain \u00a0plug outlet of the fuel filter assembly
", "file": "", "display_order": 6}, {"procedure_name": "Sediment Draining", "step_name": "Step-2", "content_type": "File", "content": "", "file": "", "display_order": 7}, {"procedure_name": "Sediment Draining", "step_name": "Step-2", "content_type": "Description", "content": "
  • Using a Nose plier, rotate drain plug anticlockwise till the water starts flowing from the tube.
", "file": "", "display_order": 8}, {"procedure_name": "Sediment Draining", "step_name": "Step-2", "content_type": "Caution", "content": "
  • Drain plug requires hand tight only; do not use any tool and avoid over tightening.
  • Do not over tight the drain plug
", "file": "", "display_order": 9}, {"procedure_name": "Sediment Draining", "step_name": "Step-3", "content_type": "File", "content": "", "file": "", "display_order": 10}, {"procedure_name": "Sediment Draining", "step_name": "Step-3", "content_type": "Description", "content": "
  • Rotate drain plug in clockwise directio \u00a0to stop the flow as soon as water gets over and fuel flow starts. Tighten the drain plug.
", "file": "", "display_order": 11}, {"procedure_name": "Sediment Draining", "step_name": "Step-4", "content_type": "Description", "content": "
  • Start the engine and check for any leaks.
", "file": "", "display_order": 12}]}}]}]}}, {"Variant": {"name": "Thar.AX-0328", "variant": "Thar.AX", "vehicle": "Thar", "family_code": "J09", "vehicle_segment": "Personal", "active_status": "Active", "fuel": "DSL", "transmission": "AT", "drive": "4WD", "Assets": [], "Service Kilometres": [{"service_kilometers": "1000", "idx": 1}, {"service_kilometers": "10000", "idx": 2}, {"service_kilometers": "100000", "idx": 11}, {"service_kilometers": "20000", "idx": 3}, {"service_kilometers": "30000", "idx": 4}, {"service_kilometers": "40000", "idx": 5}, {"service_kilometers": "50000", "idx": 6}, {"service_kilometers": "60000", "idx": 7}, {"service_kilometers": "70000", "idx": 8}, {"service_kilometers": "80000", "idx": 9}, {"service_kilometers": "90000", "idx": 10}], "Systems": [{"systemdisplayorder": 1, "system_name": "Brakes", "active_status": "Active", "icon_file": null, "myid": "1016", "Assets": [{"systemdisplayorder": 1, "system_asset": "/files/Mahindra.jpg"}], "Subsystems": [{"subSystemdisplayorder": 2, "systems": "Brakes", "sub_systems": "Inter cooler", "symptom": 0, "component": 0, "estimated_time": null, "rts": null, "mat": "mat", "cover_image": null, "active_status": "Active", "Config Kilometer": [{"kilometer_name": "40000", "kilometer_IDX": 9, "kilometers_applicable": 1}, {"kilometer_name": "100000", "kilometer_IDX": 21, "kilometers_applicable": 1}, {"kilometer_name": "50000", "kilometer_IDX": 11, "kilometers_applicable": 1}, {"kilometer_name": "90000", "kilometer_IDX": 19, "kilometers_applicable": 1}, {"kilometer_name": "10000", "kilometer_IDX": 3, "kilometers_applicable": 1}, {"kilometer_name": "20000", "kilometer_IDX": 5, "kilometers_applicable": 1}, {"kilometer_name": "70000", "kilometer_IDX": 15, "kilometers_applicable": 1}, {"kilometer_name": "80000", "kilometer_IDX": 17, "kilometers_applicable": 1}, {"kilometer_name": "1000", "kilometer_IDX": 1, "kilometers_applicable": 1}, {"kilometer_name": "30000", "kilometer_IDX": 7, "kilometers_applicable": 1}, {"kilometer_name": "60000", "kilometer_IDX": 13, "kilometers_applicable": 1}], "procedure_status": "Publish Ready", "procedure_link": "Thar.AX-0328-Inter cooler-en", "ProcedureDetails": {"Overview": [{"procedure_name": "Overview", "step_name": "Overview", "content_type": "File", "content": "", "file": "", "display_order": 1}, {"procedure_name": "Overview", "step_name": "Overview", "content_type": "File", "content": "", "file": "", "display_order": 2}, {"procedure_name": "Overview", "step_name": "Overview", "content_type": "Description", "content": "The intercooler typically an air-to-air heat exchanger. Intercooler cools the air compressed by the turbocharger by reducing its temperature and increasing the density of the air supplied to the engine and thus improving the volumetric efficiency by increasing intake air charge density through nearly isobaric (constant pressure) cooling. The cooled air density improves, helping in increasing the power output and improving the fuel consumption.", "file": "", "display_order": 3}], "Removal and Installation": [{"procedure_name": "Removal and Installation", "step_name": "Step-1", "content_type": "Description", "content": "Using 10 mm socket spanner, Loosen battery negative terminal mounting nut and disconnect the terminal.", "file": "", "display_order": 4}, {"procedure_name": "Removal and Installation", "step_name": "Step-1", "content_type": "File", "content": "", "file": "", "display_order": 5}, {"procedure_name": "Removal and Installation", "step_name": "Step-1", "content_type": "Caution", "content": "Should not remove the battery connection when the EWP is ON, Ensure to disconnect only when the EWP is off, Failing to do may affect the dozing module performance.Before disconnecting the battery, check for the audible sound of EWP \u00a0ON.", "file": "", "display_order": 6}, {"procedure_name": "Removal and Installation", "step_name": "Step-1", "content_type": "Torque Value", "content": "Torque : 6.0\u00b10.6 Nm", "file": "", "display_order": 7}, {"procedure_name": "Removal and Installation", "step_name": "Step-2", "content_type": "Description", "content": "Using 7 mm socket spanner, Loosen the intercooler inlet hose clip and disconnect the hose intercooler end.", "file": "", "display_order": 8}, {"procedure_name": "Removal and Installation", "step_name": "Step-2", "content_type": "File", "content": "", "file": "", "display_order": 9}, {"procedure_name": "Removal and Installation", "step_name": "Step-2", "content_type": "Torque Value", "content": "Torque : 6.5\u00b10.6 Nm", "file": "", "display_order": 10}, {"procedure_name": "Removal and Installation", "step_name": "Step-3", "content_type": "File", "content": "", "file": "", "display_order": 11}, {"procedure_name": "Removal and Installation", "step_name": "Step-3", "content_type": "Description", "content": "Using 7 mm socket spanner, Loosen the intercooler outlet hose clip and disconnect the hose intercooler end.", "file": "", "display_order": 12}, {"procedure_name": "Removal and Installation", "step_name": "Step-3", "content_type": "Torque Value", "content": "Torque : 6.5\u00b10.6 Nm", "file": "", "display_order": 13}, {"procedure_name": "Removal and Installation", "step_name": "Step-4", "content_type": "File", "content": "", "file": "", "display_order": 14}, {"procedure_name": "Removal and Installation", "step_name": "Step-4", "content_type": "Description", "content": "Using 10 mm socket spanner, remove boost pressure sensor mounting bolt and detach it.", "file": "", "display_order": 15}, {"procedure_name": "Removal and Installation", "step_name": "Step-4", "content_type": "Torque Value", "content": "Torque : 2.5 \u00b1 0.5 Nm", "file": "", "display_order": 16}, {"procedure_name": "Removal and Installation", "step_name": "Step-5", "content_type": "File", "content": "", "file": "", "display_order": 17}, {"procedure_name": "Removal and Installation", "step_name": "Step-5", "content_type": "Description", "content": "Disconnect the boost pressure sensor electrical connector.", "file": "", "display_order": 18}, {"procedure_name": "Removal and Installation", "step_name": "Step-6", "content_type": "File", "content": "", "file": "", "display_order": 19}, {"procedure_name": "Removal and Installation", "step_name": "Step-6", "content_type": "Description", "content": "Using 10 mm socket spanner, Unscrew degassing tank mounting bolts and partially detach it.", "file": "", "display_order": 20}, {"procedure_name": "Removal and Installation", "step_name": "Step-6", "content_type": "Torque Value", "content": "Torque : 4.5\u00b10.5 Nm", "file": "", "display_order": 21}, {"procedure_name": "Removal and Installation", "step_name": "Step-7", "content_type": "File", "content": "", "file": "", "display_order": 22}, {"procedure_name": "Removal and Installation", "step_name": "Step-7", "content_type": "Description", "content": "Using 13 mm Socket Spanner, Unscrew the Intercooler mounting bolts.", "file": "", "display_order": 23}, {"procedure_name": "Removal and Installation", "step_name": "Step-7", "content_type": "Torque Value", "content": "Torque : 12.5 \u00b1 1.5 Nm", "file": "", "display_order": 24}, {"procedure_name": "Removal and Installation", "step_name": "Step-8", "content_type": "File", "content": "", "file": "", "display_order": 25}, {"procedure_name": "Removal and Installation", "step_name": "Step-8", "content_type": "File", "content": "", "file": "", "display_order": 26}, {"procedure_name": "Removal and Installation", "step_name": "Step-8", "content_type": "Description", "content": "Carefully remove the intercooler from vehicle.", "file": "", "display_order": 27}, {"procedure_name": "Removal and Installation", "step_name": "Step-9", "content_type": "Description", "content": "Install in the reverse order of removal.", "file": "", "display_order": 28}], "Inspection": [{"procedure_name": "Inspection", "step_name": "Step-1", "content_type": "Description", "content": "Check for the external damage. If found replace it.Check for any oil seepage ,if found please inspect the turbocharger for any oil leakage.Inspect intercooler hoses for any damage. Replace if found any.Inspect intercooler rubber Isolators for any damage. Replace if found any.", "file": "", "display_order": 29}], "Summary": [{"procedure_name": "Summary", "step_name": "Step-1", "content_type": "File", "content": "", "file": "", "display_order": 30}, {"procedure_name": "Summary", "step_name": "Tools Required", "content_type": "File", "content": "", "file": "", "display_order": 31}]}}, {"subSystemdisplayorder": 1, "systems": "Brakes", "sub_systems": "Water In Fuel Filter - Clean", "symptom": 0, "component": 0, "estimated_time": null, "rts": null, "mat": "mat", "cover_image": null, "active_status": "Active", "Config Kilometer": [{"kilometer_name": "60000", "kilometer_IDX": 14, "kilometers_applicable": 1}, {"kilometer_name": "30000", "kilometer_IDX": 12, "kilometers_applicable": 1}, {"kilometer_name": "90000", "kilometer_IDX": 20, "kilometers_applicable": 1}, {"kilometer_name": "100000", "kilometer_IDX": 33, "kilometers_applicable": 1}, {"kilometer_name": "10000", "kilometer_IDX": 4, "kilometers_applicable": 1}, {"kilometer_name": "10000", "kilometer_IDX": 6, "kilometers_applicable": 1}, {"kilometer_name": "1000", "kilometer_IDX": 2, "kilometers_applicable": 1}, {"kilometer_name": "20000", "kilometer_IDX": 6, "kilometers_applicable": 1}, {"kilometer_name": "40000", "kilometer_IDX": 15, "kilometers_applicable": 1}, {"kilometer_name": "70000", "kilometer_IDX": 16, "kilometers_applicable": 1}, {"kilometer_name": "90000", "kilometer_IDX": 30, "kilometers_applicable": 1}, {"kilometer_name": "30000", "kilometer_IDX": 8, "kilometers_applicable": 1}, {"kilometer_name": "60000", "kilometer_IDX": 21, "kilometers_applicable": 1}, {"kilometer_name": "1000", "kilometer_IDX": 3, "kilometers_applicable": 1}, {"kilometer_name": "50000", "kilometer_IDX": 12, "kilometers_applicable": 1}, {"kilometer_name": "80000", "kilometer_IDX": 27, "kilometers_applicable": 1}, {"kilometer_name": "70000", "kilometer_IDX": 24, "kilometers_applicable": 1}, {"kilometer_name": "80000", "kilometer_IDX": 18, "kilometers_applicable": 1}, {"kilometer_name": "50000", "kilometer_IDX": 18, "kilometers_applicable": 1}, {"kilometer_name": "40000", "kilometer_IDX": 10, "kilometers_applicable": 1}, {"kilometer_name": "100000", "kilometer_IDX": 22, "kilometers_applicable": 1}, {"kilometer_name": "20000", "kilometer_IDX": 9, "kilometers_applicable": 1}], "procedure_status": "Publish Ready", "procedure_link": "Thar.AX-0328-Water In Fuel Filter - Clean-en", "ProcedureDetails": {"Overview": [{"procedure_name": "Overview", "step_name": "Overview", "content_type": "File", "content": "", "file": null, "display_order": 1}, {"procedure_name": "Overview", "step_name": "Overview", "content_type": "File", "content": "", "file": null, "display_order": 2}, {"procedure_name": "Overview", "step_name": "Preliminary Activities", "content_type": "Description", "content": "
  1. Park the vehicle on level work bay.
  2. Open the bonnet and lock it in open position using bonnet stay rod.
", "file": null, "display_order": 3}, {"procedure_name": "Overview", "step_name": "Tools Required", "content_type": "File", "content": "", "file": null, "display_order": 4}], "Sediment Draining": [{"procedure_name": "Sediment Draining", "step_name": "Step-1", "content_type": "File", "content": "", "file": null, "display_order": 5}, {"procedure_name": "Sediment Draining", "step_name": "Step-1", "content_type": "Description", "content": "
Connect the transparent pipe to the drain \u00a0plug outlet of the fuel filter assembly
", "file": null, "display_order": 6}, {"procedure_name": "Sediment Draining", "step_name": "Step-2", "content_type": "File", "content": "", "file": null, "display_order": 7}, {"procedure_name": "Sediment Draining", "step_name": "Step-2", "content_type": "Description", "content": "
  • Using a Nose plier, rotate drain plug anticlockwise till the water starts flowing from the tube.
", "file": null, "display_order": 8}, {"procedure_name": "Sediment Draining", "step_name": "Step-2", "content_type": "Caution", "content": "
  • Drain plug requires hand tight only; do not use any tool and avoid over tightening.
  • Do not over tight the drain plug
", "file": null, "display_order": 9}, {"procedure_name": "Sediment Draining", "step_name": "Step-3", "content_type": "File", "content": "", "file": null, "display_order": 10}, {"procedure_name": "Sediment Draining", "step_name": "Step-3", "content_type": "Description", "content": "
  • Rotate drain plug in clockwise directio \u00a0to stop the flow as soon as water gets over and fuel flow starts. Tighten the drain plug.
", "file": null, "display_order": 11}, {"procedure_name": "Sediment Draining", "step_name": "Step-4", "content_type": "Description", "content": "
  • Start the engine and check for any leaks.
", "file": null, "display_order": 12}]}}]}]}}, {"StepCount": 77}] \ No newline at end of file +[ + { + "Variant": { + "name": "Thar.AX-0432", + "variant": "Thar.AX", + "vehicle": "Thar", + "family_code": "J08", + "vehicle_segment": "Personal", + "fuel": "DSL", + "transmission": "MT", + "drive": "4WD", + "active_status": true, + "Assets": [], + "Systems": [ + { + "systemdisplayorder": 2, + "system_name": "Fuel System", + "icon_file": null, + "myid": 1002, + "active_status": true, + "Assets": [ + { + "systemdisplayorder": 3, + "system_asset": "/private/files/ECU IP & OP (D)_v2.mp4" + } + ], + "Subsystems": [ + { + "subSystemdisplayorder": 6, + "systems": "Fuel System", + "sub_systems": "Fuel Filter Element - Replace", + "symptom": 0, + "component": 0, + "estimated_time": null, + "rts": null, + "mat": null, + "cover_image": null, + "active_status": true, + "Config Kilometer": [], + "procedure_status": "Publish Ready", + "procedure_link": "Thar.AX-0432-Fuel Filter Element - Replace-en", + "Procedure_details": [ + { + "procedure_name": "Overview", + "steps": [ + { + "step_name": "Overview", + "content_type": "File", + "content": ",,", + "file": "/files/W4A120027.jpg,/files/W4A150068.jpg,/files/W4A190115.jpg", + "display_order": "1,2,3" + }, + { + "step_name": "Overview", + "content_type": "Description", + "content": "
  • The fuel filter filters impurities that may be present in the fuel. The fuel system operates under high pressure which makes it absolutely essential for the fuel to be dust free and moisture free. The fuel filter also has the water separator which filters the moisture that may have crept into the fuel. The high pressure pump in the fuel system operates at high speeds and fine clearance which needs the diesel to be dust free and also be free of moisture at the same time. Since the diesel itself lubricates the PF Pump, If water content is present in fuel, the fuel looses its lubrication property and thus PF Pump and injectors will get damaged. Also the moisture content may lead to formation of rust on the pump elements. This makes it advisable not to use diesel with additives which may cause damage to the PF Pump.
", + "file": "", + "display_order": "4" + }, + { + "step_name": "Preliminary Activities", + "content_type": "Description", + "content": "
  1. Park the vehicle on level work bay
  2. Open the bonnet and lock it in open position using bonnet stay rod.
", + "file": "", + "display_order": "5" + }, + { + "step_name": "Tools Required", + "content_type": "File", + "content": "", + "file": "/files/W4A020122.jpg", + "display_order": "6" + } + ] + }, + { + "procedure_name": "Removal", + "steps": [ + { + "step_name": "Step-1", + "content_type": "File", + "content": "", + "file": "/files/W4A150076.jpg", + "display_order": "7" + }, + { + "step_name": "Step-1", + "content_type": "Warning", + "content": "
  • Ensure that the fuel is drained from filter assembly before the fuel filter element is removed.
  • Do not hold fuel filter body part and avoid damage to the fuel filter body.
", + "file": "", + "display_order": "8" + }, + { + "step_name": "Step-1", + "content_type": "Description", + "content": "
  • Press the lock and disconnect the electrical connector from the fuel filter.
", + "file": "", + "display_order": "9" + }, + { + "step_name": "Step-2", + "content_type": "File", + "content": "", + "file": "/files/W4A200104.jpg", + "display_order": "10" + }, + { + "step_name": "Step-2", + "content_type": "Description", + "content": "
  • Disconnect the fuel supply pipe by disconnecting the quick coupler.
", + "file": "", + "display_order": "11" + }, + { + "step_name": "Step-2", + "content_type": "Notice", + "content": "
  • All are quick fix connectors, press gently and remove it carefully; avoid seal damages.
", + "file": "", + "display_order": "12" + }, + { + "step_name": "Step-3", + "content_type": "File", + "content": "", + "file": "/files/W4A130055.jpg", + "display_order": "13" + }, + { + "step_name": "Step-3", + "content_type": "Description", + "content": "
  • Disconnect the fuel return pipe by disconnecting the quick coupler.
", + "file": "", + "display_order": "14" + }, + { + "step_name": "Step-3", + "content_type": "Notice", + "content": "
  • All are quick fix connectors, press gently and remove it carefully; avoid seal damages.
", + "file": "", + "display_order": "15" + }, + { + "step_name": "Step-4", + "content_type": "File", + "content": "", + "file": "/files/W4A130123.jpg", + "display_order": "16" + }, + { + "step_name": "Step-4", + "content_type": "Description", + "content": "
  • Using a 12 mm socket spanner, loosen and remove the fuel filter assembly mounting bolts.
", + "file": "", + "display_order": "17" + }, + { + "step_name": "Step-5", + "content_type": "File", + "content": ",", + "file": "/files/W4A100097.jpg,/files/W4A150229.jpg", + "display_order": "18,19" + }, + { + "step_name": "Step-5", + "content_type": "Description", + "content": "
  • Remove the filter from the vehicle.
", + "file": "", + "display_order": "20" + }, + { + "step_name": "Step-6", + "content_type": "File", + "content": "", + "file": "/files/W4A140041.jpg", + "display_order": "21" + }, + { + "step_name": "Step-6", + "content_type": "Description", + "content": "
  • Use two approx. 2\u0096 3 inches long size \u00a0M12 bolts and nuts to hold fuel filter \u00a0assembly in a bench vice as shown in illustration.
", + "file": "", + "display_order": "22" + }, + { + "step_name": "Step-7", + "content_type": "File", + "content": "", + "file": "/files/W4A050117.jpg", + "display_order": "23" + }, + { + "step_name": "Step-7", + "content_type": "Description", + "content": "
  • Using a 36 mm ring/socket spanner, rotate the fuel filter bottom cover in anticlockwise direction and loosen.
", + "file": "", + "display_order": "24" + }, + { + "step_name": "Step-8", + "content_type": "File", + "content": "", + "file": "/files/W4A120130.jpg", + "display_order": "25" + }, + { + "step_name": "Step-8", + "content_type": "Description", + "content": "
  • Remove the fuel filter body.
", + "file": "", + "display_order": "26" + }, + { + "step_name": "Step-9", + "content_type": "File", + "content": "", + "file": "/files/W4A150065.jpg", + "display_order": "27" + }, + { + "step_name": "Step-9", + "content_type": "Description", + "content": "
  • Take out the filter element from the fuel filter housing.
", + "file": "", + "display_order": "28" + }, + { + "step_name": "Step-10", + "content_type": "File", + "content": "", + "file": "/files/W4A120204.jpg", + "display_order": "29" + }, + { + "step_name": "Step-10", + "content_type": "Description", + "content": "
  • Remove the O-ring from the fuel filter housing.
", + "file": "", + "display_order": "30" + } + ] + }, + { + "procedure_name": "Installation", + "steps": [ + { + "step_name": "Step-1", + "content_type": "File", + "content": "", + "file": "/files/W4A120302.jpg", + "display_order": "31" + }, + { + "step_name": "Step-1", + "content_type": "Description", + "content": "
  • Assemble the new O-ring back on to filter housing, which is supplied along with new filter element. Ensure little oil is smeared on to the surface of O-ring before assembly on to head.
", + "file": "", + "display_order": "32" + }, + { + "step_name": "Step-2", + "content_type": "File", + "content": "", + "file": "/files/W4A040162.jpg", + "display_order": "33" + }, + { + "step_name": "Step-2", + "content_type": "Description", + "content": "
  • Insert the filter element correctly into housing as shown in illustration.
", + "file": "", + "display_order": "34" + }, + { + "step_name": "Step-2", + "content_type": "Caution", + "content": "
  • Press the filter element by gentle push into the head.
", + "file": "", + "display_order": "35" + }, + { + "step_name": "Step-3", + "content_type": "File", + "content": "", + "file": "/files/W4A120103.jpg", + "display_order": "36" + }, + { + "step_name": "Step-3", + "content_type": "Description", + "content": "
  • Refit the fuel filter element into the fuel filter housing.
", + "file": "", + "display_order": "37" + }, + { + "step_name": "Step-3", + "content_type": "Caution", + "content": "
  • Assemble filter element on to head in the direction shown. Ensure open end of filter element goes inside first.
", + "file": "", + "display_order": "38" + }, + { + "step_name": "Step-4", + "content_type": "File", + "content": "", + "file": "/files/W4A130205.jpg", + "display_order": "39" + }, + { + "step_name": "Step-4", + "content_type": "Description", + "content": "
  • Tighten the filter body using 36 mm size \u00a0socket spanner to specified torque value.
", + "file": "", + "display_order": "40" + }, + { + "step_name": "Step-4", + "content_type": "Caution", + "content": "
  • Do not over tighten beyond 25\u00b15 Nm. This may cause damage to the bowl and Head.
  • Is it recommended to tight the fuel filter using torque wrench.
", + "file": "", + "display_order": "41" + }, + { + "step_name": "Step-5", + "content_type": "File", + "content": "", + "file": "/files/W4A140217.jpg", + "display_order": "42" + }, + { + "step_name": "Step-5", + "content_type": "Description", + "content": "
  • Remove the filter assembly from the wise.
", + "file": "", + "display_order": "43" + }, + { + "step_name": "Step-6", + "content_type": "File", + "content": "", + "file": "/files/W4A150159.jpg", + "display_order": "44" + }, + { + "step_name": "Step-6", + "content_type": "Description", + "content": "
  • Refit the fuel filter assembly and install the mounting bolts.
", + "file": "", + "display_order": "45" + }, + { + "step_name": "Step-6", + "content_type": "Torque Value", + "content": "Torque : 25 \u00b1 5 Nm", + "file": "", + "display_order": "46" + }, + { + "step_name": "Step-7", + "content_type": "File", + "content": "", + "file": "/files/W4A170025_0000346813.jpg", + "display_order": "47" + }, + { + "step_name": "Step-7", + "content_type": "Description", + "content": "
  • Reconnect the fuel filter fuel return line quick coupler.
", + "file": "", + "display_order": "48" + }, + { + "step_name": "Step-7", + "content_type": "Notice", + "content": "
  • All are quick fix connectors, press gently and refit it carefully; avoid seal damages.
  • Check and ensure proper fitment of \u00a0fuel lines, any leakage can lead to fire.
", + "file": "", + "display_order": "49" + }, + { + "step_name": "Step-8", + "content_type": "File", + "content": "", + "file": "/files/W4A150260.jpg", + "display_order": "50" + }, + { + "step_name": "Step-8", + "content_type": "Description", + "content": "
  • Reconnect the fuel filter fuel supply pipe quick coupler.
", + "file": "", + "display_order": "51" + }, + { + "step_name": "Step-8", + "content_type": "Notice", + "content": "
  • All are quick fix connectors, press gently and refit it carefully; avoid seal damages.
  • Check and ensure proper fitment of fuel lines, any leakage can lead to fire.
", + "file": "", + "display_order": "52" + }, + { + "step_name": "Step-9", + "content_type": "File", + "content": "", + "file": "", + "display_order": "53" + }, + { + "step_name": "Step-9", + "content_type": "Description", + "content": "
  • Reconnect the fuel filter electrical connector.
", + "file": "", + "display_order": "54" + }, + { + "step_name": "Step-9", + "content_type": "Caution", + "content": "
  • Always use recommended filter element only.
  • Before removing the fuel filter, open the fuel tank cap to release the pressure from the tank and fuel lines.
  • Fuel filter cartridge needs to be replaced earlier in case of repeat water in fuel warning in cluster even after the water is drained from the system.
", + "file": "", + "display_order": "55" + } + ] + } + ] + }, + { + "subSystemdisplayorder": 5, + "systems": "Fuel System", + "sub_systems": "Water In Fuel Filter - Clean", + "symptom": 0, + "component": 0, + "estimated_time": null, + "rts": null, + "mat": null, + "cover_image": null, + "active_status": true, + "Config Kilometer": [], + "procedure_status": "Publish Ready", + "procedure_link": "Thar.AX-0432-Water In Fuel Filter - Clean-en", + "Procedure_details": [ + { + "procedure_name": "Overview", + "steps": [ + { + "step_name": "Overview", + "content_type": "File", + "content": ",", + "file": "/files/W4A130307.jpg,/files/W4A170267.jpg", + "display_order": "1,2" + }, + { + "step_name": "Preliminary Activities", + "content_type": "Description", + "content": "
  1. Park the vehicle on level work bay.
  2. Open the bonnet and lock it in open position using bonnet stay rod.
", + "file": "", + "display_order": "3" + }, + { + "step_name": "Tools Required", + "content_type": "File", + "content": "", + "file": "/files/W4A090056.jpg", + "display_order": "4" + } + ] + }, + { + "procedure_name": "Sediment Draining", + "steps": [ + { + "step_name": "Step-1", + "content_type": "File", + "content": "", + "file": "/files/W4A120024.jpg", + "display_order": "5" + }, + { + "step_name": "Step-1", + "content_type": "Description", + "content": "
  • Connect the transparent pipe to the drain \u00a0plug outlet of the fuel filter assembly
", + "file": "", + "display_order": "6" + }, + { + "step_name": "Step-2", + "content_type": "File", + "content": "", + "file": "/files/W4A100016.jpg", + "display_order": "7" + }, + { + "step_name": "Step-2", + "content_type": "Description", + "content": "
  • Using a Nose plier, rotate drain plug anticlockwise till the water starts flowing from the tube.
", + "file": "", + "display_order": "8" + }, + { + "step_name": "Step-2", + "content_type": "Caution", + "content": "
  • Drain plug requires hand tight only; do not use any tool and avoid over tightening.
  • Do not over tight the drain plug
", + "file": "", + "display_order": "9" + }, + { + "step_name": "Step-3", + "content_type": "File", + "content": "", + "file": "/files/W4A100061.jpg", + "display_order": "10" + }, + { + "step_name": "Step-3", + "content_type": "Description", + "content": "
  • Rotate drain plug in clockwise directio \u00a0to stop the flow as soon as water gets over and fuel flow starts. Tighten the drain plug.
", + "file": "", + "display_order": "11" + }, + { + "step_name": "Step-4", + "content_type": "Description", + "content": "
  • Start the engine and check for any leaks.
", + "file": "", + "display_order": "12" + } + ] + } + ] + } + ] + }, + { + "systemdisplayorder": 1, + "system_name": "Air Intake", + "icon_file": null, + "myid": 1000, + "active_status": true, + "Assets": [ + { + "systemdisplayorder": 1, + "system_asset": "/private/files/CAN Communication (D)_v3.mp4" + } + ], + "Subsystems": [ + { + "subSystemdisplayorder": 1, + "systems": "Air Intake", + "sub_systems": "Air Filter Element Clean", + "symptom": 0, + "component": 0, + "estimated_time": null, + "rts": null, + "mat": null, + "cover_image": null, + "active_status": true, + "Config Kilometer": [], + "procedure_status": "Publish Ready", + "procedure_link": "Thar.AX-0432-Air Filter Element Clean-en", + "Procedure_details": [ + { + "procedure_name": "Overview", + "steps": [ + { + "step_name": "Overview", + "content_type": "File", + "content": null, + "file": "/files/ESP OFF.jpg,/files/W4A160067.jpg,/files/W4A130334.jpg", + "display_order": "1,2,3" + }, + { + "step_name": "Overview", + "content_type": "Description", + "content": "The air cleaner element is Non woven +Pleated Media type (Dry Type). Filtration happens in two stages. Coarser particles are filtered in first stage by foam media and fine particles are filtered by Paper media in second stage. The dust and other fine particles which are sucked inside along with air gets trapped in the air cleaner while passing through the filter element.", + "file": null, + "display_order": "4" + }, + { + "step_name": "Overview", + "content_type": "Notice", + "content": "Don\u2019t tap or hit the filter element.", + "file": null, + "display_order": "5" + }, + { + "step_name": "Preliminary Activities", + "content_type": "Description", + "content": "Park the vehicle on flat work bay.Open the bonnet and lock it in open position using bonnet stay rod.", + "file": null, + "display_order": "6" + }, + { + "step_name": "Tools Required", + "content_type": "File", + "content": null, + "file": "/files/W4A120270.jpg", + "display_order": "7" + } + ] + }, + { + "procedure_name": "Removal", + "steps": [ + { + "step_name": "Step-1", + "content_type": "File", + "content": null, + "file": "/files/Hill Hold.jpg", + "display_order": "8" + }, + { + "step_name": "Step-1", + "content_type": "Caution", + "content": "The air filter element should be inspected and replaced from time to time, when driving under the following conditions:Unpaved road.Dusty air-polluted road.Long-term driving in rainy weather.", + "file": null, + "display_order": "9" + }, + { + "step_name": "Step-1", + "content_type": "Description", + "content": "Using a 5 mm allen key, Unscrew air cleaner top housing mounting allen screws and lift the top housing.", + "file": null, + "display_order": "10" + }, + { + "step_name": "Step-2", + "content_type": "File", + "content": null, + "file": "/files/W4A150059.jpg", + "display_order": "11" + }, + { + "step_name": "Step-2", + "content_type": "Description", + "content": "Gently take out the air cleaner element from the housing.", + "file": null, + "display_order": "12" + } + ] + }, + { + "procedure_name": "Cleaning", + "steps": [ + { + "step_name": "Step-1", + "content_type": "File", + "content": null, + "file": "/files/W4A020124.jpg", + "display_order": "13" + }, + { + "step_name": "Step-1", + "content_type": "Description", + "content": "Clean the inner side of the air cleaner housing using a lint free cloth.", + "file": null, + "display_order": "14" + }, + { + "step_name": "Step-2", + "content_type": "File", + "content": null, + "file": "/files/W4A020013.jpg,/files/W4A020011.jpg,/files/W4A020012.jpg", + "display_order": "15,16,17" + }, + { + "step_name": "Step-2", + "content_type": "Description", + "content": "Blow the compressed air from the top clean side of filter element.", + "file": null, + "display_order": "18" + }, + { + "step_name": "Step-2", + "content_type": "Caution", + "content": "Blow the compress air from the top clean side of filter element (From Paper side).Do not blow the air from bottom dirty side (Foam side).While cleaning, ensure the air pressure should be less than 2 bar.", + "file": null, + "display_order": "19" + } + ] + }, + { + "procedure_name": "Installation", + "steps": [ + { + "step_name": "Step-1", + "content_type": "File", + "content": null, + "file": "/files/W4A020124.jpg", + "display_order": "20" + }, + { + "step_name": "Step-1", + "content_type": "Description", + "content": "Clean the inner side of the air cleaner housing using a lint free cloth.", + "file": null, + "display_order": "21" + }, + { + "step_name": "Step-2", + "content_type": "File", + "content": null, + "file": "/files/W4A020017.jpg", + "display_order": "22" + }, + { + "step_name": "Step-2", + "content_type": "Description", + "content": "Gently insert the air cleaner element inside the air cleaner housing.", + "file": null, + "display_order": "23" + }, + { + "step_name": "Step-2", + "content_type": "Caution", + "content": "During Installation ensure to keep foam side of the filter element in the bottom side.Ensure dust should not fall inside the clean hose area while fitting.Ensure dust should not fall inside the clean hose area while fitting.", + "file": null, + "display_order": "24" + }, + { + "step_name": "Step-2", + "content_type": "Caution", + "content": "Always use recommended genuine air filter element.Do not tap or hit the new filter element.", + "file": null, + "display_order": "25" + }, + { + "step_name": "Step-3", + "content_type": "File", + "content": null, + "file": "/files/W4A020123.jpg", + "display_order": "26" + }, + { + "step_name": "Step-3", + "content_type": "Description", + "content": "Refit the air cleaner top housing and install the mounting allen screws.", + "file": null, + "display_order": "27" + }, + { + "step_name": "Step-3", + "content_type": "Torque Value", + "content": "Torque : 10 Nm", + "file": null, + "display_order": "28" + } + ] + } + ] + } + ] + }, + { + "systemdisplayorder": 4, + "system_name": "Exhaust & Emission Control", + "icon_file": null, + "myid": 1001, + "active_status": true, + "Assets": [ + { + "systemdisplayorder": 2, + "system_asset": "/private/files/ECU IP & OP (D)_v2.mp4" + } + ], + "Subsystems": [ + { + "subSystemdisplayorder": 4, + "systems": "Exhaust & Emission Control", + "sub_systems": "Precautions & Handling Of Dosing Module (DM) & Supply Module SM", + "symptom": 0, + "component": 0, + "estimated_time": null, + "rts": null, + "mat": null, + "cover_image": null, + "active_status": true, + "Config Kilometer": [], + "procedure_status": "Publish Ready", + "procedure_link": "Thar.AX-0432-Precautions & Handling Of Dosing Module (DM) & Supply Module SM-en", + "Procedure_details": [ + { + "procedure_name": "Overview", + "steps": [ + { + "step_name": "Step-1", + "content_type": "File", + "content": "", + "file": "/files/Rear Fog Lamp.jpg", + "display_order": "1" + }, + { + "step_name": "Step-1", + "content_type": "Heading", + "content": "Do\u2019s & Don\u2019ts", + "file": null, + "display_order": "2" + }, + { + "step_name": "Step-1", + "content_type": "Description", + "content": "
  • Do not hold the Supply Module while carry DEF tank.
", + "file": null, + "display_order": "3" + }, + { + "step_name": "Step-2", + "content_type": "File", + "content": "", + "file": "/files/W4A080026.jpg", + "display_order": "4" + }, + { + "step_name": "Step-2", + "content_type": "Description", + "content": "
  • Do not handle Supply Module using connectors, complete housing to be held to avoid any type of damages.
", + "file": null, + "display_order": "5" + }, + { + "step_name": "Step-3", + "content_type": "File", + "content": "", + "file": "/files/W4A130187.jpg", + "display_order": "6" + }, + { + "step_name": "Step-3", + "content_type": "Description", + "content": "
  • Handle Dosing Module using housing and not on connectors to avoid any type of damages.
", + "file": null, + "display_order": "7" + }, + { + "step_name": "Step-4", + "content_type": "Description", + "content": "
  • Structural changes of the Dosing Module is not permitted.
  • Dismounting of dosing valve out of the cooling body is not allowed.
", + "file": null, + "display_order": "8" + }, + { + "step_name": "Step-4", + "content_type": "Description", + "content": "
  1. Avoid painting or application of other coatings on Dosing Module (DM) & Supply Module (SM) to ensure lifetime & functionality.
  2. Always remove (manually) protection caps of DM & SM just before assembly of its mating pipes/cables, to avoid contamination of the system.
  3. Only use recommended tools for remove & Installation of DM & SM. After removing, cover the openings with protective caps to prevent the entry of contaminants.
  4. The entry of contaminants in the interfaces of the DM must be prevented during Installation & removing of DM.
", + "file": null, + "display_order": "9" + }, + { + "step_name": "Step-5", + "content_type": "Heading", + "content": "Storage Guidelines", + "file": null, + "display_order": "10" + }, + { + "step_name": "Step-5", + "content_type": "Description", + "content": "
  1. Dosing Module (DM) & Supply Module (SM) should not be handled as bulk goods, as it can damage the parts. If a part falls down, it must be scrapped, even if it looks visually ok, to avoid any latent damages leading emission issues.
  2. Parts have to be stored in original M&M packaging.
  3. Parts needs to be protected against rain, snow, heat sources and dust.
  4. Max. storage period of DM & SM should be not more than 4 years.
  5. Avoid any damages to Supply Module while storing DEF tank.
", + "file": null, + "display_order": "11" + } + ] + } + ] + } + ] + } + ] + } + }, + { + "StepCount": 106 + } +] \ No newline at end of file diff --git a/smart_service/mahindra_smart_service/report/_applog_translation/__init__.py b/smart_service/mahindra_smart_service/report/_applog_translation/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/smart_service/mahindra_smart_service/report/_applog_translation/__pycache__/__init__.cpython-38.pyc b/smart_service/mahindra_smart_service/report/_applog_translation/__pycache__/__init__.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..cca5419e8b6ddef74614ac8f21288951eeb4d79d GIT binary patch literal 218 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 I{f2k(Pg*_-pa1{> literal 0 HcmV?d00001 diff --git a/smart_service/mahindra_smart_service/report/installation_report/installation_report.js b/smart_service/mahindra_smart_service/report/installation_report/installation_report.js new file mode 100644 index 0000000..1368f11 --- /dev/null +++ b/smart_service/mahindra_smart_service/report/installation_report/installation_report.js @@ -0,0 +1,39 @@ +// Copyright (c) 2022, Hard n Soft Technologies Pvt Ltd and contributors +// For license information, please see license.txt +/* eslint-disable */ + +frappe.query_reports["Installation Report"] = { + "filters": [ + { + "fieldname":"from_date", + "label": __("From Date"), + "fieldtype": "Date", + default: frappe.datetime.month_start(), + "reqd": 0 + }, + { + "fieldname":"to_date", + "label": __("To Date"), + "fieldtype": "Date", + default: frappe.datetime.month_end(), + "reqd": 0 + }, + + { + "fieldname":"user", + "label": __("User"), + "fieldtype": "Link", + "options" : "App Users", + "reqd": 0 + }, + { + "fieldname":"device", + "label": __("Device"), + "fieldtype": "Link", + "options" : "App Device", + "reqd": 0 + }, + + ] + }; + diff --git a/smart_service/mahindra_smart_service/report/installation_report/installation_report.json b/smart_service/mahindra_smart_service/report/installation_report/installation_report.json new file mode 100644 index 0000000..3426527 --- /dev/null +++ b/smart_service/mahindra_smart_service/report/installation_report/installation_report.json @@ -0,0 +1,29 @@ +{ + "add_total_row": 0, + "columns": [], + "creation": "2022-01-11 21:21:21.835448", + "disable_prepared_report": 0, + "disabled": 0, + "docstatus": 0, + "doctype": "Report", + "filters": [], + "idx": 0, + "is_standard": "Yes", + "modified": "2022-01-11 21:31:48.945777", + "modified_by": "Administrator", + "module": "Mahindra Smart Service", + "name": "Installation Report", + "owner": "Administrator", + "prepared_report": 0, + "ref_doctype": "App Log", + "report_name": "Installation Report", + "report_type": "Script Report", + "roles": [ + { + "role": "System Manager" + }, + { + "role": "_Admin" + } + ] +} \ No newline at end of file diff --git a/smart_service/mahindra_smart_service/report/installation_report/installation_report.py b/smart_service/mahindra_smart_service/report/installation_report/installation_report.py new file mode 100644 index 0000000..f6ccf62 --- /dev/null +++ b/smart_service/mahindra_smart_service/report/installation_report/installation_report.py @@ -0,0 +1,88 @@ +# Copyright (c) 2013, Hard n Soft Technologies Pvt Ltd and contributors +# For license information, please see license.txt + +# import frappe + +from __future__ import unicode_literals +import frappe +from frappe.utils import cstr, cint, getdate +from frappe import msgprint, _ + +def execute(filters=None): + columns, data = [], [] + columns = get_columns() + data = get_data(filters) + return columns, data + +def get_data(filters): + if filters.get('user') and filters.get('device'): + 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,date(al.date_time_stamp) as date,time(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 + where + ad.name = %s and al.device = %s and au.name = %s and au.dealer = dealer.name and al.type = 'Installed' and + (al.modified between %s and %s)""",(filters.get('device'),filters.get('device'),filters.get('user'),filters.get('from_date'), filters.get('to_date')), as_dict=1) + if data: + return data + else: + frappe.throw('No Data for Selected Filters.') + + + if filters.get('user'): + 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,date(al.date_time_stamp) as date,time(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 + where + al.device = ad.name and au.name = %s and au.dealer = dealer.name and al.type = 'Installed' and + (al.modified between %s and %s)""",(filters.get('user'),filters.get('from_date'), filters.get('to_date')), as_dict=1) + if data: + return data + else: + frappe.throw('No Data for Selected Filters.') + if filters.get('device'): + 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,date(al.date_time_stamp) as date, + time(al.date_time_stamp) as time,time(al.date_time_stamp) as last_time,ad.name + from `tabApp Log` al,`tabApp Device` ad,`tabApp Users` au,`tabApp Dealer` dealer + where + ad.name = %s and al.device = %s and al.user = au.name and au.dealer = dealer.name and al.type = 'Installed' and + (al.modified between %s and %s)""",(filters.get('device'),filters.get('device'),filters.get('from_date'), filters.get('to_date')), as_dict=1) + if data: + return data + else: + frappe.throw('No Data for Selected Filters.') + else: + 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,date(al.date_time_stamp) as date,time(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 + 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) + + if data: + return data + else: + frappe.throw('No Data for Selected 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": 150}, + {"label": _("Dealer Location"), "fieldname": "area", "fieldtype":"Data","width": 150}, + {"label": _("Device OS"), "fieldname": "os", "fieldtype": "Data", "width": 100}, + {"label": _("OS Version"), "fieldname": "os_version", "fieldtype": "Data", "width": 100}, + {"label": _("Device Type"), "fieldname": "type", "fieldtype": "Data","width": 100}, + {"label": _("Device ID"), "fieldname": "device_id", "fieldtype": "Data", "width": 100}, + {"label": _("App Installation Date"), "fieldname": "date_time_stamp", "fieldtype": "DateTime","width": 160}, + {"label": _("App Installation Time"), "fieldname": "time", "fieldtype": "DateTime","width": 160}, + {"label": _("App LastAccessed Date"), "fieldname": "date", "fieldtype": "Date","width": 200}, + {"label": _("App LastAccessed Time"), "fieldname": "last_time", "fieldtype": "DateTime","width": 200}, + {"label": _("App Version No"), "fieldname": "app_current_version", "fieldtype": "Data", "width": 150}, + #{"label": _("Installation Status"), "fieldname": "device", "fieldtype": "Data", "width": 150}, + ] + return columns + diff --git a/smart_service/mahindra_smart_service/report/login_report/__init__.py b/smart_service/mahindra_smart_service/report/login_report/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/smart_service/mahindra_smart_service/report/login_report/__pycache__/__init__.cpython-38.pyc b/smart_service/mahindra_smart_service/report/login_report/__pycache__/__init__.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..056a480cfc9e3cf359fca2c4a07a380ca7092c1e GIT binary patch literal 211 zcmWIL<>g`k07iZ#`-MI3{G9EW{ zwK=s{Bu<=qXfH_oE&Ky$E*v<8D-wrt;k~hU<4v1V35Y6zS02yry*F=W-@JM6&7GB% zjsee#`kDTC#xQRZZ= z3MrtCGpXD$myAl@HIYYB!g~|m!iQ!IKhxMJ`=&G=!dH@+@et6A z%*+waPqsi`7gUE)o|I`;C=UTlL}7k+6eqBnLb-FUjhr70u>#7U%{F%Ply8g#olJOG zi2LESk81Sc4$q?94PX=-MM{MX3oh=*5kG=bx*KOq&~RBu@JTM@Mv{-?EPMeNOdcqg zf6b#(@-F^a4;q7Xh(kOgR-wOS7qm$mUTv3aV6mC;1orbO5!MJmHb_ z8K(&sgK3`eby^NkEQ}d;N3kemn9-E4*Fx0?oQ)kNHKnNFbe*z6UQ}&(ADl4Gv-M89 z-KNQ)S_AT`o}P{kz}v#86oO}RF#@FJg9$7QM#1R`Wt@VmN}5iP6v0Fi6(jHc=Vkgn zEqvsyGqqLHGJQ@%Q>1?Ngxaiz@UC=(+zr4c%3{;%nt;4ab6$c<3-E=3Vsqf6O)T#QigY2xBMi z7;1bC0#c&02E-Uh8cj#~ccK#Ihkg^~WhOC-;k5dUY05lbomf&^q_QeoEg&Y+zszh2 zBr#b+N`?QC}S!pz_C8A!Wh$T4xIGubO7GJh=c za^mkizhn=Z!Y|R!GG=B zs+G_kow^3l6Slx>}Ff%p+Z)DjSR9zz(3wRyKyE zz^RHw9ET-&h>M@LE24jE2sh4(9<#vPtRsZ-=CLAZZ_XoyYA=F@YTd+us9HJ-_K9%O zU_{_0>!^p~oofhhaS0m3TqDQ)ezR8v%Hn0Sr#fLcDrG5n7zzl(hByz6>Qx71P|7$d zgoSh)n-(?>Hn"; - //console.log("C" + c) - console.log("path" + path) - $(frm.fields_dict.file_path.wrapper).html(path); - console.log(cur_frm.doc.file_path) - - //window.addEventListener('load', () => { - // const button = document.querySelector('#clear'); - // button.addEventListener('click', () => { - // document.querySelector('#enter').value = ""; - // }); - //}); - }, - new_file: function(frm){ - //function open_multi_select_dialog() { - //cy.window().its('frappe').then(frappe => { - new frappe.ui.form.MultiSelectDialog({ - fields: [ - { - fieldname: 'folder', - label: __('Folder'), - fieldtype: 'Link', - options: "File", - get_query: { - filters: { - is_folder: ["=", "1"]} - }, - onchange: function() { - var folder = dialog.get_values()['folder']; - file_folder = folder - $("[data-fieldname=file_name]").focus(); - $('.form-control[data-fieldname=file_name]').focus(); - dialog.refresh() - }, - - }, - { - fieldname: 'file_name', - label: __('File Name'), - fieldtype: 'Link', - options: 'File', - reqd: 0, - get_query: function(){ - return { - filters: { - folder: ["=", file_folder] - } - - } - }, - }, - ], - + var href = "http://192.168.1.58:81" + cur_frm.doc.file_path; + cur_frm.set_value('url',href) + console.log(cur_frm.doc.url) + console.log(href); + frm.add_custom_button("Link", function(){ + var href = "http://192.168.1.58:81/" + cur_frm.doc.file_path; + console.log(href); + window.open("http://192.168.1.58:81/files/HR-EMP-00014.jpg"); + //window.location.href = "http://192.168.1.58:81/files/HR-EMP-00014.jpg"; + + }); + // var a = document.getElementById("file_path").value + $("div[data-fieldname=file_path]").css({'background-color': 'violet'}); + if(frm.doc.file_path){ + var path = cur_frm.doc.file_path + " " + $(frm.fields_dict.file_path.wrapper).html(path); + console.log(frm.doc.file_path) + //window.addEventListener('load', () => { + const button = document.querySelector('#clear'); + button.addEventListener('click', () => { + // cur_frm.set_value("file_path","") + console.log(cur_frm.doc.file_path) + //path = ''; + //$(frm.fields_dict.file_path.wrapper).html(path); + var path = " " + var path = path + ""; + $(frm.fields_dict.file_path.wrapper).html(path); + $("#choose_file").click(function() { + choose_file(frm.doc.name); + }) + $("#frappe-control input-max-width").click(function() { + console.log("file") + }) + }); + } + else{ + var path = " " + var path = path + ""; + $(frm.fields_dict.path.wrapper).html(path); + + $("#choose_file").click(function() { + choose_file(frm.doc.name); + }) - doctype: "Contact", - target: {}, - setters: { - status: null, - gender: null - }, - add_filters_group: 1, - //allow_child_item_selection: 1, - //child_fieldname: "email_ids", - //child_columns: ["email_id", "is_primary"] - }); - //}); - //} -}, -/* - clear:function(frm){ - var me = this; - var file_folder = ''; - var child_docname = "items" - let dialog =new frappe.ui.Dialog({ - title : __('Select Files'), - fields: [ - { - fieldname: 'folder', - label: __('Folder'), - fieldtype: 'Link', - options: "File", - get_query: { - filters: { - is_folder: ["=", "1"]} - }, - onchange: function() { - var folder = dialog.get_values()['folder']; - file_folder = folder - $("[data-fieldname=file_name]").focus(); - dialog.refresh() - }, + } + }, + + }); +function choose_file() { + var me = this; + var file_folder = ''; + var child_docname = "items" + let dialog =new frappe.ui.Dialog({ + title : __('Select Files'), + fields: [ + { + fieldname: 'folder', + label: __('Folder'), + fieldtype: 'Link', + options: "File", + get_query: { + filters: { + is_folder: ["=", "1"]} }, - { - fieldname: 'file_name', - label: __('File Name'), - fieldtype: 'Link', - options: 'File', - reqd: 0, - get_query: function(){ - return { - filters: { - folder: ["=", file_folder] - } - - } - }, + onchange: function() { + var folder = dialog.get_values()['folder']; + file_folder = folder + $("[data-fieldname=file_name]").focus(); + dialog.refresh() }, - ], - primary_action: (data) => { - cur_frm.set_value("file_path",data['file_name']) - dialog.hide(); - }, - secondary_action: function() { - console.log("secondary"); - //this.add_files(this.$refs.file_input.files); - //cy.window().its('frappe').then(frappe => { - // new frappe.ui.FileUploader(); - //}); - //window.location.reload() - }, - primary_action_label: __('Ok'), - secondary_action_label: __('Make File') - - }); - - dialog.show(); - dialog.refresh(); - - },*/ - browse:function(frm){ - new frappe.ui.form.MultiSelectDialog({ - doctype: "File", - target: cur_frm, - setters: { - folder:cur_frm.doc.is_folder , - file_name: null, - }, - get_query_filters: { - filters: { - folder: ["=", "09de19e896"]} }, + { + fieldname: 'file_name', + label: __('File Name'), + fieldtype: 'Link', + options: 'File', + reqd: 0, + get_query: function(){ + return { + filters: { + folder: ["=", file_folder] + } - on_change: () => { - console.log("called") - this.$results.on('click', '.list-item-container :checkbox', (e) => { - this.$results.find('.list-item-container .list-row-check') - //.prop("checked", ($(e.target).is(':checked'),false)); - .prop("checked", false); - }); + } }, - add_filters_group: 1, - child_fieldname: "email_ids", - child_columns: ["email_id", "is_primary"], + }, + ], + primary_action: (data) => { + frappe.db.get_value("File",{name:data['file_name']},'file_url', (r) => { + //console.log(r.name) + cur_frm.set_value("file_path",r.file_url); + var path = cur_frm.doc.file_path + " " + $(cur_frm.fields_dict.file_path.wrapper).html(path); - primary_action_label: 'Ok', - - action(selections) { - console.log("called") - var x = ($(this).find('.list-row-check:checkbox:checked').length); - console.log("XX" + x) - - this.$results.on('click', '.list-item-container', function (e) { - if (!$(e.target).is(':checkbox') && !$(e.target).is('a')) { - $(this).find(':checkbox').trigger('click'); - } - }); - //////$(".modal").modal("hide"); + const button = document.querySelector('#clear'); + button.addEventListener('click', () => { + var path = " " + var path = path + ""; + $(cur_frm.fields_dict.file_path.wrapper).html(path); + $("#choose_file").click(function() { + choose_file(cur_frm.doc.name); + }) + }); + + }) + dialog.hide(); + }, + secondary_action: function() { + //window.open(); + // + //this.add_files(this.$refs.file_input.files); + //cy.window().its('frappe').then(frappe => { + // new frappe.ui.FileUploader(); + //}); + window.location.reload() + }, + primary_action_label: __('Ok'), + secondary_action_label: __('Make File') + }); + dialog.show(); + dialog.refresh(); + - var a = ['results_area']; - //var b = $checkbox.is(':checked'); - console.log(selections.name) - //console.log("AA"+ b) - //$('#myCheckbox').prop('checked', false); + +} - - jQuery(".list-item-container").change(function() { - jQuery('.list-row-check[data-groupID="' + jQuery(this).data("groupid") + '"]') - .prop('checked', jQuery(this).prop("checked")); - }); - jQuery('.list-row-check').change(function() { - console.log("jquery" + jQuery('.list-row-check:checked').length + jQuery('.list-row-check').length) - //this.$results.find('.list-item-container .list-row-check') - //.prop("checked", ($(e.target).is(':checked'),false)); - //.prop("checked", false); - console.log("FF" + jQuery('.list-row-check')['file_name']) - //if(false == jQuery(this).prop("checked")) { - jQuery(".list-row-check").prop('checked', false); - //} - ////if (jQuery('.list-row-check:checked').length == jQuery('.list-row-check').length ){ - // jQuery("#list-row-check-checkall").prop('checked', true); - //} - }); +function choose_file1() { + var me = this; + var file_folder = ''; + var child_docname = "items" + let dialog =new frappe.ui.Dialog({ + title : __('Select Files'), + fields: [ + { + fieldname: 'folder', + label: __('Folder'), + fieldtype: 'Link', + options: "File", + get_query: { + filters: { + is_folder: ["=", "1"]} + }, + onchange: function() { + var folder = dialog.get_values()['folder']; + file_folder = folder + $("[data-fieldname=file_name]").focus(); + dialog.refresh() + }, }, - - }); - - } + { + fieldname: 'file_name', + label: __('File Name'), + fieldtype: 'Link', + options: 'File', + reqd: 0, + get_query: function(){ + return { + filters: { + folder: ["=", file_folder] + } + + } + }, + }, + ], + primary_action: (data) => { + frappe.db.get_value("File",{name:data['file_name']},'file_url', (r) => { + //console.log(r.name) + var href = "http://192.168.1.58:81" + r.file_url; + cur_frm.set_value('url',href) + //cur_frm.set_value("url",r.file_url); + + }) + dialog.hide(); + }, + secondary_action: function() { + window.location.reload() + }, + primary_action_label: __('Ok'), + secondary_action_label: __('Make File') + }); + dialog.show(); + dialog.refresh(); -}); + +} \ No newline at end of file diff --git a/smart_service/masters/doctype/vehi/vehi.json b/smart_service/masters/doctype/vehi/vehi.json index 125dca2..c6c4649 100644 --- a/smart_service/masters/doctype/vehi/vehi.json +++ b/smart_service/masters/doctype/vehi/vehi.json @@ -6,24 +6,18 @@ "editable_grid": 1, "engine": "InnoDB", "field_order": [ - "vehicle_name", - "path" + "vehicle_name" ], "fields": [ { "fieldname": "vehicle_name", "fieldtype": "Data", "label": "Vehicle Name" - }, - { - "fieldname": "path", - "fieldtype": "HTML", - "label": "Path" } ], "index_web_pages_for_search": 1, "links": [], - "modified": "2021-12-29 10:42:02.622951", + "modified": "2022-01-05 09:59:09.422202", "modified_by": "Administrator", "module": "Masters", "name": "Vehi", diff --git a/smart_service/masters/doctype/vehi_master/__pycache__/vehi_master.cpython-38.pyc b/smart_service/masters/doctype/vehi_master/__pycache__/vehi_master.cpython-38.pyc index ad7d67acf55f6719aaa859a6f04ea07e76a851a0..df009fe87ef521d323fc168a556ceba201be9a97 100644 GIT binary patch delta 106 zcmbQsyq=jil$V!_0SMwAUQWC|kyqA41IS5XNMX!jhyu|}IgGhXQA~^s?hGl+DJ(4v zDJ-c>&CF5EDU87knyfEDdi^Gb{^rtTxy6=Nlvq%ZIysopo|gqEUJN2Q7NMTB0Zed7aPGxLn lj$%q-31-k_eF@StG440BpCLoading...").appendTo(wrapper);/ + //frm.fields_dict['items'].grid.wrapper.find('.grid-attach').html(path); + //$(frm.fields_dict[d.parentfield].grid.grid_rows_by_docname[cdn].grid_form.fields_dict.attach.wrapper).html(path); - // } -}); + }, + refresh: function(frm,cdt,cdn) { + var d = locals[cdt][cdn]; + var path = " " + //cur_frm.fields_dict["browse"].grid.grid_rows_by_docname[cdn].browse.wrapper.html(path); + //frm.fields_dict["items"].grid.grid_rows_by_docname[cdn].attach.refresh(); + //$(d.fields_dict['attach'].wrapper).html(path); +// $(cur_frm.fields_dict['items'].grid.browse.wrapper).html(path); + //$(cur_frm.fields_dict[d.parentfield].grid.grid_rows_by_docname[cdn].grid_form.fields_dict.browse.wrapper).html(path); + + + //var field = frappe.utils.filter_dict( + + + //cur_frm.fields_dict["items"].grid.grid_rows_by_docname[cdn].docfields_dict.browse.wrapper).html(path); + //{'claim_amount': "claim_amount"})[0]; + //field.df.reqd = true; + //field.refresh(); + //clear(cur_frm.open_grid_row()); + + // $(frm.fields_dict[d.parentfield].grid.grid_rows_by_docname[cdn].grid_form.fields_dict.browse.wrapper).html(path); + var d = locals[cdt][cdn]; + //$(frm.fields_dict[d.parentfield].grid.grid_rows_by_docname[cdn].grid_form.fields_dict.browse.wrapper).html(path); + var tabletransfer= frappe.model.get_doc("Vehi_master", cur_frm.doc.name) + $.each(tabletransfer.items, function(index, row){ + console.log("inside"); + var path = " " + //$(cur_frm.doc.items[i].browse.wrapper).html(path); + $(frm.fields_dict[row.parentfield].browse).html(path); + }) + if(cur_frm.doc.url){ + var path = " " + $(cur_frm.fields_dict.attach.wrapper).html(path); + const button = document.querySelector('#clear'); + button.addEventListener('click', () => { + var path = "" + $(cur_frm.fields_dict.attach.wrapper).html(path); + cur_frm.doc.url =''; + cur_frm.refresh_field('url'); + $("#attach").click(function() { + choose_file(cur_frm.doc.name); + }) + }); + } + /* for(var i=0;i { + var path = "" + $(cur_frm.doc.items[i].browse.wrapper).html(path); + //$(frm.fields_dict[cur_frm.doc.items[i].parentfield].grid.grid_rows_by_docname[cdn].grid_form.fields_dict.browse.wrapper).html(path); + cur_frm.doc.url =''; + cur_frm.refresh_field('url'); + $("#browse").click(function() { + choose_file(cur_frm.doc.name); + }) + }); + + } + }*/ + + }, + attach: function(frm){ + choose_file(cur_frm.doc.name); + }, + clear: function(frm){ + console.log("Clear") + cur_frm.doc.url = ''; + cur_frm.refresh_field('url'); + var path = " " + $(frm.fields_dict.attach.wrapper).html(path); + $("#attach").click(function() { + choose_file(cur_frm.doc.name); + }) + }, + }); +function choose_file() { + var me = this; + var file_folder = ''; + var child_docname = "items" + let dialog =new frappe.ui.Dialog({ + title : __('Select Files'), + fields: [ + { + fieldname: 'folder', + label: __('Folder'), + fieldtype: 'Link', + options: "File", + get_query: { + filters: { + is_folder: ["=", "1"]} + }, + onchange: function() { + var folder = dialog.get_values()['folder']; + file_folder = folder + $("[data-fieldname=file_name]").focus(); + dialog.refresh() + }, + }, + { + fieldname: 'file_name', + label: __('File Name'), + fieldtype: 'Link', + options: 'File', + reqd: 0, + get_query: function(){ + return { + filters: { + folder: ["=", file_folder] + } + + } + }, + }, + ], + primary_action: (data) => { + frappe.db.get_value("File",{name:data['file_name']},'file_url', (r) => { + var href = r.file_url; + var href1 = "http://192.168.1.58:81" + r.file_url; + cur_frm.set_value('url',href) + var path = "" + $(cur_frm.fields_dict.attach.wrapper).html(path); + + const button = document.querySelector('#clear'); + button.addEventListener('click', () => { + var path = "" + $(cur_frm.fields_dict.attach.wrapper).html(path); + cur_frm.doc.url =''; + cur_frm.refresh_field('url'); + $("#attach").click(function() { + choose_file(cur_frm.doc.name); + }) + }); + + + }) + dialog.hide(); + }, + secondary_action: function() { + window.location.reload() + }, + primary_action_label: __('Ok'), + secondary_action_label: __('Make File') + }); + dialog.show(); + dialog.refresh(); +} +frappe.ui.form.on('Vehi Master Item', { + refresh: function(frm){ + console.log("child refresh") + }, + attach: function(frm,cdt,cdn){ + child_file(frm,cdt,cdn); + }, + clear: function(frm,cdt,cdn){ + var child = locals[cdt][cdn]; + child.url = ''; + frm.refresh_fields(); + }, + +}) +function child_file(frm,cdt,cdn) { + //var child = locals[cdt][cdn]; + var file_folder = ''; + var child_docname = "items" + let dialog =new frappe.ui.Dialog({ + title : __('Select Files'), + fields: [ + { + fieldname: 'folder', + label: __('Folder'), + fieldtype: 'Link', + options: "File", + get_query: { + filters: { + is_folder: ["=", "1"]} + }, + onchange: function() { + var folder = dialog.get_values()['folder']; + file_folder = folder + $("[data-fieldname=file_name]").focus(); + dialog.refresh() + }, + }, + { + fieldname: 'file_name', + label: __('File Name'), + fieldtype: 'Link', + options: 'File', + reqd: 0, + get_query: function(){ + return { + filters: { + folder: ["=", file_folder] + } + + } + }, + }, + ], + primary_action: (data) => { + frappe.db.get_value("File",{name:data['file_name']},'file_url', (r) => { + var href = r.file_url; + var href1 = "http://192.168.1.58:81" + r.file_url; + frappe.model.set_value(cdt,cdn,'url',href) + var path = "" + var d = locals[cdt][cdn]; + $(frm.fields_dict[d.parentfield].grid.grid_rows_by_docname[cdn].grid_form.fields_dict.attach.wrapper).html(path); + + + const button = document.querySelector('#clear'); + button.addEventListener('click', () => { + var path = "" + $(frm.fields_dict[d.parentfield].grid.grid_rows_by_docname[cdn].grid_form.fields_dict.attach.wrapper).html(path); + d.url =''; + cur_frm.refresh_fields(); + console.log("DD" + d.url) + $("#attach").click(function() { + child_file(frm,cdt,cdn); + }) + }); + + + }) + dialog.hide(); + }, + secondary_action: function() { + window.location.reload() + }, + primary_action_label: __('Ok'), + secondary_action_label: __('Make File') + }); + dialog.show(); + dialog.refresh(); + } +function clear(grid_row){ + console.log("Grid"); + var path = "" +// var d = locals[cdt][cdn]; + //$(frm.fields_dict[d.parentfield].grid.grid_rows_by_docname[cdn].grid_form.fields_dict.browse.wrapper).html(path); +// $(grid_row.grid_form_fields_dict.browse.wrapper).html(path); + +} \ No newline at end of file diff --git a/smart_service/masters/doctype/vehi_master/vehi_master.json b/smart_service/masters/doctype/vehi_master/vehi_master.json index 7442bf3..9d56115 100644 --- a/smart_service/masters/doctype/vehi_master/vehi_master.json +++ b/smart_service/masters/doctype/vehi_master/vehi_master.json @@ -1,12 +1,16 @@ { "actions": [], "allow_rename": 1, + "autoname": "VM.##", "creation": "2021-11-19 19:52:25.370537", "doctype": "DocType", "editable_grid": 1, "engine": "InnoDB", "field_order": [ - "vehicle" + "vehicle", + "url", + "attach", + "items" ], "fields": [ { @@ -15,11 +19,28 @@ "fieldtype": "Link", "label": "Vehicle", "options": "Vehi" + }, + { + "fieldname": "url", + "fieldtype": "Data", + "options": "URL", + "read_only": 1 + }, + { + "fieldname": "items", + "fieldtype": "Table", + "label": "Items", + "options": "Vehi Master Item" + }, + { + "fieldname": "attach", + "fieldtype": "Button", + "label": "Attach" } ], "index_web_pages_for_search": 1, "links": [], - "modified": "2021-11-19 19:57:45.473071", + "modified": "2022-01-17 09:37:46.913640", "modified_by": "Administrator", "module": "Masters", "name": "Vehi_master", diff --git a/smart_service/masters/doctype/vehi_master/vehi_master.py b/smart_service/masters/doctype/vehi_master/vehi_master.py index 65db52b..44c7cca 100644 --- a/smart_service/masters/doctype/vehi_master/vehi_master.py +++ b/smart_service/masters/doctype/vehi_master/vehi_master.py @@ -1,8 +1,8 @@ # Copyright (c) 2021, Hard n Soft Technologies Pvt Ltd and contributors # For license information, please see license.txt -# import frappe +import frappe from frappe.model.document import Document class Vehi_master(Document): - pass + pass \ No newline at end of file diff --git a/smart_service/masters/doctype/vehi_master_item/__init__.py b/smart_service/masters/doctype/vehi_master_item/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/smart_service/masters/doctype/vehi_master_item/__pycache__/__init__.cpython-38.pyc b/smart_service/masters/doctype/vehi_master_item/__pycache__/__init__.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9aa37193373b3a0078ce34a8846ab6e2f10aaf3c GIT binary patch literal 201 zcmWIL<>g`kg1yJDCxYn5AOaaM0yz#qT+9L_QW%06G#UL?G8BP?5yY=N{fzwFRQ1G(cf5HkP(nRGbk literal 0 HcmV?d00001 diff --git a/smart_service/masters/doctype/vehi_master_item/__pycache__/test_vehi_master_item.cpython-38.pyc b/smart_service/masters/doctype/vehi_master_item/__pycache__/test_vehi_master_item.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..537a262bb41a66bf93eccaa06908fb25416995d4 GIT binary patch literal 413 zcmZ8cJ5Iwu5S_IHSW(h&0QwZL&?6Ly0#T3#Na1F*cn8_YKX%uaB1*Un6(^wP2uN`GZj=F(BIn1x-0SgL{$yD?%> z=_dE_1o5#^`A~TUv&;K>_<53PRgkSFoCYa2Kq^5S`XpXQ*m3pV&6RV$JSi4g{&tz{7%vgJJiE^5R0dmh5>;=5iGd z5n`nbAr1>fQ|qqu_ZacMQ{_~70=vVz#_-w8yf!57tZEuUXL~$6`c?5r(Wy*$<@hVs Xca1&2=+iCY!Vn!#FFl$6Y>b01HFa&f literal 0 HcmV?d00001 diff --git a/smart_service/masters/doctype/vehi_master_item/test_vehi_master_item.py b/smart_service/masters/doctype/vehi_master_item/test_vehi_master_item.py new file mode 100644 index 0000000..9a09a53 --- /dev/null +++ b/smart_service/masters/doctype/vehi_master_item/test_vehi_master_item.py @@ -0,0 +1,8 @@ +# Copyright (c) 2022, Hard n Soft Technologies Pvt Ltd and Contributors +# See license.txt + +# import frappe +import unittest + +class TestVehiMasterItem(unittest.TestCase): + pass diff --git a/smart_service/masters/doctype/vehi_master_item/vehi_master_item.js b/smart_service/masters/doctype/vehi_master_item/vehi_master_item.js new file mode 100644 index 0000000..b191102 --- /dev/null +++ b/smart_service/masters/doctype/vehi_master_item/vehi_master_item.js @@ -0,0 +1,8 @@ +// Copyright (c) 2022, Hard n Soft Technologies Pvt Ltd and contributors +// For license information, please see license.txt + +frappe.ui.form.on('Vehi Master Item', { + // refresh: function(frm) { + + // } +}); diff --git a/smart_service/masters/doctype/vehi_master_item/vehi_master_item.json b/smart_service/masters/doctype/vehi_master_item/vehi_master_item.json new file mode 100644 index 0000000..fc1c6c4 --- /dev/null +++ b/smart_service/masters/doctype/vehi_master_item/vehi_master_item.json @@ -0,0 +1,52 @@ +{ + "actions": [], + "allow_rename": 1, + "creation": "2022-01-07 10:25:24.733007", + "doctype": "DocType", + "editable_grid": 1, + "engine": "InnoDB", + "field_order": [ + "content_type", + "content", + "url", + "attach" + ], + "fields": [ + { + "depends_on": "eval:doc.url", + "fieldname": "url", + "fieldtype": "Data", + "options": "URL", + "read_only": 1 + }, + { + "fieldname": "content_type", + "fieldtype": "Select", + "in_list_view": 1, + "label": "Content Type", + "options": "\nHeading\nDescription\nCaution\nTorque Value\nNotice\nMST Usage\nDanger\nLink\nWarning\nFile" + }, + { + "fieldname": "content", + "fieldtype": "Small Text", + "in_list_view": 1, + "label": "Content" + }, + { + "fieldname": "attach", + "fieldtype": "Button", + "label": "Attach" + } + ], + "index_web_pages_for_search": 1, + "istable": 1, + "links": [], + "modified": "2022-01-13 20:08:24.540956", + "modified_by": "Administrator", + "module": "Masters", + "name": "Vehi Master Item", + "owner": "Administrator", + "permissions": [], + "sort_field": "modified", + "sort_order": "DESC" +} \ No newline at end of file diff --git a/smart_service/masters/doctype/vehi_master_item/vehi_master_item.py b/smart_service/masters/doctype/vehi_master_item/vehi_master_item.py new file mode 100644 index 0000000..7dd68e0 --- /dev/null +++ b/smart_service/masters/doctype/vehi_master_item/vehi_master_item.py @@ -0,0 +1,8 @@ +# Copyright (c) 2022, Hard n Soft Technologies Pvt Ltd and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + +class VehiMasterItem(Document): + pass diff --git a/smart_service/masters/doctype/vehicle/__pycache__/vehicle.cpython-38.pyc b/smart_service/masters/doctype/vehicle/__pycache__/vehicle.cpython-38.pyc index ed173ebd471987336c96288285cff314bdd416a9..863a6e245b87a026c2f45130d7a8b291c33a28ba 100644 GIT binary patch literal 1322 zcmZV;%Wl&^aM$bDj`N@`g%d(Pz##{c_JTN2REbImA#y2ju!Odbchfkv^VoG#8ab!* z%7rgTj(i6k_=Y_papD&^G3z`U%33?Gotd4Thu>E!E`n9XKZ9=tgnnsedzru-!<_#Xg)t8?=&YBf^?nIk>UbFfW!(G< zK$()qZK0((_`@2Ve!?4V5ex>LN-?Gfhb!($i}%7#0}fHMf}^A<%PDCnGbQIkc$H z09$}vz%FwDmWEopynrf!$0B(AzUA>?YU`-F73OAEw+g<%c7}6o#ZYP})kcFf`K7-nb2BPOExIJ7+6nu; zc63fJ)+P!cD*J@TV9q8H%L%V7`iXaz2Ce@*)7KD)Jo7F)TySp?2xxHc$a^fkpvSze zn~qkZBuLlf=1vg2gO0TWNm&%8wL8jMwy82$OBK&~N}+Q`T-ln0?o+!PTbitrK;TRf zaIY-g;XS5^Oob|LG*xLU9OZ&i9ECwE<}fP3n1lK-7G-FaT2T?WM3jJ5rtWmVBrg&g z^`bNiV*l-;B`1mk)+2UUs6C#}VX1+igXW{~q*2 VDd+ie2485A)T86zvav%f{1;+`Y3Tp} delta 197 zcmZ3*HIbPwl$V!_0SKboCnR2Dn8+uitpMbuFr+Z%Fyt~uF)}i^Go&!3Ft;$IFsCv$ zGe zsKU9Dp@yHuT|7(xcAO*D diff --git a/smart_service/masters/doctype/vehicle/vehicle.json b/smart_service/masters/doctype/vehicle/vehicle.json index bd15a82..6a95576 100644 --- a/smart_service/masters/doctype/vehicle/vehicle.json +++ b/smart_service/masters/doctype/vehicle/vehicle.json @@ -16,9 +16,9 @@ "vehicle_segment", "vehicle_segment_id", "active_status", - "service_kilometers", "myid", "display_order", + "service_kilometers", "global_publish_flag", "internal_publish_flag" ], @@ -74,7 +74,7 @@ }, { "fieldname": "myid", - "fieldtype": "Data", + "fieldtype": "Int", "hidden": 1, "in_list_view": 1, "label": "myID", @@ -114,7 +114,7 @@ ], "index_web_pages_for_search": 1, "links": [], - "modified": "2021-12-22 10:34:52.578134", + "modified": "2022-01-12 16:52:01.907136", "modified_by": "Administrator", "module": "Masters", "name": "Vehicle", diff --git a/smart_service/masters/doctype/vehicle/vehicle.py b/smart_service/masters/doctype/vehicle/vehicle.py index 863505b..a3596c1 100644 --- a/smart_service/masters/doctype/vehicle/vehicle.py +++ b/smart_service/masters/doctype/vehicle/vehicle.py @@ -1,8 +1,29 @@ # Copyright (c) 2021, Hard n Soft Technologies Pvt Ltd and contributors # For license information, please see license.txt -# import frappe +import frappe from frappe.model.document import Document class Vehicle(Document): - pass + def validate(self): + pass +@frappe.whitelist() +def update_km_mapping(doc,vehicle,type,skm_initial): + system_mapping_name = frappe.db.get_value("System Mapping",{"vehicle": vehicle},"name") + system_mapping = frappe.get_doc("System Mapping",system_mapping_name) + kilometer_mapping = frappe.get_doc("Kilometer Mapping",system_mapping.kilometer_mapping) +###Insert kilometer in kilometer mapping for added new kilometer + if type == "New": + for sub_system in system_mapping.get("system_sub_systems"): + if sub_system.mat: + sub_systems = kilometer_mapping.append('config_kilometer', {}) + sub_systems.kilometer = str(skm_initial) + sub_systems.mat = sub_system.mat + sub_systems.sub_systems = sub_system.sub_systems + sub_systems.applicable = "1" + kilometer_mapping.save() +###Delete kilometer mapping item depends on kilometer and mat + if type == "Deleted": + for sub_system in system_mapping.get("system_sub_systems"): + frappe.db.sql("""delete from `tabKilometer Mapping_Items` where parent = %s and sub_systems=%s and mat=%s and kilometer=%s""",(kilometer_mapping.name,str(sub_system.sub_systems),str(sub_system.mat),str(skm_initial)),as_dict=True) + diff --git a/smart_service/masters/doctype/vehicle_segment/vehicle_segment.json b/smart_service/masters/doctype/vehicle_segment/vehicle_segment.json index 5a679a5..df2c816 100644 --- a/smart_service/masters/doctype/vehicle_segment/vehicle_segment.json +++ b/smart_service/masters/doctype/vehicle_segment/vehicle_segment.json @@ -34,7 +34,7 @@ }, { "fieldname": "myid", - "fieldtype": "Data", + "fieldtype": "Int", "hidden": 1, "in_list_view": 1, "label": "myID", @@ -52,7 +52,7 @@ "icon": "fa fa-car-alt", "index_web_pages_for_search": 1, "links": [], - "modified": "2021-12-15 14:23:04.580818", + "modified": "2022-01-04 10:30:26.837900", "modified_by": "Administrator", "module": "Masters", "name": "Vehicle Segment", diff --git a/smart_service/public/__pycache__/api.cpython-38.pyc b/smart_service/public/__pycache__/api.cpython-38.pyc index c0470f337a8db7f7923a20b9c8d5f3d791674457..2aab4038ab1a688abbb02c024506bd4689759bbb 100644 GIT binary patch delta 452 zcmYLF%}T>S5Z=wtrj2csD)!)CuK^#xqvBmb=|#}EBuf&SrZT&=D3RhLl-vX#K=3)d z`2q``JoyS9#M$7_z_-kP-!R|IJhb1uVA$>Y1mpPmm9M*t;6AYN*Fqd3XSRCa?Er` z+8Ig#AIn%AQq2lcrYgH-YBCb#;FAtQ1|DkKONEM(Nvyl6C}!4Ybf delta 589 zcmYjN%}(1u5cb;ZpCq=EMparNpd7K(BS#KUBqT2Fq2f}ha#!A!<1}&5?xqna2qB&z z_=Z~49{UtrIQ0Q~SgGonN8rYc4HCQhKF#dx{C)rYt5$p%MQsa?xc$Ta(q()eyWjX6+44|FoV33O@wj9gcakYUmcM7*hIM~g=AV_FJ*iM&7hd1*v!v`PWd#GxV-Ej zMMyDF;u>eBq(mW1G@j-~nNC=VgMJFxQIS3su1o#4c&}r0L?Rr9smFU diff --git a/smart_service/public/__pycache__/oauthtest.cpython-38.pyc b/smart_service/public/__pycache__/oauthtest.cpython-38.pyc index 2659e7d66be93e6cd4cc56ed46da964ad836bf68..913216474e976f8f4fa2f610a1272824a494148f 100644 GIT binary patch delta 286 zcmZo;Z)4{T<>lpK0D|%(rxH6R@@6nbO)UGt$T>NmQPn7ly*RbFI5R)5h!3dZ7DrKP zaY24wajGUu5f4zHh#N$JbQkdgiIogR!jq3NHZqD%_Fzh{X9J0|g9v62!2%>S*^2l< zY(Wqq03yJeLB>R}6epGe4Zg)vTAW%0HV?^oVUSudAp&IG;!RJ@OD#$)NsZ4=tt?gn z3KfG)V_@U~LN+jFvts06ED{F_YO+EsWdgFJILk9KOHy+(i%W_`fqbw6h`~r!OwM4I HWt0N|-}E*_ delta 286 zcmZo;Z)4{T<>lpK0D=!qClh-n@@6pJnppOOk!x~3qpHy@_Ttpy;>`TKB7UHXTO38H z#Rd6!#i^PsMZ7?PA|4RI4I=n}#7c%D(aFac8yUqXdoZQfvxCGrKm-ejUy#k`&N+!<1sQ&?IU zQdm-%nwg`RQy7C8G+AGQ^!jNs-r{h{PcF?(%_~U;i68?eAjbiSi$#D$Dnk@w3PTiA z3S$aW3j@#;W}qo7w*}`GV{`t8G)){0K^7iXCN+S0TL+;Ky8eE zD}lrq%uS?rZ522Fap&u-4gK5%*oG9ElDl%O)MzL z%uDyvWS%^oQH66QLlHYrc@g`>XH61C%s?iHTg(I`I2gfvkjl@DN*WMlV6`BE14!KB Tu*uC&Da}c>V+HcSns}H1U#cfl diff --git a/smart_service/transactions/doctype/kilometer_mapping/kilometer_mapping.json b/smart_service/transactions/doctype/kilometer_mapping/kilometer_mapping.json index bdfc8d9..3281f65 100644 --- a/smart_service/transactions/doctype/kilometer_mapping/kilometer_mapping.json +++ b/smart_service/transactions/doctype/kilometer_mapping/kilometer_mapping.json @@ -23,6 +23,8 @@ "column_break_14", "sub_system_filter", "section_break_16", + "sort_by_kilometer", + "temp_field", "config_kilometer" ], "fields": [ @@ -140,14 +142,27 @@ { "fetch_from": "variant_mapping.vehicle", "fieldname": "vehicle", - "fieldtype": "Data", + "fieldtype": "Link", "label": "Vehicle", + "options": "Vehicle", "read_only": 1 + }, + { + "fieldname": "sort_by_kilometer", + "fieldtype": "Button", + "label": "Sort by Kilometer" + }, + { + "fieldname": "temp_field", + "fieldtype": "Select", + "hidden": 1, + "label": "Temp Field", + "options": "\nSet\nNot Set" } ], "index_web_pages_for_search": 1, "links": [], - "modified": "2021-12-26 08:41:27.769730", + "modified": "2022-01-17 09:52:41.630373", "modified_by": "Administrator", "module": "Transactions", "name": "Kilometer Mapping", diff --git a/smart_service/transactions/doctype/kilometer_mapping/kilometer_mapping.py b/smart_service/transactions/doctype/kilometer_mapping/kilometer_mapping.py index cb10f3b..dfa5998 100644 --- a/smart_service/transactions/doctype/kilometer_mapping/kilometer_mapping.py +++ b/smart_service/transactions/doctype/kilometer_mapping/kilometer_mapping.py @@ -1,8 +1,9 @@ # Copyright (c) 2021, Hard n Soft Technologies Pvt Ltd and contributors # For license information, please see license.txt -# import frappe +import frappe from frappe.model.document import Document class KilometerMapping(Document): - pass + def onload(self): + pass \ No newline at end of file diff --git a/smart_service/transactions/doctype/kilometer_mapping_items/kilometer_mapping_items.json b/smart_service/transactions/doctype/kilometer_mapping_items/kilometer_mapping_items.json index 104269b..493af91 100644 --- a/smart_service/transactions/doctype/kilometer_mapping_items/kilometer_mapping_items.json +++ b/smart_service/transactions/doctype/kilometer_mapping_items/kilometer_mapping_items.json @@ -42,7 +42,7 @@ "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2021-11-29 13:42:31.330298", + "modified": "2021-12-30 18:41:54.774956", "modified_by": "Administrator", "module": "Transactions", "name": "Kilometer Mapping_Items", diff --git a/smart_service/transactions/doctype/procedure/__pycache__/procedure.cpython-38.pyc b/smart_service/transactions/doctype/procedure/__pycache__/procedure.cpython-38.pyc index c8ae902e7f5e22ce4f39da964e0bf4d55e2691bf..49fd7e012fc3a5f02c61143d66a81bddde74b55e 100644 GIT binary patch delta 328 zcmXX=u};G<5WTbAq(w~xNNg;OSvs?WgjhOIb;(jiwNnaC6WOk^6fv|vP_Z(!zvX@b zQon$SbIVD0?|kR?-hK02L-B&!^!D+dUJ@i~$OAHs70VgI6G$$_2Bc7I z&2z3`C-xvaGTOiz^Nz$3WbscB8*azHpHmF&e=tHp`9Nu}sW{l7#1-t>2d?mq5tj`O zr%lFvRGOk`l#gf1O=LaI)3!G6rLNnFb%j$I^D&JVMWwv3N|z=k;<XRAR~OQi=Sx~$Z~nQ-sv8sBSQ=T7Olbtd_0@a`(e*x=H| JKD%TQ{s9IZOHcp+ delta 93 zcmaFEGKZNjl$V!_0SNa0nUHvcVIrT5wgQls!jQt4!;s4u#mLCu&XB^C!ra1;!ko(3 q%pAp(!V=7&$@&tcX=2_lW#Y{kghY0}9krH$O diff --git a/smart_service/transactions/doctype/procedure/procedure.py b/smart_service/transactions/doctype/procedure/procedure.py index aadfa69..6084c37 100644 --- a/smart_service/transactions/doctype/procedure/procedure.py +++ b/smart_service/transactions/doctype/procedure/procedure.py @@ -1,8 +1,12 @@ # Copyright (c) 2021, Hard n Soft Technologies Pvt Ltd and contributors # For license information, please see license.txt -# import frappe +import frappe from frappe.model.document import Document class Procedure(Document): - pass + pass +@frappe.whitelist() +def get_doc_status(docname): + self = frappe.get_doc("Procedure",docname) + return self.workflow_state diff --git a/smart_service/transactions/doctype/publish/__pycache__/publish.cpython-38.pyc b/smart_service/transactions/doctype/publish/__pycache__/publish.cpython-38.pyc index 897c2bb2a4c87e14bc3309973b0c1760462a14d0..6c0924a307ee78305c4754f3684583ff48fe6eca 100644 GIT binary patch literal 1170 zcmc&!OK%e~5VpO~lvF~Z6v1h4VFe_#(C{dwm8ev4iI5PNJ+N}t&ZF!jwKpkklMCq; zj+Nll9^oJGSIm)9Z=5S3G2Wy!_*t6rAeKS8lhk)Lm{h+^HgnnvcmP{}< zfaN9#h8T`fpjQ&(gaianFe5Ow5Hpy0h?vRA*a*xv3M`I}?GwZ-W*?$44jhJGBi}iN zlTgFQ%H7POe!|l{(#R}fFgAc?83acGW+)&`Z%-I-DHIe*q7_`&kp|Dn21WA=VEGM1j<)eJ zeC4(=L_^HTM{Wt@ zJ^Z`VI)u6?UQ1+&7qa@p`hzDc%k`B$zM!|;;evYu-swg$_tw11f!0SA zkEYCvY1;17_5|0)sIuylz|>omse%1Z{~?DWx7qJpt8B$tlg5?RHaucM%AP<%_wf|{ zwH~-H)0~Tx#_cbkHGN;-w-26Hms_J#z0tRnJ?TtESW_8tCk7xB3C)$&iZhz~cHm5_ zB}xzxlxGuB2E2o=k62Q8aMATbx1n+(8i(M!1BSc>0+B_$NKE45tJo%s({%wXaSgn_ zEA;TG>ywnKFkL*ZLcS5Z>8rl1;T$L=aRwi5flm40^00_;UzKiP_jjYK@yMilh{*FHn7f_7!}b zy?YTK!kH-QEZ^+Rely8@yD!0$-#D$;YYc7k{Vo1<$Bk8Jj(7I!zLL)@k_wJl7>v!w z(8rpBqm!T=+!DmExfl`l5JeMRn+*tH*aQ?PKIH>$*fpOx3Z^jNCEsTk%LC^hFG`q* zQcMBZ-MVp0KEkNv_Cri3%wetS(5?ea6 zq;C-&<6=g@EG|i&OAwx3!1Dx%{V|FKqPiAhNv`1~8{s7YQw+tyVd&@pIV*39b~UPX z3Zp}af~=SK%}M%Tw7-EBe^coOrdx>WMHp0h80g@2O>8geIr?01-^ol$LaV`aOV diff --git a/smart_service/transactions/doctype/publish/publish.json b/smart_service/transactions/doctype/publish/publish.json index 24ef43a..9651f78 100644 --- a/smart_service/transactions/doctype/publish/publish.json +++ b/smart_service/transactions/doctype/publish/publish.json @@ -1,7 +1,7 @@ { "actions": [], "allow_rename": 1, - "autoname": "format: {vehicle}-{language} planned on {creation}", + "autoname": "format: {vehicle}-{language} {version}", "creation": "2021-11-01 12:28:45.623316", "doctype": "DocType", "editable_grid": 1, @@ -14,6 +14,7 @@ "publish_status", "column_break_3", "release_description", + "version", "section_break_7", "vehicle", "vehicle_status", @@ -182,12 +183,17 @@ "fieldtype": "Data", "label": "Kilometer Mapping Status", "read_only": 1 + }, + { + "fieldname": "version", + "fieldtype": "Data", + "label": "Version" } ], "index_web_pages_for_search": 1, "is_submittable": 1, "links": [], - "modified": "2021-12-26 10:33:26.673121", + "modified": "2022-01-04 15:52:26.491578", "modified_by": "Administrator", "module": "Transactions", "name": "Publish", diff --git a/smart_service/transactions/doctype/publish/publish.py b/smart_service/transactions/doctype/publish/publish.py index 1334a3e..c6c3219 100644 --- a/smart_service/transactions/doctype/publish/publish.py +++ b/smart_service/transactions/doctype/publish/publish.py @@ -4,38 +4,60 @@ import frappe from frappe.model.document import Document import json + class Publish(Document): pass list1= [] -@frappe.whitelist() -def api_publish(): - listProc =[] - # docs_child = frappe.db.get_list('Publish_Docs', filters={'parent':args}, fields=['variant_mapping', 'system','sub_system','procedure_link','procedure_status']) - # for d in docs_child: - # if d['procedure_link']!= None: - # docs_children = frappe.db.get_list('Procedure_Details', filters = {'parent':d['procedure_link']}, fields=['procedure_name','step_name','content_type','content','file'], order_by='idx') - # dictProcedure = {d['procedure_link']:docs_children} - # listProc.append(dictProcedure) - # print(json.dumps(listProc)) - # with open("/home/frappe_srv_01/frappe-bench/apps/smart_service/smart_service/transactions/doctype/publish/jsonData/procedurePublish.json",'w') as f: - # json.dump(listProc,f) +# @frappe.whitelist() +# def api_publish(): +# listProc =[] +# # docs_child = frappe.db.get_list('Publish_Docs', filters={'parent':args}, fields=['variant_mapping', 'system','sub_system','procedure_link','procedure_status']) +# # for d in docs_child: +# # if d['procedure_link']!= None: +# # docs_children = frappe.db.get_list('Procedure_Details', filters = {'parent':d['procedure_link']}, fields=['procedure_name','step_name','content_type','content','file'], order_by='idx') +# # dictProcedure = {d['procedure_link']:docs_children} +# # listProc.append(dictProcedure) +# # print(json.dumps(listProc)) +# # with open("/home/frappe_srv_01/frappe-bench/apps/smart_service/smart_service/transactions/doctype/publish/jsonData/procedurePublish.json",'w') as f: +# # json.dump(listProc,f) - list1 = [] - docs_child = frappe.get_doc('Vehicle', 'Marazzo') - docs_child = frappe.db.get_list('Vehicle') - for d in docs_child: - docs = frappe.get_doc('Vehicle', 'Marazzo') - list1.append(docs) +# list1 = [] +# docs_child = frappe.get_doc('Vehicle', 'Marazzo') +# docs_child = frappe.db.get_list('Vehicle') +# for d in docs_child: +# docs = frappe.get_doc('Vehicle', 'Marazzo') +# list1.append(docs) - print(docs_child) - return docs_child +# print(docs_child) +# return docs_child - # with open("/home/frappe_srv_01/frappe-bench/apps/smart_service/smart_service/transactions/doctype/publish/jsonData/vech.json",'w') as f: - # json.dump(docs_child,f) - # return json.dump(listProc) +# # with open("/home/frappe_srv_01/frappe-bench/apps/smart_service/smart_service/transactions/doctype/publish/jsonData/vech.json",'w') as f: +# # json.dump(docs_child,f) +# # return json.dump(listProc) - return docs_child -def print(inputText): - frappe.msgprint(str(inputText)) \ No newline at end of file +# return docs_child +# def print(inputText): +# frappe.msgprint(str(inputText)) +@frappe.whitelist() +def cal_ver(vehicle,lang,publish_type): + ver = frappe.db.sql("""select max(version),publish_type from _d6463952657fa86c.tabPublish where vehicle = '{vehi}' and language = '{lang}';""".format(vehi=vehicle,lang=lang)) + ver1 = frappe.db.sql("""select max(version),publish_type from _d6463952657fa86c.tabPublish where vehicle = '{vehi}' and language = '{lang}' and publish_type='Global';""".format(vehi=vehicle,lang=lang)) + # frappe.msgprint(str(ver)) + v = 0.0 + + if publish_type=='Global': + if ver1[0][0] == None: + v = 1.0 + else: + v= float(ver1[0][0]) + 1.0 + + elif publish_type=='Internal': + if ver[0][0] == None: + v = 0.1 + else: + v= float(ver[0][0]) + 0.1 + v =float("{:.2f}".format(v,1)) + return v + \ No newline at end of file diff --git a/smart_service/transactions/doctype/system_mapping/__pycache__/system_mapping.cpython-38.pyc b/smart_service/transactions/doctype/system_mapping/__pycache__/system_mapping.cpython-38.pyc index 4d81e0aaebd814b370a8f9c6949526377085af36..c32371491e8dec31967406b79ec27c12bf24d9d5 100644 GIT binary patch delta 819 zcmZuv&u`N(6prKkYLZr6Il@qw;Lsb}feYFJF(jmkT?S~1K$#o6TiPUTZLd?SR6R`M z#;J&Ndl+}l-1sYyLE^$6!pr&tB(P=sJ-_dLpP%io&PT8Is#49qvBTuG?JZ zsE9)Eq@6E5Xd`5B%o>fjUMbD%1TV@+x608tmb(4iYH()6;DxUCm=0=kGq^CUd=%f@ zN@0ZhtG)=vSs7?yK(!^A3HE|@9o%0FB@(8=l&DY0Oghc#JRzrAP2>|^Zrw2zv$~1o zWVj^R(@=LBV(T*<@%Yk&Y3p4n5D4p6go*g=rKQ>^O95HJ%Yd3UmclHh>{O@H?7!DT z&(fsW|K&^R+TZ__3tP8N42z